Commit Graph
27 Commits
Author SHA1 Message Date
Zorg 5343305e3f Report friendly error if installation fails with no write permission (#2157)
On macOS 13 (Ventura) and later, installation could fail if Gatekeeper blocks app modifications. Note this is only applicable for external updaters like sparkle-cli where the updater and target bundle to update have different team identifiers.
2022-06-12 18:50:40 -07:00
Zorg 339e26984e Add support for running framework and CLI as root (#2119)
When the framework or sparkle-cli is run as root, we always launch the installer (Autoupdate) in the system domain.

For the progress tool agent, we chown() the copied Updater.app so the Updater app has proper ownership of it (and clean it up later). The progress tool app may not be able to clean up the parent directory, but that's okay and will be garbage collected on a later run.

To get the username and home directory for the user session when running the framework as root, we use the SecurityConfiguration framework. Sparkle needs and depends on an active GUI user login session. If a user ssh's in to install an update, that user must be the same as the active logged in user.

Installing interactive based package updates as root is not supported. For sparkle-cli, we disallow using --interactive when running as root.

An additional error exit code is added for sparkle-cli when ran as root and trying to install a interactive based package update, which is unsupported.
2022-05-07 09:33:27 -04:00
Zorg 3fcc87086c Use user agent of updater bundle instead of the host bundle (#2020) 2021-11-12 21:09:31 -08:00
Mayur Pawashe cce5edd78d Remove installer interaction delegate API / refactor finishing update cycle (#1925) 2021-09-02 23:12:26 -07:00
Mayur Pawashe ac1bb7036c Make installing major upgrades opt-in (#1881) 2021-07-04 08:58:26 -07:00
Zorg 78a66c7dda Add channels support to sparkle-cli 2021-06-27 22:40:16 -07:00
Zorg eda1b4bdaa Remove SparkleCore target and use <> imports
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.
2021-06-06 18:38:49 -07:00
Zorg e3a467b126 Rename update permission prompt & nib to use SU prefix 2016-12-27 10:06:41 -05:00
Zorg 3547cb1239 Create SparkleCore target that only includes Core related files
Some build issues still need to be resolved.
2016-08-20 21:44:16 -04:00
Zorg 57325c7507 Add update permission request and response classes
We now pass these to and from the user driver.
2016-08-14 12:51:37 -04:00
Zorg 32d9fd6526 Add flag for custom feed URL to sparkle-cli
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.
2016-08-13 20:55:11 -04:00
Zorg c9f673cda8 Use SPU prefix in many places 2016-08-05 19:10:21 -04:00
Zorg 097710e27a Update sparkle-cli help usage and interactive flag 2016-07-29 00:16:24 -04:00
Zorg 0ca688073b Disable root support & checking
Assume that the updater will be run as a logged in user.
The command line driver and progress app aren't completely root safe anyway, and running the progress app under a different user could be quite awkward from root
2016-07-26 19:16:38 -04:00
Zorg b4f1f67ddb Prevent using wrong combination of flags 2016-05-28 23:15:54 -04:00
Zorg a113ce49bd Add interactive option to sparkle-cli
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.
2016-05-28 23:04:43 -04:00
Zorg 9d1e707577 Add probing for updates to sparkle-cli 2016-05-06 19:22:15 -04:00
Zorg c2f4be611b Add usage description & options to sparkle-cli 2016-05-01 22:14:49 -04:00
Zorg 350eba452c s/SUUpdatePermissionPromptResult/SUUpdatePermission/ && s/shouldSendProfile/sendProfile/ 2016-05-01 14:54:17 -04:00
Zorg 1356024b25 Add --grant-automatic-checks and --send-profile flags
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
2016-05-01 14:33:13 -04:00
Zorg 004da55780 Add error message if bundle paths are invalid/inaccessible 2016-05-01 12:03:50 -04:00
Zorg a4157e5989 Add checknow flag to check for updates 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.
2016-05-01 02:46:22 -04:00
Zorg d632dcb72f Add a verbose mode to command line driver 2016-05-01 01:06:38 -04:00
Zorg 11c79b7b2a Add command line argument parsing to sparkle-cli
Also add defer installation option, which will not terminate the application right away.
Rename "relaunch" option as "application" instead.
2016-05-01 00:39:28 -04:00
Zorg 83bb5354dc Use NSRunLoop instead of NSApplication
Don't use AppKit where we don't have to, especially for command line tools
2016-04-30 23:02:21 -04:00
Zorg 15483815ff Pass path to relaunch to sparkle-cli
We also now listen on termination for the app that we are going to re-launch,
rather than the bundle we are updating.
2016-04-30 22:52:04 -04:00
Zorg e1b13f9c67 Add sparkle-cli tool that can update any arbitrary app
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.
2016-04-11 01:29:08 -04:00