aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm259
1 files changed, 173 insertions, 86 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index c3f6502d45..b3f46c0305 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -22,7 +22,7 @@
;;; Copyright © 2017, 2018 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 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2017 nee <nee-git@hidamari.blue>
@@ -60,7 +60,6 @@
#:use-module (gnu packages acl)
#:use-module (gnu packages admin)
#:use-module (gnu packages algebra)
- #:use-module (gnu packages attr)
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
#:use-module (gnu packages backup)
@@ -1105,7 +1104,7 @@ providing the system administrator with some help in common tasks.")
(define-public util-linux
(package
(name "util-linux")
- (version "2.34")
+ (version "2.35.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://kernel.org/linux/utils/"
@@ -1113,7 +1112,7 @@ providing the system administrator with some help in common tasks.")
"util-linux-" version ".tar.xz"))
(sha256
(base32
- "1db2kydkwjmvgd1glkcba3adhidxw0f1x735dcjdpdjjf869sgvl"))
+ "1yfpy6bkab4jw61mpx48gfy24yrqp4a7arvpis8csrkk53fkxpnr"))
(patches (search-patches "util-linux-tests.patch"))
(modules '((guix build utils)))
(snippet
@@ -1126,19 +1125,33 @@ providing the system administrator with some help in common tasks.")
(("build_kill=yes") "build_kill=no"))
#t))))
(build-system gnu-build-system)
- (outputs '("out"
- "static")) ;>2 MiB of static .a libraries
+ (outputs '("out" ;6.4 MiB executables and documentation
+ "lib" ;8.8 MiB shared libraries, headers and locales
+ "static")) ;2.9 MiB static .a libraries
(arguments
`(#:configure-flags (list "--disable-use-tty-group"
"--enable-fs-paths-default=/run/current-system/profile/sbin"
;; Don't try to chown root:root mount and umount
"--disable-makeinstall-chown"
+ "--localstatedir=/var"
+ (string-append "--localedir="
+ (assoc-ref %outputs "lib")
+ "/share/locale")
;; Install completions where our
;; bash-completion package expects them.
(string-append "--with-bashcompletiondir="
(assoc-ref %outputs "out")
"/etc/bash_completion.d"))
#:phases (modify-phases %standard-phases
+ (add-before 'configure 'patch-build-scripts
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "configure"
+ ;; The build system assumes that we want to install
+ ;; libraries below $exec_prefix when $libdir does not
+ ;; match any of the "usual" locations. Fix that.
+ (("usrlib_execdir='\\$\\{exec_prefix\\}'\\$libdir")
+ "usrlib_execdir=$libdir"))
+ #t))
(add-before 'build 'set-umount-file-name
(lambda* (#:key outputs #:allow-other-keys)
;; Tell 'eject' the right file name of 'umount'.
@@ -1155,13 +1168,19 @@ providing the system administrator with some help in common tasks.")
(substitute* "tests/ts/misc/mcookie"
(("/etc/services")
(string-append net "/etc/services")))
+
+ ;; The C.UTF-8 locale does not exist in our libc.
+ (substitute* "tests/ts/column/invalid-multibyte"
+ (("C\\.UTF-8") "en_US.utf8"))
#t)))
(add-after 'install 'move-static-libraries
(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
+ (let ((lib (assoc-ref outputs "lib"))
(static (assoc-ref outputs "static")))
+
+ ;; Move static libraries to the "static" output.
(mkdir-p (string-append static "/lib"))
- (with-directory-excursion out
+ (with-directory-excursion lib
(for-each (lambda (file)
(rename-file file
(string-append static "/"
@@ -1174,7 +1193,16 @@ providing the system administrator with some help in common tasks.")
(substitute* (find-files "lib" "\\.la$")
(("old_library=.*") "old_library=''\n")))
- #t))))))
+ #t)))
+ (add-after 'install 'adjust-pkg-config-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((lib (assoc-ref outputs "lib")))
+ ;; Drop the unused "prefix=" and "exec_prefix=" variables from
+ ;; the pkg-config files to avoid a cyclic reference on "out".
+ (substitute* (find-files (string-append lib "/lib/pkgconfig")
+ "\\.pc$")
+ (("^(exec_)?prefix=.*") "")))
+ #t)))))
(inputs `(("zlib" ,zlib)
("ncurses" ,ncurses)
@@ -1242,10 +1270,16 @@ by Robert Shea and Robert Anton Wilson.")
"1br0g93ysqhlv13i1k4lfbimsgxnpy5rgs4lxfc9rkzdbpbaqplj"))))
(build-system gnu-build-system)
(arguments
- '(#:modules ((guix build utils)
+ `(#:modules ((guix build utils)
(guix build gnu-build-system)
(srfi srfi-1)
(srfi srfi-26))
+ ,@(if (%current-target-system)
+ '(#:configure-flags
+ (list
+ "ac_cv_func_malloc_0_nonnull=yes"
+ "ac_cv_func_realloc_0_nonnull=yes"))
+ '())
#:phases
(modify-phases %standard-phases
(add-after
@@ -1335,7 +1369,7 @@ slabtop, and skill.")
(base32
"1pmf8inp736l587rqq7qsd8bv0mmg5cwrivxg5p5awqgv70crypr"))))
(build-system gnu-build-system)
- (inputs `(("util-linux" ,util-linux)))
+ (inputs `(("util-linux" ,util-linux "lib")))
(native-inputs `(("pkg-config" ,pkg-config)
("texinfo" ,texinfo) ;for the libext2fs Info manual
@@ -1619,12 +1653,13 @@ MIDI functionality to the Linux-based operating system.")
(("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
"true\n"))
#t)))))
+ (native-inputs
+ `(("gettext" ,gettext-minimal)))
(inputs
`(("libsamplerate" ,libsamplerate)
("ncurses" ,ncurses)
("alsa-lib" ,alsa-lib)
- ("xmlto" ,xmlto)
- ("gettext" ,gettext-minimal)))
+ ("xmlto" ,xmlto)))
(home-page "http://www.alsa-project.org/")
(synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
(description
@@ -1932,7 +1967,7 @@ configuration (iptunnel, ipmaddr).")
(define-public libcap
(package
(name "libcap")
- (version "2.27")
+ (version "2.31")
(source (origin
(method url-fetch)
(uri (string-append
@@ -1940,7 +1975,7 @@ configuration (iptunnel, ipmaddr).")
"libcap2/libcap-" version ".tar.xz"))
(sha256
(base32
- "0sj8kidl7qgf2qwxcbw1vadnlb30y4zvjzxswsmfdghq04npkhfs"))))
+ "0ikwm0kngrqa4ci80lqnrkk17kg09q7dxrz28y0gm5qw3vj8s266"))))
(build-system gnu-build-system)
(arguments '(#:phases
(modify-phases %standard-phases
@@ -1952,13 +1987,12 @@ configuration (iptunnel, ipmaddr).")
(string-append "LDFLAGS := -Wl,-rpath="
%output "/lib")))
#t)))
- #:tests? #f ; no 'check' target
+ #:test-target "test"
#:make-flags (list "lib=lib"
(string-append "prefix="
(assoc-ref %outputs "out"))
"RAISE_SETFCAP=no")))
(native-inputs `(("perl" ,perl)))
- (inputs `(("attr" ,attr)))
(home-page "https://sites.google.com/site/fullycapable/")
(synopsis "Library for working with POSIX capabilities")
(description
@@ -2042,35 +2076,18 @@ transparently through a bridge.")
"/libnl-doc-" version ".tar.gz"))
(sha256
(base32 "19p5y8q3cm5wqvamqc4s5syxnnkvzxy3gw8ivxk6fv9ybn8jm35h"))))))
- (inputs
- `(("python-2" ,python-2)
- ("python-3" ,python-3)))
- (outputs '("out" "doc" "python2" "python3"))
+ (outputs `("out" "doc"))
(arguments
- `(#:modules ((guix build gnu-build-system)
- (guix build utils)
- (srfi srfi-1))
- #:phases
+ `(#:phases
(modify-phases %standard-phases
- (add-after 'install 'install-python
- (lambda* (#:key outputs #:allow-other-keys)
- (define (python-inst python)
- (invoke python "setup.py" "build")
- (invoke python "setup.py" "install"
- (string-append "--prefix="
- (assoc-ref %outputs python)))
- (invoke python "setup.py" "clean"))
- (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib"
- (assoc-ref %outputs "out")))
- (with-directory-excursion "./python"
- (for-each python-inst '("python2" "python3")))
- #t))
(add-after 'install 'install-doc
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
(let ((dest (string-append (assoc-ref outputs "doc")
"/share/doc/libnl")))
(mkdir-p dest)
- (invoke "tar" "xf" (assoc-ref inputs "libnl3-doc")
+ (invoke "tar" "xf" (assoc-ref
+ (or native-inputs inputs)
+ "libnl3-doc")
"--strip-components=1" "-C" dest)))))))
(home-page "https://www.infradead.org/~tgr/libnl/")
(synopsis "NetLink protocol library suite")
@@ -2085,6 +2102,43 @@ configuration and monitoring interfaces.")
;; 'nl-addr-add.c'), so the result is GPLv2-only.
(license license:gpl2)))
+;; libnl python extensions used to be outputs of libnl. However, as
+;; cross-compiling python extensions is currently broken, create separate
+;; packages for libnl python extensions.
+(define (libnl-python-package python)
+ (let ((name (string-append "libnl-" python)))
+ (package
+ (inherit libnl)
+ (name name)
+ (inputs `(,@(cond
+ ((string=? python "python2")
+ `(("python-2" ,python-2)))
+ ((string=? python "python3")
+ `(("python-3" ,python-3))))))
+ (propagated-inputs `(("libnl" ,libnl)))
+ (outputs '("out"))
+ (arguments
+ `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (define (python-inst python)
+ (invoke python "setup.py" "build")
+ (invoke python "setup.py" "install"
+ (string-append "--prefix="
+ (assoc-ref %outputs "out")))
+ (invoke python "setup.py" "clean"))
+ (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib"
+ (assoc-ref inputs "libnl")))
+ (with-directory-excursion "./python" (python-inst ,python))
+ #t))))))))
+
+(define-public libnl-python2 (libnl-python-package "python2"))
+(define-public libnl-python3 (libnl-python-package "python3"))
+
(define-public iw
(package
(name "iw")
@@ -2724,7 +2778,7 @@ to the in-kernel OOM killer.")
(patches (search-patches "eudev-rules-directory.patch"))))
(build-system gnu-build-system)
(arguments
- '(#:phases
+ `(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'make-source-writable
(lambda _
@@ -2733,19 +2787,25 @@ to the in-kernel OOM killer.")
(for-each make-file-writable (find-files "."))
#t))
(add-before 'bootstrap 'patch-file-names
- (lambda* (#:key inputs #:allow-other-keys)
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
(substitute* "man/make.sh"
(("/usr/bin/xsltproc")
- (string-append (assoc-ref inputs "xsltproc")
+ (string-append (assoc-ref
+ (or native-inputs inputs) "xsltproc")
"/bin/xsltproc")))
#t))
(add-after 'install 'build-hwdb
(lambda* (#:key outputs #:allow-other-keys)
;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and
;; similar tools to display product names.
+ ;;
+ ;; XXX: This can't be done when cross-compiling. Find another way
+ ;; to generate hwdb.bin for cross-built systems.
(let ((out (assoc-ref outputs "out")))
- (invoke (string-append out "/bin/udevadm")
- "hwdb" "--update")))))
+ ,@(if (%current-target-system)
+ '(#t)
+ '((invoke (string-append out "/bin/udevadm")
+ "hwdb" "--update")))))))
#:configure-flags (list "--enable-manpages")))
(native-inputs
`(("autoconf" ,autoconf)
@@ -2765,7 +2825,7 @@ to the in-kernel OOM killer.")
;; When linked against libblkid, eudev can populate /dev/disk/by-label
;; and similar; it also installs the '60-persistent-storage.rules' file,
;; which contains the rules to do that.
- `(("util-linux" ,util-linux) ;for blkid
+ `(("util-linux" ,util-linux "lib") ;for blkid
("kmod" ,kmod)))
(home-page "https://wiki.gentoo.org/wiki/Project:Eudev")
(synopsis "Userspace device management")
@@ -2808,7 +2868,7 @@ time.")
(inputs
`(("udev" ,eudev)))
(arguments
- '(#:phases
+ `(#:phases
(modify-phases %standard-phases
(add-after 'configure 'set-makefile-shell
(lambda _
@@ -2843,7 +2903,12 @@ time.")
(assoc-ref %outputs "out")
"/lib,-rpath="
(assoc-ref %outputs "out")
- "/lib/device-mapper"))
+ "/lib/device-mapper")
+ ;; This is needed when cross-compiling.
+ ,@(if (%current-target-system)
+ '("ac_cv_func_malloc_0_nonnull=yes"
+ "ac_cv_func_realloc_0_nonnull=yes")
+ '()))
;; The tests use 'mknod', which requires root access.
#:tests? #f))
@@ -2939,13 +3004,23 @@ interface.")
(patches (search-patches "crda-optional-gcrypt.patch"))))
(build-system gnu-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
+ `(#:phases (modify-phases %standard-phases
(delete 'configure)
(add-after 'unpack 'gzip-determinism
(lambda _
(substitute* "Makefile"
(("gzip") "gzip --no-name"))
#t))
+ ,@(if (%current-target-system)
+ '((add-after
+ 'unpack 'fix-pkg-config
+ (lambda* (#:key target #:allow-other-keys)
+ (substitute*
+ "Makefile"
+ (("pkg-config")
+ (string-append target "-pkg-config")))
+ #t)))
+ '())
(add-before
'build 'no-werror-no-ldconfig
(lambda _
@@ -2955,37 +3030,44 @@ interface.")
#t))
(add-before
'build 'set-regulator-db-file-name
- (lambda* (#:key inputs #:allow-other-keys)
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
;; Tell CRDA where to find our database.
- (let ((regdb (assoc-ref inputs "wireless-regdb")))
+ (let ((regdb (assoc-ref (or native-inputs inputs)
+ "wireless-regdb")))
(substitute* "crda.c"
(("\"/lib/crda/regulatory.bin\"")
(string-append "\"" regdb
"/lib/crda/regulatory.bin\"")))
#t))))
#:test-target "verify"
- #:make-flags (let ((out (assoc-ref %outputs "out"))
- (regdb (assoc-ref %build-inputs "wireless-regdb")))
- (list "CC=gcc" "V=1"
-
- ;; Disable signature-checking on 'regulatory.bin'.
- ;; The reason is that this simplifies maintenance
- ;; on our side (no need to manage a distro key
- ;; pair), and we can guarantee integrity of
- ;; 'regulatory.bin' by other means anyway, such as
- ;; 'guix gc --verify'. See
- ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
- ;; for a discssion.
- "USE_OPENSSL=0"
-
- (string-append "PREFIX=" out)
- (string-append "SBINDIR=" out "/sbin/")
- (string-append "UDEV_RULE_DIR="
- out "/lib/udev/rules.d")
- (string-append "LDFLAGS=-Wl,-rpath="
- out "/lib -L.")
- (string-append "REG_BIN=" regdb
- "/lib/crda/regulatory.bin")))))
+ #:make-flags (let ((out (assoc-ref %outputs "out"))
+ (regdb (assoc-ref %build-inputs "wireless-regdb"))
+ (target ,(%current-target-system)))
+ (list
+ (string-append
+ "CC=" (if target
+ (string-append target "-gcc") "gcc"))
+ "V=1"
+
+ ;; Disable signature-checking on 'regulatory.bin'.
+ ;; The reason is that this simplifies maintenance
+ ;; on our side (no need to manage a distro key
+ ;; pair), and we can guarantee integrity of
+ ;; 'regulatory.bin' by other means anyway, such as
+ ;; 'guix gc --verify'. See
+ ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
+ ;; for a discssion.
+ "USE_OPENSSL=0"
+
+ (string-append "PREFIX=" out)
+ (string-append "SBINDIR=" out "/sbin/")
+ (string-append "UDEV_RULE_DIR="
+ out "/lib/udev/rules.d")
+ (string-append "LDFLAGS=-Wl,-rpath="
+ out "/lib -L.")
+ (string-append "REG_BIN=" regdb
+ "/lib/crda/regulatory.bin")
+ "all_noverify"))))
(native-inputs `(("pkg-config" ,pkg-config)
("wireless-regdb" ,wireless-regdb)))
(inputs `(("libnl" ,libnl)))
@@ -3658,8 +3740,9 @@ MPEG-2 and audio over Linux IEEE 1394.")
#:phases
(modify-phases %standard-phases
(add-before 'build 'patch-program-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((coreutils (assoc-ref inputs "coreutils")))
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (let ((coreutils (assoc-ref (or native-inputs inputs)
+ "coreutils")))
(substitute* "udev-md-raid-arrays.rules"
(("/usr/bin/(readlink|basename)" all program)
(string-append coreutils "/bin/" program))))
@@ -3807,8 +3890,14 @@ Linux Device Mapper multipathing driver:
"0ajhzbqjwsmz51gwccfyw6w9k4j4gmxcl2ph30sfn2gxv0d8gkv2"))))
(build-system gnu-build-system)
(arguments
- '(#:make-flags
- (list "CC=gcc" (string-append "prefix=" %output))
+ `(#:make-flags
+ (let ((target ,(%current-target-system)))
+ (list (string-append "prefix=" %output)
+ (string-append
+ "CC=" (if target
+ (string-append (assoc-ref %build-inputs "cross-gcc")
+ "/bin/" target "-gcc")
+ "gcc"))))
#:test-target "partcheck" ; need root for a full 'check'
#:phases
(modify-phases %standard-phases (delete 'configure)))) ; no configure script
@@ -4044,11 +4133,9 @@ and copy/paste text in the console and in xterm.")
#:test-target "test"
#:parallel-tests? #f)) ; tests fail when run in parallel
(inputs `(("e2fsprogs" ,e2fsprogs)
- ("libblkid" ,util-linux)
- ("libblkid:static" ,util-linux "static")
- ("libuuid" ,util-linux)
- ("libuuid:static" ,util-linux "static")
("lzo" ,lzo)
+ ("util-linux:lib" ,util-linux "lib") ;for libblkid and libuuid
+ ("util-linux:static" ,util-linux "static") ;ditto
("zlib" ,zlib)
("zlib:static" ,zlib "static")
("zstd" ,zstd "lib")
@@ -4178,7 +4265,7 @@ obviously it can be shared with files outside our set).")
("libtool" ,libtool)
("pkg-config" ,pkg-config)))
(inputs
- `(("libuuid" ,util-linux)
+ `(("libuuid" ,util-linux "lib")
("libselinux" ,libselinux)))
(home-page "https://f2fs.wiki.kernel.org/")
(synopsis "Userland tools for f2fs")
@@ -4204,7 +4291,7 @@ disks and SD cards. This package provides the userland utilities.")
(base32
"0z9c0y3qq75iyqknl5k0v7v46l8c3pcifpqb0yqalrs24blkm7dk"))))
(inputs
- `(("libuuid" ,util-linux)))))
+ `(("libuuid" ,util-linux "lib")))))
(define-public freefall
(package
@@ -4873,7 +4960,7 @@ are exceeded.")
("pkg-config" ,pkg-config)))
(inputs
`(("acl" ,acl) ; extended attributes (xattr)
- ("libuuid" ,util-linux)
+ ("libuuid" ,util-linux "lib")
("lzo" ,lzo)
("openssl" ,openssl) ; optional crypto support
("zlib" ,zlib)
@@ -5670,7 +5757,7 @@ libraries, which are often integrated directly into libfabric.")
"psm-disable-memory-stats.patch"))))
(build-system gnu-build-system)
(outputs '("out" "debug"))
- (inputs `(("libuuid" ,util-linux)))
+ (inputs `(("libuuid" ,util-linux "lib")))
(arguments
'(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
,(string-append "INSTALL_PREFIX=" %output)
@@ -6047,7 +6134,7 @@ IP addresses and routes, and configure IPsec.")
(native-inputs
`(("gettext" ,gettext-minimal)))
(inputs
- `(("libuuid" ,util-linux)
+ `(("libuuid" ,util-linux "lib")
("python" ,python-wrapper)))
(home-page "https://xfs.wiki.kernel.org/")
(synopsis "XFS file system tools")