mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
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>
This commit is contained in:
parent
87f68ae9a9
commit
463a26c0d1
|
|
@ -21,14 +21,13 @@ PACKAGES += "${PN}-python"
|
|||
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
|
||||
FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*"
|
||||
|
||||
python __anonymous () {
|
||||
def get_policyconfigarch(d):
|
||||
import re
|
||||
target = d.getVar('TARGET_ARCH', True)
|
||||
extra_oemake = d.getVar('EXTRA_OEMAKE', True)
|
||||
p = re.compile('i.86')
|
||||
target = p.sub('i386',target)
|
||||
d.setVar("EXTRA_OEMAKE", extra_oemake + " ARCH='" + target + "'")
|
||||
}
|
||||
return "ARCH=%s" % (target)
|
||||
EXTRA_OEMAKE += "${@get_policyconfigarch(d)}"
|
||||
|
||||
do_compile_append() {
|
||||
oe_runmake pywrap -j1 \
|
||||
|
|
|
|||
|
|
@ -20,14 +20,13 @@ PACKAGES += "${PN}-python"
|
|||
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
|
||||
FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*"
|
||||
|
||||
python __anonymous () {
|
||||
def get_policyconfigarch(d):
|
||||
import re
|
||||
target = d.getVar('TARGET_ARCH', True)
|
||||
extra_oemake = d.getVar('EXTRA_OEMAKE', True)
|
||||
p = re.compile('i.86')
|
||||
target = p.sub('i386',target)
|
||||
d.setVar("EXTRA_OEMAKE", extra_oemake + " ARCH='" + target + "'")
|
||||
}
|
||||
return "ARCH=%s" % (target)
|
||||
EXTRA_OEMAKE += "${@get_policyconfigarch(d)}"
|
||||
|
||||
do_compile_append() {
|
||||
oe_runmake pywrap -j1 \
|
||||
|
|
|
|||
|
|
@ -14,17 +14,10 @@ include selinux_20120216.inc
|
|||
SRC_URI[md5sum] = "fefdede2815cdd2ba8b68599fef1f257"
|
||||
SRC_URI[sha256sum] = "8bbbc36b7d375edff891503932da93e37553f0dd7bdceded7ce9a45c80bec3d1"
|
||||
|
||||
DEPENDS += "libsepol libselinux libsemanage"
|
||||
TARGET_EXTRA_DEPENDS = "libcap-ng libcgroup"
|
||||
TARGET_EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}"
|
||||
python __anonymous () {
|
||||
dps = d.getVar('DEPENDS', True)
|
||||
extra_dps = d.getVar('TARGET_EXTRA_DEPENDS', True)
|
||||
pn = d.getVar('PN', True)
|
||||
bpn = d.getVar('BPN', True)
|
||||
if pn == bpn:
|
||||
d.setVar("DEPENDS", dps + " " + extra_dps)
|
||||
}
|
||||
DEPENDS += "libsepol libselinux libsemanage ${EXTRA_DEPENDS}"
|
||||
EXTRA_DEPENDS = "libcap-ng libcgroup"
|
||||
EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}"
|
||||
EXTRA_DEPENDS_virtclass-native = ""
|
||||
|
||||
RDEPENDS_${BPN} += "\
|
||||
libselinux-python \
|
||||
|
|
|
|||
|
|
@ -15,9 +15,10 @@ include selinux_git.inc
|
|||
SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
|
||||
PV = "2.1.10+git${SRCPV}"
|
||||
|
||||
DEPENDS += "libsepol libselinux libsemanage"
|
||||
DEPENDS_${BPN} += "libcap-ng libcgroup"
|
||||
DEPENDS_${BPN} += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}"
|
||||
DEPENDS += "libsepol libselinux libsemanage ${EXTRA_DEPENDS}"
|
||||
EXTRA_DEPENDS = "libcap-ng libcgroup"
|
||||
EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}"
|
||||
EXTRA_DEPENDS_virtclass-native = ""
|
||||
|
||||
RDEPENDS_${BPN} += "\
|
||||
libselinux-python \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user