diff options
Diffstat (limited to 'meta-oe/recipes-security/audit/audit_3.0.7.bb')
| -rw-r--r-- | meta-oe/recipes-security/audit/audit_3.0.7.bb | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/meta-oe/recipes-security/audit/audit_3.0.7.bb b/meta-oe/recipes-security/audit/audit_3.0.7.bb new file mode 100644 index 0000000000..d77aec2964 --- /dev/null +++ b/meta-oe/recipes-security/audit/audit_3.0.7.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://Fixed-swig-host-contamination-issue.patch \ | ||
| 12 | file://auditd \ | ||
| 13 | file://auditd.service \ | ||
| 14 | file://audit-volatile.conf \ | ||
| 15 | " | ||
| 16 | |||
| 17 | S = "${WORKDIR}/git" | ||
| 18 | SRCREV = "f60b2d8f55c74be798a7f5bcbd6c587987f2578a" | ||
| 19 | |||
| 20 | inherit autotools python3native update-rc.d systemd | ||
| 21 | |||
| 22 | UPDATERCPN = "auditd" | ||
| 23 | INITSCRIPT_NAME = "auditd" | ||
| 24 | INITSCRIPT_PARAMS = "defaults" | ||
| 25 | |||
| 26 | SYSTEMD_PACKAGES = "auditd" | ||
| 27 | SYSTEMD_SERVICE:auditd = "auditd.service" | ||
| 28 | |||
| 29 | DEPENDS = "python3 tcp-wrappers libcap-ng linux-libc-headers swig-native" | ||
| 30 | |||
| 31 | EXTRA_OECONF = " --with-libwrap \ | ||
| 32 | --enable-gssapi-krb5=no \ | ||
| 33 | --with-libcap-ng=yes \ | ||
| 34 | --with-python3=yes \ | ||
| 35 | --libdir=${base_libdir} \ | ||
| 36 | --sbindir=${base_sbindir} \ | ||
| 37 | --without-python \ | ||
| 38 | --without-golang \ | ||
| 39 | --disable-zos-remote \ | ||
| 40 | --with-arm=yes \ | ||
| 41 | --with-aarch64=yes \ | ||
| 42 | " | ||
| 43 | |||
| 44 | EXTRA_OEMAKE = "PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
| 45 | PYINC='${STAGING_INCDIR}/$(PYLIBVER)' \ | ||
| 46 | pyexecdir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \ | ||
| 47 | STDINC='${STAGING_INCDIR}' \ | ||
| 48 | pkgconfigdir=${libdir}/pkgconfig \ | ||
| 49 | " | ||
| 50 | |||
| 51 | SUMMARY:audispd-plugins = "Plugins for the audit event dispatcher" | ||
| 52 | DESCRIPTION:audispd-plugins = "The audispd-plugins package provides plugins for the real-time \ | ||
| 53 | interface to the audit system, audispd. These plugins can do things \ | ||
| 54 | like relay events to remote machines or analyze events for suspicious \ | ||
| 55 | behavior." | ||
| 56 | |||
| 57 | PACKAGES =+ "audispd-plugins" | ||
| 58 | PACKAGES += "auditd ${PN}-python" | ||
| 59 | |||
| 60 | FILES:${PN} = "${sysconfdir}/libaudit.conf ${base_libdir}/libaudit.so.1* ${base_libdir}/libauparse.so.*" | ||
| 61 | FILES:auditd = "${bindir}/* ${base_sbindir}/* ${sysconfdir}/* ${datadir}/audit/*" | ||
| 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_install:append() { | ||
| 75 | rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a | ||
| 76 | rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la | ||
| 77 | |||
| 78 | # reuse auditd config | ||
| 79 | [ ! -e ${D}/etc/default ] && mkdir ${D}/etc/default | ||
| 80 | mv ${D}/etc/sysconfig/auditd ${D}/etc/default | ||
| 81 | rmdir ${D}/etc/sysconfig/ | ||
| 82 | |||
| 83 | # replace init.d | ||
| 84 | install -D -m 0755 ${WORKDIR}/auditd ${D}/etc/init.d/auditd | ||
| 85 | rm -rf ${D}/etc/rc.d | ||
| 86 | |||
| 87 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 88 | # install systemd unit files | ||
| 89 | install -d ${D}${systemd_unitdir}/system | ||
| 90 | install -m 0644 ${WORKDIR}/auditd.service ${D}${systemd_unitdir}/system | ||
| 91 | |||
| 92 | install -d ${D}${sysconfdir}/tmpfiles.d/ | ||
| 93 | install -m 0644 ${WORKDIR}/audit-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ | ||
| 94 | fi | ||
| 95 | |||
| 96 | # audit-2.5 doesn't install any rules by default, so we do that here | ||
| 97 | mkdir -p ${D}/etc/audit ${D}/etc/audit/rules.d | ||
| 98 | cp ${S}/rules/10-base-config.rules ${D}/etc/audit/rules.d/audit.rules | ||
| 99 | |||
| 100 | chmod 750 ${D}/etc/audit ${D}/etc/audit/rules.d | ||
| 101 | chmod 640 ${D}/etc/audit/auditd.conf ${D}/etc/audit/rules.d/audit.rules | ||
| 102 | |||
| 103 | # Based on the audit.spec "Copy default rules into place on new installation" | ||
| 104 | cp ${D}/etc/audit/rules.d/audit.rules ${D}/etc/audit/audit.rules | ||
| 105 | |||
| 106 | # Create /var/spool/audit directory for audisp-remote | ||
| 107 | install -m 0700 -d ${D}${localstatedir}/spool/audit | ||
| 108 | } | ||
