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

2018-09-18 Thread Jeroen Roovers
commit: d268b7d634bb013cf5599ab3a5daacd5a5a28f7c
Author: Jeroen Roovers  gentoo  org>
AuthorDate: Tue Sep 18 15:40:22 2018 +
Commit: Jeroen Roovers  gentoo  org>
CommitDate: Tue Sep 18 15:40:22 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d268b7d6

net-analyzer/hping: Merge sed scripts/patches into patches

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 .../hping/files/hping-3_pre20141226-compile.patch  |  31 +++
 .../files/hping-3_pre20141226-cross-compile.patch  |  12 --
 .../files/hping-3_pre20141226-hping2-2-hping.patch | 240 +
 .../hping/files/hping-3_pre20141226-ldflags.patch  |  11 -
 net-analyzer/hping/hping-3_pre20141226.ebuild  |  23 +-
 5 files changed, 273 insertions(+), 44 deletions(-)

diff --git a/net-analyzer/hping/files/hping-3_pre20141226-compile.patch 
b/net-analyzer/hping/files/hping-3_pre20141226-compile.patch
new file mode 100644
index 000..14b6eacdae4
--- /dev/null
+++ b/net-analyzer/hping/files/hping-3_pre20141226-compile.patch
@@ -0,0 +1,31 @@
+--- a/Makefile.in
 b/Makefile.in
+@@ -6,10 +6,7 @@
+ # $date: Sun Jul 25 17:56:15 MET DST 1999$ 
+ # $rev: 3$ 
+ 
+-CC= gcc
+-AR=/usr/bin/ar
+-RANLIB=/usr/bin/ranlib
+-CCOPT= -O2 -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@
++CCOPT= $(CFLAGS) -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@
+ DEBUG= -g
+ #uncomment the following if you need libpcap based build under linux
+ #(not raccomanded)
+@@ -50,14 +47,11 @@
+   $(RANLIB) $@
+ 
+ hping3: byteorder.h $(OBJ)
+-  $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) 
@SOLARISLIB@ @TCL_LIB@
++  $(CC) -o hping3 $(CCOPT) $(LDFLAGS) $(DEBUG) $(OBJ) -L/usr/$(LIBDIR) 
$(PCAP) @SOLARISLIB@ @TCL_LIB@
+   @echo
+-  ./hping3 -v
+-  @echo "use \`make strip' to strip hping3 binary"
+-  @echo "use \`make install' to install hping3"
+ 
+ hping3-static: byteorder.h $(OBJ)
+-  $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) 
-L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl
++  $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) 
-L/usr/$(LIBDIR) $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl
+ 
+ byteorder.h:
+   ./configure

diff --git a/net-analyzer/hping/files/hping-3_pre20141226-cross-compile.patch 
b/net-analyzer/hping/files/hping-3_pre20141226-cross-compile.patch
deleted file mode 100644
index 94dbfed9709..000
--- a/net-analyzer/hping/files/hping-3_pre20141226-cross-compile.patch
+++ /dev/null
@@ -1,12 +0,0 @@
 a/Makefile.in
-+++ b/Makefile.in
-@@ -52,9 +52,6 @@
- hping3: byteorder.h $(OBJ)
-   $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) 
@SOLARISLIB@ @TCL_LIB@
-   @echo
--  ./hping3 -v
--  @echo "use \`make strip' to strip hping3 binary"
--  @echo "use \`make install' to install hping3"
- 
- hping3-static: byteorder.h $(OBJ)
-   $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) 
-L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl

diff --git a/net-analyzer/hping/files/hping-3_pre20141226-hping2-2-hping.patch 
b/net-analyzer/hping/files/hping-3_pre20141226-hping2-2-hping.patch
new file mode 100644
index 000..7ceaac921a0
--- /dev/null
+++ b/net-analyzer/hping/files/hping-3_pre20141226-hping2-2-hping.patch
@@ -0,0 +1,240 @@
+--- a/docs/hping3.8
 b/docs/hping3.8
