Commit Graph

1162 Commits

Author SHA1 Message Date
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
Heig Gregorian e25b5aacf7 Merged with munki master; manually resolved 'munkiimport' merge conflicts 2013-02-12 10:00:12 -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
Heig Gregorian 4b322e1e43 Use underscores instead of hyphens for new installer_type
apple-update-metadata changed to apple_update_metadata
2013-02-12 08:51:14 -08:00
Greg Neagle 9f7a818edc Add new munkiimport preference for default catalog to use when no catalog is specified at the command line. Defaults to 'testing'. 2013-02-11 21:46:12 -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 4fd492662d Updated preferences manifest to add SuppressLoginwindowInstall key and correct description of SuppressAutoInstall key 2013-02-09 19:08:38 -08:00
Heig Gregorian d92127c241 Initial commit for new installer_type 'apple-update-metadata'
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.
2013-02-06 13:53:43 -08:00
Greg Neagle a4ff92e4c6 Reset item[path] to original path after calling comparePlistVersion from compareBundleVersion. More debug output. 2013-02-05 10:06:10 -08:00
Greg Neagle 5ed68f819b makepkginfo -f now generates installs items with CFBundleShortVersionString and CFBundleVersion string keys if possible. 2013-02-04 16:05:05 -08:00
Greg Neagle 5feaa8ffd3 More clarifying comments in munkicommon.getVersionString() 2013-02-04 16:03:36 -08:00
Greg Neagle e3aef2bd7e Debug output tweaks when doing version comparisons 2013-02-04 15:14:47 -08:00
Greg Neagle 78d9ea6b49 Simplify implementation of compareBundleVersion() by just calling comparePlistVersion() to do the actual version comparison. Don't Repeat Yourself! 2013-02-04 15:00:21 -08:00
Greg Neagle 3c5d707ec1 Key name changes and behavior tweaks to Heig's submission for support for bundle/plist version keys other than CFBundleShortVersionString 2013-02-04 14:20:31 -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 19e06f73c9 Reset filelist2pkg config variable to defaults; removing my org's specific values. 2013-02-04 10:59:17 -08:00
Greg Neagle 097c6d8acb Merge branch 'versionkey' of https://code.google.com/r/theheig-conditionals 2013-02-04 10:46:24 -08:00
Greg Neagle 954dfe9934 Use readline and a OS X hack to allow editable default values when importing an item. 2013-01-28 13:58:16 -08:00
Greg Neagle 4b71ace130 Updated copyright info on all files with copyright info. 2013-01-28 11:55:09 -08:00
Greg Neagle 78810f67fc Address issue 214: munkiimport should not crash when editor is missing. Print an error message and continue. 2013-01-28 11:40:54 -08:00
Greg Neagle 6fffa1b025 Change updatecheck.checkServer for IPv6 compatibility. 2013-01-28 09:17:16 -08:00
Greg Neagle 344a754b66 Merge branch 'master' of https://code.google.com/p/munki 2013-01-14 15:07:47 -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 5d901765a1 Fix logouthelper from crashing 100% of the time.
updatecheck.discardTimeZoneFromDate() was renamed to subtractTimeZoneOffsetFromDate() in https://code.google.com/p/munki/source/detail?r=cc67bb8ca134c2782b15fb1c32ca8fa811a74f3d
2013-01-10 16:03:15 -05:00
Justin McWilliams ba6588acdd Force Munki to obtain temp directories within /tmp, to avoid rare, intermittent issue where tempfile.mkdtemp() would choose to create a temp dir on an NFS path, such as /home/<username>/tmp/, causing Munki to crash when attempting to chown/etc. 2013-01-09 17:32:31 -05:00
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