all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: bind-utils: Build and install “nsupdate”.
@ 2016-01-13 15:11 Ricardo Wurmus
  2016-01-14  0:46 ` Mathieu Lirzin
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2016-01-13 15:11 UTC (permalink / raw)
  To: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

Hi Guix,

this patch is not as bad as it looks, even though most of the lines are
changed.  I noticed that “nsupdate” is not build as part of bind-utils
and replaced the manual and repetitive “build” and “install” phases with
something that can be controlled with the let-bound values “bins” and
“libs” holding the names of executables and libraries, respectively.

What do you think?

(“nsupdate” is checked for by the build system of some SELinux
libraries, which are needed for SSSD.)

~~ Ricardo



[-- Attachment #2: 0001-gnu-bind-utils-Build-and-install-nsupdate.patch --]
[-- Type: text/x-patch, Size: 5492 bytes --]

From ba328617777728c3534be6796b6b32a9a90954b6 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 13 Jan 2016 16:06:36 +0100
Subject: [PATCH] gnu: bind-utils: Build and install "nsupdate".

* gnu/packages/dns.scm (bind-utils)[arguments]: Generalize "build" and
  "install" phases.
---
 gnu/packages/dns.scm | 105 ++++++++++++++++++++++++++++-----------------------
 1 file changed, 58 insertions(+), 47 deletions(-)

diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 8357dad..0a42722 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -61,51 +62,61 @@ and BOOTP/TFTP for network booting of diskless machines.")
     (license (list license:gpl2 license:gpl3))))
 
 (define-public bind-utils
-  (package
-    (name "bind-utils")
-    (version "9.10.3-P2")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://ftp.isc.org/isc/bind9/" version
-                                  "/bind-" version ".tar.gz"))
-              (sha256
-               (base32
-                "1kbfzml37sx4r2xi4gq48ji8w5kckd1f6gdn6pk6njqdmh8ijv2a"))))
-    (build-system gnu-build-system)
-    (inputs
-     ;; it would be nice to add GeoIP and gssapi once there is package
-     `(("libcap" ,libcap)
-       ("libxml2" ,libxml2)
-       ("mysql" ,mysql)
-       ("openssl" ,openssl)
-       ("perl" ,perl)
-       ("p11-kit" ,p11-kit)))
-    (arguments
-     `(#:tests? #f ; no test phase implemented
-       #:configure-flags
-       (list (string-append "--with-openssl="
-                            (assoc-ref %build-inputs "openssl"))
-             (string-append "--with-dlz-mysql="
-                            (assoc-ref %build-inputs "mysql"))
-             (string-append "--with-pkcs11="
-                            (assoc-ref %build-inputs "p11-kit")))
-       #:phases
-       (alist-replace
-        'build
-        (lambda _
-          (and (zero? (system* "make" "-C" "lib/dns"))
-               (zero? (system* "make" "-C" "lib/isc"))
-               (zero? (system* "make" "-C" "lib/bind9"))
-               (zero? (system* "make" "-C" "lib/isccfg"))
-               (zero? (system* "make" "-C" "lib/lwres"))
-               (zero? (system* "make" "-C" "bin/dig"))))
-        (alist-replace
-         'install
-         (lambda _ (zero? (system* "make" "-C" "bin/dig" "install")))
-         %standard-phases))))
-    (home-page "https://www.isc.org/downloads/bind/")
-    (synopsis "Tools for querying nameservers")
-    (description
-     "These tools, included with ISC BIND, are useful for analysis of DNS
+  (let ((libs '("dns" "isc" "bind9" "isccfg" "lwres"))
+        (bins '("dig" "nsupdate")))
+    (package
+      (name "bind-utils")
+      (version "9.10.3-P2")
+      (source (origin
+                (method url-fetch)
+                (uri (string-append "http://ftp.isc.org/isc/bind9/" version
+                                    "/bind-" version ".tar.gz"))
+                (sha256
+                 (base32
+                  "1kbfzml37sx4r2xi4gq48ji8w5kckd1f6gdn6pk6njqdmh8ijv2a"))))
+      (build-system gnu-build-system)
+      (inputs
+       ;; it would be nice to add GeoIP and gssapi once there is package
+       `(("libcap" ,libcap)
+         ("libxml2" ,libxml2)
+         ("mysql" ,mysql)
+         ("openssl" ,openssl)
+         ("perl" ,perl)
+         ("p11-kit" ,p11-kit)))
+      (arguments
+       `(#:tests? #f ; no test phase implemented
+         #:configure-flags
+         (list (string-append "--with-openssl="
+                              (assoc-ref %build-inputs "openssl"))
+               (string-append "--with-dlz-mysql="
+                              (assoc-ref %build-inputs "mysql"))
+               (string-append "--with-pkcs11="
+                              (assoc-ref %build-inputs "p11-kit")))
+         #:modules ((srfi srfi-1)
+                    (srfi srfi-26)
+                    ,@%gnu-build-system-modules)
+         #:phases
+         (modify-phases %standard-phases
+           (replace 'build
+             (lambda _
+               (fold (lambda (dir pass)
+                       (and pass (zero? (system* "make" "-C" dir))))
+                     #t
+                     (append
+                      (map (cut string-append "lib/" <>)
+                           (list ,@libs))
+                      (map (cut string-append "bin/" <>)
+                           (list ,@bins))))))
+           (replace 'install
+             (lambda _
+               (fold (lambda (dir pass)
+                       (and pass (zero? (system* "make" "-C" dir "install"))))
+                     #t
+                     (map (cut string-append "bin/" <>)
+                          (list ,@bins))))))))
+      (home-page "https://www.isc.org/downloads/bind/")
+      (synopsis "Tools for querying nameservers")
+      (description
+       "These tools, included with ISC BIND, are useful for analysis of DNS
 issues or verification of configuration.")
-    (license (list license:isc))))
+      (license (list license:isc)))))
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: bind-utils: Build and install “nsupdate”.
  2016-01-13 15:11 [PATCH] gnu: bind-utils: Build and install “nsupdate” Ricardo Wurmus
@ 2016-01-14  0:46 ` Mathieu Lirzin
  2016-01-14  8:59   ` Alex Kost
  0 siblings, 1 reply; 8+ messages in thread
From: Mathieu Lirzin @ 2016-01-14  0:46 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Guix-devel

Hi,

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:

>From ba328617777728c3534be6796b6b32a9a90954b6 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Wed, 13 Jan 2016 16:06:36 +0100
> Subject: [PATCH] gnu: bind-utils: Build and install "nsupdate".
>
> * gnu/packages/dns.scm (bind-utils)[arguments]: Generalize "build" and
>   "install" phases.
> ---
>  gnu/packages/dns.scm | 105 ++++++++++++++++++++++++++++-----------------------
>  1 file changed, 58 insertions(+), 47 deletions(-)
>
> diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
> index 8357dad..0a42722 100644
> --- a/gnu/packages/dns.scm
> +++ b/gnu/packages/dns.scm
[...]
> +      (arguments
> +       `(#:tests? #f ; no test phase implemented
> +         #:configure-flags
> +         (list (string-append "--with-openssl="
> +                              (assoc-ref %build-inputs "openssl"))
> +               (string-append "--with-dlz-mysql="
> +                              (assoc-ref %build-inputs "mysql"))
> +               (string-append "--with-pkcs11="
> +                              (assoc-ref %build-inputs "p11-kit")))

What about:

       #:configure-flags
       (map (lambda (opt val)
              (string-append opt (assoc-ref %build-inputs val)))
            '("--with-openssl=" "--with-dlz-mysql=" "--with-pkcs11=")
            '("openssl" "mysql" "p11-kit"))

> +         #:modules ((srfi srfi-1)
> +                    (srfi srfi-26)
> +                    ,@%gnu-build-system-modules)
> +         #:phases
> +         (modify-phases %standard-phases
> +           (replace 'build
> +             (lambda _
> +               (fold (lambda (dir pass)
> +                       (and pass (zero? (system* "make" "-C" dir))))
> +                     #t
> +                     (append
> +                      (map (cut string-append "lib/" <>)
> +                           (list ,@libs))
> +                      (map (cut string-append "bin/" <>)
> +                           (list ,@bins))))))
> +           (replace 'install
> +             (lambda _
> +               (fold (lambda (dir pass)
> +                       (and pass (zero? (system* "make" "-C" dir "install"))))
> +                     #t
> +                     (map (cut string-append "bin/" <>)
> +                          (list ,@bins))))))))

