[nc] 1.107 bump
Petr Šabata
psabata at fedoraproject.org
Tue Apr 3 13:36:09 UTC 2012
commit 47476792a9d2a6b60f535c916b3b0bc9753361f3
Author: Petr Šabata <contyk at redhat.com>
Date: Tue Apr 3 15:36:04 2012 +0200
1.107 bump
.gitignore | 1 +
nc-1.100-check-accept.patch | 13 -----
nc-1.105-comma.patch => nc-1.107-comma.patch | 53 ++++++++++---------
nc-1.103-crlf.patch => nc-1.107-crlf.patch | 8 ++--
...-range.patch => nc-1.107-initialize-range.patch | 4 +-
...iptos-class.patch => nc-1.107-iptos-class.patch | 4 +-
...101-linux-ify.patch => nc-1.107-linux-ify.patch | 24 +++++----
nc-1.100-pollhup.patch => nc-1.107-pollhup.patch | 10 ++--
...p-portscan.patch => nc-1.107-udp-portscan.patch | 15 +++--
nc-1.100-udp-stop.patch => nc-1.107-udp-stop.patch | 8 ++-
nc.spec | 26 +++++-----
sources | 2 +-
12 files changed, 86 insertions(+), 82 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 3dcfdb8..4b6ed6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ nc-1.84.tar.bz2
/nc-1.103.tar.bz2
/nc-1.105.tar.bz2
/nc-1.106.tar.bz2
+/nc-1.107.tar.bz2
diff --git a/nc-1.105-comma.patch b/nc-1.107-comma.patch
similarity index 89%
rename from nc-1.105-comma.patch
rename to nc-1.107-comma.patch
index 2071a4b..5e3006b 100644
--- a/nc-1.105-comma.patch
+++ b/nc-1.107-comma.patch
@@ -1,6 +1,21 @@
---- nc/netcat.c 2011-03-09 15:12:34.609563002 +0100
-+++ nc/netcat.c.new 2011-03-09 15:12:38.901562293 +0100
-@@ -761,56 +761,67 @@
+diff --git a/nc.1 b/nc.1
+index e1dec7f..e32ac21 100644
+--- a/nc.1
++++ b/nc.1
+@@ -281,7 +281,7 @@ sockets, a destination is required and is the socket path to connect to
+ option is given).
+ .Pp
+ .Ar port
+-can be a single integer or a range of ports.
++can be one or more comma-separated integers or ranges of ports.
+ Ranges are in the form nn-mm.
+ In general,
+ a destination port must be specified,
+diff --git a/netcat.c b/netcat.c
+index f58298f..4a95dfc 100644
+--- a/netcat.c
++++ b/netcat.c
+@@ -812,56 +812,67 @@ void
build_ports(char *p)
{
const char *errstr;
@@ -48,7 +63,11 @@
+ hi = lo;
+ lo = cp;
+ }
-+
+
+- /* Load ports sequentially. */
+- for (cp = lo; cp <= hi; cp++) {
+- portlist[x] = calloc(1, PORT_MAX_LEN);
+- if (portlist[x] == NULL)
+ /* Load ports sequentially. */
+ for (cp = lo; cp <= hi; cp++) {
+ portlist[x] = calloc(1, PORT_MAX_LEN);
@@ -57,11 +76,7 @@
+ snprintf(portlist[x], PORT_MAX_LEN, "%d", cp);
+ x++;
+ }
-
-- /* Load ports sequentially. */
-- for (cp = lo; cp <= hi; cp++) {
-- portlist[x] = calloc(1, PORT_MAX_LEN);
-- if (portlist[x] == NULL)
++
+ } else {
+ hi = strtonum(p, 1, PORT_MAX, &errstr);
+ if (errstr)
@@ -77,17 +92,16 @@
- if (rflag) {
- int y;
- char *c;
--
++ if (comma)
++ p = comma + 1;
++ } while (comma);
+
- for (x = 0; x <= (hi - lo); x++) {
- y = (arc4random() & 0xFFFF) % (hi - lo);
- c = portlist[x];
- portlist[x] = portlist[y];
- portlist[y] = c;
- }
-+ if (comma)
-+ p = comma + 1;
-+ } while (comma);
-+
+ /* Randomly swap ports. */
+ if (rflag) {
+ int y;
@@ -109,14 +123,3 @@
}
}
---- nc/nc.1 2011-03-09 15:13:13.676563001 +0100
-+++ nc/nc.1.new 2011-03-09 15:17:25.354562498 +0100
-@@ -274,7 +274,7 @@
- option is given).
- .Pp
- .Ar port
--can be a single integer or a range of ports.
-+can be one or more comma-separated integers or ranges of ports.
- Ranges are in the form nn-mm.
- In general,
- a destination port must be specified,
diff --git a/nc-1.103-crlf.patch b/nc-1.107-crlf.patch
similarity index 95%
rename from nc-1.103-crlf.patch
rename to nc-1.107-crlf.patch
index 78d4115..3535bca 100644
--- a/nc-1.103-crlf.patch
+++ b/nc-1.107-crlf.patch
@@ -1,5 +1,5 @@
diff --git a/nc.1 b/nc.1
-index 61d6012..39d7715 100644
+index 75d1437..e1dec7f 100644
--- a/nc.1
+++ b/nc.1
@@ -34,7 +34,7 @@
@@ -21,7 +21,7 @@ index 61d6012..39d7715 100644
Enable debugging on the socket.
.It Fl d
diff --git a/netcat.c b/netcat.c
-index 856afbc..5c8c878 100644
+index 792112f..f58298f 100644
--- a/netcat.c
+++ b/netcat.c
@@ -86,6 +86,7 @@ int Iflag; /* TCP receive buffer size */
@@ -69,7 +69,7 @@ index 856afbc..5c8c878 100644
}
}
else if (pfd[1].revents & POLLHUP) {
-@@ -995,6 +1006,7 @@ help(void)
+@@ -980,6 +991,7 @@ help(void)
\t-S Enable the TCP MD5 signature option\n\
\t-s addr\t Local source address\n\
\t-T toskeyword\tSet IP Type of Service\n\
@@ -77,7 +77,7 @@ index 856afbc..5c8c878 100644
\t-t Answer TELNET negotiation\n\
\t-U Use UNIX domain socket\n\
\t-u UDP mode\n\
-@@ -1012,7 +1024,7 @@ void
+@@ -997,7 +1009,7 @@ void
usage(int ret)
{
fprintf(stderr,
diff --git a/nc-1.100-initialize-range.patch b/nc-1.107-initialize-range.patch
similarity index 70%
rename from nc-1.100-initialize-range.patch
rename to nc-1.107-initialize-range.patch
index 3b6387d..5363f89 100644
--- a/nc-1.100-initialize-range.patch
+++ b/nc-1.107-initialize-range.patch
@@ -1,8 +1,8 @@
diff --git a/netcat.c b/netcat.c
-index b7e4d5e..ad57e4e 100644
+index 5059d60..fca6ad5 100644
--- a/netcat.c
+++ b/netcat.c
-@@ -762,7 +762,7 @@ build_ports(char *p)
+@@ -813,7 +813,7 @@ build_ports(char *p)
{
const char *errstr;
char *n, *comma;
diff --git a/nc-1.103-iptos-class.patch b/nc-1.107-iptos-class.patch
similarity index 90%
rename from nc-1.103-iptos-class.patch
rename to nc-1.107-iptos-class.patch
index 7dda1a7..154114a 100644
--- a/nc-1.103-iptos-class.patch
+++ b/nc-1.107-iptos-class.patch
@@ -1,8 +1,8 @@
diff --git a/netcat.c b/netcat.c
-index 5c8c878..0f6ae3d 100644
+index fca6ad5..b3143ef 100644
--- a/netcat.c
+++ b/netcat.c
-@@ -957,14 +957,14 @@ map_tos(char *s, int *val)
+@@ -953,14 +953,14 @@ map_tos(char *s, int *val)
{ "af42", IPTOS_DSCP_AF42 },
{ "af43", IPTOS_DSCP_AF43 },
{ "critical", IPTOS_PREC_CRITIC_ECP },
diff --git a/nc-1.101-linux-ify.patch b/nc-1.107-linux-ify.patch
similarity index 78%
rename from nc-1.101-linux-ify.patch
rename to nc-1.107-linux-ify.patch
index 950788c..9c17a95 100644
--- a/nc-1.101-linux-ify.patch
+++ b/nc-1.107-linux-ify.patch
@@ -1,6 +1,8 @@
---- a/netcat.c 2011-01-09 23:16:46.000000000 +0100
-+++ b/netcat.c 2011-03-08 09:21:31.599560952 +0100
-@@ -85,7 +84,6 @@
+diff --git a/netcat.c b/netcat.c
+index 6b37203..b4e3ca6 100644
+--- a/netcat.c
++++ b/netcat.c
+@@ -84,7 +84,6 @@ int Iflag; /* TCP receive buffer size */
int Oflag; /* TCP send buffer size */
int Sflag; /* TCP MD5 signature option */
int Tflag = -1; /* IP Type of Service */
@@ -8,7 +10,7 @@
int timeout = -1;
int family = AF_UNSPEC;
-@@ -130,7 +128,7 @@
+@@ -130,7 +129,7 @@ main(int argc, char *argv[])
sv = NULL;
while ((ch = getopt(argc, argv,
@@ -17,7 +19,7 @@
switch (ch) {
case '4':
family = AF_INET;
-@@ -192,12 +187,6 @@
+@@ -189,12 +188,6 @@ main(int argc, char *argv[])
case 'u':
uflag = 1;
break;
@@ -30,7 +32,7 @@
case 'v':
vflag = 1;
break;
-@@ -274,8 +263,8 @@
+@@ -282,8 +275,8 @@ main(int argc, char *argv[])
} else {
strlcpy(unix_dg_tmp_socket_buf, "/tmp/nc.XXXXXXXXXX",
UNIX_DG_TMP_SOCKET_SIZE);
@@ -41,7 +43,7 @@
unix_dg_tmp_socket = unix_dg_tmp_socket_buf;
}
}
-@@ -551,18 +540,10 @@
+@@ -561,18 +554,10 @@ remote_connect(const char *host, const char *port, struct addrinfo hints)
res0->ai_protocol)) < 0)
continue;
@@ -60,7 +62,7 @@
memset(&ahints, 0, sizeof(struct addrinfo));
ahints.ai_family = res0->ai_family;
ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
-@@ -625,13 +606,7 @@
+@@ -672,13 +657,7 @@ local_listen(char *host, char *port, struct addrinfo hints)
res0->ai_protocol)) < 0)
continue;
@@ -75,8 +77,10 @@
if (ret == -1)
err(1, NULL);
---- a/socks.c 2011-02-12 16:54:18.000000000 +0100
-+++ b/socks.c 2011-03-07 16:24:37.198561350 +0100
+diff --git a/socks.c b/socks.c
+index f8adda4..61f2e20 100644
+--- a/socks.c
++++ b/socks.c
@@ -38,7 +38,7 @@
#include <string.h>
#include <unistd.h>
diff --git a/nc-1.100-pollhup.patch b/nc-1.107-pollhup.patch
similarity index 84%
rename from nc-1.100-pollhup.patch
rename to nc-1.107-pollhup.patch
index 63939cc..4c72fa5 100644
--- a/nc-1.100-pollhup.patch
+++ b/nc-1.107-pollhup.patch
@@ -1,6 +1,8 @@
---- nc/netcat.c 2011-03-08 10:53:14.708563001 +0100
-+++ nc/netcat.c.new 2011-03-08 11:10:48.182562381 +0100
-@@ -669,9 +669,7 @@
+diff --git a/netcat.c b/netcat.c
+index b4e3ca6..f0f6cec 100644
+--- a/netcat.c
++++ b/netcat.c
+@@ -720,9 +720,7 @@ readwrite(int nfd)
if ((n = read(nfd, buf, plen)) < 0)
return;
else if (n == 0) {
@@ -11,7 +13,7 @@
} else {
if (tflag)
atelnet(nfd, buf, n);
-@@ -679,17 +677,29 @@
+@@ -730,17 +728,29 @@ readwrite(int nfd)
return;
}
}
diff --git a/nc-1.100-udp-portscan.patch b/nc-1.107-udp-portscan.patch
similarity index 83%
rename from nc-1.100-udp-portscan.patch
rename to nc-1.107-udp-portscan.patch
index 4e73f50..07cec4d 100644
--- a/nc-1.100-udp-portscan.patch
+++ b/nc-1.107-udp-portscan.patch
@@ -1,5 +1,7 @@
---- nc/netcat.c 2011-03-08 11:31:20.375563001 +0100
-+++ nc/netcat.c.new 2011-03-08 11:39:27.466562356 +0100
+diff --git a/netcat.c b/netcat.c
+index b31dce2..792112f 100644
+--- a/netcat.c
++++ b/netcat.c
@@ -64,6 +64,8 @@
#define PORT_MAX_LEN 6
#define UNIX_DG_TMP_SOCKET_SIZE 19
@@ -9,7 +11,7 @@
/* Command Line Options */
int dflag; /* detached, no stdin */
unsigned int iflag; /* Interval Flag */
-@@ -399,7 +401,7 @@
+@@ -413,7 +415,7 @@ main(int argc, char *argv[])
continue;
ret = 0;
@@ -18,18 +20,19 @@
/* For UDP, make sure we are connected. */
if (uflag) {
if (udptest(s) == -1) {
-@@ -813,15 +815,20 @@
+@@ -860,15 +862,20 @@ build_ports(char *p)
int
udptest(int s)
{
- int i, ret;
-+ int i, t;
-
+-
- for (i = 0; i <= 3; i++) {
- if (write(s, "X", 1) == 1)
- ret = 1;
- else
- ret = -1;
++ int i, t;
++
+ if ((write(s, "X", 1) != 1) ||
+ ((write(s, "X", 1) != 1) && ( errno == ECONNREFUSED)))
+ return -1;
diff --git a/nc-1.100-udp-stop.patch b/nc-1.107-udp-stop.patch
similarity index 60%
rename from nc-1.100-udp-stop.patch
rename to nc-1.107-udp-stop.patch
index a6dbe1d..0b79450 100644
--- a/nc-1.100-udp-stop.patch
+++ b/nc-1.107-udp-stop.patch
@@ -1,6 +1,8 @@
---- nc/netcat.c 2011-03-08 11:11:50.298563001 +0100
-+++ nc/netcat.c.new 2011-03-08 11:19:52.940562684 +0100
-@@ -683,6 +683,9 @@
+diff --git a/netcat.c b/netcat.c
+index f0f6cec..b31dce2 100644
+--- a/netcat.c
++++ b/netcat.c
+@@ -734,6 +734,9 @@ readwrite(int nfd)
pfd[0].fd = -1;
pfd[0].events = 0;
}
diff --git a/nc.spec b/nc.spec
index b827644..5a1bb05 100644
--- a/nc.spec
+++ b/nc.spec
@@ -1,6 +1,6 @@
Summary: Reads and writes data across network connections using TCP or UDP
Name: nc
-Version: 1.106
+Version: 1.107
Release: 1%{?dist}
URL: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/%{name}/
License: BSD and ISC
@@ -9,16 +9,15 @@ Group: Applications/Internet
# CVSROOT=anoncvs at anoncvs.openbsd.org.ar:/cvs/src/usr.bin cvs checkout nc
Source0: %{name}-%{version}.tar.bz2
Source1: b64_ntop.c
-Patch0: nc-1.101-linux-ify.patch
-Patch1: nc-1.100-pollhup.patch
-Patch2: nc-1.100-udp-stop.patch
-Patch3: nc-1.100-udp-portscan.patch
-Patch4: nc-1.103-crlf.patch
-Patch5: nc-1.105-comma.patch
+Patch0: nc-1.107-linux-ify.patch
+Patch1: nc-1.107-pollhup.patch
+Patch2: nc-1.107-udp-stop.patch
+Patch3: nc-1.107-udp-portscan.patch
+Patch4: nc-1.107-crlf.patch
+Patch5: nc-1.107-comma.patch
Patch6: nc-1.100-libbsd.patch
-Patch7: nc-1.100-initialize-range.patch
-Patch8: nc-1.100-check-accept.patch
-Patch9: nc-1.103-iptos-class.patch
+Patch7: nc-1.107-initialize-range.patch
+Patch8: nc-1.107-iptos-class.patch
BuildRequires: libbsd-devel
@@ -45,8 +44,7 @@ capabilities.
%patch5 -p1 -b .comma
%patch6 -p1 -b .libbsd
%patch7 -p1 -b .initialize-range
-%patch8 -p1 -b .check-accept
-%patch9 -p1 -b .iptos-class
+%patch8 -p1 -b .iptos-class
cp -p %{SOURCE1} .
%build
@@ -63,6 +61,10 @@ install -m644 -p nc.1 %{buildroot}%{_mandir}/man1
%{_mandir}/man1/nc.1*
%changelog
+* Tue Apr 03 2012 Petr Šabata <contyk at redhat.com> - 1.107-1
+- 1.107 bump
+- Warn if accept fails implemented upstream, removing the patch
+
* Fri Mar 23 2012 Petr Šabata <contyk at redhat.com> - 1.106-1
- 1.106 bump
- BSD jumbo support removed upstream
diff --git a/sources b/sources
index 6c1c5ff..7bc7f20 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f639aac0f487242512d1b3907bf46259 nc-1.106.tar.bz2
+81f10b846fdc58aebc00d903919b2ac5 nc-1.107.tar.bz2
More information about the scm-commits
mailing list