Commit Graph

409 Commits

Author SHA1 Message Date
Justin McWilliams
543fa4397a makepkginfo: added notes in --help about --description and --display_name overriding any such values in the package itself.
git-svn-id: http://munki.googlecode.com/svn/trunk@798 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-15 18:30:53 +00:00
Justin McWilliams
427c6c826c makepkginfo:
add --description and --displayname args to set description and display_name pkginfo plist keys.



git-svn-id: http://munki.googlecode.com/svn/trunk@795 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-14 19:40:43 +00:00
Greg Neagle
2330ddfc70 changed getLSInstalledApplications() to ignore paths beginning with '/Volumes/' instead of those beginning with '/Volumes'.
git-svn-id: http://munki.googlecode.com/svn/trunk@788 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-13 17:57:54 +00:00
Greg Neagle
efdd7628bd Changed munkicommon.getAppData() to use LaunchServices instead of Apple System Profiler. LaunchServices is faster and returns more apps than System Profiler, especially on Leopard systems. Thanks to John Randolph.
git-svn-id: http://munki.googlecode.com/svn/trunk@787 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-13 17:32:53 +00:00
Greg Neagle
f0ff5f264c Initial commit to SVN.
git-svn-id: http://munki.googlecode.com/svn/trunk@786 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-12 18:25:52 +00:00
Greg Neagle
a326c38ec9 Better handling of plist exceptions when given valid plists in non-XML format (ascii, binary).
makecatalogs now should be able to run on non-OS X platforms as long as there is a plistlib module available. (Untested)

git-svn-id: http://munki.googlecode.com/svn/trunk@785 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-08 18:00:00 +00:00
Greg Neagle
68aa8cee64 Fix for getAppData() -- when moved to munkicommon, forgot to change munkicommon.display_debug1() to display_debug1()...
git-svn-id: http://munki.googlecode.com/svn/trunk@784 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-08 17:58:07 +00:00
Justin McWilliams
af1df39f68 curl() fixes.
1) fix OSError because nonexistent file is attempted to be read if HTTP status=200 but response yields no download; this happens if local Cache package is *newer* than package on the server (curl receives 200 but doesn't download); instead raise HTTPError.

   2) In the event of a curl() download error, delete any existing cache files
related to the failed download (destination or tmp names). This is basically
just resetting state after any download failures that aren't resume related,
one of those failures being the temp download file doesn't exist.

   This fixes a problem where if the destination exists and the date (header:
If-Modified-Since) is newer than on the server (header: Last-Modified), the curl
binary does not ever download the older file.  In this case Munki never has a
.download temp file, so it can't overwrite the original/newer file. A susequent
Munki execution will download the older server file.



git-svn-id: http://munki.googlecode.com/svn/trunk@783 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-07 21:29:24 +00:00
Greg Neagle
4d9af60e5a updateAcrobatPro: when looking for the apps to update, first look in /Applications/Adobe Acrobat 9 Pro/ before asking system_profiler to search.
git-svn-id: http://munki.googlecode.com/svn/trunk@782 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-07 18:34:44 +00:00
Greg Neagle
1dab884671 Replace separate instances of getAppData() in adobeutils.py and updatecheck.py with a single implementation in munkicommon.
git-svn-id: http://munki.googlecode.com/svn/trunk@781 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-07 18:07:50 +00:00
Greg Neagle
29d4c264b1 Added some additional status and debug messages for package integrity testing and managed_updates.
git-svn-id: http://munki.googlecode.com/svn/trunk@780 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-07 17:16:21 +00:00
Greg Neagle
6aaddbfe7f Attempt to be a little smarter about which payloads we add to the installs list for Adobe CS5 updaters when generating pkginfo. Now we look for a payload whose name matches that of the overall update and add only that payload if it exists, falling back to the previous behavior if it does not.
git-svn-id: http://munki.googlecode.com/svn/trunk@779 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-06 18:19:32 +00:00
Justin McWilliams
4a86af1770 Moving secure plist (r773) to Apple provided location: /private/var/root/Library/Preferences/
git-svn-id: http://munki.googlecode.com/svn/trunk@776 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-05 14:42:05 +00:00
Justin McWilliams
ad3b1275a2 Merging r772 into trunk; add Secure Config for sensitive preferences/configs.
git-svn-id: http://munki.googlecode.com/svn/trunk@773 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-04 21:27:18 +00:00
Greg Neagle
4271cc5cc0 Fixed group and mode options for copy_from_dmg install type. Previously these were (mistakenly) ignores if --user was not specified, and if --user was specified, group and mode were attempted to be written to the plist even if they weren't defined, leading to a broken plist.
git-svn-id: http://munki.googlecode.com/svn/trunk@771 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-04 20:09:51 +00:00
Greg Neagle
e2698bb44f Move verifySoftwarePackageIntegrity check inside of download_installeritem().
getHTTPfileIfChangedAtomically now returns a boolean indicating if the item was downloaded (True) or just returned from the local cache (False). This way, we only do the expensive SHA-256 checksum comparison on the initial download.

