repotesting-vagrant/rocky/Vagrantfile

34 lines
1006 B
Ruby

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "boxomatic/rocky-9"
config.vm.box_version = "20230520.0.1"
config.vm.hostname = "rocky9u2-repotesting.example.org"
config.vm.synced_folder "../vagrantdata", "/home/vagrant/data"
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.cpus = "2"
end
config.vm.provision "shell", inline: <<-SHELL
dnf -y update
SHELL
config.vm.provision "shell", inline: <<-SHELL
dnf install -y diffstat jq python3-jsonpatch rpminspect rpminspect-data-fedora vim-enhanced
SHELL
config.vm.provision "shell", inline: <<-SHELL
# This will either rebuild the kernel modules for the running kernel or build
# the kernel modules for an updated kernel if a newer one exists
kver=$(rpm -q --queryformat="%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel | sort -V | tail -n 1)
test -x /sbin/rcvboxadd && /sbin/rcvboxadd quicksetup "${kver}"
SHELL
config.vm.provision :reload
end