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