From: Wenzong Fan <wenzong....@windriver.com> The selinux.py will be installed as selinux/__init__.py, just make sure it has been generated completely while starting "make install-pywrap".
This fixes below errors that caused by an empty "selinux/__init__.py" on target: $ /usr/sbin/semanage -h Traceback (most recent call last): File "/usr/sbin/semanage", line 30, in <module> import seobject File "/usr/lib64/python2.7/site-packages/seobject.py", line 27, in <module> import sepolicy File "/usr/lib64/python2.7/site-packages/sepolicy/__init__.py", line 226, in <module> def get_file_equiv_modified(fc_path = selinux.selinux_file_context_path()): AttributeError: 'module' object has no attribute 'selinux_file_context_path' Signed-off-by: Wenzong Fan <wenzong....@windriver.com> --- ...bselinux-get-pywrap-depends-on-selinux.py.patch | 31 ++++++++++++++++++++++ recipes-security/selinux/libselinux_2.3.bb | 1 + recipes-security/selinux/libselinux_git.bb | 1 + 3 files changed, 33 insertions(+) create mode 100644 recipes-security/selinux/libselinux/libselinux-get-pywrap-depends-on-selinux.py.patch diff --git a/recipes-security/selinux/libselinux/libselinux-get-pywrap-depends-on-selinux.py.patch b/recipes-security/selinux/libselinux/libselinux-get-pywrap-depends-on-selinux.py.patch new file mode 100644 index 0000000..7994be4 --- /dev/null +++ b/recipes-security/selinux/libselinux/libselinux-get-pywrap-depends-on-selinux.py.patch @@ -0,0 +1,31 @@ +From 187ff834e40519b42caa3fba9f1054491f48ab67 Mon Sep 17 00:00:00 2001 +From: Wenzong Fan <wenzong....@windriver.com> +Date: Tue, 11 Aug 2015 16:21:13 +0800 +Subject: [PATCH] libselinux: get pywrap depends on selinux.py + +The selinux.py will be installed as selinux/__init__.py, just make sure +it has been generated completely while starting "make install-pywrap". + +Upstream-Status: Pending + +Signed-off-by: Wenzong Fan <wenzong....@windriver.com> +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index a4d27f4..624d25b 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -90,7 +90,7 @@ SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ + + all: $(LIBA) $(LIBSO) $(LIBPC) + +-pywrap: all $(SWIGSO) $(AUDIT2WHYSO) ++pywrap: all $(SWIGFILES) $(AUDIT2WHYSO) + + rubywrap: all $(SWIGRUBYSO) + +-- +1.9.1 + diff --git a/recipes-security/selinux/libselinux_2.3.bb b/recipes-security/selinux/libselinux_2.3.bb index 81e599d..23164f1 100644 --- a/recipes-security/selinux/libselinux_2.3.bb +++ b/recipes-security/selinux/libselinux_2.3.bb @@ -11,4 +11,5 @@ SRC_URI += "\ file://libselinux-make-O_CLOEXEC-optional.patch \ file://libselinux-make-SOCK_CLOEXEC-optional.patch \ file://libselinux-define-FD_CLOEXEC-as-necessary.patch \ + file://libselinux-get-pywrap-depends-on-selinux.py.patch \ " diff --git a/recipes-security/selinux/libselinux_git.bb b/recipes-security/selinux/libselinux_git.bb index 97d4649..4efab86 100644 --- a/recipes-security/selinux/libselinux_git.bb +++ b/recipes-security/selinux/libselinux_git.bb @@ -11,4 +11,5 @@ SRC_URI += "\ file://libselinux-make-O_CLOEXEC-optional.patch \ file://libselinux-make-SOCK_CLOEXEC-optional.patch \ file://libselinux-define-FD_CLOEXEC-as-necessary.patch \ + file://libselinux-get-pywrap-depends-on-selinux.py.patch \ " -- 1.9.1 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto