autopkg on Os X Server 10.8.5

autopkg and munki on Os X Server 10.8.5


  • git
  • munki_repo
  • munkitools (latest)

install autopkg

install pkg from here

Configure autopkg

setup munki_repo

defaults write com.github.autopkg MUNKI_REPO /path/to/munki_repo

defaults read com.github.autopkg MUNKI_REPO

When following wiki, all goes in your home directory, there are other options with defaults :

defaults write com.github.autopkg CACHE_DIR ~/Library/AutoPkg/Cache

defaults write com.github.autopkg RECIPE_SEARCH_DIRS ~/Library/AutoPkg/Recipes

defaults write com.github.autopkg RECIPE_OVERRIDE_DIRS ~/Library/AutoPkg/RecipeOverrides

defaults write com.github.autopkg RECIPE_REPO_DIR ~/Library/AutoPkg/RecipeRepos

I choosed to trick and put everything in /Library/autopkg. I then did symlinks in my home directory

ln -s /Library/AutoPkg/Cache ~/Library/AutoPkg/Cache
ln -s /Library/AutoPkg/RecipeRepos ~/Library/AutoPkg/RecipeRepos

Add recipes

autopkg repo-add

autopkg list-recipes

autopkg info Firefox.munki

autopkg run -v Firefox.munki.recipe

autopkg run -v Firefox.munki.recipe MakeCatalogs.munki

Note :

Adding MakeCatalogs.munki at the end of the autopkg run will make the munki catalogsā€¦

autopkg run -v  AdobeFlashPlayer.munki Cyberduck.munki Skype.munki TextWrangler.munki TheUnarchiver.munki MakeCatalogs.munki

went well.

The following new items were downloaded:

The following new items were imported:
Name                     Version          Catalogs                         Pkginfo Path
----                     -------          --------                         ------------
AdobeFlashPlayer         11.8.800.168     testing                          internet_plugins/AdobeFlashPlayer-11.8.800.168.plist
Cyberduck                4.3.1            testing                          apps/Cyberduck-4.3.1.plist
Skype                    6.9              testing                          apps/Skype-6.9.plist
TextWrangler             4.5.3            testing                          apps/TextWrangler/TextWrangler-4.5.3.plist
TheUnarchiver            3.9.1            testing                          apps/TheUnarchiver-3.9.1.plist

autopkg overides

autopkg run --help
Usage: autopkg run [options] [recipe ...]
Run one or more recipes.

-h, --help            show this help message and exit
-c, --check           Only check for new/changed downloads.
 Provide key/value pairs for recipe input. Caution: values specified here will be applied to all recipes.
 -l TEXT_FILE, --recipe-list=TEXT_FILE
  Path to a text file with a list of recipes to run.
    Path to a pkg or dmg to provide to a recipe.
    Downloading will be skipped.
 Output run report data in plist format to stdout.
 Additional messages may still be printed to stderr.
-v, --verbose
 Verbose output.
-d DIRECTORY, --search-dir=DIRECTORY
   Directory to search for recipes. Can be specified multiple times.
   Directory to search for recipe overrides. Can be specified multiple times.`

autopkg info
Current preferences:
 'RECIPE_REPOS': {u'/Library/AutoPkg/RecipeRepos/com.github.Jaharmi.autopkg_recipes': {
URL = "";
u'/Library/AutoPkg/RecipeRepos/': {
URL = "";
 'RECIPE_SEARCH_DIRS': [u'/Library/AutoPkg/Recipes',

Example for jenkins

/usr/local/bin/autopkg run --search-dir=DIRECTORY --override-dir=DIRECTORY VLC.munki

Notes :

Adding run –key

  • –search-dir=DIRECTORY

Adding full autopkg path

  • /usr/local/bin/autopkg
Command examples:
/usr/local/bin/autopkg run -v --search-dir=/Library/AutoPkg/RecipeRepos/ AdobeFlashPlayer.munki MakeCatalogs.munki

/usr/local/bin/autopkg run -v --search-dir=/Library/AutoPkg/RecipeRepos/

Working !

EDIT : Next jenkins setupā€¦

Jenkins setup on Os X server

jenkins local scripts, Autopkg & munki

Usefull Links :!topic/autopkg-discuss/YcQSyXL7DRg


Product and graphic designer turned to be a Mac SysAdmin.

Posted in Admin, Deploy, Mac Tagged with: , , , , , , ,
0 comments on “autopkg on Os X Server 10.8.5
1 Pings/Trackbacks for "autopkg on Os X Server 10.8.5"
  1. […] autopkg on Os X Server 10.8.5 | oemden says: 2013/10/27 at 21:19 […]

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>