Commit Graph

533 Commits

Author SHA1 Message Date
MagerValp
22a1d254d6 Partial packages now have a unique package ID, e.g com.googlecode.munki.usr if you build a package with only /usr/local.
git-svn-id: http://munki.googlecode.com/svn/trunk@866 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-26 16:35:18 +00:00
Justin McWilliams
7afec5b605 Better implementation of r863; move verifyFileOnlyWritableByMunkiAndRoot() and runExternalScript() to new munkilib utils module that is 100% free of ObjC-dependant Python.
git-svn-id: http://munki.googlecode.com/svn/trunk@865 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-26 16:32:48 +00:00
Greg Neagle
963c5c319b Fix a too-long line in updatecheck.py
git-svn-id: http://munki.googlecode.com/svn/trunk@864 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-26 15:35:07 +00:00
Justin McWilliams
93adfde71f managedsoftwareupdate:
- if import of Python module with ObjC binding fails, call "report_broken_client" script where admins can setup desired reporting/notification.


git-svn-id: http://munki.googlecode.com/svn/trunk@863 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-26 13:49:40 +00:00
Justin McWilliams
aacad21154 verifyFileOnlyWritableByMunkiAndRoot()
For gid verification, instead of only checking file gid to match current user oir hardcoded 80, check current user's gid, admin's gid, and wheel's gid all dynamically looked up.


git-svn-id: http://munki.googlecode.com/svn/trunk@862 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-26 13:24:06 +00:00
Justin McWilliams
9a566d108e Move verifyFileOnlyWritableByMunkiAndRoot() from munkicommon to managesoftwareupdate, so it can be used without importing munkicommon.py.
This is in prep of a upcoming notification feature that cannot depend on ObjC Py bindings.  Alternatively, if we want to share such code, we can create a common/util module for only Pure-Python code, and doc that it should not contain any ObjC imports.


git-svn-id: http://munki.googlecode.com/svn/trunk@861 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-26 13:15:13 +00:00
Greg Neagle
8b36ffe59e Updated make_munki_pkg.sh to handle new munkilib/version.plist
git-svn-id: http://munki.googlecode.com/svn/trunk@860 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-26 05:33:02 +00:00
Greg Neagle
331813da86 get_version() now looks for and reads two files in the munkilib directory:
version.plist
svnversion

git-svn-id: http://munki.googlecode.com/svn/trunk@859 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-26 05:21:54 +00:00
Greg Neagle
91ba0a4af2 New munkilib/version.plist to keep track of the version.
git-svn-id: http://munki.googlecode.com/svn/trunk@858 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-26 05:20:07 +00:00
Greg Neagle
c682755898 Fix for missing LastSuccessfulDate in /Library/Preferences/com.apple.SoftwareUpdate.plist
git-svn-id: http://munki.googlecode.com/svn/trunk@857 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-25 19:01:49 +00:00
Greg Neagle
775f592608 New softwareUpdatePrefs() function to replace all the calling out to "defaults read"
git-svn-id: http://munki.googlecode.com/svn/trunk@856 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-25 18:45:58 +00:00
Greg Neagle
d693e7ac4b For optional installs, if there is not enough disk space to install the item, do not display a warning so we don't get spurious warnings in ManagedSoftwareUpdateReport.plist
git-svn-id: http://munki.googlecode.com/svn/trunk@855 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-25 17:41:53 +00:00
John Randolph
be912bca2f merge finalized branch /get-apps-nfs-detect into trunk
git-svn-id: http://munki.googlecode.com/svn/trunk@854 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-25 17:23:23 +00:00
MagerValp
99037fe71d munkicommon.format_time() updated to use Foundation.NSDate().
git-svn-id: http://munki.googlecode.com/svn/trunk@853 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-25 16:09:58 +00:00
MagerValp
35563cb6e0 Changed ManagedInstallReport.plist timestamps to ISO 8601 format, with timezone information.
git-svn-id: http://munki.googlecode.com/svn/trunk@852 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-25 14:48:03 +00:00
Greg Neagle
1e4c4c74dc Clean up some vestiges of the support for aliases.
If there's a download error, make sure what gets sent to munkicommon.display_error is a string; otherwise we get an unhandled exception when writing out our report.

