Help wanted!

233 views
Skip to first unread message

Gregory Neagle

unread,
Feb 6, 2019, 1:47:59 PM2/6/19
to munk...@googlegroups.com, 'Gregory Neagle' via munki-discuss
There have been some issues raised around Munki sometimes reporting that it wants to install "outdated" Apple updates: for example, a Mac running 10.14.3, but Munki says a 10.14.2 update is applicable/available.

Upon investigation, the "outdated" update is downloaded and present in /Library/Updates and listed in /Library/Updates/index.plist. This appears to be the result of a bug in softwareupdate where it does not clean up downloaded updates that have been superseded/obsoleted by newer updates. It's particularly troublesome on 10.14, since /Library/Updates is SIP-protected on that OS and you can't clean it up yourself without disabling SIP.

I'd like to fix (or at least workaround) this issue in a future release of Munki, but I need some help. This fix won't happen until after the Munki 3.6 release, so the fix needs to work properly only on macOS 10.10-10.14.

Here's what I need:

For each major OS release from 10.10 to 10.14, I need the following data from a machine with pending softwareupdate updates:

The output of `defaults read /Library/Preferences/com.apple.SoftwareUpdate RecommendedUpdates`, and
the output of `defaults read /Library/Updates/index ProductPaths` or `cat /Library/Updates/index.plist` (either is fine).

More data is better; if you have multiple machines of a single majorOS showing different output, feel free to send that along.

Thanks in advance for your help!

-Greg

Gregory Neagle

unread,
Feb 6, 2019, 2:04:04 PM2/6/19
to 'Gregory Neagle' via munki-discuss, munk...@googlegroups.com
Thanks, Alan. I think I should request one more bit of data --  the output of `softwareupdate -l`.

-Greg

On Feb 6, 2019, at 10:52 AM, Mr. Alan Siu <as...@siprep.org> wrote:

From a 10.13.6 machine with a pending update:

defaults read /Library/Preferences/com.apple.SoftwareUpdate RecommendedUpdates
(
        {
        "Display Name" = "Security Update 2019-001";
        "Display Version" = "10.13.6";
        Identifier = "Security Update 2019-001";
        "Product Key" = "041-31490";
    }
)

defaults read /Library/Updates/index ProductPaths
2019-02-06 10:50:50.268 defaults[31405:142531] 
The domain/default pair of (/Library/Updates/index, ProductPaths) does not exist

cat /Library/Updates/index.plist
cat: /Library/Updates/index.plist: No such file or directory

Alan Siu
Client Systems Analyst
St. Ignatius College Preparatory


--
You received this message because you are subscribed to the Google Groups "munki-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-discus...@googlegroups.com.
To post to this group, send email to munki-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/munki-discuss/C6B121D2-FE06-4FD8-8965-0096DFA8C66B%40mac.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "munki-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-discus...@googlegroups.com.
To post to this group, send email to munki-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/munki-discuss/CANWfAiOEHsOcdZZeeh_%2Bt0NXOnqQ6ZCyV73QvkSq93Y9bG%2BjhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Mr. Alan Siu

unread,
Feb 6, 2019, 2:06:03 PM2/6/19
to munki-...@googlegroups.com, munk...@googlegroups.com
softwareupdate -l
Software Update Tool

Finding available software
Software Update found the following new or updated software:
   * Security Update 2019-001-10.13.6
Security Update 2019-001 (10.13.6), 1768180K [recommended] [restart]

Alan Siu
Client Systems Analyst
St. Ignatius College Preparatory

Gregory Neagle

unread,
Feb 6, 2019, 2:11:01 PM2/6/19
to munk...@googlegroups.com, munki-...@googlegroups.com
Thanks again.

Now especially looking for data from 10.11 and 10.10 machines. I would not reject data from 10.9 and 10.8 machines if it's available. :-)

-Greg

--
Find related discussion groups here:
https://github.com/munki/munki/wiki/Discussion-Group
---
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.
To post to this group, send email to munk...@googlegroups.com.

