[packages/audit] - removed %triggerpostun to make it build with rpm.org - upstream fix for missing ipx.h in newer ker

hawk hawk at pld-linux.org
Sat Apr 2 20:39:02 CEST 2022


commit 1dc8b4bb68661158c066456900eff2d7e54d9ed6
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Sat Apr 2 20:38:16 2022 +0200

    - 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(-)
---
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 <<EOF
-Since audit 2.5 %{_sysconfdir}/audit/rules.d/audit.rules file (now saved
-as audit.rules.rpmnew) is replaced by a set of numbered rule files - remember
-to update your configuration!
-EOF
-fi
-
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog README THANKS rules/{README-rules,*.rules} init.d/auditd.cron
diff --git a/ipx_fix.patch b/ipx_fix.patch
new file mode 100644
index 0000000..fa2d44f
--- /dev/null
+++ b/ipx_fix.patch
@@ -0,0 +1,48 @@
+diff -ur audit-2.8.5.orig/auparse/interpret.c audit-2.8.5/auparse/interpret.c
+--- audit-2.8.5.orig/auparse/interpret.c	2019-03-01 21:19:13.000000000 +0100
++++ audit-2.8.5/auparse/interpret.c	2022-04-02 20:34:04.713548373 +0200
+@@ -44,8 +44,10 @@
+ #include <linux/ax25.h>
+ #include <linux/atm.h>
+ #include <linux/x25.h>
+-#include <linux/if.h>   // FIXME: remove when ipx.h is fixed
+-#include <linux/ipx.h>
++#ifdef HAVE_IPX_HEADERS
++  #include <linux/if.h>   // FIXME: remove when ipx.h is fixed
++  #include <linux/ipx.h>
++#endif
+ #include <linux/capability.h>
+ #include <sys/personality.h>
+ #include <sys/prctl.h>
+@@ -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
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/audit.git/commitdiff/1dc8b4bb68661158c066456900eff2d7e54d9ed6



More information about the pld-cvs-commit mailing list