From nobody Wed Jul 13 18:01:27 2022 X-Original-To: dev-commits-src-branches@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 17BE11D0423B; Wed, 13 Jul 2022 18:01:28 +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 4Ljlmm0BT7z3pBm; Wed, 13 Jul 2022 18:01:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657735288; 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=4N75S+v9DsTPMqr8cqx8jokUq/KRL83zJRv45w/v1Vw=; b=yQiO7WvPoy3ODoczQZbLS6yr9ua8sCjsXVAamGWvEy85CJbqbrwN+X4IKGFp0Gf7GDFcVu T9nxMpGbQKZ+mkc9lGP+JKD2egvW64t7fyZzqT8phUvmBjwIbeuPe7Ilxcgnj5qC7o7y3g zcBdCKTcvPOls216pP1VhEvPgZ00tnx2Mpy9BR+6dMOaf2xW6ELn6MAqPyQTN6jC9mV5AF nMjm8H8DPZz8qbocbOp7CQFf37EerR1hJqe166m2OpSKBkXSTsnINEpaUuCl3uGywTUSvF sqgWK9aSrSXu8tU9Ehu67bcBaJhr7Kr7ydH1mZyMBdZhImp/klJ0e52eAEtHFA== 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 4Ljlml6MLyzYj9; Wed, 13 Jul 2022 18:01:27 +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 26DI1RP1059105; Wed, 13 Jul 2022 18:01:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26DI1RJl059104; Wed, 13 Jul 2022 18:01:27 GMT (envelope-from git) Date: Wed, 13 Jul 2022 18:01:27 GMT Message-Id: <202207131801.26DI1RJl059104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 5d7b7a98e5ed - stable/13 - etcupdate: Don't rotate trees for a dry run. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5d7b7a98e5ed56a33bdafbeb57c2e85e0ae0aab5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657735288; 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=4N75S+v9DsTPMqr8cqx8jokUq/KRL83zJRv45w/v1Vw=; b=U4Q3ao3YN8xMeK4zcctoVB+m9t0/HW4GsPwVAUle4kdsIe79EOvSMmmNY7gHYE9RmKVLK7 4zuZSmS1uboV6SvYil2mBtf53tqXw/kds/QxIkLJek3GolZccCj9841KFObc0Q8vU0uMJl Jh3zHillkFjesqKvt4RmGgveuDn3hgKAvlplKbGMfv2SxRSrVz8Bg0xZGBfx/C1dptq3bX xA2fKrfNpjK1XnIMP77JZ4kxTDr9QBrIEWVLfFPk/nrdAxTFLFggy5WU5euSdimdi3zltR tKUqei95yIhGH1rtSsiLhxDGNg4DBjd5HlvXR/jTFXfTc/YGfzi6YPXr3h9WYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657735288; a=rsa-sha256; cv=none; b=nwlq/YImWyrQbSq5n7FjEOTLJB5CwPiAqPJXvlHhSBAoxrfF/hmnUvGAa4OHUWlo6ezWcY K/MKT/7RraBTxgFdeGjWJjVoIlZD+7zcg7r1YGg9oodVlPRDv6UFitF3eiv0aY1Sgah/e1 hAgCOpJ+gxEYs4aS/9I2aAyumXvoXE6STDjdCztuKe++7fKzXEeAka09q/fxDkn/T/o2KC 8Jy5bmM7EkROlHLJAlyHTf7LLdktmpUein3p6gyB8jsrZBjeSAkFsYJCJs4Nzj6nkeiCFE wJfF5iLnuEVGYIG32pJfEw17xYNztibLq7PHwkS4EWHf9bCki+gXAc6qYsINng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5d7b7a98e5ed56a33bdafbeb57c2e85e0ae0aab5 commit 5d7b7a98e5ed56a33bdafbeb57c2e85e0ae0aab5 Author: John Baldwin AuthorDate: 2022-05-25 21:02:51 +0000 Commit: John Baldwin CommitDate: 2022-07-13 18:00:45 +0000 etcupdate: Don't rotate trees for a dry run. When performing a dry run, remove the temporary tree created rather than rotating the trees. Rotating the trees meant that etcupdate thought the latest changes were already merged and would not merge them on the next real run. PR: 260281 Reported by: Tomoaki AOKI Fixes: 0611aec3cf3a etcupdate: Always extract to a temporary tree. (cherry picked from commit 431944fb5ffff5ad56e720b75b7beecdc4878e0e) --- usr.sbin/etcupdate/etcupdate.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index acfc601b93af..b686db7d9f9a 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -1612,6 +1612,18 @@ EOF cat $WARNINGS fi + # If this was a dryrun, remove the temporary tree if we built + # a new one. + if [ -n "$dryrun" ]; then + if [ -n "$dir" ]; then + if [ -n "$rerun" ]; then + panic "Should not have a temporary directory" + fi + remove_tree $dir + fi + return + fi + # Finally, rotate any needed trees. if [ "$new" != "$NEWTREE" ]; then if [ -n "$rerun" ]; then