doesn't work in Simian: Stupid Munki trick: Automatic removal of AppStore versions of iLife apps.

122 views
Skip to first unread message

Jason Hueske

unread,
Jun 4, 2013, 7:12:05 PM6/4/13
to simian-...@googlegroups.com
Hi, attempting to add Greg's payloadless iLife pkginfo files to simian results in:

PackageInfo Error: ('plist_lib.PlistError parsing plist XML: %s', 'Missing element installer_item_hash')

It would be possible to attach a dummy package to the file, but that seems like a waste. Is it strictly necessary to require the installer_item_hash key?

Thanks,
- Jason

On Mar 22, 2013, at 4:38 PM, Gregory Neagle <gregn...@mac.com> wrote:

> We do a fair amount of no-imaging here, where we take a brand-new machine from Apple and just install some bootstrapping packages on it, restart and let Munki configure the machine for use.
>
> A minor issue with this approach is that AppStore versions of iMovie, iPhoto, and GarageBand are on the machine, and Munki cannot update them.
>
> We've had to remember to manually remove these apps and replace them with the DVD versions.
>
> Manual is bad. Automatic is better.
>
> Attached are three pkginfos you should be able to drop into your repo (unless you are using MunkiServer or Simian). These will cause the three AppStore apps to be automatically removed on any Munki-managed machine.
>
> They don't need to be explicitly added to any manifest because they use the autoremove=True key. You can, if you'd like, set that to False and add them to managed_uninstalls in a manifest or included manifest if you'd like.
>
> They should never be added to managed_installs, managed_updates, or optional_installs unless you are a masochist.
>
> Enjoy.
>
> -Greg
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> <iLife11AppStore_GarageBand-6.0.5><iLife11AppStore_iMovie-9.0.8><iLife11AppStore_iPhoto-9.4.1>

Justin McWilliams

unread,
Jun 4, 2013, 7:23:18 PM6/4/13
to simian-...@googlegroups.com
Jason,

It may simply be that we made an assumption that all packages have
payloads, and thus we force installer_item_hash.

Removing this line from the source and redeploying your server should
fix this: https://code.google.com/p/simian/source/browse/trunk/src/simian/mac/munki/plist.py#1254

Also, have you tried setting the "installer_item_hash" key, but
leaving the value blank/empty? It seems our pkginfo validation
ensures that the key exists, but we don't enforce any value.

- Justin
> You received this message because you are subscribed to the Google Groups "Simian Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to simian-discus...@googlegroups.com.

Jason Hueske

unread,
Jun 4, 2013, 8:33:46 PM6/4/13
to simian-...@googlegroups.com
Setting these works:

<key>installer_item_hash</key>
<string>0</string>
<key>installer_item_location</key>
<string>0</string>

But the 'Human Friendly Editor' says:

Disk Image: "This file does NOT exist in the blob store, please upload the corresponding disk image."
Catalogs: "Locked until a package file is uploaded."

It's simple enough to attach a payloadless pkg, so no big problem.

Thanks,
- Jason

Justin McWilliams

unread,
Jun 5, 2013, 4:33:19 PM6/5/13
to simian-...@googlegroups.com
Indeed. Knowing this, it appears we don't support payloadless
packages. I'll mark this down as a feature request.

Dan O'Boyle

unread,
Aug 31, 2015, 6:00:02 PM8/31/15
to Simian Discuss
Hi Justin,
sorry for the necro post - but was this ever resolved? I'm seeing the behavior described (Missing element installer_item_hash) on payloadless packages.

Justin McWilliams

unread,
Sep 1, 2015, 12:22:34 PM9/1/15
to Simian Discuss
This was not resolved.  The workaround was simply to upload a payloadless pkg/dmg.  How much pain does this cause?  If it's significant, I could look into this again.  IIRC, the only issue I encountered when considering adding support for payloadless pkginfo's was UX (i.e. warn admins there are no packages uploaded, but still let them deploy to catalogs).

For more options, visit https://groups.google.com/d/optout.

Dan O'Boyle

unread,
Sep 1, 2015, 1:13:41 PM9/1/15
to Simian Discuss
That's about what I saw looking at the code, I wasn't sure how important the warns / error checking was to overall functionality.  I was actually recieving the error I mentioned when uploading an empty pkg file (it included a postflight, but had no payload)  As I think about it, that's likely just an issue with how mkpkginfo was generating the plist. 

I can take a swing at this over the weekend, if desired.

You received this message because you are subscribed to a topic in the Google Groups "Simian Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/simian-discuss/hT8IJjGtUmk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to simian-discus...@googlegroups.com.

Justin McWilliams

unread,
Sep 2, 2015, 4:30:54 PM9/2/15
to Simian Discuss
The warnings and restriction are there for two reasons:
- I don't *think* releasing package-less pkginfos into catalogs will cause any issues in Simian, but we haven't tested. 
- As a workflow enforcement measure, to ensure admins remember to upload a package before releasing a pkginfo (which without a dmg may not do anything).

Given we now know a package-less pkginfo actually has utility, perhaps we should keep the warning but remove the restriction.  At least, after tests prove that nothing blows up further down the line.


Feel free to give it a go, if you have the time...
Reply all
Reply to author
Forward
0 new messages