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