services: udev: Improve synchronization when starting.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
6869e5c9 2;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
e062d542 3;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
233e7676 4;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
0d55c356 5;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
fd76c904 6;;;
233e7676 7;;; This file is part of GNU Guix.
fd76c904 8;;;
233e7676 9;;; GNU Guix is free software; you can redistribute it and/or modify it
fd76c904
LC
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.
13;;;
233e7676 14;;; GNU Guix is distributed in the hope that it will be useful, but
fd76c904
LC
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.
18;;;
19;;; You should have received a copy of the GNU General Public License
233e7676 20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
fd76c904 21
1ffa7090 22(define-module (gnu packages linux)
023fef7d
LC
23 #:use-module ((guix licenses)
24 #:hide (zlib))
59a43334 25 #:use-module (gnu packages)
1ffa7090 26 #:use-module ((gnu packages compression)
4a44e743 27 #:renamer (symbol-prefix-proc 'guix:))
1ffa7090 28 #:use-module (gnu packages flex)
90a0048f 29 #:use-module (gnu packages bison)
d7d42d6b 30 #:use-module (gnu packages gperf)
1ffa7090
LC
31 #:use-module (gnu packages libusb)
32 #:use-module (gnu packages ncurses)
d7d42d6b 33 #:use-module (gnu packages pciutils)
90a0048f 34 #:use-module (gnu packages bdb)
1ffa7090
LC
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages pkg-config)
7c0dbe78 37 #:use-module (gnu packages python)
e7b38500 38 #:use-module (gnu packages algebra)
1dba6407 39 #:use-module (gnu packages gettext)
db288efa 40 #:use-module (gnu packages glib)
17b293a0 41 #:use-module (gnu packages pulseaudio)
c762e82e 42 #:use-module (gnu packages attr)
17b293a0 43 #:use-module (gnu packages xml)
215b6431 44 #:use-module (gnu packages autotools)
f57d2639 45 #:use-module (gnu packages texinfo)
b10e9ff6 46 #:use-module (gnu packages check)
02b80c3f
NK
47 #:use-module (guix packages)
48 #:use-module (guix download)
7c0dbe78 49 #:use-module (guix build-system gnu)
220193ad 50 #:use-module (guix build-system cmake)
e102f940
LC
51 #:use-module (guix build-system python)
52 #:use-module (guix build-system trivial))
fd76c904 53
aaf4cb20
LC
54(define-public (system->linux-architecture arch)
55 "Return the Linux architecture name for ARCH, a Guix system name such as
56\"x86_64-linux\"."
618cea69
NK
57 (let ((arch (car (string-split arch #\-))))
58 (cond ((string=? arch "i686") "i386")
59 ((string-prefix? "mips" arch) "mips")
aaf4cb20 60 ((string-prefix? "arm" arch) "arm")
618cea69
NK
61 (else arch))))
62
6023cc74
LC
63(define (linux-libre-urls version)
64 "Return a list of URLs for Linux-Libre VERSION."
65 (list (string-append
66 "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
67 version "-gnu/linux-libre-" version "-gnu.tar.xz")
68
69 ;; XXX: Work around <http://bugs.gnu.org/14851>.
70 (string-append
71 "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
72 version "-gnu.tar.xz")
73
74 ;; Maybe this URL will become valid eventually.
75 (string-append
76 "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
77 version "-gnu.tar.xz")))
78
80fe5c60 79(define-public linux-libre-headers
dfb52abb 80 (let* ((version "3.3.8")
80fe5c60 81 (build-phase
618cea69
NK
82 (lambda (arch)
83 `(lambda _
84 (setenv "ARCH" ,(system->linux-architecture arch))
85 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
45298f8f 86
618cea69
NK
87 (and (zero? (system* "make" "defconfig"))
88 (zero? (system* "make" "mrproper" "headers_check"))))))
80fe5c60
LC
89 (install-phase
90 `(lambda* (#:key outputs #:allow-other-keys)
91 (let ((out (assoc-ref outputs "out")))
92 (and (zero? (system* "make"
93 (string-append "INSTALL_HDR_PATH=" out)
94 "headers_install"))
95 (mkdir (string-append out "/include/config"))
96 (call-with-output-file
97 (string-append out
98 "/include/config/kernel.release")
99 (lambda (p)
dfb52abb 100 (format p "~a-default~%" ,version))))))))
80fe5c60
LC
101 (package
102 (name "linux-libre-headers")
dfb52abb 103 (version version)
80fe5c60
LC
104 (source (origin
105 (method url-fetch)
6023cc74 106 (uri (linux-libre-urls version))
80fe5c60
LC
107 (sha256
108 (base32
109 "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
110 (build-system gnu-build-system)
111 (native-inputs `(("perl" ,perl)))
112 (arguments
113 `(#:modules ((guix build gnu-build-system)
114 (guix build utils)
56c092ce 115 (srfi srfi-1))
80fe5c60 116 #:phases (alist-replace
fb6c2fa8
LC
117 'build ,(build-phase (or (%current-target-system)
118 (%current-system)))
80fe5c60
LC
119 (alist-replace
120 'install ,install-phase
56c092ce 121 (alist-delete 'configure %standard-phases)))
80fe5c60
LC
122 #:tests? #f))
123 (synopsis "GNU Linux-Libre kernel headers")
124 (description "Headers of the Linux-Libre kernel.")
38bbd61d 125 (license gpl2)
80fe5c60
LC
126 (home-page "http://www.gnu.org/software/linux-libre/"))))
127
b4fcb735
LC
128(define-public module-init-tools
129 (package
130 (name "module-init-tools")
131 (version "3.16")
132 (source (origin
133 (method url-fetch)
134 (uri (string-append
135 "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
136 version ".tar.bz2"))
137 (sha256
138 (base32
d3bbe992
LC
139 "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
140 (patches
141 (list (search-patch "module-init-tools-moduledir.patch")))))
b4fcb735 142 (build-system gnu-build-system)
b4fcb735 143 (arguments
5c413a9c
LC
144 ;; FIXME: The upstream tarball lacks man pages, and building them would
145 ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
146 ;; but they vanished. In the meantime, fake it.
b4fcb735 147 '(#:phases (alist-cons-before
5c413a9c
LC
148 'configure 'fake-docbook
149 (lambda _
150 (substitute* "Makefile.in"
151 (("^DOCBOOKTOMAN.*$")
152 "DOCBOOKTOMAN = true\n")))
b4fcb735
LC
153 %standard-phases)))
154 (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
155 (synopsis "Tools for loading and managing Linux kernel modules")
156 (description
157 "Tools for loading and managing Linux kernel modules, such as `modprobe',
158`insmod', `lsmod', and more.")
159 (license gpl2+)))
160
ac47a7c2
LC
161(define %boot-logo-patch
162 ;; Linux-Libre boot logo featuring Freedo and a gnu.
163 (origin
164 (method url-fetch)
165 (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
166 "lemote/gnewsense/branches/3.15/100gnu+freedo.patch"))
167 (sha256
168 (base32
169 "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
170
beacfcab 171(define-public linux-libre
ed4a8816 172 (let* ((version "3.15")
beacfcab 173 (build-phase
ac47a7c2
LC
174 '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
175 ;; Apply the neat patch.
176 (system* "patch" "-p1" "--batch"
177 "-i" (assoc-ref inputs "patch/freedo+gnu"))
178
beacfcab
LC
179 (let ((arch (car (string-split system #\-))))
180 (setenv "ARCH"
181 (cond ((string=? arch "i686") "i386")
182 (else arch)))
183 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
184
185 (let ((build (assoc-ref %standard-phases 'build)))
2e48455d
LC
186 (and (zero? (system* "make" "defconfig"))
187 (begin
c0888b3f
AE
188 ;; Appending works even when the option wasn't in the
189 ;; file. The last one prevails if duplicated.
882f034f 190 (let ((port (open-file ".config" "a")))
c0888b3f
AE
191 (display (string-append "CONFIG_NET_9P=m\n"
192 "CONFIG_NET_9P_VIRTIO=m\n"
882f034f 193 "CONFIG_VIRTIO_BLK=m\n"
be0d8af8 194 "CONFIG_SATA_SIS=y\n"
c0888b3f 195 "CONFIG_VIRTIO_NET=m\n"
be0d8af8
AE
196 "CONFIG_SIS190=y\n"
197 ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
198 "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
c0888b3f
AE
199 "CONFIG_VIRTIO_PCI=m\n"
200 "CONFIG_VIRTIO_BALLOON=m\n"
201 "CONFIG_VIRTIO_MMIO=m\n"
202 "CONFIG_FUSE_FS=m\n"
203 "CONFIG_CIFS=m\n"
d8bb353c
LC
204 "CONFIG_9P_FS=m\n"
205 "CONFIG_E1000E=m\n")
882f034f
LC
206 port)
207 (close-port port))
208
2e48455d 209 (zero? (system* "make" "oldconfig")))
beacfcab
LC
210
211 ;; Call the default `build' phase so `-j' is correctly
212 ;; passed.
213 (apply build #:make-flags "all" args)))))
214 (install-phase
215 `(lambda* (#:key inputs outputs #:allow-other-keys)
216 (let* ((out (assoc-ref outputs "out"))
217 (moddir (string-append out "/lib/modules"))
218 (mit (assoc-ref inputs "module-init-tools")))
219 (mkdir-p moddir)
220 (for-each (lambda (file)
221 (copy-file file
222 (string-append out "/" (basename file))))
223 (find-files "." "^(bzImage|System\\.map)$"))
224 (copy-file ".config" (string-append out "/config"))
225 (zero? (system* "make"
226 (string-append "DEPMOD=" mit "/sbin/depmod")
227 (string-append "MODULE_DIR=" moddir)
228 (string-append "INSTALL_PATH=" out)
229 (string-append "INSTALL_MOD_PATH=" out)
230 "modules_install"))))))
231 (package
232 (name "linux-libre")
dfb52abb 233 (version version)
beacfcab
LC
234 (source (origin
235 (method url-fetch)
6023cc74 236 (uri (linux-libre-urls version))
beacfcab
LC
237 (sha256
238 (base32
ed4a8816 239 "125n04rwqmr3bm9slk62w6xcg355hx85rwv2x16nl6qki70hsick"))))
beacfcab
LC
240 (build-system gnu-build-system)
241 (native-inputs `(("perl" ,perl)
e7b38500 242 ("bc" ,bc)
ac47a7c2
LC
243 ("module-init-tools" ,module-init-tools)
244 ("patch/freedo+gnu" ,%boot-logo-patch)))
beacfcab
LC
245 (arguments
246 `(#:modules ((guix build gnu-build-system)
247 (guix build utils)
248 (srfi srfi-1)
249 (ice-9 match))
250 #:phases (alist-replace
251 'build ,build-phase
252 (alist-replace
253 'install ,install-phase
254 (alist-delete 'configure %standard-phases)))
255 #:tests? #f))
f50d2669 256 (synopsis "100% free redistribution of a cleaned Linux kernel")
a22dc0c4 257 (description
79c311b8
LC
258 "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
259It has been modified to remove all non-free binary blobs.")
beacfcab
LC
260 (license gpl2)
261 (home-page "http://www.gnu.org/software/linux-libre/"))))
262
c84d0eca
LC
263\f
264;;;
265;;; Pluggable authentication modules (PAM).
266;;;
267
fd76c904
LC
268(define-public linux-pam
269 (package
270 (name "linux-pam")
271 (version "1.1.6")
272 (source
273 (origin
274 (method url-fetch)
275 (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
276 version ".tar.bz2")
277 (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
278 version ".tar.bz2")))
279 (sha256
280 (base32
281 "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
282 (build-system gnu-build-system)
c4c4cc05 283 (native-inputs
fd76c904
LC
284 `(("flex" ,flex)
285
286 ;; TODO: optional dependencies
287 ;; ("libxcrypt" ,libxcrypt)
288 ;; ("cracklib" ,cracklib)
289 ))
290 (arguments
c134056a
LC
291 '(;; Most users, such as `shadow', expect the headers to be under
292 ;; `security'.
293 #:configure-flags (list (string-append "--includedir="
294 (assoc-ref %outputs "out")
295 "/include/security"))
296
297 ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
298 ;; isn't available.
299 #:tests? #f))
fd76c904
LC
300 (home-page "http://www.linux-pam.org/")
301 (synopsis "Pluggable authentication modules for Linux")
302 (description
303 "A *Free* project to implement OSF's RFC 86.0.
304Pluggable authentication modules are small shared object files that can
305be used through the PAM API to perform tasks, like authenticating a user
306at login. Local and dynamic reconfiguration are its key features")
4a44e743 307 (license bsd-3)))
686f14e8 308
c84d0eca
LC
309\f
310;;;
311;;; Miscellaneous.
312;;;
313
686f14e8
LC
314(define-public psmisc
315 (package
316 (name "psmisc")
317 (version "22.20")
318 (source
319 (origin
320 (method url-fetch)
321 (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
322 version ".tar.gz"))
323 (sha256
324 (base32
325 "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
326 (build-system gnu-build-system)
327 (inputs `(("ncurses" ,ncurses)))
328 (home-page "http://psmisc.sourceforge.net/")
329 (synopsis
330 "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
331 (description
332 "This PSmisc package is a set of some small useful utilities that
333use the proc filesystem. We're not about changing the world, but
334providing the system administrator with some help in common tasks.")
4a44e743 335 (license gpl2+)))
02b80c3f
NK
336
337(define-public util-linux
338 (package
339 (name "util-linux")
340 (version "2.21")
5a6a3ba4
LC
341 (source (origin
342 (method url-fetch)
343 (uri (string-append "mirror://kernel.org/linux/utils/"
344 name "/v" version "/"
345 name "-" version ".2" ".tar.xz"))
346 (sha256
347 (base32
348 "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))
349 (patches (list (search-patch "util-linux-perl.patch")))))
02b80c3f
NK
350 (build-system gnu-build-system)
351 (arguments
8b8476b8
AE
352 `(#:configure-flags '("--disable-use-tty-group"
353 "--enable-ddate")
02b80c3f
NK
354 #:phases (alist-cons-after
355 'install 'patch-chkdupexe
356 (lambda* (#:key outputs #:allow-other-keys)
357 (let ((out (assoc-ref outputs "out")))
358 (substitute* (string-append out "/bin/chkdupexe")
359 ;; Allow 'patch-shebang' to do its work.
360 (("@PERL@") "/bin/perl"))))
361 %standard-phases)))
4a44e743 362 (inputs `(("zlib" ,guix:zlib)
c4c4cc05
JD
363 ("ncurses" ,ncurses)))
364 (native-inputs
365 `(("perl" ,perl)))
02b80c3f 366 (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
35ec07c7 367 (synopsis "Collection of utilities for the Linux kernel")
02b80c3f
NK
368 (description
369 "util-linux is a random collection of utilities for the Linux kernel.")
fe8ccfcc 370
02b80c3f 371 ;; Note that util-linux doesn't use the same license for all the
fe8ccfcc 372 ;; code. GPLv2+ is the default license for a code without an
02b80c3f 373 ;; explicitly defined license.
fe8ccfcc
LC
374 (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
375 bsd-4 public-domain))))
5d5c4278 376
e47e3eff
LC
377(define-public procps
378 (package
379 (name "procps")
380 (version "3.2.8")
381 (source (origin
382 (method url-fetch)
383 (uri (string-append "http://procps.sourceforge.net/procps-"
384 version ".tar.gz"))
385 (sha256
386 (base32
01eafd38
LC
387 "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))
388 (patches (list (search-patch "procps-make-3.82.patch")))))
e47e3eff 389 (build-system gnu-build-system)
01eafd38 390 (inputs `(("ncurses" ,ncurses)))
e47e3eff 391 (arguments
01eafd38 392 '(#:phases (alist-replace
e47e3eff
LC
393 'configure
394 (lambda* (#:key outputs #:allow-other-keys)
395 ;; No `configure', just a single Makefile.
396 (let ((out (assoc-ref outputs "out")))
397 (substitute* "Makefile"
398 (("/usr/") "/")
399 (("--(owner|group) 0") "")
400 (("ldconfig") "true")
401 (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
402 ;; Add libproc to the RPATH.
403 (string-append "LDFLAGS := -Wl,-rpath="
404 out "/lib" value))))
405 (setenv "CC" "gcc"))
406 (alist-replace
407 'install
408 (lambda* (#:key outputs #:allow-other-keys)
409 (let ((out (assoc-ref outputs "out")))
410 (and (zero?
411 (system* "make" "install"
412 (string-append "DESTDIR=" out)))
413
414 ;; Sanity check.
415 (zero?
416 (system* (string-append out "/bin/ps")
417 "--version")))))
418 %standard-phases))
419
420 ;; What did you expect? Tests?
421 #:tests? #f))
422 (home-page "http://procps.sourceforge.net/")
35ec07c7 423 (synopsis "Utilities that give information about processes")
e47e3eff
LC
424 (description
425 "procps is the package that has a bunch of small useful utilities
426that give information about processes using the Linux /proc file system.
427The package includes the programs ps, top, vmstat, w, kill, free,
428slabtop, and skill.")
429 (license gpl2)))
430
5d5c4278
NK
431(define-public usbutils
432 (package
433 (name "usbutils")
434 (version "006")
435 (source
436 (origin
437 (method url-fetch)
438 (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
439 "usbutils-" version ".tar.xz"))
440 (sha256
441 (base32
442 "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
443 (build-system gnu-build-system)
444 (inputs
c4c4cc05
JD
445 `(("libusb" ,libusb)))
446 (native-inputs
447 `(("pkg-config" ,pkg-config)))
5d5c4278
NK
448 (home-page "http://www.linux-usb.org/")
449 (synopsis
450 "Tools for working with USB devices, such as lsusb")
451 (description
452 "Tools for working with USB devices, such as lsusb.")
4050e5d6 453 (license gpl2+)))
0750452a
LC
454
455(define-public e2fsprogs
456 (package
457 (name "e2fsprogs")
458 (version "1.42.7")
459 (source (origin
460 (method url-fetch)
461 (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-"
462 version ".tar.gz"))
463 (sha256
464 (base32
465 "0ibkkvp6kan0hn0d1anq4n2md70j5gcm7mwna515w82xwyr02rfw"))))
466 (build-system gnu-build-system)
c4c4cc05 467 (inputs `(("util-linux" ,util-linux)))
f57d2639
LC
468 (native-inputs `(("pkg-config" ,pkg-config)
469 ("texinfo" ,texinfo))) ; for the libext2fs Info manual
0750452a
LC
470 (arguments
471 '(#:phases (alist-cons-before
472 'configure 'patch-shells
473 (lambda _
474 (substitute* "configure"
475 (("/bin/sh (.*)parse-types.sh" _ dir)
476 (string-append (which "sh") " " dir
477 "parse-types.sh")))
478 (substitute* (find-files "." "^Makefile.in$")
479 (("#!/bin/sh")
480 (string-append "#!" (which "sh")))))
481 %standard-phases)
482
483 ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
484 ;; they fail because we get an extra line that says "Can't check if
485 ;; filesystem is mounted due to missing mtab file".
486 #:tests? #f))
487 (home-page "http://e2fsprogs.sourceforge.net/")
35ec07c7 488 (synopsis "Creating and checking ext2/ext3/ext4 file systems")
0750452a
LC
489 (description
490 "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
491 (license (list gpl2 ; programs
492 lgpl2.0 ; libext2fs
493 x11)))) ; libuuid
d8482ad0 494
e102f940
LC
495(define-public e2fsck/static
496 (package
497 (name "e2fsck-static")
0997771a 498 (version (package-version e2fsprogs))
e102f940
LC
499 (build-system trivial-build-system)
500 (source #f)
501 (arguments
502 `(#:modules ((guix build utils))
503 #:builder
504 (begin
505 (use-modules (guix build utils)
506 (ice-9 ftw)
507 (srfi srfi-26))
508
509 (let ((source (string-append (assoc-ref %build-inputs "e2fsprogs")
510 "/sbin"))
511 (bin (string-append (assoc-ref %outputs "out") "/sbin")))
512 (mkdir-p bin)
513 (with-directory-excursion bin
514 (for-each (lambda (file)
515 (copy-file (string-append source "/" file)
516 file)
517 (remove-store-references file)
518 (chmod file #o555))
519 (scandir source (cut string-prefix? "fsck." <>))))))))
0997771a 520 (inputs `(("e2fsprogs" ,(static-package e2fsprogs))))
e102f940
LC
521 (synopsis "Statically-linked fsck.* commands from e2fsprogs")
522 (description
523 "This package provides statically-linked command of fsck.ext[234] taken
524from the e2fsprogs package. It is meant to be used in initrds.")
0997771a
LC
525 (home-page (package-home-page e2fsprogs))
526 (license (package-license e2fsprogs))))
e102f940 527
d8482ad0
LC
528(define-public strace
529 (package
530 (name "strace")
531 (version "4.7")
532 (source (origin
533 (method url-fetch)
534 (uri (string-append "mirror://sourceforge/strace/strace-"
535 version ".tar.xz"))
536 (sha256
537 (base32
538 "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
539 (build-system gnu-build-system)
c4c4cc05 540 (native-inputs `(("perl" ,perl)))
d8482ad0
LC
541 (home-page "http://strace.sourceforge.net/")
542 (synopsis "System call tracer for Linux")
543 (description
544 "strace is a system call tracer, i.e. a debugging tool which prints out a
545trace of all the system calls made by a another process/program.")
546 (license bsd-3)))
ba04571a
LC
547
548(define-public alsa-lib
549 (package
550 (name "alsa-lib")
551 (version "1.0.27.1")
552 (source (origin
553 (method url-fetch)
554 (uri (string-append
555 "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
556 version ".tar.bz2"))
557 (sha256
558 (base32
bcd94e19
MW
559 "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
560 (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch")))))
ba04571a
LC
561 (build-system gnu-build-system)
562 (home-page "http://www.alsa-project.org/")
563 (synopsis "The Advanced Linux Sound Architecture libraries")
564 (description
565 "The Advanced Linux Sound Architecture (ALSA) provides audio and
566MIDI functionality to the Linux-based operating system.")
567 (license lgpl2.1+)))
10afdf50 568
17b293a0
LC
569(define-public alsa-utils
570 (package
571 (name "alsa-utils")
572 (version "1.0.27.2")
573 (source (origin
574 (method url-fetch)
575 (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-"
576 version ".tar.bz2"))
577 (sha256
578 (base32
579 "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2"))))
580 (build-system gnu-build-system)
581 (arguments
582 ;; XXX: Disable man page creation until we have DocBook.
583 '(#:configure-flags (list "--disable-xmlto"
584 (string-append "--with-udev-rules-dir="
585 (assoc-ref %outputs "out")
586 "/lib/udev/rules.d"))
587 #:phases (alist-cons-before
588 'install 'pre-install
589 (lambda _
590 ;; Don't try to mkdir /var/lib/alsa.
591 (substitute* "Makefile"
592 (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
593 "true\n")))
594 %standard-phases)))
595 (inputs
596 `(("libsamplerate" ,libsamplerate)
597 ("ncurses" ,ncurses)
598 ("alsa-lib" ,alsa-lib)
599 ("xmlto" ,xmlto)
1dba6407 600 ("gettext" ,gnu-gettext)))
17b293a0
LC
601 (home-page "http://www.alsa-project.org/")
602 (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
603 (description
604 "The Advanced Linux Sound Architecture (ALSA) provides audio and
605MIDI functionality to the Linux-based operating system.")
606
607 ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
608 ;; GPLv2-only.
609 (license gpl2)))
610
10afdf50
LC
611(define-public iptables
612 (package
613 (name "iptables")
614 (version "1.4.16.2")
615 (source (origin
616 (method url-fetch)
617 (uri (string-append
618 "http://www.netfilter.org/projects/iptables/files/iptables-"
619 version ".tar.bz2"))
620 (sha256
621 (base32
622 "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
623 (build-system gnu-build-system)
624 (arguments '(#:tests? #f)) ; no test suite
625 (home-page "http://www.netfilter.org/projects/iptables/index.html")
626 (synopsis "Program to configure the Linux IP packet filtering rules")
627 (description
628 "iptables is the userspace command line program used to configure the
629Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards
630system administrators. Since Network Address Translation is also configured
631from the packet filter ruleset, iptables is used for this, too. The iptables
632package also includes ip6tables. ip6tables is used for configuring the IPv6
633packet filter.")
634 (license gpl2+)))
90a0048f
LC
635
636(define-public iproute
637 (package
638 (name "iproute2")
5fd7f3e0 639 (version "3.12.0")
90a0048f
LC
640 (source (origin
641 (method url-fetch)
642 (uri (string-append
643 "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
644 version ".tar.xz"))
645 (sha256
646 (base32
5fd7f3e0 647 "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4"))))
90a0048f
LC
648 (build-system gnu-build-system)
649 (arguments
650 `(#:tests? #f ; no test suite
651 #:make-flags (let ((out (assoc-ref %outputs "out")))
652 (list "DESTDIR="
653 (string-append "LIBDIR=" out "/lib")
654 (string-append "SBINDIR=" out "/sbin")
655 (string-append "CONFDIR=" out "/etc")
656 (string-append "DOCDIR=" out "/share/doc/"
657 ,name "-" ,version)
658 (string-append "MANDIR=" out "/share/man")))
659 #:phases (alist-cons-before
660 'install 'pre-install
661 (lambda _
662 ;; Don't attempt to create /var/lib/arpd.
663 (substitute* "Makefile"
664 (("^.*ARPDDIR.*$") "")))
665 %standard-phases)))
666 (inputs
667 `(("iptables" ,iptables)
c4c4cc05
JD
668 ("db4" ,bdb)))
669 (native-inputs
670 `(("pkg-config" ,pkg-config)
90a0048f
LC
671 ("flex" ,flex)
672 ("bison" ,bison)))
673 (home-page
674 "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
675 (synopsis
676 "A collection of utilities for controlling TCP/IP networking and traffic control in Linux")
677 (description
678 "Iproute2 is a collection of utilities for controlling TCP/IP
679networking and traffic with the Linux kernel.
680
681Most network configuration manuals still refer to ifconfig and route as the
682primary network configuration tools, but ifconfig is known to behave
683inadequately in modern network environments. They should be deprecated, but
684most distros still include them. Most network configuration systems make use
685of ifconfig and thus provide a limited feature set. The /etc/net project aims
686to support most modern network technologies, as it doesn't use ifconfig and
687allows a system administrator to make use of all iproute2 features, including
688traffic control.
689
690iproute2 is usually shipped in a package called iproute or iproute2 and
691consists of several tools, of which the most important are ip and tc. ip
692controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
693tools print detailed usage messages and are accompanied by a set of
694manpages.")
695 (license gpl2+)))
85e0dc6a
LC
696
697(define-public net-tools
698 ;; XXX: This package is basically unmaintained, but it provides a few
699 ;; commands not yet provided by Inetutils, such as 'route', so we have to
700 ;; live with it.
701 (package
702 (name "net-tools")
703 (version "1.60")
704 (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/")
705 (source (origin
706 (method url-fetch)
707 (uri (string-append home-page "/" name "-"
708 version ".tar.bz2"))
709 (sha256
710 (base32
711 "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))))
712 (build-system gnu-build-system)
713 (arguments
cd143df0
LC
714 '(#:phases (alist-cons-after
715 'unpack 'patch
85e0dc6a
LC
716 (lambda* (#:key inputs #:allow-other-keys)
717 (define (apply-patch file)
718 (zero? (system* "patch" "-p1" "--batch"
719 "--input" file)))
720
721 (let ((patch.gz (assoc-ref inputs "patch")))
722 (format #t "applying Debian patch set '~a'...~%"
723 patch.gz)
724 (system (string-append "gunzip < " patch.gz " > the-patch"))
725 (pk 'here)
726 (and (apply-patch "the-patch")
727 (for-each apply-patch
728 (find-files "debian/patches"
729 "\\.patch")))))
730 (alist-replace
731 'configure
732 (lambda* (#:key outputs #:allow-other-keys)
733 (let ((out (assoc-ref outputs "out")))
734 (mkdir-p (string-append out "/bin"))
735 (mkdir-p (string-append out "/sbin"))
736
737 ;; Pretend we have everything...
738 (system "yes | make config")
739
740 ;; ... except we don't have libdnet, so remove that
741 ;; definition.
742 (substitute* '("config.make" "config.h")
743 (("^.*HAVE_AFDECnet.*$") ""))))
744 %standard-phases))
745
746 ;; Binaries that depend on libnet-tools.a don't declare that
747 ;; dependency, making it parallel-unsafe.
748 #:parallel-build? #f
749
750 #:tests? #f ; no test suite
0d55c356
MW
751 #:make-flags (let ((out (assoc-ref %outputs "out")))
752 (list "CC=gcc"
753 (string-append "BASEDIR=" out)
754 (string-append "INSTALLNLSDIR=" out "/share/locale")
755 (string-append "mandir=/share/man")))))
85e0dc6a
LC
756
757 ;; Use the big Debian patch set (the thing does not even compile out of
758 ;; the box.)
759 (inputs `(("patch" ,(origin
760 (method url-fetch)
761 (uri
762 "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
763 (sha256
764 (base32
765 "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
1dba6407 766 (native-inputs `(("gettext" ,gnu-gettext)))
85e0dc6a
LC
767
768 (synopsis "Tools for controlling the network subsystem in Linux")
769 (description
770 "This package includes the important tools for controlling the network
771subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
772netstat, rarp and route. Additionally, this package contains utilities
773relating to particular network hardware types (plipconfig, slattach) and
774advanced aspects of IP configuration (iptunnel, ipmaddr).")
775 (license gpl2+)))
c762e82e
LC
776
777(define-public libcap
778 (package
779 (name "libcap")
780 (version "2.22")
781 (source (origin
782 (method url-fetch)
783
784 ;; Tarballs used to be available from
785 ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/>
786 ;; but they never came back after kernel.org was compromised.
787 (uri (string-append
788 "mirror://debian/pool/main/libc/libcap2/libcap2_"
789 version ".orig.tar.gz"))
790 (sha256
791 (base32
792 "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1"))))
793 (build-system gnu-build-system)
794 (arguments '(#:phases (alist-delete 'configure %standard-phases)
795 #:tests? #f ; no 'check' target
796 #:make-flags (list "lib=lib"
797 (string-append "prefix="
798 (assoc-ref %outputs "out"))
799 "RAISE_SETFCAP=no")))
800 (native-inputs `(("perl" ,perl)))
801 (inputs `(("attr" ,attr)))
802 (home-page "https://sites.google.com/site/fullycapable/")
803 (synopsis "Library for working with POSIX capabilities")
804 (description
805 "libcap2 provides a programming interface to POSIX capabilities on
806Linux-based operating systems.")
807
808 ;; License is BSD-3 or GPLv2, at the user's choice.
809 (license gpl2)))
215b6431
LC
810
811(define-public bridge-utils
812 (package
813 (name "bridge-utils")
814 (version "1.5")
815 (source (origin
816 (method url-fetch)
817 (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
818 version ".tar.gz"))
819 (sha256
820 (base32
821 "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
822 (build-system gnu-build-system)
823
824 ;; The tarball lacks all the generated files.
825 (native-inputs `(("autoconf" ,autoconf)
826 ("automake" ,automake)))
827 (arguments
828 '(#:phases (alist-cons-before
829 'configure 'bootstrap
830 (lambda _
831 (zero? (system* "autoreconf" "-vf")))
832 %standard-phases)
833 #:tests? #f)) ; no 'check' target
834
835 (home-page
836 "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge")
837 (synopsis "Manipulate Ethernet bridges")
838 (description
839 "Utilities for Linux's Ethernet bridging facilities. A bridge is a way
840to connect two Ethernet segments together in a protocol independent way.
841Packets are forwarded based on Ethernet address, rather than IP address (like
842a router). Since forwarding is done at Layer 2, all protocols can go
843transparently through a bridge.")
844 (license gpl2+)))
3cc20675
LC
845
846(define-public libnl
847 (package
848 (name "libnl")
849 (version "3.2.13")
850 (source (origin
851 (method url-fetch)
852 (uri (string-append
853 "http://www.infradead.org/~tgr/libnl/files/libnl-"
854 version ".tar.gz"))
855 (sha256
856 (base32
857 "1ydw42lsd572qwrfgws97n76hyvjdpanwrxm03lysnhfxkna1ssd"))))
858 (build-system gnu-build-system)
859 (native-inputs `(("flex" ,flex) ("bison" ,bison)))
860 (home-page "http://www.infradead.org/~tgr/libnl/")
861 (synopsis "NetLink protocol library suite")
862 (description
863 "The libnl suite is a collection of libraries providing APIs to netlink
864protocol based Linux kernel interfaces. Netlink is an IPC mechanism primarly
865between the kernel and user space processes. It was designed to be a more
866flexible successor to ioctl to provide mainly networking related kernel
867configuration and monitoring interfaces.")
868
869 ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
870 ;; 'nl-addr-add.c'), so the result is GPLv2-only.
871 (license gpl2)))
023fef7d
LC
872
873(define-public powertop
874 (package
875 (name "powertop")
876 (version "2.5")
877 (source
878 (origin
879 (method url-fetch)
880 (uri (string-append
881 "https://01.org/powertop/sites/default/files/downloads/powertop-"
882 version ".tar.gz"))
883 (sha256
884 (base32
885 "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b"))))
886 (build-system gnu-build-system)
887 (inputs
888 ;; TODO: Add pciutils.
889 `(("zlib" ,guix:zlib)
023fef7d
LC
890 ;; ("pciutils" ,pciutils)
891 ("ncurses" ,ncurses)
892 ("libnl" ,libnl)))
c4c4cc05
JD
893 (native-inputs
894 `(("pkg-config" ,pkg-config)))
023fef7d
LC
895 (home-page "https://01.org/powertop/")
896 (synopsis "Analyze power consumption on Intel-based laptops")
897 (description
898 "PowerTOP is a Linux tool to diagnose issues with power consumption and
899power management. In addition to being a diagnostic tool, PowerTOP also has
900an interactive mode where the user can experiment various power management
901settings for cases where the operating system has not enabled these
902settings.")
903 (license gpl2)))
6869e5c9
LC
904
905(define-public aumix
906 (package
907 (name "aumix")
908 (version "2.9.1")
909 (source (origin
910 (method url-fetch)
911 (uri (string-append
912 "http://www.jpj.net/~trevor/aumix/releases/aumix-"
913 version ".tar.bz2"))
914 (sha256
915 (base32
916 "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
917 (build-system gnu-build-system)
918 (inputs `(("ncurses" ,ncurses)))
919 (home-page "http://www.jpj.net/~trevor/aumix.html")
920 (synopsis "Audio mixer for X and the console")
921 (description
922 "Aumix adjusts an audio mixer from X, the console, a terminal,
923the command line or a script.")
924 (license gpl2+)))
7c0dbe78
SHT
925
926(define-public iotop
927 (package
928 (name "iotop")
929 (version "0.6")
930 (source
931 (origin
932 (method url-fetch)
933 (uri (string-append "http://guichaz.free.fr/iotop/files/iotop-"
934 version ".tar.gz"))
935 (sha256 (base32
936 "1kp8mqg2pbxq4xzpianypadfxcsyfgwcaqgqia6h9fsq6zyh4z0s"))))
937 (build-system python-build-system)
938 (arguments
35cebf01 939 ;; The setup.py script expects python-2.
7c0dbe78 940 `(#:python ,python-2
35cebf01 941 ;; There are currently no checks in the package.
7c0dbe78
SHT
942 #:tests? #f))
943 (native-inputs `(("python" ,python-2)))
944 (home-page "http://guichaz.free.fr/iotop/")
945 (synopsis
946 "Displays the IO activity of running processes")
947 (description
948 "Iotop is a Python program with a top like user interface to show the
949processes currently causing I/O.")
35cebf01 950 (license gpl2+)))
e30835e2
LC
951
952(define-public fuse
953 (package
954 (name "fuse")
955 (version "2.9.3")
956 (source (origin
957 (method url-fetch)
958 (uri (string-append "mirror://sourceforge/fuse/fuse-"
959 version ".tar.gz"))
960 (sha256
961 (base32
962 "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb"))))
963 (build-system gnu-build-system)
b148bd71 964 (inputs `(("util-linux" ,util-linux)))
e30835e2
LC
965 (arguments
966 '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
967 (assoc-ref %outputs "out")
968 "/sbin")
969 (string-append "INIT_D_PATH="
970 (assoc-ref %outputs "out")
971 "/etc/init.d")
972 (string-append "UDEV_RULES_PATH="
973 (assoc-ref %outputs "out")
b148bd71
LC
974 "/etc/udev"))
975 #:phases (alist-cons-before
976 'build 'set-file-names
977 (lambda* (#:key inputs #:allow-other-keys)
978 ;; libfuse calls out to mount(8) and umount(8). Make sure
979 ;; it refers to the right ones.
980 (substitute* '("lib/mount_util.c" "util/mount_util.c")
981 (("/bin/(u?)mount" _ maybe-u)
982 (string-append (assoc-ref inputs "util-linux")
983 "/bin/" maybe-u "mount")))
984 (substitute* '("util/mount.fuse.c")
985 (("/bin/sh")
bd663902
LC
986 (which "sh")))
987
988 ;; This hack leads libfuse to search for 'fusermount' in
989 ;; $PATH, where it may find a setuid-root binary, instead of
990 ;; trying solely $out/sbin/fusermount and failing because
991 ;; it's not setuid.
992 (substitute* "lib/Makefile"
993 (("-DFUSERMOUNT_DIR=[[:graph:]]+")
994 "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
b148bd71 995 %standard-phases)))
e30835e2
LC
996 (home-page "http://fuse.sourceforge.net/")
997 (synopsis "Support file systems implemented in user space")
998 (description
999 "As a consequence of its monolithic design, file system code for Linux
1000normally goes into the kernel itself---which is not only a robustness issue,
1001but also an impediment to system extensibility. FUSE, for \"file systems in
1002user space\", is a kernel module and user-space library that tries to address
1003part of this problem by allowing users to run file system implementations as
1004user-space processes.")
1005 (license (list lgpl2.1 ; library
1006 gpl2+)))) ; command-line utilities
220193ad
LC
1007
1008(define-public unionfs-fuse
1009 (package
1010 (name "unionfs-fuse")
1011 (version "0.26")
1012 (source (origin
1013 (method url-fetch)
1014 (uri (string-append
1015 "http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-"
1016 version ".tar.xz"))
1017 (sha256
1018 (base32
1019 "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"))))
1020 (build-system cmake-build-system)
1021 (inputs `(("fuse" ,fuse)))
1022 (arguments '(#:tests? #f)) ; no tests
1023 (home-page "http://podgorny.cz/moin/UnionFsFuse")
1024 (synopsis "User-space union file system")
1025 (description
1026 "UnionFS-FUSE is a flexible union file system implementation in user
1027space, using the FUSE library. Mounting a union file system allows you to
1028\"aggregate\" the contents of several directories into a single mount point.
1029UnionFS-FUSE additionally supports copy-on-write.")
1030 (license bsd-3)))
ed748588 1031
0b7a0c20
LC
1032(define fuse-static
1033 (package (inherit fuse)
1034 (name "fuse-static")
1035 (source (origin (inherit (package-source fuse))
1036 (modules '((guix build utils)))
1037 (snippet
1038 ;; Normally libfuse invokes mount(8) so that /etc/mtab is
1039 ;; updated. Change calls to 'mtab_needs_update' to 0 so that
1040 ;; it doesn't do that, allowing us to remove the dependency on
1041 ;; util-linux (something that is useful in initrds.)
1042 '(substitute* '("lib/mount_util.c"
1043 "util/mount_util.c")
1044 (("mtab_needs_update[[:blank:]]*\\([a-z_]+\\)")
1045 "0")
1046 (("/bin/")
1047 "")))))))
1048
ed748588
LC
1049(define-public unionfs-fuse/static
1050 (package (inherit unionfs-fuse)
1051 (synopsis "User-space union file system (statically linked)")
1052 (name (string-append (package-name unionfs-fuse) "-static"))
1053 (source (origin (inherit (package-source unionfs-fuse))
1054 (modules '((guix build utils)))
1055 (snippet
1056 ;; Add -ldl to the libraries, because libfuse.a needs that.
1057 '(substitute* "src/CMakeLists.txt"
1058 (("target_link_libraries(.*)\\)" _ libs)
1059 (string-append "target_link_libraries"
1060 libs " dl)"))))))
1061 (arguments
1062 '(#:tests? #f
0b7a0c20
LC
1063 #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")))
1064 (inputs `(("fuse" ,fuse-static)))))
67b66003 1065
db288efa
LC
1066(define-public sshfs-fuse
1067 (package
1068 (name "sshfs-fuse")
1069 (version "2.5")
1070 (source (origin
1071 (method url-fetch)
1072 (uri (string-append "mirror://sourceforge/fuse/sshfs-fuse-"
1073 version ".tar.gz"))
1074 (sha256
1075 (base32
1076 "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"))))
1077 (build-system gnu-build-system)
1078 (inputs
1079 `(("fuse" ,fuse)
1080 ("glib" ,glib)))
1081 (native-inputs
1082 `(("pkg-config" ,pkg-config)))
1083 (home-page "http://fuse.sourceforge.net/sshfs.html")
1084 (synopsis "Mount remote file systems over SSH")
1085 (description
1086 "This is a file system client based on the SSH File Transfer Protocol.
1087Since most SSH servers already support this protocol it is very easy to set
1088up: on the server side there's nothing to do; on the client side mounting the
1089file system is as easy as logging into the server with an SSH client.")
1090 (license gpl2+)))
1091
67b66003
LC
1092(define-public numactl
1093 (package
1094 (name "numactl")
1095 (version "2.0.9")
1096 (source (origin
1097 (method url-fetch)
1098 (uri (string-append
1099 "ftp://oss.sgi.com/www/projects/libnuma/download/numactl-"
1100 version
1101 ".tar.gz"))
1102 (sha256
1103 (base32
1104 "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w"))))
1105 (build-system gnu-build-system)
1106 (arguments
1107 '(#:phases (alist-replace
1108 'configure
1109 (lambda* (#:key outputs #:allow-other-keys)
1110 ;; There's no 'configure' script, just a raw makefile.
1111 (substitute* "Makefile"
1112 (("^prefix := .*$")
1113 (string-append "prefix := " (assoc-ref outputs "out")
1114 "\n"))
1115 (("^libdir := .*$")
1116 ;; By default the thing tries to install under
1117 ;; $prefix/lib64 when on a 64-bit platform.
1118 (string-append "libdir := $(prefix)/lib\n"))))
1119 %standard-phases)
1120
1121 #:make-flags (list
1122 ;; By default the thing tries to use 'cc'.
1123 "CC=gcc"
1124
1125 ;; Make sure programs have an RPATH so they can find
1126 ;; libnuma.so.
1127 (string-append "LDLIBS=-Wl,-rpath="
1128 (assoc-ref %outputs "out") "/lib"))
1129
1130 ;; There's a 'test' target, but it requires NUMA support in the kernel
1131 ;; to run, which we can't assume to have.
1132 #:tests? #f))
1133 (home-page "http://oss.sgi.com/projects/libnuma/")
1134 (synopsis "Tools for non-uniform memory access (NUMA) machines")
1135 (description
1136 "NUMA stands for Non-Uniform Memory Access, in other words a system whose
1137memory is not all in one place. The numactl program allows you to run your
1138application program on specific CPU's and memory nodes. It does this by
1139supplying a NUMA memory policy to the operating system before running your
1140program.
1141
1142The package contains other commands, such as numademo, numastat and memhog.
1143The numademo command provides a quick overview of NUMA performance on your
1144system.")
1145 (license (list gpl2 ; programs
1146 lgpl2.1)))) ; library
b10e9ff6
LC
1147
1148(define-public kbd
1149 (package
1150 (name "kbd")
1151 (version "2.0.1")
1152 (source (origin
1153 (method url-fetch)
1154 (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
1155 version ".tar.gz"))
1156 (sha256
1157 (base32
c8f60748
LC
1158 "0c34b0za2v0934acvgnva0vaqpghmmhz4zh7k0m9jd4mbc91byqm"))
1159 (modules '((guix build utils)))
1160 (snippet
1161 '(substitute* "tests/Makefile.in"
1162 ;; The '%: %.in' rule incorrectly uses @VERSION@.
1163 (("@VERSION@")
1164 "[@]VERSION[@]")))))
b10e9ff6
LC
1165 (build-system gnu-build-system)
1166 (arguments
1167 '(#:phases (alist-cons-before
1168 'build 'pre-build
1169 (lambda* (#:key inputs #:allow-other-keys)
1170 (let ((gzip (assoc-ref %build-inputs "gzip"))
1171 (bzip2 (assoc-ref %build-inputs "bzip2")))
1172 (substitute* "src/libkeymap/findfile.c"
1173 (("gzip")
1174 (string-append gzip "/bin/gzip"))
1175 (("bzip2")
1176 (string-append bzip2 "/bin/bzip2")))))
1177 %standard-phases)))
1178 (inputs `(("check" ,check)
1179 ("gzip" ,guix:gzip)
1180 ("bzip2" ,guix:bzip2)
1181 ("pam" ,linux-pam)))
1182 (native-inputs `(("pkg-config" ,pkg-config)))
1183 (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
1184 (synopsis "Linux keyboard utilities and keyboard maps")
1185 (description
1186 "This package contains keytable files and keyboard utilities compatible
1187for systems using the Linux kernel. This includes commands such as
1188'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
1189 (license gpl2+)))
de0b620e
LC
1190
1191(define-public inotify-tools
1192 (package
1193 (name "inotify-tools")
1194 (version "3.13")
1195 (source (origin
1196 (method url-fetch)
1197 (uri (string-append
1198 "mirror://sourceforge/inotify-tools/inotify-tools/"
1199 version "/inotify-tools-" version ".tar.gz"))
1200 (sha256
1201 (base32
1202 "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6"))))
1203 (build-system gnu-build-system)
1204 (home-page "http://inotify-tools.sourceforge.net/")
1205 (synopsis "Monitor file accesses")
1206 (description
1207 "The inotify-tools packages provides a C library and command-line tools
1208to use Linux' inotify mechanism, which allows file accesses to be monitored.")
1209 (license gpl2+)))
e062d542
AE
1210
1211(define-public kmod
1212 (package
1213 (name "kmod")
1214 (version "17")
1215 (source (origin
1216 (method url-fetch)
1217 (uri
1218 (string-append "mirror://kernel.org/linux/utils/kernel/kmod/"
1219 "kmod-" version ".tar.xz"))
1220 (sha256
1221 (base32
528b6a3d
LC
1222 "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv"))
1223 (patches (list (search-patch "kmod-module-directory.patch")))))
e062d542
AE
1224 (build-system gnu-build-system)
1225 (native-inputs
1226 `(("pkg-config" ,pkg-config)))
1227 (inputs
1228 `(("xz" ,guix:xz)
1229 ("zlib" ,guix:zlib)))
1230 (arguments
1231 `(#:tests? #f ; FIXME: Investigate test failures
1232 #:configure-flags '("--with-xz" "--with-zlib")))
1233 (home-page "https://www.kernel.org/")
1234 (synopsis "Kernel module tools")
1235 (description "kmod is a set of tools to handle common tasks with Linux
1236kernel modules like insert, remove, list, check properties, resolve
1237dependencies and aliases.
1238
1239These tools are designed on top of libkmod, a library that is shipped with
1240kmod. The aim is to be compatible with tools, configurations and indices
1241from the module-init-tools project.")
1242 (license gpl2+))) ; library under lgpl2.1+
d7d42d6b
AE
1243
1244(define-public udev
1245 (package
1246 (name "udev")
1247 (version "182")
1248 (source (origin
1249 (method url-fetch)
1250 (uri (string-append
1251 "mirror://kernel.org/linux/utils/kernel/hotplug/udev-"
1252 version ".tar.xz"))
1253 (sha256
1254 (base32
1255 "1awp7p07gi083w0dwqhhbbas68a7fx2sbm1yf1ip2jwf7cpqkf5d"))
1256 (patches (list (search-patch "udev-gir-libtool.patch")))))
1257 (build-system gnu-build-system)
1258 (arguments
1259 `(#:configure-flags (list (string-append
1260 "--with-pci-ids-path="
1261 (assoc-ref %build-inputs "pciutils")
1262 "/share/pci.ids.gz")
1263
1264 "--with-firmware-path=/no/firmware"
1265
1266 ;; Work around undefined reference to
1267 ;; 'mq_getattr' in sc-daemon.c.
1268 "LDFLAGS=-lrt")))
1269 (native-inputs
1270 `(("pkg-config" ,pkg-config)
1271 ("gperf" ,gperf)
1272 ("perl" ,perl) ; for the tests
1273 ("python" ,python-2))) ; ditto
1274 (inputs
1275 `(("kmod" ,kmod)
1276 ("pciutils" ,pciutils)
1277 ("usbutils" ,usbutils)
1278 ("util-linux" ,util-linux)
1279 ("glib" ,glib)
1280 ("gobject-introspection" ,gobject-introspection)))
1281 (home-page "http://www.freedesktop.org/software/systemd/libudev/")
1282 (synopsis "Userspace device management")
1283 (description "Udev is a daemon which dynamically creates and removes
1284device nodes from /dev/, handles hotplug events and loads drivers at boot
1285time.")
1286 (license gpl2+))) ; libudev is under lgpl2.1+