From 44f43e02bd82c8a00c2f121bf7ca3062a46998c3 Mon Sep 17 00:00:00 2001 From: Xin Ouyang Date: Fri, 4 Jan 2013 18:34:21 +0800 Subject: packages: inherit selinux Signed-off-by: Xin Ouyang --- recipes-core/sysvinit/sysvinit_2.88dsf.bbappend | 8 +++++--- recipes-extended/logrotate/logrotate_3.8.1.bbappend | 8 +++++--- recipes-extended/lsof/lsof_4.86.bbappend | 8 +++++--- recipes-extended/net-tools/net-tools_1.60-23.bbappend | 8 +++++--- recipes-extended/sed/sed_4.2.1.bbappend | 6 ++++-- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend b/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend index 95c2f76..636dc5e 100644 --- a/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend +++ b/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend @@ -4,9 +4,11 @@ B = "${S}" SRC_URI += "file://sysvinit-fix-is_selinux_enabled.patch" -DEPENDS += "${@base_contains('DISTRO_FEATURES', 'selinux', 'libselinux', '', d)}" +inherit selinux -EXTRA_OEMAKE += "${@base_contains('DISTRO_FEATURES', 'selinux', 'WITH_SELINUX=\"yes\"', '', d)}" +DEPENDS += "${LIBSELINUX}" -PR .= ".1" +EXTRA_OEMAKE += "${@target_selinux(d, 'WITH_SELINUX=\"yes\"')}" + +PR .= ".2" diff --git a/recipes-extended/logrotate/logrotate_3.8.1.bbappend b/recipes-extended/logrotate/logrotate_3.8.1.bbappend index 23d2ae4..208ea77 100644 --- a/recipes-extended/logrotate/logrotate_3.8.1.bbappend +++ b/recipes-extended/logrotate/logrotate_3.8.1.bbappend @@ -1,5 +1,7 @@ -PR .= ".1" +PR .= ".2" -DEPENDS += "${@base_contains('DISTRO_FEATURES', 'selinux', 'libselinux', '', d)}" +inherit selinux -EXTRA_OEMAKE += "${@base_contains('DISTRO_FEATURES', 'selinux', 'WITH_SELINUX=\"yes\"', '', d)}" +DEPENDS += "${LIBSELINUX}" + +EXTRA_OEMAKE += "${@target_selinux(d, 'WITH_SELINUX=\"yes\"')}" diff --git a/recipes-extended/lsof/lsof_4.86.bbappend b/recipes-extended/lsof/lsof_4.86.bbappend index 5b12125..793b13f 100644 --- a/recipes-extended/lsof/lsof_4.86.bbappend +++ b/recipes-extended/lsof/lsof_4.86.bbappend @@ -1,9 +1,11 @@ -PR .= ".1" +PR .= ".2" -DEPENDS += "${@base_contains('DISTRO_FEATURES', 'selinux', 'libselinux', '', d)}" +inherit selinux + +DEPENDS += "${LIBSELINUX}" do_configure_prepend () { - export LINUX_HASSELINUX="${@base_contains('DISTRO_FEATURES', 'selinux', 'Y', 'N', d)}" + export LINUX_HASSELINUX="${@target_selinux(d, 'Y', 'N')}" export LSOF_CFGF="${CFLAGS}" export LSOF_CFGL="${LDFLAGS}" export LSOF_CC="${BUILD_CC}" diff --git a/recipes-extended/net-tools/net-tools_1.60-23.bbappend b/recipes-extended/net-tools/net-tools_1.60-23.bbappend index 5d76214..e99a5bc 100644 --- a/recipes-extended/net-tools/net-tools_1.60-23.bbappend +++ b/recipes-extended/net-tools/net-tools_1.60-23.bbappend @@ -1,9 +1,11 @@ -PR .= ".1" +PR .= ".2" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI += "file://netstat-selinux-support.patch" -DEPENDS += "${@base_contains('DISTRO_FEATURES', 'selinux', 'libselinux', '', d)}" +inherit selinux -EXTRA_OEMAKE += "${@base_contains('DISTRO_FEATURES', 'selinux', 'HAVE_SELINUX=1', 'HAVE_SELINUX=0', d)}" +DEPENDS += "${LIBSELINUX}" + +EXTRA_OEMAKE += "${@target_selinux(d, 'HAVE_SELINUX=1', 'HAVE_SELINUX=0')}" diff --git a/recipes-extended/sed/sed_4.2.1.bbappend b/recipes-extended/sed/sed_4.2.1.bbappend index 52243c2..0607d44 100644 --- a/recipes-extended/sed/sed_4.2.1.bbappend +++ b/recipes-extended/sed/sed_4.2.1.bbappend @@ -1,7 +1,9 @@ -PR .= ".1" +PR .= ".2" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" SRC_URI += "file://sed-selinux-fix.patch" -DEPENDS += "${@base_contains('DISTRO_FEATURES', 'selinux', 'libselinux', '', d)}" +inherit selinux + +DEPENDS += "${LIBSELINUX}" -- cgit v1.2.3-54-g00ecf