Commit Graph

91 Commits

Author SHA1 Message Date
Heig Gregorian
647cb861f4 Support for providing 'destination_item' name when processing a "drag n drop" installation. 2012-07-02 12:54:21 -07:00
Heig Gregorian
ebbeaf7c4c Added support for "(un)installcheck_script" inclusion into a pkginfo file.
Syntax is the same as any previous script embed.
2012-06-29 11:30:06 -07:00
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
Heig Gregorian
798c721ec6 Added option to specify uninstall method; '--uninstall_method' 2012-05-31 06:54:56 -07:00
Heig Gregorian
f2bdb2a0d2 Specifying stand-alone --installer_environment options allows for the generation of the 'installer_environment' dict
This is similar to generating an 'installs' array of dicts.
2012-05-23 09:31:13 -07:00
Greg Neagle
1841b79866 PyLint formatting cleanups 2012-05-22 15:39:14 -07:00
Heig Gregorian
5c54651577 Improved handling of empty 'installer_environment' 2012-05-22 13:32:34 -07:00
Heig Gregorian
84455e5ef3 Init installer_environment_dict in case its creation goes badly 2012-05-22 12:47:51 -07:00
Heig Gregorian
b4e908c952 Formatting update to stay at or under 80 columns 2012-05-22 11:02:32 -07:00
Heig Gregorian
3ccfedd931 Added --installer_environment option 2012-05-22 09:19:31 -07:00
Heig Gregorian
5b7db50146 Descriptions updated for '--autoremove, -requires, --update_for, and --notes'; blocking applications option is now --blocking_application to match similar singular usage of --catalog, etc. 2012-05-22 07:19:35 -07:00
Heig Gregorian
725fb0f4cc Abbreviated "PACKAGE" and "APPLICATION" metavars 2012-05-21 18:26:30 -07:00
Heig Gregorian
6682b863ca Added support for newly introduce 'minimum_munki_version' pkginfo key. 2012-05-21 18:22:05 -07:00
Heig Gregorian
b6bf37369d Cleaner '--force_install_after_date' help print out 2012-05-21 18:06:08 -07:00
Heig Gregorian
44a54bd69d Minor help formatting clean-up 2012-05-21 17:18:06 -07:00
Heig Gregorian
89afee0a17 Re-work of options in meaningful categories, complete with easier to read formatting
Also removed 'options.appdmg' check since this options no longer exists.
2012-05-21 16:54:24 -07:00
Heig Gregorian
343a43fdfe Reorganization of options printed from usage statement
Option list has become quite large and required some type of
organizational structure.  This is an attempt to provide that.
2012-05-15 20:26:41 -07:00
Heig Gregorian
b2a8066d6c '--vers' option conflicts with '--version'; changed to '--pkgvers' 2012-05-11 08:29:21 -07:00
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
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
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
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
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
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
534a8a1ac5 Usage information updates for "update_for, requires, and blocking_applications" 2012-05-01 14:37:17 -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
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
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
Greg Neagle
0e0f0b48b0 Clearer error message when more than one argument is given to makepkginfo and munkiimport. 2012-01-17 08:33:08 -08:00
Greg Neagle
ca03bb0325 Output tweaks; munkicommon.mountdmg() can now mount disk images containing End User License Agreements 2012-01-04 13:54:04 -08:00
Greg Neagle
51f79798e1 makepkginfo now allows "naked" pre- and postuninstall_script options (that is, no package needed):
makepkginfo --preuninstall_script=/path/to/script
makepkginfo --postuninstall_script=/path/to/script

git-svn-id: http://munki.googlecode.com/svn/trunk@1199 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-25 17:09:18 +00:00
Greg Neagle
b176a55c0d Add support for pre- and postuninstall_script options to makepkginfo.
git-svn-id: http://munki.googlecode.com/svn/trunk@1191 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-24 02:40:26 +00:00
Greg Neagle
3dce11a31b Expand '~' and '~username' constructions in paths to pre/post/uninstall_scripts.
git-svn-id: http://munki.googlecode.com/svn/trunk@1166 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-06 04:13:09 +00:00
Greg Neagle
f6f28d8255 Add:
--postinstall_script
  --preinstall_script
  --uninstall_script
options to makepkginfo to assist in embedding these kinds of scripts.

git-svn-id: http://munki.googlecode.com/svn/trunk@1164 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-05-05 21:03:17 +00:00
Greg Neagle
1c9e5784c1 - forced_installs and forced_uninstalls now work with items that are part of a dependency relationship
- makecatalogs now has no OS X-specific dependencies

- munkiimport fixes for repos hosted via SMB/CIFS.

git-svn-id: http://munki.googlecode.com/svn/trunk@1097 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-04-06 21:54:29 +00:00
Greg Neagle
69705bb33e Change version number handling to eliminate padding/truncating version numbers to five positions (ala 1.0.0.0.0).
git-svn-id: http://munki.googlecode.com/svn/trunk@1016 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-31 21:38:47 +00:00
Greg Neagle
a853f78c9f Update copyright dates across the board.
git-svn-id: http://munki.googlecode.com/svn/trunk@1010 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-25 18:22:14 +00:00
Greg Neagle
abe3d2a1de appleupdates.py now creates its own .dist files to manage installation of downloaded Apple Software Updates, replacing the earlier technique of just installing the individual packages in filename order.
In most invocations of subprocess.Popen, change the bufsize from 1 to -1, which changes from line-buffered to "big" buffers.

Other minor changes to align with the appleupdates,py changes and some pylint-recommended cleanup.

git-svn-id: http://munki.googlecode.com/svn/trunk@995 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-14 19:11:05 +00:00
John Randolph
ffe6722d87 wrap os.listdir() to decode utf-8 unicode into unicode objects
change all code locations using os.listdir() to use munkicommon.listdir()



git-svn-id: http://munki.googlecode.com/svn/trunk@941 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-30 16:28:45 +00:00
MagerValp
7e8931968d Added --version/-V to all interactive tools.
git-svn-id: http://munki.googlecode.com/svn/trunk@846 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-23 08:37:37 +00:00
Greg Neagle
157f82b690 Removed abandoned Adobe options from usage check.
git-svn-id: http://munki.googlecode.com/svn/trunk@842 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-21 22:50:31 +00:00
Greg Neagle
fec07df83e Again trying to remove MunkiStatus
git-svn-id: http://munki.googlecode.com/svn/trunk@804 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-16 00:30:30 +00:00
Justin McWilliams
543fa4397a makepkginfo: added notes in --help about --description and --display_name overriding any such values in the package itself.
git-svn-id: http://munki.googlecode.com/svn/trunk@798 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-15 18:30:53 +00:00
Justin McWilliams
427c6c826c makepkginfo:
add --description and --displayname args to set description and display_name pkginfo plist keys.



git-svn-id: http://munki.googlecode.com/svn/trunk@795 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-14 19:40:43 +00:00