gnu: linux-libre: Update deblobbing scripts.
[jackhill/guix/guix.git] / gnu / packages / linux.scm
index 32c67b0..3f9103a 100644 (file)
@@ -35,6 +35,7 @@
 ;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2019 Stefan Stefanović <stefanx2ovic@gmail.com>
+;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages samba)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages slang)
-  #:use-module (gnu packages storage)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix gexp)
+  #:use-module (guix store)
+  #:use-module (guix monads)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-2)
@@ -155,6 +158,174 @@ defconfig.  Return the appropriate make target if applicable, otherwise return
         ((string-prefix? "powerpc64le-" system) "ppc64_defconfig")
         (else "defconfig")))
 
+\f
+;;;
+;;; Kernel source code deblobbing.
+;;;
+
+(define (linux-libre-deblob-scripts version
+                                    deblob-hash
+                                    deblob-check-hash)
+  (list (version-major+minor version)
+        (origin
+          (method url-fetch)
+          (uri (string-append "https://linux-libre.fsfla.org"
+                              "/pub/linux-libre/releases/" version "-gnu/"
+                              "deblob-" (version-major+minor version)))
+          (sha256 deblob-hash))
+        (origin
+          (method url-fetch)
+          (uri (string-append "https://linux-libre.fsfla.org"
+                              "/pub/linux-libre/releases/" version "-gnu/"
+                              "deblob-check"))
+          (sha256 deblob-check-hash))))
+
+(define deblob-scripts-5.2
+  (linux-libre-deblob-scripts
+   "5.2.3"
+   (base32 "076fwxlm6jq6z4vg1xq3kr474zz7qk71r90sf9dnfia3rw2pb4fa")
+   (base32 "0d3pp1bqchqc7vnxr1a56km5r0hzjiiipzz2xc3wgjwfi51k9kxc")))
+
+(define deblob-scripts-4.19
+  (linux-libre-deblob-scripts
+   "4.19.61"
+   (base32 "02zs405awaxydbapka4nz8h6lmnc0dahgczqsrs5s2bmzjyyqkcy")
+   (base32 "1fyacg28aym6virxyn7wk99qil2fjbks3iwm7p3hxy51pccn34za")))
+
+(define deblob-scripts-4.14
+  (linux-libre-deblob-scripts
+   "4.14.134"
+   (base32 "091jk9jkn9jf39bxpc7395bhcb7p96nkg3a8047380ki06lnfxh6")
+   (base32 "0x9nd3hnyrm753cbgdqmy92mbnyw86w64g4hvyibnkpq5n7s3z9n")))
+
+(define deblob-scripts-4.9
+  (linux-libre-deblob-scripts
+   "4.9.186"
+   (base32 "1wvldzlv7q2xdbadas87dh593nxr4a8p5n0f8zpm72lja6w18hmg")
+   (base32 "1gmjn5cwxydg6qb47wcmahwkv37npsjx4papynzkkdxyidmrccya")))
+
+(define deblob-scripts-4.4
+  (linux-libre-deblob-scripts
+   "4.4.186"
+   (base32 "0x2j1i88am54ih2mk7gyl79g25l9zz4r08xhl482l3fvjj2irwbw")
+   (base32 "1x40lbiaizksy8z38ax7wpqr9ldgq7qvkxbb0ca98vd1axpklb10")))
+
+(define* (computed-origin-method gexp-promise hash-algo hash
+                                 #:optional (name "source")
+                                 #:key (system (%current-system))
+                                 (guile (default-guile)))
+  "Return a derivation that executes the G-expression that results
+from forcing GEXP-PROMISE."
+  (mlet %store-monad ((guile (package->derivation guile system)))
+    (gexp->derivation (or name "computed-origin")
+                      (force gexp-promise)
+                      #:graft? #f       ;nothing to graft
+                      #:system system
+                      #:guile-for-build guile)))
+
+(define (make-linux-libre-source version
+                                 upstream-source
+                                 deblob-scripts)
+  "Return a 'computed' origin that generates a Linux-libre tarball from the
+corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
+  (match deblob-scripts
+    ((deblob-version (? origin? deblob) (? origin? deblob-check))
+     (unless (string=? deblob-version (version-major+minor version))
+       ;; The deblob script cannot be expected to work properly on a
+       ;; different version (major+minor) of Linux, even if no errors
+       ;; are signaled during execution.
+       (error "deblob major+minor version mismatch"))
+     (origin
+       (method computed-origin-method)
+       (file-name (string-append "linux-libre-" version "-guix.tar.xz"))
+       (sha256 #f)
+       (uri
+        (delay
+          (with-imported-modules '((guix build utils))
+            #~(begin
+                (use-modules (guix build utils)
+                             (srfi srfi-1)
+                             (ice-9 match)
+                             (ice-9 ftw))
+                (let ((dir (string-append "linux-" #$version)))
+
+                  (mkdir "/tmp/bin")
+                  (set-path-environment-variable
+                   "PATH" '("bin")
+                   (list "/tmp"
+                         #+(canonical-package bash)
+                         #+(canonical-package coreutils)
+                         #+(canonical-package diffutils)
+                         #+(canonical-package findutils)
+                         #+(canonical-package patch)
+                         #+(canonical-package xz)
+                         #+(canonical-package sed)
+                         #+(canonical-package grep)
+                         #+(canonical-package bzip2)
+                         #+(canonical-package gzip)
+                         #+(canonical-package tar)
+                         ;; The comments in the 'deblob-check' script
+                         ;; claim that it supports Python 2 and 3, but
+                         ;; in fact it fails when run in Python 3 as
+                         ;; of version 5.1.3.
+                         #+python-2))
+
+                  (with-directory-excursion "/tmp/bin"
+
+                    (copy-file #+deblob "deblob")
+                    (chmod "deblob" #o755)
+                    (substitute* "deblob"
+                      (("/bin/sh") (which "sh")))
+
+                    (copy-file #+deblob-check "deblob-check")
+                    (chmod "deblob-check" #o755)
+                    (substitute* "deblob-check"
+                      (("/bin/sh") (which "sh"))
+                      (("/bin/sed") (which "sed"))
+                      (("/usr/bin/python") (which "python"))))
+
+                  (if (file-is-directory? #+upstream-source)
+                      (begin
+                        (format #t "Copying upstream linux source...~%")
+                        (force-output)
+                        (invoke "cp" "--archive" #+upstream-source dir)
+                        (invoke "chmod" "--recursive" "u+w" dir))
+                      (begin
+                        (format #t "Unpacking upstream linux tarball...~%")
+                        (force-output)
+                        (invoke "tar" "xf" #$upstream-source)
+                        (match (scandir "."
+                                        (lambda (name)
+                                          (and (not (member name '("." "..")))
+                                               (file-is-directory? name))))
+                          ((unpacked-dir)
+                           (unless (string=? dir unpacked-dir)
+                             (rename-file unpacked-dir dir)))
+                          (dirs
+                           (error "multiple directories found" dirs)))))
+
+                  (with-directory-excursion dir
+                    (setenv "PYTHON" (which "python"))
+                    (format #t "Running deblob script...~%")
+                    (force-output)
+                    (invoke "/tmp/bin/deblob"))
+
+                  (format #t "~%Packing new Linux-libre tarball...~%")
+                  (force-output)
+                  (invoke "tar" "cvfa" #$output
+                          ;; Avoid non-determinism in the archive.
+                          "--mtime=@0"
+                          "--owner=root:0"
+                          "--group=root:0"
+                          "--sort=name"
+                          "--hard-dereference"
+                          dir))))))))))
+
+\f
+;;;
+;;; Kernel sources.
+;;;
+
 (define (linux-libre-urls version)
   "Return a list of URLs for Linux-Libre VERSION."
   (list (string-append
@@ -171,14 +342,121 @@ defconfig.  Return the appropriate make target if applicable, otherwise return
          "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
          version "-gnu.tar.xz")))
 
-(define (make-linux-libre-headers version hash)
+(define (%upstream-linux-source version hash)
+  (origin
+    (method url-fetch)
+    (uri (string-append "mirror://kernel.org"
+                        "/linux/kernel/v" (version-major version) ".x/"
+                        "linux-" version ".tar.xz"))
+    (sha256 hash)))
+
+(define-public linux-libre-5.2-version "5.2.2")
+(define-public linux-libre-5.2-pristine-source
+  (let ((version linux-libre-5.2-version)
+        (hash (base32 "173da67d51qcjwrczqsfd6g9phzazqzr11xfxwlf54ckd6117ng5")))
+   (make-linux-libre-source version
+                            (%upstream-linux-source version hash)
+                            deblob-scripts-5.2)))
+
+(define-public linux-libre-4.19-version "4.19.60")
+(define-public linux-libre-4.19-pristine-source
+  (let ((version linux-libre-4.19-version)
+        (hash (base32 "0ibayrvrnw2lw7si78vdqnr20mm1d3z0g6a0ykndvgn5vdax5x9a")))
+    (make-linux-libre-source version
+                             (%upstream-linux-source version hash)
+                             deblob-scripts-4.19)))
+
+(define-public linux-libre-4.14-version "4.14.134")
+(define-public linux-libre-4.14-pristine-source
+  (let ((version linux-libre-4.14-version)
+        (hash (base32 "0b9xj1rwr5fpw2giirfghzxxc0wp1hwf4nqvalx314pxxysyf88b")))
+    (make-linux-libre-source version
+                             (%upstream-linux-source version hash)
+                             deblob-scripts-4.14)))
+
+(define-public linux-libre-4.9-version "4.9.186")
+(define-public linux-libre-4.9-pristine-source
+  (let ((version linux-libre-4.9-version)
+        (hash (base32 "0sjbp7m6d625rw06wv34a0805d1lgldii4pxiqfpja871m1q8914")))
+    (make-linux-libre-source version
+                             (%upstream-linux-source version hash)
+                             deblob-scripts-4.9)))
+
+(define-public linux-libre-4.4-version "4.4.186")
+(define-public linux-libre-4.4-pristine-source
+  (let ((version linux-libre-4.4-version)
+        (hash (base32 "113rjf8842glzi23y1g1yrwncihv2saah6wz0r726r06bk9p64hb")))
+    (make-linux-libre-source version
+                             (%upstream-linux-source version hash)
+                             deblob-scripts-4.4)))
+
+(define %boot-logo-patch
+  ;; Linux-Libre boot logo featuring Freedo and a gnu.
+  (origin
+    (method url-fetch)
+    (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
+                        "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
+    (sha256
+     (base32
+      "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
+
+(define %linux-libre-arm-export-__sync_icache_dcache-patch
+  (origin
+    (method url-fetch)
+    (uri (string-append
+          "https://salsa.debian.org/kernel-team/linux"
+          "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0"
+          "/debian/patches/bugfix/arm/"
+          "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch"))
+    (file-name "linux-libre-arm-export-__sync_icache_dcache.patch")
+    (sha256
+     (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f"))))
+
+(define (source-with-patches source patches)
+  (origin
+    (inherit source)
+    (patches (append (origin-patches source)
+                     patches))))
+
+(define-public linux-libre-5.2-source
+  (source-with-patches linux-libre-5.2-pristine-source
+                       (list %boot-logo-patch
+                             %linux-libre-arm-export-__sync_icache_dcache-patch)))
+
+(define-public linux-libre-4.19-source
+  (source-with-patches linux-libre-4.19-pristine-source
+                       (list %boot-logo-patch
+                             %linux-libre-arm-export-__sync_icache_dcache-patch)))
+
+(define-public linux-libre-4.14-source
+  (source-with-patches linux-libre-4.14-pristine-source
+                       (list %boot-logo-patch)))
+
+(define-public linux-libre-4.9-source
+  (source-with-patches linux-libre-4.9-pristine-source
+                       (list %boot-logo-patch)))
+
+(define-public linux-libre-4.4-source
+  (source-with-patches linux-libre-4.4-pristine-source
+                       (list %boot-logo-patch)))
+
+\f
+;;;
+;;; Kernel headers.
+;;;
+
+(define (make-linux-libre-headers version hash-string)
+  (make-linux-libre-headers* version
+                             (origin
+                               (method url-fetch)
+                               (uri (linux-libre-urls version))
+                               (sha256 (base32 hash-string)))))
+
+(define (make-linux-libre-headers* version source)
   (package
     (name "linux-libre-headers")
     (version version)
-    (source (origin
-             (method url-fetch)
-             (uri (linux-libre-urls version))
-             (sha256 (base32 hash))))
+    (source source)
     (build-system gnu-build-system)
     (native-inputs `(("perl" ,perl)
                      ,@(if (version>=? version "4.16")
@@ -232,27 +510,38 @@ defconfig.  Return the appropriate make target if applicable, otherwise return
     (description "Headers of the Linux-Libre kernel.")
     (license license:gpl2)))
 
-(define %boot-logo-patch
-  ;; Linux-Libre boot logo featuring Freedo and a gnu.
-  (origin
-    (method url-fetch)
-    (uri (string-append "http://www.fsfla.org/svn/fsfla/software/linux-libre/"
-                        "lemote/gnewsense/branches/3.16/100gnu+freedo.patch"))
-    (sha256
-     (base32
-      "1hk9swxxc80bmn2zd2qr5ccrjrk28xkypwhl4z0qx4hbivj7qm06"))))
+(define-public linux-libre-headers-5.2
+  (make-linux-libre-headers* linux-libre-5.2-version
+                             linux-libre-5.2-source))
 
-(define %linux-libre-arm-export-__sync_icache_dcache-patch
-  (origin
-    (method url-fetch)
-    (uri (string-append
-          "https://salsa.debian.org/kernel-team/linux"
-          "/raw/34a7d9011fcfcfa38b68282fd2b1a8797e6834f0"
-          "/debian/patches/bugfix/arm/"
-          "arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch"))
-    (file-name "linux-libre-arm-export-__sync_icache_dcache.patch")
-    (sha256
-     (base32 "1ifnfhpakzffn4b8n7x7w5cps9mzjxlkcfz9zqak2vaw8nzvl39f"))))
+(define-public linux-libre-headers-4.19
+  (make-linux-libre-headers* linux-libre-4.19-version
+                             linux-libre-4.19-source))
+
+(define-public linux-libre-headers-4.14
+  (make-linux-libre-headers* linux-libre-4.14-version
+                             linux-libre-4.14-source))
+
+(define-public linux-libre-headers-4.9
+  (make-linux-libre-headers* linux-libre-4.9-version
+                             linux-libre-4.9-source))
+
+(define-public linux-libre-headers-4.4
+  (make-linux-libre-headers* linux-libre-4.4-version
+                             linux-libre-4.4-source))
+
+;; The following package is used in the early bootstrap, and thus must be kept
+;; stable and with minimal build requirements.
+(define-public linux-libre-headers-4.14.67
+  (make-linux-libre-headers "4.14.67"
+                            "050zvdxjy6sc64q75pr1gxsmh49chwav2pwxz8xlif39bvahnrpg"))
+
+(define-public linux-libre-headers linux-libre-headers-4.14.67)
+
+\f
+;;;
+;;; Kernel configurations.
+;;;
 
 (define* (kernel-config arch #:key variant)
   "Return the absolute file name of the Linux-Libre build configuration file
@@ -272,7 +561,9 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
     (search-auxiliary-file file)))
 
 (define %default-extra-linux-options
-  `(;; Modules required for initrd:
+  `(;; Some very mild hardening.
+    ("CONFIG_SECURITY_DMESG_RESTRICT" . #t)
+    ;; Modules required for initrd:
     ("CONFIG_NET_9P" . m)
     ("CONFIG_NET_9P_VIRTIO" . m)
     ("CONFIG_VIRTIO_BLK" . m)
@@ -295,7 +586,12 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
                     options)
                "\n"))
 
-(define* (make-linux-libre version hash supported-systems
+\f
+;;;
+;;; Kernel package utilities.
+;;;
+
+(define* (make-linux-libre version hash-string supported-systems
                            #:key
                            ;; A function that takes an arch and a variant.
                            ;; See kernel-config for an example.
@@ -304,16 +600,32 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
                            (defconfig "defconfig")
                            (extra-options %default-extra-linux-options)
                            (patches (list %boot-logo-patch)))
+  (make-linux-libre* version
+                     (origin
+                       (method url-fetch)
+                       (uri (linux-libre-urls version))
+                       (sha256 (base32 hash-string))
+                       (patches patches))
+                     supported-systems
+                     #:extra-version extra-version
+                     #:configuration-file configuration-file
+                     #:defconfig defconfig
+                     #:extra-options extra-options))
+
+(define* (make-linux-libre* version source supported-systems
+                            #:key
+                            ;; A function that takes an arch and a variant.
+                            ;; See kernel-config for an example.
+                            (extra-version #f)
+                            (configuration-file #f)
+                            (defconfig "defconfig")
+                            (extra-options %default-extra-linux-options))
   (package
     (name (if extra-version
               (string-append "linux-libre-" extra-version)
               "linux-libre"))
     (version version)
-    (source (origin
-              (method url-fetch)
-              (uri (linux-libre-urls version))
-              (sha256 (base32 hash))
-              (patches patches)))
+    (source source)
     (supported-systems supported-systems)
     (build-system gnu-build-system)
     (native-inputs
@@ -355,11 +667,6 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
              (substitute* (find-files "." "^Makefile(\\.include)?$")
                (("/bin/pwd") "pwd"))
              #t))
-         (add-before 'configure 'work-around-gcc-7-include-path-issue
-           (lambda _
-             (unsetenv "C_INCLUDE_PATH")
-             (unsetenv "CPLUS_INCLUDE_PATH")
-             #t))
          (replace 'configure
            (lambda* (#:key inputs native-inputs target #:allow-other-keys)
              ;; Avoid introducing timestamps
@@ -430,133 +737,105 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
 It has been modified to remove all non-free binary blobs.")
     (license license:gpl2)))
 
-(define %linux-libre-version "5.1.12")
-(define %linux-libre-hash "0rzm3ixazqxfn767yayyf3ib889igg9nq7acf2wqcsmwbrrh5zcc")
-
-(define %linux-libre-5.1-patches
-  (list %boot-logo-patch
-        %linux-libre-arm-export-__sync_icache_dcache-patch))
-
-(define-public linux-libre-5.1
-  (make-linux-libre %linux-libre-version
-                    %linux-libre-hash
-                    '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
-                    #:patches %linux-libre-5.1-patches
-                    #:configuration-file kernel-config))
-
-(define-public linux-libre-headers-5.1
-  (make-linux-libre-headers %linux-libre-version
-                            %linux-libre-hash))
+\f
+;;;
+;;; Generic kernel packages.
+;;;
 
-(define %linux-libre-4.19-version "4.19.53")
-(define %linux-libre-4.19-hash "0bk024a7s4my4hf6i7gfg64lill19i4b8x0x3hfsqyy6j153pjlg")
+(define-public linux-libre-5.2
+  (make-linux-libre* linux-libre-5.2-version
+                     linux-libre-5.2-source
+                     '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
+                     #:configuration-file kernel-config))
 
-(define %linux-libre-4.19-patches
-  (list %boot-logo-patch
-        %linux-libre-arm-export-__sync_icache_dcache-patch))
+(define-public linux-libre-version         linux-libre-5.2-version)
+(define-public linux-libre-pristine-source linux-libre-5.2-pristine-source)
+(define-public linux-libre-source          linux-libre-5.2-source)
+(define-public linux-libre                 linux-libre-5.2)
 
 (define-public linux-libre-4.19
-  (make-linux-libre %linux-libre-4.19-version
-                    %linux-libre-4.19-hash
-                    '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
-                    #:patches %linux-libre-4.19-patches
-                    #:configuration-file kernel-config))
-
-(define-public linux-libre-headers-4.19
-  (make-linux-libre-headers %linux-libre-4.19-version
-                            %linux-libre-4.19-hash))
-
-(define %linux-libre-4.14-version "4.14.129")
-(define %linux-libre-4.14-hash "0aw37l5c6hpgzqjawyq3rd7csp92x8mhy785mf0hg0i9smyfg767")
+  (make-linux-libre* linux-libre-4.19-version
+                     linux-libre-4.19-source
+                     '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
+                     #:configuration-file kernel-config))
 
 (define-public linux-libre-4.14
-  (make-linux-libre %linux-libre-4.14-version
-                    %linux-libre-4.14-hash
-                    '("x86_64-linux" "i686-linux" "armhf-linux")
-                    #:configuration-file kernel-config))
-
-(define-public linux-libre-headers-4.14
-  (make-linux-libre-headers %linux-libre-4.14-version
-                            %linux-libre-4.14-hash))
+  (make-linux-libre* linux-libre-4.14-version
+                     linux-libre-4.14-source
+                     '("x86_64-linux" "i686-linux" "armhf-linux")
+                     #:configuration-file kernel-config))
 
 (define-public linux-libre-4.9
-  (make-linux-libre "4.9.183"
-                    "1w3syih3fggwkpcl6zkmm9f6577r2jvack4br5ffccgcddkz52ia"
-                    '("x86_64-linux" "i686-linux")
-                    #:configuration-file kernel-config))
+  (make-linux-libre* linux-libre-4.9-version
+                     linux-libre-4.9-source
+                     '("x86_64-linux" "i686-linux")
+                     #:configuration-file kernel-config))
 
 (define-public linux-libre-4.4
-  (make-linux-libre "4.4.183"
-                    "1v21n5kwnv9n18gfp2dz9hsdkwmfwigalr82xsnwbzhs0x561bxx"
-                    '("x86_64-linux" "i686-linux")
-                    #:configuration-file kernel-config
-                    #:extra-options
-                    (append
-                     `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
-                       ;; This option was removed upstream in version 4.7.
-                       ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t))
-                     %default-extra-linux-options)))
-
-(define-public linux-libre-arm-veyron
-  (make-linux-libre %linux-libre-version
-                    %linux-libre-hash
-                    '("armhf-linux")
-                    #:patches %linux-libre-5.1-patches
-                    #:configuration-file kernel-config-veyron
-                    #:extra-version "arm-veyron"))
+  (make-linux-libre* linux-libre-4.4-version
+                     linux-libre-4.4-source
+                     '("x86_64-linux" "i686-linux")
+                     #:configuration-file kernel-config
+                     #:extra-options
+                     (append
+                      `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
+                        ;; This option was removed upstream in version 4.7.
+                        ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t))
+                      %default-extra-linux-options)))
 
-(define-public linux-libre-headers-4.14.67
-  (make-linux-libre-headers "4.14.67"
-                            "050zvdxjy6sc64q75pr1gxsmh49chwav2pwxz8xlif39bvahnrpg"))
+\f
+;;;
+;;; Specialized kernel variants.
+;;;
 
-(define-public linux-libre-headers linux-libre-headers-4.14.67)
-(define-public linux-libre linux-libre-5.1)
+(define-public linux-libre-arm-veyron
+  (make-linux-libre* linux-libre-version
+                     linux-libre-source
+                     '("armhf-linux")
+                     #:configuration-file kernel-config-veyron
+                     #:extra-version "arm-veyron"))
 
 (define-public linux-libre-arm-generic
-  (make-linux-libre %linux-libre-version
-                    %linux-libre-hash
-                    '("armhf-linux")
-                    #:patches %linux-libre-5.1-patches
-                    #:defconfig "multi_v7_defconfig"
-                    #:extra-version "arm-generic"))
+  (make-linux-libre* linux-libre-version
+                     linux-libre-source
+                     '("armhf-linux")
+                     #:defconfig "multi_v7_defconfig"
+                     #:extra-version "arm-generic"))
 
 (define-public linux-libre-arm-generic-4.19
-  (make-linux-libre %linux-libre-4.19-version
-                    %linux-libre-4.19-hash
-                    '("armhf-linux")
-                    #:patches %linux-libre-4.19-patches
-                    #:defconfig "multi_v7_defconfig"
-                    #:extra-version "arm-generic"))
+  (make-linux-libre* linux-libre-4.19-version
+                     linux-libre-4.19-source
+                     '("armhf-linux")
+                     #:defconfig "multi_v7_defconfig"
+                     #:extra-version "arm-generic"))
 
 (define-public linux-libre-arm-generic-4.14
-  (make-linux-libre %linux-libre-4.14-version
-                    %linux-libre-4.14-hash
-                    '("armhf-linux")
-                    #:defconfig "multi_v7_defconfig"
-                    #:extra-version "arm-generic"))
+  (make-linux-librelinux-libre-4.14-version
+                     linux-libre-4.14-source
+                     '("armhf-linux")
+                     #:defconfig "multi_v7_defconfig"
+                     #:extra-version "arm-generic"))
 
 (define-public linux-libre-arm-omap2plus
-  (make-linux-libre %linux-libre-version
-                    %linux-libre-hash
-                    '("armhf-linux")
-                    #:patches %linux-libre-5.1-patches
-                    #:defconfig "omap2plus_defconfig"
-                    #:extra-version "arm-omap2plus"))
+  (make-linux-libre* linux-libre-version
+                     linux-libre-source
+                     '("armhf-linux")
+                     #:defconfig "omap2plus_defconfig"
+                     #:extra-version "arm-omap2plus"))
 
 (define-public linux-libre-arm-omap2plus-4.19
-  (make-linux-libre %linux-libre-4.19-version
-                    %linux-libre-4.19-hash
-                    '("armhf-linux")
-                    #:patches %linux-libre-4.19-patches
-                    #:defconfig "omap2plus_defconfig"
-                    #:extra-version "arm-omap2plus"))
+  (make-linux-libre* linux-libre-4.19-version
+                     linux-libre-4.19-source
+                     '("armhf-linux")
+                     #:defconfig "omap2plus_defconfig"
+                     #:extra-version "arm-omap2plus"))
 
 (define-public linux-libre-arm-omap2plus-4.14
-  (make-linux-libre %linux-libre-4.14-version
-                    %linux-libre-4.14-hash
-                    '("armhf-linux")
-                    #:defconfig "omap2plus_defconfig"
-                    #:extra-version "arm-omap2plus"))
+  (make-linux-librelinux-libre-4.14-version
+                     linux-libre-4.14-source
+                     '("armhf-linux")
+                     #:defconfig "omap2plus_defconfig"
+                     #:extra-version "arm-omap2plus"))
 
 \f
 ;;;
@@ -1411,7 +1690,7 @@ that the Ethernet protocol is much simpler than the IP protocol.")
 (define-public iproute
   (package
     (name "iproute2")
-    (version "5.1.0")
+    (version "5.2.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1419,7 +1698,7 @@ that the Ethernet protocol is much simpler than the IP protocol.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "1kvvrz5mlpjxqcm7vl6i8w6l1cb2amp6p5xyq006pgzafc49hnnw"))))
+                "1a2dywa2kam24951byv9pl32mb9z6klh7d4vp8fwfgrm4vn5vfd5"))))
     (build-system gnu-build-system)
     (arguments
      `( ;; There is a test suite, but it wants network namespaces and sudo.
@@ -3254,7 +3533,7 @@ arrays when needed.")
 (define-public multipath-tools
   (package
     (name "multipath-tools")
-    (version "0.7.9")
+    (version "0.8.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://git.opensvc.com/?p=multipath-tools/"
@@ -3262,7 +3541,7 @@ arrays when needed.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1jhi6bhl4ih75rfmyyjxd35ghgch5ls1gw40cjxwy9d6bd41z6q1"))
+                "0kb4mhzwyygdbikikmby6hj39pb3nrzv05v526c75wnycwnpxg31"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -3306,8 +3585,7 @@ arrays when needed.")
        ("pkg-config" ,pkg-config)
        ("valgrind" ,valgrind)))
     (inputs
-     `(("ceph:lib" ,ceph "lib")
-       ("json-c" ,json-c)
+     `(("json-c" ,json-c)
        ("libaio" ,libaio)
        ("liburcu" ,liburcu)
        ("lvm2" ,lvm2)
@@ -3544,7 +3822,7 @@ and copy/paste text in the console and in xterm.")
 (define-public btrfs-progs
   (package
     (name "btrfs-progs")
-    (version "5.1")
+    (version "5.1.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://kernel.org/linux/kernel/"
@@ -3552,7 +3830,7 @@ and copy/paste text in the console and in xterm.")
                                   "btrfs-progs-v" version ".tar.xz"))
               (sha256
                (base32
-                "0dgh56pamav8wb9nmabjwdlpcazvqc9pgzwablxn77mqh0qrhkaq"))))
+                "06xybs7rglxjqkbzl2409acb3rgmnc5zc0xhyaxsc2p1x5yipfcw"))))
     (build-system gnu-build-system)
     (outputs '("out"
                "static"))      ; static versions of the binaries in "out"
@@ -3586,7 +3864,8 @@ and copy/paste text in the console and in xterm.")
               ("lzo" ,lzo)
               ("zlib" ,zlib)
               ("zlib:static" ,zlib "static")
-              ("zstd" ,zstd)))
+              ("zstd" ,zstd "lib")
+              ("zstd:static" ,zstd "static")))
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("asciidoc" ,asciidoc)
                      ("python" ,python)