Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
Tool for importing packages into your Munki repository
munkiimport is a command-line-based assistant for importing pkgs, disk images and apps into your Munki repo. It creates a pkginfo file for the installer item, wraps the pkg or app into a disk image if needed, and uploads the disk image or flat package to the repo, optionally under a subdirectory of your choosing. If the pkg/dmg upload is successful,
munkiimport then uploads the pkginfo and opens it in your preferred editor.
munkiimport --configure to tell the utility about your repo and preferred editor:
munkiimport --configure Repo URL (example: afp://munki.pretendco.com/repo): [This is normally a afp: or smb: URL for a repo on a remote server, or a file: URL for a local file path] pkginfo extension (Example: .plist): pkginfo editor (examples: /usr/bin/vi or TextMate.app):
Now import a pkg, or disk image:
munkiimport /Users/gneagle/Downloads/tl-3.1.1-client-osx.dmg Item name [ThinLinc Client]: Display name : Description : Remote workstation client. Version [184.108.40.206.0]: Catalogs [testing]: production Item name: ThinLinc Client Display name: Description: Remote workstation client. Version: 220.127.116.11.0 Catalogs: production Import this item? [y/n] y Upload installer item to subdirectory path [None]: apps Copying tl-3.1.1-client-osx.dmg to /Volumes/repo/pkgs/apps/tl-3.1.1-client-osx.dmg... Saving pkginfo to /Volumes/repo/pkgsinfo/apps/ThinLinc Client-18.104.22.168.0...
...and then /Volumes/repo/pkgsinfo/apps/ThinLinc Client-22.214.171.124.0 opens in TextMate for additional editing. Once you're done with any editing, the command line shows:
Rebuild catalogs? [y/n]
Most of the time you'll answer 'y' to rebuild the catalogs after you've made changes. You might answer 'n' if you are going to be importing more items and want to wait until all new items are imported before rebuilding the catalogs.
By default the pkginfo file is opened with the defined pkginfo editor. If you wish to avoid this you can set the pkginfo editor to an empty string (or delete the preference from com.googlecode.munki.munkiimport). If this preference is empty or undefined the pkginfo is not opened in an editor.
Preferences set by
--configure are stored in the OS X preferences domain "com.googlecode.munki.munkiimport", which is has file storage for the current user account in
Example Repo URLs:
|File (Local Repo)||file:///Library/Server/Web/Data/Sites/Default/munki_repo|