diff mbox

gnu: Add bind

Message ID 1473545186-6899-1-git-send-email-jmd@gnu.org
State New
Headers show

Commit Message

John Darrington Sept. 10, 2016, 10:06 p.m. UTC
* gnu/packags/dns.scm (bind): New variable
---
 gnu/packages/dns.scm | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

Comments

John Darrington Sept. 10, 2016, 10:08 p.m. UTC | #1
I suggest that we use this version and remove the existing bind-utils.

J'

On Sun, Sep 11, 2016 at 12:06:26AM +0200, John Darrington wrote:
     * gnu/packags/dns.scm (bind): New variable
     ---
      gnu/packages/dns.scm | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++
      1 file changed, 69 insertions(+)
     
     diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
     index 819343a..dad8079 100644
     --- a/gnu/packages/dns.scm
     +++ b/gnu/packages/dns.scm
     @@ -3,6 +3,7 @@
      ;;; Copyright ?? 2016 Mark H Weaver <mhw@netris.org>
      ;;; Copyright ?? 2016 Ricardo Wurmus <rekado@elephly.net>
      ;;; Copyright ?? 2016 Efraim Flashner <efraim@flashner.co.il>
     +;;; Copyright ?? 2016 John Darrington <jmd@gnu.org>
      ;;;
      ;;; This file is part of GNU Guix.
      ;;;
     @@ -63,6 +64,74 @@ and BOOTP/TFTP for network booting of diskless machines.")
          ;; Source files only say GPL2 and GPL3 are allowed.
          (license (list license:gpl2 license:gpl3))))
      
     +(define-public bind
     +  (package
     +    (name "bind")
     +    (version "9.10.4-P2")
     +    (source (origin
     +              (method url-fetch)
     +              (uri (string-append
     +                    "ftp://ftp.isc.org/isc/bind9/" version "/" name "-"
     +                    version ".tar.gz"))
     +              (sha256
     +               (base32
     +                "08s48h5p916ixjiwgar4w6skc20crmg7yj1y7g89c083zvw8lnxk"))))
     +    (build-system gnu-build-system)
     +    (arguments
     +     `(#: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
     +       ;; When and if guix provides user namespaces for the build process,
     +       ;; then the following can be uncommented and the subsequent "force-test"
     +       ;; will not be necessary.
     +       ;;
     +       ;; (modify-phases %standard-phases
     +       ;;   (add-before 'check 'set-up-loopback
     +       ;;     (lambda _
     +       ;;          (system "bin/tests/system/ifconfig.sh up"))))
     +       (modify-phases %standard-phases
     +         (add-after 'strip 'move-to-utils
     +           (lambda _
     +             (for-each
     +              (lambda (file)
     +                (let ((target  (string-append (assoc-ref %outputs "utils") file))
     +                      (src  (string-append (assoc-ref %outputs "out") file)))
     +                  (mkdir-p (dirname target))
     +                  (link src target)
     +                  (delete-file src)))
     +              '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
     +                "/share/man/man1/dig.1"
     +                "/share/man/man1/host.1"
     +                "/share/man/man1/nslookup.1"
     +                "/share/man/man1/nsupdate.1"))))
     +         (replace 'check
     +           (lambda _
     +             (zero? (system* "make" "force-test")))))))
     +    (outputs `("out" "utils"))
     +    (inputs
     +     ;; it would be nice to add GeoIP and gssapi once there is package
     +     `(("libcap" ,libcap)
     +       ("libxml2" ,libxml2)
     +       ("mysql" ,mysql)
     +       ("openssl" ,openssl)
     +       ("p11-kit" ,p11-kit)))
     +    (native-inputs `(("perl" ,perl)
     +                     ("net-tools" ,net-tools)))
     +    (synopsis "An implementation of the Domain Name System")
     +    (description "BIND is an implementation of the Domain Name System (DNS)
     +protocols for the Internet.  It is a reference implementation of those
     +protocols, but it is also production-grade software, suitable for use in
     +high-volume and high-reliability applications. The name BIND stands for
     +\"Berkeley Internet Name Domain\", because the software originated in the early
     +1980s at the University of California at Berkeley.")
     +    (home-page "https://www.isc.org/downloads/bind")
     +    (license (list license:isc))))
     +
      (define-public bind-utils
        (package
          (name "bind-utils")
     -- 
     2.1.4
John Darrington Sept. 18, 2016, 1:57 p.m. UTC | #2
Does anyone have any opinions/objections before I make this commit?

J'

On Sun, Sep 11, 2016 at 12:08:17AM +0200, John Darrington wrote:
     I suggest that we use this version and remove the existing bind-utils.
     
     J'
     
     On Sun, Sep 11, 2016 at 12:06:26AM +0200, John Darrington wrote:
          * gnu/packags/dns.scm (bind): New variable
          ---
           gnu/packages/dns.scm | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++
           1 file changed, 69 insertions(+)
          
          diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
          index 819343a..dad8079 100644
          --- a/gnu/packages/dns.scm
          +++ b/gnu/packages/dns.scm
          @@ -3,6 +3,7 @@
           ;;; Copyright ?? 2016 Mark H Weaver <mhw@netris.org>
           ;;; Copyright ?? 2016 Ricardo Wurmus <rekado@elephly.net>
           ;;; Copyright ?? 2016 Efraim Flashner <efraim@flashner.co.il>
          +;;; Copyright ?? 2016 John Darrington <jmd@gnu.org>
           ;;;
           ;;; This file is part of GNU Guix.
           ;;;
          @@ -63,6 +64,74 @@ and BOOTP/TFTP for network booting of diskless machines.")
               ;; Source files only say GPL2 and GPL3 are allowed.
               (license (list license:gpl2 license:gpl3))))
           
          +(define-public bind
          +  (package
          +    (name "bind")
          +    (version "9.10.4-P2")
          +    (source (origin
          +              (method url-fetch)
          +              (uri (string-append
          +                    "ftp://ftp.isc.org/isc/bind9/" version "/" name "-"
          +                    version ".tar.gz"))
          +              (sha256
          +               (base32
          +                "08s48h5p916ixjiwgar4w6skc20crmg7yj1y7g89c083zvw8lnxk"))))
          +    (build-system gnu-build-system)
          +    (arguments
          +     `(#: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
          +       ;; When and if guix provides user namespaces for the build process,
          +       ;; then the following can be uncommented and the subsequent "force-test"
          +       ;; will not be necessary.
          +       ;;
          +       ;; (modify-phases %standard-phases
          +       ;;   (add-before 'check 'set-up-loopback
          +       ;;     (lambda _
          +       ;;          (system "bin/tests/system/ifconfig.sh up"))))
          +       (modify-phases %standard-phases
          +         (add-after 'strip 'move-to-utils
          +           (lambda _
          +             (for-each
          +              (lambda (file)
          +                (let ((target  (string-append (assoc-ref %outputs "utils") file))
          +                      (src  (string-append (assoc-ref %outputs "out") file)))
          +                  (mkdir-p (dirname target))
          +                  (link src target)
          +                  (delete-file src)))
          +              '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
          +                "/share/man/man1/dig.1"
          +                "/share/man/man1/host.1"
          +                "/share/man/man1/nslookup.1"
          +                "/share/man/man1/nsupdate.1"))))
          +         (replace 'check
          +           (lambda _
          +             (zero? (system* "make" "force-test")))))))
          +    (outputs `("out" "utils"))
          +    (inputs
          +     ;; it would be nice to add GeoIP and gssapi once there is package
          +     `(("libcap" ,libcap)
          +       ("libxml2" ,libxml2)
          +       ("mysql" ,mysql)
          +       ("openssl" ,openssl)
          +       ("p11-kit" ,p11-kit)))
          +    (native-inputs `(("perl" ,perl)
          +                     ("net-tools" ,net-tools)))
          +    (synopsis "An implementation of the Domain Name System")
          +    (description "BIND is an implementation of the Domain Name System (DNS)
          +protocols for the Internet.  It is a reference implementation of those
          +protocols, but it is also production-grade software, suitable for use in
          +high-volume and high-reliability applications. The name BIND stands for
          +\"Berkeley Internet Name Domain\", because the software originated in the early
          +1980s at the University of California at Berkeley.")
          +    (home-page "https://www.isc.org/downloads/bind")
          +    (license (list license:isc))))
          +
           (define-public bind-utils
             (package
               (name "bind-utils")
          -- 
          2.1.4
          
          
     
     -- 
     Avoid eavesdropping.  Send strong encrypted email.
     PGP Public key ID: 1024D/2DE827B3 
     fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
     See http://sks-keyservers.net or any PGP keyserver for public key.
Hartmut Goebel Sept. 18, 2016, 3:03 p.m. UTC | #3
Am 18.09.2016 um 15:57 schrieb John Darrington:
> Does anyone have any opinions/objections before I make this commit?

>           +             (string-append "--with-dlz-mysql="
>           +                            (assoc-ref %build-inputs "mysql"))

I don't think, this should be build with DLZ mysql per default. While
DLZ is an important feature, this would urgh GuixSD users to use mysql.
They mayprefer postgresql, though. Thus DLZ MySQL should not part of the
default setup IMHO.


>           +    (outputs `("out" "utils"))

Please muve this above the phases defintions. I missed this and thought
the utils are going into the same package as the server.
John Darrington Sept. 18, 2016, 5:52 p.m. UTC | #4
On Sun, Sep 18, 2016 at 05:03:14PM +0200, Hartmut Goebel wrote:
     Am 18.09.2016 um 15:57 schrieb John Darrington:
     > Does anyone have any opinions/objections before I make this commit?
     
     >           +             (string-append "--with-dlz-mysql="
     >           +                            (assoc-ref %build-inputs "mysql"))
     
     I don't think, this should be build with DLZ mysql per default. While
     DLZ is an important feature, this would urgh GuixSD users to use mysql.
     They mayprefer postgresql, though. Thus DLZ MySQL should not part of the
     default setup IMHO.

Ok.  I buy that argument.
     
     
     >           +    (outputs `("out" "utils"))
     
     Please muve this above the phases defintions. I missed this and thought
     the utils are going into the same package as the server.
     

I will do that.
diff mbox

Patch

diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 819343a..dad8079 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -3,6 +3,7 @@ 
 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 John Darrington <jmd@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -63,6 +64,74 @@  and BOOTP/TFTP for network booting of diskless machines.")
     ;; Source files only say GPL2 and GPL3 are allowed.
     (license (list license:gpl2 license:gpl3))))
 
+(define-public bind
+  (package
+    (name "bind")
+    (version "9.10.4-P2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "ftp://ftp.isc.org/isc/bind9/" version "/" name "-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "08s48h5p916ixjiwgar4w6skc20crmg7yj1y7g89c083zvw8lnxk"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#: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
+       ;; When and if guix provides user namespaces for the build process,
+       ;; then the following can be uncommented and the subsequent "force-test"
+       ;; will not be necessary.
+       ;;
+       ;; (modify-phases %standard-phases
+       ;;   (add-before 'check 'set-up-loopback
+       ;;     (lambda _
+       ;;          (system "bin/tests/system/ifconfig.sh up"))))
+       (modify-phases %standard-phases
+         (add-after 'strip 'move-to-utils
+           (lambda _
+             (for-each
+              (lambda (file)
+                (let ((target  (string-append (assoc-ref %outputs "utils") file))
+                      (src  (string-append (assoc-ref %outputs "out") file)))
+                  (mkdir-p (dirname target))
+                  (link src target)
+                  (delete-file src)))
+              '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
+                "/share/man/man1/dig.1"
+                "/share/man/man1/host.1"
+                "/share/man/man1/nslookup.1"
+                "/share/man/man1/nsupdate.1"))))
+         (replace 'check
+           (lambda _
+             (zero? (system* "make" "force-test")))))))
+    (outputs `("out" "utils"))
+    (inputs
+     ;; it would be nice to add GeoIP and gssapi once there is package
+     `(("libcap" ,libcap)
+       ("libxml2" ,libxml2)
+       ("mysql" ,mysql)
+       ("openssl" ,openssl)
+       ("p11-kit" ,p11-kit)))
+    (native-inputs `(("perl" ,perl)
+                     ("net-tools" ,net-tools)))
+    (synopsis "An implementation of the Domain Name System")
+    (description "BIND is an implementation of the Domain Name System (DNS)
+protocols for the Internet.  It is a reference implementation of those
+protocols, but it is also production-grade software, suitable for use in
+high-volume and high-reliability applications. The name BIND stands for
+\"Berkeley Internet Name Domain\", because the software originated in the early
+1980s at the University of California at Berkeley.")
+    (home-page "https://www.isc.org/downloads/bind")
+    (license (list license:isc))))
+
 (define-public bind-utils
   (package
     (name "bind-utils")