Fix minor spelling mistakes in RPM build logic
[integration/packaging.git] / rpm / Vagrantfile
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
3
4 # Vagrantfile API/syntax version.
5 VAGRANTFILE_API_VERSION = "2"
6
7 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8   # RPM build environment is CentOS 7
9   config.vm.box = "boxcutter/centos71"
10
11   # Add EPEL for access to fedora-packager and maybe others
12   config.vm.provision "shell", inline: "yum install -y epel-release"
13
14   # Install required software
15   # fedora-packager: Basic RPM packaging software
16   config.vm.provision "shell", inline: "yum install -y fedora-packager \
17                                                        python-pip"
18
19   # Use the distribution's version of pip to upgrade to the latest pip
20   config.vm.provision "shell", inline: "pip install --upgrade pip"
21
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"
26
27   # Add vagrant user to mock group for rpmbuild
28   config.vm.provision "shell", inline: "sudo usermod -a -G mock vagrant"
29 end