From nobody Mon Jan 06 18:01:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YRhnN3KpMz5jxqJ; Mon, 06 Jan 2025 18:01:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YRhnM5kQ2z4G1V; Mon, 6 Jan 2025 18:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736186471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h++1lBfpDLUoV05YMhKiwItBb4OqscdXGJcbqDGD4bQ=; b=bNvPMamxxcFUlkqbubhZA5ak7rDlkeHhr+MWSefdFcl9B5DONmCj8TYl8D0wbQ3s6MH+tZ LiwIxYyOlNCz8BYGOKaPRbCwgPlNsI6bbWM1Gw89aDSpkR/tEC8sh6ZwfXPrsnYKf8rPde dn/1bW8+XWbwvCdSWzm3TFAWy+A6pgmxhd8UxginlGg8o3SOr9cRHKgVf7V9zRYAJi/QC7 hTb9y17ESsuYefXgh4LhWF/vZtrVoSV5yYc/Pe76peaCRDjBI8akspYiJhX1AykbJo+WbX ymK41mhn+TZO50bSRjuDQJ84vAoHbkn63ej14WOOFxXMpznOJmYV9C+UG8p3BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736186471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h++1lBfpDLUoV05YMhKiwItBb4OqscdXGJcbqDGD4bQ=; b=bdUefLsW3SdtcOTpqDcDT9z5UYdWlB8eYkPFsm/ChjqfngSI5KE6g2qVJpd/5caKzMnvhV 1Og9KxEfkCQG28fP+2Al3ip5irRMNsBQaJVV7eaF/PJZJNZdvqegbucqGRRuVBKDG40MI1 mNKBlHelv9rBUHfA/oVuFnmu/IgtPCMUrBuU11p+s/PFXRfaUknLjW7nYLdOU2ZzIDgNdf 08zi3l9Z/v0O3DcaDVbsDLriLhqiBg53sYsZphI9ylGbyiH7AxT01A76G1G8TwC4fMdKB4 4gWu4DS2IAT2LY2EJ4z5QF5R3+wUNGeRMoX5gCO6/ERJ8CePK6KKXhyUvnmkqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736186471; a=rsa-sha256; cv=none; b=q1Uy+8K0CV/tUXQBkR3dwV7MhqlsmnUvLTZgri5wF7a0xSCQPiWy16IwZNdPUUbUFjgcSU QpH/pSSEJfJkJJB4fbiEZLUJAZ+g+I8GSmsfVvVswiUB1EwCAUclIIKnSz1apkI4GwoJqu BFxUM10fQ+SHYk9LSyYYT5R2ljCQGUWy5jRkUcW8XjLpkXk2h4o4t3tmWp+mRciqOpERTi 33Pb+IPC9ypgQ8SLZfKgOcvfzwnG04Zjk0XfAcQMKtROrcps/Tx9LyELtATM7DcVfARTGM ASQ1jqVj1rM4nNyTv2jqURiyHMvqqI3eAhss3uEtnM3PH1dADwbeMQcwQHlMZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YRhnM4hnFzbpt; Mon, 06 Jan 2025 18:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 506I1Bgw004042; Mon, 6 Jan 2025 18:01:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 506I1BMJ004039; Mon, 6 Jan 2025 18:01:11 GMT (envelope-from git) Date: Mon, 6 Jan 2025 18:01:11 GMT Message-Id: <202501061801.506I1BMJ004039@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 58610d1e0fbb - main - build: Sort distributekernel METALOG when using -DNO_ROOT List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 58610d1e0fbbd1a49927559ee3970d8e4594cc86 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=58610d1e0fbbd1a49927559ee3970d8e4594cc86 commit 58610d1e0fbbd1a49927559ee3970d8e4594cc86 Author: Pat Maddox AuthorDate: 2024-12-13 19:57:30 +0000 Commit: Ed Maste CommitDate: 2025-01-06 17:56:30 +0000 build: Sort distributekernel METALOG when using -DNO_ROOT The metalog is produced by install -M, which is not inherently sorted. This results in non-deterministic file ordering in kernel.txz. Order the files in kernel.txz to support reproducible builds. PR: 283214 Reviewed by: emaste Signed-off-by: Pat Maddox --- Makefile.inc1 | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index bad747a0e551..fe799218ab0a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1903,9 +1903,7 @@ distributekernel distributekernel.debug: .PHONY false .endif mkdir -p ${DESTDIR}/${DISTDIR} -.if defined(NO_ROOT) - @echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.premeta -.endif + rm -f ${DESTDIR}/${DISTDIR}/kernel.premeta ${_+_}cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${IMAKEENV} ${IMAKE_INSTALL:S/METALOG/kernel.premeta/} \ ${IMAKE_MTREE} PATH=${TMPPATH:Q} ${MAKE} KERNEL=${INSTKERNNAME} \ @@ -1913,15 +1911,14 @@ distributekernel distributekernel.debug: .PHONY METALOG=${METALOG:S/METALOG/kernel.premeta/} \ ${.TARGET:S/distributekernel/install/} .if defined(NO_ROOT) - @sed -e 's|^./kernel|.|' ${DESTDIR}/${DISTDIR}/kernel.premeta > \ - ${DESTDIR}/${DISTDIR}/kernel.meta + echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.meta + sed -e 's|^./kernel|.|' ${DESTDIR}/${DISTDIR}/kernel.premeta | \ + ${METALOG_SORT_CMD} >> ${DESTDIR}/${DISTDIR}/kernel.meta .endif .endif .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} -.if defined(NO_ROOT) - @echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta -.endif + rm -f ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta ${_+_}cd ${KRNLOBJDIR}/${_kernel}; \ ${IMAKEENV} ${IMAKE_INSTALL:S/METALOG/kernel.${_kernel}.premeta/} \ ${IMAKE_MTREE} PATH=${TMPPATH:Q} ${MAKE} \ @@ -1930,9 +1927,10 @@ distributekernel distributekernel.debug: .PHONY METALOG=${METALOG:S/METALOG/kernel.${_kernel}.premeta/} \ ${.TARGET:S/distributekernel/install/} .if defined(NO_ROOT) - @sed -e "s|^./kernel.${_kernel}|.|" \ - ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta > \ - ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta + echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta + sed -e "s|^./kernel.${_kernel}|.|" \ + ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta | \ + ${METALOG_SORT_CMD} >> ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta .endif .endfor .endif