Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-10408

Puppet .dmg packages fail on macOS 10.15

    XMLWordPrintable

    Details

    • Template:
      PUP Bug Template
    • Team:
      Night's Watch
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      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.
      Show
      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.
    • QA Risk Assessment:
      Needs Assessment

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            cmiconi Chris Miconi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support