gnu: guix: Update snapshot.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
index 02a0ae3..12b754b 100644 (file)
@@ -2,7 +2,7 @@
 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
                 #:hide (zlib))
   #:use-module (gnu packages)
   #:use-module ((gnu packages compression) #:prefix guix:)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages pciutils)
-  #:use-module (gnu packages bdb)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages which)
   #:use-module (gnu packages rrdtool)
+  #:use-module (gnu packages elf)
   #:use-module (gnu packages gtk)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system python)
@@ -189,7 +192,7 @@ for SYSTEM, or #f if there is no configuration for SYSTEM."
      #f)))
 
 (define-public linux-libre
-  (let* ((version "3.16.1")
+  (let* ((version "3.18.2")
          (build-phase
           '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
              ;; Apply the neat patch.
@@ -262,7 +265,7 @@ for SYSTEM, or #f if there is no configuration for SYSTEM."
              (uri (linux-libre-urls version))
              (sha256
               (base32
-               "1x4y0017l4ndcab4smky2wx0n86r3wyks2r8yyp19ia9ccnl98mf"))))
+               "0wji58x0zci13a499v6kbz3pyhs2gk6wsbv3fia8valxgbcppyhp"))))
     (build-system gnu-build-system)
     (native-inputs `(("perl" ,perl)
                      ("bc" ,bc)
@@ -274,6 +277,11 @@ for SYSTEM, or #f if there is no configuration for SYSTEM."
                          (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)
@@ -359,10 +367,10 @@ at login.  Local and dynamic reconfiguration are its key features")
     (inputs `(("ncurses" ,ncurses)))
     (home-page "http://psmisc.sourceforge.net/")
     (synopsis
-     "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
+     "Small utilities that use the proc filesystem")
     (description
      "This PSmisc package is a set of some small useful utilities that
-use the proc filesystem. We're not about changing the world, but
+use the proc filesystem.  We're not about changing the world, but
 providing the system administrator with some help in common tasks.")
     (license gpl2+)))
 
