gnu: Rename module gnutls to tls.
[jackhill/guix/guix.git] / gnu / packages / admin.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
6 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
7 ;;; Copyright © 2015 Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages admin)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix utils)
28 #:use-module (guix download)
29 #:use-module (guix git-download)
30 #:use-module (guix build-system cmake)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system trivial)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages ncurses)
36 #:use-module (gnu packages readline)
37 #:use-module (gnu packages linux)
38 #:use-module (gnu packages guile)
39 #:use-module (gnu packages gettext)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages tcl)
42 #:use-module (gnu packages compression)
43 #:use-module ((gnu packages openssl) #:prefix o:)
44 #:use-module (gnu packages tls)
45 #:use-module (gnu packages gnupg)
46 #:use-module (gnu packages bison)
47 #:use-module (gnu packages flex)
48 #:use-module (gnu packages glib)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages popt)
51 #:use-module (gnu packages texinfo)
52 #:use-module (gnu packages groff)
53 #:use-module (gnu packages pciutils)
54 #:use-module (gnu packages libusb)
55 #:use-module (gnu packages libftdi)
56 #:use-module (gnu packages image)
57 #:use-module (gnu packages xorg)
58 #:use-module (gnu packages python)
59 #:use-module (gnu packages man))
60
61 (define-public dmd
62 (package
63 (name "dmd")
64 (version "0.2")
65 (source (origin
66 (method url-fetch)
67 (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/dmd-"
68 version ".tar.gz"))
69 (sha256
70 (base32
71 "10fl4k96f17gqx2fv8iw9c61ld26gsk4bbrlfqckdmiimz1k175z"))))
72 (build-system gnu-build-system)
73 (arguments
74 '(#:configure-flags '("--localstatedir=/var")))
75 (native-inputs `(("pkg-config" ,pkg-config)))
76 (inputs `(("guile" ,guile-2.0)))
77 (synopsis "Daemon managing daemons")
78 (description
79 "GNU DMD is a daemon-managing daemon, meaning that it manages the
80 execution of system services, replacing similar functionality found in
81 typical init systems. It provides dependency-handling through a convenient
82 interface and is based on GNU Guile.")
83 (license license:gpl3+)
84 (home-page "http://www.gnu.org/software/dmd/")))
85
86 (define-public dfc
87 (package
88 (name "dfc")
89 (version "3.0.4")
90 (source
91 (origin
92 (method url-fetch)
93 (uri (string-append
94 "http://projects.gw-computing.net/attachments/download/79/dfc-"
95 version ".tar.gz"))
96 (sha256
97 (base32
98 "0zk1ppx93ijimf4sbgqilxxikpsa2gmpbynknyh41xy7jbdjxp0b"))))
99 (build-system cmake-build-system)
100 (arguments '(#:tests? #f)) ; There are no tests.
101 (native-inputs `(("gettext" ,gnu-gettext)))
102 (home-page "http://projects.gw-computing.net/projects/dfc")
103 (synopsis "Display file system space usage using graphs and colors")
104 (description
105 "dfc (df color) is a modern version of df. It uses colors, draws pretty
106 graphs and can export its output to different formats.")
107 (license license:bsd-3)))
108
109 (define-public htop
110 (package
111 (name "htop")
112 (version "1.0.3")
113 (source (origin
114 (method url-fetch)
115 (uri (string-append "http://hisham.hm/htop/releases/"
116 version "/htop-" version ".tar.gz"))
117 (sha256
118 (base32
119 "0a8qbpsifzjwc4f45xfwm48jhm59g6q5hlib4bf7z13mgy95fp05"))))
120 (build-system gnu-build-system)
121 (inputs
122 `(("ncurses" ,ncurses)))
123 (home-page "http://htop.sourceforge.net/")
124 (synopsis "Interactive process viewer")
125 (description
126 "This is htop, an interactive process viewer. It is a text-mode
127 application (for console or X terminals) and requires ncurses.")
128 (license license:gpl2)))
129
130 (define-public pies
131 (package
132 (name "pies")
133 (version "1.2")
134 (source
135 (origin
136 (method url-fetch)
137 (uri (string-append "mirror://gnu/pies/pies-"
138 version ".tar.bz2"))
139 (sha256
140 (base32
141 "18w0dbg77i56cx1bwa789w0qi3l4xkkbascxcv2b6gbm0zmjg1g6"))))
142 (build-system gnu-build-system)
143 (home-page "http://www.gnu.org/software/pies/")
144 (synopsis "Program invocation and execution supervisor")
145 (description
146 "GNU pies is a program that supervises the invocation and execution of
147 other programs. It reads the list of programs to be started from its
148 configuration file, executes them, and then monitors their status,
149 re-executing them as necessary.")
150 (license license:gpl3+)))
151
152 (define-public inetutils
153 (package
154 (name "inetutils")
155 (version "1.9.4")
156 (source (origin
157 (method url-fetch)
158 (uri (string-append "mirror://gnu/inetutils/inetutils-"
159 version ".tar.gz"))
160 (sha256
161 (base32
162 "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
163 (build-system gnu-build-system)
164 (arguments `(;; FIXME: `tftp.sh' relies on `netstat' from utils-linux,
165 ;; which is currently missing.
166 #:tests? #f))
167 (inputs `(("ncurses" ,ncurses)
168 ("readline" ,readline))) ; for 'ftp'
169 (home-page "http://www.gnu.org/software/inetutils/")
170 (synopsis "Basic networking utilities")
171 (description
172 "Inetutils is a collection of common network programs, such as an ftp
173 client and server, a telnet client and server, and an rsh client and server.")
174 (license license:gpl3+)))
175
176 (define-public shadow
177 (package
178 (name "shadow")
179 (version "4.1.5.1")
180 (source (origin
181 ;; Shadow has no real upstream, and not even tarballs.
182 ;; See <https://lists.gnu.org/archive/html/guix-devel/2014-03/msg00233.html>.
183 (method git-fetch)
184 (uri (git-reference
185 (url "git://git.debian.org/git/pkg-shadow/shadow")
186 (commit (string-append "upstream/" version))))
187 (sha256
188 (base32
189 "1xx85d83kmacmjzqbamgydcjkwsqd5fi1s2wgwx6myq5wa39qx0n"))))
190 (build-system gnu-build-system)
191 (arguments
192 '(;; Assume System V `setpgrp (void)', which is the default on GNU
193 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
194 #:configure-flags '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
195
196 #:phases (alist-cons-before
197 'build 'set-nscd-file-name
198 (lambda* (#:key inputs #:allow-other-keys)
199 ;; Use the right file name for nscd.
200 (let ((libc (assoc-ref inputs "libc")))
201 (substitute* "lib/nscd.c"
202 (("/usr/sbin/nscd")
203 (string-append libc "/sbin/nscd")))))
204 (alist-cons-after
205 'install 'remove-groups
206 (lambda* (#:key outputs #:allow-other-keys)
207 ;; Remove `groups', which is already provided by Coreutils.
208 (let* ((out (assoc-ref outputs "out"))
209 (bin (string-append out "/bin"))
210 (man (string-append out "/share/man/man1")))
211 (delete-file (string-append bin "/groups"))
212 (for-each delete-file (find-files man "^groups\\."))
213 #t))
214 %standard-phases))))
215
216 (inputs (if (string-suffix? "-linux"
217 (or (%current-target-system)
218 (%current-system)))
219 `(("linux-pam" ,linux-pam))
220 '()))
221 (home-page "http://pkg-shadow.alioth.debian.org/")
222 (synopsis "Authentication-related tools such as passwd, su, and login")
223 (description
224 "Shadow provides a number of authentication-related tools, including:
225 login, passwd, su, groupadd, and useradd.")
226
227 ;; The `vipw' program is GPLv2+.
228 ;; libmisc/salt.c is public domain.
229 (license license:bsd-3)))
230
231 (define-public mingetty
232 (package
233 (name "mingetty")
234 (version "1.08")
235 (source (origin
236 (method url-fetch)
237 (uri (string-append "mirror://sourceforge/mingetty/mingetty-"
238 version ".tar.gz"))
239 (sha256
240 (base32
241 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
242 (build-system gnu-build-system)
243 (arguments
244 `(#:phases (alist-replace 'configure
245 (lambda* (#:key inputs outputs
246 #:allow-other-keys)
247 (let* ((out (assoc-ref outputs "out"))
248 (man8 (string-append
249 out "/share/man/man8"))
250 (sbin (string-append out "/sbin"))
251 (shadow (assoc-ref inputs "shadow"))
252 (login (string-append shadow
253 "/bin/login")))
254 (substitute* "Makefile"
255 (("^SBINDIR.*")
256 (string-append "SBINDIR = " out
257 "/sbin\n"))
258 (("^MANDIR.*")
259 (string-append "MANDIR = " out
260 "/share/man/man8\n")))
261
262 ;; Pick the right 'login' by default.
263 (substitute* "mingetty.c"
264 (("\"/bin/login\"")
265 (string-append "\"" login "\"")))
266
267 (mkdir-p sbin)
268 (mkdir-p man8)))
269 %standard-phases)
270 #:tests? #f)) ; no tests
271 (inputs `(("shadow" ,shadow)))
272
273 (home-page "http://sourceforge.net/projects/mingetty")
274 (synopsis "Getty for the text console")
275 (description
276 "Small console getty that is started on the Linux text console,
277 asks for a login name and then transfers over to 'login'. It is extended to
278 allow automatic login and starting any app.")
279 (license license:gpl2+)))
280
281 (define-public net-base
282 (package
283 (name "net-base")
284 (version "5.3")
285 (source (origin
286 (method url-fetch)
287 (uri (string-append
288 "mirror://debian/pool/main/n/netbase/netbase_"
289 version ".tar.xz"))
290 (sha256
291 (base32
292 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
293 (build-system trivial-build-system)
294 (arguments
295 `(#:modules ((guix build utils))
296 #:builder (begin
297 (use-modules (guix build utils)
298 (srfi srfi-26))
299
300 (let* ((source (assoc-ref %build-inputs "source"))
301 (tar (assoc-ref %build-inputs "tar"))
302 (xz (assoc-ref %build-inputs "xz"))
303 (output (assoc-ref %outputs "out"))
304 (etc (string-append output "/etc")))
305 (setenv "PATH" (string-append xz "/bin"))
306 (system* (string-append tar "/bin/tar") "xvf"
307 source)
308 (chdir ,(string-append "netbase-" version))
309 (mkdir-p etc)
310 (for-each copy-file
311 '("etc-services" "etc-protocols" "etc-rpc")
312 (map (cut string-append etc "/" <>)
313 '("services" "protocols" "rpc")))
314 #t))))
315 (native-inputs `(("tar" ,tar)
316 ("xz" ,xz)))
317 (synopsis "IANA protocol, port, and RPC number assignments")
318 (description
319 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
320 files, which contain information about the IANA-assigned port, protocol, and
321 ONC RPC numbers")
322 (home-page "http://packages.debian.org/sid/netbase")
323 (license license:gpl2)))
324
325 (define-public netcat
326 (package
327 (name "netcat")
328 (version "0.7.1")
329 (source (origin
330 (method url-fetch)
331 (uri (string-append "mirror://sourceforge/netcat/netcat-"
332 version ".tar.bz2"))
333 (sha256
334 (base32
335 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
336 (build-system gnu-build-system)
337 (arguments
338 `(#:configure-flags
339 ;; By default, man and info pages are put in PREFIX/{man,info},
340 ;; but we want them in PREFIX/share/{man,info}.
341 (let ((out (assoc-ref %outputs "out")))
342 (list (string-append "--mandir=" out "/share/man")
343 (string-append "--infodir=" out "/share/info")))))
344 (home-page "http://netcat.sourceforge.net")
345 (synopsis "Read and write data over TCP/IP")
346 (description
347 "Netcat is a featured networking utility which reads and writes data
348 across network connections, using the TCP/IP protocol. It is designed to be a
349 reliable \"back-end\" tool that can be used directly or easily driven by other
350 programs and scripts. At the same time, it is a feature-rich network debugging
351 and exploration tool, since it can create almost any kind of connection you
352 would need and has several interesting built-in capabilities.")
353 (license license:gpl2+)))
354
355 (define-public alive
356 (package
357 (name "alive")
358 (version "2.0.2")
359 (source (origin
360 (method url-fetch)
361 (uri (string-append "mirror://gnu/alive/alive-"
362 version ".tar.xz"))
363 (sha256
364 (base32
365 "1vrzg51ai68x9yld7vbgl58sxaw5qpx8rbakwcxn4cqq6vpxj38j"))))
366 (build-system gnu-build-system)
367 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
368 (inputs `(("guile" ,guile-2.0)
369 ("inetutils" ,inetutils)))
370 (home-page "http://www.gnu.org/software/alive/")
371 (synopsis "Autologin and keep-alive daemon")
372 (description
373 "GNU Alive sends periodic pings to a server, generally to keep a
374 connection alive.")
375 (license license:gpl3+)))
376
377 (define-public isc-dhcp
378 (package
379 (name "isc-dhcp")
380 (version "4.3.1")
381 (source (origin
382 (method url-fetch)
383 (uri (string-append "http://ftp.isc.org/isc/dhcp/"
384 version "/dhcp-" version ".tar.gz"))
385 (sha256
386 (base32
387 "1w4s7sni1m9223ya8m2a64lr62845c6xlraprjf8zfx6lylbqv16"))))
388 (build-system gnu-build-system)
389 (arguments
390 '(#:phases (alist-cons-after
391 'configure 'post-configure
392 (lambda* (#:key outputs #:allow-other-keys)
393 ;; Point to the right client script, which will be
394 ;; installed in a later phase.
395 (substitute* "includes/dhcpd.h"
396 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
397 (let ((out (assoc-ref outputs "out")))
398 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
399 out "/libexec/dhclient-script"
400 "\"\n"))))
401
402 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
403 ;; we must patch shebangs in there and make sure the right
404 ;; shell is used.
405 (with-directory-excursion "bind"
406 (substitute* "Makefile"
407 (("\\./configure")
408 (let ((sh (which "sh")))
409 (string-append "./configure CONFIG_SHELL="
410 sh " SHELL=" sh))))
411
412 (system* "tar" "xf" "bind.tar.gz")
413 (for-each patch-shebang
414 (find-files "bind-9.9.5-P1" ".*"))
415 (zero? (system* "tar" "cf" "bind.tar.gz"
416 "bind-9.9.5-P1"))))
417 (alist-cons-after
418 'install 'post-install
419 (lambda* (#:key inputs outputs #:allow-other-keys)
420 ;; Install the dhclient script for GNU/Linux and make sure
421 ;; if finds all the programs it needs.
422 (let* ((out (assoc-ref outputs "out"))
423 (libexec (string-append out "/libexec"))
424 (coreutils (assoc-ref inputs "coreutils"))
425 (inetutils (assoc-ref inputs "inetutils"))
426 (net-tools (assoc-ref inputs "net-tools"))
427 (sed (assoc-ref inputs "sed")))
428 (substitute* "client/scripts/linux"
429 (("/sbin/ip")
430 (string-append (assoc-ref inputs "iproute")
431 "/sbin/ip")))
432
433 (mkdir-p libexec)
434 (copy-file "client/scripts/linux"
435 (string-append libexec "/dhclient-script"))
436
437 (wrap-program
438 (string-append libexec "/dhclient-script")
439 `("PATH" ":" prefix
440 ,(map (lambda (dir)
441 (string-append dir "/bin:"
442 dir "/sbin"))
443 (list inetutils net-tools coreutils sed))))))
444 %standard-phases))))
445
446 (native-inputs `(("perl" ,perl)))
447
448 (inputs `(("inetutils" ,inetutils)
449 ("net-tools" ,net-tools)
450 ("iproute" ,iproute)
451
452 ;; When cross-compiling, we need the cross Coreutils and sed.
453 ;; Otherwise just use those from %FINAL-INPUTS.
454 ,@(if (%current-target-system)
455 `(("coreutils" ,coreutils)
456 ("sed" ,sed))
457 '())))
458
459 (home-page "http://www.isc.org/products/DHCP/")
460 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
461 (description
462 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
463 reference implementation of all aspects of DHCP, through a suite of DHCP
464 tools: server, client, and relay agent.")
465 (license license:isc)))
466
467 (define-public libpcap
468 (package
469 (name "libpcap")
470 (version "1.5.3")
471 (source (origin
472 (method url-fetch)
473 (uri (string-append "http://www.tcpdump.org/release/libpcap-"
474 version ".tar.gz"))
475 (sha256
476 (base32
477 "14wyjywrdi1ikaj6yc9c72m6m2r64z94lb0gm7k1a3q6q5cj3scs"))))
478 (build-system gnu-build-system)
479 (native-inputs `(("bison" ,bison) ("flex" ,flex)))
480 (arguments '(#:tests? #f)) ; no 'check' target
481 (home-page "http://www.tcpdump.org")
482 (synopsis "Network packet capture library")
483 (description
484 "libpcap is an interface for user-level packet capture. It provides a
485 portable framework for low-level network monitoring. Applications include
486 network statistics collection, security monitoring, network debugging, etc.")
487
488 ;; fad-*.c and a couple other files are BSD-4, but the rest is BSD-3.
489 (license license:bsd-3)))
490
491 (define-public tcpdump
492 (package
493 (name "tcpdump")
494 (version "4.5.1")
495 (source (origin
496 (method url-fetch)
497 (uri (string-append "http://www.tcpdump.org/release/tcpdump-"
498 version ".tar.gz"))
499 (sha256
500 (base32
501 "15hb7zkzd66nag102qbv100hcnf7frglbkylmr8adwr8f5jkkaql"))))
502 (build-system gnu-build-system)
503 (inputs `(("libpcap" ,libpcap)
504 ("openssl" ,o:openssl)))
505 (native-inputs `(("perl" ,perl))) ; for tests
506 (home-page "http://www.tcpdump.org/")
507 (synopsis "Network packet analyzer")
508 (description
509 "Tcpdump is a command-line tool to analyze network traffic passing
510 through the network interface controller.")
511 (license license:bsd-3)))
512
513 (define-public jnettop
514 (package
515 (name "jnettop")
516 (version "0.13.0")
517 (source (origin
518 (method url-fetch)
519 (uri (string-append "http://jnettop.kubs.info/dist/jnettop-"
520 version ".tar.gz"))
521 (sha256
522 (base32
523 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
524 (build-system gnu-build-system)
525 (native-inputs
526 `(("pkg-config" ,pkg-config)))
527 (inputs
528 `(("glib" ,glib)
529 ("ncurses" ,ncurses)
530 ("libpcap" ,libpcap)))
531 (home-page "http://jnettop.kubs.info/")
532 (synopsis "Visualize network traffic by bandwidth use")
533 (description
534 "Jnettop is a traffic visualiser, which captures traffic going
535 through the host it is running from and displays streams sorted
536 by bandwidth they use.")
537 (license license:gpl2+)))
538
539 (define-public clusterssh
540 (package
541 (name "clusterssh")
542 (version "3.28")
543 (source (origin
544 (method url-fetch)
545 (uri (string-append "mirror://sourceforge/clusterssh/"
546 "clusterssh-" version ".tar.gz"))
547 (sha256
548 (base32
549 "1bwggpvaj2al5blg1ynapviv2kpydffpzq2zkhi81najnvzc1rr7"))))
550 (build-system gnu-build-system)
551 (inputs `(("perl" ,perl)))
552 (propagated-inputs `(("xterm" ,xterm)
553 ("perl-tk" ,perl-tk)
554 ("perl-x11-protocol" ,perl-x11-protocol)))
555 (arguments
556 `(#:phases
557 (alist-cons-after
558 'install 'set-load-paths
559 (lambda* (#:key inputs outputs #:allow-other-keys)
560 ;; Put the perl-tk and perl-x11-protocol modules in the perl inc
561 ;; path for PROG
562 (let* ((out (assoc-ref outputs "out"))
563 (prog (string-append out "/bin/cssh"))
564 (perl-ver ,(package-version perl))
565 (x11-inc (string-append
566 (assoc-ref inputs "perl-x11-protocol")
567 "/lib/perl5/site_perl/" perl-ver))
568 (tk-inc (string-append
569 (assoc-ref inputs "perl-tk")
570 "/lib/perl5/site_perl/" perl-ver
571 "/x86_64-linux")))
572 (wrap-program
573 prog
574 `("PERL5LIB" ":" prefix (,x11-inc ,tk-inc)))))
575 %standard-phases)))
576 ;; The clusterssh.sourceforge.net address requires login to view
577 (home-page "http://sourceforge.net/projects/clusterssh/")
578 (synopsis "Secure concurrent multi-server terminal control")
579 (description
580 "ClusterSSH controls a number of xterm windows via a single graphical
581 console window to allow commands to be interactively run on multiple servers
582 over ssh connections.")
583 (license license:gpl2+)))
584
585 (define-public rottlog
586 (package
587 (name "rottlog")
588 (version "0.72.2")
589 (source (origin
590 (method url-fetch)
591 (uri (string-append "mirror://gnu/rottlog/rottlog-"
592 version ".tar.gz"))
593 (sha256
594 (base32
595 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
596 (modules '((guix build utils)))
597 (snippet
598 '(substitute* "Makefile.in"
599 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
600 ;; Don't try to chown root.
601 "")
602 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
603 ;; Don't attempt to create /var/lib/rottlog.
604 "true")))))
605 (build-system gnu-build-system)
606 (arguments
607 '(#:configure-flags (list (string-append "ROTT_ETCDIR="
608 (assoc-ref %outputs "out")
609 "/etc")
610 "--localstatedir=/var")
611 #:phases (alist-cons-after
612 'install 'install-info
613 (lambda _
614 (zero? (system* "make" "install-info")))
615 %standard-phases)))
616 (native-inputs `(("texinfo" ,texinfo)
617 ("util-linux" ,util-linux))) ; for 'cal'
618 (home-page "http://www.gnu.org/software/rottlog/")
619 (synopsis "Log rotation and management")
620 (description
621 "GNU Rot[t]log is a program for managing log files. It is used to
622 automatically rotate out log files when they have reached a given size or
623 according to a given schedule. It can also be used to automatically compress
624 and archive such logs. Rot[t]log will mail reports of its activity to the
625 system administrator.")
626 (license license:gpl3+)))
627
628 (define-public sudo
629 (package
630 (name "sudo")
631 (version "1.8.10p3")
632 (source (origin
633 (method url-fetch)
634 (uri
635 (list (string-append "http://www.sudo.ws/sudo/dist/sudo-"
636 version ".tar.gz")
637 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
638 version ".tar.gz")))
639 (sha256
640 (base32
641 "002l6h27pnhb77b65frhazbhknsxvrsnkpi43j7i0qw1lrgi7nkf"))))
642 (build-system gnu-build-system)
643 (arguments
644 `(#:configure-flags '("--with-logpath=/var/log/sudo.log"
645 "--with-rundir=/run/sudo"
646 "--with-vardir=/var/db/sudo"
647 "--with-iologdir=/var/log/sudo-io")
648 #:phases (alist-cons-before
649 'configure 'pre-configure
650 (lambda _
651 (substitute* "configure"
652 ;; Refer to the right executables.
653 (("/usr/bin/mv") (which "mv"))
654 (("/usr/bin/sh") (which "sh")))
655 (substitute* (find-files "." "Makefile\\.in")
656 (("-O [[:graph:]]+ -G [[:graph:]]+")
657 ;; Allow installation as non-root.
658 "")
659 (("^install: (.*)install-sudoers(.*)" _ before after)
660 ;; Don't try to create /etc/sudoers.
661 (string-append "install: " before after "\n"))
662 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
663 ;; Don't try to create /run/sudo.
664 "$(TMPDIR)/dummy")
665 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
666 ;; Don't try to create /var/db/sudo.
667 "$(TMPDIR)/dummy")))
668 %standard-phases)
669
670 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
671 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
672 #:tests? #f))
673 (inputs
674 `(("groff" ,groff)
675 ("linux-pam" ,linux-pam)
676 ("coreutils" ,coreutils)))
677 (home-page "http://www.sudo.ws/")
678 (synopsis "Run commands as root")
679 (description
680 "Sudo (su \"do\") allows a system administrator to delegate authority to
681 give certain users (or groups of users) the ability to run some (or all)
682 commands as root or another user while providing an audit trail of the
683 commands and their arguments.")
684
685 ;; See <http://www.sudo.ws/sudo/license.html>.
686 (license license:x11)))
687
688 (define-public wpa-supplicant-light
689 (package
690 (name "wpa-supplicant-light")
691 (version "2.4")
692 (source (origin
693 (method url-fetch)
694 (uri (string-append
695 "http://w1.fi/releases/wpa_supplicant-"
696 version
697 ".tar.gz"))
698 (sha256
699 (base32
700 "08li21q1wjn5chrv289w666il9ah1w419y3dkq2rl4wnq0rci385"))
701 (patches
702 (map search-patch '("wpa-supplicant-CVE-2015-1863.patch"
703 "wpa-supplicant-2015-2-fix.patch"
704 "wpa-supplicant-2015-3-fix.patch"
705 "wpa-supplicant-2015-4-fix-pt1.patch"
706 "wpa-supplicant-2015-4-fix-pt2.patch"
707 "wpa-supplicant-2015-4-fix-pt3.patch"
708 "wpa-supplicant-2015-4-fix-pt4.patch"
709 "wpa-supplicant-2015-4-fix-pt5.patch")))))
710 (build-system gnu-build-system)
711 (arguments
712 '(#:phases (alist-replace
713 'configure
714 (lambda* (#:key outputs #:allow-other-keys)
715 (chdir "wpa_supplicant")
716 (copy-file "defconfig" ".config")
717 (let ((port (open-file ".config" "al")))
718 (display "
719 CONFIG_DEBUG_SYSLOG=y
720
721 # Choose GnuTLS (the default is OpenSSL.)
722 CONFIG_TLS=gnutls
723
724 CONFIG_DRIVER_NL80211=y
725 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
726 CONFIG_LIBNL32=y
727 CONFIG_READLINE=y\n" port)
728 (close-port port)))
729
730 (alist-cons-after
731 'install 'install-man-pages
732 (lambda* (#:key outputs #:allow-other-keys)
733 (let* ((out (assoc-ref outputs "out"))
734 (man (string-append out "/share/man"))
735 (man5 (string-append man "/man5"))
736 (man8 (string-append man "/man8")))
737 (define (copy-man-page target)
738 (lambda (file)
739 (copy-file file
740 (string-append target "/"
741 (basename file)))))
742
743 (mkdir-p man5) (mkdir man8)
744 (for-each (copy-man-page man5)
745 (find-files "doc/docbook" "\\.5"))
746 (for-each (copy-man-page man8)
747 (find-files "doc/docbook" "\\.8"))
748 #t))
749 %standard-phases))
750
751 #:make-flags (list "CC=gcc"
752 (string-append "BINDIR=" (assoc-ref %outputs "out")
753 "/sbin")
754 (string-append "LIBDIR=" (assoc-ref %outputs "out")
755 "/lib"))
756 #:tests? #f))
757 (inputs
758 `(("readline" ,readline)
759 ("libnl" ,libnl)
760 ("gnutls" ,gnutls)
761 ("libgcrypt" ,libgcrypt))) ;needed by crypto_gnutls.c
762 (native-inputs
763 `(("pkg-config" ,pkg-config)))
764 (home-page "http://w1.fi/wpa_supplicant/")
765 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
766 (description
767 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
768 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
769 the client stations. It implements key negotiation with a WPA Authenticator
770 and it controls the roaming and IEEE 802.11 authentication/association of the
771 WLAN driver.
772
773 This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
774
775 ;; In practice, this is linked against Readline, which makes it GPLv3+.
776 (license license:bsd-3)))
777
778 (define-public wpa-supplicant
779 (package (inherit wpa-supplicant-light)
780 (name "wpa-supplicant")
781 (inputs `(("dbus" ,dbus)
782 ,@(package-inputs wpa-supplicant-light)))
783 (arguments
784 (substitute-keyword-arguments (package-arguments wpa-supplicant-light)
785 ((#:phases phases)
786 `(alist-cons-after
787 'configure 'configure-for-dbus
788 (lambda _
789 (let ((port (open-file ".config" "al")))
790 (display "
791 CONFIG_CTRL_IFACE_DBUS=y
792 CONFIG_CTRL_IFACE_DBUS_NEW=y
793 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
794 (close-port port))
795 #t)
796 (alist-cons-after
797 'install-man-pages 'install-dbus-conf
798 (lambda* (#:key outputs #:allow-other-keys)
799 (let* ((out (assoc-ref outputs "out"))
800 (dir (string-append out "/etc/dbus-1/system.d")))
801 (mkdir-p dir)
802 (copy-file "dbus/dbus-wpa_supplicant.conf"
803 (string-append dir "/wpa_supplicant.conf"))))
804 ,phases)))))))
805
806 (define-public wakelan
807 (package
808 (name "wakelan")
809 (version "1.1")
810 (source (origin
811 (method url-fetch)
812 (uri (string-append
813 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
814 version ".tar.gz"))
815 (sha256
816 (base32
817 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
818 (build-system gnu-build-system)
819 (arguments
820 '(#:phases (alist-replace
821 'configure
822 (lambda* (#:key outputs #:allow-other-keys)
823 (let ((out (assoc-ref outputs "out")))
824 (mkdir-p (string-append out "/bin"))
825 (mkdir-p (string-append out "/share/man/man1"))
826
827 ;; It's an old configure script that doesn't understand
828 ;; the extra options we pass.
829 (setenv "CONFIG_SHELL" (which "bash"))
830 (zero?
831 (system* "./configure"
832 (string-append "--prefix=" out)
833 (string-append "--mandir=" out
834 "/share/man")))))
835 %standard-phases)
836 #:tests? #f))
837 (home-page "http://kernel.org") ; really, no home page
838 (synopsis "Send a wake-on-LAN packet")
839 (description
840 "WakeLan broadcasts a properly formatted UDP packet across the local area
841 network, which causes enabled computers to power on.")
842 (license license:gpl2+)))
843
844 (define-public dmidecode
845 (package
846 (name "dmidecode")
847 (version "2.12")
848 (source (origin
849 (method url-fetch)
850 (uri (string-append
851 "mirror://savannah/dmidecode/dmidecode-"
852 version ".tar.bz2"))
853 (sha256
854 (base32
855 "122hgaw8mpqdfra159lfl6pyk3837giqx6vq42j64fjnbl2z6gwi"))))
856 (build-system gnu-build-system)
857 (arguments
858 '(#:phases (alist-delete 'configure %standard-phases)
859 #:tests? #f ; no 'check' target
860 #:make-flags (list (string-append "prefix="
861 (assoc-ref %outputs "out")))))
862 (home-page "http://www.nongnu.org/dmidecode/")
863 (synopsis "Read hardware information from the BIOS")
864 (description
865 "Dmidecode reports information about your system's hardware as described
866 in your system BIOS according to the SMBIOS/DMI standard. This typically
867 includes system manufacturer, model name, serial number, BIOS version, asset
868 tag as well as a lot of other details of varying level of interest and
869 reliability depending on the manufacturer. This will often include usage
870 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
871 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
872 (license license:gpl2+)))
873
874 (define-public acpica
875 (package
876 (name "acpica")
877 (version "20150410")
878 (source (origin
879 (method url-fetch)
880 (uri (string-append
881 "https://acpica.org/sites/acpica/files/acpica-unix2-"
882 version ".tar.gz"))
883 (sha256
884 (base32
885 "0q1fjwkyw9x6gsva6fd0zbn7ly4fx0ha4853f416np9kf2irillw"))))
886 (build-system gnu-build-system)
887 (native-inputs `(("flex" ,flex)
888 ("bison" ,bison)))
889 (arguments
890 '(#:make-flags (list (string-append "PREFIX=" %output)
891 "HOST=_LINUX"
892 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
893 #:tests? #f ; no 'check' target.
894 #:phases (alist-delete 'configure %standard-phases)))
895 (home-page "http://acpica.org/")
896 (synopsis "Tools for the development and debug of ACPI tables")
897 (description
898 "The ACPI Component Architecture (ACPICA) project provides an
899 OS-independent reference implementation of the Advanced Configuration and
900 Power Interface Specification (ACPI). ACPICA code contains those portions of
901 ACPI meant to be directly integrated into the host OS as a kernel-resident
902 subsystem, and a small set of tools to assist in developing and debugging ACPI
903 tables. This package contains only the user-space tools needed for ACPI table
904 development, not the kernel implementation of ACPI.")
905 (license license:gpl2))) ; Dual GPLv2/ACPICA Licence
906
907 (define-public stress
908 (package
909 (name "stress")
910 (version "1.0.1")
911 (source (origin
912 (method url-fetch)
913 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
914 version ".orig.tar.gz"))
915 (sha256
916 (base32
917 "1v9vnzlihqfjsxa93hdbrq72pqqk00dkylmlg8jpxhm7s1w9qfl1"))))
918 (build-system gnu-build-system)
919 (home-page "http://packages.debian.org/wheezy/stress")
920 (synopsis "Impose load on and stress test a computer system")
921 (description
922 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
923 or disk stress on a POSIX-compliant operating system and reports any errors it
924 detects.
925
926 Stress is not a benchmark. It is a tool used by system administrators to
927 evaluate how well their systems will scale, by kernel programmers to evaluate
928 perceived performance characteristics, and by systems programmers to expose
929 the classes of bugs which only or more frequently manifest themselves when the
930 system is under heavy load.")
931 (license license:gpl2+)))
932
933 (define-public detox
934 (package
935 (name "detox")
936 (version "1.2.0")
937 (source (origin
938 (method url-fetch)
939 (uri (string-append "mirror://sourceforge/detox/detox-"
940 version ".tar.bz2"))
941 (sha256
942 (base32
943 "1y6vvjqsg54kl49cry73jbfhr04s7wjs779vrr9zrq6kww7dkymb"))))
944 (build-system gnu-build-system)
945 ;; Both flex and popt are used in this case for their runtime libraries
946 ;; (libfl and libpopt).
947 (inputs
948 `(("flex" ,flex)
949 ("popt" ,popt)))
950 (arguments
951 `(#:configure-flags `(,(string-append "--with-popt="
952 (assoc-ref %build-inputs "popt")))
953 #:tests? #f)) ;no 'check' target
954 (home-page "http://detox.sourceforge.net")
955 (synopsis "Clean up filenames")
956 (description
957 "Detox is a program that renames files to make them easier to work with
958 under Unix and related operating systems. Spaces and various other unsafe
959 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
960 characters can be replaced as well, as can UTF-8 characters.")
961 (license license:bsd-3)))
962
963 (define-public testdisk
964 (package
965 (name "testdisk")
966 (version "6.14")
967 (source (origin
968 (method url-fetch)
969 (uri (string-append "http://www.cgsecurity.org/testdisk-"
970 version ".tar.bz2"))
971 (sha256
972 (base32
973 "0v1jap83f5h99zv01v3qmqm160d36n4ysi0gyq7xzb3mqgmw75x5"))))
974 (build-system gnu-build-system)
975 (inputs
976 `(;; ("ntfs" ,ntfs)
977 ("util-linux" ,util-linux)
978 ("openssl" ,o:openssl)
979 ("zlib" ,zlib)
980 ("e2fsprogs" ,e2fsprogs)
981 ("libjpeg" ,libjpeg)
982 ("ncurses" ,ncurses)))
983 (home-page "http://www.cgsecurity.org/wiki/TestDisk")
984 (synopsis "Data recovery tool")
985 (description
986 "TestDisk is a program for data recovery, primarily designed to help
987 recover lost partitions and/or make non-booting disks bootable again.")
988 (license license:gpl2+)))
989
990 (define-public tree
991 (package
992 (name "tree")
993 (version "1.7.0")
994 (source (origin
995 (method url-fetch)
996 (uri (string-append
997 "http://mama.indstate.edu/users/ice/tree/src/tree-"
998 version ".tgz"))
999 (sha256
1000 (base32 "04kviw799qxly08zb8n5mgxfd96gyis6x69q2qiw86jnh87c4mv9"))))
1001 (build-system gnu-build-system)
1002 (arguments
1003 '(#:phases (alist-delete 'configure %standard-phases)
1004 #:tests? #f ; no check target
1005 #:make-flags (let ((out (assoc-ref %outputs "out")))
1006 (list (string-append "prefix=" out)))))
1007 (synopsis "Recursively list the contents of a directory")
1008 (description
1009 "Tree is a recursive directory listing command that produces a depth
1010 indented listing of files, which is colorized ala dircolors if the LS_COLORS
1011 environment variable is set and output is to tty.")
1012 (home-page "http://mama.indstate.edu/users/ice/tree/")
1013 (license license:gpl2+)))
1014
1015 (define-public direvent
1016 (package
1017 (name "direvent")
1018 (version "5.0")
1019 (source (origin
1020 (method url-fetch)
1021 (uri (string-append "mirror://gnu/direvent/direvent-"
1022 version ".tar.gz"))
1023 (sha256
1024 (base32
1025 "1i14131y6m8wvirz6piw4zxz2q1kbpl0lniv5kl55rx4k372dg8z"))
1026 (modules '((guix build utils)))
1027 (snippet '(substitute* "tests/testsuite"
1028 (("#![[:blank:]]?/bin/sh")
1029 "#!$SHELL")))))
1030 (build-system gnu-build-system)
1031 (arguments
1032 '(#:phases (alist-cons-before
1033 'build 'patch-/bin/sh
1034 (lambda* (#:key inputs #:allow-other-keys)
1035 ;; Use the right shell when executing the watcher.
1036 (let ((bash (assoc-ref inputs "bash")))
1037 (substitute* "src/direvent.c"
1038 (("\"/bin/sh\"")
1039 (string-append "\"" bash "/bin/sh\"")))))
1040 %standard-phases)))
1041 (home-page "http://www.gnu.org/software/direvent/")
1042 (synopsis "Daemon to monitor directories for events such as file removal")
1043 (description
1044 "A daemon that monitors directories for events, such as creating,
1045 deleting or modifying files. It can monitor different sets of directories for
1046 different events. When an event is detected, direvent calls a specified
1047 external program with information about the event, such as the location
1048 within the file system where it occurred. Thus, \"direvent\" provides an
1049 easy way to react immediately if given files undergo changes, for example, to
1050 track changes in important system configuration files.")
1051 (license license:gpl3+)))
1052
1053 (define-public libcap-ng
1054 (package
1055 (name "libcap-ng")
1056 (version "0.7.4")
1057 (source (origin
1058 (method url-fetch)
1059 (uri (string-append
1060 "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
1061 version ".tar.gz"))
1062 (sha256
1063 (base32
1064 "0ssvnh4cvhya0c1j6k6192zvqcq7nc0x01fb5nwhr0prfqr0i8j8"))))
1065 (build-system gnu-build-system)
1066 (inputs `(("python" ,python)))
1067 (home-page "http://people.redhat.com/sgrubb/libcap-ng/")
1068 (synopsis "Library for more easily working with POSIX capabilities")
1069 (description
1070 "The libcap-ng library is intended to make programming with POSIX
1071 capabilities easier than the traditional libcap library. It includes
1072 utilities that can analyse all currently running applications and print out
1073 any capabilities and whether or not it has an open ended bounding set. The
1074 included utilities are designed to let admins and developers spot apps from
1075 various ways that may be running with too much privilege.")
1076 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
1077 (license (list license:lgpl2.1+ license:gpl2+))))
1078
1079 (define-public smartmontools
1080 (package
1081 (name "smartmontools")
1082 (version "6.3")
1083 (source (origin
1084 (method url-fetch)
1085 (uri (string-append
1086 "mirror://sourceforge/smartmontools/smartmontools/"
1087 version "/smartmontools-" version ".tar.gz"))
1088 (sha256
1089 (base32
1090 "06gy71jh2d3gcfmlbbrsqw7215knkfq59q3j6qdxfrar39fhcxx7"))))
1091 (build-system gnu-build-system)
1092 (inputs `(("libcap-ng" ,libcap-ng)))
1093 (home-page "http://www.smartmontools.org/")
1094 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
1095 (description
1096 "The smartmontools package contains utility programs to control and
1097 monitor storage systems using the Self-Monitoring, Analysis and Reporting
1098 Technology System (S.M.A.R.T.) built into most modern ATA and SCSI harddisks.
1099 In many cases, these utilities will provide advanced warning of disk
1100 degradation and failure.")
1101 (license license:gpl2+)))
1102
1103 (define-public fdupes
1104 (package
1105 (name "fdupes")
1106 (version "1.51")
1107 (source
1108 (origin
1109 (method url-fetch)
1110 (uri (string-append
1111 "https://github.com/adrianlopezroche/fdupes/archive/fdupes-"
1112 version ".tar.gz"))
1113 (sha256
1114 (base32
1115 "11j96vxl9vg3jsnxqxskrv3gad6dh7hz2zpyc8n31xzyxka1c7kn"))))
1116 (build-system gnu-build-system)
1117 (arguments
1118 '(#:phases (alist-delete 'configure %standard-phases)
1119 #:tests? #f ; no 'check' target
1120 #:make-flags (list (string-append "PREFIX="
1121 (assoc-ref %outputs "out")))))
1122 (home-page "https://github.com/adrianlopezroche/fdupes")
1123 (synopsis "Identify duplicate files")
1124 (description
1125 "fdupes is a program for identifying duplicate files residing within
1126 specified directories.")
1127 (license license:expat)))