Commit Graph
104 Commits
Author SHA1 Message Date
Mayur Pawashe 5677ca3f5a Avoid DSA verification if EdDSA verification passes (#1888)
If EdDSA verification passes we don't need to have DSA verification pass, and don't need to require the new update to contain a DSA signature or keys.

Also reject updates if app has EdDSA but no EdDSA signature is provided
2021-07-11 08:59:09 -07:00
Mayur Pawashe e5c63b6369 Set $USER and $HOME variables when running guided pkg installers (#1884)
Set $USER and $HOME variables when running guided pkg installers

This allows pre/post install scripts to reference the user's environment correctly. The standard pkg installer GUI preserves these two variables.
2021-07-07 08:31:33 -07:00
Zorg 50ba774bbe Fix -Wcompletion-handler warnings 2021-06-11 22:25:14 -07:00
Zorg 5203518fbd Remove allowing downgrades
Downgrades hasn't worked properly with choosing the best appcast selection in a long long time.
2021-06-06 19:40:58 -07:00
Zorg 8dc4e78cb2 Remove unused installationPath variable from normalization changes 2021-05-14 22:09:41 -07:00
Mayur Pawashe 3cafb688b7 Merge pull request #1849 from sparkle-project/appcast-item-nullability
Add nullability annotations to SUAppcastItem
2021-05-02 13:49:27 -07:00
Zorg 6ad996338d Add nullability annotations to SUAppcastItem 2021-05-02 10:00:56 -07:00
Zorg fbe48e5738 Allow skipping/canceling of an update that is currently installing 2021-05-01 19:53:01 -07:00
Zorg 1244612946 Clear download from installer when extraction fails
One example of extraction failing is the delta update failing to apply.
2021-04-24 19:11:36 -07:00
Mayur Pawashe 8c53b1d3ec Merge pull request #1812 from sparkle-project/system-domain
Pass whether or not system domain is being used back to framework
2021-04-04 16:37:37 -07:00
Zorg 71a36f8be4 Add comments on message type tags 2021-04-04 14:06:27 -07:00
Zorg ebc48cee5c Increase max mach service name length to 127 characters 2021-04-03 22:43:01 -07:00
Zorg 467ffb15ca Pass whether or not system domain is being used back to framework
This avoids needing to do a file system check in InstallerConnection to determine if we need to connect to the system or user domain.
2021-04-03 17:16:38 -07:00
Zorg 414c8affc5 Compute app path normalization in progress agent
Compute path instead of having installer pass over arbitrary path to agent.
2021-03-27 22:17:25 -07:00
Zorg b3e7a03660 Update and replace bundle directories even more atomically on apfs
With these changes, it should not be possible for neither an old or new bundle to be at the destination.

We also perform temporary directory cleanup after final installation stage is and relaunching an app is performed because we can save some time (150 ms+ in one of my cases).
2021-03-21 17:54:51 -07:00
Zorg 89b7fef457 Add and use function to log NSError objects recursively 2021-03-19 12:35:22 -07:00
Zorg 2e8fc4d17a Don't make changing owner/group a hard fatal error 2021-03-19 10:28:59 -07:00
Zorg e21f7c4e87 Ensure startInstallationToURL method populates error object 2021-02-28 23:47:14 -08:00
Zorg 370fdb8368 Fix auto-synthesize warning 2021-02-28 23:47:07 -08:00
Zorg 7d8e3059ec Add and use SUAgentInvalidationError 2021-02-28 22:23:58 -08:00
Zorg f400b27cb2 Re-add __attribute__((noreturn)) attribute 2021-02-28 22:20:32 -08:00
Zorg f43b5ee3c3 Propagate agent errors to Sparkle 2021-02-28 22:14:35 -08:00
Zorg 1526a024b8 Propagate installer errors to Sparkle 2021-02-28 21:40:17 -08:00
Zorg 1290b974de Support mpkg for updating/installing flat non-archived packages 2021-02-13 10:04:08 -08:00
Zorg 79a9c50d2d Add support for updating/installing from flat packages
With these changes, modern pkg's should no longer need to be archived.

Only guided package installations are supported for flat packages. Specifying an interactive package installation type will result in a rejection. If the file URL has a ".pkg" suffix it is by default assumed to be a guided pkg installation now, which relieves the burden of needing to previously specify sparkle:installationType in the app cast item enclosure, in this case (for 2.x). Moreover, this relieves the burden of developers needing to archive their pkg for Sparkle.
2021-01-30 22:59:09 -08:00
Jake Fenton c03cc0fa17 check if SUBundleName is set before normalizing
When changing the name of an app, there's a couple things to do in order
to ensure auto-updates still work:

1. set SUBundle Name. This basically tells Sparkle "ey, expect an app
of {SUBundleName}.(app|pkg) instead of the normal name."
2. set `SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME` in
commonConfig.xccconfig to reset the name of the app.

in (2), we always used the host's bundle name, instead of checking to
see if SUBundleName was set, which means normalization doesn't work as
expected during app name changes.
2021-01-16 20:00:10 -08:00
Julian Mayer d8a8282b60 fix 2021-01-16 19:48:05 -08:00
Julian Mayer a6ffe0fa71 #1352 2021-01-16 19:47:46 -08:00
Zorg 6e326f3cea Integrate trying to preserve Finder tags in 2.x
https://github.com/sparkle-project/Sparkle/commit/1081dcdda187a9be5635594d388090f78de940f9
2021-01-16 18:27:41 -08:00
Zorg d38fd92668 Use double quote includes in a bunch of other places I missed 2020-10-03 00:41:59 -07:00
Gwynne Raskind a95f1592cd Fix several dozen warnings. Fix several things to actually respect the 10.9 minimum of the beta. 2020-07-25 02:19:50 -05:00
Jordan Rose e7e20e6ac8 Represent invalid public keys and signatures explicitly
Rather than using a valid-but-incorrect public key or signature to
make sure a failure to parse turns into a failure to validate, only
return a public key / signature when it is both present and at least
minimally valid. Syntactically invalid public keys / signatures are
also logged explicitly.
2020-06-25 00:01:09 +01:00
Jordan Rose 50d321a1a9 Now that we're close enough to 1.x, steal its implementation of SUSignatureVerifier.m and SUUpdateValidator.m wholesale. 2020-06-10 12:14:30 +01:00
Jordan Rose 55e0dc508c Rename -[SUSignatureVerifier verifyStream:signatures:] to -verifyDSASignatureOfStream:signatures: (like b9150d2 on 1.x) 2020-06-10 12:14:30 +01:00
Jordan Rose f6f4ac6925 Make SecKeyRef as needed (like 1006326 on 1.x) 2020-06-10 12:14:30 +01:00
Jordan Rose cb12461be1 Separate prevalidation out of constructor (like 92e00ba on 1.x) 2020-06-10 12:14:30 +01:00
Jordan Rose e7c828b332 Rename SUDSAVerifier to SUSignatureVerifier (like 98ea3e3 on 1.x) 2020-06-10 12:14:30 +01:00
Jordan Rose 5dbc53a8b8 Adopt SUPublicKeys (like c094a38 on 1.x) 2020-06-10 12:14:30 +01:00
Jordan Rose 5dc407ddc5 Switch the signature verifier to use SUSignatures (like 6df898f on 1.x) 2020-06-10 12:14:30 +01:00
Jordan Rose 261f5dc797 Push SUSignature through SUAppcastItem (like 8ad1f57 on 1.x) 2020-06-10 12:14:30 +01:00
Daniel Jalkut ee64dc7574 Update imports to use framework-style imports to avoid warnings when CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES. Add CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER to xcconfig file to protect against any changes that would introduce such warnings for clients who have the waring enabled. 2019-02-04 13:39:48 -05:00
Daniel Jalkut 2e1596c673 A recent merge with master caused the CLANG_WARN_COMMA warning to be enabled, which generates warnings in this ui-separation-and-xpc only file. I thought it would be safest to use #pragma clang diagnostic ignore to quiet the warnings without changing the source file in this file. (#1314) 2018-11-14 17:26:10 +00:00
Kornel 832902cea7 Merge tag '1.20.0' into ui-separation-and-xpc
* tag '1.20.0': (28 commits)
  Bump
  Fix binary delta creation on network drives
  New Spanish localisation
  Fix compilation issues on Xcode 10 with new build system
  Bump
  Updated readme to indicate that the 10.11 SDK is required to compile Xcode 7 was released with 10.11, the reference to the 10.8 SDK is out of date.
  Explicitly specify types to silence "Messaging unqualified id" warning that's new in Xcode 10. Removed __has_feature(objc_generics) check and use generisc to help silence the warnings.
  Updated Finnish language resources
  Remove executable bit on distributed source files.
  Fix potential hang with dispatch_sync to main thread
  Deliver SPUDownloaderSession delegate messages on the main queue
  add tips for user to install doxygen
  add delegate callbacks for fininshed download and extraction related events
  Restored legacy CLI for backward compatibility
  Fixed index out of bounds
  More complex argument parsing to support both inputs
  Function to load the private key directly from the keychain
  Minor naming improvement
  Bump
  Explain why auth is requested
  ...
2018-11-11 14:21:37 +00:00
Kent Sutherland d574574345 Explicitly specify types to silence "Messaging unqualified id" warning that's new in Xcode 10.
Removed __has_feature(objc_generics) check and use generisc to help silence the warnings.
2018-06-14 21:22:38 +02:00
Kornel 7fc20434b9 Merge remote-tracking branch 'origin/master' into ui-separation-and-xpc
* origin/master:
  Don't assume that the progress block exists (the parameter is nullable)
  Prepend app name to Autoupdate.app name
  Error message tweak
  Update error message to mention temp folders rather than optical drives
  1.18.0
  Log more errors
  Unify handling of aborted updates
2017-06-02 12:07:36 +01:00
Kornel Lesiński 2d30762570 Merge remote-tracking branch 'origin/master' into ui-separation-and-xpc
* origin/master: (39 commits)
  %s is deliberate in this format string
  Unused
  Make generate_appcast available as a shared scheme
  Shush Xcode
  Link straight to docs from the readme
  ignore .html files when scanning for archives
  Missing strings translation.
  Updated swift
  Warn against abusing installUpdatesIfAvailable
  when generating the appcast, if an .html file exists of the same name as the archive, then it will be linked in as the releaseNotesLink
  Revert "Fix pt_BR translations"
  Revert "Fix pt_BR translations (#1039)"
  Fix Japanse localization
  Add more info to auth tool run failure
  Fix pt_BR translations (#1039)
  Fix pt_BR translations
  Disable the keyboard shortcut for the install button for scheduled updates to avoid accidental installs.
  added `sparkle:shortVersionString` to the enclosure, #1032
  Changelog
  percent encode the filename used in the delta url
  ...
2017-03-24 12:14:05 +00:00
Zorg aaac6cd594 Document TerminationListener a bit 2017-01-19 23:14:08 -05:00
Zorg a000e3b311 Handle listening for termination of already-dead processes
Before our TerminationListener didn't handle a process that has already been terminated. In my fork this is unlikely to be an actual issue but in master, the application can very well be dead before the termination listener initiates.
2017-01-19 23:11:20 -05:00
Zorg dfaed624ae Merge branch 'master' into ui-separation-and-xpc 2017-01-17 15:58:02 -05:00
Zorg 62c9a8c785 Merge branch '1.17.x' into ui-separation-and-xpc 2017-01-12 21:50:14 -05:00