[gentoo-commits] repo/gentoo:master commit in: net-analyzer/openbsd-netcat/files/, net-analyzer/openbsd-netcat/

2021-06-18 Thread Fabian Groffen
commit: d79073fa489f7f736f8b64e8598e2d93ea0c0264
Author: Fabian Groffen  gentoo  org>
AuthorDate: Fri Jun 18 07:34:25 2021 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Fri Jun 18 08:58:32 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d79073fa

net-analyzer/openbsd-netcat-1.195-r1: fix compile for real on >=darwin19

Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Fabian Groffen  gentoo.org>

 .../openbsd-netcat/files/openbsd-netcat-1.190-darwin13.patch  | 8 ++--
 net-analyzer/openbsd-netcat/openbsd-netcat-1.195-r1.ebuild| 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin13.patch 
b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin13.patch
index 5a643a2945f..216b8c20792 100644
--- a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin13.patch
+++ b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin13.patch
@@ -1,4 +1,8 @@
-strtonum isn't available on 

[gentoo-commits] repo/gentoo:master commit in: net-analyzer/openbsd-netcat/files/, net-analyzer/openbsd-netcat/

2021-04-05 Thread Sam James
commit: 094258d6ac18a136540bd6e5b65257fa5556db5f
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Mon Apr  5 16:45:28 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Apr  5 23:41:23 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=094258d6

net-analyzer/openbsd-netcat: fix patching

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/20267
Signed-off-by: Sam James  gentoo.org>

 .../openbsd-netcat/files/openbsd-netcat-1.105-darwin.patch | 10 --
 net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild |  2 +-
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git 
a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.105-darwin.patch 
b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.105-darwin.patch
index 8c68a66ad54..a6f805af1a6 100644
--- a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.105-darwin.patch
+++ b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.105-darwin.patch
@@ -1,7 +1,5 @@
-Allow compilation on Darwin
-
 netcat.c
-+++ netcat.c
+--- a/netcat.c
 b/netcat.c
 @@ -43,11 +43,13 @@
  #include 
  #include 
@@ -73,8 +71,8 @@ Allow compilation on Darwin
  int
  main(int argc, char *argv[])
  {
 socks.c
-+++ socks.c
+--- a/socks.c
 b/socks.c
 @@ -38,7 +38,7 @@
  #include 
  #include 

diff --git a/net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild 
b/net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild
index 7a6f5c18460..9b84922f8b7 100644
--- a/net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild
+++ b/net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild
@@ -29,7 +29,7 @@ src_prepare() {
default
if [[ ${CHOST} == *-darwin* ]] ; then
# this undoes some of the Debian/Linux changes
-   epatch "${FILESDIR}"/${P}-darwin.patch
+   eapply "${FILESDIR}"/${P}-darwin.patch
fi
 }
 



[gentoo-commits] repo/gentoo:master commit in: net-analyzer/openbsd-netcat/files/, net-analyzer/openbsd-netcat/

2021-02-15 Thread Fabian Groffen
commit: 376fbe9ba6cedba285000bdb909a5ea46b0955e7
Author: Fabian Groffen  gentoo  org>
AuthorDate: Mon Feb 15 17:42:32 2021 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Mon Feb 15 17:43:28 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=376fbe9b

net-analyzer/openbsd-netcat: update darwin patch so it applies to 1.195

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Fabian Groffen  gentoo.org>

 .../files/openbsd-netcat-1.190-darwin.patch | 17 +
 net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild |  4 ++--
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git 
a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch 
b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch
index e1a462e746b..a8453c09067 100644
--- a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch
+++ b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch
@@ -4,7 +4,7 @@ diff --git a/netcat.c b/netcat.c
 index a0fb51b..bbb5dd1 100644
 --- a/netcat.c
 +++ b/netcat.c
-@@ -51,11 +51,13 @@
+@@ -51,11 +51,16 @@
  # include 
  #endif
  
@@ -18,6 +18,9 @@ index a0fb51b..bbb5dd1 100644
 -# define IPTOS_LOWCOST 0x02
  # define IPTOS_MINCOST IPTOS_LOWCOST
  #endif /* IPTOS_LOWDELAY */
++#ifndef SOCK_CLOEXEC
++# define SOCK_CLOEXEC 0
++#endif
  
 @@ -108,8 +110,9 @@
  # include 
@@ -87,17 +90,7 @@ index a0fb51b..bbb5dd1 100644
/* For now, all errnos are fatal */
err(1, "accept");
}
-@@ -1092,14 +1091,16 @@
-   int s, save_errno;
- 
-   if (uflag) {
--  if ((s = unix_bind(unix_dg_tmp_socket, SOCK_CLOEXEC)) < 0)
-+  if ((s = unix_bind(unix_dg_tmp_socket, 0)) < 0)
-   return -1;
-   } else {
--  if ((s = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)) < 0) {
-+  if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
-   errx(1,"create unix socket failed");
+@@ -1100,6 +1099,8 @@
return -1;
}
}

