Apple printer drivers keep installing

996 views
Skip to first unread message

David Vandenborn

unread,
Jun 19, 2012, 12:28:11 PM6/19/12
to munk...@googlegroups.com
Hi,

I'm a beginning Munki user using version munkitools-0.8.2.1475.0. I've got Munki up and running.

Microsoft 2011 + updates and some other small stuff is being managed without a problem on a Lion client.

I've now added 3 packages to my repo that keep on installing. They are the current printer drivers from Apple for HP, Xerox and Ricoh.

I've added them to Munki with the munkiimport command and then edited the pkginfo file slightly. Below is the pkginfo content for one of them and the manifest that I'm using.

Can anyone tell me what I'm doing wrong?
Or is this a known bug?

Cheers,
David Vandenborn


PKGinfo for HewlettPackardPrinterDrivers-10.6.0.1.1.1238328574
************************************************************************

<?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>student</string>
<string>docent</string>
</array>
<key>description</key>
<string>Hewlett-Packard Printer Software</string>
<key>display_name</key>
<string>Hewlett-Packard Printer Software</string>
<key>installed_size</key>
<integer>672254</integer>
<key>installer_item_hash</key>
<string>bb4873ac5a9c40d330a8d4a553b4013ac4e69a33772c1a9f72c0c497be1f8680</string>
<key>installer_item_location</key>
<string>drivers/HewlettPackardPrinterDrivers.dmg</string>
<key>installer_item_size</key>
<integer>512528</integer>
<key>minimum_os_version</key>
<string>10.6.0</string>
<key>name</key>
<string>HewlettPackardPrinterDrivers</string>

<key>receipts</key>
<array>
<dict>
<key>installed_size</key>
<integer>1034238</integer>
<key>packageid</key>
<string>com.apple.pkg.HewlettPackardPrinterDrivers</string>
<key>version</key>
<string>10.6.0.1.1.1238328574</string>
</dict>
<dict>
<key>packageid</key>
<string>com.apple.pkg.HewlettPackardPrinterDriversPreInstall</string>
<key>version</key>
<string>10.6.0.1</string>
</dict>
</array>
<key>uninstall_method</key>
<string>removepackages</string>
<key>uninstallable</key>
<true/>
<key>version</key>
<string>10.6.0.1.1.1238328574</string>
</dict>
</plist>

*************
Manifest
*************

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>catalogs</key>
<array>
<string>student</string>
</array>
<key>managed_installs</key>
<array>
<string>Office Installer</string>
<string>Create PHL Network Location</string>
<string>PHL BlockKerberosAdminServers</string>
<string>HewlettPackardPrinterDrivers</string>
<string>RicohPrinterDrivers</string>
<string>XeroxPrinterDrivers</string>
</array>
</dict>
</plist>



Greg Neagle

unread,
Jun 19, 2012, 12:31:34 PM6/19/12
to munk...@googlegroups.com
See the last question here:

http://code.google.com/p/munki/wiki/FAQ

and also read this:

http://code.google.com/p/munki/wiki/HowMunkiDecidesWhatNeedsToBeInstalled

TL;DR:

Add installs items for the driver pkginfo files.

-Greg

David Vandenborn

unread,
Jun 19, 2012, 1:55:52 PM6/19/12
to <munki-dev@googlegroups.com>, munk...@googlegroups.com
Hi Greg,

Thanks for the info. I was hoping that I didn't have to include the installs key and that the receipts would do their job since I was using Apple packages.

So I guess it's best practice to always figure out all the files that are being installed and include them in the installs key.

David Vandenborn

PS: Big thanks for developing Munki! It really is an excellent tool.

Greg Neagle

unread,
Jun 19, 2012, 2:03:10 PM6/19/12
to munk...@googlegroups.com
You don't need to figure out "all" the files that are being installed. Just one that is unique to that item.

Most likely, even though the HP printer driver has two receipts:

>>> com.apple.pkg.HewlettPackardPrinterDrivers
>>> com.apple.pkg.HewlettPackardPrinterDriversPreInstall

only one is actually being left on disk.

% pkgutil --pkgs | grep com.apple.pkg.HewlettPackardPrinterDrivers
com.apple.pkg.HewlettPackardPrinterDrivers

