Commit Graph

67 Commits

Author SHA1 Message Date
Greg Neagle db3f6bc41d updatecheck.py -- New approach to importing installed packages - big speedup when processing managed_uninstalls.
New support for optional software installs. 

git-svn-id: http://munki.googlecode.com/svn/trunk@591 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-21 03:10:00 +00:00
Greg Neagle fa860b71ef More Adobe CS5 support.
git-svn-id: http://munki.googlecode.com/svn/trunk@552 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-06-21 17:42:30 +00:00
Greg Neagle 3e4e371d68 More changes to better support the really old package format used by the CiscoVPN and Citrix ICA Client packages. Bleh.
git-svn-id: http://munki.googlecode.com/svn/trunk@546 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-06-03 18:28:38 +00:00
Greg Neagle 00c1eb8fb6 Removed legacy HTTP code that was replaced by curl.
Added new ManifestException class so we can throw an exception when we retrieve an invalid manifest (plist not valid).

git-svn-id: http://munki.googlecode.com/svn/trunk@542 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-06-02 22:03:18 +00:00
Greg Neagle 5350042f4d Fixes to deal with manifests that list non-existent catalogs
git-svn-id: http://munki.googlecode.com/svn/trunk@537 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-05-18 15:45:18 +00:00
Greg Neagle c493aa363b Fixed problem getting updated primary manifest introduced by r523.
Fixed problem generating list of needed cache items introduced by r523.

git-svn-id: http://munki.googlecode.com/svn/trunk@532 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-04-27 23:04:33 +00:00
Greg Neagle 84bd6e2b7f Changes to support resuming partial downloads and re-downloading items if the Etag has changed.
git-svn-id: http://munki.googlecode.com/svn/trunk@523 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-04-26 23:49:39 +00:00
Greg Neagle 2e49e39b9d Fixed typo.
git-svn-id: http://munki.googlecode.com/svn/trunk@517 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-03-25 16:53:36 +00:00
Greg Neagle 6a91c91388 Write all the curl options to a file and pass that to curl so we avoid the problem of URLs showing up in a process listing
git-svn-id: http://munki.googlecode.com/svn/trunk@515 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-03-17 21:55:24 +00:00
Greg Neagle 85ec3fefdf Add code to optionally use CN of ClientCertificate as ClientIdentifier.
git-svn-id: http://munki.googlecode.com/svn/trunk@514 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-03-17 06:36:06 +00:00
Greg Neagle e427231e49 munkicommon: updated display_percent() to work better with the percent progress info from curl.
updatecheck: swapped out urllib2/httplib download code with code that calls curl.

appleupdates.py: code cleanup; removed commented out code

git-svn-id: http://munki.googlecode.com/svn/trunk@513 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-03-16 18:17:24 +00:00
Greg Neagle 362ca4dce0 Additional cleanup/reorg of compareBundleVersion(). Thanks to Aaron Hall.
git-svn-id: http://munki.googlecode.com/svn/trunk@507 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-03-12 17:36:53 +00:00
Greg Neagle 781dda8287 Updated compareBundleVersion(item) to also check the Resources folder for an Info.plist if there isn't one in Contents/
checkServer() updated to throw an error when fed a bad URL.

git-svn-id: http://munki.googlecode.com/svn/trunk@506 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-03-12 00:17:48 +00:00
Greg Neagle 70a4a4ef41 Some safer methods for getting managed_installs and removals from the installinfo, especially when there is NO installinfo because of an upstream failure.
git-svn-id: http://munki.googlecode.com/svn/trunk@503 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-03-10 03:22:08 +00:00
Greg Neagle a89b63ceac Accepted patrick.macneal's patch for Issue 4: updatecheck.py uses incorrect URL when downloading manifests via https
git-svn-id: http://munki.googlecode.com/svn/trunk@499 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-03-08 16:23:23 +00:00
Greg Neagle 27a4506e11 More changes for optional suppress_bundle_relocation behavior...
git-svn-id: http://munki.googlecode.com/svn/trunk@479 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-03-01 20:28:36 +00:00
Greg Neagle 7538a9190b Fixed typo in comment; wrapped more of removeBundleRelocationInfo() in try/except blocks to avoid issues with really old package formats (like the Cisco VPN installer package!)
git-svn-id: http://munki.googlecode.com/svn/trunk@465 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-19 01:03:40 +00:00
Greg Neagle eb43b858a3 Various cleanups: replaced use of dateutil.dateparse methods with NSDate methods, etc.
git-svn-id: http://munki.googlecode.com/svn/trunk@459 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-17 18:42:10 +00:00
Greg Neagle 6b3c47e3e5 Changed evidenceIsInstalled() and processRemoval() logic to better handle non Apple package-installed items.
git-svn-id: http://munki.googlecode.com/svn/trunk@455 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-10 18:24:20 +00:00
Greg Neagle d895a4c106 Fixed typo in lookforUpdates function in updatecheck that could cause an unhandled exception.
git-svn-id: http://munki.googlecode.com/svn/trunk@433 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-02 17:59:57 +00:00
Greg Neagle 1ce32d0d51 Minor output tweaks.
git-svn-id: http://munki.googlecode.com/svn/trunk@430 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-01-10 16:47:58 +00:00
Greg Neagle 1fd7e22375 Added "Logout required" messages to the summary at the end of check()
Fixed logic when looking for uninstall info.

