AutoPkg Overrides

So now that AutoPkg is setup for use with munki, we can create overrides to (just guess) override the default values in our recipes.
In my last article, I gave this as an example -

The following new items were downloaded:
    /Users/tprice/Library/AutoPkg/Cache/com.github.autopkg.munki.google-chrome/downloads/GoogleChrome.dmg

The following new items were imported:
    Name                     Version          Catalogs                         Pkginfo Path
    ----                     -------          --------                         ------------
    GoogleChrome             29.0.1547.57     production                       apps/GoogleChrome-29.0.1547.57.plist

But what if you want Chrome to go to apps/Google/GoogleChrome? Or you want things added to a testing catalog at first, rather than being potentially thrust into Production before they are ready?

Well, if you run autopkg make-override GoogleChrome.munki it will save an ‘override’ file to ~/Library/AutoPkg/RecipeOverrides. You can edit this file so that future runs of that recipe will use your values instead of the defaults. These files are plists, and they look something like this:

Screen Shot 2014-02-05 at 11.46.36 AM.png

As you can see, there are keys for pkginfo information, including what catalogs to put it in, what the display name is, the MUNKI_REPO_SUBDIR, etc. You could even override this recipe to download from the nonstable branch of chrome.

So once you have changed that to your liking, next time you run autopkg run GoogleChrome.munki it will use those values!

 
11
Kudos
 
11
Kudos

Now read this

Crazy Spaghetti or: How I Learned to Love Simplicity

Perhaps I am somewhat biased (after all, I am writing this on svbtle, which is an extremely simple platform), but I love simplicity. Things don’t have to be complicated to work well, and often you’ll find that things with good design ARE... Continue →