Commit Graph

48 Commits

Author SHA1 Message Date
Greg Neagle 4ca006dc99 Fixed call to copyAppFromDMG() to revert to original behavior.
git-svn-id: http://munki.googlecode.com/svn/trunk@605 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-27 16:06:34 +00:00
Greg Neagle 5bfe5efbe6 Fix for setting mode on items copied from DMG; more detail in log on setting owner/group/mode
git-svn-id: http://munki.googlecode.com/svn/trunk@604 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-26 23:40:07 +00:00
Greg Neagle 83ed22f3af installer.py: new copyFromDMG method that copies an arbitrary list of items from a mounted DMG to specified locations.
New removeCopiedItems method that removes the same list of items from the startup disk.


updatecheck.py: support for new copy_from_dmg and remove_copied_items methods.

makepkginfo: support for making pkginfo with new copy_from_dmg method,

git-svn-id: http://munki.googlecode.com/svn/trunk@603 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-26 23:26:25 +00:00
Greg Neagle 99a512341b installer.py: updated copyright info, removed unused import, new message when done copying from disk image.
git-svn-id: http://munki.googlecode.com/svn/trunk@587 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-21 03:04:03 +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 3f35305a42 More CS5 changes. Now handle the AdobePatchInstaller included with CS5 updates.
git-svn-id: http://munki.googlecode.com/svn/trunk@551 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-06-18 22:24:47 +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 badf0d0e33 Made suppressing bundle relocation dependent on a suppress_bundle_relocation key in the pkginfo.
git-svn-id: http://munki.googlecode.com/svn/trunk@478 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-27 00:35:48 +00:00
Greg Neagle 217f20ad56 Added use_shadow=True to invocation of munkicommon.mountdmg() in installWithInfo() so that removeBundleRelocationInfo() might actually work.
git-svn-id: http://munki.googlecode.com/svn/trunk@477 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-24 19:25:37 +00:00
Greg Neagle 647a6da41e Added debug logging to removeBundleRelocationInfo()
git-svn-id: http://munki.googlecode.com/svn/trunk@475 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-23 21:15:07 +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 e0d31bfbbf Fixed stupid typo in code that removes the shadow file when it removes disk images after install.
git-svn-id: http://munki.googlecode.com/svn/trunk@439 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-04 21:15:26 +00:00
Greg Neagle 01180408a9 munkicommon.py/mountdmg() now has an option to mount dmgs with shadow files to allow read-write access to read-ony disk images.
installer.py now mounts disk images with -shadow option to enable the next change - 
For bundle-style packages, installer.py/install() now attempts to remove any bundle relocation info to disable installer's bundle relocator. This should force items to install to their default locations.

git-svn-id: http://munki.googlecode.com/svn/trunk@434 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-02-03 18:14:16 +00:00
Greg Neagle bd83d5381c Change to copyAppFromDMG() so that apps copied to /Applications are owned by root.
git-svn-id: http://munki.googlecode.com/svn/trunk@432 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-01-13 16:27:58 +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 6125f77293 Changes to support installation of Adobe Acrobat Pro 9 updates.
git-svn-id: http://munki.googlecode.com/svn/trunk@415 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-12-24 20:27:33 +00:00
Greg Neagle 436f786cd8 copyAppFromDMG() now uses munkicommon.isApplication() instead of just looking for items ending with ".app"
git-svn-id: http://munki.googlecode.com/svn/trunk@408 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-12-16 17:57:44 +00:00
Greg Neagle 7797f4f30a Fixed issue with multiple pkg installs from a single disk image
git-svn-id: http://munki.googlecode.com/svn/trunk@388 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-12-03 00:02:01 +00:00
Greg Neagle d6702aa518 In copyAppFromDMG, added a check for com.apple.quarantine extended attribute before trying to remove them.
Other minor formatting changes.

git-svn-id: http://munki.googlecode.com/svn/trunk@384 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-25 19:54:39 +00:00
Greg Neagle 844054c57b Fixed restart problem introduced with the try/except block around installer.run() in managedsoftwareupdate
git-svn-id: http://munki.googlecode.com/svn/trunk@382 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-24 23:46:05 +00:00
Greg Neagle 9bc637d706 Fixed use of package_path key in pkginfo.
git-svn-id: http://munki.googlecode.com/svn/trunk@370 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-19 03:20:07 +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 ebf9088150 Cleanup exception handling.
git-svn-id: http://munki.googlecode.com/svn/trunk@361 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 05:32:36 +00:00
Greg Neagle 3b7d335b04 More PEP-8 cleanup
git-svn-id: http://munki.googlecode.com/svn/trunk@352 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 02:03:05 +00:00
Greg Neagle 4c29533bac Reformatted line lengths to comply with PEP-8
git-svn-id: http://munki.googlecode.com/svn/trunk@345 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-17 23:31:04 +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 84051d3e5e install() now resolves symlinks before passing them to /usr/bin/installer so that mpkgs that refer to relative paths to component packages can actually find the subpackages.
copyAppFromDMG() now removes a pre-exising app in /Applications before copying the app from the DMG to more closely mimic the Finder behavior.
Fixed call the xattr in copyAppFromDMG()

