From nobody Thu Jun 08 18:14:21 2023 X-Original-To: dev-commits-src-all@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 4QcXRK3bZ7z4cG43; Thu, 8 Jun 2023 18:14:21 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QcXRK2Z73z3y4t; Thu, 8 Jun 2023 18:14:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686248061; 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=KT41Sge2nJfru4gXqkznmQ/vIIBFuqMFTZ5c9pDaiaQ=; b=DmEYNfe/hEBeh4yAKVYW4+8fK8JLgLytnTwyW8WORHoYEuNcnT0TuCNKB05DV+vekm70M4 ByJP4n8fkPDrH5surAxiopsvT7KvsXVgjI86oG3mGEXeQSWNBP1MXGBWmX+urPwEFf7JL+ XL1pTaVFKlfjIrALNClBNe7vuKCGsp0YxxLvBZkphVT2NtDzSOODJ3X+kwd9faJPxQhcAj 4ZJAVdclXLTY2t8iQtxigGwNKM3beVBgyxHZRbDdFbCJOq2tUFa2pCLXXZwHCF31hLnmK+ Xj0iNwVDUb1b2LdVgEEhN2diX4depwAgQd1ve/Fgnff+/zFAZd2ZHJNHZm1v4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686248061; 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=KT41Sge2nJfru4gXqkznmQ/vIIBFuqMFTZ5c9pDaiaQ=; b=njHS6Bcoos/eZIT5a8BZzSqWBafUQBdRJw0QNl7mGm7sjWUc7B9WOWIJhMOxr+k/LI247Z jGP7wTWcCwhVnA9tDVnPneiIfO1S7ueM2sPrjTa3Qv1bxgJJng9Trj55QCMWYQxmH0th3Y T5wAGSeNNZm9eTG/mbAUG9y5mft8ic7Jnpd0zvqaAsdsZmHf/coWnTYtAPB/leRgc/g8HF 0sC7VpoMkyTnbryi6NIDhm8ePbsgUErlZHePo4ywKxhwWH7boUQYbMzFs48U51IefasCID Ql2KF6IrrwxGStSCdFiSmOodp+Yk2aShYVavHC7uxIW1Dx8sz6xIApMPA+u4/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686248061; a=rsa-sha256; cv=none; b=vDbYyM6/nBIvcflq3cV/5JEpqABDA3VmOTFmcK5YVFcTf7NmGcesq/y2UobDLDvXo6a6/x smWJP13Y6H9854G9NwP4jErZANbI3q3L38H5/FN6qYhtfQhdHtUZMSY86PJZXo6KJFalLB b68frtqR1CazfEgMeXHFcKJLOxKnKMu5m18AbjwZEpoXgWMBBHRW+BzoBBO91xdvdiJMZx Eyi6baEICyFt7GHYebSZrZFzy8ixm6LX4/6qhTJKfQIybHXgFd/ktP0xp2/ksLb/pL7+Vd 8wRiodm6gnb+D14mzNJ2kn10MdUbd/h29mAnVJNtG6QDbdjc+SyWvvBsB/VUAA== 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 4QcXRK1g6lz14D1; Thu, 8 Jun 2023 18:14:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 358IELH3031923; Thu, 8 Jun 2023 18:14:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 358IELaM031922; Thu, 8 Jun 2023 18:14:21 GMT (envelope-from git) Date: Thu, 8 Jun 2023 18:14:21 GMT Message-Id: <202306081814.358IELaM031922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 2e0d99a953ef - main - Makefile.inc1: Fix distributeworld mtree mangling for dist root dir List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e0d99a953ef30ad29b3c0143c0aa7a815cf8ef1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=2e0d99a953ef30ad29b3c0143c0aa7a815cf8ef1 commit 2e0d99a953ef30ad29b3c0143c0aa7a815cf8ef1 Author: Jessica Clarke AuthorDate: 2023-06-08 17:35:23 +0000 Commit: Jessica Clarke CommitDate: 2023-06-08 18:14:12 +0000 Makefile.inc1: Fix distributeworld mtree mangling for dist root dir The trailing slash means that ./base itself doesn't get mangled and remains as-is in the output, leading to a stray /base in base.txz for NO_ROOT builds and thus in the installed system. Since this action is running on a line whose file matches one listed by find (and we're printing all of these as part of that distribution), we don't need to care about the possibility of a path like ./basefoo/bar where the path prefix isn't ./base, and can thus just drop the slash rather than needing something more complicated like "slash or whitespace or EOL" as one might first think. --- Makefile.inc1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 88ae6dadd8a1..09267b8f69c2 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1482,7 +1482,7 @@ distributeworld installworld stageworld: _installcheck_world .PHONY @# the relevant mtree line. cd ${DESTDIR}/${DISTDIR}; \ find ./${dist} | ${METALOG_SORT_CMD} -u ${METALOG} - | \ - awk 'BEGIN { print "#${MTREE_MAGIC}" } !/ type=/ { file = $$1 } / type=/ { if ($$1 == file) { sub(/^\.\/${dist}\//, "./"); print } }' > \ + awk 'BEGIN { print "#${MTREE_MAGIC}" } !/ type=/ { file = $$1 } / type=/ { if ($$1 == file) { sub(/^\.\/${dist}/, "."); print } }' > \ ${DESTDIR}/${DISTDIR}/${dist}.meta .endfor .for dist in ${DEBUG_DISTRIBUTIONS} @@ -1492,7 +1492,7 @@ distributeworld installworld stageworld: _installcheck_world .PHONY @# the relevant mtree line. cd ${DESTDIR}/${DISTDIR}; \ find ./${dist}/usr/lib/debug | ${METALOG_SORT_CMD} -u ${METALOG} - | \ - awk 'BEGIN { print "#${MTREE_MAGIC}" } !/ type=/ { file = $$1 } / type=/ { if ($$1 == file) { sub(/^\.\/${dist}\//, "./"); print } }' > \ + awk 'BEGIN { print "#${MTREE_MAGIC}" } !/ type=/ { file = $$1 } / type=/ { if ($$1 == file) { sub(/^\.\/${dist}/, "."); print } }' > \ ${DESTDIR}/${DISTDIR}/${dist}.debug.meta .endfor .endif