Eric Holtam

unread,
Feb 6, 2019, 3:07:17 PM2/6/19
to munki-dev
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G1314


$ defaults read /Library/Preferences/com.apple.SoftwareUpdate RecommendedUpdates
(
        {
        "Display Name" = "Security Update 2018-003";
        "Display Version" = "10.12.6";
        Identifier = "Security Update 2018-003";
        "Product Key" = "091-58221";
    },
        {
        "Display Name" = Safari;
        "Display Version" = "11.1.2";
        Identifier = "Safari11.1.2Sierra";
        "Product Key" = "091-83945";
    }
)


$ defaults read /Library/Updates/index ProductPaths
2019-02-06 15:02:43.005 defaults[45727:10666479]
The domain/default pair of (/Library/Updates/index, ProductPaths) does not exist


$ cat /Library/Updates/index.plist

cat: /Library/Updates/index.plist: No such file or directory


bash-3.2$ sudo softwareupdate -l
Password:

Software Update Tool


Finding available software
Software Update found the following new or updated software:
   * Security Update 2018-003-10.12.6
 Security Update 2018-003 (10.12.6), 758125K [recommended] [restart]
   * Safari11.1.2Sierra-11.1.2
 Safari (11.1.2), 77963K [recommended]

Stephen Short

unread,
Feb 6, 2019, 5:03:39 PM2/6/19
to munki-dev
run on 10.14.2


defaults read /Library/Preferences/com.apple.SoftwareUpdate RecommendedUpdates

(
        {
        "Display Name" = "macOS 10.14.3 Update";
        "Display Version" = " ";
        Identifier = "macOS 10.14.3 Update";
        "Product Key" = "041-31312";
    }
)



defaults read /Library/Updates/index ProductPaths

{
}

cat /Library/Updates/index.plist

<?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>ProductPaths</key>
<dict/>
</dict>
</plist>


softwareupdate -l

Software Update Tool

Finding available software
Software Update found the following new or updated software:
   * macOS 10.14.3 Update- 
macOS 10.14.3 Update ( ), 1925808K [recommended] [restart]

Harry Fike

unread,
Feb 6, 2019, 5:41:19 PM2/6/19
to munki-dev
10.12.6 (16G1710)

defaults read /Library/Preferences/com.apple.SoftwareUpdate.plist RecommendedUpdates
(
        {
        "Display Name" = "Security Update 2019-001";
        "Display Version" = "10.12.6";
        Identifier = "Security Update 2019-001";
        "Product Key" = "041-31493";
    }
)

defaults read /Library/Updates/index ProductPaths
2019-02-06 17:37:53.760 defaults[87110:36710144]
The domain/default pair of (/Library/Updates/index, ProductPaths) does not exist
softwareupdate -l
Software Update Tool

Finding available software
Software Update found the following new or updated software:
   * Security Update 2019-001-10.12.6
    Security Update 2019-001 (10.12.6), 812477K [recommended] [restart]


----------------
10.13.6 (17G4015)

defaults read /Library/Preferences/com.apple.SoftwareUpdate.plist RecommendedUpdates
(
        {

        "Display Name" = "Security Update 2019-001";
        "Display Version" = "10.13.6";
        Identifier = "Security Update 2019-001";
        "Product Key" = "041-31490";
    }
)

defaults read /Library/Updates/index ProductPaths
{
    "041-31490" = "041-31490";
}

softwareupdate -l
Software Update Tool

Finding available software
Software Update found the following new or updated software:

Rob Renstrom

unread,
Feb 6, 2019, 6:43:42 PM2/6/19
to munki-dev
from a VM

bash-3.2# sw_vers

ProductName: Mac OS X

ProductVersion: 10.11.6

BuildVersion: 15G22010



bash-3.2# softwareupdate -l

Software Update Tool

Copyright 2002-2015 Apple Inc.


Finding available software

Software Update found the following new or updated software:

   * iTunesX-12.8.2

iTunes (12.8.2), 273564K [recommended]


