Author: gjb
Date: Wed Sep 20 17:09:04 2017
New Revision: 323815
URL: https://svnweb.freebsd.org/changeset/base/323815

Log:
  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, insta-MFC)
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/release/tools/arm.subr
  stable/11/release/tools/vmimage.subr
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/release/tools/arm.subr
  stable/10/release/tools/vmimage.subr
Directory Properties:
  stable/10/   (props changed)

Modified: stable/11/release/tools/arm.subr
==============================================================================
--- stable/11/release/tools/arm.subr    Wed Sep 20 16:31:06 2017        
(r323814)
+++ stable/11/release/tools/arm.subr    Wed Sep 20 17:09:04 2017        
(r323815)
@@ -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: stable/11/release/tools/vmimage.subr
==============================================================================
--- stable/11/release/tools/vmimage.subr        Wed Sep 20 16:31:06 2017        
(r323814)
+++ stable/11/release/tools/vmimage.subr        Wed Sep 20 17:09:04 2017        
(r323815)
@@ -122,6 +122,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/${ROOTLABEL}/rootfs   /       ufs     rw      1       1" \
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to