From owner-dev-commits-src-all@freebsd.org Sun Feb 14 21:44:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 24BCA53DE87; Sun, 14 Feb 2021 21:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Df12v30fFz4ctH; Sun, 14 Feb 2021 21:44:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 495E911CF5; Sun, 14 Feb 2021 21:44:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 11ELi6LQ076607; Sun, 14 Feb 2021 21:44:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ELi6LO076606; Sun, 14 Feb 2021 21:44:06 GMT (envelope-from git) Date: Sun, 14 Feb 2021 21:44:06 GMT Message-Id: <202102142144.11ELi6LO076606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 74c59ab790db - main - openssh: port upgrade doc and script to git MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74c59ab790db0062b768bb9742e4d1ad036501ad Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Feb 2021 21:44:09 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=74c59ab790db0062b768bb9742e4d1ad036501ad commit 74c59ab790db0062b768bb9742e4d1ad036501ad Author: Ed Maste AuthorDate: 2021-02-10 00:50:32 +0000 Commit: Ed Maste CommitDate: 2021-02-14 21:41:11 +0000 openssh: port upgrade doc and script to git Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28564 --- crypto/openssh/FREEBSD-upgrade | 37 +++++++++++++++++++++---------------- crypto/openssh/freebsd-pre-merge.sh | 3 +-- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/crypto/openssh/FREEBSD-upgrade b/crypto/openssh/FREEBSD-upgrade index 27e738bee2d4..0a62d6fa1e2c 100644 --- a/crypto/openssh/FREEBSD-upgrade +++ b/crypto/openssh/FREEBSD-upgrade @@ -1,6 +1,11 @@ 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 pretty fast once you're done with this checklist. @@ -15,40 +20,38 @@ $ 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 - $ rsync --archive --delete openssh-X.YpZ/ dist/ + $ cd src/freebsd/main + $ 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: - $ svn rm $(svn stat dist | awk '$1 == "!" { print $2 }') - $ svn add --no-auto-props $(svn stat dist | awk '$1 == "?" { print $2 }') + $ git add -A 06) Commit: - $ svn commit -m "Vendor import of OpenSSH X.YpZ." dist + $ git commit -m "Vendor import of OpenSSH X.YpZ" 07) Tag: - $ svn copy -m "Tag OpenSSH X.YpZ." \ - svn+ssh://repo.freebsd.org/base/vendor-crypto/openssh/dist \ - svn+ssh://repo.freebsd.org/base/vendor-crypto/openssh/X.YpZ + $ git tag -a -m "Tag OpenSSH X.YpZ" vendor/openssh/X.YpZ 08) Check out head and run the pre-merge script, which strips our RCS tags from files that have them: - $ svn co svn+ssh://repo.freebsd.org/base/head - $ cd head/crypto/openssh + $ cd src/freebsd/main/crypto/openssh $ sh freebsd-pre-merge.sh 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, 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). 0A) Resolve conflicts. Remember to bump the version addendum in @@ -57,8 +60,7 @@ 0B) Diff against the vendor branch: - $ svn diff --no-diff-deleted --no-diff-added \ - --ignore-properties \^/vendor-crypto/openssh/X.YpZ . + $ git diff --diff-filter=M vendor/openssh/X.YpZ HEAD:crypto/openssh Files that have modifications relative to the vendor code, and only those files, must have the svn:keywords property set to @@ -70,6 +72,9 @@ $ 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: $ sh freebsd-configure.sh @@ -77,7 +82,7 @@ 0E) Review changes to config.h very carefully. 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 makefiles to reflect changes in the vendor's Makefile.in. diff --git a/crypto/openssh/freebsd-pre-merge.sh b/crypto/openssh/freebsd-pre-merge.sh index 473474c2c4da..f98e71822a0c 100755 --- a/crypto/openssh/freebsd-pre-merge.sh +++ b/crypto/openssh/freebsd-pre-merge.sh @@ -5,9 +5,8 @@ :>keywords :>rcsid -svn list -R | grep -v '/$' | \ +git ls-files | \ while read f ; do - svn proplist -v $f | grep -q 'FreeBSD=%H' || continue egrep -l '^(#|\.\\"|/\*)[[:space:]]+\$FreeBSD[:\$]' $f >>keywords egrep -l '__RCSID\("\$FreeBSD[:\$]' $f >>rcsid done