]> git.pld-linux.org Git - packages/audit.git/commitdiff
- removed %triggerpostun to make it build with rpm.org
authorMarcin Krol <hawk@tld-linux.org>
Sat, 2 Apr 2022 18:38:16 +0000 (20:38 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Sat, 2 Apr 2022 18:38:16 +0000 (20:38 +0200)
- upstream fix for missing ipx.h in newer kernel headers

audit.spec
ipx_fix.patch [new file with mode: 0644]

index 5c1999afcb30a21ea20e74745bf84141c999af40..24c6b0c8e614fe739ee70cd5fee81e0b3a40e052 100644 (file)
@@ -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 (file)
index 0000000..fa2d44f
--- /dev/null
@@ -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
This page took 0.223065 seconds and 4 git commands to generate.