diff options
author | Samuel Dionne-Riel <samuel@dionne-riel.com> | 2021-05-22 18:38:31 -0400 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2021-05-22 20:04:05 -0700 |
commit | 15eaed0718515db3f2fa7d4ed71676e6069d3fb5 (patch) | |
tree | fab4dbbe5dfc6033999653a98afc49568c550cc0 | |
parent | f93f0e72e9ef423ed591951030f08cafd209e637 (diff) | |
download | nixpkgs-15eaed0718515db3f2fa7d4ed71676e6069d3fb5.tar nixpkgs-15eaed0718515db3f2fa7d4ed71676e6069d3fb5.tar.gz nixpkgs-15eaed0718515db3f2fa7d4ed71676e6069d3fb5.tar.bz2 nixpkgs-15eaed0718515db3f2fa7d4ed71676e6069d3fb5.tar.lz nixpkgs-15eaed0718515db3f2fa7d4ed71676e6069d3fb5.tar.xz nixpkgs-15eaed0718515db3f2fa7d4ed71676e6069d3fb5.tar.zst nixpkgs-15eaed0718515db3f2fa7d4ed71676e6069d3fb5.zip |
iso-image: change date on all files
It may be that in some conditions dates earlier than 1980 on FAT on GRUB 2.06~ish will cause failures https://github.com/NixOS/nixpkgs/issues/123376#issuecomment-845515035
-rw-r--r-- | nixos/modules/installer/cd-dvd/iso-image.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 3f5ac8a5113..be5db40e537 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -416,7 +416,9 @@ let mkdir ./boot cp -p "${config.boot.kernelPackages.kernel}/${config.system.boot.loader.kernelFile}" \ "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}" ./boot/ - touch --date=@0 ./EFI ./boot + + # Rewrite dates for everything in the FS + find . -exec touch --date=2000-01-01 {} + 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 |