Commit Graph

974 Commits

Author SHA1 Message Date
Heig Gregorian
284587203a '--name' and '--vers' options added
As with '--display_name', if specified, these 2 new options override
discovered package information.
2012-05-11 08:17: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
339e474b1f Merge branch 'master' into makepkginfo 2012-05-09 07:43:27 -07:00
Heig Gregorian
d855f3125c Added hyphenated equivalents to every option that includes underscores
The previous addition of '--max-os-ver', '--min-os-ver', and
'--unattended-install' prompted this change to provide similar naming
conventions across all options.
2012-05-09 07:34:13 -07:00
Heig Gregorian
08e49636df Safer prepend of '--verify-options-only'. Fixed broken pkginfo generation due to installer_item being wrapped into dmg and original installer_item not being removed from 'arguments' and the new dmg not being added to 'arguments' 2012-05-08 11:58:14 -07:00
Heig Gregorian
c6e23fbbd1 Improved usage print out by adding an epilog describing 'makepkginfo' option usage
Minor addition to 'PassThroughOptionParser' class to suppress default
formatting of 'epilog'.
2012-05-08 11:06:17 -07:00
Heig Gregorian
a919e1c669 When 'def makePkgInfo' testing mode is invoked, prepend '--verify-options-only' instead of appending
This resolves an edge case where an incomplete makepkginfo option may
be at the end of a string.  Prepending would "complete" the incomplete
option.  By appending, we're ensuring that the option cannot be
completed by the string "--verify-options-only"
2012-05-08 09:13:11 -07:00
Heig Gregorian
4f8ffeec40 Improved error interpretation for makePkgInfo testing mode 2012-05-08 08:33:18 -07:00
Heig Gregorian
5db39f6e7c Re-worked '--verify-options-only' function in makepkginfo. def makePkgInfo now assumes that the installer_item is located in the 'options' passed to it; added dedicated 'test_mode' variable.
Assuming that the installer_item is part of 'options' passed to 'def
makePkgInfo' simplifies the function as well as several other parts of
'munkiimport'; namely the removal of installer_item from the list of
arguments is no longer needed.  Additional exit codes added to
--verify-options-only are interpreted by 'def makePkgInfo' testing mode.
2012-05-08 07:31:17 -07:00
Heig Gregorian
d8a2623877 munkiimport / makepkginfo communications simplified by exiting if more than one potential installer_item has been specified.
Note that since the '/path/to/installer_item' could still be anywhere
within munkiimport options, it is essential to remove it from the
options list passed to 'makepkginfo' during pkginfo creation.
2012-05-07 19:58:18 -07:00
Heig Gregorian
6dbbe4c047 Added a '--verify-options-only' option to makepkginfo. Munkiimport makes use of this new option to derive installer_item. The overall result is that now, the /path/to/installer_item may be anywhere in the options string, however only the first /path/to/installer_item will be used.
def makePkgInfo can be passed an 'item_path' of "None" in order to
invoke the testing mode and its interpretation of various exit codes
including the presumed /path/to/installer_item and ignoring any
additional installer_items specified.
2012-05-07 13:35:22 -07:00
Greg Neagle
0ed65b7364 Better warning and safer behavior if a pkginfo's catalogs array contains an empty item (<string></string>) 2012-05-07 12:17:32 -07:00
Greg Neagle
076e92318d Merge branch 'master' of https://code.google.com/p/munki 2012-05-07 11:33:55 -07:00
Greg Neagle
3fe3450d7d Fix typo in networkUp() when checking for non-loopback interfaces 2012-05-07 11:33:42 -07:00
Heig Gregorian
6a7de46245 Merge branch 'master' into makepkginfo 2012-05-03 18:58:47 -07:00
Heig Gregorian
855fb9986c Revert "Converted '--configure' option as a callback."
This reverts commit a2c593be9c.
2012-05-03 18:54:22 -07:00
Heig Gregorian
f4f72174be Added new function to read an option_value as either a plain string or path to file
Since adding the '--notes' option, which can either be a simple string
or the contents of a file (if a valid path is supplied), this same
functionality has been extended to the '--description' option.

