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