Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/audit/files/, sys-process/audit/
Date: Tue, 16 Aug 2022 00:19:58
Message-Id: 1660608643.7ed0e40edb8ce9b75521efca7fc14e71e3ac431a.sam@gentoo
1 commit: 7ed0e40edb8ce9b75521efca7fc14e71e3ac431a
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 16 00:09:28 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 16 00:10:43 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ed0e40e
7
8 sys-process/audit: fix musl build
9
10 Closes: https://bugs.gentoo.org/837275
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 sys-process/audit/audit-3.0.8.ebuild | 3 ++-
14 .../audit/files/audit-3.0.8-musl-malloc.patch | 28 ++++++++++++++++++++++
15 2 files changed, 30 insertions(+), 1 deletion(-)
16
17 diff --git a/sys-process/audit/audit-3.0.8.ebuild b/sys-process/audit/audit-3.0.8.ebuild
18 index 4c4bfe08a040..44a6d4ffd6c5 100644
19 --- a/sys-process/audit/audit-3.0.8.ebuild
20 +++ b/sys-process/audit/audit-3.0.8.ebuild
21 @@ -38,6 +38,7 @@ PATCHES=(
22 # See bug #836702 before removing / verify builds fine w/ USE=python
23 # with latest kernel headers.
24 "${FILESDIR}"/${PN}-3.0.8-linux-headers-5.17.patch
25 + "${FILESDIR}"/${PN}-3.0.8-musl-malloc.patch
26 )
27
28 src_prepare() {
29 @@ -72,7 +73,7 @@ multilib_src_configure() {
30 mkdir -p "${BUILD_DIR}" || die
31 pushd "${BUILD_DIR}" &>/dev/null || die
32
33 - ECONF_SOURCE=${S} econf "${myeconfargs[@]}" --with-python3
34 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" --with-python3
35
36 popd &>/dev/null || die
37 }
38
39 diff --git a/sys-process/audit/files/audit-3.0.8-musl-malloc.patch b/sys-process/audit/files/audit-3.0.8-musl-malloc.patch
40 new file mode 100644
41 index 000000000000..17814dbe29fc
42 --- /dev/null
43 +++ b/sys-process/audit/files/audit-3.0.8-musl-malloc.patch
44 @@ -0,0 +1,28 @@
45 +https://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-security/audit/audit/0001-Replace-__attribute_malloc__-with-__attribute__-__ma.patch?id=ad978133a1a10d609bb2545882a2f720a2572f3d
46 +https://bugs.gentoo.org/837275
47 +
48 +From 79c8d6a2755c9dfa00a5e86378e89a94eef0504d Mon Sep 17 00:00:00 2001
49 +From: Khem Raj <raj.khem@×××××.com>
50 +Date: Tue, 9 Aug 2022 23:57:03 -0700
51 +Subject: [PATCH] Replace __attribute_malloc__ with
52 + __attribute__((__malloc__))
53 +
54 +__attribute_malloc__ is not available on musl
55 +
56 +Fixes
57 +| ../../git/auparse/auparse.h:54:2: error: expected function body after function declarator
58 +| __attribute_malloc__ __attr_dealloc (auparse_destroy, 1);
59 +| ^
60 +
61 +Signed-off-by: Khem Raj <raj.khem@×××××.com>
62 +--- a/auparse/auparse.h
63 ++++ b/auparse/auparse.h
64 +@@ -51,7 +51,7 @@ typedef void (*auparse_callback_ptr)(auparse_state_t *au,
65 + void auparse_destroy(auparse_state_t *au);
66 + void auparse_destroy_ext(auparse_state_t *au, auparse_destroy_what_t what);
67 + auparse_state_t *auparse_init(ausource_t source, const void *b)
68 +- __attribute_malloc__ __attr_dealloc (auparse_destroy, 1);
69 ++ __attribute__((__malloc__)) __attr_dealloc (auparse_destroy, 1);
70 + int auparse_new_buffer(auparse_state_t *au, const char *data, size_t data_len)
71 + __attr_access ((__read_only__, 2, 3));
72 + int auparse_feed(auparse_state_t *au, const char *data, size_t data_len)