From 1f3da81d5a8e060083667752f54c5716ed5984a9 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sun, 17 Mar 2024 23:20:05 +0000 Subject: [PATCH] tests: fix pkg outpout directory. --- Makefile | 5 +++-- dists/build.sh | 3 +-- tests/packer/src/aa-update | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index cce0f644..1caed67f 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ DESTDIR ?= / BUILD := .build +PKGDEST := /tmp/pkg PKGNAME := apparmor.d P = $(filter-out dpkg,$(notdir $(wildcard ${BUILD}/apparmor.d/*))) @@ -74,11 +75,11 @@ pkg: dpkg: @bash dists/build.sh dpkg - @sudo dpkg -i ${PKGNAME}_*.deb + @sudo dpkg -i ${PKGDEST}/${PKGNAME}_*.deb rpm: @bash dists/build.sh rpm - @sudo rpm -ivh --force ${PKGNAME}-*.rpm + @sudo rpm -ivh --force ${PKGDEST}/${PKGNAME}-*.rpm tests: @go test ./cmd/... -v -cover -coverprofile=coverage.out diff --git a/dists/build.sh b/dists/build.sh index 8cc1f82c..c1d7b204 100644 --- a/dists/build.sh +++ b/dists/build.sh @@ -8,8 +8,7 @@ set -eu -o pipefail readonly COMMAND="$1" -readonly OUTPUT="$PWD" -readonly PKGDEST="${PKGDEST:-$PWD}" +readonly OUTPUT="${PKGDEST:-$PWD}" readonly PKGNAME=apparmor.d VERSION="0.$(git rev-list --count HEAD)" readonly VERSION diff --git a/tests/packer/src/aa-update b/tests/packer/src/aa-update index a5683291..747d0101 100644 --- a/tests/packer/src/aa-update +++ b/tests/packer/src/aa-update @@ -23,6 +23,3 @@ debian | ubuntu | whonix) opensuse*) make rpm ;; *) ;; esac - -sudo rm -rf /etc/apparmor/earlypolicy/ -sudo systemctl restart apparmor || sudo systemctl status apparmor