svn commit: r260071 - stable/10/release

Glen Barber gjb at FreeBSD.org
Mon Dec 30 02:19:24 UTC 2013


Author: gjb
Date: Mon Dec 30 02:19:23 2013
New Revision: 260071
URL: http://svnweb.freebsd.org/changeset/base/260071

Log:
  MFC r259868, r259881, 259955:
  
  r259868 (jmmv):
    Delay copying of resolv.conf into the chroot until /etc
    exists.
  
  r259881 (jmmv):
    Put the release objdir inside the chroot.
  
  259955:
    Move build_doc_ports() to the if...fi block from which it is
    called.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/release/release.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/release/release.sh
==============================================================================
--- stable/10/release/release.sh	Mon Dec 30 01:32:17 2013	(r260070)
+++ stable/10/release/release.sh	Mon Dec 30 02:19:23 2013	(r260071)
@@ -126,6 +126,7 @@ if [ "x${TARGET}" != "x" ] && [ "x${TARG
 else
 	ARCH_FLAGS=
 fi
+CHROOT_MAKEENV="MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
 CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}"
 CHROOT_IMAKEFLAGS="${CONF_FILES}"
 CHROOT_DMAKEFLAGS="${CONF_FILES}"
@@ -162,29 +163,16 @@ if [ "x${NOPORTS}" = "x" ]; then
 	svn co ${SVNROOT}/${PORTBRANCH} ${CHROOTDIR}/usr/ports
 fi
 
-cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
 cd ${CHROOTDIR}/usr/src
-make ${CHROOT_WMAKEFLAGS} buildworld
-make ${CHROOT_IMAKEFLAGS} installworld DESTDIR=${CHROOTDIR}
-make ${CHROOT_DMAKEFLAGS} distribution DESTDIR=${CHROOTDIR}
+env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld
+env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \
+	DESTDIR=${CHROOTDIR}
+env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \
+	DESTDIR=${CHROOTDIR}
 mount -t devfs devfs ${CHROOTDIR}/dev
+cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
 trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit
 
-build_doc_ports() {
-	# Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints
-	# is created.  This is needed by ports-mgmt/pkg.
-	chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart
-
-	## 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} BATCH=yes"
-		PBUILD_FLAGS="${PBUILD_FLAGS}"
-		chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \
-			${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean
-	fi
-}
-
 # If MAKE_CONF and/or SRC_CONF are set and not character devices (/dev/null),
 # copy them to the chroot.
 if [ -e ${MAKE_CONF} ] && [ ! -c ${MAKE_CONF} ]; then
@@ -197,7 +185,18 @@ if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CO
 fi
 
 if [ -d ${CHROOTDIR}/usr/ports ]; then
-	build_doc_ports ${CHROOTDIR}
+	# Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints
+	# is created.  This is needed by ports-mgmt/pkg.
+	chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart
+
+	## 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} BATCH=yes"
+		PBUILD_FLAGS="${PBUILD_FLAGS}"
+		chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \
+			${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean
+	fi
 fi
 
 if [ "x${RELSTRING}" = "x" ]; then


More information about the svn-src-stable-10 mailing list