zfs_2_4: apply patch for #18366 (dedup=on data corruption)

This was reproducible with substitution of large NARs with a lot of
files and a dedup=on Nix store. While Nix would correctly produce a
signature verification error if the hash was known, builds could
silently be corrupt.

TrueNAS backported this, so let's as well so this doesn't bite anyone
else.

See: https://github.com/truenas/zfs/pull/390
See: https://github.com/openzfs/zfs/issues/18366
See: https://github.com/openzfs/zfs/pull/18544
Signed-off-by: Morgan Jones <me@numin.it>
(cherry picked from commit 371a819607)
This commit is contained in:
Morgan Jones 2026-06-25 23:24:47 -07:00 committed by github-actions[bot]
commit fd7cd5390f

View file

@ -18,6 +18,15 @@ callPackage ./generic.nix args {
# this package should point to the latest release.
version = "2.4.2";
extraPatches = [
# https://github.com/openzfs/zfs/issues/18366
# dedup data corruption fix unreleased as of OpenZFS 2.4.3
(fetchpatch {
url = "https://github.com/openzfs/zfs/commit/6fb72fda0f60d9efb591e320f83f78b19ec451cc.patch?full_index=1";
hash = "sha256-UuSVmO61Ux5S3F+JAtRnHyeVS4EFobDTKBuD5s8PI+k=";
})
];
tests = {
inherit (nixosTests.zfs) series_2_4;
}