UNBOUND-UPDATE(7) | Miscellaneous Information Manual (sparc64) | UNBOUND-UPDATE(7) |
unbound-update
—
how to update the base
unbound(8) using
git from the
upstream git
repository
git pull git format-patch -o ~/unbound-1.13.0/ release-1.12.0..release-1.13.0 cd /usr/src git am --directory=usr.sbin/unbound/ -p0 \ --exclude \*/tpkg/\* \ --exclude=usr.sbin/unbound/util/configlexer.{c,h} \ --exclude=usr.sbin/unbound/util/configparser.{c,h} \ --exclude=\*/contrib\/* \ --exclude=\*/testdata\/* \ --exclude=\*/compat\/* \ --exclude=\*/pythonmod\/* \ ~/unbound-1.13.0/*.patch autoheader-2.69 autoconf-2.69
unbound(8) is developed in an git repository. OpenBSD is developed in cvs and does not track the whole unbound(8) tree. For example contrib/ and testcode/ were not imported. Some developers prefer to work with git. This describes how to more or less automatically get upstream commits imported to a git conversion of the OpenBSD tree. It kinda assumes a local up to date clone of unbound(8) and git conversion of the OpenBSD cvs tree are already available. All commits from the last import to the latest release are exported using upstream tags. Here OpenBSD was at version 1.12.0 and the latest release was 1.13.0.
git format-patch -o ~/unbound-1.13.0/ release-1.12.0..release-1.13.0
git am --directory=usr.sbin/unbound/ -p0 \ --exclude \*/tpkg/\* \ --exclude=usr.sbin/unbound/util/configlexer.{c,h} \ --exclude=usr.sbin/unbound/util/configparser.{c,h} \ --exclude=\*/contrib\/* \ --exclude=\*/testdata\/* \ --exclude=\*/compat\/* \ --exclude=\*/pythonmod\/* \ ~/unbound-1.13.0/*.patch
autoheader-2.69 autoconf-2.69
make -f Makefile.bsd-wrapper obj make -f Makefile.bsd-wrapper doas make -f Makefile.bsd-wrapper install
git diff --relative origin/master..HEAD > ~/unbound-1.13.0.diff
If there is a merge conflict and git
am
stops it is possible to save the work upto the
failing patch:
cid=`git show --pretty=format:"%H" --no-patch` git am --abort git merge --ff-only ${cid} # rm ~/unbound-1.13.0/SUCCESSULLY_APPLIED_PATCHES
git
am
is then re-run and the
merge conflict resolved. It is helpful to do it this way if there are multiple
merge conflicts and one needs to call git
am
--abort
to get back to a
sensible git tree. If we had not saved our work we would need to fix previous
merge conflicts again.
December 7, 2020 | tlakh 2.3 |