Munki 2: munkiimport can now create product icons

229 views
Skip to first unread message

Gregory Neagle

unread,
May 22, 2014, 11:45:30 AM5/22/14
to munk...@googlegroups.com
When importing an item, if munkiimport can't find an existing product icon in the repo, it now offers to attempt to extract one from the current item being imported:

% munkiimport GoogleChrome.dmg
This item is similar to an existing item in the repo:
            Item name: GoogleChrome
         Display name: Google Chrome
          Description: Google's web browser.
              Version: 34.0.1847.137
  Installer item path: apps/GoogleChrome-34.0.1847.137.dmg

Use existing item as a template? [y/n] y
Copying unattended_install: True
Copying category: Internet
Copying developer: Google
      Item name [GoogleChrome]: 
   Display name [Google Chrome]: 
    Description [Google's web browser.]: 
        Version [35.0.1916.114]: 
       Category [Internet]: 
      Developer [Google]: 
       Catalogs [testing]: 

      Item name: GoogleChrome
   Display name: Google Chrome
    Description: Google's web browser.
        Version: 35.0.1916.114
       Category: Internet
      Developer: Google
       Catalogs: testing

Import this item? [y/n] y
Attempt to create a product icon? [y/n] y
Attempting to extract and upload icon...
Created icon: /Users/Shared/munki_repo/icons/GoogleChrome.png
Copying GoogleChrome.dmg to /Users/Shared/munki_repo/pkgs/apps/GoogleChrome-35.0.1916.114.dmg...
Saving pkginfo to /Users/Shared/munki_repo/pkgsinfo/apps/GoogleChrome-35.0.1916.114.plist...
Rebuild catalogs? [y/n] y
Rebuilding catalogs at /Users/Shared/munki_repo...

Some additional functionality might be useful, but I'm not sure how to best add it:

1) Tell munkiimport to extract a product icon even if there is one in the repo
2) Tell munkiimport to use some other (pre-existing) file as the product icon, and copy it into place
3) Use munkiimport to create a product icon for an item already in the repo (maybe)?

Thoughts?

-Greg

Erik

unread,
May 22, 2014, 12:16:09 PM5/22/14
to munk...@googlegroups.com
1. Use an optional switch
2. Pre-existing from the icon repo?
3. It would have to modify the current pkginfo files - Good feature, but not sure if it's needed due iconimporter's functionality.

4. DMG wrapped apps only, correct?

Gregory Neagle

unread,
May 22, 2014, 12:31:57 PM5/22/14
to munk...@googlegroups.com
On May 22, 2014, at 9:16 AM, Erik <eriknico...@gmail.com> wrote:

1. Use an optional switch

RIght, but would anyone ever look at the help and figure out it exists? I feel like people don't use most of the option as is.

2. Pre-existing from the icon repo?

Some png/jpg file you have locally. It's not possible to "automatically" extract a product icon from all items Munki can install. Sometimes you'll have to do it manually.

3. It would have to modify the current pkginfo files

No, it wouldn't. You can add icons to your repo now without modifying any pkginfo files.

- Good feature, but not sure if it's needed due iconimporter's functionality.

4. DMG wrapped apps only, correct?

What? Do you mean "can munkiimport generate icons only from DMG wrapped apps?" No, it can generate them from many Apple pkgs as well. This shares a lot of code with iconimporter.

-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/d/optout.

Reply all
Reply to author
Forward
0 new messages