gnu: fuse: Update to 2.9.6.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
index 4a0f61e..f1c4c73 100644 (file)
@@ -1,10 +1,18 @@
 ;;; 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 © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
+;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
+;;; Copyright © 2016 Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>
+;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
+;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
+;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,8 +30,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages linux)
-  #:use-module ((guix licenses)
-                #:hide (zlib))
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages docbook)
-  #:use-module (gnu packages asciidoc)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages readline)
+  #:use-module (gnu packages calendar)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages freedesktop)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
@@ -62,6 +73,8 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-2)
   #:use-module (srfi srfi-26)
   #:use-module (ice-9 match))
 
@@ -72,6 +85,7 @@
     (cond ((string=? arch "i686") "i386")
           ((string-prefix? "mips" arch) "mips")
           ((string-prefix? "arm" arch) "arm")
+          ((string-prefix? "aarch64" arch) "arm64")
           (else arch))))
 
 (define (linux-libre-urls version)
                (and (zero? (system* "make"
                                     (string-append "INSTALL_HDR_PATH=" out)
                                     "headers_install"))
-                    (mkdir (string-append out "/include/config"))
-                    (call-with-output-file
-                        (string-append out
-                                       "/include/config/kernel.release")
-                      (lambda (p)
-                        (format p "~a-default~%" ,version))))))))
+                    (begin
+                      (mkdir (string-append out "/include/config"))
+                      (call-with-output-file
+                          (string-append out
+                                         "/include/config/kernel.release")
+                        (lambda (p)
+                          (format p "~a-default~%" ,version)))
+
+                      ;; Remove the '.install' and '..install.cmd' files; the
+                      ;; latter contains store paths, which pulls in bootstrap
+                      ;; binaries in the build environment, and prevents bit
+                      ;; reproducibility for the bootstrap binaries.
+                      (for-each delete-file (find-files out "\\.install"))
+
+                      #t))))))
    (package
     (name "linux-libre-headers")
     (version version)
                  (alist-replace
                   'install ,install-phase
                   (alist-delete 'configure %standard-phases)))
+       #:allowed-references ()
        #:tests? #f))
     (synopsis "GNU Linux-Libre kernel headers")
     (description "Headers of the Linux-Libre kernel.")
-    (license gpl2)
+    (license license:gpl2)
     (home-page "http://www.gnu.org/software/linux-libre/"))))
 
 (define-public module-init-tools
              (sha256
               (base32
                "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
-             (patches
-              (list (search-patch "module-init-tools-moduledir.patch")))))
+             (patches (search-patches "module-init-tools-moduledir.patch"))))
     (build-system gnu-build-system)
     (arguments
      ;; FIXME: The upstream tarball lacks man pages, and building them would
     (description
      "Tools for loading and managing Linux kernel modules, such as `modprobe',
 `insmod', `lsmod', and more.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define %boot-logo-patch
   ;; Linux-Libre boot logo featuring Freedo and a gnu.
      (base32
       "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
 
-(define (kernel-config system)
+(define* (kernel-config system #:key variant)
   "Return the absolute file name of the Linux-Libre build configuration file
-for SYSTEM, or #f if there is no configuration for SYSTEM."
-  (define (lookup file)
-    (let ((file (string-append "gnu/packages/" file)))
-      (search-path %load-path file)))
-
-  (match system
-    ("i686-linux"
-     (lookup "linux-libre-i686.conf"))
-    ("x86_64-linux"
-     (lookup "linux-libre-x86_64.conf"))
-    (_
-     #f)))
+for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
+  (and-let* ((arch (match system
+                     ("i686-linux"
+                      "i686")
+                     ("x86_64-linux"
+                      "x86_64")
+                     (_
+                      #f)))
+             (name (string-append "linux-libre-"
+                                  (if variant
+                                      (string-append variant "-")
+                                      "")
+                                  arch
+                                  ".conf"))
+             (file (string-append "gnu/packages/" name)))
+    (search-path %load-path file)))
 
 (define-public linux-libre
-  (let* ((version "3.19.3")
+  (let* ((version "4.6")
          (build-phase
           '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
+             ;; Avoid introducing timestamps
+             (setenv "KCONFIG_NOTIMESTAMP" "1")
+             (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
+
              ;; Apply the neat patch.
              (system* "patch" "-p1" "--force"
                       "-i" (assoc-ref inputs "patch/freedo+gnu"))
@@ -208,6 +239,7 @@ for SYSTEM, or #f if there is no configuration for SYSTEM."
              (let ((arch (car (string-split system #\-))))
                (setenv "ARCH"
                        (cond ((string=? arch "i686") "i386")
+                             ((string=? arch "mips64el") "mips")
                              (else arch)))
                (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
 
@@ -254,7 +286,7 @@ for SYSTEM, or #f if there is no configuration for SYSTEM."
                (for-each (lambda (file)
                            (copy-file file
                                       (string-append out "/" (basename file))))
-                         (find-files "." "^(bzImage|System\\.map)$"))
+                         (find-files "." "^(bzImage|vmlinuz|System\\.map)$"))
                (copy-file ".config" (string-append out "/config"))
                (zero? (system* "make"
                                (string-append "DEPMOD=" mit "/sbin/depmod")
@@ -271,26 +303,22 @@ for SYSTEM, or #f if there is no configuration for SYSTEM."
              (uri (linux-libre-urls version))
              (sha256
               (base32
-               "13nq0wzkjy7hrhnnvxlwzs1awlqd81vzriqddjn6s9ma3fzj44bn"))
-             (patches
-              (list (search-patch "linux-libre-libreboot-fix.patch")
-                    (search-patch "linux-libre-vblank-fix.patch")))))
+               "1y1fyrmv34b01a35apkpha5xwvch17fz3kx2g1657x5jhpbnlwn3"))))
     (build-system gnu-build-system)
+    (supported-systems '("x86_64-linux" "i686-linux"))
     (native-inputs `(("perl" ,perl)
                      ("bc" ,bc)
+                     ("openssl" ,openssl)
                      ("module-init-tools" ,module-init-tools)
                      ("patch/freedo+gnu" ,%boot-logo-patch)
 
-                     ,@(let ((conf (kernel-config (or (%current-target-system)
-                                                      (%current-system)))))
+                     ,@(let ((conf (kernel-config
+                                    (or (%current-target-system)
+                                        (%current-system))
+                                    #:variant (version-major+minor version))))
                          (if conf
                              `(("kconfig" ,conf))
                              '()))))
-
-    ;; XXX: Work around an ICE with our patched GCC 4.8.3 while compiling
-    ;; 'drivers/staging/vt6656/michael.o': <http://hydra.gnu.org/build/96389/>.
-    (inputs `(("gcc" ,gcc-4.9)))
-
     (arguments
      `(#:modules ((guix build gnu-build-system)
                   (guix build utils)
@@ -306,9 +334,43 @@ for SYSTEM, or #f if there is no configuration for SYSTEM."
     (description
      "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel.
 It has been modified to remove all non-free binary blobs.")
-    (license gpl2)
+    (license license:gpl2)
     (home-page "http://www.gnu.org/software/linux-libre/"))))
 
+(define-public linux-libre-4.4
+  (package
+    (inherit linux-libre)
+    (version "4.4.11")
+    (source (origin
+              (method url-fetch)
+              (uri (linux-libre-urls version))
+              (sha256
+               (base32
+                "17pb9w72vigdrhm8hnkdyw9kwc2l06nabzygpdkwbvf7fg3j03vc"))))
+    (native-inputs
+     (let ((conf (kernel-config (or (%current-target-system)
+                                    (%current-system))
+                                #:variant "4.4")))
+       `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
+         ("kconfig" ,conf))))))
+
+(define-public linux-libre-4.1
+  (package
+    (inherit linux-libre)
+    (version "4.1.25")
+    (source (origin
+              (method url-fetch)
+              (uri (linux-libre-urls version))
+              (sha256
+               (base32
+                "1vpgcnmfnn005rcd60wyyg0f84fgapdmz2dpcy77p2l66mw4pakf"))))
+    (native-inputs
+     (let ((conf (kernel-config (or (%current-target-system)
+                                    (%current-system))
+                                #:variant "4.1")))
+       `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
+         ("kconfig" ,conf))))))
+
 \f
 ;;;
 ;;; Pluggable authentication modules (PAM).
@@ -317,7 +379,7 @@ It has been modified to remove all non-free binary blobs.")
 (define-public linux-pam
   (package
     (name "linux-pam")
-    (version "1.1.6")
+    (version "1.2.1")
     (source
      (origin
       (method url-fetch)
@@ -327,7 +389,7 @@ It has been modified to remove all non-free binary blobs.")
                                 version ".tar.bz2")))
       (sha256
        (base32
-        "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
+        "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("flex" ,flex)
@@ -352,10 +414,10 @@ It has been modified to remove all non-free binary blobs.")
      "A *Free* project to implement OSF's RFC 86.0.
 Pluggable authentication modules are small shared object files that can
 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)))
+at login.  Local and dynamic reconfiguration are its key features.")
+    (license license:bsd-3)))
+
 
-\f
 ;;;
 ;;; Miscellaneous.
 ;;;
@@ -381,12 +443,12 @@ at login.  Local and dynamic reconfiguration are its key features")
      "This PSmisc package is a set of some small useful utilities that
 use the proc filesystem.  We're not about changing the world, but
 providing the system administrator with some help in common tasks.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public util-linux
   (package
     (name "util-linux")
-    (version "2.25.2")
+    (version "2.27")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://kernel.org/linux/utils/"
@@ -394,36 +456,49 @@ providing the system administrator with some help in common tasks.")
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1miwwdq1zwvhf0smrxx3fjddq3mz22s8rc5cw54s7x3kbdqpyig0"))
-              (patches (list (search-patch "util-linux-tests.patch")))
+                "1ivdx1bhjbakf77agm9dn3wyxia1wgz9lzxgd61zqxw3xzih9gzw"))
+              (patches (search-patches "util-linux-tests.patch"))
               (modules '((guix build utils)))
               (snippet
                ;; 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")))))
+               '(begin
+                  (substitute* "configure"
+                    (("build_logger=yes") "build_logger=no")
+                    (("build_kill=yes") "build_kill=no"))
+                  #t))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags (list "--disable-use-tty-group"
-                               "--enable-ddate"
+
+                               ;; Do not build .a files to save 2 MiB.
+                               "--disable-static"
 
                                ;; 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)))
+       #:phases (modify-phases %standard-phases
+                  (add-before
+                   'build 'set-umount-file-name
+                   (lambda* (#:key outputs #:allow-other-keys)
+                     ;; Tell 'eject' the right file name of 'umount'.
+                     (let ((out (assoc-ref outputs "out")))
+                       (substitute* "sys-utils/eject.c"
+                         (("\"/bin/umount\"")
+                          (string-append "\"" out "/bin/umount\"")))
+                       #t)))
+                  (add-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))))))
     (inputs `(("zlib" ,zlib)
               ("ncurses" ,ncurses)))
     (native-inputs
@@ -431,81 +506,54 @@ providing the system administrator with some help in common tasks.")
        ("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
-     "Util-linux is a random collection of utilities for the Linux kernel.")
+    (description "Util-linux is a diverse collection of Linux kernel
+utilities.  It provides dmesg and includes tools for working with filesystems,
+block devices, UUIDs, TTYs, and many other tools.")
 
     ;; Note that util-linux doesn't use the same license for all the
     ;; code.  GPLv2+ is the default license for a code without an
     ;; explicitly defined license.
-    (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
-                   bsd-4 public-domain))))
+    (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+
+                   license:bsd-4 license:public-domain))))
 
 (define-public procps
   (package
     (name "procps")
-    (version "3.2.8")
+    (version "3.3.11")
     (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
-              (base32
-               "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))
-             (patches (list (search-patch "procps-make-3.82.patch")))))
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/procps-ng/Production/"
+                                  "procps-ng-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9"))))
     (build-system gnu-build-system)
-    (inputs `(("ncurses" ,ncurses)))
     (arguments
      '(#: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.
-                   (let ((out (assoc-ref outputs "out")))
-                     (substitute* "Makefile"
-                       (("/usr/") "/")
-                       (("--(owner|group) 0") "")
-                       (("ldconfig") "true")
-                       (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
-                        ;; Add libproc to the RPATH.
-                        (string-append "LDFLAGS := -Wl,-rpath="
-                                       out "/lib" value))))
-                   (setenv "CC" "gcc"))
-                 (alist-replace
-                  'install
-                  (lambda* (#:key outputs #:allow-other-keys)
-                    (let ((out (assoc-ref outputs "out")))
-                      (and (zero?
-                            (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")
-                                     "--version")))))
-                  %standard-phases))
-
-       ;; What did you expect?  Tests?
-       #:tests? #f))
-    (home-page "http://procps.sourceforge.net/")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after
+          'install 'post-install
+          ;; Remove commands and man pages redudant with
+          ;; Coreutils.
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let* ((out (assoc-ref outputs "out"))
+                   (dup (append-map (cut find-files out <>)
+                                    '("^kill" "^uptime"))))
+              (for-each delete-file dup)
+              #t))))))
+    (inputs `(("ncurses" ,ncurses)))
+    (home-page "https://gitlab.com/procps-ng/procps/")
     (synopsis "Utilities that give information about processes")
     (description
      "Procps is the package that has a bunch of small useful utilities
 that give information about processes using the Linux /proc file system.
 The package includes the programs ps, top, vmstat, w, kill, free,
 slabtop, and skill.")
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public usbutils
   (package
@@ -529,19 +577,21 @@ slabtop, and skill.")
      "Tools for working with USB devices, such as lsusb")
     (description
      "Tools for working with USB devices, such as lsusb.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public e2fsprogs
   (package
     (name "e2fsprogs")
-    (version "1.42.12")
+    (version "1.42.13")
     (source (origin
              (method url-fetch)
-             (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-"
-                                 version ".tar.gz"))
+             (uri (string-append
+                   "mirror://kernel.org/linux/kernel/people/tytso/"
+                   name "/v" version "/"
+                   name "-" version ".tar.xz"))
              (sha256
               (base32
-               "0v0qcfyls0dlrjy8gx9m3s2wbkp5z3lbsr5hb7x8kp8f3bclcy71"))
+               "1ix0b83zgw5n0p2grh2961c6796m92yr2jqc2sbr23x3lfsp8r71"))
              (modules '((guix build utils)))
              (snippet
               '(substitute* "MCONFIG.in"
@@ -552,9 +602,9 @@ slabtop, and skill.")
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("texinfo" ,texinfo)))     ;for the libext2fs Info manual
     (arguments
-     '(;; util-linux is not the preferred source for some of the libraries and
+     '(;; util-linux is the preferred source for some of the libraries and
        ;; commands, so disable them (see, e.g.,
-       ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b336339909c90559b7db40b455f172>.)
+       ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b33633>.)
        #:configure-flags '("--disable-libblkid"
                            "--disable-libuuid" "--disable-uuidd"
                            "--disable-fsck"
@@ -578,8 +628,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
@@ -590,9 +653,9 @@ slabtop, and skill.")
     (synopsis "Creating and checking ext2/ext3/ext4 file systems")
     (description
      "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
-    (license (list gpl2                           ; programs
-                   lgpl2.0                        ; libext2fs
-                   x11))))                        ; libuuid
+    (license (list license:gpl2                   ;programs
+                   license:lgpl2.0                ;libext2fs
+                   license:x11))))                ;libuuid
 
 (define e2fsprogs/static
   (static-package
@@ -638,6 +701,26 @@ from the e2fsprogs package.  It is meant to be used in initrds.")
     (home-page (package-home-page e2fsprogs))
     (license (package-license e2fsprogs))))
 
+(define-public extundelete
+  (package
+    (name "extundelete")
+    (version "0.2.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/extundelete/"
+                                  version "/extundelete-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
+    (build-system gnu-build-system)
+    (inputs `(("e2fsprogs" ,e2fsprogs)))
+    (home-page "http://extundelete.sourceforge.net/")
+    (synopsis "Recover deleted files from ext2/3/4 partitions")
+    (description
+     "Extundelete is a set of tools that can recover deleted files from an
+ext3 or ext4 partition.")
+    (license license:gpl2)))
+
 (define-public zerofree
   (package
     (name "zerofree")
@@ -671,7 +754,7 @@ from the e2fsprogs package.  It is meant to be used in initrds.")
      "The zerofree command scans the free blocks in an ext2 file system and
 fills any non-zero blocks with zeroes.  This is a useful way to make disk
 images more compressible.")
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public strace
   (package
@@ -691,7 +774,7 @@ images more compressible.")
     (description
      "strace is a system call tracer, i.e. a debugging tool which prints out a
 trace of all the system calls made by a another process/program.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public ltrace
   (package
@@ -715,7 +798,7 @@ trace of all the system calls made by a another process/program.")
      "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+)))
+    (license license:gpl2+)))
 
 (define-public alsa-lib
   (package
@@ -729,26 +812,26 @@ intercept and print the system calls executed by the program.")
              (sha256
               (base32
                "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))
-             (patches (list (search-patch "alsa-lib-mips-atomic-fix.patch")))))
+             (patches (search-patches "alsa-lib-mips-atomic-fix.patch"))))
     (build-system gnu-build-system)
     (home-page "http://www.alsa-project.org/")
     (synopsis "The Advanced Linux Sound Architecture libraries")
     (description
      "The Advanced Linux Sound Architecture (ALSA) provides audio and
 MIDI functionality to the Linux-based operating system.")
-    (license lgpl2.1+)))
+    (license license:lgpl2.1+)))
 
 (define-public alsa-utils
   (package
     (name "alsa-utils")
-    (version "1.0.27.2")
+    (version "1.1.0")
     (source (origin
              (method url-fetch)
-             (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-"
-                                 version ".tar.bz2"))
+             (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
+                                 name "-" version ".tar.bz2"))
              (sha256
               (base32
-               "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2"))))
+               "1wa88wvqcfhak9x3y65wzzwxmmyxb5bv2gyj7lnm653fnwsk271v"))))
     (build-system gnu-build-system)
     (arguments
      ;; XXX: Disable man page creation until we have DocBook.
@@ -781,7 +864,7 @@ MIDI functionality to the Linux-based operating system.")
 
     ;; This is mostly GPLv2+ but a few files such as 'alsactl.c' are
     ;; GPLv2-only.
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public iptables
   (package
@@ -809,20 +892,20 @@ system administrators.  Since Network Address Translation is also configured
 from the packet filter ruleset, iptables is used for this, too.  The iptables
 package also includes ip6tables.  ip6tables is used for configuring the IPv6
 packet filter.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public iproute
   (package
     (name "iproute2")
-    (version "3.12.0")
+    (version "4.4.0")
     (source (origin
-             (method url-fetch)
-             (uri (string-append
-                   "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
-                   version ".tar.xz"))
-             (sha256
-              (base32
-               "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4"))))
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
+                    version ".tar.xz"))
+              (sha256
+               (base32
+                "05351m4m0whsivlblvs3m0nz5q9v6r06ik80z27gf6ca51kw74dw"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                                ; no test suite
@@ -834,13 +917,12 @@ packet filter.")
                             (string-append "DOCDIR=" out "/share/doc/"
                                            ,name "-" ,version)
                             (string-append "MANDIR=" out "/share/man")))
-       #:phases (alist-cons-before
-                 'install 'pre-install
-                 (lambda _
-                   ;; Don't attempt to create /var/lib/arpd.
-                   (substitute* "Makefile"
-                     (("^.*ARPDDIR.*$") "")))
-                 %standard-phases)))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'install 'pre-install
+                    (lambda _
+                      ;; Don't attempt to create /var/lib/arpd.
+                      (substitute* "Makefile"
+                        (("^.*ARPDDIR.*$") "")))))))
     (inputs
      `(("iptables" ,iptables)
        ("db4" ,bdb)))
@@ -870,7 +952,7 @@ consists of several tools, of which the most important are ip and tc.  ip
 controls IPv4 and IPv6 configuration and tc stands for traffic control.  Both
 tools print detailed usage messages and are accompanied by a set of
 manpages.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public net-tools
   ;; XXX: This package is basically unmaintained, but it provides a few
@@ -879,16 +961,19 @@ manpages.")
   (package
     (name "net-tools")
     (version "1.60")
-    (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/")
+    (home-page "http://net-tools.sourceforge.net/")
     (source (origin
              (method url-fetch)
-             (uri (string-append home-page "/" name "-"
-                                 version ".tar.bz2"))
+             (uri (list (string-append
+                         "mirror://sourceforge/net-tools/net-tools-"
+                         version ".tar.bz2")
+                        (string-append
+                         "http://distro.ibiblio.org/rootlinux/rootlinux-ports"
+                         "/base/net-tools/net-tools-1.60.tar.bz2")))
              (sha256
               (base32
                "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
-             (patches
-              (list (search-patch "net-tools-bitrot.patch")))))
+             (patches (search-patches "net-tools-bitrot.patch"))))
     (build-system gnu-build-system)
     (arguments
      '(#:modules ((guix build gnu-build-system)
@@ -968,24 +1053,20 @@ subsystem of the Linux kernel.  This includes arp, hostname, ifconfig,
 netstat, rarp and route.  Additionally, this package contains utilities
 relating to particular network hardware types (plipconfig, slattach) and
 advanced aspects of IP configuration (iptunnel, ipmaddr).")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public libcap
   (package
     (name "libcap")
-    (version "2.22")
+    (version "2.24")
     (source (origin
              (method url-fetch)
-
-             ;; Tarballs used to be available from
-             ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/>
-             ;; but they never came back after kernel.org was compromised.
              (uri (string-append
-                   "mirror://debian/pool/main/libc/libcap2/libcap2_"
-                   version ".orig.tar.gz"))
+                   "mirror://kernel.org/linux/libs/security/linux-privs/"
+                   "libcap2/libcap-" version ".tar.xz"))
              (sha256
               (base32
-               "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1"))))
+               "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f"))))
     (build-system gnu-build-system)
     (arguments '(#:phases
                  (modify-phases %standard-phases
@@ -1010,7 +1091,7 @@ advanced aspects of IP configuration (iptunnel, ipmaddr).")
 Linux-based operating systems.")
 
     ;; License is BSD-3 or GPLv2, at the user's choice.
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public bridge-utils
   (package
@@ -1032,6 +1113,17 @@ Linux-based operating systems.")
      '(#: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
@@ -1045,7 +1137,7 @@ to connect two Ethernet segments together in a protocol independent way.
 Packets are forwarded based on Ethernet address, rather than IP address (like
 a router).  Since forwarding is done at Layer 2, all protocols can go
 transparently through a bridge.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public libnl
   (package
@@ -1065,27 +1157,27 @@ transparently through a bridge.")
     (synopsis "NetLink protocol library suite")
     (description
      "The libnl suite is a collection of libraries providing APIs to netlink
-protocol based Linux kernel interfaces.  Netlink is an IPC mechanism primarly
+protocol based Linux kernel interfaces.  Netlink is an IPC mechanism primarily
 between the kernel and user space processes.  It was designed to be a more
 flexible successor to ioctl to provide mainly networking related kernel
 configuration and monitoring interfaces.")
 
     ;; Most files are LGPLv2.1-only, but some are GPLv2-only (like
     ;; 'nl-addr-add.c'), so the result is GPLv2-only.
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public iw
   (package
     (name "iw")
-    (version "3.17")
+    (version "4.3")
     (source (origin
               (method url-fetch)
               (uri (string-append
-                    "https://www.kernel.org/pub/software/network/iw/iw-"
+                    "mirror://kernel.org/software/network/iw/iw-"
                     version ".tar.xz"))
               (sha256
                (base32
-                "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8"))))
+                "085jyvrxzarvn5jl0fk618jjxy50nqx7ifngszc4jxk6a4ddibd6"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("libnl" ,libnl)))
@@ -1093,35 +1185,54 @@ configuration and monitoring interfaces.")
      `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
                           "CC=gcc")
        #:phases (alist-delete 'configure %standard-phases)))
-    (home-page "http://wireless.kernel.org/en/users/Documentation/iw")
+    (home-page "https://wireless.wiki.kernel.org/")
     (synopsis "Tool for configuring wireless devices")
     (description
      "iw is a new nl80211 based CLI configuration utility for wireless
-devices.  It replaces 'iwconfig', which is deprecated.")
-    (license isc)))
+devices.  It replaces @code{iwconfig}, which is deprecated.")
+    (license license:isc)))
 
 (define-public powertop
   (package
     (name "powertop")
-    (version "2.5")
+    (version "2.8")
     (source
      (origin
        (method url-fetch)
        (uri (string-append
-             "https://01.org/powertop/sites/default/files/downloads/powertop-"
+             "https://01.org/sites/default/files/downloads/powertop/powertop-"
              version ".tar.gz"))
        (sha256
         (base32
-         "02rwqbpasdayl201v0549gbp2f82rd0hqiv3i111r7npanjhhb4b"))))
+         "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
     (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
+         ;; allow calibrating the network interface in GuixSD.
+         (add-after 'unpack 'patch-absolute-file-names
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((kmod (assoc-ref inputs "kmod")))
+               (substitute* (find-files "src" "\\.cpp$")
+                 ;; Give the right 'modprobe' file name so that essential
+                 ;; modules such as msr.ko can be loaded.
+                 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
+                 ;; These programs are only needed to calibrate, so using
+                 ;; relative file names avoids adding extra inputs.  When they
+                 ;; are missing powertop gracefully handles it.
+                 (("/usr/bin/hcitool") "hcitool")
+                 (("/usr/bin/xset") "xset")
+                 (("/usr/sbin/hciconfig") "hciconfig"))
+               #t))))))
     (inputs
-     ;; TODO: Add pciutils.
-     `(("zlib" ,zlib)
-       ;; ("pciutils" ,pciutils)
+     `(("kmod" ,kmod)
+       ("libnl" ,libnl)
        ("ncurses" ,ncurses)
-       ("libnl" ,libnl)))
+       ("pciutils" ,pciutils)
+       ("zlib" ,zlib)))
     (native-inputs
-       `(("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)))
     (home-page "https://01.org/powertop/")
     (synopsis "Analyze power consumption on Intel-based laptops")
     (description
@@ -1130,7 +1241,7 @@ power management.  In addition to being a diagnostic tool, PowerTOP also has
 an interactive mode where the user can experiment various power management
 settings for cases where the operating system has not enabled these
 settings.")
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public aumix
   (package
@@ -1151,7 +1262,7 @@ settings.")
     (description
      "Aumix adjusts an audio mixer from X, the console, a terminal,
 the command line or a script.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public iotop
   (package
@@ -1177,19 +1288,20 @@ the command line or a script.")
     (description
      "Iotop is a Python program with a top like user interface to show the
 processes currently causing I/O.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public fuse
   (package
     (name "fuse")
-    (version "2.9.3")
+    (version "2.9.6")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://sourceforge/fuse/fuse-"
-                                  version ".tar.gz"))
+              (uri (string-append "https://github.com/libfuse/libfuse/releases/"
+                                  "download/fuse-" version
+                                  "/fuse-" version ".tar.gz"))
               (sha256
                (base32
-                "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb"))))
+                "0szi2vlsjxg03y4ji51jks34p269jqj5ify6l0ajsqq6f6y8pd0c"))))
     (build-system gnu-build-system)
     (inputs `(("util-linux" ,util-linux)))
     (arguments
@@ -1225,7 +1337,7 @@ processes currently causing I/O.")
                     (("-DFUSERMOUNT_DIR=[[:graph:]]+")
                      "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")))
                 %standard-phases)))
-    (home-page "http://fuse.sourceforge.net/")
+    (home-page "https://github.com/libfuse/libfuse")
     (synopsis "Support file systems implemented in user space")
     (description
      "As a consequence of its monolithic design, file system code for Linux
@@ -1234,8 +1346,8 @@ but also an impediment to system extensibility.  FUSE, for \"file systems in
 user space\", is a kernel module and user-space library that tries to address
 part of this problem by allowing users to run file system implementations as
 user-space processes.")
-    (license (list lgpl2.1                        ; library
-                   gpl2+))))                      ; command-line utilities
+    (license (list license:lgpl2.1                ;library
+                   license:gpl2+))))              ;command-line utilities
 
 (define-public unionfs-fuse
   (package
@@ -1259,7 +1371,7 @@ user-space processes.")
 space, using the FUSE library.  Mounting a union file system allows you to
 \"aggregate\" the contents of several directories into a single mount point.
 UnionFS-FUSE additionally supports copy-on-write.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define fuse-static
   (package (inherit fuse)
@@ -1310,8 +1422,11 @@ UnionFS-FUSE additionally supports copy-on-write.")
     (version "2.5")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://sourceforge/fuse/sshfs-fuse-"
-                                  version ".tar.gz"))
+              (uri (let ((version-with-underscores
+                          (string-join (string-split version #\.) "_")))
+                     (string-append "https://github.com/libfuse/sshfs/releases/"
+                                    "download/sshfs_" version-with-underscores
+                                    "/sshfs-fuse-" version ".tar.gz")))
               (sha256
                (base32
                 "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"))))
@@ -1328,12 +1443,12 @@ UnionFS-FUSE additionally supports copy-on-write.")
 Since most SSH servers already support this protocol it is very easy to set
 up: on the server side there's nothing to do; on the client side mounting the
 file system is as easy as logging into the server with an SSH client.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public numactl
   (package
     (name "numactl")
-    (version "2.0.9")
+    (version "2.0.11")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1342,35 +1457,16 @@ file system is as easy as logging into the server with an SSH client.")
                     ".tar.gz"))
               (sha256
                (base32
-                "073myxlyyhgxh1w3r757ajixb7s2k69czc3r0g12c3scq7k3784w"))))
+                "0qbqa9gac2vlahrngi553hws2mqgqdwv2lc69a3yx4gq6l90j325"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases (alist-replace
-                 'configure
-                 (lambda* (#:key outputs #:allow-other-keys)
-                   ;; There's no 'configure' script, just a raw makefile.
-                   (substitute* "Makefile"
-                     (("^prefix := .*$")
-                      (string-append "prefix := " (assoc-ref outputs "out")
-                                     "\n"))
-                     (("^libdir := .*$")
-                      ;; By default the thing tries to install under
-                      ;; $prefix/lib64 when on a 64-bit platform.
-                      (string-append "libdir := $(prefix)/lib\n"))))
-                 %standard-phases)
-
-       #:make-flags (list
-                     ;; By default the thing tries to use 'cc'.
-                     "CC=gcc"
-
-                     ;; Make sure programs have an RPATH so they can find
-                     ;; libnuma.so.
-                     (string-append "LDLIBS=-Wl,-rpath="
-                                    (assoc-ref %outputs "out") "/lib"))
-
-       ;; There's a 'test' target, but it requires NUMA support in the kernel
+     '(;; There's a 'test' target, but it requires NUMA support in the kernel
        ;; to run, which we can't assume to have.
        #:tests? #f))
+
+    ;; NUMA is apparently not supported on armhf, see
+    ;; http://www.spinics.net/lists/linux-numa/msg01157.html
+    (supported-systems (delete "armhf-linux" %supported-systems))
     (home-page "http://oss.sgi.com/projects/libnuma/")
     (synopsis "Tools for non-uniform memory access (NUMA) machines")
     (description
@@ -1383,20 +1479,20 @@ program.
 The package contains other commands, such as numademo, numastat and memhog.
 The numademo command provides a quick overview of NUMA performance on your
 system.")
-    (license (list gpl2                           ; programs
-                   lgpl2.1))))                    ; library
+    (license (list license:gpl2                   ;programs
+                   license:lgpl2.1))))            ;library
 
 (define-public kbd
   (package
     (name "kbd")
-    (version "2.0.2")
+    (version "2.0.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://kernel.org/linux/utils/kbd/kbd-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "04mrms12nm5sas0nxs94yrr3hz7gmqhnmfgb9ff34bh1jszxmzcx"))
+                "0ppv953gn2zylcagr4z6zg5y2x93dxrml29plypg6xgbq3hrv2bs"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -1410,27 +1506,26 @@ system.")
                      "tty"))))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases (alist-cons-before
-                 'build 'pre-build
-                 (lambda* (#:key inputs #:allow-other-keys)
-                   (let ((gzip  (assoc-ref %build-inputs "gzip"))
-                         (bzip2 (assoc-ref %build-inputs "bzip2")))
-                     (substitute* "src/libkeymap/findfile.c"
-                       (("gzip")
-                        (string-append gzip "/bin/gzip"))
-                       (("bzip2")
-                        (string-append bzip2 "/bin/bzip2")))))
-                 (alist-cons-after
-                  'install 'post-install
-                  (lambda* (#:key outputs #:allow-other-keys)
-                    ;; Make sure these programs find their comrades.
-                    (let* ((out (assoc-ref outputs "out"))
-                           (bin (string-append out "/bin")))
-                      (for-each (lambda (prog)
-                                  (wrap-program (string-append bin "/" prog)
-                                                `("PATH" ":" prefix (,bin))))
-                                '("unicode_start" "unicode_stop"))))
-                  %standard-phases))))
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'pre-build
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gzip  (assoc-ref %build-inputs "gzip"))
+                   (bzip2 (assoc-ref %build-inputs "bzip2")))
+               (substitute* "src/libkeymap/findfile.c"
+                 (("gzip")
+                  (string-append gzip "/bin/gzip"))
+                 (("bzip2")
+                  (string-append bzip2 "/bin/bzip2"))))))
+         (add-after 'install 'post-install
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Make sure these programs find their comrades.
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (for-each (lambda (prog)
+                           (wrap-program (string-append bin "/" prog)
+                             `("PATH" ":" prefix (,bin))))
+                         '("unicode_start" "unicode_stop"))))))))
     (inputs `(("check" ,check)
               ("gzip" ,gzip)
               ("bzip2" ,bzip2)
@@ -1442,7 +1537,7 @@ system.")
      "This package contains keytable files and keyboard utilities compatible
 for systems using the Linux kernel.  This includes commands such as
 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public inotify-tools
   (package
@@ -1462,7 +1557,7 @@ for systems using the Linux kernel.  This includes commands such as
     (description
      "The inotify-tools packages provides a C library and command-line tools
 to use Linux' inotify mechanism, which allows file accesses to be monitored.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public kmod
   (package
@@ -1476,7 +1571,7 @@ to use Linux' inotify mechanism, which allows file accesses to be monitored.")
               (sha256
                (base32
                 "1yid3a9b64a60ybj66fk2ysrq5klnl0ijl4g624cl16y8404g9rv"))
-              (patches (list (search-patch "kmod-module-directory.patch")))))
+              (patches (search-patches "kmod-module-directory.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -1506,13 +1601,13 @@ dependencies and aliases.
 These tools are designed on top of libkmod, a library that is shipped with
 kmod.  The aim is to be compatible with tools, configurations and indices
 from the module-init-tools project.")
-    (license gpl2+))) ; library under lgpl2.1+
+    (license license:gpl2+))) ; library under lgpl2.1+
 
 (define-public eudev
   ;; The post-systemd fork, maintained by Gentoo.
   (package
     (name "eudev")
-    (version "2.1.1")
+    (version "3.1.5")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1520,61 +1615,25 @@ from the module-init-tools project.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "0shf5vqiz9fdxl95aa1a8vh0xjxwim3psc39wr2xr8lnahf11vva"))
-              (patches (list (search-patch "eudev-rules-directory.patch")))
-              (modules '((guix build utils)))
-              (snippet
-               ;; 'configure' checks uses <linux/btrfs.h> as an indication of
-               ;; whether Linux headers are available, but it doesn't actually
-               ;; use it, and our 'linux-libre-headers' package doesn't
-               ;; provide it.  So just remove that.
-               '(substitute* "configure"
-                  (("linux/btrfs\\.h")
-                   "")))))
+                "0akg9gcc3c2p56xbhlvbybqavcprly5q0bvk655zwl6d62j8an7p"))
+              (patches (search-patches "eudev-rules-directory.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("gperf" ,gperf)
-       ("glib" ,glib "bin")                       ; glib-genmarshal, etc.
-       ("perl" ,perl)                             ; for the tests
-       ("python" ,python-2)))                     ; ditto
+       ("perl" ,perl)
+       ("gperf" ,gperf)))
     (inputs
-     `(("kmod" ,kmod)
-       ("pciutils" ,pciutils)
-       ("usbutils" ,usbutils)
-       ("util-linux" ,util-linux)
-       ("glib" ,glib)
-       ("gobject-introspection" ,gobject-introspection)))
-    (arguments
-     `(#:configure-flags (list "--enable-libkmod"
-
-                               (string-append
-                                "--with-pci-ids-path="
-                                (assoc-ref %build-inputs "pciutils")
-                                "/share/pci.ids.gz")
-
-                               "--with-firmware-path=/no/firmware"
-
-                               ;; Work around undefined reference to
-                               ;; 'mq_getattr' in sc-daemon.c.
-                               "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/")
+     ;; When linked against libblkid, eudev can populate /dev/disk/by-label
+     ;; and similar; it also installs the '60-persistent-storage.rules' file,
+     ;; which contains the rules to do that.
+     `(("util-linux" ,util-linux)                 ;for blkid
+       ("kmod" ,kmod)))
+    (home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
     (synopsis "Userspace device management")
     (description "Udev is a daemon which dynamically creates and removes
 device nodes from /dev/, handles hotplug events and loads drivers at boot
 time.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public lvm2
   (package
@@ -1639,7 +1698,7 @@ mapper.  Kernel components are part of Linux-libre.")
 
     ;; Libraries (liblvm2, libdevmapper) are LGPLv2.1.
     ;; Command-line tools are GPLv2.
-    (license (list gpl2 lgpl2.1))))
+    (license (list license:gpl2 license:lgpl2.1))))
 
 (define-public wireless-tools
   (package
@@ -1652,19 +1711,22 @@ mapper.  Kernel components are part of Linux-libre.")
               (sha256
                (base32
                 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
-              (modules '((guix build utils)))
               (snippet
-               ;; Install the manual pages in the right place.
-               '(substitute* "Makefile"
-                  (("INSTALL_MAN= .*")
-                   "INSTALL_MAN= $(PREFIX)/share/man")))))
+               '(begin
+                  ;; Remove the older header files that are not free software.
+                  (for-each (lambda (n)
+                              (delete-file (format #f "wireless.~a.h" n)))
+                            '(10 11 12 13 14 15 16 17 18 19 20))
+                  #t))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases (alist-replace
-                 'configure
-                 (lambda* (#:key outputs #:allow-other-keys)
-                   (setenv "PREFIX" (assoc-ref outputs "out")))
-                 %standard-phases)
+     `(#:make-flags
+       (list (string-append "PREFIX=" %output)
+             (string-append "INSTALL_MAN=" %output "/share/man")
+             (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
+             "BUILD_STATIC=")
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure))
        #:tests? #f))
     (synopsis "Tools for manipulating Linux Wireless Extensions")
     (description "Wireless Tools are used to manipulate the now-deprecated
@@ -1673,7 +1735,126 @@ Extension was an interface allowing you to set Wireless LAN specific
 parameters and get the specific stats.  It is deprecated in favor the nl80211
 interface.")
     (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
-    (license gpl2+)))
+    ;; wireless.21.h and wireless.22.h are distributed under lgpl2.1+, the
+    ;; other files are distributed under gpl2.
+    (license (list license:gpl2 license:lgpl2.1+))))
+
+(define-public crda
+  (package
+    (name "crda")
+    (version "3.18")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://kernel.org/software/network/crda/"
+                                  "crda-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
+              (patches (search-patches "crda-optional-gcrypt.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (add-before
+                   'build 'no-werror-no-ldconfig
+                   (lambda _
+                     (substitute* "Makefile"
+                       (("-Werror")  "")
+                       (("ldconfig") "true"))
+                     #t))
+                  (add-before
+                   'build 'set-regulator-db-file-name
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     ;; Tell CRDA where to find our database.
+                     (let ((regdb (assoc-ref inputs "wireless-regdb")))
+                       (substitute* "crda.c"
+                         (("\"/lib/crda/regulatory.bin\"")
+                          (string-append "\"" regdb
+                                         "/lib/crda/regulatory.bin\"")))
+                       #t))))
+       #:test-target "verify"
+       #:make-flags (let ((out   (assoc-ref %outputs "out"))
+                          (regdb (assoc-ref %build-inputs "wireless-regdb")))
+                      (list "CC=gcc" "V=1"
+
+                            ;; Disable signature-checking on 'regulatory.bin'.
+                            ;; The reason is that this simplifies maintenance
+                            ;; on our side (no need to manage a distro key
+                            ;; pair), and we can guarantee integrity of
+                            ;; 'regulatory.bin' by other means anyway, such as
+                            ;; 'guix gc --verify'.  See
+                            ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
+                            ;; for a discssion.
+                            "USE_OPENSSL=0"
+
+                            (string-append "PREFIX=" out)
+                            (string-append "SBINDIR=" out "/sbin/")
+                            (string-append "UDEV_RULE_DIR="
+                                           out "/lib/udev/rules.d")
+                            (string-append "LDFLAGS=-Wl,-rpath="
+                                           out "/lib -L.")
+                            (string-append "REG_BIN=" regdb
+                                           "/lib/crda/regulatory.bin")))))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("python" ,python-2)
+                     ("wireless-regdb" ,wireless-regdb)))
+    (inputs `(("libnl" ,libnl)))
+    (home-page
+     "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
+    (synopsis "Central regulatory domain agent (CRDA) for WiFi")
+    (description
+     "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
+communication between the kernel Linux and user space for regulatory
+compliance.")
+    (license license:copyleft-next)))
+
+(define-public wireless-regdb
+  (package
+    (name "wireless-regdb")
+    (version "2016.05.02")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://kernel.org/software/network/wireless-regdb/"
+                    "wireless-regdb-" version ".tar.xz"))
+              (sha256
+               (base32
+                "07n6gcwfbddz3awbdflv3dhxjszsqq2lrdwih0a0ahcliac4qry9"))
+
+              ;; We're building 'regulatory.bin' by ourselves.
+              (snippet '(delete-file "regulatory.bin"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (delete 'configure))
+
+       ;; The 'all' target of the makefile depends on $(REGDB_CHANGED), which
+       ;; is computed and can be equal to 'maintainer-clean'; when that
+       ;; happens, we can end up deleting the 'regulatory.bin' file that we
+       ;; just built.  Thus, build things sequentially.
+       #:parallel-build? #f
+
+       #:tests? #f                                ;no tests
+       #:make-flags (let ((out (assoc-ref %outputs "out")))
+                      (list (string-append "PREFIX=" out)
+                            (string-append "LSB_ID=GuixSD")
+                            (string-append "DISTRO_PUBKEY=/dev/null")
+                            (string-append "DISTRO_PRIVKEY=/dev/null")
+                            (string-append "REGDB_PUBKEY=/dev/null")
+
+                            ;; Leave that empty so that db2bin.py doesn't try
+                            ;; to sign 'regulatory.bin'.  This allows us to
+                            ;; avoid managing a key pair for the whole distro.
+                            (string-append "REGDB_PRIVKEY=")))))
+    (native-inputs `(("python" ,python-2)))
+    (home-page
+     "https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb")
+    (synopsis "Wireless regulatory database")
+    (description
+     "This package contains the wireless regulatory database Central
+Regulatory Database Agent (CRDA) daemon.  The database contains information on
+country-specific regulations for the wireless spectrum.")
+    (license license:isc)))
 
 (define-public lm-sensors
   (package
@@ -1682,12 +1863,12 @@ interface.")
     (source (origin
               (method url-fetch)
               (uri (string-append
-                    "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-"
+                    "ftp://ftp.netroedge.com/pub/lm-sensors/lm_sensors-"
                     version ".tar.bz2"))
               (sha256
                (base32
                 "1ksgrynxgrq590nb2fwxrl1gwzisjkqlyg3ljfd1al0ibrk6mbjx"))
-              (patches (list (search-patch "lm-sensors-hwmon-attrs.patch")))))
+              (patches (search-patches "lm-sensors-hwmon-attrs.patch"))))
     (build-system gnu-build-system)
     (inputs `(("rrdtool" ,rrdtool)
               ("perl" ,perl)
@@ -1740,13 +1921,13 @@ interface.")
               (string-append (assoc-ref inputs "coreutils")
                              "/bin/readlink -f"))))
          %standard-phases))))
-    (home-page "http://www.lm-sensors.org/")
+    (home-page "http://jdelvare.nerim.net/devel.html#lmsensors")
     (synopsis "Utilities to read temperature/voltage/fan sensors")
     (description
      "Lm-sensors is a hardware health monitoring package for Linux.  It allows
 you to access information from temperature, voltage, and fan speed sensors.
 It works with most newer systems.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public i2c-tools
   (package
@@ -1755,7 +1936,7 @@ It works with most newer systems.")
     (source (origin
               (method url-fetch)
               (uri (string-append
-                    "http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-"
+                    "http://jdelvare.nerim.net/mirror/i2c-tools/i2c-tools-"
                     version ".tar.bz2"))
               (sha256
                (base32
@@ -1769,14 +1950,14 @@ It works with most newer systems.")
        #:phases (alist-delete 'configure %standard-phases)))
     (inputs
      `(("perl" ,perl)))
-    (home-page "http://www.lm-sensors.org/wiki/I2CTools")
+    (home-page "http://jdelvare.nerim.net/devel.html#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+)))
+    (license license:gpl2+)))
 
 (define-public xsensors
   (package
@@ -1813,7 +1994,7 @@ SMBus access.")
      "Xsensors reads data from the libsensors library regarding hardware
 health such as temperature, voltage and fan speed and displays the information
 in a digital read-out.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public perf
   (package
@@ -1889,7 +2070,7 @@ containers.  It can be used for running a command or even booting an OS inside
 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)))
+    (license license:bsd-2)))
 
 (define-public hdparm
   (package
@@ -1911,11 +2092,58 @@ thanks to the use of namespaces.")
        #: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")
+    (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"))))
+is for enabling irq-unmasking and IDE multiple-mode.")
+    (license (license:non-copyleft "file://LICENSE.TXT"))))
+
+(define-public rfkill
+  (package
+    (name "rfkill")
+    (version "0.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://kernel.org/software/network/"
+                                  name "/" name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0snqj5h0y991lszbigbyyqb8swj0hxajc1vfqg2scfay44231bp0"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags (list "CC=gcc"
+                          (string-append "PREFIX=" %output))
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure))
+       #:tests? #f))
+    (home-page "https://wireless.wiki.kernel.org/en/users/Documentation/rfkill")
+    (synopsis "Tool for enabling and disabling wireless devices")
+    (description
+     "rfkill is a simple tool for accessing the rfkill device interface,
+which is used to enable and disable wireless networking devices, typically
+WLAN, Bluetooth and mobile broadband.")
+    (license (license:non-copyleft "file://COPYING"
+                                   "See COPYING in the distribution."))))
+
+(define-public acpi
+  (package
+    (name "acpi")
+    (version "1.7")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/acpiclient/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
+    (build-system gnu-build-system)
+    (home-page "http://acpiclient.sourceforge.net")
+    (synopsis "Display information on ACPI devices")
+    (description "@code{acpi} attempts to replicate the functionality of the
+\"old\" @code{apm} command on ACPI systems, including battery and thermal
+information.  It does not support ACPI suspending, only displays information
+about ACPI devices.")
+    (license license:gpl2+)))
 
 (define-public acpid
   (package
@@ -1937,7 +2165,7 @@ 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+)))
+    (license license:gpl2+)))
 
 (define-public sysfsutils
   (package
@@ -1956,12 +2184,12 @@ specified in /etc/acpi/events and execute the rules that match the event.")
     (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
+     "These are a set of utilities 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+))))
+    (license (list license:gpl2 license:gpl2+ license:lgpl2.1+))))
 
 (define-public sysfsutils-1
   (package
@@ -1985,13 +2213,6 @@ also contains the libsysfs library.")
            (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
@@ -2007,7 +2228,7 @@ also contains the libsysfs library.")
          version ".tar.gz"))
        (sha256
         (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
-       (patches (list (search-patch "cpufrequtils-fix-aclocal.patch")))))
+       (patches (search-patches "cpufrequtils-fix-aclocal.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("sysfsutils" ,sysfsutils-1)))
@@ -2017,10 +2238,10 @@ also contains the libsysfs library.")
     (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
+     "The cpufrequtils suite contains utilities to retrieve CPU frequency
 information, and set the CPU frequency if supported, using the cpufreq
 capabilities of the Linux kernel.")
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public libraw1394
   (package
@@ -2043,7 +2264,7 @@ 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+)))
+    (license license:lgpl2.1+)))
 
 (define-public libavc1394
   (package
@@ -2065,8 +2286,8 @@ protocol in question.")
     (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+)))
+the 1394 Trade Association.  AV/C stands for Audio/Video Control.")
+    (license license:lgpl2.1+)))
 
 (define-public libiec61883
   (package
@@ -2090,4 +2311,395 @@ the 1394 Trade Assocation.  AV/C stands for Audio/Video Control.")
     (description
      "The libiec61883 library provides a higher level API for streaming DV,
 MPEG-2 and audio over Linux IEEE 1394.")
-    (license lgpl2.1+)))
+    (license license:lgpl2.1+)))
+
+(define-public mdadm
+  (package
+    (name "mdadm")
+    (version "3.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://kernel.org/linux/utils/raid/mdadm/mdadm-"
+                    version ".tar.xz"))
+              (sha256
+               (base32
+                "0248v9f28mrbwabl94ck22gfim29sqhkf70wrpfi52nk4x3bxl17"))))
+    (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 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 license:lgpl2.1+)))
+
+(define-public sbc
+  (package
+    (name "sbc")
+    (version "1.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.kernel.org/pub/linux/bluetooth/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "02ckd2z51z0h85qgv7x8vv8ybp5czm9if1z78411j53gaz7j4476"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libsndfile" ,libsndfile)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "https://www.kernel.org/pub/linux/bluetooth/")
+    (synopsis "Bluetooth subband audio codec")
+    (description
+     "The SBC is a digital audio encoder and decoder used to transfer data to
+Bluetooth audio output devices like headphones or loudspeakers.")
+    (license license:gpl2+)))
+
+(define-public bluez
+  (package
+    (name "bluez")
+    (version "5.39")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://kernel.org/linux/bluetooth/bluez-"
+                    version ".tar.xz"))
+              (sha256
+               (base32
+                "0fsrf9rdmrdyx0vmcpfji4imjsvliawyy5sjb6b64myka28vrl91"))))
+    (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 license:gpl2+)))
+
+(define-public fuse-exfat
+  (package
+    (name "fuse-exfat")
+    (version "1.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri "https://docs.google.com/uc?export=download&\
+id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
+              (sha256
+               (base32
+                "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
+              (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("scons" ,scons)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("fuse" ,fuse)))
+    (arguments
+     '(#:tests? #f                                ;no test suite
+
+       ;; XXX: Factorize with 'exfat-utils'.
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (add-after 'unpack 'scons-propagate-environment
+                             (lambda _
+                               ;; Modify the SConstruct file to arrange for
+                               ;; environment variables to be propagated.
+                               (substitute* "SConstruct"
+                                 (("^env = Environment\\(")
+                                  "env = Environment(ENV=os.environ, "))))
+                  (replace 'build
+                           (lambda _
+                             (zero? (system* "scons"))))
+                  (replace 'install
+                           (lambda* (#:key outputs #:allow-other-keys)
+                             (let* ((out  (assoc-ref outputs "out"))
+                                    (bin  (string-append out "/bin"))
+                                    (man8 (string-append out
+                                                         "/share/man/man8")))
+                               (mkdir-p bin)
+                               (mkdir-p man8)
+                               (for-each (lambda (file)
+                                           (copy-file
+                                            file
+                                            (string-append man8 "/"
+                                                           (basename file))))
+                                         (find-files "." "\\.8$"))
+                               (zero? (system* "scons" "install"
+                                               (string-append "DESTDIR="
+                                                              bin)))))))))
+    (home-page "http://code.google.com/p/exfat/")
+    (synopsis "Mount exFAT file systems")
+    (description
+     "This package provides a FUSE-based file system that provides read and
+write access to exFAT devices.")
+    (license license:gpl2+)))
+
+(define-public gpm
+  (package
+    (name "gpm")
+    (version "1.20.7")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://www.nico.schottelius.org/software/gpm/archives/gpm-"
+                    version ".tar.bz2"))
+              (sha256
+               (base32
+                "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-before 'configure 'bootstrap
+                    (lambda _
+                      ;; The tarball was not generated with 'make dist' so we
+                      ;; need to bootstrap things ourselves.
+                      (and (zero? (system* "./autogen.sh"))
+                           (begin
+                             (patch-makefile-SHELL "Makefile.include.in")
+                             #t)))))
+
+       ;; Make sure programs find libgpm.so.
+       #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
+                                              (assoc-ref %outputs "out")
+                                              "/lib"))))
+    (native-inputs
+     `(("texinfo" ,texinfo)
+       ("bison" ,bison)
+       ("flex" ,flex)
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)))
+    (home-page "http://www.nico.schottelius.org/software/gpm/")
+    (synopsis "Mouse support for the Linux console")
+    (description
+     "The GPM (general-purpose mouse) daemon is a mouse server for
+applications running on the Linux console.  It allows users to select items
+and copy/paste text in the console and in xterm.")
+    (license license:gpl2+)))
+
+(define-public btrfs-progs
+  (package
+    (name "btrfs-progs")
+    (version "4.5.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://kernel.org/linux/kernel/"
+                                  "people/kdave/btrfs-progs/"
+                                  "btrfs-progs-v" version ".tar.xz"))
+              (sha256
+               (base32
+                "1lzbw275xgv69v4z8hmsf3jnip38116hxhkpv0madk8wv049drz6"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:test-target "test"
+       #:parallel-tests? #f)) ; tests fail when run in parallel
+    (inputs `(("e2fsprogs" ,e2fsprogs)
+              ("libblkid" ,util-linux)
+              ("libuuid" ,util-linux)
+              ("zlib" ,zlib)
+              ("lzo" ,lzo)))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("asciidoc" ,asciidoc)
+                     ("xmlto" ,xmlto)
+                     ;; For building documentation
+                     ("libxml2" ,libxml2)
+                     ("docbook-xml" ,docbook-xml)
+                     ("docbook-xsl" ,docbook-xsl)))
+    (home-page "https://btrfs.wiki.kernel.org/")
+    (synopsis "Create and manage btrfs copy-on-write file systems")
+    (description "Btrfs is a copy-on-write (CoW) filesystem for Linux aimed at
+implementing advanced features while focusing on fault tolerance, repair and
+easy administration.")
+    ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
+    ;; GPL2: Everything else.
+    (license (list license:gpl2 license:gpl2+))))
+
+(define-public freefall
+  (package
+    (name "freefall")
+    (version (package-version linux-libre))
+    (source (package-source linux-libre))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'enter-subdirectory
+                    (lambda _
+                      (chdir "tools/laptop/freefall")))
+                  (delete 'configure)
+                  (add-before 'build 'increase-timeout
+                    (lambda _
+                      ;; The default of 2 seconds is too low: it assumes an
+                      ;; open lid and AC power without actually checking.
+                      (substitute* "freefall.c"
+                        (("alarm\\(2\\)") "alarm(5)")))))
+       #:make-flags (list (string-append "PREFIX="
+                                         (assoc-ref %outputs "out")))
+       #:tests? #f)) ;no tests
+    (home-page (package-home-page linux-libre))
+    (synopsis "Free-fall protection for spinning laptop hard drives")
+    (description
+     "Prevents shock damage to the internal spinning hard drive(s) of some
+HP and Dell laptops.  When sudden movement is detected, all input/output
+operations on the drive are suspended and its heads are parked on the ramp,
+where they are less likely to cause damage to the spinning disc.  Requires a
+drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
+feature, and a laptop with an accelerometer.  It has no effect on SSDs.")
+    (license license:gpl2)))
+
+(define-public thinkfan
+  (package
+    (name "thinkfan")
+    (version "0.9.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/thinkfan/"
+                                  version "/thinkfan-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
+              (modules '((guix build utils)))
+              ;; Fix erroneous man page location in Makefile leading to
+              ;; a compilation failure.
+              (snippet
+               '(substitute* "CMakeLists.txt"
+                  (("thinkfan\\.1") "src/thinkfan.1")))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:modules ((guix build cmake-build-system)
+                  (guix build utils)
+                  (srfi srfi-26))
+       #:tests? #f                      ;no test target
+       #:configure-flags
+       ;; Enable reading temperatures from hard disks via S.M.A.R.T.
+       `("-DUSE_ATASMART:BOOL=ON")
+       #:phases
+       (modify-phases %standard-phases
+         ;; Install scripts for various foreign init systems. Also fix
+         ;; hard-coded path for daemon.
+         (add-after 'install 'install-rc-scripts
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (files (find-files
+                           (string-append "../thinkfan-" ,version "/rcscripts")
+                           ".*")))
+               (substitute* files
+                 (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
+                  (string-append out "/sbin/" name)))
+               (for-each (cute install-file <>
+                               (string-append out "/share/thinkfan"))
+                         files))
+             #t)))))
+    (inputs
+     `(("libatasmart" ,libatasmart)))
+    (home-page "http://thinkfan.sourceforge.net/")
+    (synopsis "Simple fan control program")
+    (description
+     "Thinkfan is a simple fan control program.  It reads temperatures,
+checks them against configured limits and switches to appropriate (also
+pre-configured) fan level.  It requires a working @code{thinkpad_acpi} or any
+other @code{hwmon} driver that enables temperature reading and fan control
+from userspace.")
+    (license license:gpl3+)))
+
+(define-public ntfs-3g
+  (package
+    (name "ntfs-3g")
+    (version "2016.2.22")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://tuxera.com/opensource/"
+                                  "ntfs-3g_ntfsprogs-" version ".tgz"))
+              (sha256
+               (base32
+                "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Install under $prefix.
+               '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in")
+                  (("/sbin")
+                   "@sbindir@")))))
+    (build-system gnu-build-system)
+    (inputs `(("util-linux" ,util-linux)
+              ("fuse" ,fuse)))                    ;libuuid
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (arguments
+     '(#:configure-flags (list "--exec-prefix=${prefix}"
+                               "--with-fuse=external" ;use our own FUSE
+                               "--enable-mount-helper"
+                               "--enable-posix-acls"
+                               "--enable-xattr-mappings")))
+    (home-page "http://www.tuxera.com/community/open-source-ntfs-3g/")
+    (synopsis "Read-write access to NTFS file systems")
+    (description
+     "NTFS-3G provides read-write access to NTFS file systems, which are
+commonly found on Microsoft Windows.  It is implemented as a FUSE file system.
+The package provides additional NTFS tools.")
+    (license license:gpl2+)))