libreboot

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 910bf9d25322cabcc86c4edeb2ab99d4e5d302f5
parent aa3cccfdaed8b4012465fcc8ab14c6796b992162
Author: Francis Rowe <info@gluglug.org.uk>
Date:   Sun,  6 Dec 2015 14:35:31 +0000

GRUB: use sane file names for reproducibility patches

Diffstat:
resources/grub/patch/reproducible/0001-mkstandalone-add-argument-fixed-time-to-override-mti.patch | 73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
resources/grub/patch/reproducible/0002-mkrescue-add-argument-fixed-time-to-get-reproducible.patch | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
resources/grub/patch/reproducible/0003-Makefile-use-FIXED_TIMESTAMP-for-mkstandalone-if-set.patch | 30++++++++++++++++++++++++++++++
resources/grub/patch/reproducible/[PATCH 1_3] mkstandalone: add argument --fixed-time to override mtime of files.eml | 131-------------------------------------------------------------------------------
resources/grub/patch/reproducible/[PATCH 2_3] mkrescue: add argument --fixed-time to get reproducible uuids.eml | 126-------------------------------------------------------------------------------
resources/grub/patch/reproducible/[PATCH 3_3] Makefile: use FIXED_TIMESTAMP for mkstandalone if set.eml | 88-------------------------------------------------------------------------------
resources/scripts/helpers/download/grub | 6+++---
7 files changed, 174 insertions(+), 348 deletions(-)

