From e2daa20ed540ccd1d8c59abd9244ab694605630e Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Fri, 11 Oct 2024 17:41:28 +0900 Subject: [PATCH 1/4] Revert "use older version of OVMF package" This reverts commit c25183ff1998f11a2f5ee49bf1d2b28781c7ee4c. Signed-off-by: Akihiro Suda --- .github/workflows/ci.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdaf36901..bdf5ebc9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -565,29 +565,19 @@ jobs: 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 jammy main" | sudo tee /etc/apt/sources.list.d/hashicorp.list sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources - # we use vagrant from jammy since the sources are not yet available in noble for vagrant - # TODO: once vagrant package sources are available in ubuntu-24 this can be removed + # we use vagrant from jammy since the sources are not yet available in noble sudo tee -a /etc/apt/sources.list.d/ubuntu.sources < /dev/null - # jammy security needs to be added so that the compatible ovmf package can be fetched - sudo tee -a /etc/apt/sources.list.d/ubuntu.sources < Date: Fri, 11 Oct 2024 17:41:43 +0900 Subject: [PATCH 2/4] Revert "use vagrant from jammy in noble" This reverts commit 1bfdccee09c6e95f6e993ae6472405b2243de33a. Signed-off-by: Akihiro Suda --- .github/workflows/ci.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdf5ebc9a..3aaa1ab72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -563,21 +563,13 @@ jobs: # Canonical's Vagrant 2.2.19 dpkg cannot download Fedora 38 image: https://bugs.launchpad.net/vagrant/+bug/2017828 # So we have to install Vagrant >= 2.3.1 from the upstream: https://github.com/opencontainers/runc/blob/v1.1.8/.cirrus.yml#L41-L49 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 jammy main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + 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/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources - # we use vagrant from jammy since the sources are not yet available in noble - sudo tee -a /etc/apt/sources.list.d/ubuntu.sources < Date: Fri, 11 Oct 2024 18:46:54 +0900 Subject: [PATCH 3/4] CI: fix "Unable to find a source package for vagrant" error Signed-off-by: Akihiro Suda --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3aaa1ab72..4a5e3391e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -568,7 +568,7 @@ jobs: sudo apt-get update sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant sudo systemctl enable --now libvirtd - sudo apt-get build-dep -y vagrant ruby-libvirt + sudo apt-get build-dep -y ruby-libvirt sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev sudo vagrant plugin install vagrant-libvirt - name: Boot VM From 1db0064c6af91c6b94c5bd0241d33b6cd0015478 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Fri, 11 Oct 2024 19:26:53 +0900 Subject: [PATCH 4/4] CI: install OVMF for Vagrant Signed-off-by: Akihiro Suda --- .github/workflows/ci.yml | 4 +++- Vagrantfile | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a5e3391e..9f2b315d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -566,7 +566,9 @@ jobs: 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/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources sudo apt-get update - sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant + sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant ovmf + # https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1725#issuecomment-1454058646 + sudo cp /usr/share/OVMF/OVMF_VARS_4M.fd /var/lib/libvirt/qemu/nvram/ sudo systemctl enable --now libvirtd sudo apt-get build-dep -y ruby-libvirt sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev diff --git a/Vagrantfile b/Vagrantfile index 937c371e1..0cc419d8b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -35,7 +35,10 @@ Vagrant.configure("2") do |config| v.memory = memory v.cpus = cpus v.machine_virtual_size = disk_size - v.loader = "/usr/share/OVMF/OVMF_CODE.fd" + # https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1725#issuecomment-1454058646 + # Needs `sudo cp /usr/share/OVMF/OVMF_VARS_4M.fd /var/lib/libvirt/qemu/nvram/` + v.loader = '/usr/share/OVMF/OVMF_CODE_4M.fd' + v.nvram = '/var/lib/libvirt/qemu/nvram/OVMF_VARS_4M.fd' end config.vm.synced_folder ".", "/vagrant", type: "rsync"