Justin McWilliams
cd15912feb
Fix case where munkicommon.getAppBundleExecutable() returns None due to non-existent Info.plist, causing Munki to crash when parsing the None executable name.
2013-05-14 16:07:59 -07:00
Greg Neagle
7882edfbc1
Better info/warning messages when Apple update metadata conflicts with existing RestartAction
2013-04-02 12:17:08 -07:00
Greg Neagle
2d4bafe694
Ensure AppleUpdates.plist is removed if there are no available Apple updates. Update appleupdates_test.py to reflect this and a previous commit.
2013-03-17 10:49:51 -07:00
Greg Neagle
1df439ef37
Store original Apple name for an update and use that when determining success of an Apple update install; new metadata functionality allows admins to override the display_name, which could have caused determining success of an Apple update install to fail, since it would have been looking for the wrong name.
2013-03-11 11:03:13 -07:00
Heig Gregorian
4847006300
Minor code clean-up, no functional changes
2013-02-22 17:17:26 -08:00
Heig Gregorian
ed9a8b0913
Renamed updatecheck.getAppleUpdateMetaData to updatecheck.getPrimaryManifestCatalogs to reflect actual function; added function parameter to specify whether or not the primary client manifest and catalogs should be re-downloaded before parsing for apple_update_metadata
...
Additionally, ensure that MACHINE dict is populated regardless of the
runtype as it may impact how a primary manifest is discovered.
2013-02-22 15:29:15 -08:00
Greg Neagle
8bac537975
When getting blocking_applications from an Apple update dist file, de-dup the list of application-ids before finding matching applications.
2013-02-21 18:44:37 -08:00
Heig Gregorian
27cbf06058
Minor inline comments added for clarification's sake
2013-02-19 15:15:11 -08:00
Heig Gregorian
53fc136d28
unattended_install in metadata no longer applied if a RestartAction exists (in original item or metadata); unattended Apple updates are skipped if a blocking application is running; installlist, holding Apple update installation results, only holds items which are eligible for unattended installation
...
Mostly, this commit involves improving upon expected functionality of
an unattend Apple update installation.
Munki performs a "suppressed" Apple software update check post
installation run if a GUI user is logged in such that the user will be
prompted to install any remaining updates. This is inline with munki's
behavior for munki packages.
blocking_applications can now accept items which are full paths in case
an admin wishes to be specific regarding the location of a running,
blocking application and/or executable.
Also of note is a fix for previously broken blocking_application
checking for Apple updates, both in MSU and managaedsoftwareupdate.
2013-02-19 13:32:09 -08:00
Heig Gregorian
a52acd73f8
Overall clean-up of adding install items to the list of parameters supplied in 'su_options'
2013-02-16 14:08:51 -08:00
Heig Gregorian
cd3c69b5a2
'unattended_install' and 'force_install_after_date' actions for Apple update are honored. Overall, functions were add/modified to support this effort.
2013-02-15 18:34:28 -08:00
Heig Gregorian
e59555ff76
Minor clean-up; removed custom argument for updatecheck.getItemDetail, unusued self.apple_md variable removed from appleupdates
2013-02-13 16:00:38 -08:00
Heig Gregorian
e2005a696b
Significant changes to how Apple update items are matched to metadata; new function in updatecheck specifically created to handle collection of catalog data by appleupdates; new function created for applying metadata
...
Of note, 'copyUpdateMetadata' function uses a list of whitelisted
metadata keys as well as appropriate logic to determine if a particular
'RestartAction' should be applied.
2013-02-13 13:22:07 -08:00
Heig Gregorian
9f8cd3a975
Initial commit adding client-side support for 'apple_update_metadata'
...
Provided that 'AppleSoftwareUpdatesOnly' preference is False, primary
client manifest's catalogs are parsed for matching
'apple_update_metadata' and applied to pending Apple updates.
Please note that not ALL keys presented by an apple_update_metadata
item are applied as to not either clobber or complicate the listing of
items provided in 'AppleUpdates.plist'. The current list of excluded
keys is as follows:
catalogs
installed_size
installer_type
name
version
version_to_install
2013-02-12 13:23:45 -08:00
Greg Neagle
a3db265246
When checking for cached Apple updates, use self.GetSoftwareUpdateInfo() instead of self.WriteAppleUpdatesFile() to avoid writing the AppleUpdates.plist twice.
2013-02-12 09:15:52 -08:00
Greg Neagle
b80430753b
Changes to allow Munki to check for and install Apple Software Update items in the same session as normal Munki updates.
2013-02-11 08:37:39 -08:00
Greg Neagle
20a0b51895
Fix typo in call to pkgutil --regexp --pkg-info-plist (was -pkg-info-plist). Thanks to Heig Gregorian.
2013-02-04 13:31:14 -08:00
Greg Neagle
4b71ace130
Updated copyright info on all files with copyright info.
2013-01-28 11:55:09 -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
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
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
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
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
1c914a9ead
Pylint cleanups
2012-07-02 10:55:05 -07:00
Greg Neagle
27ca3a2768
Pay attention to return value from self.CheckForSoftwareUpdates
2012-06-29 21:51:04 -07:00
Justin McWilliams
a788ac2e06
If a corrupt Apple Software Update dist file fails to parse when detecting blocking applications, simply assume there are no blocking applications instead of crashing.
2012-06-29 15:40:15 -04:00
Greg Neagle
f62a2df314
Add Mountain Lion sucatalog to list of default Apple catalogs
2012-06-06 09:53:19 -07:00
Greg Neagle
2ac635afac
add back the return of SoftwareUpdate's return code at the end of AppleUpdates._RunSoftwareUpdate(). Mistakenly removed on Feb 15 2012 in revision 2a1cf963e4
2012-04-13 13:55:46 -07:00
Greg Neagle
97c670bab4
appleupdates.py now generates blocking_applications lists for Apple updates
2012-03-13 17:22:54 -07:00
Greg Neagle
2a1cf963e4
Fix issue where managedsoftwareupdate --auto or --quiet would print percentage-done indicators to STDOUT when checking for Apple updates or when removing packages.
2012-02-15 15:17:09 -08:00
Greg Neagle
34ab750460
Changes to allow curl to follow redirects when retreiving an Apple sucatalog; this is needed to support Lion Server's Software Update service.
2012-02-14 16:51:34 -08:00
Justin McWilliams
6c06a48fd7
Clean up appleupdates.GetSoftwareUpdateResource and RetrieveURLToCacheDir docstrings.
2012-01-24 12:05:26 -05:00
Greg Neagle
ca03bb0325
Output tweaks; munkicommon.mountdmg() can now mount disk images containing End User License Agreements
2012-01-04 13:54:04 -08:00
Greg Neagle
96a2536141
appleupdates.py output tweaks; updated tests
2011-12-22 14:32:13 -08:00
Greg Neagle
5651b2a9a4
appleupdates.py now sets User-Agent header; munki-specific cert and header stuff moved to updatecheck; tests updated
2011-12-22 14:01:27 -08:00
Greg Neagle
03a6136ea0
Change appleupdates.py to use fetch.py for downloads
2011-12-21 16:36:52 -08:00
Greg Neagle
c916885e03
Added munkicommon.display_status_major and renamed munkicommon.display_status to munkicommon.display_status_minor; changes to more closely map the munkistatus-style output to the stdout-style output
2011-12-21 11:28:52 -08:00
Justin McWilliams
571a6a3f38
Don't log repetitive lines when running softwareupdate; only log if the stdout
...
has changed since the last loop iteration.
This should change things like:
Nov 16 13:12:03 Registering updated applications…
...
Nov 16 13:12:19 Registering updated applications…
Nov 16 13:12:19 Registering updated applications…
Nov 16 13:12:20 Registering updated applications…
Nov 16 13:12:20 Registering updated applications…
Nov 16 13:12:21 Registering updated applications…
Nov 16 13:12:21 Registering updated applications…
Nov 16 13:12:22 Registering updated applications…
Nov 16 13:12:22 Writing package receipts…
Nov 16 13:12:23 Writing package receipts…
Nov 16 13:12:23 Writing package receipts…
Nov 16 13:12:24 Writing package receipts…
Nov 16 13:12:24 Writing package receipts…
Nov 16 13:12:25 Writing package receipts…
Nov 16 13:12:25 Writing package receipts…
...
Nov 16 13:12:59 Writing package receipts…
To simply:
Nov 16 13:12:03 Registering updated applications…
Nov 16 13:12:22 Writing package receipts…
2011-11-17 14:34:34 -05:00
Greg Neagle
a41af3b7f9
Revert "Beginning of refactor for getResource/curl methods"
...
This reverts commit 821e9072cc .
2011-09-29 16:39:57 -07:00
Greg Neagle
821e9072cc
Beginning of refactor for getResource/curl methods
2011-09-29 16:24:23 -07:00
Greg Neagle
31dee71a55
Fix for issue when MSU.app is launched by managedsoftwareupdate more than one minute after an updatecheck run has completed (due to unattended installs, apple update checking, or combo) and add AppleUpdates to ManagedSoftwareReport.plist
2011-09-20 20:01:55 -07:00
Greg Neagle
957998c87d
Fixed (again) appleupdates.GetSoftwareUpdatePref method to respect MCX
2011-08-26 12:29:49 -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
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
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