diff options
-rw-r--r-- | recipes-security/selinux/libselinux-python.inc | 9 | ||||
-rw-r--r-- | recipes-security/selinux/libselinux-python_3.0.bb (renamed from recipes-security/selinux/libselinux-python_2.9.bb) | 8 | ||||
-rw-r--r-- | recipes-security/selinux/libselinux/0001-Makefile-fix-python-modules-install-path-for-multili.patch | 28 |
3 files changed, 38 insertions, 7 deletions
diff --git a/recipes-security/selinux/libselinux-python.inc b/recipes-security/selinux/libselinux-python.inc index 6a64473..3760fd8 100644 --- a/recipes-security/selinux/libselinux-python.inc +++ b/recipes-security/selinux/libselinux-python.inc | |||
@@ -7,9 +7,9 @@ LICENSE = "PD" | |||
7 | 7 | ||
8 | FILESEXTRAPATHS_prepend := "${THISDIR}/libselinux:" | 8 | FILESEXTRAPATHS_prepend := "${THISDIR}/libselinux:" |
9 | 9 | ||
10 | inherit python3-dir | 10 | inherit python3native |
11 | 11 | ||
12 | DEPENDS += "python3 swig-native" | 12 | DEPENDS += "python3 swig-native libpcre libsepol" |
13 | RDEPENDS_${PN} += "libselinux python3-core python3-shell" | 13 | RDEPENDS_${PN} += "libselinux python3-core python3-shell" |
14 | 14 | ||
15 | def get_policyconfigarch(d): | 15 | def get_policyconfigarch(d): |
@@ -24,6 +24,7 @@ EXTRA_OEMAKE += "LDFLAGS='${LDFLAGS} -lpcre' LIBSEPOLA='${STAGING_LIBDIR}/libsep | |||
24 | EXTRA_OEMAKE_append_libc-musl = " FTS_LDLIBS=-lfts" | 24 | EXTRA_OEMAKE_append_libc-musl = " FTS_LDLIBS=-lfts" |
25 | 25 | ||
26 | FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | 26 | FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" |
27 | INSANE_SKIP_${PN} = "dev-so" | ||
27 | 28 | ||
28 | do_compile() { | 29 | do_compile() { |
29 | oe_runmake pywrap -j1 \ | 30 | oe_runmake pywrap -j1 \ |
@@ -34,7 +35,7 @@ do_compile() { | |||
34 | 35 | ||
35 | do_install() { | 36 | do_install() { |
36 | oe_runmake install-pywrap \ | 37 | oe_runmake install-pywrap \ |
37 | PYCEXT='.so' \ | 38 | DESTDIR=${D} \ |
38 | PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ | 39 | PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ |
39 | PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages' | 40 | PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' |
40 | } | 41 | } |
diff --git a/recipes-security/selinux/libselinux-python_2.9.bb b/recipes-security/selinux/libselinux-python_3.0.bb index 8e3aae1..e024a22 100644 --- a/recipes-security/selinux/libselinux-python_2.9.bb +++ b/recipes-security/selinux/libselinux-python_3.0.bb | |||
@@ -1,4 +1,4 @@ | |||
1 | SELINUX_RELEASE = "20190315" | 1 | SELINUX_RELEASE = "20191204" |
2 | 2 | ||
3 | SRC_URI = "https://github.com/SELinuxProject/selinux/releases/download/${SELINUX_RELEASE}/libselinux-${PV}.tar.gz" | 3 | SRC_URI = "https://github.com/SELinuxProject/selinux/releases/download/${SELINUX_RELEASE}/libselinux-${PV}.tar.gz" |
4 | 4 | ||
@@ -6,13 +6,15 @@ require ${BPN}.inc | |||
6 | 6 | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0" | 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0" |
8 | 8 | ||
9 | SRC_URI[md5sum] = "bb449431b6ed55a0a0496dbc366d6e31" | 9 | SRC_URI[md5sum] = "b387a66f087b6d97713570e85ec89d89" |
10 | SRC_URI[sha256sum] = "1bccc8873e449587d9a2b2cf253de9b89a8291b9fbc7c59393ca9e5f5f4d2693" | 10 | SRC_URI[sha256sum] = "2ea2b30f671dae9d6b1391cbe8fb2ce5d36a3ee4fb1cd3c32f0d933c31b82433" |
11 | 11 | ||
12 | SRC_URI += "\ | 12 | SRC_URI += "\ |
13 | file://libselinux-drop-Wno-unused-but-set-variable.patch \ | 13 | file://libselinux-drop-Wno-unused-but-set-variable.patch \ |
14 | file://libselinux-make-O_CLOEXEC-optional.patch \ | 14 | file://libselinux-make-O_CLOEXEC-optional.patch \ |
15 | file://libselinux-make-SOCK_CLOEXEC-optional.patch \ | 15 | file://libselinux-make-SOCK_CLOEXEC-optional.patch \ |
16 | file://libselinux-define-FD_CLOEXEC-as-necessary.patch \ | 16 | file://libselinux-define-FD_CLOEXEC-as-necessary.patch \ |
17 | file://0001-Fix-building-against-musl-and-uClibc-libc-libraries.patch \ | ||
18 | file://0001-Makefile-fix-python-modules-install-path-for-multili.patch \ | ||
17 | " | 19 | " |
18 | S = "${WORKDIR}/libselinux-${PV}" | 20 | S = "${WORKDIR}/libselinux-${PV}" |
diff --git a/recipes-security/selinux/libselinux/0001-Makefile-fix-python-modules-install-path-for-multili.patch b/recipes-security/selinux/libselinux/0001-Makefile-fix-python-modules-install-path-for-multili.patch new file mode 100644 index 0000000..f0fee23 --- /dev/null +++ b/recipes-security/selinux/libselinux/0001-Makefile-fix-python-modules-install-path-for-multili.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 930514c1b93335ccf6d70adf46ca7e3f8183603d Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Mon, 13 Apr 2020 12:44:23 +0800 | ||
4 | Subject: [PATCH] Makefile: fix python modules install path for multilib | ||
5 | |||
6 | Upstream-Status: Inappropriate [embedded specific] | ||
7 | |||
8 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
9 | --- | ||
10 | src/Makefile | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/src/Makefile b/src/Makefile | ||
14 | index b0ce2c8..a384a10 100644 | ||
15 | --- a/src/Makefile | ||
16 | +++ b/src/Makefile | ||
17 | @@ -173,7 +173,7 @@ install: all | ||
18 | ln -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET) | ||
19 | |||
20 | install-pywrap: pywrap | ||
21 | - $(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` | ||
22 | + $(PYTHON) setup.py install --prefix=$(PREFIX) --root=$(DESTDIR) --install-lib=$(PYTHONLIBDIR) | ||
23 | install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py | ||
24 | ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux$(PYCEXT) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT) | ||
25 | |||
26 | -- | ||
27 | 2.7.4 | ||
28 | |||