From nobody Thu Jul 27 04:12:06 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 4RBHQv3DGYz4pQHG; Thu, 27 Jul 2023 04:12:07 +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 4RBHQt74hsz3nms; Thu, 27 Jul 2023 04:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690431127; 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=D47sdoGPoLtdDW7x6iQ0D0C3o+WJ4ply5LFtKUb3JbA=; b=sBIQ2Tx9khgXvtd2qcY2lRYYtKK8Nl6yyFsFJCwR5nHipoxTMVqx6a1vsY2K4QgaJvNmqy yMeIuWRB8/2H2kgzNr0pdAiADeR8hrqgY4bfL2Ur+FwxM9eRlyKvqHH9q9iXNDCqAxs4u+ cDJyeqri8cgjFX71GC4qhFoTpIUoda1ECRQFiqwORwbXi86epnXi1xFU/pqo6pt3R0zuZx Dv3dQ/Uj5K2KMnpOS9miad2Jdc3DkTCfNzeXDvm387e+Lj0OsSwlHKAA6oclwQQPifxRR6 sNzk+c1azZAgAxYw+UKDFHfkosLwXDQUeea9WRTIe1epQ8NN1vwz7+UaFEmgrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690431127; 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=D47sdoGPoLtdDW7x6iQ0D0C3o+WJ4ply5LFtKUb3JbA=; b=xNOFfxZCoUfeIGLZaE+EGlBEcbheHMLkO6BthvlUi45ETH+MBrLteXaR0+sFe/iXdau0sF 7v/dXDBs+wYm3KVw78h7zAEBPVefFCc9frjQQGLCYR2dgRuxWnUwb0YdqItfk7zI4sa/Kx yM+gI0Y8z9EQprZUJVcl9k2b8cDuwEAxkB69k09EHXrorw2oJVVd88KrNoD/sDy3QX/1je QPePQpHJPfNM9v/036B/b5bULl7scspIvSp9ElnaCw2D84epUxJEFRTXiPOZ5/P1NkCt4f kMZogzJBLRSv+SHLLrAkoDh2OTnzJc6u9zYiqYqhJ1VrNd/QLnc9/nFl+kb1PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690431127; a=rsa-sha256; cv=none; b=DRoV4pxrx5tpp4vmimqZP6BJ+0nPSKJVJDJaOkvSBklQcIdw8weuEzEDqILblKUtztmGYJ 56JROq4DO+1EReHxgNByYbT8gIySSRaY10V0OKfiKtckYlprmUW7E6wGWeyAQ7I2F7UYf+ Ogk28AzbeEAamiR53ZNWh6vUjWkLaIGOi30NNSKku1gxBhkGQRaZ1KW9ZP/Lm/lm7/35T8 KGOmHh2yRAPQO1MEYqNqvtqmofVPTPopofDq2TOzmowFiwug1p0ax1CLqMw4imcSMP+/ZK 51RG9VIO9MZgOa/tRyotJh6outXguwMzYhb2HfVxI6Tj+oBgQRWF7sUwKo2S1Q== 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 4RBHQt61Cbz191R; Thu, 27 Jul 2023 04:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36R4C68w097745; Thu, 27 Jul 2023 04:12:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36R4C646097744; Thu, 27 Jul 2023 04:12:06 GMT (envelope-from git) Date: Thu, 27 Jul 2023 04:12:06 GMT Message-Id: <202307270412.36R4C646097744@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: 246364454fc1 - main - etcupdate: Use new buildetc and installetc targets when available 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: 246364454fc13e80e33142764e276b395f308712 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=246364454fc13e80e33142764e276b395f308712 commit 246364454fc13e80e33142764e276b395f308712 Author: Jessica Clarke AuthorDate: 2023-07-27 04:10:49 +0000 Commit: Jessica Clarke CommitDate: 2023-07-27 04:10:49 +0000 etcupdate: Use new buildetc and installetc targets when available These new targets avoid the need to invoke internal build system targets or set internal variables when building, and also have the added benefit of working with BUILD_WITH_STRICT_TMPPATH. Old source trees lacking such targets will not work with BUILD_WITH_STRICT_TMPPATH; they could be made to work by copying the steps, but it's not worth doing so, as they never have worked in the past. The primary goal of this is to support changing the default of BUILD_WITH_STRICT_TMPPATH to enabled. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D41206 --- usr.sbin/etcupdate/etcupdate.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index ae75a6e36f03..4735fa6c75eb 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -219,11 +219,19 @@ build_tree() cd $SRCDIR || exit 1; if ! [ -n "$nobuild" ]; then export MAKEOBJDIRPREFIX=$destdir/usr/obj; - $make _obj SUBDIR_OVERRIDE=etc || exit 1 - $make everything SUBDIR_OVERRIDE=etc || exit 1 + if [ -n "$($make -V.ALLTARGETS:Mbuildetc)" ]; then + $make buildetc || exit 1 + else + $make _obj SUBDIR_OVERRIDE=etc || exit 1 + $make everything SUBDIR_OVERRIDE=etc || exit 1 + fi + fi + if [ -n "$($make -V.ALLTARGETS:Minstalletc)" ]; then + $make DESTDIR=$destdir installetc || exit 1 + else + $make DESTDIR=$destdir distrib-dirs || exit 1 + $make DESTDIR=$destdir distribution || exit 1 fi - $make DESTDIR=$destdir distrib-dirs || exit 1 - $make DESTDIR=$destdir distribution || exit 1 ) || return 1 fi chflags -R noschg $1 || return 1