-
Notifications
You must be signed in to change notification settings - Fork 353
Building Munki packages
Milestone releases of the Munki tools are made available here: https://github.com/munki/munki/releases
You can also build a Munki installer package yourself. This might be useful if you want to test changes that have not yet made it into an official release, or if you want or need to sign the executables and/or package with your organization's developer ID. It might also be useful if you want to include other options in the package, like an optional component package to enable bootstrapping mode.
- Xcode -- the current release and build scripts are known to work under Xcode 12. Using other versions of Xcode might lead to unexpected (or at least different!) results. Building older versions of Munki might require older versions of Xcode (typically whatever version of Xcode was current when that version of Munki was current).
- git (which you get for "free" when you install Xcode...)
New privacy protections introduced in Catalina might cause parts of the build process to fail mysteriously if your local git clone of the Munki code is in a directory affected by these protections (for example, ~/Desktop, ~/Documents, ~/Downloads, or a network volume). /Users/Shared is a writeable space on most Macs that is not (currently) affected by these new privacy protections. (A common failure symptom caused by this is inability to read code/client/munkilib/version.plist)
In a directory you can write to and that is not affected by macOS privacy protections (for example, /Users/Shared), run:
git clone https://github.com/munki/munki
This will create a new "munki" directory containing the latest git repo.
Do NOT download the zip or tar'd release, as that would not have the git directories that versioning logic is based on.
Change into the directory:
cd munki
Run the build script:
./code/tools/make_swift_munki_pkg.sh
Provide your password when requested (certain steps require sudo).
If the script runs successfully, it will tell you where to find the Installer package:
Distribution package created at /Users/Shared/munki-git/munki/munkitools-7.0.4.5390.pkg.
Running make_swift_munki_pkg.sh from a branch (like the "main" branch) merely builds Munki from whatever code is current in that branch. This is not guaranteed to be the same code that was used to build a specific version of Munki (and in most cases, will not be the same).
You can use git checkout to checkout a specific branch or tag (HINT: all released versions have a tag) and then run make_swift_munki_pkg.sh.
cd /path/to/munki.git
git checkout v7.0.4
./code/tools/make_swift_munki_pkg.sh
You can also build specific versions of Munki prior to Munki 7 using the make_munki_mpkg_from_git.sh script.
./code/tools/make_munki_mpkg_from_git.sh -b <tagname> will build a Munki release pointed to by the tag name. git tag will show you the available tags.
You may need an older version of Xcode to successfully build the applications included with older versions of Munki, and/or access to older macOS/OS X SDKs. Almost certainly this is not worth the effort and you should stick with a pre-built package from the Releases section.
./code/tools/make_munki_mpkg_from_git.sh -b BRANCHNAME will build Munki based on the code in BRANCHNAME.
./code/tools/make_munki_mpkg_from_git.sh -b TAGNAME will build Munki based on the code at TAGNAME.
./code/tools/make_munki_mpkg_from_git.sh -r GIT_REVISION_HASH will build Munki based on the code in a particular Git commit (revision).
Both make_swift_munki_pkg.sh, make_munki_mpkg.sh, and make_munki_mpkg_from_git.sh support the -h option for help on the various options.
- Getting Started
- Overview
- Discussion Group
- Demonstration Setup
- Glossary
- Frequently Asked Questions
- Contributing to Munki
- Release Notes
- Introduction
- Customizing Managed Software Center's sidebar
- version_script
- Removed features
- Python removal
- Installing Munki 6's Python
- PPPC/TCC for Munki 7
- Middleware for Munki 7
- Logging
- Installation package changes
- Launchd job changes
- Introduction
- Staging macOS Installers
- Apple update changes
- Default Installs (Munki 6.1)
- Conditional Application Data (Munki 6.5)
- Introduction
- Munki Links
- Product Icons
- Screenshots In Product Descriptions
- Client Customization
- Customizing the sidebar
- Custom Help Content
- Featured Items
- Update Notifications:
- Introduction
- iconimporter
- makepkginfo
- munkiimport
- managedsoftwareupdate
- makecatalogs
- manifestutil
- repoclean
- Preferences
- Default Repo Detection
- Default Manifest Resolution
- Managed Preferences Support In Munki
- Apple Software Updates With Munki
- Additional macOS configuration for Munki:
- Introduction to Pkginfo Files
- Supported Pkginfo Keys
- Important Pkginfo Features
- Installer type details:
- Pkginfo in Operation:
- Default Installs
- Removal of Unused Software
- Upgrading macOS:
- Apple Updates:
- Securing the Munki repo
- Preflight And Postflight Scripts
- Managed Software Center Logging
- Munki With Git
- Bootstrapping With Munki
- License Seat Tracking
- LaunchD Jobs and Changing When Munki Runs
- Web Request Middleware
- Repo Plugins
- Downgrading Software
- Downgrading Munki tools
- Authorized Restarts
- Allowing Untrusted Packages
- On Demand Items
- AutoPkg
- Repackaging
- Creating Disk Images
- Stupid Munki Tricks
- Troubleshooting
- Professional Support
- Known Issues and Workarounds
- Building Munki packages
- Munki packages and restarts
- Signing Munki
- Removing Munki
- Munki Configuration Script
- Who's Using Munki
- More Links And Tools
- Munki 3 Information
- Munki 4 Information
- macOS Monterey Info
- macOS Ventura info
- Pkginfo For Apple Software Updates
- Managing Configuration Profiles
- Configuration Profile Emulation
- softwareupdate and Configuration profile notes
- About Munki's Embedded Python
- Customizing Python for Munki
- Modular Imaging with Munki
- Report Broken Client
- Microsoft Office
- Adobe Products
- Upgrading macOS: