Commit Graph

1136 Commits

Author SHA1 Message Date
Justin McWilliams
4784ea762b Cleanup readability of pkgid_table generation in makeCatalogDB(). 2012-12-19 16:53:31 -05:00
Greg Neagle
cc67bb8ca1 Add 'date' item to INFO_OBJECT for use in conditional_items. This allows for date-based conditions. 2012-12-18 13:08:13 -08:00
Justin McWilliams
da0891dd9b Missing comma introduced in commit 15e082ae45 causes MSU to crash 2012-12-18 12:08:28 -05:00
Justin McWilliams
4401cdbfcd For cases where there is no InstallInfo.plist file, or it doesn't contain any OOptional Installs, we should present the "Check again" button in the "No Updates" alert. This will allow users to forcefully run updatecheck via MSU once again. 2012-12-17 14:53:24 -05:00
Justin McWilliams
15e082ae45 s/GuiCacheAgeSecs/CheckResultsCacheSeconds/ per a discussion with gneagle.
Also, add to default_prefs, even though default is None/unset, a rrmiddleton pointed out this documents which prefs MSU might use.
2012-12-17 10:52:13 -05:00
Justin McWilliams
dc37943b46 Move MSU manual check cache age seconds to ManagedInstalls.plist config option (final naming TBD). For manual check executions, only run updatecheck if this config is undefined or if the defined timeout has elapsed. 2012-12-14 16:44:17 -05:00
Justin McWilliams
6fa4957e2a In the "No Updates" alert, add a "Refresh" button which when clicked executes a full managedsoftwareupdate updatecheck. 2012-12-14 14:45:53 -05:00
Greg Neagle
159b73aee3 Merge https://code.google.com/r/thomastvegaard-danish-localization 2012-12-13 15:13:13 -08:00
thomas.tvegaard
755b66e395 Minor translation change. 2012-12-13 09:53:31 +00:00
thomas.tvegaard
e7a5aa8140 Minor translations updates 2012-12-13 09:51:25 +00:00
Greg Neagle
d4f3fed906 Bumping version in version.plist to 0.8.4 for next round of development. 2012-12-04 13:50:23 -08:00
Greg Neagle
ff445fcf84 Additional Norwegian (Bokmal) localized strings. 2012-11-30 12:08:15 -08:00
Justin McWilliams
2cc9bd5f11 Don't delete package from cache if installation fails. If the package is corrupt, hash/etags should not match the server and it'll redownload. Furthermore, if the install was actually successful regardless of a non-zero installer exit code, the cached package will be downloaded on the next Munki execution after determining that package is no longer needed.
As discussed here: https://groups.google.com/forum/?fromgroups=#!topic/munki-dev/Q5UxFOf6En8
2012-11-29 15:50:40 -05:00
Greg Neagle
272b496cc8 Merge branch 'master' of https://code.google.com/p/munki 2012-11-28 13:24:17 -08:00
Greg Neagle
34c31e79fa Fix build of nb.lproj files. 2012-11-28 13:23:41 -08:00
Justin McWilliams
fe3c76dbdb Munki shouldn't crash when attempting to load a non-existent dist file while detecting blocking apps.
Fixes the following traceback:
    File '/usr/local/munki/munkilib/appleupdates.py', line 808, in GetSoftwareUpdateInfo
       blocking_apps = self.GetBlockingApps(update['productKey'])
          File '/usr/local/munki/munkilib/appleupdates.py', line 423, in GetBlockingApps
             dom = minidom.parse(distfile)
                File '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/minidom.py', line 1914, in parse
                   File '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/expatbuilder.py', line 922, in parse
                      IOError: [Errno 2] No such file or directory: u'/tmp/munki_swupd_cache/content/downloads/15/38/041-7414/ldfmzmn6psq7re395jmalnyba8ge3xa4cj/041-7414.English.dist'
2012-11-27 16:23:20 -05:00
thomas.tvegaard
fc257c609e Minor change 2012-11-20 07:57:35 +00:00
Greg Neagle
3903e89fc3 Merge branch 'master' of https://code.google.com/p/munki 2012-11-19 08:48:17 -08:00
Greg Neagle
09bb383b37 Added Norwegian (Bokmal) localization. Thanks to Frank Paul Silye. 2012-11-19 08:46:14 -08:00
Greg Neagle
b959caddb5 Change tsutton's 'predicate_check' pkginfo key to 'installable_condition' 2012-11-16 16:34:57 -08:00
Greg Neagle
f372d6889c Merge branch 'pkginfo-predicates' of https://code.google.com/r/tim-munki
Merge Tim's pkginfo-predicates changes
2012-11-16 16:30:14 -08:00
Greg Neagle
ed39d81485 Using the launchd module to call /usr/sbin/installer introduced a bug where we did not capture stderr when an install failed. This commit fixes that; stderr is now correctly logged and reported. 2012-11-15 13:45:18 -08:00
Rob Middleton
bce1fa42f9 Fix issue 169. Pref AppleSoftwareUpdatesOnly needs to be understood by MSU.app not just managedsoftwareupdate. 2012-11-13 11:50:16 +11:00
Justin McWilliams
e6cd53188d Supervisor improvements:
- more robost killing; sigterm, then sigkill processes if they're still running.
- new --error-exec option, to execute an external script if primary process exits with one of --error-exec-exit-codes.  Intended to be used to notify admins of Munki crashes, by calling report_broken_client or similar script to email/post to server/etc.
2012-11-12 14:19:07 -05:00
Justin McWilliams
b31e82905f When logging/display messages/etc., use arguments instead of explicit string formatting, to avoid the following traceback:
File '/usr/local/munki/munkilib/removepackages.py', line 611, in initDatabase
         munkicommon.display_detail('Importing %s...' % pkg)
         File '/usr/local/munki/munkilib/munkicommon.py', line 393, in display_detail
         log(u' ' + msg)
         UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 36: ordinal not in range(128)

When passing arguments, str_to_ascii (via concat_log_message) drops characters it cannot decode.
2012-11-09 15:26:16 -05:00
Justin McWilliams
85dca9e6de Fix munkicommon.Popen.communicate(); previously, all calls crashed as stdin was always being written to ("input" is a builtin).
Use Popen.communicate(timeout=60) to sanely exit "system_profiler SPApplicationsDataType" calls, which are hanging indefinitely on a small number of clients.
2012-11-09 13:35:49 -05:00
Rob Middleton
d73bb1370c Keep parsing stdout after curl exits. Small downloads caused fetch.curl to stop looping before the ETag header was read. Thus the ETag xattr was often not written for small fast downloads. (Fix for issue 208, 204, 161) 2012-11-08 10:32:28 +11:00
ogle
22002c7153 Fix s/munki_common/munkicommon/ typo introduced in e22995c5c4 2012-11-07 21:56:37 +00:00
ogle
e22995c5c4 Remove duplicate os.path.exists() calls when checking for real_cache_dir existence. 2012-11-07 17:23:24 +00:00
ogle
5ae3ad5f1a If real_cache_dir exists but is not a dir, log an error. 2012-11-07 17:16:52 +00:00
ogle
83837f6fea If the swupd dir does not exist, create it. 2012-11-07 17:10:14 +00:00
Greg Neagle
1ebd68ebdb Workaround for softwareupdate NSInvalidArgumentException error with OS X 10.8.2 and certain recent Apple updates. 2012-11-06 14:48:11 -08:00
Greg Neagle
39ce59d8fe Merge branch 'master' of https://code.google.com/p/munki 2012-11-06 14:22:29 -08:00
Greg Neagle
0e7c91c266 Like a recent change to reposado, when caching Apple updates, failure to cache a given .dist file is no longer fatal to the caching process 2012-11-06 14:21:58 -08:00
Justin McWilliams
2a020e871b When a user clicks Stop while processing removals, Munki should not crash.
Fixes this traceback:
   Traceback (most recent call last):
   File '/usr/local/munki/managedsoftwareupdate', line 849, in main()
   File '/usr/local/munki/managedsoftwareupdate', line 705, in main
   mustrestart = doInstallTasks()
   File '/usr/local/munki/managedsoftwareupdate', line 225, in doInstallTasks
   need_to_restart = installer.run(only_unattended=only_unattended)
   File '/usr/local/munki/munkilib/installer.py', line 1169, in run
   removallist, only_unattended=only_unattended)
   TypeError: 'bool' object is not iterable
