Commit Graph

69 Commits

Author SHA1 Message Date
Greg Neagle 325bc62e5a Changes to add pkg reference counting so we can correctly remove packages when multiple installed items have packages in common.
git-svn-id: http://munki.googlecode.com/svn/trunk@142 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-30 14:51:18 +00:00
Greg Neagle 6120f285f7 New tmpdir in munkicommon for use by all the other munki tools.
git-svn-id: http://munki.googlecode.com/svn/trunk@141 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-30 14:49:27 +00:00
Greg Neagle e1f8d4f700 Added support for a new 'installer_choices_xml' key, which supported embedding Installer ChoiceChangesXML files in a pkginfo plist. This allows you to specify custom installs.
Since multiple install items could now refer to a single installer pkg/mpkg,  we don't automatically delete the installer item after an install completes.Instead we check to see if we're going to need it again...

git-svn-id: http://munki.googlecode.com/svn/trunk@140 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-30 06:32:19 +00:00
Greg Neagle a7f6f98916 Commented out code that tried to reactivate MunkiStatus.app if it was deactivated when running over the login window. This had unfortunate visual effects if the loginwindow was displaying a dialog asking for permission to use an external account.
git-svn-id: http://munki.googlecode.com/svn/trunk@138 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-27 18:31:46 +00:00
Greg Neagle e539e167a4 Minor output message tweaks.
git-svn-id: http://munki.googlecode.com/svn/trunk@137 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-27 18:30:10 +00:00
Greg Neagle 8fc30b0f51 Suppress warnings when we cannot remove an non-empty directory when that directory is inside a bundle and --forcedeletebundles is true.
git-svn-id: http://munki.googlecode.com/svn/trunk@136 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-27 18:28:59 +00:00
Greg Neagle 45663239e8 Attempted fix to occasional osascript error.
git-svn-id: http://munki.googlecode.com/svn/trunk@135 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-27 18:27:25 +00:00
Greg Neagle 5228d462aa Fix to function to get available space on startup disk.
git-svn-id: http://munki.googlecode.com/svn/trunk@134 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-27 18:26:36 +00:00
Greg Neagle 9035f9d7aa Added support for selecting the "correct" installer item based on minimum OS version and supported architectures.
git-svn-id: http://munki.googlecode.com/svn/trunk@133 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-27 18:24:51 +00:00
Greg Neagle dca75a3b6c Fixed display of filesystem removal errors.
Reordered operations so receipts will be removed even if no filesystem items are removed (like in payload-free packages).
Suppress warning when encountering bogus BSD.pkg

git-svn-id: http://munki.googlecode.com/svn/trunk@132 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-24 18:32:45 +00:00
Greg Neagle 0d7c35646d Fixed display of software removals when detail is suppressed and the last removal item does not require a restart.
git-svn-id: http://munki.googlecode.com/svn/trunk@131 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-23 15:13:25 +00:00
Greg Neagle e022b20e0f removepackages.py:
-Tweaked output  - some stuff was getting printed at too low a verbosity level, and percentage-done output wasn't happening at normal verbosity.
	-When removing files, changed from using subprocess to call `rm` to using os.remove.  This is much faster.  I hope it handles resource forks OK...

git-svn-id: http://munki.googlecode.com/svn/trunk@130 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-22 17:27:01 +00:00
Greg Neagle ef7f0c3fa1 Fixed info on items that can't be installed because there is insufficient disk space. These were being incorrectly reported as ready to install.
git-svn-id: http://munki.googlecode.com/svn/trunk@129 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-21 15:48:24 +00:00
Greg Neagle b62cf4fc84 When running at the default verbosity, installer item downloads now show percentage-done feed back. This was a regression caused by the refactoring of the display/print/visual feedback functions.
Fixed info on items that can't be installed because there is insufficient disk space. These were being incorrectly reported as ready to install.

git-svn-id: http://munki.googlecode.com/svn/trunk@128 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-21 15:47:45 +00:00
Greg Neagle 552c0ebcd8 Added status message for disk mounting (since mounting the iLife dmg took so long...)
git-svn-id: http://munki.googlecode.com/svn/trunk@127 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-21 15:44:10 +00:00
Greg Neagle 58f99bd1ef Changed munkicommon.getExtendedVersion to match the observed behavior of Apple packages (iWork and iLife specifically).
Added more debug output during the version check process.

