Stupid Tricks with createOSXinstallPkg and VMware Fusion

Like many people tasked with managing OS X/macOS machines, I use VMware Fusion to do a lot of testing. Fusion enables me to test in various versions of OS X, and to easily make changes and revert to a prior state. It’s a great tool.

For some of the testing I do, it’s important to be able to quickly and easily build a VM that is configured just like the “real” machines I manage. There are a few way to do that. Since we build our machines by booting into a NetBoot image and using Graham Gilbert’s excellent Imagr (https://github.com/grahamgilbert/imagr) to restore an image, it’s great that we can also boot Fusion VMs from a NetBoot image.

Continue reading “Stupid Tricks with createOSXinstallPkg and VMware Fusion”

Stupid Tricks with createOSXinstallPkg and VMware Fusion

Professional Training and Support for Munki

munkiOne of the objections some organizations have against using open source tools like Munki is that they want to pay for professional training and support.

Amsys has professional training for Munki:

http://www.amsys.co.uk/amsys-training-courses/coursebooker/munki-101/

If you can’t get to London, check out other professional support and training organizations around the world:

Munki Professional Support

Professional Training and Support for Munki

Revisiting receipts for OS X installs via Munki

Background

When using Munki to upgrade OS X with a package created using createOSXinstallPkg (https://github.com/munki/createOSXinstallPkg), the recommendation has been to change the auto-generated receipts array:

https://github.com/munki/munki/wiki/Installing%20OS%20X#receipts

The intention here was to provide something that would satisfy Munki’s check to see if an item needs to be installed: if the recommended receipt is present, Munki won’t attempt to (re-)install the package that installs OS X.

A problem

However, I recently discovered an issue with this approach. For some machines here, an “InstallYosemite” item was added to their manifest’s managed_installs some time ago to force an upgrade to Yosemite. Once that upgrade was complete, the normal installcheck mechanism found a receipt for “com.apple.pkg.BaseSystemBinaries” of version “10.10.0.1.1.1412852630” or higher, and did not offer to reinstall Yosemite, even though the item remained in “managed_installs” in that machine’s manifest.

Later we added “InstallElCapitan” as an optional_install for all users (in an included_manifest). If a user with a machine manifest like the one described above then chose to self-upgrade to El Capitan, as part of the El Capitan install, the “com.apple.pkg.BaseSystemBinaries” receipt is removed. (Note that at https://github.com/munki/munki/wiki/Installing-OS-X/17e17bfdc80727bbd83595359eec6db2741fe88c, the previous recommended receipt to check for El Capitan is “com.apple.pkg.Essentials” since the “com.apple.pkg.BaseSystemBinaries” is not present in an El Capitan install.)

Once the El Capitan upgrade is complete, when Munki later checks for updates, it encounters “InstallYosemite” in the managed_installs. Since the “com.apple.pkg.BaseSystemBinaries” receipt is no longer present, it decides it needs to install Yosemite once again. This of course, fails, since the package itself has an installcheck, which errors with:


Cannot install on volume / because it is disabled.
-------------------------------------------------------------------------
installer: Cannot install on volume / because it is disabled.
installer: You can’t upgrade this version of OS X because a newer version
is installed.
-------------------------------------------------------------------------

If your InstallElCapitan package also includes the Munki bootstrap flag (to ensure all other needed updates for El Capitan are performed), this can lead to a loop where Munki attempts to install Yosemite, fails, tries again, etc.

A fix

The obvious fix is to remove “InstallYosemite” from all manifests once you are offering “InstallElCapitan”. But I think I have a way to avoid this situation in the future. I will recommend a different installation check item for createOSXinstallPkg-type items.

Instead of modifying the auto-generated receipts array, I will now recommend adding an installs array. Here’s one for El Capitan:


<key>installs</key>
<array>
  <dict>
    <key>ProductVersion</key>
    <string>10.11.4</string>
    <key>path</key>
    <string>/System/Library/CoreServices/SystemVersion.plist</string>
    <key>type</key>
    <string>plist</string>
    <key>version_comparison_key</key>
    <string>ProductVersion</string>
  </dict>
</array>

This directs Munki to look at the ProductVersion key in /System/Library/CoreServices/SystemVersion.plist, and compare it with 10.11.4. (you could even just make it “10.11” to prevent Munki offering this as an upgrade to 10.11.[0-3] machines.)

/System/Library/CoreServices/SystemVersion.plist exists in all versions of OS X, so it’s a better comparison than package receipts that may or may not exist in future versions of OS X. And it’s easier to revise in the future since the ProductVersion maps to the OS X version you are installing.

Revisiting receipts for OS X installs via Munki

Flash Player 20 and Analytics

Flash Player 10Flash Player was a frequent topic on this blog in the past. But Adobe has improved its packaging, and tools like AutoPkg have taken away much of the pain around deploying frequent Flash Player updates.

Yesterday, Adobe released Flash Player 20. A new addition is an executable at /Library/Application Support/Adobe/FPFeedbackService. Poking at this executable using strings makes it clear the tool reports analytics back to Adobe.

Some fine people on the MacAdmins Slack channel poked at it some more with Hopper and determined it can be turned off by adding DisableAnalytics=1 to a configuration file at /Library/Application Support/Macromedia/mms.cfg.

If you wish to disable Flash analytics in your fleet, then, one approach would be to install a properly configured mms.cfg file. The https://github.com/munki/munki-pkg-projects repo has a project you can use to build such a package: https://github.com/munki/munki-pkg-projects/tree/master/AdobeFlashConfiguration

The AdobeFlashConfiguration project is designed for use with the munki-pkg tool.

More info on Flash analytics here: https://osxbytes.wordpress.com/2015/12/09/flash-player-20-0-0-235-adds-phone-home-analytics/

Flash Player 20 and Analytics