diff options
Diffstat (limited to 'meta-oe/recipes-security/audit/audit_2.8.5.bb')
| -rw-r--r-- | meta-oe/recipes-security/audit/audit_2.8.5.bb | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/meta-oe/recipes-security/audit/audit_2.8.5.bb b/meta-oe/recipes-security/audit/audit_2.8.5.bb index 11ec9e9fc4..10c1afbb8b 100644 --- a/meta-oe/recipes-security/audit/audit_2.8.5.bb +++ b/meta-oe/recipes-security/audit/audit_2.8.5.bb | |||
| @@ -8,8 +8,9 @@ LICENSE = "GPLv2+ & LGPLv2+" | |||
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" |
| 9 | 9 | ||
| 10 | SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=2.8_maintenance \ | 10 | SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=2.8_maintenance \ |
| 11 | file://Add-substitue-functions-for-strndupa-rawmemchr.patch \ | 11 | file://0001-Add-substitue-functions-for-strndupa-rawmemchr.patch \ |
| 12 | file://Fixed-swig-host-contamination-issue.patch \ | 12 | file://0002-Fixed-swig-host-contamination-issue.patch \ |
| 13 | file://0003-Header-definitions-need-to-be-external-when-building.patch \ | ||
| 13 | file://auditd \ | 14 | file://auditd \ |
| 14 | file://auditd.service \ | 15 | file://auditd.service \ |
| 15 | file://audit-volatile.conf \ | 16 | file://audit-volatile.conf \ |
| @@ -27,9 +28,9 @@ INITSCRIPT_PARAMS = "defaults" | |||
| 27 | SYSTEMD_PACKAGES = "auditd" | 28 | SYSTEMD_PACKAGES = "auditd" |
| 28 | SYSTEMD_SERVICE:auditd = "auditd.service" | 29 | SYSTEMD_SERVICE:auditd = "auditd.service" |
| 29 | 30 | ||
| 30 | DEPENDS += "python3 tcp-wrappers libcap-ng linux-libc-headers swig-native" | 31 | DEPENDS = "python3 tcp-wrappers libcap-ng linux-libc-headers swig-native" |
| 31 | 32 | ||
| 32 | EXTRA_OECONF += "--without-prelude \ | 33 | EXTRA_OECONF = "--without-prelude \ |
| 33 | --with-libwrap \ | 34 | --with-libwrap \ |
| 34 | --enable-gssapi-krb5=no \ | 35 | --enable-gssapi-krb5=no \ |
| 35 | --with-libcap-ng=yes \ | 36 | --with-libcap-ng=yes \ |
| @@ -39,11 +40,11 @@ EXTRA_OECONF += "--without-prelude \ | |||
| 39 | --without-python \ | 40 | --without-python \ |
| 40 | --without-golang \ | 41 | --without-golang \ |
| 41 | --disable-zos-remote \ | 42 | --disable-zos-remote \ |
| 43 | --with-arm=yes \ | ||
| 44 | --with-aarch64=yes \ | ||
| 42 | " | 45 | " |
| 43 | EXTRA_OECONF:append:arm = " --with-arm=yes" | ||
| 44 | EXTRA_OECONF:append:aarch64 = " --with-aarch64=yes" | ||
| 45 | 46 | ||
| 46 | EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' \ | 47 | EXTRA_OEMAKE = "PYLIBVER='python${PYTHON_BASEVERSION}' \ |
| 47 | PYINC='${STAGING_INCDIR}/$(PYLIBVER)' \ | 48 | PYINC='${STAGING_INCDIR}/$(PYLIBVER)' \ |
| 48 | pyexecdir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \ | 49 | pyexecdir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \ |
| 49 | STDINC='${STAGING_INCDIR}' \ | 50 | STDINC='${STAGING_INCDIR}' \ |
| @@ -60,16 +61,16 @@ PACKAGES =+ "audispd-plugins" | |||
| 60 | PACKAGES += "auditd ${PN}-python" | 61 | PACKAGES += "auditd ${PN}-python" |
| 61 | 62 | ||
| 62 | FILES:${PN} = "${sysconfdir}/libaudit.conf ${base_libdir}/libaudit.so.1* ${base_libdir}/libauparse.so.*" | 63 | FILES:${PN} = "${sysconfdir}/libaudit.conf ${base_libdir}/libaudit.so.1* ${base_libdir}/libauparse.so.*" |
| 63 | FILES:auditd += "${bindir}/* ${base_sbindir}/* ${sysconfdir}/*" | 64 | FILES:auditd = "${bindir}/* ${base_sbindir}/* ${sysconfdir}/*" |
| 64 | FILES:audispd-plugins += "${sysconfdir}/audisp/audisp-remote.conf \ | 65 | FILES:audispd-plugins = "${sysconfdir}/audisp/audisp-remote.conf \ |
| 65 | ${sysconfdir}/audisp/plugins.d/au-remote.conf \ | 66 | ${sysconfdir}/audisp/plugins.d/au-remote.conf \ |
| 66 | ${sbindir}/audisp-remote ${localstatedir}/spool/audit \ | 67 | ${base_sbindir}/audisp-remote ${localstatedir}/spool/audit \ |
| 67 | " | 68 | " |
| 68 | FILES:${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug" | 69 | FILES:${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug" |
| 69 | FILES:${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}" | 70 | FILES:${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}" |
| 70 | 71 | ||
| 71 | CONFFILES:auditd += "${sysconfdir}/audit/audit.rules" | 72 | CONFFILES:auditd = "${sysconfdir}/audit/audit.rules" |
| 72 | RDEPENDS:auditd += "bash" | 73 | RDEPENDS:auditd = "bash" |
| 73 | 74 | ||
| 74 | do_install:append() { | 75 | do_install:append() { |
| 75 | rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a | 76 | rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a |
| @@ -85,14 +86,14 @@ do_install:append() { | |||
| 85 | rm -rf ${D}/etc/rc.d | 86 | rm -rf ${D}/etc/rc.d |
| 86 | 87 | ||
| 87 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 88 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 89 | # install systemd unit files | ||
| 90 | install -d ${D}${systemd_unitdir}/system | ||
| 91 | install -m 0644 ${WORKDIR}/auditd.service ${D}${systemd_unitdir}/system | ||
| 92 | |||
| 88 | install -d ${D}${sysconfdir}/tmpfiles.d/ | 93 | install -d ${D}${sysconfdir}/tmpfiles.d/ |
| 89 | install -m 0644 ${WORKDIR}/audit-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ | 94 | install -m 0644 ${WORKDIR}/audit-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ |
| 90 | fi | 95 | fi |
| 91 | 96 | ||
| 92 | # install systemd unit files | ||
| 93 | install -d ${D}${systemd_unitdir}/system | ||
| 94 | install -m 0644 ${WORKDIR}/auditd.service ${D}${systemd_unitdir}/system | ||
| 95 | |||
| 96 | # audit-2.5 doesn't install any rules by default, so we do that here | 97 | # 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 | 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 | cp ${S}/rules/10-base-config.rules ${D}/etc/audit/rules.d/audit.rules |
| @@ -102,4 +103,7 @@ do_install:append() { | |||
| 102 | 103 | ||
| 103 | # Based on the audit.spec "Copy default rules into place on new installation" | 104 | # 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 | cp ${D}/etc/audit/rules.d/audit.rules ${D}/etc/audit/audit.rules |
| 106 | |||
| 107 | # Create /var/spool/audit directory for audisp-remote | ||
| 108 | install -m 0700 -d ${D}${localstatedir}/spool/audit | ||
| 105 | } | 109 | } |
