Commit Graph
2399 Commits
Author SHA1 Message Date
Zorg c811db1e67 Remove Release-HTTP build configuration 2016-08-01 22:17:20 -04:00
Zorg 5dfe4ce71b Set up ATS exceptions for Test App in release mode
Now the test app works properly when building it in release.
2016-08-01 22:02:18 -04:00
Zorg 1a3466ba04 Don't use TestAppHelper or code sign update in release 2016-08-01 22:01:30 -04:00
Zorg 52fd21e119 Reload NSBundle cache on its info plist dictionary
We reload the info dictionary before we start off an update driver. This is so that we have the latest up to date information for the bundle.
2016-07-31 20:38:48 -04:00
Zorg 411c0ac8bd Only pass host bundle identifier to probe methods 2016-07-31 20:32:21 -04:00
Zorg 682a47f4fa Update INSTALL file 2016-07-30 22:35:59 -04:00
Zorg b8df5d3023 Merge branch 'master' into ui-separation-and-xpc 2016-07-30 22:18:29 -04:00
Zorg a7e03c7f9b Add note about when installer ignores agent/updater invalidation 2016-07-30 20:46:46 -04:00
Zorg 607399f1e6 Comment on why agent is connecting to installer instead of vise versa 2016-07-30 20:41:03 -04:00
Zorg cc9f4d92af Update validation documentation 2016-07-30 18:05:57 -04:00
Zorg 5ad5598a19 Make sure update directory != nil during cleanup 2016-07-30 17:49:37 -04:00
Zorg 1ca233eadf Validate the update before extraction whenever possible
If we download a package type installation or a delta update, we should validate the update before trying to unarchive it.

We can't do this with ordinary updates because we handle changing of DSA keys for that particular case.
2016-07-30 17:36:22 -04:00
Zorg 2fc57ce288 Move installation validation to separate class 2016-07-30 16:03:52 -04:00
Zorg d42ac08bf2 Split connection agent counter into two separate variables 2016-07-30 15:38:09 -04:00
Zorg 97ce687b86 Update installation documentation 2016-07-30 14:20:20 -04:00
Zorg 23e027d02f Have progress agent terminate after relaunching, not after stopping progress 2016-07-30 14:18:39 -04:00
Zorg 8c564fef1f Remove +[SUFileManager defaultManager] and use alloc/init 2016-07-30 10:39:17 -04:00
Zorg 069f78579c Remove commented code 2016-07-30 01:23:03 -04:00
Zorg ea1b04391f Improve cache storage handling of files
We first create a directory with respect to the app's bundle ID being updated, sparkle's bundle ID, and a directory inside for a specific purpose. Then we remove all old directories inside there, and create a new unique temporary directory.

This is to avoid conflicts with eg: multiple updaters running against each other around the same time, or files for one function interfering with files from another purpose, while still having a way to clean up old files.
2016-07-30 01:00:14 -04:00
Zorg 32584ab228 Make content length RSS attribute optional but highly recommended 2016-07-29 21:17:16 -04:00
Zorg 5852ecf0e7 Improve handling of disallowing update interaction
When resuming updates, if interaction is disallowed, we can't continue on with interactive package installation
2016-07-29 20:21:53 -04:00
Zorg 0d0258a87f Rename un/nonguided package to interactive package, and guided to normal 2016-07-29 00:22:52 -04:00
Zorg 097710e27a Update sparkle-cli help usage and interactive flag 2016-07-29 00:16:24 -04:00
Zorg b967c2f13f Disallow interaction for interactive package installers if updater rejects it 2016-07-29 00:15:55 -04:00
Zorg 322ee026ea Fix installer tests 2016-07-28 23:28:44 -04:00
Zorg e2da47b7c7 Improve handling of storing files in cache
Create distinct subdirectories in our cache directory so files for different purposes won't conflict.

