repotesting-vagrant/rocky/Vagrantfile

34 lines
1.1 KiB
Ruby
Raw Permalink Normal View History

2023-05-29 20:55:39 +00:00
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "boxomatic/rocky-8"
config.vm.box_version = "20230520.0.1"
config.vm.hostname = "rocky8u8-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 config-manager --set-enabled powertools
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