Add automatic apparmor tag discovery

The 'apparmor' build tag is now added if libappamor was found on the
local system.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>

Closes: #1763
Approved by: rhatdan
This commit is contained in:
Sascha Grunert 2019-08-05 13:55:56 +02:00 committed by Atomic Bot
parent ac5031de80
commit 1de958dc99
2 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
SELINUXTAG := $(shell ./selinux_tag.sh)
APPARMORTAG := $(shell hack/apparmor_tag.sh)
STORAGETAGS := $(shell ./btrfs_tag.sh) $(shell ./btrfs_installed_tag.sh) $(shell ./libdm_tag.sh) $(shell ./ostree_tag.sh)
SECURITYTAGS ?= seccomp $(SELINUXTAG)
SECURITYTAGS ?= seccomp $(SELINUXTAG) $(APPARMORTAG)
TAGS ?= $(SECURITYTAGS) $(STORAGETAGS)
BUILDTAGS += $(TAGS)
PREFIX := /usr/local

4
hack/apparmor_tag.sh Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
if pkg-config libapparmor 2>/dev/null; then
echo apparmor
fi