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-analyzer/rain/files/, net-analyzer/rain/
Date: Fri, 31 Jan 2020 14:09:15
Message-Id: 1580479747.71d53b4138dec0178ad8838b3e89f2ceaf9cba08.jer@gentoo
1 commit: 71d53b4138dec0178ad8838b3e89f2ceaf9cba08
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 31 14:08:22 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 31 14:09:07 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71d53b41
7
8 net-analyzer/rain: Fix CFLAGS=-fno-common
9
10 Package-Manager: Portage-2.3.86, Repoman-2.3.20
11 Closes: https://bugs.gentoo.org/show_bug.cgi?id=706874
12 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
13
14 .../rain/files/rain-1.2.9_beta1-die-on-error.patch | 40 ++++++++
15 .../rain/files/rain-1.2.9_beta1-fno-common.patch | 111 +++++++++++++++++++++
16 net-analyzer/rain/rain-1.2.9_beta1-r1.ebuild | 37 +++++++
17 3 files changed, 188 insertions(+)
18
19 diff --git a/net-analyzer/rain/files/rain-1.2.9_beta1-die-on-error.patch b/net-analyzer/rain/files/rain-1.2.9_beta1-die-on-error.patch
20 new file mode 100644
21 index 00000000000..ac73a0f5390
22 --- /dev/null
23 +++ b/net-analyzer/rain/files/rain-1.2.9_beta1-die-on-error.patch
24 @@ -0,0 +1,40 @@
25 +--- a/Makefile.in
26 ++++ b/Makefile.in
27 +@@ -15,22 +15,22 @@
28 +
29 + all:
30 + @echo Making all
31 +- -$(CC) $(CFLAGS) -c source/rain_command_line.c
32 +- -$(CC) $(CFLAGS) -c source/rain_defaults.c
33 +- -$(CC) $(CFLAGS) -c source/rain_die.c
34 +- -$(CC) $(CFLAGS) -c source/rain_icmp.c
35 +- -$(CC) $(CFLAGS) -c source/rain_igmp.c
36 +- -$(CC) $(CFLAGS) -c source/rain_inet_common.c
37 +- -$(CC) $(CFLAGS) -c source/rain_mem.c
38 +- -$(CC) $(CFLAGS) -c source/rain_resolv.c
39 +- -$(CC) $(CFLAGS) -c source/rain_services.c
40 +- -$(CC) $(CFLAGS) -c source/rain_signal.c
41 +- -$(CC) $(CFLAGS) -c source/rain_string.c
42 +- -$(CC) $(CFLAGS) -c source/rain_tcp.c
43 +- -$(CC) $(CFLAGS) -c source/rain_udp.c
44 +- -$(CC) $(CFLAGS) -c source/rain_main.c
45 ++ $(CC) $(CFLAGS) -c source/rain_command_line.c
46 ++ $(CC) $(CFLAGS) -c source/rain_defaults.c
47 ++ $(CC) $(CFLAGS) -c source/rain_die.c
48 ++ $(CC) $(CFLAGS) -c source/rain_icmp.c
49 ++ $(CC) $(CFLAGS) -c source/rain_igmp.c
50 ++ $(CC) $(CFLAGS) -c source/rain_inet_common.c
51 ++ $(CC) $(CFLAGS) -c source/rain_mem.c
52 ++ $(CC) $(CFLAGS) -c source/rain_resolv.c
53 ++ $(CC) $(CFLAGS) -c source/rain_services.c
54 ++ $(CC) $(CFLAGS) -c source/rain_signal.c
55 ++ $(CC) $(CFLAGS) -c source/rain_string.c
56 ++ $(CC) $(CFLAGS) -c source/rain_tcp.c
57 ++ $(CC) $(CFLAGS) -c source/rain_udp.c
58 ++ $(CC) $(CFLAGS) -c source/rain_main.c
59 +
60 +- -$(CC) $(CFLAGS) $(LDFLAGS) -o rain rain_command_line.o rain_defaults.o rain_die.o rain_icmp.o rain_igmp.o rain_inet_common.o rain_main.o rain_mem.o rain_resolv.o rain_services.o rain_signal.o rain_string.o rain_tcp.o rain_udp.o
61 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o rain rain_command_line.o rain_defaults.o rain_die.o rain_icmp.o rain_igmp.o rain_inet_common.o rain_main.o rain_mem.o rain_resolv.o rain_services.o rain_signal.o rain_string.o rain_tcp.o rain_udp.o
62 +
63 + @echo done.
64 +
65
66 diff --git a/net-analyzer/rain/files/rain-1.2.9_beta1-fno-common.patch b/net-analyzer/rain/files/rain-1.2.9_beta1-fno-common.patch
67 new file mode 100644
68 index 00000000000..06eb84fc2e7
69 --- /dev/null
70 +++ b/net-analyzer/rain/files/rain-1.2.9_beta1-fno-common.patch
71 @@ -0,0 +1,111 @@
72 +--- a/include/rain_inet_common.h
73 ++++ b/include/rain_inet_common.h
74 +@@ -368,14 +368,14 @@
75 + /*
76 + * global variables
77 + */
78 +-u_int16_t packetsize;
79 +-unsigned char *buffer; /* For holding packets. Declared globally to ensure it is freed when the program exits */
80 +-time_t send_start; /* for storing start and finish time of total packets sent */
81 +-time_t send_finish;
82 +-unsigned long packets_sent;
83 +-u_short verbose;
84 +-struct in_addr group; /* for ICMP gateway and IGMP group addresses */
85 +-int sendflags; /* stores flags for sendto(); Default is 0 */
86 ++extern u_int16_t packetsize;
87 ++extern unsigned char *buffer; /* For holding packets. Declared globally to ensure it is freed when the program exits */
88 ++extern time_t send_start; /* for storing start and finish time of total packets sent */
89 ++extern time_t send_finish;
90 ++extern unsigned long packets_sent;
91 ++extern u_short verbose;
92 ++extern struct in_addr group; /* for ICMP gateway and IGMP group addresses */
93 ++extern int sendflags; /* stores flags for sendto(); Default is 0 */
94 + /*---------------------------*/
95 +
96 +
97 +--- a/source/rain_inet_common.c
98 ++++ b/source/rain_inet_common.c
99 +@@ -17,6 +17,18 @@
100 + *-------------------------------------------------*/
101 + #include "rain_common.h"
102 +
103 ++/*
104 ++ * global variables
105 ++ */
106 ++u_int16_t packetsize;
107 ++unsigned char *buffer; /* For holding packets. Declared globally to ensure it is freed when the program exits */
108 ++time_t send_start; /* for storing start and finish time of total packets sent */
109 ++time_t send_finish;
110 ++unsigned long packets_sent;
111 ++u_short verbose;
112 ++struct in_addr group; /* for ICMP gateway and IGMP group addresses */
113 ++int sendflags; /* stores flags for sendto(); Default is 0 */
114 ++/*---------------------------*/
115 +
116 + /*
117 + * Internet checksum routine (RFC 1071)
118 +--- a/include/rain_icmp.h
119 ++++ b/include/rain_icmp.h
120 +@@ -20,7 +20,7 @@
121 +
122 +
123 +
124 +-unsigned char icmpinfo[56][56][56];
125 ++extern unsigned char icmpinfo[56][56][56];
126 +
127 +
128 + /*
129 +--- a/source/rain_icmp.c
130 ++++ b/source/rain_icmp.c
131 +@@ -17,6 +17,7 @@
132 + *-------------------------------------------------*/
133 + #include "rain_common.h"
134 +
135 ++unsigned char icmpinfo[56][56][56];
136 +
137 + /*
138 + * Prints all the ICMP type/code combinations
139 +--- a/include/rain_igmp.h
140 ++++ b/include/rain_igmp.h
141 +@@ -18,7 +18,7 @@
142 + #ifndef _RAIN_IGMP_H
143 + #define _RAIN_IGMP_H
144 +
145 +-unsigned char igmpinfo[56][56][5];
146 ++extern unsigned char igmpinfo[56][56][5];
147 +
148 +
149 + extern void print_igmp_info(void);
150 +--- a/source/rain_igmp.c
151 ++++ b/source/rain_igmp.c
152 +@@ -17,7 +17,7 @@
153 + *-------------------------------------------------*/
154 + #include "rain_common.h"
155 +
156 +-
157 ++unsigned char igmpinfo[56][56][5];
158 +
159 + /*
160 + * Prints IGMP type/code descriptions
161 +--- a/include/rain_tcp.h
162 ++++ b/include/rain_tcp.h
163 +@@ -20,7 +20,7 @@
164 + #ifndef _RAIN_TCP_H
165 + #define _RAIN_TCP_H
166 +
167 +-unsigned char tcpinfo[25];
168 ++extern unsigned char tcpinfo[25];
169 +
170 + extern void tcp_info_init(struct pkt_info_tcp *);
171 + extern int tcp_shower_connect(struct sockaddr_in *, struct pkt_info *);
172 +--- a/source/rain_tcp.c
173 ++++ b/source/rain_tcp.c
174 +@@ -17,7 +17,7 @@
175 + *-------------------------------------------------*/
176 + #include "rain_common.h"
177 +
178 +-
179 ++unsigned char tcpinfo[25];
180 +
181 + /*
182 + * tcp_info_init():
183
184 diff --git a/net-analyzer/rain/rain-1.2.9_beta1-r1.ebuild b/net-analyzer/rain/rain-1.2.9_beta1-r1.ebuild
185 new file mode 100644
186 index 00000000000..84351e1ba87
187 --- /dev/null
188 +++ b/net-analyzer/rain/rain-1.2.9_beta1-r1.ebuild
189 @@ -0,0 +1,37 @@
190 +# Copyright 1999-2020 Gentoo Authors
191 +# Distributed under the terms of the GNU General Public License v2
192 +
193 +EAPI=7
194 +inherit autotools
195 +
196 +MY_P=${P/_/}
197 +MY_P=${MY_P/-/_}
198 +DESCRIPTION="powerful tool for testing stability of utilizing IP protocols"
199 +HOMEPAGE="http://www.mirrors.wiretapped.net/security/packet-construction/rain/"
200 +LICENSE="GPL-2"
201 +SLOT="0"
202 +KEYWORDS="~amd64 ~ppc ~sparc ~x86"
203 +SRC_URI="
204 + mirror://ubuntu/pool/universe/r/${PN}/${MY_P}.orig.tar.gz
205 + mirror://ubuntu/pool/universe/r/${PN}/${MY_P}-1.diff.gz
206 +"
207 +
208 +DOCS=( BUGS CHANGES README TODO )
209 +S="${WORKDIR}/${MY_P/_/-}"
210 +PATCHES=(
211 + "${WORKDIR}"/${MY_P}-1.diff
212 + "${FILESDIR}"/${P}-fno-common.patch
213 + "${FILESDIR}"/${P}-gentoo.patch
214 + "${FILESDIR}"/${P}-die-on-error.patch
215 +)
216 +
217 +src_prepare() {
218 + default
219 +
220 + eautoreconf
221 +}
222 +
223 +src_install() {
224 + default
225 + gunzip "${ED}"/usr/share/man/man1/${PN}.1.gz || die
226 +}