Commit Graph

700 Commits

Author SHA1 Message Date
Greg Neagle b4eb55cd84 makepkginfo now warns when provided a read/write disk image, and does not generate an installer_item_hash. 2012-06-27 16:06:09 -07:00
Greg Neagle fa5052e247 Merge branch 'master' of https://code.google.com/p/munki 2012-06-25 15:00:59 -07:00
Greg Neagle cc0ac78964 When matching blocking_applications against running processes, do not match executables inside a bundle, but not in Contents/MacOS. 2012-06-25 15:00:48 -07:00
Heig Gregorian 58dbc9fb95 Added check for 'destination_item' when processing 'remove_copied_items' so that the correct item is removed. 2012-06-22 09:47:20 -07:00
Justin McWilliams 12b3957a53 New Preferences class with ManagedInstallsPreferences and SecureManagedInstallsPreferences subclasses, making it easier for admins to manage preferences from preflight/postflight scripts. This is especially helpful now that reading from and manipulating plists on disk is no longer reliable starting with 10.8. This class functions well on 10.6+, though (possibly even 10.5).
Example:

from munkilib import munkicommon

regular_prefs = munkicommon.ManagedInstallsPreferences()
repo_url = regular_prefs.get('SoftwareRepoURL', '')
... make use of repo_url how you wish ...

secure_prefs = munkicommon.SecureManagedInstallsPreferences()
secure_prefs['AdditionalHttpHeaders'] = [list, of, headers]
2012-06-22 12:25:49 -04:00
Heig Gregorian 7289bfefa2 Doc inconsistancy fixed. 2012-06-21 07:55:12 -07:00
Heig Gregorian 75d385a45d Mostly variable renames to better illustrate the process, especially if a 'dest_item' has been provided
NOTE: 'copy_as' has been renamed to 'dest_item', serving as the
counterpart to 'source_item'.
2012-06-21 07:50:00 -07:00
Heig Gregorian 1991a12312 Provide method for copying an item from a mount point as something other than its 'source_item' name
Note that if an admin is to provide an alternate name using 'copy_as',
the corresponding 'installs' item (if provided) should match this name.
2012-06-20 20:32:56 -07:00
Greg Neagle 01a78cf732 In updatecheck.installedState(), if there is a problem with the installs or receipts data in the pkginfo item, return 1 to prevent marking the item as needing to be installed. Thanks to Heig Gregorian. 2012-06-12 13:29:37 -07:00
Justin McWilliams d2ae26c9fd Merge branch 'master' of https://code.google.com/p/munki 2012-06-06 14:12:36 -04:00
Justin McWilliams d841599fb4 Add year and timezone offset to log output. 2012-06-06 14:12:02 -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 61738f6712 Change messsage displayed when running an Adobe CS5 install since CS6 installs use the same code 2012-05-31 11:26:14 -07:00
Greg Neagle 1841b79866 PyLint formatting cleanups 2012-05-22 15:39:14 -07:00
Greg Neagle 60feab1db6 Merge branch 'makepkginfo' of https://code.google.com/r/theheig-conditionals 2012-05-22 14:27:30 -07:00
Greg Neagle 30d924c7af Minor formatting changes; flatten valid manifest checks in getPrimaryManifest() 2012-05-22 14:09:53 -07:00
Heig Gregorian b4e908c952 Formatting update to stay at or under 80 columns 2012-05-22 11:02:32 -07:00
Heig Gregorian c7cd0416ad Merge branch 'master' into makepkginfo 2012-05-21 18:08:34 -07:00
Nate b5875fd21e Fixed more indents 2012-05-21 14:51:02 -04:00
Nate 3156ac77c2 Fixed tabs 2012-05-21 14:38:31 -04:00
Nate ad7a690572 Made suggested changes 2012-05-21 14:09:17 -04:00
Nate c8102cfaf3 Added support for serial numbers 2012-05-21 13:02:10 -04:00
Greg Neagle 065d3c0359 Add support for a 'minimum_munki_version' key for pkginfo items. Munki will not attempt to install an item if the current Munki version is less than the version specified by minimum_munki_version. 2012-05-17 20:06:22 -07:00
Greg Neagle 949a915900 When writing ApplicationInventory.plist, use a try/except block to avoid errors causing an uncaught exception 2012-05-14 22:45:32 -07:00
Greg Neagle 7d16e0aa4b Make sure item version is not None when using system_profiler data for non-bundle apps. 2012-05-14 21:21:35 -07:00
Justin McWilliams 62c85c68e2 The item is no longer an array. 2012-05-14 17:47:43 -07:00
Justin McWilliams ad7da41e2a Optimize the new getSPApplicationData() functionality.
My machine has 48 non-bundle apps, and 596 dicts in the new SP cmd's _items array, which is 28.6K loop iterations.  This change reduces that down to 1.
2012-05-14 17:39:37 -07:00
Greg Neagle 57736f188a munkicommon.getAppData() now consults system_profiler data for info on non-bundle applications 2012-05-14 15:15:29 -07:00
Greg Neagle 790eac57a9 Print error message when killing /usr/sbin/installer job due to timeout 2012-05-10 08:21:03 -07:00
Heig Gregorian 2ad06f6605 Merge branch 'master' into makepkginfo 2012-05-09 21:20:32 -07:00
Greg Neagle 0184652d29 Attempt to add timeout back to installer operation. 2012-05-09 19:59:33 -07:00
Greg Neagle db76245023 When installing, call /usr/sbin/installer through our launchd.Job() object. Works around issues with recent Microsoft Office 2011 updates. 2012-05-09 16:28:19 -07:00
Heig Gregorian b4ba365fe9 Added '--force_install_after_date' option to 'makepkginfo'; uses a new function defined in 'munkicommon.py' for validation (see below).
munkicommon.validateForceInstallAfterDateFormat may be useful in other
areas.

