From nobody Fri Jul 24 00:41:00 2026 X-Original-To: dev-commits-doc-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 4h5q0y1hbqz6lWKl for ; Fri, 24 Jul 2026 00:41:06 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h5q0y1371z3Hm5 for ; Fri, 24 Jul 2026 00:41:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784853666; 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=tTIg3P1UkmvXRg/bUYNAtnJaXANh4em8QHOrCnJ4yJ8=; b=rvK129esEjRGVM0bSlvhO7EUWzAva6dYLbLORLDPslCL+haY5dDI4GcSd/JEtNa+xqPNjD eGD6S9mD9tLm8PO1kxd6bGgSrwivxU+lFfI3lm6BhYIzPq99OP2phvFqXZ90ub77fiXukV 94Xa4c3uLrGQFKK3FtoFxj0tpeaKNKr4pnyW7q/1ntglvc4n4S7asarb3X4BHW3KVKFuZ4 Dn+qZZLAB584rR8G08B0eWNVHvFqIvBkthtHDJlGHVm/2WggHtW5Xx5E956SQyde3qceH1 iiC6UXQzjnUxRNtYMRgTpoGeo79seNpM97wMwrsw810BrUP7gknpxzsfu1WyRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784853666; a=rsa-sha256; cv=none; b=i2WHQzdZ93KWLruGUyMvQNDqk08CG57bQ2U4VTxUzNLBrK/EduA3cgZFAMUI7fSSA1I7a4 fCsOooDKZN1R49nfrtLlK+WJQNgnu68Uru8dcohKrFY0fXOcOwc3SQskwOW75WQh799IJF Fj4NuoMjo38DPFbxkpE6IjPaXafj4oEhausypjavnrNaxysM19VCLmYc3SDzuuBvu3p5bz EHTEHgThxGDQAhAOAmiVS726gxAI0fjdw9mSCdcHu8iRID7yvnzyAs++FUpR0ntFUOYCTR +SaLfHKRzoqUF0v8krizoRSbBtp4UVrXMKmeDrkmglz+WTlZiAKtGX39ehwfyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784853666; 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=tTIg3P1UkmvXRg/bUYNAtnJaXANh4em8QHOrCnJ4yJ8=; b=bikaN0qmAB42Ql9T24Mq3+sg2PFS4JTEC1rlyPpzUoFBWcTEfWcFodCMwZUiQHET7IvyJF snDD7+XHzrXbb02as1jjMV4jymtTJTDbUNDRNX2LOqxGWc7+xGcBQOQhiw5tQ/IPcTrNcd JROWM0gNrIVKTMqTlMJUeEMNBm1yGcpcNu8Tex/b6QkFPibC7hUgdIAu7JXMSVwZqZI5sM fhPGQi4wBZHLAYD+GcudMETPARQPS/BgeqVG0845B1qzlRrgXJr3va5JlT2QK4lqNB4mVj bMtFLlDXNntyJQmu7ZIkB9C+2IeS/ER2O0OAQd9v+SRoC23PUPveHKmvvRuuaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h5q0x6x9DzD4h for ; Fri, 24 Jul 2026 00:41:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18f86 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Jul 2026 00:41:00 +0000 To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Kyle Evans Subject: git: 9452c6943e - main - news: add the ports reset script List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-doc-all@freebsd.org Sender: owner-dev-commits-doc-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9452c6943ef868d8c00962ffe0e34c3a07fec25d Auto-Submitted: auto-generated Date: Fri, 24 Jul 2026 00:41:00 +0000 Message-Id: <6a62b49c.18f86.387df806@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/doc/commit/?id=9452c6943ef868d8c00962ffe0e34c3a07fec25d commit 9452c6943ef868d8c00962ffe0e34c3a07fec25d Author: Kyle Evans AuthorDate: 2026-07-23 16:39:51 +0000 Commit: Kyle Evans CommitDate: 2026-07-24 00:31:04 +0000 news: add the ports reset script Following the freeze of the ports tree announced on 2026-07-22, this script may be used to correct branches that contain the offending object. Note that it contains some commit hashes that need to be replaced if your local branch has changes included that alter these; instructione are included inside. The script was originally written by glebius@, with slight modifications by kevans@ and dhw@. Reviewed by: adrian, dhw, glebius, lwhsu (all previous version) Differential Revision: https://reviews.freebsd.org/D58417 --- .../en/news/2026-ports-freeze/ports-reset.sh | 112 +++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/website/content/en/news/2026-ports-freeze/ports-reset.sh b/website/content/en/news/2026-ports-freeze/ports-reset.sh new file mode 100755 index 0000000000..6708d62a7a --- /dev/null +++ b/website/content/en/news/2026-ports-freeze/ports-reset.sh @@ -0,0 +1,112 @@ +#!/bin/sh -e + +# Note that the hash of this file is recorded in a signed announcement, please +# do not touch it without due consideration. + +cleanup() { + rc=$? + + if [ -n "$tmpf" ]; then + rm -f "$tmpf" + rm -f "$tmpf.import" + fi + + exit "$rc" +} + +me=${0##*/} +tmpf=$(mktemp -t ports-reset) +trap cleanup EXIT + +# +# REPLACE AS NEEDED: +# +# bad1 and bad2 correspond to the following two commits. If your tree or branch +# has local changes mixed in, confirm and replace the commits with your +# equivalent: +# +# commit bb14266f00bb1bac62900477b93e5a7be984cd2f +# Date: Mon Jul 20 22:03:39 2026 -0000 +# +# misc/github-copilot-cli: update 1.0.71 → 1.0.72 +# +# commit f208eb093cebb71adaec5861c76c8369139289d2 +# Date: Tue Jul 21 05:00:50 2026 +# +# misc/github-copilot-cli: Remove inadvertently added file +# +bad1=bb14266f00bb1bac62900477b93e5a7be984cd2f +bad2=f208eb093cebb71adaec5861c76c8369139289d2 +dry_run= +if [ $# -gt 0 ]; then + if [ $1 = "-h" ]; then + echo "Usage: $me [-h] [-n] [bad_hash1] [bad_hash2]" + echo "$me should be invoked while the ports repository to be fixed is the current working directory" + echo "bad_hash1 and bad_hash2 must be ordered exactly as they appear in commit history, with bad_hash1 being older" + exit 0 + fi + if [ $1 = "-n" ]; then + dry_run=echo + shift + fi +fi +if [ $# -gt 0 ]; then + bad1="$1" + shift +fi +if [ $# -gt 0 ]; then + bad2="$1" + shift +fi + +filter="$bad1|$bad2" + +# We use git-fast-export to dump all of the revisions that need to be replayed. +# We dump one revision before the first bad revision to be dropped because the +# first revision in the dump is magic to git-fast-export. +# Note that any commit signatures in the commits to be rewritten will be removed +# by this operation. This makes it reproducible. +/usr/local/bin/git fast-export \ + --show-original-ids \ + --signed-tags=strip \ + --reference-excluded-parents \ + --no-data \ + --mark-tags \ + --use-done-feature \ + ${bad1}~2..HEAD \ + > "$tmpf" + +# Sanity check: did we have the commit in the first place? +if ! grep -q "original-oid $bad1" "$tmpf"; then + 1>&2 echo "This branch does not seem to contain the commit that needs to be pruned." + 1>&2 echo "Please refer to the comments in '$0' for adjustments that may need to be made." + 1>&2 echo "Bailing out without modifying the current branch." + exit 1 +fi + +/usr/bin/sed -En ' +/^from :/d +H +/^$/!{ + $!d +} +x +/original-oid ('$filter')/!{ + s/^\n// + p +}' < "$tmpf" > "$tmpf.import" + +if [ -n "$dry_run" ]; then + echo Would have issued: /usr/local/bin/git fast-import --force --date-format=raw \< "$tmpf.import" + echo "Commits dropped can be inspected in the following somewhat noisy diff:" + echo diff -u "$tmpf" "$tmpf.import" + trap - EXIT +else + /usr/local/bin/git fast-import --force --date-format=raw < "$tmpf.import" + # git-fast-import leaves the contents of the bad commits in the index. + # Clean up to avoid accidents. + git checkout HEAD . + + # This shouldn't happen, but we'd rather be safe than sorry. + echo "Please review your tree for any staged changes that may have been left behind." +fi