How to Merge Patches from NetBSD Trunk======================================Using the NetBSD CVS is a pain, so instead, the preferred thing to do isto use `the official Git mirror <https://github.com/NetBSD/src>`__. Thecode here is in the tree at a few places:\ ``inet`` is at``lib/libc/inet``, irs is scattered across the tree, and ``resolv`` isat ``lib/libc/resolv``.The preferable way to merge is to take the last commit merged from IIJβsmirror (can be found in the merging commit in Haiku, if the merger hasdone their work properly) and check all commits since then to see ifthey apply or not (some apply to documentation we donβt have, etc.)Cherry-pick the ones that do, and download them as git-format-patchpatches (by adding ``.patch`` onto the end of the commit URL).To convert the patches to have the correct paths to the resolv/inet/etc.code, use ``sed``:::sed s%lib/libc/resolv%src/kits/network/netresolv/resolv%g -i *.patch(Youβll need to use similar commands for the ``inet`` and ``irs`` code.)Then apply the patches using ``git apply --reject file.patch``. Git willspew a lot of errors about files in the patch that arenβt in the tree,and then it will warn that some hunks are being rejected. Review therejected hunks **VERY CAREFULLY**, as some code in Haikuβs NetResolv isnot in NetBSDβs and vice versa, and so some patches may not applycleanly because of that. You might have to resort to merging those hunksby hand, if they apply at all to Haikuβs code.Commit the changes all at once, but list all the commits merged fromNetBSD in the commit message (see previous merges for the style tofollow).