152 Commits

Author SHA1 Message Date
Greg Neagle
75e0722e8f makepkginfo now can parse an app's Info.plist's LSMinimumSystemVersionByArchitecture (if it exists) for minimum_os_version information 2016-05-24 14:35:07 -07:00
Greg Neagle
12d4f0d27e Update copyright info on files; remove abandoned tools from code/tools 2016-03-15 09:32:28 -07:00
Nick McSpadden
4cbafebbbf Fixed typo 2016-02-25 17:00:03 -08:00
Greg Neagle
37276f5307 Better determination when munkiimport item is an apple_update_metadata item; fixes bug where 'munkiimport --apple-item' worked but 'munkiimport --apple_item' failed, despite makepkginfo --help indicating both syntaxes should work. 2015-12-02 10:54:43 -08:00
Samuel Keeley
5c12185da4 Replace http://www.apache.org/licenses/LICENSE-2.0 with https://www.apache.org/licenses/LICENSE-2.0 2015-11-13 20:35:24 -08:00
Greg Neagle
fd75be09fa Remove mistaken addition of OnDemand flag to configuration pkginfo in makepkginfo 2015-07-03 15:39:06 -07:00
klou
069c8be699 add arguments check to criteria test
Checks for a single argument (installer item) as well as has_valid_install_critieria.  Multiple arguments fail via other checks, zero arguments (script_options) pass for pkginfo generation.
2015-06-10 13:08:24 -07:00
Brian Warsing
23423504fe fix issue #476
makepkginfo was crashing when trying to access non-existent keys in the catinfo
object. Replace `[]` accessor method with `get`.
2015-05-05 15:40:44 -07:00
Greg Neagle
85892be850 Merge branch 'one-time-tasks' 2015-04-15 08:54:50 -07:00
Erik Gomez
511d7f596c remove --ondemant_script
:(
2015-03-26 20:41:37 -05:00
Greg Neagle
7dbbf8f368 Add installer_type == 'apple_update_metadata' to has_valid_install_critieria function so makepkginfo doesn't warn when making pkginfo for apple_update items. 2015-03-25 11:36:51 -07:00
Erik Gomez
5253c5ec9d Add options for --ondemand_script and --OnDemand
Example:

makepkginfo --name RepairPermissions --displayname "Repair Permissions" --description "This tool will repair your disk permissions. This is helpful if you are experiencing issues with your machine." --nopkg --pkgvers=1.0 --unattended_install --ondemand_script="RepairPermissions.sh" --OnDemand
2015-03-23 18:56:18 -05:00
Greg Neagle
42a70f284c Tweak makepkginfo's warning message when there is no installation check info 2015-03-14 13:00:49 -07:00
Brian Warsing
79b319fa3e revise warning message and adjust formatting
Revise warning msg to remove ref to missing PayloadIdentifier and clean-up the
multiline string formatting to make it easier to read.
2015-03-14 11:36:56 -07:00
Brian Warsing
45ec79557a update warning to include PayloadIdentifier msg
In the unlikely event a profile with a missing PayloadIdentifier is
successfully parsed, produce a warning.
2015-03-14 09:54:47 -07:00
Brian Warsing
eba3458790 add PayloadIdentifier as install criteria
PayloadIdentifiers are used to determine install status. Add this to the list
of acceptable install criteria.

In addition, DRY out the code and supply an explicit return value.
2015-03-14 09:47:10 -07:00
Brian Warsing
2557fd48bd produce a warning when install criteria is missing
Adds a check that produces a warning to stderr when the package being parsed
does not contain:
- a populated installs array
- a populated receipts array
- a populated installcheck_script
2015-03-14 08:24:38 -07:00
Brian Warsing
8a018bbc0d insert new func has_valid_install_critieria
Inspects compiled catalog info dictionary for valid install criteria.
Returns boolean.
2015-03-14 08:05:32 -07:00
Brian Warsing
ac663350b0 kill hanging whitespace
Rather than including this in an effective commit, kill this hanging whitespace
in a separate commit on the off-chance it needs to be reverted.
2015-03-14 08:03:29 -07:00
Greg Neagle
ba387f2b7c Convert all command-line arguments to Unicode (assuming utf-8 encoding) to eliminate issues with item paths containing Unicode characters 2015-03-13 12:20:20 -07:00
Greg Neagle
b145d6f0ce Display an error message when attempting to import a profile that does not nave a PayloadType of 'Configuration' 2015-02-19 17:00:59 -08:00
Greg Neagle
7f9f99f6e5 When creating pkginfo for a configuration profile, set minimum_munki_version to 2.2 2015-01-20 08:24:06 -08:00
Greg Neagle
a4a0d9d544 Merge config-profile-support into master 2015-01-13 06:55:24 -08:00
Greg Neagle
58d8a07dec Clean up the tmpdir on exit of iconimporter, makepkginfo and munkiimport 2015-01-09 15:08:52 -08:00
Greg Neagle
cb81e4616a Support for signed profiles. 2014-12-17 11:54:06 -08:00
Greg Neagle
64ae22c36d makepkginfo can now handle profiles that are missing the PayloadDescription field. 2014-12-17 10:16:08 -08:00
Greg Neagle
b61a858f66 Add uninstallable=True to generated pkginfo; check that a profile is a "Configuration" profile (not "configuration") 2014-12-17 06:09:02 -08:00
Greg Neagle
83fabfb5ce Add support for importing, installing and removing configuration profiles. 2014-12-16 21:57:41 -08:00
Greg Neagle
63a3b69775 Always return a plist when --verify-options-only is given. Fixes issues with --apple-update and --nopkg when given to munkiimport. 2014-11-24 18:51:10 -08:00
Greg Neagle
a6955fd0d4 Initial explict support for Adobe CCP packages. Use to import a CCP installer and uninstaller. 2014-11-03 14:01:20 -08:00
Greg Neagle
423ec8b790 PyLint cleanup: replace all unused_foo variables with dummy_foo variables to make PyLint happy 2014-10-26 11:42:33 -07:00
Greg Neagle
d94b8cfdf1 makepkginfo: if -i/--item is specified, don't try to guess if a dmg contains an Adobe installer 2014-09-02 22:38:31 -07:00
Greg Neagle
e90cfccc6f Add options for --category, --developer, and --icon-name to munkiimport for future use in Munki 2 2014-03-26 16:37:44 -07:00
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