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