Providing a function so that this same operation can be used in other
areas seemed like the logical thing to do.
2012-05-03 11:14:34 -07:00
Greg Neagle
cbb4284f5a Initial localization support for Finnish courtesy Hannes Juutilainen <hjuutilainen@mac.com> 2012-05-03 09:51:17 -07:00
Heig Gregorian
a2c593be9c Converted '--configure' option as a callback.
--configure as a callback eliminates the need to check if the option
has been set to 'True'
2012-05-03 09:03:15 -07:00
Heig Gregorian
557ada518c Changes to how the 'installer_item' is removed from 'arguments' (presumed to be options for 'makepkginfo'). Removed redundant options which can now be referenced as 'makepkginfo' options. Nicer error reporting for 'makepkginfo' options failure 2012-05-02 21:01:48 -07:00
Heig Gregorian
01c3db99e6 Added alternate option names for 3 items specified as options in 'munkiimport' which are now present as options for 'makepkginfo' 2012-05-02 20:56:43 -07:00
Heig Gregorian
e74ecb583d Re-worked handling of passing 'makepkginfo' options through 'munkiimport'
'--makepkginfo-options' option has been removed in favor of providing
'makepkginfo' options alongside options native to 'munkiimport'.

This is accomplished by collecting all unknown options into
'arguments', which includes '/path/to/installer_item'.

Keeping with conventions typical for performing operations on a file,
'/path/to/installer_item' should always be last.
2012-05-02 13:08:41 -07:00
Heig Gregorian
6d45a7108b '--notes' option added
Notes provide an area for administrators to store information that is
purely reserved for administrative use and not considered in any type
of munki processing.
2012-05-01 18:35:33 -07:00
Heig Gregorian
c8ad63c707 Added tolerance to '--RestartAction' option
If a valid restart action is not provided, use best guess by keying
words "restart" and "logout" if they're provided within the argument's
string.
2012-05-01 15:43:30 -07:00
Heig Gregorian
463f3f2b61 Merge branch 'master' into makepkginfo 2012-05-01 14:41:42 -07:00
Heig Gregorian
534a8a1ac5 Usage information updates for "update_for, requires, and blocking_applications" 2012-05-01 14:37:17 -07:00
Greg Neagle
58bada0a5b More localization tweaks. 2012-05-01 14:31:20 -07:00
Heig Gregorian
bafb9a1701 '--autoremove' option added for 'makepkginfo'
Improved option usage information.
2012-05-01 14:22:09 -07:00
Heig Gregorian
03e6ddc1aa Three new array options for 'makepkginfo' added
--update_for - populates the 'update_for' array
--requires - populates the 'requires' array
--blocking_applications - populates the 'blocking_applications' array
2012-05-01 14:16:22 -07:00
Greg Neagle
620bb386e9 Adjust button sizes in Managed Software Update.app 2012-05-01 14:13:35 -07:00
Heig Gregorian
bd42067450 Added '--RestartAction' option to 'makepkginfo'
Valid actions that can be specified are:
RequireRestart
RequireLogout
RecommendRestart
2012-05-01 13:44:33 -07:00
Heig Gregorian
27e820f6c4 Minor usage update to '--makepkginfo-options' 2012-05-01 12:01:32 -07:00
Heig Gregorian
8aa107c843 Revert "Removed redundant options in 'munkiimport' as they are now present in 'makepkginfo' and can be triggered using the '--makepkginfo-options=' option."
This reverts commit 3349335fa7.
2012-05-01 11:59:56 -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
3349335fa7 Removed redundant options in 'munkiimport' as they are now present in 'makepkginfo' and can be triggered using the '--makepkginfo-options=' option.
Minor update to usage for '-makepkginfo-options' and provided an
example.
2012-05-01 11:36:30 -07:00
Greg Neagle
3814c70c26 Add initial French localization based on Claude Perrin's work 2012-05-01 11:18:18 -07:00
Heig Gregorian
467899b5bd Relocated the import of the 'shlex' module to other module imports for clarity
Minor modification to construction of 'cmd' in 'def makePkgInfo'
2012-05-01 08:59:39 -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
9c5ade47d3 Option to pass 'makepkginfo-style' options added
Any option available to 'makepkginfo' can be specified using the
'makepkginfo-options' flag.

Example:

munkiimport --makepkginfo-options="-c production -c testing
--description='A good description' --unattended_install
--minimum_os_vers=10.6.8" /path/to/pkg-or-dmg"
2012-04-30 19:34:38 -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
3fcf49ffc4 Fix munkiimport to look in default install location for makecatalogs if makecatalogs is not found in same directory as munkiimport. Thanks to Heig Gregorian 2012-04-27 10:23:45 -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