Commit Graph

841 Commits

Author SHA1 Message Date
Greg Neagle
ff43952683 Added tar2pkg.py to tools 2011-09-27 09:26:00 -07:00
Justin McWilliams
224db09684 runScript should not crash Munki if the script it's attempting to run does not exist or there are other issues executing it. 2011-09-23 14:12:16 -04:00
Justin McWilliams
72dfa5bce0 s/Content-Type/Content-Length/ 2011-09-19 10:11:56 -04:00
Justin McWilliams
56216d1db3 Don't sleep for .1 seconds in between reading HTTP header lines. 2011-09-16 18:02:21 -04:00
Justin McWilliams
79cec41552 Fix CPU owning for curl downloads while on slow internet connections when Content-Length header is not present.
App Engine Blobstore does not send Content-Type, which means targetsize is always 0 and therefore the conditional that calculates and reports download progress is never entered, and the existing sleep location is never hit. On slow internet connections, this means that CPU spikes as proc.poll() is being called far more than curl is downloading.

Fix this by moving time.sleep(0.1) into the main curl while loop, where it'll execute on every loop iteration. That means we have a small sleep even while headers are downloading/etc, but that's not a big deal given it's a 1/10th of a second.
2011-09-15 18:39:49 -04:00
Greg Neagle
25a9315cba mount_nfs fix for munkiimport and manifestutil 2011-09-13 15:14:32 -07:00
Greg Neagle
cb3d75eb45 Merge remote branch 'lfronius/master' 2011-09-09 09:04:35 -07:00
Greg Neagle
116569f4fd Updated MSU.app build scripts to get Git revision only for the MSU.xcode.project tree and to not fail if GitRevision is already in Info.plist 2011-09-07 15:14:56 -07:00
Greg Neagle
e334b9eb13 Changed woefully out-of-date READ ME FIRST.txt to refer to wiki documentation 2011-09-06 15:57:15 -07:00
Lars Fronius
e45f31fe07 Why shouldn't manifestutil and munkiimport use nfs, and why shouldn't it be the same function for both? 2011-09-05 15:08:26 +02:00
Greg Neagle
61ebf4150c Add check for git to sanity checks in make_munki_mpkg.sh 2011-08-30 09:18:04 -07:00
Rob Middleton
737a022a3c add ptyexec to our built packages 2011-08-30 15:17:34 +10:00
Greg Neagle
d821429830 Change sample munki repo URLs to use example.com in keeping with RFC 2606: http://tools.ietf.org/html/rfc2606 2011-08-26 17:12:14 -07:00
Greg Neagle
01f2a51f71 Removed code/tools/makeChoices.py; this functionality is better met with /usr/sbin/installer (10.6.6+) 2011-08-26 17:08:34 -07:00
Greg Neagle
957998c87d Fixed (again) appleupdates.GetSoftwareUpdatePref method to respect MCX 2011-08-26 12:29:49 -07:00
Greg Neagle
7264f20ac1 Updated copyright notice in Managed Software Update.app 2011-08-24 14:19:22 -07:00
Greg Neagle
727b8c904c More sanity checks before attemping the Git clone. 2011-08-24 14:10:52 -07:00
Greg Neagle
0aa542b655 Update Usage message for make_munki_mpkg_from_git.sh, if git is missing suggest where it can be downloaded. 2011-08-24 14:08:25 -07:00
Greg Neagle
9f88500217 make_munki_mpkg.sh now smarter autodetect of munki source dir; make_munki_mpkg_from_git.sh now uses cloned/checkedout make_munki_mpkg.sh for easier bootstrapping 2011-08-24 13:51:12 -07:00
Greg Neagle
3a45395672 Updated build script for MSU.app to insert build number derived from Git and Git revision into Info.plist 2011-08-24 11:31:52 -07:00
Greg Neagle
99e09acda5 Fix for bad permissions on version.plist caused by 'defaults'; ignore other branches when calculating Git revision index 2011-08-24 10:40:12 -07:00
Greg Neagle
54ed666e23 Stash build number and git revision in munkilib/version.plist; update munkicommon.get_version() to read build number from munkilib/version.plist 2011-08-24 10:30:24 -07:00
Justin McWilliams
2fdd6fdcfb Merging (well, moving) refactored appleupdates module, unit tests, and runtests.sh to master branch. 2011-08-24 12:42:19 -04:00
Greg Neagle
68e6baf4c7 New/updated make_munki_mpkg scripts that work with Git 2011-08-24 09:39:51 -07:00
Greg Neagle
0f2e8771e9 Updated .gitignore to ignore .pyc files and more stuff in Managed Software Update.xcodeproj 2011-08-24 09:06:53 -07:00
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
7dd5074443 Removed manifest examples and pkginfo examples because they now have their own repo 2011-08-16 14:23:29 -07:00
Greg Neagle
c1acae11b5 Convert svn:ignore properties to .gitignore. 2011-08-16 10:38:55 -07: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
v0.8.0.1294.0
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
v0.8.0.1291.0
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