git: 041b28524a3c - main - release: Add workaround to use SVN for ports

Glen Barber gjb at FreeBSD.org
Tue Jan 19 18:38:51 UTC 2021


The branch main has been updated by gjb:

URL: https://cgit.FreeBSD.org/src/commit/?id=041b28524a3c69ff6e893067df156c3faabcac9a

commit 041b28524a3c69ff6e893067df156c3faabcac9a
Author:     Glen Barber <gjb at FreeBSD.org>
AuthorDate: 2021-01-19 18:38:33 +0000
Commit:     Glen Barber <gjb at FreeBSD.org>
CommitDate: 2021-01-19 18:38:33 +0000

    release: Add workaround to use SVN for ports
    
    The ports tree is scheduled to be converted from Subversion to Git
    after the currently-scheduled 13.0-RELEASE, so the source of truth
    will be Subversion for the ports tree.
    
    Implement a hack specifically for this case.
    
    Sponsored by:   Rubicon Communications, LLC (netgate.com)
---
 release/release.sh | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/release/release.sh b/release/release.sh
index 0975bdfed6b3..15c94ca9328e 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -65,6 +65,17 @@ env_setup() {
 		[ ! -z "${VCSCMD}" ] && break 2
 	done
 
+	# Find the Subversion binary to use.  This is a workaround to use
+	# the source of truth for the ports tree, as the conversion to Git
+	# is targeted to occur slightly after the currently-scheduled 13.0
+	# release.
+	for _dir in /usr/bin /usr/local/bin; do
+		for _svn in svn svnlite; do
+			[ -x "${_dir}/${_svn}" ] && SVNCMD="${_dir}/${_svn}"
+			[ ! -z "${SVNCMD}" ] && break 2
+		done
+	done
+
 	if [ -z "${VCSCMD}" -a -z "${NOGIT}" ]; then
 		echo "*** The devel/git port/package is required."
 		exit 1
@@ -76,7 +87,7 @@ env_setup() {
 	GITROOT="https://git.FreeBSD.org/"
 	SRCBRANCH="main"
 	DOCBRANCH="main"
-	PORTBRANCH="main"
+	PORTBRANCH="head"
 	GITSRC="src.git"
 	GITPORTS="ports.git"
 	GITDOC="doc.git"
@@ -136,7 +147,7 @@ env_check() {
 	SRC="${GITROOT}${GITSRC}"
 	DOC="${GITROOT}${GITDOC}"
 	#PORT="${GITROOT}${GITPORTS}"
-	PORT="https://cgit-beta.freebsd.org/ports.git"
+	PORT="svn://svn.freebsd.org/ports/${PORTBRANCH}"
 
 	if [ -n "${EMBEDDEDBUILD}" ]; then
 		WITH_DVD=
@@ -238,7 +249,10 @@ chroot_setup() {
 		if [ -d "${CHROOTDIR}/usr/ports/.git" ]; then
 			git -C ${CHROOTDIR}/usr/ports pull -q
 		else
-			${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports
+			#${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports
+			# XXX: Workaround for the overlap in the Git
+			# conversion timeframe.
+			${SVNCMD} co ${PORT}/${PORTBRANCH} ${CHROOTDIR}/usr/ports
 		fi
 	fi
 


More information about the dev-commits-src-all mailing list