1 |
commit: 2549861065dadef5dfacd0fb50a9d1880878d930 |
2 |
Author: Dave Hughes <davidhughes205 <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Apr 29 19:45:54 2021 +0000 |
4 |
Commit: Dave Hughes <davidhughes205 <AT> gmail <DOT> com> |
5 |
CommitDate: Thu Apr 29 19:45:54 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=25498610 |
7 |
|
8 |
sys-apps/apparmor: sync with ::gentoo |
9 |
|
10 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
11 |
Signed-off-by: Dave Hughes <davidhughes205 <AT> gmail.com> |
12 |
|
13 |
sys-apps/apparmor/Manifest | 23 +-- |
14 |
...mor-2.11.1-r2.ebuild => apparmor-2.13.4.ebuild} | 30 ++-- |
15 |
...pparmor-2.12.0.ebuild => apparmor-3.0.1.ebuild} | 50 ++++--- |
16 |
...-Fix-linking-against-gettext-on-musl-libc.patch | 40 +++++ |
17 |
.../apparmor/files/apparmor-2.12-missingdefs.patch | 32 ---- |
18 |
.../files/apparmor-2.12-musl-filebuf.patch | 15 -- |
19 |
...kefile.patch => apparmor-2.13.1-makefile.patch} | 12 +- |
20 |
...akefile.patch => apparmor-3.0.0-makefile.patch} | 19 +-- |
21 |
sys-apps/apparmor/files/apparmor-init | 2 +- |
22 |
.../files/{apparmor-init => apparmor-init-1} | 11 +- |
23 |
sys-apps/apparmor/files/apparmor_load.sh | 0 |
24 |
sys-apps/apparmor/files/apparmor_unload.sh | 0 |
25 |
sys-apps/apparmor/files/stdio_filebuf.h | 163 --------------------- |
26 |
13 files changed, 105 insertions(+), 292 deletions(-) |
27 |
|
28 |
diff --git a/sys-apps/apparmor/Manifest b/sys-apps/apparmor/Manifest |
29 |
index 61fdce2..39b52b0 100644 |
30 |
--- a/sys-apps/apparmor/Manifest |
31 |
+++ b/sys-apps/apparmor/Manifest |
32 |
@@ -1,21 +1,2 @@ |
33 |
------BEGIN PGP SIGNED MESSAGE----- |
34 |
-Hash: SHA256 |
35 |
- |
36 |
-DIST apparmor-2.11.1.tar.gz 5017646 BLAKE2B ee0176c87b2800eb562c136ff324f08e444c412117c4593ff97c4b0e4c63db2aea0721c6ed38f3c733e3c95024165f329e520acf838c4798a8285b8dedf0d51e SHA512 f088157cc116987e56c0e02127497b1ec6241f3d761ec3b53211fa188f5f02c9408d6b903f2d275328ede88ebfd1393e00aad9f68cbe78fa9ab3711ba0f9c00c |
37 |
-DIST apparmor-2.12.tar.gz 7258450 BLAKE2B c1d4e01d836c5f567ddb7c5ecf36dde6efccf1e59ae219824129fd5c92162a3fed7ebdc492f181ae132b07db068660078a9631543d40fd20ab0b44cd4c646d4c SHA512 d85fd47c66333fe5658ee5e977b32142697f6e36c575550712ee2ace2ad0fbf2aa59c8fd3b82ad8821c0190adf8cc150cf623ea09a84d5b32bde050a03dd6e9a |
38 |
------BEGIN PGP SIGNATURE----- |
39 |
- |
40 |
-iQIzBAEBCAAdFiEE8JaD5QHaZGPThRiKxu9aAvVkeYcFAlrjiF8ACgkQxu9aAvVk |
41 |
-eYfQExAAqPJRck/9/iWZreBmvRW6Yh2U9xKdvffLKTD/7fneuJXNH2NwsoNnx2ed |
42 |
-xF+4KHkKSUkwelx9h7ca47cMg3eETUTKQ/ND4OdISutLD1aAwzrItKDkNtZQKViF |
43 |
-2cGoVjoq/4vDHip/llau0y5cA4RoC+aWhHA3JE6F+9kpwjQDoQEn2MBgJnl7tpGH |
44 |
-7pyNJSRdxgV8NML67cKQFSmdOHGJLVOy6p7DVlC2YeA12qSjQ5R4kqZYnyG/KPCQ |
45 |
-3bJCpFSuSoAdtvoTVC7kS5euuool4wt8VWEGVc4FPtkphBC7TsOo9jZ3Yr5PtSnj |
46 |
-5Z33WCSgUe01XFe2n2qV/JFGl9EKM8NWYaWpu0hEF/nFwPZuobpamaym+FuEwPp3 |
47 |
-Jj86hK7onSYmGDhf5m34+Qe3ROLDeRTYY+qQrWXFlFUbcTOcOW73OC4817fkGm3H |
48 |
-OcEjv6vOUdKJ5JaO8ZT6VrpFR7cSWTbj6zwY5KhOD9b1O9S8b/0+lvQ32xgw3T+2 |
49 |
-YpenqfBF+PAvepy/Y0mTV1EQteFEarscBEcpxLV9b8pYOjXBi1VIO8dp5RHhro5k |
50 |
-02X4/8Gu4/DpoP8o2loYmVDqCWR847LO8/AD12BfHjZ1k3BMQxsGWgBo5Li8Hwup |
51 |
-4sZoogyOrCBT5k45rxjkZV3CdDxaUmROA/bTPJgCevzYowcDiEs= |
52 |
-=ApQv |
53 |
------END PGP SIGNATURE----- |
54 |
+DIST apparmor-2.13.4.tar.gz 7390179 BLAKE2B 49818a010d5e5757dd43710f2af925fbb62a9f8f9be74556ff31a9a8834bebac010762fc6bef3da8d295e487b65d0e0135f4be25bcb01a834846c5e5d65d92a4 SHA512 d42748bf36ae66849f79653a62d499e9d17a97c4d680fb653eb1c379d0593aaa09f7ddfc6f2fa0d2fb468bce05fb25444976f60a5ec24778fdd7ec20d1c13651 |
55 |
+DIST apparmor-3.0.1.tar.gz 7785713 BLAKE2B c530d159a4139de8e59d9d975af866259b56d555e3abe2d1e2a6bfd2db57d8371d643bb93f1cd6ca96172960c09a74cc05c82d34a2e253c4c1f6ecce747f4129 SHA512 e1073e7b2cde7cc4cefcfddce8fa5069845b5873c260b9fbd4bea2ff801708101d813ff30e23a64da36f3c6394cd9339e01a170e9add69deef2d70ecd9ed9687 |
56 |
|
57 |
diff --git a/sys-apps/apparmor/apparmor-2.11.1-r2.ebuild b/sys-apps/apparmor/apparmor-2.13.4.ebuild |
58 |
similarity index 73% |
59 |
rename from sys-apps/apparmor/apparmor-2.11.1-r2.ebuild |
60 |
rename to sys-apps/apparmor/apparmor-2.13.4.ebuild |
61 |
index 8d5819a..a309bc1 100644 |
62 |
--- a/sys-apps/apparmor/apparmor-2.11.1-r2.ebuild |
63 |
+++ b/sys-apps/apparmor/apparmor-2.13.4.ebuild |
64 |
@@ -1,25 +1,28 @@ |
65 |
-# Copyright 1999-2018 Gentoo Foundation |
66 |
+# Copyright 1999-2021 Gentoo Authors |
67 |
# Distributed under the terms of the GNU General Public License v2 |
68 |
|
69 |
-EAPI=6 |
70 |
+EAPI=7 |
71 |
|
72 |
-inherit systemd toolchain-funcs versionator flag-o-matic |
73 |
+inherit systemd toolchain-funcs |
74 |
|
75 |
-MY_PV="$(get_version_component_range 1-2)" |
76 |
+MY_PV="$(ver_cut 1-2)" |
77 |
|
78 |
DESCRIPTION="Userspace utils and init scripts for the AppArmor application security system" |
79 |
-HOMEPAGE="http://apparmor.net/" |
80 |
-SRC_URI="https://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${P}.tar.gz" |
81 |
+HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home" |
82 |
+SRC_URI="https://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${PN}-${PV}.tar.gz" |
83 |
|
84 |
LICENSE="GPL-2" |
85 |
SLOT="0" |
86 |
KEYWORDS="~amd64" |
87 |
IUSE="doc" |
88 |
|
89 |
+RESTRICT="test" # bug 675854 |
90 |
+ |
91 |
RDEPEND="~sys-libs/libapparmor-${PV}" |
92 |
DEPEND="${RDEPEND} |
93 |
dev-lang/perl |
94 |
sys-devel/bison |
95 |
+ sys-devel/gettext |
96 |
sys-devel/flex |
97 |
doc? ( dev-tex/latex2html ) |
98 |
" |
99 |
@@ -27,26 +30,23 @@ DEPEND="${RDEPEND} |
100 |
S=${WORKDIR}/apparmor-${PV}/parser |
101 |
|
102 |
PATCHES=( |
103 |
- "${FILESDIR}/${PN}-2.10-makefile.patch" |
104 |
+ "${FILESDIR}/${PN}-2.13.1-makefile.patch" |
105 |
"${FILESDIR}/${PN}-2.11.1-dynamic-link.patch" |
106 |
- "${FILESDIR}/${PN}-2.12-missingdefs.patch" |
107 |
- "${FILESDIR}/${PN}-2.12-musl-filebuf.patch" |
108 |
) |
109 |
|
110 |
src_prepare() { |
111 |
default |
112 |
|
113 |
+ if use elibc_musl ; then |
114 |
+ eapply "${FILESDIR}/0001-Fix-linking-against-gettext-on-musl-libc.patch" |
115 |
+ fi |
116 |
+ |
117 |
# remove warning about missing file that controls features |
118 |
# we don't currently support |
119 |
sed -e "/installation problem/ctrue" -i rc.apparmor.functions || die |
120 |
- |
121 |
- cp "${FILESDIR}/stdio_filebuf.h" libapparmor_re |
122 |
} |
123 |
|
124 |
-src_compile() { |
125 |
- # for some reason this isn't included? |
126 |
- append-libs -lunwind |
127 |
- |
128 |
+src_compile() { |
129 |
emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" USE_SYSTEM=1 arch manpages |
130 |
use doc && emake pdf |
131 |
} |
132 |
|
133 |
diff --git a/sys-apps/apparmor/apparmor-2.12.0.ebuild b/sys-apps/apparmor/apparmor-3.0.1.ebuild |
134 |
similarity index 57% |
135 |
rename from sys-apps/apparmor/apparmor-2.12.0.ebuild |
136 |
rename to sys-apps/apparmor/apparmor-3.0.1.ebuild |
137 |
index 10b1125..1be6bab 100644 |
138 |
--- a/sys-apps/apparmor/apparmor-2.12.0.ebuild |
139 |
+++ b/sys-apps/apparmor/apparmor-3.0.1.ebuild |
140 |
@@ -1,36 +1,37 @@ |
141 |
-# Copyright 1999-2018 Gentoo Foundation |
142 |
+# Copyright 1999-2021 Gentoo Authors |
143 |
# Distributed under the terms of the GNU General Public License v2 |
144 |
|
145 |
-EAPI=6 |
146 |
+EAPI=7 |
147 |
|
148 |
-inherit systemd toolchain-funcs versionator flag-o-matic |
149 |
+inherit systemd toolchain-funcs |
150 |
|
151 |
-MY_PV="$(get_version_component_range 1-2)" |
152 |
+MY_PV="$(ver_cut 1-2)" |
153 |
|
154 |
DESCRIPTION="Userspace utils and init scripts for the AppArmor application security system" |
155 |
-HOMEPAGE="http://apparmor.net/" |
156 |
-SRC_URI="https://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${PN}-${MY_PV}.tar.gz" |
157 |
+HOMEPAGE="https://gitlab.com/apparmor/apparmor/wikis/home" |
158 |
+SRC_URI="https://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${PN}-${PV}.tar.gz" |
159 |
|
160 |
LICENSE="GPL-2" |
161 |
SLOT="0" |
162 |
-KEYWORDS="~amd64" |
163 |
+KEYWORDS="~amd64 ~arm64" |
164 |
IUSE="doc" |
165 |
|
166 |
+RESTRICT="test" # bug 675854 |
167 |
+ |
168 |
RDEPEND="~sys-libs/libapparmor-${PV}" |
169 |
DEPEND="${RDEPEND} |
170 |
dev-lang/perl |
171 |
sys-devel/bison |
172 |
+ sys-devel/gettext |
173 |
sys-devel/flex |
174 |
doc? ( dev-tex/latex2html ) |
175 |
" |
176 |
|
177 |
-S=${WORKDIR}/apparmor-${MY_PV}/parser |
178 |
+S=${WORKDIR}/apparmor-${PV}/parser |
179 |
|
180 |
PATCHES=( |
181 |
- "${FILESDIR}/${PN}-2.10-makefile.patch" |
182 |
+ "${FILESDIR}/${PN}-3.0.0-makefile.patch" |
183 |
"${FILESDIR}/${PN}-2.11.1-dynamic-link.patch" |
184 |
- "${FILESDIR}/${PN}-2.12-missingdefs.patch" |
185 |
- "${FILESDIR}/${PN}-2.12-musl-filebuf.patch" |
186 |
) |
187 |
|
188 |
src_prepare() { |
189 |
@@ -40,14 +41,20 @@ src_prepare() { |
190 |
# we don't currently support |
191 |
sed -e "/installation problem/ctrue" -i rc.apparmor.functions || die |
192 |
|
193 |
- cp "${FILESDIR}/stdio_filebuf.h" libapparmor_re |
194 |
+ # bug 634782 |
195 |
+ sed -e "s/cpp/$(tc-getCPP) -/" \ |
196 |
+ -i ../common/list_capabilities.sh \ |
197 |
+ -i ../common/list_af_names.sh || die |
198 |
} |
199 |
|
200 |
-src_compile() { |
201 |
- # for some reason this isn't included? |
202 |
- append-libs -lunwind |
203 |
- |
204 |
- emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" USE_SYSTEM=1 arch manpages |
205 |
+src_compile() { |
206 |
+ emake \ |
207 |
+ AR="$(tc-getAR)" \ |
208 |
+ CC="$(tc-getCC)" \ |
209 |
+ CPP="$(tc-getCPP) -" \ |
210 |
+ CXX="$(tc-getCXX)" \ |
211 |
+ USE_SYSTEM=1 \ |
212 |
+ arch manpages |
213 |
use doc && emake pdf |
214 |
} |
215 |
|
216 |
@@ -56,11 +63,16 @@ src_test() { |
217 |
} |
218 |
|
219 |
src_install() { |
220 |
- emake DESTDIR="${D}" DISTRO="unknown" USE_SYSTEM=1 install |
221 |
+ emake \ |
222 |
+ CPP="$(tc-getCPP) -" \ |
223 |
+ DESTDIR="${D}" \ |
224 |
+ DISTRO="unknown" \ |
225 |
+ USE_SYSTEM=1 \ |
226 |
+ install |
227 |
|
228 |
dodir /etc/apparmor.d/disable |
229 |
|
230 |
- newinitd "${FILESDIR}/${PN}-init" ${PN} |
231 |
+ newinitd "${FILESDIR}/${PN}-init-1" ${PN} |
232 |
systemd_newunit "${FILESDIR}/apparmor.service" apparmor.service |
233 |
|
234 |
use doc && dodoc techdoc.pdf |
235 |
|
236 |
diff --git a/sys-apps/apparmor/files/0001-Fix-linking-against-gettext-on-musl-libc.patch b/sys-apps/apparmor/files/0001-Fix-linking-against-gettext-on-musl-libc.patch |
237 |
new file mode 100644 |
238 |
index 0000000..4180cf6 |
239 |
--- /dev/null |
240 |
+++ b/sys-apps/apparmor/files/0001-Fix-linking-against-gettext-on-musl-libc.patch |
241 |
@@ -0,0 +1,40 @@ |
242 |
+From 183849ec988c7326bcb9bf729d087e262d121b67 Mon Sep 17 00:00:00 2001 |
243 |
+From: allgdante <allan.garret@×××××.com> |
244 |
+Date: Wed, 4 Jul 2018 16:57:19 +0200 |
245 |
+Subject: [PATCH 1/7] Fix linking against gettext on musl libc |
246 |
+ |
247 |
+Both parser and binutils must be linked against gettext |
248 |
+--- |
249 |
+ binutils/Makefile | 2 +- |
250 |
+ parser/Makefile | 2 +- |
251 |
+ 2 files changed, 2 insertions(+), 2 deletions(-) |
252 |
+ |
253 |
+diff --git a/binutils/Makefile b/binutils/Makefile |
254 |
+index 7fb71813..52e55f70 100644 |
255 |
+--- a/binutils/Makefile |
256 |
++++ b/binutils/Makefile |
257 |
+@@ -52,7 +52,7 @@ SRCS = aa_enabled.c |
258 |
+ HDRS = |
259 |
+ TOOLS = aa-enabled aa-exec |
260 |
+ |
261 |
+-AALIB = -Wl,-Bstatic -lapparmor -Wl,-Bdynamic -lpthread |
262 |
++AALIB = -Wl,-Bstatic -lapparmor -Wl,-Bdynamic -lpthread -lintl |
263 |
+ |
264 |
+ ifdef USE_SYSTEM |
265 |
+ # Using the system libapparmor so Makefile dependencies can't be used |
266 |
+diff --git a/parser/Makefile b/parser/Makefile |
267 |
+index 5d799f6a..000540a3 100644 |
268 |
+--- a/parser/Makefile |
269 |
++++ b/parser/Makefile |
270 |
+@@ -90,7 +90,7 @@ AAREDIR= libapparmor_re |
271 |
+ AAREOBJECT = ${AAREDIR}/libapparmor_re.a |
272 |
+ AAREOBJECTS = $(AAREOBJECT) |
273 |
+ AARE_LDFLAGS = -static-libgcc -static-libstdc++ -L. $(LDFLAGS) |
274 |
+-AALIB = -Wl,-Bstatic -lapparmor -Wl,-Bdynamic -lpthread |
275 |
++AALIB = -Wl,-Bstatic -lapparmor -Wl,-Bdynamic -lpthread -lintl |
276 |
+ |
277 |
+ ifdef USE_SYSTEM |
278 |
+ # Using the system libapparmor so Makefile dependencies can't be used |
279 |
+-- |
280 |
+2.20.1 |
281 |
+ |
282 |
|
283 |
diff --git a/sys-apps/apparmor/files/apparmor-2.12-missingdefs.patch b/sys-apps/apparmor/files/apparmor-2.12-missingdefs.patch |
284 |
deleted file mode 100644 |
285 |
index 9ed8a9f..0000000 |
286 |
--- a/sys-apps/apparmor/files/apparmor-2.12-missingdefs.patch |
287 |
+++ /dev/null |
288 |
@@ -1,32 +0,0 @@ |
289 |
---- /dev/null |
290 |
-+++ b/missingdefs.h |
291 |
-@@ -0,0 +1,9 @@ |
292 |
-+#ifndef PARSER_MISSINGDEFS_H |
293 |
-+#define PARSER_MISSINGDEFS_H |
294 |
-+ |
295 |
-+typedef int (*__compar_fn_t) (const void *, const void *); |
296 |
-+typedef __compar_fn_t comparison_fn_t; |
297 |
-+typedef void (*__free_fn_t) (void *__nodep); |
298 |
-+ |
299 |
-+#endif |
300 |
-+ |
301 |
---- a/parser_alias.c |
302 |
-+++ b/parser_alias.c |
303 |
-@@ -24,6 +24,7 @@ |
304 |
- #include "immunix.h" |
305 |
- #include "parser.h" |
306 |
- #include "profile.h" |
307 |
-+#include "missingdefs.h" |
308 |
- |
309 |
- struct alias_rule { |
310 |
- char *from; |
311 |
---- a/parser_symtab.c |
312 |
-+++ b/parser_symtab.c |
313 |
-@@ -24,6 +24,7 @@ |
314 |
- |
315 |
- #include "immunix.h" |
316 |
- #include "parser.h" |
317 |
-+#include "missingdefs.h" |
318 |
- |
319 |
- enum var_type { |
320 |
- sd_boolean, |
321 |
|
322 |
diff --git a/sys-apps/apparmor/files/apparmor-2.12-musl-filebuf.patch b/sys-apps/apparmor/files/apparmor-2.12-musl-filebuf.patch |
323 |
deleted file mode 100644 |
324 |
index 446bff1..0000000 |
325 |
--- a/sys-apps/apparmor/files/apparmor-2.12-musl-filebuf.patch |
326 |
+++ /dev/null |
327 |
@@ -1,15 +0,0 @@ |
328 |
---- a/libapparmor_re/aare_rules.cc |
329 |
-+++ b/libapparmor_re/aare_rules.cc |
330 |
-@@ -23,7 +23,11 @@ |
331 |
- #include <iostream> |
332 |
- #include <fstream> |
333 |
- #include <sstream> |
334 |
--#include <ext/stdio_filebuf.h> |
335 |
-+#ifdef __GLIBC__ |
336 |
-+ #include <ext/stdio_filebuf.h> |
337 |
-+#else |
338 |
-+ #include "stdio_filebuf.h" |
339 |
-+#endif |
340 |
- #include <assert.h> |
341 |
- #include <stdlib.h> |
342 |
- |
343 |
|
344 |
diff --git a/sys-apps/apparmor/files/apparmor-2.10-makefile.patch b/sys-apps/apparmor/files/apparmor-2.13.1-makefile.patch |
345 |
similarity index 81% |
346 |
copy from sys-apps/apparmor/files/apparmor-2.10-makefile.patch |
347 |
copy to sys-apps/apparmor/files/apparmor-2.13.1-makefile.patch |
348 |
index 397534a..239ff81 100644 |
349 |
--- a/sys-apps/apparmor/files/apparmor-2.10-makefile.patch |
350 |
+++ b/sys-apps/apparmor/files/apparmor-2.13.1-makefile.patch |
351 |
@@ -1,17 +1,17 @@ |
352 |
--- a/Makefile |
353 |
+++ b/Makefile |
354 |
-@@ -31,7 +31,7 @@ |
355 |
+@@ -28,7 +28,7 @@ |
356 |
CONFDIR=/etc/apparmor |
357 |
INSTALL_CONFDIR=${DESTDIR}${CONFDIR} |
358 |
LOCALEDIR=/usr/share/locale |
359 |
--MANPAGES=apparmor.d.5 apparmor.7 apparmor_parser.8 subdomain.conf.5 |
360 |
-+MANPAGES=apparmor.d.5 apparmor.7 apparmor_parser.8 |
361 |
+-MANPAGES=apparmor.d.5 apparmor.7 apparmor_parser.8 subdomain.conf.5 aa-teardown.8 |
362 |
++MANPAGES=apparmor.d.5 apparmor.7 apparmor_parser.8 aa-teardown.8 |
363 |
|
364 |
- YACC := /usr/bin/bison |
365 |
+ YACC := bison |
366 |
YFLAGS := -d |
367 |
-@@ -284,11 +284,9 @@ |
368 |
+@@ -371,11 +371,9 @@ |
369 |
.PHONY: install-indep |
370 |
- install-indep: |
371 |
+ install-indep: indep |
372 |
install -m 755 -d $(INSTALL_CONFDIR) |
373 |
- install -m 644 subdomain.conf $(INSTALL_CONFDIR) |
374 |
+ install -m 755 -d ${DESTDIR}/usr/libexec |
375 |
|
376 |
diff --git a/sys-apps/apparmor/files/apparmor-2.10-makefile.patch b/sys-apps/apparmor/files/apparmor-3.0.0-makefile.patch |
377 |
similarity index 53% |
378 |
rename from sys-apps/apparmor/files/apparmor-2.10-makefile.patch |
379 |
rename to sys-apps/apparmor/files/apparmor-3.0.0-makefile.patch |
380 |
index 397534a..9c03a44 100644 |
381 |
--- a/sys-apps/apparmor/files/apparmor-2.10-makefile.patch |
382 |
+++ b/sys-apps/apparmor/files/apparmor-3.0.0-makefile.patch |
383 |
@@ -1,23 +1,16 @@ |
384 |
+* Avoid installing empty /var/lib/apparmor |
385 |
+* Install rc.apparmor.functions to Gentoo-appropriate location |
386 |
+ |
387 |
--- a/Makefile |
388 |
+++ b/Makefile |
389 |
-@@ -31,7 +31,7 @@ |
390 |
- CONFDIR=/etc/apparmor |
391 |
- INSTALL_CONFDIR=${DESTDIR}${CONFDIR} |
392 |
- LOCALEDIR=/usr/share/locale |
393 |
--MANPAGES=apparmor.d.5 apparmor.7 apparmor_parser.8 subdomain.conf.5 |
394 |
-+MANPAGES=apparmor.d.5 apparmor.7 apparmor_parser.8 |
395 |
- |
396 |
- YACC := /usr/bin/bison |
397 |
- YFLAGS := -d |
398 |
-@@ -284,11 +284,9 @@ |
399 |
+@@ -407,10 +407,10 @@ |
400 |
.PHONY: install-indep |
401 |
- install-indep: |
402 |
+ install-indep: indep |
403 |
install -m 755 -d $(INSTALL_CONFDIR) |
404 |
-- install -m 644 subdomain.conf $(INSTALL_CONFDIR) |
405 |
+ install -m 755 -d ${DESTDIR}/usr/libexec |
406 |
install -m 644 parser.conf $(INSTALL_CONFDIR) |
407 |
- install -m 755 -d ${DESTDIR}/var/lib/apparmor |
408 |
-- install -m 755 -d $(APPARMOR_BIN_PREFIX) |
409 |
+ install -m 755 -d $(APPARMOR_BIN_PREFIX) |
410 |
- install -m 755 rc.apparmor.functions $(APPARMOR_BIN_PREFIX) |
411 |
+ install -m 755 rc.apparmor.functions ${DESTDIR}/usr/libexec |
412 |
$(MAKE) -C po install NAME=${NAME} DESTDIR=${DESTDIR} |
413 |
|
414 |
diff --git a/sys-apps/apparmor/files/apparmor-init b/sys-apps/apparmor/files/apparmor-init |
415 |
index 3e1cf35..4a2af72 100644 |
416 |
--- a/sys-apps/apparmor/files/apparmor-init |
417 |
+++ b/sys-apps/apparmor/files/apparmor-init |
418 |
@@ -1,5 +1,5 @@ |
419 |
#!/sbin/openrc-run |
420 |
-# Copyright 1999-2018 Gentoo Foundation |
421 |
+# Copyright 1999-2021 Gentoo Authors |
422 |
# Distributed under the terms of the GNU General Public License v2 |
423 |
|
424 |
description="Load all configured profiles for the AppArmor security module." |
425 |
|
426 |
diff --git a/sys-apps/apparmor/files/apparmor-init b/sys-apps/apparmor/files/apparmor-init-1 |
427 |
similarity index 87% |
428 |
copy from sys-apps/apparmor/files/apparmor-init |
429 |
copy to sys-apps/apparmor/files/apparmor-init-1 |
430 |
index 3e1cf35..c8b8ed9 100644 |
431 |
--- a/sys-apps/apparmor/files/apparmor-init |
432 |
+++ b/sys-apps/apparmor/files/apparmor-init-1 |
433 |
@@ -1,5 +1,5 @@ |
434 |
#!/sbin/openrc-run |
435 |
-# Copyright 1999-2018 Gentoo Foundation |
436 |
+# Copyright 1999-2021 Gentoo Authors |
437 |
# Distributed under the terms of the GNU General Public License v2 |
438 |
|
439 |
description="Load all configured profiles for the AppArmor security module." |
440 |
@@ -63,12 +63,9 @@ start() { |
441 |
eindent |
442 |
|
443 |
if ! is_apparmor_loaded ; then |
444 |
- load_module |
445 |
- if [ $? -ne 0 ]; then |
446 |
- eerror "AppArmor kernel support is not present" |
447 |
- eend 1 |
448 |
- return 1 |
449 |
- fi |
450 |
+ eerror "AppArmor kernel support is not present" |
451 |
+ eend 1 |
452 |
+ return 1 |
453 |
fi |
454 |
|
455 |
parse_profiles load |
456 |
|
457 |
diff --git a/sys-apps/apparmor/files/apparmor_load.sh b/sys-apps/apparmor/files/apparmor_load.sh |
458 |
old mode 100755 |
459 |
new mode 100644 |
460 |
|
461 |
diff --git a/sys-apps/apparmor/files/apparmor_unload.sh b/sys-apps/apparmor/files/apparmor_unload.sh |
462 |
old mode 100755 |
463 |
new mode 100644 |
464 |
|
465 |
diff --git a/sys-apps/apparmor/files/stdio_filebuf.h b/sys-apps/apparmor/files/stdio_filebuf.h |
466 |
deleted file mode 100644 |
467 |
index 7e5625f..0000000 |
468 |
--- a/sys-apps/apparmor/files/stdio_filebuf.h |
469 |
+++ /dev/null |
470 |
@@ -1,163 +0,0 @@ |
471 |
-// File descriptor layer for filebuf -*- C++ -*- |
472 |
- |
473 |
-// Copyright (C) 2002-2018 Free Software Foundation, Inc. |
474 |
-// |
475 |
-// This file is part of the GNU ISO C++ Library. This library is free |
476 |
-// software; you can redistribute it and/or modify it under the |
477 |
-// terms of the GNU General Public License as published by the |
478 |
-// Free Software Foundation; either version 3, or (at your option) |
479 |
-// any later version. |
480 |
- |
481 |
-// This library is distributed in the hope that it will be useful, |
482 |
-// but WITHOUT ANY WARRANTY; without even the implied warranty of |
483 |
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
484 |
-// GNU General Public License for more details. |
485 |
- |
486 |
-// Under Section 7 of GPL version 3, you are granted additional |
487 |
-// permissions described in the GCC Runtime Library Exception, version |
488 |
-// 3.1, as published by the Free Software Foundation. |
489 |
- |
490 |
-// You should have received a copy of the GNU General Public License and |
491 |
-// a copy of the GCC Runtime Library Exception along with this program; |
492 |
-// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
493 |
-// <http://www.gnu.org/licenses/>. |
494 |
- |
495 |
-/** @file ext/stdio_filebuf.h |
496 |
- * This file is a GNU extension to the Standard C++ Library. |
497 |
- */ |
498 |
- |
499 |
-#pragma once |
500 |
- |
501 |
-#include <fstream> |
502 |
-#include <cstdio> |
503 |
- |
504 |
-namespace __gnu_cxx |
505 |
-{ |
506 |
- /** |
507 |
- * @brief Provides a layer of compatibility for C/POSIX. |
508 |
- * @ingroup io |
509 |
- * |
510 |
- * This GNU extension provides extensions for working with standard C |
511 |
- * FILE*'s and POSIX file descriptors. It must be instantiated by the |
512 |
- * user with the type of character used in the file stream, e.g., |
513 |
- * stdio_filebuf<char>. |
514 |
- */ |
515 |
- template<typename _CharT, typename _Traits = std::char_traits<_CharT> > |
516 |
- class stdio_filebuf : public std::basic_filebuf<_CharT, _Traits> |
517 |
- { |
518 |
- public: |
519 |
- // Types: |
520 |
- typedef _CharT char_type; |
521 |
- typedef _Traits traits_type; |
522 |
- typedef typename traits_type::int_type int_type; |
523 |
- typedef typename traits_type::pos_type pos_type; |
524 |
- typedef typename traits_type::off_type off_type; |
525 |
- typedef std::size_t size_t; |
526 |
- |
527 |
- public: |
528 |
- /** |
529 |
- * deferred initialization |
530 |
- */ |
531 |
- stdio_filebuf() : std::basic_filebuf<_CharT, _Traits>() {} |
532 |
- |
533 |
- /** |
534 |
- * @param __fd An open file descriptor. |
535 |
- * @param __mode Same meaning as in a standard filebuf. |
536 |
- * @param __size Optimal or preferred size of internal buffer, |
537 |
- * in chars. |
538 |
- * |
539 |
- * This constructor associates a file stream buffer with an open |
540 |
- * POSIX file descriptor. The file descriptor will be automatically |
541 |
- * closed when the stdio_filebuf is closed/destroyed. |
542 |
- */ |
543 |
- stdio_filebuf(int __fd, std::ios_base::openmode __mode, |
544 |
- size_t __size = static_cast<size_t>(BUFSIZ)); |
545 |
- |
546 |
- /** |
547 |
- * @param __f An open @c FILE*. |
548 |
- * @param __mode Same meaning as in a standard filebuf. |
549 |
- * @param __size Optimal or preferred size of internal buffer, |
550 |
- * in chars. Defaults to system's @c BUFSIZ. |
551 |
- * |
552 |
- * This constructor associates a file stream buffer with an open |
553 |
- * C @c FILE*. The @c FILE* will not be automatically closed when the |
554 |
- * stdio_filebuf is closed/destroyed. |
555 |
- */ |
556 |
- stdio_filebuf(std::FILE* __f, std::ios_base::openmode __mode, |
557 |
- size_t __size = static_cast<size_t>(BUFSIZ)); |
558 |
- |
559 |
- /** |
560 |
- * Closes the external data stream if the file descriptor constructor |
561 |
- * was used. |
562 |
- */ |
563 |
- virtual |
564 |
- ~stdio_filebuf(); |
565 |
- |
566 |
-#if __cplusplus >= 201103L |
567 |
- stdio_filebuf(stdio_filebuf&&) = default; |
568 |
- stdio_filebuf& operator=(stdio_filebuf&&) = default; |
569 |
- |
570 |
- void |
571 |
- swap(stdio_filebuf& __fb) |
572 |
- { std::basic_filebuf<_CharT, _Traits>::swap(__fb); } |
573 |
-#endif |
574 |
- |
575 |
- /** |
576 |
- * @return The underlying file descriptor. |
577 |
- * |
578 |
- * Once associated with an external data stream, this function can be |
579 |
- * used to access the underlying POSIX file descriptor. Note that |
580 |
- * there is no way for the library to track what you do with the |
581 |
- * descriptor, so be careful. |
582 |
- */ |
583 |
- int |
584 |
- fd() { return this->_M_file.fd(); } |
585 |
- |
586 |
- /** |
587 |
- * @return The underlying FILE*. |
588 |
- * |
589 |
- * This function can be used to access the underlying "C" file pointer. |
590 |
- * Note that there is no way for the library to track what you do |
591 |
- * with the file, so be careful. |
592 |
- */ |
593 |
- std::FILE* |
594 |
- file() { return this->_M_file.file(); } |
595 |
- }; |
596 |
- |
597 |
- template<typename _CharT, typename _Traits> |
598 |
- stdio_filebuf<_CharT, _Traits>::~stdio_filebuf() |
599 |
- { } |
600 |
- |
601 |
- template<typename _CharT, typename _Traits> |
602 |
- stdio_filebuf<_CharT, _Traits>:: |
603 |
- stdio_filebuf(int __fd, std::ios_base::openmode __mode, size_t __size) |
604 |
- { |
605 |
- this->_M_file.sys_open(__fd, __mode); |
606 |
- if (this->is_open()) |
607 |
- { |
608 |
- this->_M_mode = __mode; |
609 |
- this->_M_buf_size = __size; |
610 |
- this->_M_allocate_internal_buffer(); |
611 |
- this->_M_reading = false; |
612 |
- this->_M_writing = false; |
613 |
- this->_M_set_buffer(-1); |
614 |
- } |
615 |
- } |
616 |
- |
617 |
- template<typename _CharT, typename _Traits> |
618 |
- stdio_filebuf<_CharT, _Traits>:: |
619 |
- stdio_filebuf(std::FILE* __f, std::ios_base::openmode __mode, |
620 |
- size_t __size) |
621 |
- { |
622 |
- this->_M_file.sys_open(__f, __mode); |
623 |
- if (this->is_open()) |
624 |
- { |
625 |
- this->_M_mode = __mode; |
626 |
- this->_M_buf_size = __size; |
627 |
- this->_M_allocate_internal_buffer(); |
628 |
- this->_M_reading = false; |
629 |
- this->_M_writing = false; |
630 |
- this->_M_set_buffer(-1); |
631 |
- } |
632 |
- } |
633 |
-} |