From owner-svn-src-head@freebsd.org Mon Jul 20 16:27:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9AF99A68C0; Mon, 20 Jul 2015 16:27:47 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF3201D57; Mon, 20 Jul 2015 16:27:47 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6KGRlQ8044366; Mon, 20 Jul 2015 16:27:47 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6KGRjLp044357; Mon, 20 Jul 2015 16:27:45 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201507201627.t6KGRjLp044357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Mon, 20 Jul 2015 16:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285722 - in head/release: . scripts tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2015 16:27:48 -0000 Author: brd (doc,ports committer) Date: Mon Jul 20 16:27:44 2015 New Revision: 285722 URL: https://svnweb.freebsd.org/changeset/base/285722 Log: Add support for building VirtualBox Vagrant images. Abstract the build, package and upload to handle building either type. Approved by: re (gjb) Added: head/release/scripts/box.ovf (contents, props changed) head/release/tools/vagrant-virtualbox.conf (contents, props changed) head/release/tools/vagrant-vmware.conf (contents, props changed) Modified: head/release/Makefile.vagrant head/release/Makefile.vm head/release/scripts/atlas-upload.sh head/release/tools/vagrant.conf Modified: head/release/Makefile.vagrant ============================================================================== --- head/release/Makefile.vagrant Mon Jul 20 16:17:43 2015 (r285721) +++ head/release/Makefile.vagrant Mon Jul 20 16:27:44 2015 (r285722) @@ -6,8 +6,7 @@ # VAGRANT_IMG?= ${.OBJDIR}/vagrant.vmdk -VAGRANT_UPLOAD_TGTS= vagrant-check-depends \ - atlas-do-upload +VAGRANT_UPLOAD_TGTS= vagrant-check-depends CLEANFILES+= ${VAGRANT_UPLOAD_TGTS} .if defined(VAGRANT_UPLOAD_CONF) && !empty(VAGRANT_UPLOAD_CONF) @@ -18,16 +17,20 @@ ATLAS${VAR}:= ${VAGRANT${VAR}} .endif .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == "PRERELEASE" -SNAPSHOT_DATE!= date +-%Y-%m-%d +SNAPSHOT_DATE!= date +%Y%m%d .endif -VAGRANT_VERSION?= ${REVISION}-${BRANCH}${SNAPSHOT_DATE} - -VAGRANT_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE}.box -VAGRANT_PROVIDERS?= vmware_desktop -#VAGRANT_PROVIDERS+= virtualbox +VAGRANT_VERSION!= date +%Y.%m.%d +VAGRANT_TARGET:= ${OSRELEASE}-${SNAPSHOT_DATE} +.if !empty(CLOUDWARE) +. for _PROVIDER in ${CLOUDWARE} +. if ${_PROVIDER:MVAGRANT*} +VAGRANT_PROVIDERS+= ${_PROVIDER:S/VAGRANT-//:tl} +. endif +. endfor +.endif +VAGRANT_PROVIDERS?= vmware virtualbox -vagrant-upload: ${VAGRANT_UPLOAD_TGTS} vagrant-check-depends: .for VAR in _KEY _USERNAME _VERSION @@ -47,48 +50,73 @@ vagrant-check-depends: . endif .endif -vagrant-do-package: cw-vagrant +.for PROVIDER in ${VAGRANT_PROVIDERS} +CLEANFILES+= vagrant-do-package-${PROVIDER} ${VAGRANT_TARGET}.${PROVIDER}.box +CLEANDIRS+= ${PROVIDER} +VAGRANT_UPLOAD_TGTS+= vagrant-do-upload-${PROVIDER} + +${PROVIDER}: + @mkdir -p ${PROVIDER} + +${VAGRANT_TARGET}.${PROVIDER}.box: ${PROVIDER} cw-vagrant-${PROVIDER} vagrant-create-${PROVIDER}-metadata + @echo "==> PACKAGING: ${VAGRANT_TARGET}.${PROVIDER}.box in `pwd`" + @cp vagrant-${PROVIDER}.vmdk ${PROVIDER}/vagrant.vmdk +. if ${PROVIDER} == "virtualbox" + @(cd ${.OBJDIR}/${PROVIDER} && echo '{"provider":"${PROVIDER}"}' > metadata.json) + @(cd ${.OBJDIR}/${PROVIDER} && tar -czf ../${VAGRANT_TARGET}.${PROVIDER}.box metadata.json box.ovf vagrant.vmdk) +. elif ${PROVIDER} == "vmware" + @(cd ${.OBJDIR}/${PROVIDER} && echo '{"provider":"${PROVIDER}_desktop"}' > metadata.json) + @(cd ${.OBJDIR}/${PROVIDER} && tar -czf ../${VAGRANT_TARGET}.${PROVIDER}.box metadata.json vagrant.vmx vagrant.vmdk) +. endif -vagrant-do-package-vmware: vagrant-create-vmware-vmx vagrant-do-package - @cd ${.OBJDIR} && echo '{"provider":"vmware_desktop"}' > metadata.json - cd ${.OBJDIR} && tar -czf ${VAGRANT_TARGET} metadata.json vagrant.vmx vagrant.vmdk +CLEANFILES+= vagrant-do-upload-${PROVIDER} +vagrant-do-upload-${PROVIDER}: ${VAGRANT_TARGET}.${PROVIDER}.box +. if ${PROVIDER} == "virtualbox" + ${.CURDIR}/scripts/atlas-upload.sh -b ${TYPE}-${REVISION}-${BRANCH} -f ${VAGRANT_TARGET}.${PROVIDER}.box -p ${PROVIDER} -k ${VAGRANT_KEY} -u ${VAGRANT_USERNAME} -v ${VAGRANT_VERSION} +. elif ${PROVIDER} == "vmware" + ${.CURDIR}/scripts/atlas-upload.sh -b ${TYPE}-${REVISION}-${BRANCH} -f ${VAGRANT_TARGET}.${PROVIDER}.box -p ${PROVIDER}_desktop -k ${VAGRANT_KEY} -u ${VAGRANT_USERNAME} -v ${VAGRANT_VERSION} +. endif touch ${.OBJDIR}/${.TARGET} - -atlas-do-upload: vagrant-do-package-vmware -.for PROVIDER in ${VAGRANT_PROVIDERS} - ${.CURDIR}/scripts/atlas-upload.sh -b FreeBSD-${REVISION}-${BRANCH} -f ${VAGRANT_TARGET} -p ${PROVIDER} -k ${VAGRANT_KEY} -u ${VAGRANT_USERNAME} -v ${VAGRANT_VERSION} .endfor - touch ${.OBJDIR}/${.TARGET} -vagrant-create-vmware-vmx: - @cd ${.OBJDIR} && echo '.encoding = "UTF-8"' > vagrant.vmx - @cd ${.OBJDIR} && echo 'bios.bootorder = "hdd,CDROM"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'checkpoint.vmstate = ""' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'cleanshutdown = "TRUE"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'config.version = "8"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'displayname = "${VAGRANT_TARGET}"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'ethernet0.addresstype = "generated"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'ethernet0.bsdname = "en0"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'ethernet0.connectiontype = "nat"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'ethernet0.displayname = "Ethernet"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'ethernet0.linkstatepropagation.enable = "FALSE"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'ethernet0.pcislotnumber = "33"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'ethernet0.present = "TRUE"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'ethernet0.virtualdev = "e1000"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'ethernet0.wakeonpcktrcv = "FALSE"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'floppy0.present = "FALSE"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'guestos = "freebsd-64"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'gui.fullscreenatpoweron = "FALSE"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'gui.viewmodeatpoweron = "windowed"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'memsize = "512"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'sound.startconnected = "FALSE"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'softpoweroff = "TRUE"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'scsi0.pcislotnumber = "16"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'scsi0.present = "TRUE"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'scsi0.virtualdev = "lsilogic"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'scsi0:0.filename = "vagrant.vmdk"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'scsi0:0.present = "TRUE"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'tools.synctime = "TRUE"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'usb.present = "FALSE"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'virtualhw.productcompatibility = "hosted"' >> vagrant.vmx - @cd ${.OBJDIR} && echo 'virtualhw.version = "9"' >> vagrant.vmx +vagrant-upload: ${VAGRANT_UPLOAD_TGTS} + +vagrant-create-virtualbox-metadata: virtualbox/box.ovf + +virtualbox/box.ovf: ${.CURDIR}/scripts/box.ovf + cp ${.ALLSRC} virtualbox/ + +vmware/vagrant.vmx: + @(cd vmware && echo '.encoding = "UTF-8"' > vagrant.vmx) + @(cd vmware && echo 'bios.bootorder = "hdd,CDROM"' >> vagrant.vmx) + @(cd vmware && echo 'checkpoint.vmstate = ""' >> vagrant.vmx) + @(cd vmware && echo 'cleanshutdown = "TRUE"' >> vagrant.vmx) + @(cd vmware && echo 'config.version = "8"' >> vagrant.vmx) + @(cd vmware && echo 'displayname = "${VAGRANT_TARGET}"' >> vagrant.vmx) + @(cd vmware && echo 'ethernet0.addresstype = "generated"' >> vagrant.vmx) + @(cd vmware && echo 'ethernet0.bsdname = "en0"' >> vagrant.vmx) + @(cd vmware && echo 'ethernet0.connectiontype = "nat"' >> vagrant.vmx) + @(cd vmware && echo 'ethernet0.displayname = "Ethernet"' >> vagrant.vmx) + @(cd vmware && echo 'ethernet0.linkstatepropagation.enable = "FALSE"' >> vagrant.vmx) + @(cd vmware && echo 'ethernet0.pcislotnumber = "33"' >> vagrant.vmx) + @(cd vmware && echo 'ethernet0.present = "TRUE"' >> vagrant.vmx) + @(cd vmware && echo 'ethernet0.virtualdev = "e1000"' >> vagrant.vmx) + @(cd vmware && echo 'ethernet0.wakeonpcktrcv = "FALSE"' >> vagrant.vmx) + @(cd vmware && echo 'floppy0.present = "FALSE"' >> vagrant.vmx) + @(cd vmware && echo 'guestos = "freebsd-64"' >> vagrant.vmx) + @(cd vmware && echo 'gui.fullscreenatpoweron = "FALSE"' >> vagrant.vmx) + @(cd vmware && echo 'gui.viewmodeatpoweron = "windowed"' >> vagrant.vmx) + @(cd vmware && echo 'memsize = "512"' >> vagrant.vmx) + @(cd vmware && echo 'sound.startconnected = "FALSE"' >> vagrant.vmx) + @(cd vmware && echo 'softpoweroff = "TRUE"' >> vagrant.vmx) + @(cd vmware && echo 'scsi0.pcislotnumber = "16"' >> vagrant.vmx) + @(cd vmware && echo 'scsi0.present = "TRUE"' >> vagrant.vmx) + @(cd vmware && echo 'scsi0.virtualdev = "lsilogic"' >> vagrant.vmx) + @(cd vmware && echo 'scsi0:0.filename = "vagrant.vmdk"' >> vagrant.vmx) + @(cd vmware && echo 'scsi0:0.present = "TRUE"' >> vagrant.vmx) + @(cd vmware && echo 'tools.synctime = "TRUE"' >> vagrant.vmx) + @(cd vmware && echo 'usb.present = "FALSE"' >> vagrant.vmx) + @(cd vmware && echo 'virtualhw.productcompatibility = "hosted"' >> vagrant.vmx) + @(cd vmware && echo 'virtualhw.version = "9"' >> vagrant.vmx) + +vagrant-create-vmware-metadata: vmware/vagrant.vmx Modified: head/release/Makefile.vm ============================================================================== --- head/release/Makefile.vm Mon Jul 20 16:17:43 2015 (r285721) +++ head/release/Makefile.vm Mon Jul 20 16:27:44 2015 (r285722) @@ -19,7 +19,8 @@ CLOUDWARE?= AZURE \ EC2 \ GCE \ OPENSTACK \ - VAGRANT + VAGRANT-VIRTUALBOX \ + VAGRANT-VMWARE AZURE_FORMAT= vhdf AZURE_DESC= Microsoft Azure platform image AZURE_DISK= ${OSRELEASE}.${AZURE_FORMAT} @@ -32,9 +33,12 @@ GCE_DISK= disk.${GCE_FORMAT} OPENSTACK_FORMAT=qcow2 OPENSTACK_DESC= OpenStack platform image OPENSTACK_DISK= ${OSRELEASE}.${OPENSTACK_FORMAT} -VAGRANT_FORMAT= vmdk -VAGRANT_DESC= Vagrant Image -VAGRANT_DISK= ${OSRELEASE}.${VAGRANT_FORMAT} +VAGRANT-VIRTUALBOX_FORMAT= vmdk +VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox +VAGRANT-VIRTUALBOX_DISK= ${OSRELEASE}.vbox.${VAGRANT_FORMAT} +VAGRANT-VMWARE_FORMAT= vmdk +VAGRANT-VMWARE_DESC= Vagrant Image for VMWare +VAGRANT-VMWARE_DISK= ${OSRELEASE}.vmware.${VAGRANT_FORMAT} .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) . for _CW in ${CLOUDWARE} Modified: head/release/scripts/atlas-upload.sh ============================================================================== --- head/release/scripts/atlas-upload.sh Mon Jul 20 16:17:43 2015 (r285721) +++ head/release/scripts/atlas-upload.sh Mon Jul 20 16:27:44 2015 (r285722) @@ -28,20 +28,23 @@ ATLAS_API_URL='' ATLAS_UPLOAD_URL='https://binstore.hashicorp.com' -VERSION_DESCRIPTION="FreeBSD Snapshot Build" +DESCRIPTION="FreeBSD Snapshot Build" usage() { echo "${0} usage:" - echo "-b box-name -f box-to-upload -k api-key -p provider -u user -v version" + echo "-b box-name -d 'box description' -f box-to-upload -k api-key -p provider -u user -v version" return 1 } main () { - while getopts "b:f:k:p:u:v:" arg; do + while getopts "b:d:f:k:p:u:v:" arg; do case "${arg}" in b) BOX="${OPTARG}" ;; + d) + DESCRIPTION="${OPTARG}" + ;; f) FILE="${OPTARG}" ;; @@ -83,6 +86,7 @@ main () { echo "Creating box: ${BOX}" /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/boxes -X POST -d "box[name]=${BOX}" -d "access_token=${KEY}" > /dev/null /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX} -X PUT -d "box[is_private]=false" -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX} -X PUT -d "box[description]='${DESCRIPTION}'" -d "access_token=${KEY}" > /dev/null else echo "Box already exists" fi @@ -97,7 +101,7 @@ main () { if [ $? != 0 ]; then echo "Creating version: ${VERSION}" /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/versions -X POST -d "version[version]=${VERSION}" -d "access_token=${KEY}" > /dev/null - /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION} -X PUT -d "version[description]=${VERSION_DESCRIPTION}" -d "access_token=${KEY}" > /dev/null + /usr/local/bin/curl -s https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION} -X PUT -d "version[description]=${DESCRIPTION}" -d "access_token=${KEY}" > /dev/null VERSIONRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}?access_token=${KEY}") echo $VERSIONRESULT | grep "\"version\":\"${VERSION}\"" > /dev/null if [ $? != 0 ]; then Added: head/release/scripts/box.ovf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/scripts/box.ovf Mon Jul 20 16:27:44 2015 (r285722) @@ -0,0 +1,226 @@ + + + + + + + List of the virtual disks used in the package + + + + Logical networks used in the package + + Logical network used by this appliance. + + + + A virtual machine + + The kind of installed guest operating system + FreeBSD_64 + FreeBSD_64 + + + Virtual hardware requirements for a virtual machine + + Virtual Hardware Family + 0 + freebsd + virtualbox-2.2 + + + 1 virtual CPU + Number of virtual CPUs + 1 virtual CPU + 1 + 3 + 1 + + + MegaBytes + 512 MB of memory + Memory Size + 512 MB of memory + 2 + 4 + 512 + + + 0 + ideController0 + IDE Controller + ideController0 + 3 + PIIX4 + 5 + + + 1 + ideController1 + IDE Controller + ideController1 + 4 + PIIX4 + 5 + + + 0 + disk1 + Disk Image + disk1 + /disk/vmdisk1 + 5 + 3 + 17 + + + true + Ethernet adapter on 'NAT' + NAT + Ethernet adapter on 'NAT' + 6 + E1000 + 10 + + + + Complete VirtualBox machine configuration in VirtualBox format + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: head/release/tools/vagrant-virtualbox.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/tools/vagrant-virtualbox.conf Mon Jul 20 16:27:44 2015 (r285722) @@ -0,0 +1,18 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +. ${WORLDDIR}/release/tools/vagrant.conf + +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} virtualbox-ose-additions" + +vm_extra_pre_umount () { + # VirtualBox first boot pkgs + echo 'firstboot_pkgs_list="sudo rsync virtualbox-ose-additions"' >> ${DESTDIR}/etc/rc.conf + echo 'vboxguest_enable="YES"' >> ${DESTDIR}/etc/rc.conf + echo 'vboxservice_enable="YES"' >> ${DESTDIR}/etc/rc.conf + + # Setup the Vagrant common items + vagrant_common +} Added: head/release/tools/vagrant-vmware.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/tools/vagrant-vmware.conf Mon Jul 20 16:27:44 2015 (r285722) @@ -0,0 +1,22 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +. ${WORLDDIR}/release/tools/vagrant.conf + +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} open-vm-tools-nox11" + +vm_extra_pre_umount () { + # VMWare first boot pkgs + echo 'firstboot_pkgs_list="sudo rsync open-vm-tools-nox11"' >> ${DESTDIR}/etc/rc.conf + + echo 'vmware_guest_vmblock_enable="YES"' >> ${DESTDIR}/etc/rc.conf + echo 'vmware_guest_vmhgfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf + echo 'vmware_guest_vmmemctl_enable="YES"' >> ${DESTDIR}/etc/rc.conf + echo 'vmware_guest_vmxnet_enable="YES"' >> ${DESTDIR}/etc/rc.conf + echo 'vmware_guestd_enable="YES"' >> ${DESTDIR}/etc/rc.conf + + # Setup the Vagrant common items + vagrant_common +} Modified: head/release/tools/vagrant.conf ============================================================================== --- head/release/tools/vagrant.conf Mon Jul 20 16:17:43 2015 (r285721) +++ head/release/tools/vagrant.conf Mon Jul 20 16:27:44 2015 (r285722) @@ -10,17 +10,14 @@ export VM_EXTRA_PACKAGES="firstboot-free # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="firstboot_freebsd_update firstboot_pkgs" -vm_extra_pre_umount() { +vagrant_common () { # The firstboot_pkgs rc.d script will download the repository # catalogue and install or update pkg when the instance first # launches, so these files would just be replaced anyway; removing # them from the image allows it to boot faster. env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg rm ${DESTDIR}/var/db/pkg/repo-*.sqlite - - # The size of the EC2 root disk can be configured at instance launch - # time; expand our filesystem to fill the disk. - echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf + env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} clean -y -a # Vagrant instances use DHCP to get their network configuration. echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf @@ -36,9 +33,6 @@ vm_extra_pre_umount() { echo 'sendmail_outbound_enable="NO"' >> ${DESTDIR}/etc/rc.conf echo 'sendmail_msp_queue_enable="NO"' >> ${DESTDIR}/etc/rc.conf - # sudo is required - echo 'firstboot_pkgs_list="sudo rsync"' >> ${DESTDIR}/etc/rc.conf - # Create the vagrant user with a password of vagrant /usr/sbin/pw -R ${DESTDIR} \ groupadd vagrant -g 1001