From 461847aa9bd98f74e24be411c1210e0c82916d1c Mon Sep 17 00:00:00 2001 From: Mihail Ivanchev Date: Sun, 2 Jun 2024 22:28:22 +0200 Subject: [PATCH] audit: update to 3.1.4 --- srcpkgs/audit/files/musl.patch | 43 ++++++++++++++++++++++++++++++++++ srcpkgs/audit/template | 13 +++++++--- 2 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/audit/files/musl.patch diff --git a/srcpkgs/audit/files/musl.patch b/srcpkgs/audit/files/musl.patch new file mode 100644 index 00000000000000..4a6c77d7e5bdf1 --- /dev/null +++ b/srcpkgs/audit/files/musl.patch @@ -0,0 +1,43 @@ +diff --git a/audisp/plugins/remote/queue.c b/audisp/plugins/remote/queue.c +index bd9f9bd5..16aabb61 100644 +--- a/audisp/plugins/remote/queue.c ++++ b/audisp/plugins/remote/queue.c +@@ -49,10 +49,8 @@ struct queue + }; + + /* Local Declarations */ +-static int full_pread(int fd, void *buf, size_t size, off_t offset) +- __attr_access ((__write_only__, 2, 3)); +-static int full_pwrite(int fd, const void *buf, size_t size, off_t offset) +- __attr_access ((__read_only__, 2, 3)); ++static int full_pread(int fd, void *buf, size_t size, off_t offset); ++static int full_pwrite(int fd, const void *buf, size_t size, off_t offset); + + /* Compile-time expression verification */ + #define verify(E) do { \ +diff --git a/audisp/plugins/remote/queue.h b/audisp/plugins/remote/queue.h +index 2c70e839..05a2eafc 100644 +--- a/audisp/plugins/remote/queue.h ++++ b/audisp/plugins/remote/queue.h +@@ -54,7 +54,7 @@ void q_close(struct queue *q); + * On error, return NULL and set errno. */ + struct queue *q_open(int q_flags, const char *path, size_t num_entries, + size_t entry_size) +- __attribute_malloc__ __attr_dealloc (q_close, 1) __wur; ++ __attribute__((__malloc__)) __attr_dealloc (q_close, 1) __wur; + + /* Add DATA to tail of Q. Return 0 on success, -1 on error and set errno. */ + int q_append(struct queue *q, const char *data); +diff --git a/auparse/auparse.h b/auparse/auparse.h +index 6c48967a..c5cdb66d 100644 +--- a/auparse/auparse.h ++++ b/auparse/auparse.h +@@ -55,7 +55,7 @@ typedef void (*auparse_callback_ptr)(auparse_state_t *au, + void auparse_destroy(auparse_state_t *au); + void auparse_destroy_ext(auparse_state_t *au, auparse_destroy_what_t what); + auparse_state_t *auparse_init(ausource_t source, const void *b) +- __attribute_malloc__ __attr_dealloc (auparse_destroy, 1); ++ __attribute__((__malloc__)) __attr_dealloc (auparse_destroy, 1); + int auparse_new_buffer(auparse_state_t *au, const char *data, size_t data_len) + __attr_access ((__read_only__, 2, 3)); + int auparse_feed(auparse_state_t *au, const char *data, size_t data_len) diff --git a/srcpkgs/audit/template b/srcpkgs/audit/template index 63913bc07c31b6..56f94480fbd23d 100644 --- a/srcpkgs/audit/template +++ b/srcpkgs/audit/template @@ -1,7 +1,7 @@ # Template file for 'audit' pkgname=audit -version=3.0.3 -revision=6 +version=3.1.4 +revision=1 build_style=gnu-configure configure_args="--libdir=/usr/lib --enable-shared=audit --enable-gssapi-krb5 --with-apparmor --with-libcap-ng --with-python3" @@ -15,13 +15,20 @@ license="GPL-2.0-or-later, LGPL-2.0-or-later" homepage="https://people.redhat.com/sgrubb/audit" changelog="https://raw.githubusercontent.com/linux-audit/audit-userspace/master/ChangeLog" distfiles="${homepage}/${pkgname}-${version}.tar.gz" -checksum=23777e1dc9a80a2ee06a4d442a6a0a9bcbf1ae7ee4b5738a220ff619738cc904 +checksum=220a78cf35e6a7c57f42fcfc42b759692641c7e8e0e39c9844fbc0aa51783631 case "$XBPS_TARGET_MACHINE" in *-musl) configure_args+=" --disable-zos-remote" ;; *) ;; esac +post_patch() { + case "$XBPS_TARGET_MACHINE" in + *-musl) patch -Np1 -i "${FILESDIR}/musl.patch" ;; + *) ;; + esac +} + post_install() { vinstall rules/10-base-config.rules 644 etc/audit/rules.d vmkdir usr/share/examples/audit/rules.d