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
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.
* Allow delegate to pick no valid items
We now allow returning SUAppcastItem.emptyAppcastItem in -bestValidUpdateInAppcast:forUpdater: to indicate no update should be picked.
We preserve returning nil to indicate Sparkle handles the best appcast selection instead.
People have expressed needs for both of these decisions (and deprecated SUUpdater relies on the nil behavior).
This allows developers to post updates to specific channels like for beta updates. Updaters only get notifications from channels they're allowed to be on.
We should recommend using sparkle:version and sparkle:shortVersionString elements inside the appcast item instead of inside the enclosure for consistency.
Delta updates do not need to specify sparkle:version, and can inherit the top level element. This clears up some confusion and reduces duplication (and reduces error proneness / saves me work when testing delta / info-only features).
This is also consistent with informational updates. Regardless whether you want to make an update informational only or not, the sparkle:version stays in the same top-level place.
This is a backwards compatible change. Very old versions of Sparkle (possibly up to a decade or more ago) have supported specifying sparkle:version as a top level item. Winsparkle supports it as well because it's needed for info-only updates.
This is only changing what we recommend / standardize. The attribute variants are still usable.
External tools relying on Sparkle's feed format may have to adapt to this standardization (they have always needed to support info-only updates with a missing enclosure which apps do leverage anyway).
I updated generate_appcast to prefer the element variants and updated the tool so it understands them (this was a bug).
When user is on version >= latest appcast feed item, we give them an option to view version history.
When user can't update because of a min/max OS requirement, we give them an option to view product's website.
* Make updater/userDriver properties non-null
* Expose starting the updater and allowing it to be done later instead of at instantiation (so clients in some cases will not need to make their controller declared as an optional)
* Make sender in checkForUpdates: nullable
Example:
<sparkle:informationalUpdate>
<sparkle:version>1.5.0</sparkle:version>
<sparkle:version>1.5.1</sparkle:version>
</sparkle:informationalUpdate>
Means that updating only from versions 1.5.0 and 1.5.1 are shown an informational update (provided there is an info link).
<sparkle:informationalUpdate></sparkle:informationalUpdate>
Means that updating from any version gets an informational update (provided there is an info link).
No presence of this new element falls back to current behavior in Sparkle where an informational update is shown if an enclosure is missing but an info link is provided.
In some cases for shared headers in downloader XPC Service or generate_appcast / sign_update tools, I had to do a little dance for using double quote imports.
This version indicates the version that was first marked critical. So versions below this specified version will treat the update as critical while versions >= the specified version will not.
Also move sparkle:criticalUpdate to root level element instead of it being a tag. The tagged version is now deprecated and doesn't support the version field.
We unify the user driver method showing the update to take a generic state object now. The current fields of the state object are its current stage, if it's user initiated, and if the update is a major one.
We also remove deprecated code paths that were complex to support and will otherwise generate in compile errors if people adopt the new API.
* Prefer using the latest update that passes minimumAutoupdateVersion
When an update is not found:
* Find latest appcast item that may fail min/max OS
* Report that user cannot install an update due to unsupported OS
We should enforce update session is in progress before checking for new updates. I've tested checking for updates regularly, in background, and informational updates.
An update check could have been made while the permission request was in flight, which we don't want to happen.
The message string gets cached and I don't think this is the proper way to localize the auth dialog (which I think has some other mechanism). So I am removing localization here for now until this can possibly be done properly.
All the top level appcast items are non-delta items. The client needs to give us back a non-delta update item. We then fetch the appropriate delta item ourselves.
We don't have a dismiss method for every transition state and we don't want to. This should be up to the UI to determine how to transition from one UI state to another UI state.
When the update is shown to the user, the menu item for checking for updates is no longer disabled. Instead it is enabled, and when invoked, will bring the update to utmost focus back to the user again.
This is consistent with other options (eg Preferences...) that bring up windows. Improved user experience here is that updates are now less "lost".
We (re)define properties on SPUUpdater:
canCheckForUpdates - to mean that the user can check for updates (start a new update check or show the already present update frontmost)
sessionInProgress - to mean if Sparkle's internal driver / scheduler is running (i.e, downloading appcast or update, showing update, starting installation).
Add entitlements to InstallerConnection and InstallerStatus services and add option to specify bundle id in the now renamed codesign_xpc_service.py script.
Testing WebKit2 is more important than testing sandboxed downloader service.
More people should be adding entitlements to their app for connection services, so we will do that in the test app too.
Deprecate the "done" statuses for user initiated update checks and downloading updates because they really did nothing but burden implementor (there was a relic of an XPC reason back in the day that no longer applies).
This is useful for plug-ins that may want Sparkle to open eg a .prefpane or .saver instead of re-launching System Preferences (which is the app used to wait for termination; normally we only relaunch an app that was proven to be alive).
In a plug-in world, it may not be possible to tell which is more desirable so we provide both options. In 1.x, there was a delegate -pathToRelaunchForUpdater: method to pick between these, however in 2.x for hardening sake, there isn't an API to open any arbitrary bundle path so we provide explicit options.
And remove logic in SPUStandardUpdaterController and SUUpdater that defers starting the updater one cycle later, because that logic is now in SPUUpdater which they invoke.
It is too easy to start the updater "too soon" (if not using SPUStandardUpdaterController or SUUpdater) and I had some weird approach before that allowed the developer to check for updates before starting the updater and it would get deferred until the updater was started (without showing a permission prompt). Instead, defer the update cycle check allowing developer to check for updates immediately after starting the updater if needed (sparkle-cli needs to do this in one case).
Errors are now logged when checking for updates without having started the updater.
This fixes edge cases of UI being shown too early.
Sometimes when the app is re-activated, the window is ordered back behind other applications. Also it may be useful to eg read the release notes when browsing another application. We still preserve the logic that defers showing the update alert when the application isn't initially frontmost.
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).
Only check and update tag in Package.swift when not running a CI build. As long as GitHub actions are reserved for tests, this should be ok as this is a "fake" update of Package.swift anyway. If you ever use GitHub actions for releases, you'll probably have to rethink the tagging logic once again
Improves prompt asking to force move tag (default is NO, but can be triggered after `make release`). Fixes issues with single quotes in make-release-package.sh.
In 2.x, updates can be downloaded automatically and presented later even if they can't be installed automatically without user intervention. Users need to in control and be able to disable automatic downloads regardless of developer's Info.plist intention.
The custom headers added in #489 only applied to the appcast download.
This makes them apply to the app download as well for the case when both are hosted behind authentication.
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.
If user opts-out of automatic downloads (eg via app pref), they should be able to skip.
This logic for detecting minimumAutoupdateVersion present isn't sufficient and consistent enough, chooses to have skip visible in cases updates aren't prevented.
Masked sysctl hw.cputype value when evaluating the CPU type.
Used macros from mach/machine.h instead of magic numbers.
Added support for ARM in evaluation of hw.cpusubtype.
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.
• Updated error dialog code in SUBasicUpdateDriver, and created a local variable to reuse `[aHost name]`.
• Updated content of Sparkle.strings files, splitting existing affected translations into 2 chunks each.
• Fixed the Catalan translation, which was using an old string key.
• Removed a few unnecessary comments in the Polish translation.
The install description currently fails to notify the user that they should install the git submodule(s) present in the repo.
This causes `make release` to fail.
We fallback to legacy WebView in two cases:
* On systems prior to macOS 10.11 (it may be possible to support WKWebView in 10.10, but due to an 10.11+ only API I didn't bother putting in the effort)
* For apps using the downloader XPC service which are most likely sandboxed apps without an outgoing network entitlement. WKWebView doesn't function in that case (FB6993802 - https://github.com/feedback-assistant/reports/issues/1)
Additional notes:
* Added an abstraction for using WebView or WKWebView
* Web view is created and inserted programmatically rather than from the nib which has previously caused issues (and is not allowed for WKWebView prior to 10.12 due to some NSCoding bug).
* We need to rely on WKWebView private API for drawing transparent background (FB7539179 - https://github.com/feedback-assistant/reports/issues/81). Additional notes in the code.
* We always inject a custom stylesheet for dark mode colors and default font family/size (for WKWebView).
* This should also improve the Catalyst support story (#1482)
This reduces friction in creating a SPUUserDriver. This assumption that the calls could be made from any thread is a relic of the past of separating the user driver into a different process from the updater/scheduler, which is no longer sane or supported.
This should speed up things very slightly too.
When archives are stored as symlinks e.g. due to storing binary files in a
git-annex repository, everything works file except file size in the generate
feed xml file. This patch makes generate_appcast correctly determine file size
by following the symlink
(cherry picked from commit 7233bb93e7)
Previously, generate_appcast could only add or remove the release notes element for an update. This was probably fine, because it was unlikely to change: the release notes URL was determined by the SUFeedURL.
However, now that —release-notes-url-prefix was added, the release notes element CAN change. So, with this commit, if the release notes element is present for an update, the URL will be set correctly.
(cherry picked from commit 7c7e924ed4)
This keeps it from running when nothing's changed, which keeps Xcode
from re-signing the framework when nothing's changed, which keeps
downstream clients from re-copying the framework when nothing's
changed.
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.
Avoids "Class SUCodeSigningVerifier is implemented in both
Sparkle.framework/Versions/A/Sparkle and
Sparkle Unit Tests.xctest/Contents/MacOS/Sparkle Unit Tests.
One of the two will be used. Which one is undefined."
This gets more complicated, since binaries can be just code-signed, or
use both code signing and DSA keys, or be rotating keys for one or the
other.
The code signing test cases emulate certificate rotation by changing
the "identifier" for the bundle; the script used to sign each bundle
(with ad hoc signing) is included to support future expansion of
testing.
The actual tests here are the same as pre-validation; things only get
complicated when validating with code signing. The setup's a little
more involved though, since we need a supposedly-downloaded bundle to
do anything.
Also test invalid signatures, which are not always the same as absent
signatures.
You have to remember to invoke prevalidation anyway, so it doesn't
gain much for post-validation to check whether prevalidation failed.
Also, remove a no-longer correct comment from the corresponding
header.
-cleanup is only called when the task has finished, so it's safe to do this.
This silences a spurious warning logged by NSURLSession (or somewhere else internal):
Task <BB2AE4EF-8E93-44D7-9AB3-6EE9A9E3ACF8>.<1> load failed with error Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://example.com/appcast.xml, NSErrorFailingURLKey=https://example.com/appcast.xml, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDownloadTask <BB2AE4EF-8E93-44D7-9AB3-6EE9A9E3ACF8>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDownloadTask <BB2AE4EF-8E93-44D7-9AB3-6EE9A9E3ACF8>.<1>, NSLocalizedDescription=cancelled} [-999]
* 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
...
* tag '1.19.0': (44 commits)
Ensure cocoapods is installed before performing the release “sanity check” (#860)
Silence ‘This block declaration is not a prototype’ Xcode warning
Silence ‘decodeObjectOfClass:forKey: is only available on macOS 10.8’ Xcode warnings, similar to commit ea94969188
10.7 compatibility
Avoid invalid use of main thread
Update wording of read-only error
Improve 'read-only' error message (#1192)
"all" target
Hidden verbose flag
Outdated comment
Amend to avoid gender issue
Changelog
Bump
move Xcode 9.2 automatic changes from project to xcconfig files
Bring project up to Xcode 9.2 settings
silence 10.9 availability and other warnings and use modules when available
Ensure UI is changed only on the main thread
nil checks
Fix typo in expectation description
Finish tests for persistent download
...
* Quiet warnings from Swift compiler: "Using '!' here is deprecated and will be removed in a future release"
* Ignore diagnostics that yield 'messaging unqualified id' warnings when calling XCTAssertNotEqualObjects. I have filed a bug with Apple, Radar #45968630, requesting that they quiet the warning internally to the macro implementation.
* When setting the access time on a directory and its contents, set the access time on the directory last so that it will be guaranteed to match the expected value. There is a side-effect of calling getFileSystemRepresentation that it sets the access time of its container folder, presumably because of an implementatiton detail of how Foundation builds up the path. Note there is another problem here that the order of items from NSDirectoryEnumerator is undefined, so some of the interior items of a directory will undoubtedly end up getting slightly varying access times set upon them. However, for the purposes of Sparkle's use of this method to "keep things alive" in /tmp, I don't think there is an issue. This fix addresses a failing unit test testUpdateFileAccessTime, which was failing because of very slight differences in access time created by the problem described.
This is done by applying a user stylesheet, making the background of the WebView transparent, and using a NSBox to display the dynamic dark background color. The appearance of the release notes will unfortunately not adapt if the theme is changed while the release notes window is open.
* Improver read-only error message German
Updated the "read-only volume" error to reflect the real-world scenarios users run into.
It's almost never a CD, it's nearly always running from ~/Downloads or the .dmg if you still ship your app that way.
I personally have my projects on iCloud Drive which contains a space in the path (`~/Library/Mobile Documents/...`) and the build fails running these two scripts.
Amend to avoid gender issue
Victor committed
a01979c
1 changed file
Instead of addressing the user, which might cause gender issues, string has been adapted to include “app” (masculine, in accordance with Apple's terminology).
Would translate back as “The app is up-to-date!”
The SULastCheckTimeKey preference (a/k/a "default"), which is stored
in ~/Library/Preferences/….plist, was used to store the date of the
last update check.
That causes a problem if the storage is read-only (for example, if the
.plist file is “locked” (has the uchg or schg flag set) or if the
SULastCheckTimeKey key "exists in a domain that precedes the
application domain the search list"). The date would never be modified,
and the old date would cause a new update check to be queued at the end
of an update check. If application or bundle was up-to-date, or the
user had chosen to skip the update that was available, this would cause
update checks to happen as often as the computer and network would
allow, many times each second.
The new code uses an instance variable to store the value. The variable
is initially loaded from the “SULastCheckTimeKey” preference, and each
time the variable is modified its new value is stored to that
preference. However, the variable, not the preference, is used when
calculating whether enough time has passed since the last update check
to warrant another check. The variable will always (after the first
update check) have the "correct" value, and update checks will not be
done more frequently than desired.
10.11 SDK does not contain the os_log API yet. Code is modified
in such a way that it compiles with older SDKs, and falls back
to the old implementation even if it runs on 10.12.
* origin/master: (21 commits)
Bump
Update Xcode version for Travis CI
Fix for the timing issue of termination detection.
Add optional updaterDidRelaunchApplication: method on SUUpdaterDelegate (#1115)
Better error message
Warning
Update to Xcode 9/Swift 4
Revert "Ensure UI code always runs on the main thread"
Update German localization with some terminology changes
Update German localization for informal style
Update Dutch localization for informal style
Update Dutch localization with some style changes
Include bin files in CocoaPods installation
Simplified check
Rename OSX macOS
[BasicUpdateDriver] - extend hostSupportsItem method to also check the sparkle:os attribute from the enclosure element to decide if an update item is valid for the host
[AppcastItem] - parse and save the sparkle:os attribute of the enclosure element and add isOsxUpdate method to item class
Updated Japanese translation to reflect change on 55be13c
Updated translation to reflect change on “Update error message to mention temp folders rather than optical drives”.
Changelog
...
The scheduleNextUpdateCheckFiringImmediately: method includes an asynchronous callback. It invalidates the timer before invoking the method with the callback (retrieveNextUpdateCheckInterval:), but doesn’t not invalidate again inside the callback block.
The problem with this is that it is possible the timer is started during the delay. In release versions of an app, crashes have been seen due to an assertion that the NSTimer be nil when scheduling.
The proposed fix is to invalidate the timer in the callback, ensuring the NSTimer is nil before scheduling.
This updates the podspec to include the bin scripts in Pods directory
when using CocoaPods. This way users don't also have to download the
Sparkle repo out of band to sign releases.
* 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
* commit '60727bffa53ebfbfaf701575904847827bc1656a':
Log key read failure
Formatting
Escape + as well
Escape profile URLs better
Special case for .tar.gz extension
Inline release notes if they don't look like a standalone HTML document
Simplify release notes link check
Feed formatting
* 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
...
Generalize message to user as the previous setence was more like "Anonymous system profile information is used to help **our company** plan future development work."
While this may or may not be perfect, this should improve code quality by preventing new code that is introduced that creates tight coupling. This test is performed when make test is executed.
I avoided retrieving objc_dep in a way that make test would require an internet connection. I also added the executable bit to the objc_dep script, and a source.txt file indicating where the source came from.
PlistBuddy always touches its output file, even if the value written is
identical to the value already there. In such case, Xcode sees
Info.plist as modified, therefore sees the entire target as modified and
re-runs potentially expensive operations like copying frameworks or
signing.
Avoid unnecessary build operations by checking the previous
CFBundleShortVersionString if Info.plist already exists and only
updating it if necessary.
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.
* origin/master:
Explain why I'm not relying on the compiler to throw linkage errors
Add AppKitPrevention header to reduce redundancy.
Add AppKit prevention guards to modules that shouldn't import it
Add Obj-C generics where applicable
Adds test cases for "sparkle:criticalUpdate" tag. (#999)
I don't think I have a great justification anymore for waiting more than 'x' hours. This may just be an artifact when I was initially architecting Sparkle so that the entire framework could be stuffed into an XPC service.
* Adds a test case for the "criticalUpdate" appcast tag (not as a XCTest but simply as an assert inside the test app, because I was lazy and am working on an older Xcode version that does not support the currently needed swift version for the XCTest in SUAppcastTest.swift).
* Tests the "criticalUpdate" appcast tag, using the proper XCTest swift class. I haven't tested this, though, due to the lack of the needed Xcode version.
* Test case for Appcast now checks all 4 items for the correct "criticalUpdate" state.
* Adds a test case for the "criticalUpdate" appcast tag (not as a XCTest but simply as an assert inside the test app, because I was lazy and am working on an older Xcode version that does not support the currently needed swift version for the XCTest in SUAppcastTest.swift). (reverted from commit 3ce1c9790b)
We use the cached host bundle if the host bundle is equal to the main bundle.
Otherwise we read in the latest Info dictionary every time.
The cached case is the most common case. The odd case (updating other bundles) is less common. Thus we have better performance for the common case, and we retain correct code in both cases.
Also we invoke our own implementation of -objectForInfoDictionaryKey: rather than NSBundle's implementation in a few places.
We use the cached host bundle if the host bundle is equal to the main bundle.
Otherwise we read in the latest Info dictionary every time.
The cached case is the most common case. The odd case (updating other bundles) is less common. Thus we have better performance for the common case, and we retain correct code in both cases.
With this change, we ensure distinct per-app, per-process logging.
Note that the global file ~/Library/Logs/SparkleUpdateLog.log is no longer written into.
On 10.12 and above, SULog uses the os_log APIs. You may want to use log(1) to view logs in addition to Console.app. See the WWDC video on the new logging API and how the Console app has changed.
On older systems, this uses ASL (Apple System Log).
We don't want to reinvent logging, or rely on 3rd party libraries, thus we use what the system provides to us.
Two logging levels were added: Default and Error. The code documents their intended purpose. Now when you call SULog you must make a decision which level to use rather than rely on an implicit level.
This will increase the chance of a user driver implementing being able to show informational only updates. Also it's better to use a new method rather than re-use another existing one inappropriately.
The automatic update driver defers the informational only update & aborts, allowing a scheduled UI driver to resume it. The automatic update driver aborts before the point an update would normally be downloaded.
This is better than the hack in the previous commit. Also, a user driver may very well want to act differently in showing UI if the user initiated the update check.
SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME=1 now works properly again. In the progress agent, we don't use the path sent from the installer unless the normalized setting is enabled.
This allows us to remove SPUUserDriverUIComponent and remove a bunch of logic in the user driver regarding termination. The user drivers generally don't need to know about the application bundle anymore, and strictly now only show UI events.
This has another advantage of the agent being able to quit multiple instances of an application even if the application to update is sandboxed.
We enforce the logic that an application can only be relaunched if it was running initially.
We don't import SPUUserDriverUIComponent in SparkleCore because it is an exported class a part of Sparkle framework, which causes issues.
Instead, we import SPUApplicationInfo which is not exported from Sparkle.
This only affects updater delegates that return NO from -updaterShouldAllowInstallerInteraction:
This improves the user experience in sparkle-cli where now the checking can be aborted before even downloading the update feed, if it knows ahead of time that installation will fail.
This is triggered if the update is automatically downloaded and the installer is started in the background, and the updater's delegate decides to handle silent installation and installs the update invoking its immediate installation block. In this scenario, this fixes an issue where the application may not be terminated silently.
Switching between a sandboxed and non-sandboxed app with regards to user defaults has some bugs with saving user defaults.
Confirmed by an Apple engineer.
Until I find a good reason to have them there, they should not be publicly available.
I actually found a couple bugs from code that was accidently referencing them.
This may be useful if user defaults can't be relied on for the feed URL.
For example, if an app is sandboxed, its user defaults may differ from the defaults sparkle-cli looks up.
I think I used to have this when the remote XPC callbacks were in the user driver and I removed them at some point.
These callbacks are now part of the SPUUpdaterDelegate and the logic is simpler now than before.
The command line utility makes use of these callbacks.
This is more consistent with how the last update check logic works.
I changed the value of SUTimeIntervalAtFirstLaunchKey for backwards compatibility purposes.
Although it is interesting to separate the user driver and update scheduler in different processes, this has yet to prove useful. Further, this management should not exist in the user driver protocol since the protocol would be doing double duty. If this separation is useful in the future, it should be separated into another driver altogether. Note that it is also hard to write correct code that separates the user driver and updater. Removing this code should greatly reduce maintenance costs.
This fixes issues where the user driver may not be displaying release notes properly because it doesn't know what kind of data was downloaded (eg: html vs plain text).
New classes will soon be prefixed with "SPU"
I still need to look into adding a compatibility layer for -updater:willInstallUpdateOnQuit:immediateInstallationInvocation: and possibly deprecating no-DSA instead of outright rejecting it.
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.
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.
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.
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.
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.
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.
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
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.
This is now necessary for package type installations so we can know whether or not we should authenticate ahead of time.
Of course, we also verify that the download contains the type of installation we expect (because the appcast is not very trusted).
We now present a better worded dialog (X wants to update. Please type your password to allow this. OK/Cancel)
We still need to set the icon for the dialog window.
I also fixed some issues with canceling the dialog still throwing an error.
This allows automatically downloading updates, and having them prompt up later, so the user can perform authorization later for starting up the installer
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
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.
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.
This fixes installation failing when we check for the wrong child and don't let the installer finish. However, this code now ignores the status from the child. I might see if there's a better way around fixing that..
I don't think this feature would be used much, and I don't want to deal with additional maintainability. As it is, the progress app should show up in rare cases.
This way we don't have to include an icon for the installer progress app. There is a minor issue where the dock icon changes back before termination. However, this app should show up in rare cases in the first place, so I still think this is a good trade off.
For most applications, it makes more sense to use the app's icon than Sparkle's. That and we can save some disk space usage.
This allows installation by requesting the user to enter a password when elevated privileges are necessary. This only works if the application is alive before installation begins.
If the file manager is used for authorization, we can now supply an authorization environment.
This allows us to specify a customized prompt message and an icon to use in the authorization dialog window. We no longer need to include an icon for Autoupdate app.
We now also see if we can get authorization rights access right away, rather than lazily when executing a tool.
1. Use Apple's logging system (ASL) - don't invent our own inefficient mechanism.
2. Logging is not dependent on a global file that any process and thread using Sparkle can write to now, which could also be cleared at any point before.
3. Don't write to stderr on non-debug builds. This is ideal for sparkle-cli utility.
We don't export an API for configuring this in SUUpdater.
Messing with the user defaults is not ideal, and we don't use hasLaunchedBefore anymore
For testing this, the user defaults should just be removed manually, and the test app should be relaunched.
This option never used to work for me that well before anyway.
The old behavior used to be to prompt on second launch.
However, applications can be re-launched in a short amount of time, and Sparkle can be loaded multiple times during a single app launch.
So prompting after a certain amount of time after first launch works better.
If an update permission request comes up, this alows us to make a decision.
Also I renamed the defer and checknow flags to defer-install and check-immediately
What is new is that we can now disable checking for updates immediately.
sparkle-cli is not intended to be run for a long time, so if the next update check is not soon, we exit.
A client can now launch sparkle-cli without having to necessarily check for updates, so that they don't check for updates too soon.
The installer can now inherit privileges from the updater, which inherits
privileges from the process that spawns the updater. As such, we can now
run the updater & installer as root, and no authorization dialog can prompt up.
The installer now must abort or install if the target app has terminated.
Zombie processes will no longer stay around.
Because the root user has no trash directory, we ignore logging the error if it was not found.
We also avoid invoking mdimport which fails as root on the installed app.
mdimport may have been used before for updating mdimporter files, however, it should be the developer's
responsibility to ensure their mdimporter files have an updated date stamp, which will work if a user updates an app manually.
Other than that, we already touch the app to register it with LaunchServices, so that should suffice.
For sparkle-cli and out-of-process updaters, I added a did finish installing event.
I also have logic dealing with whether an update can be silently installed or not.
I made closing status windows before app termination a reponsibility for the user driver now, not
the installer drivers.
I improved checking for updates before starting the updater, if Sparle didn't ask the user for permission yet.
Currently, Autoupdate can persist in the background even when the app is terminated,
if we don't have sufficient privilleges to install right away for example, or if an update isn't silent.
After much thinking, I need to ditch this strategy because:
1. An app can be manually replaced and so the installer would have to monitor that
2. We leave a zombie process running
I'm hoping this will ease some of the build configuration issues I've been running into.
Apps (eg: unsigned, not-sandboxed) don't need to (although they still can) use the XPC services.
Sandboxed apps naturally should use the XPC services. Although, you can for example, choose not to use the
downloader services if the host app already entitlements to allow network connections.
If you use the downloader services, you must configure ATS exceptions in them. And if you use those services,
you probably want to sign them with the required entitlements.
If you don't use the services, Sparkle will fall back on almost-identical code executed within the framework instead.
There may be other reasons to use the services or not other than for sandboxing, like fault tolerance.
Lastly, XPC services work within an application namespace. They are discoverable as long as they're in the app.
That's why we can have an app incorporate the services and let the framework use them.
Rename the XPC service products so that they start with 'Sparkle'
Make the bundle IDs of the services a part of the build configuration, so we can pass it to the preprocessor.
We have a custom codesign-after-copy script because Xcode's code sign on copy feature is bad when it
comes to frameworks including signable tools. In release build configurations, nothing we build uses
an ad-hoc code signature. This is logical because ad-hoc signatures are only meant to be used for testing purposes.
Only the XPC services need to be ad-hoc signed (else Xcode gets cranky),
or targets with entitlements like our Test Application.
Distributing ad-hoc binaries can be mixed with distributing unsigned apps,
and ad-hoc is no worse than unsigned when it comes to distributing, so we're all good.
Updating without DSA signing the download is simply not secure.
Before, we were keen on allowing no DSA signing as long as https is used.
However, under the separate process security model, the installer can't know or trust
if the download came over from https. We could move downloading into the installer, but
the installer may run with full privileges one day in the future, and this would
complicate the installer & updater interaction. Furthermore, this could disallow us from being able
to silently download the update in the future if the installer runs at full privileges.
An upside is that the validation and configuration checking code is simpler to read through now.
Even if we could validate that an update came over https, it is still not as secure as people may like to believe.
For example, a hijacked server can choose to manipulate the download (within restrictions), even if it's signed by a developer ID, but not with our DSA support.
Changing of DSA keys and Apple code signing identities is still allowed as long as one of these pairs match and are valid.
Hence requiring DSA signing is also safer when it comes to losing one of your keys. It's only a bit less convenient.
In debug mode we always build with arbitrary http loads, but in release mode we
only want to build sparkle-cli and SparkleTestApp with arbitrary http loads.
An ATS error was added back if arbitrary HTTP loads are not allowed and if the feed URL is http://
The "distribution" target/scheme is now not very up to date because it builds everything under Release configuration.
An app can contain a XPC service with restricted entitlements and own ATS exceptions.
Indeed, Sparkle now is a framework that embeds two XPC services that include download entitlements.
If ATS is disabled, it'd have to be disabled in those services, not within the root of the application.
So we can't keep this detection because it will generate false positives. And it's not really our responsibility anyway.
We really want to differentiate between apps and prefpanes/plug-ins.
Using the main bundle is not at all a reliable indicator because an updater could target
any kind of bundle anywhere.
This new method also takes an error object as output, which means we can now
read a bundle in Sparkle without having to abort. If a check for updates action is invoked
before the updater has been started, it becomes a pending scheduled operation.
I added an application target but it's really intended to be used as a command line tool. The reason being was that it was the easiest way to bundle the Sparkle framework, I've found.
Note this doesn't work perfectly yet, but it's a good start. Trying to update anything that's not Sparkle based will crash for instance. And it will use the installer progress tool which may be undesirable.
This created more complexity than it was worth and leads to subpar user experience because the user can see the icon switch back to the generic one when the updater terminates. So we now bundle the icon in the install progress tool. If a developer wants to use a custom icon, they can provide their own customized tool.
Following cases where after an update has been automatically downloaded, Sparkle may alert the user right away:
1) Critical updates
2) Insufficient write access to install without being root
3) Package type installations
In addition to alerting the user right away, if they dismiss the update, the schedule timer will be on regular intervals. We also no longer need to care about writability in the updater, only just in the installer.
Duplicated code from SUFileManager and SUGuidedPackageInstaller has been removed.
SUPlainInstaller now tests if it needs authorization rather than by trying to touch the old app.
SUGuidedPackageInstaller now tries to grab authorization during stage 2 of the installation.
This more accurately reflects its intended purpose. From the beginning,
the user cannot check for updates until the updater is ready;
however this doesn't mean that the update is in progress.
ATS exceptions now need to be included in the appcast & update downloader services - *shrugs*.
I've a run script configured to disable ATS for release builds.
This allows Sparkle to be used as-is in a sandboxed application,
without needing to place Sparkle into its own XPC service.
Currently the main app may need to set a global mach service lookup exception
and a client download exception, however this can be fixed by creating a couple more
services. Testing for disk writability will need be done in a service too.
If permissions are abnormal during cleanup or somewhere along the lines, it may be
possible to bring up authorization dialog that is not really needed. Prevent this from happening.
We would want to restrict authorization from being possible anyway when not needed.
Just do all installation in 3rd stage at the moment and reconsider this idea..
Doing any work prior to finishing the installation that requires keeping files in
a temporary directory for potentially a long time turns not to probably not be a great idea.
Unfortunately I don't think trying to keep the files up to date every some interval is a _great_ idea.
I will need to rethink this some more.
This is inevitable if we stick to a three stage installation.
The other direction to consider is to defer most installation until after the app terminated,
although that may have disadvantages of its own.
One important addition is touching the new app recursively before moving it in a temp directory.
This is important because archives can preserve modification & access times, but we don't want that.
This is convenient if the updater and app live in separate processes.
No need to use XPC to find out what certain settings are, and it may take too long to find out that way.
Before there were implicit dependencies and unarchivers were globally registered as their classes were loaded.
This flexibilty is unnecessary and comes with a safety (eg: forgetting to link in a class) and harder to read cost
Resumability works by asking the installer for its progress and for the appcast item we've given it before.
If an automatic silent download occurs, we abort it after the installer tool finishes with its basic steps.
Then, a user initiated or scheduled check can resume the update. The scheduled check fires during a longer-than-normal
span since usually the user can install by quitting the app, unless the app has been alive for a very long time.
One exception to this is when the update is marked critical; in that case, the scheduled check is fired immediately after
an automatic update download. Subsequent attempts will be fired using a normal update check interval.
Todo: delta updates probably don't work when they fail and fallback to a regular update
Copy the bytes manually using -[NSData dataWithBytes:length:]
If we use -[NSData copy] instead, we may be using already freed memory
(according to ASAN), which is no good. This may be because the bytes aren't
deep copied.
Also add some @autoreleasepool wrappers because why not.
This removes subclassing usage making the code harder to follow.
Todo: handle resuming an update already waiting to be installed,
adding impatience timer for automatic update scheduling
We now have a stage where authorization is allowed (when the user intiates a relaunch).
This stage occurs before the user application is terminated (if the operation succeeds).
An install attempt will always be made after the validation is finished now. However, if the
user doesn't explicitly relaunch the app, we don't bug the user about auth prompts which means
updates can fail in this kind of scenario.
This decreases coupling for the updater and updater drivers.
We still pass in the updater because we need it for invoking the updater delegate's methods,
but we now use type 'id' instead of SUUpdater* because we don't want to invoke anything on the object.
Furthermore, we never #import SUUpdater, only forward class declarations.
I added public DSA file, automatic update checking, disabled system profiling
in the unit test's info.plist so that SUUpdater won't complain that DSA is missing,
and it won't prompt for update permission the first time.
This is bad for a number of reasons.
1. Our SUUserDriver protocol wasn't quite the right protocol to pass in.
2. This made the UI/Core components to hold a depedency to the user driver, when it
really was not used for anything other than passing to the delegate. We can now
remove this bidirectional depedency between the components and the user driver.
3. This encourages that the client can handle multiple user drivers within the same class,
which encourages complexity. If they were able to set the delegate, they should have a reference
to the user driver.
Indeed, SUUpdater, SUUpdaterDelegate, and the update drivers all have the same problem.
An unfortunate design decision..
This is to minimize the amount of time the app is left terminated.
App restarts should always be near instantaneous.
More work needs to be done to make authenticated installs more friendly,
and not making installs abortable after validation is done.
The installer (Autoupdate.app) is now responsible for extracting & verifying the update.
It talks to the updater via mach ports. We can't afford to use a XPC service due to
lack of perfoming privileged tasks.
This adds delegate outlets to the updater and to the user driver, so a
developer can hook either of them up. Note we now initialize the updater and
user driver after being awoken from the nib.
We also took this chance to make the delegates to the updater and user driver read only.
This means that the delegates have to be available on initialization, which is good because
changing delegates or setting delegates too late (and missing messages) is bad.
For sandbox testing, we really have to use ad-hoc signing.
Which means we have to sign the "new" app after we alter its info.plist file,
so that our code signing verifier doesn't (rightfully) complain
We should terminate even if the update aborts.
We should also terminate even if the connection is invalidated or interrupted, if we've
already been told to quit
I decided it was less evil to allow SUUpdater to defer cycling and have
a mutable delegate, than it was for SUUpdateController to have a nullable SUUpdater
that could be instantiated an arbitrary time later
I have also changed the delay from 0 to 1, on the safer side.
Also move system shut off handling to the user driver.
Observing system shut off is difficult without AppKit, and
a client may want to observe for varying types of events.
I suppose this is consistent with application termination
notifications though.
This solves several problems:
1) we can't spawn a task reliably from a XPC process
2) we don't want to link to AppKit from SUBasicUpdateDriver
3) spawning a task to invoke open utility is poor with bad inputs
These operations also make incorrect assumptions when called from out of process,
so it makes sense to separate them out. Furthermore, SUHost can now only depend on
Foundation
Yeah, this isn't backwards compatible with older code that uses Sparkle
Few notes:
* Mostly everything from *.pch has been moved out for saner dependency tracking
* 10.7 compatibility has been removed out so I don't import Cocoa when I don't have to
* sharedUpdaters/SUUpdater singletons has been removed out so updaters can actually be deallocated properly
(and since singletons are generally horrible idea anyway)
* SUUpdater doesn't have UI/cocoa/bindings/menu validation code. Its new initializer method takes a user driver
(perhaps in the future I'll create another class that "binds" the UI and core)
In a XPC environment, a delegate may handle update checks by sending a message
to the XPC process that tells it to reset the sparkle updater's check cycle.
If the user driver delegate can do this, the XPC process will not need to wait
for a reply, allowing the system to kill the XPC process when it becomes idle.
These changes are to make XPC environment more friendly. Every reply block must
get a response and is not optional to respond to. For example we can no longer have
a reply block that is just "cancelUpdate()"; it must now take an option whether
we are done now or if we want to cancel, and the receiver should now be aware
when canceling doesn't make sense (i.e, if update already aborted). Furthermore,
a reply block must get exactly *one* response.
non-void/synchronous calls over XPC don't work properly, and
these methods don't seem very proper architecture wise anyway.
A proper solution will be needed for notifying the delegate of modal alerts
If an automatic update needs to be applied at termination,
the app delegate will need to hold responsibility of delaying
termination until Sparkle is ready to relaunch
Note that the protocol API for the user updater driver can still be improved.
applicationWillTerminate: is done from the user driver because that's the only way that will
function across different processes.
We support NSSecureCoding for SUAppcastItem and SUHost
Callbacks from XPC <-> Host app now async to main GCD queue.
This is needed for everything to be thread safe.
Todo: NSDate parsing sucks and is temporarily disabled.
In particular, we're using deprecated methods to read the dates,
which don't support NSSecureCoding. The other problem is that the dates are
really useless technically and we shouldn't sort by them.
Everything related to the protocol is intended for showing & dismissing progress,
as well as making UI actions such as canceling, installing, confirming update permissions
This is still incomplete and not perfect yet.
In particular, these delegate methods ought to perhaps be grouped in a separate class.
The UI code that is currently done should be treated the same manner as a custom UI
Relaunching Sparkle should give customization over showing the UI of the autoupdater app
about:Found a bug? Want to implement a new feature?
title:''
assignees:''
---
## Summary
[provide general summary to the issue or enhancement and its rationale]
## Possible Fix
[not obligatory, but suggest fixes or reasons for the bug]
## Version
[please specify versions of Sparkle this is applicable to; note new pull requests must be developed and landed in 2.x development branch first and the 1.x (master) branch is feature-frozen]
- [ ] My change is being tested and reviewed against the Sparkle 2.x branch. New changes must be developed on the 2.x development branch first.
- [ ] My change is being backported to master branch (Sparkle 1.x). Please create a separate pull request for 1.x, should it be backported. Note 1.x is feature frozen and is only taking bug fixes, localization updates, and critical OS adoption enhancements.
- [ ] I have reviewed and commented my code, particularly in hard-to-understand areas.
## Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] My change is or requires a documentation or localization update
## Testing
I tested and verified my change by using one or multiple of these methods:
[strongSelfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:@"Invalidation on remote port being called, and installation is not close enough to completion!"}]];
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:@"Timeout: installation data was never received"}]];
}
if(!self.agentConnection.connected){
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:@"Timeout: agent connection was never initiated"}]];
unarchiverError=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUUnarchivingErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"No valid unarchiver was found for %@",archivePath]}];
[selfunarchiverDidFailWithError:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUUnarchivingErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Failed to unarchive %@",archivePath],NSUnderlyingErrorKey:(NSError*_Nonnull)error}]];
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:@"Update validation was a failure",NSUnderlyingErrorKey:validationError}]];
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:@"Timeout error: failed to retreive process identifier from agent"}]];
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Error: Failed to match host bundle identifiers %@ and %@",self.hostBundleIdentifier,bundleIdentifier]}]];
return;
}
// This will be important later
if(installationData.relaunchPath==nil){
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:@"Error: Failed to obtain relaunch path from installation data"}]];
return;
}
// This installation path is specific to sparkle and the bundle identifier
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Error: Failed to create installation cache directory in %@",rootCacheInstallationPath]}]];
return;
}
// Move the download archive to somewhere where probably only we will be touching it
// This prevents eg: if a bug exists in the updater that removes files we are trying to install
// When this tool is ran as root, we are moving it into a directory that only root will have access to
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:@"Error: Failed to move download archive to new location",NSUnderlyingErrorKey:moveError}]];
return;
}
// Make sure the downloaded archive we moved over is a regular file and not a symbolic link placed by an attacker
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Error: Failed to retrieve download archive path from %@",downloadDestinationURL]}]];
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Error: Failed to retrieve download archive attributes from %@",downloadDestinationPath]}]];
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Error: Received bad archive file type: %@",archiveAttributes[NSFileType]]}]];
return;
}
// Carry these properities separately rather than using the SUInstallationInputData object
// Some of our properties may slightly differ than our input and we don't want to make the mistake of using one of those
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:@"Error: Failed to start installer",NSUnderlyingErrorKey:firstStageError}]];
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:@"Error: Failed to resume installer on stage 2 because installation cannot be installed silently"}]];
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:@"Failed to listen for application termination"}]];
return;
}
// Show our installer progress UI tool if only after a certain amount of time passes,
// and if our installer is silent (i.e, doesn't show progress on its own)
[selfcleanupAndExitWithStatus:EXIT_FAILUREerror:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SPUInstallerErroruserInfo:@{NSLocalizedDescriptionKey:@"Failed to finalize installation",NSUnderlyingErrorKey:thirdStageError}]];
});
return;
}
self.performedStage3Installation=YES;
dispatch_async(dispatch_get_main_queue(),^{
// Make sure to stop our displayed progress before we move onto cleanup & relaunch
// This will also stop the agent from broadcasting the status info service, which we want to do before
// we relaunch the app because the relaunched app could check the service upon launch..
*error=[NSErrorerrorWithDomain:NSCocoaErrorDomaincode:NSFileReadCorruptFileErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Unable to identify diff-version %u in delta. Giving up.",majorDiffVersion]}];
*error=[NSErrorerrorWithDomain:NSCocoaErrorDomaincode:NSFileReadUnknownErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"A later version is needed to apply this patch (on major version %u, but patch requests version %u).",LATEST_DELTA_DIFF_MAJOR_VERSION,majorDiffVersion]}];
*error=[NSErrorerrorWithDomain:NSCocoaErrorDomaincode:NSFileReadInvalidFileNameErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Failed to retrieve file system path representation from source %@",source]}];
SULog(SULogLevelError,@"Failed to get static code %d",result);
gotofinally;
}
@@ -55,12 +58,12 @@
if(result!=noErr){
if(result==errSecCSUnsigned){
SULog(@"The host app is signed, but the new version of the app is not signed using Apple Code Signing. Please ensure that the new app is signed and that archiving did not corrupt the signature.");
SULog(SULogLevelError,@"The host app is signed, but the new version of the app is not signed using Apple Code Signing. Please ensure that the new app is signed and that archiving did not corrupt the signature.");
SULog(@"Code signature of the new version doesn't match the old version: %@. Please ensure that old and new app is signed using exactly the same certificate.",requirementString);
SULog(SULogLevelError,@"Code signature of the new version doesn't match the old version: %@. Please ensure that old and new app is signed using exactly the same certificate.",requirementString);
[notifiernotifyFailureWithError:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUUnarchivingErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Flat package does not have guided installation type but %@ instead",self.expectedInstallationType]}]];
[notifiernotifyFailureWithError:[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUUnarchivingErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Flat package does not exist at %@",self.flatPackagePath]}]];
@@ -14,20 +14,13 @@ A guided installation allows Sparkle to download and install a package (pkg) or
The installer package is installed using macOS's built-in command line installer, `/usr/sbin/installer`. No installation interface is shown to the user.
A guided installation can be started by applications other than the application being replaced. This is particularly useful where helper applications or agents are used.
## To Do
- Replace the use of `AuthorizationExecuteWithPrivilegesAndWait`. This method remains because it is well supported and tested. Ideally a helper tool or XPC would be used.
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Guided package installer returned non-zero exit status (%d)",task.terminationStatus]}];
}
}
}@catch(NSException*){
success=NO;
if(error!=NULL){
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Guided package installer task threw an exception"]}];
// If we have a normalized path, we'll install to "#{CFBundleName}.app", but only if that path doesn't already exist. If we're "Foo 4.2.app," and there's a "Foo.app" in this directory, we don't want to overwrite it! But if there's no "Foo.app," we'll take that name.
// Otherwise if there's no normalized path (the more likely case), we'll just use the host bundle's path
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Found guided package installer but '%@=%@' was probably missing in the appcast item enclosure",SUAppcastAttributeInstallationType,SPUInstallationTypeGuidedPackage]}];
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Found package installer but '%@=%@' was probably missing in the appcast item enclosure",SUAppcastAttributeInstallationType,SPUInstallationTypeInteractivePackage]}];
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Found regular application update but expected '%@=%@' from the appcast item enclosure instead",SUAppcastAttributeInstallationType,expectedInstallationType]}];
// If we have a normalized path, we'll install to "#{CFBundleName}.app", but only if that path doesn't already exist. If we're "Foo 4.2.app," and there's a "Foo.app" in this directory, we don't want to overwrite it! But if there's no "Foo.app," we'll take that name.
// Otherwise if there's no normalized path (the more likely case), we'll just use the host bundle's path
// Check progress agent app which computes normalized path too according to these rules
SULog(@"Error: Failed to launch package installer: %@",exception);
SULog(SULogLevelError,@"Error: Failed to launch package installer: %@",exception);
if(error!=NULL){
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:@"Package installer failed to launch."}];
error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUUnarchivingErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Extraction failed, command '%@' got only %ld of %ld bytes",command,(long)bytesRead,(long)expectedLength]}];
error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUUnarchivingErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Extraction failed, command '%@' got only %ld of %ld bytes",command,(long)bytesRead,(long)expectedLength]}];
}
}else{
error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUUnarchivingErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Extraction failed, command '%@' returned %d",command,[taskterminationStatus]]}];
}
}else{
error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUUnarchivingErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Extraction failed, command '%@' returned %d",command,[taskterminationStatus]]}];
}
}else{
error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUUnarchivingErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Extraction failed, archive '%@' is empty",self.archivePath]}];
SULog(SULogLevelError,@"Failed to perform installation because either installation URL (%@) or new URL (%@) is nil",installationURL,newURL);
if(error!=NULL){
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:@"Failed to perform installation because the paths to install at and from are not valid"}];
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:@"Failed to recursively update new application's modification time before moving into temporary directory"}];
}
returnNO;
}
// Create a temporary directory for our new app that resides on our destination's volume
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:@"Failed to make new temporary directory"}];
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Failed to move the new app from %@ to its temp directory at %@",newURL.path,newTempURL.path]}];
SULog(SULogLevelError,@"Failed to construct URL from bundle path: %@",host.bundlePath);
if(error!=NULL){
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:@"Failed to perform installation because a path could not be constructed for the old installation"}];
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Failed to create temporary directory for old app at %@",oldURL.path]}];
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Failed to move the old app at %@ to a temporary location at %@",oldURL.path,oldTempURL.path]}];
*error=[NSErrorerrorWithDomain:SUSparkleErrorDomaincode:SUInstallationErroruserInfo:@{NSLocalizedDescriptionKey:[NSStringstringWithFormat:@"Failed to move new app at %@ to final destination %@",newTempURL.path,installationURL.path]}];
}
// Attempt to restore our old app back the way it was on failure
NSString*errorMessage=[NSStringstringWithFormat:@"For security reasons, updates that downgrade version of the application are not allowed. Refusing to downgrade app from version %@ to %@. Aborting update.",hostVersion,updateVersion];
// We will have already logged an error for this failure when the public key was read in, so just do an informational log here.
SULog(SULogLevelDefault,@"The update has an EdDSA signature, but the app has an invalid EdDSA public key, so the update will automatically be rejected.");
returnNO;
}
SULog(SULogLevelDefault,@"The app has an invalid EdDSA public key, but there is no EdDSA signature in the update. Falling back to DSA.");
break;
caseSUSigningInputStatusPresent:
switch(signatures.ed25519SignatureStatus){
caseSUSigningInputStatusAbsent:
SULog(SULogLevelError,@"The app has an EdDSA public key, but there is no EdDSA signature in the update, so the update will be rejected.");
returnNO;
caseSUSigningInputStatusInvalid:
// We will have already logged an error for this failure when the signature was read in, so just do an informational log here.
SULog(SULogLevelDefault,@"The update has an EdDSA signature, but it's invalid, so the update will automatically be rejected.");
SULog(SULogLevelError,@"EdDSA signature does not match. Data of the update file being checked is different than data that has been signed, or the public key and the private key are not from the same set.");
SULog(SULogLevelError,@"DSA signature does not match. Data of the update file being checked is different than data that has been signed, or the public key and the private key are not from the same set.");
* Introduced new SPUStandardUpdaterController, SPUUpdater, SPUUserDriver classes/protocols (Zorg)
* Decoupled AppKit and UI logic in the framework from core functionality (Zorg)
* Ensure (most) API / ABI compatibility with Sparkle 1.x; you can likely test Sparkle 2 in an existing app without any changes (Zorg)
* Deprecated SUUpdater, albeit it is still functional for testing and transitional purposes (Zorg)
* Delegation methods may have been removed or added to the newer updater API. Please review `SPUUpdaterDelegate` if using `SPUUpdater`. (Zorg)
* Updater Changes
* Automatic silent and manual update alert prompts are now merged together
* Updates will attempt to install even if the user quits the application without relaunching the application update explicitly (Zorg)
* Updates can be downloaded in the background automatically but later prompt the user to install them, particularly if Sparkle doesn't have sufficient permission to install them without the user's permission (Zorg)
* Authorization now occurs before launching the installer and before terminating the application, which can be canceled by the user cleanly (Zorg)
* Sparkle uses the icon of the bundle to update for its authorization dialog. A 32x32 image representation of the icon is needed. (Zorg)
* Distributing updates without EdDSA signing the archives is now deprecated (Zorg)
* Package based updates that are zipped or archived must add sparkle:installationType="package" to the appcast item enclosure (Zorg)
* System profiler privacy and transparency (#1690) (Martin Pilkington)
* Support getting app icon from asset catalog (#1694) (Charles Srstka)
* Don't hide update alert window now on deactivation (#1804) (Zorg)
* Raise minimum system version to 10.11 (Zorg)
* Special thanks to developers using early builds of this release in production and contributors for keeping this running (Kornel, Jonas Zaugg, Gwynne Raskind, Jordan Rose, Tony Arnold, Bryan Jones, Christian Tietze, Jakob Egger, and many more)
Please visit [Sparkle's website](http://sparkle-project.org) for more information on documentation and migration.
# 1.26.0
* Flat package support from #1745 (Zorg)
* Correct generate_appcast -s command line argument usage help (Lance Lovette)
* Fix -f command line argument handling (Lance Lovette)
* Fix progress for guided pkg install (Zorg)
* Fix XQuartz update failing because NSLog caused issues (Zorg)
* Update localization (Vojtěch Koňařík)
* Various fixes to SPM logic (Jonas Zaugg)
# 1.25.0
* Raise minimum system version to 10.9 (Kornel)
* Allow an appcast to prevent the new version from being installed automatically (#1688) (pierswalter)
* UI fixes
* Show check for updates button only when automatic updates are enabled (Lorena Rangel)
* Don't initialize the webview if we don't show release notes (Tobias Fonfara)
* Keep skip button available if there is a minimum autoupdate version (Zorg)
* Fix automatic updates checkbox state when not showing release notes (Zorg)
* Fix edge cases with hiding alert buttons and using "Install Later" (Zorg)
* Re-add setting WebUIDelegate fix for legacy web view (Zorg)
* Adopt WKWebView for 1.x (Zorg)
* Add auto layout constraints to SUAutomaticUpdateAlert window (Zorg)
* Made buttons wide enough to display the full text. Made window wide enough to display the widened buttons (el, fi, ru, uk) (Piers Uso Walter)
* Remove max size from update alert. (George Nachman)
* Integrate generate_keys export/import options changes from #1730 (Zorg)
* Add `—release-notes-url-prefix` support to localized release notes (Adam Tharani)
* Translations
* Enable base internalization for alert xibs (Zorg)
* Capitalizes french translation of "Vous utilisez actuellement..." ("You are currently running...") (Micah Moore)
* Fix and cleanup Hebrew, Catalan, Finnish localizations (Zorg)
* Remove non-english localizations from TestApplication (Zorg)
* Fix catch-22 Swift Package Manager binary target (Jonas Zaugg)
* Add explicit dependencies to fix Xcode linking errors (Kornel)
* Add phased rollouts feature to automatic update driver too (Zorg)
* Remove hiding skip button and retitling later button (Zorg)
* Deprecate installUpdatesIfAvailable (Zorg)
* Apply custom headers to app download (Geraint White)
# 1.24.0
* Prioritize UserDefaults when fetching value for EnableAutomaticChecks (Nicolas Bosi)
* Improve best appcast item selection handling (Ian Bytchek)
* Create lockfile for improved compatibility with 3rd party updaters (CoreCode)
* Enable SPM support via binary target (Jonas Zaugg)
* `generate_appcast` improvements:
* follow symbolic links (Denis Dzyubenko)
* update the release notes element’s URL when required (Brad Andalman)
* Added output filename option to generate_appcast (Brad Andalman)
* Added —release-notes-url-prefix to generate_appcast (Brad Andalman)
* Command line option to provide a download url prefix is now parsed and set on each archive item (Dominik H)
* Added help command line option (Dominik H)
* Locale updates:
* Update zh_CN localization (柳东原 · Dongyuan Liu)
* Update Sparkle.strings (Vojtěch Koňařík)
* Update Croatian (#1603) (milotype)
* Update SUUpdateAlert.xib (DanielFirlej)
* fix: read SUAutomaticallyUpdate from Info.plist (Trevor DeVore)
* Fix casting Boolean to BOOL on Apple Silicon (Kevin Wojniak)
* Use build matrix to test on multiple Xcode versions (Rajiv Shah)
* Set UpdateAlert and AutomaticUpdateAlert window's fullscreen collectionBehavior to NSWindowCollectionBehaviorFullScreenAuxiliary to allow them to present on top of the Main App's window if it's fullscreen. (Micah Moore)
* Fixed error about "about:blank" release notes (Louis Pontoise)
* Support App Store URL scheme in release note webview (Bi11)
* Use the SHA-256 hash of the archive as the cache path (Nate Weaver)
* Don't return an optional from the FileHandle method (Nate Weaver)
* Added URL+Hashing (Nate Weaver)
# 1.23.0
* Support generating appcast with localizations (#1499) (Alik Vovkotrub)
* Support versions with git commit SHA (#1504) (Alec Larson)
* Hide "Skip..." and "Remind..." buttons when they're not relevant (#1480) (Kenneth Johnsen)
* Preserve Finder tags while updating apps (#1512) (CoreCode)
* Use `XMLNode.Options.nodePrettyPrint` in `generate_appcast` instead of trying to add whitespace manually (fumoboy007)
* Annotate SUHost for nullability (Michael Buckley)
* Use SUAVAILABLE macro (Christiaan Hofman)
* Fix warnings when using modules (nivekkagicom)
* Correction of Czech localization inconsistency (#1403) (vojtakonarik)
* BR locale fix (BR Lingo)
* Update Japanese localization (fujisoft)
* French Sparkle.strings (Jean-Baptiste)
# 1.21.3
* Losslessly reduced the size of PNG (Barijaona Ramaholimihaso)
* Catch exceptions from subcommands (Julian Mayer)
* `generate_appcast` can sign any bundles instead of just apps (Nate Weaver)
* Check that effectiveAppearance is being observed before calling removeObserver (Pierluigi)
# 1.21.2
* Allow EdDSA for delta updates, too (Kornel)
* Warning fixes (Brian Bergstrand)
* Improvements to release notes view context menu and dark mode (Bi11)
# 1.21.0
* Added support EdDSA (ed25519) signatures (Kornel)
* DSA signatures are considered outdated, and Apple's `Security.framework` only supports weaker SHA-1-based DSA.
* Both old DSA and new EdDSA are still supported (and one app can use both), but new applications should use EdDSA only, and we recommend migrating away from DSA signatures.
* `generate_keys` is now a Swift tool that stores EdDSA private keys in the Keychain
* Existing apps can continue using their old DSA keys, but we've dropped support for generation of old DSA keys
* `sign_update` is now a Swift tool that signs using EdDSA from private keys in the Keychain
* The old DSA-based signing script has been moved to `bin/old_dsa_scripts`
* The old DSA-based signing script has been fixed to work on pre-10.13 systems (Thomas Tempelmann)
* `generate_appcast` has been updated to support EdDSA signatures
* It can sign both DSA (if `dsa_priv.pem` file is specified) and EdDSA (from Keychain)
* The tool now uses Caches directory and doesn't generate unnecessary delta files
* Fixed verification of delta updates on filesystems that change permissions of symlinks
* Fixed `NSURLSession` leak (Michael Ehrmann)
# 1.20.0
* `generate_appcast` option to read private key directly from the keychain (Tamás Lustyik)
* Add delegate callbacks for fininshed download and extraction related events (Csaba Horony)
* Don't check for updates if Do Not Disturb is on (Kornel)
* Expose `CodesigningVerifier`, add codesign info API (sunuslee)
* Threading fixes:
* Fix potential hang with `dispatch_sync` to main thread (Brian Bergstrand)
* Fix closeCheckingWindow called from background thread (Alexey Martemyanov)
* Updated Finnish language resources (Jason Pollack)
* Hungarian localization (Csaba Horony)
* Log more information about authentication requests (Kornel)
* 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. (Kent Sutherland)
* Fix binary delta creation on network drives (sagecook)
* Fix compilation issues on Xcode 10 with new build system (Leo Natan)
# 1.19.0
* Refactoring of downloader code to avoid deprecated methods (Deadpikle)
* Changes to which methods run on the main thread.
Note: some delegate methods may be called on non-main thread now. (Kornel)
* Update Japanese localization (1024jp)
* Update Sparkle.strings (Stefan Paychère)
* Fix Sparkle clients polling too frequently (Jonathan Bullard)
* Handle SecTransformExecute errors (Kornel)
* Silence Touch Bar availability warnings on Xcode 9 by using API_AVAILABLE. Disable gnu-zero-variadic-macro-arguments to prevent warnings from use of API_AVAILABLE. (Kent Sutherland)
* 10.11 SDK compatibility (David Fuhrmann)
# 1.18.1
* Add optional updaterDidRelaunchApplication: method on SUUpdaterDelegate (#1115) (App Tyrant)
* Implemented sparkle:os attribute as documented (Memphiz)
* Additional termination detection in case kpoll fails. (fujisoft)
* Included bin files in CocoaPods installation (Keith Smiley)
* Updated Dutch localization (Eitot)
* Updated German localization (Eitot)
* Updated Japanese translation (1024jp)
* Updated Portuguese translation (Victor)
* Updated to Xcode 9/Swift 4
# 1.18.0
* Name of the host app is used in authorization prompt (the `SPARKLE_RELAUNCH_TOOL_NAME` setting is now obsolete)
* More detailed progress bar for package installers (Kornel Lesiński)
* Disabled the keyboard shortcut for the install button for scheduled updates to avoid accidental installs. (George Nachman)
* generate_appcast tool adds release notes if there's an .html file with the same base name as the archive (Brett Walker)
* Added `sparkle:shortVersionString` to the enclosure, #1032 (Brett Walker)
* Fixed Japanese localization (1024jp)
* Fixed escaping of system profile URLs
* Added more logging in various failure cases (Kornel Lesiński)
* Better error message for quarantined apps that can't be updated
# 1.17.0
* Added Touch Bar support (Bi11)
* Upgraded SULog to use logging APIs that Apple provides built-in (Zorg)
* Skip buttons are disabled if the update is marked as critical (Kornel Lesiński)
* Background updates ask OS for lower-priority networking (Kornel Lesiński)
* Refactorings to sync with upcoming 2.0
* Added kqueue based termination listener (Zorg)
* Added AppKit prevention guards to modules that shouldn't import it (Zorg)
* Added Obj-C generics where applicable (Zorg)
* Made SUBundleIcon & SUApplicationInfo take SUHost, not NSBundle (Zorg)
log_message("Example:\n\t%s\"Developer ID Application\" ./XPCServices/org.sparkle-project.InstallerLauncher.xpc"%(sys.argv[0]))
log_message("")
log_message("Use this script to sign XPC Services to include in your Sandboxed application.")
log_message("")
log_message("bundle-id is optional and only needs to be provided when signing InstallerConnection and InstallerStatus services. Most applications do not need to use these services and can provide additional entitlements to their application instead.")
log_message("")
log_message("This script may not be needed for common development workflows. Please visit https://sparkle-project.org/documentation/sandboxing/ for more details and instructions.")
if__name__=="__main__":
iflen(sys.argv)<3:
print_usage()
sys.exit(1)
signing_identity=sys.argv[1]
remaining_args=sys.argv[2:]
bundle_id=None
ifremaining_args[0]=='-b':
iflen(remaining_args)<3:
# We need the bundle-id and at least one XPC Service to sign
log_message("Error: Bundle ID must be specified for signing %s. As noted in the usage above, you probably don't need to embed this service."%(service_name))
Loaded 100 of 716 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.