From 33b6ec2925feac9146d07e7c775443d08558e2d1 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 26 Apr 2023 15:13:59 -0700 Subject: [PATCH 1/3] ci/cirrus: use vagrant from hashicorp repo A version of vagrant available from the stock repos (2.2.19) is too old and contains a bug that prevents downloading Fedora 38 image (see [1]). Use packages from hashicorp repo, which currently has vagrant 2.3.4. This resolves the problem of downloading the latest Fedora image. Also, vagrant-libvirt plugin from Ubuntu repos is not working with vagrant from hashicorp, so switch to using "vagrant plugin install". The downside it, this takes extra 4 minutes or so in our CI, and I am not sure how to cache it or speed it up. [1] https://github.com/opencontainers/runc/pull/3835#issuecomment-1519321619 Signed-off-by: Kir Kolyshkin --- .cirrus.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index ec4be03ab..a1edca0e2 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -37,9 +37,15 @@ task: # ----- cat /proc/cpuinfo install_libvirt_vagrant_script: | + curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + sudo sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list apt-get update - apt-get install -y libvirt-daemon libvirt-daemon-system vagrant vagrant-libvirt + apt-get install -y libvirt-daemon libvirt-daemon-system vagrant systemctl enable --now libvirtd + apt-get build-dep -y vagrant ruby-libvirt + apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev + vagrant plugin install vagrant-libvirt vagrant_cache: fingerprint_script: uname -s ; cat Vagrantfile.$DISTRO folder: /root/.vagrant.d From a19200096e287a72d43ed0e8a50a2ba4a9d6cc17 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 26 Apr 2023 15:46:31 -0700 Subject: [PATCH 2/3] Vagrantfile.fedora: bump to 38 Signed-off-by: Kir Kolyshkin --- Vagrantfile.fedora | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile.fedora b/Vagrantfile.fedora index d99ba38c7..4e9bd87c2 100644 --- a/Vagrantfile.fedora +++ b/Vagrantfile.fedora @@ -3,7 +3,7 @@ Vagrant.configure("2") do |config| # Fedora box is used for testing cgroup v2 support - config.vm.box = "fedora/37-cloud-base" + config.vm.box = "fedora/38-cloud-base" config.vm.provider :virtualbox do |v| v.memory = 2048 v.cpus = 2 From 13091eeefaea7dc5367f6ea70e8fcec6da492d8c Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 26 Apr 2023 15:48:03 -0700 Subject: [PATCH 3/3] ci: bump bats 1.8.2 -> 1.9.0 As Fedora 38 uses bats 1.9.0, let's switch to this version in other places. Signed-off-by: Kir Kolyshkin --- .cirrus.yml | 2 +- .github/workflows/test.yml | 2 +- Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index a1edca0e2..bf76a6b23 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -77,7 +77,7 @@ task: HOME: /root CIRRUS_WORKING_DIR: /home/runc GO_VERSION: "1.19" - BATS_VERSION: "v1.8.2" + BATS_VERSION: "v1.9.0" RPMS: gcc git iptables jq glibc-static libseccomp-devel make criu fuse-sshfs # yamllint disable rule:key-duplicates matrix: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4bdf9526b..d938bec4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,7 +76,7 @@ jobs: - name: install bats uses: mig4/setup-bats@v1 with: - bats-version: 1.8.2 + bats-version: 1.9.0 - name: unit test if: matrix.rootless != 'rootless' diff --git a/Dockerfile b/Dockerfile index 9412e0a15..8c4138b6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ARG GO_VERSION=1.20 -ARG BATS_VERSION=v1.8.2 +ARG BATS_VERSION=v1.9.0 ARG LIBSECCOMP_VERSION=2.5.4 FROM golang:${GO_VERSION}-bullseye