diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2020-04-14 15:41:54 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2020-04-15 14:58:16 -0400 |
commit | cc47ebe09e57d06cca543308ad1da2c6673470ae (patch) | |
tree | 4ad43e07131eaafba3fb5f2aebee9995ebe8f02b | |
parent | b671291f7e2ddc5bacac997119a4562f6171fdb8 (diff) | |
download | meta-selinux-cc47ebe09e57d06cca543308ad1da2c6673470ae.tar.gz |
selinux-python: upgrade to 3.0 (20191204)
Refresh fix-sepolicy-install-path.patch.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
4 files changed, 15 insertions, 25 deletions
diff --git a/recipes-security/selinux/selinux-python.inc b/recipes-security/selinux/selinux-python.inc index 5e27781..e690ac5 100644 --- a/recipes-security/selinux/selinux-python.inc +++ b/recipes-security/selinux/selinux-python.inc | |||
@@ -8,7 +8,7 @@ LICENSE = "GPLv2+" | |||
8 | 8 | ||
9 | SRC_URI += "file://fix-sepolicy-install-path.patch" | 9 | SRC_URI += "file://fix-sepolicy-install-path.patch" |
10 | 10 | ||
11 | inherit python3-dir | 11 | inherit python3native |
12 | 12 | ||
13 | DEPENDS += "python3 libsepol" | 13 | DEPENDS += "python3 libsepol" |
14 | RDEPENDS_${BPN}-audit2allow += "\ | 14 | RDEPENDS_${BPN}-audit2allow += "\ |
@@ -101,7 +101,6 @@ EXTRA_OEMAKE += "LIBSEPOLA=${STAGING_LIBDIR}/libsepol.a" | |||
101 | 101 | ||
102 | do_install() { | 102 | do_install() { |
103 | oe_runmake DESTDIR="${D}" \ | 103 | oe_runmake DESTDIR="${D}" \ |
104 | LIBDIR="${libdir}" \ | ||
105 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | 104 | PYLIBVER='python${PYTHON_BASEVERSION}' \ |
106 | PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ | 105 | PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ |
107 | install | 106 | install |
diff --git a/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch b/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch index 30a19eb..527e02c 100644 --- a/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch +++ b/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch | |||
@@ -1,36 +1,27 @@ | |||
1 | From e57022e3577770188ad3570005b7107a09cf3bb9 Mon Sep 17 00:00:00 2001 | 1 | From e8fdfdf96a84209118deff7782cf82f8187af6c5 Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Mon, 23 Sep 2013 21:17:59 +0800 | 3 | Date: Mon, 23 Sep 2013 21:17:59 +0800 |
4 | Subject: [PATCH] policycoreutils: fix install path for new pymodule sepolicy | 4 | Subject: [PATCH] policycoreutils: fix install path for new pymodule sepolicy |
5 | 5 | ||
6 | Uptream-Status: Pending | 6 | Upstream-Status: Inappropriate [embedded specific] |
7 | 7 | ||
8 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | 8 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> |
9 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | 9 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> |
10 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | 10 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
11 | --- | 11 | --- |
12 | sepolicy/Makefile | 4 +++- | 12 | sepolicy/Makefile | 2 +- |
13 | 1 file changed, 3 insertions(+), 1 deletion(-) | 13 | 1 file changed, 1 insertion(+), 1 deletion(-) |
14 | 14 | ||
15 | diff --git a/sepolicy/Makefile b/sepolicy/Makefile | 15 | diff --git a/sepolicy/Makefile b/sepolicy/Makefile |
16 | index 69f29fa..a18d1c3 100644 | 16 | index 69f29fa..b474d80 100644 |
17 | --- a/sepolicy/Makefile | 17 | --- a/sepolicy/Makefile |
18 | +++ b/sepolicy/Makefile | 18 | +++ b/sepolicy/Makefile |
19 | @@ -9,6 +9,8 @@ BASHCOMPLETIONDIR ?= $(PREFIX)/share/bash-completion/completions | 19 | @@ -27,7 +27,7 @@ test: |
20 | CFLAGS ?= -Wall -Werror -Wextra -W | ||
21 | override CFLAGS += -DPACKAGE="policycoreutils" -DSHARED -shared | ||
22 | |||
23 | +PYLIBVER ?= $(shell python -c 'import sys;print "python%d.%d" % sys.version_info[0:2]') | ||
24 | + | ||
25 | BASHCOMPLETIONS=sepolicy-bash-completion.sh | ||
26 | |||
27 | all: python-build | ||
28 | @@ -27,7 +29,7 @@ test: | ||
29 | @$(PYTHON) test_sepolicy.py -v | 20 | @$(PYTHON) test_sepolicy.py -v |
30 | 21 | ||
31 | install: | 22 | install: |
32 | - $(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` | 23 | - $(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` |
33 | + $(PYTHON) setup.py install --prefix=$(PREFIX) --install-lib $(DESTDIR)$(LIBDIR)/$(PYLIBVER)/site-packages | 24 | + $(PYTHON) setup.py install --prefix=$(PREFIX) --root=$(DESTDIR) --install-lib=$(PYTHONLIBDIR) --no-compile |
34 | [ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) | 25 | [ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) |
35 | install -m 755 sepolicy.py $(DESTDIR)$(BINDIR)/sepolicy | 26 | install -m 755 sepolicy.py $(DESTDIR)$(BINDIR)/sepolicy |
36 | (cd $(DESTDIR)$(BINDIR); ln -sf sepolicy sepolgen) | 27 | (cd $(DESTDIR)$(BINDIR); ln -sf sepolicy sepolgen) |
diff --git a/recipes-security/selinux/selinux-python_2.9.bb b/recipes-security/selinux/selinux-python_2.9.bb deleted file mode 100644 index 250a99c..0000000 --- a/recipes-security/selinux/selinux-python_2.9.bb +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | require selinux_20190315.inc | ||
2 | require ${BPN}.inc | ||
3 | |||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
5 | |||
6 | SRC_URI[md5sum] = "e9dfedd1139dd9998f5a09abfb670454" | ||
7 | SRC_URI[sha256sum] = "3650b5393b0d1790cac66db00e34f059aa91c23cfe3c2559676594e295d75fde" | ||
diff --git a/recipes-security/selinux/selinux-python_3.0.bb b/recipes-security/selinux/selinux-python_3.0.bb new file mode 100644 index 0000000..8222d28 --- /dev/null +++ b/recipes-security/selinux/selinux-python_3.0.bb | |||
@@ -0,0 +1,7 @@ | |||
1 | require selinux_20191204.inc | ||
2 | require ${BPN}.inc | ||
3 | |||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
5 | |||
6 | SRC_URI[md5sum] = "aa018c9b1b26034f84f3f427adac08be" | ||
7 | SRC_URI[sha256sum] = "43c08fa881ccc64251d396b1ac6c56b354bf98421b4ec937d54a8db190135494" | ||