getHTTPfileIfChangedAtomically now raises exceptions if it runs into trouble, as does download_installeritem().

git-svn-id: http://munki.googlecode.com/svn/trunk@764 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-27 22:53:52 +00:00
Greg Neagle
795ddeb481 Another commit to get the build number in sync with the SVN revision number. Gah.
git-svn-id: http://munki.googlecode.com/svn/trunk@759 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-21 23:31:29 +00:00
Greg Neagle
f07e01655b Fix for incorrectly initialized KVO arrays in Managed Software Update.app; bumped MSU.app to version 3.0.6; bumped munkitools version to 0.6.0.757.0.
git-svn-id: http://munki.googlecode.com/svn/trunk@758 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-21 23:30:06 +00:00
Greg Neagle
257dfffd2c Bump build number in get_version() to 755.
git-svn-id: http://munki.googlecode.com/svn/trunk@755 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-14 23:57:10 +00:00
Justin McWilliams
41ccc6c3ef Reload preferences from ManagedInstalls.plist after preflight execution in case preflight changed any preferences.
git-svn-id: http://munki.googlecode.com/svn/trunk@754 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-13 23:05:56 +00:00
Justin McWilliams
fc3ff13fb6 Moving 'AdditionalHttpHeaders' ManagedInstalls.plist string to munkicommon const for cleaner reuse in preflight/postflight.
git-svn-id: http://munki.googlecode.com/svn/trunk@753 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-13 22:47:02 +00:00
Greg Neagle
9cd9708514 pylint cleanup: mark unused variable.
git-svn-id: http://munki.googlecode.com/svn/trunk@752 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-13 17:38:34 +00:00
Greg Neagle
f88b74c116 pylint cleanup: mark unused variables, add docstring and fix indentation in removeItemFromSelfServeUninstallList()
git-svn-id: http://munki.googlecode.com/svn/trunk@751 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-13 17:37:49 +00:00
Greg Neagle
b0619cf035 pylint cleanup: mark unused variables
git-svn-id: http://munki.googlecode.com/svn/trunk@750 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-13 17:35:32 +00:00
Greg Neagle
eceedc0e86 pylint cleanups: mark unused variables.
git-svn-id: http://munki.googlecode.com/svn/trunk@749 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-13 17:34:47 +00:00
Greg Neagle
231e309ae4 filesystemItemExists() now returns 0 if the item doesn't exist, 1 if it exists and the checksum matches (or there is no checksum provided), or -1 if the item exists but the checksum does not match. This should make someVersionInstalled() work better with pkginfo that relies on files in the installs key.
processManifestForOptionalInstalls(), processManifestForManagedUpdates(), processManifestForInstalls(), and processManifestForRemovals(), which ll shared a very similar structure, have been refactored and replaced with processManifestForKey().

Various pylint cleanups: marking unused variables, global variable names are now all CAPS, added some docstrings, 

Removed all remaining references to aliases. (support for aliases was removed a long time ago, but some references still remained in the code)

Removed support for "modifies" dependency type, which was deprecated months ago.