and this:

       (let ((libs '("dns" "isc" "bind9" "isccfg" "lwres"))
             (bins '("dig" "nsupdate")))
         (modify-phases %standard-phases
           (replace 'build
             (lambda _
               (every (lambda (dir)
                        (zero? (system* "make" "-C" dir)))
                      (append (map (cut string-append "lib/" <>) libs)
                              (map (cut string-append "bin/" <>) bins)))))
           (replace 'install
             (lambda _
               (every (lambda (dir)
                        (zero? (system* "make" "-C" dir "install")))
                      (map (cut string-append "bin/" <>) bins))))))))


Otherwise LGTM.

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: bind-utils: Build and install “nsupdate”.
  2016-01-14  0:46 ` Mathieu Lirzin
@ 2016-01-14  8:59   ` Alex Kost
  2016-01-14 11:53     ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Kost @ 2016-01-14  8:59 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: Guix-devel

Mathieu Lirzin (2016-01-14 03:46 +0300) wrote:

> Hi,
>
> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:
>
>>From ba328617777728c3534be6796b6b32a9a90954b6 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
>> Date: Wed, 13 Jan 2016 16:06:36 +0100
>> Subject: [PATCH] gnu: bind-utils: Build and install "nsupdate".
>>
>> * gnu/packages/dns.scm (bind-utils)[arguments]: Generalize "build" and
>>   "install" phases.
>> ---
>>  gnu/packages/dns.scm | 105 ++++++++++++++++++++++++++++-----------------------
>>  1 file changed, 58 insertions(+), 47 deletions(-)
>>
>> diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
>> index 8357dad..0a42722 100644
>> --- a/gnu/packages/dns.scm
>> +++ b/gnu/packages/dns.scm
> [...]
>> +      (arguments
>> +       `(#:tests? #f ; no test phase implemented
>> +         #:configure-flags
>> +         (list (string-append "--with-openssl="
>> +                              (assoc-ref %build-inputs "openssl"))
>> +               (string-append "--with-dlz-mysql="
>> +                              (assoc-ref %build-inputs "mysql"))
>> +               (string-append "--with-pkcs11="
>> +                              (assoc-ref %build-inputs "p11-kit")))
>
> What about:
>
>        #:configure-flags
>        (map (lambda (opt val)
>               (string-append opt (assoc-ref %build-inputs val)))
>             '("--with-openssl=" "--with-dlz-mysql=" "--with-pkcs11=")
>             '("openssl" "mysql" "p11-kit"))

As for me, I prefer the original variant as it looks more clear for me.
When I look at this (map ...), I need some time to understand what it
does.

>> +         #:modules ((srfi srfi-1)
>> +                    (srfi srfi-26)
>> +                    ,@%gnu-build-system-modules)
>> +         #:phases
>> +         (modify-phases %standard-phases
>> +           (replace 'build
>> +             (lambda _
>> +               (fold (lambda (dir pass)
>> +                       (and pass (zero? (system* "make" "-C" dir))))
>> +                     #t
>> +                     (append
>> +                      (map (cut string-append "lib/" <>)
>> +                           (list ,@libs))
>> +                      (map (cut string-append "bin/" <>)
>> +                           (list ,@bins))))))
>> +           (replace 'install
>> +             (lambda _
>> +               (fold (lambda (dir pass)
>> +                       (and pass (zero? (system* "make" "-C" dir "install"))))
>> +                     #t
>> +                     (map (cut string-append "bin/" <>)
>> +                          (list ,@bins))))))))
>
> and this:
>
>        (let ((libs '("dns" "isc" "bind9" "isccfg" "lwres"))
>              (bins '("dig" "nsupdate")))
>          (modify-phases %standard-phases
>            (replace 'build
>              (lambda _
>                (every (lambda (dir)
>                         (zero? (system* "make" "-C" dir)))
>                       (append (map (cut string-append "lib/" <>) libs)
>                               (map (cut string-append "bin/" <>) bins)))))
>            (replace 'install
>              (lambda _
>                (every (lambda (dir)
>                         (zero? (system* "make" "-C" dir "install")))
>                       (map (cut string-append "bin/" <>) bins))))))))
>

I also think 'every' is more suitable here.

-- 
Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: bind-utils: Build and install “nsupdate”.
  2016-01-14  8:59   ` Alex Kost
@ 2016-01-14 11:53     ` Ricardo Wurmus
  2016-01-14 23:46       ` Mathieu Lirzin
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2016-01-14 11:53 UTC (permalink / raw)
  To: Alex Kost; +Cc: Guix-devel


Alex Kost <alezost@gmail.com> writes:

> Mathieu Lirzin (2016-01-14 03:46 +0300) wrote:
>
>> Hi,
>>
>> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:
>>
>>>From ba328617777728c3534be6796b6b32a9a90954b6 Mon Sep 17 00:00:00 2001
>>> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
>>> Date: Wed, 13 Jan 2016 16:06:36 +0100
>>> Subject: [PATCH] gnu: bind-utils: Build and install "nsupdate".
>>>
>>> * gnu/packages/dns.scm (bind-utils)[arguments]: Generalize "build" and
>>>   "install" phases.
>>> ---
>>>  gnu/packages/dns.scm | 105 ++++++++++++++++++++++++++++-----------------------
>>>  1 file changed, 58 insertions(+), 47 deletions(-)
>>>
>>> diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
>>> index 8357dad..0a42722 100644
>>> --- a/gnu/packages/dns.scm
>>> +++ b/gnu/packages/dns.scm
>> [...]
>>> +      (arguments
>>> +       `(#:tests? #f ; no test phase implemented
>>> +         #:configure-flags
>>> +         (list (string-append "--with-openssl="
>>> +                              (assoc-ref %build-inputs "openssl"))
>>> +               (string-append "--with-dlz-mysql="
>>> +                              (assoc-ref %build-inputs "mysql"))
>>> +               (string-append "--with-pkcs11="
>>> +                              (assoc-ref %build-inputs "p11-kit")))
>>
>> What about:
>>
>>        #:configure-flags
>>        (map (lambda (opt val)
>>               (string-append opt (assoc-ref %build-inputs val)))
>>             '("--with-openssl=" "--with-dlz-mysql=" "--with-pkcs11=")
>>             '("openssl" "mysql" "p11-kit"))
>
> As for me, I prefer the original variant as it looks more clear for me.
> When I look at this (map ...), I need some time to understand what it
> does.

I didn’t change this.  I only adjusted the indentation.  I have a slight
preference for keeping it the way it is.

>>> +         #:modules ((srfi srfi-1)
>>> +                    (srfi srfi-26)
>>> +                    ,@%gnu-build-system-modules)
>>> +         #:phases
>>> +         (modify-phases %standard-phases
>>> +           (replace 'build
>>> +             (lambda _
>>> +               (fold (lambda (dir pass)
>>> +                       (and pass (zero? (system* "make" "-C" dir))))
>>> +                     #t
>>> +                     (append
>>> +                      (map (cut string-append "lib/" <>)
>>> +                           (list ,@libs))
>>> +                      (map (cut string-append "bin/" <>)
>>> +                           (list ,@bins))))))
>>> +           (replace 'install
>>> +             (lambda _
>>> +               (fold (lambda (dir pass)
>>> +                       (and pass (zero? (system* "make" "-C" dir "install"))))
>>> +                     #t
>>> +                     (map (cut string-append "bin/" <>)
>>> +                          (list ,@bins))))))))
>>
>> and this:
>>
>>        (let ((libs '("dns" "isc" "bind9" "isccfg" "lwres"))
>>              (bins '("dig" "nsupdate")))
>>          (modify-phases %standard-phases
>>            (replace 'build
>>              (lambda _
>>                (every (lambda (dir)
>>                         (zero? (system* "make" "-C" dir)))
>>                       (append (map (cut string-append "lib/" <>) libs)
>>                               (map (cut string-append "bin/" <>) bins)))))
>>            (replace 'install
>>              (lambda _
>>                (every (lambda (dir)
>>                         (zero? (system* "make" "-C" dir "install")))
>>                       (map (cut string-append "bin/" <>) bins))))))))
>>
>
> I also think 'every' is more suitable here.

I agree, this looks nicer.  Would you like to push this change?  There
isn’t much left of my original patch ;)

~~ Ricardo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: bind-utils: Build and install “nsupdate”.
  2016-01-14 11:53     ` Ricardo Wurmus
@ 2016-01-14 23:46       ` Mathieu Lirzin
  2016-01-21 10:52         ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Mathieu Lirzin @ 2016-01-14 23:46 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Guix-devel, Alex Kost

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:

> I agree, this looks nicer.  Would you like to push this change?  There
> isn’t much left of my original patch ;)

IIUC the main feature of this patch is adding the “nsupdate” thing
(which should be described in the commit log by the way).  So I think
this patch is still yours. :)

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: bind-utils: Build and install “nsupdate”.
  2016-01-14 23:46       ` Mathieu Lirzin
@ 2016-01-21 10:52         ` Ricardo Wurmus
  2016-01-21 13:14           ` Mathieu Lirzin
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2016-01-21 10:52 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: Guix-devel, Alex Kost

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]


Mathieu Lirzin <mthl@gnu.org> writes:

> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:
>
>> I agree, this looks nicer.  Would you like to push this change?  There
>> isn’t much left of my original patch ;)
>
> IIUC the main feature of this patch is adding the “nsupdate” thing
> (which should be described in the commit log by the way).  So I think
> this patch is still yours. :)

