Closed chilcote closed 3 years ago
Ugh. There has to be a better way. Can you create an issue and link to this PR? I'll ping some people and get thoughts.
Agreed. @chilcote should rewrite IAs in Swift 💩.
Doesn't Swift also have to be built for each platform?
Honestly I feel like the solution is to built a package for ARM and a package for Intel and your MDM has the ability to specify one package for each.
MDM will be able to determine the platform type before it sends an IEA command.
A fat python compile would fix this too, as installing Rosetta could simply be done via IAs preinstall script it pulls down.
What if we had a LaunchDaemon that did the rosetta install and then continued to load IAs LDs once that finished?
Doing this all in preinstall
feels a little risky to be, considering it may not work reliably all the time.
I like it. :shipit:
Why not a fat python install? The daemon is going to introduce a lot of complexity and we need to figure out what to do if/when the process running it also fails.
With Apple putting PRs up to python and Ronald working on pyobjc, it feels like we have a potential solution that won't increase the complexity.
As in, python install for ARM instead of calling Rosetta? That works too.
We shouldn't trust that softwareupdate will be consistent enough for a preinstall script imo. (See: today 🤣ðŸ˜)
So to be clear, this PR isn't meant to be a permanent, stamped-in-time solution, that will forever exist and will never be replaced. But it will get IAs working on M1 Macs, for now. By all means, a fat python is the right solution, but that doesn't exist. We're allowed to iterate 🤓
I think that is completely fair. Can we land this as a quick and dirty and then fix it more long term in a different way?
Or leave this as a reference to others who want IAs to work on M1 Macs, until there's a proper solution. My life doesn't change whether this is merged or not 😉.
https://github.com/munki/munki/pull/1056
I like this approach, though it would likely require getting rid of the munki-pkg
requirement.
Seems overly complex to me for the problem at hand, but again, I really don't care so long as Rosetta gets installed.
Munki-pkg can work with product-requirements.plist
.
This could allow as to add arch
requirement using munki-pkg.
Does hostArchitectures="x86_64"
trigger Rosetta install or not? I am not sure about that and have no Apple Silicon Mac available to test :-(
@chilcote also needs https://github.com/munki/munki/commit/d9520b8af6fdbfe25cd562edd4efd036e7b54b7c for some use cases that aren't necessarily advertised on the README :)
Since there's an RC for a universal python (https://www.python.org/downloads/release/python-391rc1/), I think it's probably a good idea to just cancel this PR. Folks can use it as a reference for how to get IAs on M1 Macs in the meantime
Not the most elegant idea, but it seems to work.