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