Setting autopkg munki defaults

269 views
Skip to first unread message

hub...@yahoo.co.uk

unread,
Mar 18, 2014, 9:00:36 AM3/18/14
to autopkg...@googlegroups.com
Hello Everyone

I have just started using autopkg after using munki for some time so I am familiar with making my own pkginfo files etc.
My setup is that I have munki on my admin machine and I FTP the "finished" pkgsinfos, catalogs, manifests and dmgs up to our web server, whose directory structure mirrors my admin machine, which sends the stuff out to the clients.
My admin munki repo has the following directory structure :-
Users/me/sites/munki/catalogs
Users/me/sites/munki/manifests
Users/me/sites/munki/pkgs
Users/me/sites/munki/pkgsinfo

My pkgsinfo files also have ".pkgsinfo" as the their file extension.

I have got autopkg up and running but when it makes a pkginfo file, it uses the .plist extension, can I set it to use .pkgsinfo?
Also, it puts the newly created plist inside an "apps" folder inside my pkgsinfo folder.  I would like to set it so it creates it in the pkgsinfo folder only.
It also puts the newly created pkg file inside another "apps" folder inside the pkgs folder.  Again I would like to set it so it puts it in the pkgs folder only.
This would stop me having to edit the application's pkgsinfo file to change the "installer_item_location" key.

Thanks
















Gregory Neagle

unread,
Mar 18, 2014, 9:27:52 AM3/18/14
to autopkg...@googlegroups.com
On Mar 18, 2014, at 6:00 AM, hub...@yahoo.co.uk wrote:

> Hello Everyone
>
> I have just started using autopkg after using munki for some time so I am familiar with making my own pkginfo files etc.
> My setup is that I have munki on my admin machine and I FTP the "finished" pkgsinfos, catalogs, manifests and dmgs up to our web server, whose directory structure mirrors my admin machine, which sends the stuff out to the clients.
> My admin munki repo has the following directory structure :-
> Users/me/sites/munki/catalogs
> Users/me/sites/munki/manifests
> Users/me/sites/munki/pkgs
> Users/me/sites/munki/pkgsinfo
>
> My pkgsinfo files also have ".pkgsinfo" as the their file extension.
>
> I have got autopkg up and running but when it makes a pkginfo file, it uses the .plist extension, can I set it to use .pkgsinfo?

Nope. Munki doesn't care. I suppose you could write a script that renamed the files if they really bother you.

> Also, it puts the newly created plist inside an "apps" folder inside my pkgsinfo folder. I would like to set it so it creates it in the pkgsinfo folder only.

Create recipe overrides that set the MUNKI_REPO_SUBDIR to whatever you'd like. https://github.com/autopkg/autopkg/wiki/Recipe-Overrides

> It also puts the newly created pkg file inside another "apps" folder inside the pkgs folder. Again I would like to set it so it puts it in the pkgs folder only.

Same deal as above.This behaves precisely the same as munkiimport in that regard.

Timothy Sutton

unread,
Mar 18, 2014, 9:56:12 AM3/18/14
to autopkg...@googlegroups.com
On Mar 18, 2014, at 9:00 AM, hub...@yahoo.co.uk wrote:

> Hello Everyone
>
> I have just started using autopkg after using munki for some time so I am familiar with making my own pkginfo files etc.
> My setup is that I have munki on my admin machine and I FTP the "finished" pkgsinfos, catalogs, manifests and dmgs up to our web server, whose directory structure mirrors my admin machine, which sends the stuff out to the clients.
> My admin munki repo has the following directory structure :-
> Users/me/sites/munki/catalogs
> Users/me/sites/munki/manifests
> Users/me/sites/munki/pkgs
> Users/me/sites/munki/pkgsinfo
>
> My pkgsinfo files also have ".pkgsinfo" as the their file extension.
>
> I have got autopkg up and running but when it makes a pkginfo file, it uses the .plist extension, can I set it to use .pkgsinfo?

Not currently. Feel free to open an issue on this on GitHub, it would be trivial to add.

There is a mechanism in AutoPkg that merges arbitrary preferences as Input variable defaults, that will then apply to all recipe runs:

defaults write com.github.autopkg MY_GLOBAL_INPUT_VARIABLE "my value"

I would think an option like this would make sense to use in this manner similar to how we use the MUNKI_REPO variable, since it's typically something you set across your entire repo.


> Also, it puts the newly created plist inside an "apps" folder inside my pkgsinfo folder. I would like to set it so it creates it in the pkgsinfo folder only.
> It also puts the newly created pkg file inside another "apps" folder inside the pkgs folder. Again I would like to set it so it puts it in the pkgs folder only.

Every .munki recipe includes a Input variable called "MUNKI_REPO_SUBDIR". You may edit this to suit your needs. In your case, simply leave it empty.


-Tim

hub...@yahoo.co.uk

unread,
Mar 18, 2014, 10:57:03 AM3/18/14
to autopkg...@googlegroups.com
Thanks

I found that using

<key>MUNKI_REPO_SUBDIR</key>
<string></string>

did what I wanted for specific recipes.  I will have a look at the global input variable mentioned.
Reply all
Reply to author
Forward
0 new messages