From 64a4de856877a32e4f8f4863101e2cbbfdc6b62b Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Fri, 24 Mar 2023 21:39:57 +0100 Subject: [PATCH 1/2] zfsUnstable: make it compatible again with 6.2.8 and potentially 6.3 Patched from https://github.com/openzfs/zfs/pull/14668 --- pkgs/os-specific/linux/zfs/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index 5e5ec6d79312..750586ff1b1d 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -256,5 +256,13 @@ in { sha256 = "sha256-CdPuyZMXFzANEdnsr/rB5ckkT8X5uziniY5vmRCKl1U="; isUnstable = true; + + # Necessary for 6.2.8+ and 6.3 compatibility, see https://github.com/openzfs/zfs/issues/14658 + extraPatches = [ + (fetchpatch { + url = "https://github.com/openzfs/zfs/pull/14668.patch"; + hash = "sha256-PR7hxxdjLkjszADdw0R0JRmBPfDlsXG6D+VfC7QzEhk="; + }) + ]; }; } From 56fa7ab066165a2eb6274a0ab423b518e3e115b4 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Mon, 27 Mar 2023 14:25:08 +0200 Subject: [PATCH 2/2] nixos/tests/zfs: add zfsUnstable test for systemd-stage 1 --- nixos/tests/zfs.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/tests/zfs.nix b/nixos/tests/zfs.nix index 3e55369daa06..bcb9d9bcfd60 100644 --- a/nixos/tests/zfs.nix +++ b/nixos/tests/zfs.nix @@ -12,6 +12,7 @@ let then pkgs.zfsUnstable.latestCompatibleLinuxPackages else pkgs.linuxPackages , enableUnstable ? false + , enableSystemdStage1 ? false , extraTest ? "" }: makeTest { @@ -36,6 +37,7 @@ let boot.kernelPackages = kernelPackage; boot.supportedFilesystems = [ "zfs" ]; boot.zfs.enableUnstable = enableUnstable; + boot.initrd.systemd.enable = enableSystemdStage1; environment.systemPackages = [ pkgs.parted ]; @@ -176,6 +178,11 @@ in { enableUnstable = true; }; + unstableWithSystemdStage1 = makeZfsTest "unstable" { + enableUnstable = true; + enableSystemdStage1 = true; + }; + installer = (import ./installer.nix { }).zfsroot; expand-partitions = makeTest {