Okay.  Attached are three new patches.  I thought I should better split
this up into separate commits for clarity.

How’s this?


[-- Attachment #2: 0001-gnu-bind-utils-Use-modify-phases-syntax.patch --]
[-- Type: text/x-patch, Size: 2357 bytes --]

From b276ca4c3940663137e4449144b2256f03e47d27 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Thu, 21 Jan 2016 11:20:30 +0100
Subject: [PATCH 1/3] gnu: bind-utils: Use "modify-phases" syntax.

* gnu/packages/dns.scm (bind-utils): Use "modify-phases" syntax.
---
 gnu/packages/dns.scm | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index c83d16a..f7d6c88 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -91,19 +92,17 @@ and BOOTP/TFTP for network booting of diskless machines.")
              (string-append "--with-pkcs11="
                             (assoc-ref %build-inputs "p11-kit")))
        #:phases
-       (alist-replace
-        'build
-        (lambda _
-          (and (zero? (system* "make" "-C" "lib/dns"))
-               (zero? (system* "make" "-C" "lib/isc"))
-               (zero? (system* "make" "-C" "lib/bind9"))
-               (zero? (system* "make" "-C" "lib/isccfg"))
-               (zero? (system* "make" "-C" "lib/lwres"))
-               (zero? (system* "make" "-C" "bin/dig"))))
-        (alist-replace
-         'install
-         (lambda _ (zero? (system* "make" "-C" "bin/dig" "install")))
-         %standard-phases))))
+       (modify-phases %standard-phases
+         (replace 'build
+           (lambda _
+             (and (zero? (system* "make" "-C" "lib/dns"))
+                  (zero? (system* "make" "-C" "lib/isc"))
+                  (zero? (system* "make" "-C" "lib/bind9"))
+                  (zero? (system* "make" "-C" "lib/isccfg"))
+                  (zero? (system* "make" "-C" "lib/lwres"))
+                  (zero? (system* "make" "-C" "bin/dig")))))
+         (replace 'install
+           (lambda _ (zero? (system* "make" "-C" "bin/dig" "install")))))))
     (home-page "https://www.isc.org/downloads/bind/")
     (synopsis "Tools for querying nameservers")
     (description
-- 
2.1.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-bind-utils-Generalize-build-and-install-phases.patch --]
[-- Type: text/x-patch, Size: 2326 bytes --]

