Date: Wed, 20 Sep 2017 17:23:45 +0000 (UTC) From: Glen Barber <gjb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r323817 - releng/10.4/release/tools Message-ID: <201709201723.v8KHNj2w058453@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gjb Date: Wed Sep 20 17:23:45 2017 New Revision: 323817 URL: https://svnweb.freebsd.org/changeset/base/323817 Log: MFS10 r323815: MFC r323812: Bootstrap etcupdate(8) and mergemaster(8) databases when creating virtual machine images and embedded images, similar to what is done when extracting base.txz to the target root filesystem in a new installation. Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: releng/10.4/release/tools/arm.subr releng/10.4/release/tools/vmimage.subr Directory Properties: releng/10.4/ (props changed) Modified: releng/10.4/release/tools/arm.subr ============================================================================== --- releng/10.4/release/tools/arm.subr Wed Sep 20 17:15:58 2017 (r323816) +++ releng/10.4/release/tools/arm.subr Wed Sep 20 17:23:45 2017 (r323817) @@ -99,6 +99,16 @@ arm_install_base() { TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ installworld installkernel distribution + + # Bootstrap etcupdate(8) and mergemaster(8) databases. + mkdir -p ${DESTDIR}/var/db/etcupdate + etcupdate extract -B \ + -M "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ + -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate + sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ + -F "TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH}" \ + -D ${DESTDIR} + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos arm_create_user Modified: releng/10.4/release/tools/vmimage.subr ============================================================================== --- releng/10.4/release/tools/vmimage.subr Wed Sep 20 17:15:58 2017 (r323816) +++ releng/10.4/release/tools/vmimage.subr Wed Sep 20 17:23:45 2017 (r323817) @@ -116,6 +116,15 @@ vm_install_base() { installworld installkernel distribution || \ err "\n\nCannot install the base system to ${DESTDIR}." + # Bootstrap etcupdate(8) and mergemaster(8) databases. + mkdir -p ${DESTDIR}/var/db/etcupdate + etcupdate extract -B \ + -M "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \ + -s ${WORLDDIR} -d ${DESTDIR}/var/db/etcupdate + sh ${WORLDDIR}/release/scripts/mm-mtree.sh -m ${WORLDDIR} \ + -F "TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" \ + -D ${DESTDIR} + echo '# Custom /etc/fstab for FreeBSD VM images' \ > ${DESTDIR}/etc/fstab echo '/dev/gpt/rootfs / ufs rw 1 1' \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709201723.v8KHNj2w058453>