From cde109747a8d3379c63de49d94c1476b175243ee Mon Sep 17 00:00:00 2001 From: EnumDev Date: Tue, 7 Apr 2026 18:45:25 +0300 Subject: [PATCH] Add esvm service file --- pkg.info | 6 ++---- source-files/apparmor.esv | 6 ++++++ source.sh | 8 +++++++- 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 source-files/apparmor.esv diff --git a/pkg.info b/pkg.info index 45325ae..8f6ebec 100644 --- a/pkg.info +++ b/pkg.info @@ -1,9 +1,7 @@ name: apparmor -description: |- - Mandatory Access Control (MAC) mechanism which uses the - Linux Security Module (LSM) framework +description: Mandatory Access Control (MAC) mechanism which uses the Linux Security Module (LSM) framework version: 4.1.7 -revision: 1 +revision: 2 url: https://gitlab.com/apparmor/apparmor license: GPL2-only maintainers: diff --git a/source-files/apparmor.esv b/source-files/apparmor.esv new file mode 100644 index 0000000..4b25fb3 --- /dev/null +++ b/source-files/apparmor.esv @@ -0,0 +1,6 @@ +name: apparmor +description: load AppArmor profiles +type: simple +start_cmd: /usr/lib/apparmor/apparmor.systemd restart +stop_cmd: /usr/lib/apparmor/apparmor.systemd stop +exit_method: stop_command diff --git a/source.sh b/source.sh index 9f6937a..ae0a3ff 100644 --- a/source.sh +++ b/source.sh @@ -28,10 +28,16 @@ build() { package() { make -C libraries/libapparmor DESTDIR="$BPM_OUTPUT" install make -C binutils DESTDIR="$BPM_OUTPUT" install - make -C parser DESTDIR="$BPM_OUTPUT" SBINDIR="$BPM_OUTPUT"/usr/sbin APPARMOR_BIN_PREFIX="$BPM_OUTPUT"/usr/lib/apparmor install + make -C parser -j1 DESTDIR="$BPM_OUTPUT" SBINDIR="$BPM_OUTPUT"/usr/sbin APPARMOR_BIN_PREFIX="$BPM_OUTPUT"/usr/lib/apparmor install install-systemd make -C profiles DESTDIR="$BPM_OUTPUT" install make -C utils DESTDIR="$BPM_OUTPUT" install + # Install esvm service + install -Dm644 "$BPM_WORKDIR"/apparmor.esv "$BPM_OUTPUT"/etc/esvm/services/apparmor.esv + + # Remove systemd directory + rm -r "$BPM_OUTPUT"/usr/lib/systemd + # Set file mode to allow the perl library to be stripped: # https://gitlab.com/apparmor/apparmor/issues/34 find "$BPM_OUTPUT"/usr/lib/perl/ -type f -iname "*.so" -exec chmod 755 {} \;