Commit Graph

119 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
Greg Neagle
d6906958c7 Always add catalog info to pkginfo. Fixes issue with --nopkg. Thanks to masonm@the-jci.org. 2013-11-05 15:20:49 -08:00
Greg Neagle
11aa83062f makepkginfo now inserts some user/environment metadata into generated pkginfo files. It stores the metadata under the '_metadata' key. makecatalogs now strips any key starting with _ from pkginfo before adding the pkginfo to a catalog. 2013-11-04 10:43:06 -08:00
Greg Neagle
036788722a Code formatting, line length, and whitespace cleanup 2013-10-08 09:30:29 -07:00
Greg Neagle
2ce6f6127c Merge branch 'makepkginfo-display_name' of https://github.com/hjuutilainen/munki 2013-09-03 09:25:05 -07:00
Michael Lynn
65ab4e4153 Added --nopkg option to set installer_type to nopkg
Moved several options (description, display name, name, version) outside of the argument-requiring code block to assist in nopkg pkginfo creation.
2013-08-13 10:36:57 -07:00
Hannes Juutilainen
d4d43ec448 Added missing display_name option for apple_update type 2013-07-24 09:11:52 +03: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
5aff95e9cd Support for installing AAMEE/CCP packages that include updates. 2013-05-17 10:20:28 -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
Greg Neagle
8558292a63 Fix makepkginfo --force_install_after_date to create a date object for the pkginfo plist instead of a string. 2013-04-24 17:01:35 -07:00
Hannes Juutilainen
1093f6a55f Minor refactoring and documentation 2013-03-14 15:15:24 +02:00
Hannes Juutilainen
24d43c22da makepkginfo supports creating installer items from a mount point
makepkginfo now accepts a mount point of a disk image (/Volumes/Disk Image). Mount point will resolve to a dmg file and that file will be used as an input item. Additionally -i/--itemname option takes absolute paths for easily defining items to be copied.
2013-03-13 13:51:08 +02:00
Hannes Juutilainen
8f458abd28 makepkginfo now checks for existing mountpoints
makepkginfo checks if the disk image is already mounted and if so, uses the existing mount point without trying to attach the image a second time.
2013-03-13 11:04:48 +02:00
Hannes Juutilainen
757a72d5ee Respect "version_comparison_key" when determining pkginfo version 2013-02-27 09:57:49 +02: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
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
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
4b71ace130 Updated copyright info on all files with copyright info. 2013-01-28 11:55:09 -08:00
Adam Reed
5c51cefb8f Automate the setting of minimum_os_version to the highest detected OS version dependent upon what we automatically detect from the installer items and / or file item(s) in the following situations:-
* makepkginfo with installer item - set minimum_os_version as detected
* makepkginfo with installer item and file item(s) - set minimum_os_version as detected
* makepkginfo with file item(s) only - do not provide minimum_os_version, regardless of what we detect
* makepkginfo with --minimum_os_version and any of the above options - set minimum_os_version to argument of --minimum_os_version, regardless of what we detect

This patch also sets flat packages to default to 10.5.0 (instead of 10.4.0 which is used for all other items) and requires that if --minimum_os_version is provided that it starts with a digit.
2012-09-05 12:33:35 +10:00
Heig Gregorian
b3705ea7b5 Fixes to force unmount call; __CFPREFERENCES_AVOID_DAEMON environment variable set to '1' upon makepkginfo invocation 2012-08-22 14:40:18 -07:00
Heig Gregorian
ca3786fe8a Fix for cfprefsd interference; ensure that stdout stream only contains pkginfo xml and not messages intended for the user. 2012-08-22 13:49:57 -07: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
Heig Gregorian
66a4b763c0 Minor changes to wording of "destination item (name)" option to indicate that it is a name and not a full path.
This option is now stored as 'options.destitemname'
2012-07-06 10:17:43 -07:00
Heig Gregorian
eb75e13be9 Typo fixed for setting 'blocking_applications' array
Option is called '--block_application', however, it should be written
as 'blocking_applications' to the pkginfo dict.
2012-07-06 08:53:48 -07:00
Heig Gregorian
af723cb710 Updates to help docs provided by "drag-n-drop" options such that they don't explicitly refer to what's been set by '--item', but rather the item that's been copied.
Option help takes on a more generic tone to reflect the possibility
that '--destinationitem' has been specified.
2012-07-03 16:10:39 -07:00
Heig Gregorian
147acdd92a Inline documentation added to provide a bit of clarity 2012-07-03 08:53:46 -07:00
Heig Gregorian
2e05588206 Improved help output for '--destinationitem' option.
Explicitly states that the "installs" item's path is modified such that
it includes the alternate name as opposed to the disk image item's
original name.
2012-07-03 08:45:53 -07:00
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