Skip to contentSkip to conversation

audit: fix build when systemd is enabled.

PATCH New Can Wong 1 participant 1 message Feb 6, 2025

lore
Share & tools
lore

Can Wong

author
#0 lore raw

PATCH 1/1 audit: fix build when systemd is enabled.

From 8399cca17dffd1892e22745d40e2aeb522174645 Mon Sep 17 00:00:00 2001
From: Armin Kuster <[email protected]>
Date: Sun, 13 Oct 2024 08:57:24 -0400
Subject: [PATCH] audit: fix build when systemd is enabled.

(cherry picked from commit e68145b00260fc380242cd67579068427e501c10)

---
 meta-oe/recipes-security/audit/audit_4.0.1.bb | 6 ++++++

 1 file changed, 6 insertions(+)
meta-oe/recipes-security/audit/audit_4.0.1.bb +0 -0
index a37ae3bb84..ade566d82f 100644
@@ -95,7 +95,13 @@ do_install:append() {
 

     if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then install -D -m 0755 ${WORKDIR}/auditd ${D}/etc/init.d/auditd
+    fi
+
+    if ! ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then rm -rf ${D}${libdir}/systemd
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${B}/init.d/auditd.service ${D}${systemd_unitdir}/system/ +        install -m 0644 ${B}/init.d/audit-rules.service ${D}${systemd_unitdir}/system/ fi

     # Create /var/spool/audit directory for audisp-remote

Signature · 1 line
2.43.0