tests(packer): enable apparmor debug in tests image.

This commit is contained in:
Alexandre Pujol 2024-10-01 17:49:43 +01:00
parent 8730c09b96
commit 08a6f8fb0b
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
6 changed files with 20 additions and 8 deletions

View File

@ -2,7 +2,7 @@
defaults:
uefi: true
ram: '6144'
ram: '4096'
cpu: '6'
boxes:
@ -14,6 +14,10 @@ boxes:
box: aa-archlinux-kde
uefi: false
- name: arch-xfce
box: aa-archlinux-xfce
uefi: false
- name: arch-server
box: aa-archlinux-server
uefi: false

View File

@ -77,7 +77,7 @@ write_files:
- path: /etc/default/grub
append: true
content: |
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT lsm=landlock,lockdown,yama,integrity,apparmor,bpf"
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT lsm=landlock,lockdown,yama,integrity,apparmor,bpf apparmor.debug=1"
# Set some bash aliases
- path: /etc/skel/.bashrc

View File

@ -79,7 +79,7 @@ write_files:
- path: /etc/default/grub
append: true
content: |
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT lsm=landlock,lockdown,yama,integrity,apparmor,bpf"
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT lsm=landlock,lockdown,yama,integrity,apparmor,bpf apparmor.debug=1"
# Set some bash aliases
- path: /etc/skel/.bashrc

View File

@ -56,7 +56,7 @@ write_files:
- path: /etc/default/grub
append: true
content: |
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT lsm=landlock,lockdown,yama,integrity,apparmor,bpf"
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT lsm=landlock,lockdown,yama,integrity,apparmor,bpf apparmor.debug=1"
# Set some bash aliases
- path: /etc/skel/.bashrc

View File

@ -24,8 +24,13 @@ main() {
install -Dm0755 $SRC/aa-log-clean /usr/bin/aa-log-clean
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/*.pkg.tar.zst ;;
arch)
pacman --noconfirm -U $SRC/*.pkg.tar.zst
systemctl start apparmor.service
;;
debian | ubuntu)
apt-get update -y
apt-get install -y apparmor-profiles build-essential config-package-dev \
@ -34,8 +39,9 @@ main() {
;;
opensuse*)
mv "/home/$SUDO_USER/.bash_aliases" "/home/$SUDO_USER/.alias"
zypper install -y bash-completion git go htop make rsync vim
sudo rpm -i $SRC/*.rpm
rpm -i $SRC/*.rpm
;;
esac

View File

@ -19,12 +19,14 @@ package_update: true
package_upgrade: true
package_reboot_if_required: false
packages:
- apparmor-profiles
- bash-completion
- distribution-release
- git
- go
- golang-packaging
- htop
- make
- rsync
- rpmbuild
- vim
write_files: