diff options
author | Arnout Engelen <arnout@bzzt.net> | 2019-12-10 23:02:07 +0100 |
---|---|---|
committer | Arnout Engelen <arnout@bzzt.net> | 2019-12-11 09:07:40 +0100 |
commit | 88ee3b021d161363930e90787785755aa574970d (patch) | |
tree | 38c85c61b17c27e5e7cd6ed90a0ebe88f1ecb0f2 /nixos/modules/installer/cd-dvd/iso-image.nix | |
parent | 3140fa89c51233397f496f49014f6b23216667c2 (diff) | |
download | nixpkgs-88ee3b021d161363930e90787785755aa574970d.tar nixpkgs-88ee3b021d161363930e90787785755aa574970d.tar.gz nixpkgs-88ee3b021d161363930e90787785755aa574970d.tar.bz2 nixpkgs-88ee3b021d161363930e90787785755aa574970d.tar.lz nixpkgs-88ee3b021d161363930e90787785755aa574970d.tar.xz nixpkgs-88ee3b021d161363930e90787785755aa574970d.tar.zst nixpkgs-88ee3b021d161363930e90787785755aa574970d.zip |
installer/cd-dvd/iso-image: avoid leaking build timestamps
When 'grafting' '/nix/store/<hash>-loopback.cfg' from disk onto '/boot/grub/loopback.cfg' on the iso, the parent 'grub' directory does not exist yet. In this case it is automatically created and inherits its attributes, including timestamp, from /nix/store. This is correct/expected/intentional behavior of xorriso, but has the undesired result of leaking the timestamps of /nix/store into the iso. For this reason we put the loopback.cfg in a '/nix/store/<hash>-loopback.cfg/grub/loopback.cfg' instead, so it will inherit the attributes from the correctly-timestamped '/nix/store/<hash>-loopback.cfg/grub' directory. For the same reason we move '/EFI/boot/efi-background.png' down in the list so it is grafted after its parent '/EFI/boot' directory is created with the correct timestamp. fixes #74944
Diffstat (limited to 'nixos/modules/installer/cd-dvd/iso-image.nix')
-rw-r--r-- | nixos/modules/installer/cd-dvd/iso-image.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 009f1e2c543..11319e5f4f8 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -603,9 +603,6 @@ in { source = config.system.build.squashfsStore; target = "/nix-store.squashfs"; } - { source = config.isoImage.efiSplashImage; - target = "/EFI/boot/efi-background.png"; - } { source = config.isoImage.splashImage; target = "/isolinux/background.png"; } @@ -630,8 +627,8 @@ in { source = "${efiDir}/EFI"; target = "/EFI"; } - { source = pkgs.writeText "loopback.cfg" "source /EFI/boot/grub.cfg"; - target = "/boot/grub/loopback.cfg"; + { source = (pkgs.writeTextDir "grub/loopback.cfg" "source /EFI/boot/grub.cfg") + "/grub"; + target = "/boot/grub"; } ] ++ optionals (config.boot.loader.grub.memtest86.enable && canx86BiosBoot) [ { source = "${pkgs.memtest86plus}/memtest.bin"; @@ -641,6 +638,10 @@ in { source = config.isoImage.grubTheme; target = "/EFI/boot/grub-theme"; } + ] ++ [ + { source = config.isoImage.efiSplashImage; + target = "/EFI/boot/efi-background.png"; + } ]; boot.loader.timeout = 10; |