diff --git a/resources/grub/patch/reproducible/0001-mkstandalone-add-argument-fixed-time-to-override-mti.patch b/resources/grub/patch/reproducible/0001-mkstandalone-add-argument-fixed-time-to-override-mti.patch @@ -0,0 +1,73 @@ +From bf482ae6b4ff54265294e138ac73e8a716023f79 Mon Sep 17 00:00:00 2001 +From: Alexander Couzens <lynxis@fe80.eu> +Date: Fri, 4 Dec 2015 17:10:42 +0100 +Subject: [PATCH 1/3] mkstandalone: add argument --fixed-time to override mtime + of files + +mkstandalone adds several files to an archive. Doing this it uses the +mtime to give these files a timestamp. +--fixed-time <TIME_EPOCH> overrides these timestamps with a given. + +Replacing all timestamps with a specific one is required +to get reproducible builds. See source epoch specification of +reproducible-builds.org +--- + util/grub-mkstandalone.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/util/grub-mkstandalone.c b/util/grub-mkstandalone.c +index 4907d44..047f0cd 100644 +--- a/util/grub-mkstandalone.c ++++ b/util/grub-mkstandalone.c +@@ -30,6 +30,7 @@ + #pragma GCC diagnostic error "-Wmissing-prototypes" + #pragma GCC diagnostic error "-Wmissing-declarations" + ++static time_t fixed_time; + static char *output_image; + static char **files; + static int nfiles; +@@ -48,6 +49,7 @@ static struct argp_option options[] = { + 0, N_("save output in FILE [required]"), 2}, + {"format", 'O', N_("FILE"), 0, 0, 2}, + {"compression", 'C', "xz|none|auto", OPTION_HIDDEN, 0, 2}, ++ {"fixed-time", 't', N_("TIMEEPOCH"), 0, N_("Use a fixed timestamp to override mtime of all files. Time since epoch is used."), 2}, + {0, 0, 0, 0, 0, 0} + }; + +@@ -72,6 +74,7 @@ help_filter (int key, const char *text, void *input __attribute__ ((unused))) + static error_t + argp_parser (int key, char *arg, struct argp_state *state) + { ++ char *b; + if (key == 'C') + key = GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS; + +@@ -80,6 +83,14 @@ argp_parser (int key, char *arg, struct argp_state *state) + + switch (key) + { ++ case 't': ++ fixed_time = strtoll (arg, &b, 10); ++ if (*b !='\0') { ++ printf (_("invalid fixed time number: %s\n"), arg); ++ argp_usage (state); ++ exit (1); ++ } ++ break; + + case 'o': + if (output_image) +@@ -192,7 +203,8 @@ add_tar_file (const char *from, + if (grub_util_is_special_file (from)) + return; + +- mtime = grub_util_get_mtime (from); ++ /* use fixed_time if given for mtime */ ++ mtime = fixed_time != -1 ? fixed_time : grub_util_get_mtime (from); + + optr = tcn = xmalloc (strlen (to) + 1); + for (iptr = to; *iptr == '/'; iptr++); +-- +1.9.1 + diff --git a/resources/grub/patch/reproducible/0002-mkrescue-add-argument-fixed-time-to-get-reproducible.patch b/resources/grub/patch/reproducible/0002-mkrescue-add-argument-fixed-time-to-get-reproducible.patch @@ -0,0 +1,68 @@ +From aeb2681fdf889be9725ab8d64896fade960f8bd1 Mon Sep 17 00:00:00 2001 +From: Alexander Couzens <lynxis@fe80.eu> +Date: Fri, 4 Dec 2015 17:10:43 +0100 +Subject: [PATCH 2/3] mkrescue: add argument --fixed-time to get reproducible + uuids + +The uuid generation is based on the time. +--- + util/grub-mkrescue.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c +index 4511826..164c4e1 100644 +--- a/util/grub-mkrescue.c ++++ b/util/grub-mkrescue.c +@@ -52,6 +52,7 @@ static int xorriso_arg_alloc; + static char **xorriso_argv; + static char *iso_uuid; + static char *iso9660_dir; ++static time_t fixed_time; + + static void + xorriso_push (const char *val) +@@ -110,6 +111,7 @@ static struct argp_option options[] = { + {"product-version", OPTION_PRODUCT_VERSION, N_("STRING"), 0, N_("use STRING as product version"), 2}, + {"sparc-boot", OPTION_SPARC_BOOT, 0, 0, N_("enable sparc boot. Disables HFS+, APM, ARCS and boot as disk image for i386-pc"), 2}, + {"arcs-boot", OPTION_ARCS_BOOT, 0, 0, N_("enable ARCS (big-endian mips machines, mostly SGI) boot. Disables HFS+, APM, sparc64 and boot as disk image for i386-pc"), 2}, ++ {"fixed-time", 't', N_("TIMEEPOCH"), 0, N_("use a fixed timestamp for uuid generation"), 2}, + {0, 0, 0, 0, 0, 0} + }; + +@@ -153,6 +155,8 @@ enum { + static error_t + argp_parser (int key, char *arg, struct argp_state *state) + { ++ char *b; ++ + if (grub_install_parse (key, arg)) + return 0; + switch (key) +@@ -212,6 +216,15 @@ argp_parser (int key, char *arg, struct argp_state *state) + xorriso = xstrdup (arg); + return 0; + ++ case 't': ++ fixed_time = strtoll (arg, &b, 10); ++ if (*b !='\0') { ++ printf (_("invalid fixed time number: %s\n"), arg); ++ argp_usage (state); ++ exit (1); ++ } ++ return 0; ++ + default: + return ARGP_ERR_UNKNOWN; + } +@@ -541,7 +554,7 @@ main (int argc, char *argv[]) + { + time_t tim; + struct tm *tmm; +- tim = time (NULL); ++ tim = fixed_time != -1 ? fixed_time : time (NULL); + tmm = gmtime (&tim); + iso_uuid = xmalloc (55); + grub_snprintf (iso_uuid, 50, +-- +1.9.1 + diff --git a/resources/grub/patch/reproducible/0003-Makefile-use-FIXED_TIMESTAMP-for-mkstandalone-if-set.patch b/resources/grub/patch/reproducible/0003-Makefile-use-FIXED_TIMESTAMP-for-mkstandalone-if-set.patch @@ -0,0 +1,30 @@ +From 0a19e32fbb62df69e0dfeb80f0a0672b09930f00 Mon Sep 17 00:00:00 2001 +From: Alexander Couzens <lynxis@fe80.eu> +Date: Fri, 4 Dec 2015 17:10:44 +0100 +Subject: [PATCH 3/3] Makefile: use FIXED_TIMESTAMP for mkstandalone if set + +mkstandalone sets timestamps for files which can be overriden by a fixed_timestamp. +This makes it possible to build reproducible builds for coreboot. + +To build a reproducible build of grub for coreboot do: +make default_payload.elf FIXED_TIMESTAMP=1134242 +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 994ebbd..37a7cc4 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -403,7 +403,7 @@ bootcheck: $(BOOTCHECKS) + + if COND_i386_coreboot + default_payload.elf: grub-mkstandalone grub-mkimage +- pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos xfs ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg ++ pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos xfs ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg $(if $(FIXED_TIMESTAMP),-t $(FIXED_TIMESTAMP)) + endif + + endif +-- +1.9.1 + diff --git a/resources/grub/patch/reproducible/[PATCH 1_3] mkstandalone: add argument --fixed-time to override mtime of files.eml b/resources/grub/patch/reproducible/[PATCH 1_3] mkstandalone: add argument --fixed-time to override mtime of files.eml @@ -1,131 +0,0 @@ -Return-path: <grub-devel-bounces+info=gluglug.org.uk@gnu.org> -Envelope-to: info@gluglug.org.uk -Delivery-date: Fri, 04 Dec 2015 17:10:34 +0100 -Received: from lists.gnu.org ([2001:4830:134:3::11]) - by web006.ispnoc.net with esmtps (TLSv1:AES256-SHA:256) - (Exim 4.85) - (envelope-from <grub-devel-bounces+info=gluglug.org.uk@gnu.org>) - id 1a4swM-00061k-EE - for info@gluglug.org.uk; Fri, 04 Dec 2015 17:10:34 +0100 -Received: from localhost ([::1]:41766 helo=lists.gnu.org) - by lists.gnu.org with esmtp (Exim 4.71) - (envelope-from <grub-devel-bounces+info=gluglug.org.uk@gnu.org>) - id 1a4sx5-0000S1-CN - for info@gluglug.org.uk; Fri, 04 Dec 2015 11:11:19 -0500 -Received: from eggs.gnu.org ([2001:4830:134:3::10]:51210) - by lists.gnu.org with esmtp (Exim 4.71) - (envelope-from <lynxis@fe80.eu>) id 1a4swn-0000Rn-11 - for grub-devel@gnu.org; Fri, 04 Dec 2015 11:11:02 -0500 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from <lynxis@fe80.eu>) id 1a4swl-0001ff-9D - for grub-devel@gnu.org; Fri, 04 Dec 2015 11:11:00 -0500 -Received: from mail.base45.de ([80.241.61.77]:53014) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from <lynxis@fe80.eu>) id 1a4swl-0001fa-2e - for grub-devel@gnu.org; Fri, 04 Dec 2015 11:10:59 -0500 -Received: from [2001:1a80:2259:2b1a:6042:6096:1de7:42c6] (helo=lazus.yip) - by mail.base45.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) - (Exim 4.82) (envelope-from <lynxis@fe80.eu>) - id 1a4swf-0004UO-9W; Fri, 04 Dec 2015 17:10:53 +0100 -From: Alexander Couzens <lynxis@fe80.eu> -To: grub-devel@gnu.org -Subject: [PATCH 1/3] mkstandalone: add argument --fixed-time to override mtime - of files -Date: Fri, 4 Dec 2015 17:10:42 +0100 -Message-Id: <1449245444-17579-2-git-send-email-lynxis@fe80.eu> -X-Mailer: git-send-email 2.6.3 -In-Reply-To: <1449245444-17579-1-git-send-email-lynxis@fe80.eu> -References: <1449245444-17579-1-git-send-email-lynxis@fe80.eu> -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] -X-Received-From: 80.241.61.77 -Cc: Alexander Couzens <lynxis@fe80.eu> -X-BeenThere: grub-devel@gnu.org -X-Mailman-Version: 2.1.14 -Precedence: list -Reply-To: The development of GNU GRUB <grub-devel@gnu.org> -List-Id: The development of GNU GRUB <grub-devel.gnu.org> -List-Unsubscribe: <https://lists.gnu.org/mailman/options/grub-devel>, - <mailto:grub-devel-request@gnu.org?subject=unsubscribe> -List-Archive: <http://lists.gnu.org/archive/html/grub-devel> -List-Post: <mailto:grub-devel@gnu.org> -List-Help: <mailto:grub-devel-request@gnu.org?subject=help> -List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grub-devel>, - <mailto:grub-devel-request@gnu.org?subject=subscribe> -MIME-Version: 1.0 -Content-Type: text/plain; charset="us-ascii" -Content-Transfer-Encoding: 7bit -Errors-To: grub-devel-bounces+info=gluglug.org.uk@gnu.org -Sender: grub-devel-bounces+info=gluglug.org.uk@gnu.org - -mkstandalone adds several files to an archive. Doing this it uses the -mtime to give these files a timestamp. ---fixed-time <TIME_EPOCH> overrides these timestamps with a given. - -Replacing all timestamps with a specific one is required -to get reproducible builds. See source epoch specification of -reproducible-builds.org ---- - util/grub-mkstandalone.c | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/util/grub-mkstandalone.c b/util/grub-mkstandalone.c -index 4907d44..047f0cd 100644 ---- a/util/grub-mkstandalone.c -+++ b/util/grub-mkstandalone.c -@@ -30,6 +30,7 @@ - #pragma GCC diagnostic error "-Wmissing-prototypes" - #pragma GCC diagnostic error "-Wmissing-declarations" - -+static time_t fixed_time; - static char *output_image; - static char **files; - static int nfiles; -@@ -48,6 +49,7 @@ static struct argp_option options[] = { - 0, N_("save output in FILE [required]"), 2}, - {"format", 'O', N_("FILE"), 0, 0, 2}, - {"compression", 'C', "xz|none|auto", OPTION_HIDDEN, 0, 2}, -+ {"fixed-time", 't', N_("TIMEEPOCH"), 0, N_("Use a fixed timestamp to override mtime of all files. Time since epoch is used."), 2}, - {0, 0, 0, 0, 0, 0} - }; - -@@ -72,6 +74,7 @@ help_filter (int key, const char *text, void *input __attribute__ ((unused))) - static error_t - argp_parser (int key, char *arg, struct argp_state *state) - { -+ char *b; - if (key == 'C') - key = GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS; - -@@ -80,6 +83,14 @@ argp_parser (int key, char *arg, struct argp_state *state) - - switch (key) - { -+ case 't': -+ fixed_time = strtoll (arg, &b, 10); -+ if (*b !='\0') { -+ printf (_("invalid fixed time number: %s\n"), arg); -+ argp_usage (state); -+ exit (1); -+ } -+ break; - - case 'o': - if (output_image) -@@ -192,7 +203,8 @@ add_tar_file (const char *from, - if (grub_util_is_special_file (from)) - return; - -- mtime = grub_util_get_mtime (from); -+ /* use fixed_time if given for mtime */ -+ mtime = fixed_time != -1 ? fixed_time : grub_util_get_mtime (from); - - optr = tcn = xmalloc (strlen (to) + 1); - for (iptr = to; *iptr == '/'; iptr++); --- -2.6.3 - - -_______________________________________________ -Grub-devel mailing list -Grub-devel@gnu.org -https://lists.gnu.org/mailman/listinfo/grub-devel diff --git a/resources/grub/patch/reproducible/[PATCH 2_3] mkrescue: add argument --fixed-time to get reproducible uuids.eml b/resources/grub/patch/reproducible/[PATCH 2_3] mkrescue: add argument --fixed-time to get reproducible uuids.eml @@ -1,126 +0,0 @@ -Return-path: <grub-devel-bounces+info=gluglug.org.uk@gnu.org> -Envelope-to: info@gluglug.org.uk -Delivery-date: Fri, 04 Dec 2015 17:10:39 +0100 -Received: from lists.gnu.org ([2001:4830:134:3::11]) - by web006.ispnoc.net with esmtps (TLSv1:AES256-SHA:256) - (Exim 4.85) - (envelope-from <grub-devel-bounces+info=gluglug.org.uk@gnu.org>) - id 1a4swQ-00061v-Qn - for info@gluglug.org.uk; Fri, 04 Dec 2015 17:10:39 +0100 -Received: from localhost ([::1]:41769 helo=lists.gnu.org) - by lists.gnu.org with esmtp (Exim 4.71) - (envelope-from <grub-devel-bounces+info=gluglug.org.uk@gnu.org>) - id 1a4sxA-0000V7-EW - for info@gluglug.org.uk; Fri, 04 Dec 2015 11:11:24 -0500 -Received: from eggs.gnu.org ([2001:4830:134:3::10]:51231) - by lists.gnu.org with esmtp (Exim 4.71) - (envelope-from <lynxis@fe80.eu>) id 1a4swo-0000Rx-IS - for grub-devel@gnu.org; Fri, 04 Dec 2015 11:11:03 -0500 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from <lynxis@fe80.eu>) id 1a4swn-0001gC-Ia - for grub-devel@gnu.org; Fri, 04 Dec 2015 11:11:02 -0500 -Received: from mail.base45.de ([80.241.61.77]:34435) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from <lynxis@fe80.eu>) id 1a4swn-0001g3-C1 - for grub-devel@gnu.org; Fri, 04 Dec 2015 11:11:01 -0500 -Received: from [2001:1a80:2259:2b1a:6042:6096:1de7:42c6] (helo=lazus.yip) - by mail.base45.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) - (Exim 4.82) (envelope-from <lynxis@fe80.eu>) - id 1a4swh-0004UO-38; Fri, 04 Dec 2015 17:10:56 +0100 -From: Alexander Couzens <lynxis@fe80.eu> -To: grub-devel@gnu.org -Subject: [PATCH 2/3] mkrescue: add argument --fixed-time to get reproducible - uuids -Date: Fri, 4 Dec 2015 17:10:43 +0100 -Message-Id: <1449245444-17579-3-git-send-email-lynxis@fe80.eu> -X-Mailer: git-send-email 2.6.3 -In-Reply-To: <1449245444-17579-1-git-send-email-lynxis@fe80.eu> -References: <1449245444-17579-1-git-send-email-lynxis@fe80.eu> -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] -X-Received-From: 80.241.61.77 -Cc: Alexander Couzens <lynxis@fe80.eu> -X-BeenThere: grub-devel@gnu.org -X-Mailman-Version: 2.1.14 -Precedence: list -Reply-To: The development of GNU GRUB <grub-devel@gnu.org> -List-Id: The development of GNU GRUB <grub-devel.gnu.org> -List-Unsubscribe: <https://lists.gnu.org/mailman/options/grub-devel>, - <mailto:grub-devel-request@gnu.org?subject=unsubscribe> -List-Archive: <http://lists.gnu.org/archive/html/grub-devel> -List-Post: <mailto:grub-devel@gnu.org> -List-Help: <mailto:grub-devel-request@gnu.org?subject=help> -List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grub-devel>, - <mailto:grub-devel-request@gnu.org?subject=subscribe> -MIME-Version: 1.0 -Content-Type: text/plain; charset="us-ascii" -Content-Transfer-Encoding: 7bit -Errors-To: grub-devel-bounces+info=gluglug.org.uk@gnu.org -Sender: grub-devel-bounces+info=gluglug.org.uk@gnu.org - -The uuid generation is based on the time. ---- - util/grub-mkrescue.c | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c -index 4511826..164c4e1 100644 ---- a/util/grub-mkrescue.c -+++ b/util/grub-mkrescue.c -@@ -52,6 +52,7 @@ static int xorriso_arg_alloc; - static char **xorriso_argv; - static char *iso_uuid; - static char *iso9660_dir; -+static time_t fixed_time; - - static void - xorriso_push (const char *val) -@@ -110,6 +111,7 @@ static struct argp_option options[] = { - {"product-version", OPTION_PRODUCT_VERSION, N_("STRING"), 0, N_("use STRING as product version"), 2}, - {"sparc-boot", OPTION_SPARC_BOOT, 0, 0, N_("enable sparc boot. Disables HFS+, APM, ARCS and boot as disk image for i386-pc"), 2}, - {"arcs-boot", OPTION_ARCS_BOOT, 0, 0, N_("enable ARCS (big-endian mips machines, mostly SGI) boot. Disables HFS+, APM, sparc64 and boot as disk image for i386-pc"), 2}, -+ {"fixed-time", 't', N_("TIMEEPOCH"), 0, N_("use a fixed timestamp for uuid generation"), 2}, - {0, 0, 0, 0, 0, 0} - }; - -@@ -153,6 +155,8 @@ enum { - static error_t - argp_parser (int key, char *arg, struct argp_state *state) - { -+ char *b; -+ - if (grub_install_parse (key, arg)) - return 0; - switch (key) -@@ -212,6 +216,15 @@ argp_parser (int key, char *arg, struct argp_state *state) - xorriso = xstrdup (arg); - return 0; - -+ case 't': -+ fixed_time = strtoll (arg, &b, 10); -+ if (*b !='\0') { -+ printf (_("invalid fixed time number: %s\n"), arg); -+ argp_usage (state); -+ exit (1); -+ } -+ return 0; -+ - default: - return ARGP_ERR_UNKNOWN; - } -@@ -541,7 +554,7 @@ main (int argc, char *argv[]) - { - time_t tim; - struct tm *tmm; -- tim = time (NULL); -+ tim = fixed_time != -1 ? fixed_time : time (NULL); - tmm = gmtime (&tim); - iso_uuid = xmalloc (55); - grub_snprintf (iso_uuid, 50, --- -2.6.3 - - -_______________________________________________ -Grub-devel mailing list -Grub-devel@gnu.org -https://lists.gnu.org/mailman/listinfo/grub-devel diff --git a/resources/grub/patch/reproducible/[PATCH 3_3] Makefile: use FIXED_TIMESTAMP for mkstandalone if set.eml b/resources/grub/patch/reproducible/[PATCH 3_3] Makefile: use FIXED_TIMESTAMP for mkstandalone if set.eml @@ -1,88 +0,0 @@ -Return-path: <grub-devel-bounces+info=gluglug.org.uk@gnu.org> -Envelope-to: info@gluglug.org.uk -Delivery-date: Fri, 04 Dec 2015 17:10:54 +0100 -Received: from lists.gnu.org ([2001:4830:134:3::11]) - by web006.ispnoc.net with esmtps (TLSv1:AES256-SHA:256) - (Exim 4.85) - (envelope-from <grub-devel-bounces+info=gluglug.org.uk@gnu.org>) - id 1a4swg-00062N-3J - for info@gluglug.org.uk; Fri, 04 Dec 2015 17:10:54 +0100 -Received: from localhost ([::1]:41772 helo=lists.gnu.org) - by lists.gnu.org with esmtp (Exim 4.71) - (envelope-from <grub-devel-bounces+info=gluglug.org.uk@gnu.org>) - id 1a4sxP-0001CF-Pg - for info@gluglug.org.uk; Fri, 04 Dec 2015 11:11:39 -0500 -Received: from eggs.gnu.org ([2001:4830:134:3::10]:51253) - by lists.gnu.org with esmtp (Exim 4.71) - (envelope-from <lynxis@fe80.eu>) id 1a4swq-0000Ub-R2 - for grub-devel@gnu.org; Fri, 04 Dec 2015 11:11:08 -0500 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from <lynxis@fe80.eu>) id 1a4swp-0001gz-TF - for grub-devel@gnu.org; Fri, 04 Dec 2015 11:11:04 -0500 -Received: from mail.base45.de ([80.241.61.77]:57535) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from <lynxis@fe80.eu>) id 1a4swp-0001go-O8 - for grub-devel@gnu.org; Fri, 04 Dec 2015 11:11:03 -0500 -Received: from [2001:1a80:2259:2b1a:6042:6096:1de7:42c6] (helo=lazus.yip) - by mail.base45.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) - (Exim 4.82) (envelope-from <lynxis@fe80.eu>) - id 1a4swj-0004UO-KJ; Fri, 04 Dec 2015 17:10:58 +0100 -From: Alexander Couzens <lynxis@fe80.eu> -To: grub-devel@gnu.org -Subject: [PATCH 3/3] Makefile: use FIXED_TIMESTAMP for mkstandalone if set -Date: Fri, 4 Dec 2015 17:10:44 +0100 -Message-Id: <1449245444-17579-4-git-send-email-lynxis@fe80.eu> -X-Mailer: git-send-email 2.6.3 -In-Reply-To: <1449245444-17579-1-git-send-email-lynxis@fe80.eu> -References: <1449245444-17579-1-git-send-email-lynxis@fe80.eu> -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] -X-Received-From: 80.241.61.77 -Cc: Alexander Couzens <lynxis@fe80.eu> -X-BeenThere: grub-devel@gnu.org -X-Mailman-Version: 2.1.14 -Precedence: list -Reply-To: The development of GNU GRUB <grub-devel@gnu.org> -List-Id: The development of GNU GRUB <grub-devel.gnu.org> -List-Unsubscribe: <https://lists.gnu.org/mailman/options/grub-devel>, - <mailto:grub-devel-request@gnu.org?subject=unsubscribe> -List-Archive: <http://lists.gnu.org/archive/html/grub-devel> -List-Post: <mailto:grub-devel@gnu.org> -List-Help: <mailto:grub-devel-request@gnu.org?subject=help> -List-Subscribe: <https://lists.gnu.org/mailman/listinfo/grub-devel>, - <mailto:grub-devel-request@gnu.org?subject=subscribe> -MIME-Version: 1.0 -Content-Type: text/plain; charset="us-ascii" -Content-Transfer-Encoding: 7bit -Errors-To: grub-devel-bounces+info=gluglug.org.uk@gnu.org -Sender: grub-devel-bounces+info=gluglug.org.uk@gnu.org - -mkstandalone sets timestamps for files which can be overriden by a fixed_timestamp. -This makes it possible to build reproducible builds for coreboot. - -To build a reproducible build of grub for coreboot do: -make default_payload.elf FIXED_TIMESTAMP=1134242 ---- - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index 994ebbd..37a7cc4 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -403,7 +403,7 @@ bootcheck: $(BOOTCHECKS) - - if COND_i386_coreboot - default_payload.elf: grub-mkstandalone grub-mkimage -- pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos xfs ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg -+ pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos xfs ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg $(if $(FIXED_TIMESTAMP),-t $(FIXED_TIMESTAMP)) - endif - - endif --- -2.6.3 - - -_______________________________________________ -Grub-devel mailing list -Grub-devel@gnu.org -https://lists.gnu.org/mailman/listinfo/grub-devel diff --git a/resources/scripts/helpers/download/grub b/resources/scripts/helpers/download/grub @@ -59,9 +59,9 @@ git am "../resources/grub/patch/grub.johnlane.ie/0005-Cryptomount-support-for-hy git am "../resources/grub/patch/grub.johnlane.ie/0006-grub-core-disk-cryptodisk.c-Point-to-const-char.patch" # Needed for reproducible builds in GRUB -git am "../resources/grub/patch/reproducible/"\[PATCH\ 1_3\]\ mkstandalone\:\ add\ argument\ --fixed-time\ to\ override\ mtime\ of\ files.eml -git am "../resources/grub/patch/reproducible/"\[PATCH\ 2_3\]\ mkrescue\:\ add\ argument\ --fixed-time\ to\ get\ reproducible\ uuids.eml -git am "../resources/grub/patch/reproducible/"\[PATCH\ 3_3\]\ Makefile\:\ use\ FIXED_TIMESTAMP\ for\ mkstandalone\ if\ set.eml +git am "../resources/grub/patch/reproducible/0001-mkstandalone-add-argument-fixed-time-to-override-mti.patch" +git am "../resources/grub/patch/reproducible/0002-mkrescue-add-argument-fixed-time-to-get-reproducible.patch" +git am "../resources/grub/patch/reproducible/0003-Makefile-use-FIXED_TIMESTAMP-for-mkstandalone-if-set.patch" cd "../" printf "\n\n"