mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
Globally replace 'base_contains' calls with 'bb.utils.contains'
Based on oe-core commit: commit 1528e596d4906c33e4be83fcf691cfe76d340ff3 Author: Otavio Salvador <otavio@ossystems.com.br> Date: Thu Apr 24 15:59:20 2014 -0300 Globally replace 'base_contains' calls with 'bb.utils.contains' The base_contains is kept as a compatibility method and we ought to not use it in OE-Core so we can remove it from base metadata in future. Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
parent
8476ec5e64
commit
aa85e81d94
|
|
@ -1,5 +1,5 @@
|
|||
def target_selinux(d, truevar = 'selinux', falsevar = ''):
|
||||
if not base_contains("DISTRO_FEATURES", "selinux", True, False, d):
|
||||
if not bb.utils.contains("DISTRO_FEATURES", "selinux", True, False, d):
|
||||
return falsevar
|
||||
|
||||
pn = d.getVar("PN", True)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
|||
inherit with-selinux
|
||||
|
||||
|
||||
PACKAGECONFIG += "${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
|
||||
PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
|
||||
|
||||
# configure has no acl enable/disable options!
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
# Enable selinux support in the kernel if the feature is enabled
|
||||
SRC_URI += "${@base_contains('DISTRO_FEATURES', 'selinux', 'file://selinux.cfg', '', d)}"
|
||||
SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'file://selinux.cfg', '', d)}"
|
||||
|
||||
# For inconsistent kallsyms data bug on ARM
|
||||
# http://lists.infradead.org/pipermail/linux-arm-kernel/2012-March/thread.html#89718
|
||||
EXTRA_OEMAKE += "${@base_contains('TARGET_ARCH', 'arm', ' KALLSYMS_EXTRA_PASS=1', '', d)}"
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('TARGET_ARCH', 'arm', ' KALLSYMS_EXTRA_PASS=1', '', d)}"
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ do_install_append() {
|
|||
install -D -m 0755 ${S}/../auditd ${D}/etc/init.d/auditd
|
||||
rm -rf ${D}/etc/rc.d
|
||||
|
||||
if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
install -d ${D}${sysconfdir}/tmpfiles.d/
|
||||
install -m 0644 ${WORKDIR}/audit-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ prepare_policy_store () {
|
|||
mkdir -p ${D}${sysconfdir}/selinux/${POLICY_NAME}/modules/active/modules
|
||||
mkdir -p ${D}${sysconfdir}/selinux/${POLICY_NAME}/contexts/files
|
||||
touch ${D}${sysconfdir}/selinux/${POLICY_NAME}/contexts/files/file_contexts.local
|
||||
if ${@base_contains('DISTRO_FEATURES','compressed_policy','true','false',d)}; then
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','compressed_policy','true','false',d)}; then
|
||||
bzip2 base.pp
|
||||
cp base.pp.bz2 ${D}${sysconfdir}/selinux/${POLICY_NAME}/modules/active/base.pp
|
||||
for i in ${POLICY_MODULES_MIN}; do
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ S = "${WORKDIR}/refpolicy"
|
|||
|
||||
FILES_${PN} = " \
|
||||
${sysconfdir}/selinux/${POLICY_NAME}/ \
|
||||
${@base_contains('DISTRO_FEATURES', 'compressed_policy', '${datadir}/selinux/${POLICY_NAME}/*.pp.bz2', '${datadir}/selinux/${POLICY_NAME}/*.pp', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'compressed_policy', '${datadir}/selinux/${POLICY_NAME}/*.pp.bz2', '${datadir}/selinux/${POLICY_NAME}/*.pp', d)} \
|
||||
"
|
||||
FILES_${PN}-dev =+ "${datadir}/selinux/${POLICY_NAME}/include/"
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ prepare_policy_store () {
|
|||
mkdir -p ${D}${sysconfdir}/selinux/${POLICY_NAME}/modules/active/modules
|
||||
mkdir -p ${D}${sysconfdir}/selinux/${POLICY_NAME}/contexts/files
|
||||
touch ${D}${sysconfdir}/selinux/${POLICY_NAME}/contexts/files/file_contexts.local
|
||||
if ${@base_contains('DISTRO_FEATURES','compressed_policy','true','false',d)}; then
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','compressed_policy','true','false',d)}; then
|
||||
for i in ${D}${datadir}/selinux/${POLICY_NAME}/*.pp; do
|
||||
bzip2 $i
|
||||
if [ "`basename $i`" != "base.pp" ]; then
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ context."
|
|||
SECTION = "base"
|
||||
LICENSE = "GPLv2+"
|
||||
|
||||
SRC_URI += "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
|
||||
SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
|
||||
|
||||
PAM_SRC_URI = "file://pam.d/newrole \
|
||||
file://pam.d/run_init \
|
||||
|
|
@ -154,7 +154,7 @@ FILES_${PN}-loadpolicy += "\
|
|||
"
|
||||
FILES_${PN}-newrole += "\
|
||||
${bindir}/newrole \
|
||||
${@base_contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/newrole', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/newrole', '', d)} \
|
||||
"
|
||||
FILES_${PN}-python = "\
|
||||
${libdir}/python${PYTHON_BASEVERSION}/site-packages/seobject.py* \
|
||||
|
|
@ -164,7 +164,7 @@ FILES_${PN}-python = "\
|
|||
FILES_${PN}-runinit += "\
|
||||
${sbindir}/run_init \
|
||||
${sbindir}/open_init_pty \
|
||||
${@base_contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/run_init', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/run_init', '', d)} \
|
||||
"
|
||||
FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy/.debug/*"
|
||||
FILES_${PN}-sandbox += "\
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user