For the installer, move the download archive to the installer's cache location. If the installer is running as root, this moves it to a place only root can access I believe. This is also to prevent other functionality from touching these files.
2016-07-28 22:54:28 -04:00
Zorg 32bf570b4c Add some comments to installation process 2016-07-28 20:27:12 -04:00
Zorg bd352c7db5 Take out lot of unnecessary installation code now 2016-07-27 23:11:59 -04:00
Zorg 626e506cae Update codesign_xpc script to sign auxiliary executables too 2016-07-27 21:50:25 -04:00
Zorg cb6fd34448 Add signing for progress agent in the launcher XPC service
This is only for debug builds. Release products aren't signed. This allows the updater agent app to be placed in the installer launcher service's MacOS directory, which is more convenient for developers to sign.
2016-07-27 21:08:32 -04:00
Zorg 3be36d8f22 Don't pass installer/agent path to launcher XPC service
The InstallerLauncher code now tries to locate these tools inside Contents/MacOS/ or inside the Resources directory. The installer launcher XPC service now has a copy of the tools included in its bundle.

This may seem like wasting space but it enables eg, the XPC service not trusting a sandboxed application. A developer could always remove the tools from the Sparkle framework if necessary (we can't because the XPC services are optional..)

Using the XPC service allows the developer to sign the installer executable (Autoupdate.app). The agent app can be moved and signed into the MacOS executables directory as well. We don't do that automatically because Xcode's tooling doesn't play nice with attempting that, although that could be looked at later.
2016-07-27 19:57:46 -04:00
Zorg 8ab7bd6edb Rename XPC services to use reverse DNS style 2016-07-27 00:40:04 -04:00
Zorg 5ceeb3dfd3 Remove "incoming connection" log 2016-07-27 00:04:34 -04:00
Zorg 2191a2b6ed Improve termination & cleanup for progress agent & installer 2016-07-26 23:57:48 -04:00
Zorg 2eccc3a1db Remove unused header 2016-07-26 23:39:49 -04:00
Zorg c445a3f1e4 Remove linking to unused system frameworks 2016-07-26 21:10:22 -04:00
Zorg 6fc5dfb8e7 Simplify release quarantine method 2016-07-26 21:05:42 -04:00
Zorg 929705d6dd Update installer unit test 2016-07-26 21:05:25 -04:00
Zorg 9e1664b42e This function shouldn't be concerned about symlinks
Besides, the path passed into this function in our code comes from a NSBundle
2016-07-26 20:50:23 -04:00
Zorg 260235b2a0 Break retain cycles rather than using weak ref for connection handlers 2016-07-26 20:42:15 -04:00
Zorg 646ed6f3c4 Improve logic for allowing installer interaction
We now distinguish between the updater delegate allowing interaction and the update driver allowing interaction. We also remove an interaction allowed flag from the AppInstaller, letting shouldShowUI flag suffice.
2016-07-26 20:00:56 -04:00
Zorg f9e2609fa1 Update is no longer cancelable after installation begins 2016-07-26 19:25:49 -04:00
Zorg 0ca688073b Disable root support & checking
Assume that the updater will be run as a logged in user.
The command line driver and progress app aren't completely root safe anyway, and running the progress app under a different user could be quite awkward from root
2016-07-26 19:16:38 -04:00
Zorg 9f4e44f919 Don't move old app to Trash
Several reasons:
* The user may not look at the trash anyway, and it would bloat their HD space
* Other sofware updaters don't move old versions to the trash either. Can confuse the user or not be seemly transparent experience.
* Moving app to trash will not work if user has to authenticate anyway
* Unclear how long and expensive this operation *could* take in all scenarios
* App replacements in Apple's new file system can be atomic-safe, but that may only be the case if the old app is no longer needed

Cons:
* Few tech savvy users may not be able to restore an app without re-downloading it. This would still be rarely done even amongst them.
2016-07-25 19:11:20 -04:00
Zorg eac55846a8 Avoid copying the installer to a temporary location 2016-07-25 17:13:18 -04:00
Zorg 70cc3ea360 Remove unused mach service 2016-07-25 00:14:13 -04:00
Zorg fe62ad0468 Merge branch 'xpc-remove-auth' into ui-separation-and-xpc 2016-07-25 00:12:45 -04:00
Zorg 7d16e223c3 Remove stray AuthorizationRef reference 2016-07-25 00:05:42 -04:00
Zorg 150f10ed05 Update Installer unit test 2016-07-24 23:55:21 -04:00
Zorg 0cb59a1b02 Update user driver documentation 2016-07-24 23:44:37 -04:00