1 Notes on upgrading awk from upstream
3 FreeBSD imports awk from the one true awk github project. This is the blessed
4 successor to Brian Kernighan's efforts to maintain awk after he left Lucent.
6 git@github.com:onetrueawk/awk.git
8 We also track the bsd-features branch. This is a branch that takes the
9 traditional one true awk and adds features that the BSD projects have added over
10 the years that are useful, but not too over the top (like bit functions).
12 The typical update cycle goes something like:
14 (1) Create a work tree for the vendor/one-true-awk branch
16 % git worktree create ../ota vendor/one-true-awk
17 (2) Update the onetrueawk github
20 % git branch --show-current
23 f9affa922c5e074990a999d486d4bc823590fd93 refs/remotes/origin/HEAD
24 (3) Copy that to the vendor branch and push upstream
25 % rm -rf ../ota/* # trailing /* is important
29 % git commit -m"Import awk YYYYMMDD hash f9affa922c5e" # 12 places
31 <insert the relevant bits from the FIXES file>
33 # Sanity check to make sure it looks good. The vendor branch should
34 # contain the unaltered sources from upstream since it's active
35 # again (for a while we were importing submitted patches to the
36 # vendor branch given the long lag with the old upstream, but no more)
37 % git tag -a -s vendor/one-true-awk/f9affa92 # 8 places
39 % git push --follow-tags freebsd vendor/one-true-awk
40 (4) Merge this into main
41 % git subtree merge -P contrib/one-true-awk vendor/one-true-awk
42 # resolve any conflicts and commit
43 # Be sure to use the same or similar commit message as you did for
44 # the import. If you import multiple versions before merging to head
45 # you may need to combine the messages. Also, if there's more than
46 # a screen of changes, you may want to abstract them down into an
47 # easy to digest summary.
50 # make sure all the tests pass
52 # awk is a build tool, so test the builds
53 % make buildworld / buildkernel for amd64, armv7, i386 and aarch64 (or
54 make universe/tinderbox if there's a lot of changes).
56 (5) Oops, lost the race to push while testing, the following will rebase things
58 % git rebase --rebase-merges -i freebsd/main