gnu: miniupnpc: Update to 2.0.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
index 1a4b503..e562213 100644 (file)
@@ -15,6 +15,7 @@
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
+;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -63,6 +64,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pciutils)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages popt)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
@@ -71,6 +73,8 @@
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages xorg)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
@@ -323,14 +327,14 @@ It has been modified to remove all non-free binary blobs.")
 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
 
 (define-public linux-libre
-  (make-linux-libre "4.8.4"
-                    "06fb2b1y7w0ixq4savn3hddp326mmzmg3400dpr8lyg919bwck3x"
+  (make-linux-libre "4.8.10"
+                    "04kwarmpz5adz64wwy0xpwzxsri7jrjkhbmjlwxsac69x9a26bkl"
                     %intel-compatible-systems
                     #:configuration-file kernel-config))
 
 (define-public linux-libre-4.4
-  (make-linux-libre "4.4.27"
-                    "07g0y8zbspw8d65386llcsnqlbv2s24dxvvbwm9kwm87rk3vin1r"
+  (make-linux-libre "4.4.34"
+                    "04ng40l2av34bcfwjs5vliv15f0m8bl0sfw08imspiplxvajd6ca"
                     %intel-compatible-systems
                     #:configuration-file kernel-config))
 
@@ -341,8 +345,8 @@ It has been modified to remove all non-free binary blobs.")
                     #:configuration-file kernel-config))
 
 ;; Avoid rebuilding kernel variants when there is a minor version bump.
-(define %linux-libre-version "4.8.4")
-(define %linux-libre-hash "06fb2b1y7w0ixq4savn3hddp326mmzmg3400dpr8lyg919bwck3x")
+(define %linux-libre-version "4.8.10")
+(define %linux-libre-hash "04kwarmpz5adz64wwy0xpwzxsri7jrjkhbmjlwxsac69x9a26bkl")
 
 (define-public linux-libre-arm-generic
   (make-linux-libre %linux-libre-version
@@ -920,7 +924,7 @@ packet filter.")
 (define-public iproute
   (package
     (name "iproute2")
-    (version "4.4.0")
+    (version "4.8.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -928,12 +932,14 @@ packet filter.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "05351m4m0whsivlblvs3m0nz5q9v6r06ik80z27gf6ca51kw74dw"))))
+                "12dk5hn1zlraqk2p0z8dv2xgsz0x9v8l3vcvf51fzj0v8b45j2d3"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                                ; no test suite
        #:make-flags (let ((out (assoc-ref %outputs "out")))
                       (list "DESTDIR="
+                            (string-append "BASH_COMPDIR=" out
+                                           "/etc/bash_completion.d")
                             (string-append "LIBDIR=" out "/lib")
                             (string-append "SBINDIR=" out "/sbin")
                             (string-append "CONFDIR=" out "/etc")
@@ -1677,7 +1683,8 @@ time.")
                     (("confdir = .*$")
                      "confdir = @sysconfdir@\n")
                     (("DEFAULT_SYS_DIR = @DEFAULT_SYS_DIR@")
-                     "DEFAULT_SYS_DIR = @sysconfdir@"))))))
+                     "DEFAULT_SYS_DIR = @sysconfdir@"))))
+              (patches (search-patches "lvm2-static-link.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -1732,6 +1739,22 @@ mapper.  Kernel components are part of Linux-libre.")
     ;; Command-line tools are GPLv2.
     (license (list license:gpl2 license:lgpl2.1))))
 
+(define-public lvm2-static
+  (package
+    (inherit lvm2)
+    (name "lvm2-static")
+
+    ;; Propagate udev because libdevmapper.a depends on libudev.
+    (inputs (alist-delete "udev" (package-inputs lvm2)))
+    (propagated-inputs `(("udev" ,eudev)))
+
+    (arguments
+     (substitute-keyword-arguments (package-arguments lvm2)
+       ((#:configure-flags flags '())
+        ;; LVM2 doesn't use Libtool, hence the custom option.
+        `(cons "--enable-static_link" ,flags))))
+    (synopsis "Logical volume management for Linux (statically linked)")))
+
 (define-public wireless-tools
   (package
     (name "wireless-tools")
@@ -2396,6 +2419,35 @@ assemble, report on, and monitor arrays.  It can also move spares between raid
 arrays when needed.")
     (license license:gpl2+)))
 