git-svn-id: http://munki.googlecode.com/svn/trunk@126 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-21 15:42:48 +00:00
Greg Neagle 54f869c4d5 Fixed error thrown when warning about insufficient disk space to download and install an installer item.
git-svn-id: http://munki.googlecode.com/svn/trunk@125 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-20 21:58:33 +00:00
Greg Neagle 03da6d471b Added missing Solid Aqua Blue.png resource.
git-svn-id: http://munki.googlecode.com/svn/trunk@124 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-20 18:37:09 +00:00
Greg Neagle 1701e13b6c More tools refactoring.
Added --logoutinstall and --manualcheck options for specific run modes.

When running in --logoutinstall mode, it now checks for the existence of a flag to make sure the user triggered the update.

--manualcheck now allows the GUI Managed Software Update.app to trigger an update check if the user manually launches Managed Software Update.app and there are no pre-staged updates.

git-svn-id: http://munki.googlecode.com/svn/trunk@123 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-20 18:35:06 +00:00
Greg Neagle d465661386 Much refactoring - common output/status functions are now in munkicommon.py and used by installer.py, updatecheck.py, and removepackages.py.
Since the HTTP stuff was used only by updatecheck.py, moved it from munkicommon.py into updatecheck.py.
The above changes made this easier: Added munkistatusoutput support to updatecheck.py

