1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages admin)
23 #:use-module (guix licenses)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix git-download)
27 #:use-module (guix build-system cmake)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system trivial)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages base)
32 #:use-module (gnu packages ncurses)
33 #:use-module (gnu packages readline)
34 #:use-module (gnu packages linux)
35 #:use-module (gnu packages guile)
36 #:use-module (gnu packages gettext)
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages tcl)
39 #:use-module ((gnu packages base)
41 #:use-module ((gnu packages compression)
43 #:use-module (gnu packages bison)
44 #:use-module (gnu packages flex)
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages xorg))
55 (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/dmd-"
59 "07mddw0p62fcphwjzgb6rfa0pjz5sy6jzbha0sm2vc3rqf459jxg"))
60 (patches (list (search-patch "dmd-getpw.patch")
61 (search-patch "dmd-tests-longer-sleeps.patch")))))
62 (build-system gnu-build-system)
64 '(#:configure-flags '("--localstatedir=/var")))
65 (native-inputs `(("pkg-config" ,pkg-config)))
66 (inputs `(("guile" ,guile-2.0)))
67 (synopsis "Daemon managing daemons")
69 "GNU DMD is a daemon-managing daemon, meaning that it manages the
70 execution of system services, replacing similar functionality found in
71 typical init systems. It provides dependency-handling through a convenient
72 interface and is based on GNU Guile.")
74 (home-page "http://www.gnu.org/software/dmd/")))
84 "http://projects.gw-computing.net/attachments/download/78/dfc-"
88 "1b4hfqv23l87cb37fxwzfk2sgspkyxpr3ig2hsd23hr6mm982j7z"))))
89 (build-system cmake-build-system)
90 (arguments '(#:tests? #f)) ; There are no tests.
91 (native-inputs `(("gettext" ,gnu-gettext)))
92 (home-page "http://projects.gw-computing.net/projects/dfc")
93 (synopsis "Display file system space usage using graphs and colors")
95 "dfc (df color) is a modern version of df. It uses colors, draws pretty
96 graphs and can export its output to different formats.")
105 (uri (string-append "mirror://sourceforge/htop/"
106 version "/htop-" version ".tar.gz"))
109 "18fqrhvnm7h4c3939av8lpiwrwxbyw6hcly0jvq0vkjf0ixnaq7f"))))
110 (build-system gnu-build-system)
112 `(("ncurses" ,ncurses)))
113 (home-page "http://htop.sourceforge.net/")
114 (synopsis "Interactive process viewer")
116 "This is htop, an interactive process viewer. It is a text-mode
117 application (for console or X terminals) and requires ncurses.")
127 (uri (string-append "mirror://gnu/pies/pies-"
131 "18w0dbg77i56cx1bwa789w0qi3l4xkkbascxcv2b6gbm0zmjg1g6"))))
132 (build-system gnu-build-system)
133 (home-page "http://www.gnu.org/software/pies/")
134 (synopsis "Program invocation and execution supervisor")
136 "GNU pies is a program that supervises the invocation and execution of
137 other programs. It reads the list of programs to be started from its
138 configuration file, executes them, and then monitors their status,
139 re-executing them as necessary.")
142 (define-public inetutils
148 (uri (string-append "mirror://gnu/inetutils/inetutils-"
152 "04wrm0v7l4890mmbaawd6wjwdv08bkglgqhpz0q4dkb0l50fl8q4"))))
153 (build-system gnu-build-system)
154 (arguments `(;; FIXME: `tftp.sh' relies on `netstat' from utils-linux,
155 ;; which is currently missing.
157 (inputs `(("ncurses" ,ncurses)
158 ("readline" ,readline))) ; for 'ftp'
159 (home-page "http://www.gnu.org/software/inetutils/")
160 (synopsis "Basic networking utilities")
162 "Inetutils is a collection of common network programs, such as an ftp
163 client and server, a telnet client and server, and an rsh client and server.")
166 (define-public shadow
171 ;; Shadow has no real upstream, and not even tarballs.
172 ;; See <https://lists.gnu.org/archive/html/guix-devel/2014-03/msg00233.html>.
175 (url "git://git.debian.org/git/pkg-shadow/shadow")
176 (commit (string-append "upstream/" version))))
179 "1xx85d83kmacmjzqbamgydcjkwsqd5fi1s2wgwx6myq5wa39qx0n"))))
180 (build-system gnu-build-system)
182 '(;; Assume System V `setpgrp (void)', which is the default on GNU
183 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
184 #:configure-flags '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
186 #:phases (alist-cons-before
187 'build 'set-nscd-file-name
188 (lambda* (#:key inputs #:allow-other-keys)
189 ;; Use the right file name for nscd.
190 (let ((libc (assoc-ref inputs "libc")))
191 (substitute* "lib/nscd.c"
193 (string-append libc "/sbin/nscd")))))
195 'install 'remove-groups
196 (lambda* (#:key outputs #:allow-other-keys)
197 ;; Remove `groups', which is already provided by Coreutils.
198 (let* ((out (assoc-ref outputs "out"))
199 (bin (string-append out "/bin"))
200 (man (string-append out "/share/man/man1")))
201 (delete-file (string-append bin "/groups"))
202 (for-each delete-file (find-files man "^groups\\."))
205 'unpack 'reset-timestamps
207 ;; FIXME: Reset the file timestamps here, until the
208 ;; 'unpack' phase does it for us. See
209 ;; <https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00098.html>.
210 (for-each (lambda (file)
212 (find-files "." "")))
213 %standard-phases)))))
215 (inputs (if (string-suffix? "-linux"
216 (or (%current-target-system)
218 `(("linux-pam" ,linux-pam))
220 (home-page "http://pkg-shadow.alioth.debian.org/")
221 (synopsis "Authentication-related tools such as passwd, su, and login")
223 "Shadow provides a number of authentication-related tools, including:
224 login, passwd, su, groupadd, and useradd.")
226 ;; The `vipw' program is GPLv2+.
227 ;; libmisc/salt.c is public domain.
230 (define-public mingetty
236 (uri (string-append "mirror://sourceforge/mingetty/mingetty-"
240 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
241 (build-system gnu-build-system)
243 `(#:phases (alist-replace 'configure
244 (lambda* (#:key inputs outputs
246 (let* ((out (assoc-ref outputs "out"))
248 out "/share/man/man8"))
249 (sbin (string-append out "/sbin"))
250 (shadow (assoc-ref inputs "shadow"))
251 (login (string-append shadow
253 (substitute* "Makefile"
255 (string-append "SBINDIR = " out
258 (string-append "MANDIR = " out
259 "/share/man/man8\n")))
261 ;; Pick the right 'login' by default.
262 (substitute* "mingetty.c"
264 (string-append "\"" login "\"")))
269 #:tests? #f)) ; no tests
270 (inputs `(("shadow" ,shadow)))
272 (home-page "http://sourceforge.net/projects/mingetty")
273 (synopsis "Getty for the text console")
275 "Small console getty that is started on the Linux text console,
276 asks for a login name and then transfers over to 'login'. It is extended to
277 allow automatic login and starting any app.")
280 (define-public net-base
287 "mirror://debian/pool/main/n/netbase/netbase_"
291 "01rkvqrg7krkx8b432nz6bpi8w3s4cm5q5r891k23cdrc9nsaayn"))))
292 (build-system trivial-build-system)
294 `(#:modules ((guix build utils))
296 (use-modules (guix build utils)
299 (let* ((source (assoc-ref %build-inputs "source"))
300 (tar (assoc-ref %build-inputs "tar"))
301 (gzip (assoc-ref %build-inputs "gzip"))
302 (output (assoc-ref %outputs "out"))
303 (etc (string-append output "/etc")))
304 (setenv "PATH" (string-append gzip "/bin"))
305 (system* (string-append tar "/bin/tar") "xvf"
307 (chdir ,(string-append "netbase-" version))
310 '("etc-services" "etc-protocols" "etc-rpc")
311 (map (cut string-append etc "/" <>)
312 '("services" "protocols" "rpc")))
314 (native-inputs `(("tar" ,tar)
316 (synopsis "IANA protocol, port, and RPC number assignments")
318 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
319 files, which contain information about the IANA-assigned port, protocol, and
321 (home-page "http://packages.debian.org/sid/netbase")
324 (define-public netcat
330 (uri (string-append "mirror://sourceforge/netcat/netcat-"
334 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
335 (build-system gnu-build-system)
338 ;; By default, man and info pages are put in PREFIX/{man,info},
339 ;; but we want them in PREFIX/share/{man,info}.
340 (let ((out (assoc-ref %outputs "out")))
341 (list (string-append "--mandir=" out "/share/man")
342 (string-append "--infodir=" out "/share/info")))))
343 (home-page "http://netcat.sourceforge.net")
344 (synopsis "Read and write data over TCP/IP")
346 "Netcat is a featured networking utility which reads and writes data
347 across network connections, using the TCP/IP protocol. It is designed to be a
348 reliable \"back-end\" tool that can be used directly or easily driven by other
349 programs and scripts. At the same time, it is a feature-rich network debugging
350 and exploration tool, since it can create almost any kind of connection you
351 would need and has several interesting built-in capabilities.")
360 (uri (string-append "mirror://gnu/alive/alive-"
364 "1vrzg51ai68x9yld7vbgl58sxaw5qpx8rbakwcxn4cqq6vpxj38j"))))
365 (build-system gnu-build-system)
366 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
367 (inputs `(("guile" ,guile-2.0)
368 ("inetutils" ,inetutils)))
369 (home-page "http://www.gnu.org/software/alive/")
370 (synopsis "Autologin and keep-alive daemon")
372 "GNU Alive sends periodic pings to a server, generally to keep a
376 (define-public isc-dhcp
382 (uri (string-append "http://ftp.isc.org/isc/dhcp/"
383 version "/dhcp-" version ".tar.gz"))
386 "12mydvj6x3zcl3gla06bywfkkrgg03g66fijs94mwb7kbiym3dm7"))))
387 (build-system gnu-build-system)
389 '(#:phases (alist-cons-after
390 'configure 'post-configure
391 (lambda* (#:key outputs #:allow-other-keys)
392 ;; Point to the right client script, which will be
393 ;; installed in a later phase.
394 (substitute* "includes/dhcpd.h"
395 (("#define[[:blank:]]+_PATH_DHCLIENT_SCRIPT.*")
396 (let ((out (assoc-ref outputs "out")))
397 (string-append "#define _PATH_DHCLIENT_SCRIPT \""
398 out "/libexec/dhclient-script"
401 ;; During the 'build' phase, 'bind.tar.gz' is extracted, so
402 ;; we must patch shebangs in there and make sure the right
404 (with-directory-excursion "bind"
405 (substitute* "Makefile"
407 (let ((sh (which "sh")))
408 (string-append "./configure CONFIG_SHELL="
411 (system* "tar" "xf" "bind.tar.gz")
412 (for-each patch-shebang
413 (find-files "bind-9.9.5" ".*"))
414 (zero? (system* "tar" "cf" "bind.tar.gz"
417 'install 'post-install
418 (lambda* (#:key inputs outputs #:allow-other-keys)
419 ;; Install the dhclient script for GNU/Linux and make sure
420 ;; if finds all the programs it needs.
421 (let* ((out (assoc-ref outputs "out"))
422 (libexec (string-append out "/libexec"))
423 (coreutils (assoc-ref inputs "coreutils"))
424 (net-tools (assoc-ref inputs "net-tools"))
425 (sed (assoc-ref inputs "sed")))
426 (substitute* "client/scripts/linux"
428 (string-append (assoc-ref inputs "iproute")
432 (copy-file "client/scripts/linux"
433 (string-append libexec "/dhclient-script"))
435 (wrap-program (string-append libexec "/dhclient-script")
438 (string-append dir "/bin:"
440 (list net-tools coreutils sed))))))
443 (native-inputs `(("perl" ,perl)))
445 ;; Even Coreutils and sed are needed here in case we're cross-compiling.
446 (inputs `(("coreutils" ,coreutils)
448 ("net-tools" ,net-tools)
449 ("iproute" ,iproute)))
451 (home-page "http://www.isc.org/products/DHCP/")
452 (synopsis "Dynamic Host Configuration Protocol (DHCP) tools")
454 "ISC's Dynamic Host Configuration Protocol (DHCP) distribution provides a
455 reference implementation of all aspects of DHCP, through a suite of DHCP
456 tools: server, client, and relay agent.")
459 (define-public libpcap
465 (uri (string-append "http://www.tcpdump.org/release/libpcap-"
469 "14wyjywrdi1ikaj6yc9c72m6m2r64z94lb0gm7k1a3q6q5cj3scs"))))
470 (build-system gnu-build-system)
471 (native-inputs `(("bison" ,bison) ("flex" ,flex)))
472 (arguments '(#:tests? #f)) ; no 'check' target
473 (home-page "http://www.tcpdump.org")
474 (synopsis "Network packet capture library")
476 "libpcap is an interface for user-level packet capture. It provides a
477 portable framework for low-level network monitoring. Applications include
478 network statistics collection, security monitoring, network debugging, etc.")
480 ;; fad-*.c and a couple other files are BSD-4, but the rest is BSD-3.
483 (define-public jnettop
489 (uri (string-append "http://jnettop.kubs.info/dist/jnettop-"
493 "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9"))))
494 (build-system gnu-build-system)
496 `(("pkg-config" ,pkg-config)))
500 ("libpcap" ,libpcap)))
501 (home-page "http://jnettop.kubs.info/")
502 (synopsis "Visualize network traffic by bandwidth use")
504 "Jnettop is a traffic visualiser, which captures traffic going
505 through the host it is running from and displays streams sorted
506 by bandwidth they use.")
509 (define-public clusterssh
515 (uri (string-append "mirror://sourceforge/clusterssh/"
516 "clusterssh-" version ".tar.gz"))
519 "1bwggpvaj2al5blg1ynapviv2kpydffpzq2zkhi81najnvzc1rr7"))))
520 (build-system gnu-build-system)
521 (inputs `(("perl" ,perl)))
522 (propagated-inputs `(("xterm" ,xterm)
524 ("perl-x11-protocol" ,perl-x11-protocol)))
528 'install 'set-load-paths
529 (lambda* (#:key inputs outputs #:allow-other-keys)
530 ;; Put the perl-tk and perl-x11-protocol modules in the perl inc
532 (let* ((out (assoc-ref outputs "out"))
533 (prog (string-append out "/bin/cssh"))
534 (perl-ver ,(package-version perl))
535 (x11-inc (string-append
536 (assoc-ref inputs "perl-x11-protocol")
537 "/lib/perl5/site_perl/" perl-ver))
538 (tk-inc (string-append
539 (assoc-ref inputs "perl-tk")
540 "/lib/perl5/site_perl/" perl-ver
544 `("PERL5LIB" ":" prefix (,x11-inc ,tk-inc)))))
546 ;; The clusterssh.sourceforge.net address requires login to view
547 (home-page "http://sourceforge.net/projects/clusterssh/")
548 (synopsis "Secure concurrent multi-server terminal control")
550 "ClusterSSH controls a number of xterm windows via a single graphical
551 console window to allow commands to be interactively run on multiple servers
552 over ssh connections.")