Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
Date: Fri, 27 Dec 2019 19:20:25
Message-Id: 1577474403.d689f34b6a0bd248867c5e0f43df76f4326daaf3.jer@gentoo
1 commit: d689f34b6a0bd248867c5e0f43df76f4326daaf3
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 27 19:17:42 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 27 19:20:03 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d689f34b
7
8 net-firewall/ipt_netflow: Update live ebuild
9
10 Package-Manager: Portage-2.3.84, Repoman-2.3.20
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 .../ipt_netflow/files/ipt_netflow-9999-flags.patch | 57 ++++++++++++++++++++++
14 net-firewall/ipt_netflow/ipt_netflow-9999.ebuild | 10 ++--
15 2 files changed, 64 insertions(+), 3 deletions(-)
16
17 diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-9999-flags.patch b/net-firewall/ipt_netflow/files/ipt_netflow-9999-flags.patch
18 new file mode 100644
19 index 00000000000..675e8b16f72
20 --- /dev/null
21 +++ b/net-firewall/ipt_netflow/files/ipt_netflow-9999-flags.patch
22 @@ -0,0 +1,57 @@
23 +--- a/Makefile.in
24 ++++ b/Makefile.in
25 +@@ -11,7 +11,7 @@ CARGS = @CARGS@
26 + SNMPTGSO = /usr/lib/snmp/dlmod/snmp_NETFLOW.so
27 + SNMPCONF = /etc/snmp/snmpd.conf
28 + SNMPLINE = dlmod netflow $(SNMPTGSO)
29 +-CC = gcc
30 ++$(CC) ?= gcc
31 +
32 + # https://www.kernel.org/doc/Documentation/kbuild/modules.txt
33 + # https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt
34 +@@ -22,31 +22,31 @@ all: ipt_NETFLOW.ko libipt_NETFLOW.so libip6t_NETFLOW.so @SNMPTARGET@
35 +
36 + ipt_NETFLOW.ko: version.h ipt_NETFLOW.c ipt_NETFLOW.h compat_def.h compat.h Makefile
37 + @echo Compiling for kernel $(KVERSION)
38 +- make -C $(KDIR) M=$(CURDIR) modules CONFIG_DEBUG_INFO=y
39 ++ $(MAKE) -C $(KDIR) M=$(CURDIR) modules CONFIG_DEBUG_INFO=y
40 + @touch $@
41 + compat_def.h: gen_compat_def
42 + ./gen_compat_def > $@
43 + sparse: | version.h ipt_NETFLOW.c ipt_NETFLOW.h compat.h Makefile
44 + @rm -f ipt_NETFLOW.ko ipt_NETFLOW.o
45 + @echo Compiling for kernel $(KVERSION)
46 +- make -C $(KDIR) M=$(CURDIR) modules C=1
47 ++ $(MAKE) -C $(KDIR) M=$(CURDIR) modules C=1
48 + @touch ipt_NETFLOW.ko
49 + coverity:
50 + coverity-submit -v
51 +
52 + minstall: | ipt_NETFLOW.ko
53 + @echo " *"
54 +- make -C $(KDIR) M=$(CURDIR) modules_install INSTALL_MOD_PATH=$(DESTDIR)
55 ++ $(MAKE) -C $(KDIR) M=$(CURDIR) modules_install INSTALL_MOD_PATH=$(DESTDIR)
56 + $(DEPMOD)
57 + mclean:
58 +- make -C $(KDIR) M=$(CURDIR) clean
59 ++ $(MAKE) -C $(KDIR) M=$(CURDIR) clean
60 + lclean:
61 + -rm -f *.so *_sh.o
62 + clean: mclean lclean
63 + -rm -f *.so *.o modules.order version.h compat_def.h
64 +
65 + snmp_NETFLOW.so: snmp_NETFLOW.c
66 +- $(CC) -fPIC -shared -o $@ $< -lnetsnmp
67 ++ $(CC) $(CFLAGS) $(LDFLAGS) -fPIC -shared -o $@ $< -lnetsnmp
68 +
69 + sinstall: | snmp_NETFLOW.so IPT-NETFLOW-MIB.my
70 + @echo " *"
71 +@@ -66,7 +66,7 @@ sinstall: | snmp_NETFLOW.so IPT-NETFLOW-MIB.my
72 + fi
73 +
74 + %_sh.o: libipt_NETFLOW.c
75 +- $(CC) $(CFLAGS) -O2 -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
76 ++ $(CC) $(CFLAGS) $(LDFLAGS) -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
77 +
78 + %.so: %_sh.o
79 + $(CC) -shared -o $@ $<
80
81 diff --git a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
82 index 7414800f8c3..06411e1ae6d 100644
83 --- a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
84 +++ b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
85 @@ -27,7 +27,7 @@ DEPEND="${RDEPEND}
86 "
87 PATCHES=(
88 "${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
89 - "${FILESDIR}/${PN}-2.3-flags.patch"
90 + "${FILESDIR}/${PN}-9999-flags.patch"
91 )
92
93 pkg_setup() {
94 @@ -55,10 +55,14 @@ src_prepare() {
95 default
96
97 # Fix incorrect module version in sources
98 - sed -i -e "/IPT_NETFLOW_VERSION/s/2.2/${PV}/" ipt_NETFLOW.c || die
99 + sed -i \
100 + -e '/IPT_NETFLOW_VERSION/s#"[0-9.]*"#"'${PV}'"#' \
101 + ipt_NETFLOW.c || die
102
103 # Checking for directory is enough
104 - sed -i -e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' configure || die
105 + sed -i \
106 + -e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' \
107 + configure || die
108 }
109
110 do_conf() {