@@ -378,7 +386,16 @@ providing the system administrator with some help in common tasks.")
               (sha256
                (base32
                 "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))
-              (patches (list (search-patch "util-linux-perl.patch")))))
+              (patches (list (search-patch "util-linux-perl.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))))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--disable-use-tty-group"
@@ -398,7 +415,7 @@ providing the system administrator with some help in common tasks.")
     (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.")
+     "Util-linux is a random collection of utilities for the Linux kernel.")
 
     ;; Note that util-linux doesn't use the same license for all the
     ;; code.  GPLv2+ is the default license for a code without an
@@ -454,7 +471,7 @@ providing the system administrator with some help in common tasks.")
     (home-page "http://procps.sourceforge.net/")
     (synopsis "Utilities that give information about processes")
     (description
-     "procps is the package that has a bunch of small useful utilities
+     "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.")
@@ -500,7 +517,12 @@ slabtop, and skill.")
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("texinfo" ,texinfo)))    ; for the libext2fs Info manual
     (arguments
-     '(#:phases (alist-cons-before
+     '(;; The 'blkid' command and library are already provided by util-linux,
+       ;; which is the preferred source for them (see, e.g.,
+       ;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b336339909c90559b7db40b455f172>.)
+       #:configure-flags '("--disable-blkid")
+
+       #:phases (alist-cons-before
                  'configure 'patch-shells
                  (lambda _
                    (substitute* "configure"
@@ -613,6 +635,9 @@ MIDI functionality to the Linux-based operating system.")
     (arguments
      ;; XXX: Disable man page creation until we have DocBook.
      '(#:configure-flags (list "--disable-xmlto"
+
+                               ;; The udev rule is responsible for restoring
+                               ;; the volume.
                                (string-append "--with-udev-rules-dir="
                                               (assoc-ref %outputs "out")
                                               "/lib/udev/rules.d"))
@@ -705,7 +730,7 @@ packet filter.")
     (home-page
      "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
     (synopsis
-     "A collection of utilities for controlling TCP/IP networking and traffic control in Linux")
+     "Utilities for controlling TCP/IP networking and traffic in Linux")
     (description
      "Iproute2 is a collection of utilities for controlling TCP/IP
 networking and traffic with the Linux kernel.
@@ -740,7 +765,9 @@ manpages.")
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))))
+               "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))
+             (patches
+              (list (search-patch "net-tools-bitrot.patch")))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (alist-cons-after
@@ -834,7 +861,7 @@ advanced aspects of IP configuration (iptunnel, ipmaddr).")
     (home-page "https://sites.google.com/site/fullycapable/")
     (synopsis "Library for working with POSIX capabilities")
     (description
-     "libcap2 provides a programming interface to POSIX capabilities on
+     "Libcap2 provides a programming interface to POSIX capabilities on
 Linux-based operating systems.")
 
     ;; License is BSD-3 or GPLv2, at the user's choice.
@@ -878,7 +905,7 @@ transparently through a bridge.")
 (define-public libnl
   (package
     (name "libnl")
-    (version "3.2.13")
+    (version "3.2.25")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -886,7 +913,7 @@ transparently through a bridge.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "1ydw42lsd572qwrfgws97n76hyvjdpanwrxm03lysnhfxkna1ssd"))))
+                "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
     (build-system gnu-build-system)
     (native-inputs `(("flex" ,flex) ("bison" ,bison)))
     (home-page "http://www.infradead.org/~tgr/libnl/")
@@ -902,6 +929,32 @@ configuration and monitoring interfaces.")
     ;; 'nl-addr-add.c'), so the result is GPLv2-only.
     (license gpl2)))
 
+(define-public iw
+  (package
+    (name "iw")
+    (version "3.17")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://www.kernel.org/pub/software/network/iw/iw-"
+                    version ".tar.xz"))
+              (sha256
+               (base32
+                "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8"))))
+    (build-system gnu-build-system)
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (inputs `(("libnl" ,libnl)))
+    (arguments
+     `(#: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")
+    (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)))
+
 (define-public powertop
   (package
     (name "powertop")
@@ -1001,9 +1054,11 @@ processes currently causing I/O.")
                                (string-append "INIT_D_PATH="
                                               (assoc-ref %outputs "out")
                                               "/etc/init.d")
+
+                               ;; The rule makes /dev/fuse 666.
                                (string-append "UDEV_RULES_PATH="
                                               (assoc-ref %outputs "out")
-                                              "/etc/udev"))
+                                              "/lib/udev/rules.d"))
       #:phases (alist-cons-before
                 'build 'set-file-names
                 (lambda* (#:key inputs #:allow-other-keys)
@@ -1092,7 +1147,16 @@ UnionFS-FUSE additionally supports copy-on-write.")
                                   libs " dl)"))))))
     (arguments
      '(#:tests? #f
-       #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")))
+       #:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-static")
+       #:phases (alist-cons-after
+                 'install 'post-install
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (let* ((out (assoc-ref outputs "out"))
+                          (exe (string-append out "/bin/unionfs")))
+                     ;; By default, 'unionfs' keeps references to
+                     ;; $glibc/share/locale and similar stuff.  Remove them.
+                     (remove-store-references exe)))
+                 %standard-phases)))
     (inputs `(("fuse" ,fuse-static)))))
 
 (define-public sshfs-fuse
@@ -1290,7 +1354,7 @@ to use Linux' inotify mechanism, which allows file accesses to be monitored.")
                  %standard-phases)))
     (home-page "https://www.kernel.org/")
     (synopsis "Kernel module tools")
-    (description "kmod is a set of tools to handle common tasks with Linux
+    (description "Kmod is a set of tools to handle common tasks with Linux
 kernel modules like insert, remove, list, check properties, resolve
 dependencies and aliases.
 
@@ -1300,6 +1364,7 @@ from the module-init-tools project.")
     (license gpl2+))) ; library under lgpl2.1+
 
 (define-public udev
+  ;; The last pre-systemd version.
   (package
     (name "udev")
     (version "182")
@@ -1344,6 +1409,35 @@ device nodes from /dev/, handles hotplug events and loads drivers at boot
 time.")
     (license gpl2+))) ; libudev is under lgpl2.1+
 
