mas options to overcome install/purchase/upgrade/lucky failures from macOS 26.1, 15.7.2 & 14.8.2
#6550
Replies: 1 comment 7 replies
-
|
Thanks for the heads up @rgoldberg.
Just for any users reading this: I would strongly recommend against doing this, even if just for
No. I don't like the security profile this introduces and puts a lot more trust in a tool that hasn't yet earned it.
I would suggest not recommending users do this then and that Homebrew should also not recommend this. I think the best trust model here is for |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Since Brew Bundle uses mas, I wanted to check with Homebrew personnel:
macOS 26.1, 15.7.2 & 14.8.2 all require an Apple-only entitlement to connect to
installd.That breaks the Apple private framework that mas uses for its
install,purchase(akaget),upgrade(akaupdate) &luckycommands.mas can work around this by calling
/usr/sbin/installer, which requires root permission.The forthcoming mas 4.0.0 must be run with root permission for any of the aforementioned 4 commands to work.
That isn't ideal for scripts, but people can modify their
sudoersto allowsudoto be used without a password.mas wouldn't need to use
sudo, however if it was rewritten & repackaged to use a privileged helper executable. That would require mas to be distributed signed, so would require mas to migrate from a formula to a cask.It would also require the user to allow the helper executable to run as a background process, also requiring user acceptance when mas is installed.
Would it be beneficial to have mas available using a privileged helper executable?
Maybe mas could use a privileged helper process if it is running, otherwise mas could still work if it is called with root permissions. I don't know if that would be easy to do, either in a single packaging or in separate packagings (one for helper, one for root permissions).
Signing mas & using a privileged helper executable would take some time to implement (coding & packaging the privileged helper app, signing the executable & installer, possibly switching build system from SwiftPM to Xcode, etc.), while the
sudoversion is almost ready for the 4.0.0 release.If mas stays with requiring root permissions, mas can provide instructions about how to setup
sudoersfrom the error message when any of the commands that require root are run without such permissions. I don't think that I want to automate setting upsudoersto prevent messing it up. I don't want to be held responsible if someone else messes up theirsudoers, so maybe even instructions might be bad. Maybe mas should just provide a URL to third-party instructions.FYI: 4.0.0 will probably only update the progress bar for the download portion, not for the install portion. I don't want to waste much time on logging output right now, especially since I will probably completely refactor the output system to support the forthcoming JSON output option & installing / upgrading in parallel.
Beta Was this translation helpful? Give feedback.
All reactions