From 1dc8b4bb68661158c066456900eff2d7e54d9ed6 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sat, 2 Apr 2022 20:38:16 +0200 Subject: [PATCH] - removed %triggerpostun to make it build with rpm.org - upstream fix for missing ipx.h in newer kernel headers --- audit.spec | 23 +++-------------------- ipx_fix.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 20 deletions(-) create mode 100644 ipx_fix.patch diff --git a/audit.spec b/audit.spec index 5c1999a..24c6b0c 100644 --- a/audit.spec +++ b/audit.spec @@ -21,7 +21,7 @@ Summary: User space tools for 2.6 kernel auditing Summary(pl.UTF-8): Narzędzia przestrzeni użytkownika do audytu jąder 2.6 Name: audit Version: 2.8.5 -Release: 4 +Release: 5 License: GPL v2+ Group: Daemons Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz @@ -37,6 +37,7 @@ Patch5: %{name}-no-refusemanualstop.patch Patch6: %{name}-cronjob.patch Patch7: golang-paths.patch Patch8: gcc10.patch +Patch9: ipx_fix.patch URL: http://people.redhat.com/sgrubb/audit/ BuildRequires: autoconf >= 2.59 BuildRequires: automake >= 1:1.12.6 @@ -204,6 +205,7 @@ Interfejs Pythona 3.x do biblioteki libaudit. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %if %{without python} sed 's#[^ ]*swig/[^ ]*/Makefile ##g' -i configure.ac @@ -290,25 +292,6 @@ fi %postun %systemd_reload -%triggerpostun -- %{name} < 2.2-2 -%systemd_trigger auditd.service - -%triggerpostun -- %{name} < 2.3-1 -if [ -e %{_sysconfdir}/audit/audit.rules.rpmsave ] ; then - %{__mv} %{_sysconfdir}/audit/audit.rules{.rpmsave,} -fi -%service auditd restart "audit daemon" -%systemd_post auditd.service - -%triggerpostun -- %{name} < 2.5-1 -if [ -f %{_sysconfdir}/audit/rules.d/audit.rules.rpmsave ]; then -%banner %{name} -e < + #include + #include +-#include // FIXME: remove when ipx.h is fixed +-#include ++#ifdef HAVE_IPX_HEADERS ++ #include // FIXME: remove when ipx.h is fixed ++ #include ++#endif + #include + #include + #include +@@ -1151,6 +1153,7 @@ + x->sax25_call.ax25_call[6]); + } + break; ++#ifdef HAVE_IPX_HEADERS + case AF_IPX: + { + const struct sockaddr_ipx *ip = +@@ -1160,6 +1163,7 @@ + str, ip->sipx_port, ip->sipx_network); + } + break; ++#endif + case AF_ATMPVC: + { + const struct sockaddr_atmpvc* at = +diff -ur audit-2.8.5.orig/configure.ac audit-2.8.5/configure.ac +--- audit-2.8.5.orig/configure.ac 2022-04-02 20:33:47.114507326 +0200 ++++ audit-2.8.5/configure.ac 2022-04-02 20:34:04.713548373 +0200 +@@ -398,6 +398,12 @@ + AC_DEFINE_UNQUOTED(HAVE_LIBWRAP, [], Define if tcp_wrappers support is enabled ) + fi + ++# linux/ipx.h - deprecated in 2018 ++AC_CHECK_HEADER(linux/ipx.h, ipx_headers=yes, ipx_headers=no) ++if test $ipx_headers = yes ; then ++ AC_DEFINE(HAVE_IPX_HEADERS,1,[IPX packet interpretation]) ++fi ++ + # See if we want to support lower capabilities for plugins + LIBCAP_NG_PATH + -- 2.44.0