bash-3.2# defaults read /Library/Preferences/com.apple.SoftwareUpdate RecommendedUpdates

(

        {

        "Display Name" = iTunes;

        "Display Version" = "12.8.2";

        Identifier = iTunesX;

        "Product Key" = "zzzz041-30443";

    }

)


bash-3.2# defaults read /Library/Updates/index ProductPaths

2019-02-06 15:10:32.476 defaults[423:4809] 

Max Schlapfer

unread,
Feb 7, 2019, 9:12:42 AM2/7/19
to munki-dev
macOS 10.12.6

$ system_profiler SPHardwareDataType | grep Model
Model Name: iMac
Model Identifier: iMac11,1

$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G1710

$ softwareupdate -l
Software Update Tool

Finding available software
Software Update found the following new or updated software:
  * Safari12.0.3Sierra-12.0.3
Safari (12.0.3), 78875K [recommended]
  * Security Update 2019-001-10.12.6
Security Update 2019-001 (10.12.6), 812477K [recommended] [restart]
  * iTunesX-12.8.2
iTunes (12.8.2), 273564K [recommended]


$ defaults read /Library/Preferences/com.apple.SoftwareUpdate RecommendedUpdates
(
{
"Display Name" = iTunes;
"Display Version" = "12.8.2";
Identifier = iTunesX;
"Product Key" = "zzzz041-30443";
},
{
"Display Name" = "Security Update 2019-001";
"Display Version" = "10.12.6";
Identifier = "Security Update 2019-001";
"Product Key" = "041-31493";
},
{
"Display Name" = Safari;
"Display Version" = "12.0.3";
Identifier = "Safari12.0.3Sierra";
"Product Key" = "041-30526";
}
)


$ defaults read /Library/Updates/index ProductPaths
{
"041-30526" = "041-30526";
"zzzz041-30443" = "zzzz041-30443";
}

$ cat /Library/Updates/index.plist
<?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>InstallAtLogout</key>
<array/>
<key>ProductPaths</key>
<dict>
<key>041-30526</key>
<string>041-30526</string>
<key>zzzz041-30443</key>
<string>zzzz041-30443</string>
</dict>
</dict>
</plist>


macOS 10.11.6

$ system_profiler SPHardwareDataType | grep Model
Model Name: Apple device
Model Identifier: VMware7,1

$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.6
BuildVersion: 15G31

$ softwareupdate -l
Software Update Tool
Copyright 2002-2015 Apple Inc.

Finding available software
Software Update found the following new or updated software:
  * RAWCameraUpdate6.21-6.21
Digital Camera RAW Compatibility Update (6.21), 7695K [recommended]
  * Mac App Store Update for OS X El Capitan- 
Mac App Store Update for OS X El Capitan ( ), 4675K [recommended] [restart]
  * RemoteDesktopClient-3.9.3
Remote Desktop Client Update (3.9.3), 8587K [recommended]
  * Security Update 2018-004-10.11.6
Security Update 2018-004 (10.11.6), 653258K [recommended] [restart]
  * iTunesX-12.8.2
iTunes (12.8.2), 273564K [recommended]

$ defaults read /Library/Preferences/com.apple.SoftwareUpdate RecommendedUpdates
(
{
"Display Name" = "Mac App Store Update for OS X El Capitan";
"Display Version" = " ";
Identifier = "Mac App Store Update for OS X El Capitan";
"Product Key" = "091-10728";
},
{
"Display Name" = "Digital Camera RAW Compatibility Update";
"Display Version" = "6.21";
Identifier = "RAWCameraUpdate6.21";
"Product Key" = "031-70458";
},
{
"Display Name" = iTunes;
"Display Version" = "12.8.2";
Identifier = iTunesX;
"Product Key" = "zzzz041-30443";
},
{
"Display Name" = "Security Update 2018-004";
"Display Version" = "10.11.6";
Identifier = "Security Update 2018-004";
"Product Key" = "091-63422";
},
{
"Display Name" = "Remote Desktop Client Update";
"Display Version" = "3.9.3";
Identifier = RemoteDesktopClient;
"Product Key" = "091-14720";
}
)

