2021-12-02 13:35:13 +01:00
|
|
|
name: Ubuntu
|
|
|
|
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-05-21 19:17:29 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2024-01-23 15:08:52 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
mode:
|
|
|
|
- default
|
2024-01-25 22:18:09 +01:00
|
|
|
- full-system-policy
|
2021-12-02 13:35:13 +01:00
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Check out repository code
|
2023-03-03 13:13:57 +01:00
|
|
|
uses: actions/checkout@v3
|
2021-12-02 13:35:13 +01:00
|
|
|
|
|
|
|
- name: Install Build dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update -q
|
|
|
|
sudo apt-get install -y \
|
2022-10-16 13:05:28 +02:00
|
|
|
devscripts debhelper config-package-dev \
|
2023-01-27 23:07:19 +01:00
|
|
|
auditd apparmor-profiles apparmor-utils
|
2022-03-31 22:19:30 +02:00
|
|
|
sudo rm /etc/apparmor.d/usr.lib.snapd.snap-confine.real
|
2021-12-02 13:35:13 +01:00
|
|
|
|
|
|
|
- name: Build the apparmor.d package
|
2023-01-28 20:21:18 +01:00
|
|
|
run: |
|
2024-01-23 15:08:52 +01:00
|
|
|
if [[ ${{ matrix.mode }} == full-system-policy ]]; then
|
|
|
|
echo -e "\noverride_dh_auto_build:\n\tmake full" >> debian/rules
|
|
|
|
fi
|
2023-01-28 20:21:18 +01:00
|
|
|
VERSION="0.$(git rev-list --count HEAD)-1"
|
|
|
|
dch --newversion="$VERSION" --urgency=medium --distribution=stable --controlmaint "Release $VERSION"
|
|
|
|
dpkg-buildpackage -b -d --no-sign
|
2021-12-02 13:35:13 +01:00
|
|
|
|
|
|
|
- name: Install apparmor.d
|
2023-09-21 12:20:51 +02:00
|
|
|
run: sudo dpkg --install ../apparmor.d_*_amd64.deb
|
2021-12-02 13:35:13 +01:00
|
|
|
|
2022-05-21 19:17:29 +02:00
|
|
|
- name: Reload AppArmor
|
|
|
|
run: |
|
|
|
|
sudo systemctl restart apparmor.service || true
|
|
|
|
sudo systemctl status apparmor.service
|
2021-12-02 13:35:13 +01:00
|
|
|
|
2023-09-03 21:19:53 +02:00
|
|
|
- name: Ensure compatibility with some AppArmor userspace tools
|
|
|
|
run: sudo aa-enforce /etc/apparmor.d/aa-notify
|
|
|
|
|
|
|
|
- name: Show AppArmor log and rules
|
2023-03-03 13:13:57 +01:00
|
|
|
run: |
|
|
|
|
sudo aa-log
|
|
|
|
sudo aa-log -s
|
2023-09-03 21:19:53 +02:00
|
|
|
sudo aa-log -r
|
2022-10-01 19:39:20 +02:00
|
|
|
|
|
|
|
- name: Show Number of loaded profile
|
|
|
|
run: sudo aa-status --profiled
|