| Puppet Version: 5.5.19, 6.14.0 Puppet Server Version: 5.3.12 OS Name/Version: macOS 10.15.4 The pkgdmg provider uses the "-noidme" flag when mounting .dmg files with hdiutil. Per the man page for hdiutil in macOS 10.15, the IDME flags have been removed. "Removed the deprecated "hdiutil internet-enable" command and the IDME attach flags." The use of the "-noidme" flag with hdiutil on any version of macOS 10.15 causes hdiutil to output a deprecation warning, which then causes the pkgdmg provider to fail to parse the plist xml generated by hdiutil, causing .dmg packages to fail in puppet. Removing the "-noidme" flag from pkgdmg.rb seems to correct the issue. Desired Behavior: .dmg packages get installed correctly by puppet. Actual Behavior: Puppet fails to install .dmg packages with the following error:
Fatal error: Start tag expected, '<' not found at :1. |
Error: Could not set 'present' on ensure: undefined method `has_key?' for nil:NilClass (file: /etc/puppetlabs/code/modules/darwin/manifests/init.pp, line: 212) |
Error: Could not set 'present' on ensure: undefined method `has_key?' for nil:NilClass (file: /etc/puppetlabs/code/modules/darwin/manifests/init.pp, line: 212) |
Wrapped exception: |
undefined method `has_key?' for nil:NilClass |
Upon inspection with the debug output, the error above occurs when puppet attempts to mount a .dmg with hdiutil using the following command:
hdiutil mount -plist -nobrowse -readonly -noidme -mountrandom /tmp package.dmg |
Which generates the following output:
hdiutil: attach: WARNING: ignoring IDME options (obsolete) |
<?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>system-entities</key> |
<array> |
<dict> |
<key>content-hint</key> |
<string>Apple_partition_scheme</string> |
<key>dev-entry</key> |
<string>/dev/disk10</string> |
<key>potentially-mountable</key> |
<false/> |
<key>unmapped-content-hint</key> |
<string>Apple_partition_scheme</string> |
</dict> |
<dict> |
<key>content-hint</key> |
<string>Apple_partition_map</string> |
<key>dev-entry</key> |
<string>/dev/disk10s1</string> |
<key>potentially-mountable</key> |
<false/> |
<key>unmapped-content-hint</key> |
<string>Apple_partition_map</string> |
</dict> |
<dict> |
<key>content-hint</key> |
<string>Apple_HFS</string> |
<key>dev-entry</key> |
<string>/dev/disk10s2</string> |
<key>mount-point</key> |
<string>/private/tmp/dmg.YdyjLr</string> |
<key>potentially-mountable</key> |
<true/> |
<key>unmapped-content-hint</key> |
<string>Apple_HFS</string> |
<key>volume-kind</key> |
<string>hfs</string> |
</dict> |
</array> |
</dict> |
</plist> |
The first line in the output is not xml, which causes the pkgdmg provider to fail when attempting to parse the generated plist xml. |