Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/iptables/files/, net-firewall/iptables/
Date: Wed, 24 Oct 2018 13:26:47
Message-Id: 1540387593.281ad1c5b4f2d41492b69aaf169f5fa6ea1ab20b.polynomial-c@gentoo
1 commit: 281ad1c5b4f2d41492b69aaf169f5fa6ea1ab20b
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 24 13:26:18 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 24 13:26:33 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=281ad1c5
7
8 net-firewall/iptables: Fixed build with USE="-nftables"
9
10 Closes: https://bugs.gentoo.org/669486
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12 Package-Manager: Portage-2.3.51, Repoman-2.3.11
13
14 ...es-1.8.1-build_limit_without_libnftnl_fix.patch | 44 ++++++++++++++++++++++
15 net-firewall/iptables/iptables-1.8.1.ebuild | 2 +
16 2 files changed, 46 insertions(+)
17
18 diff --git a/net-firewall/iptables/files/iptables-1.8.1-build_limit_without_libnftnl_fix.patch b/net-firewall/iptables/files/iptables-1.8.1-build_limit_without_libnftnl_fix.patch
19 new file mode 100644
20 index 00000000000..a0fca7efa93
21 --- /dev/null
22 +++ b/net-firewall/iptables/files/iptables-1.8.1-build_limit_without_libnftnl_fix.patch
23 @@ -0,0 +1,44 @@
24 +From b2fc2a368562d55fadad94d995247bb8cd7e68a3 Mon Sep 17 00:00:00 2001
25 +From: Florian Westphal <fw@××××××.de>
26 +Date: Wed, 24 Oct 2018 12:00:11 +0200
27 +Subject: extensions: limit: unbreak build without libnftnl
28 +
29 +Lars Wendler reported 1.8.1 build failure when trying to build without nft backend:
30 +
31 + In file included from ../iptables/nft.h:5, from libxt_limit.c:18: libnftnl/rule.h: No such file or directory
32 +
33 +Reported-by: Lars Wendler <polynomial-c@g.o>
34 +Fixes: 02b80972c43 ("ebtables: Merge libebt_limit.c into libxt_limit.c")
35 +Signed-off-by: Florian Westphal <fw@××××××.de>
36 +---
37 + extensions/libxt_limit.c | 1 -
38 + iptables/nft-bridge.h | 1 +
39 + 2 files changed, 1 insertion(+), 1 deletion(-)
40 +
41 +diff --git a/extensions/libxt_limit.c b/extensions/libxt_limit.c
42 +index c7b66295..1b324657 100644
43 +--- a/extensions/libxt_limit.c
44 ++++ b/extensions/libxt_limit.c
45 +@@ -15,7 +15,6 @@
46 + #include <xtables.h>
47 + #include <linux/netfilter/x_tables.h>
48 + #include <linux/netfilter/xt_limit.h>
49 +-#include "iptables/nft.h"
50 + #include "iptables/nft-bridge.h"
51 +
52 + #define XT_LIMIT_AVG "3/hour"
53 +diff --git a/iptables/nft-bridge.h b/iptables/nft-bridge.h
54 +index 9d49ccbe..de52cd71 100644
55 +--- a/iptables/nft-bridge.h
56 ++++ b/iptables/nft-bridge.h
57 +@@ -68,6 +68,7 @@ int ebt_get_mac_and_mask(const char *from, unsigned char *to, unsigned char *mas
58 + #define EBT_VERDICT_BITS 0x0000000F
59 +
60 + struct nftnl_rule;
61 ++struct iptables_command_state;
62 +
63 + static const char *ebt_standard_targets[NUM_STANDARD_TARGETS] = {
64 + "ACCEPT",
65 +--
66 +cgit v1.2.1
67 +
68
69 diff --git a/net-firewall/iptables/iptables-1.8.1.ebuild b/net-firewall/iptables/iptables-1.8.1.ebuild
70 index 043562633bd..3db0cde5904 100644
71 --- a/net-firewall/iptables/iptables-1.8.1.ebuild
72 +++ b/net-firewall/iptables/iptables-1.8.1.ebuild
73 @@ -42,6 +42,8 @@ RDEPEND="${COMMON_DEPEND}
74 "
75
76 src_prepare() {
77 + eapply "${FILESDIR}/${P}-build_limit_without_libnftnl_fix.patch" #669486
78 +
79 # use the saner headers from the kernel
80 rm -f include/linux/{kernel,types}.h