diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2023-03-11 21:12:57 +0800 |
---|---|---|
committer | Joe MacDonald <joe@deserted.net> | 2023-03-27 09:34:02 -0400 |
commit | 7c0d8121c336a7a3ea4bef97626ba1ea5684fac4 (patch) | |
tree | 99648bff500e4302dcb7660f41e653c715a95194 | |
parent | 4f4946958b6140d3271162dfd52136d963ecf705 (diff) | |
download | meta-selinux-7c0d8121c336a7a3ea4bef97626ba1ea5684fac4.tar.gz |
libselinux-python: upgrade 3.4 -> 3.5
* Add dependency python3-setuptools-scm-native to fix build error.
* Refresh patches.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
-rw-r--r-- | recipes-security/selinux/libselinux-python_3.5.bb (renamed from recipes-security/selinux/libselinux-python_3.4.bb) | 14 | ||||
-rw-r--r-- | recipes-security/selinux/libselinux/0001-Makefile-fix-python-modules-install-path-for-multili.patch | 10 | ||||
-rw-r--r-- | recipes-security/selinux/libselinux/0002-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch | 10 |
3 files changed, 19 insertions, 15 deletions
diff --git a/recipes-security/selinux/libselinux-python_3.4.bb b/recipes-security/selinux/libselinux-python_3.5.bb index a850369..3555a72 100644 --- a/recipes-security/selinux/libselinux-python_3.4.bb +++ b/recipes-security/selinux/libselinux-python_3.5.bb | |||
@@ -18,7 +18,7 @@ SRC_URI += "\ | |||
18 | 18 | ||
19 | S = "${WORKDIR}/git/libselinux" | 19 | S = "${WORKDIR}/git/libselinux" |
20 | 20 | ||
21 | DEPENDS = "libsepol libpcre2 swig-native" | 21 | DEPENDS = "libsepol libpcre2 swig-native python3-setuptools-scm-native" |
22 | DEPENDS:append:libc-musl = " fts" | 22 | DEPENDS:append:libc-musl = " fts" |
23 | 23 | ||
24 | RDEPENDS:${PN} = "libselinux python3-core python3-shell" | 24 | RDEPENDS:${PN} = "libselinux python3-core python3-shell" |
@@ -33,12 +33,12 @@ def get_policyconfigarch(d): | |||
33 | EXTRA_OEMAKE = "${@get_policyconfigarch(d)}" | 33 | EXTRA_OEMAKE = "${@get_policyconfigarch(d)}" |
34 | EXTRA_OEMAKE:append:libc-musl = " FTS_LDLIBS=-lfts" | 34 | EXTRA_OEMAKE:append:libc-musl = " FTS_LDLIBS=-lfts" |
35 | 35 | ||
36 | FILES:${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | 36 | FILES:${PN} = "${PYTHON_SITEPACKAGES_DIR}/*" |
37 | INSANE_SKIP:${PN} = "dev-so" | 37 | INSANE_SKIP:${PN} = "dev-so" |
38 | 38 | ||
39 | do_compile() { | 39 | do_compile() { |
40 | oe_runmake pywrap -j1 \ | 40 | oe_runmake pywrap -j1 \ |
41 | PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ | 41 | PYLIBVER='python${PYTHON_BASEVERSION}' \ |
42 | PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \ | 42 | PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \ |
43 | PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}' | 43 | PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}' |
44 | } | 44 | } |
@@ -46,6 +46,10 @@ do_compile() { | |||
46 | do_install() { | 46 | do_install() { |
47 | oe_runmake install-pywrap \ | 47 | oe_runmake install-pywrap \ |
48 | DESTDIR=${D} \ | 48 | DESTDIR=${D} \ |
49 | PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ | 49 | PYLIBVER='python${PYTHON_BASEVERSION}' \ |
50 | PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' | 50 | PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}' |
51 | |||
52 | # Fix buildpaths issue | ||
53 | sed -i -e 's,${WORKDIR},,g' \ | ||
54 | ${D}${PYTHON_SITEPACKAGES_DIR}/selinux-${PV}.dist-info/direct_url.json | ||
51 | } | 55 | } |
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 index 9750cd6..1b9dfbb 100644 --- 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From 1ff60a36bb0bfc95ce33cf950f58e121548a3c8a Mon Sep 17 00:00:00 2001 | 1 | From 57a087de68d6f7fe955268ee36b523cbe7c0c6db Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Mon, 13 Apr 2020 12:44:23 +0800 | 3 | Date: Mon, 13 Apr 2020 12:44:23 +0800 |
4 | Subject: [PATCH] Makefile: fix python modules install path for multilib | 4 | Subject: [PATCH] Makefile: fix python modules install path for multilib |
@@ -11,15 +11,15 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | 11 | 1 file changed, 1 insertion(+), 1 deletion(-) |
12 | 12 | ||
13 | diff --git a/src/Makefile b/src/Makefile | 13 | diff --git a/src/Makefile b/src/Makefile |
14 | index 04bf4f2..81ae6a2 100644 | 14 | index 36d5712..983f8af 100644 |
15 | --- a/src/Makefile | 15 | --- a/src/Makefile |
16 | +++ b/src/Makefile | 16 | +++ b/src/Makefile |
17 | @@ -181,7 +181,7 @@ install: all | 17 | @@ -187,7 +187,7 @@ install: all |
18 | ln -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET) | 18 | ln -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET) |
19 | 19 | ||
20 | install-pywrap: pywrap | 20 | install-pywrap: pywrap |
21 | - $(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` $(PYTHON_SETUP_ARGS) | 21 | - $(PYTHON) -m pip install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR) --ignore-installed --no-deps` $(PYTHON_SETUP_ARGS) . |
22 | + $(PYTHON) setup.py install --prefix=$(PREFIX) --root=$(DESTDIR) --install-lib=$(PYTHONLIBDIR) $(PYTHON_SETUP_ARGS) | 22 | + $(PYTHON) -m pip install --prefix=$(PREFIX) --root $(DESTDIR) --ignore-installed --no-deps $(PYTHON_SETUP_ARGS) . |
23 | install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py | 23 | install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py |
24 | ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux$(PYCEXT) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT) | 24 | ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux$(PYCEXT) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT) |
25 | 25 | ||
diff --git a/recipes-security/selinux/libselinux/0002-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch b/recipes-security/selinux/libselinux/0002-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch index db7d68f..cd5510d 100644 --- a/recipes-security/selinux/libselinux/0002-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch +++ b/recipes-security/selinux/libselinux/0002-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From dae53d7cd4d7875f7fb7aba016a0331559044eea Mon Sep 17 00:00:00 2001 | 1 | From 1454521f2b9f2cbc3c40177aae9c260ec8966ae0 Mon Sep 17 00:00:00 2001 |
2 | From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2 | From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> |
3 | Date: Fri, 25 Oct 2019 13:37:14 +0200 | 3 | Date: Fri, 25 Oct 2019 13:37:14 +0200 |
4 | Subject: [PATCH] Do not use PYCEXT, and rely on the installed file name | 4 | Subject: [PATCH] Do not use PYCEXT, and rely on the installed file name |
@@ -27,20 +27,20 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> | |||
27 | 1 file changed, 1 insertion(+), 2 deletions(-) | 27 | 1 file changed, 1 insertion(+), 2 deletions(-) |
28 | 28 | ||
29 | diff --git a/src/Makefile b/src/Makefile | 29 | diff --git a/src/Makefile b/src/Makefile |
30 | index 81ae6a2..37399e1 100644 | 30 | index 983f8af..3d777bb 100644 |
31 | --- a/src/Makefile | 31 | --- a/src/Makefile |
32 | +++ b/src/Makefile | 32 | +++ b/src/Makefile |
33 | @@ -15,7 +15,6 @@ INCLUDEDIR ?= $(PREFIX)/include | 33 | @@ -15,7 +15,6 @@ INCLUDEDIR ?= $(PREFIX)/include |
34 | PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) | 34 | PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) |
35 | PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)) | 35 | PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)) |
36 | PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(plat_specific=1, prefix='$(PREFIX)'))") | 36 | PYTHONLIBDIR ?= $(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '$(PREFIX)', 'base': '$(PREFIX)'}))") |
37 | -PYCEXT ?= $(shell $(PYTHON) -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES[0])') | 37 | -PYCEXT ?= $(shell $(PYTHON) -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES[0])') |
38 | RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + " -I" + RbConfig::CONFIG["rubyhdrdir"]') | 38 | RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + " -I" + RbConfig::CONFIG["rubyhdrdir"]') |
39 | RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]') | 39 | RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -L" + RbConfig::CONFIG["archlibdir"] + " " + RbConfig::CONFIG["LIBRUBYARG_SHARED"]') |
40 | RUBYINSTALL ?= $(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]') | 40 | RUBYINSTALL ?= $(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]') |
41 | @@ -183,7 +182,7 @@ install: all | 41 | @@ -189,7 +188,7 @@ install: all |
42 | install-pywrap: pywrap | 42 | install-pywrap: pywrap |
43 | $(PYTHON) setup.py install --prefix=$(PREFIX) --root=$(DESTDIR) --install-lib=$(PYTHONLIBDIR) $(PYTHON_SETUP_ARGS) | 43 | $(PYTHON) -m pip install --prefix=$(PREFIX) --root $(DESTDIR) --ignore-installed --no-deps $(PYTHON_SETUP_ARGS) . |
44 | install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py | 44 | install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py |
45 | - ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux$(PYCEXT) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT) | 45 | - ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux$(PYCEXT) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT) |
46 | + ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux*.so $(DESTDIR)$(PYTHONLIBDIR)/ | 46 | + ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux*.so $(DESTDIR)$(PYTHONLIBDIR)/ |