Getting Red Giant plugin suites (for Adobe) deployed with munki - with bonus integrated serial numbers??

888 views
Skip to first unread message

Steve Chandler

unread,
Apr 12, 2015, 2:51:23 PM4/12/15
to munk...@googlegroups.com
Hey group - I'm new to munki and package deployment in general, so I may be missing some basic techniques that will solve the problem I'm facing here. I've tried some of the standard customizations that I do know, and nothing has worked yet - even though, by all accounts, the packages I'm dealing with seem to be fairly standard - with two caveats. I'm hoping I can find some wisdom here, or even someone who has done it before!

I'm dealing with the Red Giant installers from here http://www.redgiant.com/products/ or, more specifically, this: http://cdn.redgiant.com/redgiant/products/singlesuites/keying/KSuite_Mac_Full.zip

Inside the app is a mpkg that does seem to run and install on its own just fine - with user interaction. Trying to get it into a deployable state however is deceptively difficult. The main problem is that everything is deselected by default. From what I can tell that's something that should normally be resolves with a choicechanges XML. This doesn't seem to work though - the choices I specified just don't install.

The secondary issue I'm having is how to get Licenses integrated into the workflow... but one thing at a time. I'd be satisfied with even getting the plugins to install in trial mode and doing the licenses by hand since they are on a per-machine basis anyway. My first priority if getting these things to install correctly... preferably with the ability to still customize choices, as for most of these suites, we only use about half the included plugins.

I spoke to some helpful folks in IRC and was requested to post what I'm dealing with here. This is where I'm at right now, so I have a few more things to try, but I am feeling like I'm pretty close against the walls of my knowledge at this point. Would love some thoughts as I continue working on this. I can post some more detailed info when I'm back at the office tomorrow.

A few other thoughts I haven't had a chance to try yet:
- applying the choicechanges XML directly to the installer by hand to see what happens (I wasn't aware I could do this until today, hah)
- pulling the sub packages for Adobe CC 2014 from inside the main package to see if that gives me my desired results.
- selling my soul to satan

I'd rather avoid 2 and 3 (too much manual work, and firey hells dry out my skin), but at this point I'll probably need to abandon any concept of these packages being easy. After I navigate through this mess I'll definitely be assembling the information together and maybe writing some autopkg recipes or something as it seems like something people could benefit from, and it would be nice to keep our post facility updated with the latest versions of all these. Thanks for reading!

foigus

unread,
Apr 14, 2015, 1:51:27 AM4/14/15
to munk...@googlegroups.com
I wrote a lot of the post below and then double-checked to make sure the pkg installation worked (spoiler--it didn't).  If you know how to generate an InstallerChoices file, skip down to the section that starts "5) Beyond the choices".  If you don't know how to generate an InstallerChoices file, keep reading.

Note a properly-created InstallerChoices file is needed for this pkg in addition to the other hoops.

------

I'm going on the assumption the pkg does not attempt to change the offered installer choices due to what software is installed on the target drive (I only tested against After Effects CC 2014)--some pkgs may offer different choices depending on what software is on the target drive.

1) Find the available choices

Collect all the available choices from the pkg:
$ installer -pkg /Users/admin/Downloads/KSuite_Mac_Full/KeyingSuite-11.1.3\ Installer.app/Contents/Assets/KeyingSuite-11.1_b26.mpkg -showChoiceChangesXML -target / > ~/default_choices.plist

The resulting default_choices.plist is here. The choices have three criteria per choice (an example choice is below):
<dict>
   <key>attributeSetting</key>
   <true/>
   <key>choiceAttribute</key>
   <string>visible</string>
   <key>choiceIdentifier</key>
   <string>com.redgiant.Keying.AE.CS5</string>
</dict>
<dict>
   <key>attributeSetting</key>
   <true/>
   <key>choiceAttribute</key>
   <string>enabled</string>
   <key>choiceIdentifier</key>
   <string>com.redgiant.Keying.AE.CS5</string>
</dict>
<dict>
   <key>attributeSetting</key>
   <integer>0</integer>
   <key>choiceAttribute</key>
   <string>selected</string>
   <key>choiceIdentifier</key>
   <string>com.redgiant.Keying.AE.CS5</string>
</dict>

Each of these entries has the following meaning:
- "visible": Whether or not the choice is visible (e.g. listed) in the GUI Installer.app
- "enabled": Whether or not the GUI Installer.app allows the state of the choice to be changed (i.e. unchecked if it's checked, checked if it's unchecked)
- "selected": Whether or not the choice will be installed

The first two entries are GUI window dressing for Installer.app, while the third ("selected") is the only one that really matters.  However note it is important to stay within the intentions of the pkg developer--if the pkg developer hasn't made the choice "visible" or "enabled", it's highly unlikely you would want to change whether that choice was "selected".  In this case, it appears:
- This pkg installs nothing by default
- Choices are generally named in the format "com.redgiant.<plugin_name>.<target_application>.<target_application_revision" (e.g. "com.redgiant.Keying.AE.CS5")

2) Pare down the list of choices