2012-11-05 16:29:21 -05:00
Justin McWilliams
c9b505fc9a Use munkicommon.log() to log Python tracebacks in cases where exceptions are reraised causing Munki to crash and print the same traceback to stderr. Otherwise, the tracebacks are displayed to users twice when running from the commandline. 2012-10-24 18:37:27 -04:00
Timothy Sutton
ce2abfc967 Rudimentary support for NSPredicate strings to quality a pkginfo via the 'predicate_check' key. 2012-10-24 14:11:20 -04:00
Justin McWilliams
5a4a4f572e Clearly define and use exit status codes in managedsoftwareupdate.
In cases where unknown exceptions are caught for logging purposes, log and reraise the exception so munki crashes with a Python traceback, instead of exiting.
2012-10-24 12:19:22 -04:00
Justin McWilliams
cc4ddcfb4d Fix invalid string concatenation for "Failed to unmount" warning.
File "/usr/local/munki/munkilib/munkicommon.py", line 874, in unmountdmg
display_warning('Failed to unmount %s' % (mountpoint, err))
TypeError: not all arguments converted during string formatting
2012-10-24 11:21:20 -04:00
Thomas Tvegaard
8204311612 Fixed a wrong translation for the force install text. 2012-10-10 08:27:47 +02:00
Greg Neagle
cfb4a45134 In MSU.app, if removal detail is suppressed, and a removal item requires a logout, make sure MSU.app also requires a logout. 2012-10-05 08:22:43 -07:00
Greg Neagle
6df5ef84b9 Merge branch 'master' of https://code.google.com/p/munki 2012-09-17 12:25:00 -07:00
Greg Neagle
6f4e92f3c0 Change default Apple Software Update catalogs from .sucatalog.gz versions to .sucatalog versions to work around an issue with Mountain Lion's softwareupdate. (This may affect Lion as well, but I have no solid data on that) 2012-09-17 12:24:49 -07:00
Greg Neagle
39d36dafaf Updated project.pbxproj build scripts to incorporate Danish localization files. 2012-09-17 08:05:58 -07:00
Thomas Tvegaard
fb7c94ff43 Minor change of wording. 2012-09-14 13:59:24 +02:00
ttv
e0e53adfe5 Added Danish strings. Spellchecked and verified. 2012-09-14 13:51:55 +02:00
Greg Neagle
bd79a26a84 If a package failure occurs when downloading or installing Apple updates, make _RunSoftwareUpdate return 1 even though /usr/sbin/softwareupdate returns 0 2012-09-13 13:21:43 +02:00
Greg Neagle
3a4016ba57 Merge branch 'squashed_min_os_ver_take2' of https://code.google.com/r/adamjreed-munki 2012-09-06 16:42:53 -07:00
Adam Reed
5c51cefb8f Automate the setting of minimum_os_version to the highest detected OS version dependent upon what we automatically detect from the installer items and / or file item(s) in the following situations:-
* makepkginfo with installer item - set minimum_os_version as detected
* makepkginfo with installer item and file item(s) - set minimum_os_version as detected
* makepkginfo with file item(s) only - do not provide minimum_os_version, regardless of what we detect
* makepkginfo with --minimum_os_version and any of the above options - set minimum_os_version to argument of --minimum_os_version, regardless of what we detect

This patch also sets flat packages to default to 10.5.0 (instead of 10.4.0 which is used for all other items) and requires that if --minimum_os_version is provided that it starts with a digit.
2012-09-05 12:33:35 +10:00
Greg Neagle
2afb3681b7 Fixed Xcode project to localize fi.lproj resources, renamed from Finnish.lproj 2012-08-31 14:23:29 -07:00