build: remove displace file.

This commit is contained in:
Alexandre Pujol 2023-03-27 23:08:44 +01:00
parent faa57d99f8
commit a0c47eb26d
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
2 changed files with 3 additions and 22 deletions

18
configure vendored
View File

@ -14,14 +14,6 @@ _warning() { printf ' Warning: %s\n' "$*" >&2; }
_title() { printf '%s\n' "$*" >&2; } _title() { printf '%s\n' "$*" >&2; }
_msg() { printf ' - %s\n' "$*" >&2; } _msg() { printf ' - %s\n' "$*" >&2; }
# Displace files in the package sources
# $@ List of files to displace
_displace_files() {
for path in "$@"; do
mv "${ROOT:?}/$path" "${ROOT:?}/$path.apparmor.d"
done
}
# Process management function to run a function over all the profile files # Process management function to run a function over all the profile files
# $1 The function to run # $1 The function to run
# $2 Usage message to print # $2 Usage message to print
@ -81,7 +73,7 @@ configure() {
arch|endeavouros|cachyos|manjarolinux) arch|endeavouros|cachyos|manjarolinux)
_msg "Configure libexec." _msg "Configure libexec."
LIBEXEC="/{usr/,}lib" LIBEXEC="/{usr/,}lib"
sed -i -e '/Debian/d' "$ROOT/apparmor.d/tunables/extend" sed -i -e '/Debian/d' "$ROOT/apparmor.d/tunables/etc.d/apparmor.d"
;; ;;
debian|ubuntu|whonix|core) debian|ubuntu|whonix|core)
@ -99,16 +91,12 @@ configure() {
_msg "Configure libexec." _msg "Configure libexec."
LIBEXEC="/{usr/,}libexec" LIBEXEC="/{usr/,}libexec"
sed -i -e '/Archlinux/d' "$ROOT/apparmor.d/tunables/extend" sed -i -e '/Archlinux/d' "$ROOT/apparmor.d/tunables/etc.d/apparmor.d"
_msg "Displace overwritten files."
_displace_files apparmor.d/tunables/global \
apparmor.d/tunables/xdg-user-dirs apparmor.d/abstractions/trash
;; ;;
opensuse) opensuse)
LIBEXEC="/{usr/,}libexec" LIBEXEC="/{usr/,}libexec"
sed -i -e '/Archlinux/d' "$ROOT/apparmor.d/tunables/extend" sed -i -e '/Archlinux/d' "$ROOT/apparmor.d/tunables/etc.d/apparmor.d"
;; ;;
*) _die "$DISTRIBUTION is not a supported distribution." ;; *) _die "$DISTRIBUTION is not a supported distribution." ;;

View File

@ -1,7 +0,0 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
/etc/apparmor.d/tunables/global.apparmor.d
/etc/apparmor.d/tunables/xdg-user-dirs.apparmor.d
/etc/apparmor.d/abstractions/trash.apparmor.d