[SLOF] [PATCH] Default to notime if reproducible build is wanted

Bernhard M. Wiedemann bwiedemann at suse.de
Sat Oct 21 16:55:09 AEDT 2023


SOURCE_DATE_EPOCH is defined in
https://reproducible-builds.org/specs/source-date-epoch/
and indicates that a reproducible build is wanted.

Without this patch, openSUSE's qemu package
always varied between builds.

This patch was done while working on reproducible builds for openSUSE.

This is an alternative to
https://lists.ozlabs.org/pipermail/slof/2023-October/002895.html

Signed-off-by: Bernhard M. Wiedemann <bwiedemann at suse.de>
---
 romfs/tools/create_flash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/romfs/tools/create_flash.c b/romfs/tools/create_flash.c
index f99fd62..adcf54c 100644
--- a/romfs/tools/create_flash.c
+++ b/romfs/tools/create_flash.c
@@ -59,7 +59,7 @@ main(int argc, char *argv[])
 	struct ffs_chain_t ffs_chain;
 	int c;
 	int smart_pad = 0;	/* default */
-	int notime = 0;
+	int notime = (getenv("SOURCE_DATE_EPOCH") != NULL);
 	const char *config_file = "boot_rom.ffs";
 	const char *output_file = "boot_rom.bin";
 
-- 
2.26.2



More information about the SLOF mailing list