summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsathieu <msathieu@outlook.com>2021-11-03 08:04:42 +0100
committerSam James <sam@gentoo.org>2021-11-12 02:08:32 +0000
commit3d1a908aae2b75a99155f9e5b477aa0bbb1433f7 (patch)
tree7dc79098790790709618fea8e26269aec32c5c0e /sys-apps/apparmor-utils
parentsys-apps/apparmor: update to 3.0.3 (diff)
downloadgentoo-3d1a908aae2b75a99155f9e5b477aa0bbb1433f7.tar.gz
gentoo-3d1a908aae2b75a99155f9e5b477aa0bbb1433f7.tar.bz2
gentoo-3d1a908aae2b75a99155f9e5b477aa0bbb1433f7.zip
sys-apps/apparmor-utils: update to 3.0.3
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Mathieu Strypsteen <msathieu@outlook.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps/apparmor-utils')
-rw-r--r--sys-apps/apparmor-utils/Manifest1
-rw-r--r--sys-apps/apparmor-utils/apparmor-utils-3.0.3.ebuild87
2 files changed, 88 insertions, 0 deletions
diff --git a/sys-apps/apparmor-utils/Manifest b/sys-apps/apparmor-utils/Manifest
index 385711733914..76c9ff7d636a 100644
--- a/sys-apps/apparmor-utils/Manifest
+++ b/sys-apps/apparmor-utils/Manifest
@@ -1 +1,2 @@
DIST apparmor-3.0.1.tar.gz 7785713 BLAKE2B c530d159a4139de8e59d9d975af866259b56d555e3abe2d1e2a6bfd2db57d8371d643bb93f1cd6ca96172960c09a74cc05c82d34a2e253c4c1f6ecce747f4129 SHA512 e1073e7b2cde7cc4cefcfddce8fa5069845b5873c260b9fbd4bea2ff801708101d813ff30e23a64da36f3c6394cd9339e01a170e9add69deef2d70ecd9ed9687
+DIST apparmor-3.0.3.tar.gz 7790012 BLAKE2B aada9c32c2cde4a110cbd1d626ec00b08e29e76182185752e5c23e2ec0c2668a732ffdf1eb1660bd8bc294188ccf0da42b4282939f5969a6aed39084be00769c SHA512 bbf26377e60da60dab56473ee5af15aa0f3fdf2f2a61dbfcdeba12a925afda3bc6a0f6cc31e07927400425b8c3b3649833f448d8674044c7274ef06923ab48b5
diff --git a/sys-apps/apparmor-utils/apparmor-utils-3.0.3.ebuild b/sys-apps/apparmor-utils/apparmor-utils-3.0.3.ebuild
new file mode 100644
index 000000000000..00aa102d612f
--- /dev/null
+++ b/sys-apps/apparmor-utils/apparmor-utils-3.0.3.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python{3_7,3_8,3_9} )
+inherit perl-module python-r1 toolchain-funcs
+
+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://launchpad.net/apparmor/${MY_PV}/${PV}/+download/apparmor-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RESTRICT="test"
+
+COMMON_DEPEND="
+ dev-lang/perl
+ ~sys-libs/libapparmor-${PV}
+ ${PYTHON_DEPS}"
+DEPEND="${COMMON_DEPEND}
+ sys-devel/gettext
+"
+RDEPEND="${COMMON_DEPEND}
+ ~sys-libs/libapparmor-${PV}[perl,python,${PYTHON_USEDEP}]
+ ~sys-apps/apparmor-${PV}
+ dev-perl/Locale-gettext
+ dev-perl/RPC-XML
+ dev-perl/TermReadKey
+ dev-python/notify2[${PYTHON_USEDEP}]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ virtual/perl-Data-Dumper
+ virtual/perl-Getopt-Long"
+
+S=${WORKDIR}/apparmor-${PV}
+
+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_install() {
+ pushd utils > /dev/null || die
+ perl_set_version
+ emake DESTDIR="${D}" PERLDIR="${D}/${VENDOR_LIB}/Immunix" \
+ VIM_INSTALL_PATH="${D}/usr/share/vim/vimfiles/syntax" install
+
+ install_python() {
+ local -x PYTHONDONTWRITEBYTECODE=
+ "${PYTHON}" "${S}"/utils/python-tools-setup.py install --prefix=/usr \
+ --root="${D}" --optimize 2
+ }
+
+ 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,unconfined}
+ popd > /dev/null || die
+
+ pushd binutils > /dev/null || die
+ emake install DESTDIR="${D}" USE_SYSTEM=1
+ popd > /dev/null || die
+}