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

[24.05] Revert "zfs: dynamically determine latestCompatibleLinuxPackages" #342495

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
5 changes: 4 additions & 1 deletion pkgs/os-specific/linux/zfs/2_1.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ callPackage
, kernel ? null
, stdenv
, linuxKernel
, lib
, nixosTests
, ...
Expand All @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion pkgs/os-specific/linux/zfs/2_2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, kernel ? null
, stdenv
, lib
, linuxKernel
, nixosTests
, ...
} @ args:
Expand All @@ -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";
Expand Down
12 changes: 3 additions & 9 deletions pkgs/os-specific/linux/zfs/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ let
genericBuild =
{ pkgs, lib, stdenv, fetchFromGitHub, fetchpatch
, autoreconfHook269, util-linux, nukeReferences, coreutils
, linuxKernel
, perl
, configFile ? "all"

Expand All @@ -28,6 +27,7 @@ let
, kernelModuleAttribute
, extraPatches ? []
, rev ? "zfs-${version}"
, latestCompatibleLinuxPackages
, kernelCompatible ? null
, maintainers ? (with lib.maintainers; [ amarshall ])
, tests
Expand Down Expand Up @@ -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 // {
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion pkgs/os-specific/linux/zfs/unstable.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ callPackage
, kernel ? null
, stdenv
, linuxKernel
, nixosTests
, ...
} @ args:
Expand All @@ -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
Expand Down
Loading