From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AD727138350 for ; Tue, 21 Apr 2020 08:52:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CB840E08DB; Tue, 21 Apr 2020 08:52:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9D4A3E08DB for ; Tue, 21 Apr 2020 08:52:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CA99F34EF99 for ; Tue, 21 Apr 2020 08:51:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D6DE9C for ; Tue, 21 Apr 2020 08:51:57 +0000 (UTC) From: "Michael Palimaka" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Palimaka" Message-ID: <1587459100.581faf5cb87285e09e312857f43c310c62378585.kensington@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/apparmor-utils/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/apparmor-utils/apparmor-utils-2.13.4-r1.ebuild X-VCS-Directories: sys-apps/apparmor-utils/ X-VCS-Committer: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: 581faf5cb87285e09e312857f43c310c62378585 X-VCS-Branch: master Date: Tue, 21 Apr 2020 08:51:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a86503a5-f62c-4e0f-a144-a6909ad3b664 X-Archives-Hash: 5b22d66a76932627133d9c2e1481527c commit: 581faf5cb87285e09e312857f43c310c62378585 Author: Michael Palimaka gentoo org> AuthorDate: Tue Apr 21 08:51:16 2020 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Tue Apr 21 08:51:40 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=581faf5c sys-apps/apparmor-utils: improve python handling * Add Python 3.7 * Fix dependencies * Fix missing byte compilation Closes: https://bugs.gentoo.org/718514 Package-Manager: Portage-2.3.89, Repoman-2.3.22 Signed-off-by: Michael Palimaka gentoo.org> .../apparmor-utils/apparmor-utils-2.13.4-r1.ebuild | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/sys-apps/apparmor-utils/apparmor-utils-2.13.4-r1.ebuild b/sys-apps/apparmor-utils/apparmor-utils-2.13.4-r1.ebuild new file mode 100644 index 00000000000..58da9b5985d --- /dev/null +++ b/sys-apps/apparmor-utils/apparmor-utils-2.13.4-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{3_6,3_7} ) +inherit eapi7-ver 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" +IUSE="" +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 + 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/apparmor_status \ + "${D}"/usr/sbin/aa-{audit,autodep,cleanprof,complain,disable,enforce,genprof,logprof,mergeprof,status,unconfined} + popd > /dev/null || die + + pushd binutils > /dev/null || die + emake install DESTDIR="${D}" USE_SYSTEM=1 + popd > /dev/null || die +}