Commit Graph

1093 Commits

Author SHA1 Message Date
Greg Neagle ddd34cd88d Get rid of the MACHINE and CONDITIONS globals in updatecheck.py 2016-12-16 12:50:33 -08:00
Greg Neagle be3224dc0f Cleanup of predicateInfoObject() and predicateEvaluatesAsTrue() 2016-12-16 12:38:13 -08:00
Greg Neagle 228ce76ebb Replace direct access to the MANIFESTS global in manifestutils.py with getter and setter fucntions 2016-12-16 12:13:25 -08:00
Greg Neagle 5a78efcb7b Move getDataFromURL function from updatecheck.py to fetch.py 2016-12-16 11:16:41 -08:00
Greg Neagle e79dc726f1 Move manifest functions in updatecheck.py to new manifestutils.py module 2016-12-16 10:58:42 -08:00
Greg Neagle d822191720 Move updatecheck.getResourceIfChangedAtomically() to fetch.munki_resource() 2016-12-16 10:10:06 -08:00
Greg Neagle 82f865e29e Get rid of yet another nasty global variable 2016-12-15 16:15:19 -08:00
Greg Neagle 133e32ec7f Rename certain functions that are intended for internal use only 2016-12-15 13:54:14 -08:00
Greg Neagle b0dd20018f Move the last function out of munkicommon/__init__.py 2016-12-15 13:43:11 -08:00
Greg Neagle dcedb3a418 Make munkicommon.stopRequested() work in all run modes 2016-12-15 08:40:35 -08:00
Greg Neagle bbd34966ca Always send status updates so MSC.app can display them if it is open. 2016-12-14 16:59:54 -08:00
Greg Neagle ddf1940bf6 Move authrestart module out of munkicommon to root of munkilib 2016-12-14 15:48:40 -08:00
Greg Neagle 38f1176194 Change string formatting in authrestart.py to match that of the rest of Munki code 2016-12-14 15:39:31 -08:00
Greg Neagle 61120839db Set global verbose and munkistatusoutput variables via munkicommon.display module 2016-12-14 15:17:17 -08:00
Greg Neagle b63531bd8a munkicommon __init.py__ almost free of functions... 2016-12-14 15:07:38 -08:00
Greg Neagle 705e4d5239 Move functions that get process info into processes module 2016-12-14 11:54:01 -08:00
Greg Neagle 7b8aa53833 Move information-gathering functions into info module; move constants into constants module 2016-12-14 11:38:14 -08:00
Greg Neagle 67feb23d69 in dmgutils, replace all print >>sys.stderr output with display_error() 2016-12-14 10:56:18 -08:00
Greg Neagle 3a3b801566 Move package/receipt utilities into their own module 2016-12-14 10:50:30 -08:00
Greg Neagle 0cb4636cf3 Add initial osutils module; update authrestart 2016-12-14 10:16:09 -08:00
Greg Neagle 932e4269d3 Move authrestart functions into their own module; remove abandoned munkicommon.py and munkiprefs.py 2016-12-14 10:07:40 -08:00
Greg Neagle 04e6483f7e Start of munkicommon refactor. 2016-12-14 09:55:05 -08:00
Greg Neagle 4566764a90 Move preferences functions and classes into munkiprefs.py 2016-12-13 15:57:12 -08:00
Greg Neagle a28d492399 Instead of using nasty module global variables, cache config_profile_info's results in a function arribute 2016-12-13 15:13:26 -08:00
Greg Neagle ac003c8db4 Use memoize decorators to cache results of expensive functions without nasty module globals 2016-12-13 15:01:20 -08:00
Greg Neagle 74aed49f22 Reorganize exceptions reported by fetch.py (especially getResourceIfChangedAtomically and friends); updatecheck.checkServer rewritten to use fetch/gurl functions for the check (therefore using system proxies); exit updatecheck if there is a failure to retrieve any manifest (included_manifests as well). Addresses #560. Addresses issue reported on Slack with reaching repos hosted in the cloud from behind a web proxy. 2016-12-13 13:46:56 -08:00
Greg Neagle f8205be609 Simplify manifest retrieval logic 2016-12-12 15:21:04 -08:00
Greg Neagle 4030c6b52f Doc string fix for fetch.get_url() 2016-12-12 14:14:53 -08:00
Greg Neagle 4125dcc196 Now that checking and downloading Apple Software Updates have been combined into a single action, change the status text 2016-12-12 10:28:46 -08:00
Wesley Whetstone ef6627b74e readding changes to munkicommon 2016-12-01 10:38:23 -08:00
Greg Neagle 5ae397eee4 Merge branch 'fv-auth-restart' 2016-11-28 10:44:33 -08:00
Greg Neagle f3ee1d83e4 Some attempts to remove possible unicode issues 2016-10-17 10:49:43 -07:00
Greg Neagle 84271f6bb8 Bumping version.plist to 2.8.2 for upcoming bug-fix release 2016-10-12 16:34:06 -07:00
Greg Neagle 0269b1a89c Fix for 'ImportError: cannot import name kCFNetworkProxiesHTTPSEnable' on older versions of OS X 2016-10-12 10:34:50 -07:00
Samuel Keeley 52ad24583c Catch unicode error messages for downloads
On Yosemite the error message can have a `'` in it.