Add "localmanifestpath" option to updatecheck.check(). This may be used if I implement the alternate Apple Software Update mechanism, and should also be useful for a future Puppet package provider or any programmatically-generated manifest.

git-svn-id: http://munki.googlecode.com/svn/trunk@847 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-24 04:13:20 +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
9b7e165f53 Another dumb syntax error fix
git-svn-id: http://munki.googlecode.com/svn/trunk@841 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-21 22:37:20 +00:00
Greg Neagle
3d41ec7430 Fix for displaying names of items to be removed when ManagedInstalls.plist's ShowRemovalDetail is True
git-svn-id: http://munki.googlecode.com/svn/trunk@840 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-21 20:56:19 +00:00
MagerValp
e9f93c26f0 Added flat package creation. Bundle package creation is still the default, set FLAT=YES in the script to change.
git-svn-id: http://munki.googlecode.com/svn/trunk@838 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-21 18:18:58 +00:00
MagerValp
b50c867f55 Fixed package creation script version detection when using a mixed version working copy.
git-svn-id: http://munki.googlecode.com/svn/trunk@837 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-21 17:29:24 +00:00
MagerValp
e68c35172f Updated the package creation script:
• Package version is calculated from munki version and svn revision.
• Package info and resources are set up before calling packagemaker.
• Package creation is made mainly with standard user privileges, sudo is used where necessary.
• It's now possible to build partial packages by specifying one or more of Applications, Library, and usr (everything is included by default).

A little more work is needed to build flat packages due to differences in package information handling.

git-svn-id: http://munki.googlecode.com/svn/trunk@836 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-21 16:46:13 +00:00
Greg Neagle
d7c52a9434 Fixed string substitution error
git-svn-id: http://munki.googlecode.com/svn/trunk@835 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-21 13:27:12 +00:00
Greg Neagle
131d3873c9 Added some additional logging and info messages, all logoutinstall-type installs (including 'checkandinstallatstartup') now do not check for system idle, but just install.
git-svn-id: http://munki.googlecode.com/svn/trunk@831 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-20 16:57:48 +00:00
Greg Neagle
64144bfe17 Log when we skip an Apple Software Update check
git-svn-id: http://munki.googlecode.com/svn/trunk@830 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-20 16:49:41 +00:00
Greg Neagle
f9d1b2b3bd Fix unhandled exception in munkicommon.prefs() when the prefs file is missing by replacing orphaned "prefsfile" with "MANAGED_INSTALLS_PLIST_PATH"
git-svn-id: http://munki.googlecode.com/svn/trunk@829 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-20 16:41:10 +00:00
Greg Neagle
4029836c08 Fix for empty pkginfo extension.
git-svn-id: http://munki.googlecode.com/svn/trunk@823 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-19 23:09:34 +00:00
Greg Neagle
f552e1e6f4 Bump MSU.app version to 3.0.7 since there were changes to the code.
git-svn-id: http://munki.googlecode.com/svn/trunk@822 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-19 18:14:31 +00:00
Greg Neagle
b52f45cdf0 More print statement cleanup.
git-svn-id: http://munki.googlecode.com/svn/trunk@821 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-19 17:22:55 +00:00
Greg Neagle
b78ba8e03c More cleanup -- replacing print statements with calls to munkicommon.display_* methods.
git-svn-id: http://munki.googlecode.com/svn/trunk@820 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-19 17:15:41 +00:00
Greg Neagle
fbb20c5ac5 Tweaks to what gets printed to stdout and stderr during a run; overall effect is to make managedsoftwareupdate quieter by default.
git-svn-id: http://munki.googlecode.com/svn/trunk@819 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-19 17:03:28 +00:00
Greg Neagle
e2ca3f8c78 If there are GUI users and we have forced_* items, recheck munkiUpdatesAvailable() before trying to notifiy the user so we don't notify if we have nothing left to do.
git-svn-id: http://munki.googlecode.com/svn/trunk@818 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-19 04:00:57 +00:00
Greg Neagle
27a4aafbc8 Don't record the forced_install or foreced_uninstall key if the item requires a restart or logout, or is part of a dependency relationship.
git-svn-id: http://munki.googlecode.com/svn/trunk@817 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-19 03:42:25 +00:00
Greg Neagle
a127ec769d If running with only_forced=True, remove the forced_* items from the managed_installs list and the removals list and rewrite InstallInfo.plist.
git-svn-id: http://munki.googlecode.com/svn/trunk@816 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-19 03:28:54 +00:00
Greg Neagle
ab3900dffa Missed a place to check the new munkicommon.pref('AppleSoftwareUpdatesOnly')...
git-svn-id: http://munki.googlecode.com/svn/trunk@815 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-18 21:40:06 +00:00
Justin McWilliams
07876be714 First iteration of forced installs/uninstalls.
If pkginfo key forced_(un)install is set to <true/>, (un)installs will run immediately after downloading without any notification the user.  If further non-forced installs are remaining MSU.app will appear after all forced-installs are finished.

