audit: 4.0.5 -> 4.1.0 (#424055)

authored by K900 and committed by GitHub c43df97d c2770064

+84 -18
+76
pkgs/by-name/au/audit/musl.patch
··· 1 + From 87c782153deb10bd8c3345723a8bcee343826e78 Mon Sep 17 00:00:00 2001 2 + From: Grimmauld <Grimmauld@grimmauld.de> 3 + Date: Thu, 10 Jul 2025 18:58:31 +0200 4 + Subject: [PATCH 1/2] lib/audit_logging.h: fix includes for musl 5 + 6 + `sys/types.h` is indirectly included with `glibc`, 7 + but needs to be specified explicitly on musl. 8 + --- 9 + lib/audit_logging.h | 1 + 10 + 1 file changed, 1 insertion(+) 11 + 12 + diff --git a/lib/audit_logging.h b/lib/audit_logging.h 13 + index 9082a2720..c58861b1e 100644 14 + --- a/lib/audit_logging.h 15 + +++ b/lib/audit_logging.h 16 + @@ -25,6 +25,7 @@ 17 + 18 + // Next include is to pick up the function attribute macros 19 + #include <features.h> 20 + +#include <sys/types.h> 21 + #include <audit-records.h> 22 + 23 + #ifdef __cplusplus 24 + 25 + From 98adfcc4bfa66ac25db0b609d7172d7d40c4f85f Mon Sep 17 00:00:00 2001 26 + From: Grimmauld <Grimmauld@grimmauld.de> 27 + Date: Fri, 11 Jul 2025 08:11:21 +0200 28 + Subject: [PATCH 2/2] Guard __attr_dealloc_free seperately from __attr_dealloc 29 + 30 + Otherwise, header include order matters when building against a libc that 31 + does not itself define __attr_dealloc_free, such as musl. 32 + --- 33 + auparse/auparse.h | 2 ++ 34 + lib/audit_logging.h | 2 ++ 35 + lib/libaudit.h | 2 ++ 36 + 3 files changed, 6 insertions(+) 37 + 38 + diff --git a/auparse/auparse.h b/auparse/auparse.h 39 + index 48375e2c7..ba5139625 100644 40 + --- a/auparse/auparse.h 41 + +++ b/auparse/auparse.h 42 + @@ -31,6 +31,8 @@ 43 + #endif 44 + #ifndef __attr_dealloc 45 + # define __attr_dealloc(dealloc, argno) 46 + +#endif 47 + +#ifndef __attr_dealloc_free 48 + # define __attr_dealloc_free 49 + #endif 50 + #ifndef __attribute_malloc__ 51 + diff --git a/lib/audit_logging.h b/lib/audit_logging.h 52 + index c58861b1e..fab7e75d1 100644 53 + --- a/lib/audit_logging.h 54 + +++ b/lib/audit_logging.h 55 + @@ -40,6 +40,8 @@ extern "C" { 56 + #endif 57 + #ifndef __attr_dealloc 58 + # define __attr_dealloc(dealloc, argno) 59 + +#endif 60 + +#ifndef __attr_dealloc_free 61 + # define __attr_dealloc_free 62 + #endif 63 + // Warn unused result 64 + diff --git a/lib/libaudit.h b/lib/libaudit.h 65 + index 2c51853b7..cce5dc493 100644 66 + --- a/lib/libaudit.h 67 + +++ b/lib/libaudit.h 68 + @@ -43,6 +43,8 @@ 69 + // malloc and free assignments 70 + #ifndef __attr_dealloc 71 + # define __attr_dealloc(dealloc, argno) 72 + +#endif 73 + +#ifndef __attr_dealloc_free 74 + # define __attr_dealloc_free 75 + #endif 76 + #ifndef __attribute_malloc__
+8 -18
pkgs/by-name/au/audit/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchFromGitHub, 5 - fetchpatch, 6 5 autoreconfHook, 7 6 bash, 8 7 buildPackages, ··· 21 20 }: 22 21 stdenv.mkDerivation (finalAttrs: { 23 22 pname = "audit"; 24 - version = "4.0.5"; 23 + version = "4.1.0"; 25 24 26 25 src = fetchFromGitHub { 27 26 owner = "linux-audit"; 28 27 repo = "audit-userspace"; 29 28 tag = "v${finalAttrs.version}"; 30 - hash = "sha256-SgMt1MmcH7r7O6bmJCetRg3IdoZXAXjVJyeu0HRfyf8="; 29 + hash = "sha256-MWlHaGue7Ca8ks34KNg74n4Rfj8ivqAhLOJHeyE2Q04="; 31 30 }; 32 31 33 32 patches = [ 34 - # nix configures most stuff by symlinks, e.g. in /etc 35 - # thus, for plugins to be picked up, symlinks must be allowed 36 - # https://github.com/linux-audit/audit-userspace/pull/467 37 - (fetchpatch { 38 - url = "https://github.com/linux-audit/audit-userspace/pull/467/commits/dbefc642b3bd0cafe599fcd18c6c88cb672397ee.patch?full_index=1"; 39 - hash = "sha256-Ksn/qKBQYFAjvs1OVuWhgWCdf4Bdp9/a+MrhyJAT+Bw="; 40 - }) 41 - (fetchpatch { 42 - url = "https://github.com/linux-audit/audit-userspace/pull/467/commits/50094f56fefc0b9033ef65e8c4f108ed52ef5de5.patch?full_index=1"; 43 - hash = "sha256-CJKDLdlpsCd+bG6j5agcnxY1+vMCImHwHGN6BXURa4c="; 44 - }) 45 - (fetchpatch { 46 - url = "https://github.com/linux-audit/audit-userspace/pull/467/commits/5e75091abd297807b71b3cfe54345c2ef223939a.patch?full_index=1"; 47 - hash = "sha256-LPpO4PH/3MyCJq2xhmhhcnFeK3yh7LK6Mjypuvhacu4="; 48 - }) 33 + # https://github.com/linux-audit/audit-userspace/pull/476 34 + ./musl.patch 49 35 ]; 50 36 51 37 postPatch = '' ··· 53 39 --replace-fail "/usr/include/linux/audit.h" \ 54 40 "${linuxHeaders}/include/linux/audit.h" 55 41 ''; 42 + 43 + # https://github.com/linux-audit/audit-userspace/issues/474 44 + # building databuf_test fails otherwise, as that uses hidden symbols only available in the static builds 45 + dontDisableStatic = true; 56 46 57 47 outputs = [ 58 48 "bin"