How to add information to the package such as Display Name, Description

48 views
Skip to first unread message

Graham R Pugh

unread,
Oct 15, 2014, 5:46:45 PM10/15/14
to the-l...@googlegroups.com
Hi all,

Apologies for what is probably a foolish question, but I've been making simple packages with the Luggage for importation into Munki. I'd like to be able to enter fields into the package that help munkiimport pre-populate the Display Name, Description etc. The only variables I know about in Luggage are PACKAGE_NAME and TITLE, neither of which are picked up by munkiimport's "Display Name". Does anyone know how I can achieve this?

Also, how to add an icon?

Cheers, Graham

Allister Banks

unread,
Oct 15, 2014, 8:02:22 PM10/15/14
to the-l...@googlegroups.com
Hey Graham,
So this could be considered more about what munkiimport can receive than what theLuggage can bake into a pkg. Munkiimport can be run interactively, and figure out some things in advance, further (somewhat) muddied by autopkg's 'cheating' behavior of manual baking things like description into the pkginfo data structure it hands to munkiimport during a munki.recipe run. The variables we have to work with are there at the top of the luggage.make file, and munkiimport calls out to munkicommon for the handful of items it can determine based on various functions, including getPackageMetaData. With a luggage project I built with pkgbuild recently, I'm prompted by munkiimport with the Title variable I had set in the makefile as the Item Name, and DisplayName is set to the PackageName var that theLuggage builds for itself dynamically if each part is not set.
Icon import functionality was announced for munkiimport back in May, but it seems to just look for an expanded .app bundle and then pull out an icon based on the CFBundleIconFile's value, assuming it's an app in your payload that you want an icon for, but I could be missing something.
Allister

--
You received this message because you are subscribed to the Google Groups "The Luggage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to the-luggage...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Timothy Sutton

unread,
Oct 16, 2014, 9:30:57 AM10/16/14
to the-l...@googlegroups.com
Munkiimport is run interactively by default, but there's also a --nointeractive option.

I am a total novice at Make, but you could define new target like 'munkiimport' with a requirement of 'dmg'. The 'dmg' target is defined in The Luggage's luggage.make and outputs to ${DMG_NAME}. So we can just pass this to a the new target that invokes the munkiimport command.

Then we can just say "make munkiimport". For example, for a Makefile that would normally just package up a postflight script in a bundle package:




include /usr/local/share/luggage/luggage.make

TITLE=My_Package
PACKAGE_VERSION=2014.10.16
PAYLOAD=pack-script-postflight

munkiimport: dmg
munkiimport \
--nointeractive \
--subdirectory apps/My_Package \
--displayname "This is my package's fancy displayname" \
--description "This was imported via The Luggage" \
"${DMG_NAME}"



Tim

Vaughn Miller

unread,
Oct 16, 2014, 10:31:47 AM10/16/14
to the-l...@googlegroups.com
Thanks for the idea Tim, I just gave this a try in a Makefile and it works.

Vaughn Miller
Desktop Engineer
Lafayette College

Graham

unread,
Oct 16, 2014, 2:48:01 PM10/16/14
to the-l...@googlegroups.com
That's good thinking, and exactly as required - thanks Tim.

Cheers, Graham


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

Jeremy Reichman

unread,
Oct 17, 2014, 10:57:44 AM10/17/14
to the-l...@googlegroups.com
I’ve definitely done what Tim mentioned, but mostly with makepkginfo as a target. You can also use this technique (mostly in stanzas rather than targets) to automate other processes, like say building a CCK extension for Firefox or something.

--
Jeremy
Reply all
Reply to author
Forward
0 new messages