From 3372593fc265a0f48d48d7051f3a677a3dc188dc Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sun, 1 Oct 2023 16:02:18 +0100 Subject: [PATCH] test: minor test VM creatiom fixes --- tests/Makefile | 4 ++-- tests/packer/builds.pkr.hcl | 4 ++-- tests/packer/init/init.sh | 7 +++---- tests/packer/init/ubuntu-desktop.user-data.yml | 1 - 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index cb9c4bfa..2f48f116 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -12,8 +12,8 @@ flavor ?= disk ?= 10G -VERSION := 0.$(shell git rev-list --count HEAD)-1 -BASE = archlinux debian ubuntu opensuse +VERSION := 0.$(shell git rev-list --count HEAD) +BASE = archlinux debian ubuntu opensuse fedora .PHONY: ${BASE} lint diff --git a/tests/packer/builds.pkr.hcl b/tests/packer/builds.pkr.hcl index a5f538ac..a977803e 100644 --- a/tests/packer/builds.pkr.hcl +++ b/tests/packer/builds.pkr.hcl @@ -21,7 +21,7 @@ build { provisioner "file" { only = ["qemu.archlinux-gnome", "qemu.archlinux-kde"] destination = "/tmp/src/" - sources = ["${path.cwd}/../apparmor.d-${var.version}-x86_64.pkg.tar.zst"] + sources = ["${path.cwd}/../apparmor.d-${var.version}-1-x86_64.pkg.tar.zst"] } provisioner "file" { @@ -33,7 +33,7 @@ build { provisioner "file" { only = ["qemu.debian-server", "qemu.ubuntu-server", "qemu.ubuntu-desktop"] destination = "/tmp/src/" - sources = ["${path.cwd}/../apparmor.d_${var.version}_amd64.deb"] + sources = ["${path.cwd}/../apparmor.d_${var.version}-1_amd64.deb"] } # Wait for cloud-init to finish diff --git a/tests/packer/init/init.sh b/tests/packer/init/init.sh index 11b5e4fa..7a62a384 100644 --- a/tests/packer/init/init.sh +++ b/tests/packer/init/init.sh @@ -22,21 +22,20 @@ main() { install -Dm0644 $SRC/site.local /etc/apparmor.d/tunables/multiarch.d/site.local install -Dm0755 $SRC/aa-update /usr/bin/aa-update install -Dm0755 $SRC/aa-log-clean /usr/bin/aa-log-clean - install -Dm0755 $SRC/aa-test /usr/bin/aa-test cat $SRC/parser.conf >> /etc/apparmor/parser.conf chown -R "$SUDO_USER:$SUDO_USER" "/home/$SUDO_USER/.config/" case "$DISTRIBUTION" in - arch) pacman --noconfirm -U $SRC/apparmor.d-*-x86_64.pkg.tar.zst ;; + arch) pacman --noconfirm -U $SRC/*.pkg.tar.zst ;; debian | ubuntu) apt-get update -y apt-get install -y apparmor-profiles build-essential config-package-dev \ debhelper devscripts htop rsync vim - dpkg -i $SRC/apparmor.d_*_all.deb + dpkg -i $SRC/*.deb ;; opensuse*) zypper install -y bash-completion git go htop make rsync vim - sed -i -e '/cache-loc/d' /etc/apparmor/parser.conf + sudo rpm -i $SRC/*.rpm ;; esac diff --git a/tests/packer/init/ubuntu-desktop.user-data.yml b/tests/packer/init/ubuntu-desktop.user-data.yml index 3abbc289..d66e9680 100644 --- a/tests/packer/init/ubuntu-desktop.user-data.yml +++ b/tests/packer/init/ubuntu-desktop.user-data.yml @@ -37,7 +37,6 @@ packages: snap: commands: - install firefox - - install gnome-3-38-2004 - install gtk-common-themes - install snap-store - install snapd-desktop-integration