* [PATCH 0/2] Add nmap @ 2016-03-14 22:50 Leo Famulari 2016-03-14 22:50 ` [PATCH 1/2] licenses: Add the nmap license Leo Famulari ` (3 more replies) 0 siblings, 4 replies; 14+ messages in thread From: Leo Famulari @ 2016-03-14 22:50 UTC (permalink / raw) To: guix-devel This package provides nmap [0]. The nmap source distribution comes with a bunch of its dependencies bundled. This package deletes most of them and replaces them with external libraries. This package currently uses the bundled copies of liblinear and libdnet. Liblinear should be packaged separately [1], but I think that the bundled libdnet should be used, because apparently this bundled version is modified [2] enough that Debian has chosen to use it [3]. [0] https://nmap.org/ [1] This is a not-working WIP on my end. Liblinear doesn't really have a build system, so distributions must roll their own :( In my opinion, if Nmap did not bundle liblinear, they would have upstreamed a build system by now. An example of why not to bundle... [2] https://nmap.org/book/man-legal.html [3] https://packages.debian.org/sid/nmap Leo Famulari (2): licenses: Add the nmap license. gnu: Add nmap. gnu/packages/admin.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++++++- guix/licenses.scm | 6 ++++++ 2 files changed, 61 insertions(+), 1 deletion(-) -- 2.6.3 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/2] licenses: Add the nmap license. 2016-03-14 22:50 [PATCH 0/2] Add nmap Leo Famulari @ 2016-03-14 22:50 ` Leo Famulari 2016-03-15 8:21 ` Ricardo Wurmus 2016-03-14 22:50 ` [PATCH 2/2] gnu: Add nmap Leo Famulari ` (2 subsequent siblings) 3 siblings, 1 reply; 14+ messages in thread From: Leo Famulari @ 2016-03-14 22:50 UTC (permalink / raw) To: guix-devel * guix/licenses.scm (nmap): New variable. --- guix/licenses.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guix/licenses.scm b/guix/licenses.scm index 61e6793..5624f01 100644 --- a/guix/licenses.scm +++ b/guix/licenses.scm @@ -57,6 +57,7 @@ mpl1.0 mpl1.1 mpl2.0 ms-pl ncsa + nmap openldap2.8 openssl psfl public-domain qpl @@ -355,6 +356,11 @@ at URI, which may be a file:// URI pointing the package's tree." "http://directory.fsf.org/wiki/License:IllinoisNCSA" "https://www.gnu.org/licenses/license-list#NCSA")) +(define nmap + (license "Nmap license" + "https://svn.nmap.org/nmap/COPYING" + "https://fedoraproject.org/wiki/Licensing/Nmap")) + (define openssl (license "OpenSSL" "http://directory.fsf.org/wiki/License:OpenSSL" -- 2.6.3 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] licenses: Add the nmap license. 2016-03-14 22:50 ` [PATCH 1/2] licenses: Add the nmap license Leo Famulari @ 2016-03-15 8:21 ` Ricardo Wurmus 0 siblings, 0 replies; 14+ messages in thread From: Ricardo Wurmus @ 2016-03-15 8:21 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel Leo Famulari <leo@famulari.name> writes: > * guix/licenses.scm (nmap): New variable. > --- This looks good to me. ~~ Ricardo ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/2] gnu: Add nmap. 2016-03-14 22:50 [PATCH 0/2] Add nmap Leo Famulari 2016-03-14 22:50 ` [PATCH 1/2] licenses: Add the nmap license Leo Famulari @ 2016-03-14 22:50 ` Leo Famulari 2016-03-15 8:04 ` Taylan Ulrich Bayırlı/Kammer 2016-03-15 8:24 ` Ricardo Wurmus 2016-03-15 7:50 ` [PATCH 0/2] " Taylan Ulrich Bayırlı/Kammer 2016-03-27 21:36 ` Ludovic Courtès 3 siblings, 2 replies; 14+ messages in thread From: Leo Famulari @ 2016-03-14 22:50 UTC (permalink / raw) To: guix-devel * gnu/packages/admin.scm (nmap): New variable. --- gnu/packages/admin.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 69802e9..2415a8d 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -64,7 +64,9 @@ #:use-module (gnu packages xorg) #:use-module (gnu packages python) #:use-module (gnu packages man) - #:use-module (gnu packages autotools)) + #:use-module (gnu packages autotools) + #:use-module (gnu packages pcre) + #:use-module (gnu packages lua)) (define-public dmd ;; Deprecated. Kept around "just in case." @@ -1497,3 +1499,55 @@ for writing audit records to the disk. Viewing the logs is done with the @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is done with the @code{auditctl} utility.") (license license:gpl2+))) + +(define-public nmap + (package + (name "nmap") + (version "7.01") + (source (origin + (method url-fetch) + (uri (string-append "https://nmap.org/dist/nmap-" + version ".tar.bz2")) + (sha256 + (base32 + "01bpc820fmjl1vd08a3j9fpa84psaa7c3cxc8wpzabms8ckcs7yg")) + (modules '((guix build utils))) + (snippet + '(map delete-file-recursively + ;; Remove bundled lua, pcap, and pcre libraries. + ;; FIXME: Removed bundled liblinear once packaged. + '("liblua" + "libpcap" + "libpcre" + ;; Remove pre-compiled binaries. + "mswin32"))))) + (build-system gnu-build-system) + ;; TODO: Build "zenmap" GUI interface in "gui" output. + (arguments + `(#:configure-flags + (list (string-append "--prefix=" (assoc-ref %outputs "out")) + "--without-ncat" + "--without-nmap-update" + "--without-zenmap"))) + (inputs + `(;("liblinear" ,liblinear) + ("libpcap" ,libpcap) + ("lua" ,lua) + ("openssl" ,openssl) + ("pcre" ,pcre) + ;; For 'ndiff' + ("python-2" ,python-2))) + (synopsis "Network discovery and auditing tool") + (description "Nmap is a network discovery and auditing tool. It provides +several features for probing computer networks, including host discovery, +service, and operating system detection. These features are extensible by +scripts that provide more advanced service detection, vulnerability detection, +and other features. Nmap is also capable of adapting to network conditions +including latency and congestion during a scan.") + (home-page "https://nmap.org") + ;; The nmap license is based on the GPL 2.0, with several exceptions and + ;; modifications. It is incompatible with the GPL 2.0. + ;; Nmap's source tarball bundles the source code of many of its + ;; dependencies. This package uses nmap's modified version of libdnet and + ;; liblinear, which both use a 3-clause BSD license. + (license (list license:nmap license:bsd-3)))) -- 2.6.3 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] gnu: Add nmap. 2016-03-14 22:50 ` [PATCH 2/2] gnu: Add nmap Leo Famulari @ 2016-03-15 8:04 ` Taylan Ulrich Bayırlı/Kammer 2016-03-15 8:29 ` Leo Famulari 2016-03-15 8:24 ` Ricardo Wurmus 1 sibling, 1 reply; 14+ messages in thread From: Taylan Ulrich Bayırlı/Kammer @ 2016-03-15 8:04 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 3761 bytes --] Leo Famulari <leo@famulari.name> writes: > * gnu/packages/admin.scm (nmap): New variable. > --- > gnu/packages/admin.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 55 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm > index 69802e9..2415a8d 100644 > --- a/gnu/packages/admin.scm > +++ b/gnu/packages/admin.scm > @@ -64,7 +64,9 @@ > #:use-module (gnu packages xorg) > #:use-module (gnu packages python) > #:use-module (gnu packages man) > - #:use-module (gnu packages autotools)) > + #:use-module (gnu packages autotools) > + #:use-module (gnu packages pcre) > + #:use-module (gnu packages lua)) > > (define-public dmd > ;; Deprecated. Kept around "just in case." > @@ -1497,3 +1499,55 @@ for writing audit records to the disk. Viewing the logs is done with the > @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is > done with the @code{auditctl} utility.") > (license license:gpl2+))) > + > +(define-public nmap > + (package > + (name "nmap") > + (version "7.01") > + (source (origin > + (method url-fetch) > + (uri (string-append "https://nmap.org/dist/nmap-" > + version ".tar.bz2")) > + (sha256 > + (base32 > + "01bpc820fmjl1vd08a3j9fpa84psaa7c3cxc8wpzabms8ckcs7yg")) > + (modules '((guix build utils))) > + (snippet > + '(map delete-file-recursively > + ;; Remove bundled lua, pcap, and pcre libraries. > + ;; FIXME: Removed bundled liblinear once packaged. > + '("liblua" > + "libpcap" > + "libpcre" > + ;; Remove pre-compiled binaries. > + "mswin32"))))) > + (build-system gnu-build-system) > + ;; TODO: Build "zenmap" GUI interface in "gui" output. > + (arguments > + `(#:configure-flags > + (list (string-append "--prefix=" (assoc-ref %outputs "out")) > + "--without-ncat" > + "--without-nmap-update" > + "--without-zenmap"))) I think ncat is useful. Does it lead to problems to enable it? My approach was to install nmap, nse, ncat, and nping to the "out" output, and ndiff and zenmap to their own output. I attached my half-working patch below. (I wish I had contributed this with some parts commented out; at least the nmap/ncat part works fine I believe.) > + (inputs > + `(;("liblinear" ,liblinear) > + ("libpcap" ,libpcap) > + ("lua" ,lua) > + ("openssl" ,openssl) > + ("pcre" ,pcre) > + ;; For 'ndiff' > + ("python-2" ,python-2))) > + (synopsis "Network discovery and auditing tool") > + (description "Nmap is a network discovery and auditing tool. It provides > +several features for probing computer networks, including host discovery, > +service, and operating system detection. These features are extensible by > +scripts that provide more advanced service detection, vulnerability detection, > +and other features. Nmap is also capable of adapting to network conditions > +including latency and congestion during a scan.") > + (home-page "https://nmap.org") > + ;; The nmap license is based on the GPL 2.0, with several exceptions and > + ;; modifications. It is incompatible with the GPL 2.0. > + ;; Nmap's source tarball bundles the source code of many of its > + ;; dependencies. This package uses nmap's modified version of libdnet and > + ;; liblinear, which both use a 3-clause BSD license. > + (license (list license:nmap license:bsd-3)))) Here's my old incomplete patch, maybe it can help: [-- Attachment #2: 0001-gnu-Add-nmap.patch --] [-- Type: text/x-diff, Size: 5709 bytes --] From 4ce38aec270598df86ba0691559659044566a616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= <taylanbayirli@gmail.com> Date: Thu, 19 Nov 2015 13:52:30 +0100 Subject: [PATCH] gnu: Add nmap. * gnu/packages/nmap.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. --- gnu-system.am | 1 + gnu/packages/nmap.scm | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 gnu/packages/nmap.scm diff --git a/gnu-system.am b/gnu-system.am index 634093a..8adbb65 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -239,6 +239,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/nettle.scm \ gnu/packages/networking.scm \ gnu/packages/ninja.scm \ + gnu/packages/nmap.scm \ gnu/packages/node.scm \ gnu/packages/noweb.scm \ gnu/packages/ntp.scm \ diff --git a/gnu/packages/nmap.scm b/gnu/packages/nmap.scm new file mode 100644 index 0000000..23cba5b --- /dev/null +++ b/gnu/packages/nmap.scm @@ -0,0 +1,103 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages nmap) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system glib-or-gtk) + #:use-module ((guix licenses) #:prefix license:) + #:use-module ((gnu packages admin) #:select (libpcap)) + #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) + #:use-module (gnu packages lua) + #:use-module (gnu packages pcre) + #:use-module (gnu packages python) + #:use-module (gnu packages tls)) + +(define-public nmap + (package + (name "nmap") + (version "7.01") + (source (origin + (method url-fetch) + (uri (string-append "http://nmap.org/dist/nmap-" version + ".tar.bz2")) + (sha256 + (base32 + "01bpc820fmjl1vd08a3j9fpa84psaa7c3cxc8wpzabms8ckcs7yg")))) + (build-system glib-or-gtk-build-system) + (inputs + `(("openssl" ,openssl) + ("libpcap" ,libpcap) + ("pcre" ,pcre) + ("lua" ,lua) + ("python" ,python-2) + ("pygtk" ,python2-pygtk) + ("pygobject" ,python2-pygobject-2) + ("pycairo" ,python2-pycairo) + ;; XXX Add liblinear here once it's packaged. (Nmap uses its + ;; own version when it can't find it.) + )) + (outputs '("out" "ndiff" "zenmap")) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (define (make out . args) + (unless (zero? (apply system* "make" + (string-append "prefix=" out) + args)) + (error "make failed"))) + (define (python-path dir) + (string-append dir "/lib/python2.7/site-packages")) + (let ((out (assoc-ref outputs "out")) + (ndiff (assoc-ref outputs "ndiff")) + (zenmap (assoc-ref outputs "zenmap")) + (pygtk (assoc-ref inputs "pygtk")) + (pygobject (assoc-ref inputs "pygobject")) + (pycairo (assoc-ref inputs "pycairo"))) + (for-each mkdir-p (list out ndiff zenmap)) + (make out + "install-nmap" "install-nse" "install-ncat" "install-nping") + (make ndiff "install-ndiff") + (make zenmap "install-zenmap") + (wrap-program (string-append ndiff "/bin/ndiff") + `("PYTHONPATH" prefix + (,(python-path ndiff)))) + (wrap-program (string-append zenmap "/bin/zenmap") + `("PYTHONPATH" prefix + (,(python-path zenmap) + ,(string-append (python-path pygtk) "/gtk-2.0") + ,(python-path pygobject) + ,(python-path pycairo)))) + )))) + ;; Nmap can't cope with out-of-source building. + #:out-of-source? #f + ;; Tests require network access, which build processes don't have. + #:tests? #f)) + (home-page "http://nmap.org/") + (synopsis "Network discovery and security auditing tool") + (description + "Nmap (\"Network Mapper\") is a network discovery and security auditing +tool. It is also useful for tasks such as network inventory, managing service +upgrade schedules, and monitoring host or service uptime. It also provides an +advanced netcat implementation (ncat), a utility for comparing scan +results (ndiff), a packet generation and response analysis tool (nping), and +the Zenmap GUI and results viewer.") + (license license:gpl2))) -- 2.6.3 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] gnu: Add nmap. 2016-03-15 8:04 ` Taylan Ulrich Bayırlı/Kammer @ 2016-03-15 8:29 ` Leo Famulari 2016-03-15 8:47 ` Taylan Ulrich Bayırlı/Kammer 0 siblings, 1 reply; 14+ messages in thread From: Leo Famulari @ 2016-03-15 8:29 UTC (permalink / raw) To: Taylan Ulrich Bayırlı/Kammer; +Cc: guix-devel On Tue, Mar 15, 2016 at 09:04:54AM +0100, Taylan Ulrich Bayırlı/Kammer wrote: > Leo Famulari <leo@famulari.name> writes: > > + `(#:configure-flags > > + (list (string-append "--prefix=" (assoc-ref %outputs "out")) > > + "--without-ncat" > > + "--without-nmap-update" > > + "--without-zenmap"))) > > I think ncat is useful. Does it lead to problems to enable it? No, I just figured that the netcat package was sufficient. I'll build ncat in a subsequent version of this patch if desired. > > My approach was to install nmap, nse, ncat, and nping to the "out" > output, and ndiff and zenmap to their own output. I attached my > half-working patch below. (I wish I had contributed this with some > parts commented out; at least the nmap/ncat part works fine I believe.) Thanks, I'll incorporate your patch. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] gnu: Add nmap. 2016-03-15 8:29 ` Leo Famulari @ 2016-03-15 8:47 ` Taylan Ulrich Bayırlı/Kammer 0 siblings, 0 replies; 14+ messages in thread From: Taylan Ulrich Bayırlı/Kammer @ 2016-03-15 8:47 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel Leo Famulari <leo@famulari.name> writes: > On Tue, Mar 15, 2016 at 09:04:54AM +0100, Taylan Ulrich Bayırlı/Kammer wrote: >> Leo Famulari <leo@famulari.name> writes: >> > + `(#:configure-flags >> > + (list (string-append "--prefix=" (assoc-ref %outputs "out")) >> > + "--without-ncat" >> > + "--without-nmap-update" >> > + "--without-zenmap"))) >> >> I think ncat is useful. Does it lead to problems to enable it? > > No, I just figured that the netcat package was sufficient. I'll build > ncat in a subsequent version of this patch if desired. I like to just install nmap and use its ncat instead of having to install a separate netcat package. But I also figure nmap's ncat has features which other netcat implementations might not have. AFAIK other netcat packages usually install the binary 'nc', which doesn't conflict with nmap's ncat binary, so I'd just build it along. It's what other distros do as well I believe. (At least Debian; I adopted the nmap, ndiff, zenmap split from them.) Taylan ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] gnu: Add nmap. 2016-03-14 22:50 ` [PATCH 2/2] gnu: Add nmap Leo Famulari 2016-03-15 8:04 ` Taylan Ulrich Bayırlı/Kammer @ 2016-03-15 8:24 ` Ricardo Wurmus 1 sibling, 0 replies; 14+ messages in thread From: Ricardo Wurmus @ 2016-03-15 8:24 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel Leo Famulari <leo@famulari.name> writes: > * gnu/packages/admin.scm (nmap): New variable. > --- [...] > + (arguments > + `(#:configure-flags > + (list (string-append "--prefix=" (assoc-ref %outputs "out")) > + "--without-ncat" > + "--without-nmap-update" > + "--without-zenmap"))) Could you please explain why these flags are needed? > + (inputs > + `(;("liblinear" ,liblinear) I would just leave this off. You already mention liblinear in a comment above. > + ;; The nmap license is based on the GPL 2.0, with several exceptions and > + ;; modifications. It is incompatible with the GPL 2.0. > + ;; Nmap's source tarball bundles the source code of many of its > + ;; dependencies. This package uses nmap's modified version of libdnet and > + ;; liblinear, which both use a 3-clause BSD license. > + (license (list license:nmap license:bsd-3)))) We don’t usually explain licenses and compatibility in comments, so I think it is not necessary to say that the nmap license is based on the GPL but incompatible. ~~ Ricardo ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] Add nmap 2016-03-14 22:50 [PATCH 0/2] Add nmap Leo Famulari 2016-03-14 22:50 ` [PATCH 1/2] licenses: Add the nmap license Leo Famulari 2016-03-14 22:50 ` [PATCH 2/2] gnu: Add nmap Leo Famulari @ 2016-03-15 7:50 ` Taylan Ulrich Bayırlı/Kammer 2016-03-15 7:56 ` Leo Famulari 2016-03-27 21:36 ` Ludovic Courtès 3 siblings, 1 reply; 14+ messages in thread From: Taylan Ulrich Bayırlı/Kammer @ 2016-03-15 7:50 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel Leo Famulari <leo@famulari.name> writes: > This package provides nmap [0]. Ah, thanks for doing this! I've had an nmap branch for ages that I couldn't get to work because I couldn't get the Python module loading to work right. Another Debian package on my system to replace with a Guix package. :-) Taylan ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] Add nmap 2016-03-15 7:50 ` [PATCH 0/2] " Taylan Ulrich Bayırlı/Kammer @ 2016-03-15 7:56 ` Leo Famulari 2016-03-15 8:07 ` Taylan Ulrich Bayırlı/Kammer 0 siblings, 1 reply; 14+ messages in thread From: Leo Famulari @ 2016-03-15 7:56 UTC (permalink / raw) To: Taylan Ulrich Bayırlı/Kammer; +Cc: guix-devel On Tue, Mar 15, 2016 at 08:50:52AM +0100, Taylan Ulrich Bayırlı/Kammer wrote: > Leo Famulari <leo@famulari.name> writes: > > > This package provides nmap [0]. > > Ah, thanks for doing this! I've had an nmap branch for ages that I > couldn't get to work because I couldn't get the Python module loading to > work right. I've had this branch for a while too. I don't remember any issues with Python — does everything work for you with this package? ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] Add nmap 2016-03-15 7:56 ` Leo Famulari @ 2016-03-15 8:07 ` Taylan Ulrich Bayırlı/Kammer 2016-03-15 8:25 ` Leo Famulari 0 siblings, 1 reply; 14+ messages in thread From: Taylan Ulrich Bayırlı/Kammer @ 2016-03-15 8:07 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel Leo Famulari <leo@famulari.name> writes: > On Tue, Mar 15, 2016 at 08:50:52AM +0100, Taylan Ulrich Bayırlı/Kammer wrote: >> Leo Famulari <leo@famulari.name> writes: >> >> > This package provides nmap [0]. >> >> Ah, thanks for doing this! I've had an nmap branch for ages that I >> couldn't get to work because I couldn't get the Python module loading to >> work right. > > I've had this branch for a while too. I don't remember any issues with > Python — does everything work for you with this package? My issues were with zenmap and I think ndiff. Taylan ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] Add nmap 2016-03-15 8:07 ` Taylan Ulrich Bayırlı/Kammer @ 2016-03-15 8:25 ` Leo Famulari 0 siblings, 0 replies; 14+ messages in thread From: Leo Famulari @ 2016-03-15 8:25 UTC (permalink / raw) To: Taylan Ulrich Bayırlı/Kammer; +Cc: guix-devel On Tue, Mar 15, 2016 at 09:07:03AM +0100, Taylan Ulrich Bayırlı/Kammer wrote: > Leo Famulari <leo@famulari.name> writes: > > > On Tue, Mar 15, 2016 at 08:50:52AM +0100, Taylan Ulrich Bayırlı/Kammer wrote: > >> Leo Famulari <leo@famulari.name> writes: > >> > >> > This package provides nmap [0]. > >> > >> Ah, thanks for doing this! I've had an nmap branch for ages that I > >> couldn't get to work because I couldn't get the Python module loading to > >> work right. > > > > I've had this branch for a while too. I don't remember any issues with > > Python — does everything work for you with this package? > > My issues were with zenmap and I think ndiff. Turns out this package some problems here too, at least with ndiff (I punted on zenmap for now). Here's what happens when I try to use ndiff: --- $ ndiff -v scanme-1.xml scanme-2.xml Could not import the ndiff module: 'No module named ndiff'. I checked in these directories: /gnu/store/rg21w23czkv880haxsx5yps2a8672d6f-nmap-7.01/bin /gnu/store/qpzhyhjkj81qshbq2al9sjx4wxamq0zs-python-2.7.10/lib/python27.zip /gnu/store/qpzhyhjkj81qshbq2al9sjx4wxamq0zs-python-2.7.10/lib/python2.7 /gnu/store/qpzhyhjkj81qshbq2al9sjx4wxamq0zs-python-2.7.10/lib/python2.7/plat-linux2 /gnu/store/qpzhyhjkj81qshbq2al9sjx4wxamq0zs-python-2.7.10/lib/python2.7/lib-tk /gnu/store/qpzhyhjkj81qshbq2al9sjx4wxamq0zs-python-2.7.10/lib/python2.7/lib-old /gnu/store/qpzhyhjkj81qshbq2al9sjx4wxamq0zs-python-2.7.10/lib/python2.7/lib-dynload /home/leo/.local/lib/python2.7/site-packages /gnu/store/qpzhyhjkj81qshbq2al9sjx4wxamq0zs-python-2.7.10/lib/python2.7/site-packages If you installed Ndiff in another directory, you may have to add the modules directory to the PYTHONPATH environment variable. --- I think I need to set the PYTHONPATH to point to the libraries in nmap's store directory. I think it would be easily accomplished if I could apply some phases of the python-build-system. Is that possible? Or maybe it would be enough to just make a wrapper that points to /gnu/store/...-nmap/lib/python2.7 or something like that. I wonder if the PYTHONPATH needs anything else? I bet if I solved this it would be easy to also build zenmap. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] Add nmap 2016-03-14 22:50 [PATCH 0/2] Add nmap Leo Famulari ` (2 preceding siblings ...) 2016-03-15 7:50 ` [PATCH 0/2] " Taylan Ulrich Bayırlı/Kammer @ 2016-03-27 21:36 ` Ludovic Courtès 2016-03-27 21:44 ` Leo Famulari 3 siblings, 1 reply; 14+ messages in thread From: Ludovic Courtès @ 2016-03-27 21:36 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel Hi! Leo Famulari <leo@famulari.name> skribis: > This package provides nmap [0]. Did it fall through the cracks? :-) > The nmap source distribution comes with a bunch of its dependencies > bundled. This package deletes most of them and replaces them with > external libraries. > > This package currently uses the bundled copies of liblinear and libdnet. > Liblinear should be packaged separately [1], but I think that the > bundled libdnet should be used, because apparently this bundled version > is modified [2] enough that Debian has chosen to use it [3]. Does liblinear have users outside of nmap? In practice, if it has no life outside of nmap and is developed by the same people, it’s fine to keep it inside nmap (it’s not really bundling, or at least not the form that is problematic.) Thanks, Ludo’. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/2] Add nmap 2016-03-27 21:36 ` Ludovic Courtès @ 2016-03-27 21:44 ` Leo Famulari 0 siblings, 0 replies; 14+ messages in thread From: Leo Famulari @ 2016-03-27 21:44 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel On Sun, Mar 27, 2016 at 11:36:23PM +0200, Ludovic Courtès wrote: > Hi! > > Leo Famulari <leo@famulari.name> skribis: > > > This package provides nmap [0]. > > Did it fall through the cracks? :-) I actually revisited Taylan's version last night. The only problem with his patch is that the nmap GUI 'zenmap' doesn't run, presumably due to some search path issues. I made a little progress but it still doesn't work. I am going to submit a revision of his patch that leaves 'zenmap' for later. > > > The nmap source distribution comes with a bunch of its dependencies > > bundled. This package deletes most of them and replaces them with > > external libraries. > > > > This package currently uses the bundled copies of liblinear and libdnet. > > Liblinear should be packaged separately [1], but I think that the > > bundled libdnet should be used, because apparently this bundled version > > is modified [2] enough that Debian has chosen to use it [3]. > > Does liblinear have users outside of nmap? In practice, if it has no > life outside of nmap and is developed by the same people, it’s fine to > keep it inside nmap (it’s not really bundling, or at least not the form > that is problematic.) I don't know how often it's used. It seems to me that if it was used by many projects, it would have a proper build system by now. I spent a while trying to build nmap with an external copy of the library, but so far without success. ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2016-03-27 21:44 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-03-14 22:50 [PATCH 0/2] Add nmap Leo Famulari 2016-03-14 22:50 ` [PATCH 1/2] licenses: Add the nmap license Leo Famulari 2016-03-15 8:21 ` Ricardo Wurmus 2016-03-14 22:50 ` [PATCH 2/2] gnu: Add nmap Leo Famulari 2016-03-15 8:04 ` Taylan Ulrich Bayırlı/Kammer 2016-03-15 8:29 ` Leo Famulari 2016-03-15 8:47 ` Taylan Ulrich Bayırlı/Kammer 2016-03-15 8:24 ` Ricardo Wurmus 2016-03-15 7:50 ` [PATCH 0/2] " Taylan Ulrich Bayırlı/Kammer 2016-03-15 7:56 ` Leo Famulari 2016-03-15 8:07 ` Taylan Ulrich Bayırlı/Kammer 2016-03-15 8:25 ` Leo Famulari 2016-03-27 21:36 ` Ludovic Courtès 2016-03-27 21:44 ` Leo Famulari
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).