summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe MacDonald <joe.macdonald@windriver.com>2012-05-18 16:14:04 -0400
committerMark Hatle <mark.hatle@windriver.com>2012-05-18 18:37:09 -0500
commit463a26c0d12e57a04405ace40e32832ebb2c86fa (patch)
treed37ed2aea67fcb0c9f9b8d03ff675c7f2ea3aa47
parent87f68ae9a9322448883e56fc7201fd70a8b718e3 (diff)
downloadmeta-selinux-463a26c0d12e57a04405ace40e32832ebb2c86fa.tar.gz
selinux: Remove unnecessary anonymous python blocks
libselinux was attempting to ensure ARCH was set to i386 for any i*86 platform. Replaced the existing code with a simpler construct that accomplishes the same goal. A similar anonymous python block was being used in policycoreutils to identify an optional dependency on libcap-ng and libcgroup. Also replaced with a simpler construct. The newest policycoreutils depends on them both anyway in the current configuration. Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> Added _git versions. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-rw-r--r--recipes-security/selinux/libselinux_2.1.9.bb7
-rw-r--r--recipes-security/selinux/libselinux_git.bb7
-rw-r--r--recipes-security/selinux/policycoreutils_2.1.10.bb15
-rw-r--r--recipes-security/selinux/policycoreutils_git.bb7
4 files changed, 14 insertions, 22 deletions
diff --git a/recipes-security/selinux/libselinux_2.1.9.bb b/recipes-security/selinux/libselinux_2.1.9.bb
index d25c318..fdc3b30 100644
--- a/recipes-security/selinux/libselinux_2.1.9.bb
+++ b/recipes-security/selinux/libselinux_2.1.9.bb
@@ -21,14 +21,13 @@ PACKAGES += "${PN}-python"
21FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*" 21FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
22FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*" 22FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*"
23 23
24python __anonymous () { 24def get_policyconfigarch(d):
25 import re 25 import re
26 target = d.getVar('TARGET_ARCH', True) 26 target = d.getVar('TARGET_ARCH', True)
27 extra_oemake = d.getVar('EXTRA_OEMAKE', True)
28 p = re.compile('i.86') 27 p = re.compile('i.86')
29 target = p.sub('i386',target) 28 target = p.sub('i386',target)
30 d.setVar("EXTRA_OEMAKE", extra_oemake + " ARCH='" + target + "'") 29 return "ARCH=%s" % (target)
31} 30EXTRA_OEMAKE += "${@get_policyconfigarch(d)}"
32 31
33do_compile_append() { 32do_compile_append() {
34 oe_runmake pywrap -j1 \ 33 oe_runmake pywrap -j1 \
diff --git a/recipes-security/selinux/libselinux_git.bb b/recipes-security/selinux/libselinux_git.bb
index 8a61929..5a96094 100644
--- a/recipes-security/selinux/libselinux_git.bb
+++ b/recipes-security/selinux/libselinux_git.bb
@@ -20,14 +20,13 @@ PACKAGES += "${PN}-python"
20FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*" 20FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
21FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*" 21FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*"
22 22
23python __anonymous () { 23def get_policyconfigarch(d):
24 import re 24 import re
25 target = d.getVar('TARGET_ARCH', True) 25 target = d.getVar('TARGET_ARCH', True)
26 extra_oemake = d.getVar('EXTRA_OEMAKE', True)
27 p = re.compile('i.86') 26 p = re.compile('i.86')
28 target = p.sub('i386',target) 27 target = p.sub('i386',target)
29 d.setVar("EXTRA_OEMAKE", extra_oemake + " ARCH='" + target + "'") 28 return "ARCH=%s" % (target)
30} 29EXTRA_OEMAKE += "${@get_policyconfigarch(d)}"
31 30
32do_compile_append() { 31do_compile_append() {
33 oe_runmake pywrap -j1 \ 32 oe_runmake pywrap -j1 \
diff --git a/recipes-security/selinux/policycoreutils_2.1.10.bb b/recipes-security/selinux/policycoreutils_2.1.10.bb
index 2289762..14b8cd6 100644
--- a/recipes-security/selinux/policycoreutils_2.1.10.bb
+++ b/recipes-security/selinux/policycoreutils_2.1.10.bb
@@ -14,17 +14,10 @@ include selinux_20120216.inc
14SRC_URI[md5sum] = "fefdede2815cdd2ba8b68599fef1f257" 14SRC_URI[md5sum] = "fefdede2815cdd2ba8b68599fef1f257"
15SRC_URI[sha256sum] = "8bbbc36b7d375edff891503932da93e37553f0dd7bdceded7ce9a45c80bec3d1" 15SRC_URI[sha256sum] = "8bbbc36b7d375edff891503932da93e37553f0dd7bdceded7ce9a45c80bec3d1"
16 16
17DEPENDS += "libsepol libselinux libsemanage" 17DEPENDS += "libsepol libselinux libsemanage ${EXTRA_DEPENDS}"
18TARGET_EXTRA_DEPENDS = "libcap-ng libcgroup" 18EXTRA_DEPENDS = "libcap-ng libcgroup"
19TARGET_EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}" 19EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}"
20python __anonymous () { 20EXTRA_DEPENDS_virtclass-native = ""
21 dps = d.getVar('DEPENDS', True)
22 extra_dps = d.getVar('TARGET_EXTRA_DEPENDS', True)
23 pn = d.getVar('PN', True)
24 bpn = d.getVar('BPN', True)
25 if pn == bpn:
26 d.setVar("DEPENDS", dps + " " + extra_dps)
27}
28 21
29RDEPENDS_${BPN} += "\ 22RDEPENDS_${BPN} += "\
30 libselinux-python \ 23 libselinux-python \
diff --git a/recipes-security/selinux/policycoreutils_git.bb b/recipes-security/selinux/policycoreutils_git.bb
index 7a85d22..98a751a 100644
--- a/recipes-security/selinux/policycoreutils_git.bb
+++ b/recipes-security/selinux/policycoreutils_git.bb
@@ -15,9 +15,10 @@ include selinux_git.inc
15SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" 15SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
16PV = "2.1.10+git${SRCPV}" 16PV = "2.1.10+git${SRCPV}"
17 17
18DEPENDS += "libsepol libselinux libsemanage" 18DEPENDS += "libsepol libselinux libsemanage ${EXTRA_DEPENDS}"
19DEPENDS_${BPN} += "libcap-ng libcgroup" 19EXTRA_DEPENDS = "libcap-ng libcgroup"
20DEPENDS_${BPN} += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}" 20EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}"
21EXTRA_DEPENDS_virtclass-native = ""
21 22
22RDEPENDS_${BPN} += "\ 23RDEPENDS_${BPN} += "\
23 libselinux-python \ 24 libselinux-python \