Re: [new] net/hping3

2016-12-04 Thread Jeremie Courreges-Anglas

After discussing this with Stuart, let's update the existing hping port
instead of adding another one.  The interface is the same and we don't
bake Tcl support into the executable anyway.

ok?

(now using user/uid _hping/784 instead of _hping3/783)


Index: Makefile
===
RCS file: /d/cvs/ports/net/hping/Makefile,v
retrieving revision 1.31
diff -u -p -r1.31 Makefile
--- Makefile11 Nov 2016 21:07:29 -  1.31
+++ Makefile4 Dec 2016 19:05:40 -
@@ -1,10 +1,13 @@
 # $OpenBSD: Makefile,v 1.31 2016/11/11 21:07:29 jca Exp $
 
-COMMENT=   TCP/UDP ping/traceroute tool
+COMMENT=   command-line oriented TCP/IP packet assembler/analyzer
+
+GH_ACCOUNT=antirez
+GH_PROJECT=hping
+GH_COMMIT= 3547c7691742c6eaa31f8402e0ccbb81387c1b99
+DISTNAME=  hping-3.0.0-alpha-1
+PKGNAME=   hping-3.0.0pre1
 
-DISTNAME=  hping2.0.0-rc3
-PKGNAME=   hping-2.0.0rc3
-REVISION=  4
 CATEGORIES=net
 
 HOMEPAGE=  http://www.hping.org/
@@ -14,23 +17,19 @@ PERMIT_PACKAGE_CDROM=   Yes
 
 WANTLIB=   c pcap
 
