commit:     d17bd7b6d3871a0ab6a9af8d42bc1a222d1c50b7
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 25 10:31:51 2018 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sun Nov 25 10:32:13 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d17bd7b6

sys-apps/apparmor: backport patch from upstream fixing syntax error

Closes: https://bugs.gentoo.org/671426
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org>

 sys-apps/apparmor/apparmor-2.13.1-r1.ebuild        | 65 ++++++++++++++++++++++
 .../apparmor/files/apparmor-2.13.1-syntax.patch    | 29 ++++++++++
 2 files changed, 94 insertions(+)

diff --git a/sys-apps/apparmor/apparmor-2.13.1-r1.ebuild 
b/sys-apps/apparmor/apparmor-2.13.1-r1.ebuild
new file mode 100644
index 00000000000..b14dc3e4420
--- /dev/null
+++ b/sys-apps/apparmor/apparmor-2.13.1-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd toolchain-funcs
+
+MY_PV="$(ver_cut 1-2)"
+
+DESCRIPTION="Userspace utils and init scripts for the AppArmor application 
security system"
+HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home";
+SRC_URI="https://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${PN}-${PV}.tar.gz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc"
+
+RDEPEND="~sys-libs/libapparmor-${PV}"
+DEPEND="${RDEPEND}
+       dev-lang/perl
+       sys-devel/bison
+       sys-devel/flex
+       doc? ( dev-tex/latex2html )
+"
+
+S=${WORKDIR}/apparmor-${PV}/parser
+
+PATCHES=(
+       "${FILESDIR}/${PN}-2.13.1-makefile.patch"
+       "${FILESDIR}/${PN}-2.11.1-dynamic-link.patch"
+       "${FILESDIR}/${P}-syntax.patch"
+)
+
+src_prepare() {
+       default
+
+       # remove warning about missing file that controls features
+       # we don't currently support
+       sed -e "/installation problem/ctrue" -i rc.apparmor.functions || die
+}
+
+src_compile()  {
+       emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" USE_SYSTEM=1 arch manpages
+       use doc && emake pdf
+}
+
+src_test() {
+       emake CXX="$(tc-getCXX)" USE_SYSTEM=1 check
+}
+
+src_install() {
+       emake DESTDIR="${D}" DISTRO="unknown" USE_SYSTEM=1 install
+
+       dodir /etc/apparmor.d/disable
+
+       newinitd "${FILESDIR}/${PN}-init" ${PN}
+       systemd_newunit "${FILESDIR}/apparmor.service" apparmor.service
+
+       use doc && dodoc techdoc.pdf
+
+       exeinto /usr/share/apparmor
+       doexe "${FILESDIR}/apparmor_load.sh"
+       doexe "${FILESDIR}/apparmor_unload.sh"
+}

diff --git a/sys-apps/apparmor/files/apparmor-2.13.1-syntax.patch 
b/sys-apps/apparmor/files/apparmor-2.13.1-syntax.patch
new file mode 100644
index 00000000000..b09d7800dec
--- /dev/null
+++ b/sys-apps/apparmor/files/apparmor-2.13.1-syntax.patch
@@ -0,0 +1,29 @@
+From 3bf11cee3eceacb7f3ec177fb676ba36f373d369 Mon Sep 17 00:00:00 2001
+From: Christian Boltz <[email protected]>
+Date: Sun, 14 Oct 2018 18:10:46 +0200
+Subject: [PATCH] Fix syntax error in rc.apparmor.functions
+
+This bug was introduced in
+- https://gitlab.com/apparmor/apparmor/merge_requests/230
+- commit c974dd0d071149213892f03de0869b860705bda0 (master)
+- commit 9987a7ec9c0fc7fd9ac6831152dc77fb477fd04a (2.13 branch)
+---
+ parser/rc.apparmor.functions | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/parser/rc.apparmor.functions b/parser/rc.apparmor.functions
+index 516edf11..9edded52 100644
+--- a/rc.apparmor.functions
++++ b/rc.apparmor.functions
+@@ -128,7 +128,7 @@ skip_profile() {
+               return 2
+       fi
+       if echo "${profile}" | egrep -q '^.+\.new-[0-9\.]+_[0-9]+$'; then
+-              return 2 ;;
++              return 2
+       fi
+ 
+       return 0
+-- 
+2.18.1
+

Reply via email to