-
Notifications
You must be signed in to change notification settings - Fork 339
CopyFromDMG
The copy_from_dmg installer type is typically used for "drag-n-drop" disk images; where the vendor has supplied their software on a disk image and expects the user to drag the software from the mounted disk image to some place on the the startup disk (typically, but not always, /Applications/
).
copy_from_dmg supports copying arbitrary items from a disk image to arbitrary locations on the startup disk. You can also specify owner, group, and mode for the copied items.
The munkiimport
tool will automatically generate a pkginfo file using copy_from_dmg if the item to be imported is a disk image that contains an application at the root of the mounted filesystem.
You can manually create a pkginfo file using the copy_from_dmg method. Use makepkginfo
to create a pkginfo item like so:
makepkginfo /Volumes/repo/pkgs/apps/GoogleEarthMacNoUpdate-Intel-5.2.dmg --owner=root --group=admin --mode=go-w --item="Google Earth Web Plug-in.plugin" --destinationpath="/Library/Internet Plug-ins"
This creates a pkginfo item instructing Munki to copy "Google Earth Web Plug-in.plugin" from the root of the mounted disk image to "/Library/Internet Plug-ins"; to set its owner to "root," group to "admin," and to remove the write bit for "other". The resulting plist looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>testing</string>
</array>
<key>installer_item_location</key>
<string>apps/GoogleEarthMacNoUpdate-Intel-5.2.dmg</string>
<key>installer_item_size</key>
<integer>23168</integer>
<key>installer_type</key>
<string>copy_from_dmg</string>
<key>installs</key>
<array>
<dict>
<key>CFBundleShortVersionString</key>
<string>5.2</string>
<key>path</key>
<string>/Library/Internet Plug-ins/Google Earth Web Plug-in.plugin</string>
<key>type</key>
<string>bundle</string>
</dict>
</array>
<key>items_to_copy</key>
<array>
<dict>
<key>destination_path</key>
<string>/Library/Internet Plug-ins</string>
<key>group</key>
<string>admin</string>
<key>mode</key>
<string>go-w</string>
<key>source_item</key>
<string>Google Earth Web Plug-in.plugin</string>
<key>user</key>
<string>root</string>
</dict>
</array>
<key>minimum_os_version</key>
<string>10.4.0</string>
<key>name</key>
<string>Google Earth Web Plug-in</string>
<key>uninstall_method</key>
<string>remove_copied_items</string>
<key>uninstallable</key>
<true/>
<key>version</key>
<string>5.2.0.0.0</string>
</dict>
</plist>
The Google Earth disk image actually contains two items you might want to install -- the Google Earth application itself, and the Google Earth Web Plug-in. You have two options here:
- Create two separate pkginfo items, one for Google Earth.app and one for Google Earth Web Plug-in.plugin. You could then add an "update_for" key to the Google Earth Web Plug-in item, marking it as an update for Google Earth. When munki is instructed to install Google Earth, it will install the Google Earth Web Plug-in as well.
- Combine the "installs" and "items_to_copy" sections from the two pkginfo items into a single pkginfo item. makepkginfo currently only supports a single installation item when creating a copy_from_dmg pkginfo item, but the plist itself can support multiple items. Such a combined pkginfo item would look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>testing</string>
</array>
<key>installer_item_location</key>
<string>apps/GoogleEarthMacNoUpdate-Intel-5.2.dmg</string>
<key>installer_item_size</key>
<integer>23168</integer>
<key>installer_type</key>
<string>copy_from_dmg</string>
<key>installs</key>
<array>
<dict>
<key>CFBundleIdentifier</key>
<string>com.Google.GoogleEarthPlus</string>
<key>CFBundleName</key>
<string>Google Earth</string>
<key>CFBundleShortVersionString</key>
<string>5.2</string>
<key>path</key>
<string>/Applications/Google Earth.app</string>
<key>type</key>
<string>application</string>
</dict>
<dict>
<key>CFBundleShortVersionString</key>
<string>5.2</string>
<key>path</key>
<string>/Library/Internet Plug-ins/Google Earth Web Plug-in.plugin</string>
<key>type</key>
<string>bundle</string>
</dict>
</array>
<key>items_to_copy</key>
<array>
<dict>
<key>destination_path</key>
<string>/Applications</string>
<key>source_item</key>
<string>Google Earth.app</string>
</dict>
<dict>
<key>destination_path</key>
<string>/Library/Internet Plug-ins</string>
<key>group</key>
<string>admin</string>
<key>mode</key>
<string>go-w</string>
<key>source_item</key>
<string>Google Earth Web Plug-in.plugin</string>
<key>user</key>
<string>root</string>
</dict>
</array>
<key>minimum_os_version</key>
<string>10.4.0</string>
<key>name</key>
<string>Google Earth</string>
<key>uninstall_method</key>
<string>remove_copied_items</string>
<key>uninstallable</key>
<true/>
<key>version</key>
<string>5.2.0.0.0</string>
</dict>
</plist>
- Getting Started
- Overview
- Discussion Group
- Demonstration Setup
- Glossary
- Frequently Asked Questions
- Contributing to Munki
- Release Notes
- Introduction
- Managed Software Center in Munki 5.2
- Manual Apple Updates
- force_install_after_date for Apple Updates
- Additional update encouragement
- Aggressive update notifications
- AggressiveUpdateNotificationDays preference
- Additional Munki 5 changes
- Configuration profile notes
- Major macOS upgrade notes
- Upgrading to Munki 5
- Introduction
- Munki Links
- Product Icons
- Screenshots In Product Descriptions
- Client Customization
- 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
- Pkginfo Files
- Supported Pkginfo Keys
- Pre And Postinstall Scripts
- Munki And AutoRemove
- Blocking Applications
- ChoiceChangesXML
- CopyFromDMG
- nopkg items
- How Munki Decides What Needs To Be Installed
- Default Installs
- Removal of Unused Software
- Upgrading macOS:
- Apple Updates:
- Securing the Munki repo
- Preflight And Postflight Scripts
- Report Broken Client
- MSC 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
- About Munki's Embedded Python
- Customizing Python for Munki
- Configuration Profile Emulation
- PPPC Privacy permissions
- 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
- More Links And Tools
- Munki Configuration Script
- Who's Using Munki
- Munki 3 Information
- Munki 4 Information
- macOS Monterey Info
- Pkginfo For Apple Software Updates
- Managing Configuration Profiles
- Microsoft Office
- Adobe Products
- Upgrading macOS: