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.
Comment regarding limitations to installing Apple updates removed from
managedsoftwareupdate. Warning message regarding missing
'installs/receipts' on import of an '--apple-update' item is not
displayed.
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.
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
Using the new '--apple-update' option available in makepkginfo (and
therefore munkiimport), an admin can generate metadata pkginfo files
for Apple updates. Supported metadata keys will modify munki's
behavior of the specified Apple update offered to the client. Examples
would include 'force_install_after_date' and 'RestartAction'. The
'makecatalogs' utility has also been updated to allow for this new
installer_type when creating catalogs.
NOTE: Client-side implementation is not included in this commit. This
commit only deals with the creation of these specialized pkginfo files.
This causes installs/removals to be suppressed at the loginwindow unless an install/uninstall is marked
with unattended_install = True or unattended_uninstall = True.
This is different from the behavior with the existing 'SuppressAutoInstall' key, which suppresses all "automatic" installs;
that is, Munki will not install _anything_ without first notifying the user.
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'
- 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.
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.