From a47d0a4f5e61eb1500aaf6e9e6448aa3146c5c7a Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 20 Mar 2024 00:31:54 +0000 Subject: [PATCH] Fix reproducible builds (Jan-Benedict Glaw) --- distrib/common/Makefile.image | 7 ++++--- distrib/hppa/kernel/Makefile | 8 ++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/distrib/common/Makefile.image b/distrib/common/Makefile.image index 85a8ef4b31c8..67be2fb67b68 100644 --- a/distrib/common/Makefile.image +++ b/distrib/common/Makefile.image @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.image,v 1.40 2017/02/11 03:07:06 christos Exp $ +# $NetBSD: Makefile.image,v 1.41 2024/03/20 00:31:54 christos Exp $ # # Makefile snippet to build a tree from the provided lists, # and make an ffs file system image from that tree @@ -39,13 +39,14 @@ WORKBUILT?= work.built PARSELISTENV+= TARGETDIR=${.OBJDIR}/${WORKDIR:Q} -GZIP_FLAGS= -9 ${GZIP_N_FLAG} - .if ${MKREPRO_TIMESTAMP:Uno} != "no" MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}" PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}" +GZIP_N_FLAG=-n .endif +GZIP_FLAGS= -9 ${GZIP_N_FLAG} + .if !target(${WORKBUILT}) # { ${WORKBUILT}: ${IMAGEDEPENDS} ${WORKSPEC} ${PARSELISTDEP} ${LISTS} # There is a .PHONY ${CRUNCHBIN}, so check if out of date by hand diff --git a/distrib/hppa/kernel/Makefile b/distrib/hppa/kernel/Makefile index f3ba00dc2965..406ab4105a5a 100644 --- a/distrib/hppa/kernel/Makefile +++ b/distrib/hppa/kernel/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2014/02/24 07:23:38 skrll Exp $ +# $NetBSD: Makefile,v 1.2 2024/03/20 00:33:42 christos Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -13,8 +13,12 @@ MDSET_RELEASEDIR= binary/kernel LIF= netinstall.lif +.if ${MKREPRO_TIMESTAMP:Uno} != "no" +MKBOOT_TIMESTAMP= -t "${MKREPRO_TIMESTAMP}" +.endif + MDSET_POST = \ - ${MKBOOT} ${DESTDIR}/usr/mdec/boot ${.TARGET} ${LIF} + ${MKBOOT} ${MKBOOT_TIMESTAMP} ${DESTDIR}/usr/mdec/boot ${.TARGET} ${LIF} .include "${DISTRIBDIR}/common/Makefile.mdset"