NetBSD Problem Report #57915

From www@netbsd.org  Fri Feb  9 07:08:11 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 8C4971A9238
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  9 Feb 2024 07:08:11 +0000 (UTC)
Message-Id: <20240209070810.0E1341A9239@mollari.NetBSD.org>
Date: Fri,  9 Feb 2024 07:08:10 +0000 (UTC)
From: jbglaw@lug-owl.de
Reply-To: jbglaw@lug-owl.de
To: gnats-bugs@NetBSD.org
Subject: [RB] sandpoint/powerpc Use $MKREPRO_TIMESTAMP for repro builds in uBoot images
X-Send-Pr-Version: www-1.0

>Number:         57915
>Category:       misc
>Synopsis:       [RB] sandpoint/powerpc Use $MKREPRO_TIMESTAMP for repro builds in uBoot images
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 09 07:10:00 +0000 2024
>Last-Modified:  Fri Feb 09 16:15:04 +0000 2024
>Originator:     Jan-Benedict Glaw
>Release:        current
>Organization:
>Environment:
>Description:
Building for sandpoint/powerpc, we get embedded build-time timestamps even for reproducible builds. Use $MKREPRO_TIMESTAMP instead.
>How-To-Repeat:
Build twice for sandpoint/powerpc and compare build artifacts.
>Fix:
diff --git a/sys/arch/sandpoint/stand/altboot/Makefile b/sys/arch/sandpoint/stand/altboot/Makefile
index b65c88b9a82b..e0a9ff3d7a3d 100644
--- a/sys/arch/sandpoint/stand/altboot/Makefile
+++ b/sys/arch/sandpoint/stand/altboot/Makefile
@@ -56,13 +56,17 @@ cleandir distclean: .WAIT cleanlibdir
 cleanlibdir:
        -rm -rf lib

+.if ${MKREPRO_TIMESTAMP:Uno} != "no"
+MKUBOOTIMAGE_TIMESTAMP=-t "${MKREPRO_TIMESTAMP}"
+.endif
+
 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
        ${_MKTARGET_LINK}
        ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \
            ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
        ${OBJCOPY} -S -O binary ${PROG} ${PROG}.bin
        ${TOOL_MKUBOOTIMAGE} -A powerpc -T kernel -C none -O linux \
-           -a 0x${RELOC} -n ${PROG} ${PROG}.bin ${PROG}.img
+           -a 0x${RELOC} ${MKUBOOTIMAGE_TIMESTAMP} -n ${PROG} ${PROG}.bin ${PROG}.img

 VERSIONFLAGS+=-k
 .include "${S}/conf/newvers_stand.mk"

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57915 CVS commit: src/sys/arch/sandpoint/stand/altboot
Date: Fri, 9 Feb 2024 11:12:02 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Fri Feb  9 16:12:02 UTC 2024

 Modified Files:
 	src/sys/arch/sandpoint/stand/altboot: Makefile

 Log Message:
 PR/57915: Jan-Benedict Glaw: Use $MKREPRO_TIMESTAMP for repro builds in uBoot
 images


 To generate a diff of this commit:
 cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sandpoint/stand/altboot/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.