gnu: Add libcap.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages linux)
21 #:use-module (guix licenses)
22 #:use-module (gnu packages)
23 #:use-module ((gnu packages compression)
24 #:renamer (symbol-prefix-proc 'guix:))
25 #:use-module (gnu packages flex)
26 #:use-module (gnu packages bison)
27 #:use-module (gnu packages libusb)
28 #:use-module (gnu packages ncurses)
29 #:use-module (gnu packages bdb)
30 #:use-module (gnu packages perl)
31 #:use-module (gnu packages pkg-config)
32 #:use-module (gnu packages algebra)
33 #:use-module ((gnu packages gettext)
34 #:renamer (symbol-prefix-proc 'g:))
35 #:use-module (gnu packages attr)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix build-system gnu))
39
40 (define-public (system->linux-architecture arch)
41 "Return the Linux architecture name for ARCH, a Guix system name such as
42 \"x86_64-linux\"."
43 (let ((arch (car (string-split arch #\-))))
44 (cond ((string=? arch "i686") "i386")
45 ((string-prefix? "mips" arch) "mips")
46 ((string-prefix? "arm" arch) "arm")
47 (else arch))))
48
49 (define (linux-libre-urls version)
50 "Return a list of URLs for Linux-Libre VERSION."
51 (list (string-append
52 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
53 version "-gnu/linux-libre-" version "-gnu.tar.xz")
54
55 ;; XXX: Work around <http://bugs.gnu.org/14851>.
56 (string-append
57 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
58 version "-gnu.tar.xz")
59
60 ;; Maybe this URL will become valid eventually.
61 (string-append
62 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
63 version "-gnu.tar.xz")))
64
65 (define-public linux-libre-headers
66 (let* ((version* "3.3.8")
67 (build-phase
68 (lambda (arch)
69 `(lambda _
70 (setenv "ARCH" ,(system->linux-architecture arch))
71 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
72
73 (and (zero? (system* "make" "defconfig"))
74 (zero? (system* "make" "mrproper" "headers_check"))))))
75 (install-phase
76 `(lambda* (#:key outputs #:allow-other-keys)
77 (let ((out (assoc-ref outputs "out")))
78 (and (zero? (system* "make"
79 (string-append "INSTALL_HDR_PATH=" out)
80 "headers_install"))
81 (mkdir (string-append out "/include/config"))
82 (call-with-output-file
83 (string-append out
84 "/include/config/kernel.release")
85 (lambda (p)
86 (format p "~a-default~%" ,version*))))))))
87 (package
88 (name "linux-libre-headers")
89 (version version*)
90 (source (origin
91 (method url-fetch)
92 (uri (linux-libre-urls version))
93 (sha256
94 (base32
95 "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
96 (build-system gnu-build-system)
97 (native-inputs `(("perl" ,perl)))
98 (arguments
99 `(#:modules ((guix build gnu-build-system)
100 (guix build utils)
101 (srfi srfi-1))
102 #:phases (alist-replace
103 'build ,(build-phase (%current-system))
104 (alist-replace
105 'install ,install-phase
106 (alist-delete 'configure %standard-phases)))
107 #:tests? #f))
108 (synopsis "GNU Linux-Libre kernel headers")
109 (description "Headers of the Linux-Libre kernel.")
110 (license gpl2)
111 (home-page "http://www.gnu.org/software/linux-libre/"))))
112
113 (define-public module-init-tools
114 (package
115 (name "module-init-tools")
116 (version "3.16")
117 (source (origin
118 (method url-fetch)
119 (uri (string-append
120 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
121 version ".tar.bz2"))
122 (sha256
123 (base32
124 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))))
125 (build-system gnu-build-system)
126 (arguments
127 ;; FIXME: The upstream tarball lacks man pages, and building them would
128 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
129 ;; but they vanished. In the meantime, fake it.
130 '(#:phases (alist-cons-before
131 'configure 'fake-docbook
132 (lambda _
133 (substitute* "Makefile.in"
134 (("^DOCBOOKTOMAN.*$")
135 "DOCBOOKTOMAN = true\n")))
136 %standard-phases)))
137 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
138 (synopsis "Tools for loading and managing Linux kernel modules")
139 (description
140 "Tools for loading and managing Linux kernel modules, such as `modprobe',
141 `insmod', `lsmod', and more.")
142 (license gpl2+)))
143
144 (define-public linux-libre
145 (let* ((version* "3.11")
146 (build-phase
147 '(lambda* (#:key system #:allow-other-keys #:rest args)
148 (let ((arch (car (string-split system #\-))))
149 (setenv "ARCH"
150 (cond ((string=? arch "i686") "i386")
151 (else arch)))
152 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
153
154 (let ((build (assoc-ref %standard-phases 'build)))
155 (and (zero? (system* "make" "defconfig"))
156 (begin
157 (format #t "enabling additional modules...~%")
158 (substitute* ".config"
159 (("^# CONFIG_CIFS.*$")
160 "CONFIG_CIFS=m\n"))
161 (zero? (system* "make" "oldconfig")))
162
163 ;; Call the default `build' phase so `-j' is correctly
164 ;; passed.
165 (apply build #:make-flags "all" args)))))
166 (install-phase
167 `(lambda* (#:key inputs outputs #:allow-other-keys)
168 (let* ((out (assoc-ref outputs "out"))
169 (moddir (string-append out "/lib/modules"))
170 (mit (assoc-ref inputs "module-init-tools")))
171 (mkdir-p moddir)
172 (for-each (lambda (file)
173 (copy-file file
174 (string-append out "/" (basename file))))
175 (find-files "." "^(bzImage|System\\.map)$"))
176 (copy-file ".config" (string-append out "/config"))
177 (zero? (system* "make"
178 (string-append "DEPMOD=" mit "/sbin/depmod")
179 (string-append "MODULE_DIR=" moddir)
180 (string-append "INSTALL_PATH=" out)
181 (string-append "INSTALL_MOD_PATH=" out)
182 "modules_install"))))))
183 (package
184 (name "linux-libre")
185 (version version*)
186 (source (origin
187 (method url-fetch)
188 (uri (linux-libre-urls version))
189 (sha256
190 (base32
191 "1vlk04xkvyy1kc9zz556md173rn1qzlnvhz7c9sljv4bpk3mdspl"))))
192 (build-system gnu-build-system)
193 (native-inputs `(("perl" ,perl)
194 ("bc" ,bc)
195 ("module-init-tools" ,module-init-tools)))
196 (arguments
197 `(#:modules ((guix build gnu-build-system)
198 (guix build utils)
199 (srfi srfi-1)
200 (ice-9 match))
201 #:phases (alist-replace
202 'build ,build-phase
203 (alist-replace
204 'install ,install-phase
205 (alist-delete 'configure %standard-phases)))
206 #:tests? #f))
207 (synopsis "100% free redistribution of a cleaned Linux kernel")
208 (description "Linux-Libre operating system kernel.")
209 (license gpl2)
210 (home-page "http://www.gnu.org/software/linux-libre/"))))
211
212 \f
213 ;;;
214 ;;; Pluggable authentication modules (PAM).
215 ;;;
216
217 (define-public linux-pam
218 (package
219 (name "linux-pam")
220 (version "1.1.6")
221 (source
222 (origin
223 (method url-fetch)
224 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
225 version ".tar.bz2")
226 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
227 version ".tar.bz2")))
228 (sha256
229 (base32
230 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
231 (build-system gnu-build-system)
232 (inputs
233 `(("flex" ,flex)
234
235 ;; TODO: optional dependencies
236 ;; ("libxcrypt" ,libxcrypt)
237 ;; ("cracklib" ,cracklib)
238 ))
239 (arguments
240 '(;; Most users, such as `shadow', expect the headers to be under
241 ;; `security'.
242 #:configure-flags (list (string-append "--includedir="
243 (assoc-ref %outputs "out")
244 "/include/security"))
245
246 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
247 ;; isn't available.
248 #:tests? #f))
249 (home-page "http://www.linux-pam.org/")
250 (synopsis "Pluggable authentication modules for Linux")
251 (description
252 "A *Free* project to implement OSF's RFC 86.0.
253 Pluggable authentication modules are small shared object files that can
254 be used through the PAM API to perform tasks, like authenticating a user
255 at login. Local and dynamic reconfiguration are its key features")
256 (license bsd-3)))
257
258 \f
259 ;;;
260 ;;; Miscellaneous.
261 ;;;
262
263 (define-public psmisc
264 (package
265 (name "psmisc")
266 (version "22.20")
267 (source
268 (origin
269 (method url-fetch)
270 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
271 version ".tar.gz"))
272 (sha256
273 (base32
274 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
275 (build-system gnu-build-system)
276 (inputs `(("ncurses" ,ncurses)))
277 (home-page "http://psmisc.sourceforge.net/")
278 (synopsis
279 "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
280 (description
281 "This PSmisc package is a set of some small useful utilities that
282 use the proc filesystem. We're not about changing the world, but
283 providing the system administrator with some help in common tasks.")
284 (license gpl2+)))
285
286 (define-public util-linux
287 (package
288 (name "util-linux")
289 (version "2.21")
290 (source
291 (origin
292 (method url-fetch)
293 (uri (string-append "mirror://kernel.org/linux/utils/"
294 name "/v" version "/"
295 name "-" version ".2" ".tar.xz"))
296 (sha256
297 (base32
298 "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))))
299 (build-system gnu-build-system)
300 (arguments
301 `(#:configure-flags '("--disable-use-tty-group")
302 #:phases (alist-cons-after
303 'install 'patch-chkdupexe
304 (lambda* (#:key outputs #:allow-other-keys)
305 (let ((out (assoc-ref outputs "out")))
306 (substitute* (string-append out "/bin/chkdupexe")
307 ;; Allow 'patch-shebang' to do its work.
308 (("@PERL@") "/bin/perl"))))
309 %standard-phases)))
310 (inputs `(("zlib" ,guix:zlib)
311 ("ncurses" ,ncurses)
312 ("perl" ,perl)))
313 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
314 (synopsis "Collection of utilities for the Linux kernel")
315 (description
316 "util-linux is a random collection of utilities for the Linux kernel.")
317
318 ;; Note that util-linux doesn't use the same license for all the
319 ;; code. GPLv2+ is the default license for a code without an
320 ;; explicitly defined license.
321 (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
322 bsd-4 public-domain))))
323
324 (define-public procps
325 (package
326 (name "procps")
327 (version "3.2.8")
328 (source (origin
329 (method url-fetch)
330 (uri (string-append "http://procps.sourceforge.net/procps-"
331 version ".tar.gz"))
332 (sha256
333 (base32
334 "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))))
335 (build-system gnu-build-system)
336 (inputs `(("ncurses" ,ncurses)
337 ("patch/make-3.82" ,(search-patch "procps-make-3.82.patch"))))
338 (arguments
339 '(#:patches (list (assoc-ref %build-inputs "patch/make-3.82"))
340 #:phases (alist-replace
341 'configure
342 (lambda* (#:key outputs #:allow-other-keys)
343 ;; No `configure', just a single Makefile.
344 (let ((out (assoc-ref outputs "out")))
345 (substitute* "Makefile"
346 (("/usr/") "/")
347 (("--(owner|group) 0") "")
348 (("ldconfig") "true")
349 (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
350 ;; Add libproc to the RPATH.
351 (string-append "LDFLAGS := -Wl,-rpath="
352 out "/lib" value))))
353 (setenv "CC" "gcc"))
354 (alist-replace
355 'install
356 (lambda* (#:key outputs #:allow-other-keys)
357 (let ((out (assoc-ref outputs "out")))
358 (and (zero?
359 (system* "make" "install"
360 (string-append "DESTDIR=" out)))
361
362 ;; Sanity check.
363 (zero?
364 (system* (string-append out "/bin/ps")
365 "--version")))))
366 %standard-phases))
367
368 ;; What did you expect? Tests?
369 #:tests? #f))
370 (home-page "http://procps.sourceforge.net/")
371 (synopsis "Utilities that give information about processes")
372 (description
373 "procps is the package that has a bunch of small useful utilities
374 that give information about processes using the Linux /proc file system.
375 The package includes the programs ps, top, vmstat, w, kill, free,
376 slabtop, and skill.")
377 (license gpl2)))
378
379 (define-public usbutils
380 (package
381 (name "usbutils")
382 (version "006")
383 (source
384 (origin
385 (method url-fetch)
386 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
387 "usbutils-" version ".tar.xz"))
388 (sha256
389 (base32
390 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
391 (build-system gnu-build-system)
392 (inputs
393 `(("libusb" ,libusb) ("pkg-config" ,pkg-config)))
394 (home-page "http://www.linux-usb.org/")
395 (synopsis
396 "Tools for working with USB devices, such as lsusb")
397 (description
398 "Tools for working with USB devices, such as lsusb.")
399 (license gpl2+)))
400
401 (define-public e2fsprogs
402 (package
403 (name "e2fsprogs")
404 (version "1.42.7")
405 (source (origin
406 (method url-fetch)
407 (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-"
408 version ".tar.gz"))
409 (sha256
410 (base32
411 "0ibkkvp6kan0hn0d1anq4n2md70j5gcm7mwna515w82xwyr02rfw"))))
412 (build-system gnu-build-system)
413 (inputs `(("util-linux" ,util-linux)
414 ("pkg-config" ,pkg-config)))
415 (arguments
416 '(#:phases (alist-cons-before
417 'configure 'patch-shells
418 (lambda _
419 (substitute* "configure"
420 (("/bin/sh (.*)parse-types.sh" _ dir)
421 (string-append (which "sh") " " dir
422 "parse-types.sh")))
423 (substitute* (find-files "." "^Makefile.in$")
424 (("#!/bin/sh")
425 (string-append "#!" (which "sh")))))
426 %standard-phases)
427
428 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
429 ;; they fail because we get an extra line that says "Can't check if
430 ;; filesystem is mounted due to missing mtab file".
431 #:tests? #f))
432 (home-page "http://e2fsprogs.sourceforge.net/")
433 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
434 (description
435 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
436 (license (list gpl2 ; programs
437 lgpl2.0 ; libext2fs
438 x11)))) ; libuuid
439
440 (define-public strace
441 (package
442 (name "strace")
443 (version "4.7")
444 (source (origin
445 (method url-fetch)
446 (uri (string-append "mirror://sourceforge/strace/strace-"
447 version ".tar.xz"))
448 (sha256
449 (base32
450 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
451 (build-system gnu-build-system)
452 (inputs `(("perl" ,perl)))
453 (home-page "http://strace.sourceforge.net/")
454 (synopsis "System call tracer for Linux")
455 (description
456 "strace is a system call tracer, i.e. a debugging tool which prints out a
457 trace of all the system calls made by a another process/program.")
458 (license bsd-3)))
459
460 (define-public alsa-lib
461 (package
462 (name "alsa-lib")
463 (version "1.0.27.1")
464 (source (origin
465 (method url-fetch)
466 (uri (string-append
467 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
468 version ".tar.bz2"))
469 (sha256
470 (base32
471 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))))
472 (build-system gnu-build-system)
473 (home-page "http://www.alsa-project.org/")
474 (synopsis "The Advanced Linux Sound Architecture libraries")
475 (description
476 "The Advanced Linux Sound Architecture (ALSA) provides audio and
477 MIDI functionality to the Linux-based operating system.")
478 (license lgpl2.1+)))
479
480 (define-public iptables
481 (package
482 (name "iptables")
483 (version "1.4.16.2")
484 (source (origin
485 (method url-fetch)
486 (uri (string-append
487 "http://www.netfilter.org/projects/iptables/files/iptables-"
488 version ".tar.bz2"))
489 (sha256
490 (base32
491 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
492 (build-system gnu-build-system)
493 (arguments '(#:tests? #f)) ; no test suite
494 (home-page "http://www.netfilter.org/projects/iptables/index.html")
495 (synopsis "Program to configure the Linux IP packet filtering rules")
496 (description
497 "iptables is the userspace command line program used to configure the
498 Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards
499 system administrators. Since Network Address Translation is also configured
500 from the packet filter ruleset, iptables is used for this, too. The iptables
501 package also includes ip6tables. ip6tables is used for configuring the IPv6
502 packet filter.")
503 (license gpl2+)))
504
505 (define-public iproute
506 (package
507 (name "iproute2")
508 (version "3.8.0")
509 (source (origin
510 (method url-fetch)
511 (uri (string-append
512 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
513 version ".tar.xz"))
514 (sha256
515 (base32
516 "0kqy30wz2krbg4y7750hjq5218hgy2vj9pm5qzkn1bqskxs4b4ap"))))
517 (build-system gnu-build-system)
518 (arguments
519 `(#:tests? #f ; no test suite
520 #:make-flags (let ((out (assoc-ref %outputs "out")))
521 (list "DESTDIR="
522 (string-append "LIBDIR=" out "/lib")
523 (string-append "SBINDIR=" out "/sbin")
524 (string-append "CONFDIR=" out "/etc")
525 (string-append "DOCDIR=" out "/share/doc/"
526 ,name "-" ,version)
527 (string-append "MANDIR=" out "/share/man")))
528 #:phases (alist-cons-before
529 'install 'pre-install
530 (lambda _
531 ;; Don't attempt to create /var/lib/arpd.
532 (substitute* "Makefile"
533 (("^.*ARPDDIR.*$") "")))
534 %standard-phases)))
535 (inputs
536 `(("iptables" ,iptables)
537 ("db4" ,bdb)
538 ("pkg-config" ,pkg-config)
539 ("flex" ,flex)
540 ("bison" ,bison)))
541 (home-page
542 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
543 (synopsis
544 "A collection of utilities for controlling TCP/IP networking and traffic control in Linux")
545 (description
546 "Iproute2 is a collection of utilities for controlling TCP/IP
547 networking and traffic with the Linux kernel.
548
549 Most network configuration manuals still refer to ifconfig and route as the
550 primary network configuration tools, but ifconfig is known to behave
551 inadequately in modern network environments. They should be deprecated, but
552 most distros still include them. Most network configuration systems make use
553 of ifconfig and thus provide a limited feature set. The /etc/net project aims
554 to support most modern network technologies, as it doesn't use ifconfig and
555 allows a system administrator to make use of all iproute2 features, including
556 traffic control.
557
558 iproute2 is usually shipped in a package called iproute or iproute2 and
559 consists of several tools, of which the most important are ip and tc. ip
560 controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
561 tools print detailed usage messages and are accompanied by a set of
562 manpages.")
563 (license gpl2+)))
564
565 (define-public net-tools
566 ;; XXX: This package is basically unmaintained, but it provides a few
567 ;; commands not yet provided by Inetutils, such as 'route', so we have to
568 ;; live with it.
569 (package
570 (name "net-tools")
571 (version "1.60")
572 (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/")
573 (source (origin
574 (method url-fetch)
575 (uri (string-append home-page "/" name "-"
576 version ".tar.bz2"))
577 (sha256
578 (base32
579 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))))
580 (build-system gnu-build-system)
581 (arguments
582 '(#:phases (alist-replace
583 'patch
584 (lambda* (#:key inputs #:allow-other-keys)
585 (define (apply-patch file)
586 (zero? (system* "patch" "-p1" "--batch"
587 "--input" file)))
588
589 (let ((patch.gz (assoc-ref inputs "patch")))
590 (format #t "applying Debian patch set '~a'...~%"
591 patch.gz)
592 (system (string-append "gunzip < " patch.gz " > the-patch"))
593 (pk 'here)
594 (and (apply-patch "the-patch")
595 (for-each apply-patch
596 (find-files "debian/patches"
597 "\\.patch")))))
598 (alist-replace
599 'configure
600 (lambda* (#:key outputs #:allow-other-keys)
601 (let ((out (assoc-ref outputs "out")))
602 (mkdir-p (string-append out "/bin"))
603 (mkdir-p (string-append out "/sbin"))
604
605 ;; Pretend we have everything...
606 (system "yes | make config")
607
608 ;; ... except we don't have libdnet, so remove that
609 ;; definition.
610 (substitute* '("config.make" "config.h")
611 (("^.*HAVE_AFDECnet.*$") ""))))
612 %standard-phases))
613
614 ;; Binaries that depend on libnet-tools.a don't declare that
615 ;; dependency, making it parallel-unsafe.
616 #:parallel-build? #f
617
618 #:tests? #f ; no test suite
619 #:make-flags (list "CC=gcc"
620 (string-append "BASEDIR="
621 (assoc-ref %outputs "out")))))
622
623 ;; Use the big Debian patch set (the thing does not even compile out of
624 ;; the box.)
625 (inputs `(("patch" ,(origin
626 (method url-fetch)
627 (uri
628 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
629 (sha256
630 (base32
631 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
632 (native-inputs `(("gettext" ,g:gettext)))
633
634 (synopsis "Tools for controlling the network subsystem in Linux")
635 (description
636 "This package includes the important tools for controlling the network
637 subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
638 netstat, rarp and route. Additionally, this package contains utilities
639 relating to particular network hardware types (plipconfig, slattach) and
640 advanced aspects of IP configuration (iptunnel, ipmaddr).")
641 (license gpl2+)))
642
643 (define-public libcap
644 (package
645 (name "libcap")
646 (version "2.22")
647 (source (origin
648 (method url-fetch)
649
650 ;; Tarballs used to be available from
651 ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/>
652 ;; but they never came back after kernel.org was compromised.
653 (uri (string-append
654 "mirror://debian/pool/main/libc/libcap2/libcap2_"
655 version ".orig.tar.gz"))
656 (sha256
657 (base32
658 "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1"))))
659 (build-system gnu-build-system)
660 (arguments '(#:phases (alist-delete 'configure %standard-phases)
661 #:tests? #f ; no 'check' target
662 #:make-flags (list "lib=lib"
663 (string-append "prefix="
664 (assoc-ref %outputs "out"))
665 "RAISE_SETFCAP=no")))
666 (native-inputs `(("perl" ,perl)))
667 (inputs `(("attr" ,attr)))
668 (home-page "https://sites.google.com/site/fullycapable/")
669 (synopsis "Library for working with POSIX capabilities")
670 (description
671 "libcap2 provides a programming interface to POSIX capabilities on
672 Linux-based operating systems.")
673
674 ;; License is BSD-3 or GPLv2, at the user's choice.
675 (license gpl2)))