From 4c7f432edbd65abad749170a280d88181f533635 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Thu, 21 Jan 2016 11:41:10 +0100
Subject: [PATCH 2/3] gnu: bind-utils: Generalize "build" and "install" phases.

* gnu/packages/dns.scm (bind-utils)[arguments]: Generalize "build" and
  "install" phases.
---
 gnu/packages/dns.scm | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index f7d6c88..dfdd1df 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -91,18 +91,24 @@ and BOOTP/TFTP for network booting of diskless machines.")
                             (assoc-ref %build-inputs "mysql"))
              (string-append "--with-pkcs11="
                             (assoc-ref %build-inputs "p11-kit")))
+       #:modules ((srfi srfi-1)
+                  (srfi srfi-26)
+                  ,@%gnu-build-system-modules)
        #:phases
-       (modify-phases %standard-phases
-         (replace 'build
-           (lambda _
-             (and (zero? (system* "make" "-C" "lib/dns"))
-                  (zero? (system* "make" "-C" "lib/isc"))
-                  (zero? (system* "make" "-C" "lib/bind9"))
-                  (zero? (system* "make" "-C" "lib/isccfg"))
-                  (zero? (system* "make" "-C" "lib/lwres"))
-                  (zero? (system* "make" "-C" "bin/dig")))))
-         (replace 'install
-           (lambda _ (zero? (system* "make" "-C" "bin/dig" "install")))))))
+       (let ((libs '("dns" "isc" "bind9" "isccfg" "lwres"))
+             (bins '("dig")))
+         (modify-phases %standard-phases
+           (replace 'build
+             (lambda _
+               (every (lambda (dir)
+                        (zero? (system* "make" "-C" dir)))
+                      (append (map (cut string-append "lib/" <>) libs)
+                              (map (cut string-append "bin/" <>) bins)))))
+           (replace 'install
+             (lambda _
+               (every (lambda (dir)
+                        (zero? (system* "make" "-C" dir "install")))
+                      (map (cut string-append "bin/" <>) bins))))))))
     (home-page "https://www.isc.org/downloads/bind/")
     (synopsis "Tools for querying nameservers")
     (description
-- 
2.1.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-bind-utils-Build-and-install-nsupdate.patch --]
[-- Type: text/x-patch, Size: 929 bytes --]

From 6bd7b2a30ef1f128097c2ff4030e465e3955a34f Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Thu, 21 Jan 2016 11:42:17 +0100
Subject: [PATCH 3/3] gnu: bind-utils: Build and install "nsupdate".

* gnu/packages/dns.scm (bind-utils)[arguments]: Also build and install
  "nsupdate" executable.
---
 gnu/packages/dns.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index dfdd1df..ef07f30 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -96,7 +96,7 @@ and BOOTP/TFTP for network booting of diskless machines.")
                   ,@%gnu-build-system-modules)
        #:phases
        (let ((libs '("dns" "isc" "bind9" "isccfg" "lwres"))
-             (bins '("dig")))
+             (bins '("dig" "nsupdate")))
          (modify-phases %standard-phases
            (replace 'build
              (lambda _
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: bind-utils: Build and install “nsupdate”.
  2016-01-21 10:52         ` Ricardo Wurmus
@ 2016-01-21 13:14           ` Mathieu Lirzin
  2016-01-21 14:58             ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Mathieu Lirzin @ 2016-01-21 13:14 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Guix-devel, Alex Kost

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:

> Okay.  Attached are three new patches.  I thought I should better split
> this up into separate commits for clarity.

Splitting thoses changes is a good idea.  Thanks for taking the time to
do it.

>From b276ca4c3940663137e4449144b2256f03e47d27 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Thu, 21 Jan 2016 11:20:30 +0100
> Subject: [PATCH 1/3] gnu: bind-utils: Use "modify-phases" syntax.
>
> * gnu/packages/dns.scm (bind-utils): Use "modify-phases" syntax.

OK.

>From 4c7f432edbd65abad749170a280d88181f533635 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Thu, 21 Jan 2016 11:41:10 +0100
> Subject: [PATCH 2/3] gnu: bind-utils: Generalize "build" and "install" phases.
>
> * gnu/packages/dns.scm (bind-utils)[arguments]: Generalize "build" and
>   "install" phases.

OK.

>From 6bd7b2a30ef1f128097c2ff4030e465e3955a34f Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Thu, 21 Jan 2016 11:42:17 +0100
> Subject: [PATCH 3/3] gnu: bind-utils: Build and install "nsupdate".
>
> * gnu/packages/dns.scm (bind-utils)[arguments]: Also build and install
>   "nsupdate" executable.

I think “Also” can be removed here.  Otherwise LGTM.

Thanks,

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: bind-utils: Build and install “nsupdate”.
  2016-01-21 13:14           ` Mathieu Lirzin
@ 2016-01-21 14:58             ` Ricardo Wurmus
  0 siblings, 0 replies; 8+ messages in thread
From: Ricardo Wurmus @ 2016-01-21 14:58 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: Guix-devel, Alex Kost


Mathieu Lirzin <mthl@gnu.org> writes:

> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:
>
>> Okay.  Attached are three new patches.  I thought I should better split
>> this up into separate commits for clarity.
>
> Splitting thoses changes is a good idea.  Thanks for taking the time to
> do it.
>
>>From b276ca4c3940663137e4449144b2256f03e47d27 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
>> Date: Thu, 21 Jan 2016 11:20:30 +0100
>> Subject: [PATCH 1/3] gnu: bind-utils: Use "modify-phases" syntax.
>>
>> * gnu/packages/dns.scm (bind-utils): Use "modify-phases" syntax.
>
> OK.
>
>>From 4c7f432edbd65abad749170a280d88181f533635 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
>> Date: Thu, 21 Jan 2016 11:41:10 +0100
>> Subject: [PATCH 2/3] gnu: bind-utils: Generalize "build" and "install" phases.
>>
>> * gnu/packages/dns.scm (bind-utils)[arguments]: Generalize "build" and
>>   "install" phases.
>
> OK.
>
>>From 6bd7b2a30ef1f128097c2ff4030e465e3955a34f Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
>> Date: Thu, 21 Jan 2016 11:42:17 +0100
>> Subject: [PATCH 3/3] gnu: bind-utils: Build and install "nsupdate".
>>
>> * gnu/packages/dns.scm (bind-utils)[arguments]: Also build and install
>>   "nsupdate" executable.
>
> I think “Also” can be removed here.  Otherwise LGTM.

I removed the “Also” and pushed the three commits.  Thanks for taking
the time to review!

~~ Ricardo

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-01-21 14:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-13 15:11 [PATCH] gnu: bind-utils: Build and install “nsupdate” Ricardo Wurmus
2016-01-14  0:46 ` Mathieu Lirzin
2016-01-14  8:59   ` Alex Kost
2016-01-14 11:53     ` Ricardo Wurmus
2016-01-14 23:46       ` Mathieu Lirzin
2016-01-21 10:52         ` Ricardo Wurmus
2016-01-21 13:14           ` Mathieu Lirzin
2016-01-21 14:58             ` Ricardo Wurmus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.