1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
3 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
7 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
8 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages dns)
27 #:use-module (gnu packages admin)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages databases)
31 #:use-module (gnu packages crypto)
32 #:use-module (gnu packages datastructures)
33 #:use-module (gnu packages glib)
34 #:use-module (gnu packages groff)
35 #:use-module (gnu packages groff)
36 #:use-module (gnu packages libedit)
37 #:use-module (gnu packages libevent)
38 #:use-module (gnu packages libidn)
39 #:use-module (gnu packages linux)
40 #:use-module (gnu packages ncurses)
41 #:use-module (gnu packages nettle)
42 #:use-module (gnu packages perl)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages tls)
45 #:use-module (gnu packages web)
46 #:use-module (gnu packages xml)
47 #:use-module ((guix licenses) #:prefix license:)
48 #:use-module (guix packages)
49 #:use-module (guix download)
50 #:use-module (guix build-system gnu))
52 (define-public dnsmasq
59 "http://www.thekelleys.org.uk/dnsmasq/dnsmasq-"
63 "15lzih6671gh9knzpl8mxchiml7z5lfqzr7jm2r0rjhrxs6nk4jb"))))
64 (build-system gnu-build-system)
66 `(("pkg-config" ,pkg-config)))
71 (alist-delete 'configure %standard-phases)
72 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
74 "COPTS=\"-DHAVE_DBUS\"")
77 (home-page "http://www.thekelleys.org.uk/dnsmasq/doc.html")
78 (synopsis "Small caching DNS proxy and DHCP/TFTP server")
80 "Dnsmasq is a lightweight DNS forwarder and DHCP server. It is designed
81 to provide DNS and optionally, DHCP, to a small network. It can serve the
82 names of local machines which are not in the global DNS. The DHCP server
83 integrates with the DNS server and allows machines with DHCP-allocated
84 addresses to appear in the DNS with names configured either in each host or in
85 a central configuration file. Dnsmasq supports static and dynamic DHCP leases
86 and BOOTP/TFTP for network booting of diskless machines.")
87 ;; Source files only say GPL2 and GPL3 are allowed.
88 (license (list license:gpl2 license:gpl3))))
97 "ftp://ftp.isc.org/isc/bind9/" version "/" name "-"
101 "1sv6fp5gznjj1kmx9q8wr2c6js10wqckgy25sqj83bbf8smmdlvx"))))
102 (build-system gnu-build-system)
103 (outputs `("out" "utils"))
105 ;; it would be nice to add GeoIP and gssapi once there is package
109 ("p11-kit" ,p11-kit)))
110 (native-inputs `(("perl" ,perl)
111 ("net-tools" ,net-tools)))
114 (list (string-append "--with-openssl="
115 (assoc-ref %build-inputs "openssl"))
116 (string-append "--with-pkcs11="
117 (assoc-ref %build-inputs "p11-kit")))
119 (modify-phases %standard-phases
120 (add-after 'strip 'move-to-utils
124 (let ((target (string-append (assoc-ref %outputs "utils") file))
125 (src (string-append (assoc-ref %outputs "out") file)))
126 (mkdir-p (dirname target))
129 '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
130 "/share/man/man1/dig.1"
131 "/share/man/man1/host.1"
132 "/share/man/man1/nslookup.1"
133 "/share/man/man1/nsupdate.1"))))
134 ;; When and if guix provides user namespaces for the build process,
135 ;; then the following can be uncommented and the subsequent "force-test"
136 ;; will not be necessary.
138 ;; (add-before 'check 'set-up-loopback
140 ;; (system "bin/tests/system/ifconfig.sh up")))
143 (zero? (system* "make" "force-test")))))))
144 (synopsis "An implementation of the Domain Name System")
145 (description "BIND is an implementation of the @dfn{Domain Name System}
146 (DNS) protocols for the Internet. It is a reference implementation of those
147 protocols, but it is also production-grade software, suitable for use in
148 high-volume and high-reliability applications. The name BIND stands for
149 \"Berkeley Internet Name Domain\", because the software originated in the early
150 1980s at the University of California at Berkeley.")
151 (home-page "https://www.isc.org/downloads/bind")
152 (license (list license:isc))))
154 (define-public dnscrypt-proxy
156 (name "dnscrypt-proxy")
161 "https://download.dnscrypt.org/dnscrypt-proxy/"
162 "dnscrypt-proxy-" version ".tar.bz2"))
165 "07piwsjczamwvdpv1585kg4awqakip51bwsm8nqi6bljww4agx7x"))
166 (modules '((guix build utils)))
168 ;; Delete bundled libltdl. XXX: This package also bundles
169 ;; a modified libevent that cannot currently be removed.
170 '(delete-file-recursively "libltdl"))))
171 (build-system gnu-build-system)
174 (modify-phases %standard-phases
175 (add-before 'configure 'autoreconf
177 ;; Re-generate build files due to unbundling ltdl.
178 ;; TODO: Prevent generating new libltdl and building it.
179 ;; The system version is still favored and referenced.
180 (zero? (system* "autoreconf" "-vif")))))))
182 `(("pkg-config" ,pkg-config)
183 ("automake" ,automake)
184 ("autoconf" ,autoconf)
185 ("libtool" ,libtool)))
187 `(("libltdl" ,libltdl)
188 ("libsodium" ,libsodium)))
189 (home-page "https://www.dnscrypt.org/")
190 (synopsis "Securely send DNS requests to a remote server")
192 "@command{dnscrypt-proxy} is a tool for securing communications
193 between a client and a DNS resolver. It verifies that responses you get
194 from a DNS provider was actually sent by that provider, and haven't been
195 tampered with. For optimal performance it is recommended to use this as
196 a forwarder for a caching DNS resolver such as @command{dnsmasq}, but it
197 can also be used as a normal DNS \"server\". A list of public dnscrypt
198 servers is included, and an up-to-date version is available at
199 @url{https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv}.")
200 (license (list license:isc
201 ;; Libevent and src/ext/queue.h is 3-clause BSD.
204 (define-public dnscrypt-wrapper
206 (name "dnscrypt-wrapper")
211 "https://github.com/cofyc/dnscrypt-wrapper/releases"
212 "/download/v" version "/" name "-v" version ".tar.bz2"))
215 "1vhg4g0r687f51wcdn7z9w1hxapazx6vyh5rsr8wa48sljzd583g"))))
216 (build-system gnu-build-system)
218 `(#:make-flags '("CC=gcc")
219 ;; TODO: Tests require ruby-cucumber and ruby-aruba.
222 (modify-phases %standard-phases
223 (add-before 'configure 'create-configure
225 (zero? (system* "make" "configure")))))))
227 `(("autoconf" ,autoconf)))
229 `(("libevent" ,libevent)
230 ("libsodium" ,libsodium)))
231 (home-page "https://github.com/Cofyc/dnscrypt-wrapper")
232 (synopsis "Server-side dnscrypt proxy")
234 "@command{dnscrypt-wrapper} is a tool to expose a name server over
235 the @code{dnscrypt} protocol. It can be used as an endpoint for the
236 @command{dnscrypt-proxy} client to securely tunnel DNS requests between
238 (license (list license:isc
239 ;; Bundled argparse is MIT. TODO: package and unbundle.
241 ;; dns-protocol.h and rfc1035.{c,h} is gpl2 or gpl3 (either).
245 (define-public libasr
248 (version "201602131606")
252 (uri (string-append "https://www.opensmtpd.org/archives/"
253 name "-" version ".tar.gz"))
256 "18kdmbjsxrfai16d66qslp48b1zf7gr8him2jj5dcqgbsl44ls75"))))
257 (build-system gnu-build-system)
259 `(("autoconf" ,autoconf)
260 ("automake" ,automake)
261 ("pkg-config" ,pkg-config)
263 (home-page "https://www.opensmtpd.org")
264 (synopsis "Asynchronous resolver library by the OpenBSD project")
266 "libasr is a free, simple and portable asynchronous resolver library.
267 It allows to run DNS queries and perform hostname resolutions in a fully
268 asynchronous fashion.")
269 (license (list license:isc
270 license:bsd-2 ; last part of getrrsetbyname_async.c
272 (license:non-copyleft "file://LICENSE") ; includes.h
275 (define-public yadifa
280 (let ((revision "6711"))
284 (string-append "http://cdn.yadifa.eu/sites/default/files/releases/"
285 name "-" version "-" revision ".tar.gz"))
288 "0ikfm40gx0zjw3gnxsw3rn1k4wb8jacgklja3ygcj1knq6hy2zaa")))))
289 (build-system gnu-build-system)
293 `(("openssl" ,openssl)))
295 `(#:phases (modify-phases %standard-phases
296 (add-before 'configure 'omit-example-configurations
298 (substitute* "Makefile.in"
301 #:configure-flags (list "--sysconfdir=/etc" "--localstatedir=/var"
302 "--enable-shared" "--disable-static"
303 "--enable-messages" "--enable-ctrl"
304 "--enable-nsec" "--enable-nsec3"
305 "--enable-tsig" "--enable-caching"
306 ;; NSID is a rarely-used debugging aid, that also
307 ;; causes the build to fail. Just disable it.
309 (home-page "http://www.yadifa.eu/")
310 (synopsis "Authoritative DNS name server")
311 (description "YADIFA is an authoritative name server for the @dfn{Domain
312 Name System} (DNS). It aims for both higher performance and a smaller memory
313 footprint than other implementations, while remaining fully RFC-compliant.
314 YADIFA supports dynamic record updates and the @dfn{Domain Name System Security
315 Extensions} (DNSSEC).")
316 (license license:bsd-3)))
324 (uri (string-append "https://secure.nic.cz/files/knot-dns/"
325 name "-" version ".tar.xz"))
328 "0kvhibnnk77nqi9gdw2zbnp0dydfcy6zy96qv0f3a7wwnay5h0pr"))
329 (modules '((guix build utils)))
332 ;; Remove bundled libraries and dependencies on them.
333 (substitute* "configure"
334 (("src/contrib/dnstap/Makefile") ""))
335 (substitute* "src/Makefile.in"
336 (("contrib/dnstap ") ""))
337 (with-directory-excursion "src/contrib"
338 (for-each delete-file-recursively
339 (list "dnstap" "lmdb")))
341 (build-system gnu-build-system)
343 `(("pkg-config" ,pkg-config)))
347 ("libcap-ng" ,libcap-ng)
356 (modify-phases %standard-phases
357 (add-before 'configure 'disable-directory-pre-creation
359 ;; Don't install empty directories like ‘/etc’ outside the store.
360 (substitute* "src/Makefile.in" (("\\$\\(INSTALL\\) -d") "true"))
363 (lambda* (#:key outputs #:allow-other-keys)
364 (let* ((out (assoc-ref outputs "out"))
365 (doc (string-append out "/share/doc/knot"))
366 (etc (string-append doc "/examples/etc")))
369 (string-append "config_dir=" etc)
372 (list "--sysconfdir=/etc"
373 "--localstatedir=/var"
374 "--enable-rosedb" ; serve static records from a database
375 (string-append "--with-bash-completions="
376 (assoc-ref %outputs "out")
377 "/etc/bash_completion.d"))))
378 (home-page "https://www.knot-dns.cz/")
379 (synopsis "Authoritative DNS name server")
380 (description "Knot DNS is an authoritative name server for the @dfn{Domain
381 Name System} (DNS), designed to meet the needs of root and @dfn{top-level
382 domain} (TLD) name servers. It is implemented as a threaded daemon and uses a
383 number of programming techniques to improve speed. For example, the responder
384 is completely lock-free, resulting in a very high response rate. Other features
385 include automatic @dfn{DNS Security Extensions} (DNSSEC) signing, dynamic record
386 synthesis, and on-the-fly re-configuration.")
387 (license (list license:expat ; src/contrib/{hat-trie,murmurhash3}
388 license:lgpl2.0+ ; parts of scr/contrib/ucw
389 license:gpl3+)))) ; everything else