From a30fda0ad72ece0e53fc181bd14f08e686b7428d Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Mon, 27 Sep 2021 20:32:30 +0100 Subject: [PATCH] Add option to set complain flag on all profiles. --- configure | 35 +++++++++++++++++++++++++++++++++-- debian/rules | 4 ++-- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/configure b/configure index f8320b65..e4a38d01 100755 --- a/configure +++ b/configure @@ -8,6 +8,14 @@ readonly ROOT=.build _die() { printf '%s\n' "$*" >&2 && exit 1; } _warning() { printf ' Warning: %s\n' "$*" >&2; } +has_option() { + local item option="$1"; + for item in "${OPTIONS[@]}"; do + [[ "$item" == "$option" ]] && return 0 + done + return 1 +} + # Displace files in the package sources # $@ List of files to displace _displace_files() { @@ -52,7 +60,7 @@ configure() { "${ROOT:?}"/root/usr/share/libalpm/hooks/apparmor.hook echo " Debian does not support abi 3.0 yet." - find "$ROOT/apparmor.d" -type f -exec sed -i -e "s;abi ,;;" {} \; + find "$ROOT/apparmor.d" -type f -exec sed -e '/abi /d' -i {} \; echo " Debian does not have etc tunable." sed -i -e '/etc/d' "$ROOT/apparmor.d/tunables/global" @@ -100,6 +108,25 @@ setflags() { fi done # -#export DH_VERBOSE=1 +DH_OPTIONS ?= %: dh $@ --with=config-package override_dh_auto_configure: - ./configure --distribution=debian + ./configure --distribution=debian --options=$(DH_OPTIONS) override_dh_install: mv systemd system