git-svn-id: http://munki.googlecode.com/svn/trunk@748 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-13 17:03:39 +00:00
Greg Neagle
4491ae9b03 Initial support for managed_updates in manifests. Items listed in managed_updates will have updates downloaded and applied if any prior version is installed (subject to munki using pkginfo information to determine if an item is installed).
git-svn-id: http://munki.googlecode.com/svn/trunk@747 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-10 19:23:13 +00:00
Justin McWilliams
51cb83d350 managedsoftwareupdate: Use single quotes for all non-doctstring and non-heredoc strings.
git-svn-id: http://munki.googlecode.com/svn/trunk@746 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-10 03:44:55 +00:00
Justin McWilliams
b36b32672b munkicommon.py & updatecheck.py: Use single quotes for all non-doctstring strings.
git-svn-id: http://munki.googlecode.com/svn/trunk@745 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-10 03:29:47 +00:00
Justin McWilliams
184d5368c2 Clean some lint on updatecheck: reorder imports, replace single-quote docstrings with double, etc
git-svn-id: http://munki.googlecode.com/svn/trunk@744 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-10 02:01:15 +00:00
Justin McWilliams
eeb5bdcb9d Make some global consts for ManagedInstalls(.plist) paths. Replace single-quoted docstrings with double-quotes to standardize across codebase.
git-svn-id: http://munki.googlecode.com/svn/trunk@743 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-10 01:05:37 +00:00
Justin McWilliams
5873a12d26 Allow for additional headers sent with curl() HTTP requests to be set in ManagedInstalls.plist
git-svn-id: http://munki.googlecode.com/svn/trunk@740 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-10 00:15:45 +00:00
Justin McWilliams
1ca7fc80e8 Merge: Verify permissions of preflight and postflight scripts are secure before; skip execution of insecure skips but continue Munki run.
git-svn-id: http://munki.googlecode.com/svn/trunk@738 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-09 21:42:27 +00:00
Greg Neagle
4f74f2806f Fixing dumb attempt to improve the quality of output from softwareupdate...
git-svn-id: http://munki.googlecode.com/svn/trunk@736 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-09 17:09:34 +00:00
Justin McWilliams
7c505758cf Allow for additional headers sent with curl() HTTP requests to be set in ManagedInstalls.plist
git-svn-id: http://munki.googlecode.com/svn/branches/additional-http-headers@734 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-08 21:00:43 +00:00
Greg Neagle
25f2a90ede Revert to using subprocess.Popen in unmountdmg() so extraneous output doesn't get sent to STDOUT.
git-svn-id: http://munki.googlecode.com/svn/trunk@733 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-08 15:29:01 +00:00
Greg Neagle
6e308faf40 Misc cleanups
git-svn-id: http://munki.googlecode.com/svn/trunk@732 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-07 23:18:47 +00:00
Justin McWilliams
1465884431 pylint cleanup and docstring updates for managedsoftwareupdate.
git-svn-id: http://munki.googlecode.com/svn/trunk@729 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-07 19:28:27 +00:00
Greg Neagle
121ecb0484 munkicommon: pylint cleanup, better handling of items in the pkgutil database that don't have a version number (I didn't know this was possible!).
appleupdates: pylint cleanup; provide installed_size data for Managed Software Update display

managedsoftwareupdate: move "Checking for available Apple Software Updates..." message to appleupdates.checkForSoftwareUpdates()

makepkginfo: fix installer_item_size determination when we add up the contents of a directory (was bytes, now Kbytes like everything else)

git-svn-id: http://munki.googlecode.com/svn/trunk@725 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-07 18:04:40 +00:00
Greg Neagle
a82374aaf3 Still more SUS description parsing tweaking...
git-svn-id: http://munki.googlecode.com/svn/trunk@723 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-03 21:49:55 +00:00
Greg Neagle
a061031585 More tweaking to the parsing of Apple Software Update .dist files to extract descriptions.
git-svn-id: http://munki.googlecode.com/svn/trunk@722 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-03 21:38:49 +00:00
Greg Neagle
b742e4fbb0 Changed she-bang to #!/usr/bin/python since we require Apple's included python, not just any python the user may have installed.
git-svn-id: http://munki.googlecode.com/svn/trunk@721 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-03 21:37:37 +00:00
Greg Neagle
7b4a610db3 Print warning if pkg given is a bundle-style package.
git-svn-id: http://munki.googlecode.com/svn/trunk@717 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-03 02:17:50 +00:00
Greg Neagle
6b864f85f9 PackageVerificationMode now defaults to "hash". Current munki infrastructures with no package hashes will continue to work as before PackageVerificationMode was added; admins can add hashes to packages and they will be used.
git-svn-id: http://munki.googlecode.com/svn/trunk@716 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-02 23:11:19 +00:00
Greg Neagle
c7ecf1a893 Display available Apple updates from command-line managedsoftwareupdate.
Don't look specifically for English in Apple SU dist files.

git-svn-id: http://munki.googlecode.com/svn/trunk@715 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-02 21:17:11 +00:00
Justin McWilliams
8aa56bd9f9 Merging pkg-hash-verification branch to trunk, adding package SHA-256 hash verification. Deleting branch.
git-svn-id: http://munki.googlecode.com/svn/trunk@714 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-02 17:50:54 +00:00
Greg Neagle
c7badf027b Changes to getAdobeCatalogInfo to filter out more language files/language packs from the installs array.
git-svn-id: http://munki.googlecode.com/svn/trunk@711 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-02 16:54:54 +00:00
Justin McWilliams
957b0df766 Changing hash verification warnings a bit per Greg's request.
git-svn-id: http://munki.googlecode.com/svn/branches/pkg-hash-verification@710 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-02 16:43:02 +00:00
Greg Neagle
929ae48a67 After a successful removal, remove the itemname from the SelfServeManifest's managed_uninstalls list if applicable.
git-svn-id: http://munki.googlecode.com/svn/trunk@707 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-01 22:13:40 +00:00
Greg Neagle
ac43c0616a Comment typo fix.
git-svn-id: http://munki.googlecode.com/svn/trunk@705 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-01 18:14:45 +00:00