The function is tolerant to some "errors" such as single-digit month or
day or even two-digit year.
2012-05-01 11:39:16 -07:00
Heig Gregorian 1e0d0842c7 Argument passed to 'getChoiceChangesXML' now matches the argument used in preceding calls to 'getPackageMetaData'
Minor usage note changed for '--installer_choices_xml' as well as
proper os_version comparison as to NOT exclude Mac OS X 10.6.6.

Modified 'munkicommon.getChoiceChangesXML' to return 'choices' even if
empty.
2012-05-01 08:49:46 -07:00
Heig Gregorian ad90d63611 Options added to makepkginfo
--unattended_install
--unattended_uninstall
--minimum_os_version
--minimum_os_version
--installer_choices_xml (ONLY 10.6.6 or later)

Code to generate installer_choices_xml added to munkicommon.py library.
2012-04-30 18:53:55 -07:00
Heig Gregorian 5244f03e5a Merge branch 'master' into dev 2012-04-30 07:27:19 -07:00
Justin McWilliams 9efc4c7680 Fix ccb5f6b6cc -- move skipdirs into global const that's a prepopulated set of exclusion dirs. 2012-04-27 16:59:15 -04:00
ogle ccb5f6b6cc Add /private/* to the isExcludedFilesystem skipdirs.
Also, change skipdirs from a list to a set for far faster "in" operator performance.
2012-04-27 20:38:44 +00:00
Heig Gregorian 33e90e562e Merge branch 'master' into dev 2012-04-27 10:38:28 -07:00
Greg Neagle 39dcec0c44 Changes in updatecheck to better find installed items that have overlapping receipts with other items in the Munki repo. This specifically makes Munki better able to identify iLife'08 vs. iLife'09 vs. iLife'11, and therefore makes Munki actually capable of removing any of these, which was problematic before. 2012-04-27 10:28:32 -07:00
Greg Neagle f1f0846e2e Fix for munkicommon.getLSInstalledApplications(): use NSURL instead of FSRef, so no need to call LaunchServices.LSGetApplicationForURL(). Faster and hopefully more reliable. 2012-04-27 10:25:19 -07:00
Greg Neagle b5e9c4e607 Bump version.plist to 0.8.3 for next series of releases 2012-04-27 10:22:12 -07:00
Heig Gregorian ca5cc92277 Write all available conditions (admin-provided and built-in) to a 'Conditions' dict in 'ManagedInstallReport.plist'
Previously, admin-provided conditions were written to the
'ConditionalItems' dict.  Some built-in information was also being
written to the 'MachineInfo' dict, however this is not fully
representative of all built-in conditions that are collected.  Since
INFO_OBJECT is used as the basis for predicate comparison, its entirety
will be written to the 'Conditions' dict in
'ManagedInstallReport.plist', replacing 'ConditionalItems'.  The
'MachineInfo' dict will remain untouched as it is used for reporting
mechanisms.
2012-04-27 08:51:11 -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 fc2b388209 Deprecation warning if install_type 'appdmg' is encountered; display error instead of just logging if we encounter an install_type we don't know how to handle. 2012-04-10 11:46:38 -07:00
Greg Neagle d67452e56a refactor of copying items from disk image to fix some logic errors. Thanks to raphendyr. 2012-04-10 11:36:07 -07:00
ogle 6c243e74a0 s/Retreiving/Retrieving/ in 'Retreiving catalog "%s" ...' MSU message.
i before e except after c
2012-03-27 22:08:55 +00:00
Greg Neagle 21079ca718 Skip /.MobileBackups directory when scanning for apps; make sure all Exceptions are converted to strings before sendning to display_error 2012-03-25 19:21:54 -07:00
Greg Neagle b0e713fdda Fix a call to lookForUpdatesForVersion() with the wrong number of parameters 2012-03-22 14:58:58 -07:00
Greg Neagle d95481b93e Merge branch 'dev' of http://code.google.com/r/theheig-conditionals 2012-03-13 21:16:32 -07:00