From nobody Wed Jul 13 18:01:34 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 A142F1D04372; Wed, 13 Jul 2022 18:01:34 +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 4Ljlmt4GgTz3pnc; Wed, 13 Jul 2022 18:01:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657735294; 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=tdMCBdxB4pJ8w+t3HLXxTJ5/4mMhQlPahJIAyTIkvI4=; b=nmcZhuM8T9hHMGB/NVAupYXA+n5cGrLsutXcWggPjAlJtjhK31cCClWC/MkzhhiSsHk8q4 6oKy6+3Gnhzm4NtswSjN1G76i89y9CnXmVpwFs4gtBVpEaPj5ZB8AMcqT7fb7ZuDi9TqQ0 ofuSKAIxOAiEISvv3M1+arJfdf9PhomVY7NQOKDpRPJkLjqndST2btiPqGd0O2z5601x+/ I+JYRdDFTR2BgplzlV1EFLdUDG+D2nz5sgNed129lq4wiS/yxkHmot/Fo5jbyi8Rvg8BJX VCCRvfjR7pTunOcWbayUysgaaGi7iZDR6gTZGBRgN4PTWj1B/GUkRrtspuhz2Q== 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 4Ljlmt3NcTzYlV; Wed, 13 Jul 2022 18:01:34 +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 26DI1YvQ059273; Wed, 13 Jul 2022 18:01:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26DI1YIN059272; Wed, 13 Jul 2022 18:01:34 GMT (envelope-from git) Date: Wed, 13 Jul 2022 18:01:34 GMT Message-Id: <202207131801.26DI1YIN059272@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: c4aa309d232c - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: c4aa309d232cd1014e6eaae7043c29f8d45f5319 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657735294; 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=tdMCBdxB4pJ8w+t3HLXxTJ5/4mMhQlPahJIAyTIkvI4=; b=cZCOh2A9FqPMAml3UQwedvQlQUUCbeHt5qF78GA/2Af6rbyu8ixp3VV7vDTyD3K/GbLUR3 f9cD+ESrVp1bAjlQHGIzlsXSzI9f48hp2x0XihZzYYh7N6q7UKfbroCI89wK+g764kGNrL m+smNQv7BQok9uqYU88VWSdvpFpIqkyd+7+hvzTkdgnmOZ7jywrpXlOdIW6Qa+UlBccNsM fcqyS2l9GxuQH4n8RkEzcXCN/vv5IuNc+CiI6dpedwZSWvIqsoT7vXHg5l+ceZvLUWKuXJ ofZIHF4qPBiTQuZE1FydjPuovNs2CxLIfpYDxLMnLNlrI/bfeCg1fgr7HMLM0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657735294; a=rsa-sha256; cv=none; b=SHArdHSK2+jTj64HeD+WMQpfgvoqitge7dfmpuoClQlU8ZPmWNd3XwGSAM5YhEFkpoLCFC c9lBUISNH3wwu0QeadqAoGguapUKJlcU9JRI7zDvKrGbyjgqjSJiF+DZfV5W3+M8DldmSK ceCwkCk9QN7ow7jWcQ7DDutDnlnznMoS3xiynv4ZieI8oiuQ8SG52Q1Gq2uFR4j4Gys2aZ HfjqGY5Jjjy37emdqBgk4V+MH3vhEyEiZZSpLPiE+xmVNhxTlhypIX8ObNfbfRDWPfqbOi onW3iMxbqogXWEp3ecxigvxpdJMkLoFtfrAZY0o/ec+T6ZTi0HzbOxnPtQYkeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c4aa309d232cd1014e6eaae7043c29f8d45f5319 commit c4aa309d232cd1014e6eaae7043c29f8d45f5319 Author: John Baldwin AuthorDate: 2022-05-25 21:02:51 +0000 Commit: John Baldwin CommitDate: 2022-07-13 18:01:04 +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 1070c6905e46..3715dea7e95c 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