[gentoo-commits] repo/gentoo:master commit in: net-libs/libnetfilter_conntrack/files/, net-libs/libnetfilter_conntrack/

2023-01-10 Thread Sam James
commit: c4659dffae0e01ee5790e7ffe78b1b1d417d4306
Author: Sam James  gentoo  org>
AuthorDate: Tue Jan 10 08:28:18 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Jan 10 08:34:43 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4659dff

net-libs/libnetfilter_conntrack: fix configure w/ clang 16

Signed-off-by: Sam James  gentoo.org>

 ...tfilter_conntrack-1.0.9-configure-clang16.patch | 16 ++
 .../libnetfilter_conntrack-1.0.9-r1.ebuild | 59 ++
 2 files changed, 75 insertions(+)

diff --git 
a/net-libs/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.9-configure-clang16.patch
 
b/net-libs/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.9-configure-clang16.patch
new file mode 100644
index ..7bb4a34765ae
--- /dev/null
+++ 
b/net-libs/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.9-configure-clang16.patch
@@ -0,0 +1,16 @@
+https://bugzilla.netfilter.org/show_bug.cgi?id=1654
+--- a/configure.ac
 b/configure.ac
+@@ -55,9 +55,9 @@ int main()
+  struct in6_addr addr6;
+  char buf[128];
+  if (inet_ntop(AF_INET6, , buf, 128) == 0 && errno == EAFNOSUPPORT)
+-exit(1);
++return 1;
+  else
+-exit(0);
++return 0;
+   }
+   ]])],[ AC_MSG_RESULT(yes)
+AC_DEFINE_UNQUOTED(HAVE_INET_NTOP_IPV6, 1, [Define to 1 if inet_ntop 
supports IPv6.])
+

diff --git 
a/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9-r1.ebuild 
b/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9-r1.ebuild
new file mode 100644
index ..f470a2255d08
--- /dev/null
+++ b/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools linux-info verify-sig
+
+DESCRIPTION="Programming interface (API) to the in-kernel connection tracking 
state table"
+HOMEPAGE="https://www.netfilter.org/projects/libnetfilter_conntrack/;
+SRC_URI="https://www.netfilter.org/projects/${PN}/files/${P}.tar.bz2
+   verify-sig? ( 
https://www.netfilter.org/projects/${PN}/files/${P}.tar.bz2.sig )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86"
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/netfilter.org.asc
+
+RDEPEND=">=net-libs/libmnl-1.0.3
+   >=net-libs/libnfnetlink-1.0.0"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+   verify-sig? ( sec-keys/openpgp-keys-netfilter )"
+
+DOCS=( README )
+
+PATCHES=(
+   "${FILESDIR}"/${P}-musl.patch
+   "${FILESDIR}"/${PN}-1.0.9-configure-clang16.patch
+)
+
+pkg_setup() {
+   linux-info_pkg_setup
+
+   if kernel_is lt 2 6 18 ; then
+   die "${PN} requires at least 2.6.18 kernel version"
+   fi
+
+   # netfilter core team has changed some option names with kernel 2.6.20
+   if kernel_is lt 2 6 20 ; then
+   CONFIG_CHECK="~IP_NF_CONNTRACK_NETLINK"
+   else
+   CONFIG_CHECK="~NF_CT_NETLINK"
+   fi
+
+   check_extra_config
+}
+
+src_prepare() {
+   default
+
+   # autoreconf only for clang 16 configure patch
+   eautoreconf
+}
+
+src_install() {
+   default
+
+   find "${ED}" -name '*.la' -delete || die
+}



[gentoo-commits] repo/gentoo:master commit in: net-libs/libnetfilter_conntrack/files/, net-libs/libnetfilter_conntrack/

2022-02-24 Thread Sam James
commit: 4672a23c9645d2faba042607c45c7d42165aa4a4
Author: Sam James  gentoo  org>
AuthorDate: Thu Feb 24 20:14:37 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Feb 24 21:55:40 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4672a23c

net-libs/libnetfilter_conntrack: add musl patch

Signed-off-by: Sam James  gentoo.org>

 .../files/libnetfilter_conntrack-1.0.9-musl.patch  | 46 ++
 .../libnetfilter_conntrack-1.0.9.ebuild|  4 ++
 2 files changed, 50 insertions(+)

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
new file mode 100644
index ..e1ce87df4e89
--- /dev/null
+++ 
b/net-libs/libnetfilter_conntrack/files/libnetfilter_conntrack-1.0.9-musl.patch
@@ -0,0 +1,46 @@
+https://git.netfilter.org/libnetfilter_conntrack/patch/?id=21ee35dde73aec5eba35290587d479218c6dd824
+
+From: Robert Marko 
+Date: Thu, 24 Feb 2022 15:01:11 +0100
+Subject: conntrack: fix build with kernel 5.15 and musl
+
+Currently, with kernel 5.15 headers and musl building is failing with
+redefinition errors due to a conflict between the kernel and musl headers.
+
+Musl is able to suppres the conflicting kernel header definitions if they
+are included after the standard libc ones, however since ICMP definitions
+were moved into a separate internal header to avoid duplication this has
+stopped working and is breaking the builds.
+
+It seems that the issue is that  which contains the UAPI
+suppression defines is included in the internal.h header and not in the
+proto.h which actually includes the kernel ICMP headers and thus UAPI
+supression defines are not present.
+
+Solve this by moving the  include before the ICMP kernel
+includes in the proto.h
+
+Fixes: bc1cb4b11403 ("conntrack: Move icmp request>reply type mapping to 
common file")
+Signed-off-by: Robert Marko 
+Signed-off-by: Florian Westphal 
+--- a/include/internal/internal.h
 b/include/internal/internal.h
+@@ -14,7 +14,6 @@
+ #include 
+ #include 
+ #include 
+-#include 
+ 
+ #include 
+ #include 
+--- a/include/internal/proto.h
 b/include/internal/proto.h
+@@ -2,6 +2,7 @@
+ #define _NFCT_PROTO_H_
+ 
+ #include 
++#include 
+ #include 
+ #include 
+ 
+cgit v1.2.3

diff --git 
a/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9.ebuild 
b/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9.ebuild
index f1f1c13f26f5..a45a3d456753 100644
--- a/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9.ebuild
+++ b/net-libs/libnetfilter_conntrack/libnetfilter_conntrack-1.0.9.ebuild
@@ -20,6 +20,10 @@ BDEPEND="virtual/pkgconfig"
 
 DOCS=( README )
 
+PATCHES=(
+   "${FILESDIR}"/${P}-musl.patch
+)
+
 pkg_setup() {
linux-info_pkg_setup