Commit Graph
4172 Commits
Author SHA1 Message Date
Zorg 3244bf7f14 Move installer status info service to progress agent 2016-07-18 21:14:33 -04:00
Zorg 50594dda57 Move execute package out from SUFileManager 2016-07-18 19:48:25 -04:00
Zorg dd02cb2509 Change Autoupdate target from app to command line tool 2016-07-18 18:46:12 -04:00
Zorg 66e3083e0c Initial work on removing AuthorizationExecuteWithPrivileges
I need to at least look at:
* Automatic downloaded / silent updates
* Running updates as root user from beginning
* Status info query service
* Add guided flag in the appcast
2016-07-18 17:40:35 -04:00
Zorg 6b5f014946 Release self if we fail to set up termination callback 2016-07-17 10:54:15 -04:00
Zorg 849d265900 Use kqueues to determine if a process identifier terminates
This way we don't have to rely on AppKit for watching when the target process dies
2016-07-16 21:58:41 -04:00
Zorg 59af8ae0ba Remove old reachability related code/comments 2016-07-16 17:21:57 -04:00
Zorg f7f9ac4c6d Terminate the running application matching the bundle rather than ourselves
This allows the standard user driver to properly be used remotely
2016-07-16 16:59:54 -04:00
Zorg 3939fcfb82 Update Installation documentation 2016-07-16 16:34:01 -04:00
Zorg e0109e2fd5 Have executable path be inside arguments array 2016-07-16 13:09:08 -04:00
Zorg da185de61b Rationalize which domain we submit jobs under 2016-07-16 13:04:10 -04:00
Zorg e00d303c08 Don't log that we're terminating the app
This way if installation takes a long time, it may not look like it is because of termination.
2016-07-16 12:11:52 -04:00
Zorg c37fc24389 Rename AutoUpdate to Installer for service name functions 2016-07-16 08:58:34 -04:00
Zorg a962c8fa8f Make sure Mach service names are shorter than 64 characters
NSXPCConnection has this length restriction on 10.8 and possibly later versions of macOS
2016-07-16 08:30:37 -04:00
Zorg ea6625024c Improve detecting if the updater is still alive
Rather than just testing if our connection is still alive (which is deceiving), we make a ping/pong request and see if we get a response back.
2016-07-15 16:48:26 -04:00
Zorg 64d740a761 Don't log SMJobRemove() job not found error
Also rationalize why we aren't first checking if the job already exists
2016-07-13 22:55:20 -04:00
Zorg 2c3996a522 Add timeouts if the installer or updater don't respond back in timely matter
This is only for creating the initial connection
2016-07-13 22:28:36 -04:00
Zorg 97eb25b27f Supply the base URL when loading external release notes
This fixes an issue where relative external references could not be loaded from the release notes.
Note this just affects apps that have a 'com.apple.security.network.client' entitlement or apps that aren't sandboxed.
2016-07-13 18:00:06 -04:00
Zorg e171824a74 Merge branch 'master' into ui-separation-and-xpc 2016-07-13 00:28:14 -04:00
Zorg a65a7346cf Fix 10.8 bug by re-declaring method in Installer connection protocol
Even though the method is declared in the super protocol type, the XPC decoder on older systems (i.e, 10.8) doesn't parse methods there.
2016-07-12 23:25:27 -04:00
Zorg 7092c19652 Remove accidental SparkleInstallerConnection copy in framework 2016-07-12 21:19:28 -04:00
Zorg 69b4b9e81b Fix installer progress app not terminating properly
This is done by canceling apple termination events, and by exit'ing later
2016-07-12 20:43:53 -04:00
Zorg 8563a40cd2 Use XPC for IPC to the installer instead of CFMessagePort
We now use XPC for communication between Sparkle.framework and Autoupdate.
Autoupdate is now ran as a launchd agaent/daemon. (Most of the time, it acts as an agent).

Using XPC can only be done from non-sandboxed processes, so a connection and status service had to be created.

