Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-24.05] zfs: 2.2.5 -> 2.2.6 #340382

Merged
merged 5 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nixos/tests/zfs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ in {
enableSystemdStage1 = true;
};

installerBoot = (import ./installer.nix { }).separateBootZfs;
installer = (import ./installer.nix { }).zfsroot;
installerBoot = (import ./installer.nix { inherit system; }).separateBootZfs;
installer = (import ./installer.nix { inherit system; }).zfsroot;

expand-partitions = makeTest {
name = "multi-disk-zfs";
Expand Down
5 changes: 1 addition & 4 deletions pkgs/os-specific/linux/zfs/2_1.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ callPackage
, kernel ? null
, stdenv
, linuxKernel
, lib
, nixosTests
, ...
Expand All @@ -15,9 +14,7 @@ callPackage ./generic.nix args {
# this attribute is the correct one for this package.
kernelModuleAttribute = "zfs_2_1";
# check the release notes for compatible kernels
kernelCompatible = kernel.kernelOlder "6.8";

latestCompatibleLinuxPackages = linuxKernel.packages.linux_6_6;
kernelCompatible = kernel: kernel.kernelOlder "6.8";

# This is a fixed version to the 2.1.x series, move only
# if the 2.1.x series moves.
Expand Down
9 changes: 3 additions & 6 deletions pkgs/os-specific/linux/zfs/2_2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
, kernel ? null
, stdenv
, lib
, linuxKernel
, nixosTests
, ...
} @ args:
Expand All @@ -15,12 +14,10 @@ callPackage ./generic.nix args {
# this attribute is the correct one for this package.
kernelModuleAttribute = "zfs_2_2";
# check the release notes for compatible kernels
kernelCompatible = kernel.kernelOlder "6.10";

latestCompatibleLinuxPackages = linuxKernel.packages.linux_6_6;
kernelCompatible = kernel: kernel.kernelOlder "6.11";

# this package should point to the latest release.
version = "2.2.5";
version = "2.2.6";

tests = [
nixosTests.zfs.installer
Expand All @@ -29,5 +26,5 @@ callPackage ./generic.nix args {

maintainers = with lib.maintainers; [ adamcstephens amarshall ];

hash = "sha256-BkwcNPk+jX8CXp5xEVrg4THof7o/5j8RY2SY6+IPNTg=";
hash = "sha256-wkgoYg6uQOHVq8a9sJXzO/QXJ6q28l7JXWkC+BFvOb0=";
}
21 changes: 14 additions & 7 deletions pkgs/os-specific/linux/zfs/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ let
genericBuild =
{ pkgs, lib, stdenv, fetchFromGitHub, fetchpatch
, autoreconfHook269, util-linux, nukeReferences, coreutils
, linuxKernel
, perl
, configFile ? "all"

Expand All @@ -27,8 +28,6 @@ let
, kernelModuleAttribute
, extraPatches ? []
, rev ? "zfs-${version}"
, isUnstable ? false
, latestCompatibleLinuxPackages
, kernelCompatible ? null
, maintainers ? (with lib.maintainers; [ amarshall ])
, tests
Expand Down Expand Up @@ -183,9 +182,11 @@ let
# Remove tests because they add a runtime dependency on gcc
rm -rf $out/share/zfs/zfs-tests

# Add Bash completions.
install -v -m444 -D -t $out/share/bash-completion/completions contrib/bash_completion.d/zfs
(cd $out/share/bash-completion/completions; ln -s zfs zpool)
${optionalString (lib.versionOlder version "2.2") ''
# Add Bash completions.
install -v -m444 -D -t $out/share/bash-completion/completions contrib/bash_completion.d/zfs
(cd $out/share/bash-completion/completions; ln -s zfs zpool)
''}
'';

postFixup = let
Expand All @@ -199,7 +200,13 @@ let
outputs = [ "out" ] ++ optionals buildUser [ "dev" ];

passthru = {
inherit enableMail latestCompatibleLinuxPackages kernelModuleAttribute;
inherit enableMail kernelModuleAttribute;
latestCompatibleLinuxPackages = lib.pipe linuxKernel.packages [
builtins.attrValues
(builtins.filter (kPkgs: (builtins.tryEval kPkgs).success && kPkgs ? kernel && kPkgs.kernel.pname == "linux" && kernelCompatible kPkgs.kernel))
(builtins.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)))
lib.last
];
# The corresponding userspace tools to this instantiation
# of the ZFS package set.
userspaceTools = genericBuild (outerArgs // {
Expand Down Expand Up @@ -236,7 +243,7 @@ let
mainProgram = "zfs";
# If your Linux kernel version is not yet supported by zfs, try zfs_unstable.
# On NixOS set the option `boot.zfs.package = pkgs.zfs_unstable`.
broken = buildKernel && (kernelCompatible != null) && !kernelCompatible;
broken = buildKernel && (kernelCompatible != null) && !(kernelCompatible kernel);
};
};
in
Expand Down
10 changes: 3 additions & 7 deletions pkgs/os-specific/linux/zfs/unstable.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ callPackage
, kernel ? null
, stdenv
, linuxKernel
, nixosTests
, ...
} @ args:
Expand All @@ -14,21 +13,18 @@ callPackage ./generic.nix args {
# this attribute is the correct one for this package.
kernelModuleAttribute = "zfs_unstable";
# check the release notes for compatible kernels
kernelCompatible = kernel.kernelOlder "6.11";

latestCompatibleLinuxPackages = linuxKernel.packages.linux_6_10;
kernelCompatible = kernel: kernel.kernelOlder "6.11";

# 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-<version>-staging branch, because this is tested by the OpenZFS
# maintainers.
version = "2.2.5";
version = "2.2.6";
# rev = "";

isUnstable = true;
tests = [
nixosTests.zfs.unstable
];

hash = "sha256-BkwcNPk+jX8CXp5xEVrg4THof7o/5j8RY2SY6+IPNTg=";
hash = "sha256-wkgoYg6uQOHVq8a9sJXzO/QXJ6q28l7JXWkC+BFvOb0=";
}
Loading