gnu: bluez: Install the library and header files.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
index 972c589..62a19f5 100644 (file)
@@ -1,8 +1,10 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
+;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module ((guix licenses)
                 #:hide (zlib))
   #:use-module (gnu packages)
-  #:use-module ((gnu packages compression) #:prefix guix:)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages ncurses)
@@ -35,6 +38,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages slang)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages check)
   #:use-module (gnu packages maths)
-  #:use-module (gnu packages which)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages rrdtool)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages docbook)
+  #:use-module (gnu packages asciidoc)
+  #:use-module (gnu packages readline)
+  #:use-module (gnu packages calendar)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
@@ -85,7 +93,7 @@
          version "-gnu.tar.xz")))
 
 (define-public linux-libre-headers
-  (let* ((version "3.3.8")
+  (let* ((version "3.14.37")
          (build-phase
           (lambda (arch)
             `(lambda _
              (uri (linux-libre-urls version))
              (sha256
               (base32
-               "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
+               "1blxr2bsvfqi9khj4cpspv434bmx252zak2wsbi2mgl60zh77gza"))))
     (build-system gnu-build-system)
     (native-inputs `(("perl" ,perl)))
     (arguments
@@ -192,7 +200,7 @@ for SYSTEM, or #f if there is no configuration for SYSTEM."
      #f)))
 
 (define-public linux-libre
-  (let* ((version "3.18.3")
+  (let* ((version "4.0.4")
          (build-phase
           '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
              ;; Apply the neat patch.
@@ -265,7 +273,7 @@ for SYSTEM, or #f if there is no configuration for SYSTEM."
              (uri (linux-libre-urls version))
              (sha256
               (base32
-               "1qw8b4kc18s7qy314cm4mbg6hmyfpya10awxda78fa7g830pay8h"))))
+               "1czjhyczzaz1dvhy9lrlxlk6gf45wcw3rnpcmh697dxgf37clmzp"))))
     (build-system gnu-build-system)
     (native-inputs `(("perl" ,perl)
                      ("bc" ,bc)
@@ -300,7 +308,7 @@ It has been modified to remove all non-free binary blobs.")
     (license gpl2)
     (home-page "http://www.gnu.org/software/linux-libre/"))))
 
-\f
+
 ;;;
 ;;; Pluggable authentication modules (PAM).
 ;;;
@@ -346,7 +354,7 @@ be used through the PAM API to perform tasks, like authenticating a user
 at login.  Local and dynamic reconfiguration are its key features")
     (license bsd-3)))
 
-\f
+
 ;;;
 ;;; Miscellaneous.
 ;;;
@@ -377,41 +385,49 @@ providing the system administrator with some help in common tasks.")
 (define-public util-linux
   (package
     (name "util-linux")
-    (version "2.21")
+    (version "2.25.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://kernel.org/linux/utils/"
-                                  name "/v" version "/"
-                                  name "-" version ".2" ".tar.xz"))
+                                  name "/v" (version-major+minor version) "/"
+                                  name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))
-              (patches (list (search-patch "util-linux-perl.patch")))
+                "1miwwdq1zwvhf0smrxx3fjddq3mz22s8rc5cw54s7x3kbdqpyig0"))
+              (patches (list (search-patch "util-linux-tests.patch")))
               (modules '((guix build utils)))
               (snippet
-               ;; We take the 'logger' program from GNU Inetutils, so remove
-               ;; it from here.
-               '(substitute* "misc-utils/Makefile.in"
-                  (("PROGRAMS =(.*) logger(.*)" _ before after)
-                   (string-append "PROGRAMS =" before " " after))
-                  (("MANS =(.*) logger\\.1(.*)" _ before after)
-                   (string-append "MANS =" before " " after))))))
+               ;; We take the 'logger' program from GNU Inetutils and 'kill'
+               ;; from GNU Coreutils.
+               '(substitute* "configure"
+                  (("build_logger=yes") "build_logger=no")
+                  (("build_kill=yes") "build_kill=no")))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags '("--disable-use-tty-group"
-                           "--enable-ddate")
-       #:phases (alist-cons-after
-                 'install 'patch-chkdupexe
-                 (lambda* (#:key outputs #:allow-other-keys)
-                   (let ((out (assoc-ref outputs "out")))
-                     (substitute* (string-append out "/bin/chkdupexe")
-                       ;; Allow 'patch-shebang' to do its work.
-                       (("@PERL@") "/bin/perl"))))
+     `(#:configure-flags (list "--disable-use-tty-group"
+                               "--enable-ddate"
+
+                               ;; Install completions where our
+                               ;; bash-completion package expects them.
+                               (string-append "--with-bashcompletiondir="
+                                              (assoc-ref %outputs "out")
+                                              "/etc/bash_completion.d"))
+       #:phases (alist-cons-before
+                 'check 'pre-check
+                 (lambda* (#:key inputs outputs #:allow-other-keys)
+                   (let ((out (assoc-ref outputs "out"))
+                         (net (assoc-ref inputs "net-base")))
+                     ;; Change the test to refer to the right file.
+                     (substitute* "tests/ts/misc/mcookie"
+                       (("/etc/services")
+                        (string-append net "/etc/services")))
+                     #t))
                  %standard-phases)))
-    (inputs `(("zlib" ,guix:zlib)
+    (inputs `(("zlib" ,zlib)
               ("ncurses" ,ncurses)))
     (native-inputs
-     `(("perl" ,perl)))
+     `(("perl" ,perl)
+       ("net-base" ,net-base)))                   ;for tests
     (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
     (synopsis "Collection of utilities for the Linux kernel")
     (description
@@ -429,6 +445,8 @@ providing the system administrator with some help in common tasks.")
     (version "3.2.8")
     (source (origin
              (method url-fetch)
+             ;; A mirror://sourceforge URI doesn't work, presumably becuase
+             ;; the SourceForge project is misconfigured.
              (uri (string-append "http://procps.sourceforge.net/procps-"
                                  version ".tar.gz"))
              (sha256
@@ -438,7 +456,11 @@ providing the system administrator with some help in common tasks.")
     (build-system gnu-build-system)
     (inputs `(("ncurses" ,ncurses)))
     (arguments
-     '(#:phases (alist-replace
+     '(#:modules ((guix build utils)
+                  (guix build gnu-build-system)
+                  (srfi srfi-1)
+                  (srfi srfi-26))
+       #:phases (alist-replace
                  'configure
                  (lambda* (#:key outputs #:allow-other-keys)
                    ;; No `configure', just a single Makefile.
@@ -460,6 +482,13 @@ providing the system administrator with some help in common tasks.")
                             (system* "make" "install"
                                      (string-append "DESTDIR=" out)))
 
+                           ;; Remove commands and man pages redundant with
+                           ;; Coreutils.
+                           (let ((dup (append-map (cut find-files out <>)
+                                                  '("^kill" "^uptime"))))
+                             (for-each delete-file dup)
+                             #t)
+
                            ;; Sanity check.
                            (zero?
                             (system* (string-append out "/bin/ps")
@@ -504,14 +533,14 @@ slabtop, and skill.")
 (define-public e2fsprogs
   (package
     (name "e2fsprogs")
-    (version "1.42.7")
+    (version "1.42.12")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "0ibkkvp6kan0hn0d1anq4n2md70j5gcm7mwna515w82xwyr02rfw"))
+               "0v0qcfyls0dlrjy8gx9m3s2wbkp5z3lbsr5hb7x8kp8f3bclcy71"))
              (modules '((guix build utils)))
              (snippet
               '(substitute* "MCONFIG.in"
@@ -522,10 +551,12 @@ slabtop, and skill.")
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("texinfo" ,texinfo)))     ;for the libext2fs Info manual
     (arguments
-     '(;; The 'blkid' command and library are already provided by util-linux,
-       ;; which is the preferred source for them (see, e.g.,
+     '(;; util-linux is not the preferred source for some of the libraries and
+       ;; commands, so disable them (see, e.g.,
        ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b336339909c90559b7db40b455f172>.)
-       #:configure-flags '("--disable-blkid"
+       #:configure-flags '("--disable-libblkid"
+                           "--disable-libuuid" "--disable-uuidd"
+                           "--disable-fsck"
 
                            ;; Install libext2fs et al.
                            "--enable-elf-shlibs")
@@ -546,8 +577,21 @@ slabtop, and skill.")
                       (string-append "#!" (which "sh")))))
                  (alist-cons-after
                   'install 'install-libs
-                  (lambda _
-                    (zero? (system* "make" "install-libs")))
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let* ((out (assoc-ref outputs "out"))
+                           (lib (string-append out "/lib")))
+                      (and (zero? (system* "make" "install-libs"))
+
+                           ;; Make the .a writable so that 'strip' works.
+                           ;; Failing to do that, due to debug symbols, we
+                           ;; retain a reference to the final
+                           ;; linux-libre-headers, which refer to the
+                           ;; bootstrap binaries.
+                           (let ((archives (find-files lib "\\.a$")))
+                             (for-each (lambda (file)
+                                         (chmod file #o666))
+                                       archives)
+                             #t))))
                   %standard-phases))
 
        ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
@@ -661,6 +705,30 @@ images more compressible.")
 trace of all the system calls made by a another process/program.")
     (license bsd-3)))
 
+(define-public ltrace
+  (package
+    (name "ltrace")
+    (version "0.7.3")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "http://www.ltrace.org/ltrace_" version
+                                 ".orig.tar.bz2"))
+             (sha256
+              (base32
+               "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
+    (build-system gnu-build-system)
+    (inputs `(("libelf" ,libelf)))
+    (arguments
+     ;; Compilation uses -Werror by default, but it fails.
+     '(#:configure-flags '("--disable-werror")))
+    (home-page "http://www.ltrace.org/")
+    (synopsis "Library call tracer for Linux")
+    (description
+     "ltrace intercepts and records dynamic library calls which are called by
+an executed process and the signals received by that process.  It can also
+intercept and print the system calls executed by the program.")
+    (license gpl2+)))
+
 (define-public alsa-lib
   (package
     (name "alsa-lib")
@@ -740,7 +808,10 @@ MIDI functionality to the Linux-based operating system.")
               (base32
                "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
     (build-system gnu-build-system)
-    (arguments '(#:tests? #f))                    ; no test suite
+    (arguments
+     '(#:tests? #f       ; no test suite
+       #:configure-flags ; add $libdir to the RUNPATH of executables
+       (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))))
     (home-page "http://www.netfilter.org/projects/iptables/index.html")
     (synopsis "Program to configure the Linux IP packet filtering rules")
     (description
@@ -832,7 +903,11 @@ manpages.")
               (list (search-patch "net-tools-bitrot.patch")))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases (alist-cons-after
+     '(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1)
+                  (srfi srfi-26))
+       #:phases (alist-cons-after
                  'unpack 'patch
                  (lambda* (#:key inputs #:allow-other-keys)
                    (define (apply-patch file)
@@ -843,7 +918,6 @@ manpages.")
                      (format #t "applying Debian patch set '~a'...~%"
                              patch.gz)
                      (system (string-append "gunzip < " patch.gz " > the-patch"))
-                     (pk 'here)
                      (and (apply-patch "the-patch")
                           (for-each apply-patch
                                     (find-files "debian/patches"
@@ -858,11 +932,24 @@ manpages.")
                       ;; Pretend we have everything...
                       (system "yes | make config")
 
-                      ;; ... except we don't have libdnet, so remove that
-                      ;; definition.
+                      ;; ... except for the things we don't have.
+                      ;; HAVE_AFDECnet requires libdnet, which we don't have.
+                      ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers
+                      ;; that have been removed.
                       (substitute* '("config.make" "config.h")
-                        (("^.*HAVE_AFDECnet.*$") ""))))
-                  %standard-phases))
+                        (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR)[ =]1.*$") ""))))
+                  (alist-cons-after
+                   'install 'remove-redundant-commands
+                   (lambda* (#:key outputs #:allow-other-keys)
+                     ;; Remove commands and man pages redundant with
+                     ;; Inetutils.
+                     (let* ((out (assoc-ref outputs "out"))
+                            (dup (append-map (cut find-files out <>)
+                                             '("^hostname"
+                                               "^(yp|nis|dns)?domainname"))))
+                       (for-each delete-file dup)
+                       #t))
+                   %standard-phases)))
 
        ;; Binaries that depend on libnet-tools.a don't declare that
        ;; dependency, making it parallel-unsafe.
@@ -912,7 +999,15 @@ advanced aspects of IP configuration (iptunnel, ipmaddr).")
               (base32
                "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1"))))
     (build-system gnu-build-system)
-    (arguments '(#:phases (alist-delete 'configure %standard-phases)
+    (arguments '(#:phases
+                 (modify-phases %standard-phases
+                   (replace 'configure
+                            ;; Add $libdir to the RUNPATH of executables.
+                            (lambda _
+                              (substitute* "Make.Rules"
+                                (("LDFLAGS := #-g")
+                                 (string-append "LDFLAGS := -Wl,-rpath="
+                                                %output "/lib"))))))
                  #:tests? #f                      ; no 'check' target
                  #:make-flags (list "lib=lib"
                                     (string-append "prefix="
@@ -946,9 +1041,20 @@ Linux-based operating systems.")
     (native-inputs `(("autoconf" ,autoconf)
                      ("automake" ,automake)))
     (arguments
-     '(#:phases (alist-cons-before
-                 'configure 'bootstrap
+     '(#:phases (alist-cons-after
+                 'unpack 'bootstrap
                  (lambda _
+                   ;; Fix "field ‘ip6’ has incomplete type" errors.
+                   (substitute* "libbridge/libbridge.h"
+                     (("#include <linux/if_bridge.h>")
+                      "#include <linux/in6.h>\n#include <linux/if_bridge.h>"))
+
+                   ;; Ensure that the entire build fails if one of the
+                   ;; sub-Makefiles fails.
+                   (substitute* "Makefile.in"
+                     (("\\$\\(MAKE\\) \\$\\(MFLAGS\\) -C \\$\\$x ;")
+                      "$(MAKE) $(MFLAGS) -C $$x || exit 1;"))
+
                    (zero? (system* "autoreconf" "-vf")))
                  %standard-phases)
        #:tests? #f))                              ; no 'check' target
@@ -1033,7 +1139,7 @@ devices.  It replaces 'iwconfig', which is deprecated.")
     (build-system gnu-build-system)
     (inputs
      ;; TODO: Add pciutils.
-     `(("zlib" ,guix:zlib)
+     `(("zlib" ,zlib)
        ;; ("pciutils" ,pciutils)
        ("ncurses" ,ncurses)
        ("libnl" ,libnl)))
@@ -1106,7 +1212,8 @@ processes currently causing I/O.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb"))))
+                "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb"))
+              (patches (list (search-patch "fuse-CVE-2015-3202.patch")))))
     (build-system gnu-build-system)
     (inputs `(("util-linux" ,util-linux)))
     (arguments
@@ -1306,14 +1413,14 @@ system.")
 (define-public kbd
   (package
     (name "kbd")
-    (version "2.0.1")
+    (version "2.0.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
-                                  version ".tar.gz"))
+                                  version ".tar.xz"))
               (sha256
                (base32
-                "0c34b0za2v0934acvgnva0vaqpghmmhz4zh7k0m9jd4mbc91byqm"))
+                "04mrms12nm5sas0nxs94yrr3hz7gmqhnmfgb9ff34bh1jszxmzcx"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -1349,8 +1456,8 @@ system.")
                                 '("unicode_start" "unicode_stop"))))
                   %standard-phases))))
     (inputs `(("check" ,check)
-              ("gzip" ,guix:gzip)
-              ("bzip2" ,guix:bzip2)
+              ("gzip" ,gzip)
+              ("bzip2" ,bzip2)
               ("pam" ,linux-pam)))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (home-page "ftp://ftp.kernel.org/pub/linux/utils/kbd/")
@@ -1398,8 +1505,8 @@ to use Linux' inotify mechanism, which allows file accesses to be monitored.")
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("xz" ,guix:xz)
-       ("zlib" ,guix:zlib)))
+     `(("xz" ,xz)
+       ("zlib" ,zlib)))
     (arguments
      `(#:tests? #f ; FIXME: Investigate test failures
        #:configure-flags '("--with-xz" "--with-zlib")
@@ -1429,7 +1536,7 @@ from the module-init-tools project.")
   ;; The post-systemd fork, maintained by Gentoo.
   (package
     (name "eudev")
-    (version "1.10")
+    (version "2.1.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1437,7 +1544,7 @@ from the module-init-tools project.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "1l907bvz6dcykvaq8d4iklvfpb9fyrnh1a29g3c28gkx2hlyn7j0"))
+                "0shf5vqiz9fdxl95aa1a8vh0xjxwim3psc39wr2xr8lnahf11vva"))
               (patches (list (search-patch "eudev-rules-directory.patch")))
               (modules '((guix build utils)))
               (snippet
@@ -1474,7 +1581,18 @@ from the module-init-tools project.")
 
                                ;; Work around undefined reference to
                                ;; 'mq_getattr' in sc-daemon.c.
-                               "LDFLAGS=-lrt")))
+                               "LDFLAGS=-lrt")
+       #:phases
+       (alist-cons-before
+        'build 'pre-build
+        ;; The program 'g-ir-scanner' (part of the package
+        ;; 'gobject-introspection'), to generate .gir files, makes some
+        ;; library pre-processing.  During that phase it looks for the C
+        ;; compiler as either 'cc' or as defined by the environment variable
+        ;; 'CC' (with code in 'giscanner/dumper.py').
+        (lambda* _
+          (setenv "CC" "gcc"))
+        %standard-phases)))
     (home-page "http://www.gentoo.org/proj/en/eudev/")
     (synopsis "Userspace device management")
     (description "Udev is a daemon which dynamically creates and removes
@@ -1654,6 +1772,36 @@ you to access information from temperature, voltage, and fan speed sensors.
 It works with most newer systems.")
     (license gpl2+)))
 
+(define-public i2c-tools
+  (package
+    (name "i2c-tools")
+    (version "3.1.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-"
+                    version ".tar.bz2"))
+              (sha256
+               (base32
+                "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f  ; no 'check' target
+       #:make-flags (list (string-append "prefix=" %output)
+                          "CC=gcc")
+       ;; no configure script
+       #:phases (alist-delete 'configure %standard-phases)))
+    (inputs
+     `(("perl" ,perl)))
+    (home-page "http://www.lm-sensors.org/wiki/I2CTools")
+    (synopsis "I2C tools for Linux")
+    (description
+     "The i2c-tools package contains a heterogeneous set of I2C tools for
+Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
+EEPROM decoding scripts, EEPROM programming tools, and a python module for
+SMBus access.")
+    (license gpl2+)))
+
 (define-public xsensors
   (package
     (name "xsensors")
@@ -1706,7 +1854,11 @@ in a digital read-out.")
                  %standard-phases)
        #:make-flags (list (string-append "DESTDIR="
                                          (assoc-ref %outputs "out"))
-                          "WERROR=0")
+                          "WERROR=0"
+
+                          ;; By default, 'config/Makefile' uses lib64 on
+                          ;; x86_64.  Work around that.
+                          "lib=lib")
        #:tests? #f))                              ;no tests
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -1717,17 +1869,18 @@ in a digital read-out.")
        ("perl" ,perl)
        ("python" ,python-2)))
     (inputs
-     `(;; ("slang" ,slang)
+     `(("slang" ,slang)                        ;for the interactive TUI
        ;; ("newt" ,newt)
+       ("python" ,python-2)                    ;'perf' links against libpython
        ("elfutils" ,elfutils)
 
-       ;; FIXME: Documentation.
-       ;; ("libxslt" ,libxslt)
-       ;; ("docbook-xml" ,docbook-xml)
-       ;; ("docbook-xsl" ,docbook-xsl)
-       ;; ("xmlto" ,xmlto)
-       ;; ("asciidoc" ,asciidoc)
-       ))
+       ;; Documentation.
+       ("libxml2" ,libxml2)                       ;for $XML_CATALOG_FILES
+       ("libxslt" ,libxslt)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("xmlto" ,xmlto)
+       ("asciidoc" ,asciidoc)))
     (home-page "https://perf.wiki.kernel.org/")
     (synopsis "Linux profiling with performance counters")
     (description
@@ -1746,6 +1899,7 @@ particular the 'perf' command.")
               (method url-fetch)
               (uri (string-append "https://github.com/ghedo/pflask/archive/v"
                                   version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
                 "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
@@ -1760,3 +1914,312 @@ an isolated container, created with the help of Linux namespaces.  It is
 similar in functionality to chroot, although pflask provides better isolation
 thanks to the use of namespaces.")
     (license bsd-2)))
+
+(define-public hdparm
+  (package
+    (name "hdparm")
+    (version "9.45")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/" name "/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags (let ((out (assoc-ref %outputs "out")))
+                      (list (string-append "binprefix=" out)
+                            (string-append "manprefix=" out)
+                            "CC=gcc"))
+       #:phases (alist-delete 'configure %standard-phases)
+       #:tests? #f))  ; no test suite
+    (home-page "http://sourceforge.net/projects/hdparm/")
+    (synopsis "tune hard disk parameters for high performance")
+    (description
+     "Get/set device parameters for Linux SATA/IDE drives.  It's primary use
+is for enabling irq-unmasking and IDE multiplemode.")
+    (license (non-copyleft "file://LICENSE.TXT"))))
+
+(define-public acpid
+  (package
+    (name "acpid")
+    (version "2.0.23")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/acpid2/acpid-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
+    (build-system gnu-build-system)
+    (home-page "http://sourceforge.net/projects/acpid2/")
+    (synopsis "Daemon for delivering ACPI events to user-space programs")
+    (description
+     "acpid is designed to notify user-space programs of Advanced
+Configuration and Power Interface (ACPI) events.  acpid should be started
+during the system boot, and will run as a background process.  When an ACPI
+event is received from the kernel, acpid will examine the list of rules
+specified in /etc/acpi/events and execute the rules that match the event.")
+    (license gpl2+)))
+
+(define-public sysfsutils
+  (package
+    (name "sysfsutils")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
+         version ".tar.gz"))
+       (sha256
+        (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
+    (build-system gnu-build-system)
+    (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html")
+    (synopsis "System utilities based on Linux sysfs")
+    (description
+     "These are a set of utilites built upon sysfs, a virtual filesystem in
+Linux kernel versions 2.5+ that exposes a system's device tree.  The package
+also contains the libsysfs library.")
+    ;; The library is under lgpl2.1+ (all files say "or any later version").
+    ;; The rest is mostly gpl2, with a few files indicating gpl2+.
+    (license (list gpl2 gpl2+ lgpl2.1+))))
+
+(define-public sysfsutils-1
+  (package
+    (inherit sysfsutils)
+    (version "1.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
+         "/sysfsutils-" version ".tar.gz"))
+       (sha256
+        (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (substitute* "Makefile.in"
+             (("includedir = /usr/include/sysfs")
+              "includedir = @includedir@"))
+           (substitute* "configure"
+             (("includedir='(\\$\\{prefix\\}/include)'" all orig)
+              (string-append "includedir='" orig "/sysfs'")))))))
+    ;; XXX sysfsutils-1.3.0's config.guess fails on mips64el
+    (arguments `(#:configure-flags
+                 '(,@(if (%current-target-system)
+                         '()
+                         (let ((triplet
+                                (nix-system->gnu-triplet (%current-system))))
+                           (list (string-append "--build=" triplet)))))))
+    (synopsis "System utilities based on Linux sysfs (version 1.x)")))
+
+(define-public cpufrequtils
+  (package
+    (name "cpufrequtils")
+    (version "0.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-"
+         version ".tar.gz"))
+       (sha256
+        (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
+       (patches (list (search-patch "cpufrequtils-fix-aclocal.patch")))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("sysfsutils" ,sysfsutils-1)))
+    (arguments
+     '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
+                                         (assoc-ref %outputs "out") "/lib"))))
+    (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/")
+    (synopsis "Utilities to get and set CPU frequency on Linux")
+    (description
+     "The cpufrequtils suite contains utilities to retreive CPU frequency
+information, and set the CPU frequency if supported, using the cpufreq
+capabilities of the Linux kernel.")
+    (license gpl2)))
+
+(define-public libraw1394
+  (package
+    (name "libraw1394")
+    (version "2.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://kernel.org/linux/libs/ieee1394/"
+                    name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
+    (build-system gnu-build-system)
+    (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
+    (synopsis "Interface library for the Linux IEEE1394 drivers")
+    (description
+     "Libraw1394 is the only supported interface to the kernel side raw1394 of
+the Linux IEEE-1394 subsystem, which provides direct access to the connected
+1394 buses to user space.  Through libraw1394/raw1394, applications can directly
+send to and receive from other nodes without requiring a kernel driver for the
+protocol in question.")
+    (license lgpl2.1+)))
+
+(define-public libavc1394
+  (package
+    (name "libavc1394")
+    (version "0.5.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/libavc1394/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
+    (home-page "http://sourceforge.net/projects/libavc1394/")
+    (synopsis "AV/C protocol library for IEEE 1394")
+    (description
+     "Libavc1394 is a programming interface to the AV/C specification from
+the 1394 Trade Assocation.  AV/C stands for Audio/Video Control.")
+    (license lgpl2.1+)))
+
+(define-public libiec61883
+  (package
+    (name "libiec61883")
+    (version "1.2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://kernel.org/linux/libs/ieee1394/"
+                    name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "17ph458zya2l8dr2xwqnzy195qd9swrir31g78qkgb3g4xz2rq6i"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("libraw1394" ,libraw1394))) ; required by libiec61883.pc
+    (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
+    (synopsis "Isochronous streaming media library for IEEE 1394")
+    (description
+     "The libiec61883 library provides a higher level API for streaming DV,
+MPEG-2 and audio over Linux IEEE 1394.")
+    (license lgpl2.1+)))
+
+(define-public mdadm
+  (package
+    (name "mdadm")
+    (version "3.3.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
+                    version ".tar.xz"))
+              (sha256
+               (base32
+                "132vdvh3myjgcjn6i9w90ck16ddjxjcszklzkyvr4f5ifqd7wfhg"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("udev" ,eudev)))
+    (arguments
+     `(#:make-flags (let ((out (assoc-ref %outputs "out")))
+                      (list "INSTALL=install"
+                            "CHECK_RUN_DIR=0"
+                            ;; TODO: tell it where to find 'sendmail'
+                            ;; (string-append "MAILCMD=" <???> "/sbin/sendmail")
+                            (string-append "BINDIR=" out "/sbin")
+                            (string-append "MANDIR=" out "/share/man")
+                            (string-append "UDEVDIR=" out "/lib/udev")))
+       #:phases (alist-cons-before
+                 'build 'patch-program-paths
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (let ((coreutils (assoc-ref inputs "coreutils")))
+                     (substitute* "udev-md-raid-arrays.rules"
+                       (("/usr/bin/(readlink|basename)" all program)
+                        (string-append coreutils "/bin/" program)))))
+                 (alist-delete 'configure %standard-phases))
+       ;;tests must be done as root
+       #:tests? #f))
+    (home-page "http://neil.brown.name/blog/mdadm")
+    (synopsis "Tool for managing Linux Software RAID arrays")
+    (description
+     "mdadm is a tool for managing Linux Software RAID arrays.  It can create,
+assemble, report on, and monitor arrays.  It can also move spares between raid
+arrays when needed.")
+    (license gpl2+)))
+
+(define-public libaio
+  (package
+    (name "libaio")
+    (version "0.3.110")
+    (source (origin
+              (method url-fetch)
+             (uri (list
+                   (string-append "mirror://debian/pool/main/liba/libaio/"
+                                  name "_" version ".orig.tar.gz")
+                   (string-append "https://fedorahosted.org/releases/l/i/libaio/"
+                                  name "-" version ".tar.gz")))
+             (sha256
+              (base32
+               "0zjzfkwd1kdvq6zpawhzisv7qbq1ffs343i5fs9p498pcf7046g0"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:make-flags
+       (list "CC=gcc" (string-append "prefix=" %output))
+       #:test-target "partcheck" ; need root for a full 'check'
+       #:phases
+       (alist-delete 'configure %standard-phases))) ; no configure script
+    (home-page "http://lse.sourceforge.net/io/aio.html")
+    (synopsis "Linux-native asynchronous I/O access library")
+    (description
+     "This library enables userspace to use Linux kernel asynchronous I/O
+system calls, important for the performance of databases and other advanced
+applications.")
+    (license lgpl2.1+)))
+
+(define-public bluez
+  (package
+    (name "bluez")
+    (version "5.30")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://www.kernel.org/pub/linux/bluetooth/bluez-"
+                    version ".tar.xz"))
+              (sha256
+               (base32
+                "0b1qbnq1xzcdw5rajg9yyg31bf21jnff0n6gnf1snz89bbdllfhy"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:configure-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list "--enable-library"
+               "--disable-systemd"
+               ;; Install dbus/udev files to the correct location.
+               (string-append "--with-dbusconfdir=" out "/etc")
+               (string-append "--with-udevdir=" out "/lib/udev")))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("gettext" ,gnu-gettext)))
+    (inputs
+     `(("glib" ,glib)
+       ("dbus" ,dbus)
+       ("eudev" ,eudev)
+       ("libical" ,libical)
+       ("readline" ,readline)))
+    (home-page "http://www.bluez.org/")
+    (synopsis "Linux Bluetooth protocol stack")
+    (description
+     "BlueZ provides support for the core Bluetooth layers and protocols.  It
+is flexible, efficient and uses a modular implementation.")
+    (license gpl2+)))