-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update installinstallmacos.py with new option to create dmg that's friendly for Jamf Pro deployment purposes #81
base: main
Are you sure you want to change the base?
Conversation
Add an option (--jamf-dmg) to output a compressed read-only dmg that can be used for deployment with Jamf Pro. Jamf Pro can deploy apps through DMGs with a caveat that file structure of the DMG will simply be copied to the target volume. The default --compress option leaves the install macOS app in the root of the DMG which would mean that Jamf Pro would attempt to deploy the app to the root of the target volume which is obviously not desired. Jamf Pro, unlike Munki, is not smart enough to handle seeing an app bundle in the root of a DMG and deploying that to the Applications folder of the target volume. This change would be particularly helpful given that the "Install macOS Big Sur.app" is too big to be packaged through pkgbuild since the "SharedSupport.dmg" is over 8GB.
While the approach you've taken (probably) works now, it's fragile long-term. |
That certainly makes more sense long term. I'll get back to you with an updated pull request and submit it when I get a chance. |
…riendly for Jamf Pro deployment purposes
Submitted an update where the script is just grabbing whatever is in the parent folder containing the installer app. Let me know what you think. |
This still seems rather baroque, and I had to read through the code several times to understand what you were doing and why. More explanatory comments would help. |
I wonder if this has been obsoleted by https://github.com/scriptingosx/fetch-installer-pkg ? |
Obsoleted if all you care about is Big Sur installers, maybe. |
Since this only just came up, I assumed that earlier OSes can still be packaged up for uploading to Jamf Pro. Not that I've tried as I don't have any bandwidth issues that would warrant that work. |
…iendly for Jamf Pro deployment purposes Provided additional comments on what code is doing.
I added additional comments in the code block I added. I realize it's longer than the actual code itself but you asked for additional comments in the code. Here's some further elaboration: If we used the resulting DMG we get from If the file structure in the resulting DMG were Because of the way Don't ask me why but hdiutil treats "folders" and "Installer app bundles" (which I realize are folders) differently. That is, For the purposes of Jamf, we cannot just point We also cannot go up one folder in the sparsebundle that's temporarily created because that is in fact just the root of the sparsebundle which contains files that we definitely do not need to deploy. Even the The
Does that explain what's going on? |
Don't forget that with Also, with that in mind, if I were to use this with Jamf I would want a version or build number in the DMG name to allow for testing and incrementation. Something to also think about if you're trying to avoid subsequent manual steps. |
…iendly for Jamf Pro deployment purposes
@grahampugh I did not want to make major modifications to the overall code outside of Keep in mind even with the modification to If the concern is the fact that I'm only focusing on the parent folder of the installer app, then that concern should also apply to Also, the resulting DMG file name with |
Just checking in. Have the last changes I made satisfied the concerns that were raised? |
@gregneagle Just wanted to check in again. Have the changes I made satisfied the concerns that you had raised? |
Add an option (--jamf-dmg) to output a compressed read-only dmg that can be used for deployment with Jamf Pro. Jamf Pro can deploy apps through DMGs with a caveat that file structure of the DMG will simply be copied to the target volume. The default --compress option leaves the install macOS app in the root of the DMG which would mean that Jamf Pro would attempt to deploy the app to the root of the target volume which is obviously not desired. Jamf Pro, unlike Munki, is not smart enough to handle seeing an app bundle in the root of a DMG and deploying that to the Applications folder of the target volume.
This change would be particularly helpful given that the "Install macOS Big Sur.app" is too big to be packaged through pkgbuild since the "SharedSupport.dmg" is over 8GB.