Merge pull request #291951 from amarshall/zfs-pkgs-renaming

zfs: rename zfsStable -> zfs_2_2; zfsUnstable -> zfs_unstable; remove enableUnstable option in favor of package
This commit is contained in:
Adam C. Stephens 2024-03-01 10:09:12 -05:00 committed by GitHub
commit b52452f8c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 41 additions and 45 deletions

View file

@ -1465,9 +1465,9 @@ in
'';
}
{
assertion = config.security.pam.zfs.enable -> (config.boot.zfs.enabled || config.boot.zfs.enableUnstable);
assertion = config.security.pam.zfs.enable -> config.boot.zfs.enabled;
message = ''
`security.pam.zfs.enable` requires enabling ZFS (`boot.zfs.enabled` or `boot.zfs.enableUnstable`).
`security.pam.zfs.enable` requires enabling ZFS (`boot.zfs.enabled`).
'';
}
{

View file

@ -211,6 +211,7 @@ in
imports = [
(mkRemovedOptionModule [ "boot" "zfs" "enableLegacyCrypto" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "boot" "zfs" "enableUnstable" ] "Instead set `boot.zfs.package = pkgs.zfs_unstable;`")
];
###### interface
@ -219,9 +220,9 @@ in
boot.zfs = {
package = mkOption {
type = types.package;
default = if cfgZfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs;
defaultText = literalExpression "if zfsUnstable is enabled then pkgs.zfsUnstable else pkgs.zfs";
description = lib.mdDoc "Configured ZFS userland tools package, use `pkgs.zfsUnstable` if you want to track the latest staging ZFS branch.";
default = pkgs.zfs;
defaultText = literalExpression "pkgs.zfs";
description = lib.mdDoc "Configured ZFS userland tools package, use `pkgs.zfs_unstable` if you want to track the latest staging ZFS branch.";
};
modulePackage = mkOption {
@ -239,19 +240,6 @@ in
description = lib.mdDoc "True if ZFS filesystem support is enabled";
};
enableUnstable = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Use the unstable zfs package. This might be an option, if the latest
kernel is not yet supported by a published release of ZFS. Enabling
this option will install a development version of ZFS on Linux. The
version will have already passed an extensive test suite, but it is
more likely to hit an undiscovered bug compared to running a released
version of ZFS on Linux.
'';
};
allowHibernation = mkOption {
type = types.bool;
default = false;

View file

@ -7,14 +7,14 @@ with import ../lib/testing-python.nix { inherit system pkgs; };
let
makeZfsTest = name:
makeZfsTest =
{ kernelPackages
, enableSystemdStage1 ? false
, zfsPackage
, extraTest ? ""
}:
makeTest {
name = "zfs-" + name;
name = zfsPackage.kernelModuleAttribute;
meta = with pkgs.lib.maintainers; {
maintainers = [ elvishjerricco ];
};
@ -192,23 +192,23 @@ let
in {
# maintainer: @raitobezarius
series_2_1 = makeZfsTest "2.1-series" {
series_2_1 = makeZfsTest {
zfsPackage = pkgs.zfs_2_1;
kernelPackages = pkgs.linuxPackages;
};
stable = makeZfsTest "stable" {
zfsPackage = pkgs.zfsStable;
series_2_2 = makeZfsTest {
zfsPackage = pkgs.zfs_2_2;
kernelPackages = pkgs.linuxPackages;
};
unstable = makeZfsTest "unstable" rec {
zfsPackage = pkgs.zfsUnstable;
unstable = makeZfsTest rec {
zfsPackage = pkgs.zfs_unstable;
kernelPackages = zfsPackage.latestCompatibleLinuxPackages;
};
unstableWithSystemdStage1 = makeZfsTest "unstable" rec {
zfsPackage = pkgs.zfsUnstable;
unstableWithSystemdStage1 = makeZfsTest rec {
zfsPackage = pkgs.zfs_unstable;
kernelPackages = zfsPackage.latestCompatibleLinuxPackages;
enableSystemdStage1 = true;
};

View file

@ -12,7 +12,7 @@ in
callPackage ./generic.nix args {
# You have to ensure that in `pkgs/top-level/linux-kernels.nix`
# this attribute is the correct one for this package.
kernelModuleAttribute = "zfs";
kernelModuleAttribute = "zfs_2_2";
# check the release notes for compatible kernels
kernelCompatible = kernel.kernelOlder "6.8";
@ -23,7 +23,7 @@ callPackage ./generic.nix args {
tests = [
nixosTests.zfs.installer
nixosTests.zfs.stable
nixosTests.zfs.series_2_2
];
hash = "sha256-Bzkow15OitUUQ+mTYhCXgTrQl+ao/B4feleHY/rSSjg=";

View file

@ -234,8 +234,8 @@ let
inherit maintainers;
mainProgram = "zfs";
# If your Linux kernel version is not yet supported by zfs, try zfsUnstable.
# On NixOS set the option boot.zfs.enableUnstable.
# 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;
};
};

View file

@ -12,7 +12,7 @@ in
callPackage ./generic.nix args {
# You have to ensure that in `pkgs/top-level/linux-kernels.nix`
# this attribute is the correct one for this package.
kernelModuleAttribute = "zfsUnstable";
kernelModuleAttribute = "zfs_unstable";
# check the release notes for compatible kernels
kernelCompatible = kernel.kernelOlder "6.9";

View file

@ -1217,6 +1217,8 @@ mapAliases ({
### Z ###
zabbix40 = throw "'zabbix40' has been removed as it has reached end of life"; # Added 2024-01-07
zfsStable = zfs; # Added 2024-02-26
zfsUnstable = zfs_unstable; # Added 2024-02-26
zinc = zincsearch; # Added 2023-05-28
zkg = throw "'zkg' has been replaced by 'zeek'";
zq = zed.overrideAttrs (old: { meta = old.meta // { mainProgram = "zq"; }; }); # Added 2023-02-06

View file

@ -28691,16 +28691,22 @@ with pkgs;
zenmonitor = callPackage ../os-specific/linux/zenmonitor { };
zfs_2_1 = callPackage ../os-specific/linux/zfs/2_1.nix {
configFile = "user";
};
zfsStable = callPackage ../os-specific/linux/zfs/stable.nix {
configFile = "user";
};
zfsUnstable = callPackage ../os-specific/linux/zfs/unstable.nix {
configFile = "user";
};
zfs = zfsStable;
inherit
({
zfs_2_1 = callPackage ../os-specific/linux/zfs/2_1.nix {
configFile = "user";
};
zfs_2_2 = callPackage ../os-specific/linux/zfs/2_2.nix {
configFile = "user";
};
zfs_unstable = callPackage ../os-specific/linux/zfs/unstable.nix {
configFile = "user";
};
})
zfs_2_1
zfs_2_2
zfs_unstable;
zfs = zfs_2_2;
### DATA

View file

@ -557,15 +557,15 @@ in {
configFile = "kernel";
inherit pkgs kernel;
};
zfsStable = callPackage ../os-specific/linux/zfs/stable.nix {
zfs_2_2 = callPackage ../os-specific/linux/zfs/2_2.nix {
configFile = "kernel";
inherit pkgs kernel;
};
zfsUnstable = callPackage ../os-specific/linux/zfs/unstable.nix {
zfs_unstable = callPackage ../os-specific/linux/zfs/unstable.nix {
configFile = "kernel";
inherit pkgs kernel;
};
zfs = zfsStable;
zfs = zfs_2_2;
can-isotp = callPackage ../os-specific/linux/can-isotp { };