+(define-public mdadm-static
+  (package
+    (inherit mdadm)
+    (name "mdadm-static")
+    (arguments
+     (substitute-keyword-arguments (package-arguments mdadm)
+       ((#:make-flags flags)
+        `(cons "LDFLAGS = -static" ,flags))
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'install 'remove-cruft
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out         (assoc-ref outputs "out"))
+                      (precious?   (lambda (file)
+                                     (member file '("." ".." "sbin"))))
+                      (directories (scandir out (negate precious?))))
+                 (with-directory-excursion out
+                   (for-each delete-file-recursively directories)
+                   (remove-store-references "sbin/mdadm")
+                   (delete-file "sbin/mdmon")
+                   #t))))))
+       ((#:modules modules %gnu-build-system-modules)
+        `((ice-9 ftw) ,@modules))
+       ((#:strip-flags _ '())
+        ''("--strip-all"))                        ;strip a few extra KiB
+       ((#:allowed-references _ '("out"))
+        '("out"))))                               ;refer only self
+    (synopsis "Statically-linked 'mdadm' command for use in an initrd")))
+
 (define-public libaio
   (package
     (name "libaio")
@@ -2612,7 +2664,7 @@ and copy/paste text in the console and in xterm.")
 (define-public btrfs-progs
   (package
     (name "btrfs-progs")
-    (version "4.8.2")
+    (version "4.8.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://kernel.org/linux/kernel/"
@@ -2620,7 +2672,7 @@ and copy/paste text in the console and in xterm.")
                                   "btrfs-progs-v" version ".tar.xz"))
               (sha256
                (base32
-                "0pswcfmdnfc586770h74abp67gn2xv8fd46vxlimnmn837sj7h41"))))
+                "1wlflrygnpndppil9g12pk184f75g9qx1lkr0x1gijigglqhr9n1"))))
     (build-system gnu-build-system)
     (outputs '("out"
                "static"))      ; static versions of binaries in "out" (~16MiB!)
@@ -2975,14 +3027,14 @@ the default @code{nsswitch} and the experimental @code{umich_ldap}.")
 (define-public mcelog
   (package
     (name "mcelog")
-    (version "143")
+    (version "144")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
                                   "mcelog.git/snapshot/v" version ".tar.gz"))
               (sha256
                (base32
-                "1mn5i1d6ybfxqgr6smlpxcx1wb53h0r2rp90ild7919b9yqxpk0x"))
+                "03jyhsl0s59sfqykj5p6gkb03k4w1h9ay31yxym1dnzis5sq99pa"))
               (file-name (string-append name "-" version ".tar.gz"))
               (modules '((guix build utils)))
               (snippet
@@ -3066,3 +3118,121 @@ interface that should be familiar to, and easily adopted by, application
 developers.")
     (home-page "https://github.com/seccomp/libseccomp")
     (license license:lgpl2.1)))
+
+(define-public radeontop
+  (package
+    (name "radeontop")
+    (version "0.9")
+    (home-page "https://github.com/clbr/radeontop/")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page "/archive/v" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "07fnimn6wwablmdjw0av11hk9a6xilbryh09izq4b2ic4b8md2p7"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  ;; getver.sh uses ‘git --describe’, isn't worth an extra git
+                  ;; dependency, and doesn't even work on release(!) tarballs.
+                  (add-after 'unpack 'report-correct-version
+                    (lambda _ (substitute* "getver.sh"
+                                (("ver=unknown")
+                                 (string-append "ver=" ,version)))))
+                  (delete 'configure))  ; no configure script
+       #:make-flags (list "CC=gcc"
+                          (string-append "PREFIX=" %output))
+       #:tests? #f))                    ; no tests
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libdrm" ,libdrm)
+       ("libpciaccess" ,libpciaccess)
+       ("ncurses" ,ncurses)))
+    (synopsis "Usage monitor for AMD Radeon graphics")
+    (description "RadeonTop monitors resource consumption on supported AMD
+Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
+a terminal or saved to a file for further processing.  It measures both the
+activity of the GPU as a whole, which is also accurate during OpenCL
+computations, as well as separate component statistics that are only meaningful
+under OpenGL graphics workloads.")
+    (license license:gpl3)))
+
+(define-public efivar
+  (package
+    (name "efivar")
+    (version "30")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/rhinstaller/" name
+                                  "/releases/download/" version "/" name
+                                  "-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "12qjnm44yi55ffqxjpgrxy82s89yjziy84w2rfjjknsd8flj0mqz"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(;; Tests require a UEFI system and is not detected in the chroot.
+       #:tests? #f
+       #:make-flags (list (string-append "prefix=" %output)
+                          (string-append "libdir=" %output "/lib")
+                          (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("popt" ,popt)))
+    (home-page "https://github.com/rhinstaller/efivar")
+    (synopsis "Tool and library to manipulate EFI variables")
+    (description "This package provides a library and a command line
+interface to the variable facility of UEFI boot firmware.")
+    (license license:lgpl2.1+)))
+
+(define-public efibootmgr
+  (package
+    (name "efibootmgr")
+    (version "14")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/rhinstaller/" name
+                                  "/releases/download/" version "/" name
+                                  "-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1n3sydvpr6yl040hhf460k7mrxby7laqd9dqs6pq0js1hijc2zip"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; No tests.
+       #:make-flags (list (string-append "prefix=" %output)
+                          (string-append "libdir=" %output "/lib")
+                          ;; Override CFLAGS to add efivar include directory.
+                          (string-append "CFLAGS=-O2 -g -flto -I"
+                                         (assoc-ref %build-inputs "efivar")
+                                         "/include/efivar"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'branding
+           ;; Replace default loader path with something more familiar.
+           (lambda _
+             (substitute* "src/efibootmgr.c"
+               (("EFI\\\\\\\\redhat") ; Matches 'EFI\\redhat'.
+                "EFI\\\\gnu"))
+             #t))
+         (delete 'configure))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("efivar" ,efivar)
+       ("popt" ,popt)))
+    (home-page "https://github.com/rhinstaller/efibootmgr")
+    (synopsis "Modify the Extensible Firmware Interface (EFI) boot manager")
+    (description
+     "@code{efibootmgr} is a user-space application to modify the Intel
+Extensible Firmware Interface (EFI) Boot Manager.  This application can
+create and destroy boot entries, change the boot order, change the next
+running boot option, and more.")
+    (license license:gpl2+)))