Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package/zfs: don't download patch generated from github
Git-generated patches embed the short-hash of the objects in the repository. The length of those short hashes are subject to change in at least three cases: - the number of objects in the repository increases, so git increases the length of short hashes to get a good change there is no collision; - the git configuration changes, see core.abbrev in git-config; - the heuristic to compute the length changes in a newer git version. Since the bump to zfs 2.1.4 in commit 68dfd09, the patch generated by github has changed, causing download failures: wget --passive-ftp -nd -t 3 -O '/home/ymorin/dev/buildroot/O/master/build/.bc3f12bfac152a0c28951cec92340ba14f9ccee9.patch.uoFq9e/output' 'https://github.com/openzfs/zfs/commit/bc3f12bfac152a0c28951cec92340ba14f9ccee9.patch' --2023-11-26 16:53:25-- https://github.com/openzfs/zfs/commit/bc3f12bfac152a0c28951cec92340ba14f9ccee9.patch Resolving github.com (github.com)... 140.82.121.3 Connecting to github.com (github.com)|140.82.121.3|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 2976 (2.9K) [text/plain] Saving to: ‘/home/ymorin/dev/buildroot/O/master/build/.bc3f12bfac152a0c28951cec92340ba14f9ccee9.patch.uoFq9e/output’ /home/ymorin/dev/buildroot/O/ 100%[================================================>] 2.91K --.-KB/s in 0s 2023-11-26 16:53:25 (15.0 MB/s) - ‘/home/ymorin/dev/buildroot/O/master/build/.bc3f12bfac152a0c28951cec92340ba14f9ccee9.patch.uoFq9e/output’ saved [2976/2976] ERROR: while checking hashes from package/zfs//zfs.hash ERROR: bc3f12bfac152a0c28951cec92340ba14f9ccee9.patch has wrong sha256 hash: ERROR: expected: 96a27353fe717ff2c8b95deb8b009c4eb750303c6400e2d8a2582ab1ec12b25a ERROR: got : 246c80f66abca5a7e0c41cc7c56eec0b4cb7f16b142262480401142bbc2f999f ERROR: Incomplete download, or man-in-the-middle (MITM) attack And indeed, the length of short hashes has increased by one since then. Fix that by bundling the patch, with the short hashes that were known then, so that it matches the sha256 we had for it. Signed-off-by: Yann E. MORIN <[email protected]> (cherry picked from commit 2c3946f) Signed-off-by: Peter Korsgaard <[email protected]>
- Loading branch information