Rob Middleton
7b771b08f2
NO -> objc.NO for 10.5
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1157 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-03 06:57:56 +00:00
Greg Neagle
eeec63aaa5
Another attempted fix for WebView/WebCore crashing issue. Thx Rob Middleton.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1156 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-02 15:27:54 +00:00
Greg Neagle
57fa34e0fe
Added blocking_applications to the list of pkginfo keys that get copied from the previous version to a munkiimport of a newer version.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1155 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-29 21:41:36 +00:00
Justin McWilliams
820f88f364
Don't crash when calling checkForSoftwareUpdates() on 10.5.x if /System/Library/CoreServices/Software Update.app does not exist. (problem seen in field; likely user deleting it, but unknown at the time).
...
Also protect against softwareupdate not existing, or Software Update.app disappearing between stat/chmod and Popen() calls.
git-svn-id: http://munki.googlecode.com/svn/trunk@1153 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-27 15:27:36 +00:00
Justin McWilliams
96d117741d
Supervisor should exit with the return code of the process it started, not 0 if there are no errors.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1142 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-25 20:23:43 +00:00
Justin McWilliams
ab255c82a8
ManagedInstallReport::InstallResults dictionaries now include duration_seconds for each install. This can be sent to reporting servers to keep track of install durations, potentially even averaging durations across a sample size allowing admins to message this in pkginfo descriptions; for example, on Simian this is automatic.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1138 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-21 18:35:23 +00:00
Greg Neagle
18af47648e
Fix for munkitool_launchd version in metapackage dist file.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1131 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-19 17:17:15 +00:00
Greg Neagle
e046baeff4
Still trying to fix pkgtemplate
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1130 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-19 16:00:13 +00:00
Greg Neagle
a3f1c10747
Still trying to fix pkgtemplate
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1129 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-19 15:58:51 +00:00
Greg Neagle
96d1c5be19
Still trying to fix pkgtemplate commits
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1128 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-19 15:50:25 +00:00
Greg Neagle
c3419a0fa2
Attempt to fix earlier botched commit.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1127 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-19 15:39:54 +00:00
Greg Neagle
d253ca90a7
Missed commit of pkgtemplate/Resources_admin
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1126 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-19 15:15:51 +00:00
Greg Neagle
50e05de8d4
New make_munki_mpkg.sh script and pkgtemplate resources.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1122 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-18 19:20:18 +00:00
Justin McWilliams
81e560d696
oops, fixing indentation ;/
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1120 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-15 21:51:56 +00:00
Justin McWilliams
1687e8be9b
Display "Performing postflight tasks...." before running an existing postflight script, to explain the delay between "No changes to managed software are available." and the script exiting.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1119 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-15 21:50:18 +00:00
Greg Neagle
10d2532d8b
Bumped version number for MSU.app to 3.0.15.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1118 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-14 15:14:54 +00:00
Greg Neagle
60f38d0fde
Attempt at fix for WebKitView crashing issue.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1117 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-14 15:11:18 +00:00
Greg Neagle
7fdaa2ad53
Updated warning message when processing removals and item info cannot be found to match the warnings given when processing installs and updates.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1116 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-13 22:39:51 +00:00
Justin McWilliams
4046754270
Merge supervisor branch (r1110, r1111, r1114) into trunk.
...
Summary:
- wrap entire managedsoftwareupdate execution and kill if open for 12 hours.
- move "delay/sleep" logic into supervisor, removing need for updatecheckhelper (but keep updatecheckhelper around so clients continue to work without reloading launchd)
git-svn-id: http://munki.googlecode.com/svn/trunk@1115 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-13 21:57:02 +00:00
Justin McWilliams
86fff493d3
pythonScriptRunning() should only find python processes where the script running (first arg) is <scriptname>, not processes where <scriptname> exists anywhere in the argument list.
...
Example, where <scriptname> == 'managedsoftwareupdate':
Still find: /usr/bin/python managedsoftwareupdate
Don't find: /usr/bin/python foo.py --argbar managedsoftwareupdate
git-svn-id: http://munki.googlecode.com/svn/trunk@1109 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-11 22:58:24 +00:00
Justin McWilliams
4c31fdaf81
Merge r1107 into trunk, adding timeout to installer executions to self-heal from hung installs (as seen with Apple SUS updates for iTunes and Java on 10.5.x).
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1108 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-11 22:44:24 +00:00
Greg Neagle
80c7bd1243
updatecheck.fileSystemItemExists(item) now returns true when given a path to a symlink if the symlink exists but the item it points to does not. Previously it returned false if the target was missing.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1105 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-11 18:18:13 +00:00
Justin McWilliams
f17935640c
Enhancement of r1103, cleaning up how getIdleSeconds() works.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1104 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-11 15:32:13 +00:00
Justin McWilliams
53d16dd778
Fix but in getIdleSeconds() where ioreg output is split, but there are inconsistent number of whitespaces.
...
I ran into a machine where "parts" was: ['|', '|', '"HIDIdleTime"', '=', '1458195167613966'], and since parts[3] is "=" getIdleSeconds() was crashing trying to convert it to int().
So return int(int(parts[3])/1000000000) should really be parts[4] on this machine, but this may be inconsistent on different machines?
# /usr/sbin/ioreg -c IOHIDSystem -d 4 | grep Idle
| | "HIDIdleTime" = 1458351496253133
So let's just use regex to parse the integer out of the line more safely.
git-svn-id: http://munki.googlecode.com/svn/trunk@1103 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-09 15:10:46 +00:00
Justin McWilliams
c0a9403e63
Syntax fix for r1098.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1102 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-08 17:59:31 +00:00
Greg Neagle
d4261af782
munkiimport will copy the old forced_install and forced_uninstall keys as well as the new unattended_* keys to improve backwards compatibility.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1101 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-08 17:12:38 +00:00
Greg Neagle
c0c0e2604c
updatecheck now recognizes "forced_install" as a synonym for "unattended_install" and "forced_uninstall" as a synonym for "unattended_uninstall".
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1100 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-08 17:03:54 +00:00
Justin McWilliams
e84453eb5f
s/forced_(un)install/unattended_(un)install/g
...
s/only_forced/only_unattended/g
Change forced_* pkginfo key names to more accurately describe what's happening, since they're not "forced" in the true sense of the word.
Admins should include both forced_* and unattended_* keys in their pkginfos while migrating to client releases after this change, to ensure both old and new clients have desired pkg push agressiveness :(
git-svn-id: http://munki.googlecode.com/svn/trunk@1098 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-08 16:23:45 +00:00
Greg Neagle
1c9e5784c1
- forced_installs and forced_uninstalls now work with items that are part of a dependency relationship
...
- makecatalogs now has no OS X-specific dependencies
- munkiimport fixes for repos hosted via SMB/CIFS.
git-svn-id: http://munki.googlecode.com/svn/trunk@1097 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-06 21:54:29 +00:00
Justin McWilliams
b20b212431
Fix utils.runExternalScript docstring to match change in r1092.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1093 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-04 21:39:42 +00:00
Justin McWilliams
3f3a3b4dfd
utils.runExternalScript should return stderr, and preflight/postflight stderr should be displayed and logged if return != 0
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1092 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-04 21:38:33 +00:00
Greg Neagle
86d1780667
Clean up catalog files that are no longer in use by the client.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1091 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-01 15:31:16 +00:00
John Randolph
b04cce845d
add missing exception FileCopyError
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1085 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-23 15:28:43 +00:00
John Randolph
b6cb650938
add
...
--applesuspkgsonly
--munkipkgsonly
options to managedsoftwareupdate to override which packages it looks at
git-svn-id: http://munki.googlecode.com/svn/trunk@1084 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-22 22:00:49 +00:00
John Randolph
24d6d1a0e0
merge /branches/msu_logging in
...
see issue 62 &
changes 1064, 1065, 1070 for other discussion
git-svn-id: http://munki.googlecode.com/svn/trunk@1081 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-22 17:04:30 +00:00
Greg Neagle
cc5102287e
inserted missing imports of "errno" and "shutil" into updatecheck.py (related to support for file:// URLs).
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1073 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-16 17:50:30 +00:00
John Randolph
53ea11380c
merge latest updatecheck.py from
...
/branches/packageinfo-packageurl-and-file-scheme
here
git-svn-id: http://munki.googlecode.com/svn/trunk@1071 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-16 17:41:43 +00:00
Greg Neagle
8f8b087729
Fix unhandled exception caused by installWithInfo returning just the needToRestart instead of the expected tuple in some cases.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1068 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-14 18:35:36 +00:00
MagerValp
e55c15a88e
Added make_munki_mpkg_from_svn.sh.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1067 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-11 13:13:56 +00:00
MagerValp
0238eac353
Added support for including a configuration sub-package.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1066 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-11 12:40:57 +00:00
Greg Neagle
e5057c8c39
Fix for embedded uninstall scripts
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1061 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-08 23:14:28 +00:00
Greg Neagle
b32f6852a3
Formatting/typo fixes
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1060 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-08 22:17:41 +00:00
Greg Neagle
35282d5115
Fixes for new preinstall_script and postinstall_script functionality.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1059 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-08 22:10:08 +00:00
Greg Neagle
e9a7080191
Prevent postinstall script from running if install fails.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1058 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-08 18:23:40 +00:00
Greg Neagle
7f4a8420fa
Add support for preinstall_script and postinstall_script in pkginfo.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1057 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-08 18:15:02 +00:00
Justin McWilliams
3882257b46
Change ManagedInstallReport::InstallResults to be a list of dictionary install results instead of list of strings. InstallResults dictionaries now look like the following:
...
{
'name': 'Foo Package Install Name Without Version', # display_name or name
'version': '1.0.0.0', # version_to_install
'applesus': False, # or True for Apple SUS installs.
'status': 0, # retcode, so 0 for success otherwise 1, 2, -1, -5, etc
}
Install.log output stays roughly the same, only prepending "Apple SUS" to such install strings.
git-svn-id: http://munki.googlecode.com/svn/trunk@1056 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-07 19:57:50 +00:00
Greg Neagle
731181c8c8
Bumping version to 0.7.1 for now...
...
git-svn-id: http://munki.googlecode.com/svn/trunk@1052 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-02 19:38:11 +00:00
Greg Neagle
e1b39d02fd
Patch from Rob Middleton for updatecheck.curl():
...
- if an etag is present in a partial only resume the download if it matches
- if resume if not possible immediately retry a full download
- log if eTag is missing for downloads we expect to be resumable (ie: pkgs)
- log if range / resume fails.
- delete the partial download in a few other error cases
- actually log the curl exit code / error string on all download failures.
- don't crash munki if the curl error string is not in expected form
git-svn-id: http://munki.googlecode.com/svn/trunk@1051 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-02 19:19:51 +00:00
John Randolph
4e06a85d55
encode unicode strings as utf-8 before sending over the wire.
...
surprisingly (to me, at least), sending encoded utf-8 without
escaping is legal according to:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
...and also works properly in testing.
git-svn-id: http://munki.googlecode.com/svn/trunk@1050 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-02 18:01:30 +00:00
Justin McWilliams
676ec5588c
In updatecheck.curl(), move time.sleep(0.1) up an indentation block so the sleep happens regardless of the tempdownloadpath exists or not.
...
The curl binary won't write tempdownloadpath until the request body begins downloading, not immediately after headers are completely received. On extremely slow/poor connections the curl() function may eat 100% CPU if headers have finished downloading but body has not yet started (and doesn't start for many seconds/etc).
git-svn-id: http://munki.googlecode.com/svn/trunk@1047 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-02-25 17:21:37 +00:00