sys-apps/apparmor-utils: add 4.1.7

Closes: https://bugs.gentoo.org/963085
Signed-off-by: David Roman <stkw0@disroot.org>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/910
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
David Roman
2026-05-17 20:52:43 +02:00
committed by Sam James
parent a5092f75ce
commit ad80725b67
2 changed files with 96 additions and 0 deletions

View File

@@ -1,2 +1,3 @@
DIST apparmor-3.1.4.tar.gz 7965268 BLAKE2B a9be29a42bb96c1d2c69a6b7627d59aea023f22fe79bff1a487aa5ddd6845ec98f67be5c597ec51edf4493513dfed3b43fc493f454bcf48b3f43c44572ffc2ae SHA512 db65edfa1b9c1f953940165e71dddcab9a2d378f29683b0b4e5d44f0810bb0105ba3820ba89de927ef90d0a94ea6d61e91ce3de09ec2e385817735a93d4039c4
DIST apparmor-4.0.3.tar.gz 8211339 BLAKE2B 715391a1fc0fb57b820a8bcebdc76ae96e436a29546b9c47019f10f4d22942431ba5c878d92bb61b47ff17012e026195b8d7d78a329cc1cc182a31bc3b512e63 SHA512 8b1240ec56fe4f987edcda9380de685e36f4ac931772e980a8f3655dfbfd7e337a4b15227c7ceecb87d9a2bb592e466ec39912ef8f2fa59f8802464d72df8da2
DIST apparmor-v4.1.7.tar.bz2 5861899 BLAKE2B 00f881cbe989a686fbc7c0f6178b8b1892767378bb8da79a4656a8abfb222212037751e7c2ce2ca558c1ca2398684452ad10056b7e3eb1dd354155dbe688f78d SHA512 ac39de21042be5c85c1cac07082444772b506e0701ec0d3300d5515f14b3673a485ab37aeb38e3533a236b03ecf9a0e1032bbdd296e878e68b93472ebc8fd1ae

View File

@@ -0,0 +1,95 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{12..14} )
inherit distutils-r1 toolchain-funcs desktop
MY_PV="$(ver_cut 1-2)"
DESCRIPTION="Additional userspace utils to assist with AppArmor profile management"
HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home"
SRC_URI="https://gitlab.com/apparmor/apparmor/-/archive/v${PV}/apparmor-v${PV}.tar.bz2"
S=${WORKDIR}/apparmor-v${PV}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
# Needs fixing to use the right Python
RESTRICT="test"
COMMON_DEPEND="
~sys-libs/libapparmor-${PV}
${PYTHON_DEPS}
"
DEPEND="
${COMMON_DEPEND}
sys-devel/gettext
"
RDEPEND="
${COMMON_DEPEND}
dev-python/notify2[${PYTHON_USEDEP}]
dev-python/psutil[${PYTHON_USEDEP}]
~sys-apps/apparmor-${PV}
~sys-libs/libapparmor-${PV}[python,${PYTHON_USEDEP}]
"
src_prepare() {
default
sed -i binutils/Makefile \
-e 's/Bstatic/Bdynamic/g' || die
sed -i utils/aa-remove-unknown \
-e 's#^\(APPARMOR_FUNCTIONS=\).*#\1/usr/libexec/rc.apparmor.functions#' || die
}
src_compile() {
python_setup
pushd utils > /dev/null || die
# launches non-make subprocesses causing "make jobserver unavailable"
# error messages to appear in generated code
emake -j1
popd > /dev/null || die
pushd binutils > /dev/null || die
export EXTRA_CFLAGS="${CFLAGS}"
emake CC="$(tc-getCC)" USE_SYSTEM=1
popd > /dev/null || die
}
src_test() {
pushd utils > /dev/null || die
python_foreach_impl emake USE_SYSTEM=1 PYFLAKES=true check
popd > /dev/null || die
}
src_install() {
pushd utils > /dev/null || die
emake DESTDIR="${D}" VIM_INSTALL_PATH="${D}/usr/share/vim/vimfiles/syntax" install
install_python() {
local -x PYTHONDONTWRITEBYTECODE=
"${PYTHON}" "${S}"/utils/python-tools-setup.py install \
--prefix="${EPREFIX}"/usr \
--root="${D}" \
--optimize 2 \
--version=${PV} || die
}
python_foreach_impl install_python
python_replicate_script "${D}"/usr/bin/aa-easyprof \
"${D}"/usr/sbin/aa-{audit,autodep,cleanprof,complain,disable,enforce,genprof,logprof,mergeprof,notify,unconfined}
python_optimize
sed -i 's$/usr/bin/aa-notify$/usr/sbin/aa-notify$g' aa-notify.desktop || die
domenu aa-notify.desktop
popd > /dev/null || die
pushd binutils > /dev/null || die
emake install DESTDIR="${D}" USE_SYSTEM=1
popd > /dev/null || die
}