gnu: xf86-video-intel: Update to 2.99.917-6-6babcf1.
[jackhill/guix/guix.git] / gnu / packages / dns.scm
CommitLineData
dd2efd3d
TUBK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
d912db5b 3;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
b2844d8f 4;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
0d88031c 5;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
be86b7ad 6;;; Copyright © 2016 John Darrington <jmd@gnu.org>
71f048c6 7;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
f9cdf1c1 8;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
afe62a8b 9;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
ecc7aa89 10;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
dd2efd3d
TUBK
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
36fb36b5 27(define-module (gnu packages dns)
f9cdf1c1 28 #:use-module (gnu packages admin)
71f048c6 29 #:use-module (gnu packages autotools)
6cf626e8 30 #:use-module (gnu packages base)
1e744399 31 #:use-module (gnu packages databases)
afe62a8b 32 #:use-module (gnu packages crypto)
f9cdf1c1 33 #:use-module (gnu packages datastructures)
cb6d322a 34 #:use-module (gnu packages glib)
71f048c6 35 #:use-module (gnu packages groff)
f9cdf1c1
TGR
36 #:use-module (gnu packages groff)
37 #:use-module (gnu packages libedit)
afe62a8b 38 #:use-module (gnu packages libevent)
f9cdf1c1 39 #:use-module (gnu packages libidn)
1e744399 40 #:use-module (gnu packages linux)
f9cdf1c1
TGR
41 #:use-module (gnu packages ncurses)
42 #:use-module (gnu packages nettle)
1e744399 43 #:use-module (gnu packages perl)
71f048c6 44 #:use-module (gnu packages pkg-config)
a7fd7b68 45 #:use-module (gnu packages tls)
f9cdf1c1 46 #:use-module (gnu packages web)
1e744399
47 #:use-module (gnu packages xml)
48 #:use-module ((guix licenses) #:prefix license:)
dd2efd3d
TUBK
49 #:use-module (guix packages)
50 #:use-module (guix download)
51 #:use-module (guix build-system gnu))
52
53(define-public dnsmasq
54 (package
55 (name "dnsmasq")
c99bf9b2 56 (version "2.76")
dd2efd3d
TUBK
57 (source (origin
58 (method url-fetch)
59 (uri (string-append
60 "http://www.thekelleys.org.uk/dnsmasq/dnsmasq-"
61 version ".tar.xz"))
62 (sha256
63 (base32
c99bf9b2 64 "15lzih6671gh9knzpl8mxchiml7z5lfqzr7jm2r0rjhrxs6nk4jb"))))
dd2efd3d 65 (build-system gnu-build-system)
cb6d322a
CB
66 (native-inputs
67 `(("pkg-config" ,pkg-config)))
68 (inputs
69 `(("dbus" ,dbus)))
dd2efd3d
TUBK
70 (arguments
71 `(#:phases
72 (alist-delete 'configure %standard-phases)
73 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
cb6d322a
CB
74 "CC=gcc"
75 "COPTS=\"-DHAVE_DBUS\"")
dd2efd3d
TUBK
76 ;; No 'check' target.
77 #:tests? #f))
78 (home-page "http://www.thekelleys.org.uk/dnsmasq/doc.html")
79 (synopsis "Small caching DNS proxy and DHCP/TFTP server")
80 (description
81 "Dnsmasq is a lightweight DNS forwarder and DHCP server. It is designed
82to provide DNS and optionally, DHCP, to a small network. It can serve the
83names of local machines which are not in the global DNS. The DHCP server
84integrates with the DNS server and allows machines with DHCP-allocated
85addresses to appear in the DNS with names configured either in each host or in
86a central configuration file. Dnsmasq supports static and dynamic DHCP leases
87and BOOTP/TFTP for network booting of diskless machines.")
88 ;; Source files only say GPL2 and GPL3 are allowed.
1e744399
89 (license (list license:gpl2 license:gpl3))))
90
a0683006
LC
91;; 'bind' is the name of a built-in Guile procedure, which is why we choose a
92;; different name here.
93(define-public isc-bind
1e744399 94 (package
be86b7ad 95 (name "bind")
e50c8aad 96 (version "9.11.1-P1")
1e744399
97 (source (origin
98 (method url-fetch)
be86b7ad
JD
99 (uri (string-append
100 "ftp://ftp.isc.org/isc/bind9/" version "/" name "-"
101 version ".tar.gz"))
1e744399
102 (sha256
103 (base32
e50c8aad 104 "0f56bhkxx7bga3f1a4whlm8fh5q8lz7ah97fdayp310vsn43w6vb"))))
1e744399 105 (build-system gnu-build-system)
be86b7ad 106 (outputs `("out" "utils"))
1e744399
107 (inputs
108 ;; it would be nice to add GeoIP and gssapi once there is package
109 `(("libcap" ,libcap)
110 ("libxml2" ,libxml2)
1e744399 111 ("openssl" ,openssl)
1e744399 112 ("p11-kit" ,p11-kit)))
be86b7ad
JD
113 (native-inputs `(("perl" ,perl)
114 ("net-tools" ,net-tools)))
1e744399 115 (arguments
be86b7ad 116 `(#:configure-flags
1e744399
117 (list (string-append "--with-openssl="
118 (assoc-ref %build-inputs "openssl"))
1e744399
119 (string-append "--with-pkcs11="
120 (assoc-ref %build-inputs "p11-kit")))
121 #:phases
be86b7ad
JD
122 (modify-phases %standard-phases
123 (add-after 'strip 'move-to-utils
124 (lambda _
125 (for-each
126 (lambda (file)
127 (let ((target (string-append (assoc-ref %outputs "utils") file))
128 (src (string-append (assoc-ref %outputs "out") file)))
129 (mkdir-p (dirname target))
130 (link src target)
131 (delete-file src)))
132 '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
133 "/share/man/man1/dig.1"
134 "/share/man/man1/host.1"
135 "/share/man/man1/nslookup.1"
136 "/share/man/man1/nsupdate.1"))))
137 ;; When and if guix provides user namespaces for the build process,
138 ;; then the following can be uncommented and the subsequent "force-test"
139 ;; will not be necessary.
140 ;;
141 ;; (add-before 'check 'set-up-loopback
142 ;; (lambda _
143 ;; (system "bin/tests/system/ifconfig.sh up")))
144 (replace 'check
145 (lambda _
146 (zero? (system* "make" "force-test")))))))
147 (synopsis "An implementation of the Domain Name System")
366efcb2
TGR
148 (description "BIND is an implementation of the @dfn{Domain Name System}
149(DNS) protocols for the Internet. It is a reference implementation of those
be86b7ad
JD
150protocols, but it is also production-grade software, suitable for use in
151high-volume and high-reliability applications. The name BIND stands for
152\"Berkeley Internet Name Domain\", because the software originated in the early
1531980s at the University of California at Berkeley.")
154 (home-page "https://www.isc.org/downloads/bind")
ecc7aa89 155 (license (list license:mpl2.0))))
be86b7ad 156
d24727c0
MB
157(define-public dnscrypt-proxy
158 (package
159 (name "dnscrypt-proxy")
83a89531 160 (version "1.9.5")
d24727c0
MB
161 (source (origin
162 (method url-fetch)
163 (uri (string-append
164 "https://download.dnscrypt.org/dnscrypt-proxy/"
165 "dnscrypt-proxy-" version ".tar.bz2"))
166 (sha256
167 (base32
83a89531 168 "1dhvklr4dg2vlw108n11xbamacaryyg3dbrg629b76lp7685p7z8"))
d24727c0
MB
169 (modules '((guix build utils)))
170 (snippet
171 ;; Delete bundled libltdl. XXX: This package also bundles
172 ;; a modified libevent that cannot currently be removed.
173 '(delete-file-recursively "libltdl"))))
174 (build-system gnu-build-system)
175 (arguments
176 `(#:phases
177 (modify-phases %standard-phases
178 (add-before 'configure 'autoreconf
179 (lambda _
180 ;; Re-generate build files due to unbundling ltdl.
181 ;; TODO: Prevent generating new libltdl and building it.
182 ;; The system version is still favored and referenced.
183 (zero? (system* "autoreconf" "-vif")))))))
184 (native-inputs
185 `(("pkg-config" ,pkg-config)
186 ("automake" ,automake)
187 ("autoconf" ,autoconf)
188 ("libtool" ,libtool)))
189 (inputs
190 `(("libltdl" ,libltdl)
191 ("libsodium" ,libsodium)))
192 (home-page "https://www.dnscrypt.org/")
193 (synopsis "Securely send DNS requests to a remote server")
194 (description
195 "@command{dnscrypt-proxy} is a tool for securing communications
196between a client and a DNS resolver. It verifies that responses you get
197from a DNS provider was actually sent by that provider, and haven't been
198tampered with. For optimal performance it is recommended to use this as
199a forwarder for a caching DNS resolver such as @command{dnsmasq}, but it
200can also be used as a normal DNS \"server\". A list of public dnscrypt
201servers is included, and an up-to-date version is available at
202@url{https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv}.")
203 (license (list license:isc
204 ;; Libevent and src/ext/queue.h is 3-clause BSD.
205 license:bsd-3))))
206
afe62a8b
MB
207(define-public dnscrypt-wrapper
208 (package
209 (name "dnscrypt-wrapper")
210 (version "0.2.2")
211 (source (origin
212 (method url-fetch)
213 (uri (string-append
214 "https://github.com/cofyc/dnscrypt-wrapper/releases"
215 "/download/v" version "/" name "-v" version ".tar.bz2"))
216 (sha256
217 (base32
218 "1vhg4g0r687f51wcdn7z9w1hxapazx6vyh5rsr8wa48sljzd583g"))))
219 (build-system gnu-build-system)
220 (arguments
221 `(#:make-flags '("CC=gcc")
222 ;; TODO: Tests require ruby-cucumber and ruby-aruba.
223 #:tests? #f
224 #:phases
225 (modify-phases %standard-phases
226 (add-before 'configure 'create-configure
227 (lambda _
228 (zero? (system* "make" "configure")))))))
229 (native-inputs
230 `(("autoconf" ,autoconf)))
231 (inputs
232 `(("libevent" ,libevent)
233 ("libsodium" ,libsodium)))
234 (home-page "https://github.com/Cofyc/dnscrypt-wrapper")
235 (synopsis "Server-side dnscrypt proxy")
236 (description
237 "@command{dnscrypt-wrapper} is a tool to expose a name server over
238the @code{dnscrypt} protocol. It can be used as an endpoint for the
239@command{dnscrypt-proxy} client to securely tunnel DNS requests between
240the two.")
241 (license (list license:isc
242 ;; Bundled argparse is MIT. TODO: package and unbundle.
243 license:expat
244 ;; dns-protocol.h and rfc1035.{c,h} is gpl2 or gpl3 (either).
245 license:gpl2
246 license:gpl3))))
247
71f048c6 248(define-public libasr
249 (package
250 (name "libasr")
251 (version "201602131606")
252 (source
253 (origin
254 (method url-fetch)
255 (uri (string-append "https://www.opensmtpd.org/archives/"
256 name "-" version ".tar.gz"))
257 (sha256
258 (base32
259 "18kdmbjsxrfai16d66qslp48b1zf7gr8him2jj5dcqgbsl44ls75"))))
260 (build-system gnu-build-system)
261 (native-inputs
262 `(("autoconf" ,autoconf)
263 ("automake" ,automake)
264 ("pkg-config" ,pkg-config)
265 ("groff" ,groff)))
266 (home-page "https://www.opensmtpd.org")
267 (synopsis "Asynchronous resolver library by the OpenBSD project")
268 (description
269 "libasr is a free, simple and portable asynchronous resolver library.
270It allows to run DNS queries and perform hostname resolutions in a fully
271asynchronous fashion.")
272 (license (list license:isc
273 license:bsd-2 ; last part of getrrsetbyname_async.c
274 license:bsd-3
275 (license:non-copyleft "file://LICENSE") ; includes.h
276 license:openssl))))
6cf626e8
TGR
277
278(define-public yadifa
279 (package
280 (name "yadifa")
9b9cc951 281 (version "2.2.4")
6cf626e8 282 (source
9b9cc951 283 (let ((revision "6924"))
8769d482
TGR
284 (origin
285 (method url-fetch)
286 (uri
287 (string-append "http://cdn.yadifa.eu/sites/default/files/releases/"
288 name "-" version "-" revision ".tar.gz"))
289 (sha256
290 (base32
9b9cc951 291 "060ydcfn9876bs6p5xi3p1k20ca547f4jck25r5x1hnxjlv7ss03")))))
6cf626e8
TGR
292 (build-system gnu-build-system)
293 (native-inputs
294 `(("which" ,which)))
295 (inputs
296 `(("openssl" ,openssl)))
297 (arguments
298 `(#:phases (modify-phases %standard-phases
299 (add-before 'configure 'omit-example-configurations
2d431b01
TGR
300 (lambda _
301 (substitute* "Makefile.in"
302 ((" (etc|var)") ""))
303 #t)))
6cf626e8
TGR
304 #:configure-flags (list "--sysconfdir=/etc" "--localstatedir=/var"
305 "--enable-shared" "--disable-static"
306 "--enable-messages" "--enable-ctrl"
4d2fd1c0
TGR
307 "--enable-nsec" "--enable-nsec3"
308 "--enable-tsig" "--enable-caching"
6cf626e8
TGR
309 ;; NSID is a rarely-used debugging aid, that also
310 ;; causes the build to fail. Just disable it.
311 "--disable-nsid")))
312 (home-page "http://www.yadifa.eu/")
313 (synopsis "Authoritative DNS name server")
366efcb2
TGR
314 (description "YADIFA is an authoritative name server for the @dfn{Domain
315Name System} (DNS). It aims for both higher performance and a smaller memory
6cf626e8 316footprint than other implementations, while remaining fully RFC-compliant.
366efcb2
TGR
317YADIFA supports dynamic record updates and the @dfn{Domain Name System Security
318Extensions} (DNSSEC).")
6cf626e8 319 (license license:bsd-3)))
f9cdf1c1
TGR
320
321(define-public knot
322 (package
323 (name "knot")
4604a988 324 (version "2.4.4")
f9cdf1c1
TGR
325 (source (origin
326 (method url-fetch)
327 (uri (string-append "https://secure.nic.cz/files/knot-dns/"
328 name "-" version ".tar.xz"))
329 (sha256
330 (base32
4604a988 331 "0g2n5r2n03bqz322xlwdw4bqhj8l4n8q0hzrqngi4rgmk4rp97ly"))
f9cdf1c1
TGR
332 (modules '((guix build utils)))
333 (snippet
334 '(begin
335 ;; Remove bundled libraries and dependencies on them.
336 (substitute* "configure"
337 (("src/contrib/dnstap/Makefile") ""))
338 (substitute* "src/Makefile.in"
339 (("contrib/dnstap ") ""))
340 (with-directory-excursion "src/contrib"
341 (for-each delete-file-recursively
2d431b01
TGR
342 (list "dnstap" "lmdb")))
343 #t))))
f9cdf1c1
TGR
344 (build-system gnu-build-system)
345 (native-inputs
346 `(("pkg-config" ,pkg-config)))
347 (inputs
348 `(("gnutls" ,gnutls)
349 ("jansson" ,jansson)
350 ("libcap-ng" ,libcap-ng)
351 ("libedit" ,libedit)
352 ("libidn" ,libidn)
353 ("liburcu" ,liburcu)
354 ("lmdb" ,lmdb)
355 ("ncurses" ,ncurses)
356 ("nettle" ,nettle)))
357 (arguments
358 `(#:phases
359 (modify-phases %standard-phases
360 (add-before 'configure 'disable-directory-pre-creation
361 (lambda _
362 ;; Don't install empty directories like ‘/etc’ outside the store.
2d431b01
TGR
363 (substitute* "src/Makefile.in" (("\\$\\(INSTALL\\) -d") "true"))
364 #t))
f9cdf1c1
TGR
365 (replace 'install
366 (lambda* (#:key outputs #:allow-other-keys)
367 (let* ((out (assoc-ref outputs "out"))
368 (doc (string-append out "/share/doc/knot"))
369 (etc (string-append doc "/examples/etc")))
370 (zero?
371 (system* "make"
372 (string-append "config_dir=" etc)
373 "install"))))))
374 #:configure-flags
375 (list "--sysconfdir=/etc"
376 "--localstatedir=/var"
377 "--enable-rosedb" ; serve static records from a database
378 (string-append "--with-bash-completions="
379 (assoc-ref %outputs "out")
380 "/etc/bash_completion.d"))))
381 (home-page "https://www.knot-dns.cz/")
382 (synopsis "Authoritative DNS name server")
d1e4ad1b 383 (description "Knot DNS is an authoritative name server for the @dfn{Domain
f9cdf1c1
TGR
384Name System} (DNS), designed to meet the needs of root and @dfn{top-level
385domain} (TLD) name servers. It is implemented as a threaded daemon and uses a
386number of programming techniques to improve speed. For example, the responder
387is completely lock-free, resulting in a very high response rate. Other features
388include automatic @dfn{DNS Security Extensions} (DNSSEC) signing, dynamic record
389synthesis, and on-the-fly re-configuration.")
390 (license (list license:expat ; src/contrib/{hat-trie,murmurhash3}
391 license:lgpl2.0+ ; parts of scr/contrib/ucw
392 license:gpl3+)))) ; everything else