Skip to content
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
4 changes: 3 additions & 1 deletion nix/eif.nix
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ stdenvNoCC.mkDerivation {
# people compare artifacts by hashing them, and because it lets
# `nix build --rebuild` be a check that passes rather than a known
# exception.
faketime -f '@1970-01-01 00:00:01' \
# No `@`: with one, faketime starts the clock there and lets it run, and the nanoseconds it
# had run for by the time eif_build read it still differed between builds.
faketime -f '1970-01-01 00:00:01' \
eif_build \
--kernel ${kernel}/bzImage \
--kernel_config ${kernel}/bzImage.config \
Expand Down
10 changes: 9 additions & 1 deletion nix/kernel-zfs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,15 @@ let
extraMakeFlags = [ "KBUILD_BUILD_USER=nixbuild" "KBUILD_BUILD_HOST=nixbuilder" ];
};

zfsKmod = (linuxPackagesFor kernel).${zfs.kernelModuleAttribute};
# ZFS's assertions carry __FILE__, so its modules record where they were compiled: /build/source
# in a sandboxed Nix, a temporary directory in one without a sandbox. The image held them, and
# the same commit measured to two PCR0s. Mapped to the sandbox's path, every builder produces
# the modules a sandboxed one always did.
zfsKmod = ((linuxPackagesFor kernel).${zfs.kernelModuleAttribute}).overrideAttrs (old: {
preBuild = (old.preBuild or "") + ''
export KCFLAGS="''${KCFLAGS:-} -ffile-prefix-map=$NIX_BUILD_TOP=/build"
'';
});
in
assert zfsKmod.version == zfs.version;
{
Expand Down
Loading