User Tools

Site Tools


munki

munkiimport

1) Run munkiimport:

/usr/local/munki/munkiimport /Volumes/<volume>/<file.pkg>

2) Fill out the information

3) Add any specific items to the Pkginfo

4) Rebuild the catalogs

5) Add the new application to the manifest

Complicated Imports

Sometimes you'll run into an application that is too complicated for a flat munkiimport /path/to/package. For those applications (like Google SketchUp) try this command:

munkiimport --item "SketchUp 2017" --destinationitemname "/Applications/SketchUp 2017" /Users/master/Library/AutoPkg/Cache/local.download.SketchUpMake-override/downloads/SketchUpMake-en.dmg

Utilities

Applications that go under the /Applications/Utilities folder need to have their catalogs updated to reflect this.

1) Open the pkginfo file: munki_repo/pkgsinfo/<category>/<appPkginfo>

2) Edit the installs key <path> and itemstocopy key destination_path

3) Save the file and then run:

makecatalogs

manifestutil

1) Start the manifestutil:

/usr/local/munki/manifestutil

1.2) If you need to create a new manifest:

new-manifest <manifest>

Add the catalog:

add-catalog <catalog> --manifest <manifest>

2) Add the package:

add-pkg <application> --manifest <manifest>

Example:

add-pkg Adobe\ Flash\ Player-14.0.0.145 --manifest main

References:

Manually rebuilding the Munki catalogs

/usr/local/munki/makecatalogs /path/to/repo

Removing a package from the Munki repo

1) Delete the pkg info file

2) Delete the package

3) Run:

/usr/local/munki/makecatalogs /path/to/repo

References:

Postinstall scripts

1) Create and test the script you want to run (bash and python scripts have been tested working)

2) Run

makepkginfo --postinstall_script /path/to/script

3) Copy the <key>postinstall_script</key> + script from the output

4) Open the pkginfo for the install you want to add this to and paste the postinstall script inbetween the name string and uninstall_method key

5) Run

makecatalogs

References:

Payload Free Packages with Munki

Adobe CC

1) Download and install the Adobe Application Manager (found as a download on Adobe's site for team accounts)

2) Download and build each Adobe application/update individually

eg:

Acrobat XI Pro
After Effects CC (2014)
	After Effects CC 2014.2 (13.2) update
Audition CC (2014)
	Audition CC (2014.2) Update
	Dynamic Link Media Server 7.0.1 Update

3) Once all of the packages are built, start importing them into Munki

munkiimport /path/to/app.pkg --uninstallpkg /path/to/uninstall.pkg

4) Import each Adobe application and update one by one testing the install after each import (sucks, right?)

If the install loops; run a makepkginfo on the installed application:

makepkginfo -f makepkginfo /Applications/Adobe\ After\ Effects\ CC\ 2014/Adobe\ After\ Effects\ CC\ 2014.app

In the text output you're looking for something similar to this:

<key>installs</key>
<array>
	<dict>
		<key>CFBundleIdentifier</key>
		<string>com.adobe.AfterEffects</string>
		<key>CFBundleName</key>
		<string>After Effects</string>
		<key>CFBundleShortVersionString</key>
		<string>13.2</string>
		<key>CFBundleVersion</key>
		<string>13.2</string>
		<key>path</key>
		<string>/Applications/Adobe After Effects CC 2014/Adobe After Effects CC 2014.app</string>
		<key>type</key>
		<string>application</string>
		<key>version_comparison_key</key>
		<string>CFBundleShortVersionString</string>
	</dict>
</array>

Copy that install key and array and paste it over the imported pkginfo install array.

Do another check for updates and it should register that the application is installed now.

5) For Adobe application updates edit the update's pkginfo and add the update_for key:

<key>update_for</key>
<array>
	<string>AdobeAfterEffectsCC2014-13.0.0</string>
</array>

6) Test again, and then put it into production

Naming

For the naming of the Adobe CC apps I used the following scheme:

Item Name:

AdobeAfterEffectsCC2014

Display Name:

Adobe After Effects CC (2014)

Updates use the same item name, but use something similar to the following for the display name:

After Effects CC 2014.2 (13.2) update

References:

Choice Installs With Microsoft Office

1) Import your MS Office package

2) Get the list of choices:

installer -pkg /Volumes/Microsoft\ Office\ 2011/Office\ Installer.pkg -showChoicesXML > choices.txt

3) Copy the key and string for the items you want to deselect. Similar to:

<key>choiceIdentifier</key>
<string>rdc</string>

4) For each item we're going to add the following above the key and then wrap the item in a dict. You should end up with something similar to the following:

<dict>
	<key>attributeSetting</key>
	<integer>0</integer>
	<key>choiceAttribute</key>
	<string>selected</string>
	<key>choiceIdentifier</key>
	<string>rdc</string>
</dict>

5) Next you're going to edit the Office pkginfo file and add each dict to an installer_choices_xml array:

<key>installer_choices_xml</key>
<array>
	<dict>
		<key>attributeSetting</key>
		<integer>0</integer>
		<key>choiceAttribute</key>
		<string>selected</string>
		<key>choiceIdentifier</key>
		<string>rdc</string>
	</dict>
	<dict>
		<key>attributeSetting</key>
		<integer>0</integer>
		<key>choiceAttribute</key>
		<string>selected</string>
		<key>choiceIdentifier</key>
		<string>dock</string>
	</dict>
</array>

6) Last, inside of the Office pkginfo you want to remove the receipts for the packages you don't want installed. Under the receipts key remove the items dict, similiar to the following:

<dict>
	<key>installed_size</key>
	<integer>16273</integer>
	<key>packageid</key>
	<string>com.microsoft.rdc.all.rdc.pkg.2.1.1</string>
	<key>version</key>
	<string>2.1.1</string>
</dict>

6) Finally we run makecatalogs and test it out!

LocalOnlyManifest

Local only manifests can overwrite whatever their set manifest is. If their manifest has Dropbox as an optional install you can set the local manifest to override it and make it a managed install.

1) Tell the ManagedInstalls preference what your LocalOnlyManifest is (extra_packaages is the local manifest name)

sudo defaults write /Library/Preferences/ManagedInstalls LocalOnlyManifest extra_packages

2) Add the local manifest to /Library/Managed\ Installs/manifests/ (since step 1's example is “extra_packages” that's what we use here

<?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>managed_installs</key>
    <array>
    </array>
    <key>managed_uninstalls</key>
    <array>
    </array>
</dict>
</plist>

3) Edit the local manifest file to reflect the changes you'd like

4) Run these commands to update and install the packages

sudo /usr/local/munki/managedsoftwareupdate
sudo /usr/local/munki/managedsoftwareupdate --installonly

5) If this was a “run once” change run the following command to remove the manifest

sudo defaults delete /Library/Preferences/ManagedInstalls LocalOnlyManifest
munki.txt · Last modified: 2017/05/16 13:31 by bryanheinz