foigus' Notes

Mostly OS X Admin Related

Distributing Adobe CC 2014 via Munki

Continuing on the theme of packaging Adobe Creative Cloud (CC) 2014, let’s examine using Munki to deploy the software to computers.

Import and Prepping for Uninstallation
Munki’s preliminary CC 2014 support
Munki added initial explicit Creative Cloud (CC) support recently, adding the ability to specify a Creative Cloud Packager (CCP) uninstall pkg for removing the software. When importing the CCP package it’s important to specify the CCP uninstall pkg:

munkiimport /path/to/CCP_Install.pkg --uninstallerpkg /path/to/CCP_Uninstall.pkg

“version” keys in pkginfo files versus reality
When importing CCP pkgs, pay close attention to the version numbers that munkiimport determines and check to see if they correspond to what’s actually installed by the pkg. Updates baked into the original CCP pkg may not be recognized by munkiimport–for example, if InDesign CC 2014 with today’s most current update is imported, munkiimport suggests version “10.0” rather than the actually installed version of “10.1.0.71”. There’s no way to know exactly what software version is installed (CCP simply mentions “updates” and doesn’t give version numbers) without installing the CCP pkg.  Once the software is installed, either examine the application by selecting it in the Finder than then choosing File -> Get Info (or use makepkginfo–see the makepkginfo example under the “Installs arrays” heading below).  When the software version is determined, editing the “version” key in the pkginfo file to reflect reality should help reduce confusion.

Autoremove
I set “autoremove” to “true” in the pkginfo for each CCP pkg I imported.  Although this is likely organization-dependent, the need to be able to move software licenses from one computer to another made automatic removal the prudent choice.

Installs arrays
Providing an installs array allows Munki to more easily determine whether to software installation is necessary rather than depending on the Adobe uninstall databases.  Leaning on the documentation on this page in the Munki wiki (under the text that says “You can manually generate items to add…”), this could be used for InDesign CC 2014:

makepkginfo -f "/Applications/Adobe InDesign CC 2014/Adobe InDesign CC 2014.app"

And then copy and paste the installs array into the associated pkginfo.  However there are some instances where CCP pkgs need some extra attention:

  • There seem to be a set of unusual pkgs (typically CC titles initially released in the last few years, such as Lightroom and the Edge series of applications) where CCP wraps a pkg around an Adobe installer which is itself a wrapper around a pkg.  munkiimport currently is not able to determine receipts or installs arrays for this software, and thus managedsoftwareupdate considers them always installed and never attempts installation. If any of these pkgs are encountered, install the CCP pkg by hand and generate the installs array.  For example, install Edge Reflow CC and then run:
    makepkginfo -f "/Applications/Adobe Edge Reflow CC.app"

    Copy the installs array into the pkginfo for the Munki installer item.  Once a usable installs array is added to the pkginfo file, managedsoftwareupdate will properly evaluate the installation status of the installer item.

  • Edge Code CC includes extraneous information in all of its version keys. In this situation the best option I’m aware of is a MD5 hash of the Edge Code CC executable itself:
    makepkginfo -f "/Applications/Adobe Edge Code CC.app/Contents/MacOS/EdgeCode"
  • Gaming SDK doesn’t install anything that’s usable for Munki to evaluate for versions. In this case, have makepkginfo evaluate the pkg located inside the CCP pkg:
    makepkginfo "/path/to/GamingSDK_Install.pkg/Contents/Resources/Setup/GSDK1.4en_US/Adobe Gaming SDK 1.4.pkg"

    And include the receipts array in the Gaming SDK pkginfo.

