From 1a81fe0cc89a4eb7c28c7a6b376700c9af869709 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Sat, 14 Oct 2023 08:18:46 -0400 Subject: [PATCH 1/3] zfs: 2.1.13 -> 2.2.0 --- .../manual/release-notes/rl-2311.section.md | 2 ++ nixos/tests/zfs.nix | 4 --- pkgs/os-specific/linux/zfs/generic.nix | 27 ++++++------------- pkgs/os-specific/linux/zfs/stable.nix | 13 +++------ 4 files changed, 13 insertions(+), 33 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 9a682077230c..2cdde5ec7ae7 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -339,6 +339,8 @@ - `jq` was updated to 1.7, its [first release in 5 years](https://github.com/jqlang/jq/releases/tag/jq-1.7). +- `zfs` was updated from 2.1.x to 2.2.0, [enabling newer kernel support and adding new features](https://github.com/openzfs/zfs/releases/tag/zfs-2.2.0). + - A new option was added to the virtualisation module that enables specifying explicitly named network interfaces in QEMU VMs. The existing `virtualisation.vlans` is still supported for cases where the name of the network interface is irrelevant. - DocBook option documentation is no longer supported, all module documentation now uses markdown. diff --git a/nixos/tests/zfs.nix b/nixos/tests/zfs.nix index 800f5e43cd15..3454fbaf78fe 100644 --- a/nixos/tests/zfs.nix +++ b/nixos/tests/zfs.nix @@ -113,8 +113,6 @@ let }; testScript = '' - # TODO: Remove this when upgrading stable to zfs 2.2.0 - unstable = ${if enableUnstable then "True" else "False"}; machine.wait_for_unit("multi-user.target") machine.succeed( "zpool status", @@ -136,8 +134,6 @@ let machine.crash() machine.wait_for_unit("multi-user.target") machine.succeed("zfs set sharesmb=on rpool/shared_smb") - if not unstable: - machine.succeed("zfs share rpool/shared_smb") machine.succeed( "smbclient -gNL localhost | grep rpool_shared_smb", "umount /tmp/mnt", diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix index 81ff2214bcad..7bb4a1b7496e 100644 --- a/pkgs/os-specific/linux/zfs/generic.nix +++ b/pkgs/os-specific/linux/zfs/generic.nix @@ -76,25 +76,14 @@ stdenv'.mkDerivation { substituteInPlace ./config/user-systemd.m4 --replace "/usr/lib/modules-load.d" "$out/etc/modules-load.d" substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d" \ --replace "/etc/default" "$out/etc/default" - # TODO: drop when upgrading to 2.2.0 - ${if isUnstable then '' - substituteInPlace ./contrib/initramfs/Makefile.am \ - --replace "/usr/share/initramfs-tools" "$out/usr/share/initramfs-tools" - substituteInPlace ./udev/vdev_id \ - --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ - "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" - substituteInPlace ./config/zfs-build.m4 \ - --replace "bashcompletiondir=/etc/bash_completion.d" \ - "bashcompletiondir=$out/share/bash-completion/completions" - '' else '' - substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)/zfs" "$out/etc/zfs" - - find ./contrib/initramfs -name Makefile.am -exec sed -i -e 's|/usr/share/initramfs-tools|'$out'/share/initramfs-tools|g' {} \; - - substituteInPlace ./cmd/vdev_id/vdev_id \ - --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ - "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" - ''} + substituteInPlace ./contrib/initramfs/Makefile.am \ + --replace "/usr/share/initramfs-tools" "$out/usr/share/initramfs-tools" + substituteInPlace ./udev/vdev_id \ + --replace "PATH=/bin:/sbin:/usr/bin:/usr/sbin" \ + "PATH=${makeBinPath [ coreutils gawk gnused gnugrep systemd ]}" + substituteInPlace ./config/zfs-build.m4 \ + --replace "bashcompletiondir=/etc/bash_completion.d" \ + "bashcompletiondir=$out/share/bash-completion/completions" ''; nativeBuildInputs = [ autoreconfHook269 nukeReferences ] diff --git a/pkgs/os-specific/linux/zfs/stable.nix b/pkgs/os-specific/linux/zfs/stable.nix index 1a77396300eb..3e53ba902cbd 100644 --- a/pkgs/os-specific/linux/zfs/stable.nix +++ b/pkgs/os-specific/linux/zfs/stable.nix @@ -16,20 +16,13 @@ callPackage ./generic.nix args { if stdenv'.isx86_64 || removeLinuxDRM then kernel.kernelOlder "6.6" else kernel.kernelOlder "6.2"; + latestCompatibleLinuxPackages = if stdenv'.isx86_64 || removeLinuxDRM then linuxKernel.packages.linux_6_5 else linuxKernel.packages.linux_6_1; - extraPatches = [ - # applied in version 2.2.x - (fetchpatch { - name = "musl.patch"; - url = "https://github.com/openzfs/zfs/commit/1f19826c9ac85835cbde61a7439d9d1fefe43a4a.patch"; - sha256 = "XEaK227ubfOwlB2s851UvZ6xp/QOtYUWYsKTkEHzmo0="; - }) - ]; # this package should point to the latest release. - version = "2.1.13"; + version = "2.2.0"; - sha256 = "tqUCn/Hf/eEmyWRQthWQdmTJK2sDspnHiiEfn9rz2Kc="; + sha256 = "sha256-s1sdXSrLu6uSOmjprbUa4cFsE2Vj7JX5i75e4vRnlvg="; } From 53bb653759a95ae98c9aa9389ed825384da732a1 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Sat, 14 Oct 2023 08:19:01 -0400 Subject: [PATCH 2/3] zfsUnstable: 2.2.0-rc5 -> 2.2.1-unstable-2023-10-21 --- pkgs/os-specific/linux/zfs/unstable.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/zfs/unstable.nix b/pkgs/os-specific/linux/zfs/unstable.nix index 23882322c093..9c7e14c31bf3 100644 --- a/pkgs/os-specific/linux/zfs/unstable.nix +++ b/pkgs/os-specific/linux/zfs/unstable.nix @@ -23,9 +23,10 @@ callPackage ./generic.nix args { # IMPORTANT: Always use a tagged release candidate or commits from the # zfs--staging branch, because this is tested by the OpenZFS # maintainers. - version = "2.2.0-rc5"; + version = "2.2.1-unstable-2023-10-21"; + rev = "95785196f26e92d82cf4445654ba84e4a9671c57"; - sha256 = "sha256-97dTmSneAuhDR7LrJxG7/xPpI1hGv5mDDuq8HRTZKx0="; + sha256 = "sha256-s1sdXSrLu6uSOmjprbUa4cFsE2Vj7JX5i75e4vRnlvg="; isUnstable = true; } From b54ec5ac08641aafc6f3e14130d0268287745574 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Mon, 16 Oct 2023 08:30:42 -0400 Subject: [PATCH 3/3] python3Packages.py-libzfs: 22.02.4 -> 22.12.4.2 --- pkgs/development/python-modules/py-libzfs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/py-libzfs/default.nix b/pkgs/development/python-modules/py-libzfs/default.nix index 1eacc39b8ab0..d148e539d3ff 100644 --- a/pkgs/development/python-modules/py-libzfs/default.nix +++ b/pkgs/development/python-modules/py-libzfs/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "py-libzfs"; - version = "22.02.4"; + version = "22.12.4.2"; src = fetchFromGitHub { owner = "truenas"; repo = pname; rev = "TS-${version}"; - hash = "sha256-BJG+cw07Qu4aL99pVKNd7JAgr+w/6Uv2eI46EB615/I="; + hash = "sha256-vBLbjP1gQEQNsTLc2W6uRzCFHQXZp+jGiwE0Pe8VTuw="; }; nativeBuildInputs = [ cython ];