Commit Graph

752 Commits

Author SHA1 Message Date
Greg Neagle
91be98ae2d Fix so reading com.apple.SoftwareUpdate prefs respects MCX 2011-08-23 11:25:18 -07:00
Justin McWilliams
9d470035c2 Bug fix for appleupdates.AvailableUpdatesAreDownloaded() where productKey is not in downloaded dict. 2011-08-17 08:32:29 -04:00
Greg Neagle
98ac900592 Update discardTimeZoneFromDate() function in updatecheck.py to match that in MSU.app's munki.py. Fixes issue with Lion caused by differing string representations of NSDates between Lion and Snow Leopard.
git-svn-id: http://munki.googlecode.com/svn/trunk@1294 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-16 02:11:15 +00:00
Greg Neagle
51b04c7548 Cleaner version of discardTimeZoneFromDate(the_date)
git-svn-id: http://munki.googlecode.com/svn/trunk@1293 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-15 21:42:47 +00:00
Greg Neagle
92eed69394 Fix for Lion: calculating the local time for force_install_after_date
git-svn-id: http://munki.googlecode.com/svn/trunk@1292 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-15 15:51:16 +00:00
Greg Neagle
d8f947e0d1 Fix so restart/logout required icons show next to appropriate items in MSU.app; this was broken by the code that tried to display the exclamation icon for items with force_install_after_date
git-svn-id: http://munki.googlecode.com/svn/trunk@1291 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-13 02:18:36 +00:00
John Randolph
0dfd915f55 change this module to use munkicommon.getOsVersion() instead of os.uname()
splitting.

(also, our whitespace filter whacked many other lines)



git-svn-id: http://munki.googlecode.com/svn/trunk@1290 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-11 21:29:21 +00:00
Justin McWilliams
a9ef0a7034 tuple() wrap getOsVersion() map return, ensuring the return is a tuple not a list.
git-svn-id: http://munki.googlecode.com/svn/trunk@1289 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-11 21:06:42 +00:00
Justin McWilliams
8cd8e31a97 MACHINE['os_vers'] needs to be the full version, not just major/minor.
git-svn-id: http://munki.googlecode.com/svn/trunk@1288 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-11 19:35:20 +00:00
Justin McWilliams
e3b3034c0e Use the new munkicommon.getOsVersion() across the board, especially one place that was previously shelling out to /usr/bin/sw_vers.
git-svn-id: http://munki.googlecode.com/svn/trunk@1287 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-11 19:31:51 +00:00
Justin McWilliams
4543948aad Cleanup appleupdates style, move default catalog urls to constant dict, make new getOsVersion() method instead of parsing uname, etc.
git-svn-id: http://munki.googlecode.com/svn/trunk@1286 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-11 18:41:48 +00:00
Greg Neagle
e6106f0345 Change run_softwareupdate to use ptyexec tool if available.
git-svn-id: http://munki.googlecode.com/svn/trunk@1285 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-11 16:58:10 +00:00
John Randolph
5590168d49 add ptyexec helper script to run subprocesses in pseudo ttys and unbuffer
their I/O.



git-svn-id: http://munki.googlecode.com/svn/trunk@1284 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-11 16:22:31 +00:00
Greg Neagle
843212a881 Updated comments for TODOs.
git-svn-id: http://munki.googlecode.com/svn/trunk@1283 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-10 22:03:45 +00:00
Justin McWilliams
cb85f5beb1 Move scattered Apple Software Update catalog name and path strings to constants, with comments describing each of them (some with TODOs to add comments).
git-svn-id: http://munki.googlecode.com/svn/trunk@1282 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-10 21:41:34 +00:00
Greg Neagle
be33a193e1 Change output of etag and range request warnings when downloading via HTTP so that these are not formal warnings, but rather informational-level messages that are logged and printed to stdout when run via the command line.
git-svn-id: http://munki.googlecode.com/svn/trunk@1281 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-10 16:37:54 +00:00
Greg Neagle
45d4b8ce4b Add manifestutil to the list of admin tools to include in admin tools package.
git-svn-id: http://munki.googlecode.com/svn/trunk@1280 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-09 16:27:20 +00:00
Justin McWilliams
567af9fc2e r1277 added a 'time' key to the ManagedInstallReport:InstallResults dicts, which was an epoc timestamp. 'time' is now a [date] value, filled using NSDate.new().
git-svn-id: http://munki.googlecode.com/svn/trunk@1279 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-08 17:41:09 +00:00
Greg Neagle
ce5a36dcd1 Further cleanup of the endSheet methods to explicitly check for NSAlertDefaultReturn, NSAlertAlternateReturn, NSAlertOtherReturn returncodes; avoiding potential issues should an alert sheet be closed with NSApp.endSheet_()
git-svn-id: http://munki.googlecode.com/svn/trunk@1278 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-08 16:33:53 +00:00
Justin McWilliams
8294821bc7 ManagedInstallReport:InstallResults dicts now has a 'time' key which is the epoc time when the install took place. This is helpful when reporting may be delayed to future executions of Munki.
git-svn-id: http://munki.googlecode.com/svn/trunk@1277 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-08 16:18:12 +00:00
Greg Neagle
bdd9ca8b0e Fix for issue where a (newer) forced logout warning replaces a currently displayed forced logout warning in MSU.app
git-svn-id: http://munki.googlecode.com/svn/trunk@1275 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-05 23:18:28 +00:00
Justin McWilliams
c6008abbc0 Apple Software Update fixes for environments where CatalogURL is already a file:// URL, not a http:// URL.
- s/getHTTPfileIfChangedAtomically/getResourceIfChangedAtomically/
- getFileIfChangedAtomically should urllib2.unquote paths, in case they came from the file:// URL.