+@@ -1,8 +1,8 @@
+-.TH HPING2 8 "2001 Aug 14"
++.TH HPING 8 "2001 Aug 14"
+ .SH NAME
+-hping2 \- send (almost) arbitrary TCP/IP packets to network hosts
++hping \- send (almost) arbitrary TCP/IP packets to network hosts
+ .SH SYNOPSIS
+-.B hping2
++.B hping
+ [
+ .B \-hvnqVDzZ012WrfxykQbFSRPAUXYjJBuTG
+ ] [
+@@ -116,11 +116,11 @@
+ .br
+ .ad
+ .SH DESCRIPTION
+-hping2 is a network tool able to send custom TCP/IP packets and to
+-display target replies like ping program does with ICMP replies. hping2
++hping is a network tool able to send custom TCP/IP packets and to
++display target replies like ping program does with ICMP replies. hping
+ handle fragmentation, arbitrary packets body and size and can be used in
+ order to transfer files encapsulated under supported protocols. Using
+-hping2 you are able to perform at least the following stuff:
++hping you are able to perform at least the following stuff:
+ 
+  - Test firewall rules
+  - Advanced port scanning
+@@ -136,7 +136,7 @@
+  - A lot of others.
+ 
+ .IR "It's also a good didactic tool to learn TCP/IP" .
+-hping2 is developed and maintained by anti...@invece.org and is
++hping is developed and maintained by anti...@invece.org and is
+ licensed under GPL version 2. Development is open so you can send
+ me patches, suggestion and affronts without inhibitions.
+ .SH HPING SITE
+@@ -158,9 +158,9 @@
+ .I -c --count count
+ Stop after sending (and receiving)
+ .I count
+-response packets. After last packet was send hping2 wait COUNTREACHED_TIMEOUT
++response packets. After last packet was send hping wait COUNTREACHED_TIMEOUT
+ seconds target host replies. You are able to tune 

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

2017-04-16 Thread Jeroen Roovers
commit: bdf91376c408d86d3c177b2a5e5a8a10a6551b80
Author: Jeroen Roovers  gentoo  org>
AuthorDate: Mon Apr 17 05:59:20 2017 +
Commit: Jeroen Roovers  gentoo  org>
CommitDate: Mon Apr 17 05:59:20 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdf91376

net-analyzer/hping: Fix memset issue in ip_opt_build().

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 .../hping/files/hping-3_pre20051105-strlen.patch   | 11 +++
 ...105-r5.ebuild => hping-3_pre20051105-r6.ebuild} | 34 +-
 2 files changed, 31 insertions(+), 14 deletions(-)

diff --git a/net-analyzer/hping/files/hping-3_pre20051105-strlen.patch 
b/net-analyzer/hping/files/hping-3_pre20051105-strlen.patch
new file mode 100644
index 000..692cd93102f
--- /dev/null
+++ b/net-analyzer/hping/files/hping-3_pre20051105-strlen.patch
@@ -0,0 +1,11 @@
+--- a/ip_opt_build.c
 b/ip_opt_build.c
+@@ -25,7 +25,7 @@
+   unsigned char optlen = 0;
+   unsigned long ip;
+ 
+-memset(ip_opt, 1, sizeof(ip_opt));
++memset(ip_opt, 1, strlen(ip_opt));
+ 
+ if (opt_lsrr)
+ {

diff --git a/net-analyzer/hping/hping-3_pre20051105-r5.ebuild 
b/net-analyzer/hping/hping-3_pre20051105-r6.ebuild
similarity index 73%
rename from net-analyzer/hping/hping-3_pre20051105-r5.ebuild
rename to net-analyzer/hping/hping-3_pre20051105-r6.ebuild
index 8f8890ed829..b173af1353b 100644
--- a/net-analyzer/hping/hping-3_pre20051105-r5.ebuild
+++ b/net-analyzer/hping/hping-3_pre20051105-r6.ebuild
@@ -1,8 +1,7 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
-
+EAPI=6
 inherit eutils multilib toolchain-funcs
 
 MY_P="${PN}${PV//_pre/-}"
@@ -17,19 +16,26 @@ IUSE="tcl"
 
 S="${WORKDIR}/${MY_P}"
 
-DEPEND="net-libs/libpcap
-   tcl? ( dev-lang/tcl:0= )"
-RDEPEND="${DEPEND}"
+DEPEND="
+   net-libs/libpcap
+   tcl? ( dev-lang/tcl:0= )
+"
+RDEPEND="
+   ${DEPEND}
+"
+PATCHES=(
+   "${FILESDIR}"/${P}.patch
+   "${FILESDIR}"/bytesex.h.patch
+   "${FILESDIR}"/${P}-tcl.patch
+   "${FILESDIR}"/${P}-ldflags.patch
+   "${FILESDIR}"/${P}-libtcl.patch
+   "${FILESDIR}"/${P}-scan-overflow.patch
+   "${FILESDIR}"/${P}-tclsh-proper-escaping.patch
+   "${FILESDIR}"/${P}-strlen.patch
+)
 
 src_prepare() {
-   epatch \
-   "${FILESDIR}"/${P}.patch \
-   "${FILESDIR}"/bytesex.h.patch \
-   "${FILESDIR}"/${P}-tcl.patch \
-   "${FILESDIR}"/${P}-ldflags.patch \
-   "${FILESDIR}"/${P}-libtcl.patch \
-   "${FILESDIR}"/${P}-scan-overflow.patch \
-   "${FILESDIR}"/${P}-tclsh-proper-escaping.patch # bug #486664
+   default
 
# Correct hard coded values
sed -i Makefile.in \