Revert "zfs: dynamically determine latestCompatibleLinuxPackages"

This reverts commit 27b52adcb4.

Fixes https://github.com/NixOS/nixpkgs/issues/341867

We could select linux_6_10 now if we wanted but I opted for linux_6_6 instead
because this will be removed anyways.

This is technically a breaking change but latestCompatibleLinuxPackages has no
expectancy of stability in the first place.
This commit is contained in:
Atemu
2024-09-17 11:12:57 +02:00
parent e65aa8301b
commit f89495011d
4 changed files with 15 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
{ callPackage
, kernel ? null
, stdenv
, linuxKernel
, lib
, nixosTests
, ...
@@ -14,7 +15,9 @@ 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: kernel.kernelOlder "6.8";
kernelCompatible = kernel.kernelOlder "6.8";
latestCompatibleLinuxPackages = linuxKernel.packages.linux_6_6;
# This is a fixed version to the 2.1.x series, move only
# if the 2.1.x series moves.

View File

@@ -2,6 +2,7 @@
, kernel ? null
, stdenv
, lib
, linuxKernel
, nixosTests
, ...
} @ args:
@@ -14,7 +15,9 @@ 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: kernel.kernelOlder "6.11";
kernelCompatible = kernel.kernelOlder "6.11";
latestCompatibleLinuxPackages = linuxKernel.packages.linux_6_6;
# this package should point to the latest release.
version = "2.2.6";

View File

@@ -2,7 +2,6 @@ let
genericBuild =
{ pkgs, lib, stdenv, fetchFromGitHub, fetchpatch
, autoreconfHook269, util-linux, nukeReferences, coreutils
, linuxKernel
, perl
, configFile ? "all"
@@ -28,6 +27,7 @@ let
, kernelModuleAttribute
, extraPatches ? []
, rev ? "zfs-${version}"
, latestCompatibleLinuxPackages
, kernelCompatible ? null
, maintainers ? (with lib.maintainers; [ amarshall ])
, tests
@@ -200,13 +200,7 @@ let
outputs = [ "out" ] ++ optionals buildUser [ "dev" ];
passthru = {
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
];
inherit enableMail latestCompatibleLinuxPackages kernelModuleAttribute;
# The corresponding userspace tools to this instantiation
# of the ZFS package set.
userspaceTools = genericBuild (outerArgs // {
@@ -243,7 +237,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 kernel);
broken = buildKernel && (kernelCompatible != null) && !kernelCompatible;
};
};
in

View File

@@ -1,6 +1,7 @@
{ callPackage
, kernel ? null
, stdenv
, linuxKernel
, nixosTests
, ...
} @ args:
@@ -13,7 +14,9 @@ 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: kernel.kernelOlder "6.11";
kernelCompatible = kernel.kernelOlder "6.11";
latestCompatibleLinuxPackages = linuxKernel.packages.linux_6_10;
# 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