Currently, the GUI progress tool doesn't work properly, but everything else should be behaving like before.
2016-07-12 19:59:24 -04:00
Zorg 80bc8353ed Handle defer installation when resuming updates in sparkle-cli 2016-07-12 19:50:00 -04:00
Kornel 092feba9f9 Merge pull request #836 from zorgiepoo/remove-reachability
Don't use reachability as a preflight check
2016-07-08 10:27:13 +01:00
Zorg 91c813b6ab Don't use reachability as a preflight check
This removes the reachability code that we have for background scheduled updates.
Apple (and others) don't recommend using reachability to test if a network connection is online.

See:
http://stackoverflow.com/questions/7178330/what-is-the-advantage-of-using-reachability
https://www.mikeash.com/pyblog/friday-qa-2013-06-14-reachability.html (just the comments)
Apple 2012/2011 WWDC videos on networking

Also, our current reachability code is rather illogical:

* reachabilityResult is always NO
* isNetworkReachable is always YES
* flags is ignored
* horrible use of dispatch_sync & putFeedURLIntoDictionary is terrifying
* NSException handling shouldn't be done

Removing this code which wasn't even coded properly, and which would still be misusing the reachability API anyway, also leads to removing some multithreading races and simpler logic :)
2016-07-06 22:38:49 -04:00
Kornel 1ced9c428a Merge pull request #834 from zorgiepoo/dsa-key-comment
DSA security check comment
2016-07-05 14:44:11 +01:00
Zorg 16de00d81d If the old & new DSA keys are the same, then DSA validation must pass for security 2016-07-04 23:43:05 -04:00
Zorg 7d1c0aa83b Merge branch 'master' into ui-separation-and-xpc 2016-07-04 23:29:09 -04:00
Zorg 1b5b4972c9 Document -grantAuthorizationPrivilegesWithError: 2016-07-04 21:33:51 -04:00
Zorg ddb4262b7b Rename and document -updateAccessTimeOfItemAtRootURL:error: 2016-07-04 21:25:54 -04:00
Zorg 599c3fb3c1 Add unit test for updating access dates 2016-07-04 21:10:49 -04:00
Zorg b8bb06fb2f Change step # references to section names now 2016-07-04 19:56:23 -04:00
Zorg 63febfd9cd Updating installation docs into sections rather than bulleted points
Also make some other changes with choice of wording
2016-07-04 19:51:40 -04:00
Zorg b4f7a28aa3 Add updater delegate immediate installation handler to installation docs 2016-07-03 20:18:21 -04:00
Zorg 998a349617 Add updater delegate method for installing & relaunching new update 2016-07-03 18:44:11 -04:00
Zorg 9881476008 Update updater delegate documentation 2016-07-03 14:22:22 -04:00
Zorg 340633fd79 Comment more on why launching Autoupdate with LaunchServices is necessary 2016-07-03 11:54:28 -04:00
Zorg a615703883 Suppress const void* to void* warning for context info 2016-07-03 00:42:42 -04:00
Zorg e4d6e268e2 Stage 2 installation seems to be handled fine 2016-07-03 00:24:38 -04:00
Zorg e32d0dbc1a This validation warning note isn't a real concern for now 2016-07-02 23:32:56 -04:00
Zorg ef4af6b4a8 Marking main parameters as unused 2016-07-02 23:31:05 -04:00
Zorg 8de5c5cfa2 Update installation data documentation 2016-07-02 23:30:36 -04:00
Zorg 54408ca1a9 Fix bug where updater ignored 3rd stage installation failures
Only prevalent if the updater lives in a different process than the app being updated
2016-07-02 23:23:57 -04:00
Zorg 4240138818 The installer shells out to authorization 2016-07-02 19:29:53 -04:00
Zorg 39f7915492 Non-guided pkg installers show progress already 2016-07-02 19:28:35 -04:00
Zorg 23a07127d0 Add installation documentation detailing IPC 2016-07-02 19:26:33 -04:00
Zorg 641f3b0d47 Update mdimporter bundles during delta extraction
During delta extraction, these bundles may not be updated appropriately, so we should just be safe and update them ourselves
2016-07-01 21:23:51 -04:00
Zorg a7aad3b16a Use the authorization environment when requesting for auth
This probably went missing accidently when I did a merge
2016-07-01 20:13:39 -04:00
Zorg a6ccd4cfa9 Avoid unguided package installers if we may be running as root 2016-06-30 22:14:19 -04:00