diff options
author | gjb <gjb@FreeBSD.org> | 2015-05-06 15:05:38 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2015-05-06 15:05:38 +0000 |
commit | 5691b8528437da3d4280310f3fb9a8877f2b98a7 (patch) | |
tree | b1b5aa9abe961e6a34e60c29ddac1bfaa8beecd5 | |
parent | 1a0871d957af1922d7479ae462cb31a2a2ee3c2b (diff) | |
download | FreeBSD-src-5691b8528437da3d4280310f3fb9a8877f2b98a7.zip FreeBSD-src-5691b8528437da3d4280310f3fb9a8877f2b98a7.tar.gz |
Ensure resolv.conf exists on the build host before attempting
to copy it to the build chroot.
Move where the ldconfig(8) startup script is invoked.
Sponsored by: The FreeBSD Foundation
-rwxr-xr-x | release/release.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/release/release.sh b/release/release.sh index f1de922..706fc6b 100755 --- a/release/release.sh +++ b/release/release.sh @@ -229,8 +229,6 @@ chroot_setup() { env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \ DESTDIR=${CHROOTDIR} fi - mount -t devfs devfs ${CHROOTDIR}/dev - cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf return 0 } # chroot_setup() @@ -238,6 +236,14 @@ chroot_setup() { # extra_chroot_setup(): Prepare anything additional within the build # necessary for the release build. extra_chroot_setup() { + + mount -t devfs devfs ${CHROOTDIR}/dev + [ -e /etc/resolv.conf ] && cp /etc/resolv.conf \ + ${CHROOTDIR}/etc/resolv.conf + # Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints + # is created. This is needed by ports-mgmt/pkg. + eval chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart + # 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 @@ -250,10 +256,6 @@ extra_chroot_setup() { fi if [ -d ${CHROOTDIR}/usr/ports ]; then - # 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) REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) |