installWithInfo() now only uses the first partition of a mounted diskimage, instead of all partitions. Added support for a new 'pkg_path' key to pkg info so an admin can specify a specific package to be installed from a disk image.

Begin support for uninstalling Adobe CS3 deployment packages (currently untested)


git-svn-id: http://munki.googlecode.com/svn/trunk@326 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-16 17:22:51 +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 13cdb31c28 Changes to output for better progress indication when there are multiple items to be installed or removed.
git-svn-id: http://munki.googlecode.com/svn/trunk@297 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-10-30 15:27:04 +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 28da312e9a Removed code that does the actual restart. This has been moved to managedsoftwareupdate.
git-svn-id: http://munki.googlecode.com/svn/trunk@255 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-10-13 23:32:11 +00:00
Greg Neagle fdaa8f0f2a Added appleupdates.py, which contains functions for working with Apple's Software Update.
Changes to managedsoftwareupdate, munkicommon/py and installer.py to deal with Apple Software Update.

git-svn-id: http://munki.googlecode.com/svn/trunk@249 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-10-13 22:01:28 +00:00
Greg Neagle 0a22ae7370 Yet another try to get rid of obsolete directories and files... Grr.
Also changes to these:
managedsoftwareupdate
   - Changed osascript call to munkicommon
munkilib/installer.py
   - Changed osascript call to munkicommon
   - Changed GUI restart notifcation to use the new munkistatus.restartAlert() call.
munkilib/munkicommon.py
   - Moved osascript function from munkistatus to munkicommon.
munkilib/munkistatus.py
   - Complete rewrite to go with the new MunkiStatus.app 
?\127


git-svn-id: http://munki.googlecode.com/svn/trunk@228 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-09-25 22:25:45 +00:00
Greg Neagle b71e17991b Removed commented-out lines as part of a general cleanup.
git-svn-id: http://munki.googlecode.com/svn/trunk@216 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-09-17 00:03:11 +00:00
Greg Neagle 97afbb6e5e More unicode fixes. Sigh.
git-svn-id: http://munki.googlecode.com/svn/trunk@211 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-09-14 23:17:57 +00:00
Greg Neagle 89239f7f14 Changed from #!/usr/bin/env python to #!/usr/bin/python because we need to use Apple's installed Python, and not whatever python the user happens to be using...
Some unicode fixes.

git-svn-id: http://munki.googlecode.com/svn/trunk@203 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-09-14 16:45:44 +00:00
Greg Neagle 87597f4d07 Fixed installer's percentage-done output for post-Leopard.
git-svn-id: http://munki.googlecode.com/svn/trunk@184 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-25 17:37:19 +00:00
Greg Neagle 5e875ece1c Added encode('UTF-8') to a log message to work around an issue when the package name as returned by /usr/sbin/installer -pkginfo is a Unicode string (or some accurately, contains unicode characters). This points up a possible issue all throughout the code as far as ASCII vs Unicode string handling.
git-svn-id: http://munki.googlecode.com/svn/trunk@179 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-24 18:53:03 +00:00
Greg Neagle a049d87846 Updated munkicommon.py, removepackages.py, installer.py, and updatecheck.py to use munkilib/FoundationPlist.py instead of plistlib.
git-svn-id: http://munki.googlecode.com/svn/trunk@173 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-20 17:55:42 +00:00
Greg Neagle 220070abd2 One more reversion to plistlib.readPlist because the NS objects returned by Foundation were making plistlib.writePlist unhappy.
git-svn-id: http://munki.googlecode.com/svn/trunk@154 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-31 20:18:45 +00:00
Greg Neagle 423c31340d Lots of replacing of plistlib.readPlist() with munikcommon.readPlist() so we can handle binary plists.
More fixes for JAMF Composer-generated packages.

git-svn-id: http://munki.googlecode.com/svn/trunk@150 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-31 16:34:02 +00:00
Greg Neagle e1f8d4f700 Added support for a new 'installer_choices_xml' key, which supported embedding Installer ChoiceChangesXML files in a pkginfo plist. This allows you to specify custom installs.
Since multiple install items could now refer to a single installer pkg/mpkg,  we don't automatically delete the installer item after an install completes.Instead we check to see if we're going to need it again...

git-svn-id: http://munki.googlecode.com/svn/trunk@140 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-30 06:32:19 +00:00
Greg Neagle 552c0ebcd8 Added status message for disk mounting (since mounting the iLife dmg took so long...)
git-svn-id: http://munki.googlecode.com/svn/trunk@127 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-21 15:44:10 +00:00
Greg Neagle d465661386 Much refactoring - common output/status functions are now in munkicommon.py and used by installer.py, updatecheck.py, and removepackages.py.
Since the HTTP stuff was used only by updatecheck.py, moved it from munkicommon.py into updatecheck.py.
The above changes made this easier: Added munkistatusoutput support to updatecheck.py

git-svn-id: http://munki.googlecode.com/svn/trunk@122 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-20 18:30:17 +00:00
Greg Neagle 07cfc5235c Moved all support libraries into munkilib package.
Combined installcheck and managedinstaller into managedsoftwareupdate to avoid race conditions between the two tools.
Removed support for Apple Software Updates (because it didn't work correctly!)


git-svn-id: http://munki.googlecode.com/svn/trunk@112 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-14 18:04:34 +00:00