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