parent
4442a377cb
commit
0d65e2e0e5
@ -24,7 +24,11 @@ let
|
|||||||
|
|
||||||
kernel = config.boot.kernelPackages;
|
kernel = config.boot.kernelPackages;
|
||||||
|
|
||||||
packages = if config.boot.zfs.enableUnstable then {
|
packages = if config.boot.zfs.enableLegacyCrypto then {
|
||||||
|
spl = kernel.splLegacyCrypto;
|
||||||
|
zfs = kernel.zfsLegacyCrypto;
|
||||||
|
zfsUser = pkgs.zfsLegacyCrypto;
|
||||||
|
} else if config.boot.zfs.enableUnstable then {
|
||||||
spl = kernel.splUnstable;
|
spl = kernel.splUnstable;
|
||||||
zfs = kernel.zfsUnstable;
|
zfs = kernel.zfsUnstable;
|
||||||
zfsUser = pkgs.zfsUnstable;
|
zfsUser = pkgs.zfsUnstable;
|
||||||
@ -75,6 +79,27 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enableLegacyCrypto = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Enabling this option will allow you to continue to use the old format for
|
||||||
|
encrypted datasets. With the inclusion of stability patches the format of
|
||||||
|
encrypted datasets has changed. They can still be access and mounted but
|
||||||
|
in read-only mode mounted. It is highly recommended to convert them to
|
||||||
|
the new format.
|
||||||
|
|
||||||
|
This option is only for convenience to people that cannot convert their
|
||||||
|
datasets to the new format yet and it will be removed in due time.
|
||||||
|
|
||||||
|
For migration strategies from old format to this new one, check the Wiki:
|
||||||
|
https://nixos.wiki/wiki/NixOS_on_ZFS#Encrypted_Dataset_Format_Change
|
||||||
|
|
||||||
|
See https://github.com/zfsonlinux/zfs/pull/6864 for more details about
|
||||||
|
the stability patches.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraPools = mkOption {
|
extraPools = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
|
@ -66,8 +66,14 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
splUnstable = common {
|
splUnstable = common {
|
||||||
version = "2017-12-21";
|
version = "2018-01-24";
|
||||||
rev = "c9821f1ccc647dfbd506f381b736c664d862d126";
|
rev = "23602fdb39e1254c669707ec9d2d0e6bcdbf1771";
|
||||||
sha256 = "08r6sa36jaj6n54ap18npm6w85v5yn3x8ljg792h37f49b8kir6c";
|
sha256 = "09py2dwj77f6s2qcnkwdslg5nxb3hq2bq39zpxpm6msqyifhl69h";
|
||||||
|
};
|
||||||
|
|
||||||
|
splLegacyCrypto = common {
|
||||||
|
version = "2018-01-24";
|
||||||
|
rev = "23602fdb39e1254c669707ec9d2d0e6bcdbf1771";
|
||||||
|
sha256 = "09py2dwj77f6s2qcnkwdslg5nxb3hq2bq39zpxpm6msqyifhl69h";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
, zlib, libuuid, python, attr, openssl
|
, zlib, libuuid, python, attr, openssl
|
||||||
|
|
||||||
# Kernel dependencies
|
# Kernel dependencies
|
||||||
, kernel ? null, spl ? null, splUnstable ? null
|
, kernel ? null, spl ? null, splUnstable ? null, splLegacyCrypto ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
@ -19,6 +19,7 @@ let
|
|||||||
, spl
|
, spl
|
||||||
, rev ? "zfs-${version}"
|
, rev ? "zfs-${version}"
|
||||||
, isUnstable ? false
|
, isUnstable ? false
|
||||||
|
, isLegacyCrypto ? false
|
||||||
, incompatibleKernelVersion ? null } @ args:
|
, incompatibleKernelVersion ? null } @ args:
|
||||||
if buildKernel &&
|
if buildKernel &&
|
||||||
(incompatibleKernelVersion != null) &&
|
(incompatibleKernelVersion != null) &&
|
||||||
@ -43,7 +44,7 @@ let
|
|||||||
buildInputs =
|
buildInputs =
|
||||||
optionals buildKernel [ spl ]
|
optionals buildKernel [ spl ]
|
||||||
++ optionals buildUser [ zlib libuuid python attr ]
|
++ optionals buildUser [ zlib libuuid python attr ]
|
||||||
++ optionals (buildUser && isUnstable) [ openssl ];
|
++ optionals (buildUser && (isUnstable || isLegacyCrypto)) [ openssl ];
|
||||||
|
|
||||||
# for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work
|
# for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work
|
||||||
NIX_CFLAGS_LINK = "-lgcc_s";
|
NIX_CFLAGS_LINK = "-lgcc_s";
|
||||||
@ -160,19 +161,41 @@ in {
|
|||||||
incompatibleKernelVersion = null;
|
incompatibleKernelVersion = null;
|
||||||
|
|
||||||
# this package should point to a version / git revision compatible with the latest kernel release
|
# this package should point to a version / git revision compatible with the latest kernel release
|
||||||
version = "2018-01-10";
|
version = "2018-02-02";
|
||||||
|
|
||||||
rev = "1d53657bf561564162e2ad6449f80fa0140f1dd6";
|
rev = "fbd42542686af053f0d162ec4630ffd4fff1cc30";
|
||||||
sha256 = "0ibkhfz06cypgl2c869dzdbdx2i3m8ywwdmnzscv0cin5gm31vhx";
|
sha256 = "0qzkwnnk7kz1hwvcaqlpzi5yspfhhmd2alklc07k056ddzbx52qb";
|
||||||
isUnstable = true;
|
isUnstable = true;
|
||||||
|
|
||||||
extraPatches = [
|
extraPatches = [
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
url = "https://github.com/Mic92/zfs/compare/ded8f06a3cfee...nixos-zfs-2017-09-12.patch";
|
url = "https://github.com/Mic92/zfs/compare/fbd42542686af053f0d162ec4630ffd4fff1cc30...nixos-zfs-2018-02-02.patch";
|
||||||
sha256 = "033wf4jn0h0kp0h47ai98rywnkv5jwvf3xwym30phnaf8xxdx8aj";
|
sha256 = "05wqwjm9648x60vkwxbp8l6z1q73r2a5l2ni28i2f4pla8s3ahln";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
spl = splUnstable;
|
spl = splUnstable;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zfsLegacyCrypto = common {
|
||||||
|
# comment/uncomment if breaking kernel versions are known
|
||||||
|
incompatibleKernelVersion = null;
|
||||||
|
|
||||||
|
# this package should point to a version / git revision compatible with the latest kernel release
|
||||||
|
version = "2018-02-01";
|
||||||
|
|
||||||
|
rev = "4c46b99d24a6e71b3c72462c11cb051d0930ad60";
|
||||||
|
sha256 = "011lcp2x44jgfzqqk2gjmyii1v7rxcprggv20prxa3c552drsx3c";
|
||||||
|
isUnstable = true;
|
||||||
|
|
||||||
|
extraPatches = [
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/Mic92/zfs/compare/4c46b99d24a6e71b3c72462c11cb051d0930ad60...nixos-zfs-2018-02-01.patch";
|
||||||
|
sha256 = "1gqmgqi39qhk5kbbvidh8f2xqq25vj58i9x0wjqvcx6a71qj49ch";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
spl = splLegacyCrypto;
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13120,7 +13120,7 @@ with pkgs;
|
|||||||
sch_cake = callPackage ../os-specific/linux/sch_cake { };
|
sch_cake = callPackage ../os-specific/linux/sch_cake { };
|
||||||
|
|
||||||
inherit (callPackage ../os-specific/linux/spl {})
|
inherit (callPackage ../os-specific/linux/spl {})
|
||||||
splStable splUnstable;
|
splStable splUnstable splLegacyCrypto;
|
||||||
|
|
||||||
spl = splStable;
|
spl = splStable;
|
||||||
|
|
||||||
@ -13151,7 +13151,7 @@ with pkgs;
|
|||||||
inherit (callPackage ../os-specific/linux/zfs {
|
inherit (callPackage ../os-specific/linux/zfs {
|
||||||
configFile = "kernel";
|
configFile = "kernel";
|
||||||
inherit kernel spl;
|
inherit kernel spl;
|
||||||
}) zfsStable zfsUnstable;
|
}) zfsStable zfsUnstable zfsLegacyCrypto;
|
||||||
|
|
||||||
zfs = zfsStable;
|
zfs = zfsStable;
|
||||||
});
|
});
|
||||||
@ -13657,7 +13657,7 @@ with pkgs;
|
|||||||
|
|
||||||
inherit (callPackage ../os-specific/linux/zfs {
|
inherit (callPackage ../os-specific/linux/zfs {
|
||||||
configFile = "user";
|
configFile = "user";
|
||||||
}) zfsStable zfsUnstable;
|
}) zfsStable zfsUnstable zfsLegacyCrypto;
|
||||||
|
|
||||||
zfs = zfsStable;
|
zfs = zfsStable;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user