Patchwork [3/3] gnu: nmap: Update to 7.31.

login
register
mail settings
Submitter Marius Bakke
Date Oct. 31, 2016, 1:29 p.m.
Message ID <20161031132944.2353-4-mbakke@fastmail.com>
Download mbox | patch
Permalink /patch/17037/
State New
Headers show

Comments

Marius Bakke - Oct. 31, 2016, 1:29 p.m.
* gnu/packages/admin.scm (nmap): Update to 7.31.
[arguments]: Add phase 'patch-Makefile' to prevent lua from being built.
---
 gnu/packages/admin.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Leo Famulari - Oct. 31, 2016, 5:53 p.m.
On Mon, Oct 31, 2016 at 01:29:44PM +0000, Marius Bakke wrote:
> * gnu/packages/admin.scm (nmap): Update to 7.31.
> [arguments]: Add phase 'patch-Makefile' to prevent lua from being built.
> ---
>  gnu/packages/admin.scm | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index d9b08ef..35156f6 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -1570,14 +1570,14 @@ done with the @code{auditctl} utility.")
>  (define-public nmap
>    (package
>      (name "nmap")
> -    (version "7.12")
> +    (version "7.31")
>      (source (origin
>                (method url-fetch)
>                (uri (string-append "https://nmap.org/dist/nmap-" version
>                                    ".tar.bz2"))
>                (sha256
>                 (base32
> -                "014vagh9ak10hidwzp9s6g30y5h5fhsh8wykcnc1hnn9hwm0ipv3"))
> +                "0hiqb28950kn4bjsmw0ksfyss7j2qdmgrj3xsjf7073pq01lx7yb"))

Okay!

>                (modules '((guix build utils)))
>                (snippet
>                 '(map delete-file-recursively
> @@ -1603,6 +1603,12 @@ done with the @code{auditctl} utility.")
>       '(#:configure-flags '("--without-zenmap")
>         #:phases
>         (modify-phases %standard-phases
> +         (add-after 'configure 'patch-Makefile
> +           (lambda _
> +             (substitute* "Makefile"
> +               ;; Do not attempt to build lua.
> +               (("build-dnet build-lua") "build-dnet"))
> +             #t))

So, in this new release it tries to build the bundled Lua and fails
because we've deleted it?
Marius Bakke - Nov. 1, 2016, midnight
Leo Famulari <leo@famulari.name> writes:

> On Mon, Oct 31, 2016 at 01:29:44PM +0000, Marius Bakke wrote:
>> * gnu/packages/admin.scm (nmap): Update to 7.31.
>> [arguments]: Add phase 'patch-Makefile' to prevent lua from being built.
>> ---
>>  gnu/packages/admin.scm | 10 ++++++++--
>>  1 file changed, 8 insertions(+), 2 deletions(-)
>> 
>> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
>> index d9b08ef..35156f6 100644
>> --- a/gnu/packages/admin.scm
>> +++ b/gnu/packages/admin.scm
>> @@ -1570,14 +1570,14 @@ done with the @code{auditctl} utility.")
>>  (define-public nmap
>>    (package
>>      (name "nmap")
>> -    (version "7.12")
>> +    (version "7.31")
>>      (source (origin
>>                (method url-fetch)
>>                (uri (string-append "https://nmap.org/dist/nmap-" version
>>                                    ".tar.bz2"))
>>                (sha256
>>                 (base32
>> -                "014vagh9ak10hidwzp9s6g30y5h5fhsh8wykcnc1hnn9hwm0ipv3"))
>> +                "0hiqb28950kn4bjsmw0ksfyss7j2qdmgrj3xsjf7073pq01lx7yb"))
>
> Okay!
>
>>                (modules '((guix build utils)))
>>                (snippet
>>                 '(map delete-file-recursively
>> @@ -1603,6 +1603,12 @@ done with the @code{auditctl} utility.")
>>       '(#:configure-flags '("--without-zenmap")
>>         #:phases
>>         (modify-phases %standard-phases
>> +         (add-after 'configure 'patch-Makefile
>> +           (lambda _
>> +             (substitute* "Makefile"
>> +               ;; Do not attempt to build lua.
>> +               (("build-dnet build-lua") "build-dnet"))
>> +             #t))
>
> So, in this new release it tries to build the bundled Lua and fails
> because we've deleted it?

Correct, "build-lua" is now part of the default make target. Don't know
how it worked before, there have been a few changes to the Makefile:

https://github.com/nmap/nmap/commits/master/Makefile.in

Reading through the commits, I will double check that the NSE stuff
still works with our Lua ;)

Patch

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index d9b08ef..35156f6 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1570,14 +1570,14 @@  done with the @code{auditctl} utility.")
 (define-public nmap
   (package
     (name "nmap")
-    (version "7.12")
+    (version "7.31")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://nmap.org/dist/nmap-" version
                                   ".tar.bz2"))
               (sha256
                (base32
-                "014vagh9ak10hidwzp9s6g30y5h5fhsh8wykcnc1hnn9hwm0ipv3"))
+                "0hiqb28950kn4bjsmw0ksfyss7j2qdmgrj3xsjf7073pq01lx7yb"))
               (modules '((guix build utils)))
               (snippet
                '(map delete-file-recursively
@@ -1603,6 +1603,12 @@  done with the @code{auditctl} utility.")
      '(#:configure-flags '("--without-zenmap")
        #:phases
        (modify-phases %standard-phases
+         (add-after 'configure 'patch-Makefile
+           (lambda _
+             (substitute* "Makefile"
+               ;; Do not attempt to build lua.
+               (("build-dnet build-lua") "build-dnet"))
+             #t))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              (define (make out . args)