diff options
author | Francis Rowe <fchmmr@minifree.lan> | 2015-12-04 19:03:52 +0000 |
---|---|---|
committer | Francis Rowe <fchmmr@minifree.lan> | 2015-12-04 19:08:06 +0000 |
commit | 26d16fa5cdc9e351fcb582104cf8c7b3bf9ddaf0 (patch) | |
tree | 06502e98de84f539fd001d6bd64cb71f8cb8e0a7 /resources/utilities/grub-assemble | |
parent | 2e7fde09174aed5f3cc7d714dbe32e451873f3c9 (diff) | |
download | librebootfr-26d16fa5cdc9e351fcb582104cf8c7b3bf9ddaf0.tar.gz librebootfr-26d16fa5cdc9e351fcb582104cf8c7b3bf9ddaf0.zip |
grub: build reproducibly
Diffstat (limited to 'resources/utilities/grub-assemble')
-rwxr-xr-x | resources/utilities/grub-assemble/gen.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/resources/utilities/grub-assemble/gen.sh b/resources/utilities/grub-assemble/gen.sh index 36352a3a..3c52a846 100755 --- a/resources/utilities/grub-assemble/gen.sh +++ b/resources/utilities/grub-assemble/gen.sh @@ -29,6 +29,14 @@ if [ $# != 1 ]; then exit 1 fi +if [ -f "../../../versiondate" ]; then + # _src release archive is being used + versiondate="$(cat ../../../versiondate)" +else + # git repo is being used + versiondate="$(git show -s --format=%ct)" +fi + # This is where GRUB is expected to be (outside of the grub-assemble, instead in main checkout) grubdir="../../../grub" @@ -51,6 +59,7 @@ if [ "${1}" = "vesafb" ]; then -o "grub_vesafb.elf" \ -d "${grubdir}/grub-core/" \ --fonts= --themes= --locales= \ + --fixed-time ${versiondate} \ --modules="${grub_modules}" \ --install-modules="${grub_install_modules}" \ /boot/grub/grub.cfg="../../../resources/grub/config/grub_memdisk.cfg" \ @@ -65,6 +74,7 @@ then -o "grub_txtmode.elf" \ -d "${grubdir}/grub-core/" \ --fonts= --themes= --locales= \ + --fixed-time ${versiondate} \ --modules="${grub_modules}" \ --install-modules="${grub_install_modules}" \ /boot/grub/grub.cfg="../../../resources/grub/config/grub_memdisk.cfg" \ |