1 |
commit: db5549f4dc49a875e73a265afc11585ac1964d75 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 29 11:20:24 2019 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 29 11:20:24 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=db5549f4 |
7 |
|
8 |
sys-process/audit: add 2.8.4 from the tree |
9 |
|
10 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
12 |
|
13 |
sys-process/audit/Manifest | 1 + |
14 |
sys-process/audit/audit-2.8.4.ebuild | 233 +++++++++++++++++++++ |
15 |
.../audit/files/audit-2.8.4-ia64-compile-fix.patch | 195 +++++++++++++++++ |
16 |
3 files changed, 429 insertions(+) |
17 |
|
18 |
diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest |
19 |
index eac9b51..d75227e 100644 |
20 |
--- a/sys-process/audit/Manifest |
21 |
+++ b/sys-process/audit/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST audit-2.7.1.tar.gz 1099083 BLAKE2B 10f72ac3273ce9e23e1fb8ad8d57dcae772ba1f861f519867399d95e14f4809897637969de45566d62a73a35e5674260155773daf8de00481fcbd1b9c3138f96 SHA512 37964d81deee8608fde5f90d5d096727d3eb009e084be34749adcb0662e607e35c49c80bd83ce38b17161f11363b691721c8a8aa5dea832d320c53ab0ebb7483 |
24 |
DIST audit-2.8.3.tar.gz 1107583 BLAKE2B 21c2b8543a31c0ca4319af40b844f4400615108a59195a95ea79499ff2923d7dbbc840716d60dfba311bfc451983cd4cd0f7cb27c2444825df2c0dfb50f9614f SHA512 aa939b81a66111f4e466208d7a38414bd186d00ccd374b420439764905b4707bbfcdc2331a6179a080fca981d19171696ecabd26674205b2f9339c44954db933 |
25 |
+DIST audit-2.8.4.tar.gz 1123889 BLAKE2B b80272b1984942d3c38bde30d22c736a8cc8896a2e42a9bf286446129313ce57a2a117ce26a0a5f1a4a06b4a48ddde463b8837b8c98273051be0c90e5bbebd42 SHA512 5795c565effab995cee447a2dc457ef6a6f15201fb185d7104992ac373a3cb5cfc865dd661c0896a895c96f452eff392d455064d0eead55cd7364d96e0d15c4a |
26 |
|
27 |
diff --git a/sys-process/audit/audit-2.8.4.ebuild b/sys-process/audit/audit-2.8.4.ebuild |
28 |
new file mode 100644 |
29 |
index 0000000..59e5813 |
30 |
--- /dev/null |
31 |
+++ b/sys-process/audit/audit-2.8.4.ebuild |
32 |
@@ -0,0 +1,233 @@ |
33 |
+# Copyright 1999-2019 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI="6" |
37 |
+ |
38 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) |
39 |
+ |
40 |
+inherit autotools multilib multilib-minimal toolchain-funcs preserve-libs python-r1 linux-info systemd |
41 |
+ |
42 |
+DESCRIPTION="Userspace utilities for storing and processing auditing records" |
43 |
+HOMEPAGE="https://people.redhat.com/sgrubb/audit/" |
44 |
+SRC_URI="https://people.redhat.com/sgrubb/audit/${P}.tar.gz" |
45 |
+ |
46 |
+LICENSE="GPL-2+ LGPL-2.1+" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86" |
49 |
+IUSE="gssapi ldap python static-libs" |
50 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
51 |
+# Testcases are pretty useless as they are built for RedHat users/groups and kernels. |
52 |
+RESTRICT="test" |
53 |
+ |
54 |
+RDEPEND="gssapi? ( virtual/krb5 ) |
55 |
+ ldap? ( net-nds/openldap ) |
56 |
+ sys-libs/libcap-ng |
57 |
+ python? ( ${PYTHON_DEPS} )" |
58 |
+DEPEND="${RDEPEND} |
59 |
+ >=sys-kernel/linux-headers-2.6.34 |
60 |
+ python? ( dev-lang/swig:0 )" |
61 |
+# Do not use os-headers as this is linux specific |
62 |
+ |
63 |
+CONFIG_CHECK="~AUDIT" |
64 |
+ |
65 |
+pkg_setup() { |
66 |
+ linux-info_pkg_setup |
67 |
+} |
68 |
+ |
69 |
+src_prepare() { |
70 |
+ eapply "${FILESDIR}/${PN}-2.8.2-musl.patch" |
71 |
+ eapply "${FILESDIR}/${PN}-2.7.1-swig.patch" |
72 |
+ |
73 |
+ # Do not build GUI tools |
74 |
+ sed -i \ |
75 |
+ -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \ |
76 |
+ "${S}"/configure.ac || die |
77 |
+ sed -i \ |
78 |
+ -e 's,system-config-audit,,g' \ |
79 |
+ "${S}"/Makefile.am || die |
80 |
+ rm -rf "${S}"/system-config-audit |
81 |
+ |
82 |
+ if ! use ldap; then |
83 |
+ sed -i \ |
84 |
+ -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \ |
85 |
+ "${S}"/configure.ac || die |
86 |
+ sed -i \ |
87 |
+ -e '/^SUBDIRS/s,zos-remote,,g' \ |
88 |
+ "${S}"/audisp/plugins/Makefile.am || die |
89 |
+ fi |
90 |
+ |
91 |
+ # Don't build static version of Python module. |
92 |
+ eapply "${FILESDIR}"/${PN}-2.4.3-python.patch |
93 |
+ |
94 |
+ # glibc/kernel upstreams suck with both defining ia64_fpreg |
95 |
+ # This patch is a horribly workaround that is only valid as long as you |
96 |
+ # don't need the OTHER definitions in fpu.h. |
97 |
+ eapply "${FILESDIR}"/${PN}-2.8.4-ia64-compile-fix.patch |
98 |
+ |
99 |
+ # there is no --without-golang conf option |
100 |
+ sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die |
101 |
+ |
102 |
+ eapply_user |
103 |
+ |
104 |
+ # Regenerate autotooling |
105 |
+ eautoreconf |
106 |
+} |
107 |
+ |
108 |
+multilib_src_configure() { |
109 |
+ local ECONF_SOURCE=${S} |
110 |
+ econf \ |
111 |
+ --sbindir="${EPREFIX}/sbin" \ |
112 |
+ $(use_enable gssapi gssapi-krb5) \ |
113 |
+ $(use_enable static-libs static) \ |
114 |
+ --enable-systemd \ |
115 |
+ --without-python \ |
116 |
+ --without-python3 |
117 |
+ |
118 |
+ if multilib_is_native_abi; then |
119 |
+ python_configure() { |
120 |
+ mkdir -p "${BUILD_DIR}" || die |
121 |
+ cd "${BUILD_DIR}" || die |
122 |
+ |
123 |
+ if python_is_python3; then |
124 |
+ econf --without-python --with-python3 |
125 |
+ else |
126 |
+ econf --with-python --without-python3 |
127 |
+ fi |
128 |
+ } |
129 |
+ |
130 |
+ use python && python_foreach_impl python_configure |
131 |
+ fi |
132 |
+} |
133 |
+ |
134 |
+src_configure() { |
135 |
+ tc-export_build_env BUILD_{CC,CPP} |
136 |
+ export CC_FOR_BUILD="${BUILD_CC}" |
137 |
+ export CPP_FOR_BUILD="${BUILD_CPP}" |
138 |
+ |
139 |
+ multilib-minimal_src_configure |
140 |
+} |
141 |
+ |
142 |
+multilib_src_compile() { |
143 |
+ if multilib_is_native_abi; then |
144 |
+ default |
145 |
+ |
146 |
+ python_compile() { |
147 |
+ local pysuffix pydef |
148 |
+ if python_is_python3; then |
149 |
+ pysuffix=3 |
150 |
+ pydef='USE_PYTHON3=true' |
151 |
+ else |
152 |
+ pysuffix=2 |
153 |
+ pydef='HAVE_PYTHON=true' |
154 |
+ fi |
155 |
+ |
156 |
+ emake -C "${BUILD_DIR}"/bindings/swig \ |
157 |
+ VPATH="${native_build}/lib" \ |
158 |
+ LIBS="${native_build}/lib/libaudit.la" \ |
159 |
+ _audit_la_LIBADD="${native_build}/lib/libaudit.la" \ |
160 |
+ _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \ |
161 |
+ ${pydef} |
162 |
+ emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \ |
163 |
+ VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \ |
164 |
+ auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \ |
165 |
+ ${pydef} |
166 |
+ } |
167 |
+ |
168 |
+ local native_build="${BUILD_DIR}" |
169 |
+ use python && python_foreach_impl python_compile |
170 |
+ else |
171 |
+ emake -C lib |
172 |
+ emake -C auparse |
173 |
+ fi |
174 |
+} |
175 |
+ |
176 |
+multilib_src_install() { |
177 |
+ if multilib_is_native_abi; then |
178 |
+ emake DESTDIR="${D}" initdir="$(systemd_get_systemunitdir)" install |
179 |
+ |
180 |
+ python_install() { |
181 |
+ local pysuffix pydef |
182 |
+ if python_is_python3; then |
183 |
+ pysuffix=3 |
184 |
+ pydef='USE_PYTHON3=true' |
185 |
+ else |
186 |
+ pysuffix=2 |
187 |
+ pydef='HAVE_PYTHON=true' |
188 |
+ fi |
189 |
+ |
190 |
+ emake -C "${BUILD_DIR}"/bindings/swig \ |
191 |
+ VPATH="${native_build}/lib" \ |
192 |
+ LIBS="${native_build}/lib/libaudit.la" \ |
193 |
+ _audit_la_LIBADD="${native_build}/lib/libaudit.la" \ |
194 |
+ _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \ |
195 |
+ ${pydef} \ |
196 |
+ DESTDIR="${D}" install |
197 |
+ emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \ |
198 |
+ VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \ |
199 |
+ auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \ |
200 |
+ ${pydef} \ |
201 |
+ DESTDIR="${D}" install |
202 |
+ } |
203 |
+ |
204 |
+ local native_build=${BUILD_DIR} |
205 |
+ use python && python_foreach_impl python_install |
206 |
+ |
207 |
+ # things like shadow use this so we need to be in / |
208 |
+ gen_usr_ldscript -a audit auparse |
209 |
+ else |
210 |
+ emake -C lib DESTDIR="${D}" install |
211 |
+ emake -C auparse DESTDIR="${D}" install |
212 |
+ fi |
213 |
+} |
214 |
+ |
215 |
+multilib_src_install_all() { |
216 |
+ dodoc AUTHORS ChangeLog README* THANKS |
217 |
+ docinto contrib |
218 |
+ dodoc contrib/{avc_snap,skeleton.c} |
219 |
+ docinto contrib/plugin |
220 |
+ dodoc contrib/plugin/* |
221 |
+ docinto rules |
222 |
+ dodoc rules/* |
223 |
+ |
224 |
+ newinitd "${FILESDIR}"/auditd-init.d-2.4.3 auditd |
225 |
+ newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd |
226 |
+ |
227 |
+ fperms 644 "$(systemd_get_systemunitdir)"/auditd.service # 556436 |
228 |
+ |
229 |
+ [ -f "${ED}"/sbin/audisp-remote ] && \ |
230 |
+ dodir /usr/sbin && \ |
231 |
+ mv "${ED}"/{sbin,usr/sbin}/audisp-remote || die |
232 |
+ |
233 |
+ # Gentoo rules |
234 |
+ insinto /etc/audit/ |
235 |
+ newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules |
236 |
+ doins "${FILESDIR}"/audit.rules.stop* |
237 |
+ |
238 |
+ # audit logs go here |
239 |
+ keepdir /var/log/audit/ |
240 |
+ |
241 |
+ find "${D}" -name '*.la' -delete || die |
242 |
+ |
243 |
+ # Security |
244 |
+ lockdown_perms "${ED}" |
245 |
+} |
246 |
+ |
247 |
+pkg_preinst() { |
248 |
+ # Preserve from the audit-1 series |
249 |
+ preserve_old_lib /$(get_libdir)/libaudit.so.0 |
250 |
+} |
251 |
+ |
252 |
+pkg_postinst() { |
253 |
+ lockdown_perms "${EROOT}" |
254 |
+ # Preserve from the audit-1 series |
255 |
+ preserve_old_lib_notify /$(get_libdir)/libaudit.so.0 |
256 |
+} |
257 |
+ |
258 |
+lockdown_perms() { |
259 |
+ # Upstream wants these to have restrictive perms. |
260 |
+ # Should not || die as not all paths may exist. |
261 |
+ local basedir="$1" |
262 |
+ chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null |
263 |
+ chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null |
264 |
+ chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null |
265 |
+} |
266 |
|
267 |
diff --git a/sys-process/audit/files/audit-2.8.4-ia64-compile-fix.patch b/sys-process/audit/files/audit-2.8.4-ia64-compile-fix.patch |
268 |
new file mode 100644 |
269 |
index 0000000..ef04f72 |
270 |
--- /dev/null |
271 |
+++ b/sys-process/audit/files/audit-2.8.4-ia64-compile-fix.patch |
272 |
@@ -0,0 +1,195 @@ |
273 |
+--- a/audisp/audispd.c |
274 |
++++ b/audisp/audispd.c |
275 |
+@@ -21,6 +21,7 @@ |
276 |
+ */ |
277 |
+ |
278 |
+ #include "config.h" |
279 |
++#include "fixup.h" |
280 |
+ #include <stdio.h> |
281 |
+ #include <unistd.h> |
282 |
+ #include <stdlib.h> |
283 |
+--- a/audisp/plugins/prelude/audisp-prelude.c |
284 |
++++ b/audisp/plugins/prelude/audisp-prelude.c |
285 |
+@@ -21,6 +21,8 @@ |
286 |
+ * |
287 |
+ */ |
288 |
+ |
289 |
++#include "config.h" |
290 |
++#include "fixup.h" |
291 |
+ #include <stdio.h> |
292 |
+ #include <stdlib.h> |
293 |
+ #include <signal.h> |
294 |
+--- a/audisp/plugins/remote/audisp-remote.c |
295 |
++++ b/audisp/plugins/remote/audisp-remote.c |
296 |
+@@ -22,6 +22,7 @@ |
297 |
+ */ |
298 |
+ |
299 |
+ #include "config.h" |
300 |
++#include "fixup.h" |
301 |
+ #include <stdio.h> |
302 |
+ #include <signal.h> |
303 |
+ #include <syslog.h> |
304 |
+--- a/configure.ac |
305 |
++++ b/configure.ac |
306 |
+@@ -216,6 +216,9 @@ AC_ARG_ENABLE(zos-remote, |
307 |
+ AM_CONDITIONAL(ENABLE_ZOS_REMOTE, test "x$enable_zos_remote" != "xno") |
308 |
+ AC_MSG_RESULT($enable_zos_remote) |
309 |
+ |
310 |
++AC_CHECK_HEADER([asm/ptrace.h], [AC_DEFINE([HAVE_ASM_PTRACE_H],[],[Define to 1 if you have asm/ptrace.h])], []) |
311 |
++AC_CHECK_HEADER([linux/ptrace.h], [AC_DEFINE([HAVE_LINUX_PTRACE_H],[],[Define to 1 if you have linux/ptrace.h])], []) |
312 |
++ |
313 |
+ #gssapi |
314 |
+ AC_ARG_ENABLE(gssapi_krb5, |
315 |
+ [AS_HELP_STRING([--enable-gssapi-krb5],[Enable GSSAPI Kerberos 5 support @<:@default=no@:>@])], |
316 |
+--- a/contrib/plugin/audisp-example.c |
317 |
++++ b/contrib/plugin/audisp-example.c |
318 |
+@@ -37,6 +37,8 @@ |
319 |
+ */ |
320 |
+ |
321 |
+ #define _GNU_SOURCE |
322 |
++#include "config.h" |
323 |
++#include "fixup.h" |
324 |
+ #include <stdio.h> |
325 |
+ #include <signal.h> |
326 |
+ #include <string.h> |
327 |
+--- a/contrib/skeleton.c |
328 |
++++ b/contrib/skeleton.c |
329 |
+@@ -13,6 +13,8 @@ |
330 |
+ * gcc skeleton.c -o skeleton -laudit |
331 |
+ */ |
332 |
+ |
333 |
++#include "config.h" |
334 |
++#include "fixup.h" |
335 |
+ #include <stdio.h> |
336 |
+ #include <sys/types.h> |
337 |
+ #include <sys/uio.h> |
338 |
+--- /dev/null |
339 |
++++ b/lib/fixup.h |
340 |
+@@ -0,0 +1,17 @@ |
341 |
++#ifndef _AUDIT_IA64_FIXUP_H_ |
342 |
++#define _AUDIT_IA64_FIXUP_H_ |
343 |
++ |
344 |
++#ifdef __ia64__ /* what a pos */ |
345 |
++# include <linux/types.h> |
346 |
++# define _ASM_IA64_FPU_H |
347 |
++#endif |
348 |
++#include <signal.h> |
349 |
++/* |
350 |
++#ifdef HAVE_ASM_PTRACE_H |
351 |
++# include <asm/ptrace.h> |
352 |
++#endif |
353 |
++#ifdef HAVE_LINUX_PTRACE_H |
354 |
++# include <linux/ptrace.h> |
355 |
++#endif |
356 |
++*/ |
357 |
++#endif |
358 |
+--- a/src/auditctl.c |
359 |
++++ b/src/auditctl.c |
360 |
+@@ -23,6 +23,7 @@ |
361 |
+ */ |
362 |
+ |
363 |
+ #include "config.h" |
364 |
++#include "fixup.h" |
365 |
+ #include <stdio.h> |
366 |
+ #include <stdlib.h> |
367 |
+ #include <stdbool.h> |
368 |
+--- a/src/auditd-config.c |
369 |
++++ b/src/auditd-config.c |
370 |
+@@ -22,6 +22,7 @@ |
371 |
+ */ |
372 |
+ |
373 |
+ #include "config.h" |
374 |
++#include "fixup.h" |
375 |
+ #include <stdio.h> |
376 |
+ #include <unistd.h> |
377 |
+ #include <sys/stat.h> |
378 |
+--- a/src/auditd-dispatch.c |
379 |
++++ b/src/auditd-dispatch.c |
380 |
+@@ -22,6 +22,7 @@ |
381 |
+ */ |
382 |
+ |
383 |
+ #include "config.h" |
384 |
++#include "fixup.h" |
385 |
+ #include <unistd.h> |
386 |
+ #include <sys/uio.h> |
387 |
+ #include <fcntl.h> |
388 |
+--- a/src/auditd-event.c |
389 |
++++ b/src/auditd-event.c |
390 |
+@@ -22,6 +22,7 @@ |
391 |
+ */ |
392 |
+ |
393 |
+ #include "config.h" |
394 |
++#include "fixup.h" |
395 |
+ #include <stdlib.h> |
396 |
+ #include <unistd.h> |
397 |
+ #include <pthread.h> |
398 |
+--- a/src/auditd-listen.c |
399 |
++++ b/src/auditd-listen.c |
400 |
+@@ -23,6 +23,7 @@ |
401 |
+ */ |
402 |
+ |
403 |
+ #include "config.h" |
404 |
++#include "fixup.h" |
405 |
+ #include <stdio.h> |
406 |
+ #include <unistd.h> |
407 |
+ #include <sys/stat.h> |
408 |
+--- a/src/auditd-reconfig.c |
409 |
++++ b/src/auditd-reconfig.c |
410 |
+@@ -22,6 +22,7 @@ |
411 |
+ */ |
412 |
+ |
413 |
+ #include "config.h" |
414 |
++#include "fixup.h" |
415 |
+ #include <pthread.h> |
416 |
+ #include <signal.h> |
417 |
+ #include <stdlib.h> |
418 |
+--- a/src/auditd-sendmail.c |
419 |
++++ b/src/auditd-sendmail.c |
420 |
+@@ -22,6 +22,7 @@ |
421 |
+ */ |
422 |
+ |
423 |
+ #include "config.h" |
424 |
++#include "fixup.h" |
425 |
+ #include <stdio.h> |
426 |
+ #include <unistd.h> // for access() |
427 |
+ #include <string.h> |
428 |
+--- a/src/auditd.c |
429 |
++++ b/src/auditd.c |
430 |
+@@ -22,6 +22,7 @@ |
431 |
+ */ |
432 |
+ |
433 |
+ #include "config.h" |
434 |
++#include "fixup.h" |
435 |
+ #include <stdio.h> |
436 |
+ #include <sys/types.h> |
437 |
+ #include <unistd.h> |
438 |
+--- a/src/ausearch.c |
439 |
++++ b/src/ausearch.c |
440 |
+@@ -22,6 +22,7 @@ |
441 |
+ */ |
442 |
+ |
443 |
+ #include "config.h" |
444 |
++#include "fixup.h" |
445 |
+ #include <stdio.h> |
446 |
+ #include <stdio_ext.h> |
447 |
+ #include <string.h> |
448 |
+--- a/src/autrace.c |
449 |
++++ b/src/autrace.c |
450 |
+@@ -21,6 +21,7 @@ |
451 |
+ */ |
452 |
+ |
453 |
+ #include "config.h" |
454 |
++#include "fixup.h" |
455 |
+ #include <stdio.h> |
456 |
+ #include <string.h> |
457 |
+ #include <sys/wait.h> |
458 |
+--- a/src/delete_all.c |
459 |
++++ b/src/delete_all.c |
460 |
+@@ -20,6 +20,7 @@ |
461 |
+ * Steve Grubb <sgrubb@××××××.com> |
462 |
+ */ |
463 |
+ #include "config.h" |
464 |
++#include "fixup.h" |
465 |
+ #include <stdio.h> |
466 |
+ #include <string.h> |
467 |
+ #include <errno.h> |