summaryrefslogtreecommitdiffstats
path: root/release/tools/vagrant.conf
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2015-07-23 15:32:58 +0000
committergjb <gjb@FreeBSD.org>2015-07-23 15:32:58 +0000
commite8cb2fb1daf72e4c9785d859a385547a5fa5359b (patch)
tree9d78e4b5f2b86d9241b213f2dd6ba123209eb6be /release/tools/vagrant.conf
parentd5e30036e48dbc8150ac72ad35615acfffc6429e (diff)
downloadFreeBSD-src-e8cb2fb1daf72e4c9785d859a385547a5fa5359b.zip
FreeBSD-src-e8cb2fb1daf72e4c9785d859a385547a5fa5359b.tar.gz
MFC r285722, r285733:
r285722 (brd): Add support for building VirtualBox Vagrant images. Abstract the build, package and upload to handle building either type. r285733 Fix an out-of-order execution issue regarding pkg(8): - pkg(8) cannot be removed before subsequent reinvocations - The PKG_CACHEDIR cannot be cleaned after the repo*.sqlite has been removed - pkg(8) cannot be removed as a precursor to any of the other steps involved here Approved by: re (kib) Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release/tools/vagrant.conf')
-rw-r--r--release/tools/vagrant.conf10
1 files changed, 2 insertions, 8 deletions
diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf
index 7e629ca..5617b96 100644
--- a/release/tools/vagrant.conf
+++ b/release/tools/vagrant.conf
@@ -10,18 +10,15 @@ export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs"
# 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} clean -y -a
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
-
# 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
OpenPOWER on IntegriCloud