From e3b87b04b798735bc6412e1bd7b5d79d7766d4d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Mon, 1 Apr 2019 18:17:42 +0200 Subject: [PATCH] Revert "Merge pull request #57559 from Ekleog/iso-image-reproducibilization" This reverts commit bb32e322a5aa81203eb3494081539eea8a70adcb, reversing changes made to e0b4356c0dc7d35d9ee17d23b53d8c2020d4e618. --- nixos/modules/installer/cd-dvd/iso-image.nix | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 12b8d85edf3..fd780be2082 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -338,10 +338,8 @@ let efiImg = pkgs.runCommand "efi-image_eltorito" { buildInputs = [ pkgs.mtools pkgs.libfaketime ]; } # Be careful about determinism: du --apparent-size, - # dates (cp -p, touch, mcopy -m, faketime for label), IDs (mkfs.vfat -i), - # mcopy's write order (-s uses `readdir` order) + # dates (cp -p, touch, mcopy -m, faketime for label), IDs (mkfs.vfat -i) '' - # Prepare the ./EFI and ./boot directories mkdir ./contents && cd ./contents cp -rp "${efiDir}"/EFI . mkdir ./boot @@ -349,7 +347,6 @@ let "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}" ./boot/ touch --date=@0 ./EFI ./boot - # Prepare the image file usage_size=$(du -sb --apparent-size . | tr -cd '[:digit:]') # Make the image 110% as big as the files need to make up for FAT overhead image_size=$(( ($usage_size * 110) / 100 )) @@ -359,16 +356,8 @@ let echo "Usage size: $usage_size" echo "Image size: $image_size" truncate --size=$image_size "$out" - - # Make the filesystem ${pkgs.libfaketime}/bin/faketime "2000-01-01 00:00:00" ${pkgs.dosfstools}/sbin/mkfs.vfat -i 12345678 -n EFIBOOT "$out" - - # Copy the files - # Note: we can't use mcopy's recursive copying as it uses `readdir` order. - # So just copy file-after-file - find ./EFI ./boot -type f -print0 | sort -z | \ - xargs -0I '{}' mcopy -pvm -i "$out" '{}' :: - + mcopy -psvm -i "$out" ./EFI ./boot :: # Verify the FAT partition. ${pkgs.dosfstools}/sbin/fsck.vfat -vn "$out" ''; # */