Commit Graph

162 Commits

Author SHA1 Message Date
Greg Neagle
79093c048f Merging Arjen's MUNKI_VERBOSITY_LEVEL environment variable 2014-06-24 15:39:02 -07:00
Arjen van Bochoven
2af6c13f87 Renamed VERBOSE to MUNKI_VERBOSITY_LEVEL 2014-06-25 00:23:32 +02:00
Arjen van Bochoven
62986bac54 Store verbosity level in environment variable
Pre- and post-flight scripts can use verbosity level from managedinstall
2014-06-23 23:33:04 +02:00
Greg Neagle
90752e2f97 When running managedsoftwareupdate in --auto mode, if the Munki repo server is not available, do not exit immediately, but attempt to install any cached updates (either those marked for unattended_install or if at the loginwindow, all updates) 2014-06-19 15:12:13 -07:00
Greg Neagle
d343ede672 Add support for product icon downloads from Munki server 2014-03-24 10:21:42 -07:00
Greg Neagle
c0d96c31fd Allow non-root user to run managedsoftwareupdate --version 2014-03-22 19:50:35 -07:00
Greg Neagle
20a8466836 Send an update notification after a 'managedsoftwareupdate --installonly' run so any open instance of MSC.app updates its display 2014-03-14 16:21:27 -07:00
Greg Neagle
64597994ae Make sure the need to restart is not lost when Munki updates need a restart but Apple updates do not. 2014-02-21 08:43:11 -08:00
Greg Neagle
3bc78d53a2 Make sure the need to restart is not lost when Munki updates need a restart but Apple updates do not. 2014-02-21 08:35:11 -08:00
Greg Neagle
f3ec0e0bbd Changes to make updates after a Munki session completes visually smoother, elimnating the reload flash when possible. 2014-02-20 15:17:35 -08:00
Greg Neagle
f2c3f66420 implement more of the inter-process plumbing, including monitoring the managedsoftwareupdate process for failure to start or unexpected termination 2014-02-18 17:44:01 -08:00
Greg Neagle
5a9c158080 More IPC work 2014-02-14 17:12:14 -08:00
Greg Neagle
bfea0b1673 Use filesystem flag instead of NSDistributedNotification to signal that managedsoftwareupdate should stop. Turns out you can't send NSDistributedNotifications from user-land apps to background daemons launched by launchd. 2014-02-14 12:02:19 -08:00
Greg Neagle
36dc30920d start of changes to implement NSDistributedNotifications for IPC between managedsoftwareupdate and the GUI apps 2014-02-10 15:47:58 -08:00
Justin McWilliams
bde50a7dca In addition to ManagedSoftwareUpdate.log, also log to /var/log/system.log when 'LogToSyslog' configuration is True. 2014-02-06 18:04:07 -05:00
Greg Neagle
fddd138000 Bumping version to 1.0.0. Updated copyright dates. 2014-01-10 08:20:15 -08:00
Justin McWilliams
b166a908c0 Fix "NameError: name 'report_broken_python' is not defined" crash when attempting to report a broken Python install. The file hasn't been parsed at this point, so the report_broken_python function is nonexistent.
Broken in: https://code.google.com/p/munki/source/detail?r=cbb385f540643aa3a15a242ba5de513404af02ce

