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>
14 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
78 (uri (string-append "mirror://sourceforge/aide/aide/"
79 version "/aide-" version ".tar.gz"))
82 "1vsrc0s62kv1i84skm6k6zy868gayjck268qwj38rpspc8c5qgih"))))
83 (build-system gnu-build-system)
88 `(("libgcrypt" ,libgcrypt)
89 ("libgpg-error" ,libgpg-error)
90 ("libmhash" ,libmhash)
92 (synopsis "File and directory integrity checker")
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+)))
103 (define-public progress
109 (uri (string-append "https://github.com/Xfennec/"
110 name "/archive/v" version ".tar.gz"))
112 (base32 "133iar4vq5vlklydb4cyazjy6slmpbndrws474mg738bd8avc30n"))
113 (file-name (string-append name "-" version ".tar.gz"))))
114 (build-system gnu-build-system)
116 `(("ncurses" ,ncurses)))
118 `(#:tests? #f ; There is no test suite.
119 #:make-flags (list "CC=gcc" "LDFLAGS+=-lncurses"
120 (string-append "PREFIX=" (assoc-ref %outputs "out")))
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+)))
133 ;; Deprecated. Kept around "just in case."
134 (let ((base-version "0.2")
138 (version (string-append base-version "." patch-level))
141 (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/dmd-"
142 base-version ".tar.gz"))
145 "10fl4k96f17gqx2fv8iw9c61ld26gsk4bbrlfqckdmiimz1k175z"))
148 ;; This patch augments 'make-fork+exec-constructor' and
149 ;; is used by a bunch of services.
152 "http://git.savannah.gnu.org/cgit/shepherd.git/"
153 "patch?id=d1d0ff30b3ed2b86b0a3c9bc048d2a855f8e31e6"))
156 "1lqymypixfiyb72d6bn24m06ry2q1ljnnv0qrc89pbb4z9azaa4d"))
157 (file-name "dmd-user-group.patch"))))))
158 (build-system gnu-build-system)
160 '(#:configure-flags '("--localstatedir=/var")))
161 (native-inputs `(("pkg-config" ,pkg-config)))
162 (inputs `(("guile" ,guile-2.0)))
163 (synopsis "Daemon managing daemons")
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/"))))
172 (define-public shepherd
178 (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/shepherd-"
182 "0f3yi3n4sl9myiay95yhv2a9an338qddfjrbv7da753ip66dkfz6"))))
183 (build-system gnu-build-system)
185 '(#:configure-flags '("--localstatedir=/var")))
186 (native-inputs `(("pkg-config" ,pkg-config)))
187 (inputs `(("guile" ,guile-2.0)))
188 (synopsis "System service manager")
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/")))
205 "http://projects.gw-computing.net/attachments/download/79/dfc-"
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")
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)))
226 (uri (string-append "http://hisham.hm/htop/releases/"
227 version "/htop-" version ".tar.gz"))
230 "0rjn9ybqx5sav7z4gn18f1q6k23nmqyb6yydfgghzdznz9nn447l"))))
231 (build-system gnu-build-system)
233 `(("ncurses" ,ncurses)))
234 (home-page "http://htop.sourceforge.net/")
235 (synopsis "Interactive process viewer")
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)))
248 (uri (string-append "mirror://gnu/pies/pies-"
252 "18w0dbg77i56cx1bwa789w0qi3l4xkkbascxcv2b6gbm0zmjg1g6"))))
253 (build-system gnu-build-system)
254 (home-page "http://www.gnu.org/software/pies/")
255 (synopsis "Program invocation and execution supervisor")
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+)))
263 (define-public inetutils
269 (uri (string-append "mirror://gnu/inetutils/inetutils-"
273 "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
274 (build-system gnu-build-system)
275 (arguments `(;; FIXME: `tftp.sh' relies on `netstat' from utils-linux,
276 ;; which is currently missing.
278 (inputs `(("ncurses" ,ncurses)
279 ("readline" ,readline))) ; for 'ftp'
280 (home-page "http://www.gnu.org/software/inetutils/")
281 (synopsis "Basic networking utilities")
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+)))
287 (define-public shadow
294 "http://pkg-shadow.alioth.debian.org/releases/"
295 name "-" version ".tar.xz"))
298 "0h9x1zdbq0pqmygmc1x459jraiqw4gqz8849v268crk78z8r621v"))))
299 (build-system gnu-build-system)
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")
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"
312 (string-append libc "/sbin/nscd")))))
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\\."))
325 (inputs (if (string-suffix? "-linux"
326 (or (%current-target-system)
328 `(("linux-pam" ,linux-pam))
330 (home-page "http://pkg-shadow.alioth.debian.org/")
331 (synopsis "Authentication-related tools such as passwd, su, and login")
333 "Shadow provides a number of authentication-related tools, including:
334 login, passwd, su, groupadd, and useradd.")
336 ;; The `vipw' program is GPLv2+.
337 ;; libmisc/salt.c is public domain.
338 (license license:bsd-3)))
340 (define-public mingetty
346 (uri (string-append "mirror://sourceforge/mingetty/mingetty-"
350 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
351 (build-system gnu-build-system)
353 `(#:phases (alist-replace 'configure
354 (lambda* (#:key inputs outputs
356 (let* ((out (assoc-ref outputs "out"))
358 out "/share/man/man8"))
359 (sbin (string-append out "/sbin"))
360 (shadow (assoc-ref inputs "shadow"))
361 (login (string-append shadow
363 (substitute* "Makefile"
365 (string-append "SBINDIR = " out
368 (string-append "MANDIR = " out
369 "/share/man/man8\n")))
371 ;; Pick the right 'login' by default.
372 (substitute* "mingetty.c"
374 (string-append "\"" login "\"")))
379 #:tests? #f)) ; no tests
380 (inputs `(("shadow" ,shadow)))
382 (home-page "http://sourceforge.net/projects/mingetty")
383 (synopsis "Getty for the text console")
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+)))
390 (define-public net-base
397 "mirror://debian/pool/main/n/netbase/netbase_"
401 "12xqjwg3p4rzmmh2iib6sigm9l29y3dgk74mmnw64k84jnbwdxl1"))))
402 (build-system trivial-build-system)
404 `(#:modules ((guix build utils))
406 (use-modules (guix build utils)
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"
417 (chdir ,(string-append "netbase-" version))
420 '("etc-services" "etc-protocols" "etc-rpc")
421 (map (cut string-append etc "/" <>)
422 '("services" "protocols" "rpc")))
424 (native-inputs `(("tar" ,tar)
426 (synopsis "IANA protocol, port, and RPC number assignments")
428 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
429 files, which contain information about the IANA-assigned port, protocol, and
431 (home-page "http://packages.debian.org/sid/netbase")
432 (license license:gpl2)))
434 (define-public netcat
440 (uri (string-append "mirror://sourceforge/netcat/netcat-"
444 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
445 (build-system gnu-build-system)
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")
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+)))
470 (uri (string-append "mirror://gnu/alive/alive-"
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")
482 "GNU Alive sends periodic pings to a server, generally to keep a
484 (license license:gpl3+)))
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
498 bind-release-version)))
504 (uri (string-append "http://ftp.isc.org/isc/dhcp/"
505 version "/dhcp-" version ".tar.gz"))
508 "0zk0imll6bfyp9p4ndn8h6s4ifijnw5bhixswifr5rnk7pp5l4gm"))))
509 (build-system gnu-build-system)
511 `(#:parallel-build? #f
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")
519 (chmod "bind/bind.tar.gz" #o644)
520 (substitute* "bind/version.tmp"
522 (format #f "MAJORVER=~a\n" ,bind-major-version))
524 (format #f "MINORVER=~a\n" ,bind-minor-version))
526 (format #f "PATCHVER=~a\n" ,bind-patch-version))
528 (format #f "RELEASETYPE=~a\n" ,bind-release-type))
530 (format #f "RELEASEVER=~a\n" ,bind-release-version)))
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"
543 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
544 ;; we must patch shebangs in there and make sure the right
546 (with-directory-excursion "bind"
547 (substitute* "Makefile"
549 (let ((sh (which "sh")))
550 (string-append "./configure CONFIG_SHELL="
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"
559 ;; avoid non-determinism in the archive
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"
576 (string-append (assoc-ref inputs "iproute")
580 (copy-file "client/scripts/linux"
581 (string-append libexec "/dhclient-script"))
584 (string-append libexec "/dhclient-script")
587 (string-append dir "/bin:"
589 (list inetutils net-tools coreutils sed))))))))))
591 (native-inputs `(("perl" ,perl)))
593 (inputs `(("inetutils" ,inetutils)
594 ("net-tools" ,net-tools)
597 ;; XXX isc-dhcp bundles a copy of bind that has security
598 ;; flaws, so we use a newer version.
599 ("bind-source-tarball"
602 (uri (string-append "http://ftp.isc.org/isc/bind9/"
604 "/bind-" bind-version ".tar.gz"))
607 "0w8qqm6p2y6x57j2l0a3278g173wd84dsr4py9z00191f3wra74q"))))
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)
616 (home-page "http://www.isc.org/products/DHCP/")
617 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
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"))))))
625 (define-public libpcap
631 (uri (string-append "http://www.tcpdump.org/release/libpcap-"
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")
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.")
647 ;; fad-*.c and a couple other files are BSD-4, but the rest is BSD-3.
648 (license license:bsd-3)))
650 (define-public tcpdump
656 (uri (string-append "http://www.tcpdump.org/release/tcpdump-"
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")
668 "Tcpdump is a command-line tool to analyze network traffic passing
669 through the network interface controller.")
670 (license license:bsd-3)))
672 (define-public jnettop
678 (uri (string-append "http://jnettop.kubs.info/dist/jnettop-"
682 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
683 (build-system gnu-build-system)
685 `(("pkg-config" ,pkg-config)))
689 ("libpcap" ,libpcap)))
690 (home-page "http://jnettop.kubs.info/")
691 (synopsis "Visualize network traffic by bandwidth use")
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+)))
698 (define-public clusterssh
704 (uri (string-append "mirror://sourceforge/clusterssh/"
705 "clusterssh-" version ".tar.gz"))
708 "1bwggpvaj2al5blg1ynapviv2kpydffpzq2zkhi81najnvzc1rr7"))))
709 (build-system gnu-build-system)
710 (inputs `(("perl" ,perl)))
711 (propagated-inputs `(("xterm" ,xterm)
713 ("perl-x11-protocol" ,perl-x11-protocol)))
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
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
733 `("PERL5LIB" ":" prefix (,x11-inc ,tk-inc)))))
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")
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+)))
744 (define-public rottlog
750 (uri (string-append "mirror://gnu/rottlog/rottlog-"
754 "0751mb9l2f0jrk3vj6q8ilanifd121dliwk0c34g8k0dlzsv3kd7"))
755 (modules '((guix build utils)))
757 '(substitute* "Makefile.in"
758 (("-o \\$\\{LOG_OWN\\} -g \\$\\{LOG_GROUP\\}")
759 ;; Don't try to chown root.
761 (("mkdir -p \\$\\(ROTT_STATDIR\\)")
762 ;; Don't attempt to create /var/lib/rottlog.
764 (build-system gnu-build-system)
766 '(#:configure-flags (list (string-append "ROTT_ETCDIR="
767 (assoc-ref %outputs "out")
769 "--localstatedir=/var")
770 #:phases (alist-cons-after
771 'install 'install-info
773 (zero? (system* "make" "install-info")))
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")
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+)))
794 (list (string-append "http://www.sudo.ws/sudo/dist/sudo-"
796 (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-"
800 "0263gi6i19fyzzc488n0qw3m518i39f6a7qmrfvahk9j10bkh5j3"))
801 (patches (search-patches "sudo-CVE-2015-5602.patch"))))
802 (build-system gnu-build-system)
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"
810 ;; 'visudo.c' expects _PATH_MV to be defined, but glibc doesn't
812 (string-append "CPPFLAGS=-D_PATH_MV='\""
813 (assoc-ref %build-inputs "coreutils")
816 ;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
819 #:phases (alist-cons-before
820 'configure 'pre-configure
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
827 (("@CONFIGURE_ARGS@") "\"\""))
828 (substitute* (find-files "." "Makefile\\.in")
829 (("-o [[:graph:]]+ -g [[:graph:]]+")
830 ;; Allow installation as non-root.
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.
838 (("\\$\\(DESTDIR\\)\\$\\(vardir\\)")
839 ;; Don't try to create /var/db/sudo.
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.
848 ("linux-pam" ,linux-pam)
849 ("coreutils" ,coreutils)))
850 (home-page "http://www.sudo.ws/")
851 (synopsis "Run commands as root")
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.")
858 ;; See <http://www.sudo.ws/sudo/license.html>.
859 (license license:x11)))
861 (define-public wpa-supplicant-minimal
863 (name "wpa-supplicant-minimal")
868 "http://w1.fi/releases/wpa_supplicant-"
873 "05mkp5bx1c3z7h5biddsv0p49gkrq9ksany3anp4wdiv92p5prfc"))
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)
886 '(#:phases (alist-replace
888 (lambda* (#:key outputs #:allow-other-keys)
889 (chdir "wpa_supplicant")
890 (copy-file "defconfig" ".config")
891 (let ((port (open-file ".config" "al")))
893 CONFIG_DEBUG_SYSLOG=y
895 # Choose GnuTLS (the default is OpenSSL.)
898 CONFIG_DRIVER_NL80211=y
899 CFLAGS += $(shell pkg-config libnl-3.0 --cflags)
901 CONFIG_READLINE=y\n" port)
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)
914 (string-append target "/"
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"))
925 #:make-flags (list "CC=gcc"
926 (string-append "BINDIR=" (assoc-ref %outputs "out")
928 (string-append "LIBDIR=" (assoc-ref %outputs "out")
932 `(("readline" ,readline)
935 ("libgcrypt" ,libgcrypt))) ;needed by crypto_gnutls.c
937 `(("pkg-config" ,pkg-config)))
938 (home-page "http://w1.fi/wpa_supplicant/")
939 (synopsis "Connecting to WPA and WPA2-protected wireless networks")
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
947 This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
949 ;; In practice, this is linked against Readline, which makes it GPLv3+.
950 (license license:bsd-3)))
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)))
958 (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
961 'configure 'configure-for-dbus
963 (let ((port (open-file ".config" "al")))
965 CONFIG_CTRL_IFACE_DBUS=y
966 CONFIG_CTRL_IFACE_DBUS_NEW=y
967 CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
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")))
976 (copy-file "dbus/dbus-wpa_supplicant.conf"
977 (string-append dir "/wpa_supplicant.conf"))))
980 (define-public wakelan
987 "ftp://ftp.gwdg.de/pub/linux/metalab/system/network/misc/wakelan-"
991 "0vydqpf44146ir6k87gmqaq6xy66xhc1gkr3nsd7jj3nhy7ypx9x"))))
992 (build-system gnu-build-system)
994 '(#:phases (alist-replace
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"))
1001 ;; It's an old configure script that doesn't understand
1002 ;; the extra options we pass.
1003 (setenv "CONFIG_SHELL" (which "bash"))
1005 (system* "./configure"
1006 (string-append "--prefix=" out)
1007 (string-append "--mandir=" out
1011 (home-page "http://kernel.org") ; really, no home page
1012 (synopsis "Send a wake-on-LAN packet")
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+)))
1018 (define-public dmidecode
1025 "mirror://savannah/dmidecode/dmidecode-"
1026 version ".tar.bz2"))
1029 "122hgaw8mpqdfra159lfl6pyk3837giqx6vq42j64fjnbl2z6gwi"))))
1030 (build-system gnu-build-system)
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")
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+)))
1048 (define-public acpica
1051 (version "20150410")
1055 "https://acpica.org/sites/acpica/files/acpica-unix2-"
1059 "0q1fjwkyw9x6gsva6fd0zbn7ly4fx0ha4853f416np9kf2irillw"))))
1060 (build-system gnu-build-system)
1061 (native-inputs `(("flex" ,flex)
1064 '(#:make-flags (list (string-append "PREFIX=" %output)
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")
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
1081 (define-public stress
1087 (uri (string-append "mirror://debian/pool/main/s/stress/stress_"
1088 version ".orig.tar.gz"))
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")
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
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+)))
1107 (define-public detox
1113 (uri (string-append "mirror://sourceforge/detox/detox-"
1114 version ".tar.bz2"))
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).
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")
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)))
1137 (define-public testdisk
1143 (uri (string-append "http://www.cgsecurity.org/testdisk-"
1144 version ".tar.bz2"))
1147 "0v1jap83f5h99zv01v3qmqm160d36n4ysi0gyq7xzb3mqgmw75x5"))))
1148 (build-system gnu-build-system)
1151 ("util-linux" ,util-linux)
1152 ("openssl" ,openssl)
1154 ("e2fsprogs" ,e2fsprogs)
1155 ("libjpeg" ,libjpeg)
1156 ("ncurses" ,ncurses)))
1157 (home-page "http://www.cgsecurity.org/wiki/TestDisk")
1158 (synopsis "Data recovery tool")
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+)))
1171 "http://mama.indstate.edu/users/ice/tree/src/tree-"
1174 (base32 "04kviw799qxly08zb8n5mgxfd96gyis6x69q2qiw86jnh87c4mv9"))))
1175 (build-system gnu-build-system)
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")
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+)))
1189 (define-public direvent
1195 (uri (string-append "mirror://gnu/direvent/direvent-"
1199 "1i14131y6m8wvirz6piw4zxz2q1kbpl0lniv5kl55rx4k372dg8z"))
1200 (modules '((guix build utils)))
1201 (snippet '(substitute* "tests/testsuite"
1202 (("#![[:blank:]]?/bin/sh")
1204 (build-system gnu-build-system)
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"
1213 (string-append "\"" bash "/bin/sh\"")))))
1215 (home-page "http://www.gnu.org/software/direvent/")
1216 (synopsis "Daemon to monitor directories for events such as file removal")
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+)))
1227 (define-public libcap-ng
1234 "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-"
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")
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+))))
1253 (define-public smartmontools
1255 (name "smartmontools")
1260 "mirror://sourceforge/smartmontools/smartmontools/"
1261 version "/smartmontools-" version ".tar.gz"))
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")
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+)))
1277 (define-public fdupes
1285 "https://github.com/adrianlopezroche/fdupes/archive/fdupes-"
1289 "11j96vxl9vg3jsnxqxskrv3gad6dh7hz2zpyc8n31xzyxka1c7kn"))))
1290 (build-system gnu-build-system)
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")
1299 "fdupes is a program for identifying duplicate files residing within
1300 specified directories.")
1301 (license license:expat)))
1303 (define-public graphios
1311 "https://pypi.python.org/packages/source/g/graphios/graphios-"
1315 "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
1316 (build-system python-build-system)
1318 ;; Be warned: Building with Python 3 succeeds, but the build process
1319 ;; throws a syntax error that is ignored.
1320 `(#:python ,python-2
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"))
1330 (("distro_ver = .*") "distro_ver = ''"))
1333 `(("python-setuptools" ,python2-setuptools)))
1334 (home-page "https://github.com/shawn-sterling/graphios")
1335 (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
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+)))
1343 (define-public ansible
1351 "https://pypi.python.org/packages/source/a/ansible/ansible-"
1356 "007fzgsqaahb0y4gjdxxmir9kcni7wph2z14jhqgpz88idrz8pn2"))))
1357 (build-system python-build-system)
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)))
1369 `(("python2-pycrypto" ,python2-pycrypto)
1370 ("python2-jinja2" ,python2-jinja2)
1371 ("python2-pyyaml" ,python2-pyyaml)
1372 ("python2-paramiko" ,python2-paramiko)))
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+)))
1383 (define-public cpulimit
1390 (uri (string-append "https://github.com/opsengine/cpulimit/archive/v"
1392 (file-name (string-append name "-" version ".tar.gz"))
1395 "1nn2w849xd5bw4y5sqnll29nxdwl5h0cv4smc7dwmpb9qnd2ycb4"))))
1396 (build-system gnu-build-system)
1398 `(#:phases (modify-phases %standard-phases
1403 (zero? (system* "make" "CC=gcc" "-Csrc"))))
1407 (zero? (system* "make" "CC=gcc" "-Ctests"))))
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")
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
1422 (license license:gpl2+)))
1424 (define-public autojump
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"))
1436 "0xglj7nb8xczaqy2dhn78drqdwqj64rqpymxhqmmwwqzfaqassw1"))))
1437 (build-system gnu-build-system)
1438 (native-inputs ;for tests
1439 `(("python-mock" ,python-mock)
1440 ("python-pytest" ,python-pytest)))
1442 `(("python" ,python-wrapper)))
1444 `(#:phases (modify-phases %standard-phases
1450 (system* "python" "tests/autojump_utils_test.py"))))
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))
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)))
1474 (home-page "https://github.com/wting/autojump")
1475 (synopsis "Shell extension for filesystem navigation")
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+)))
1483 (define-public iftop
1489 (uri (string-append "http://www.ex-parrot.com/~pdw/iftop/download"
1490 "/iftop-" version ".tar.gz"))
1493 "15sgkdyijb7vbxpxjavh5qm5nvyii3fqcg9mzvw7fx8s6zmfwczp"))))
1494 (build-system gnu-build-system)
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+)))
1505 (define-public munge
1511 (uri (string-append "https://github.com/dun/munge/archive/munge-"
1513 (file-name (string-append name "-" version ".tar.gz"))
1516 "0njplyalwwqh7xr7xc7klc6x06mq0ak8w2pxh85w8n4hxkmqqnf5"))))
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")
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+)))
1533 (define-public audit
1539 (uri (string-append "http://people.redhat.com/sgrubb/audit/"
1540 "audit-" version ".tar.gz"))
1543 "1q1q51dvxscbi4kbakmd4bn0xrvwwaiwvaya79925cbrqwzxsg77"))))
1544 (build-system gnu-build-system)
1545 (home-page "http://people.redhat.com/sgrubb/audit/")
1547 `(#:configure-flags (list "--with-python=no")
1549 (modify-phases %standard-phases
1550 (add-after 'unpack 'fix-tests
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))"))
1558 `(("openldap" ,openldap)
1559 ("openssl" ,openssl)
1560 ("sasl" ,cyrus-sasl)))
1561 (synopsis "User-space component to the Linux auditing system")
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+)))
1576 (uri (string-append "https://nmap.org/dist/nmap-" version
1580 "014vagh9ak10hidwzp9s6g30y5h5fhsh8wykcnc1hnn9hwm0ipv3"))
1581 (modules '((guix build utils)))
1583 '(map delete-file-recursively
1584 ;; Remove bundled lua, pcap, and pcre libraries.
1585 ;; FIXME: Remove bundled liblinear once packaged.
1589 ;; Remove pre-compiled binares.
1591 (build-system gnu-build-system)
1593 `(("openssl" ,openssl)
1594 ("libpcap" ,libpcap)
1598 ("python" ,python-2)))
1600 ;; TODO Add zenmap output.
1601 (outputs '("out" "ndiff"))
1603 '(#:configure-flags '("--without-zenmap")
1605 (modify-phases %standard-phases
1607 (lambda* (#:key outputs #:allow-other-keys)
1608 (define (make out . args)
1609 (unless (zero? (apply system* "make"
1610 (string-append "prefix=" out)
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))
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.
1629 (lambda _ (zero? (system* "make"
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")
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))))