When uninstallation is known to not work
Even with CCP uninstallation pkg support built into Munki, there are multiple CC applications that cannot be uninstalled using their CCP uninstall pkg. Under “Known behavior and issues” in the “Version 1.3” section of the Creative Cloud Packager Readme, there’s documentation about uninstallation of various applications failing.  For Munki, the solution is to use an uninstall_method of uninstall_script (rather than “AdobeCCPUninstaller” that’s generated by importing a CCP uninstallerpkg) which removes the application and the receipt, if installed.  The applications, deletion paths, receipts, and links to Adobe’s support saying this is a proper uninstallation (if I can find it) are below:

  • Edge Code Preview CC
    Path: “/Applications/Adobe Edge Code CC.app”
    Receipt: com.adobe.EdgeCode
  • Edge Inspect CC
    Path: “/Applications/Adobe Edge Inspect CC.app”
    Receipt 1: com.adobe.shadow.pkg
    Receipt 2: com.adobe.shadow.postflight.pkg
  • Edge Reflow Preview CC
    Path: “/Applications/Adobe Edge Reflow CC.app”
    Receipt: com.adobe.pkg.Reflow
  • Gaming SDK
    Path: “/Applications/Adobe Gaming SDK 1.4”
    Receipt: com.adobe.AdobeGamingSDK1.4.pkg
  • Lightroom 5 (Note the CCP uninstaller pkg works if a user is logged in)
    Path: “/Applications/Adobe Photoshop Lightroom 5.app”
    Receipt: com.adobe.Lightroom5
  • Muse (Note the CCP uninstaller pkg works if a user is logged in)
    Path 1: “/Applications/Adobe Muse CC 2014”
    Path 2: “/Library/Application Support/Adobe/Uninstall/Uninstall Adobe Muse CC 2014.app”
    Receipt: com.adobe.adobeMuseCc20142.AdobeMuseCC.pkg
  • Scout CC
    Path: “/Applications/Adobe Scout CC.app”
    Receipt: com.adobe.pkg.Scout

An example uninstall_script for Edge Reflow CC would be:

#!/bin/bash
pathToDelete="/Applications/Adobe Edge Reflow CC.app"
receipt=com.adobe.pkg.Reflow
rm -rf "${pathToDelete}"
pkgutil --forget "${receipt}"

Unserialization
While the installation of the serial number pkg is relatively straightforward, the uninstallation is not. Since the same serial number potentially could be used to serialize different suites, automatically removing a serial number when a particular software title is uninstalled isn’t a given.  Consider a situation where Premiere and InCopy are installed on the same computer. Per discussions with Adobe support, both Premiere and InCopy need to use the same volume serial number when installed together on the same computer.  The following could occur:

  1. Premiere is installed
  2. Premiere is serialized
  3. InCopy is installed
  4. InCopy is serialized
  5. InCopy is uninstalled
  6. InCopy is unserialized

Following the unserialization of InCopy, Premiere won’t run since Premiere and InCopy share the same serial number.  There needs to be a way to determine at uninstallation time if another installed program or suite depends on the same serial number. In the earlier post about packaging Adobe CC 2014 applications, I created serialization pkgs with the following Package IDs:

com.organization.AdobeCCCompleteSerial-VideoSerialNumber
com.organization.AdobeInCopyCCSerial-VideoSerialNumber

Munki’s preuninstall_script can unserialize the software, and then a “removepackages” uninstallation method works to remove the serialization file themselves.  To remove the volume serial number only when appropriate, a preuninstall_script such as the following can check for additional receipts to determine whether the serial number is in use by an additional pkg:

#!/bin/bash
#Location of unserialization utility
unserializer="/Library/Adobe Licensing/Adobe InCopy CC Serial - Video Serial Number/RemoveVolumeSerial"

#If more than one installed pkg is using the Video Serial Number
if [ `pkgutil --pkgs=com\.organization\..+VideoSerialNumber | wc -l` -gt 1 ]
then
#Another software installation is using this serial number, do not unserialize
  echo Receipts found that use the serial number, not unserializing
  exit 0
else
#We're the last one out, unserialize and turn out the lights
  echo No other serialization receipts found, unserializing
  "${unserializer}"
fi

Setting “autoremove” to true for the pkginfo for the serialization pkg causes the serialization to be removed when not intentionally installed on a computer.

