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-utils/files/, sys-apps/apparmor-utils/
Date: Wed, 27 Jul 2016 15:50:50
Message-Id: 1469634634.27ca732a18d9c5b2299cc32c4412dbc71191c353.kensington@gentoo
1 commit: 27ca732a18d9c5b2299cc32c4412dbc71191c353
2 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 27 15:49:49 2016 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 27 15:50:34 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27ca732a
7
8 sys-apps/apparmor-utils: remove old
9
10 Package-Manager: portage-2.3.0
11
12 sys-apps/apparmor-utils/Manifest | 1 -
13 sys-apps/apparmor-utils/apparmor-utils-2.10.ebuild | 58 ---------
14 .../files/apparmor-utils-2.10-python2.patch | 132 ---------------------
15 3 files changed, 191 deletions(-)
16
17 diff --git a/sys-apps/apparmor-utils/Manifest b/sys-apps/apparmor-utils/Manifest
18 index e3a788d..c80bc76 100644
19 --- a/sys-apps/apparmor-utils/Manifest
20 +++ b/sys-apps/apparmor-utils/Manifest
21 @@ -1,2 +1 @@
22 DIST apparmor-2.10.1.tar.gz 4494037 SHA256 07a76f338304baadc4ad69d025fe000b1ab4779a251ae8f338afdc13ef1e0f24 SHA512 93992c25f77bb46389160df8324c811b4c2f0fad4b425902b30ce31d6e1f3a0efe6b359c6f8348ef646f8b527584e1f19eb4f46b27fb1ba742489ad09d171278 WHIRLPOOL d59d935db520d3c59bd0398727a1151b3280c2bf56e8f978c3595f50ff06cb70aaddc0313a7d16705b8eadeb2018aeef7ce585423c3a6ed7c34dfd4e06df9c25
23 -DIST apparmor-2.10.tar.gz 2421759 SHA256 4d0e224257a29671b694bd9054edf0dd213aa690fd02844ecf3329b86ac506f4 SHA512 f659bc0efca3b0cf30dd5420427f0756a86bb9d5bbb12abe82aa60eb4a7ead7848a2b2d9d9ca9cea28161a9e998c9923cdea55d38755144e3d34da1a5ad52fdd WHIRLPOOL 762e2e12c6b6a9110c91a11578ef4d83a9a774b3a882a3a08ab4a5af3a16e53f66211fc6b4e68c8ef2a47ec0c312287864584640b0d2fe3c327d95525be710f8
24
25 diff --git a/sys-apps/apparmor-utils/apparmor-utils-2.10.ebuild b/sys-apps/apparmor-utils/apparmor-utils-2.10.ebuild
26 deleted file mode 100644
27 index a034f03..0000000
28 --- a/sys-apps/apparmor-utils/apparmor-utils-2.10.ebuild
29 +++ /dev/null
30 @@ -1,58 +0,0 @@
31 -# Copyright 1999-2016 Gentoo Foundation
32 -# Distributed under the terms of the GNU General Public License v2
33 -# $Id$
34 -
35 -EAPI=6
36 -
37 -PYTHON_COMPAT=( python{2_7,3_4} )
38 -inherit perl-module python-r1 versionator
39 -
40 -DESCRIPTION="Additional userspace utils to assist with AppArmor profile management"
41 -HOMEPAGE="http://apparmor.net/"
42 -SRC_URI="https://launchpad.net/apparmor/$(get_version_component_range 1-2)/${PV}/+download/apparmor-${PV}.tar.gz"
43 -
44 -LICENSE="GPL-2"
45 -SLOT="0"
46 -KEYWORDS="~amd64"
47 -IUSE=""
48 -
49 -DEPEND="dev-lang/perl
50 - ${PYTHON_DEPS}"
51 -RDEPEND="${DEPEND}
52 - ~sys-libs/libapparmor-${PV}[perl,python]
53 - ~sys-apps/apparmor-${PV}
54 - dev-perl/Locale-gettext
55 - dev-perl/RPC-XML
56 - dev-perl/TermReadKey
57 - virtual/perl-Data-Dumper
58 - virtual/perl-Getopt-Long"
59 -
60 -S=${WORKDIR}/apparmor-${PV}/utils
61 -
62 -PATCHES=(
63 - "${FILESDIR}/${PN}-2.10-python2.patch"
64 - "${FILESDIR}/${PN}-2.10-shebang.patch"
65 -)
66 -
67 -src_compile() {
68 - python_setup
69 -
70 - # launches non-make subprocesses causing "make jobserver unavailable"
71 - # error messages to appear in generated code
72 - emake -j1
73 -}
74 -
75 -src_install() {
76 - perl_set_version
77 - emake DESTDIR="${D}" PERLDIR="${D}/${VENDOR_LIB}/Immunix" \
78 - VIM_INSTALL_PATH="${D}/usr/share/vim/vimfiles/syntax" install
79 -
80 - install_python() {
81 - "${PYTHON}" "${S}"/python-tools-setup.py install --prefix=/usr \
82 - --root="${D}" --version="${PV}"
83 - }
84 -
85 - python_foreach_impl install_python
86 - python_replicate_script "${D}"/usr/bin/aa-easyprof "${D}"/usr/sbin/apparmor_status \
87 - "${D}"/usr/sbin/aa-{audit,autodep,cleanprof,complain,disable,enforce,genprof,logprof,mergeprof,status,unconfined}
88 -}
89
90 diff --git a/sys-apps/apparmor-utils/files/apparmor-utils-2.10-python2.patch b/sys-apps/apparmor-utils/files/apparmor-utils-2.10-python2.patch
91 deleted file mode 100644
92 index 412c13c..0000000
93 --- a/sys-apps/apparmor-utils/files/apparmor-utils-2.10-python2.patch
94 +++ /dev/null
95 @@ -1,132 +0,0 @@
96 -Backport from upstream fixing runtime failure with python-2.
97 -
98 -https://bugs.launchpad.net/apparmor/+bug/1513880
99 -
100 ---- a/apparmor/common.py
101 -+++ b/apparmor/common.py
102 -@@ -245,6 +245,15 @@
103 - return False
104 - return True
105 -
106 -+def type_is_str(var):
107 -+ ''' returns True if the given variable is a str (or unicode string when using python 2)'''
108 -+ if type(var) == str:
109 -+ return True
110 -+ elif sys.version_info[0] < 3 and type(var) == unicode: # python 2 sometimes uses the 'unicode' type
111 -+ return True
112 -+ else:
113 -+ return False
114 -+
115 - class DebugLogger(object):
116 - def __init__(self, module_name=__name__):
117 - self.debugging = False
118 -
119 ---- a/apparmor/rule/capability.py
120 -+++ b/apparmor/rule/capability.py
121 -@@ -14,7 +14,7 @@
122 - # ----------------------------------------------------------------------
123 -
124 - from apparmor.regex import RE_PROFILE_CAP
125 --from apparmor.common import AppArmorBug, AppArmorException
126 -+from apparmor.common import AppArmorBug, AppArmorException, type_is_str
127 - from apparmor.rule import BaseRule, BaseRuleset, parse_modifiers
128 - import re
129 -
130 -@@ -47,7 +47,7 @@
131 - self.all_caps = True
132 - self.capability = set()
133 - else:
134 -- if type(cap_list) == str:
135 -+ if type_is_str(cap_list):
136 - self.capability = {cap_list}
137 - elif type(cap_list) == list and len(cap_list) > 0:
138 - self.capability = set(cap_list)
139 -
140 ---- a/apparmor/rule/change_profile.py
141 -+++ b/apparmor/rule/change_profile.py
142 -@@ -14,7 +14,7 @@
143 - # ----------------------------------------------------------------------
144 -
145 - from apparmor.regex import RE_PROFILE_CHANGE_PROFILE, strip_quotes
146 --from apparmor.common import AppArmorBug, AppArmorException
147 -+from apparmor.common import AppArmorBug, AppArmorException, type_is_str
148 - from apparmor.rule import BaseRule, BaseRuleset, parse_modifiers, quote_if_needed
149 -
150 - # setup module translations
151 -@@ -48,7 +48,7 @@
152 - self.all_execconds = False
153 - if execcond == ChangeProfileRule.ALL:
154 - self.all_execconds = True
155 -- elif type(execcond) == str:
156 -+ elif type_is_str(execcond):
157 - if not execcond.strip():
158 - raise AppArmorBug('Empty exec condition in change_profile rule')
159 - elif execcond.startswith('/') or execcond.startswith('@'):
160 -@@ -62,7 +62,7 @@
161 - self.all_targetprofiles = False
162 - if targetprofile == ChangeProfileRule.ALL:
163 - self.all_targetprofiles = True
164 -- elif type(targetprofile) == str:
165 -+ elif type_is_str(targetprofile):
166 - if targetprofile.strip():
167 - self.targetprofile = targetprofile
168 - else:
169 -
170 ---- a/apparmor/rule/network.py
171 -+++ b/apparmor/rule/network.py
172 -@@ -16,7 +16,7 @@
173 - import re
174 -
175 - from apparmor.regex import RE_PROFILE_NETWORK
176 --from apparmor.common import AppArmorBug, AppArmorException
177 -+from apparmor.common import AppArmorBug, AppArmorException, type_is_str
178 - from apparmor.rule import BaseRule, BaseRuleset, parse_modifiers
179 -
180 - # setup module translations
181 -@@ -66,7 +66,7 @@
182 - self.all_domains = False
183 - if domain == NetworkRule.ALL:
184 - self.all_domains = True
185 -- elif type(domain) == str:
186 -+ elif type_is_str(domain):
187 - if domain in network_domain_keywords:
188 - self.domain = domain
189 - else:
190 -@@ -78,7 +78,7 @@
191 - self.all_type_or_protocols = False
192 - if type_or_protocol == NetworkRule.ALL:
193 - self.all_type_or_protocols = True
194 -- elif type(type_or_protocol) == str:
195 -+ elif type_is_str(type_or_protocol):
196 - if type_or_protocol in network_protocol_keywords:
197 - self.type_or_protocol = type_or_protocol
198 - elif type_or_protocol in network_type_keywords:
199 -
200 ---- a/apparmor/rule/rlimit.py
201 -+++ b/apparmor/rule/rlimit.py
202 -@@ -16,7 +16,7 @@
203 - import re
204 -
205 - from apparmor.regex import RE_PROFILE_RLIMIT, strip_quotes
206 --from apparmor.common import AppArmorBug, AppArmorException
207 -+from apparmor.common import AppArmorBug, AppArmorException, type_is_str
208 - from apparmor.rule import BaseRule, BaseRuleset, parse_comment, quote_if_needed
209 -
210 - # setup module translations
211 -@@ -57,7 +57,7 @@
212 - if audit or deny or allow_keyword:
213 - raise AppArmorBug('The audit, allow or deny keywords are not allowed in rlimit rules.')
214 -
215 -- if type(rlimit) == str:
216 -+ if type_is_str(rlimit):
217 - if rlimit in rlimit_all:
218 - self.rlimit = rlimit
219 - else:
220 -@@ -70,7 +70,7 @@
221 - self.all_values = False
222 - if value == RlimitRule.ALL:
223 - self.all_values = True
224 -- elif type(value) == str:
225 -+ elif type_is_str(value):
226 - if not value.strip():
227 - raise AppArmorBug('Empty value in rlimit rule')