mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
libselinux-python: upgrade to 3.0 (20191204)
* Inherit python3native as the libselinux uses python distutils to install selinux python bindings now. * Add a patch to fix python modules install path for multilib. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
parent
a1db7a9925
commit
65086a9972
|
|
@ -7,9 +7,9 @@ LICENSE = "PD"
|
|||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/libselinux:"
|
||||
|
||||
inherit python3-dir
|
||||
inherit python3native
|
||||
|
||||
DEPENDS += "python3 swig-native"
|
||||
DEPENDS += "python3 swig-native libpcre libsepol"
|
||||
RDEPENDS_${PN} += "libselinux python3-core python3-shell"
|
||||
|
||||
def get_policyconfigarch(d):
|
||||
|
|
@ -24,6 +24,7 @@ EXTRA_OEMAKE += "LDFLAGS='${LDFLAGS} -lpcre' LIBSEPOLA='${STAGING_LIBDIR}/libsep
|
|||
EXTRA_OEMAKE_append_libc-musl = " FTS_LDLIBS=-lfts"
|
||||
|
||||
FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
|
||||
INSANE_SKIP_${PN} = "dev-so"
|
||||
|
||||
do_compile() {
|
||||
oe_runmake pywrap -j1 \
|
||||
|
|
@ -34,7 +35,7 @@ do_compile() {
|
|||
|
||||
do_install() {
|
||||
oe_runmake install-pywrap \
|
||||
PYCEXT='.so' \
|
||||
DESTDIR=${D} \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
|
||||
PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages'
|
||||
PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
SELINUX_RELEASE = "20190315"
|
||||
SELINUX_RELEASE = "20191204"
|
||||
|
||||
SRC_URI = "https://github.com/SELinuxProject/selinux/releases/download/${SELINUX_RELEASE}/libselinux-${PV}.tar.gz"
|
||||
|
||||
|
|
@ -6,13 +6,15 @@ require ${BPN}.inc
|
|||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0"
|
||||
|
||||
SRC_URI[md5sum] = "bb449431b6ed55a0a0496dbc366d6e31"
|
||||
SRC_URI[sha256sum] = "1bccc8873e449587d9a2b2cf253de9b89a8291b9fbc7c59393ca9e5f5f4d2693"
|
||||
SRC_URI[md5sum] = "b387a66f087b6d97713570e85ec89d89"
|
||||
SRC_URI[sha256sum] = "2ea2b30f671dae9d6b1391cbe8fb2ce5d36a3ee4fb1cd3c32f0d933c31b82433"
|
||||
|
||||
SRC_URI += "\
|
||||
file://libselinux-drop-Wno-unused-but-set-variable.patch \
|
||||
file://libselinux-make-O_CLOEXEC-optional.patch \
|
||||
file://libselinux-make-SOCK_CLOEXEC-optional.patch \
|
||||
file://libselinux-define-FD_CLOEXEC-as-necessary.patch \
|
||||
file://0001-Fix-building-against-musl-and-uClibc-libc-libraries.patch \
|
||||
file://0001-Makefile-fix-python-modules-install-path-for-multili.patch \
|
||||
"
|
||||
S = "${WORKDIR}/libselinux-${PV}"
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
From 930514c1b93335ccf6d70adf46ca7e3f8183603d Mon Sep 17 00:00:00 2001
|
||||
From: Yi Zhao <yi.zhao@windriver.com>
|
||||
Date: Mon, 13 Apr 2020 12:44:23 +0800
|
||||
Subject: [PATCH] Makefile: fix python modules install path for multilib
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
|
||||
---
|
||||
src/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index b0ce2c8..a384a10 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -173,7 +173,7 @@ install: all
|
||||
ln -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET)
|
||||
|
||||
install-pywrap: pywrap
|
||||
- $(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
|
||||
+ $(PYTHON) setup.py install --prefix=$(PREFIX) --root=$(DESTDIR) --install-lib=$(PYTHONLIBDIR)
|
||||
install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py
|
||||
ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux$(PYCEXT) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT)
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
Loading…
Reference in New Issue
Block a user