git-svn-id: http://munki.googlecode.com/svn/trunk@122 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-20 18:30:17 +00:00
Greg Neagle 72b3a9d0e3 Added support for displaying software removals; changed UI referring to "installs" to "updates" to cover both cases (installing and removing).
git-svn-id: http://munki.googlecode.com/svn/trunk@121 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-20 18:23:56 +00:00
Greg Neagle 3142cd8837 Changed banner message from "Managed Software Check" to "Managed Software Update" to match the name change.
git-svn-id: http://munki.googlecode.com/svn/trunk@117 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-14 18:20:44 +00:00
Greg Neagle e45c1876a7 Fixed the text view scrolling for the detail description.
git-svn-id: http://munki.googlecode.com/svn/trunk@114 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-14 18:08:07 +00:00
Greg Neagle d2c502f8e4 Removed the .pyc files committed by mistake.
git-svn-id: http://munki.googlecode.com/svn/trunk@113 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-14 18:06:49 +00:00
Greg Neagle 07cfc5235c Moved all support libraries into munkilib package.
Combined installcheck and managedinstaller into managedsoftwareupdate to avoid race conditions between the two tools.
Removed support for Apple Software Updates (because it didn't work correctly!)


git-svn-id: http://munki.googlecode.com/svn/trunk@112 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-14 18:04:34 +00:00
Greg Neagle a8a44ed50a When user clicks "Later", display an alert that the updates will be installed at the next logout.
git-svn-id: http://munki.googlecode.com/svn/trunk@111 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-09 06:14:30 +00:00
Greg Neagle 07fc86c9d7 munkilib.py:
- changes to pythonScriptRunning() to allow the tools to detect if another instance of themselves is running
- updated getBundlePackageInfo() to handle pre-dist style .mpkgs

removepackages.py:
- changes to handle multiple receipts with the same packageid

installcheck:
- removed random sleep option - this will move to another tool so we don't have installcheck itself sleeping; this prevented the other tools from running if you happened to, say, call managedinstaller while installcheck was sleeping.
- installcheck checks to see if another instance of itself is running and exits if so
- suppress errors when getting the primary manifest and trying long hostname, then short hostname, then "site_default".

makecatalogs:
- don't try to process ._ files or .DS_Store files.

makepkginfo:
- try to generate a better installer_item_location if the path has "/pkgs" in it




git-svn-id: http://munki.googlecode.com/svn/trunk@110 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-09 06:13:01 +00:00
Greg Neagle f508ad9f88 - Fix to remove items required by another item being removed. This used to work, and then I broke it. Fixed again.
- Better warning message when a item scheduled to be removed is also in the explict or implict install list.
- When attempting to retrieve the primary manifest, if no client identifier is specified, it now tries the following, in this order:
	fully-qualified hostname
	"short" hostname (this is new)
	"site_default" (this is new)


git-svn-id: http://munki.googlecode.com/svn/trunk@109 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-06-25 17:57:32 +00:00
Greg Neagle 768e8c4783 Managed Software Update.app:
Fixed display of alert panel when there are no scheduled updates.
Fixed error when deselecting all items in list of scheduled updates.

git-svn-id: http://munki.googlecode.com/svn/trunk@108 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-06-24 23:52:08 +00:00
Greg Neagle 9e2dd86424 Fixed issue where managedinstaller failed to restart the machine when required.
git-svn-id: http://munki.googlecode.com/svn/trunk@107 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-06-24 18:37:04 +00:00
Greg Neagle dbf031683c MunkiStatus.app: more fixes to loginwindow display: now behaves correctly when com.apple.loginwindow DesktopPicture is set to a bogus value.
git-svn-id: http://munki.googlecode.com/svn/trunk@106 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-06-24 17:36:42 +00:00
Greg Neagle a5db4a1b7b Fixed stupid typo in munkistatus.py
git-svn-id: http://munki.googlecode.com/svn/trunk@105 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-06-24 16:16:44 +00:00
Greg Neagle c435d139ba munkilib.py:
Workaround for broken ScriptingBridge to SystemConfiguration in an unreleased OS version.
removepackages.py: 
for an unreleased OS version, no longer manipulate the Apple receipts DB using sqlite3, but instead just use pkgutil (and other related changes)
munkistatus.py: 
munkistatus.message() now clears the detail field.
managedinstaller: 
removed explicit clearing of munkistatus detail
makecatalogs: 
more progress and error reporting when building catalogs
makepkginfo: 
add default catalogs, uninstallable, and uninstall_method info to dictionary



git-svn-id: http://munki.googlecode.com/svn/trunk@104 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-06-24 04:58:17 +00:00
Greg Neagle 7bec452b3e Changes to better display Desktop Picture over loginwindow on more OS versions and if /Library/Preferences/com.apple.loginwindow DesktopPicture points to a non-existant picture.
Added Solid Aqua Blue.png as a resource for use as a DesktopPicture of last resort.

git-svn-id: http://munki.googlecode.com/svn/trunk@103 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-06-24 04:47:04 +00:00
Greg Neagle d229889c65 Managed Software Update now defaults to using /Library/Managed Installs/InstallInfo.plist if /Library/Preferences/ManagedInstalls.plist is missing or the ManagedInstallDir key is missing.
git-svn-id: http://munki.googlecode.com/svn/trunk@102 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-06-24 04:41:28 +00:00
Greg Neagle 7e33fc841d Fixed the broken ImportBom function from my last update.
git-svn-id: http://munki.googlecode.com/svn/trunk@100 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-06-02 03:30:49 +00:00
Greg Neagle 012c41674d munkilib.py: fixed default ManifestURL and SoftwareRepo URL
removepackages.py: better output capture when calling `lsbom`
installcheck: better output capture when calling `softwareupdate`
		Now creates catalogs dir in ManagedInstallDir if it's missing
managedinstaller: better output capture when calling `installer`




git-svn-id: http://munki.googlecode.com/svn/trunk@99 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-28 21:30:38 +00:00
Greg Neagle 861172f5d1 MunkiStatus changes:
- changed scaling behavior of backdrop window to better handle displays with different aspect ratios
- main status window now auto-centers on app launch.

git-svn-id: http://munki.googlecode.com/svn/trunk@98 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-28 17:58:17 +00:00
Greg Neagle ad8c6abe13 Changed preference keys in ManagedInstalls.plist to be more Apple-like (managed_install_dir becomes ManagedInstallDir, and similar).
munkilib now uses Foundation/NSDictionary methods to read /Library/Preferences/ManagedInstalls.plist in case the plist gets converted to binary (for example, if it was modified using the defaults command).

Added support for Software Update downloads that aren't .pkgs, or .mpkgs, but rather directories containing ".dist" files.

installcheck now uses the values of LastNotifiedDate and DaysBetweenNotifications in ManagedInstalls.plist to throttle  Managed Software Update.app notifications. The default behavior is to notify no more than once a day.



git-svn-id: http://munki.googlecode.com/svn/trunk@93 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-27 18:31:06 +00:00
Greg Neagle fb6a181b58 Added support for notification of downloaded Apple Software Updates (see relevant changes to installcheck and managedinstaller).
When choosing "Install without logging out", a file is touched in the managed install directory (typically /LibraryManaged Installs/) so that a launchd LaunchDaemon can be triggered.

git-svn-id: http://munki.googlecode.com/svn/trunk@88 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-22 19:08:41 +00:00
Greg Neagle 82ad48c60e Added support for installcheck and managedinstaller to handle Apple Software Updates.
Moved some functions from makepkginfo to munkilib so installcheck could use them.
Added checking to installcheck, managedinstaller, and removepackages.py so they warn and exit if run by a non-root user.
Added checks to installcheck and mamangedinstaller so that they exit if the other is running.


git-svn-id: http://munki.googlecode.com/svn/trunk@87 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-22 19:05:57 +00:00
Greg Neagle b37a3d9884 Renamed managedinstaller.py to managedinstaller.
(an earlier attempt to rename ManagedInstaller directly to managedinstaller caused the local file to be deleted and the commit to fail, so I did the rename in two steps/two commits)

git-svn-id: http://munki.googlecode.com/svn/trunk@75 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-20 16:37:11 +00:00
Greg Neagle 9ab12d5a8f Renamed managedinstalls.py to munkilib.py.
Removed cfconsoleuser.py. Its function was added to munkilib.py.
Renamed ManagedInstaller to managedinstaller.py. Next commit it will be renamed to managedinstaller.
Renamed removepackages to removepackages.py
Refactored removepackages.py so it can be called as a Python module as well as a command-line tool.
managedinstaller.py now calls removepackages.py as a module instead of as a subprocess.
Cleaned up globals in installcheck, managedinstaller, and removepackages.
Removed bad copyright info from makcatalogs.


git-svn-id: http://munki.googlecode.com/svn/trunk@74 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-20 16:34:17 +00:00
Greg Neagle bc8b3d2870 ManagedSoftwareUpdate:
New icon. New copyright notice. New bundle ID (com.googlecode.munki.managedsoftareupdate).  Now recommends a logout before install even if a restart is not required.

git-svn-id: http://munki.googlecode.com/svn/trunk@73 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-20 16:22:59 +00:00
Greg Neagle 13e91c27dc MunkiStatus:
New icon. New copyright notice. New bundle ID (com.googlecode.munki.munkistatus)

git-svn-id: http://munki.googlecode.com/svn/trunk@72 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-20 16:20:53 +00:00
Greg Neagle 07c640d35b Forgot to add cfconsoleuser.py to repository, so missed on earlier commit. This is the code that ManagedInstall uses to determine if someone is logged in at the console.
git-svn-id: http://munki.googlecode.com/svn/trunk@71 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-18 21:00:44 +00:00
Greg Neagle d3466e29e8 ManagedInstaller: added detection of logged in user with warning dialog if a restart is needed
installcheck: beginning of error reporting code.  Currently just prints to stdout.

git-svn-id: http://munki.googlecode.com/svn/trunk@69 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-18 20:23:35 +00:00
Greg Neagle 3f19a73186 Log out and install button triggers a logout instead of a restart; it's now up to ManagedInstaller to do the right thing.
git-svn-id: http://munki.googlecode.com/svn/trunk@68 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-18 20:19:54 +00:00
Greg Neagle babd41b221 Added support for loginwindow masking when run at loginwindow.
git-svn-id: http://munki.googlecode.com/svn/trunk@67 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-18 20:18:32 +00:00
Greg Neagle 577f0a0c73 Added missing license info to .h and .m files in ManagedSoftwareUpdate and MunkiStatus
git-svn-id: http://munki.googlecode.com/svn/trunk@65 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-05-12 19:24:37 +00:00