In my case I'm going to attempt to install software only for After Effects CC 2014.  I'll need the choices specific to this software--while I can do this by hand, I'll collect them this way:
$installer -pkg /Users/admin/Downloads/KSuite_Mac_Full/KeyingSuite-11.1.3\ Installer.app/Contents/Assets/KeyingSuite-11.1_b26.mpkg -showChoiceChangesXML -target / | grep AE.CC14 | uniq
   <string>com.redgiant.Keying.AE.CC14</string>
   <string>com.redgiant.Keying.PrimatteKeyer.AE.CC14</string>
   <string>com.redgiant.Keying.Warp.AE.CC14</string>
   <string>com.redgiant.Keying.KeyCorrect.AE.CC14</string>

I'll take the earlier "default_choices.plist" and do the following:
- Find each of the keys above
- Delete the "visible" and "selected" dicts of those keys
- Change the "selected" dict to the that key to an "attributeSetting" of "1"
- Delete the other keys

My "redgiant_ae_cc14_choices.plist" is here.

3) Test the choices

Test the choices by running the following command:
$installer -pkg /Users/admin/Downloads/KSuite_Mac_Full/KeyingSuite-11.1.3\ Installer.app/Contents/Assets/KeyingSuite-11.1_b26.mpkg -showChoicesAfterApplyingChangesXML /Users/admin/Desktop/redgiant_ae_cc14.plist -target / > ~/results_of_choices.plist

Which outputs the following results_of_choices.plist here.

4) Verify the choices

Verify the choices have the intended effect with the following command:
$diff -C5 ~/default_choices.plist ~/results_of_choices.plist

Which outputs the following differences between the original and choice-applied pkgs listed here, showing that the After Effects CC 2014 plugins should be installed.  Some additional reading and pointers regarding InstallerChoices are in the Munki wiki, an earlier Munki-dev post, and this JAMFNation post.

5) Beyond the choices

I wrote all the above and then went to double-check the pkg installation worked.  The pkg installation did not work--odd errors such as the following appeared in install.log:
Apr 13 21:42:37 Mac.local installd[954]: ./postflight: grep: /tmp/rgs.C867B87B_3A5F_42DF_A83E_089FEDA01D63_112: No such file or directory

This file appears to be some sort of custom construct from the installer (note that the "rg" in "rgs" likely stands for the author of the package, Red Giant).  In search of this file, I checked the postflight scripts for the After Effects CC 2014 plugins (for example, the GlowAECC14.pkg listed in Pacifist)--those scripts include the following:
productName="Warp"
productNumber="112"
installProductStr=`/usr/bin/grep -i "\<${productName}\>" "/tmp/rgs.C867B87B_3A5F_42DF_A83E_089FEDA01D63_${productNumber}"`

