summaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm204
1 files changed, 126 insertions, 78 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 152280efce..c454e40bda 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -22,7 +22,7 @@
;;; Copyright © 2017, 2018, 2020 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
-;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2019, 2021 Mathieu Othacehe <othacehe@gnu.org>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2017 nee <nee-git@hidamari.blue>
@@ -143,10 +143,10 @@
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xorg)
#:use-module (gnu packages groff)
- #:use-module (gnu packages rsync)
#:use-module (gnu packages selinux)
#:use-module (gnu packages swig)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system meson)
@@ -559,14 +559,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
,@(if (version>=? version "4.16")
`(("flex" ,flex)
("bison" ,bison))
- '())
- ,@(if (version>=? version "5.3")
- `(("rsync" ,rsync))
'())))
(arguments
`(#:modules ((guix build gnu-build-system)
(guix build utils)
- (srfi srfi-1))
+ (srfi srfi-1)
+ (ice-9 match))
#:phases
(modify-phases %standard-phases
(delete 'configure)
@@ -577,32 +575,37 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
(%current-system))))
(defconfig ,(system->defconfig
(or (%current-target-system)
- (%current-system)))))
+ (%current-system))))
+ (make-target ,(if (version>=? version "5.3")
+ "headers"
+ "headers_check")))
(setenv "ARCH" arch)
(format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
(invoke "make" defconfig)
- (invoke "make" "mrproper" "headers_check"))))
+ (invoke "make" "mrproper" make-target))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
- (invoke "make"
- (string-append "INSTALL_HDR_PATH=" out)
- "headers_install")
+
+ ;; Mimic the quiet_cmd_headers_install target to avoid a
+ ;; dependency on rsync.
+ (for-each (lambda (file)
+ (let ((destination (string-append
+ out "/include/"
+ ;; Drop the 'usr/include' prefix.
+ (match (string-split file #\/)
+ ((_ _ path ...)
+ (string-join path "/"))))))
+ (format #t "`~a' -> `~a'~%" file destination)
+ (install-file file (dirname destination))))
+ (find-files "usr/include" "\\.h$"))
(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))))
+ (format p "~a-default~%" ,version)))))))
#:allowed-references ()
#:tests? #f))
(home-page "https://www.gnu.org/software/linux-libre/")
@@ -644,11 +647,11 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
;; 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-5.4.20
- (make-linux-libre-headers "5.4.20"
- "1qxhf6dmcwjblzx8fgn6vr10p38xw10iwh6d1y1v1mxb25y30b47"))
+(define-public linux-libre-headers-5.10.35
+ (make-linux-libre-headers "5.10.35"
+ "0q2rnchad55d49f3rajrkazz0fcjv1irwrdb1hwjnl01fzm2gjk3"))
-(define-public linux-libre-headers linux-libre-headers-5.4.20)
+(define-public linux-libre-headers linux-libre-headers-5.10.35)
;;;
@@ -1605,7 +1608,7 @@ providing the system administrator with some help in common tasks.")
(define-public util-linux
(package
(name "util-linux")
- (version "2.35.1")
+ (version "2.36.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://kernel.org/linux/utils/"
@@ -1613,7 +1616,7 @@ providing the system administrator with some help in common tasks.")
"util-linux-" version ".tar.xz"))
(sha256
(base32
- "1yfpy6bkab4jw61mpx48gfy24yrqp4a7arvpis8csrkk53fkxpnr"))
+ "0psc0asjp1rmfx1j7468zfnk9nphlphybw2n8dcl74v8v2lnnlgp"))
(patches (search-patches "util-linux-tests.patch"))
(modules '((guix build utils)))
(snippet
@@ -1631,7 +1634,10 @@ providing the system administrator with some help in common tasks.")
"static")) ;2.9 MiB static .a libraries
(arguments
`(#:configure-flags (list "--disable-use-tty-group"
- "--enable-fs-paths-default=/run/current-system/profile/sbin"
+ (string-append
+ "--enable-fs-paths-default="
+ "/run/setuid-programs"
+ ":/run/current-system/profile/sbin")
;; Don't try to chown root:root mount and umount
"--disable-makeinstall-chown"
"--localstatedir=/var"
@@ -2176,24 +2182,96 @@ an executed process and the signals received by that process. It can also
intercept and print the system calls executed by the program.")
(license license:gpl2+)))
+(define-public alsa-ucm-conf
+ (package
+ (name "alsa-ucm-conf")
+ (version "1.2.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "ftp://ftp.alsa-project.org/pub/lib/" name "-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "0h6kzi1cfdqyxp4pwpqh5wb89c8s9wrgix315bvamffwfxf56frc"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan
+ '(("ucm" "share/alsa/ucm")
+ ("ucm2" "share/alsa/ucm2"))))
+ (home-page "https://www.alsa-project.org/wiki/Main_Page")
+ (synopsis "The Advanced Linux Sound Architecture Use Case Manager")
+ (description
+ "This package contains Advanced Linux Sound Architecture Use Case Manager
+configuration of audio input/output names and routing for specific audio
+hardware.")
+ (license license:bsd-3)))
+
+(define-public alsa-topology-conf
+ (package
+ (name "alsa-topology-conf")
+ (version "1.2.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "ftp://ftp.alsa-project.org/pub/lib/" name "-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "01zdg6q4s6d01k39z96wi4vbhrfw1i2g4yi5dijwfk6a5vjfdq2m"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan
+ '(("topology" "share/alsa/topology"))))
+ (home-page "https://www.alsa-project.org/wiki/Main_Page")
+ (synopsis "The Advanced Linux Sound Architecture libraries")
+ (description
+ "This package contains Advanced Linux Sound Architecture topology
+configuration files that can be used for specific audio hardware.")
+ (license license:bsd-3)))
+
(define-public alsa-lib
(package
(name "alsa-lib")
(version "1.2.4")
(source (origin
- (method url-fetch)
- (uri (string-append
- "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
- version ".tar.bz2"))
- (sha256
- (base32
- "1xq8d48wfy59qw4x7383j32n8j5njndw5hcgnmlg9pvclphlnmgp"))))
+ (method url-fetch)
+ (uri (string-append
+ "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "1xq8d48wfy59qw4x7383j32n8j5njndw5hcgnmlg9pvclphlnmgp"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
(assoc-ref %outputs "out")
- "/lib"))))
- (home-page "https://www.alsa-project.org/")
+ "/lib"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'pre-install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((ucm
+ (string-append (assoc-ref inputs "alsa-ucm-conf")))
+ (topology
+ (string-append (assoc-ref inputs "alsa-topology-conf")))
+ (alsa
+ (string-append (assoc-ref outputs "out") "/share/alsa"))
+ (ucm-share
+ (string-append ucm "/share/alsa/ucm"))
+ (ucm2-share
+ (string-append ucm "/share/alsa/ucm2"))
+ (topology-share
+ (string-append topology "/share/alsa/topology")))
+ (mkdir-p alsa)
+ (symlink ucm-share (string-append alsa "/ucm"))
+ (symlink ucm2-share (string-append alsa "/ucm2"))
+ (symlink topology-share (string-append alsa "/topology")))
+ #t)))))
+ (inputs
+ `(("alsa-ucm-conf" ,alsa-ucm-conf)
+ ("alsa-topology-conf" ,alsa-topology-conf)))
+ (home-page "https://www.alsa-project.org/wiki/Main_Page")
(synopsis "The Advanced Linux Sound Architecture libraries")
(description
"The Advanced Linux Sound Architecture (ALSA) provides audio and
@@ -2605,10 +2683,10 @@ network hardware types (plipconfig, slattach) and advanced aspects of IP
configuration (iptunnel, ipmaddr).")
(license license:gpl2+))))
-(define-public libcap-2.31
+(define-public libcap
(package
(name "libcap")
- (version "2.31")
+ (version "2.49")
(source (origin
(method url-fetch)
(uri (string-append
@@ -2616,7 +2694,7 @@ configuration (iptunnel, ipmaddr).")
"libcap2/libcap-" version ".tar.xz"))
(sha256
(base32
- "0ikwm0kngrqa4ci80lqnrkk17kg09q7dxrz28y0gm5qw3vj8s266"))))
+ "10g13s1kihqpvrvmfl2w8s18icqjlz8hy2vkhz3jw2256vcw92z9"))))
(build-system gnu-build-system)
(arguments '(#:phases
(modify-phases %standard-phases
@@ -2624,10 +2702,9 @@ configuration (iptunnel, ipmaddr).")
;; Add $libdir to the RUNPATH of executables.
(lambda _
(substitute* "Make.Rules"
- (("LDFLAGS := #-g")
- (string-append "LDFLAGS := -Wl,-rpath="
- %output "/lib")))
- #t)))
+ (("LDFLAGS \\?= #-g")
+ (string-append "LDFLAGS ?= -Wl,-rpath="
+ %output "/lib"))))))
#:test-target "test"
#:make-flags (list "lib=lib"
(string-append "prefix="
@@ -2644,37 +2721,6 @@ Linux-based operating systems.")
;; License is BSD-3 or GPLv2, at the user's choice.
(license license:gpl2)))
-;; libcap 2.31 has problems with newer kernels, so provide this newer variant.
-;; Keep the old libcap around to avoid rebuilding 'coreutils' and 'avahi'.
-;; To be merged with libcap on the next rebuild cycle.
-(define-public libcap
- (package
- (inherit libcap-2.31)
- (version "2.45")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "mirror://kernel.org/linux/libs/security/linux-privs/"
- "libcap2/libcap-" version ".tar.xz"))
- (sha256
- (base32
- "11ijmi7jik9iw6pdszc6bylhggghr8cza03bcrbhbqf0cpvkjrnn"))))
- (arguments
- (substitute-keyword-arguments (package-arguments libcap-2.31)
- ((#:phases phases)
- `(modify-phases ,phases
- (replace 'configure
- (lambda _
- ;; Add $libdir to the RUNPATH of executables.
- (substitute* "Make.Rules"
- (("LDFLAGS \\?= #-g")
- (string-append "LDFLAGS ?= -Wl,-rpath="
- %output "/lib")))
- #t))))))))
-
-(define-deprecated libcap/next libcap)
-(export libcap/next)
-
(define-public bridge-utils
(package
(name "bridge-utils")
@@ -3359,7 +3405,7 @@ to use Linux' inotify mechanism, which allows file accesses to be monitored.")
(define-public kmod
(package
(name "kmod")
- (version "27")
+ (version "28")
(source (origin
(method url-fetch)
(uri
@@ -3367,11 +3413,13 @@ to use Linux' inotify mechanism, which allows file accesses to be monitored.")
"kmod-" version ".tar.xz"))
(sha256
(base32
- "035wzfzjx4nwidk747p8n085mgkvy531ppn16krrajx2dkqzply1"))
+ "0v52nghxzd69jnk8mr4900qlk1rg8hf0hdv34n281afs2c7zqs9r"))
(patches (search-patches "kmod-module-directory.patch"))))
(build-system gnu-build-system)
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ;; For tests.
+ ("zstd" ,zstd)))
(inputs
`(("xz" ,xz)
("zlib" ,zlib)))
@@ -7900,7 +7948,7 @@ headers.")
(lambda (python-executable)
(format #t "Wrapping: ~A.~%" python-executable)
(wrap-program python-executable
- `("PYTHONPATH" ":" prefix
+ `("GUIX_PYTHONPATH" ":" prefix
(,(string-append lib
"/python"
,(version-major+minor