Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/, net-analyzer/netcat6/, net-analyzer/netcat6/files/
Date: Sat, 13 Apr 2019 06:58:07
Message-Id: 1555138658.0a1fdb49b87f169fe7439ac7c556fd18a7d43045.mgorny@gentoo
1 commit: 0a1fdb49b87f169fe7439ac7c556fd18a7d43045
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 13 06:52:37 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 13 06:57:38 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a1fdb49
7
8 net-analyzer/netcat6: Remove last-rited pkg
9
10 Closes: https://bugs.gentoo.org/573814
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12
13 net-analyzer/netcat6/Manifest | 1 -
14 .../netcat6/files/netcat6-1.0-automake-1.14.patch | 14 -
15 .../netcat6/files/netcat6-1.0-unix-sockets.patch | 303 ---------------------
16 net-analyzer/netcat6/metadata.xml | 11 -
17 net-analyzer/netcat6/netcat6-1.0-r2.ebuild | 51 ----
18 profiles/package.mask | 8 -
19 6 files changed, 388 deletions(-)
20
21 diff --git a/net-analyzer/netcat6/Manifest b/net-analyzer/netcat6/Manifest
22 deleted file mode 100644
23 index 802cd6a4899..00000000000
24 --- a/net-analyzer/netcat6/Manifest
25 +++ /dev/null
26 @@ -1 +0,0 @@
27 -DIST nc6-1.0.tar.bz2 264257 BLAKE2B 2e9ebdfb45246b8cbfd8515e51ab3262593425f98d1eec623dd21932d48a6bd200d537d3e326e3122835a3a18584c19d1dcc43118ba34d9a21cb8505c8510d3c SHA512 199f3bd18bb452544da8ca1b0f5347f79662bea81e9af335a41ed62c12d5d8cb41d99442ca54f301538d27aec4ada5f59db87461e5b0f20333ba1b52859bd35a
28
29 diff --git a/net-analyzer/netcat6/files/netcat6-1.0-automake-1.14.patch b/net-analyzer/netcat6/files/netcat6-1.0-automake-1.14.patch
30 deleted file mode 100644
31 index f7c128590be..00000000000
32 --- a/net-analyzer/netcat6/files/netcat6-1.0-automake-1.14.patch
33 +++ /dev/null
34 @@ -1,14 +0,0 @@
35 ---- a/configure.ac
36 -+++ b/configure.ac
37 -@@ -2,9 +2,9 @@
38 - AC_INIT(nc6, 1.0, [ds6-devel@××××××××××.net])
39 - AC_CONFIG_AUX_DIR(config)
40 - AC_CONFIG_SRCDIR(src/main.c)
41 --AM_GNU_GETTEXT_VERSION(0.14.1)
42 - AM_INIT_AUTOMAKE(1.6) dnl Automake 1.6 or better is required
43 --AM_CONFIG_HEADER(config.h)
44 -+AM_GNU_GETTEXT_VERSION(0.14.1)
45 -+AC_CONFIG_HEADERS(config.h)
46 - AC_PREREQ(2.52) dnl Autoconf 2.52 or better is required
47 -
48 -
49
50 diff --git a/net-analyzer/netcat6/files/netcat6-1.0-unix-sockets.patch b/net-analyzer/netcat6/files/netcat6-1.0-unix-sockets.patch
51 deleted file mode 100644
52 index 5ab0ece124f..00000000000
53 --- a/net-analyzer/netcat6/files/netcat6-1.0-unix-sockets.patch
54 +++ /dev/null
55 @@ -1,303 +0,0 @@
56 ---- a/docs/nc6.1.in
57 -+++ b/docs/nc6.1.in
58 -@@ -160,6 +160,10 @@
59 - With this option set, netcat6 will use UDP as the transport protocol (TCP is
60 - the default).
61 - .TP 13
62 -+.I \-U, --unix
63 -+With this option set, netcat6 will connect to a unix domain socket.
64 -+The listen mode has not been implemented yet.
65 -+.TP 13
66 - .I \-v
67 - Enable verbose mode. This gives some basic information about what netcat6
68 - is doing. Use it twice for extra verbosity.
69 -
70 ---- a/src/Makefile.am
71 -+++ b/src/Makefile.am
72 -@@ -6,6 +6,7 @@
73 - network.h \
74 - afindep.h \
75 - bluez.h \
76 -+ unixsocket.h \
77 - netsupport.h \
78 - parser.h \
79 - readwrite.h \
80 -@@ -20,6 +21,7 @@
81 - afindep.c \
82 - netsupport.c \
83 - parser.c \
84 -+ unixsocket.c \
85 - readwrite.c \
86 - io_stream.c \
87 - connection.c
88 -
89 ---- a/src/connection.c
90 -+++ b/src/connection.c
91 -@@ -109,6 +109,9 @@
92 - fatal_internal("unavailable bluez support required");
93 - #endif
94 - break;
95 -+ case PROTO_UNIX:
96 -+ ainfo->ai_family = PF_UNIX;
97 -+ break;
98 - default:
99 - fatal_internal("unknown socket domain");
100 - }
101 -@@ -144,6 +147,10 @@
102 - fatal_internal("unavailable bluez support required");
103 - #endif
104 - break;
105 -+ case UNIX_PROTOCOL:
106 -+ ainfo->ai_protocol = 0;
107 -+ ainfo->ai_socktype = SOCK_STREAM;
108 -+ break;
109 - default:
110 - fatal_internal("unknown socket type");
111 - }
112 -
113 ---- a/src/connection.h
114 -+++ b/src/connection.h 2008-10-25 14:17:09 +0000
115 -@@ -31,12 +31,14 @@
116 - PROTO_UNSPECIFIED,
117 - PROTO_IPv6,
118 - PROTO_IPv4,
119 -+ PROTO_UNIX,
120 - PROTO_BLUEZ
121 - } sock_family_t;
122 -
123 - typedef enum sock_protocol {
124 - TCP_PROTOCOL,
125 - UDP_PROTOCOL,
126 -+ UNIX_PROTOCOL,
127 - SCO_PROTOCOL,
128 - L2CAP_PROTOCOL
129 - } sock_protocol_t;
130 -
131 ---- a/src/network.c
132 -+++ b/src/network.c
133 -@@ -23,6 +23,7 @@
134 - #include "network.h"
135 - #include "connection.h"
136 - #include "afindep.h"
137 -+#include "unixsocket.h"
138 - #ifdef ENABLE_BLUEZ
139 - #include "bluez.h"
140 - #endif/*ENABLE_BLUEZ*/
141 -@@ -113,6 +114,11 @@
142 -
143 - /* invoke the appropriate connector for the protocol family */
144 - switch (ca_family(attrs)) {
145 -+ case PROTO_UNIX:
146 -+ fd = unixsocket_connect(&hints,
147 -+ remote->address,
148 -+ timeout, &socktype);
149 -+ break;
150 - #ifdef ENABLE_BLUEZ
151 - case PROTO_BLUEZ:
152 - fd = bluez_connect(&hints,
153 -
154 ---- a/src/parser.c
155 -+++ b/src/parser.c
156 -@@ -109,7 +109,9 @@
157 - {"bluetooth", no_argument, NULL, 'b'},
158 - #define OPT_SCO 24
159 - {"sco", no_argument, NULL, 0 },
160 --#define OPT_MAX 25
161 -+#define OPT_UNIX_SOCKET 25
162 -+ {"unix", no_argument, NULL, 'U'},
163 -+#define OPT_MAX 26
164 - {0, 0, 0, 0}
165 - };
166 -
167 -@@ -160,7 +162,7 @@
168 - _verbosity_level = 0;
169 -
170 - /* option recognition loop */
171 -- while ((c = getopt_long(argc, argv, "46be:hlnp:q:s:uvw:xX",
172 -+ while ((c = getopt_long(argc, argv, "46be:hlnp:q:s:uUvw:xX",
173 - long_options, &option_index)) >= 0)
174 - {
175 - switch (c) {
176 -@@ -231,6 +233,9 @@
177 - family = PROTO_IPv6;
178 - ca_set_flag(attrs, CA_STRICT_IPV6);
179 - break;
180 -+ case 'U':
181 -+ family = PROTO_UNIX;
182 -+ break;
183 - case 'b':
184 - family = PROTO_BLUEZ;
185 - break;
186 -@@ -330,6 +335,9 @@
187 - /* set default protocols */
188 - if (protocol == PROTO_UNSPECIFIED) {
189 - switch (family) {
190 -+ case PROTO_UNIX:
191 -+ protocol = UNIX_PROTOCOL;
192 -+ break;
193 - case PROTO_BLUEZ:
194 - protocol = L2CAP_PROTOCOL;
195 - break;
196 -@@ -344,6 +352,11 @@
197 - fatal(_("cannot specify UDP protocol and bluetooth"));
198 - if (protocol == SCO_PROTOCOL && family != PROTO_BLUEZ)
199 - fatal(_("--sco requires --bluetooth (-b)"));
200 -+ if (protocol == UNIX_PROTOCOL && family != PROTO_UNIX)
201 -+ fatal(_("--unix does not need protocol specifications"));
202 -+
203 -+ if (family == PROTO_UNIX && listen_mode)
204 -+ fatal(_("--unix cannot --listen yet"));
205 -
206 - /* check compiled options */
207 - #ifndef ENABLE_BLUEZ
208 -@@ -380,6 +393,10 @@
209 - fatal_internal("unknown/unsupported bluetooth "
210 - "protocol %d", protocol);
211 - break;
212 -+ case PROTO_UNIX:
213 -+ if (protocol != UNIX_PROTOCOL)
214 -+ fatal_internal("unknown/unsupported UNIX protocol %d", protocol);
215 -+ break;
216 - default:
217 - fatal_internal("invalid protocol family %d", family);
218 - }
219 -@@ -425,18 +442,18 @@
220 - fatal(_("cannot set both --recv-only and --send-only"));
221 - }
222 -
223 -- /* check ports have not been specified with --sco */
224 -- if (protocol == SCO_PROTOCOL) {
225 -+ /* check ports have not been specified with --sco and --unix */
226 -+ if (protocol == SCO_PROTOCOL || protocol == UNIX_PROTOCOL) {
227 - if (remote_address.service != NULL)
228 -- fatal(_("--sco does not support remote port"));
229 -+ fatal(_("--sco and --unix do not support remote port"));
230 - if (local_address.service != NULL)
231 -- fatal(_("--sco does not support local port (-p)"));
232 -+ fatal(_("--sco and --unix do not support local port (-p)"));
233 - }
234 -
235 - /* check mode specific option availability and interactions */
236 - if (listen_mode == true) {
237 - /* check port has been specified (except with sco) */
238 -- if (local_address.service == NULL && protocol != SCO_PROTOCOL) {
239 -+ if (local_address.service == NULL && protocol != SCO_PROTOCOL && protocol != UNIX_PROTOCOL) {
240 - fatal(_("in listen mode you must specify a port "
241 - "with the -p switch"));
242 - }
243 -@@ -450,6 +467,7 @@
244 - /* check port has been specified (except with sco) */
245 - if (remote_address.address == NULL ||
246 - (remote_address.service == NULL &&
247 -+ protocol != UNIX_PROTOCOL &&
248 - protocol != SCO_PROTOCOL))
249 - {
250 - fatal(_("you must specify the address/port couple "
251 -@@ -553,6 +571,8 @@
252 - fprintf(fp, " -6 %s\n", _("Use only IPv6"));
253 - fprintf(fp, " -b, --bluetooth %s\n",
254 - _("Use Bluetooth (defaults to L2CAP protocol)"));
255 -+ fprintf(fp, " -U, --unix %s\n",
256 -+ _("Connect to unix domain sockets"));
257 - fprintf(fp, " --buffer-size=BYTES %s\n", _("Set buffer size"));
258 - fprintf(fp, " --continuous %s\n",
259 - _("Continuously accept connections\n"
260 -
261 ---- a/src/unixsocket.c
262 -+++ b/src/unixsocket.c
263 -@@ -0,0 +1,78 @@
264 -+/*
265 -+ * unixsocket.c - address family independant networking functions
266 -+ */
267 -+#include "system.h"
268 -+#include "unixsocket.h"
269 -+#include "misc.h"
270 -+#include "netsupport.h"
271 -+#include "parser.h"
272 -+
273 -+#include <assert.h>
274 -+#include <errno.h>
275 -+#include <string.h>
276 -+#include <stdlib.h>
277 -+#include <sys/types.h>
278 -+#include <sys/socket.h>
279 -+#include <sys/un.h>
280 -+#include <unistd.h>
281 -+#include <limits.h>
282 -+
283 -+RCSID("@(#) $Id$");
284 -+
285 -+
286 -+int unixsocket_connect(const struct addrinfo *hints,
287 -+ const char *remote_address,
288 -+ time_t timeout, int *rt_socktype)
289 -+{
290 -+ int err, fd = -1;
291 -+ struct sockaddr_un sa;
292 -+ const struct addrinfo *ptr = hints;
293 -+
294 -+ /* make sure arguments are valid and preconditions are respected */
295 -+ assert(hints != NULL);
296 -+ assert(remote_address != NULL && strlen(remote_address) > 0);
297 -+ assert(sizeof(sa.sun_path) >= strlen(remote_address));
298 -+
299 -+ sa.sun_family = ptr->ai_family;
300 -+ strncpy(sa.sun_path, remote_address, sizeof(sa.sun_path));
301 -+
302 -+
303 -+ /* create the socket */
304 -+ fd = socket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol);
305 -+ if (fd < 0) {
306 -+ warning("cannot create the socket: %s", strerror(errno));
307 -+ return -1;
308 -+ }
309 -+
310 -+ /* attempt the connection */
311 -+ err = connect_with_timeout(fd, (struct sockaddr *)&sa, sizeof(sa), timeout);
312 -+
313 -+ if (err != 0)
314 -+ {
315 -+ /* check error code */
316 -+ if (verbose_mode()) {
317 -+ /* use different error message for timeout */
318 -+ if (errno == ETIMEDOUT) {
319 -+ /* connection timed out */
320 -+ warning(_("timeout while connecting to %s"), remote_address);
321 -+ }
322 -+ else {
323 -+ /* connection failed */
324 -+ warning(_("cannot connect to %s: %s"), remote_address, strerror(errno));
325 -+ }
326 -+ }
327 -+ close(fd);
328 -+ return -1;
329 -+ }
330 -+
331 -+ assert(ptr == NULL || fd >= 0);
332 -+
333 -+ /* let the user know the connection has been established */
334 -+ if (verbose_mode()) warning(_("%s open"), remote_address);
335 -+
336 -+ /* return the socktype */
337 -+ if (rt_socktype != NULL) *rt_socktype = ptr->ai_socktype;
338 -+
339 -+ return fd;
340 -+}
341 -+
342 -
343 ---- a/src/unixsocket.h
344 -+++ b/src/unixsocket.h
345 -@@ -0,0 +1,12 @@
346 -+#ifndef UNIXSOCKET_H
347 -+#define UNIXSOCKET_H
348 -+
349 -+#include <netdb.h>
350 -+#include <sys/types.h>
351 -+
352 -+/* establish a connection and return a new fd and socktype */
353 -+int unixsocket_connect(const struct addrinfo *hints,
354 -+ const char *remote_address,
355 -+ time_t timeout, int *socktype);
356 -+
357 -+#endif
358 -
359
360 diff --git a/net-analyzer/netcat6/metadata.xml b/net-analyzer/netcat6/metadata.xml
361 deleted file mode 100644
362 index 3baf3341ea4..00000000000
363 --- a/net-analyzer/netcat6/metadata.xml
364 +++ /dev/null
365 @@ -1,11 +0,0 @@
366 -<?xml version="1.0" encoding="UTF-8"?>
367 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
368 -<pkgmetadata>
369 - <maintainer type="project">
370 - <email>netmon@g.o</email>
371 - <name>Gentoo network monitoring and analysis project</name>
372 - </maintainer>
373 - <upstream>
374 - <remote-id type="sourceforge">netcat6</remote-id>
375 - </upstream>
376 -</pkgmetadata>
377
378 diff --git a/net-analyzer/netcat6/netcat6-1.0-r2.ebuild b/net-analyzer/netcat6/netcat6-1.0-r2.ebuild
379 deleted file mode 100644
380 index 1942014970e..00000000000
381 --- a/net-analyzer/netcat6/netcat6-1.0-r2.ebuild
382 +++ /dev/null
383 @@ -1,51 +0,0 @@
384 -# Copyright 1999-2019 Gentoo Authors
385 -# Distributed under the terms of the GNU General Public License v2
386 -
387 -EAPI=5
388 -inherit eutils autotools toolchain-funcs
389 -
390 -DESCRIPTION="Obsolete netcat clone from before netcat had IPv6 support"
391 -HOMEPAGE="http://netcat6.sourceforge.net/"
392 -SRC_URI="ftp://ftp.deepspace6.net/pub/ds6/sources/nc6/nc6-${PV}.tar.bz2"
393 -
394 -LICENSE="GPL-2"
395 -SLOT="0"
396 -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 m68k ~mips ppc ~ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
397 -IUSE="ipv6 nls bluetooth"
398 -
399 -# need to block netcat as we provide the "nc" file now too
400 -DEPEND="
401 - bluetooth? ( net-wireless/bluez )
402 -"
403 -RDEPEND="
404 - ${DEPEND}
405 - !net-analyzer/netcat
406 -"
407 -
408 -S=${WORKDIR}/nc6-${PV}
409 -
410 -DOCS=( AUTHORS BUGS README NEWS TODO CREDITS ChangeLog )
411 -
412 -src_prepare() {
413 - epatch \
414 - "${FILESDIR}"/${P}-unix-sockets.patch \
415 - "${FILESDIR}"/${P}-automake-1.14.patch
416 - AM_OPTS="--force-missing" eautoreconf
417 -}
418 -
419 -src_configure() {
420 - econf \
421 - $(use_enable ipv6) \
422 - $(use_enable bluetooth bluez) \
423 - $(use_enable nls)
424 -}
425 -
426 -src_compile() {
427 - emake AR=$(tc-getAR)
428 -}
429 -
430 -src_install() {
431 - default
432 - dodir /usr/bin
433 - dosym /usr/bin/nc6 /usr/bin/nc
434 -}
435
436 diff --git a/profiles/package.mask b/profiles/package.mask
437 index 77abdcdfeb4..e0d6a8bc6c5 100644
438 --- a/profiles/package.mask
439 +++ b/profiles/package.mask
440 @@ -743,14 +743,6 @@ dev-php/php-openid
441 # Removal in 30 days. Bug #362753.
442 app-eselect/eselect-gnat
443
444 -# Michał Górny <mgorny@g.o> (13 Mar 2019)
445 -# An ancient netcat clone that has been declared obsolete upstream,
446 -# yet keeps confusing Gentoo users into thinking it's better than
447 -# the original. Recommended alternatives are net-analyzer/netcat,
448 -# net-analyzer/openbsd-netcat, net-misc/socat...
449 -# Removal in 30 days. Bug #573814.
450 -net-analyzer/netcat6
451 -
452 # Eray Aslan <eras@g.o> (01 Mar 2019)
453 # Mask experimental software
454 =mail-mta/postfix-3.5*