mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
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>
This commit is contained in:
parent
88b9ab90c8
commit
6edbe15c3d
|
|
@ -1,46 +0,0 @@
|
|||
From 6a2710db094061e1956fac3ed81114d0e958ea21 Mon Sep 17 00:00:00 2001
|
||||
From: Li xin <lixin.fnst@cn.fujitsu.com>
|
||||
Date: Sun, 19 Jul 2015 00:49:13 +0900
|
||||
Subject: [PATCH] audit: python cross-compile
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
|
||||
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
|
||||
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
|
||||
Signed-off-by: T.O. Radzy Radzykewycz <radzy@windriver.com>
|
||||
---
|
||||
configure.ac | 17 ++---------------
|
||||
1 file changed, 2 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6e345f1..54bdbf1 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -99,21 +99,8 @@ if test "x$use_python" = xno ; then
|
||||
else
|
||||
AC_MSG_RESULT(testing)
|
||||
AM_PATH_PYTHON
|
||||
-PYINCLUDEDIR=`python${am_cv_python_version} -c "from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"`
|
||||
-if test -f ${PYINCLUDEDIR}/Python.h ; then
|
||||
- python_found="yes"
|
||||
- AC_SUBST(PYINCLUDEDIR)
|
||||
- pybind_dir="python"
|
||||
- AC_SUBST(pybind_dir)
|
||||
- AC_MSG_NOTICE(Python bindings will be built)
|
||||
-else
|
||||
- python_found="no"
|
||||
- if test "x$use_python" = xyes ; then
|
||||
- AC_MSG_ERROR([Python explicitly requested and python headers were not found])
|
||||
- else
|
||||
- AC_MSG_WARN("Python headers not found - python bindings will not be made")
|
||||
- fi
|
||||
-fi
|
||||
+python_found="yes"
|
||||
+AC_MSG_NOTICE(Python bindings will be built)
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes")
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
From 9d95d7e28a2c4cbefa998d375de180c731a151b1 Mon Sep 17 00:00:00 2001
|
||||
From: Li xin <lixin.fnst@cn.fujitsu.com>
|
||||
Date: Sun, 19 Jul 2015 01:40:48 +0900
|
||||
Subject: [PATCH] Remove hard coded python include directory
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
---
|
||||
bindings/Makefile.am | 8 +++++++-
|
||||
bindings/python/python2/Makefile.am | 3 ++-
|
||||
bindings/swig/python/Makefile.am | 5 +++--
|
||||
3 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/bindings/Makefile.am b/bindings/Makefile.am
|
||||
index 5b5c576..7a15205 100644
|
||||
--- a/bindings/Makefile.am
|
||||
+++ b/bindings/Makefile.am
|
||||
@@ -22,4 +22,10 @@
|
||||
|
||||
CONFIG_CLEAN_FILES = *.loT *.rej *.orig
|
||||
|
||||
-SUBDIRS = python golang swig
|
||||
+SUBDIRS = swig
|
||||
+if HAVE_PYTHON
|
||||
+SUBDIRS += python
|
||||
+endif
|
||||
+if HAVE_GOLANG
|
||||
+SUBDIRS += golang
|
||||
+endif
|
||||
diff --git a/bindings/python/python2/Makefile.am b/bindings/python/python2/Makefile.am
|
||||
index 1dcb5bc..6226358 100644
|
||||
--- a/bindings/python/python2/Makefile.am
|
||||
+++ b/bindings/python/python2/Makefile.am
|
||||
@@ -23,7 +23,8 @@
|
||||
|
||||
CONFIG_CLEAN_FILES = *.loT *.rej *.orig
|
||||
AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing
|
||||
-AM_CPPFLAGS = -I$(top_builddir) -I@PYINCLUDEDIR@
|
||||
+PYINC ?= /usr/include/python$(PYTHON_VERSION)
|
||||
+AM_CPPFLAGS = -I$(top_builddir) -I${PYINC}
|
||||
|
||||
pyexec_LTLIBRARIES = auparse.la
|
||||
|
||||
diff --git a/bindings/swig/python/Makefile.am b/bindings/swig/python/Makefile.am
|
||||
index 8c98b94..ae7c52b 100644
|
||||
--- a/bindings/swig/python/Makefile.am
|
||||
+++ b/bindings/swig/python/Makefile.am
|
||||
@@ -21,9 +21,10 @@
|
||||
#
|
||||
CONFIG_CLEAN_FILES = *.loT *.rej *.orig
|
||||
AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing
|
||||
-AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib -I@PYINCLUDEDIR@
|
||||
+PYINC ?= /usr/include/$(PYLIBVER)
|
||||
+AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib -I${PYINC}
|
||||
SWIG_FLAGS = -python
|
||||
-SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I@PYINCLUDEDIR@
|
||||
+SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I${PYINC}
|
||||
pyexec_PYTHON = audit.py
|
||||
pyexec_LTLIBRARIES = _audit.la
|
||||
pyexec_SOLIBRARIES = _audit.so
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
From bd70f570ffb82991feb7a539ac1abf3165d417a4 Mon Sep 17 00:00:00 2001
|
||||
From: Li xin <lixin.fnst@cn.fujitsu.com>
|
||||
Date: Sun, 19 Jul 2015 02:42:58 +0900
|
||||
Subject: [PATCH] audit: Fixed swig host contamination issue
|
||||
|
||||
The audit build uses swig to generate a python wrapper.
|
||||
Unfortunately, the swig info file references host include
|
||||
directories. Some of these were previously noticed and
|
||||
eliminated, but the one fixed here was not.
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Anders Hedlund <anders.hedlund@windriver.com>
|
||||
Signed-off-by: Joe Slater <jslater@windriver.com>
|
||||
---
|
||||
bindings/swig/python/Makefile.am | 3 ++-
|
||||
bindings/swig/src/auditswig.i | 2 +-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/bindings/swig/python/Makefile.am b/bindings/swig/python/Makefile.am
|
||||
index ae7c52b..c580bc0 100644
|
||||
--- a/bindings/swig/python/Makefile.am
|
||||
+++ b/bindings/swig/python/Makefile.am
|
||||
@@ -22,6 +22,7 @@
|
||||
CONFIG_CLEAN_FILES = *.loT *.rej *.orig
|
||||
AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing
|
||||
PYINC ?= /usr/include/$(PYLIBVER)
|
||||
+STDINC ?= /usr/include
|
||||
AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib -I${PYINC}
|
||||
SWIG_FLAGS = -python
|
||||
SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I${PYINC}
|
||||
@@ -35,7 +36,7 @@ _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudi
|
||||
_audit_la_LIBADD = $(top_builddir)/lib/libaudit.la
|
||||
nodist__audit_la_SOURCES = audit_wrap.c
|
||||
audit.py audit_wrap.c: ${srcdir}/../src/auditswig.i
|
||||
- swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/auditswig.i
|
||||
+ swig -o audit_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} -I$(STDINC) ${srcdir}/../src/auditswig.i
|
||||
|
||||
CLEANFILES = audit.py* audit_wrap.c *~
|
||||
|
||||
diff --git a/bindings/swig/src/auditswig.i b/bindings/swig/src/auditswig.i
|
||||
index 7ebb373..424fb68 100644
|
||||
--- a/bindings/swig/src/auditswig.i
|
||||
+++ b/bindings/swig/src/auditswig.i
|
||||
@@ -39,7 +39,7 @@ signed
|
||||
#define __attribute(X) /*nothing*/
|
||||
typedef unsigned __u32;
|
||||
typedef unsigned uid_t;
|
||||
-%include "/usr/include/linux/audit.h"
|
||||
+%include "linux/audit.h"
|
||||
#define __extension__ /*nothing*/
|
||||
#include <stdint.h>
|
||||
%include "../lib/libaudit.h"
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
@ -8,9 +8,6 @@ LICENSE = "GPLv2+ & LGPLv2+"
|
|||
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
|
||||
|
||||
SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=2.8_maintenance \
|
||||
file://audit-python-configure.patch \
|
||||
file://audit-python.patch \
|
||||
file://fix-swig-host-contamination.patch \
|
||||
file://Add-substitue-functions-for-strndupa-rawmemchr.patch \
|
||||
file://auditd \
|
||||
file://auditd.service \
|
||||
|
|
@ -20,7 +17,7 @@ SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=2.8_maintena
|
|||
S = "${WORKDIR}/git"
|
||||
SRCREV = "5fae55c1ad15b3cefe6890eba7311af163e9133c"
|
||||
|
||||
inherit autotools pythonnative update-rc.d systemd
|
||||
inherit autotools python3native update-rc.d systemd
|
||||
|
||||
UPDATERCPN = "auditd"
|
||||
INITSCRIPT_NAME = "auditd"
|
||||
|
|
@ -29,16 +26,16 @@ INITSCRIPT_PARAMS = "defaults"
|
|||
SYSTEMD_PACKAGES = "auditd"
|
||||
SYSTEMD_SERVICE_auditd = "auditd.service"
|
||||
|
||||
DEPENDS += "python tcp-wrappers libcap-ng linux-libc-headers (>= 2.6.30) swig-native"
|
||||
DEPENDS += "python3 tcp-wrappers libcap-ng linux-libc-headers swig-native"
|
||||
|
||||
EXTRA_OECONF += "--without-prelude \
|
||||
--with-libwrap \
|
||||
--enable-gssapi-krb5=no \
|
||||
--with-libcap-ng=yes \
|
||||
--with-python=yes \
|
||||
--with-python3=yes \
|
||||
--libdir=${base_libdir} \
|
||||
--sbindir=${base_sbindir} \
|
||||
--without-python3 \
|
||||
--without-python \
|
||||
--without-golang \
|
||||
--disable-zos-remote \
|
||||
"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user