Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libnetfilter_conntrack/files/, net-libs/libnetfilter_conntrack/
Date: Thu, 24 Feb 2022 21:56:23
Message-Id: 1645739740.4672a23c9645d2faba042607c45c7d42165aa4a4.sam@gentoo
1 commit: 4672a23c9645d2faba042607c45c7d42165aa4a4
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 24 20:14:37 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 24 21:55:40 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4672a23c
7
8 net-libs/libnetfilter_conntrack: add musl patch
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 .../files/libnetfilter_conntrack-1.0.9-musl.patch | 46 ++++++++++++++++++++++
13 .../libnetfilter_conntrack-1.0.9.ebuild | 4 ++
14 2 files changed, 50 insertions(+)
15
16 diff --git a/net-libs/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.9-musl.patch b/net-libs/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.9-musl.patch
17 new file mode 100644
18 index 000000000000..e1ce87df4e89
19 --- /dev/null
20 +++ b/net-libs/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.9-musl.patch
21 @@ -0,0 +1,46 @@
22 +https://git.netfilter.org/libnetfilter_conntrack/patch/?id=21ee35dde73aec5eba35290587d479218c6dd824
23 +
24 +From: Robert Marko <robimarko@×××××.com>
25 +Date: Thu, 24 Feb 2022 15:01:11 +0100
26 +Subject: conntrack: fix build with kernel 5.15 and musl
27 +
28 +Currently, with kernel 5.15 headers and musl building is failing with
29 +redefinition errors due to a conflict between the kernel and musl headers.
30 +
31 +Musl is able to suppres the conflicting kernel header definitions if they
32 +are included after the standard libc ones, however since ICMP definitions
33 +were moved into a separate internal header to avoid duplication this has
34 +stopped working and is breaking the builds.
35 +
36 +It seems that the issue is that <netinet/in.h> which contains the UAPI
37 +suppression defines is included in the internal.h header and not in the
38 +proto.h which actually includes the kernel ICMP headers and thus UAPI
39 +supression defines are not present.
40 +
41 +Solve this by moving the <netinet/in.h> include before the ICMP kernel
42 +includes in the proto.h
43 +
44 +Fixes: bc1cb4b11403 ("conntrack: Move icmp request>reply type mapping to common file")
45 +Signed-off-by: Robert Marko <robimarko@×××××.com>
46 +Signed-off-by: Florian Westphal <fw@××××××.de>
47 +--- a/include/internal/internal.h
48 ++++ b/include/internal/internal.h
49 +@@ -14,7 +14,6 @@
50 + #include <arpa/inet.h>
51 + #include <time.h>
52 + #include <errno.h>
53 +-#include <netinet/in.h>
54 +
55 + #include <libnfnetlink/libnfnetlink.h>
56 + #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
57 +--- a/include/internal/proto.h
58 ++++ b/include/internal/proto.h
59 +@@ -2,6 +2,7 @@
60 + #define _NFCT_PROTO_H_
61 +
62 + #include <stdint.h>
63 ++#include <netinet/in.h>
64 + #include <linux/icmp.h>
65 + #include <linux/icmpv6.h>
66 +
67 +cgit v1.2.3
68
69 diff --git a/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9.ebuild b/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9.ebuild
70 index f1f1c13f26f5..a45a3d456753 100644
71 --- a/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9.ebuild
72 +++ b/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9.ebuild
73 @@ -20,6 +20,10 @@ BDEPEND="virtual/pkgconfig"
74
75 DOCS=( README )
76
77 +PATCHES=(
78 + "${FILESDIR}"/${P}-musl.patch
79 +)
80 +
81 pkg_setup() {
82 linux-info_pkg_setup