diff --git a/net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild 
b/net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild
index 7994e7f7ba3..9e669ea4b2a 100644
--- a/net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild
+++ b/net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -30,7 +30,7 @@ src_prepare() {
done
if [[ ${CHOST} == *-darwin* ]] ; then
# this undoes some of the Debian/Linux changes
-   eapply "${FILESDIR}"/${P}-darwin.patch
+   eapply "${FILESDIR}"/${PN}-1.190-darwin.patch
fi
default
 }



[gentoo-commits] repo/gentoo:master commit in: net-analyzer/openbsd-netcat/files/, net-analyzer/openbsd-netcat/

2018-09-11 Thread Benda XU
commit: c0817e0ba61968f842f4f8d5fbb30d5c93be8dec
Author: Xiami  f2light  com>
AuthorDate: Thu Sep  6 11:19:39 2018 +
Commit: Benda XU  gentoo  org>
CommitDate: Wed Sep 12 02:37:30 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0817e0b

net-analyzer/openbsd-netcat: bump to version 1.190

Bump to EAPI 7 (deprecate epatch)
Use debian/patches/series to determine patch order

Remove eapi-deprecated ebuild

Closes: https://github.com/gentoo/gentoo/pull/9790
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 net-analyzer/openbsd-netcat/Manifest   |  3 +-
 .../files/openbsd-netcat-1.190-darwin.patch| 90 ++
 .../openbsd-netcat/openbsd-netcat-1.190.ebuild | 56 ++
 .../openbsd-netcat/openbsd-netcat-1.84.ebuild  | 68 
 4 files changed, 148 insertions(+), 69 deletions(-)

diff --git a/net-analyzer/openbsd-netcat/Manifest 
b/net-analyzer/openbsd-netcat/Manifest
index 5fc38136e0d..6b9fe794d87 100644
--- a/net-analyzer/openbsd-netcat/Manifest
+++ b/net-analyzer/openbsd-netcat/Manifest
@@ -1,3 +1,4 @@
-DIST nc-1.84-22.el6.src.rpm 62570 BLAKE2B 
d7407ec122997a05fe27a13557530d2905f7d1159e609b4600c72dceaa9347944218196a1190ac7e431b35e255eca1fa8f812f12b32898eda369c21984498d97
 SHA512 
a02f5a42e0db0aeff95a06964d6b9ccfa21d659ca67505d19c724966edbca42446ac4048339def769139ca6ae145cdc75e9908f12b21449bc9d748d3cac39094
 DIST netcat-openbsd_1.105-7.debian.tar.gz 31843 BLAKE2B 
115eb2d0c0f35055eb26608746806ba97d15b9320954b5d531a73f3f76ed22238395797e90bc3e60dd9cf5b31e696eec59843f37001093013ed0ef82ae590126
 SHA512 
ec507c858a9f0e75f5a8d6ee8e60eef5200428e55091e831a7acba6c61d70f97af01103c9b65354b0ce773214b0758d957852af793debb70be8aab5b5900b3f6
 DIST netcat-openbsd_1.105.orig.tar.gz 14891 BLAKE2B 
