tests(packer): cleanup package install process.

- apparmor restart is handled by the package
- it is a dev version, so it could fail.
This commit is contained in:
Alexandre Pujol 2025-08-30 11:46:40 +02:00
parent 2bae05d309
commit 1122f28cac
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC

View file

@ -27,27 +27,21 @@ main() {
case "$DISTRIBUTION" in
arch)
rm -f $SRC/*.sig # Ignore signature files
pacman --noconfirm -U $SRC/*.pkg.tar.zst
rm -f $SRC/*enforced* # Ignore enforced package
pacman --noconfirm -U $SRC/*.pkg.tar.zst || true
;;
debian | ubuntu)
apt install -y apparmor-profiles
apt-get install -y apparmor-profiles
dpkg -i $SRC/*.deb || true
;;
opensuse*)
mv "/home/$SUDO_USER/.bash_aliases" "/home/$SUDO_USER/.alias"
rpm -i $SRC/*.rpm
rpm -i $SRC/*.rpm || true
;;
esac
verb="start"
rm -rf /var/cache/apparmor/* || true
if systemctl is-active -q apparmor; then
verb="reload"
fi
systemctl "$verb" apparmor.service || journalctl -xeu apparmor.service
}
main "$@"