+(define-public eudev
+  ;; The post-systemd fork, maintained by Gentoo.
+  (package (inherit udev)
+    (name "eudev")
+    (version "1.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://dev.gentoo.org/~blueness/eudev/eudev-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1l907bvz6dcykvaq8d4iklvfpb9fyrnh1a29g3c28gkx2hlyn7j0"))
+              (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")
+                   "")))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments udev)
+       ((#:configure-flags flags)
+        `(cons "--enable-libkmod" ,flags))))
+    (home-page "http://www.gentoo.org/proj/en/eudev/")))
+
 (define-public lvm2
   (package
     (name "lvm2")
@@ -1388,7 +1482,13 @@ time.")
                                               (assoc-ref %outputs "out")
                                               "/etc/lvm")
                                "--enable-udev_sync"
-                               "--enable-udev_rules")
+                               "--enable-udev_rules"
+
+                               ;; Make sure programs such as 'dmsetup' can
+                               ;; find libdevmapper.so.
+                               (string-append "LDFLAGS=-Wl,-rpath="
+                                              (assoc-ref %outputs "out")
+                                              "/lib"))
 
        ;; The tests use 'mknod', which requires root access.
        #:tests? #f))
@@ -1413,7 +1513,13 @@ mapper.  Kernel components are part of Linux-libre.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))))
+                "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Install the manual pages in the right place.
+               '(substitute* "Makefile"
+                  (("INSTALL_MAN= .*")
+                   "INSTALL_MAN= $(PREFIX)/share/man")))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases (alist-replace
@@ -1497,7 +1603,7 @@ Wireless LAN specific parameters and get the specific stats.")
     (home-page "http://www.lm-sensors.org/")
     (synopsis "Utilities to read temperature/voltage/fan sensors")
     (description
-     "lm-sensors is a hardware health monitoring package for Linux.  It allows
+     "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+)))
@@ -1534,7 +1640,77 @@ It works with most newer systems.")
     (home-page "http://www.linuxhardware.org/xsensors/")
     (synopsis "Hardware health information viewer")
     (description
-     "xsensors reads data from the libsensors library regarding hardware
+     "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+)))
+
+(define-public perf
+  (package
+    (name "perf")
+    (version (package-version linux-libre))
+    (source (package-source linux-libre))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases (alist-replace
+                 'configure
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (setenv "SHELL_PATH" (which "bash"))
+                   (chdir "tools/perf"))
+                 %standard-phases)
+       #:make-flags (list (string-append "DESTDIR="
+                                         (assoc-ref %outputs "out"))
+                          "WERROR=0")
+       #:tests? #f))                              ;no tests
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("bison" ,bison)
+       ("flex" ,flex)
+
+       ;; There are build scripts written in these languages.
+       ("perl" ,perl)
+       ("python" ,python-2)))
+    (inputs
+     `(;; ("slang" ,slang)
+       ;; ("newt" ,newt)
+       ("elfutils" ,elfutils)
+
+       ;; FIXME: Documentation.
+       ;; ("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
+     "perf is a tool suite for profiling using hardware performance counters,
+with support in the Linux kernel.  perf can instrument CPU performance
+counters, tracepoints, kprobes, and uprobes (dynamic tracing).  It is capable
+of lightweight profiling.  This package contains the user-land tools and in
+particular the 'perf' command.")
+    (license (package-license linux-libre))))
+
+(define-public pflask
+  (package
+    (name "pflask")
+    (version "0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/ghedo/pflask/archive/v"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1g8fjj67dfkc2s0852l9vqi1pm61gp4rxbpzbzg780f5s5hd1fys"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:tests? #f)) ; no tests
+    (home-page "http://ghedo.github.io/pflask/")
+    (synopsis "Simple tool for creating Linux namespace containers")
+    (description "pflask is a simple tool for creating Linux namespace
+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)))