[SLOF] [PATCH] Default to notime if reproducible build is wanted
Thomas Huth
thuth at redhat.com
Mon Oct 23 17:42:22 AEDT 2023
On 21/10/2023 07.55, Bernhard M. Wiedemann wrote:
> 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";
>
Wouldn't it be better to use the string from SOURCE_DATE_EPOCH in
createHeaderImage() in create_crc.c ?
Thomas
More information about the SLOF
mailing list