git-svn-id: http://munki.googlecode.com/svn/trunk@1273 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-05 16:36:47 +00:00
Justin McWilliams
2126bb5763 MSU GUI should log which version is being launched.
This helps when debugging reported problems with the MSU GUI in Munki executions where the GUI was updated; was it updated before or after launching? ;)


git-svn-id: http://munki.googlecode.com/svn/trunk@1272 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-05 15:50:08 +00:00
Justin McWilliams
d03b2ba11f Merging forced_install_after_date branch to trunk.
This adds Force Install Notifications support to the MSU GUI, and logouthelper support to managedsoftwareupdate/launchd. Documentation on using the pkginfo force_install_after_date key to come....

This merge also includes localization fixes and on-the-fly updating of the MSU GUI when managedsoftwareupdate runs in the background while the GUI is open, changing InstallInfo.

With this merge, the Munki version is increased to 0.8.0 and MSU GUI version to 3.2.


git-svn-id: http://munki.googlecode.com/svn/trunk@1270 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-04 19:23:19 +00:00
Justin McWilliams
0e858b098a Munki should output and log preflight output, both stdout and stderr, and should output and log postflight return codes if != 0 (even though it doesn't perform any different actions).
git-svn-id: http://munki.googlecode.com/svn/trunk@1269 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-04 18:35:36 +00:00
Greg Neagle
e0d43c410e Fix for updatecheck logic when multiple items to be installed require the same non-existent package.
git-svn-id: http://munki.googlecode.com/svn/trunk@1267 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-03 20:24:42 +00:00
Greg Neagle
1b91dfd626 - Refinement of fix for ValueError: NSInvalidArgumentException - -[__NSTaggedDate UTF8String] error on Lion when managedsoftwareupdate attempts to notify the user of available updates.
- pylint cleanups.

git-svn-id: http://munki.googlecode.com/svn/trunk@1265 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-02 21:11:50 +00:00
Greg Neagle
beb2ace07c Fix for ValueError: NSInvalidArgumentException - -[__NSTaggedDate UTF8String] error on Lion when managedsoftwareupdate attempts to notify the user of available updates.
git-svn-id: http://munki.googlecode.com/svn/trunk@1261 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-02 17:58:42 +00:00
Greg Neagle
93b350e7cb Merge changes from apple_update branch to trunk.
git-svn-id: http://munki.googlecode.com/svn/trunk@1259 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-02 15:09:11 +00:00
Greg Neagle
ea0a373e72 Changed version.plist to 0.7.2 for Lion update and iTunes 10.4 fix.
git-svn-id: http://munki.googlecode.com/svn/trunk@1243 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-07-20 22:16:21 +00:00
Greg Neagle
259efe634f Fix for <None> nodeValues in distribution files -- affects Apple Software Updates. Problem first encountered in iTunes 10.4 update.
git-svn-id: http://munki.googlecode.com/svn/trunk@1242 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-07-20 22:03:25 +00:00
Greg Neagle
916b67b153 Add code to prevent auto-relaunch of MSU.app after logout/login or restart on Lion.
git-svn-id: http://munki.googlecode.com/svn/trunk@1241 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-07-20 15:17:04 +00:00
Greg Neagle
f1a6760616 Fix for empty managed_installs or removals when printing available updates.
git-svn-id: http://munki.googlecode.com/svn/trunk@1240 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-07-20 04:18:02 +00:00
Greg Neagle
1962307e3a When looking for installed applications, if the Info.plst contains a CFBundleIdentifier, never fall back to comparing by CFBundleName.
Remove .encode('UTF-8') for items being sent to munkicommon.display_debug2, since that function does an .encode('UTF-8') as well.

git-svn-id: http://munki.googlecode.com/svn/trunk@1233 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-07-13 03:38:48 +00:00
John Randolph
c0ef9f25d0 add new key minimum_update_version to installs items.
this key describes the minimum version # which will be targetted 
for update when Munki is discovering installed versions.

real world example:
  set minimum_update_version=4.0 on Firefox4, Firefox3.x will not be touched.



git-svn-id: http://munki.googlecode.com/svn/trunk@1225 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-06-22 19:52:09 +00:00
John Randolph
6a324e25e7 supply missing module import
git-svn-id: http://munki.googlecode.com/svn/trunk@1218 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-06-20 20:21:12 +00:00
Greg Neagle
1d8a66b0a5 Attempt at fix for Software Update.app launching at loginwindow under Leopard when munki checks for Apple Software Updates at loginwindow. Symptom was Software Update menu bar appearing at loginwindow.
git-svn-id: http://munki.googlecode.com/svn/trunk@1214 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-06-10 17:36:00 +00:00
John Randolph
20867d6c9e merge in changes from /branches/force_install_after_date/
git-svn-id: http://munki.googlecode.com/svn/trunk@1207 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-06-03 18:55:30 +00:00
Greg Neagle
b33739f931 Updated copyright info printed when managedsoftwareupdate runs.
git-svn-id: http://munki.googlecode.com/svn/trunk@1204 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-27 16:37:43 +00:00
Greg Neagle
b875db5dab Updated uninstall_munki.sh script to reference new receipt names.
git-svn-id: http://munki.googlecode.com/svn/trunk@1203 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-26 23:02:30 +00:00
Greg Neagle
c95c6f9fb8 Update license and copyright info on manifstutil.
git-svn-id: http://munki.googlecode.com/svn/trunk@1202 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-26 22:28:16 +00:00
Greg Neagle
f2c74b3bcf Fix for copyFromDMG: when copying an item not at the root of the DMG, the path of the copy destination was not being determined properly, leading to "No such file or directory" errors when setting owner, group and mode of the destination item.
git-svn-id: http://munki.googlecode.com/svn/trunk@1200 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-25 21:11:32 +00:00
Greg Neagle
51f79798e1 makepkginfo now allows "naked" pre- and postuninstall_script options (that is, no package needed):
makepkginfo --preuninstall_script=/path/to/script
makepkginfo --postuninstall_script=/path/to/script

git-svn-id: http://munki.googlecode.com/svn/trunk@1199 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-25 17:09:18 +00:00
Greg Neagle
c776e3d121 installer.py: change to runScript() to ensure we capture all output from scripts; previously if there was still output in the buffer when the script completed running it was possible we would not read it all.
git-svn-id: http://munki.googlecode.com/svn/trunk@1198 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-25 16:42:54 +00:00
Greg Neagle
daf17f0997 No longer split uninstall_method on spaces; allows for a path to an uninstall script with spaces in the pathname.
git-svn-id: http://munki.googlecode.com/svn/trunk@1195 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-24 22:51:40 +00:00
Greg Neagle
e6b8343407 Fix so pre- and postuninstall_scripts get copied to InstallInfo.plist.
git-svn-id: http://munki.googlecode.com/svn/trunk@1194 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-24 19:07:47 +00:00
Greg Neagle
e7945ec94c manifestutil now ignores manifests whose name begins with a "."
git-svn-id: http://munki.googlecode.com/svn/trunk@1193 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-24 17:44:32 +00:00
Greg Neagle
c31343d0ff Initial commit of manifestutil
git-svn-id: http://munki.googlecode.com/svn/trunk@1192 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-24 17:25:53 +00:00
Greg Neagle
b176a55c0d Add support for pre- and postuninstall_script options to makepkginfo.
git-svn-id: http://munki.googlecode.com/svn/trunk@1191 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-24 02:40:26 +00:00
Greg Neagle
da9defca18 Add support for preuninstall_script and postuninstall_script.
git-svn-id: http://munki.googlecode.com/svn/trunk@1190 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-23 21:22:53 +00:00