diff options
| -rw-r--r-- | recipes-security/audit/audit/audit-python-configure.patch | 46 | ||||
| -rw-r--r-- | recipes-security/audit/audit/audit-python.patch | 64 | ||||
| -rw-r--r-- | recipes-security/audit/audit/fix-swig-host-contamination.patch | 56 | ||||
| -rw-r--r-- | recipes-security/audit/audit_2.8.5.bb | 11 |
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 @@ | |||
| 1 | From 6a2710db094061e1956fac3ed81114d0e958ea21 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Li xin <lixin.fnst@cn.fujitsu.com> | ||
| 3 | Date: Sun, 19 Jul 2015 00:49:13 +0900 | ||
| 4 | Subject: [PATCH] audit: python cross-compile | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [embedded specific] | ||
| 7 | |||
| 8 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
| 9 | Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> | ||
| 10 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
| 11 | Signed-off-by: T.O. Radzy Radzykewycz <radzy@windriver.com> | ||
| 12 | --- | ||
| 13 | configure.ac | 17 ++--------------- | ||
| 14 | 1 file changed, 2 insertions(+), 15 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/configure.ac b/configure.ac | ||
| 17 | index 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 | -- | ||
| 45 | 2.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 @@ | |||
| 1 | From 9d95d7e28a2c4cbefa998d375de180c731a151b1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Li xin <lixin.fnst@cn.fujitsu.com> | ||
| 3 | Date: Sun, 19 Jul 2015 01:40:48 +0900 | ||
| 4 | Subject: [PATCH] Remove hard coded python include directory | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [embedded specific] | ||
| 7 | |||
| 8 | Signed-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 | |||
| 15 | diff --git a/bindings/Makefile.am b/bindings/Makefile.am | ||
| 16 | index 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 | ||
| 31 | diff --git a/bindings/python/python2/Makefile.am b/bindings/python/python2/Makefile.am | ||
| 32 | index 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 | |||
| 45 | diff --git a/bindings/swig/python/Makefile.am b/bindings/swig/python/Makefile.am | ||
| 46 | index 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 | -- | ||
| 63 | 2.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 @@ | |||
| 1 | From bd70f570ffb82991feb7a539ac1abf3165d417a4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Li xin <lixin.fnst@cn.fujitsu.com> | ||
| 3 | Date: Sun, 19 Jul 2015 02:42:58 +0900 | ||
| 4 | Subject: [PATCH] audit: Fixed swig host contamination issue | ||
| 5 | |||
| 6 | The audit build uses swig to generate a python wrapper. | ||
| 7 | Unfortunately, the swig info file references host include | ||
| 8 | directories. Some of these were previously noticed and | ||
| 9 | eliminated, but the one fixed here was not. | ||
| 10 | |||
| 11 | Upstream-Status: Inappropriate [embedded specific] | ||
| 12 | |||
| 13 | Signed-off-by: Anders Hedlund <anders.hedlund@windriver.com> | ||
| 14 | Signed-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 | |||
| 20 | diff --git a/bindings/swig/python/Makefile.am b/bindings/swig/python/Makefile.am | ||
| 21 | index 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 | |||
| 41 | diff --git a/bindings/swig/src/auditswig.i b/bindings/swig/src/auditswig.i | ||
| 42 | index 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 | -- | ||
| 55 | 2.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+" | |||
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" |
| 9 | 9 | ||
| 10 | SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=2.8_maintenance \ | 10 | SRC_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 | |||
| 20 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
| 21 | SRCREV = "5fae55c1ad15b3cefe6890eba7311af163e9133c" | 18 | SRCREV = "5fae55c1ad15b3cefe6890eba7311af163e9133c" |
| 22 | 19 | ||
| 23 | inherit autotools pythonnative update-rc.d systemd | 20 | inherit autotools python3native update-rc.d systemd |
| 24 | 21 | ||
| 25 | UPDATERCPN = "auditd" | 22 | UPDATERCPN = "auditd" |
| 26 | INITSCRIPT_NAME = "auditd" | 23 | INITSCRIPT_NAME = "auditd" |
| @@ -29,16 +26,16 @@ INITSCRIPT_PARAMS = "defaults" | |||
| 29 | SYSTEMD_PACKAGES = "auditd" | 26 | SYSTEMD_PACKAGES = "auditd" |
| 30 | SYSTEMD_SERVICE_auditd = "auditd.service" | 27 | SYSTEMD_SERVICE_auditd = "auditd.service" |
| 31 | 28 | ||
| 32 | DEPENDS += "python tcp-wrappers libcap-ng linux-libc-headers (>= 2.6.30) swig-native" | 29 | DEPENDS += "python3 tcp-wrappers libcap-ng linux-libc-headers swig-native" |
| 33 | 30 | ||
| 34 | EXTRA_OECONF += "--without-prelude \ | 31 | EXTRA_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 | " |
