Commit Graph
18 Commits
Author SHA1 Message Date
Zorg b1f6c161d1 Use snprintf instead of sprintf to fix compile warning (#2179) 2022-06-25 16:41:32 -07:00
Zorg d7942768b8 Validate permission bits of Sparkle executable for delta updates (#2151) 2022-06-11 11:21:52 -07:00
Zorg 94719edeb3 Ignore custom icons set via resource forks in delta updates (#2114)
For creation, we will disallow creating delta updates if a custom resource fork icon data is found in either the old or app bundles.

For applying, we will just ignore the icon data when performing hash verification and continue applying the patch.
2022-04-24 00:38:42 -07:00
Dan Rigdon-Bel 8edc77fdb2 Use strcoll_l() for locale-independent comparisons (#2087)
The update code uses the compareFiles function to determine the sort order of file names in a directory, which is then compared with a list of files in the Sparkle update info. If the list of files of a directory from Sparkle's update is different than what is on disk, the Sparkle abandons the update and does a full download. This bug would prevent Sparkle from updating properly when the file lists are calculated on an English language system, but then checked on a destination Japanese system.

The fix is to use strcoll_l(), which is locale-independent, when comparing file names for sorting. This will ignore any locale changes the host application has made that could potentially affect Sparkle's sort order.
2022-02-08 20:38:55 -08:00
Zorg c30f6fe7fb Calculate hash of file for delta updates without using mmap (#2067) 2022-01-18 00:04:40 -08:00
Zorg 1641371e83 Warn and validate against irregular permissions for delta patches (#2061)
* Only track 0755 permissions for symbolic links

Also warn the user when encountering symbolic links that have a non-standard permission mode.

* Warn users when bad or irregular permissions are encountered
2022-01-15 23:00:59 -08:00
Zorg 41f953d77b Fix minor binary delta issues and make version 3 the default (#2055) 2022-01-08 21:23:15 -08:00
Zorg 71fc8d7b11 Add additional options to delta tools (#2052) 2022-01-04 00:14:45 -08:00
Zorg 23fc577184 Add new version 3 binary delta archive format (#2051)
This new format introduces:

* A new container format which stores metadata in a way that is more efficient for compression, decompression, and size. Creation time can be 2x faster, apply time can be a few seconds faster, size savings can be 500 KB - couple of MB due to metadata alone.
* An array of supported compression formats including lzma, bzip2, zlib and more. We now default to lzma which is as competitive as bzip2 (which we were using in version 2 format) in applying/creation times, but can save several MB on size.
* Tracking of files from an old app being replicated in different locations in the new app. This can track unchanged files being renamed and can result in significant savings if the files are large.

Version 2 format is still the default. To use version 3, pass --version=3 to BinaryDelta when creating a patch. We will switch the default to version 3 later. generate_appcast support is upcoming.
2022-01-02 11:35:51 -08:00
Zorg fc44085602 Isolate xar usage in its own archive type for delta patches (#2047)
Also remove support for creating and applying version 1 delta files. Version 2 delta files have been supported by Sparkle 1.10 and later.
2021-12-29 22:41:08 -08:00
Zorg a81f8f3d2d Add safer handling for applying binary delta files (#1988) 2021-10-29 12:14:23 -07:00
Mayur Pawashe 29a2fa7974 Create valid xar files (#1906)
* Create xar files with valid directory/filename structure

* Don't use file hash for determining if files are equal or not
2021-07-24 09:04:48 -07:00
Mayur PawasheandKornel cb9386a4ea Ignore symlink permissions in binary deltas (#1905)
Co-authored-by: Kornel <kornel@geekhood.net>
2021-07-23 17:42:13 -07:00
Kent Sutherland d574574345 Explicitly specify types to silence "Messaging unqualified id" warning that's new in Xcode 10.
Removed __has_feature(objc_generics) check and use generisc to help silence the warnings.
2018-06-14 21:22:38 +02:00
Kornel Lesiński 2d30762570 Merge remote-tracking branch 'origin/master' into ui-separation-and-xpc
* origin/master: (39 commits)
  %s is deliberate in this format string
  Unused
  Make generate_appcast available as a shared scheme
  Shush Xcode
  Link straight to docs from the readme
  ignore .html files when scanning for archives
  Missing strings translation.
  Updated swift
  Warn against abusing installUpdatesIfAvailable
  when generating the appcast, if an .html file exists of the same name as the archive, then it will be linked in as the releaseNotesLink
  Revert "Fix pt_BR translations"
  Revert "Fix pt_BR translations (#1039)"
  Fix Japanse localization
  Add more info to auth tool run failure
  Fix pt_BR translations (#1039)
  Fix pt_BR translations
  Disable the keyboard shortcut for the install button for scheduled updates to avoid accidental installs.
  added `sparkle:shortVersionString` to the enclosure, #1032
  Changelog
  percent encode the filename used in the delta url
  ...
2017-03-24 12:14:05 +00:00
Zorg dfaed624ae Merge branch 'master' into ui-separation-and-xpc 2017-01-17 15:58:02 -05:00
Zorg 8c564fef1f Remove +[SUFileManager defaultManager] and use alloc/init 2016-07-30 10:39:17 -04:00
Zorg dd02cb2509 Change Autoupdate target from app to command line tool 2016-07-18 18:46:12 -04:00