gnu: rush: Fix CVE-2013-6889.
[jackhill/guix/guix.git] / gnu / packages / admin.scm
... / ...
CommitLineData
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
95integrity checker. It creates a database from the regular expression rules
96that it finds from its configuration files. Once this database is initialized
97it can be used to verify the integrity of the files. It has several message
98digest algorithms that are used to check the integrity of files. All of the
99usual 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,
127dd, tar, gzip/gunzip, cat, etc.) currently running on your system and displays
128the percentage of copied data. It can also show estimated time and throughput,
129and 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
166execution of system services, replacing similar functionality found in
167typical init systems. It provides dependency-handling through a convenient
168interface 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
191the execution of system services, replacing similar functionality found in
192typical init systems. It provides dependency-handling through a convenient
193interface 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
217graphs 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
238application (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
258other programs. It reads the list of programs to be started from its
259configuration file, executes them, and then monitors their status,
260re-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
284client 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:
334login, 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,
386asks for a login name and then transfers over to 'login'. It is extended to
387allow 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
429files, which contain information about the IANA-assigned port, protocol, and
430ONC 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
457across network connections, using the TCP/IP protocol. It is designed to be a
458reliable \"back-end\" tool that can be used directly or easily driven by other
459programs and scripts. At the same time, it is a feature-rich network debugging
460and exploration tool, since it can create almost any kind of connection you
461would 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
483connection 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
620reference implementation of all aspects of DHCP, through a suite of DHCP
621tools: server, client, and relay agent.")
622 (license license:isc))))
623
624(define-public libpcap
625 (package
626 (name "libpcap")
627 (version "1.7.4")
628 (source (origin
629 (method url-fetch)
630 (uri (string-append "http://www.tcpdump.org/release/libpcap-"
631 version ".tar.gz"))
632 (sha256
633 (base32
634 "1c28ykkizd7jqgzrfkg7ivqjlqs9p6lygp26bsw2i0z8hwhi3lvs"))))
635 (build-system gnu-build-system)
636 (native-inputs `(("bison" ,bison) ("flex" ,flex)))
637 (arguments '(#:configure-flags '("--with-pcap=linux")
638 #:tests? #f)) ; no 'check' target
639 (home-page "http://www.tcpdump.org")
640 (synopsis "Network packet capture library")
641 (description
642 "libpcap is an interface for user-level packet capture. It provides a
643portable framework for low-level network monitoring. Applications include
644network statistics collection, security monitoring, network debugging, etc.")
645
646 ;; fad-*.c and a couple other files are BSD-4, but the rest is BSD-3.
647 (license license:bsd-3)))
648
649(define-public tcpdump
650 (package
651 (name "tcpdump")
652 (version "4.7.4")
653 (source (origin
654 (method url-fetch)
655 (uri (string-append "http://www.tcpdump.org/release/tcpdump-"
656 version ".tar.gz"))
657 (sha256
658 (base32
659 "1byr8w6grk08fsq0444jmcz9ar89lq9nf4mjq2cny0w9k8k21rbb"))))
660 (build-system gnu-build-system)
661 (inputs `(("libpcap" ,libpcap)
662 ("openssl" ,openssl)))
663 (native-inputs `(("perl" ,perl))) ; for tests
664 (home-page "http://www.tcpdump.org/")
665 (synopsis "Network packet analyzer")
666 (description
667 "Tcpdump is a command-line tool to analyze network traffic passing
668through the network interface controller.")
669 (license license:bsd-3)))
670
671(define-public jnettop
672 (package
673 (name "jnettop")
674 (version "0.13.0")
675 (source (origin
676 (method url-fetch)
677 (uri (string-append "http://jnettop.kubs.info/dist/jnettop-"
678 version ".tar.gz"))
679 (sha256
680 (base32
681 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
682 (build-system gnu-build-system)
683 (native-inputs
684 `(("pkg-config" ,pkg-config)))
685 (inputs
686 `(("glib" ,glib)
687 ("ncurses" ,ncurses)
688 ("libpcap" ,libpcap)))
689 (home-page "http://jnettop.kubs.info/")
690 (synopsis "Visualize network traffic by bandwidth use")
691 (description
692 "Jnettop is a traffic visualiser, which captures traffic going
693through the host it is running from and displays streams sorted
694by bandwidth they use.")
695 (license license:gpl2+)))
696
697(define-public clusterssh
698 (package
699 (name "clusterssh")
700 (version "3.28")
701 (source (origin
702 (method url-fetch)
703 (uri (string-append "mirror://sourceforge/clusterssh/"
704 "clusterssh-" version ".tar.gz"))
705 (sha256
706 (base32
707 "1bwggpvaj2al5blg1ynapviv2kpydffpzq2zkhi81najnvzc1rr7"))))
708 (build-system gnu-build-system)
709 (inputs `(("perl" ,perl)))
710 (propagated-inputs `(("xterm" ,xterm)
711 ("perl-tk" ,perl-tk)
712 ("perl-x11-protocol" ,perl-x11-protocol)))
713 (arguments
714 `(#:phases
715 (alist-cons-after
716 'install 'set-load-paths
717 (lambda* (#:key inputs outputs #:allow-other-keys)
718 ;; Put the perl-tk and perl-x11-protocol modules in the perl inc
719 ;; path for PROG
720 (let* ((out (assoc-ref outputs "out"))
721 (prog (string-append out "/bin/cssh"))
722 (perl-ver ,(package-version perl))
723 (x11-inc (string-append
724 (assoc-ref inputs "perl-x11-protocol")
725 "/lib/perl5/site_perl/" perl-ver))
726 (tk-inc (string-append
727 (assoc-ref inputs "perl-tk")
728 "/lib/perl5/site_perl/" perl-ver
729 "/x86_64-linux")))
730 (wrap-program
731 prog
732 `("PERL5LIB" ":" prefix (,x11-inc ,tk-inc)))))
733 %standard-phases)))
734 ;; The clusterssh.sourceforge.net address requires login to view
735 (home-page "http://sourceforge.net/projects/clusterssh/")
736 (synopsis "Secure concurrent multi-server terminal control")
737 (description
738 "ClusterSSH controls a number of xterm windows via a single graphical
739console window to allow commands to be interactively run on multiple servers
740over ssh connections.")
741 (license license:gpl2+)))
742
743(define-public rottlog
744 (package
745 (name "rottlog")
746 (version "0.72.2")
747 (source (origin
748 (method url-fetch)
749 (uri (string-append "mirror://gnu/rottlog/rottlog-"
750 version ".tar.gz"))
751 (sha256
752 (base32
753 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
754 (modules '((guix build utils)))
755 (snippet
756 '(substitute* "Makefile.in"
757 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
758 ;; Don't try to chown root.
759 "")
760 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
761 ;; Don't attempt to create /var/lib/rottlog.
762 "true")))))
763 (build-system gnu-build-system)
764 (arguments
765 '(#:configure-flags (list (string-append "ROTT_ETCDIR="
766 (assoc-ref %outputs "out")
767 "/etc")
768 "--localstatedir=/var")
769 #:phases (alist-cons-after
770 'install 'install-info
771 (lambda _
772 (zero? (system* "make" "install-info")))
773 %standard-phases)))
774 (native-inputs `(("texinfo" ,texinfo)
775 ("util-linux" ,util-linux))) ; for 'cal'
776 (home-page "http://www.gnu.org/software/rottlog/")
777 (synopsis "Log rotation and management")
778 (description
779 "GNU Rot[t]log is a program for managing log files. It is used to
780automatically rotate out log files when they have reached a given size or
781according to a given schedule. It can also be used to automatically compress
782and archive such logs. Rot[t]log will mail reports of its activity to the
783system administrator.")
784 (license license:gpl3+)))
785
786(define-public sudo
787 (package
788 (name "sudo")
789 (version "1.8.15")
790 (source (origin
791 (method url-fetch)
792 (uri
793 (list (string-append "http://www.sudo.ws/sudo/dist/sudo-"
794 version ".tar.gz")
795 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
796 version ".tar.gz")))
797 (sha256
798 (base32
799 "0263gi6i19fyzzc488n0qw3m518i39f6a7qmrfvahk9j10bkh5j3"))
800 (patches (search-patches "sudo-CVE-2015-5602.patch"))))
801 (build-system gnu-build-system)
802 (arguments
803 `(#:configure-flags
804 (list "--with-logpath=/var/log/sudo.log"
805 "--with-rundir=/var/run/sudo" ;must be cleaned up at boot time
806 "--with-vardir=/var/db/sudo"
807 "--with-iologdir=/var/log/sudo-io"
808
809 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
810 ;; provide it.
811 (string-append "CPPFLAGS=-D_PATH_MV='\""
812 (assoc-ref %build-inputs "coreutils")
813 "/bin/mv\"'"))
814
815 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
816 #:parallel-build? #f
817
818 #:phases (alist-cons-before
819 'configure 'pre-configure
820 (lambda _
821 (substitute* "src/sudo_usage.h.in"
822 ;; Do not capture 'configure' arguments since we would
823 ;; unduly retain references, and also because the
824 ;; CPPFLAGS above would close the string literal
825 ;; prematurely.
826 (("@CONFIGURE_ARGS@") "\"\""))
827 (substitute* (find-files "." "Makefile\\.in")
828 (("-o [[:graph:]]+ -g [[:graph:]]+")
829 ;; Allow installation as non-root.
830 "")
831 (("^install: (.*)install-sudoers(.*)" _ before after)
832 ;; Don't try to create /etc/sudoers.
833 (string-append "install: " before after "\n"))
834 (("\\$\\(DESTDIR\\)\\$\\(rundir\\)")
835 ;; Don't try to create /run/sudo.
836 "$(TMPDIR)/dummy")
837 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
838 ;; Don't try to create /var/db/sudo.
839 "$(TMPDIR)/dummy")))
840 %standard-phases)
841
842 ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
843 ;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
844 #:tests? #f))
845 (inputs
846 `(("groff" ,groff)
847 ("linux-pam" ,linux-pam)
848 ("coreutils" ,coreutils)))
849 (home-page "http://www.sudo.ws/")
850 (synopsis "Run commands as root")
851 (description
852 "Sudo (su \"do\") allows a system administrator to delegate authority to
853give certain users (or groups of users) the ability to run some (or all)
854commands as root or another user while providing an audit trail of the
855commands and their arguments.")
856
857 ;; See <http://www.sudo.ws/sudo/license.html>.
858 (license license:x11)))
859
860(define-public wpa-supplicant-minimal
861 (package
862 (name "wpa-supplicant-minimal")
863 (version "2.5")
864 (source (origin
865 (method url-fetch)
866 (uri (string-append
867 "http://w1.fi/releases/wpa_supplicant-"
868 version
869 ".tar.gz"))
870 (sha256
871 (base32
872 "05mkp5bx1c3z7h5biddsv0p49gkrq9ksany3anp4wdiv92p5prfc"))
873 (patches
874 (search-patches "wpa-supplicant-CVE-2015-5310.patch"
875 "wpa-supplicant-CVE-2015-5314.patch"
876 "wpa-supplicant-CVE-2015-5315.patch"
877 "wpa-supplicant-CVE-2015-5316.patch"
878 "wpa-supplicant-CVE-2016-4476.patch"
879 "wpa-supplicant-CVE-2016-4477-pt1.patch"
880 "wpa-supplicant-CVE-2016-4477-pt2.patch"
881 "wpa-supplicant-CVE-2016-4477-pt3.patch"
882 "wpa-supplicant-CVE-2016-4477-pt4.patch"))))
883 (build-system gnu-build-system)
884 (arguments
885 '(#:phases (alist-replace
886 'configure
887 (lambda* (#:key outputs #:allow-other-keys)
888 (chdir "wpa_supplicant")
889 (copy-file "defconfig" ".config")
890 (let ((port (open-file ".config" "al")))
891 (display "
892 CONFIG_DEBUG_SYSLOG=y
893
894 # Choose GnuTLS (the default is OpenSSL.)
895 CONFIG_TLS=gnutls
896
897 CONFIG_DRIVER_NL80211=y
898 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
899 CONFIG_LIBNL32=y
900 CONFIG_READLINE=y\n" port)
901 (close-port port)))
902
903 (alist-cons-after
904 'install 'install-man-pages
905 (lambda* (#:key outputs #:allow-other-keys)
906 (let* ((out (assoc-ref outputs "out"))
907 (man (string-append out "/share/man"))
908 (man5 (string-append man "/man5"))
909 (man8 (string-append man "/man8")))
910 (define (copy-man-page target)
911 (lambda (file)
912 (copy-file file
913 (string-append target "/"
914 (basename file)))))
915
916 (mkdir-p man5) (mkdir man8)
917 (for-each (copy-man-page man5)
918 (find-files "doc/docbook" "\\.5"))
919 (for-each (copy-man-page man8)
920 (find-files "doc/docbook" "\\.8"))
921 #t))
922 %standard-phases))
923
924 #:make-flags (list "CC=gcc"
925 (string-append "BINDIR=" (assoc-ref %outputs "out")
926 "/sbin")
927 (string-append "LIBDIR=" (assoc-ref %outputs "out")
928 "/lib"))
929 #:tests? #f))
930 (inputs
931 `(("readline" ,readline)
932 ("libnl" ,libnl)
933 ("gnutls" ,gnutls)
934 ("libgcrypt" ,libgcrypt))) ;needed by crypto_gnutls.c
935 (native-inputs
936 `(("pkg-config" ,pkg-config)))
937 (home-page "http://w1.fi/wpa_supplicant/")
938 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
939 (description
940 "wpa_supplicant is a WPA Supplicant with support for WPA and WPA2 (IEEE
941802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in
942the client stations. It implements key negotiation with a WPA Authenticator
943and it controls the roaming and IEEE 802.11 authentication/association of the
944WLAN driver.
945
946This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
947
948 ;; In practice, this is linked against Readline, which makes it GPLv3+.
949 (license license:bsd-3)))
950
951(define-public wpa-supplicant
952 (package (inherit wpa-supplicant-minimal)
953 (name "wpa-supplicant")
954 (inputs `(("dbus" ,dbus)
955 ,@(package-inputs wpa-supplicant-minimal)))
956 (arguments
957 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
958 ((#:phases phases)
959 `(alist-cons-after
960 'configure 'configure-for-dbus
961 (lambda _
962 (let ((port (open-file ".config" "al")))
963 (display "
964 CONFIG_CTRL_IFACE_DBUS=y
965 CONFIG_CTRL_IFACE_DBUS_NEW=y
966 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
967 (close-port port))
968 #t)
969 (alist-cons-after
970 'install-man-pages 'install-dbus-conf
971 (lambda* (#:key outputs #:allow-other-keys)
972 (let* ((out (assoc-ref outputs "out"))
973 (dir (string-append out "/etc/dbus-1/system.d")))
974 (mkdir-p dir)
975 (copy-file "dbus/dbus-wpa_supplicant.conf"
976 (string-append dir "/wpa_supplicant.conf"))))
977 ,phases)))))))
978
979(define-public wakelan
980 (package
981 (name "wakelan")
982 (version "1.1")
983 (source (origin
984 (method url-fetch)
985 (uri (string-append
986 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
987 version ".tar.gz"))
988 (sha256
989 (base32
990 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
991 (build-system gnu-build-system)
992 (arguments
993 '(#:phases (alist-replace
994 'configure
995 (lambda* (#:key outputs #:allow-other-keys)
996 (let ((out (assoc-ref outputs "out")))
997 (mkdir-p (string-append out "/bin"))
998 (mkdir-p (string-append out "/share/man/man1"))
999
1000 ;; It's an old configure script that doesn't understand
1001 ;; the extra options we pass.
1002 (setenv "CONFIG_SHELL" (which "bash"))
1003 (zero?
1004 (system* "./configure"
1005 (string-append "--prefix=" out)
1006 (string-append "--mandir=" out
1007 "/share/man")))))
1008 %standard-phases)
1009 #:tests? #f))
1010 (home-page "http://kernel.org") ; really, no home page
1011 (synopsis "Send a wake-on-LAN packet")
1012 (description
1013 "WakeLan broadcasts a properly formatted UDP packet across the local area
1014network, which causes enabled computers to power on.")
1015 (license license:gpl2+)))
1016
1017(define-public dmidecode
1018 (package
1019 (name "dmidecode")
1020 (version "2.12")
1021 (source (origin
1022 (method url-fetch)
1023 (uri (string-append
1024 "mirror://savannah/dmidecode/dmidecode-"
1025 version ".tar.bz2"))
1026 (sha256
1027 (base32
1028 "122hgaw8mpqdfra159lfl6pyk3837giqx6vq42j64fjnbl2z6gwi"))))
1029 (build-system gnu-build-system)
1030 (arguments
1031 '(#:phases (alist-delete 'configure %standard-phases)
1032 #:tests? #f ; no 'check' target
1033 #:make-flags (list (string-append "prefix="
1034 (assoc-ref %outputs "out")))))
1035 (home-page "http://www.nongnu.org/dmidecode/")
1036 (synopsis "Read hardware information from the BIOS")
1037 (description
1038 "Dmidecode reports information about your system's hardware as described
1039in your system BIOS according to the SMBIOS/DMI standard. This typically
1040includes system manufacturer, model name, serial number, BIOS version, asset
1041tag as well as a lot of other details of varying level of interest and
1042reliability depending on the manufacturer. This will often include usage
1043status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
1044module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
1045 (license license:gpl2+)))
1046
1047(define-public acpica
1048 (package
1049 (name "acpica")
1050 (version "20150410")
1051 (source (origin
1052 (method url-fetch)
1053 (uri (string-append
1054 "https://acpica.org/sites/acpica/files/acpica-unix2-"
1055 version ".tar.gz"))
1056 (sha256
1057 (base32
1058 "0q1fjwkyw9x6gsva6fd0zbn7ly4fx0ha4853f416np9kf2irillw"))))
1059 (build-system gnu-build-system)
1060 (native-inputs `(("flex" ,flex)
1061 ("bison" ,bison)))
1062 (arguments
1063 '(#:make-flags (list (string-append "PREFIX=" %output)
1064 "HOST=_LINUX"
1065 "OPT_CFLAGS=-Wall -fno-strict-aliasing")
1066 #:tests? #f ; no 'check' target.
1067 #:phases (alist-delete 'configure %standard-phases)))
1068 (home-page "http://acpica.org/")
1069 (synopsis "Tools for the development and debug of ACPI tables")
1070 (description
1071 "The ACPI Component Architecture (ACPICA) project provides an
1072OS-independent reference implementation of the Advanced Configuration and
1073Power Interface Specification (ACPI). ACPICA code contains those portions of
1074ACPI meant to be directly integrated into the host OS as a kernel-resident
1075subsystem, and a small set of tools to assist in developing and debugging ACPI
1076tables. This package contains only the user-space tools needed for ACPI table
1077development, not the kernel implementation of ACPI.")
1078 (license license:gpl2))) ; Dual GPLv2/ACPICA Licence
1079
1080(define-public stress
1081 (package
1082 (name "stress")
1083 (version "1.0.1")
1084 (source (origin
1085 (method url-fetch)
1086 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
1087 version ".orig.tar.gz"))
1088 (sha256
1089 (base32
1090 "1v9vnzlihqfjsxa93hdbrq72pqqk00dkylmlg8jpxhm7s1w9qfl1"))))
1091 (build-system gnu-build-system)
1092 (home-page "http://packages.debian.org/wheezy/stress")
1093 (synopsis "Impose load on and stress test a computer system")
1094 (description
1095 "Stress is a tool that imposes a configurable amount of CPU, memory, I/O,
1096or disk stress on a POSIX-compliant operating system and reports any errors it
1097detects.
1098
1099Stress is not a benchmark. It is a tool used by system administrators to
1100evaluate how well their systems will scale, by kernel programmers to evaluate
1101perceived performance characteristics, and by systems programmers to expose
1102the classes of bugs which only or more frequently manifest themselves when the
1103system is under heavy load.")
1104 (license license:gpl2+)))
1105
1106(define-public detox
1107 (package
1108 (name "detox")
1109 (version "1.2.0")
1110 (source (origin
1111 (method url-fetch)
1112 (uri (string-append "mirror://sourceforge/detox/detox-"
1113 version ".tar.bz2"))
1114 (sha256
1115 (base32
1116 "1y6vvjqsg54kl49cry73jbfhr04s7wjs779vrr9zrq6kww7dkymb"))))
1117 (build-system gnu-build-system)
1118 ;; Both flex and popt are used in this case for their runtime libraries
1119 ;; (libfl and libpopt).
1120 (inputs
1121 `(("flex" ,flex)
1122 ("popt" ,popt)))
1123 (arguments
1124 `(#:configure-flags `(,(string-append "--with-popt="
1125 (assoc-ref %build-inputs "popt")))
1126 #:tests? #f)) ;no 'check' target
1127 (home-page "http://detox.sourceforge.net")
1128 (synopsis "Clean up file names")
1129 (description
1130 "Detox is a program that renames files to make them easier to work with
1131under Unix and related operating systems. Spaces and various other unsafe
1132characters (such as \"$\") get replaced with \"_\". ISO 8859-1 (Latin-1)
1133characters can be replaced as well, as can UTF-8 characters.")
1134 (license license:bsd-3)))
1135
1136(define-public testdisk
1137 (package
1138 (name "testdisk")
1139 (version "6.14")
1140 (source (origin
1141 (method url-fetch)
1142 (uri (string-append "http://www.cgsecurity.org/testdisk-"
1143 version ".tar.bz2"))
1144 (sha256
1145 (base32
1146 "0v1jap83f5h99zv01v3qmqm160d36n4ysi0gyq7xzb3mqgmw75x5"))))
1147 (build-system gnu-build-system)
1148 (inputs
1149 `(;; ("ntfs" ,ntfs)
1150 ("util-linux" ,util-linux)
1151 ("openssl" ,openssl)
1152 ("zlib" ,zlib)
1153 ("e2fsprogs" ,e2fsprogs)
1154 ("libjpeg" ,libjpeg)
1155 ("ncurses" ,ncurses)))
1156 (home-page "http://www.cgsecurity.org/wiki/TestDisk")
1157 (synopsis "Data recovery tool")
1158 (description
1159 "TestDisk is a program for data recovery, primarily designed to help
1160recover lost partitions and/or make non-booting disks bootable again.")
1161 (license license:gpl2+)))
1162
1163(define-public tree
1164 (package
1165 (name "tree")
1166 (version "1.7.0")
1167 (source (origin
1168 (method url-fetch)
1169 (uri (string-append
1170 "http://mama.indstate.edu/users/ice/tree/src/tree-"
1171 version ".tgz"))
1172 (sha256
1173 (base32 "04kviw799qxly08zb8n5mgxfd96gyis6x69q2qiw86jnh87c4mv9"))))
1174 (build-system gnu-build-system)
1175 (arguments
1176 '(#:phases (alist-delete 'configure %standard-phases)
1177 #:tests? #f ; no check target
1178 #:make-flags (let ((out (assoc-ref %outputs "out")))
1179 (list (string-append "prefix=" out)))))
1180 (synopsis "Recursively list the contents of a directory")
1181 (description
1182 "Tree is a recursive directory listing command that produces a depth
1183indented listing of files, which is colorized ala dircolors if the LS_COLORS
1184environment variable is set and output is to tty.")
1185 (home-page "http://mama.indstate.edu/users/ice/tree/")
1186 (license license:gpl2+)))
1187
1188(define-public direvent
1189 (package
1190 (name "direvent")
1191 (version "5.0")
1192 (source (origin
1193 (method url-fetch)
1194 (uri (string-append "mirror://gnu/direvent/direvent-"
1195 version ".tar.gz"))
1196 (sha256
1197 (base32
1198 "1i14131y6m8wvirz6piw4zxz2q1kbpl0lniv5kl55rx4k372dg8z"))
1199 (modules '((guix build utils)))
1200 (snippet '(substitute* "tests/testsuite"
1201 (("#![[:blank:]]?/bin/sh")
1202 "#!$SHELL")))))
1203 (build-system gnu-build-system)
1204 (arguments
1205 '(#:phases (alist-cons-before
1206 'build 'patch-/bin/sh
1207 (lambda* (#:key inputs #:allow-other-keys)
1208 ;; Use the right shell when executing the watcher.
1209 (let ((bash (assoc-ref inputs "bash")))
1210 (substitute* "src/direvent.c"
1211 (("\"/bin/sh\"")
1212 (string-append "\"" bash "/bin/sh\"")))))
1213 %standard-phases)))
1214 (home-page "http://www.gnu.org/software/direvent/")
1215 (synopsis "Daemon to monitor directories for events such as file removal")
1216 (description
1217 "A daemon that monitors directories for events, such as creating,
1218deleting or modifying files. It can monitor different sets of directories for
1219different events. When an event is detected, direvent calls a specified
1220external program with information about the event, such as the location
1221within the file system where it occurred. Thus, \"direvent\" provides an
1222easy way to react immediately if given files undergo changes, for example, to
1223track changes in important system configuration files.")
1224 (license license:gpl3+)))
1225
1226(define-public libcap-ng
1227 (package
1228 (name "libcap-ng")
1229 (version "0.7.4")
1230 (source (origin
1231 (method url-fetch)
1232 (uri (string-append
1233 "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
1234 version ".tar.gz"))
1235 (sha256
1236 (base32
1237 "0ssvnh4cvhya0c1j6k6192zvqcq7nc0x01fb5nwhr0prfqr0i8j8"))))
1238 (build-system gnu-build-system)
1239 (inputs `(("python" ,python)))
1240 (home-page "http://people.redhat.com/sgrubb/libcap-ng/")
1241 (synopsis "Library for more easily working with POSIX capabilities")
1242 (description
1243 "The libcap-ng library is intended to make programming with POSIX
1244capabilities easier than the traditional libcap library. It includes
1245utilities that can analyse all currently running applications and print out
1246any capabilities and whether or not it has an open ended bounding set. The
1247included utilities are designed to let admins and developers spot apps from
1248various ways that may be running with too much privilege.")
1249 ;; The library is lgpl2.1+, but also ships some utils which are gpl2+.
1250 (license (list license:lgpl2.1+ license:gpl2+))))
1251
1252(define-public smartmontools
1253 (package
1254 (name "smartmontools")
1255 (version "6.3")
1256 (source (origin
1257 (method url-fetch)
1258 (uri (string-append
1259 "mirror://sourceforge/smartmontools/smartmontools/"
1260 version "/smartmontools-" version ".tar.gz"))
1261 (sha256
1262 (base32
1263 "06gy71jh2d3gcfmlbbrsqw7215knkfq59q3j6qdxfrar39fhcxx7"))))
1264 (build-system gnu-build-system)
1265 (inputs `(("libcap-ng" ,libcap-ng)))
1266 (home-page "http://www.smartmontools.org/")
1267 (synopsis "S.M.A.R.T. harddisk control and monitoring tools")
1268 (description
1269 "The smartmontools package contains utility programs to control and
1270monitor storage systems using the Self-Monitoring, Analysis and Reporting
1271Technology System (S.M.A.R.T.) built into most modern ATA and SCSI harddisks.
1272In many cases, these utilities will provide advanced warning of disk
1273degradation and failure.")
1274 (license license:gpl2+)))
1275
1276(define-public fdupes
1277 (package
1278 (name "fdupes")
1279 (version "1.51")
1280 (source
1281 (origin
1282 (method url-fetch)
1283 (uri (string-append
1284 "https://github.com/adrianlopezroche/fdupes/archive/fdupes-"
1285 version ".tar.gz"))
1286 (sha256
1287 (base32
1288 "11j96vxl9vg3jsnxqxskrv3gad6dh7hz2zpyc8n31xzyxka1c7kn"))))
1289 (build-system gnu-build-system)
1290 (arguments
1291 '(#:phases (alist-delete 'configure %standard-phases)
1292 #:tests? #f ; no 'check' target
1293 #:make-flags (list (string-append "PREFIX="
1294 (assoc-ref %outputs "out")))))
1295 (home-page "https://github.com/adrianlopezroche/fdupes")
1296 (synopsis "Identify duplicate files")
1297 (description
1298 "fdupes is a program for identifying duplicate files residing within
1299specified directories.")
1300 (license license:expat)))
1301
1302(define-public graphios
1303 (package
1304 (name "graphios")
1305 (version "2.0.3")
1306 (source
1307 (origin
1308 (method url-fetch)
1309 (uri (string-append
1310 "https://pypi.python.org/packages/source/g/graphios/graphios-"
1311 version ".tar.gz"))
1312 (sha256
1313 (base32
1314 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
1315 (build-system python-build-system)
1316 (arguments
1317 ;; Be warned: Building with Python 3 succeeds, but the build process
1318 ;; throws a syntax error that is ignored.
1319 `(#:python ,python-2
1320 #:phases
1321 (modify-phases %standard-phases
1322 (add-before 'build 'fix-setup.py
1323 (lambda* (#:key outputs #:allow-other-keys)
1324 ;; Fix hardcoded, unprefixed file names.
1325 (let ((out (assoc-ref outputs "out")))
1326 (substitute* '("setup.py")
1327 (("/etc") (string-append out "/etc"))
1328 (("/usr") out)
1329 (("distro_ver = .*") "distro_ver = ''"))
1330 #t))))))
1331 (inputs
1332 `(("python-setuptools" ,python2-setuptools)))
1333 (home-page "https://github.com/shawn-sterling/graphios")
1334 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
1335 (description
1336 "Graphios is a script to emit nagios perfdata to various upstream metrics
1337processing and time-series systems. It's currently compatible with Graphite,
1338Statsd, Librato and InfluxDB. Graphios can emit Nagios metrics to any number
1339of supported upstream metrics systems simultaneously.")
1340 (license license:gpl2+)))
1341
1342(define-public ansible
1343 (package
1344 (name "ansible")
1345 (version "1.9.2")
1346 (source
1347 (origin
1348 (method url-fetch)
1349 (uri (string-append
1350 "https://pypi.python.org/packages/source/a/ansible/ansible-"
1351 version
1352 ".tar.gz"))
1353 (sha256
1354 (base32
1355 "007fzgsqaahb0y4gjdxxmir9kcni7wph2z14jhqgpz88idrz8pn2"))))
1356 (build-system python-build-system)
1357 (native-inputs
1358 `(("python2-setuptools" ,python2-setuptools)
1359 ("python2-pycrypto" ,python2-pycrypto)
1360 ("python2-httplib2" ,python2-httplib2)
1361 ("python2-passlib" ,python2-passlib)
1362 ("python2-nose" ,python2-nose)
1363 ("python2-mock" ,python2-mock)
1364 ("python2-jinja2" ,python2-jinja2)
1365 ("python2-pyyaml" ,python2-pyyaml)
1366 ("python2-paramiko" ,python2-paramiko)))
1367 (inputs
1368 `(("python2-pycrypto" ,python2-pycrypto)
1369 ("python2-jinja2" ,python2-jinja2)
1370 ("python2-pyyaml" ,python2-pyyaml)
1371 ("python2-paramiko" ,python2-paramiko)))
1372 (arguments
1373 `(#:python ,python-2)) ; incompatible with Python 3
1374 (home-page "http://ansible.com/")
1375 (synopsis "Radically simple IT automation")
1376 (description "Ansible is a radically simple IT automation system. It
1377handles configuration-management, application deployment, cloud provisioning,
1378ad-hoc task-execution, and multinode orchestration - including trivializing
1379things like zero downtime rolling updates with load balancers.")
1380 (license license:gpl3+)))
1381
1382(define-public cpulimit
1383 (package
1384 (name "cpulimit")
1385 (version "0.2")
1386 (source
1387 (origin
1388 (method url-fetch)
1389 (uri (string-append "https://github.com/opsengine/cpulimit/archive/v"
1390 version ".tar.gz"))
1391 (file-name (string-append name "-" version ".tar.gz"))
1392 (sha256
1393 (base32
1394 "1nn2w849xd5bw4y5sqnll29nxdwl5h0cv4smc7dwmpb9qnd2ycb4"))))
1395 (build-system gnu-build-system)
1396 (arguments
1397 `(#:phases (modify-phases %standard-phases
1398 (delete 'configure)
1399 (replace
1400 'build
1401 (lambda _
1402 (zero? (system* "make" "CC=gcc" "-Csrc"))))
1403 (replace
1404 'check
1405 (lambda _
1406 (zero? (system* "make" "CC=gcc" "-Ctests"))))
1407 (replace
1408 'install
1409 (lambda* (#:key outputs #:allow-other-keys)
1410 (let* ((out (assoc-ref outputs "out"))
1411 (bin (string-append out "/bin")))
1412 (install-file "src/cpulimit" bin)))))))
1413 (home-page "https://github.com/opsengine/cpulimit")
1414 (synopsis "Limit CPU usage")
1415 (description
1416 "Cpulimit limits the CPU usage of a process. It does not change the nice
1417value or other scheduling priority settings, but the real CPU usage, and is
1418able to adapt itself dynamically to the overall system load. Children
1419processes and threads of the specified process may optionally share the same
1420limits.")
1421 (license license:gpl2+)))
1422
1423(define-public autojump
1424 (package
1425 (name "autojump")
1426 (version "22.2.4")
1427 (source
1428 (origin
1429 (method url-fetch)
1430 (uri (string-append "https://github.com/wting/autojump/archive/"
1431 "release-v" version ".tar.gz"))
1432 (file-name (string-append name "-" version ".tar.gz"))
1433 (sha256
1434 (base32
1435 "0xglj7nb8xczaqy2dhn78drqdwqj64rqpymxhqmmwwqzfaqassw1"))))
1436 (build-system gnu-build-system)
1437 (native-inputs ;for tests
1438 `(("python-mock" ,python-mock)
1439 ("python-pytest" ,python-pytest)))
1440 (inputs
1441 `(("python" ,python-wrapper)))
1442 (arguments
1443 `(#:phases (modify-phases %standard-phases
1444 (delete 'configure)
1445 (delete 'build)
1446 (replace 'check
1447 (lambda _
1448 (zero?
1449 (system* "python" "tests/autojump_utils_test.py"))))
1450 (replace 'install
1451 ;; The install.py script doesn't allow system installation
1452 ;; into an arbitrary prefix, so do our own install.
1453 (lambda* (#:key outputs #:allow-other-keys)
1454 (let* ((out (assoc-ref outputs "out"))
1455 (bin (string-append out "/bin"))
1456 (share (string-append out "/share/autojump"))
1457 (py (string-append out "/lib/python"
1458 ,(version-major+minor
1459 (package-version python-wrapper))
1460 "/site-packages"))
1461 (man (string-append out "/share/man/man1")))
1462 (install-file "bin/autojump" bin)
1463 (for-each (λ (f) (install-file f py))
1464 (find-files "bin" "\\.py$"))
1465 (for-each (λ (f) (install-file f share))
1466 (find-files "bin" "autojump\\..*$"))
1467 (substitute* (string-append share "/autojump.sh")
1468 (("/usr/local") out))
1469 (install-file "docs/autojump.1" man)
1470 (wrap-program (string-append bin "/autojump")
1471 `("PYTHONPATH" ":" prefix (,py)))
1472 #t))))))
1473 (home-page "https://github.com/wting/autojump")
1474 (synopsis "Shell extension for filesystem navigation")
1475 (description
1476 "Autojump provides a faster way to navigate your filesystem, with a \"cd
1477command that learns\". It works by maintaining a database of the directories
1478you use the most from the command line and allows you to \"jump\" to
1479frequently used directories by typing only a small pattern.")
1480 (license license:gpl3+)))
1481
1482(define-public iftop
1483 (package
1484 (name "iftop")
1485 (version "1.0pre4")
1486 (source (origin
1487 (method url-fetch)
1488 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
1489 "/iftop-" version ".tar.gz"))
1490 (sha256
1491 (base32
1492 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
1493 (build-system gnu-build-system)
1494 (inputs
1495 `(("libpcap" ,libpcap)
1496 ("ncurses" ,ncurses)))
1497 (synopsis "Monitor network usage")
1498 (description "Iftop does for network usage what @command{top} does
1499for CPU usage. It listens to network traffic on a named interface and
1500displays a table of current bandwidth usage by pairs of hosts.")
1501 (home-page "http://www.ex-parrot.com/~pdw/iftop/")
1502 (license license:gpl2+)))
1503
1504(define-public munge
1505 (package
1506 (name "munge")
1507 (version "0.5.11")
1508 (source (origin
1509 (method url-fetch)
1510 (uri (string-append "https://github.com/dun/munge/archive/munge-"
1511 version ".tar.gz"))
1512 (file-name (string-append name "-" version ".tar.gz"))
1513 (sha256
1514 (base32
1515 "0njplyalwwqh7xr7xc7klc6x06mq0ak8w2pxh85w8n4hxkmqqnf5"))))
1516 (inputs
1517 `(("openssl" ,openssl)
1518 ("libgcrypt" ,libgcrypt)))
1519 (build-system gnu-build-system)
1520 (home-page "http://dun.github.io/munge/")
1521 (synopsis "Cluster computing authentication service")
1522 (description
1523 "Munge is an authentication service for creating and validating
1524credentials. It allows a process to authenticate the UID and GID of another
1525local or remote process within a group of hosts having common users and
1526groups. These hosts form a security realm that is defined by a shared
1527cryptographic key. Clients within this security realm can create and validate
1528credentials without the use of root privileges, reserved ports, or
1529platform-specific methods.")
1530 (license license:gpl3+)))
1531
1532(define-public audit
1533 (package
1534 (name "audit")
1535 (version "2.4.5")
1536 (source (origin
1537 (method url-fetch)
1538 (uri (string-append "http://people.redhat.com/sgrubb/audit/"
1539 "audit-" version ".tar.gz"))
1540 (sha256
1541 (base32
1542 "1q1q51dvxscbi4kbakmd4bn0xrvwwaiwvaya79925cbrqwzxsg77"))))
1543 (build-system gnu-build-system)
1544 (home-page "http://people.redhat.com/sgrubb/audit/")
1545 (arguments
1546 `(#:configure-flags (list "--with-python=no")
1547 #:phases
1548 (modify-phases %standard-phases
1549 (add-after 'unpack 'fix-tests
1550 (lambda _
1551 ;; In the build environmnte /etc/passwd does not contain an entry
1552 ;; for root/0, so we have to patch the expected value.
1553 (substitute* "auparse/test/auparse_test.ref"
1554 (("=0 \\(root\\)") "=0 (unknown(0))"))
1555 #t)))))
1556 (inputs
1557 `(("openldap" ,openldap)
1558 ("openssl" ,openssl)
1559 ("sasl" ,cyrus-sasl)))
1560 (synopsis "User-space component to the Linux auditing system")
1561 (description
1562 "auditd is the user-space component to the Linux auditing system, which
1563allows logging of system calls made by user-land processes. It's responsible
1564for writing audit records to the disk. Viewing the logs is done with the
1565@code{ausearch} or @code{aureport} utilities. Configuring the audit rules is
1566done with the @code{auditctl} utility.")
1567 (license license:gpl2+)))
1568
1569(define-public nmap
1570 (package
1571 (name "nmap")
1572 (version "7.12")
1573 (source (origin
1574 (method url-fetch)
1575 (uri (string-append "https://nmap.org/dist/nmap-" version
1576 ".tar.bz2"))
1577 (sha256
1578 (base32
1579 "014vagh9ak10hidwzp9s6g30y5h5fhsh8wykcnc1hnn9hwm0ipv3"))
1580 (modules '((guix build utils)))
1581 (snippet
1582 '(map delete-file-recursively
1583 ;; Remove bundled lua, pcap, and pcre libraries.
1584 ;; FIXME: Remove bundled liblinear once packaged.
1585 '("liblua"
1586 "libpcap"
1587 "libpcre"
1588 ;; Remove pre-compiled binares.
1589 "mswin32")))))
1590 (build-system gnu-build-system)
1591 (inputs
1592 `(("openssl" ,openssl)
1593 ("libpcap" ,libpcap)
1594 ("pcre" ,pcre)
1595 ("lua" ,lua)
1596 ;; For 'ndiff'.
1597 ("python" ,python-2)))
1598
1599 ;; TODO Add zenmap output.
1600 (outputs '("out" "ndiff"))
1601 (arguments
1602 '(#:configure-flags '("--without-zenmap")
1603 #:phases
1604 (modify-phases %standard-phases
1605 (replace 'install
1606 (lambda* (#:key outputs #:allow-other-keys)
1607 (define (make out . args)
1608 (unless (zero? (apply system* "make"
1609 (string-append "prefix=" out)
1610 args))
1611 (error "make failed")))
1612 (define (python-path dir)
1613 (string-append dir "/lib/python2.7/site-packages"))
1614 (let ((out (assoc-ref outputs "out"))
1615 (ndiff (assoc-ref outputs "ndiff")))
1616 (for-each mkdir-p (list out ndiff))
1617 (make out
1618 "install-nmap"
1619 "install-nse"
1620 "install-ncat"
1621 "install-nping")
1622 (make ndiff "install-ndiff")
1623 (wrap-program (string-append ndiff "/bin/ndiff")
1624 `("PYTHONPATH" prefix
1625 (,(python-path ndiff)))))))
1626 ;; These are the tests that do not require network access.
1627 (replace 'check
1628 (lambda _ (zero? (system* "make"
1629 "check-nse"
1630 "check-ndiff"
1631 "check-dns")))))
1632 ;; Nmap can't cope with out-of-source building.
1633 #:out-of-source? #f))
1634 (home-page "https://nmap.org/")
1635 (synopsis "Network discovery and security auditing tool")
1636 (description
1637 "Nmap (\"Network Mapper\") is a network discovery and security auditing
1638tool. It is also useful for tasks such as network inventory, managing service
1639upgrade schedules, and monitoring host or service uptime. It also provides an
1640advanced netcat implementation (ncat), a utility for comparing scan
1641results (ndiff), and a packet generation and response analysis tool (nping).")
1642 ;; This package uses nmap's bundled versions of libdnet and liblinear, which
1643 ;; both use a 3-clause BSD license.
1644 (license (list license:nmap license:bsd-3))))