65119a4e2cb3d9cd7b2d7d346b827ff1c175cc3255f40d70bbd45213b438635d6b063b3cf210d27595e38b0d67339788221ae5c3737e6096782245fb573bca3a
 SHA512 
1e515b5af83a12c6f270d6e8bede6406cc7c9f83ca0e316816508dfe2e2c49cda3fffb6b24a3922bf9908dc8b70d540eb8cc49e9cbfe867e49133c004d3f4703
+DIST netcat-openbsd_1.190-2.debian.tar.xz 34836 BLAKE2B 
3ff4390c07d05e8d1a19c8696da12bdc6bba07c6e88281b04cd7915509f44a14dda66462128da768b255d92f3a02d008750a860db9290f9f8e0e0bb9dd66e01b
 SHA512 
c33510ad6761627e0b7e564747f6ae82c7569157bdc91f6a282a97b038b2b0917c27fdfba137462c7c34d84fcfdfe8b6393204884d153e3d200a86f5c6657a9a
+DIST netcat-openbsd_1.190.orig.tar.gz 22384 BLAKE2B 
c3e83106f53a0214f71c805b1dfe6b66718dfca217f713a0d7016cb0a3c75c78580fbdd277bd7b5324371145c4b986ebb867e6f779cd61ffecb8e732ebabcb84
 SHA512 
32310813391f63b8283dc4a63e52821e464ecbfcd0ea995e8e15047c6252a86b31eb4725dc69b778594c43d6ce0cc081aa0f00d7cda0587c91941f20b93a33fe

diff --git 
a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch 
b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch
new file mode 100644
index 000..818b13a81a5
--- /dev/null
+++ b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch
@@ -0,0 +1,90 @@
+Allow compilation on Darwin
+
+diff --git a/netcat.c b/netcat.c
+index a0fb51b..bbb5dd1 100644
+--- a/netcat.c
 b/netcat.c
+@@ -51,11 +51,13 @@
+ # include 
+ #endif
+ 
++#ifndef IPTOS_LOWCOST
++# define IPTOS_LOWCOST 0x02
++#endif
+ #ifndef IPTOS_LOWDELAY
+ # define IPTOS_LOWDELAY 0x10
+ # define IPTOS_THROUGHPUT 0x08
+ # define IPTOS_RELIABILITY 0x04
+-# define IPTOS_LOWCOST 0x02
+ # define IPTOS_MINCOST IPTOS_LOWCOST
+ #endif /* IPTOS_LOWDELAY */
+ 
+@@ -108,8 +110,9 @@
+ # include 
+ #endif
+ #include 
+-#include 
+-#include 
++#include 
++#include 
++#include 
+ 
+ #include "atomicio.h"
+ 
+@@ -240,6 +243,43 @@ static int connect_with_timeout(int fd, const struct 
sockaddr *sa,
+ 
+ static void quit();
+ 
++static char* strtonumerrs[] = {
++  "too large",
++  "too small",
++  "invalid"
++};
++
++static long long
++strtonum(
++  const char *nptr,
++  long long minval,
++  long long maxval,
++  const char **errstr)
++{
++  long long val;
++
++  while (*nptr != '\0' && isspace(*nptr))
++  nptr++;
++  if (*nptr == '\0') {
++  if (errstr != NULL)
++  *errstr = strtonumerrs[2];
++  return 0;
++  }
++  val = atoll(nptr);
++  if (val < minval) {
++  if (errstr != NULL)
++  *errstr = strtonumerrs[1];
++  return 0;
++  }
++  if (val > maxval) {
++  if (errstr != NULL)
++  *errstr = strtonumerrs[0];
++  return 0;
++  }
++  *errstr = NULL;
++  return val;
++}
++
+ int
+ main(int argc, char *argv[])
+ {
+diff --git a/socks.c b/socks.c
+index 9068f39..68b68e3 100644
+--- a/socks.c
 b/socks.c
+@@ -38,7 +38,7 @@
+ #include 
+ #include 
+ #include 
+-#include 
++#include 
+ #include "atomicio.h"
+ 
+ #define SOCKS_PORT"1080"

diff --git