Commit Graph
49 Commits
Author SHA1 Message Date
Zorg 469f423e28 Fix test cases for localized release notes (#2444) 2023-09-28 22:52:32 -07:00
Zorg f6a86f52b3 Default to English for XML nodes when no xml:lang is present (#2440)
This only applies when multiple XML nodes are present with the same name. E.g. multiple description or releaseNoteLink elements with different xml:lang's specified.

Also generate a warning if an language has to be interpreted implicitly when there is no xml:lang explicitly specified and there are multiple node items.
2023-09-28 20:02:29 -07:00
Zorg 39495fd562 Remove redundant codesign check (#2341) 2023-03-12 19:44:50 -07:00
Zorg ffc203b89a Add support for plain text release notes view (#2315)
This also allows embedded release notes to be plain text using sparkle:format="plain-text" attribute.

Also, Catalyst apps only support plain text release notes (compared to before where release notes weren't supported for Catalyst apps).
2023-02-11 19:34:26 -08:00
Zorg 348c3a9658 Don't construct appcast item if enclosure URL is invalid (#2317) 2023-02-07 20:12:07 -08:00
Zorg 9042c8dbd9 Fall back to regular update if delta update fails to download (#2118)
Also log out the download failure when a delta update fails to download (such as a 404 error for example).

Additionally, add a check to make sure that top-level appcast items cannot be delta update items.
2022-05-01 22:58:29 -07:00
Zorg 8ea4d705f5 Add option to ignore skipped upgrades (#2081)
Normally when a major upgrade is skipped, subsequent updates for that major release are skipped. This element however allows publishing updates that ignore the user skipping the major version before a specific sub-release.
2022-01-29 23:02:45 -08:00
Zorg ac2ef612bc Don't let skipping a major version to skip subsequent major versions (#2079) 2022-01-29 10:37:09 -08:00
Zorg 930ea303fd Add sparkle:belowVersion element for informational updates (#2080)
This allows marking all updates below a specific version as informational only.

A new element (sparkle:belowVersion) was introduced this over a new attribute for sparkle:version due to compatibility reasons.
2022-01-29 10:35:24 -08:00
Zorg 1ef42e9d1c Add apfs dmg unarchiving test (#2028) 2021-11-25 15:53:19 -05:00
Zorg 39cedd4092 Fix unarchiving job being blocked when passed bad input (#2023) 2021-11-24 11:16:31 -05:00
Zorg 45956ae5b0 Support relative links for fullReleaseNotesLink and enforce http(s) (#2003) 2021-11-06 01:56:50 -07:00
Mayur Pawashe d9d7e310a5 Pull current date out of appcast filtering and add tests for phased group rollouts (#1889) 2021-07-11 16:47:05 -07:00
Zorg c329319b0c Merge branch '2.x' into channels 2021-06-27 15:49:00 -07:00
Zorg c968334192 Allow only one channel in appcast feed items 2021-06-27 15:14:37 -07:00
Zorg 9bb59b8c00 Add tests for filtering allowed channels and macOS releases 2021-06-27 00:28:09 -07:00
Zorg ccd8886bfd Adopt sparkle:version and sparkle:shortVersionString elements
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).
2021-06-26 21:01:39 -07:00
Zorg 686fd05fce Add tests for informational only updates 2021-06-20 23:11:02 -07:00
Zorg 8fb44df0b7 Add unit tests for critical updates 2021-05-31 10:16:04 -07:00
Zorg 253f45b476 Add optional version field to sparkle:criticalUpdate element
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.
2021-05-30 23:37:38 -07:00
Zorg 3c9508bd2a Add tests for testing minimum autoupdate version 2021-05-02 22:32:50 -07:00
Zorg 60fcc89b7e Make phased rollout interval an app cast element not an enclosure one
Previous behavior doesn't work properly with delta update items. They should not be treated separately.
2021-01-24 23:21:18 -08:00
Zorg 9818eff9a2 Add support for phased group updates to 2.x 2021-01-24 18:14:48 -08:00
Gwynne Raskind 418068e902 Forward-port PR #1499 (localized release notes in appcast) to 2.x 2020-07-24 20:33:35 -05:00
Jordan Rose 705638799c Allow relative URLs in appcasts
The base URL is taken from the server response rather than from the
original requested URL to account for redirects.
2020-06-23 22:40:53 +01:00
Jordan Rose 3e000a897f Test post-validation of code-signed binaries
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.
2020-06-16 21:13:39 +01:00
Jordan Rose b969c31f07 Test SUUpdateValidator's post-validation logic
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.
2020-06-16 21:13:39 +01:00
Jordan Rose 299157c3e7 Start SUUpdateValidatorTest with prevalidation testing 2020-06-16 21:13:39 +01:00
Jordan Rose 19ef31b681 Use EdDSA keys in test app (like 9c4729ed on 1.x) 2020-06-10 12:14:30 +01:00
Zorg fdebf50f81 Merge branch 'master' into ui-separation-and-xpc 2017-01-15 20:21:49 -05:00
Thomas Tempelmann c1488b0515 Adds test cases for "sparkle:criticalUpdate" tag. (#999)
* 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)
2017-01-16 00:02:32 +00:00
Zorg 5ce1d7b3dc Merge branch 'master' into ui-separation-and-xpc 2017-01-02 18:12:01 -05:00
Zorg 2d1688c063 Make guided package installs the default for updating packages
Interactive package installs now need to be opted into (foo.sparkle_interactive.pkg or foo.sparkle_interactive.mpkg)

The website documentation may need to be updated later, and this should be noted as an important point in the change log.
2016-12-28 23:15:22 -05:00
Zorg 553168ba51 Merge branch 'master' into ui-separation-and-xpc 2016-12-23 14:44:32 -05:00
Zorg 98b3a9828a Use localhost instead of 0.0.0.0. Latter doesn't work when offline. 2016-12-22 12:17:45 -05:00
Zorg a780894d14 Fix appcast unit tests 2016-06-16 23:23:43 -04:00
Kornel Lesiński 8cca51d08b Merge remote-tracking branch 'origin/master' into nsparse 2016-03-14 12:32:15 +00:00
Kornel Lesiński 48f18d000c Support XML namespace prefixes when parsing appcasts
Fixes #771
2016-03-01 00:37:52 +00:00
Zorg b9c664687d Take delta updates in account and add tests for them 2016-02-19 12:43:41 -05:00
Zorg 2a3e88bf96 Test the dateString field 2016-02-19 11:45:54 -05:00
Zorg 004ac3f9ae Test the best chosen appcast item 2016-02-19 11:26:35 -05:00
Kornel Lesiński a4bdbb7ab3 Merge commit 'a11b1209a97bafd713189f9b0fa14584ba6e100a' into 1.14.x
* commit 'a11b1209a97bafd713189f9b0fa14584ba6e100a':
  Unit test for appcast parsing
  v1.13.1
2016-02-18 19:28:41 +01:00
Kornel Lesiński a11b1209a9 Unit test for appcast parsing 2016-02-18 13:50:05 +01:00
Andrew K. Boyd 4f88994cf0 Encrypted dmg support
Add the capability to set a decryption password for updating with an
encrypted dmg file.

This enables the the ability to update using an encrypted disk image without having to prompt the user for a password. This is useful when access to the application binaries is only available via distribution or from a location in which authentication is required. This can help prevent an attacker from having unwanted access to application binaries for reverse engineering.

This assists with a defense in depth approach to security.
2015-11-02 10:02:31 -05:00
Zorg 2ba0fa254f Improve Unarchiver Tests
* All supported compression formats are now tested including dmg, which
has a license agreement included
* The hash of the extracted directory is now checked, which encompasses
every file's existence, its contents, and its permissions.
* Re-written using Swift
2015-09-05 10:00:59 -04:00
Kornel Lesiński 209d6db3a1 Test guided installation 2015-04-25 12:44:21 +01:00
Kornel Lesiński 5ba0b2d656 Test unarchiver 2015-04-23 01:20:12 +01:00
Isaac Wankerl c1f9fcb456 Add SUCodeSigningVerifier unit tests.
There's a zipped up sample app in the unit test target.  This gets unzipped to
a temporary folder and there are three versions of it: the original which is not
code signed at all, another with a valid code signature, and a third which
has had one of its resources removed after code signing to make it invalid.
2015-04-13 15:27:59 -05:00
Jake Petroules ecf602f589 Avoid hardcoded file paths. 2014-08-27 21:37:47 -04:00