Skip to content

Merging from FreeBSD

John Baldwin edited this page Nov 11, 2025 · 2 revisions
  1. When you don't have the upstream commits locally:
  • git fetch freebsd
  1. Find merge point
  • git log --first-parent --format=fuller

/CommitDate: Fri Aug 5

  • Check e-mails to verify no fixups needed
  1. Tag the merge point
  • git tag -m "FreeBSD main 5 August 2022" freebsd-main-20220805 4f158a444ee7365454cc3ea1547b1b5c323dae55
  1. Create a branch for the merge
  • git checkout -b merge-freebsd-20220805 dev
  1. Do the merge
  • mergify start freebsd-main-20220805
  1. Push merge branch and create a PR to trigger CI
  • git push --set-upstream origin merge-freebsd-20220805
  • gh pr create --base dev --title "Merge FreeBSD 2022-08-05" --body "PR for CI"
  1. Once CI passes, commit to .last_merge updating tag
  • echo "freebsd-main-20220805" > .last_merge
  • git commit -m "Merged through August 5, 2022" .last_merge
  1. Merge new tag to freebsd-main
  • cd /path/to/freebsd-main/worktree
  • git merge freebsd-main-20220805
  1. Push freebsd-main and new tag
  • git push origin freebsd-main-20220805 freebsd-main
  1. Push merge branch to dev
  • git push origin HEAD:dev
  1. Delete merge branch
  • git push origin :merge-freebsd-20220805
  • git checkout dev
  • git pull
  • git branch -d merge-freebsd-20220805

Updating LLVM subrepos:

  • git subrepo pull contrib/subrepo-cheri-compiler-rt
  • git subrepo pull contrib/subrepo-cheri-libcxxrt
  • git subrepo pull contrib/subrepo-cheri-libunwind
    • update LIBUNWIND_VERSION
  • git subrepo pull contrib/subrepo-cheri-libc++
    • also update cheri-libc++/Makefile by comparing against upstream libc++/Makefile from the same major LLVM version

If there is a ZFS change, mirror it to subrepo-openzfs:

  • git show --diff-merges=1 | patch -p4 -d sys/contrib/subrepo-openzfs/

If there is a ZFS import, follow notes in Merging-from-OpenZFS to update CTRSD-CHERI/zfs.git and import it via subrepo

Clone this wiki locally