```
Downloading Command_Line_Tools_OS_X_10.10_for_Xcode_7.2-7.2.0.0.1.1447826929.dmg...
    0..20.WARNING: Download of Command Line Tools for Xcode failed: Error -1001: The operation couldn't be completed. (NSURLErrorDomain error -1001.)
ERROR: Unexpected error in updatecheck:
Traceback (most recent call last):
  File "/usr/local/munki/managedsoftwareupdate", line 1052, in <module>
    main()
  File "/usr/local/munki/managedsoftwareupdate", line 743, in main
    client_id=options.id.decode('UTF-8'))
  File "/usr/local/munki/munkilib/updatecheck.py", line 3027, in check
    installinfo)
  File "/usr/local/munki/munkilib/updatecheck.py", line 2172, in processManifestForKey
    item, cataloglist, installinfo)
  File "/usr/local/munki/munkilib/updatecheck.py", line 1993, in processInstall
    iteminfo['note'] = 'Download failed (%s)' % errmsg
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 33: ordinal not in range(128)
```
2016-10-05 11:02:47 +02:00
Greg Neagle 9a3cff59f5 Remove strange extra characters that got inserted 2016-09-22 17:36:06 -07:00
Greg Neagle e1983a19b4 Attempt to provide some progress feedback when installing/removing Adobe CC 2015.X products using the new HD format. 2016-09-22 17:17:46 -07:00
Samuel Keeley fc2a70f121 catch the exception if /var/run/syslog is not listening 2016-09-14 14:26:24 -07:00
Greg Neagle 1a48bac756 Additional debug logging in appleupdates.py; more consistent way of getting product IDs in GetAvailableUpdateProductIDs 2016-09-06 12:15:37 -07:00
Greg Neagle 475c40287e Better detect and handle failed Apple update download sessions 2016-09-06 11:19:17 -07:00
Greg Neagle 906400ded4 Merge pull request #641 from munki/adobe-hyperdrive
Add support for `makepkginfo` and new Adobe installers
2016-08-12 09:11:17 -07:00
Timothy Sutton 7a7fa3d47d lint fixes 2016-08-12 11:45:46 -04:00
Timothy Sutton 6481335929 Also retrieve BaseVersion and version from Application.json
- may be helpful to have more data available if needed later
2016-08-12 11:39:41 -04:00
Timothy Sutton 0e942ce45f Filter out non-HD installers when searching for prodVersion metadata 2016-08-12 11:39:02 -04:00
Timothy Sutton aabc0ea205 Retrieve SAPCode key in optionXML.xml for both RIBS and HD
- so that we have this key regardless of RIBS and HD installers
- fixes #649
2016-08-12 09:56:23 -04:00
Greg Neagle 93baecaffb Merge branch 'master' of https://github.com/munki/munki 2016-08-11 21:33:00 -07:00
Greg Neagle 748767055a Bump version for next round of development and testing 2016-08-11 07:17:46 -07:00
verycarefully 293a5aa832 Fix another lint error pep8 didn't catch. 2016-08-08 14:27:40 -04:00
verycarefully 9eda5213c0 Fix up more lint errors. 2016-08-08 14:23:58 -04:00
verycarefully 66d02caeaf Fix lint warnings. 2016-08-08 12:25:41 -04:00