I also installed the pkg by right-click-and-opening KeyingSuite-11.1_b26.mpkg (since it isn't signed).  /tmp/rgs.C867B87B_3A5F_42DF_A83E_089FEDA01D63_112 appeared with the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>keycorrect</key>
        <true/>
        <key>primattekeyer</key>
        <true/>
        <key>warp</key>
        <true/>
</dict>
</plist>

A GUI installation creates a file that a CLI installation does not, and that file appears to determine whether the plugins are installed.  For anyone who has run through the GUI installer, these three installation options are the ones provided by the custom "Registration" Installer Section in the pkg.  Let's try this:
###
#Write the keys of interest to the file
defaults write /tmp/rgs.C867B87B_3A5F_42DF_A83E_089FEDA01D63_112 keycorrect -bool true
defaults write /tmp/rgs.C867B87B_3A5F_42DF_A83E_089FEDA01D63_112 primattekeyer -bool true
defaults write /tmp/rgs.C867B87B_3A5F_42DF_A83E_089FEDA01D63_112 warp -bool true

#because the postflight is using grep instead of defaults to parse the file, we need to convert it to XML
plutil -convert xml1 /tmp/rgs.C867B87B_3A5F_42DF_A83E_089FEDA01D63_112.plist

#Rename the file so it is usable by the postflight script
mv /tmp/rgs.C867B87B_3A5F_42DF_A83E_089FEDA01D63_112.plist /tmp/rgs.C867B87B_3A5F_42DF_A83E_089FEDA01D63_112

#Install the pkg
sudo installer -pkg /Users/admin/Downloads/KSuite_Mac_Full/KeyingSuite-11.1.3\ Installer.app/Contents/Assets/KeyingSuite-11.1_b26.mpkg -target / -applyChoiceChangesXML ~/redgiant_ae_cc2014_choices.plist -verbose
###

Hooray--the plugins seem to be installed (and they are visible from within After Effects):
$ ls -l /Library/Application\ Support/Adobe/Common/Plug-ins/7.0/MediaCore 
total 0
drwxr-xr-x  36 root  admin  1224 Feb 13 16:11 Key Correct
drwxr-xr-x   3 root  admin   102 Feb 13 10:20 Primatte Keyer
drwxr-xr-x   9 root  admin   306 Feb 12 12:26 Red Giant Warp

You'd need to add the above commands (within the triple pound signs, except for the execution of "installer") to the pkginfo as a preinstall_script.  If you're installing other Red Giant plugins, the special file name and keys will likely change for each pkg.

A few additional notes:
- Red Giant will need to assist with serializing the plugins if it's even possible via CLI.  Poking at the pkg with Pacifist, the serialization binary isn't immediately obvious
- There is a "postflight.pkg" package that includes in part the following postflight script commands:

/usr/bin/sudo -u ${USER} /usr/bin/open 'http://www.redgiant.com/postinstall-keyingsuite'

/usr/sbin/chown ${USER}:staff /Library/Preferences/com.redgiantsoftware.Keying.plist

Note that Munki (or ARD, or any other pkg-installing mechanism) could potentially install this pkg when no user is logged in, so it is inappropriate to try to open a web browser if a user isn't logged in.  If a user isn't logged in, a web browser might open under the Login Window.  Also, when installing with Munki the user will be root, so the second line of this script may not have the intended effect.  It likely will be necessary to remove the "open" line of the postflight and edit the "chown" line of the postflight.  The issues with this postflight script should be brought to Red Giant's attention.
- The postflight script for Red Giant Link (RGLinkRGC.pkg) attempts to create a LaunchAgent (com.redgiantsoftware.updater.plist, which launches Red Giant Link, which requests an administrative password) to the home directory of the user who installed it.  This LaunchAgent may need to be removed, or the postflight script that created it be edited.  The issues with this postflight script should also be brought to Red Giant's attention.

- Patrick

Matt Cahill

unread,
Apr 14, 2015, 2:31:37 AM4/14/15
to munk...@googlegroups.com
Hi Steve,

I used to have to deploy Trapcode and Magic Bullet Suites using Casper at a previous facility and came up against the same issues you describe.
Eventually I went with capturing the entire install (re-packaging) using JAMF Composer and splitting the licence file out into a separate package. 
This was a pain and somewhat time consuming. Choice changes should work but doesn't, I just get containing directories but no actual payload deployment.
Running the individual packages doesn't work either unfortunately, same result. 

I think that the registration plugin bundle inside the metapackage will most likely be the cause of the issue meaning an unattended install may be impossible straight out of the box.

Licensing was really simple though with a plist formatted as below at /Library/Preferences/com.redgiantsoftware.TrapcodeSuite.plist

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
   
<dict>

       
<key>serial</key>
       
<string>TCBXxxxxxxxxxxxxxxxx</string>
   
</dict>
</plist>


The package from JAMF Composer looked like this:

I'm not sure if this really helps you that much though unless you happen to own Composer as I'm not sure there is an open source file system diff based packaging application.

Have you asked them how they expect you to deploy it?




Matt Cahill

unread,
Apr 14, 2015, 2:39:44 AM4/14/15
to munk...@googlegroups.com
Ahh excellent sleuthing foigus!

Gregory Neagle

unread,
Apr 14, 2015, 10:11:16 AM4/14/15
to munk...@googlegroups.com
On Apr 13, 2015, at 10:51 PM, foigus <patrick...@meredith.com> wrote:

You'd need to add the above commands (within the triple pound signs, except for the execution of "installer") to the pkginfo as a preinstall_script.  

Or build a package that contains this file and add it to the “requires” list for the Plugins pkg.
Reply all
Reply to author
Forward
0 new messages