Make sure we have both a packageid and a version before we try to add a receipt to the catalog databate receipts table.

git-svn-id: http://munki.googlecode.com/svn/trunk@414 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-12-19 05:19:32 +00:00
Greg Neagle ffdf1c1ad0 Using munkicommon.getVersionString() instead of directly reading CFBundleShortVersionString so we consistently handle edge cases.
Tweaked enoughDiskSpace() to account for items downloaded but not yet installed.

git-svn-id: http://munki.googlecode.com/svn/trunk@407 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-12-16 17:56:04 +00:00
Greg Neagle 5d88e0f2e1 Changed "requires" informational message to display_detail level.
git-svn-id: http://munki.googlecode.com/svn/trunk@389 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-12-03 00:02:52 +00:00
Greg Neagle 1d31cb6267 Added support for a new "autoremove" key in package info. Packages with autoremove set to True will be automatically removed if they are not in the managed_installs list of the primary manifest or any included manifest.
git-svn-id: http://munki.googlecode.com/svn/trunk@381 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-24 21:14:53 +00:00
Greg Neagle c93fb32e7a Changed timing of recordUpdateCheckResult() so Managed Software Update.app would display an appropriate message if there were no munki updates and Apple's Software Update was also checked.
git-svn-id: http://munki.googlecode.com/svn/trunk@378 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-20 18:35:31 +00:00
Greg Neagle 246d0f9be5 updatecheck.py: added support for "RecommendRestart" RestartAction
git-svn-id: http://munki.googlecode.com/svn/trunk@371 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-19 03:21:50 +00:00
Greg Neagle 9322485665 Added support for a 'package_path' key in pkg info to indicate a specific package on a disk image containing multiple packages, or where the package to be installed is not at the root of the disk image.
For Adobe packages, 'package_path' now replaces 'adobe_package_name' with the same functionality.

git-svn-id: http://munki.googlecode.com/svn/trunk@368 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 17:46:56 +00:00
Greg Neagle d50290939f Exception handling cleanup
git-svn-id: http://munki.googlecode.com/svn/trunk@367 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 06:10:19 +00:00
Greg Neagle d34876af17 Line length cleanup ala PEP-8
git-svn-id: http://munki.googlecode.com/svn/trunk@349 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 01:39:16 +00:00
Greg Neagle 3d4f6e345a More changes to support Adobe CS3 installs/uninstalls.
pkginfo items with missing name or version attributes no longer cause an exception in updatecheck.py

Safer list comphrensions for various lists

git-svn-id: http://munki.googlecode.com/svn/trunk@333 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-16 23:57:22 +00:00
Greg Neagle e165e62b49 git-svn-id: http://munki.googlecode.com/svn/trunk@327 a4e17f2e-e282-11dd-95e1-755cbddbdd66 2009-11-16 17:23:38 +00:00
Greg Neagle b4beeafcfe Lots of logging and reporting changes.
Added munkicommon.validPlist() to check for plist validity when getting a manifest or catalog file.
Added call to updatecheck.checkServer() to test for server availability before doing a check for updates.

git-svn-id: http://munki.googlecode.com/svn/trunk@319 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-11 23:38:12 +00:00
Greg Neagle 3fa262ea69 - Lots of logging changes: new munkicommon.display_warning() function to more cleanly separate warnings from errors. New warnings.log, errors.log, and Installs.log. logs are now rotated, so they won't grow forever.
- new munkicommon.pref keys: CatalogURL and PackageURL; these replace SoftwareRepoURL, and are base URLs for catalogs and installer items respectively. This allows you to divide up hosting of the munki pieces on multiple servers -- manifests and catalogs could be on one server, and the actual install packages on another.

