From 3b309571891dd7985f32b2c1b755aead316ebe08 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Wed, 13 May 2026 22:27:33 +0000 Subject: [PATCH] zfs_2_4: 2.4.1 -> 2.4.2 Update zfs_unstable as well as it currently matches zfs_2_4. Fails to build on older Kernel, so backport a patch to fix (that has been merged upstream already). See also https://github.com/openzfs/zfs/issues/18528. --- pkgs/os-specific/linux/zfs/2_4.nix | 6 +++--- pkgs/os-specific/linux/zfs/generic.nix | 11 ++++++++++- pkgs/os-specific/linux/zfs/unstable.nix | 6 +++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/pkgs/os-specific/linux/zfs/2_4.nix b/pkgs/os-specific/linux/zfs/2_4.nix index e63787fd7a4b..5752d198e755 100644 --- a/pkgs/os-specific/linux/zfs/2_4.nix +++ b/pkgs/os-specific/linux/zfs/2_4.nix @@ -13,10 +13,10 @@ callPackage ./generic.nix args { kernelModuleAttribute = "zfs_2_4"; kernelMinSupportedMajorMinor = "4.18"; - kernelMaxSupportedMajorMinor = "6.19"; + kernelMaxSupportedMajorMinor = "7.0"; # this package should point to the latest release. - version = "2.4.1"; + version = "2.4.2"; tests = { inherit (nixosTests.zfs) series_2_4; @@ -30,5 +30,5 @@ callPackage ./generic.nix args { amarshall ]; - hash = "sha256-gapM2PNVOjhwGw6TAZF6QDxLza7oqOf1tpj7q0EN9Vg="; + hash = "sha256-OqsKHzyFjjyX8CoajDGydY4TbuQqMA37PIaEOL+vDug="; } diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix index ea017985f78e..f1ee2eb7d6fe 100644 --- a/pkgs/os-specific/linux/zfs/generic.nix +++ b/pkgs/os-specific/linux/zfs/generic.nix @@ -4,6 +4,7 @@ let lib, stdenv, fetchFromGitHub, + fetchpatch2, autoreconfHook269, util-linux, nukeReferences, @@ -99,7 +100,15 @@ let inherit rev hash; }; - patches = extraPatches; + patches = + extraPatches + ++ + lib.optional + (kernel != null && lib.versionAtLeast version "2.4" && lib.versionOlder kernel.version "5.14") + (fetchpatch2 { + url = "https://github.com/openzfs/zfs/commit/58c8dc5f6926eb96903a3f38b141e8998ef9261b.patch?full_index=1"; + hash = "sha256-eYkMhHsHBA9MKXnB/GuHpuv44g1SCGV5Or0InPBeNkU="; + }); postPatch = optionalString buildKernel '' diff --git a/pkgs/os-specific/linux/zfs/unstable.nix b/pkgs/os-specific/linux/zfs/unstable.nix index 698c3ba41646..f72e792a16c0 100644 --- a/pkgs/os-specific/linux/zfs/unstable.nix +++ b/pkgs/os-specific/linux/zfs/unstable.nix @@ -10,20 +10,20 @@ callPackage ./generic.nix args { kernelModuleAttribute = "zfs_unstable"; kernelMinSupportedMajorMinor = "4.18"; - kernelMaxSupportedMajorMinor = "6.19"; + kernelMaxSupportedMajorMinor = "7.0"; # this package should point to a version / git revision compatible with the latest kernel release # IMPORTANT: Always use a tagged release candidate or commits from the # zfs--staging branch, because this is tested by the OpenZFS # maintainers. - version = "2.4.1"; + version = "2.4.2"; # rev = ""; tests = { inherit (nixosTests.zfs) unstable; }; - hash = "sha256-gapM2PNVOjhwGw6TAZF6QDxLza7oqOf1tpj7q0EN9Vg="; + hash = "sha256-OqsKHzyFjjyX8CoajDGydY4TbuQqMA37PIaEOL+vDug="; extraLongDescription = '' This is "unstable" ZFS, and will usually be a pre-release version of ZFS.