-MASTER_SITES=  ${HOMEPAGE}
-
-WRKDIST=   ${WRKDIR}/${DISTNAME:S/.0.0//}
+CONFIGURE_STYLE=simple
+CONFIGURE_ARGS=--no-tcl
 
 MAKE_FLAGS=CC="${CC}" \
-   CCOPT="${CFLAGS}"
-
-CONFIGURE_STYLE=simple
+   CFLAGS="${CFLAGS}"
 
-USE_GROFF =Yes
 NO_TEST=   Yes
 
-pre-install:
-   sed -i "s,hping2,hping," ${WRKSRC}/docs/hping2.8
+post-extract:
+   sed -i 's/hping2/hping/g; s/HPING2/HPING/g' ${WRKSRC}/docs/hping3.8
 
 do-install:
-   ${INSTALL_PROGRAM} ${WRKSRC}/hping2 ${PREFIX}/sbin/hping
-   ${INSTALL_MAN} ${WRKSRC}/docs/hping2.8 ${PREFIX}/man/man8/hping.8
+   ${INSTALL_PROGRAM} ${WRKBUILD}/hping3 ${PREFIX}/sbin/hping
+   ${INSTALL_MAN} ${WRKSRC}/docs/hping3.8 ${PREFIX}/man/man8/hping.8
 
 .include 
Index: distinfo
===
RCS file: /d/cvs/ports/net/hping/distinfo,v
retrieving revision 1.7
diff -u -p -r1.7 distinfo
--- distinfo18 Jan 2015 03:14:39 -  1.7
+++ distinfo4 Dec 2016 18:50:23 -
@@ -1,2 +1,2 @@
-SHA256 (hping2.0.0-rc3.tar.gz) = 9ZKS3jm5pAEEFL0SCklCJjmXZxSO+jcni9U9lhMWeWQ=
-SIZE (hping2.0.0-rc3.tar.gz) = 124573
+SHA256 (hping-3.0.0-alpha-1.tar.gz) = 
9PrQGX9JP6eFRgRdvG2kBAwsgPxOM7jTIK9rFdqxlRk=
+SIZE (hping-3.0.0-alpha-1.tar.gz) = 572322
Index: patches/patch-Makefile_in
===
RCS file: /d/cvs/ports/net/hping/patches/patch-Makefile_in,v
retrieving revision 1.1
diff -u -p -r1.1 patch-Makefile_in
--- patches/patch-Makefile_in   24 Apr 2005 22:59:08 -  1.1
+++ patches/patch-Makefile_in   4 Dec 2016 18:49:14 -
@@ -1,21 +1,14 @@
 $OpenBSD: patch-Makefile_in,v 1.1 2005/04/24 22:59:08 alek Exp $
 Makefile.in.orig   Mon May  3 11:29:39 2004
-+++ Makefile.inMon Apr 25 00:06:21 2005
-@@ -10,7 +10,7 @@ CC= gcc
+--- Makefile.in.orig   Thu Nov 10 14:16:59 2016
 Makefile.inThu Nov 10 14:17:30 2016
+@@ -9,8 +9,8 @@
+ CC= gcc
  AR=/usr/bin/ar
  RANLIB=/usr/bin/ranlib
- CCOPT= -O2 -Wall @PCAP_INCLUDE@
+-CCOPT= -O2 -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@
 -DEBUG= -g
++CCOPT= -Wall ${CFLAGS} @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@
 +DEBUG=
  #uncomment the following if you need libpcap based build under linux
  #(not raccomanded)
- COMPILE_TIME= @FORCE_LIBPCAP@
-@@ -39,7 +39,7 @@ ARSOBJ = ars.o apd.o split.o
- all: hping2
- 
- libars.a: $(ARSOBJ)
--  $(AR) rc $@ $^
-+  $(AR) rc $@ $(ARSOBJ)
-   $(RANLIB) $@
- 
- hping2: byteorder.h $(OBJ)
+ COMPILE_TIME=
Index: patches/patch-bytesex_h
===
RCS file: patches/patch-bytesex_h
diff -N patches/patch-bytesex_h
--- patches/patch-bytesex_h 1 May 2015 17:40:58 -   1.3
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,30 +0,0 @@
-$OpenBSD: patch-bytesex_h,v 1.3 2015/05/01 17:40:58 ajacoutot Exp $
 bytesex.h.orig Sat Jun 18 08:40:22 2005
-+++ bytesex.h  Sat Jun 18 08:42:22 2005
-@@ -4,20 +4,17 @@
- 
- /* $Id: patch-bytesex_h,v 1.3 2015/05/01 17:40:58 ajacoutot Exp $ */
- 
-+#include 
-+
- #ifndef ARS_BYTESEX_H
- #define ARS_BYTESEX_H
- 
--#if   defined(__i386__) \
--  || defined(__alpha__) \
--  || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
-+#if   BYTE_ORDER == LITTLE_ENDIAN
- #define BYTE_ORDER_LITTLE_ENDIAN
--#elif defined(__mc68000__) \
--  || defined (__sparc__) \
--  || defined (__sparc) \
--  || defined (__PPC__) \
--  || defined (__BIG_ENDIAN__) \
--  || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
-+
-+#elif BYTE_ORDER == BIG_ENDIAN
- #define BYTE_ORDER_BIG_ENDIAN
-+
- #else
- # error can not find the byte order for this architecture, fix bytesex.h
- #endif
Index: patches/patch-getlhs_c
===
RCS 

Re: [new] net/hping3

2016-11-21 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas  writes:

> Jeremie Courreges-Anglas  writes:
>
>> Stuart Henderson  writes:
>>
>>> On 2016/11/10 14:28, Jeremie Courreges-Anglas wrote:
 
 Here's a wip tarball for hping3.  No Tcl support (upstream seems to have
 stop automagic Tcl version discovery at 8.4).  DESCR ripped from
 net/hping and tweaked a bit.
 
 Feedback welcome.
>>>
>>> Needs a license marker (looks like "GPLv2 only"), and zap the stray
>>> blank line in DESCR,
>>
>> Done.
>>
>>> otherwise OK - though I wonder if it might be
>>> worth patching (rather than just mentioning in DESCR) to add a
>>> message about PF if it gets EHOSTUNREACH.
>>
>> Good idea.
>>
>> Additional changes:
>> - NO_TEST=Yes (already in the previous tarball)
>> - replace hping2 with hping3 in manpage, else it quickly gets confusing
>> - drop uid to _ping, since hping3 always need root (well, afaik)
>>
>> Normally we would use a dedicated uid for this port, but I wonder
>> whether we could make an exception here, for the sake of, hem,
>> simplicity. :)
>
> Bah, let's go with a dedicated user.

