openssh: port upgrade doc and script to git

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D28564
This commit is contained in:
Ed Maste 2021-02-09 19:50:32 -05:00
parent 5d8c062fe3
commit 74c59ab790
2 changed files with 22 additions and 18 deletions

View File

@ -1,6 +1,11 @@
FreeBSD maintainer's guide to OpenSSH-portable FreeBSD maintainer's guide to OpenSSH-portable
============================================== ==============================================
These instructions assume you have a clone of the FreeBSD git repo
main branch in src/freebsd/main, and will store vendor trees under
src/freebsd/vendor/. In addition, this assumes there is a "freebsd"
origin pointing to git(repo).freebsd.org/src.git.
00) Make sure your mail spool has plenty of free space. It'll fill up 00) Make sure your mail spool has plenty of free space. It'll fill up
pretty fast once you're done with this checklist. pretty fast once you're done with this checklist.
@ -15,40 +20,38 @@
$ tar xf openssh-X.YpZ.tar.gz $ tar xf openssh-X.YpZ.tar.gz
04) Copy to the vendor directory: 04) Copy to a vendor branch:
$ svn co svn+ssh://repo.freebsd.org/base/vendor-crypto/openssh/dist $ cd src/freebsd/main
$ rsync --archive --delete openssh-X.YpZ/ dist/ $ git worktree add ../vendor/openssh freebsd/vendor/openssh
$ cd ../vendor/openssh
$ rsync --archive --delete --exclude=.git /path/to/openssh-X.YpZ/ ./
05) Take care of added / deleted files: 05) Take care of added / deleted files:
$ svn rm $(svn stat dist | awk '$1 == "!" { print $2 }') $ git add -A
$ svn add --no-auto-props $(svn stat dist | awk '$1 == "?" { print $2 }')
06) Commit: 06) Commit:
$ svn commit -m "Vendor import of OpenSSH X.YpZ." dist $ git commit -m "Vendor import of OpenSSH X.YpZ"
07) Tag: 07) Tag:
$ svn copy -m "Tag OpenSSH X.YpZ." \ $ git tag -a -m "Tag OpenSSH X.YpZ" vendor/openssh/X.YpZ
svn+ssh://repo.freebsd.org/base/vendor-crypto/openssh/dist \
svn+ssh://repo.freebsd.org/base/vendor-crypto/openssh/X.YpZ
08) Check out head and run the pre-merge script, which strips our RCS 08) Check out head and run the pre-merge script, which strips our RCS
tags from files that have them: tags from files that have them:
$ svn co svn+ssh://repo.freebsd.org/base/head $ cd src/freebsd/main/crypto/openssh
$ cd head/crypto/openssh
$ sh freebsd-pre-merge.sh $ sh freebsd-pre-merge.sh
09) Merge from the vendor branch: 09) Merge from the vendor branch:
$ svn merge -cNNNNNN \^/vendor-crypto/openssh/dist . $ git subtree merge -P crypto/openssh vendor/openssh
A number of files have been deleted from FreeBSD's copy of ssh, A number of files have been deleted from FreeBSD's copy of ssh,
including rendered man pages (which have a .0 extension). When including rendered man pages (which have a .0 extension). When
svn prompts for these deleted files during the merge, choose 'r' git prompts for these deleted files during the merge, choose 'd'
(leaving them deleted). (leaving them deleted).
0A) Resolve conflicts. Remember to bump the version addendum in 0A) Resolve conflicts. Remember to bump the version addendum in
@ -57,8 +60,7 @@
0B) Diff against the vendor branch: 0B) Diff against the vendor branch:
$ svn diff --no-diff-deleted --no-diff-added \ $ git diff --diff-filter=M vendor/openssh/X.YpZ HEAD:crypto/openssh
--ignore-properties \^/vendor-crypto/openssh/X.YpZ .
Files that have modifications relative to the vendor code, and Files that have modifications relative to the vendor code, and
only those files, must have the svn:keywords property set to only those files, must have the svn:keywords property set to
@ -70,6 +72,9 @@
$ sh freebsd-post-merge.sh $ sh freebsd-post-merge.sh
These tags are not used with git, but we will leave them in place as
long as svn-based FreeBSD 11.x and 12.x are supported.
0D) Run the configure script: 0D) Run the configure script:
$ sh freebsd-configure.sh $ sh freebsd-configure.sh
@ -77,7 +82,7 @@
0E) Review changes to config.h very carefully. 0E) Review changes to config.h very carefully.
Note that libwrap should not be defined in config.h; as of Note that libwrap should not be defined in config.h; as of
r311585 it is conditional on MK_TCP_WRAPPERS. r311585 (233932cc2a60) it is conditional on MK_TCP_WRAPPERS.
0F) If source files have been added or removed, update the appropriate 0F) If source files have been added or removed, update the appropriate
makefiles to reflect changes in the vendor's Makefile.in. makefiles to reflect changes in the vendor's Makefile.in.

View File

@ -5,9 +5,8 @@
:>keywords :>keywords
:>rcsid :>rcsid
svn list -R | grep -v '/$' | \ git ls-files | \
while read f ; do while read f ; do
svn proplist -v $f | grep -q 'FreeBSD=%H' || continue
egrep -l '^(#|\.\\"|/\*)[[:space:]]+\$FreeBSD[:\$]' $f >>keywords egrep -l '^(#|\.\\"|/\*)[[:space:]]+\$FreeBSD[:\$]' $f >>keywords
egrep -l '__RCSID\("\$FreeBSD[:\$]' $f >>rcsid egrep -l '__RCSID\("\$FreeBSD[:\$]' $f >>rcsid
done done