aboutsummaryrefslogtreecommitdiff
path: root/release/tools/vagrant.conf
diff options
context:
space:
mode:
authorBrad Davis <brd@FreeBSD.org>2015-07-20 16:27:44 +0000
committerBrad Davis <brd@FreeBSD.org>2015-07-20 16:27:44 +0000
commita54bd5953b805b99146f5167a2294639667d860c (patch)
tree0e36c8ac0f7b55d3d666781fa28290d61f27800e /release/tools/vagrant.conf
parent5a5c6e994c6c6bbfe71f0a96374d6036617887b7 (diff)
downloadsrc-a54bd5953b805b99146f5167a2294639667d860c.tar.gz
src-a54bd5953b805b99146f5167a2294639667d860c.zip
Add support for building VirtualBox Vagrant images.
Abstract the build, package and upload to handle building either type. Approved by: re (gjb)
Notes
Notes: svn path=/head/; revision=285722
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 7e629caa4549..159da4fa21a9 100644
--- a/release/tools/vagrant.conf
+++ b/release/tools/vagrant.conf
@@ -10,17 +10,14 @@ 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} 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