4 # Vagrantfile API/syntax version.
5 VAGRANTFILE_API_VERSION = "2"
7 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8 # RPM build environment is CentOS 7
9 config.vm.box = "boxcutter/centos71"
11 # Add EPEL for access to fedora-packager and maybe others
12 config.vm.provision "shell", inline: "yum install -y epel-release"
14 # Install required software
15 # fedora-packager: Basic RPM packaging software
16 config.vm.provision "shell", inline: "yum install -y fedora-packager \
19 # Use the distribution's version of pip to upgrade to the latest pip
20 config.vm.provision "shell", inline: "pip install --upgrade pip"
22 # Install Python dependences system-wide via pip
23 # NB: Could use a venv here, but since we're already in a Vagrant box and
24 # don't need any isolation it seem worth the extra complexity.
25 config.vm.provision "shell", inline: "pip install -r /vagrant/requirements.txt"
27 # Add vagrant user to mock group for rpmbuild
28 config.vm.provision "shell", inline: "sudo usermod -a -G mock vagrant"