$ defaults read /Library/Updates/index ProductPaths
{
}

$ cat /Library/Updates/index.plist

Wesley Yip

unread,
Feb 7, 2019, 2:33:17 PM2/7/19
to munki-dev
Rolled back an Early 2015 MacBook to 10.10.5 via Internet Recovery: 

Tests-MacBook:~ test$ sw_vers

ProductName: Mac OS X

ProductVersion: 10.10.5

BuildVersion: 14F27


Tests-MacBook:~ test$ defaults read /Library/Preferences/com.apple.SoftwareUpdate RecommendedUpdates

(

        {

        "Display Name" = "macOS High Sierra";

        "Display Version" = " ";

        Identifier = "Install macOS High Sierra";

        "Product Key" = "091-76348";

    },

        {

        "Display Name" = Safari;

        "Display Version" = "10.1.2";

        Identifier = "Safari10.1.2Yosemite";

        "Product Key" = "091-22830";

    },

        {

        "Display Name" = "Security Update 2017-003";

        "Display Version" = "10.10.5";

        Identifier = "Security Update 2017-003";

        "Product Key" = "091-01555";

    },

        {

        "Display Name" = "Remote Desktop Client Update";

        "Display Version" = "3.8.4";

        Identifier = RemoteDesktopClient;

        "Product Key" = "031-21283";

    }

)

Tests-MacBook:~ test$ defaults read /Library/Updates/index ProductPaths

{

    "031-21283" = "031-21283";

    "091-14720" = "091-14720";

    "091-22830" = "091-22830";

}

Tests-MacBook:~ test$ softwareupdate -l

Software Update Tool

Copyright 2002-2012 Apple Inc.


Finding available software

Software Update found the following new or updated software:

   * RemoteDesktopClient-3.8.4

Remote Desktop Client Update (3.8.4), 7103K [recommended]

   * Security Update 2017-003-10.10.5

Security Update 2017-003 (10.10.5), 399418K [recommended] [restart]

   * RemoteDesktopClient-3.9.3

Remote Desktop Client Update (3.9.3), 8587K [recommended]

   * Safari10.1.2Yosemite-10.1.2

Safari (10.1.2), 71479K [recommended]

   * Install macOS High Sierra- 

macOS High Sierra ( ), 5106655K [recommended]

Gregory Neagle

unread,
Feb 8, 2019, 9:34:26 AM2/8/19
to munk...@googlegroups.com, 'Gregory Neagle' via munki-discuss
Thank you, everyone, for the data. I've made some changes here: https://github.com/munki/munki/commit/97dcaa380c2b6bc14422a7ea94dd9bbdca261713 that I think will address the issue, at least on 10.9 and up. (If we could get some data from a 10.8 machine we could be more confident about all the macOS versions that Munki 3.5.x supports...)

Since the changes here are relatively minor, straightforward, and easy to understand, I'm going to include them in the next Preview Release of Munki 3.6, which I hope to officially release before the end of February.

I don't really need more data on this issue, with a few exceptions:

My analysis of the data indicates that:
1) the output of `softwareupdate -l` and `defaults read /Library/Preferences/com.apple.SoftwareUpdate RecommendedUpdates` should list the exact same updates, and that 
2) we should _ignore_ the info in  /Library/Updates/index.plist` on at least macOS 10.9 and up.

If you have data that contradicts this analysis, or you have data for macOS 10.8, I'd really like to see that.

I did see one bit of data where `defaults read /Library/Preferences/com.apple.SoftwareUpdate RecommendedUpdates` listed no updates, and `softwareupdate -l`  did list updates, but I think the commands were run in that order and if `defaults read /Library/Preferences/com.apple.SoftwareUpdate RecommendedUpdates`  had been run again after running `softwareupdate -l`, it would have listed the same updates.

-Greg

Reply all
Reply to author
Forward
0 new messages