Since Munki can't find "com.apple.pkg.HewlettPackardPrinterDriversPreInstall", it thinks the item needs to be installed.

So an alternate approach would be to remove the receipt for "com.apple.pkg.HewlettPackardPrinterDriversPreInstall" from the list of receipts.

Note that removing receipts from the "receipts" list can have implications if you want Munki to be able to remove items using the "removepackages" uninstall_method -- Munki can't remove items it doesn't have receipts for.

-Greg

MiqViq

unread,
Jun 19, 2012, 4:35:33 PM6/19/12
to munk...@googlegroups.com
Hi,

here is my "installs" for HP printer drivers version 2.9.0.

I did compare the version numbers for these items with v2.8.0 and at least these were updated in 2.9.0.
With the next version of drivers you might have to look some other items for "installs" as it is not guaranteed that these items are going to be updated...

<key>installs</key>
<array>
<dict>
<key>CFBundleShortVersionString</key>
<string>18.4.2</string>
<key>path</key>
<string>/Library/Printers/hp/filter/hpPostProcessing.bundle</string>
<key>type</key>
<string>bundle</string>
</dict>
<dict>
<key>CFBundleIdentifier</key>
<string>com.hp.print.cups.filter.commandtohp</string>
<key>CFBundleName</key>
<string>HP Command Filter</string>
<key>CFBundleShortVersionString</key>
<string>1.16.0</string>
<key>path</key>
<string>/Library/Printers/hp/cups/filters/commandtohp.filter</string>
<key>type</key>
<string>bundle</string>
</dict>
</array>

-MiqViq

Paul Bloch

unread,
Jun 19, 2012, 8:09:10 PM6/19/12
to munk...@googlegroups.com
I happened to be just now working on this particular Munki package and I was wondering why there isn't the option of using 
an "installs" key type of "reciept", so I could just copy the receipt that I know is successfully being installed.
That was I don't have to poke around the filesystem looking for unique files to list in "installs".

For example:

        </array>
        <key>installs</key>
       
<array>
               
<dict>

                       
<key>type</key>
                       
<string>receipt</string>

<key>packageid</key> <string>com.apple.pkg.HewlettPackardPrinterDrivers</string> <key>version</key> <string>10.6.0.1.1.1238328574</string>                 </dict>
        </array>


Greg Neagle

unread,
Jun 19, 2012, 9:00:23 PM6/19/12
to munk...@googlegroups.com
I think I would prefer being able to mark some items in the receipts array as optional. This would cause Munki to ignore these items for the purpose of determining installed status, but leave them available for processing removals. 

Sent from my iPhone

MiqViq

unread,
Jun 20, 2012, 1:57:46 AM6/20/12
to munk...@googlegroups.com
FYI, HP drivers in OS X have had the same pkg version number 10.6.0.1.1.1238328574 in 2.7.2, 2.8.0 and 2.9.0. And probably Apple will keep the same pkg version with upcoming HP updates (why, I do not know).
So pkg version number cannot be used for defining which version of HP drivers are actually installed.
If you need to be sure that a specific version is installed then you have to find some items in filesystem which are unique to that specific driver update.
It would be so nice if "guys at the packing plant" actually used a standardized way for pkg-versions...

-MiqViq


On Wednesday, June 20, 2012 4:00:23 AM UTC+3, gregn...@mac.com wrote:
I think I would prefer being able to mark some items in the receipts array as optional. This would cause Munki to ignore these items for the purpose of determining installed status, but leave them available for processing removals. 

Sent from my iPhone

Greg Neagle

unread,
Jun 20, 2012, 2:00:50 AM6/20/12
to munk...@googlegroups.com
This entire thread reminds me why I just let Apple's Software Update figure out what printer drivers need to be installed/updated.

-Greg

David Vandenborn

unread,
Jun 20, 2012, 8:12:33 AM6/20/12
to <munki-dev@googlegroups.com>
Thank you all for the info and help. This here is a great community.

Using Apple Software Update to figure out what printer drivers need to be installed isn't possible on our network. Our printers cannot be discovered on our network. 
We use Equitrac for print management and cost recovery. Hence the printer queues on the clients need to be created with an Equitrac application.

