NetBSD Problem Report #57910
From www@netbsd.org Thu Feb 8 16:52:49 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 E17891A9238
for <gnats-bugs@gnats.NetBSD.org>; Thu, 8 Feb 2024 16:52:49 +0000 (UTC)
Message-Id: <20240208165218.D6E5C1A9239@mollari.NetBSD.org>
Date: Thu, 8 Feb 2024 16:52:18 +0000 (UTC)
From: jbglaw@lug-owl.de
Reply-To: jbglaw@lug-owl.de
To: gnats-bugs@NetBSD.org
Subject: [RB] amd64/x86_64 Makefile.bootimage: Fix typo preventing reproducible builds
X-Send-Pr-Version: www-1.0
>Number: 57910
>Category: misc
>Synopsis: [RB] amd64/x86_64 Makefile.bootimage: Fix typo preventing reproducible builds
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 08 16:55:00 +0000 2024
>Last-Modified: Thu Feb 08 18:15:03 +0000 2024
>Originator: Jan-Benedict Glaw
>Release: current
>Organization:
>Environment:
>Description:
Using my CI builds, I tracked down an issue with amd64 reproducibility.
>How-To-Repeat:
Build twice, compare artifacts.
>Fix:
diff --git a/distrib/common/bootimage/Makefile.bootimage b/distrib/common/bootimage/Makefile.bootimage
index 85902a92f984..5f5a0ecaeed5 100644
--- a/distrib/common/bootimage/Makefile.bootimage
+++ b/distrib/common/bootimage/Makefile.bootimage
@@ -235,8 +235,8 @@ FSCYLINDERS!= expr ${FSSECTORS} / \( ${HEADS} \* ${SECTORS} \)
SWAPCYLINDERS!= expr ${SWAPSECTORS} / \( ${HEADS} \* ${SECTORS} \) || true
.if ${USE_GPT} != "no"
-BOOTDISK_UUID=`${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} show -i 2 | ${TOOL_AWK} '/^GUID/ {print $$2}'`
-SWAPDISK_UUID=`${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} show -i 3 | ${TOOL_AWK} '/^GUID/ {print $$2}'`
+BOOTDISK_UUID=`${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKMBR} show -i 2 | ${TOOL_AWK} '/^GUID/ {print $$2}'`
+SWAPDISK_UUID=`${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKMBR} show -i 3 | ${TOOL_AWK} '/^GUID/ {print $$2}'`
.endif
#
@@ -525,11 +525,11 @@ ${WORKMBR}:
@echo creating GPT header and partition entries...
${RM} -f ${WORKMBR}
${DD} if=/dev/zero of=${WORKMBR} seek=$$((${IMAGESECTORS} - 1)) count=1
- ${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} create
- ${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} add -a 1m -s ${EFISECTORS} -t efi -l "EFI system"
- ${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} add -a 1m -s ${FSSECTORS} -t ffs
+ ${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKMBR} create
+ ${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKMBR} add -a 1m -s ${EFISECTORS} -t efi -l "EFI system"
+ ${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKMBR} add -a 1m -s ${FSSECTORS} -t ffs
. if ${SWAPSECTORS} != 0
- ${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKMBR} add -a 1m -s ${SWAPSECTORS} -t swap
+ ${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKMBR} add -a 1m -s ${SWAPSECTORS} -t swap
. endif
.elif ${USE_MBR} != "no"
@echo creating MBR labels...
@@ -584,10 +584,10 @@ ${IMGBASE}.img: ${TARGET_BLOCKS}
${CAT} ${TARGET_BLOCKS} > ${WORKIMG}
.if ${USE_GPT} != "no"
.if ${USE_GPTMBR} != "no"
- ${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKIMG} biosboot -i 2 \
+ ${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKIMG} biosboot -i 2 \
-c ${.OBJDIR}/${WORKDIR}/usr/mdec/gptmbr.bin
.endif
- ${TOOL_GPT} ${GPT_TIMESSTAMP} ${WORKIMG} set -a bootme -i 2
+ ${TOOL_GPT} ${GPT_TIMESTAMP} ${WORKIMG} set -a bootme -i 2
.endif # USE_GPT != "no"
.if ${USE_SUNLABEL} != "no"
@echo Creating sun disklabel...
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57910 CVS commit: src/distrib/common/bootimage
Date: Thu, 8 Feb 2024 13:14:02 -0500
Module Name: src
Committed By: christos
Date: Thu Feb 8 18:14:02 UTC 2024
Modified Files:
src/distrib/common/bootimage: Makefile.bootimage
Log Message:
PR/57910: Jan-Benedict Glaw: Fix typo preventing reproducible builds
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/distrib/common/bootimage/Makefile.bootimage
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(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.