Breaking changes in flox post 0.3.6 - October 2023

Hi everyone, as promised :sweat_smile:, we are more aggressively making improvements to flox. 3 updates to share:

1/ for those using, theflox/prerelease to get upgrades, it may stop finding upgrades to auto install. This is because we are changing core architecture. Fall back to the installer on our documentation page.

2/ today and tomorrow (October 23-24, 2023) there may be issues on the CLI relating to search and activate. We hope nothing goes wrong but wanted to let you know in case something does.

3/ build, publish, subscribe, and unsubscribe will be deprecated from the CLI. We need to do this to unblock some dependencies and we also are taking a more holistic design pass based on existing usage. We fully plan on bringing these features backā€“incorporating feedback. If you are currently using these features please reach out to me ( graham@flox.dev) and if you depend on them please stop upgrading flox for now and stay on version 0.3.6 or older.

4/ run will change functionally but we are keeping it in flox as experimental. Be on the look out if you are using it heavily as the functionality will change. (Please reach out to me at graham@flox.dev if you have feedback!)

We will not be performing breaking changes like these once we get to general availability and is overall something we strive to minimize during this period of evaluation. Apologies if this is disruptive in any way.

1 Like

Nice to hear that, I actually run flox nix store gc fairly often so will do a sudo apt-mark hold flox :smiley:

Hi Graham,

I tried to install 0.3.6 from the install page (Apple Mac M1) and I got an ā€œinstallation error, contact software vendorā€ message. Do you know how to investigate this kind of issue?

Thanks.

Thanks for letting us know, Eric. It installs on my M2 so must be an M1 specific issue. I have raised to the engineers to investigate further.

1 Like

I just installed 0.3.6 successfully on an M1. There may be more debugging information in /var/log/installation.log - could you take a look at that and maybe send it over?

Here you go (BTW the actual log file was /var/log/install.log)