David Vandenborn

Harry Fike

unread,
Jan 17, 2013, 10:11:13 AM1/17/13
to munk...@googlegroups.com
I am working on this problem now trying to update 2.12 to 2.13. Since my repo is rather young, I haven't had to address it before. Any reliable files to use for a installs array? I am checking the files MiqViq suggested as well as running fseventer and pacifist.

-- 
Harry

Gregory Neagle

unread,
Jan 17, 2013, 11:32:53 AM1/17/13
to munk...@googlegroups.com
Which drivers?

Apple doesn't make printers any longer, so you certainly mean the drivers for some other printer manufacturer.

(I just use Apple Software Update to keep printer drivers updated)

-Greg

Harry Fike

unread,
Jan 17, 2013, 12:24:37 PM1/17/13
to munk...@googlegroups.com
These drivers: http://support.apple.com/kb/DL907

I did some digging and came up with this pkginfo:

<?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>production</string>
</array>
<key>description</key>
<string>Installs the drivers required for HP Pritners</string>
<key>display_name</key>
<string>Hewlett-Packard Printer Software</string>
<key>installed_size</key>
<integer>542647</integer>
<key>installer_item_hash</key>
<string>1a48a34dc7a9bfa415da2acdfd727d4fd80a196587cfb7b6e8cdc47ebfe8ab38</string>
<key>installer_item_location</key>
<string>Apps/HP/HewlettPackardPrint2.13.dmg</string>
<key>installer_item_size</key>
<integer>461386</integer>
<key>minimum_os_version</key>
<string>10.7.0</string>
<key>name</key>
<string>HPPrinterDrivers</string>
<key>installs</key>
<array>
<dict>
<key>CFBundleIdentifier</key>
<string>com.hp.print.cups.filter.hpPreProcessing</string>
<key>CFBundleName</key>
<string>HP LaserJet PDF Preprocessing Filter</string>
<key>CFBundleShortVersionString</key>
<string>1.4.1</string>
<key>path</key>
<string>/Library/Printers/hp/filter/hpPreProcessing.filter</string>
<key>type</key>
<string>application</string>
</dict>
<dict>
<key>CFBundleShortVersionString</key>
<string>19.5.0</string>
<key>path</key>
<string>/Library/Printers/hp/filter/hpPostProcessing.bundle</string>
<key>type</key>
<string>bundle</string>
</dict>
<dict>
<key>CFBundleShortVersionString</key>
<string>4.5.2</string>
<key>path</key>
<string>/Library/Printers/hp/Frameworks/HPDeviceModel.framework</string>
<key>type</key>
<string>bundle</string>
</dict>
<dict>
<key>CFBundleShortVersionString</key>
<string>1.4.1</string>
<key>path</key>
<string>/Library/Printers/hp/Frameworks/HPDriverCore.framework</string>
<key>type</key>
<string>bundle</string>
</dict>
<dict>
<key>CFBundleShortVersionString</key>
<string>4.5.2</string>
<key>path</key>
<string>/Library/Printers/hp/hpio/HPIOPrinterClassDriver.plugin</string>
<key>type</key>
<string>bundle</string>
</dict>
</array>
<key>receipts</key>
<array>
<dict>
<key>installed_size</key>
<integer>834842</integer>
<key>packageid</key>
<string>com.apple.pkg.HewlettPackardPrinterDrivers</string>
<key>version</key>
<string>10.6.0.1.1.1238328574</string>
</dict>
<!-- <dict>
<key>packageid</key>
<string>com.apple.pkg.HewlettPackardPrinterDriversPreInstall</string>
<key>version</key>
<string>10.6.0.1</string>
</dict>-->
</array>
<key>uninstall_method</key>
<string>removepackages</string>
<key>uninstallable</key>
<true/>
<key>unattended_install</key>
<true/>
<key>version</key>
<string>2.13</string>
</dict>
</plist>

Would it be worth it to comment out any of the items in the installs array to help with speed when running managesoftwareupdate? I included so many more for documentation sake for future updates. I also added a similar installs array to the 2.12 versions for the sake of documentation.

Thanks,
Harry

Gregory Neagle

