--- /dev/null
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# Vagrantfile API/syntax version.
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+
+ config.vm.define :centos do |centos|
+ # Configure VM RAM and CPU for VirtualBox. Change this to meet your needs.
+ centos.vm.provider :virtualbox do |virtualbox, override|
+ virtualbox.memory = 2048
+ virtualbox.cpus = 2
+ override.vm.box = "centos/7"
+ end
+
+ # Configure VM RAM and CPU for LibVirt. Change this to meet your needs.
+ centos.vm.provider :libvirt do |libvirt, override|
+ libvirt.memory = 2048
+ libvirt.cpus = 2
+ override.vm.box = "centos/7"
+ end
+
+ centos.vm.provider "docker" do |docker, override|
+ docker.build_dir = "."
+ docker.remains_running = false
+ override.vm.synced_folder ".", "/build"
+ end
+
+ # NFS is fragile, use rsync
+ centos.vm.synced_folder ".", "/vagrant", type: "rsync"
+ centos.vm.synced_folder ".", "/home/vagrant/sync", disabled: true
+
+ # Add EPEL for access to fedora-packager and maybe others
+ centos.vm.provision "shell", inline: "yum install -y epel-release"
+
+ # Install required software
+ # fedora-packager: Basic RPM packaging software
+ centos.vm.provision "shell", inline: "yum install -y fedora-packager \
+ python-pip"
+
+ # Use the distribution's version of pip to upgrade to the latest pip
+ centos.vm.provision "shell", inline: "pip install --upgrade pip"
+
+ # Install Python dependences system-wide via pip.
+ centos.vm.provision "shell", inline: "pip install -r /vagrant/requirements.txt"
+
+ # Add vagrant user to mock group for rpmbuild
+ centos.vm.provision "shell", inline: "sudo usermod -a -G mock vagrant"
+ end
+
+ config.vm.define :debian do |debian|
+ debian.vm.provider :virtualbox do |virtualbox, override|
+ virtualbox.memory = 1024
+ # Two cores over default one for faster builds
+ virtualbox.cpus = 2
+ override.vm.box = "debian/stretch64"
+ override.vm.box_version = "> 9.0.0"
+ end
+
+ # Configure VM RAM and CPU for LibVirt
+ debian.vm.provider :libvirt do |libvirt, override|
+ libvirt.memory = 1024
+ # Two cores over default one for faster builds
+ libvirt.cpus = 2
+ override.vm.box = "debian/stretch64"
+ override.vm.box_version = "> 9.0.0"
+ end
+
+ debian.vm.provider "docker" do |docker, override|
+ docker.build_dir = "."
+ docker.remains_running = false
+ override.vm.synced_folder ".", "/build"
+ end
+
+ # NFS is fragile, disable it and use rsync
+ debian.nfs.functional = false
+
+ # Sync folders /packaging/deb/ and /vagrant
+ debian.vm.synced_folder ".", "/vagrant"
+
+ # Update package info to prevent old info from causing 404s during install
+ debian.vm.provision "shell", inline: "apt-get update"
+
+ # Install pkg dev tools, Python libs for build scripts, gdebi to test install
+ debian.vm.provision "shell", inline: "apt-get install -y --force-yes \
+ build-essential \
+ devscripts \
+ equivs \
+ dh-systemd \
+ git \
+ python-pip \
+ gdebi"
+
+ # Use the distribution's version of pip to upgrade to the latest pip
+ debian.vm.provision "shell", inline: "pip install --upgrade pip"
+
+ # Install Python dependences system-wide via pip
+ debian.vm.provision "shell", inline: "pip install -r /vagrant/requirements.txt"
+
+ # Add jessie-oldstable repo for openjdk-7-jre-headless package
+ # Note openjdk-7-jre-headless requires tzdata (= 2017b-0+deb8u1) also present in jessie-oldstable
+ debian.vm.provision "shell", inline: <<-SHELL
+ echo "deb http://httpredir.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie-oldstable.list
+ apt-get update
+ SHELL
+ end
+end
+++ /dev/null
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-BOX = "debian/jessie64"
-BOX_VERSION = "= 8.5.2"
-
-Vagrant.configure("2") do |config|
- # Configure VM RAM and CPU for VirtualBox
- config.vm.provider :virtualbox do |virtualbox, override|
- virtualbox.memory = 1024
- # Two cores over default one for faster builds
- virtualbox.cpus = 2
- override.vm.box = BOX
- override.vm.box_version = BOX_VERSION
- end
-
- # Configure VM RAM and CPU for LibVirt
- config.vm.provider :libvirt do |libvirt, override|
- libvirt.memory = 1024
- # Two cores over default one for faster builds
- libvirt.cpus = 2
- override.vm.box = BOX
- override.vm.box_version = BOX_VERSION
- end
-
- config.vm.provider "docker" do |docker, override|
- docker.build_dir = "."
- docker.remains_running = false
- override.vm.synced_folder ".", "/build"
- end
-
- # NFS is fragile, disable it and use rsync
- config.nfs.functional = false
-
- # Sync folders /packaging/deb/ and /vagrant
- config.vm.synced_folder ".", "/vagrant"
-
- # Update package info to prevent old info from causing 404s during install
- config.vm.provision "shell", inline: "apt-get update"
-
- # Install pkg dev tools, Python libs for build scripts, gdebi to test install
- config.vm.provision "shell", inline: "apt-get install -y --force-yes \
- build-essential \
- devscripts \
- equivs \
- dh-systemd \
- python-yaml \
- python-jinja2 \
- gdebi
- "
-
- # Add jessie-backports
- config.vm.provision "shell", inline: <<-SHELL
- echo "deb http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
- apt-get update
- SHELL
-end
+++ /dev/null
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-# Vagrantfile API/syntax version.
-VAGRANTFILE_API_VERSION = "2"
-BOX = "centos/7"
-
-Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
- # Configure VM RAM and CPU for VirtualBox. Change this to meet your needs.
- config.vm.provider :virtualbox do |virtualbox, override|
- virtualbox.memory = 2048
- virtualbox.cpus = 2
- override.vm.box = BOX
- end
-
- # Configure VM RAM and CPU for LibVirt. Change this to meet your needs.
- config.vm.provider :libvirt do |libvirt, override|
- libvirt.memory = 2048
- libvirt.cpus = 2
- override.vm.box = BOX
- end
-
- config.vm.provider "docker" do |docker, override|
- docker.build_dir = "."
- docker.remains_running = false
- override.vm.synced_folder ".", "/build"
- end
-
- # NFS is fragile, use rsync
- config.vm.synced_folder ".", "/vagrant", type: "rsync"
- config.vm.synced_folder ".", "/home/vagrant/sync", disabled: true
-
- # Add EPEL for access to fedora-packager and maybe others
- config.vm.provision "shell", inline: "yum install -y epel-release"
-
- # Install required software
- # fedora-packager: Basic RPM packaging software
- config.vm.provision "shell", inline: "yum install -y fedora-packager \
- python-pip"
-
- # Use the distribution's version of pip to upgrade to the latest pip
- config.vm.provision "shell", inline: "pip install --upgrade pip"
-
- # Install Python dependences system-wide via pip
- # NB: Could use a venv here, but since we're already in a Vagrant box and
- # don't need any more isolation, it doesn't seem worth the extra complexity.
- config.vm.provision "shell", inline: "pip install -r /vagrant/requirements.txt"
-
- # Add vagrant user to mock group for rpmbuild
- config.vm.provision "shell", inline: "sudo usermod -a -G mock vagrant"
-end