Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/apparmor/, sys-apps/apparmor/files/
Date: Sun, 25 Nov 2018 10:32:31
Message-Id: 1543141933.d17bd7b6d3871a0ab6a9af8d42bc1a222d1c50b7.kensington@gentoo
1 commit: d17bd7b6d3871a0ab6a9af8d42bc1a222d1c50b7
2 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 25 10:31:51 2018 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 25 10:32:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d17bd7b6
7
8 sys-apps/apparmor: backport patch from upstream fixing syntax error
9
10 Closes: https://bugs.gentoo.org/671426
11 Package-Manager: Portage-2.3.51, Repoman-2.3.12
12 Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org>
13
14 sys-apps/apparmor/apparmor-2.13.1-r1.ebuild | 65 ++++++++++++++++++++++
15 .../apparmor/files/apparmor-2.13.1-syntax.patch | 29 ++++++++++
16 2 files changed, 94 insertions(+)
17
18 diff --git a/sys-apps/apparmor/apparmor-2.13.1-r1.ebuild b/sys-apps/apparmor/apparmor-2.13.1-r1.ebuild
19 new file mode 100644
20 index 00000000000..b14dc3e4420
21 --- /dev/null
22 +++ b/sys-apps/apparmor/apparmor-2.13.1-r1.ebuild
23 @@ -0,0 +1,65 @@
24 +# Copyright 1999-2018 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=7
28 +
29 +inherit systemd toolchain-funcs
30 +
31 +MY_PV="$(ver_cut 1-2)"
32 +
33 +DESCRIPTION="Userspace utils and init scripts for the AppArmor application security system"
34 +HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home"
35 +SRC_URI="https://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${PN}-${PV}.tar.gz"
36 +
37 +LICENSE="GPL-2"
38 +SLOT="0"
39 +KEYWORDS="~amd64"
40 +IUSE="doc"
41 +
42 +RDEPEND="~sys-libs/libapparmor-${PV}"
43 +DEPEND="${RDEPEND}
44 + dev-lang/perl
45 + sys-devel/bison
46 + sys-devel/flex
47 + doc? ( dev-tex/latex2html )
48 +"
49 +
50 +S=${WORKDIR}/apparmor-${PV}/parser
51 +
52 +PATCHES=(
53 + "${FILESDIR}/${PN}-2.13.1-makefile.patch"
54 + "${FILESDIR}/${PN}-2.11.1-dynamic-link.patch"
55 + "${FILESDIR}/${P}-syntax.patch"
56 +)
57 +
58 +src_prepare() {
59 + default
60 +
61 + # remove warning about missing file that controls features
62 + # we don't currently support
63 + sed -e "/installation problem/ctrue" -i rc.apparmor.functions || die
64 +}
65 +
66 +src_compile() {
67 + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" USE_SYSTEM=1 arch manpages
68 + use doc && emake pdf
69 +}
70 +
71 +src_test() {
72 + emake CXX="$(tc-getCXX)" USE_SYSTEM=1 check
73 +}
74 +
75 +src_install() {
76 + emake DESTDIR="${D}" DISTRO="unknown" USE_SYSTEM=1 install
77 +
78 + dodir /etc/apparmor.d/disable
79 +
80 + newinitd "${FILESDIR}/${PN}-init" ${PN}
81 + systemd_newunit "${FILESDIR}/apparmor.service" apparmor.service
82 +
83 + use doc && dodoc techdoc.pdf
84 +
85 + exeinto /usr/share/apparmor
86 + doexe "${FILESDIR}/apparmor_load.sh"
87 + doexe "${FILESDIR}/apparmor_unload.sh"
88 +}
89
90 diff --git a/sys-apps/apparmor/files/apparmor-2.13.1-syntax.patch b/sys-apps/apparmor/files/apparmor-2.13.1-syntax.patch
91 new file mode 100644
92 index 00000000000..b09d7800dec
93 --- /dev/null
94 +++ b/sys-apps/apparmor/files/apparmor-2.13.1-syntax.patch
95 @@ -0,0 +1,29 @@
96 +From 3bf11cee3eceacb7f3ec177fb676ba36f373d369 Mon Sep 17 00:00:00 2001
97 +From: Christian Boltz <apparmor@××××××.de>
98 +Date: Sun, 14 Oct 2018 18:10:46 +0200
99 +Subject: [PATCH] Fix syntax error in rc.apparmor.functions
100 +
101 +This bug was introduced in
102 +- https://gitlab.com/apparmor/apparmor/merge_requests/230
103 +- commit c974dd0d071149213892f03de0869b860705bda0 (master)
104 +- commit 9987a7ec9c0fc7fd9ac6831152dc77fb477fd04a (2.13 branch)
105 +---
106 + parser/rc.apparmor.functions | 2 +-
107 + 1 file changed, 1 insertion(+), 1 deletion(-)
108 +
109 +diff --git a/parser/rc.apparmor.functions b/parser/rc.apparmor.functions
110 +index 516edf11..9edded52 100644
111 +--- a/rc.apparmor.functions
112 ++++ b/rc.apparmor.functions
113 +@@ -128,7 +128,7 @@ skip_profile() {
114 + return 2
115 + fi
116 + if echo "${profile}" | egrep -q '^.+\.new-[0-9\.]+_[0-9]+$'; then
117 +- return 2 ;;
118 ++ return 2
119 + fi
120 +
121 + return 0
122 +--
123 +2.18.1
124 +