unread,
Jan 17, 2013, 12:31:55 PM1/17/13
to munk...@googlegroups.com
If you have an installs array, the receipts array is not used to determine "is installed?" status.

When there is an installs array, the receipts array can still be used when removing a package, but in this case, I'd say you should set "uninstallable" to false -- these types of Apple updates can almost never be cleanly removed.

Sometimes one can avoid having to generate installs items by marking one or more receipts with optional=true. This causes Munki to not consider the receipt when determining "is_installed?" status. This is preferable to removing or commenting-out a receipt -- the receipt is then still available for use by "removepackages".

-Greg

Harry Fike

unread,
Jan 17, 2013, 12:38:13 PM1/17/13
to munk...@googlegroups.com
Thanks for the further explanation. I wasn't understanding it when you wrote about it earlier in the post. I will make the modifications and actually fix a few other pkginfo files. It appears that the HP installer actually deletes the receipt for com.apple.pkg.HewlettPackardPrinterDriversPreInstall on its own (it doesn't show up in pkgutil --pkgs), so I'll just remove it form the pkginfo file.

-- 
Harry

techopsAK

unread,
Jan 22, 2013, 6:12:35 PM1/22/13
to munk...@googlegroups.com
I've encountered this for the 2.10 Brother printer driver package from Apple. I haven't had a chance yet to check out bundles that have changed between .9 and .10 to develop a proper 'installs' array. Has anyone else come up with a working pkginfo for the Brother 2.10 driver pkg yet?

Jim Zajkowski

unread,
Jan 22, 2013, 6:46:16 PM1/22/13
to munk...@googlegroups.com
What we do is have the printer driver packs touch a file (e.g., /Library/Managed Installs/Flags/BrotherPrinterDrivers) in their post flight, and then use that as the installs check. We then rely on Software Update to update them later. Whether that is applicable to your environment is something only you can tell.

--Jim

TechOps

unread,
Jan 22, 2013, 8:40:57 PM1/22/13
to munk...@googlegroups.com
The receipt com.apple.pkg.BrotherPrinterDriversPreInstall doesn't appear on clients, so we modified the receipts array and that fixed the looping Brother drivers install issue.

<dict>
<key>packageid</key>
<string>com.apple.pkg.BrotherPrinterDriversPreInstall</string>
<key>version</key>
<string>10.6.0.1</string>
<key>optional</key>
<true/>
</dict>

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
AKTechOps | tec...@serrc.org | 907.523.7290

Harry Fike

unread,
Jan 22, 2013, 9:27:19 PM1/22/13
to munk...@googlegroups.com
What you will potentially see on the next release of the Brother Printer Drivers is that the other receipt (com.apple.pkg.BrotherPrinterDrivers) version does not change. With the HP drivers, the receipt the corresponds to com.apple.pkg.BrotherPrinterDrivers (com.apple.pkg.HewlettPackardPrinterDrivers) did not change versions between 2.12 and 2.13. When you either ran makepkginfo on the DMG or used munkiimport the following receipt was generated for both 2.12 and 2.13: 
<dict>
<key>installed_size</key>
<integer>834842</integer>
<key>packageid</key>
<string>com.apple.pkg.HewlettPackardPrinterDrivers</string>
<key>version</key>
<string>10.6.0.1.1.1238328574</string>
</dict>
If a machine that had HP 2.12 installed was presented with an update to 2.13, munki would not run the update as the receipt version was the same for the new package as the old. That is why you will need to go the installs array route on the next release of the Brother drivers (unless Apple changes how they do things).

Hope that helps!

-- 
Harry

Thomas Tvegaard

unread,
Jan 25, 2013, 5:22:37 AM1/25/13
to munk...@googlegroups.com
I'll just chime in with a stupid trick I use to manage Apple's HP Print Drivers.

Add a postinstall script that touches a hidden file and an installs key checking for this file.

<key>postinstall_script</key>
<string>#!/bin/sh
touch /Users/Shared/.hp-2.13</string>

makepkginfo -f /Users/Shared/.hp-2.13 to create the installs key.

When version 2.14 is released, then touch and check for .hp-2.14, etc. Ugly, yes, but it works.

-Thomas

Reply all
Reply to author
Forward
0 new messages