diff options
author | Joe MacDonald <joe.macdonald@windriver.com> | 2012-05-18 16:14:04 -0400 |
---|---|---|
committer | Mark Hatle <mark.hatle@windriver.com> | 2012-05-18 18:37:09 -0500 |
commit | 463a26c0d12e57a04405ace40e32832ebb2c86fa (patch) | |
tree | d37ed2aea67fcb0c9f9b8d03ff675c7f2ea3aa47 | |
parent | 87f68ae9a9322448883e56fc7201fd70a8b718e3 (diff) | |
download | meta-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.bb | 7 | ||||
-rw-r--r-- | recipes-security/selinux/libselinux_git.bb | 7 | ||||
-rw-r--r-- | recipes-security/selinux/policycoreutils_2.1.10.bb | 15 | ||||
-rw-r--r-- | recipes-security/selinux/policycoreutils_git.bb | 7 |
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" | |||
21 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*" | 21 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*" |
22 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*" | 22 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*" |
23 | 23 | ||
24 | python __anonymous () { | 24 | def 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 | } | 30 | EXTRA_OEMAKE += "${@get_policyconfigarch(d)}" |
32 | 31 | ||
33 | do_compile_append() { | 32 | do_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" | |||
20 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*" | 20 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*" |
21 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*" | 21 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*" |
22 | 22 | ||
23 | python __anonymous () { | 23 | def 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 | } | 29 | EXTRA_OEMAKE += "${@get_policyconfigarch(d)}" |
31 | 30 | ||
32 | do_compile_append() { | 31 | do_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 | |||
14 | SRC_URI[md5sum] = "fefdede2815cdd2ba8b68599fef1f257" | 14 | SRC_URI[md5sum] = "fefdede2815cdd2ba8b68599fef1f257" |
15 | SRC_URI[sha256sum] = "8bbbc36b7d375edff891503932da93e37553f0dd7bdceded7ce9a45c80bec3d1" | 15 | SRC_URI[sha256sum] = "8bbbc36b7d375edff891503932da93e37553f0dd7bdceded7ce9a45c80bec3d1" |
16 | 16 | ||
17 | DEPENDS += "libsepol libselinux libsemanage" | 17 | DEPENDS += "libsepol libselinux libsemanage ${EXTRA_DEPENDS}" |
18 | TARGET_EXTRA_DEPENDS = "libcap-ng libcgroup" | 18 | EXTRA_DEPENDS = "libcap-ng libcgroup" |
19 | TARGET_EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}" | 19 | EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}" |
20 | python __anonymous () { | 20 | EXTRA_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 | ||
29 | RDEPENDS_${BPN} += "\ | 22 | RDEPENDS_${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 | |||
15 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | 15 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" |
16 | PV = "2.1.10+git${SRCPV}" | 16 | PV = "2.1.10+git${SRCPV}" |
17 | 17 | ||
18 | DEPENDS += "libsepol libselinux libsemanage" | 18 | DEPENDS += "libsepol libselinux libsemanage ${EXTRA_DEPENDS}" |
19 | DEPENDS_${BPN} += "libcap-ng libcgroup" | 19 | EXTRA_DEPENDS = "libcap-ng libcgroup" |
20 | DEPENDS_${BPN} += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}" | 20 | EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}" |
21 | EXTRA_DEPENDS_virtclass-native = "" | ||
21 | 22 | ||
22 | RDEPENDS_${BPN} += "\ | 23 | RDEPENDS_${BPN} += "\ |
23 | libselinux-python \ | 24 | libselinux-python \ |