GNU bug report logs -
#28964
[PATCH] gnu: Add hping.
Previous Next
Reported by: Marius Bakke <mbakke <at> fastmail.com>
Date: Tue, 24 Oct 2017 06:08:01 UTC
Severity: normal
Tags: moreinfo, patch
Done: Marius Bakke <mbakke <at> fastmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28964 in the body.
You can then email your comments to 28964 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#28964
; Package
guix-patches
.
(Tue, 24 Oct 2017 06:08:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Marius Bakke <mbakke <at> fastmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 24 Oct 2017 06:08:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/networking.scm (hping): New public variable.
---
gnu/packages/networking.scm | 67 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index a6c104297..4c1771459 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -18,6 +18,7 @@
;;; Copyright © 2017 Rutger Helling <rhelling <at> mykolab.com>
;;; Copyright © 2017 Gábor Boskovits <boskovits <at> gmail.com>
;;; Copyright © 2017 Thomas Danckaert <post <at> thomasdanckaert.be>
+;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -38,6 +39,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
@@ -75,6 +77,7 @@
#:use-module (gnu packages qt)
#:use-module (gnu packages readline)
#:use-module (gnu packages ssh)
+ #:use-module (gnu packages tcl)
#:use-module (gnu packages textutils)
#:use-module (gnu packages tls)
#:use-module (gnu packages valgrind)
@@ -563,6 +566,70 @@ send out a ping packet and move on to the next target in a round-robin
fashion.")
(license license:expat)))
+(define-public hping
+ (let ((commit "3547c7691742c6eaa31f8402e0ccbb81387c1b99")
+ (revision "0"))
+ (package
+ (name "hping")
+ (version (string-append "3.0.0-" revision "-" (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/antirez/hping")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0y0n1ybij3yg9lfgzcwfmjz1sjg913zcqrv391xx83dm0j80sdpb"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'prepare-build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((tcl (assoc-ref inputs "tcl")))
+ ;; Search for bpf.h in the right place.
+ (substitute* '("libpcap_stuff.c" "script.c")
+ (("<net/bpf\\.h>") "<pcap/bpf.h>"))
+ ;; Likewise for TCL.
+ (substitute* "configure"
+ (("/usr/include/tcl.h")
+ (string-append tcl "/include/tcl.h"))
+ (("ls -1 /usr/local/lib")
+ (string-append "ls -1 " tcl "/lib")))
+ ;; Required environment variables.
+ (setenv "CC" "gcc")
+ (setenv "TCLSH" (which "tclsh"))
+ #t)))
+ (add-before 'install 'pre-install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (sbin (string-append out "/sbin"))
+ (man (string-append out "/share/man")))
+ (mkdir-p sbin)
+ (mkdir-p (string-append man "/man8"))
+ (substitute* "Makefile"
+ (("/usr/sbin") sbin)
+ (("\\$\\{INSTALL_MANPATH\\}") man))
+ ;; Fix references to wrong executable name.
+ (substitute* "docs/hping3.8"
+ (("hping2") "hping3")
+ (("HPING2") "HPING3"))
+ #t))))
+ #:tests? #f)) ;no tests
+ (inputs
+ `(("libpcap" ,libpcap)
+ ("tcl" ,tcl)))
+ (home-page "http://www.hping.org/")
+ (synopsis "Network testing tool")
+ (description
+ "hping is a command-line oriented TCP/IP packet assembler/analyzer.
+The interface is inspired by the @command{ping(8)} command, but hping isn't
+only able to send ICMP echo requests. It supports TCP, UDP, ICMP and RAW-IP
+protocols, has a traceroute mode, the ability to send files between a covered
+channel, and many other features.")
+ (license license:gpl2)))) ;strlcpy.c is BSD-3
+
(define-public httping
(package
(name "httping")
--
2.14.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#28964
; Package
guix-patches
.
(Tue, 24 Oct 2017 14:37:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 28964 <at> debbugs.gnu.org (full text, mbox):
Marius,
Marius Bakke wrote on 24/10/17 at 08:06:
> * gnu/packages/networking.scm (hping): New public variable.
Nice. I like stuff that sends random packets and breaks things.
> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index a6c104297..4c1771459 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -563,6 +566,70 @@ send out a ping packet and move on to the next target in a round-robin
> fashion.")
> (license license:expat)))
>
> +(define-public hping
> + (let ((commit "3547c7691742c6eaa31f8402e0ccbb81387c1b99")
> + (revision "0"))
> + (package
> + (name "hping")
> + (version (string-append "3.0.0-" revision "-" (string-take commit 7)))
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/antirez/hping")
> + (commit commit)))
> + (file-name (string-append name "-" version "-checkout"))
> + (sha256
> + (base32
> + "0y0n1ybij3yg9lfgzcwfmjz1sjg913zcqrv391xx83dm0j80sdpb"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-before 'configure 'prepare-build
> + (lambda* (#:key inputs #:allow-other-keys)
> + (let ((tcl (assoc-ref inputs "tcl")))
> + ;; Search for bpf.h in the right place.
> + (substitute* '("libpcap_stuff.c" "script.c")
> + (("<net/bpf\\.h>") "<pcap/bpf.h>"))
> + ;; Likewise for TCL.
> + (substitute* "configure"
> + (("/usr/include/tcl.h")
> + (string-append tcl "/include/tcl.h"))
> + (("ls -1 /usr/local/lib")
> + (string-append "ls -1 " tcl "/lib")))
> + ;; Required environment variables.
> + (setenv "CC" "gcc")
> + (setenv "TCLSH" (which "tclsh"))
> + #t)))
> + (add-before 'install 'pre-install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (sbin (string-append out "/sbin"))
> + (man (string-append out "/share/man")))
> + (mkdir-p sbin)
> + (mkdir-p (string-append man "/man8"))
> + (substitute* "Makefile"
> + (("/usr/sbin") sbin)
> + (("\\$\\{INSTALL_MANPATH\\}") man))
Adding (setenv "MANPATH" man) to 'prepare-build also works, and is
cleaner. There's no $SBINPATH, unfortunately.
> + ;; Fix references to wrong executable name.
> + (substitute* "docs/hping3.8"
> + (("hping2") "hping3")
> + (("HPING2") "HPING3"))
Erk. I'm sending a quick PR upstream just for that. Simple substitution
isn't ideal: there are references to things like ‘HPING2-HOWTO’ and
‘editing hping2.h’ which — though dubious — shouldn't be changed.
- A question: that HPING2-HOWTO (sic: ‘this HOWTO is not completed and
in some points very silly’) is mentioned several times in the man page
but not installed. Any strong opinions?
- A side note: this package installs ‘hping3’ (the tool), with both
‘hping’ and ‘hping2’ as symlinks. There are no such symlinks to the man
page: users must type ‘man hping3’. I've added it to that PR[0].
> + #t))))
> + #:tests? #f)) ;no tests
> + (inputs
> + `(("libpcap" ,libpcap)
> + ("tcl" ,tcl)))
> + (home-page "http://www.hping.org/")
> + (synopsis "Network testing tool")
is a tad (too) short. We should at least mention its purpose "to send
(almost) arbitrary packets".
> + (description
> + "hping is a command-line oriented TCP/IP packet assembler/analyzer.
I don't see the nuance of ‘oriented’, and suggest dropping it. And hping
sends more than TCP/IP.
> +The interface is inspired by the @command{ping(8)} command, but hping isn't
> +only able to send ICMP echo requests. It supports TCP, UDP, ICMP and RAW-IP
‘raw IP’.
> +protocols, has a traceroute mode, the ability to send files between a covered
> +channel, and many other features.")
A misspelling of ‘covert channel’?
WDYTO:
"hping is a command-line IP packet assembler and analyzer.
While its interface is inspired by the @command{ping(8)} command,
hping does
more than just send ICMP echo requests. It supports the TCP, UDP,
ICMP, and
raw IP protocols, has a traceroute mode, the ability to send files
over a covert
channel, and many other features."
> + (license license:gpl2)))) ;strlcpy.c is BSD-3
There's also display_ipopt.c, which looks like BSD-4.
Kind regards,
T G-R
[0]: https://github.com/antirez/hping/pull/32
Information forwarded
to
guix-patches <at> gnu.org
:
bug#28964
; Package
guix-patches
.
(Wed, 13 Feb 2019 00:10:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 28964 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
What is the status of this patch?
Can we push it? Or close the bug? It's been a little while...
[signature.asc (application/pgp-signature, inline)]
Added tag(s) moreinfo.
Request was from
Leo Famulari <leo <at> famulari.name>
to
control <at> debbugs.gnu.org
.
(Wed, 13 Feb 2019 00:10:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#28964
; Package
guix-patches
.
(Tue, 25 Feb 2020 19:12:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 28964 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Since upstream has stopped merging PRs *quite* a while ago, I'd suggest
we should adopt the patches being used by other distributions. I took a
brief look at Gentoo, and their patches [1] look reasonable. Thoughts?
[0]: https://gitweb.gentoo.org/repo/gentoo.git/tree/net-analyzer/hping/files
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#28964
; Package
guix-patches
.
(Tue, 25 Feb 2020 20:16:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 28964 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, Feb 25, 2020 at 08:12:03PM +0100, Jakub Kądziołka wrote:
> Since upstream has stopped merging PRs *quite* a while ago, I'd suggest
> we should adopt the patches being used by other distributions. I took a
> brief look at Gentoo, and their patches [1] look reasonable. Thoughts?
>
> [0]: https://gitweb.gentoo.org/repo/gentoo.git/tree/net-analyzer/hping/files
In general we have always packaged upstream rather than 3rd-party
variants, and tried to push changes upstream, etc. The idea being that
distros are not the right place for package development.
However, in some cases we do package distro variants of programs whose
"canonical" upstreams are defunct, for example w3m, which is now
developed within Debian. It's a matter of judgment.
In this case I think we should drop the patch, since Marius did not
pursue it.
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Marius Bakke <mbakke <at> fastmail.com>
:
You have taken responsibility.
(Wed, 26 Feb 2020 20:55:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Marius Bakke <mbakke <at> fastmail.com>
:
bug acknowledged by developer.
(Wed, 26 Feb 2020 20:55:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 28964-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Leo Famulari <leo <at> famulari.name> writes:
> In this case I think we should drop the patch, since Marius did not
> pursue it.
I agree, closing.
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 26 Mar 2020 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 25 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.