From f165a42ec0ce7c7542542e058e4a019dff36df74 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Wed, 13 May 2026 18:44:42 -0400 Subject: [PATCH 1/4] nixosTests.zfs: Fix broken tests Broken in 5e0a4d739ddd85e045e684a74660b6f8e0b9f705. --- nixos/tests/zfs.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/nixos/tests/zfs.nix b/nixos/tests/zfs.nix index 7851368075a0..2f78691c6cfa 100644 --- a/nixos/tests/zfs.nix +++ b/nixos/tests/zfs.nix @@ -226,8 +226,17 @@ in enableSystemdStage1 = true; }; - installerBoot = (import ./installer.nix { inherit system; }).separateBootZfs; - installer = (import ./installer.nix { inherit system; }).zfsroot; + installerBoot = + (import ./installer.nix { + inherit system; + systemdStage1 = false; + }).separateBootZfs; + + installer = + (import ./installer.nix { + inherit system; + systemdStage1 = false; + }).zfsroot; expand-partitions = makeTest { name = "multi-disk-zfs"; From 4b45e5c778fab0f68932d649ad391401a8986d17 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Wed, 13 May 2026 18:48:08 -0400 Subject: [PATCH 2/4] nixosTests.zfs: Test installer with systemd stage 1 --- nixos/tests/zfs.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nixos/tests/zfs.nix b/nixos/tests/zfs.nix index 2f78691c6cfa..418d7aeeda9b 100644 --- a/nixos/tests/zfs.nix +++ b/nixos/tests/zfs.nix @@ -238,6 +238,18 @@ in systemdStage1 = false; }).zfsroot; + installerBootWithSystemdStage1 = + (import ./installer.nix { + inherit system; + systemdStage1 = true; + }).separateBootZfs; + + installerWithSystemdStage1 = + (import ./installer.nix { + inherit system; + systemdStage1 = true; + }).zfsroot; + expand-partitions = makeTest { name = "multi-disk-zfs"; nodes = { From 3b309571891dd7985f32b2c1b755aead316ebe08 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Wed, 13 May 2026 22:27:33 +0000 Subject: [PATCH 3/4] 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. From 5a71c7cdef40248a52ff95350e4853095d2fd9eb Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Wed, 13 May 2026 22:25:37 +0000 Subject: [PATCH 4/4] zfs_2_3: 2.3.6 -> 2.3.7 The patch already applied on zfs_2_4 also needs to be applied here. --- pkgs/os-specific/linux/zfs/2_3.nix | 6 +++--- pkgs/os-specific/linux/zfs/generic.nix | 11 ++++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/pkgs/os-specific/linux/zfs/2_3.nix b/pkgs/os-specific/linux/zfs/2_3.nix index b28159b0c1ac..bf6701cc0ff8 100644 --- a/pkgs/os-specific/linux/zfs/2_3.nix +++ b/pkgs/os-specific/linux/zfs/2_3.nix @@ -13,10 +13,10 @@ callPackage ./generic.nix args { kernelModuleAttribute = "zfs_2_3"; kernelMinSupportedMajorMinor = "4.18"; - kernelMaxSupportedMajorMinor = "6.19"; + kernelMaxSupportedMajorMinor = "7.0"; # this package should point to the latest release. - version = "2.3.6"; + version = "2.3.7"; tests = { inherit (nixosTests.zfs) series_2_3; @@ -30,5 +30,5 @@ callPackage ./generic.nix args { amarshall ]; - hash = "sha256-5p9UbOQ0WY+XeAO+btDyJ04nRnOQuEuwszduEV7cbso="; + hash = "sha256-67Yo5bAJP3dXC94xybrC4xhwz7pGtrp0MUT9P6OInog="; } diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix index f1ee2eb7d6fe..1dc98829da38 100644 --- a/pkgs/os-specific/linux/zfs/generic.nix +++ b/pkgs/os-specific/linux/zfs/generic.nix @@ -102,13 +102,10 @@ let 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="; - }); + ++ lib.optional (kernel != null && 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 ''