gnu: lispf4: Remove unused inputs key.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
index 5ce6007..8668175 100644 (file)
@@ -14,6 +14,7 @@
 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
+;;; Copyright © 2016 John Darrington <jmd@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -40,6 +41,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages calendar)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages docbook)
@@ -50,6 +52,7 @@
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libusb)
@@ -81,7 +84,7 @@
 
 (define-public (system->linux-architecture arch)
   "Return the Linux architecture name for ARCH, a Guix system name such as
-\"x86_64-linux\"."
+\"x86_64-linux\" or a target triplet such as \"arm-linux-gnueabihf\"."
   (let ((arch (car (string-split arch #\-))))
     (cond ((string=? arch "i686") "i386")
           ((string-prefix? "mips" arch) "mips")
     (source (origin
              (method url-fetch)
              (uri (string-append
-                   "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
-                   version ".tar.bz2"))
+                   "mirror://kernel.org/linux/utils/kernel/module-init-tools/"
+                   "module-init-tools-" version ".tar.bz2"))
              (sha256
               (base32
                "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))
 `insmod', `lsmod', and more.")
     (license license:gpl2+)))
 
+(define-public libnfsidmap
+  (package
+    (name "libnfsidmap")
+    (version "0.25")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append
+                   "http://www.citi.umich.edu/projects/nfsv4/linux/"
+                   name "/" name "-" version ".tar.gz"))
+             (sha256
+              (base32
+               "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags (list
+                          (string-append "--with-pluginpath="
+                                         (assoc-ref %outputs "out")
+                                         "/lib/libnfsidmap"))))
+    (home-page
+     "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
+    (synopsis
+     "NFSv4 support library for name/ID mapping")
+    (description "Libnfsidmap is a library holding mulitiple methods of
+mapping names to ids and visa versa, mainly for NFSv4.  It provides an
+extensible array of mapping functions, currently consisting of two choices:
+the default @code{nsswitch} and the experimental @code{umich_ldap}.")
+    (license (license:non-copyleft "file://COPYING"
+                                   "See COPYING in the distribution."))))
+
 (define %boot-logo-patch
   ;; Linux-Libre boot logo featuring Freedo and a gnu.
   (origin
@@ -226,23 +258,55 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
     (search-path %load-path file)))
 
 (define-public linux-libre
-  (let* ((version "4.6.4")
-         (build-phase
-          '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
+  (package
+    (name "linux-libre")
+    (version "4.7.3")
+    (source (origin
+              (method url-fetch)
+              (uri (linux-libre-urls version))
+              (sha256
+               (base32
+                "18sy1vh4x66hsk0qbq8g5299my082d530zm8c7xnbakq7350igi6"))
+              (patches (origin-patches %boot-logo-patch))))
+    (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)
+
+       ,@(let ((conf (kernel-config
+                      (or (%current-target-system)
+                          (%current-system))
+                      #:variant (version-major+minor version))))
+           (if conf
+               `(("kconfig" ,conf))
+               '()))))
+    (arguments
+     `(#:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  (srfi srfi-1)
+                  (ice-9 match))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs native-inputs target #:allow-other-keys)
              ;; 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"))
+             ;; Set ARCH and CROSS_COMPILE
+             (let ((arch ,(system->linux-architecture
+                           (or (%current-target-system)
+                               (%current-system)))))
+               (setenv "ARCH" arch)
+               (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
 
-             (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")))
+               (when target
+                 (setenv "CROSS_COMPILE" (string-append target "-"))
+                 (format #t "`CROSS_COMPILE' set to `~a'~%"
+                         (getenv "CROSS_COMPILE"))))
 
              (let ((build  (assoc-ref %standard-phases 'build))
                    (config (assoc-ref inputs "kconfig")))
@@ -273,16 +337,12 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
                           port)
                  (close-port port))
 
-               (zero? (system* "make" "oldconfig"))
-
-               ;; Call the default `build' phase so `-j' is correctly
-               ;; passed.
-               (apply build #:make-flags "all" args))))
-         (install-phase
-          `(lambda* (#:key inputs outputs #:allow-other-keys)
+               (zero? (system* "make" "oldconfig")))))
+         (replace 'install
+           (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
              (let* ((out    (assoc-ref outputs "out"))
                     (moddir (string-append out "/lib/modules"))
-                    (mit    (assoc-ref inputs "module-init-tools")))
+                    (mit    (assoc-ref (or native-inputs inputs) "module-init-tools")))
                (mkdir-p moddir)
                (for-each (lambda (file)
                            (copy-file file
@@ -296,58 +356,24 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration."
                                (string-append "INSTALL_MOD_PATH=" out)
                                "INSTALL_MOD_STRIP=1"
                                "modules_install"))))))
-   (package
-    (name "linux-libre")
-    (version version)
-    (source (origin
-             (method url-fetch)
-             (uri (linux-libre-urls version))
-             (sha256
-              (base32
-               "1294qw4agax0cnbhh0dk33jz358smhflllg77zv0rd8w9g433xiz"))))
-    (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))
-                                    #:variant (version-major+minor version))))
-                         (if conf
-                             `(("kconfig" ,conf))
-                             '()))))
-    (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (srfi srfi-1)
-                  (ice-9 match))
-       #:phases (alist-replace
-                 'build ,build-phase
-                 (alist-replace
-                  'install ,install-phase
-                  (alist-delete 'configure %standard-phases)))
        #:tests? #f))
+    (home-page "http://www.gnu.org/software/linux-libre/")
     (synopsis "100% free redistribution of a cleaned Linux kernel")
     (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 license:gpl2)
-    (home-page "http://www.gnu.org/software/linux-libre/"))))
+    (license license:gpl2)))
 
 (define-public linux-libre-4.4
   (package
     (inherit linux-libre)
-    (version "4.4.15")
+    (version "4.4.20")
     (source (origin
               (method url-fetch)
               (uri (linux-libre-urls version))
               (sha256
                (base32
-                "0n3lz4xnciif9v3y769q1pjs9321gvl6a2wr10r40sl1ixlk3ipz"))))
+                "1fi0pyyzcf643vdsss0d9ld6jqyxw0k76r0a5vpd4mv3dcl37yyq"))))
     (native-inputs
      (let ((conf (kernel-config (or (%current-target-system)
                                     (%current-system))
@@ -358,13 +384,13 @@ It has been modified to remove all non-free binary blobs.")
 (define-public linux-libre-4.1
   (package
     (inherit linux-libre)
-    (version "4.1.27")
+    (version "4.1.32")
     (source (origin
               (method url-fetch)
               (uri (linux-libre-urls version))
               (sha256
                (base32
-                "0bbp782gdj8kz986a8hfygdrj7is0c8wgbb2mpb9gqhkfxcg74kf"))))
+                "0lkksxpxsw6b8vcgbivn2kp6xbml69yx8frrsfrk49sqigz0xds6"))))
     (native-inputs
      (let ((conf (kernel-config (or (%current-target-system)
                                     (%current-system))
@@ -723,7 +749,8 @@ from the e2fsprogs package.  It is meant to be used in initrds.")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/extundelete/"
-                                  version "/extundelete-" version ".tar.bz2"))
+                                  "extundelete/" version "/extundelete-"
+                                  version ".tar.bz2"))
               (sha256
                (base32
                 "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
@@ -777,8 +804,8 @@ images more compressible.")
     (version "4.7")
     (source (origin
              (method url-fetch)
-             (uri (string-append "mirror://sourceforge/strace/strace-"
-                                 version ".tar.xz"))
+             (uri (string-append "mirror://sourceforge/strace/strace/" version
+                                 "/strace-" version ".tar.xz"))
              (sha256
               (base32
                "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
@@ -839,14 +866,14 @@ MIDI functionality to the Linux-based operating system.")
 (define-public alsa-utils
   (package
     (name "alsa-utils")
-    (version "1.1.0")
+    (version "1.1.2")
     (source (origin
              (method url-fetch)
              (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
                                  name "-" version ".tar.bz2"))
              (sha256
               (base32
-               "1wa88wvqcfhak9x3y65wzzwxmmyxb5bv2gyj7lnm653fnwsk271v"))))
+               "0wcha78c2sm8qqk5r3w83cvm8fp6fb1zpd35kmcm24kxhz007xks"))))
     (build-system gnu-build-system)
     (arguments
      ;; XXX: Disable man page creation until we have DocBook.
@@ -857,14 +884,15 @@ MIDI functionality to the Linux-based operating system.")
                                (string-append "--with-udev-rules-dir="
                                               (assoc-ref %outputs "out")
                                               "/lib/udev/rules.d"))
-       #:phases (alist-cons-before
-                 'install 'pre-install
-                 (lambda _
-                   ;; Don't try to mkdir /var/lib/alsa.
-                   (substitute* "Makefile"
-                     (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
-                      "true\n")))
-                 %standard-phases)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+           'install 'pre-install
+           (lambda _
+             ;; Don't try to mkdir /var/lib/alsa.
+             (substitute* "Makefile"
+               (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
+                "true\n")))))))
     (inputs
      `(("libsamplerate" ,libsamplerate)
        ("ncurses" ,ncurses)
@@ -902,7 +930,7 @@ MIDI functionality to the Linux-based operating system.")
     (synopsis "Program to configure the Linux IP packet filtering rules")
     (description
      "iptables is the userspace command line program used to configure the
-Linux 2.4.x and later IPv4 packet filtering ruleset.  It is targeted towards
+Linux 2.4.x and later IPv4 packet filtering ruleset (firewall).  It is targeted at
 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
@@ -1114,8 +1142,8 @@ Linux-based operating systems.")
     (version "1.5")
     (source (origin
              (method url-fetch)
-             (uri (string-append "mirror://sourceforge/bridge/bridge-utils-"
-                                 version ".tar.gz"))
+             (uri (string-append "mirror://sourceforge/bridge/bridge/"
+                                 "bridge-utils-" version ".tar.gz"))
              (sha256
               (base32
                "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
@@ -2096,7 +2124,7 @@ thanks to the use of namespaces.")
     (version "9.45")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://sourceforge/" name "/"
+              (uri (string-append "mirror://sourceforge/" name "/" name "/"
                                   name "-" version ".tar.gz"))
               (sha256
                (base32
@@ -2149,8 +2177,8 @@ WLAN, Bluetooth and mobile broadband.")
     (version "1.7")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://sourceforge/acpiclient/"
-                                  name "-" version ".tar.gz"))
+              (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/" 
+                                  version "/" name "-" version ".tar.gz"))
               (sha256
                (base32
                 "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
@@ -2290,7 +2318,7 @@ protocol in question.")
     (version "0.5.4")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://sourceforge/libavc1394/"
+              (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
                                   name "-" version ".tar.gz"))
               (sha256
                (base32
@@ -2362,7 +2390,15 @@ MPEG-2 and audio over Linux IEEE 1394.")
                      (substitute* "udev-md-raid-arrays.rules"
                        (("/usr/bin/(readlink|basename)" all program)
                         (string-append coreutils "/bin/" program)))))
-                 (alist-delete 'configure %standard-phases))
+                 (alist-cons-before
+                  'build 'remove-W-error
+                  (lambda _
+                    ;; We cannot build with -Werror on i686 due to a
+                    ;; 'sign-compare' warning in util.c.
+                    (substitute* "Makefile"
+                      (("-Werror") ""))
+                    #t)
+                  (alist-delete 'configure %standard-phases)))
        ;;tests must be done as root
        #:tests? #f))
     (home-page "http://neil.brown.name/blog/mdadm")
@@ -2589,7 +2625,7 @@ and copy/paste text in the console and in xterm.")
 (define-public btrfs-progs
   (package
     (name "btrfs-progs")
-    (version "4.5.3")
+    (version "4.7.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://kernel.org/linux/kernel/"
@@ -2597,7 +2633,7 @@ and copy/paste text in the console and in xterm.")
                                   "btrfs-progs-v" version ".tar.xz"))
               (sha256
                (base32
-                "1lzbw275xgv69v4z8hmsf3jnip38116hxhkpv0madk8wv049drz6"))))
+                "03z6zgvjb94jk0q1xx2hicznfxj5c8xyyw5xqmh05rpz8ghwk6zl"))))
     (build-system gnu-build-system)
     (outputs '("out"
                "static"))      ; static versions of binaries in "out" (~16MiB!)
@@ -2627,7 +2663,9 @@ and copy/paste text in the console and in xterm.")
                      ;; For building documentation
                      ("libxml2" ,libxml2)
                      ("docbook-xml" ,docbook-xml)
-                     ("docbook-xsl" ,docbook-xsl)))
+                     ("docbook-xsl" ,docbook-xsl)
+                     ;; For tests
+                     ("which" ,which)))
     (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
@@ -2676,7 +2714,7 @@ feature, and a laptop with an accelerometer.  It has no effect on SSDs.")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/thinkfan/"
-                                  version "/thinkfan-" version ".tar.gz"))
+                                  "/thinkfan-" version ".tar.gz"))
               (sha256
                (base32
                 "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
@@ -2818,3 +2856,70 @@ from that to the system kernel's @file{/dev/random} machinery.")
 Linux kernel to retrieve and control processor features related to power saving,
 such as frequency and voltage scaling.")
     (license license:gpl2)))
+
+(define-public haveged
+  (package
+    (name "haveged")
+    (version "1.9.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://www.issihosts.com/haveged/haveged-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "059pxlfd4l5dqhd6r3lynzfz4wby2f17294fy17pi9j2jpnn68ww"))))
+    (build-system gnu-build-system)
+    (home-page "http://www.issihosts.com/haveged")
+    (synopsis "Entropy source for the Linux random number generator")
+    (description
+     "haveged generates an unpredictable stream of random numbers for use by
+Linux's @file{/dev/random} and @file{/dev/urandom} devices.  The kernel's
+standard mechanisms for filling the entropy pool may not be sufficient for
+systems with high needs or limited user interaction, such as headless servers.
+@command{haveged} runs as a privileged daemon, harvesting randomness from the
+indirect effects of hardware events on hidden processor state using the HArdware
+Volatile Entropy Gathering and Expansion (HAVEGE) algorithm.  It tunes itself to
+its environment and provides the same built-in test suite for the output stream
+as used on certified hardware security devices.")
+    (license (list (license:non-copyleft "file://nist/mconf.h")
+                   (license:non-copyleft "file://nist/packtest.c")
+                   license:public-domain        ; nist/dfft.c
+                   license:gpl3+))))            ; everything else
+
+(define-public ecryptfs-utils
+  (package
+    (name "ecryptfs-utils")
+    (version "111")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
+                           version "/+download/ecryptfs-utils_"
+                           version ".orig.tar.gz"))
+       (sha256
+        (base32
+         "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags (list "--disable-pywrap")))
+    (native-inputs
+     `(("intltool" ,intltool)
+       ("perl" ,perl)                   ; for pod2man
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("keyutils" ,keyutils)
+       ("linux-pam" ,linux-pam)
+       ("nss" ,nss)))
+    (home-page "http://ecryptfs.org/")
+    (synopsis "eCryptfs cryptographic file system utilities")
+    (description
+     "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
+Each file's cryptographic meta-data is stored inside the file itself, along
+with the encrypted contents.  This allows individual encrypted files to be
+copied between hosts and still be decrypted with the proper key.  eCryptfs is a
+native Linux file system, and has been part of the Linux kernel since version
+2.6.19.  This package contains the userland utilities to manage it.")
+    ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
+    ;; grant additional permission to link with OpenSSL.
+    (license license:gpl2+)))