From owner-dev-commits-src-all@freebsd.org Sun Aug 1 17:33:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1810663768; Sun, 1 Aug 2021 17:33:57 +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 4Gd7Xj3Nr9z4t1k; Sun, 1 Aug 2021 17:33:57 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 4DF24108B8; Sun, 1 Aug 2021 17:33:57 +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 171HXvsg050866; Sun, 1 Aug 2021 17:33:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 171HXvMe050865; Sun, 1 Aug 2021 17:33:57 GMT (envelope-from git) Date: Sun, 1 Aug 2021 17:33:57 GMT Message-Id: <202108011733.171HXvMe050865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: fd2a4a31d9df - main - awk: document updating MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fd2a4a31d9df9beb793c892af72aeb1c1bf5dd42 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2021 17:33:58 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fd2a4a31d9df9beb793c892af72aeb1c1bf5dd42 commit fd2a4a31d9df9beb793c892af72aeb1c1bf5dd42 Author: Warner Losh AuthorDate: 2021-08-01 17:31:50 +0000 Commit: Warner Losh CommitDate: 2021-08-01 17:31:50 +0000 awk: document updating Fill in all the details to the standard process so they are hand in one place and don't need to be re-remembered or rediscovered for the next import. Sponsored by: Netflix --- contrib/one-true-awk/FREEBSD-upgrade | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/contrib/one-true-awk/FREEBSD-upgrade b/contrib/one-true-awk/FREEBSD-upgrade new file mode 100644 index 000000000000..9fdce55e4223 --- /dev/null +++ b/contrib/one-true-awk/FREEBSD-upgrade @@ -0,0 +1,58 @@ +Notes on upgrading awk from upstream + +FreeBSD imports awk from the one true awk github project. This is the blessed +successor to Brian Kernighan's efforts to maintain awk after he left Lucent. + +git@github.com:onetrueawk/awk.git + +We also track the bsd-features branch. This is a branch that takes the +traditional one true awk and adds features that the BSD projects have added over +the years that are useful, but not too over the top (like bit functions). + +The typical update cycle goes something like: + +(1) Create a work tree for the vendor/one-true-awk branch + % cd freebsd-main + % git worktree create ../ota vendor/one-true-awk +(2) Update the onetrueawk github + % cd ../awk + % git pull --rebase + % git branch --show-current + bsd-features + % git show-ref HEAD + f9affa922c5e074990a999d486d4bc823590fd93 refs/remotes/origin/HEAD +(3) Copy that to the vendor branch and push upstream + % rm -rf ../ota/* # trailing /* is important + % cp -a * ../ota + % cd ../ota + % git add * + % git commit -m"Import awk YYYYMMDD hash f9affa922c5e" # 12 places + % git commit --amend + + % diff -ur ../awk . + # Sanity check to make sure it looks good. The vendor branch should + # contain the unaltered sources from upstream since it's active + # again (for a while we were importing submitted patches to the + # vendor branch given the long lag with the old upstream, but no more) + % git tag -a -s vendor/one-true-awk/f9affa92 # 8 places + + % git push --follow-tags freebsd vendor/one-true-awk +(4) Merge this into main + % git subtree merge -P contrib/one-true-awk vendor/one-true-awk + # resolve any conflicts and commit + # Be sure to use the same or similar commit message as you did for + # the import. If you import multiple versions before merging to head + # you may need to combine the messages. Also, if there's more than + # a screen of changes, you may want to abstract them down into an + # easy to digest summary. + % cd usr.bin/awk + % sudo make check + # make sure all the tests pass + % cd ../.. + # awk is a build tool, so test the builds + % make buildworld / buildkernel for amd64, armv7, i386 and aarch64 (or + make universe/tinderbox if there's a lot of changes). + % git push freebsd +(5) Oops, lost the race to push while testing, the following will rebase things + % git fetch freebsd + % git rebase --rebase-merges -i freebsd/main