Sheer, raging paranoia:
- in post-extract use sed s///*g* both for hping2 and HPING2
- in sendip.c save errno before calling perror

uid/gid 783 are still free in user.list :)

ok?



hping3.tgz
Description: Binary data
-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE


Re: [new] net/hping3

2016-11-11 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas  writes:

> Stuart Henderson  writes:
>
>> On 2016/11/10 14:28, Jeremie Courreges-Anglas wrote:
>>> 
>>> Here's a wip tarball for hping3.  No Tcl support (upstream seems to have
>>> stop automagic Tcl version discovery at 8.4).  DESCR ripped from
>>> net/hping and tweaked a bit.
>>> 
>>> Feedback welcome.
>>
>> Needs a license marker (looks like "GPLv2 only"), and zap the stray
>> blank line in DESCR,
>
> Done.
>
>> otherwise OK - though I wonder if it might be
>> worth patching (rather than just mentioning in DESCR) to add a
>> message about PF if it gets EHOSTUNREACH.
>
> Good idea.
>
> Additional changes:
> - NO_TEST=Yes (already in the previous tarball)
> - replace hping2 with hping3 in manpage, else it quickly gets confusing
> - drop uid to _ping, since hping3 always need root (well, afaik)
>
> Normally we would use a dedicated uid for this port, but I wonder
> whether we could make an exception here, for the sake of, hem,
> simplicity. :)

Bah, let's go with a dedicated user.



hping3.tgz
Description: Binary data

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE


Re: [new] net/hping3

2016-11-11 Thread Jeremie Courreges-Anglas
Stuart Henderson  writes:

> On 2016/11/10 14:28, Jeremie Courreges-Anglas wrote:
>> 
>> Here's a wip tarball for hping3.  No Tcl support (upstream seems to have
>> stop automagic Tcl version discovery at 8.4).  DESCR ripped from
>> net/hping and tweaked a bit.
>> 
>> Feedback welcome.
>
> Needs a license marker (looks like "GPLv2 only"), and zap the stray
> blank line in DESCR,

Done.

> otherwise OK - though I wonder if it might be
> worth patching (rather than just mentioning in DESCR) to add a
> message about PF if it gets EHOSTUNREACH.

Good idea.

Additional changes:
- NO_TEST=Yes (already in the previous tarball)
- replace hping2 with hping3 in manpage, else it quickly gets confusing
- drop uid to _ping, since hping3 always need root (well, afaik)

Normally we would use a dedicated uid for this port, but I wonder
whether we could make an exception here, for the sake of, hem,
simplicity. :)



hping3.tgz
Description: Binary data
-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE


Re: [new] net/hping3

2016-11-11 Thread Stuart Henderson
On 2016/11/10 14:28, Jeremie Courreges-Anglas wrote:
> 
> Here's a wip tarball for hping3.  No Tcl support (upstream seems to have
> stop automagic Tcl version discovery at 8.4).  DESCR ripped from
> net/hping and tweaked a bit.
> 
> Feedback welcome.

Needs a license marker (looks like "GPLv2 only"), and zap the stray
blank line in DESCR, otherwise OK - though I wonder if it might be
worth patching (rather than just mentioning in DESCR) to add a
message about PF if it gets EHOSTUNREACH.



Re: [new] net/hping3

2016-11-10 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas  writes:

> Here's a wip tarball for hping3.  No Tcl support (upstream seems to have
> stop automagic Tcl version discovery at 8.4).  DESCR ripped from
> net/hping and tweaked a bit.
>
> Feedback welcome.

New tarball.
- add licence marker
- add NO_TEST=Yes



hping3.tgz
Description: Binary data

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE


[new] net/hping3

2016-11-10 Thread Jeremie Courreges-Anglas

Here's a wip tarball for hping3.  No Tcl support (upstream seems to have
stop automagic Tcl version discovery at 8.4).  DESCR ripped from
net/hping and tweaked a bit.

Feedback welcome.



hping3.tgz
Description: Binary data

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE