Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Add bundle version from /Library/Internet Plugin-Ins to ApplicationInventory.plist #8

Open
natewalck opened this issue Sep 19, 2014 · 10 comments

Comments

@natewalck
Copy link
Contributor

Issue by natewalck
Friday Sep 19, 2014 at 07:07 GMT
Originally opened as munki/munki#231


From [email protected] on March 27, 2013 12:37:32

Many people have expressed an interest in having Internet Plug-In bundles included in ApplicationInventory.plist. The data would likely mean very little to Munki, but would be very beneficial to other reporting tools such as MunkiWebAdmin and MunkiReport.

Josh Potter submitted a script to the munki-web-admin list that does just this, but is meant to be part of the postflight process. Obviously this could be added to the official MunkiWebAdmin postflight script, but then other tools would be unable to take advantage of the data, which is why it would probably be a better fit for an enhancement to Munki.

Josh's script (along with a few modifications of my own) can be found here: https://groups.google.com/d/msg/munki-web-admin/H6faDyup8fM/5PZF6fgD8jYJ Unfortunately, this conversation was cross-replied to with the munki-dev list, which has caused a small amount of confusion, but here is a link to that discussion as well where I've asked if anyone would be willing to make the changes and a pull request. https://groups.google.com/d/msg/munki-dev/KgP5kr6ha3E/XN-MUnCvLmsJ

Original issue: http://code.google.com/p/munki/issues/detail?id=231

@natewalck
Copy link
Contributor Author

Comment by natewalck
Friday Sep 19, 2014 at 07:07 GMT


From [email protected] on March 27, 2013 14:21:30

If we are adding Internet Plug-Ins to Munki's Inventory reporting I think it needs to also search for plugins in ~/Library/Internet Plug-Ins. All of my managed installs go into /Library, but some software (like the WebEx plugin if installed by an end user) go into the users local domain, not the computer domain and it would be useful at times to also have these in ApplicationInventory.plist.

Maybe we need a hybrid solution, including work from Josh's script, your changes, and my script at https://groups.google.com/forum/?hl=en&fromgroups=#!searchin/munki-web-admin/reed/munki-web-admin/H6faDyup8fM/1Vp25Q-Gk6QJ

@natewalck
Copy link
Contributor Author

Comment by natewalck
Friday Sep 19, 2014 at 07:07 GMT


From [email protected] on March 27, 2013 15:14:28

I almost forgot about your implementation, Adam! Thanks for the reminder! Yours looks a little more ready to go into munkicommon (obviously) than what Josh or I had. I created a clone for this ticket, but haven't done anything with it just yet. Would you mind attaching your code for getting Munki's version as well? You'd might as well throw in the code for adding the OS X version in too. If no one beats me to it, I plan to work on this tonight or possibly tomorrow.

@natewalck
Copy link
Contributor Author

Comment by natewalck
Friday Sep 19, 2014 at 07:07 GMT


From [email protected] on March 27, 2013 17:11:39

I've attached the two scripts I have. For finding the plugins I basically copied functions from munkicommon and made slight modifications. Hope this makes implementing the change easier.

@natewalck
Copy link
Contributor Author

Comment by natewalck
Friday Sep 19, 2014 at 07:07 GMT


From [email protected] on March 27, 2013 22:32:33

I believe I've got it sorted, but of course this needs to be tested before I send a pull request to Greg.

So for anyone who can...

git pull https://[email protected]/r/joewollard-internet-plug-in-bundle-versioning/

All changes are in munkilib/munkicommon.py, so you can drop that in /usr/local/munki/munkilib and you should start seeing the extra info show up. The only thing I'm not crazy about at the moment is the fact that you have to search for "SystemVersion" to find the OS X version since that was the name of the plist I gave it. Not a biggie, but if anyone has a quick fix, now would be the time.

@natewalck
Copy link
Contributor Author

Comment by natewalck
Friday Sep 19, 2014 at 07:07 GMT


From [email protected] on March 27, 2013 23:30:55

Not sure I like this implementation.

The reason munkicommon.getAppData() exists is to provide data updatecheck uses. See updatecheck.compareApplicationVersion() and updatecheck.getInstalledVersion(). Adding additional, non-application data to this list could have undesired effects in updatecheck.

I think if you are going to add additional data to that list, it should be done in munkicommon.saveappdata(). This presents the least risk, since the extra data is not added until after updatecheck uses getAppData().

@natewalck
Copy link
Contributor Author

Comment by natewalck
Friday Sep 19, 2014 at 07:07 GMT


From [email protected] on March 28, 2013 07:47:33

Makes sense. I've moved the logic to saveappdata as suggested. Same pull address; new version is f486b49c0050.

@natewalck
Copy link
Contributor Author

Comment by natewalck
Friday Sep 19, 2014 at 07:07 GMT


From [email protected] on April 01, 2013 08:02:18

Anyone had any time to test this? It's working well in my environment, but we should probably have more than my own positive test case before considering a pull.

@natewalck
Copy link
Contributor Author

Comment by natewalck
Friday Sep 19, 2014 at 07:07 GMT


From [email protected] on April 01, 2013 11:55:00

I pushed this up to my test environment (~10 computers) and seems to be working great. I'll let you know if anything pops up.

@natewalck
Copy link
Contributor Author

Comment by natewalck
Friday Sep 19, 2014 at 07:07 GMT


From [email protected] on April 10, 2013 06:36:56

Greg: no additional issues have been reported to me outside of this issue. Is this something that you're willing to pull? If so, have there been sufficient changes to the main repo that I should bring my fork back up to speed before a pull can happen?

@natewalck
Copy link
Contributor Author

Comment by natewalck
Friday Sep 19, 2014 at 07:07 GMT


From [email protected] on April 16, 2013 10:56:34

Sorry for any duplicate notifications. "Issues" appeared to be having "issues" this morning. Here's my intended note:

After speaking with Greg, this might not be the best approach to solving this issue. The code that I added directly modifies data that had originally been intended to help track licensed software installations.

A better solution might be to modify MWA's pre/post flight scripts to allow for this kind of extra data tracking. Perhaps that's something that we can look into if we ever translate those scripts to Python. But for now, this issue is considered "tabled".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant