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>
This commit is contained in:
Yi Zhao 2020-04-14 15:41:54 +08:00 committed by Joe MacDonald
parent b671291f7e
commit cc47ebe09e
4 changed files with 15 additions and 25 deletions

View File

@ -8,7 +8,7 @@ LICENSE = "GPLv2+"
SRC_URI += "file://fix-sepolicy-install-path.patch"
inherit python3-dir
inherit python3native
DEPENDS += "python3 libsepol"
RDEPENDS_${BPN}-audit2allow += "\
@ -101,7 +101,6 @@ EXTRA_OEMAKE += "LIBSEPOLA=${STAGING_LIBDIR}/libsepol.a"
do_install() {
oe_runmake DESTDIR="${D}" \
LIBDIR="${libdir}" \
PYLIBVER='python${PYTHON_BASEVERSION}' \
PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
install

View File

@ -1,36 +1,27 @@
From e57022e3577770188ad3570005b7107a09cf3bb9 Mon Sep 17 00:00:00 2001
From e8fdfdf96a84209118deff7782cf82f8187af6c5 Mon Sep 17 00:00:00 2001
From: Xin Ouyang <Xin.Ouyang@windriver.com>
Date: Mon, 23 Sep 2013 21:17:59 +0800
Subject: [PATCH] policycoreutils: fix install path for new pymodule sepolicy
Uptream-Status: Pending
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
sepolicy/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
sepolicy/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sepolicy/Makefile b/sepolicy/Makefile
index 69f29fa..a18d1c3 100644
index 69f29fa..b474d80 100644
--- a/sepolicy/Makefile
+++ b/sepolicy/Makefile
@@ -9,6 +9,8 @@ BASHCOMPLETIONDIR ?= $(PREFIX)/share/bash-completion/completions
CFLAGS ?= -Wall -Werror -Wextra -W
override CFLAGS += -DPACKAGE="policycoreutils" -DSHARED -shared
+PYLIBVER ?= $(shell python -c 'import sys;print "python%d.%d" % sys.version_info[0:2]')
+
BASHCOMPLETIONS=sepolicy-bash-completion.sh
all: python-build
@@ -27,7 +29,7 @@ test:
@@ -27,7 +27,7 @@ test:
@$(PYTHON) test_sepolicy.py -v
install:
- $(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
+ $(PYTHON) setup.py install --prefix=$(PREFIX) --install-lib $(DESTDIR)$(LIBDIR)/$(PYLIBVER)/site-packages
+ $(PYTHON) setup.py install --prefix=$(PREFIX) --root=$(DESTDIR) --install-lib=$(PYTHONLIBDIR) --no-compile
[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)
install -m 755 sepolicy.py $(DESTDIR)$(BINDIR)/sepolicy
(cd $(DESTDIR)$(BINDIR); ln -sf sepolicy sepolgen)

View File

@ -1,7 +0,0 @@
require selinux_20190315.inc
require ${BPN}.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
SRC_URI[md5sum] = "e9dfedd1139dd9998f5a09abfb670454"
SRC_URI[sha256sum] = "3650b5393b0d1790cac66db00e34f059aa91c23cfe3c2559676594e295d75fde"

View File

@ -0,0 +1,7 @@
require selinux_20191204.inc
require ${BPN}.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
SRC_URI[md5sum] = "aa018c9b1b26034f84f3f427adac08be"
SRC_URI[sha256sum] = "43c08fa881ccc64251d396b1ac6c56b354bf98421b4ec937d54a8db190135494"