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:
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.
- One important thing to note is that this does not run makecatalogs, so you will want to do that yourself. Or better yet, use the AutoPkg recipe to do it for you!
So once you have changed that to your liking, next time you run autopkg run GoogleChrome.munki
it will use those values!