NetBSD Problem Report #57913

From www@netbsd.org  Fri Feb  9 06:50:03 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 E78751A9238
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  9 Feb 2024 06:50:02 +0000 (UTC)
Message-Id: <20240209065001.AE1D61A9239@mollari.NetBSD.org>
Date: Fri,  9 Feb 2024 06:50:01 +0000 (UTC)
From: jbglaw@lug-owl.de
Reply-To: jbglaw@lug-owl.de
To: gnats-bugs@NetBSD.org
Subject: [RB] acorn32/earmv4 mksparkive.sh: Don't embed build timestamp into archive
X-Send-Pr-Version: www-1.0

>Number:         57913
>Category:       misc
>Synopsis:       [RB] acorn32/earmv4 mksparkive.sh: Don't embed build timestamp into archive
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 09 06:55:00 +0000 2024
>Last-Modified:  Fri Feb 09 15:35:01 +0000 2024
>Originator:     Jan-Benedict Glaw
>Release:        current
>Organization:
>Environment:
>Description:
Comparing CI builds, I found that acorn32 builds use a specific script to generate an archive. This contains the compiled file's mtimes, which breaks reproducible builds
>How-To-Repeat:
Build twice for acorn32/earmv4 and observe differences in build artifacts.
>Fix:
index 3a21e231d2e8..d2131b7b7d48 100755
--- a/distrib/acorn32/mksparkive.sh
+++ b/distrib/acorn32/mksparkive.sh
@@ -89,6 +89,7 @@ makeheader()
        # extracting only the length here.
        length=`wc -c "$filename"`
        eval `${TOOL_STAT} -s "$statfilename"`
+       [ -n "${MKREPRO_TIMESTAMP}" ] && st_mtime=${MKREPRO_TIMESTAMP}
        # centiseconds since 1st Jan 1900
        timestamp=`expr $st_mtime \* 100 + 220898880000`
        lowtype=`echo "$filetype" | sed s/.//`

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57913 CVS commit: src/distrib/acorn32
Date: Fri, 9 Feb 2024 10:34:34 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Fri Feb  9 15:34:34 UTC 2024

 Modified Files:
 	src/distrib/acorn32: mksparkive.sh

 Log Message:
 PR/57913: Jan-Benedict Glaw: Don't embed build timestamp into archive
 While here, modernize backquotes.


 To generate a diff of this commit:
 cvs rdiff -u -r1.8 -r1.9 src/distrib/acorn32/mksparkive.sh

 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.