diff options
Diffstat (limited to 'meta-oe/recipes-security/audit/audit_4.0.5.bb')
-rw-r--r-- | meta-oe/recipes-security/audit/audit_4.0.5.bb | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/meta-oe/recipes-security/audit/audit_4.0.5.bb b/meta-oe/recipes-security/audit/audit_4.0.5.bb new file mode 100644 index 0000000000..58100b206d --- /dev/null +++ b/meta-oe/recipes-security/audit/audit_4.0.5.bb | |||
@@ -0,0 +1,107 @@ | |||
1 | SUMMARY = "User space tools for kernel auditing" | ||
2 | DESCRIPTION = "The audit package contains the user space utilities for \ | ||
3 | storing and searching the audit records generated by the audit subsystem \ | ||
4 | in the Linux kernel." | ||
5 | HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" | ||
6 | SECTION = "base" | ||
7 | LICENSE = "GPL-2.0-or-later & LGPL-2.0-or-later" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
9 | |||
10 | SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=master;protocol=https \ | ||
11 | file://0001-Fixed-swig-host-contamination-issue.patch \ | ||
12 | file://auditd \ | ||
13 | " | ||
14 | |||
15 | SRCREV = "97c4ec3d68b5b199f2796d1e126c2144506bd228" | ||
16 | |||
17 | inherit autotools python3targetconfig update-rc.d systemd | ||
18 | |||
19 | UPDATERCPN = "auditd" | ||
20 | INITSCRIPT_NAME = "auditd" | ||
21 | INITSCRIPT_PARAMS = "defaults" | ||
22 | |||
23 | SYSTEMD_PACKAGES = "auditd" | ||
24 | SYSTEMD_SERVICE:auditd = "auditd.service audit-rules.service" | ||
25 | |||
26 | DEPENDS = "python3 tcp-wrappers libcap-ng linux-libc-headers swig-native python3-setuptools-native coreutils-native" | ||
27 | |||
28 | EXTRA_OECONF = " \ | ||
29 | --with-libwrap \ | ||
30 | --with-libcap-ng \ | ||
31 | --with-python3 \ | ||
32 | --with-arm \ | ||
33 | --with-aarch64 \ | ||
34 | --with-riscv \ | ||
35 | --without-golang \ | ||
36 | --disable-gssapi-krb5 \ | ||
37 | --disable-zos-remote \ | ||
38 | --sbindir=${base_sbindir} \ | ||
39 | --runstatedir=/run \ | ||
40 | " | ||
41 | |||
42 | EXTRA_OEMAKE = " \ | ||
43 | PYTHON=python3 \ | ||
44 | pythondir=${PYTHON_SITEPACKAGES_DIR} \ | ||
45 | pyexecdir=${PYTHON_SITEPACKAGES_DIR} \ | ||
46 | STDINC='${STAGING_INCDIR}' \ | ||
47 | " | ||
48 | |||
49 | SUMMARY:audispd-plugins = "Plugins for the audit event dispatcher" | ||
50 | DESCRIPTION:audispd-plugins = "The audispd-plugins package provides plugins for the real-time \ | ||
51 | interface to the audit system, audispd. These plugins can do things \ | ||
52 | like relay events to remote machines or analyze events for suspicious \ | ||
53 | behavior." | ||
54 | |||
55 | PACKAGES =+ "audispd-plugins" | ||
56 | PACKAGES += "auditd ${PN}-python" | ||
57 | |||
58 | FILES:${PN} = "${sysconfdir}/libaudit.conf ${libdir}/libau*.so.*" | ||
59 | FILES:auditd = "${bindir}/* ${base_sbindir}/* ${sysconfdir}/* \ | ||
60 | ${datadir}/audit-rules/* ${libexecdir}/* \ | ||
61 | ${nonarch_libdir}/tmpfiles.d/*.conf" | ||
62 | FILES:audispd-plugins = "${sysconfdir}/audit/audisp-remote.conf \ | ||
63 | ${sysconfdir}/audit/plugins.d/au-remote.conf \ | ||
64 | ${sysconfdir}/audit/plugins.d/syslog.conf \ | ||
65 | ${base_sbindir}/audisp-remote \ | ||
66 | ${base_sbindir}/audisp-syslog \ | ||
67 | ${localstatedir}/spool/audit \ | ||
68 | " | ||
69 | FILES:${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug" | ||
70 | FILES:${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}" | ||
71 | |||
72 | CONFFILES:auditd = "${sysconfdir}/audit/audit.rules" | ||
73 | |||
74 | do_configure:prepend() { | ||
75 | sed -e 's|buf\[];|buf[0];|g' ${STAGING_INCDIR}/linux/audit.h > ${S}/lib/audit.h | ||
76 | sed -i -e 's|#include <linux/audit.h>|#include "audit.h"|g' ${S}/lib/libaudit.h | ||
77 | } | ||
78 | |||
79 | do_install:append() { | ||
80 | sed -i -e 's|#include "audit.h"|#include <linux/audit.h>|g' ${D}${includedir}/libaudit.h | ||
81 | |||
82 | # Install default rules | ||
83 | install -d -m 750 ${D}/etc/audit | ||
84 | install -d -m 750 ${D}/etc/audit/rules.d | ||
85 | |||
86 | install -m 0640 ${S}/rules/10-base-config.rules ${D}/etc/audit/rules.d/audit.rules | ||
87 | |||
88 | # Based on the audit.spec "Copy default rules into place on new installation" | ||
89 | install -m 0640 ${D}/etc/audit/rules.d/audit.rules ${D}/etc/audit/audit.rules | ||
90 | |||
91 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
92 | install -D -m 0755 ${UNPACKDIR}/auditd ${D}/etc/init.d/auditd | ||
93 | fi | ||
94 | |||
95 | if ! ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
96 | rm -rf ${D}${nonarch_libdir}/systemd | ||
97 | rm -rf ${D}${nonarch_libdir}/tmpfiles.d | ||
98 | |||
99 | # Remove empty directory when enable multilib | ||
100 | rmdir --ignore-fail-on-non-empty ${D}${nonarch_libdir} | ||
101 | fi | ||
102 | |||
103 | # Create /var/spool/audit directory for audisp-remote | ||
104 | install -d -m 0700 ${D}${localstatedir}/spool/audit | ||
105 | } | ||
106 | |||
107 | CVE_PRODUCT = "linux:audit" | ||