diff options
author | gjb <gjb@FreeBSD.org> | 2013-12-30 02:19:23 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2013-12-30 02:19:23 +0000 |
commit | 890135ba9f0c849625a36e678b4c38e5fe2eeece (patch) | |
tree | a314378d4c7a29f147018bd05704165027c14ca5 /release/release.sh | |
parent | 908cb17891aa83b8eea1a8b01d59548b58a36b44 (diff) | |
download | FreeBSD-src-890135ba9f0c849625a36e678b4c38e5fe2eeece.zip FreeBSD-src-890135ba9f0c849625a36e678b4c38e5fe2eeece.tar.gz |
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
Diffstat (limited to 'release/release.sh')
-rwxr-xr-x | release/release.sh | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/release/release.sh b/release/release.sh index 1389ce3..79419c4 100755 --- a/release/release.sh +++ b/release/release.sh @@ -126,6 +126,7 @@ if [ "x${TARGET}" != "x" ] && [ "x${TARGET_ARCH}" != "x" ]; then 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_CONF} ]; then 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 |