From e0c3ef8ee33a1cecc246de5ebe6ef42902ce645d Mon Sep 17 00:00:00 2001 From: Celeste <20312-Celeste@users.gitlab.alpinelinux.org> Date: Thu, 31 Jul 2025 14:54:59 +0000 Subject: [PATCH] main/audit: upgrade to 4.1.1 --- main/audit/APKBUILD | 15 +++--- main/audit/fix-basename.patch | 12 +++++ main/audit/fix-bash-completion.patch | 26 ++++++++++ main/audit/fix-musl-build.patch | 78 ---------------------------- main/audit/fix-tests.patch | 50 ------------------ 5 files changed, 46 insertions(+), 135 deletions(-) create mode 100644 main/audit/fix-basename.patch create mode 100644 main/audit/fix-bash-completion.patch delete mode 100644 main/audit/fix-musl-build.patch delete mode 100644 main/audit/fix-tests.patch diff --git a/main/audit/APKBUILD b/main/audit/APKBUILD index dcc0c67d806..46aebcb6cd6 100644 --- a/main/audit/APKBUILD +++ b/main/audit/APKBUILD @@ -3,8 +3,8 @@ # Maintainer: Celeste maintainer="Celeste " pkgname=audit -pkgver=4.1.0 -pkgrel=2 +pkgver=4.1.1 +pkgrel=0 pkgdesc="User space tools for kernel auditing" url="https://people.redhat.com/sgrubb/audit/" arch="all" @@ -28,13 +28,14 @@ subpackages=" $pkgname-doc $pkgname-libs $pkgname-openrc + $pkgname-bash-completion py3-audit-pyc py3-audit:py3 " source="https://github.com/linux-audit/audit-userspace/archive/v$pkgver/audit-$pkgver.tar.gz 0003-all-get-rid-of-strndupa.patch - fix-musl-build.patch - fix-tests.patch + fix-basename.patch + fix-bash-completion.patch usr-paths.patch auditd.initd auditd.confd @@ -95,10 +96,10 @@ py3() { } sha512sums=" -fe17a4a7ea44160b439ac39c311cce10341149e780136d95911db304b244d35b745e93c3834b9eb5c6123093ca96852dd72dc4fde2d6339443514bc9a96e46ca audit-4.1.0.tar.gz +24b5070a80122d3b1acaa6a957ec079881d8b0434a029e4cbb0d98ef1aa3b4a12f26fcda89a92a12565f4b9487fa18c66dfca675688bff9fc8da310ebc95e770 audit-4.1.1.tar.gz 4e69914dcb428599769c27cdecfaa3211d2bdc8138b32bcb1410105d4d00ed11479e1bfc9b9f544fe014cc555e87002db4d36f349eabce076217e55a3e8e484b 0003-all-get-rid-of-strndupa.patch -d461fe5cc7afb80ea9c51eda93f13f8350f56a0b0f8ca566b4b60c3f550ca21d6349659fd63b64c9b6da1d688e6b5bdcedfb7d83633cf0b03fa029e39597c5c1 fix-musl-build.patch -eb3a0e74d4653f468af935197999a7fd22bea575556a6e7e688d2567a1b8ddb9782c4165317fa0b5074a071c598d4111d878bdb83b57815ede5d61bf598c7c71 fix-tests.patch +16cf90b003a901309749dd449efeba27dda3dacc9f1673fd3f9a96e868632260a089a1a80b612c292a530791f0c05a1a13426ad31961d6fea21731327859fadf fix-basename.patch +99cf70fbb1e899ff11144726137e70a21bb2138eb327531c47cec27fe0bf676c0f575aa36aff83263664aa7cfc0a60001cb459603bfbd59276148526ad4b73c2 fix-bash-completion.patch 155c347310862e00c1fc3a86ce5a00dfa580f6da6e89f6766ebd800e90de445a1d6824449b327428d4697756b4355a14a86bdb9e756254cec9cc8d22844b9b23 usr-paths.patch b3d7ceba02b6b4406222c3b142fcfdf2b612dc52eebc490cfd121d696e4ef7c6cc5e27813d67937c464ed4c3cd283de9ccfcb75e63405a447523fa4641e79da3 auditd.initd 69d8777772ded7a8c0db2bcf84961b121bb355fa0d4ba0e14e311f8a8bfe665cbd2b7ac632d73477f9dfa9a6eec357a7ed458fe9b3e7b5ede75b166f3f092ab7 auditd.confd diff --git a/main/audit/fix-basename.patch b/main/audit/fix-basename.patch new file mode 100644 index 00000000000..3d7226929da --- /dev/null +++ b/main/audit/fix-basename.patch @@ -0,0 +1,12 @@ +--- a/lib/libaudit.c ++++ b/lib/libaudit.c +@@ -57,6 +57,9 @@ + #define IORING_OP_LAST 37 + #endif + ++#define basename(path) \ ++ (strrchr((path),'/') ? strrchr((path),'/')+1 : (path)) ++ + /* Local prototypes */ + struct nv_pair + { diff --git a/main/audit/fix-bash-completion.patch b/main/audit/fix-bash-completion.patch new file mode 100644 index 00000000000..101ab07fd44 --- /dev/null +++ b/main/audit/fix-bash-completion.patch @@ -0,0 +1,26 @@ +--- a/init.d/Makefile.am ++++ b/init.d/Makefile.am +@@ -54,7 +54,7 @@ install-data-hook: + install-exec-hook: + mkdir -p ${DESTDIR}${initdir} + mkdir -p ${DESTDIR}${legacydir} +- mkdir -p ${DESTDIR}${sysconfdir}/bash_completion.d ++ mkdir -p ${DESTDIR}/usr/share/bash-completion/completions + $(INSTALL_SCRIPT) -D -m 644 ${builddir}/auditd.service ${DESTDIR}${initdir} + $(INSTALL_SCRIPT) -D -m 644 ${builddir}/audit-rules.service ${DESTDIR}${initdir} + $(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.rotate ${DESTDIR}${legacydir}/rotate +@@ -66,7 +66,7 @@ install-exec-hook: + $(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.condrestart ${DESTDIR}${legacydir}/condrestart + chmod 0755 $(DESTDIR)$(sbindir)/augenrules + $(INSTALL_SCRIPT) -D -m 644 ${srcdir}/audit.bash_completion \ +- ${DESTDIR}${sysconfdir}/bash_completion.d/ ++ ${DESTDIR}/usr/share/bash-completion/completions/audit + uninstall-hook: + rm ${DESTDIR}${sysconfdir}/${libconfig} + rm ${DESTDIR}${initdir}/auditd.service +@@ -79,4 +79,4 @@ uninstall-hook: + rm ${DESTDIR}${legacydir}/restart + rm ${DESTDIR}${legacydir}/condrestart + rm ${DESTDIR}$(prefix)/lib/tmpfiles.d/audit.conf +- rm ${DESTDIR}${sysconfdir}/bash_completion.d/audit.bash_completion ++ rm ${DESTDIR}/usr/share/bash-completion/completions/audit diff --git a/main/audit/fix-musl-build.patch b/main/audit/fix-musl-build.patch deleted file mode 100644 index 074638f487b..00000000000 --- a/main/audit/fix-musl-build.patch +++ /dev/null @@ -1,78 +0,0 @@ -Patch-Source: https://github.com/linux-audit/audit-userspace/pull/476 --- -From 87c782153deb10bd8c3345723a8bcee343826e78 Mon Sep 17 00:00:00 2001 -From: Grimmauld -Date: Thu, 10 Jul 2025 18:58:31 +0200 -Subject: [PATCH 1/2] lib/audit_logging.h: fix includes for musl - -`sys/types.h` is indirectly included with `glibc`, -but needs to be specified explicitly on musl. ---- - lib/audit_logging.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/audit_logging.h b/lib/audit_logging.h -index 9082a2720..c58861b1e 100644 ---- a/lib/audit_logging.h -+++ b/lib/audit_logging.h -@@ -25,6 +25,7 @@ - - // Next include is to pick up the function attribute macros - #include -+#include - #include - - #ifdef __cplusplus - -From 98adfcc4bfa66ac25db0b609d7172d7d40c4f85f Mon Sep 17 00:00:00 2001 -From: Grimmauld -Date: Fri, 11 Jul 2025 08:11:21 +0200 -Subject: [PATCH 2/2] Guard __attr_dealloc_free seperately from __attr_dealloc - -Otherwise, header include order matters when building against a libc that -does not itself define __attr_dealloc_free, such as musl. ---- - auparse/auparse.h | 2 ++ - lib/audit_logging.h | 2 ++ - lib/libaudit.h | 2 ++ - 3 files changed, 6 insertions(+) - -diff --git a/auparse/auparse.h b/auparse/auparse.h -index 48375e2c7..ba5139625 100644 ---- a/auparse/auparse.h -+++ b/auparse/auparse.h -@@ -31,6 +31,8 @@ - #endif - #ifndef __attr_dealloc - # define __attr_dealloc(dealloc, argno) -+#endif -+#ifndef __attr_dealloc_free - # define __attr_dealloc_free - #endif - #ifndef __attribute_malloc__ -diff --git a/lib/audit_logging.h b/lib/audit_logging.h -index c58861b1e..fab7e75d1 100644 ---- a/lib/audit_logging.h -+++ b/lib/audit_logging.h -@@ -40,6 +40,8 @@ extern "C" { - #endif - #ifndef __attr_dealloc - # define __attr_dealloc(dealloc, argno) -+#endif -+#ifndef __attr_dealloc_free - # define __attr_dealloc_free - #endif - // Warn unused result -diff --git a/lib/libaudit.h b/lib/libaudit.h -index 2c51853b7..cce5dc493 100644 ---- a/lib/libaudit.h -+++ b/lib/libaudit.h -@@ -43,6 +43,8 @@ - // malloc and free assignments - #ifndef __attr_dealloc - # define __attr_dealloc(dealloc, argno) -+#endif -+#ifndef __attr_dealloc_free - # define __attr_dealloc_free - #endif - #ifndef __attribute_malloc__ diff --git a/main/audit/fix-tests.patch b/main/audit/fix-tests.patch deleted file mode 100644 index 71e238386d9..00000000000 --- a/main/audit/fix-tests.patch +++ /dev/null @@ -1,50 +0,0 @@ -Patch-Source-1: https://github.com/linux-audit/audit-userspace/commit/d62d9c6c0206da529ef04bfa4cd7086343d39f71 -Patch-Source-2: https://github.com/linux-audit/audit-userspace/commit/275e36aac67a7cdeeeb14a0b982f15f8041673b7 --- -From d62d9c6c0206da529ef04bfa4cd7086343d39f71 Mon Sep 17 00:00:00 2001 -From: Steve Grubb -Date: Fri, 11 Jul 2025 20:05:32 -0400 -Subject: [PATCH 1/2] Fix Variable used as literral in - run_auparselol_test.sh.in - ---- - auparse/test/run_auparselol_test.sh.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/auparse/test/run_auparselol_test.sh.in b/auparse/test/run_auparselol_test.sh.in -index d0208da50..a20cc3c11 100755 ---- a/auparse/test/run_auparselol_test.sh.in -+++ b/auparse/test/run_auparselol_test.sh.in -@@ -2,6 +2,6 @@ - set -e - - srcdir="@srcdir@" --./auparselol_test -f "srcdir"/test3.log --check | sort > auparse_test.cur --sed -f "$srcdir"/auditd_raw.sed "srcdir"/test3.log | sort > auparse_test.raw -+./auparselol_test -f "$srcdir"/test3.log --check | sort > auparse_test.cur -+sed -f "$srcdir"/auditd_raw.sed "$srcdir"/test3.log | sort > auparse_test.raw - diff -u auparse_test.raw auparse_test.cur --- -From 275e36aac67a7cdeeeb14a0b982f15f8041673b7 Mon Sep 17 00:00:00 2001 -From: Steve Grubb -Date: Sat, 12 Jul 2025 09:04:38 -0400 -Subject: [PATCH 2/2] No parallel test execution in auparse - -The tests all have the same output file that gets comared -top a standard value. If executed in parallel, the overwrite -the values and tests fail. For now, just disallow parallel -execution of auparse tests. ---- - auparse/test/Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/auparse/test/Makefile.am b/auparse/test/Makefile.am -index ffc4169a3..ce74a2ac3 100644 ---- a/auparse/test/Makefile.am -+++ b/auparse/test/Makefile.am -@@ -111,3 +111,5 @@ if USE_PYTHON3 - $(RM) ${top_builddir}/bindings/swig/python3/_audit.so - endif - test "$(top_srcdir)" = "$(top_builddir)" || $(RM) test*.log -+ -+.NOTPARALLEL: