gnu: Add liburcu.
[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>
6cf626e8 8;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
afe62a8b 9;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
dd2efd3d
TUBK
10;;;
11;;; This file is part of GNU Guix.
12;;;
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.
17;;;
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.
22;;;
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/>.
25
36fb36b5 26(define-module (gnu packages dns)
71f048c6 27 #:use-module (gnu packages autotools)
6cf626e8 28 #:use-module (gnu packages base)
1e744399 29 #:use-module (gnu packages databases)
afe62a8b 30 #:use-module (gnu packages crypto)
cb6d322a 31 #:use-module (gnu packages glib)
71f048c6 32 #:use-module (gnu packages groff)
afe62a8b 33 #:use-module (gnu packages libevent)
1e744399 34 #:use-module (gnu packages linux)
1e744399 35 #:use-module (gnu packages perl)
71f048c6 36 #:use-module (gnu packages pkg-config)
a7fd7b68 37 #:use-module (gnu packages tls)
1e744399
38 #:use-module (gnu packages xml)
39 #:use-module ((guix licenses) #:prefix license:)
dd2efd3d
TUBK
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix build-system gnu))
43
44(define-public dnsmasq
45 (package
46 (name "dnsmasq")
c99bf9b2 47 (version "2.76")
dd2efd3d
TUBK
48 (source (origin
49 (method url-fetch)
50 (uri (string-append
51 "http://www.thekelleys.org.uk/dnsmasq/dnsmasq-"
52 version ".tar.xz"))
53 (sha256
54 (base32
c99bf9b2 55 "15lzih6671gh9knzpl8mxchiml7z5lfqzr7jm2r0rjhrxs6nk4jb"))))
dd2efd3d 56 (build-system gnu-build-system)
cb6d322a
CB
57 (native-inputs
58 `(("pkg-config" ,pkg-config)))
59 (inputs
60 `(("dbus" ,dbus)))
dd2efd3d
TUBK
61 (arguments
62 `(#:phases
63 (alist-delete 'configure %standard-phases)
64 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
cb6d322a
CB
65 "CC=gcc"
66 "COPTS=\"-DHAVE_DBUS\"")
dd2efd3d
TUBK
67 ;; No 'check' target.
68 #:tests? #f))
69 (home-page "http://www.thekelleys.org.uk/dnsmasq/doc.html")
70 (synopsis "Small caching DNS proxy and DHCP/TFTP server")
71 (description
72 "Dnsmasq is a lightweight DNS forwarder and DHCP server. It is designed
73to provide DNS and optionally, DHCP, to a small network. It can serve the
74names of local machines which are not in the global DNS. The DHCP server
75integrates with the DNS server and allows machines with DHCP-allocated
76addresses to appear in the DNS with names configured either in each host or in
77a central configuration file. Dnsmasq supports static and dynamic DHCP leases
78and BOOTP/TFTP for network booting of diskless machines.")
79 ;; Source files only say GPL2 and GPL3 are allowed.
1e744399
80 (license (list license:gpl2 license:gpl3))))
81
be86b7ad 82(define-public bind
1e744399 83 (package
be86b7ad 84 (name "bind")
bafd5bea 85 (version "9.10.4-P6")
1e744399
86 (source (origin
87 (method url-fetch)
be86b7ad
JD
88 (uri (string-append
89 "ftp://ftp.isc.org/isc/bind9/" version "/" name "-"
90 version ".tar.gz"))
1e744399
91 (sha256
92 (base32
bafd5bea 93 "0rgffdm0h6dks0np4h9q4kd8nyb3azrdxw2skqnjzd8ws78vzpx1"))))
1e744399 94 (build-system gnu-build-system)
be86b7ad 95 (outputs `("out" "utils"))
1e744399
96 (inputs
97 ;; it would be nice to add GeoIP and gssapi once there is package
98 `(("libcap" ,libcap)
99 ("libxml2" ,libxml2)
1e744399 100 ("openssl" ,openssl)
1e744399 101 ("p11-kit" ,p11-kit)))
be86b7ad
JD
102 (native-inputs `(("perl" ,perl)
103 ("net-tools" ,net-tools)))
1e744399 104 (arguments
be86b7ad 105 `(#:configure-flags
1e744399
106 (list (string-append "--with-openssl="
107 (assoc-ref %build-inputs "openssl"))
1e744399
108 (string-append "--with-pkcs11="
109 (assoc-ref %build-inputs "p11-kit")))
110 #:phases
be86b7ad
JD
111 (modify-phases %standard-phases
112 (add-after 'strip 'move-to-utils
113 (lambda _
114 (for-each
115 (lambda (file)
116 (let ((target (string-append (assoc-ref %outputs "utils") file))
117 (src (string-append (assoc-ref %outputs "out") file)))
118 (mkdir-p (dirname target))
119 (link src target)
120 (delete-file src)))
121 '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
122 "/share/man/man1/dig.1"
123 "/share/man/man1/host.1"
124 "/share/man/man1/nslookup.1"
125 "/share/man/man1/nsupdate.1"))))
126 ;; When and if guix provides user namespaces for the build process,
127 ;; then the following can be uncommented and the subsequent "force-test"
128 ;; will not be necessary.
129 ;;
130 ;; (add-before 'check 'set-up-loopback
131 ;; (lambda _
132 ;; (system "bin/tests/system/ifconfig.sh up")))
133 (replace 'check
134 (lambda _
135 (zero? (system* "make" "force-test")))))))
136 (synopsis "An implementation of the Domain Name System")
366efcb2
TGR
137 (description "BIND is an implementation of the @dfn{Domain Name System}
138(DNS) protocols for the Internet. It is a reference implementation of those
be86b7ad
JD
139protocols, but it is also production-grade software, suitable for use in
140high-volume and high-reliability applications. The name BIND stands for
141\"Berkeley Internet Name Domain\", because the software originated in the early
1421980s at the University of California at Berkeley.")
143 (home-page "https://www.isc.org/downloads/bind")
1e744399 144 (license (list license:isc))))
be86b7ad 145
d24727c0
MB
146(define-public dnscrypt-proxy
147 (package
148 (name "dnscrypt-proxy")
602d70f3 149 (version "1.9.4")
d24727c0
MB
150 (source (origin
151 (method url-fetch)
152 (uri (string-append
153 "https://download.dnscrypt.org/dnscrypt-proxy/"
154 "dnscrypt-proxy-" version ".tar.bz2"))
155 (sha256
156 (base32
602d70f3 157 "07piwsjczamwvdpv1585kg4awqakip51bwsm8nqi6bljww4agx7x"))
d24727c0
MB
158 (modules '((guix build utils)))
159 (snippet
160 ;; Delete bundled libltdl. XXX: This package also bundles
161 ;; a modified libevent that cannot currently be removed.
162 '(delete-file-recursively "libltdl"))))
163 (build-system gnu-build-system)
164 (arguments
165 `(#:phases
166 (modify-phases %standard-phases
167 (add-before 'configure 'autoreconf
168 (lambda _
169 ;; Re-generate build files due to unbundling ltdl.
170 ;; TODO: Prevent generating new libltdl and building it.
171 ;; The system version is still favored and referenced.
172 (zero? (system* "autoreconf" "-vif")))))))
173 (native-inputs
174 `(("pkg-config" ,pkg-config)
175 ("automake" ,automake)
176 ("autoconf" ,autoconf)
177 ("libtool" ,libtool)))
178 (inputs
179 `(("libltdl" ,libltdl)
180 ("libsodium" ,libsodium)))
181 (home-page "https://www.dnscrypt.org/")
182 (synopsis "Securely send DNS requests to a remote server")
183 (description
184 "@command{dnscrypt-proxy} is a tool for securing communications
185between a client and a DNS resolver. It verifies that responses you get
186from a DNS provider was actually sent by that provider, and haven't been
187tampered with. For optimal performance it is recommended to use this as
188a forwarder for a caching DNS resolver such as @command{dnsmasq}, but it
189can also be used as a normal DNS \"server\". A list of public dnscrypt
190servers is included, and an up-to-date version is available at
191@url{https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv}.")
192 (license (list license:isc
193 ;; Libevent and src/ext/queue.h is 3-clause BSD.
194 license:bsd-3))))
195
afe62a8b
MB
196(define-public dnscrypt-wrapper
197 (package
198 (name "dnscrypt-wrapper")
199 (version "0.2.2")
200 (source (origin
201 (method url-fetch)
202 (uri (string-append
203 "https://github.com/cofyc/dnscrypt-wrapper/releases"
204 "/download/v" version "/" name "-v" version ".tar.bz2"))
205 (sha256
206 (base32
207 "1vhg4g0r687f51wcdn7z9w1hxapazx6vyh5rsr8wa48sljzd583g"))))
208 (build-system gnu-build-system)
209 (arguments
210 `(#:make-flags '("CC=gcc")
211 ;; TODO: Tests require ruby-cucumber and ruby-aruba.
212 #:tests? #f
213 #:phases
214 (modify-phases %standard-phases
215 (add-before 'configure 'create-configure
216 (lambda _
217 (zero? (system* "make" "configure")))))))
218 (native-inputs
219 `(("autoconf" ,autoconf)))
220 (inputs
221 `(("libevent" ,libevent)
222 ("libsodium" ,libsodium)))
223 (home-page "https://github.com/Cofyc/dnscrypt-wrapper")
224 (synopsis "Server-side dnscrypt proxy")
225 (description
226 "@command{dnscrypt-wrapper} is a tool to expose a name server over
227the @code{dnscrypt} protocol. It can be used as an endpoint for the
228@command{dnscrypt-proxy} client to securely tunnel DNS requests between
229the two.")
230 (license (list license:isc
231 ;; Bundled argparse is MIT. TODO: package and unbundle.
232 license:expat
233 ;; dns-protocol.h and rfc1035.{c,h} is gpl2 or gpl3 (either).
234 license:gpl2
235 license:gpl3))))
236
71f048c6 237(define-public libasr
238 (package
239 (name "libasr")
240 (version "201602131606")
241 (source
242 (origin
243 (method url-fetch)
244 (uri (string-append "https://www.opensmtpd.org/archives/"
245 name "-" version ".tar.gz"))
246 (sha256
247 (base32
248 "18kdmbjsxrfai16d66qslp48b1zf7gr8him2jj5dcqgbsl44ls75"))))
249 (build-system gnu-build-system)
250 (native-inputs
251 `(("autoconf" ,autoconf)
252 ("automake" ,automake)
253 ("pkg-config" ,pkg-config)
254 ("groff" ,groff)))
255 (home-page "https://www.opensmtpd.org")
256 (synopsis "Asynchronous resolver library by the OpenBSD project")
257 (description
258 "libasr is a free, simple and portable asynchronous resolver library.
259It allows to run DNS queries and perform hostname resolutions in a fully
260asynchronous fashion.")
261 (license (list license:isc
262 license:bsd-2 ; last part of getrrsetbyname_async.c
263 license:bsd-3
264 (license:non-copyleft "file://LICENSE") ; includes.h
265 license:openssl))))
6cf626e8
TGR
266
267(define-public yadifa
268 (package
269 (name "yadifa")
8769d482 270 (version "2.2.3")
6cf626e8 271 (source
8769d482
TGR
272 (let ((revision "6711"))
273 (origin
274 (method url-fetch)
275 (uri
276 (string-append "http://cdn.yadifa.eu/sites/default/files/releases/"
277 name "-" version "-" revision ".tar.gz"))
278 (sha256
279 (base32
280 "0ikfm40gx0zjw3gnxsw3rn1k4wb8jacgklja3ygcj1knq6hy2zaa")))))
6cf626e8
TGR
281 (build-system gnu-build-system)
282 (native-inputs
283 `(("which" ,which)))
284 (inputs
285 `(("openssl" ,openssl)))
286 (arguments
287 `(#:phases (modify-phases %standard-phases
288 (add-before 'configure 'omit-example-configurations
289 (lambda _ (substitute* "Makefile.in"
290 ((" (etc|var)") "")))))
291 #:configure-flags (list "--sysconfdir=/etc" "--localstatedir=/var"
292 "--enable-shared" "--disable-static"
293 "--enable-messages" "--enable-ctrl"
4d2fd1c0
TGR
294 "--enable-nsec" "--enable-nsec3"
295 "--enable-tsig" "--enable-caching"
6cf626e8
TGR
296 ;; NSID is a rarely-used debugging aid, that also
297 ;; causes the build to fail. Just disable it.
298 "--disable-nsid")))
299 (home-page "http://www.yadifa.eu/")
300 (synopsis "Authoritative DNS name server")
366efcb2
TGR
301 (description "YADIFA is an authoritative name server for the @dfn{Domain
302Name System} (DNS). It aims for both higher performance and a smaller memory
6cf626e8 303footprint than other implementations, while remaining fully RFC-compliant.
366efcb2
TGR
304YADIFA supports dynamic record updates and the @dfn{Domain Name System Security
305Extensions} (DNSSEC).")
6cf626e8 306 (license license:bsd-3)))