2023-11-01 18:50:29+01 eric-mbp Installer[76330]: Package Removal: User opted to keep package.
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: @(#)PROGRAM:Install  PROJECT:Install-1000
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: @(#)PROGRAM:Installer  PROJECT:Installer-1131
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Hardware: MacBookPro18,2 @ 0 MHz (x 10), 32768 MB RAM
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Running OS Build: macOS 13.5.2 (22G91)
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Env: USER=etorreborre
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Env: COMMAND_MODE=unix2003
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Env: __CFBundleIdentifier=com.apple.installer
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Env: PATH=/usr/bin:/bin:/usr/sbin:/sbin
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Env: LOGNAME=etorreborre
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Env: SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.KNMfadGZ9z/Listeners
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Env: HOME=/Users/etorreborre
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Env: SHELL=/bin/zsh
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Env: TMPDIR=/var/folders/f1/z4ywgsbx7572r2wmslwy778w0000gn/T/
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Env: __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Env: XPC_SERVICE_NAME=application.com.apple.installer.1152921500312089298.1152921500312089303
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Env: XPC_FLAGS=0x0
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: flox  Installation Log
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Opened from: /Users/etorreborre/Downloads/flox.aarch64-darwin.pkg
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Failed to load specified background image
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Product archive /Users/etorreborre/Downloads/flox.aarch64-darwin.pkg trustLevel=350
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: External component packages (1) trustLevel=350
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Could not load resource readme: (null)
2023-11-01 18:50:33+01 eric-mbp Installer[76606]: Could not load resource license: (null)
2023-11-01 18:50:37+01 eric-mbp Installer[76606]: ================================================================================
2023-11-01 18:50:37+01 eric-mbp Installer[76606]: User picked Custom Install
2023-11-01 18:50:37+01 eric-mbp Installer[76606]: Choices selected for installation:
2023-11-01 18:50:37+01 eric-mbp Installer[76606]:       Upgrade: "flox"
2023-11-01 18:50:37+01 eric-mbp Installer[76606]:       Upgrade: "flox"
2023-11-01 18:50:37+01 eric-mbp Installer[76606]:               flox.aarch64-darwin.pkg#flox-0.3.6-2f44b10.pkg : com.floxdev.flox : 0.3.6-2f44b10
2023-11-01 18:50:37+01 eric-mbp Installer[76606]: ================================================================================
2023-11-01 18:50:37+01 eric-mbp Installer[76606]: It took 0.00 seconds to summarize the package selections.
2023-11-01 18:50:38+01 eric-mbp Installer[76606]: ================================================================================
2023-11-01 18:50:38+01 eric-mbp Installer[76606]: User picked Standard Install
2023-11-01 18:50:38+01 eric-mbp Installer[76606]: Choices selected for installation:
2023-11-01 18:50:38+01 eric-mbp Installer[76606]:       Upgrade: "flox"
2023-11-01 18:50:38+01 eric-mbp Installer[76606]:       Upgrade: "flox"
2023-11-01 18:50:38+01 eric-mbp Installer[76606]:               flox.aarch64-darwin.pkg#flox-0.3.6-2f44b10.pkg : com.floxdev.flox : 0.3.6-2f44b10
2023-11-01 18:50:38+01 eric-mbp Installer[76606]: ================================================================================
2023-11-01 18:50:38+01 eric-mbp Installer[76606]: It took 0.00 seconds to summarize the package selections.
2023-11-01 18:50:38+01 eric-mbp Installer[76606]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: location = file://localhost
2023-11-01 18:50:38+01 eric-mbp Installer[76606]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: file://localhost/Users/etorreborre/Downloads/flox.aarch64-darwin.pkg#flox-0.3.6-2f44b10.pkg
2023-11-01 18:50:38+01 eric-mbp Installer[76606]: Set authorization level to root for session
2023-11-01 18:50:38+01 eric-mbp Installer[76606]: Authorization is being checked, waiting until authorization arrives.
2023-11-01 18:50:40+01 eric-mbp Installer[76606]: Administrator authorization granted.
2023-11-01 18:50:40+01 eric-mbp Installer[76606]: Packages have been authorized for installation.
2023-11-01 18:50:40+01 eric-mbp Installer[76606]: Will use PK session
2023-11-01 18:50:40+01 eric-mbp Installer[76606]: Using authorization level of root for IFPKInstallElement
2023-11-01 18:50:40+01 eric-mbp Installer[76606]: Starting installation:
2023-11-01 18:50:40+01 eric-mbp Installer[76606]: Configuring volume "Macintosh HD"
2023-11-01 18:50:40+01 eric-mbp Installer[76606]: Preparing disk for local booted install.
2023-11-01 18:50:40+01 eric-mbp Installer[76606]: Free space on "Macintosh HD": 598,11 GB (598111449088 bytes).
2023-11-01 18:50:40+01 eric-mbp Installer[76606]: Create temporary directory "/var/folders/f1/z4ywgsbx7572r2wmslwy778w0000gn/T//Install.76606Ue9phP"
2023-11-01 18:50:40+01 eric-mbp Installer[76606]: IFPKInstallElement (1 packages)
2023-11-01 18:50:40+01 eric-mbp Installer[76606]: Current Path: /System/Library/CoreServices/Installer.app/Contents/MacOS/Installer
2023-11-01 18:50:40+01 eric-mbp installd[76258]: PackageKit: Adding client PKInstallDaemonClient pid=76606, uid=501 (/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer)
2023-11-01 18:50:40+01 eric-mbp Installer[76606]: PackageKit: Enqueuing install with framework-specified quality of service (utility)
2023-11-01 18:50:40+01 eric-mbp installd[76258]: PackageKit: Set reponsibility for install to 76606
2023-11-01 18:50:40+01 eric-mbp installd[76258]: PackageKit: Hosted team responsibility for install set to team:(79DC3TR3CH)
2023-11-01 18:50:40+01 eric-mbp installd[76258]: PackageKit: ----- Begin install -----
2023-11-01 18:50:40+01 eric-mbp installd[76258]: PackageKit: request=PKInstallRequest <1 packages, destination=/>
2023-11-01 18:50:40+01 eric-mbp installd[76258]: PackageKit: packages=(
            "PKLeopardPackage <id=com.floxdev.flox, version=0.3.6-2f44b10, url=file:///Users/etorreborre/Downloads/flox.aarch64-darwin.pkg#flox-0.3.6-2f44b10.pkg>"
        )
2023-11-01 18:50:42+01 eric-mbp installd[76258]: PackageKit: Will do receipt-based obsoleting for package identifier com.floxdev.flox (prefix path=/)
2023-11-01 18:50:42+01 eric-mbp installd[76258]: PackageKit: Extracting file:///Users/etorreborre/Downloads/flox.aarch64-darwin.pkg#flox-0.3.6-2f44b10.pkg (destination=/Library/InstallerSandboxes/.PKInstallSandboxManager/03F5FA0E-199A-40AA-BD53-468ED82B6B83.activeSandbox/Root, uid=0)
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit: Moving directory /Library/InstallerSandboxes/.PKInstallSandboxManager/03F5FA0E-199A-40AA-BD53-468ED82B6B83.activeSandbox/Root/etc to /Library/InstallerSandboxes/.PKInstallSandboxManager/03F5FA0E-199A-40AA-BD53-468ED82B6B83.activeSandbox/Root/private/etc in sandbox to account for symlink
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit: prevent user idle system sleep
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit: suspending backupd
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit (package_script_service): Preparing to execute script "./preinstall" in /private/tmp/PKInstallSandbox.6pKcjV/Scripts/com.floxdev.flox.0H7ebZ
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: PackageKit: Preparing to execute script "preinstall" in /tmp/PKInstallSandbox.6pKcjV/Scripts/com.floxdev.flox.0H7ebZ
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: Set responsibility to pid: 76606, responsible_path: /System/Library/CoreServices/Installer.app/Contents/MacOS/Installer
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: Hosted team responsibility for script set to team:(79DC3TR3CH)
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: PackageKit: Executing script "preinstall" in /tmp/PKInstallSandbox.6pKcjV/Scripts/com.floxdev.flox.0H7ebZ
2023-11-01 18:50:43+01 eric-mbp install_monitor[76625]: Temporarily excluding: /Applications, /Library, /System, /bin, /private, /sbin, /usr
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: ./preinstall: + set -e
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: ./preinstall: + orig_path=
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: ./preinstall: + '[' -f /nix/var/nix/db/db.sqlite ']'
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: ./preinstall: + '[' -L /usr/local/bin/nix -a -e /etc/flox-version ']'
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: ./preinstall: + nixProfile=/nix/var/nix/profiles/default
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: ./preinstall: + '[' '!' -e /nix/var/nix/profiles/default/bin/nix ']'
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: ./preinstall: ++ stat --format %U /nix
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: ./preinstall: stat: illegal option -- -
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: ./preinstall: usage: stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file ...]
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: ./preinstall: + nixOwner=
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: PackageKit: Hosted team responsible for script has been cleared.
2023-11-01 18:50:43+01 eric-mbp package_script_service[76350]: Responsibility set back to self.
2023-11-01 18:50:43+01 eric-mbp install_monitor[76625]: Re-included: /Applications, /Library, /System, /bin, /private, /sbin, /usr
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit: releasing backupd
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit: allow user idle system sleep
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package ā€œflox.aarch64-darwin.pkgā€." UserInfo={NSFilePath=./preinstall, NSURL=file:///Users/etorreborre/Downloads/flox.aarch64-darwin.pkg#flox-0.3.6-2f44b10.pkg, PKInstallPackageIdentifier=com.floxdev.flox, NSLocalizedDescription=An error occurred while running scripts from the package ā€œflox.aarch64-darwin.pkgā€.} {
            NSFilePath = "./preinstall";
            NSLocalizedDescription = "An error occurred while running scripts from the package \U201cflox.aarch64-darwin.pkg\U201d.";
            NSURL = "file:///Users/etorreborre/Downloads/flox.aarch64-darwin.pkg#flox-0.3.6-2f44b10.pkg";
            PKInstallPackageIdentifier = "com.floxdev.flox";
        }
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit: Cleared responsibility for install from 76606.
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit: Cleared permissions on Installer.app
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit: Hosted team responsible for install has been cleared.
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit: Running idle tasks
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit: Done with sandbox removals
2023-11-01 18:50:43+01 eric-mbp installd[76258]: PackageKit: Removing client PKInstallDaemonClient pid=76606, uid=501 (/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer)
2023-11-01 18:50:43+01 eric-mbp Installer[76606]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package ā€œflox.aarch64-darwin.pkgā€." UserInfo={NSFilePath=./preinstall, NSURL=file:///Users/etorreborre/Downloads/flox.aarch64-darwin.pkg#flox-0.3.6-2f44b10.pkg, PKInstallPackageIdentifier=com.floxdev.flox, NSLocalizedDescription=An error occurred while running scripts from the package ā€œflox.aarch64-darwin.pkgā€.}
2023-11-01 18:50:44+01 eric-mbp Installer[76606]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
2023-11-01 18:50:44+01 eric-mbp Installer[76606]: IFDInstallController 1886920 state = 8
2023-11-01 18:50:44+01 eric-mbp Installer[76606]: Displaying 'Install Failed' UI.
2023-11-01 18:50:44+01 eric-mbp Installer[76606]: 'Install Failed' UI displayed message:'The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.'.

