Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2012 19:40:25 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org
Subject:   svn commit: r242186 - releng/9.1/release
Message-ID:  <201210271940.q9RJePqc044417@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Sat Oct 27 19:40:25 2012
New Revision: 242186
URL: http://svn.freebsd.org/changeset/base/242186

Log:
  MFC of 240586 and 240587 to unbreak release building:
  
  Update generate-release.sh script:
  
   - Use svn for ports and doc trees
   - When installing a binary textproc/docproj package,
     switch pkg_add(1) to pkg(8) [1]
  
  Approved by:	re (implicitly)

Modified:
  releng/9.1/release/generate-release.sh
Directory Properties:
  releng/9.1/release/   (props changed)

Modified: releng/9.1/release/generate-release.sh
==============================================================================
--- releng/9.1/release/generate-release.sh	Sat Oct 27 19:37:26 2012	(r242185)
+++ releng/9.1/release/generate-release.sh	Sat Oct 27 19:40:25 2012	(r242186)
@@ -3,14 +3,10 @@
 # generate-release.sh: check out source trees, and build release components with
 #  totally clean, fresh trees.
 #
-#  Usage: generate-release.sh svn-branch scratch-dir
+#  Usage: generate-release.sh [-r revision] [-d docrevision] \
+#	[-p portsrevision] svn-branch scratch-dir
 #
 # Environment variables:
-#  CVSUP_HOST: Host of a cvsup server to obtain the ports and documentation
-#   trees. This or CVSROOT must be set to include ports and documentation.
-#  CVSROOT:    CVS root to obtain the ports and documentation trees. This or
-#   CVSUP_HOST must be set to include ports and documentation.
-#  CVS_TAG:    CVS tag for ports and documentation (HEAD by default)
 #  SVNROOT:    SVN URL to FreeBSD source repository (by default, 
 #   svn://svn.freebsd.org/base)
 #  MAKE_FLAGS: optional flags to pass to make (e.g. -j)
@@ -20,26 +16,42 @@
 # $FreeBSD$
 #
 
-mkdir -p $2/usr/src
+usage()
+{
+	echo "Usage: $0 [-r revision] [-d docrevision] [-p portsrevision] svn-branch scratch-dir"
+	exit 1
+}
+
+REVISION=
+DOCREVISION=
+PORTSREVISION=
+while getopts d:r:p: opt; do
+	case $opt in
+	d)
+		DOCREVISION="-r $OPTARG"
+		;;
+	r)
+		REVISION="-r $OPTARG"
+		;;
+	p)
+		PORTSREVISION="-r $OPTARG"
+		;;
+	\?)
+		usage
+		;;
+	esac
+done
+shift $(($OPTIND - 1))
+
+if [ $# -lt 2 ]; then
+	usage
+fi
+
 set -e # Everything must succeed
 
 svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src
-if [ ! -z $CVSUP_HOST ]; then
-	cat > $2/docports-supfile << EOF
-	*default host=$CVSUP_HOST
-	*default base=/var/db
-	*default prefix=/usr
-	*default release=cvs tag=${CVS_TAG:-.}
-	*default delete use-rel-suffix
-	*default compress
-	ports-all
-	doc-all
-EOF
-elif [ ! -z $CVSROOT ]; then
-	cd $2/usr
-	cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} ports
-	cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} doc
-fi
+svn co ${SVNROOT:-svn://svn.freebsd.org/doc}/head $2/usr/doc $DOCREVISION
+svn co ${SVNROOT:-svn://svn.freebsd.org/ports}/head $2/usr/ports $PORTSREVISION
 
 cd $2/usr/src
 make $MAKE_FLAGS buildworld
@@ -47,18 +59,11 @@ make installworld distribution DESTDIR=$
 mount -t devfs devfs $2/dev
 trap "umount $2/dev" EXIT # Clean up devfs mount on exit
 
-if [ ! -z $CVSUP_HOST ]; then 
-	cp /etc/resolv.conf $2/etc/resolv.conf
-
-	# Checkout ports and doc trees
-	chroot $2 /usr/bin/csup /docports-supfile
-fi
-
 if [ -d $2/usr/doc ]; then 
 	cp /etc/resolv.conf $2/etc/resolv.conf
 
-	# Build ports to build release documentation
-	chroot $2 /bin/sh -c 'pkg_add -r docproj || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)'
+	# Install docproj to build release documentation
+	chroot $2 /bin/sh -c '(export ASSUME_ALWAYS_YES=1 && /usr/sbin/pkg install -y docproj) || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)'
 fi
 
 chroot $2 make -C /usr/src $MAKE_FLAGS buildworld buildkernel



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210271940.q9RJePqc044417>