summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2019-11-14 09:49:01 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2019-12-19 11:17:00 -0500
commit6edbe15c3dba7da0cffc1c11099867553e9d5570 (patch)
treec6d01affc415566447f5a49facc7911c7e9a1734
parent88b9ab90c8a06e52556e18ae32556701255ed290 (diff)
downloadmeta-selinux-6edbe15c3dba7da0cffc1c11099867553e9d5570.tar.gz
audit: switch to python3
* Switch to python3 * Drop patches: audit-python-configure.patch audit-python.patch fix-swig-host-contamination.patch Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r--recipes-security/audit/audit/audit-python-configure.patch46
-rw-r--r--recipes-security/audit/audit/audit-python.patch64
-rw-r--r--recipes-security/audit/audit/fix-swig-host-contamination.patch56
-rw-r--r--recipes-security/audit/audit_2.8.5.bb11
4 files changed, 4 insertions, 173 deletions
diff --git a/recipes-security/audit/audit/audit-python-configure.patch b/recipes-security/audit/audit/audit-python-configure.patch
deleted file mode 100644
index 37096b0..0000000
--- a/recipes-security/audit/audit/audit-python-configure.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 6a2710db094061e1956fac3ed81114d0e958ea21 Mon Sep 17 00:00:00 2001
2From: Li xin <lixin.fnst@cn.fujitsu.com>
3Date: Sun, 19 Jul 2015 00:49:13 +0900
4Subject: [PATCH] audit: python cross-compile
5
6Upstream-Status: Inappropriate [embedded specific]
7
8Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
9Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
10Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
11Signed-off-by: T.O. Radzy Radzykewycz <radzy@windriver.com>
12---
13 configure.ac | 17 ++---------------
14 1 file changed, 2 insertions(+), 15 deletions(-)
15
16diff --git a/configure.ac b/configure.ac
17index 6e345f1..54bdbf1 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -99,21 +99,8 @@ if test "x$use_python" = xno ; then
21 else
22 AC_MSG_RESULT(testing)
23 AM_PATH_PYTHON
24-PYINCLUDEDIR=`python${am_cv_python_version} -c "from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"`
25-if test -f ${PYINCLUDEDIR}/Python.h ; then
26- python_found="yes"
27- AC_SUBST(PYINCLUDEDIR)
28- pybind_dir="python"
29- AC_SUBST(pybind_dir)
30- AC_MSG_NOTICE(Python bindings will be built)
31-else
32- python_found="no"
33- if test "x$use_python" = xyes ; then
34- AC_MSG_ERROR([Python explicitly requested and python headers were not found])
35- else
36- AC_MSG_WARN("Python headers not found - python bindings will not be made")
37- fi
38-fi
39+python_found="yes"
40+AC_MSG_NOTICE(Python bindings will be built)
41 fi
42 AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes")
43
44--
452.7.4
46
diff --git a/recipes-security/audit/audit/audit-python.patch b/recipes-security/audit/audit/audit-python.patch
deleted file mode 100644
index c1a2595..0000000
--- a/recipes-security/audit/audit/audit-python.patch
+++ /dev/null
@@ -1,64 +0,0 @@
1From 9d95d7e28a2c4cbefa998d375de180c731a151b1 Mon Sep 17 00:00:00 2001
2From: Li xin <lixin.fnst@cn.fujitsu.com>
3Date: Sun, 19 Jul 2015 01:40:48 +0900
4Subject: [PATCH] Remove hard coded python include directory
5
6Upstream-Status: Inappropriate [embedded specific]
7
8Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
9---
10 bindings/Makefile.am | 8 +++++++-
11 bindings/python/python2/Makefile.am | 3 ++-
12 bindings/swig/python/Makefile.am | 5 +++--
13 3 files changed, 12 insertions(+), 4 deletions(-)
14
15diff --git a/bindings/Makefile.am b/bindings/Makefile.am
16index 5b5c576..7a15205 100644
17--- a/bindings/Makefile.am
18+++ b/bindings/Makefile.am
19@@ -22,4 +22,10 @@
20
21 CONFIG_CLEAN_FILES = *.loT *.rej *.orig
22
23-SUBDIRS = python golang swig
24+SUBDIRS = swig
25+if HAVE_PYTHON
26+SUBDIRS += python
27+endif
28+if HAVE_GOLANG
29+SUBDIRS += golang
30+endif
31diff --git a/bindings/python/python2/Makefile.am b/bindings/python/python2/Makefile.am
32index 1dcb5bc..6226358 100644
33--- a/bindings/python/python2/Makefile.am
34+++ b/bindings/python/python2/Makefile.am
35@@ -23,7 +23,8 @@
36
37 CONFIG_CLEAN_FILES = *.loT *.rej *.orig
38 AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing
39-AM_CPPFLAGS = -I$(top_builddir) -I@PYINCLUDEDIR@
40+PYINC ?= /usr/include/python$(PYTHON_VERSION)
41+AM_CPPFLAGS = -I$(top_builddir) -I${PYINC}
42
43 pyexec_LTLIBRARIES = auparse.la
44
45diff --git a/bindings/swig/python/Makefile.am b/bindings/swig/python/Makefile.am
46index 8c98b94..ae7c52b 100644
47--- a/bindings/swig/python/Makefile.am
48+++ b/bindings/swig/python/Makefile.am
49@@ -21,9 +21,10 @@
50 #
51 CONFIG_CLEAN_FILES = *.loT *.rej *.orig
52 AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing
53-AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib -I@PYINCLUDEDIR@
54+PYINC ?= /usr/include/$(PYLIBVER)
55+AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib -I${PYINC}
56 SWIG_FLAGS = -python
57-SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I@PYINCLUDEDIR@
58+SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I${PYINC}
59 pyexec_PYTHON = audit.py
60 pyexec_LTLIBRARIES = _audit.la
61 pyexec_SOLIBRARIES = _audit.so
62--
632.7.4
64
diff --git a/recipes-security/audit/audit/fix-swig-host-contamination.patch b/recipes-security/audit/audit/fix-swig-host-contamination.patch
deleted file mode 100644
index 184f515..0000000
--- a/recipes-security/audit/audit/fix-swig-host-contamination.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1From bd70f570ffb82991feb7a539ac1abf3165d417a4 Mon Sep 17 00:00:00 2001
2From: Li xin <lixin.fnst@cn.fujitsu.com>
3Date: Sun, 19 Jul 2015 02:42:58 +0900
4Subject: [PATCH] audit: Fixed swig host contamination issue
5
6The audit build uses swig to generate a python wrapper.
7Unfortunately, the swig info file references host include
8directories. Some of these were previously noticed and
9eliminated, but the one fixed here was not.
10
11Upstream-Status: Inappropriate [embedded specific]
12
13Signed-off-by: Anders Hedlund <anders.hedlund@windriver.com>
14Signed-off-by: Joe Slater <jslater@windriver.com>
15---
16 bindings/swig/python/Makefile.am | 3 ++-
17 bindings/swig/src/auditswig.i | 2 +-
18 2 files changed, 3 insertions(+), 2 deletions(-)
19
20diff --git a/bindings/swig/python/Makefile.am b/bindings/swig/python/Makefile.am
21index ae7c52b..c580bc0 100644
22--- a/bindings/swig/python/Makefile.am
23+++ b/bindings/swig/python/Makefile.am
24@@ -22,6 +22,7 @@
25 CONFIG_CLEAN_FILES = *.loT *.rej *.orig
26 AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing
27 PYINC ?= /usr/include/$(PYLIBVER)
28+STDINC ?= /usr/include
29 AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib -I${PYINC}
30 SWIG_FLAGS = -python
31 SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I${PYINC}
32@@ -35,7 +36,7 @@ _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudi
33 _audit_la_LIBADD = $(top_builddir)/lib/libaudit.la
34 nodist__audit_la_SOURCES = audit_wrap.c
35 audit.py audit_wrap.c: ${srcdir}/../src/auditswig.i
36- swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/auditswig.i
37+ swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} -I$(STDINC) ${srcdir}/../src/auditswig.i
38
39 CLEANFILES = audit.py* audit_wrap.c *~
40
41diff --git a/bindings/swig/src/auditswig.i b/bindings/swig/src/auditswig.i
42index 7ebb373..424fb68 100644
43--- a/bindings/swig/src/auditswig.i
44+++ b/bindings/swig/src/auditswig.i
45@@ -39,7 +39,7 @@ signed
46 #define __attribute(X) /*nothing*/
47 typedef unsigned __u32;
48 typedef unsigned uid_t;
49-%include "/usr/include/linux/audit.h"
50+%include "linux/audit.h"
51 #define __extension__ /*nothing*/
52 #include <stdint.h>
53 %include "../lib/libaudit.h"
54--
552.7.4
56
diff --git a/recipes-security/audit/audit_2.8.5.bb b/recipes-security/audit/audit_2.8.5.bb
index 2b47812..1e76d5f 100644
--- a/recipes-security/audit/audit_2.8.5.bb
+++ b/recipes-security/audit/audit_2.8.5.bb
@@ -8,9 +8,6 @@ LICENSE = "GPLv2+ & LGPLv2+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" 8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
9 9
10SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=2.8_maintenance \ 10SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=2.8_maintenance \
11 file://audit-python-configure.patch \
12 file://audit-python.patch \
13 file://fix-swig-host-contamination.patch \
14 file://Add-substitue-functions-for-strndupa-rawmemchr.patch \ 11 file://Add-substitue-functions-for-strndupa-rawmemchr.patch \
15 file://auditd \ 12 file://auditd \
16 file://auditd.service \ 13 file://auditd.service \
@@ -20,7 +17,7 @@ SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=2.8_maintena
20S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"
21SRCREV = "5fae55c1ad15b3cefe6890eba7311af163e9133c" 18SRCREV = "5fae55c1ad15b3cefe6890eba7311af163e9133c"
22 19
23inherit autotools pythonnative update-rc.d systemd 20inherit autotools python3native update-rc.d systemd
24 21
25UPDATERCPN = "auditd" 22UPDATERCPN = "auditd"
26INITSCRIPT_NAME = "auditd" 23INITSCRIPT_NAME = "auditd"
@@ -29,16 +26,16 @@ INITSCRIPT_PARAMS = "defaults"
29SYSTEMD_PACKAGES = "auditd" 26SYSTEMD_PACKAGES = "auditd"
30SYSTEMD_SERVICE_auditd = "auditd.service" 27SYSTEMD_SERVICE_auditd = "auditd.service"
31 28
32DEPENDS += "python tcp-wrappers libcap-ng linux-libc-headers (>= 2.6.30) swig-native" 29DEPENDS += "python3 tcp-wrappers libcap-ng linux-libc-headers swig-native"
33 30
34EXTRA_OECONF += "--without-prelude \ 31EXTRA_OECONF += "--without-prelude \
35 --with-libwrap \ 32 --with-libwrap \
36 --enable-gssapi-krb5=no \ 33 --enable-gssapi-krb5=no \
37 --with-libcap-ng=yes \ 34 --with-libcap-ng=yes \
38 --with-python=yes \ 35 --with-python3=yes \
39 --libdir=${base_libdir} \ 36 --libdir=${base_libdir} \
40 --sbindir=${base_sbindir} \ 37 --sbindir=${base_sbindir} \
41 --without-python3 \ 38 --without-python \
42 --without-golang \ 39 --without-golang \
43 --disable-zos-remote \ 40 --disable-zos-remote \
44 " 41 "