zfs: add migration path for new crypto format

fixes #34559
This commit is contained in:
sjau
2018-02-07 20:46:16 +00:00
committed by Jörg Thalheim
parent 4442a377cb
commit 0d65e2e0e5
4 changed files with 68 additions and 14 deletions
+30 -7
View File
@@ -5,7 +5,7 @@
, zlib, libuuid, python, attr, openssl
# Kernel dependencies
, kernel ? null, spl ? null, splUnstable ? null
, kernel ? null, spl ? null, splUnstable ? null, splLegacyCrypto ? null
}:
with stdenv.lib;
@@ -19,6 +19,7 @@ let
, spl
, rev ? "zfs-${version}"
, isUnstable ? false
, isLegacyCrypto ? false
, incompatibleKernelVersion ? null } @ args:
if buildKernel &&
(incompatibleKernelVersion != null) &&
@@ -43,7 +44,7 @@ let
buildInputs =
optionals buildKernel [ spl ]
++ 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
NIX_CFLAGS_LINK = "-lgcc_s";
@@ -160,19 +161,41 @@ in {
incompatibleKernelVersion = null;
# 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";
sha256 = "0ibkhfz06cypgl2c869dzdbdx2i3m8ywwdmnzscv0cin5gm31vhx";
rev = "fbd42542686af053f0d162ec4630ffd4fff1cc30";
sha256 = "0qzkwnnk7kz1hwvcaqlpzi5yspfhhmd2alklc07k056ddzbx52qb";
isUnstable = true;
extraPatches = [
(fetchpatch {
url = "https://github.com/Mic92/zfs/compare/ded8f06a3cfee...nixos-zfs-2017-09-12.patch";
sha256 = "033wf4jn0h0kp0h47ai98rywnkv5jwvf3xwym30phnaf8xxdx8aj";
url = "https://github.com/Mic92/zfs/compare/fbd42542686af053f0d162ec4630ffd4fff1cc30...nixos-zfs-2018-02-02.patch";
sha256 = "05wqwjm9648x60vkwxbp8l6z1q73r2a5l2ni28i2f4pla8s3ahln";
})
];
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;
};
}