pylint warnings should either be ignored, or disabled using a "pylint: disable-msg" annotation.
2013-05-14 16:52:55 -07:00
ogle
72662f2614 If a force_install_after_date install is near/past it's due date, logouthelper should be started (the machine should be forcefully rebooted) even if someone is logged in but the session is at the loginwindow (fast user switching). Force should not be "force unless x, y, z". 2013-04-19 22:25:08 +00:00
Greg Neagle
52fd32f0dc If we are about to do an install at the loginwindow, check to see if FileSyncAgent.app is running. This might be HomeSync running during a login process. If so, don't install. 2013-04-15 16:01:24 -07:00
Greg Neagle
a21a4b1acc When skipping Apple Software updates because there is an update from Apple in InstallInfo.plist, remove AppleUpdates.plist to prevent MSU.app and logouthelper from presenting force_install_after_date warnings for items it will not be able to install because Munki updates are blocking Apple updates. 2013-03-08 13:52:01 -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
98de6685cc Merge of https://code.google.com/r/theheig-conditionals/ apple-update-metadata: Adds support for Munki-style metadata to Apple updates. 2013-02-19 17:09:40 -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
b55c1c30af Minor message and comment update
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.
2013-02-16 13:20:25 -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
Greg Neagle
d2eee5e268 When adding or removing Optional Software from the list of current installs, suppress Apple Update checks. 2013-02-14 16:23:06 -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
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
4b71ace130 Updated copyright info on all files with copyright info. 2013-01-28 11:55:09 -08:00
Greg Neagle
cbb385f540 Add support for a new 'SuppressLoginwindowInstall' key in Munki's preferences (ManagedInstalls.plist).
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.
2013-01-14 15:03:01 -08: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
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
Greg Neagle
f1d8df900e Add signal handler for SIGTERM so objects can get cleaned up if managedsoftware update gets killed. This should cause launchd processes we've started (like for /usr/sbin/installer and /usr/sbin/softwareupdate) to be stopped as well. 2012-08-16 13:47:30 -07:00
Justin McWilliams
a8c7bd9dc2 Log when managedsoftwareupdate is about to notify users with MSU GUI. 2012-06-07 15:53:08 -04:00
Greg Neagle
3fe3450d7d Fix typo in networkUp() when checking for non-loopback interfaces 2012-05-07 11:33:42 -07: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
4071808f6e "Another instance of managedsoftwareupdate is running. Exiting." is now (once again?) logged to ManagedSoftwareUpdate.log instead of only being outputted to system.log. 2012-01-27 21:49:23 -05:00
Greg Neagle
3a049c4c46 Do not notify user via MSU.app until after postflight script has completed. 2012-01-20 15:04:04 -08:00
Greg Neagle
69968229c0 managedsoftwareupdate: warn if DaysBetweenNotifications is not an integer. 2012-01-17 16:45:24 -08:00
Greg Neagle
05e3df8704 Save ApplicicationInventory report for possible use by postflight reporting scripts 2012-01-17 08:21:18 -08:00
Greg Neagle
a0decf2625 Change copyright notice to 2010-2012 2012-01-04 13:52:33 -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
Greg Neagle
c01eb685a9 Spacing fix in managedsoftwareupdate; try/except in manifestutil so a bad manifest doesn't cause an unhandled exception. 2011-12-05 09:45:59 -08:00
Justin McWilliams
06801d2ef7 Reduce the likihood of a lingering /var/run/com.googlecode.munki.ManagedSoftwareUpdate by sleeping for 1/2 a second (instead of .1) and using open() instead of subprocess+touch to write the file. 2011-11-08 12:42:41 -05:00
Justin McWilliams
c803e1ba89 Remove printing preflight stderr, as it's been moved to runScript. 2011-10-17 18:48:15 -04:00
Justin McWilliams
c938311b2c Move "Starting managedsoftwareupdate run" to before executing preflight,
"Ending ..." to after executing postflight, and add the runtype to the starting
msg so it's clear who/what is executing Munki and for what reason.
2011-10-14 16:19:38 -04: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
cab84a49d2 Check SuppressAutoInstall value before attempting unattended installs 2011-09-19 10:13:44 -07:00
Greg Neagle
fd1622edfa Don't kill loginwindow if we're doing checkandinstallatstartup and a restart is not required; launchd will restart us. 2011-09-16 17:05:59 -07:00
Rob Middleton
a572573fbb Reset report data structure before any calls that add warnings/errors. 2011-09-15 18:27:10 +10:00