gnu: Update URLs for sourceforge.net.
[jackhill/guix/guix.git] / gnu / packages / admin.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014, 2015, 2016 Eric Bavier <bavier@member.fsf.org>
6 ;;; Copyright © 2015, 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
7 ;;; Copyright © 2015 Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
8 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
9 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
10 ;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl>
11 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2016 Peter Feigl <peter.feigl@nexoid.at>
14 ;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net>
15 ;;;
16 ;;; This file is part of GNU Guix.
17 ;;;
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
22 ;;;
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
27 ;;;
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30
31 (define-module (gnu packages admin)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix packages)
34 #:use-module (guix utils)
35 #:use-module (guix download)
36 #:use-module (guix git-download)
37 #:use-module (guix build-system cmake)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system python)
40 #:use-module (guix build-system trivial)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages cyrus-sasl)
44 #:use-module (gnu packages ncurses)
45 #:use-module (gnu packages readline)
46 #:use-module (gnu packages linux)
47 #:use-module (gnu packages lua)
48 #:use-module (gnu packages guile)
49 #:use-module (gnu packages gettext)
50 #:use-module (gnu packages pcre)
51 #:use-module (gnu packages perl)
52 #:use-module (gnu packages tcl)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages tls)
55 #:use-module (gnu packages gnupg)
56 #:use-module (gnu packages bison)
57 #:use-module (gnu packages flex)
58 #:use-module (gnu packages glib)
59 #:use-module (gnu packages openldap)
60 #:use-module (gnu packages mcrypt)
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages popt)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages texinfo)
65 #:use-module (gnu packages groff)
66 #:use-module (gnu packages pciutils)
67 #:use-module (gnu packages libusb)
68 #:use-module (gnu packages libftdi)
69 #:use-module (gnu packages image)
70 #:use-module (gnu packages xorg)
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages man)
73 #:use-module (gnu packages autotools))
74
75 (define-public aide
76 (package
77 (name "aide")
78 (version "0.15.1")
79 (source (origin
80 (method url-fetch)
81 (uri (string-append "mirror://sourceforge/aide/aide/"
82 version "/aide-" version ".tar.gz"))
83 (sha256
84 (base32
85 "1vsrc0s62kv1i84skm6k6zy868gayjck268qwj38rpspc8c5qgih"))))
86 (build-system gnu-build-system)
87 (native-inputs
88 `(("bison" ,bison)
89 ("flex" ,flex)))
90 (inputs
91 `(("libgcrypt" ,libgcrypt)
92 ("libgpg-error" ,libgpg-error)
93 ("libmhash" ,libmhash)
94 ("zlib" ,zlib)))
95 (synopsis "File and directory integrity checker")
96 (description
97 "AIDE (Advanced Intrusion Detection Environment) is a file and directory
98 integrity checker. It creates a database from the regular expression rules
99 that it finds from its configuration files. Once this database is initialized
100 it can be used to verify the integrity of the files. It has several message
101 digest algorithms that are used to check the integrity of files. All of the
102 usual file attributes can be checked for inconsistencies.")
103 (home-page "http://aide.sourceforge.net/")
104 (license license:gpl2+)))
105
106 (define-public progress
107 (package
108 (name "progress")
109 (version "0.13")
110 (source (origin
111 (method url-fetch)
112 (uri (string-append "https://github.com/Xfennec/"
113 name "/archive/v" version ".tar.gz"))
114 (sha256
115 (base32 "133iar4vq5vlklydb4cyazjy6slmpbndrws474mg738bd8avc30n"))
116 (file-name (string-append name "-" version ".tar.gz"))))
117 (build-system gnu-build-system)
118 (inputs
119 `(("ncurses" ,ncurses)))
120 (arguments
121 `(#:tests? #f ; There is no test suite.
122 #:make-flags (list "CC=gcc" "LDFLAGS+=-lncurses"
123 (string-append "PREFIX=" (assoc-ref %outputs "out")))
124 #:phases
125 (modify-phases %standard-phases
126 (delete 'configure)))) ; There's no configure phase.
127 (home-page "https://github.com/Xfennec/progress")
128 (synopsis "Program to view the progress of the coreutils commands")
129 (description "A program that looks for coreutils basic commands (cp, mv,
130 dd, tar, gzip/gunzip, cat, etc.) currently running on your system and displays
131 the percentage of copied data. It can also show estimated time and throughput,
132 and provides a \"top-like\" mode (monitoring).")
133 (license license:gpl3+)))
134
135 (define-public dmd
136 ;; Deprecated. Kept around "just in case."
137 (let ((base-version "0.2")
138 (patch-level "01"))
139 (package
140 (name "dmd")
141 (version (string-append base-version "." patch-level))
142 (source (origin
143 (method url-fetch)
144 (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/dmd-"
145 base-version ".tar.gz"))
146 (sha256
147 (base32
148 "10fl4k96f17gqx2fv8iw9c61ld26gsk4bbrlfqckdmiimz1k175z"))
149 (patches
150 (list (origin
151 ;; This patch augments 'make-fork+exec-constructor' and
152 ;; is used by a bunch of services.
153 (method url-fetch)
154 (uri (string-append
155 "http://git.savannah.gnu.org/cgit/shepherd.git/"
156 "patch?id=d1d0ff30b3ed2b86b0a3c9bc048d2a855f8e31e6"))
157 (sha256
158 (base32
159 "1lqymypixfiyb72d6bn24m06ry2q1ljnnv0qrc89pbb4z9azaa4d"))
160 (file-name "dmd-user-group.patch"))))))
161 (build-system gnu-build-system)
162 (arguments
163 '(#:configure-flags '("--localstatedir=/var")))
164 (native-inputs `(("pkg-config" ,pkg-config)))
165 (inputs `(("guile" ,guile-2.0)))
166 (synopsis "Daemon managing daemons")
167 (description
168 "GNU DMD is a daemon-managing daemon, meaning that it manages the
169 execution of system services, replacing similar functionality found in
170 typical init systems. It provides dependency-handling through a convenient
171 interface and is based on GNU Guile.")
172 (license license:gpl3+)
173 (home-page "http://www.gnu.org/software/dmd/"))))
174
175 (define-public shepherd
176 (package
177 (name "shepherd")
178 (version "0.3.1")
179 (source (origin
180 (method url-fetch)
181 (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/shepherd-"
182 version ".tar.gz"))
183 (sha256
184 (base32
185 "0f3yi3n4sl9myiay95yhv2a9an338qddfjrbv7da753ip66dkfz6"))))
186 (build-system gnu-build-system)
187 (arguments
188 '(#:configure-flags '("--localstatedir=/var")))
189 (native-inputs `(("pkg-config" ,pkg-config)))
190 (inputs `(("guile" ,guile-2.0)))
191 (synopsis "System service manager")
192 (description
193 "The GNU Shepherd is a daemon-managing daemon, meaning that it supervises
194 the execution of system services, replacing similar functionality found in
195 typical init systems. It provides dependency-handling through a convenient
196 interface and is based on GNU Guile.")
197 (license license:gpl3+)
198 (home-page "http://www.gnu.org/software/shepherd/")))
199
200 (define-public dfc
201 (package
202 (name "dfc")
203 (version "3.0.4")
204 (source
205 (origin
206 (method url-fetch)
207 (uri (string-append
208 "http://projects.gw-computing.net/attachments/download/79/dfc-"
209 version ".tar.gz"))
210 (sha256
211 (base32
212 "0zk1ppx93ijimf4sbgqilxxikpsa2gmpbynknyh41xy7jbdjxp0b"))))
213 (build-system cmake-build-system)
214 (arguments '(#:tests? #f)) ; There are no tests.
215 (native-inputs `(("gettext" ,gnu-gettext)))
216 (home-page "http://projects.gw-computing.net/projects/dfc")
217 (synopsis "Display file system space usage using graphs and colors")
218 (description
219 "dfc (df color) is a modern version of df. It uses colors, draws pretty
220 graphs and can export its output to different formats.")
221 (license license:bsd-3)))
222
223 (define-public htop
224 (package
225 (name "htop")
226 (version "2.0.1")
227 (source (origin
228 (method url-fetch)
229 (uri (string-append "http://hisham.hm/htop/releases/"
230 version "/htop-" version ".tar.gz"))
231 (sha256
232 (base32
233 "0rjn9ybqx5sav7z4gn18f1q6k23nmqyb6yydfgghzdznz9nn447l"))))
234 (build-system gnu-build-system)
235 (inputs
236 `(("ncurses" ,ncurses)))
237 (home-page "http://htop.sourceforge.net/")
238 (synopsis "Interactive process viewer")
239 (description
240 "This is htop, an interactive process viewer. It is a text-mode
241 application (for console or X terminals) and requires ncurses.")
242 (license license:gpl2)))
243
244 (define-public pies
245 (package
246 (name "pies")
247 (version "1.2")
248 (source
249 (origin
250 (method url-fetch)
251 (uri (string-append "mirror://gnu/pies/pies-"
252 version ".tar.bz2"))
253 (sha256
254 (base32
255 "18w0dbg77i56cx1bwa789w0qi3l4xkkbascxcv2b6gbm0zmjg1g6"))))
256 (build-system gnu-build-system)
257 (home-page "http://www.gnu.org/software/pies/")
258 (synopsis "Program invocation and execution supervisor")
259 (description
260 "GNU pies is a program that supervises the invocation and execution of
261 other programs. It reads the list of programs to be started from its
262 configuration file, executes them, and then monitors their status,
263 re-executing them as necessary.")
264 (license license:gpl3+)))
265
266 (define-public inetutils
267 (package
268 (name "inetutils")
269 (version "1.9.4")
270 (source (origin
271 (method url-fetch)
272 (uri (string-append "mirror://gnu/inetutils/inetutils-"
273 version ".tar.gz"))
274 (sha256
275 (base32
276 "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
277 (build-system gnu-build-system)
278 (arguments `(;; FIXME: `tftp.sh' relies on `netstat' from utils-linux,
279 ;; which is currently missing.
280 #:tests? #f))
281 (inputs `(("ncurses" ,ncurses)
282 ("readline" ,readline))) ; for 'ftp'
283 (home-page "http://www.gnu.org/software/inetutils/")
284 (synopsis "Basic networking utilities")
285 (description
286 "Inetutils is a collection of common network programs, such as an ftp
287 client and server, a telnet client and server, and an rsh client and server.")
288 (license license:gpl3+)))
289
290 (define-public shadow
291 (package
292 (name "shadow")
293 (version "4.2.1")
294 (source (origin
295 (method url-fetch)
296 (uri (string-append
297 "http://pkg-shadow.alioth.debian.org/releases/"
298 name "-" version ".tar.xz"))
299 (sha256
300 (base32
301 "0h9x1zdbq0pqmygmc1x459jraiqw4gqz8849v268crk78z8r621v"))))
302 (build-system gnu-build-system)
303 (arguments
304 '(;; Assume System V `setpgrp (void)', which is the default on GNU
305 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
306 #:configure-flags '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
307
308 #:phases (alist-cons-before
309 'build 'set-nscd-file-name
310 (lambda* (#:key inputs #:allow-other-keys)
311 ;; Use the right file name for nscd.
312 (let ((libc (assoc-ref inputs "libc")))
313 (substitute* "lib/nscd.c"
314 (("/usr/sbin/nscd")
315 (string-append libc "/sbin/nscd")))))
316 (alist-cons-after
317 'install 'remove-groups
318 (lambda* (#:key outputs #:allow-other-keys)
319 ;; Remove `groups', which is already provided by Coreutils.
320 (let* ((out (assoc-ref outputs "out"))
321 (bin (string-append out "/bin"))
322 (man (string-append out "/share/man")))
323 (delete-file (string-append bin "/groups"))
324 (for-each delete-file (find-files man "^groups\\."))
325 #t))
326 %standard-phases))))
327
328 (inputs (if (string-suffix? "-linux"
329 (or (%current-target-system)
330 (%current-system)))
331 `(("linux-pam" ,linux-pam))
332 '()))
333 (home-page "http://pkg-shadow.alioth.debian.org/")
334 (synopsis "Authentication-related tools such as passwd, su, and login")
335 (description
336 "Shadow provides a number of authentication-related tools, including:
337 login, passwd, su, groupadd, and useradd.")
338
339 ;; The `vipw' program is GPLv2+.
340 ;; libmisc/salt.c is public domain.
341 (license license:bsd-3)))
342
343 (define-public mingetty
344 (package
345 (name "mingetty")
346 (version "1.08")
347 (source (origin
348 (method url-fetch)
349 (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
350 version "/mingetty-" version ".tar.gz"))
351 (sha256
352 (base32
353 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
354 (build-system gnu-build-system)
355 (arguments
356 `(#:phases (alist-replace 'configure
357 (lambda* (#:key inputs outputs
358 #:allow-other-keys)
359 (let* ((out (assoc-ref outputs "out"))
360 (man8 (string-append
361 out "/share/man/man8"))
362 (sbin (string-append out "/sbin"))
363 (shadow (assoc-ref inputs "shadow"))
364 (login (string-append shadow
365 "/bin/login")))
366 (substitute* "Makefile"
367 (("^SBINDIR.*")
368 (string-append "SBINDIR = " out
369 "/sbin\n"))
370 (("^MANDIR.*")
371 (string-append "MANDIR = " out
372 "/share/man/man8\n")))
373
374 ;; Pick the right 'login' by default.
375 (substitute* "mingetty.c"
376 (("\"/bin/login\"")
377 (string-append "\"" login "\"")))
378
379 (mkdir-p sbin)
380 (mkdir-p man8)))
381 %standard-phases)
382 #:tests? #f)) ; no tests
383 (inputs `(("shadow" ,shadow)))
384
385 (home-page "http://sourceforge.net/projects/mingetty")
386 (synopsis "Getty for the text console")
387 (description
388 "Small console getty that is started on the Linux text console,
389 asks for a login name and then transfers over to 'login'. It is extended to
390 allow automatic login and starting any app.")
391 (license license:gpl2+)))
392
393 (define-public net-base
394 (package
395 (name "net-base")
396 (version "5.3")
397 (source (origin
398 (method url-fetch)
399 (uri (string-append
400 "mirror://debian/pool/main/n/netbase/netbase_"
401 version ".tar.xz"))
402 (sha256
403 (base32
404 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
405 (build-system trivial-build-system)
406 (arguments
407 `(#:modules ((guix build utils))
408 #:builder (begin
409 (use-modules (guix build utils)
410 (srfi srfi-26))
411
412 (let* ((source (assoc-ref %build-inputs "source"))
413 (tar (assoc-ref %build-inputs "tar"))
414 (xz (assoc-ref %build-inputs "xz"))
415 (output (assoc-ref %outputs "out"))
416 (etc (string-append output "/etc")))
417 (setenv "PATH" (string-append xz "/bin"))
418 (system* (string-append tar "/bin/tar") "xvf"
419 source)
420 (chdir ,(string-append "netbase-" version))
421 (mkdir-p etc)
422 (for-each copy-file
423 '("etc-services" "etc-protocols" "etc-rpc")
424 (map (cut string-append etc "/" <>)
425 '("services" "protocols" "rpc")))
426 #t))))
427 (native-inputs `(("tar" ,tar)
428 ("xz" ,xz)))
429 (synopsis "IANA protocol, port, and RPC number assignments")
430 (description
431 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
432 files, which contain information about the IANA-assigned port, protocol, and
433 ONC RPC numbers.")
434 (home-page "http://packages.debian.org/sid/netbase")
435 (license license:gpl2)))
436
437 (define-public netcat
438 (package
439 (name "netcat")
440 (version "0.7.1")
441 (source (origin
442 (method url-fetch)
443 (uri (string-append "mirror://sourceforge/netcat/netcat/" version
444 "/netcat-" version ".tar.bz2"))
445 (sha256
446 (base32
447 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
448 (build-system gnu-build-system)
449 (arguments
450 `(#:configure-flags
451 ;; By default, man and info pages are put in PREFIX/{man,info},
452 ;; but we want them in PREFIX/share/{man,info}.
453 (let ((out (assoc-ref %outputs "out")))
454 (list (string-append "--mandir=" out "/share/man")
455 (string-append "--infodir=" out "/share/info")))))
456 (home-page "http://netcat.sourceforge.net")
457 (synopsis "Read and write data over TCP/IP")
458 (description
459 "Netcat is a featured networking utility which reads and writes data
460 across network connections, using the TCP/IP protocol. It is designed to be a
461 reliable \"back-end\" tool that can be used directly or easily driven by other
462 programs and scripts. At the same time, it is a feature-rich network debugging
463 and exploration tool, since it can create almost any kind of connection you
464 would need and has several interesting built-in capabilities.")
465 (license license:gpl2+)))
466
467 (define-public alive
468 (package
469 (name "alive")
470 (version "2.0.2")
471 (source (origin
472 (method url-fetch)
473 (uri (string-append "mirror://gnu/alive/alive-"
474 version ".tar.xz"))
475 (sha256
476 (base32
477 "1vrzg51ai68x9yld7vbgl58sxaw5qpx8rbakwcxn4cqq6vpxj38j"))))
478 (build-system gnu-build-system)
479 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
480 (inputs `(("guile" ,guile-2.0)
481 ("inetutils" ,inetutils)))
482 (home-page "http://www.gnu.org/software/alive/")
483 (synopsis "Autologin and keep-alive daemon")
484 (description
485 "GNU Alive sends periodic pings to a server, generally to keep a
486 connection alive.")
487 (license license:gpl3+)))
488
489 (define-public isc-dhcp
490 (let* ((bind-major-version "9")
491 (bind-minor-version "9")
492 (bind-patch-version "9")
493 (bind-release-type "") ; for patch release, use "-P"
494 (bind-release-version "") ; for patch release, e.g. "4"
495 (bind-version (string-append bind-major-version
496 "."
497 bind-minor-version
498 "."
499 bind-patch-version
500 bind-release-type
501 bind-release-version)))
502 (package
503 (name "isc-dhcp")
504 (version "4.3.4")
505 (source (origin
506 (method url-fetch)
507 (uri (string-append "http://ftp.isc.org/isc/dhcp/"
508 version "/dhcp-" version ".tar.gz"))
509 (sha256
510 (base32
511 "0zk0imll6bfyp9p4ndn8h6s4ifijnw5bhixswifr5rnk7pp5l4gm"))))
512 (build-system gnu-build-system)
513 (arguments
514 `(#:parallel-build? #f
515 #:phases
516 (modify-phases %standard-phases
517 (add-after 'unpack 'replace-bundled-bind
518 (lambda* (#:key inputs #:allow-other-keys)
519 (delete-file "bind/bind.tar.gz")
520 (copy-file (assoc-ref inputs "bind-source-tarball")
521 "bind/bind.tar.gz")
522 (chmod "bind/bind.tar.gz" #o644)
523 (substitute* "bind/version.tmp"
524 (("^MAJORVER=.*")
525 (format #f "MAJORVER=~a\n" ,bind-major-version))
526 (("^MINORVER=.*")
527 (format #f "MINORVER=~a\n" ,bind-minor-version))
528 (("^PATCHVER=.*")
529 (format #f "PATCHVER=~a\n" ,bind-patch-version))
530 (("^RELEASETYPE=.*")
531 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
532 (("^RELEASEVER=.*")
533 (format #f "RELEASEVER=~a\n" ,bind-release-version)))
534 #t))
535 (add-after 'configure 'post-configure
536 (lambda* (#:key outputs #:allow-other-keys)
537 ;; Point to the right client script, which will be
538 ;; installed in a later phase.
539 (substitute* "includes/dhcpd.h"
540 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
541 (let ((out (assoc-ref outputs "out")))
542 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
543 out "/libexec/dhclient-script"
544 "\"\n"))))
545
546 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
547 ;; we must patch shebangs in there and make sure the right
548 ;; shell is used.
549 (with-directory-excursion "bind"
550 (substitute* "Makefile"
551 (("\\./configure")
552 (let ((sh (which "sh")))
553 (string-append "./configure CONFIG_SHELL="
554 sh " SHELL=" sh))))
555
556 (let ((bind-directory (string-append "bind-" ,bind-version)))
557 (system* "tar" "xf" "bind.tar.gz")
558 (for-each patch-shebang
559 (find-files bind-directory ".*"))
560 (zero? (system* "tar" "cf" "bind.tar.gz"
561 bind-directory
562 ;; avoid non-determinism in the archive
563 "--sort=name"
564 "--mtime=@0"
565 "--owner=root:0"
566 "--group=root:0"))))))
567 (add-after 'install 'post-install
568 (lambda* (#:key inputs outputs #:allow-other-keys)
569 ;; Install the dhclient script for GNU/Linux and make sure
570 ;; if finds all the programs it needs.
571 (let* ((out (assoc-ref outputs "out"))
572 (libexec (string-append out "/libexec"))
573 (coreutils (assoc-ref inputs "coreutils"))
574 (inetutils (assoc-ref inputs "inetutils"))
575 (net-tools (assoc-ref inputs "net-tools"))
576 (sed (assoc-ref inputs "sed")))
577 (substitute* "client/scripts/linux"
578 (("/sbin/ip")
579 (string-append (assoc-ref inputs "iproute")
580 "/sbin/ip")))
581
582 (mkdir-p libexec)
583 (copy-file "client/scripts/linux"
584 (string-append libexec "/dhclient-script"))
585
586 (wrap-program
587 (string-append libexec "/dhclient-script")
588 `("PATH" ":" prefix
589 ,(map (lambda (dir)
590 (string-append dir "/bin:"
591 dir "/sbin"))
592 (list inetutils net-tools coreutils sed))))))))))
593
594 (native-inputs `(("perl" ,perl)))
595
596 (inputs `(("inetutils" ,inetutils)
597 ("net-tools" ,net-tools)
598 ("iproute" ,iproute)
599
600 ;; XXX isc-dhcp bundles a copy of bind that has security
601 ;; flaws, so we use a newer version.
602 ("bind-source-tarball"
603 ,(origin
604 (method url-fetch)
605 (uri (string-append "http://ftp.isc.org/isc/bind9/"
606 bind-version
607 "/bind-" bind-version ".tar.gz"))
608 (sha256
609 (base32
610 "0w8qqm6p2y6x57j2l0a3278g173wd84dsr4py9z00191f3wra74q"))))
611
612 ;; When cross-compiling, we need the cross Coreutils and sed.
613 ;; Otherwise just use those from %FINAL-INPUTS.
614 ,@(if (%current-target-system)
615 `(("coreutils" ,coreutils)
616 ("sed" ,sed))
617 '())))
618
619 (home-page "http://www.isc.org/products/DHCP/")
620 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
621 (description
622 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
623 reference implementation of all aspects of DHCP, through a suite of DHCP
624 tools: server, client, and relay agent.")
625 (license license:isc)
626 (properties '((cpe-name . "dhcp"))))))
627
628 (define-public libpcap
629 (package
630 (name "libpcap")
631 (version "1.7.4")
632 (source (origin
633 (method url-fetch)
634 (uri (string-append "http://www.tcpdump.org/release/libpcap-"
635 version ".tar.gz"))
636 (sha256
637 (base32
638 "1c28ykkizd7jqgzrfkg7ivqjlqs9p6lygp26bsw2i0z8hwhi3lvs"))))
639 (build-system gnu-build-system)
640 (native-inputs `(("bison" ,bison) ("flex" ,flex)))
641 (arguments '(#:configure-flags '("--with-pcap=linux")
642 #:tests? #f)) ; no 'check' target
643 (home-page "http://www.tcpdump.org")
644 (synopsis "Network packet capture library")
645 (description
646 "libpcap is an interface for user-level packet capture. It provides a
647 portable framework for low-level network monitoring. Applications include
648 network statistics collection, security monitoring, network debugging, etc.")
649
650 ;; fad-*.c and a couple other files are BSD-4, but the rest is BSD-3.
651 (license license:bsd-3)))
652
653 (define-public tcpdump
654 (package
655 (name "tcpdump")
656 (version "4.7.4")
657 (source (origin
658 (method url-fetch)
659 (uri (string-append "http://www.tcpdump.org/release/tcpdump-"
660 version ".tar.gz"))
661 (sha256
662 (base32
663 "1byr8w6grk08fsq0444jmcz9ar89lq9nf4mjq2cny0w9k8k21rbb"))))
664 (build-system gnu-build-system)
665 (inputs `(("libpcap" ,libpcap)
666 ("openssl" ,openssl)))
667 (native-inputs `(("perl" ,perl))) ; for tests
668 (home-page "http://www.tcpdump.org/")
669 (synopsis "Network packet analyzer")
670 (description
671 "Tcpdump is a command-line tool to analyze network traffic passing
672 through the network interface controller.")
673 (license license:bsd-3)))
674
675 (define-public jnettop
676 (package
677 (name "jnettop")
678 (version "0.13.0")
679 (source (origin
680 (method url-fetch)
681 (uri (string-append "http://jnettop.kubs.info/dist/jnettop-"
682 version ".tar.gz"))
683 (sha256
684 (base32
685 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
686 (build-system gnu-build-system)
687 (native-inputs
688 `(("pkg-config" ,pkg-config)))
689 (inputs
690 `(("glib" ,glib)
691 ("ncurses" ,ncurses)
692 ("libpcap" ,libpcap)))
693 (home-page "http://jnettop.kubs.info/")
694 (synopsis "Visualize network traffic by bandwidth use")
695 (description
696 "Jnettop is a traffic visualiser, which captures traffic going
697 through the host it is running from and displays streams sorted
698 by bandwidth they use.")
699 (license license:gpl2+)))
700
701 (define-public clusterssh
702 (package
703 (name "clusterssh")
704 (version "3.28")
705 (source (origin
706 (method url-fetch)
707 (uri (string-append "mirror://sourceforge/clusterssh/"
708 "1.%20ClusterSSH%20Series%203/" version
709 "/clusterssh-" version ".tar.gz"))
710 (sha256
711 (base32
712 "1bwggpvaj2al5blg1ynapviv2kpydffpzq2zkhi81najnvzc1rr7"))))
713 (build-system gnu-build-system)
714 (inputs `(("perl" ,perl)))
715 (propagated-inputs `(("xterm" ,xterm)
716 ("perl-tk" ,perl-tk)
717 ("perl-x11-protocol" ,perl-x11-protocol)))
718 (arguments
719 `(#:phases
720 (alist-cons-after
721 'install 'set-load-paths
722 (lambda* (#:key inputs outputs #:allow-other-keys)
723 ;; Put the perl-tk and perl-x11-protocol modules in the perl inc
724 ;; path for PROG
725 (let* ((out (assoc-ref outputs "out"))
726 (prog (string-append out "/bin/cssh"))
727 (perl-ver ,(package-version perl))
728 (x11-inc (string-append
729 (assoc-ref inputs "perl-x11-protocol")
730 "/lib/perl5/site_perl/" perl-ver))
731 (tk-inc (string-append
732 (assoc-ref inputs "perl-tk")
733 "/lib/perl5/site_perl/" perl-ver
734 "/x86_64-linux")))
735 (wrap-program
736 prog
737 `("PERL5LIB" ":" prefix (,x11-inc ,tk-inc)))))
738 %standard-phases)))
739 ;; The clusterssh.sourceforge.net address requires login to view
740 (home-page "http://sourceforge.net/projects/clusterssh/")
741 (synopsis "Secure concurrent multi-server terminal control")
742 (description
743 "ClusterSSH controls a number of xterm windows via a single graphical
744 console window to allow commands to be interactively run on multiple servers
745 over ssh connections.")
746 (license license:gpl2+)))
747
748 (define-public rottlog
749 (package
750 (name "rottlog")
751 (version "0.72.2")
752 (source (origin
753 (method url-fetch)
754 (uri (string-append "mirror://gnu/rottlog/rottlog-"
755 version ".tar.gz"))
756 (sha256
757 (base32
758 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
759 (modules '((guix build utils)))
760 (snippet
761 '(substitute* "Makefile.in"
762 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
763 ;; Don't try to chown root.
764 "")
765 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
766 ;; Don't attempt to create /var/lib/rottlog.
767 "true")))))
768 (build-system gnu-build-system)
769 (arguments
770 '(#:configure-flags (list (string-append "ROTT_ETCDIR="
771 (assoc-ref %outputs "out")
772 "/etc")
773 "--localstatedir=/var")
774 #:phases (alist-cons-after
775 'install 'install-info
776 (lambda _
777 (zero? (system* "make" "install-info")))
778 %standard-phases)))
779 (native-inputs `(("texinfo" ,texinfo)
780 ("util-linux" ,util-linux))) ; for 'cal'
781 (home-page "http://www.gnu.org/software/rottlog/")
782 (synopsis "Log rotation and management")
783 (description
784 "GNU Rot[t]log is a program for managing log files. It is used to
785 automatically rotate out log files when they have reached a given size or
786 according to a given schedule. It can also be used to automatically compress
787 and archive such logs. Rot[t]log will mail reports of its activity to the
788 system administrator.")
789 (license license:gpl3+)))
790
791 (define-public sudo
792 (package
793 (name "sudo")
794 (version "1.8.17p1")
795 (source (origin
796 (method url-fetch)
797 (uri
798 (list (string-append "https://www.sudo.ws/sudo/dist/sudo-"
799 version ".tar.gz")
800 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
801 version ".tar.gz")))
802 (sha256
803 (base32
804 "1k2mn65l1kmsxm8wh0gjxy496xhbpiimbpm6yv6kw6snzc3xg466"))))
805 (build-system gnu-build-system)
806 (arguments
807 `(#:configure-flags
808 (list "--with-logpath=/var/log/sudo.log"
809 "--with-rundir=/var/run/sudo" ;must be cleaned up at boot time
810 "--with-vardir=/var/db/sudo"
811 "--with-iologdir=/var/log/sudo-io"
812
813 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
814 ;; provide it.
815 (string-append "CPPFLAGS=-D_PATH_MV='\""
816 (assoc-ref %build-inputs "coreutils")
817 "/bin/mv\"'"))
818
819 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
820 #:parallel-build? #f
821
822 #:phases (alist-cons-before
823 'configure 'pre-configure
824 (lambda _
825 (substitute* "src/sudo_usage.h.in"
826 ;; Do not capture 'configure' arguments since we would
827 ;; unduly retain references, and also because the
828 ;; CPPFLAGS above would close the string literal
829 ;; prematurely.
830 (("@CONFIGURE_ARGS@") "\"\""))
831 (substitute* (find-files "." "Makefile\\.in")
832 (("-o [[:graph:]]+ -g [[:graph:]]+")
833 ;; Allow installation as non-root.
834 "")
835 (("^install: (.*)install-sudoers(.*)" _ before after)
836 ;; Don't try to create /etc/sudoers.
837 (string-append "install: " before after "\n"))
838 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
839 ;; Don't try to create /run/sudo.
840 "$(TMPDIR)/dummy")
841 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
842 ;; Don't try to create /var/db/sudo.
843 "$(TMPDIR)/dummy")))
844 %standard-phases)
845
846 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
847 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
848 #:tests? #f))
849 (inputs
850 `(("groff" ,groff)
851 ("linux-pam" ,linux-pam)
852 ("coreutils" ,coreutils)))
853 (home-page "https://www.sudo.ws/")
854 (synopsis "Run commands as root")
855 (description
856 "Sudo (su \"do\") allows a system administrator to delegate authority to
857 give certain users (or groups of users) the ability to run some (or all)
858 commands as root or another user while providing an audit trail of the
859 commands and their arguments.")
860
861 ;; See <http://www.sudo.ws/sudo/license.html>.
862 (license license:x11)))
863
864 (define-public wpa-supplicant-minimal
865 (package
866 (name "wpa-supplicant-minimal")
867 (version "2.5")
868 (source (origin
869 (method url-fetch)
870 (uri (string-append
871 "http://w1.fi/releases/wpa_supplicant-"
872 version
873 ".tar.gz"))
874 (sha256
875 (base32
876 "05mkp5bx1c3z7h5biddsv0p49gkrq9ksany3anp4wdiv92p5prfc"))
877 (patches
878 (search-patches "wpa-supplicant-CVE-2015-5310.patch"
879 "wpa-supplicant-CVE-2015-5314.patch"
880 "wpa-supplicant-CVE-2015-5315.patch"
881 "wpa-supplicant-CVE-2015-5316.patch"
882 "wpa-supplicant-CVE-2016-4476.patch"
883 "wpa-supplicant-CVE-2016-4477-pt1.patch"
884 "wpa-supplicant-CVE-2016-4477-pt2.patch"
885 "wpa-supplicant-CVE-2016-4477-pt3.patch"
886 "wpa-supplicant-CVE-2016-4477-pt4.patch"))))
887 (build-system gnu-build-system)
888 (arguments
889 '(#:phases (alist-replace
890 'configure
891 (lambda* (#:key outputs #:allow-other-keys)
892 (chdir "wpa_supplicant")
893 (copy-file "defconfig" ".config")
894 (let ((port (open-file ".config" "al")))
895 (display "
896 CONFIG_DEBUG_SYSLOG=y
897
898 # Choose GnuTLS (the default is OpenSSL.)
899 CONFIG_TLS=gnutls
900
901 CONFIG_DRIVER_NL80211=y
902 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
903 CONFIG_LIBNL32=y
904 CONFIG_READLINE=y\n" port)
905 (close-port port)))
906
907 (alist-cons-after
908 'install 'install-man-pages
909 (lambda* (#:key outputs #:allow-other-keys)
910 (let* ((out (assoc-ref outputs "out"))
911 (man (string-append out "/share/man"))
912 (man5 (string-append man "/man5"))
913 (man8 (string-append man "/man8")))
914 (define (copy-man-page target)
915 (lambda (file)
916 (copy-file file
917 (string-append target "/"
918 (basename file)))))
919
920 (mkdir-p man5) (mkdir man8)
921 (for-each (copy-man-page man5)
922 (find-files "doc/docbook" "\\.5"))
923 (for-each (copy-man-page man8)
924 (find-files "doc/docbook" "\\.8"))
925 #t))
926 %standard-phases))
927
928 #:make-flags (list "CC=gcc"
929 (string-append "BINDIR=" (assoc-ref %outputs "out")
930 "/sbin")
931 (string-append "LIBDIR=" (assoc-ref %outputs "out")
932 "/lib"))
933 #:tests? #f))
934 (inputs
935 `(("readline" ,readline)
936 ("libnl" ,libnl)
937 ("gnutls" ,gnutls)
938 ("libgcrypt" ,libgcrypt))) ;needed by crypto_gnutls.c
939 (native-inputs
940 `(("pkg-config" ,pkg-config)))
941 (home-page "http://w1.fi/wpa_supplicant/")
942 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
943 (description
944 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
945 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
946 the client stations. It implements key negotiation with a WPA Authenticator
947 and it controls the roaming and IEEE 802.11 authentication/association of the
948 WLAN driver.
949
950 This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
951
952 ;; In practice, this is linked against Readline, which makes it GPLv3+.
953 (license license:bsd-3)))
954
955 (define-public wpa-supplicant
956 (package (inherit wpa-supplicant-minimal)
957 (name "wpa-supplicant")
958 (inputs `(("dbus" ,dbus)
959 ,@(package-inputs wpa-supplicant-minimal)))
960 (arguments
961 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
962 ((#:phases phases)
963 `(alist-cons-after
964 'configure 'configure-for-dbus
965 (lambda _
966 (let ((port (open-file ".config" "al")))
967 (display "
968 CONFIG_CTRL_IFACE_DBUS=y
969 CONFIG_CTRL_IFACE_DBUS_NEW=y
970 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
971 (close-port port))
972 #t)
973 (alist-cons-after
974 'install-man-pages 'install-dbus-conf
975 (lambda* (#:key outputs #:allow-other-keys)
976 (let* ((out (assoc-ref outputs "out"))
977 (dir (string-append out "/etc/dbus-1/system.d")))
978 (mkdir-p dir)
979 (copy-file "dbus/dbus-wpa_supplicant.conf"
980 (string-append dir "/wpa_supplicant.conf"))))
981 ,phases)))))))
982
983 (define-public wakelan
984 (package
985 (name "wakelan")
986 (version "1.1")
987 (source (origin
988 (method url-fetch)
989 (uri (string-append
990 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
991 version ".tar.gz"))
992 (sha256
993 (base32
994 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
995 (build-system gnu-build-system)
996 (arguments
997 '(#:phases (alist-replace
998 'configure
999 (lambda* (#:key outputs #:allow-other-keys)
1000 (let ((out (assoc-ref outputs "out")))
1001 (mkdir-p (string-append out "/bin"))
1002 (mkdir-p (string-append out "/share/man/man1"))
1003
1004 ;; It's an old configure script that doesn't understand
1005 ;; the extra options we pass.
1006 (setenv "CONFIG_SHELL" (which "bash"))
1007 (zero?
1008 (system* "./configure"
1009 (string-append "--prefix=" out)
1010 (string-append "--mandir=" out
1011 "/share/man")))))
1012 %standard-phases)
1013 #:tests? #f))
1014 (home-page "http://kernel.org") ; really, no home page
1015 (synopsis "Send a wake-on-LAN packet")
1016 (description
1017 "WakeLan broadcasts a properly formatted UDP packet across the local area
1018 network, which causes enabled computers to power on.")
1019 (license license:gpl2+)))
1020
1021 (define-public dmidecode
1022 (package
1023 (name "dmidecode")
1024 (version "2.12")
1025 (source (origin
1026 (method url-fetch)
1027 (uri (string-append
1028 "mirror://savannah/dmidecode/dmidecode-"
1029 version ".tar.bz2"))
1030 (sha256
1031 (base32
1032 "122hgaw8mpqdfra159lfl6pyk3837giqx6vq42j64fjnbl2z6gwi"))))
1033 (build-system gnu-build-system)
1034 (arguments
1035 '(#:phases (alist-delete 'configure %standard-phases)
1036 #:tests? #f ; no 'check' target
1037 #:make-flags (list (string-append "prefix="
1038 (assoc-ref %outputs "out")))))
1039 (home-page "http://www.nongnu.org/dmidecode/")
1040 (synopsis "Read hardware information from the BIOS")
1041 (description
1042 "Dmidecode reports information about your system's hardware as described
1043 in your system BIOS according to the SMBIOS/DMI standard. This typically
1044 includes system manufacturer, model name, serial number, BIOS version, asset
1045 tag as well as a lot of other details of varying level of interest and
1046 reliability depending on the manufacturer. This will often include usage
1047 status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
1048 module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
1049 (license license:gpl2+)))
1050
1051 (define-public acpica
1052 (package
1053 (name "acpica")
1054 (version "20150410")
1055 (source (origin
1056 (method url-fetch)
1057 (uri (string-append
1058 "https://acpica.org/sites/acpica/files/acpica-unix2-"
1059 version ".tar.gz"))
1060 (sha256
1061 (base32
1062 "0q1fjwkyw9x6gsva6fd0zbn7ly4fx0ha4853f416np9kf2irillw"))))
1063 (build-system gnu-build-system)
1064 (native-inputs `(("flex" ,flex)
1065 ("bison" ,bison)))
1066 (arguments
1067 '(#:make-flags (list (string-append "PREFIX=" %output)
1068 "HOST=_LINUX"
1069 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
1070 #:tests? #f ; no 'check' target.
1071 #:phases (alist-delete 'configure %standard-phases)))
1072 (home-page "http://acpica.org/")
1073 (synopsis "Tools for the development and debug of ACPI tables")
1074 (description
1075 "The ACPI Component Architecture (ACPICA) project provides an
1076 OS-independent reference implementation of the Advanced Configuration and
1077 Power Interface Specification (ACPI). ACPICA code contains those portions of
1078 ACPI meant to be directly integrated into the host OS as a kernel-resident
1079 subsystem, and a small set of tools to assist in developing and debugging ACPI
1080 tables. This package contains only the user-space tools needed for ACPI table
1081 development, not the kernel implementation of ACPI.")
1082 (license license:gpl2))) ; Dual GPLv2/ACPICA Licence
1083
1084 (define-public stress
1085 (package
1086 (name "stress")
1087 (version "1.0.1")
1088 (source (origin
1089 (method url-fetch)
1090 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
1091 version ".orig.tar.gz"))
1092 (sha256
1093 (base32
1094 "1v9vnzlihqfjsxa93hdbrq72pqqk00dkylmlg8jpxhm7s1w9qfl1"))))
1095 (build-system gnu-build-system)
1096 (home-page "http://packages.debian.org/wheezy/stress")
1097 (synopsis "Impose load on and stress test a computer system")
1098 (description
1099 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
1100 or disk stress on a POSIX-compliant operating system and reports any errors it
1101 detects.
1102
1103 Stress is not a benchmark. It is a tool used by system administrators to
1104 evaluate how well their systems will scale, by kernel programmers to evaluate
1105 perceived performance characteristics, and by systems programmers to expose
1106 the classes of bugs which only or more frequently manifest themselves when the
1107 system is under heavy load.")
1108 (license license:gpl2+)))
1109
1110 (define-public detox
1111 (package
1112 (name "detox")
1113 (version "1.2.0")
1114 (source (origin
1115 (method url-fetch)
1116 (uri (string-append "mirror://sourceforge/detox/detox/" version
1117 "/detox-" version ".tar.bz2"))
1118 (sha256
1119 (base32
1120 "1y6vvjqsg54kl49cry73jbfhr04s7wjs779vrr9zrq6kww7dkymb"))))
1121 (build-system gnu-build-system)
1122 ;; Both flex and popt are used in this case for their runtime libraries
1123 ;; (libfl and libpopt).
1124 (inputs
1125 `(("flex" ,flex)
1126 ("popt" ,popt)))
1127 (arguments
1128 `(#:configure-flags `(,(string-append "--with-popt="
1129 (assoc-ref %build-inputs "popt")))
1130 #:tests? #f)) ;no 'check' target
1131 (home-page "http://detox.sourceforge.net")
1132 (synopsis "Clean up file names")
1133 (description
1134 "Detox is a program that renames files to make them easier to work with
1135 under Unix and related operating systems. Spaces and various other unsafe
1136 characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
1137 characters can be replaced as well, as can UTF-8 characters.")
1138 (license license:bsd-3)))
1139
1140 (define-public testdisk
1141 (package
1142 (name "testdisk")
1143 (version "7.0")
1144 (source (origin
1145 (method url-fetch)
1146 (uri (string-append "http://www.cgsecurity.org/testdisk-"
1147 version ".tar.bz2"))
1148 (sha256
1149 (base32
1150 "0ba4wfz2qrf60vwvb1qsq9l6j0pgg81qgf7fh22siaz649mkpfq0"))))
1151 (build-system gnu-build-system)
1152 (inputs
1153 `(("ntfs-3g" ,ntfs-3g)
1154 ("util-linux" ,util-linux)
1155 ("openssl" ,openssl)
1156 ;; FIXME: add reiserfs
1157 ("zlib" ,zlib)
1158 ("e2fsprogs" ,e2fsprogs)
1159 ("libjpeg" ,libjpeg)
1160 ("ncurses" ,ncurses)))
1161 (home-page "http://www.cgsecurity.org/wiki/TestDisk")
1162 (synopsis "Data recovery tool")
1163 (description
1164 "TestDisk is a program for data recovery, primarily designed to help
1165 recover lost partitions and/or make non-booting disks bootable again.")
1166 (license license:gpl2+)))
1167
1168 (define-public tree
1169 (package
1170 (name "tree")
1171 (version "1.7.0")
1172 (source (origin
1173 (method url-fetch)
1174 (uri (string-append
1175 "http://mama.indstate.edu/users/ice/tree/src/tree-"
1176 version ".tgz"))
1177 (sha256
1178 (base32 "04kviw799qxly08zb8n5mgxfd96gyis6x69q2qiw86jnh87c4mv9"))))
1179 (build-system gnu-build-system)
1180 (arguments
1181 '(#:phases (alist-delete 'configure %standard-phases)
1182 #:tests? #f ; no check target
1183 #:make-flags (let ((out (assoc-ref %outputs "out")))
1184 (list (string-append "prefix=" out)))))
1185 (synopsis "Recursively list the contents of a directory")
1186 (description
1187 "Tree is a recursive directory listing command that produces a depth
1188 indented listing of files, which is colorized ala dircolors if the LS_COLORS
1189 environment variable is set and output is to tty.")
1190 (home-page "http://mama.indstate.edu/users/ice/tree/")
1191 (license license:gpl2+)))
1192
1193 (define-public direvent
1194 (package
1195 (name "direvent")
1196 (version "5.0")
1197 (source (origin
1198 (method url-fetch)
1199 (uri (string-append "mirror://gnu/direvent/direvent-"
1200 version ".tar.gz"))
1201 (sha256
1202 (base32
1203 "1i14131y6m8wvirz6piw4zxz2q1kbpl0lniv5kl55rx4k372dg8z"))
1204 (modules '((guix build utils)))
1205 (snippet '(substitute* "tests/testsuite"
1206 (("#![[:blank:]]?/bin/sh")
1207 "#!$SHELL")))))
1208 (build-system gnu-build-system)
1209 (arguments
1210 '(#:phases (alist-cons-before
1211 'build 'patch-/bin/sh
1212 (lambda* (#:key inputs #:allow-other-keys)
1213 ;; Use the right shell when executing the watcher.
1214 (let ((bash (assoc-ref inputs "bash")))
1215 (substitute* "src/direvent.c"
1216 (("\"/bin/sh\"")
1217 (string-append "\"" bash "/bin/sh\"")))))
1218 %standard-phases)))
1219 (home-page "http://www.gnu.org/software/direvent/")
1220 (synopsis "Daemon to monitor directories for events such as file removal")
1221 (description
1222 "A daemon that monitors directories for events, such as creating,
1223 deleting or modifying files. It can monitor different sets of directories for
1224 different events. When an event is detected, direvent calls a specified
1225 external program with information about the event, such as the location
1226 within the file system where it occurred. Thus, \"direvent\" provides an
1227 easy way to react immediately if given files undergo changes, for example, to
1228 track changes in important system configuration files.")
1229 (license license:gpl3+)))
1230
1231 (define-public libcap-ng
1232 (package
1233 (name "libcap-ng")
1234 (version "0.7.4")
1235 (source (origin
1236 (method url-fetch)
1237 (uri (string-append
1238 "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
1239 version ".tar.gz"))
1240 (sha256
1241 (base32
1242 "0ssvnh4cvhya0c1j6k6192zvqcq7nc0x01fb5nwhr0prfqr0i8j8"))))
1243 (build-system gnu-build-system)
1244 (inputs `(("python" ,python)))
1245 (home-page "http://people.redhat.com/sgrubb/libcap-ng/")
1246 (synopsis "Library for more easily working with POSIX capabilities")
1247 (description
1248 "The libcap-ng library is intended to make programming with POSIX
1249 capabilities easier than the traditional libcap library. It includes
1250 utilities that can analyse all currently running applications and print out
1251 any capabilities and whether or not it has an open ended bounding set. The
1252 included utilities are designed to let admins and developers spot apps from
1253 various ways that may be running with too much privilege.")
1254 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
1255 (license (list license:lgpl2.1+ license:gpl2+))))
1256
1257 (define-public smartmontools
1258 (package
1259 (name "smartmontools")
1260 (version "6.5")
1261 (source (origin
1262 (method url-fetch)
1263 (uri (string-append
1264 "mirror://sourceforge/smartmontools/smartmontools/"
1265 version "/smartmontools-" version ".tar.gz"))
1266 (sha256
1267 (base32
1268 "1g25r6sx85b5lay5n6sbnqv05qxzj6xsafsp93hnrg1h044bps49"))))
1269 (build-system gnu-build-system)
1270 (inputs `(("libcap-ng" ,libcap-ng)))
1271 (home-page "http://www.smartmontools.org/")
1272 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
1273 (description
1274 "The smartmontools package contains utility programs to control and
1275 monitor storage systems using the Self-Monitoring, Analysis and Reporting
1276 Technology System (S.M.A.R.T.) built into most modern ATA and SCSI harddisks.
1277 In many cases, these utilities will provide advanced warning of disk
1278 degradation and failure.")
1279 (license license:gpl2+)))
1280
1281 (define-public fdupes
1282 (package
1283 (name "fdupes")
1284 (version "1.51")
1285 (source
1286 (origin
1287 (method url-fetch)
1288 (uri (string-append
1289 "https://github.com/adrianlopezroche/fdupes/archive/fdupes-"
1290 version ".tar.gz"))
1291 (sha256
1292 (base32
1293 "11j96vxl9vg3jsnxqxskrv3gad6dh7hz2zpyc8n31xzyxka1c7kn"))))
1294 (build-system gnu-build-system)
1295 (arguments
1296 '(#:phases (alist-delete 'configure %standard-phases)
1297 #:tests? #f ; no 'check' target
1298 #:make-flags (list (string-append "PREFIX="
1299 (assoc-ref %outputs "out")))))
1300 (home-page "https://github.com/adrianlopezroche/fdupes")
1301 (synopsis "Identify duplicate files")
1302 (description
1303 "fdupes is a program for identifying duplicate files residing within
1304 specified directories.")
1305 (license license:expat)))
1306
1307 (define-public graphios
1308 (package
1309 (name "graphios")
1310 (version "2.0.3")
1311 (source
1312 (origin
1313 (method url-fetch)
1314 (uri (string-append
1315 "https://pypi.python.org/packages/source/g/graphios/graphios-"
1316 version ".tar.gz"))
1317 (sha256
1318 (base32
1319 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
1320 (build-system python-build-system)
1321 (arguments
1322 ;; Be warned: Building with Python 3 succeeds, but the build process
1323 ;; throws a syntax error that is ignored.
1324 `(#:python ,python-2
1325 #:phases
1326 (modify-phases %standard-phases
1327 (add-before 'build 'fix-setup.py
1328 (lambda* (#:key outputs #:allow-other-keys)
1329 ;; Fix hardcoded, unprefixed file names.
1330 (let ((out (assoc-ref outputs "out")))
1331 (substitute* '("setup.py")
1332 (("/etc") (string-append out "/etc"))
1333 (("/usr") out)
1334 (("distro_ver = .*") "distro_ver = ''"))
1335 #t))))))
1336 (inputs
1337 `(("python-setuptools" ,python2-setuptools)))
1338 (home-page "https://github.com/shawn-sterling/graphios")
1339 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
1340 (description
1341 "Graphios is a script to emit nagios perfdata to various upstream metrics
1342 processing and time-series systems. It's currently compatible with Graphite,
1343 Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
1344 of supported upstream metrics systems simultaneously.")
1345 (license license:gpl2+)))
1346
1347 (define-public ansible
1348 (package
1349 (name "ansible")
1350 (version "2.1.0.0")
1351 (source
1352 (origin
1353 (method url-fetch)
1354 (uri (pypi-uri "ansible" version))
1355 (sha256
1356 (base32
1357 "1bfc2xiplpad6f2nwi48y0kps7xqnsll85dlz63cy8k5bysl6d20"))))
1358 (build-system python-build-system)
1359 (native-inputs
1360 `(("python2-setuptools" ,python2-setuptools)
1361 ("python2-pycrypto" ,python2-pycrypto)
1362 ("python2-httplib2" ,python2-httplib2)
1363 ("python2-passlib" ,python2-passlib)
1364 ("python2-nose" ,python2-nose)
1365 ("python2-mock" ,python2-mock)
1366 ("python2-jinja2" ,python2-jinja2)
1367 ("python2-pyyaml" ,python2-pyyaml)
1368 ("python2-paramiko" ,python2-paramiko)))
1369 (inputs
1370 `(("python2-pycrypto" ,python2-pycrypto)
1371 ("python2-jinja2" ,python2-jinja2)
1372 ("python2-pyyaml" ,python2-pyyaml)
1373 ("python2-paramiko" ,python2-paramiko)))
1374 (arguments
1375 `(#:python ,python-2)) ; incompatible with Python 3
1376 (home-page "http://ansible.com/")
1377 (synopsis "Radically simple IT automation")
1378 (description "Ansible is a radically simple IT automation system. It
1379 handles configuration-management, application deployment, cloud provisioning,
1380 ad-hoc task-execution, and multinode orchestration - including trivializing
1381 things like zero downtime rolling updates with load balancers.")
1382 (license license:gpl3+)))
1383
1384 (define-public cpulimit
1385 (package
1386 (name "cpulimit")
1387 (version "0.2")
1388 (source
1389 (origin
1390 (method url-fetch)
1391 (uri (string-append "https://github.com/opsengine/cpulimit/archive/v"
1392 version ".tar.gz"))
1393 (file-name (string-append name "-" version ".tar.gz"))
1394 (sha256
1395 (base32
1396 "1nn2w849xd5bw4y5sqnll29nxdwl5h0cv4smc7dwmpb9qnd2ycb4"))))
1397 (build-system gnu-build-system)
1398 (arguments
1399 `(#:phases (modify-phases %standard-phases
1400 (delete 'configure)
1401 (replace
1402 'build
1403 (lambda _
1404 (zero? (system* "make" "CC=gcc" "-Csrc"))))
1405 (replace
1406 'check
1407 (lambda _
1408 (zero? (system* "make" "CC=gcc" "-Ctests"))))
1409 (replace
1410 'install
1411 (lambda* (#:key outputs #:allow-other-keys)
1412 (let* ((out (assoc-ref outputs "out"))
1413 (bin (string-append out "/bin")))
1414 (install-file "src/cpulimit" bin)))))))
1415 (home-page "https://github.com/opsengine/cpulimit")
1416 (synopsis "Limit CPU usage")
1417 (description
1418 "Cpulimit limits the CPU usage of a process. It does not change the nice
1419 value or other scheduling priority settings, but the real CPU usage, and is
1420 able to adapt itself dynamically to the overall system load. Children
1421 processes and threads of the specified process may optionally share the same
1422 limits.")
1423 (license license:gpl2+)))
1424
1425 (define-public autojump
1426 (package
1427 (name "autojump")
1428 (version "22.2.4")
1429 (source
1430 (origin
1431 (method url-fetch)
1432 (uri (string-append "https://github.com/wting/autojump/archive/"
1433 "release-v" version ".tar.gz"))
1434 (file-name (string-append name "-" version ".tar.gz"))
1435 (sha256
1436 (base32
1437 "0xglj7nb8xczaqy2dhn78drqdwqj64rqpymxhqmmwwqzfaqassw1"))))
1438 (build-system gnu-build-system)
1439 (native-inputs ;for tests
1440 `(("python-mock" ,python-mock)
1441 ("python-pytest" ,python-pytest)))
1442 (inputs
1443 `(("python" ,python-wrapper)))
1444 (arguments
1445 `(#:phases (modify-phases %standard-phases
1446 (delete 'configure)
1447 (delete 'build)
1448 (replace 'check
1449 (lambda _
1450 (zero?
1451 (system* "python" "tests/autojump_utils_test.py"))))
1452 (replace 'install
1453 ;; The install.py script doesn't allow system installation
1454 ;; into an arbitrary prefix, so do our own install.
1455 (lambda* (#:key outputs #:allow-other-keys)
1456 (let* ((out (assoc-ref outputs "out"))
1457 (bin (string-append out "/bin"))
1458 (share (string-append out "/share/autojump"))
1459 (py (string-append out "/lib/python"
1460 ,(version-major+minor
1461 (package-version python-wrapper))
1462 "/site-packages"))
1463 (man (string-append out "/share/man/man1")))
1464 (install-file "bin/autojump" bin)
1465 (for-each (λ (f) (install-file f py))
1466 (find-files "bin" "\\.py$"))
1467 (for-each (λ (f) (install-file f share))
1468 (find-files "bin" "autojump\\..*$"))
1469 (substitute* (string-append share "/autojump.sh")
1470 (("/usr/local") out))
1471 (install-file "docs/autojump.1" man)
1472 (wrap-program (string-append bin "/autojump")
1473 `("PYTHONPATH" ":" prefix (,py)))
1474 #t))))))
1475 (home-page "https://github.com/wting/autojump")
1476 (synopsis "Shell extension for filesystem navigation")
1477 (description
1478 "Autojump provides a faster way to navigate your filesystem, with a \"cd
1479 command that learns\". It works by maintaining a database of the directories
1480 you use the most from the command line and allows you to \"jump\" to
1481 frequently used directories by typing only a small pattern.")
1482 (license license:gpl3+)))
1483
1484 (define-public iftop
1485 (package
1486 (name "iftop")
1487 (version "1.0pre4")
1488 (source (origin
1489 (method url-fetch)
1490 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
1491 "/iftop-" version ".tar.gz"))
1492 (sha256
1493 (base32
1494 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
1495 (build-system gnu-build-system)
1496 (inputs
1497 `(("libpcap" ,libpcap)
1498 ("ncurses" ,ncurses)))
1499 (synopsis "Monitor network usage")
1500 (description "Iftop does for network usage what @command{top} does
1501 for CPU usage. It listens to network traffic on a named interface and
1502 displays a table of current bandwidth usage by pairs of hosts.")
1503 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
1504 (license license:gpl2+)))
1505
1506 (define-public munge
1507 (package
1508 (name "munge")
1509 (version "0.5.12")
1510 (source (origin
1511 (method url-fetch)
1512 (uri (string-append "https://github.com/dun/munge/releases/"
1513 "download/munge-" version "/munge-"
1514 version ".tar.xz"))
1515 (sha256
1516 (base32
1517 "1s0vlwgm3hcx75vcmjf2y3icy5nv8y07bx93w2cmm6a7x71y6wp9"))))
1518 (inputs
1519 `(("openssl" ,openssl)
1520 ("libgcrypt" ,libgcrypt)))
1521 (build-system gnu-build-system)
1522 (home-page "https://dun.github.io/munge/")
1523 (synopsis "Cluster computing authentication service")
1524 (description
1525 "Munge is an authentication service for creating and validating
1526 credentials. It allows a process to authenticate the UID and GID of another
1527 local or remote process within a group of hosts having common users and
1528 groups. These hosts form a security realm that is defined by a shared
1529 cryptographic key. Clients within this security realm can create and validate
1530 credentials without the use of root privileges, reserved ports, or
1531 platform-specific methods.")
1532 (license license:gpl3+)))
1533
1534 (define-public audit
1535 (package
1536 (name "audit")
1537 (version "2.4.5")
1538 (source (origin
1539 (method url-fetch)
1540 (uri (string-append "http://people.redhat.com/sgrubb/audit/"
1541 "audit-" version ".tar.gz"))
1542 (sha256
1543 (base32
1544 "1q1q51dvxscbi4kbakmd4bn0xrvwwaiwvaya79925cbrqwzxsg77"))))
1545 (build-system gnu-build-system)
1546 (home-page "http://people.redhat.com/sgrubb/audit/")
1547 (arguments
1548 `(#:configure-flags (list "--with-python=no")
1549 #:phases
1550 (modify-phases %standard-phases
1551 (add-after 'unpack 'fix-tests
1552 (lambda _
1553 ;; In the build environmnte /etc/passwd does not contain an entry
1554 ;; for root/0, so we have to patch the expected value.
1555 (substitute* "auparse/test/auparse_test.ref"
1556 (("=0 \\(root\\)") "=0 (unknown(0))"))
1557 #t)))))
1558 (inputs
1559 `(("openldap" ,openldap)
1560 ("openssl" ,openssl)
1561 ("sasl" ,cyrus-sasl)))
1562 (synopsis "User-space component to the Linux auditing system")
1563 (description
1564 "auditd is the user-space component to the Linux auditing system, which
1565 allows logging of system calls made by user-land processes. It's responsible
1566 for writing audit records to the disk. Viewing the logs is done with the
1567 @code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
1568 done with the @code{auditctl} utility.")
1569 (license license:gpl2+)))
1570
1571 (define-public nmap
1572 (package
1573 (name "nmap")
1574 (version "7.12")
1575 (source (origin
1576 (method url-fetch)
1577 (uri (string-append "https://nmap.org/dist/nmap-" version
1578 ".tar.bz2"))
1579 (sha256
1580 (base32
1581 "014vagh9ak10hidwzp9s6g30y5h5fhsh8wykcnc1hnn9hwm0ipv3"))
1582 (modules '((guix build utils)))
1583 (snippet
1584 '(map delete-file-recursively
1585 ;; Remove bundled lua, pcap, and pcre libraries.
1586 ;; FIXME: Remove bundled liblinear once packaged.
1587 '("liblua"
1588 "libpcap"
1589 "libpcre"
1590 ;; Remove pre-compiled binares.
1591 "mswin32")))))
1592 (build-system gnu-build-system)
1593 (inputs
1594 `(("openssl" ,openssl)
1595 ("libpcap" ,libpcap)
1596 ("pcre" ,pcre)
1597 ("lua" ,lua)
1598 ;; For 'ndiff'.
1599 ("python" ,python-2)))
1600
1601 ;; TODO Add zenmap output.
1602 (outputs '("out" "ndiff"))
1603 (arguments
1604 '(#:configure-flags '("--without-zenmap")
1605 #:phases
1606 (modify-phases %standard-phases
1607 (replace 'install
1608 (lambda* (#:key outputs #:allow-other-keys)
1609 (define (make out . args)
1610 (unless (zero? (apply system* "make"
1611 (string-append "prefix=" out)
1612 args))
1613 (error "make failed")))
1614 (define (python-path dir)
1615 (string-append dir "/lib/python2.7/site-packages"))
1616 (let ((out (assoc-ref outputs "out"))
1617 (ndiff (assoc-ref outputs "ndiff")))
1618 (for-each mkdir-p (list out ndiff))
1619 (make out
1620 "install-nmap"
1621 "install-nse"
1622 "install-ncat"
1623 "install-nping")
1624 (make ndiff "install-ndiff")
1625 (wrap-program (string-append ndiff "/bin/ndiff")
1626 `("PYTHONPATH" prefix
1627 (,(python-path ndiff)))))))
1628 ;; These are the tests that do not require network access.
1629 (replace 'check
1630 (lambda _ (zero? (system* "make"
1631 "check-nse"
1632 "check-ndiff"
1633 "check-dns")))))
1634 ;; Nmap can't cope with out-of-source building.
1635 #:out-of-source? #f))
1636 (home-page "https://nmap.org/")
1637 (synopsis "Network discovery and security auditing tool")
1638 (description
1639 "Nmap (\"Network Mapper\") is a network discovery and security auditing
1640 tool. It is also useful for tasks such as network inventory, managing service
1641 upgrade schedules, and monitoring host or service uptime. It also provides an
1642 advanced netcat implementation (ncat), a utility for comparing scan
1643 results (ndiff), and a packet generation and response analysis tool (nping).")
1644 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
1645 ;; both use a 3-clause BSD license.
1646 (license (list license:nmap license:bsd-3))))
1647
1648 (define-public dstat
1649 (package
1650 (name "dstat")
1651 (version "0.7.3")
1652 (source (origin
1653 (method url-fetch)
1654 (uri (string-append
1655 "https://github.com/dagwieers/dstat/archive/"
1656 version ".tar.gz"))
1657 (file-name (string-append "dstat-" version ".tar.gz"))
1658 (sha256
1659 (base32
1660 "16286z3y2lc9nsq8njzjkv6k2vyxrj9xiixj1k3gnsbvhlhkirj6"))))
1661 (build-system gnu-build-system)
1662 (arguments
1663 `(#:tests? #f ;; no make check
1664 #:make-flags (let ((out (assoc-ref %outputs "out")))
1665 (list (string-append "DESTDIR=" out)
1666 "prefix=/"))
1667 ;; no configure script
1668 #:phases (alist-delete 'configure %standard-phases)))
1669 (inputs `(("python-2" ,python-2)))
1670 (synopsis "Versatile resource statistics tool")
1671 (description "Dstat is a versatile replacement for @command{vmstat},
1672 @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes
1673 some of their limitations and adds some extra features, more counters and
1674 flexibility. Dstat is handy for monitoring systems during performance tuning
1675 tests, benchmarks or troubleshooting.
1676
1677 Dstat allows you to view all of your system resources in real-time, you can,
1678 e.g., compare disk utilization in combination with interrupts from your IDE
1679 controller, or compare the network bandwidth numbers directly with the disk
1680 throughput (in the same interval).")
1681 (home-page "http://dag.wiee.rs/home-made/dstat/")
1682 (license license:gpl2+)))
1683
1684 (define-public thefuck
1685 (package
1686 (name "thefuck")
1687 (version "3.9")
1688 (source (origin
1689 (method url-fetch)
1690 (uri (string-append "https://github.com/nvbn/thefuck/archive/"
1691 version ".tar.gz"))
1692 (file-name (string-append name "-" version ".tar.gz"))
1693 (sha256
1694 (base32
1695 "0g4s2vkpl0mqhkdkbzib07qr4xf0cq25fvhdhna52290qgd69pwf"))))
1696 (build-system python-build-system)
1697 (native-inputs
1698 `(("python-setuptools" ,python-setuptools)))
1699 (inputs
1700 `(("python-colorama" ,python-colorama)
1701 ("python-decorator" ,python-decorator)
1702 ("python-psutil" ,python-psutil)
1703 ("python-six" ,python-six)))
1704 (home-page "https://github.com/nvbn/thefuck")
1705 (synopsis "Correct mistyped console command")
1706 (description
1707 "The Fuck tries to match a rule for a previous, mistyped command, creates
1708 a new command using the matched rule, and runs it.")
1709 (license license:x11)))
1710
1711 (define-public di
1712 (package
1713 (name "di")
1714 (version "4.42")
1715 (source
1716 (origin
1717 (method url-fetch)
1718 (uri (string-append "https://gentoo.com/di/di-" version ".tar.gz"))
1719 (sha256
1720 (base32 "1i6m9zdnidn8268q1lz9fd8payk7s4pgwh5zlam9rr4dy6h6a67n"))))
1721 (build-system gnu-build-system)
1722 (arguments
1723 `(#:tests? #f ; Obscure test failures.
1724 #:phases
1725 (modify-phases %standard-phases
1726 (delete 'configure)
1727 (add-before 'build 'setup-environment
1728 (lambda* (#:key outputs #:allow-other-keys)
1729 (setenv "CC" "gcc")
1730 (setenv "prefix" (assoc-ref outputs "out"))
1731 #t)))
1732 #:make-flags (list "--environment-overrides")))
1733 (home-page "https://www.gentoo.com/di/")
1734 (synopsis "Advanced df like disk information utility")
1735 (description
1736 "'di' is a disk information utility, displaying everything
1737 (and more) that your @code{df} command does. It features the ability to
1738 display your disk usage in whatever format you prefer. It is designed to be
1739 highly portable. Great for heterogenous networks.")
1740 (license license:zlib)))