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.
* 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
We have one heuristic for when a .framework version changes, and another for when a file with the same name moves to another location.
To support this, we added a clone + binary diff command.
Also document and improve the format.
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.
* 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.
* Fix issue #608. From the framework, the error is logged via SULog.
From the tool, the error is logged to stderr. Uses NSError handling for
both.
* Move patch version validation for creating a binary diff into the
BinaryDelta tool
* Add parameter assertions to createBinaryDelta and handle if
-getFileSystemRepresentation:maxLength: fails
This will break backwards compatibility with version 1 patches, which generated tree hashes differently and did not handle applying permission changes in some cases.
A version flag is also added to BinaryDelta create for creating patches an older version of BinaryDelta apply can handle. This is only meant for transition purposes.
BinaryDelta can now create proper diffs in the case if a non-executable file becomes an executable file, or vise versa. Currently for simplicit
y and backward-compatibility we delete then extract if an executable difference is found, rather than creating a diff. Files that contain an executable difference are unlikely to be large anyway.
We also change the tree hash function so it can track executable permission differences on files. It also now tracks file types so it is less collision-resistant for example in the case where a regular file becoming a symlink could have resulted in the same hash. Because the tree hash function changed, major & minor versioning to the format was introduced. Older minor versions remain compatible, but older major versions do not. In this case, we've only bumped the minor version. In this case, older versions can apply a patch created by a newer version, and newer versions can apply a patch created by an older version.
More error handling is now checked, some code improvements were made, and some adjustments were made to the tests with regard to the changes above.