This needs documentation about how risky it is; should only be used for simple packages that are known to be safely installed while app is running. More features will come in the future making it safer to use on other packages.



git-svn-id: http://munki.googlecode.com/svn/trunk@814 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-18 21:20:11 +00:00
Justin McWilliams
7f44c0c40e - s/unattended/forced/
- separate forced_installs and forced_uninstalls, so they one can be forced while the other is not.
 - move status output enabling to the only place it's necessary; --auto at login window.
 - move forced install run to top of "GUI user exists" conditional instead of two places within.  (Greg, please verify this is okay).



git-svn-id: http://munki.googlecode.com/svn/branches/unattended-installs@813 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-18 19:08:39 +00:00
Justin McWilliams
dc5c2e373d Run forced/unattended updates before checking if the user should be notified; notify them afterwards if any remaining attended installs remain.
1) disable status output (GUI)
2) run unattended installs
3) reenable status output (GUI)
4) notify user or remaining installs (if LastModifiedDate is happy)

Also, change logging a little to make it easier to see difference between regular install run and unattended run.


git-svn-id: http://munki.googlecode.com/svn/branches/unattended-installs@812 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-18 17:59:06 +00:00
Greg Neagle
c27ba9a3d2 When "AppleSoftwareUpdatesOnly" is True, no need to set "InstallAppleSoftwareUpdates"
git-svn-id: http://munki.googlecode.com/svn/trunk@811 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-18 17:31:50 +00:00
Greg Neagle
14b3241f4d Add support for running the munki tools without a munki repo to install Apple Software Updates only.
git-svn-id: http://munki.googlecode.com/svn/trunk@810 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-18 17:26:37 +00:00
Justin McWilliams
fedb392b9b First iteration of forced/unattended/silent installs.
Notes:
 - Needs documentation about how risky this is, and how it should only be used
for simple packages that are known to be safely installed while app is running.
 - If notification is popped up, it will contain the unattended install; if
notification is not due to be popped up the unattended install will be installed
immediately.
  - Only works in --auto mode (which is what launchd execs); I will test more tomorrow with manual runs, as we may be able to do this before --installonly too.



git-svn-id: http://munki.googlecode.com/svn/branches/unattended-installs@809 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-18 00:25:18 +00:00
Greg Neagle
bdf573c867 Removed organization specific data from mistaken commit.
git-svn-id: http://munki.googlecode.com/svn/trunk@805 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-16 00:33:21 +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
Greg Neagle
76c8828592 Added option to specify a file extension for pkginfo files.
git-svn-id: http://munki.googlecode.com/svn/trunk@803 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-16 00:25:21 +00:00
Greg Neagle
734738144a More cleanup of MunkiStatus from repository
git-svn-id: http://munki.googlecode.com/svn/trunk@802 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-16 00:21:22 +00:00
Greg Neagle
8cad7d54d6 Deleted redundant rm -r of "$PKGDIR/munkitools-$VERS.pkg"
git-svn-id: http://munki.googlecode.com/svn/trunk@801 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-16 00:02:07 +00:00
Greg Neagle
3a4ee4d0c4 Initial commit.
git-svn-id: http://munki.googlecode.com/svn/trunk@800 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-15 23:44:26 +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