-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This should make it possible to test the recently added mountedByOpenat2 functionality, which requires Linux kernel 5.6+. Alas, even the latest Ubuntu release available on Travis, Focal (20.04), has a kernel that's not new enough, so we have to setup a vagrant box. The machinery is mostly stolen from the runc repo at https://github.com/opencontainers/runc/ Signed-off-by: Kir Kolyshkin <[email protected]>
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure("2") do |config| | ||
# Fedora box is used for testing cgroup v2 support | ||
config.vm.box = "fedora/32-cloud-base" | ||
config.vm.provider :virtualbox do |v| | ||
v.memory = 2048 | ||
v.cpus = 2 | ||
end | ||
config.vm.provider :libvirt do |v| | ||
v.memory = 2048 | ||
v.cpus = 2 | ||
end | ||
config.vm.provision "shell", inline: <<-SHELL | ||
set -e -u -o pipefail | ||
# Work around dnf mirror failures by retrying a few times | ||
for i in $(seq 0 2); do | ||
sleep $i | ||
cat << EOF | dnf -y shell && break | ||
config exclude kernel,kernel-core | ||
config install_weak_deps false | ||
update | ||
install make golang-go libseccomp-devel git-core | ||
ts run | ||
EOF | ||
done | ||
dnf clean all | ||
SHELL | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
set -eux -o pipefail | ||
VAGRANT_VERSION="2.2.10" | ||
|
||
# Based on code from https://github.com/opencontainers/runc | ||
DEB="vagrant_${VAGRANT_VERSION}_$(uname -m).deb" | ||
wget "https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/$DEB" | ||
apt-get update | ||
apt-get install -q -y \ | ||
bridge-utils \ | ||
dnsmasq-base \ | ||
ebtables \ | ||
libvirt-bin \ | ||
libvirt-dev \ | ||
qemu-kvm \ | ||
qemu-utils \ | ||
ruby-dev \ | ||
./"$DEB" | ||
rm -f "$DEB" | ||
vagrant plugin install vagrant-libvirt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
dist: bionic | ||
os: linux | ||
language: minimal | ||
cache: | ||
directories: | ||
- /home/travis/.vagrant.d/boxes | ||
jobs: | ||
include: | ||
- name: "Fedora 32" | ||
before_install: | ||
- sudo .ci/install-vagrant.sh | ||
- ln -sf .ci/Vagrantfile.fedora32 Vagrantfile | ||
- sudo vagrant up && sudo mkdir -p /root/.ssh && sudo sh -c "vagrant ssh-config >> /root/.ssh/config" | ||
script: | ||
- sudo ssh default -t 'cd /vagrant && sudo make' |