build: compatibility for debian.

This commit is contained in:
Alexandre Pujol 2022-06-14 19:39:04 +01:00
parent aea0b5d1d9
commit 32e36b0c4a
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 29 additions and 6 deletions

10
configure vendored
View file

@ -5,7 +5,7 @@
set -eu
DISTRIBUTION="$(lsb_release --id --short)"
DISTRIBUTION="${DIST:-$(lsb_release --id --short)}"
readonly DISTRIBUTION="${DISTRIBUTION,,}"
readonly ROOT=.build
@ -63,15 +63,13 @@ configure() {
;;
debian|ubuntu)
if [[ "$DISTRIBUTION" == "debian" ]]; then
_msg "$DISTRIBUTION does not have etc tunable."
sed -i -e '/etc/d' "$ROOT/apparmor.d/tunables/global"
debian|ubuntu|whonix)
if [[ "$DISTRIBUTION" != "ubuntu" ]]; then
_msg "$DISTRIBUTION does not support abi 3.0 yet."
find "$ROOT/apparmor.d" -type f -exec sed -e '/abi /d' -i {} \;
cp -a dists/debian/abstractions/* $ROOT/apparmor.d/abstractions
cp -a dists/debian/tunables/* $ROOT/apparmor.d/tunables
fi
_msg "Configure libexec."