git-svn-id: http://munki.googlecode.com/svn/trunk@316 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-05 17:38:39 +00:00
Greg Neagle b3e8e1e69e processRemoval() now adds any updates to be removed to the list before it adds the main item.
git-svn-id: http://munki.googlecode.com/svn/trunk@306 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-02 23:40:21 +00:00
Greg Neagle b27031d3f9 - Changes to processInstall() so that if a specific version is given, it will not look for any updates.
- When removing packages by receipts, and filtering by reference count results in an empty receipt list, print a warning and return False to indicate we cannot remove this item.
- the database of installed packages (built from receipt info) is now not generated until the first time we have to determine if we can remove an item using 'removepackages'. This should speed things up if there are no defined removals for a given client.


git-svn-id: http://munki.googlecode.com/svn/trunk@302 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-02 18:54:47 +00:00
Greg Neagle 8d82225f84 Added support for a new 'update_for' key in pkginfo, so a package can be marked as an update for one or more seemingly unrelated packages.
git-svn-id: http://munki.googlecode.com/svn/trunk@299 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-10-30 15:28:56 +00:00
Greg Neagle 2141e264ee Fixed issue with removals in included manifests that don't have their own catalog lists, but instead rely on the parent's catalog list.
git-svn-id: http://munki.googlecode.com/svn/trunk@294 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-10-23 17:46:18 +00:00
Greg Neagle 660a8a8e98 Added support for "appdmg" package type. This is a dmg that contains a single application at the root of the mounted dmg, which is then copied to /Applications (for install) or simply rm -rf /Applications/appname (for removal).
makepkginfo generates pkginfo files for this package type, and updatecheck.py and installer.py have the appropriate additions.

git-svn-id: http://munki.googlecode.com/svn/trunk@279 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-10-22 21:42:57 +00:00
Greg Neagle dd711731f9 Support for AdobeUberInstaller packages like those from CS4 Deployment Toolkit and Adobe Update packages.
Includes new makeadobepkginfo tool, which eventually will be merged with makepkginfo...

git-svn-id: http://munki.googlecode.com/svn/trunk@265 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-10-20 23:36:04 +00:00
Greg Neagle a2c387d657 Various regression fixes.
git-svn-id: http://munki.googlecode.com/svn/trunk@259 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-10-14 22:12:41 +00:00
Greg Neagle 4dc3cc93cb Minor output tweak in log info for dependencies.
git-svn-id: http://munki.googlecode.com/svn/trunk@256 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-10-13 23:33:20 +00:00
Greg Neagle 68c78c0ebe Fixed a typo in the new support for 'maximum_os_version'
git-svn-id: http://munki.googlecode.com/svn/trunk@247 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-10-02 23:13:51 +00:00
Greg Neagle 20f97877fd updatecheck.py: Added support for "maximum_os_version" key in pkginfo
git-svn-id: http://munki.googlecode.com/svn/trunk@246 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-10-02 23:07:29 +00:00
Greg Neagle c200650623 Tweaked munkistatus output.
git-svn-id: http://munki.googlecode.com/svn/trunk@240 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-09-29 17:51:27 +00:00
Greg Neagle 635895a3b3 Changed processManifestForInstalls() to take an optional list of catalogs to search if the manifest has no list of catalogs.
git-svn-id: http://munki.googlecode.com/svn/trunk@220 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-09-23 19:02:04 +00:00
Greg Neagle 5ee78c30ef Backed out a change in how updatecheck compared a package to be installed to info retrieved from pkgutil now that I better understand how pkgutil in Snow Leopard stores version info from non-flat packages.
git-svn-id: http://munki.googlecode.com/svn/trunk@217 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-09-17 00:05:30 +00:00
Greg Neagle 8c92d2e679 Support for CFBundleVersion if CFBundleShortVersionString is missing.
git-svn-id: http://munki.googlecode.com/svn/trunk@207 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-09-14 16:50:06 +00:00
Greg Neagle 99efc6ed01 Fixed os version comparison; "10.6" was comparing as less than "10.6.0".
Fixed a problem in processRemoval() when using a method other than removepackages.


git-svn-id: http://munki.googlecode.com/svn/trunk@201 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-31 23:30:16 +00:00
Greg Neagle 87c5cf446d Missed a few name changes when moving from pkgdata['pkg_refcount'] to pkgdata['pkg_references'].
git-svn-id: http://munki.googlecode.com/svn/trunk@199 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-31 20:30:23 +00:00