Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jul 2013 13:57:13 +0400
From:      Anes Mukhametov <anes@anes.su>
To:        FreeBSD-gnats-submit@freebsd.org, freebsd-bugs@freebsd.org
Subject:   Re: conf/180192: [PATCH] release/release.sh bugfixes+small improvements
Message-ID:  <CAAPnBu-zEpqr5r%2BsyRYkUp4Tm4qfr-57_wcuhMJ0EvqAZ0m=pA@mail.gmail.com>
In-Reply-To: <201307020920.r629K01o075707@freefall.freebsd.org>
References:  <201307020907.r6297p4S043117@monitoring.rambler.ru> <201307020920.r629K01o075707@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Here is the latest patch with WITHOUT_SVN=yes added to docproj. We don't
need to checkout docs again.

On Tue, Jul 2, 2013 at 1:20 PM, <FreeBSD-gnats-submit@freebsd.org> wrote:

> Thank you very much for your problem report.
> It has the internal identification `conf/180192'.
> The individual assigned to look at your
> report is: freebsd-bugs.
>
> You can access the state of your problem report at any time
> via this link:
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=180192
>
> >Category:       conf
> >Responsible:    freebsd-bugs
> >Synopsis:       [PATCH] release/release.sh bugfixes+small improvements
> >Arrival-Date:   Tue Jul 02 09:20:00 UTC 2013
>

[-- Attachment #2 --]
Index: release.conf.sample
===================================================================
--- base/head/release/release.conf.sample.orig	(revision 252465)
+++ base/head/release/release.conf.sample	(working copy)
@@ -14,6 +14,9 @@
 DOCBRANCH="doc/head"
 PORTBRANCH="ports/head"
 
+## Run svn co --force for src checkout.
+#SRC_FORCE_CHECKOUT=yes
+
 ## Set the src/, ports/, and doc/ revisions.
 SRCREVISION="-rHEAD"
 DOCREVISION="-rHEAD"
@@ -23,6 +26,8 @@
 #TARGET="amd64"
 #TARGET_ARCH="amd64"
 #KERNEL="GENERIC"
+##Multiple kernels may be set
+#KERNEL="GENERIC XENHVM"
 
 ## Set to specify a custom make.conf and/or src.conf
 #MAKE_CONF="/etc/local/make.conf"
Index: release.sh
===================================================================
--- base/head/release/release.sh.orig	(revision 252465)
+++ base/head/release/release.sh	(working copy)
@@ -45,6 +45,10 @@
 DOCBRANCH="doc/head"
 PORTBRANCH="ports/head"
 
+# Sometimes one needs to checkout src with --force svn option.
+# If custom kernel configs copied to src tree before checkout, e.g.
+SRC_FORCE_CHECKOUT=
+
 # The default src/, doc/, and ports/ revisions.
 SRCREVISION="-rHEAD"
 DOCREVISION="-rHEAD"
@@ -109,6 +113,25 @@
 done
 shift $(($OPTIND - 1))
 
+# If PORTS is set and NODOC is unset, force NODOC=yes because the ports tree
+# is required to build the documentation set.
+if [ "x${NOPORTS}" != "x" ] && [ "x${NODOC}" = "x" ]; then
+	echo "*** NOTICE: Setting NODOC=1 since ports tree is required"
+	echo "            and NOPORTS is set."
+	NODOC=yes
+fi
+
+# If NOPORTS and/or NODOC are unset, they must not pass to make as variables.
+# The release makefile verifies definedness of NOPORTS/NODOC variables
+# instead of their values.
+DOCPORTS=
+if [ "x${NOPORTS}" != "x" ]; then
+ DOCPORTS="NOPORTS=yes "
+fi
+if [ "x${NODOC}" != "x" ]; then
+ DOCPORTS="${DOCPORTS}NODOC=yes"
+fi
+
 # The aggregated build-time flags based upon variables defined within
 # this file, unless overridden by release.conf.  In most cases, these
 # will not need to be changed.
@@ -118,16 +141,14 @@
 CHROOT_IMAKEFLAGS="${CONF_FILES}"
 CHROOT_DMAKEFLAGS="${CONF_FILES}"
 RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}"
-RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=${KERNEL} ${ARCH_FLAGS} ${CONF_FILES}"
-RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=${KERNEL} ${CONF_FILES} \
-	NODOC=${NODOC} NOPORTS=${NOPORTS}"
+RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}"
+RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \
+	${DOCPORTS}"
 
-# If PORTS is set and NODOC is unset, force NODOC=yes because the ports tree
-# is required to build the documentation set.
-if [ "x${NOPORTS}" != "x" ] && [ "x${NODOC}" = "x" ]; then
-	echo "*** NOTICE: Setting NODOC=1 since ports tree is required"
-	echo "            and NOPORTS is set."
-	NODOC=1
+# Force src checkout if configured
+FORCE_SRC_KEY=
+if [ "x${SRC_FORCE_CHECKOUT}" != "x" ]; then
+ FORCE_SRC_KEY="--force"
 fi
 
 if [ ! ${CHROOTDIR} ]; then
@@ -144,7 +165,7 @@
 
 mkdir -p ${CHROOTDIR}/usr
 
-svn co ${SVNROOT}/${SRCBRANCH} ${CHROOTDIR}/usr/src $SRCREVISION
+svn co ${FORCE_SRC_KEY} ${SVNROOT}/${SRCBRANCH} ${CHROOTDIR}/usr/src $SRCREVISION
 if [ "x${NODOC}" = "x" ]; then
 	svn co ${SVNROOT}/${DOCBRANCH} ${CHROOTDIR}/usr/doc $DOCREVISION
 fi
@@ -164,10 +185,12 @@
 build_doc_ports() {
 	## Trick the ports 'run-autotools-fixup' target to do the right thing.
 	_OSVERSION=$(sysctl -n kern.osreldate)
-	if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" != "x" ]; then
-		PBUILD_FLAGS="OSVERSION=${_OSVERSION} WITHOUT_JADETEX=yes BATCH=yes"
+	if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then
+		PBUILD_FLAGS="OSVERSION=${_OSVERSION} WITHOUT_JADETEX=yes WITHOUT_SVN=yes WITHOUT_X11=yes WITHOUT_PYTHON=yes BATCH=yes"
 		chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \
-			${PBUILD_FLAGS} install
+			${PBUILD_FLAGS} install clean distclean
+		#w3m needed to build docs
+		chroot ${CHROOTDIR} make -C /usr/ports/www/w3m ${PBUILD_FLAGS} install clean distclean
 	fi
 }
 
@@ -192,10 +215,10 @@
 fi
 
 chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld
-chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel
-chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
+eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel
+eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
 	release RELSTRING=${RELSTRING}
-chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
+eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
 	install DESTDIR=/R RELSTRING=${RELSTRING}
 
 cd ${CHROOTDIR}/R

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAPnBu-zEpqr5r%2BsyRYkUp4Tm4qfr-57_wcuhMJ0EvqAZ0m=pA>