Oh right itā€™s /var/log/install.log

Thanks, I think that has enough info to understand the bug. Which of these paths are present on your system? And did you have a pre-existing Nix or flox installation?

  • /nix/var/nix/db/db.sqlite
  • /usr/local/bin/nix
  • /etc/flox-version

I have both db.sqlite and flox-version. And yes I have a pre-existing flox installation (possibly several by now :-D)

Hmm but no /usr/local/bin/nix? The codepath youā€™re hitting triggers if you donā€™t have both /etc/flox-version and /usr/local/bin/nix. If you symlink a nix binary to /usr/local/bin/nix that could be a workaround. Thereā€™s a bug in the stat invocation which I see in the logs you provided, and weā€™re fixing that, but Iā€™m still not quite sure youā€™re even hitting that codepath - you shouldnā€™t be with a prior flox installation

1 Like

If you symlink a nix binary to /usr/local/bin/nix that could be a workaround

That worked, thanks!

Any idea how you ended up without /usr/local/bin/nix? Wondering if thereā€™s another bug somewhere

I honestly have no clue. That being said Iā€™ve been through so many flox versions that my install is certainly a very particular edge case by now :smiley:

Happy new year! Any new releases planned? 0.3.6 seems broken beyond my debugging capabilities so I am holding to 0.3.4 for a while

Happy new year to you too! Weā€™re aware with the version we have posted on the website and are temporarily pulling it before we launch the updated version. Itā€™s planned very soon (this quarter)! There will be some breaking changes in this version weā€™ll cover when we get closer to the date.

1 Like