Commit Graph

75 Commits

Author SHA1 Message Date
Greg Neagle
fddd138000 Bumping version to 1.0.0. Updated copyright dates. 2014-01-10 08:20:15 -08:00
Hannes Juutilainen
ae71171d70 Merge branch 'master' into development
* master:
  More localization fixes.
  Localization fix for the message: 'A restart is required after updating. Please be patient as there may be a short delay at the login window. Log out and update now?'
  Updated Swedish localization by peter.wreiber@gmail.com
  Track whether an update was installed in "only_unattended" mode or not in InstallResults, for additional reporting on various Munki servers.
  updated spanish strings for consistency
  Change application data collection code so that system_profiler SPApplicationsDataType is called only once per Munki session, even if system_profiler fails or hangs.
  Remove -d option from munkiimport as it conflicts with -d option to makepkginfo
  Don't display 'Running installcheck_script/uninstallcheck_script for foo...' messages when checking for updates.
  Support for installing AAMEE/CCP packages that include updates.
  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.
  Fix case where munkicommon.getAppBundleExecutable() returns None due to non-existent Info.plist, causing Munki to crash when parsing the None executable name.
  Patch to adobeutils.py from Pepijn Bruienne <bruienne@gmail.com> to allow makepkginfo to properly parse an Adobe Creative Cloud product package built with Creative Cloud Packager.
  Fix typo in French localization.
  Updated French localization from Richard Lafontaine <iceman.grrrr@gmail.com>
  Add Swedish localization from Peter Wreiber <peter.wreiber@gmail.com>
  minor correction to the spanish translation
2013-06-18 09:16:40 +03:00
Greg Neagle
2422aa7f10 Remove -d option from munkiimport as it conflicts with -d option to makepkginfo 2013-05-31 16:00:46 -07:00
Hannes Juutilainen
df9e9202fb Merge branch 'master' into development
* master:
  Fix makepkginfo --force_install_after_date to create a date object for the pkginfo plist instead of a string.
  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".
  Add --repo_path and --repo_url options to munkiimport to allow the user to override the default repo_path and repo_url options set via munkiimport --configure at runtime
  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.
  Change apple_item logic in updatecheck.processRemoval to match that in updatecheck.processInstall. Specifically, allow admin to override detection of apple_item by explictly setting it in the pkginfo.
  Update version.plist to 0.9.0 for next development round.
2013-05-03 08:22:33 +03:00
Adam Reed
00e6afc33c Add --repo_path and --repo_url options to munkiimport to allow the user to override the default repo_path and repo_url options set via munkiimport --configure at runtime 2013-04-18 21:10:01 +10:00
Hannes Juutilainen
8ca86a0d1c Added support for volume mount points
Munkiimport can now take volume mount points as arguments
(/Volumes/SomeApp/) and resolve them to a disk image file.
2013-03-14 15:16:53 +02:00
Greg Neagle
0bb162dbfc Some Unicode/UTF-8 fixes for munkiimport. 2013-03-12 11:03:06 -07:00
Greg Neagle
cce11a4fc0 Better error checking when processing receipts and installs items when building our catalogDB; pylint cleanups 2013-03-08 14:14:38 -08:00
Greg Neagle
dbca31a486 Fix dumb copy-and-paste error in last commit that caused munkiimport to crash with NameError: global name 'item_version' is not defined 2013-03-06 21:42:44 -08:00
Greg Neagle
45de2d3b21 Changes to munkiimport: 1) Always append version number to uploaded dmg or pkg if not there originally; code clean up around the renaming. 2013-03-06 16:41:16 -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
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
Greg Neagle
731a470cbe Remove hack that allowed in-place editing of suggested/default values for prompts; does not work properly on remote sessions. 2013-02-12 13:42:10 -08:00
Heig Gregorian
e25b5aacf7 Merged with munki master; manually resolved 'munkiimport' merge conflicts 2013-02-12 10:00:12 -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
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
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
Timothy Sutton
6e6b050a37 fix for munkiimport only checking dmgs and apps - should check hasValidInstallerItemExt() 2012-07-11 15:25:25 -04:00
Timothy Sutton
93ca31bd3b Further refactoring for hasValid extension check functions
- hasValidPackageExt(), hasValidDiskImageExt() for the appropriate
  extensions, and hasValidInstallerItemExt() to call them
- replace many checks to use the above
- munkiimport.py now uses munkicommon.isApplication() to do the
  equivalent of checking endswith('.app')
- fix an errand merge ancestor from an old unrelated munkiimport
  branch
2012-07-11 13:56:23 -04:00
Greg Neagle
1841b79866 PyLint formatting cleanups 2012-05-22 15:39:14 -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
Heig Gregorian
855fb9986c Revert "Converted '--configure' option as a callback."
This reverts commit a2c593be9c.
2012-05-03 18:54:22 -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
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
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
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
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
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
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
00e0407d6e Merge branch 'cli' of https://code.google.com/r/davvid-munki-cli 2012-02-29 10:24:28 -08:00
Greg Neagle
7c910a1180 makecatalogs now skips all files that start with a period. Minor output tweak in munkiimport. 2012-02-28 20:58:07 -08:00
David Aguilar
3510b3b994 munkiimport: Add --unattended-install flag
Allow setting the 'unattended_install' package metadata
from the command-line.
2012-02-28 13:48:31 -08:00
David Aguilar
91bdbd6ec7 munkiimport: Add --min-os-ver and --max-os-ver options
Allow setting the maximum_os_version and minimum_os_version
package info fields from the command-line.
2012-02-28 11:30:17 -08:00
Greg Neagle
6804a86fb9 Merge branch 'cli' of http://code.google.com/r/davvid-munki-cli 2012-02-23 14:43:57 -08:00
Greg Neagle
ba47144877 makecatalogs now will attempt to use the repo_path defined using munkiimport --configure if no repo path is given on the command line. All errors and warnings are now printed at the end to increase their visibility. munkiimport updated to (normally) suppress most of makecatalog's output unless --verbose is given. 2012-02-23 14:42:54 -08:00
David Aguilar
bec6f53c3d munkiimport: Specify catalogs from the command-line
Add a --catalog option so that we can specify the default
catalogs to use from the command-line.  Multiple catalogs can
be specified by specifying the option multiple times.
2012-02-22 17:49:41 -08:00
Greg Neagle
6b9f040461 munkiimport: encode all key values in UTF-8 before printing 2012-02-14 08:23:54 -08: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
25a9315cba mount_nfs fix for munkiimport and manifestutil 2011-09-13 15:14:32 -07:00
Lars Fronius
e45f31fe07 Why shouldn't manifestutil and munkiimport use nfs, and why shouldn't it be the same function for both? 2011-09-05 15:08:26 +02:00