Jira (PUP-10408) Puppet .dmg packages fail on macOS 10.15

15 views
Skip to first unread message

Chris Miconi (Jira)

unread,
Apr 2, 2020, 7:39:04 PM4/2/20
to puppe...@googlegroups.com
Chris Miconi created an issue
 
Puppet / Bug PUP-10408
Puppet .dmg packages fail on macOS 10.15
Issue Type: Bug Bug
Affects Versions: PUP 6.14.0, PUP 5.5.19
Assignee: Unassigned
Components: Types and Providers
Created: 2020/04/02 4:38 PM
Priority: Major Major
Reporter: Chris Miconi

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.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Apr 3, 2020, 11:40:05 AM4/3/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Night's Watch

Chris Miconi (Jira)

unread,
Apr 3, 2020, 7:11:03 PM4/3/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Apr 7, 2020, 2:41:03 PM4/7/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Apr 17, 2020, 2:01:04 AM4/17/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 6.15.0
Fix Version/s: PUP 5.5.20

Josh Cooper (Jira)

unread,
Apr 17, 2020, 2:01:04 AM4/17/20
to puppe...@googlegroups.com

Gheorghe Popescu (Jira)

unread,
Apr 21, 2020, 4:03:03 AM4/21/20
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
 
Change By: Gheorghe Popescu
Release Notes: Bug Fix

Gheorghe Popescu (Jira)

unread,
Apr 21, 2020, 4:03:03 AM4/21/20
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Release Notes Summary: Removed the  '-noidme' flag with hdiutil when using pkgdmg package provider.
In macOS 10.15 the '-noidme' flag causes hdiutil to output a deprecation warning, which then causes pkgdmg to fail to parse the plist xml that hdiutil generates, which then causes the package installation to fail in puppet.
The '-noidme' flag is unnecessary for older versions of macOS as hdiutil does not perform idme actions by default.

Gheorghe Popescu (Jira)

unread,
Apr 21, 2020, 4:04:03 AM4/21/20
to puppe...@googlegroups.com
Gheorghe Popescu commented on Bug PUP-10408
 
Re: Puppet .dmg packages fail on macOS 10.15

Added release notes and moved this to resolved. Thank you Chris Miconi!

Claire Cadman (Jira)

unread,
Apr 27, 2020, 6:47:03 AM4/27/20
to puppe...@googlegroups.com
Claire Cadman updated an issue
 
Change By: Claire Cadman
Labels: doc_reviewed
Reply all
Reply to author
Forward
0 new messages