commit: 06b744e3a820e7b3e8391e2fd06f50493bb01ec0 Author: Ao Luo <myloveyuxuan <AT> gmail <DOT> com> AuthorDate: Tue Mar 12 05:40:07 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Feb 10 02:38:37 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06b744e3
sys-apps/apparmor: Fix hardcoded paths for loading apparmor functions Closes: https://bugs.gentoo.org/895302 Signed-off-by: Ao Luo <myloveyuxuan <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/35698 Signed-off-by: Sam James <sam <AT> gentoo.org> ...armor-3.1.4.ebuild => apparmor-3.1.4-r2.ebuild} | 1 + .../files/apparmor-3.1.4-fix-hardcoded-path.patch | 34 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/sys-apps/apparmor/apparmor-3.1.4.ebuild b/sys-apps/apparmor/apparmor-3.1.4-r2.ebuild similarity index 97% rename from sys-apps/apparmor/apparmor-3.1.4.ebuild rename to sys-apps/apparmor/apparmor-3.1.4-r2.ebuild index 141029aefee8..2e87cb1c0fdf 100644 --- a/sys-apps/apparmor/apparmor-3.1.4.ebuild +++ b/sys-apps/apparmor/apparmor-3.1.4-r2.ebuild @@ -36,6 +36,7 @@ S=${WORKDIR}/apparmor-${PV}/parser PATCHES=( "${FILESDIR}/${PN}-3.0.5-makefile.patch" "${FILESDIR}/${PN}-2.11.1-dynamic-link.patch" + "${FILESDIR}/${PN}-3.1.4-fix-hardcoded-path.patch" ) src_prepare() { diff --git a/sys-apps/apparmor/files/apparmor-3.1.4-fix-hardcoded-path.patch b/sys-apps/apparmor/files/apparmor-3.1.4-fix-hardcoded-path.patch new file mode 100644 index 000000000000..6e7c83d766e4 --- /dev/null +++ b/sys-apps/apparmor/files/apparmor-3.1.4-fix-hardcoded-path.patch @@ -0,0 +1,34 @@ +https://bugs.gentoo.org/895302 +--- a/apparmor.systemd ++++ b/apparmor.systemd +@@ -15,7 +15,7 @@ + # along with this program; if not, contact Novell, Inc. + # ---------------------------------------------------------------------- + +-APPARMOR_FUNCTIONS=/lib/apparmor/rc.apparmor.functions ++APPARMOR_FUNCTIONS=/usr/libexec/rc.apparmor.functions + + aa_action() + { +--- a/profile-load ++++ b/profile-load +@@ -21,7 +21,7 @@ + + [ -z "$1" ] && exit 1 # require a profile name + +-. /lib/apparmor/rc.apparmor.functions ++. /usr/libexec/rc.apparmor.functions + + # do not load in a container + if [ -x /usr/bin/systemd-detect-virt ] && \ +--- a/rc.apparmor.slackware ++++ b/rc.apparmor.slackware +@@ -18,7 +18,7 @@ + # rc.apparmor by Steve Beattie + # + # /etc/rc.d/rc.apparmor +-APPARMOR_FUNCTIONS=/lib/apparmor/rc.apparmor.functions ++APPARMOR_FUNCTIONS=/usr/libexec/rc.apparmor.functions + + aa_action() { + STRING=$1
