Skip to contentSkip to conversation

iproute2: make packageconfig selinux work

PATCH New [email protected] 1 participant 1 message Sep 23, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iproute2: make packageconfig selinux work

From: Kai Kang <[email protected]>

iproute2 calls command pkg-config to check whether libselinux exists then enable or disable selinux support. That makes packageconfig doesn't work.

The packageconfig selinux is set by checking whether distro feature selinux exists in with-selinux.bbclass. Modify the configure result file with same criteria.

---
 recipes-connectivity/iproute2/iproute2_%.bbappend | 8 ++++++++
 1 file changed, 8 insertions(+)
recipes-connectivity/iproute2/iproute2_%.bbappend +8 -0
index c1e8ed6..c866b54 100644
@@ -1 +1,9 @@
 inherit with-selinux
+
+do_configure_append() {
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'true', 'false', d)}; then
+		sed -i 's/\(HAVE_SELINUX:=\).*/\1y/' ${B}/Config
+	else
+		sed -i 's/\(HAVE_SELINUX:=\).*/\1n/' ${B}/Config
+	fi
+}
Signature · 1 line
2.9.3