munkiadmin
munkiadmin copied to clipboard
macOS 12.0.1 & MunkiAdmin
I am currently testing macOS 12 for my company, and was running through all our standard softwares, and decided to test my platform management suite, and I got a message when starting MunkiAdmin today that it will not be supported on future macOS releases and needs to be updated. Currently running the most recent release.
No issue as of yet, didn't see any other posts in the "issues" forum, so thought I would just quickly post it here.
I too also saw the message. Not sure why though. According to System Information, it's a Universal app.
That message means that something in the app made a call to the system Python environment. Monterey is most likely the last OS to include that framework so Apple is being overt that soon apps will break that make the call to the system framework.
Best bet would be to include its own python framework in the app going forward.
Im getting this warning message when trying to open AutoPkgr on macOS Monterey for the first time and it then sends you too https://www.python.org/doc/sunset-python-2/.
So the python part of the code might need to be updated to python 3 or is it some left over python 2 code maybe?
Seems like AutoPkgr also gets this warning.
I'm getting these prompts too when launching MunkiAdmin the first time on a fresh install. It seems to be triggered by a call to munki's own CLI tools if they exist. Specifically, when MunkiAdmin launches, it runs /usr/local/munki/makepkginfo --version
and /usr/local/munki/makecatalogs --version
to get their version. Disabling these checks in code makes the prompt disappear.
This is an interesting bug since there's no Python 2 (nor 3) code in MunkiAdmin and there's also no Python 2 in the latest Munki. Yet we get an alert and the system thinks we're trying to run legacy python.
The code that triggers the prompt can be seen here: https://github.com/hjuutilainen/munkiadmin/blob/d70cff53df629334e7227be327d638775bbd26ca/MunkiAdmin/Singletons/MAMunkiRepositoryManager.m#L3280-L3351
/usr/local/munki/makecatalogs
itself is using a shebang which will resolve to the Python 2.7 interpreter binary.
[jappleseed]:ad-bind # head -n 5 /usr/local/munki/makecatalogs
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright 2009-2021 Greg Neagle.
#
[jappleseed]:ad-bind # makecatalogs --version
5.5.1.4367
Still seeing this on 12.1 (21C52), FWIW.
Apple removed python 2.7 in the latest Beta of 12.3 https://developer.apple.com/documentation/macos-release-notes/macos-12_3-release-notes
I'm going to move to calling the munki python CLI tools through the python3 bundled with munki. So a call to /usr/local/munki/makecatalogs
would become /usr/local/munki/munki-python /usr/local/munki/makecatalogs
. Seems to work fine in my testing.
And just to be clear: There is no python code in MunkiAdmin, the warning comes from MunkiAdmin calling makecatalogs which uses the system python by default.
Has there been any update with this update?? 12.3 has broken munkiadmin with the removable of python 2
This has been fixed in the latest Munki release (https://github.com/munki/munki/releases/tag/v5.6.3) and no modifications are needed in MunkiAdmin. The makecatalogs
tool contained in the latest Munki release doesn't use the system python by default.
Thanks for the letting me know. i was running munkitools-5.6.2.4398 so that explains my problem