Controlling serialized versus unserialized installation
Gathering the individual-title CCP software packages is a good use of Munki’s included_manifest feature. This allows for multiple CCP pkgs (or other pkgs) to all be installed as one collection of software.  An example included manifest named “included-adobe-CompleteCC2014” could include (in part):

<key>managed_installs</key>
<array>
  <string>PhotoshopCC2014</string>
  <string>IllustratorCC2014</string>
  ...
  <string>PreludeCC2014</string>
  <string>MediaEncoderCC2014</string>
</array>

Attaching licenses to software is a bit more of a challenge–sometimes we do want the serialization to occur, other times we don’t. There are two ways I can see to handle this:

  • Add both the included_manifest for the software installation and a managed_install for the serialization pkg to the computer’s manifest (e.g. included_manifest of “included-adobe-CompleteCC2014” and a managed_install of “AdobeCCCompleteSerial-VideoSerialNumber”). This requires adding two separate installer items for each serialized installation.
  • Set up the “requires” array in the serialization pkg’s pkginfo to require all the software that’s intended to be serialized (e.g. set up the pkginfo for “AdobeCCCompleteSerial-VideoSerialNumber” to “require” the software that’s intended to be serialized).  This requires adding only a single installer item for a serialized installation.

I chose the latter and went a step further–since I didn’t want an included_manifest for an unserialized installation and a managed_install for a serialized installation, I created an included_manifest that only included the serialization pkg (thus a manifest named “included-adobe-CompleteCC2014” and a manifest named “included-adobe-CompleteCC2014Serialized” exist). It adds a level of indirection, but keeps things more consistent since all software installations and removals occur within included_manifests.  Thus the following workflow is possible:

  • Munki client needs InCopy, but does not need a serial number
    • Client manifest has “included-adobe-InCopyCC2014” manifest added to its included_manifests array
      • manifest “included-adobe-InCopyCC2014” has managed_install of “InCopyCC2014”
    • Munki client installs InCopy
  • The same Munki client needs CC Complete, but does not need a serial number
    • Client manifest has “included-adobe-CompleteCC2014” manifest added to its included_manifests array
      • manifest “included-adobe-CompleteCC2014” has managed_installs for CC Complete 2014 software
    • Munki client installs CC Complete 2014 software
  • The same Munki client needs a serial number for InCopy CC 2014 and CC Complete 2014
    • Client manifest has “included-adobe-InCopyCC2014” and “included-adobe-CompleteCC2014” manifests removed from its included_manifests array and “included-adobe-InCopyCC2014Serialized” and “included-adobe-CompleteCC2014Serialized” manifests added to its included_manifests array
      • manifest “included-adobe-InCopyCC2014Serialized” has managed_install of “AdobeInCopyCCSerial-VideoSerialNumber”
        • pkginfo for “AdobeInCopyCCSerial-VideoSerialNumber” “requires” “InCopyCC2014”
      • manifest “included-adobe-CompleteCC2014Serialized” has managed_install of “AdobeCCCompleteSerial-VideoSerialNumber”
        • pkginfo for “AdobeCCCompleteSerial-VideoSerialNumber” “requires” CC Complete 2014 software
    • Munki client determines InCopy CC 2014 and CC Complete 2014 software are already installed.  Munki client installs both serialization pkgs for InCopy CC 2014 and CC Complete 2014
  • The same Munki client no longer needs CC Complete 2014
    • Client manifest has “included-adobe-CompleteCC2014Serialized” manifest removed from its included_manifests array (leaving “included-adobe-InCopyCC2014Serialized” manifest in the included_manifests array)
    • Munki client uninstalls CC Complete 2014 software
    • Munki client uninstalls managed_install “AdobeCCCompleteSerial-VideoSerialNumber”, however serial number is not actually removed since  “AdobeInCopyCCSerial-VideoSerialNumber” is installed
    • Munki client is left with a serialized installation of InCopy CC 2014

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: