diff options
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r-- | gnu/packages/linux.scm | 621 |
1 files changed, 425 insertions, 196 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 2e1da21800..41fb24f82a 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -67,6 +67,8 @@ ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> ;;; Copyright © 2022 Hunter Jozwiak <hunter.t.joz@gmail.com> ;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space> +;;; Copyright © 2022 Stefan <stefan-guix@vodafonemail.de> +;;; Copyright © 2022 Demis Balbach <db@minikn.xyz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -128,6 +130,7 @@ #:use-module (gnu packages libunwind) #:use-module (gnu packages libusb) #:use-module (gnu packages llvm) + #:use-module (gnu packages lsof) #:use-module (gnu packages lua) #:use-module (gnu packages man) #:use-module (gnu packages maths) @@ -141,12 +144,14 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pciutils) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages polkit) #:use-module (gnu packages popt) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) #:use-module (gnu packages rrdtool) + #:use-module (gnu packages rsync) #:use-module (gnu packages samba) #:use-module (gnu packages sdl) #:use-module (gnu packages serialization) @@ -189,11 +194,129 @@ #:use-module (srfi srfi-2) #:use-module (srfi srfi-26) #:use-module (ice-9 match) - #:use-module (ice-9 regex)) + #:use-module (ice-9 regex) + #:export (customize-linux + make-defconfig)) + + + +;;; +;;; Linux kernel customization functions. +;;; + +(define* (customize-linux #:key name + (linux linux-libre) + source + defconfig + (configs "") + extra-version) + "Make a customized Linux package NAME derived from the LINUX package. + +If NAME is not given, then it defaults to the same name as the LINUX package. + +Unless SOURCE is given the source of LINUX is used. + +A DEFCONFIG file to be used can be given as an origin, as a file-like object +(file-append, local-file etc.), or as a string with the name of a defconfig file +available in the Linux sources. If DEFCONFIG is not given, then a defconfig +file will be saved from the LINUX package configuration. + +Additional CONFIGS will be used to modify the given or saved defconfig, which +will finally be used to build Linux. + +CONFIGS can be a list of strings, with one configuration per line. The usual +defconfig syntax has to be used, but there is a special extension to ease the +removal of configurations. Comment lines are supported as well. + +Here is an example: + + '(;; This string defines the version tail in 'uname -r'. + \"CONFIG_LOCALVERSION=\\\"-handcrafted\\\" + ;; This '# CONFIG_... is not set' syntax has to match exactly! + \"# CONFIG_BOOT_CONFIG is not set\" + \"CONFIG_NFS_SWAP=y\" + ;; This is a multiline configuration: + \"CONFIG_E1000=y +# This is a comment, below follows an extension to unset a configuration: +CONFIG_CMDLINE_EXTEND\") + +A string of configurations instead of a list of configuration strings is also +possible. + +EXTRA-VERSION can be a string overwriting the EXTRAVERSION setting of the LINUX +package, after being prepended by a hyphen. It will be visible in the output +of 'uname -r' behind the Linux version numbers." + (package + (inherit linux) + (name (or name (package-name linux))) + (source (or source (package-source linux))) + (arguments + (substitute-keyword-arguments + (package-arguments linux) + ((#:imported-modules imported-modules %gnu-build-system-modules) + `((guix build kconfig) ,@imported-modules)) + ((#:modules modules) + `((guix build kconfig) ,@modules)) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'configure + (lambda* (#:key inputs #:allow-other-keys #:rest arguments) + (setenv "EXTRAVERSION" + #$(and extra-version + (not (string-null? extra-version)) + (string-append "-" extra-version))) + (let* ((configs (string-append "arch/" #$(linux-srcarch) + "/configs/")) + (guix_defconfig (string-append configs + "guix_defconfig"))) + #$(cond + ((not defconfig) + #~(begin + ;; Call the original 'configure phase. + (apply (assoc-ref #$phases 'configure) arguments) + ;; Save a defconfig file. + (invoke "make" "savedefconfig") + ;; Move the saved defconfig to the proper location. + (rename-file "defconfig" + guix_defconfig))) + ((string? defconfig) + ;; Use another existing defconfig from the Linux sources. + #~(rename-file (string-append configs #$defconfig) + guix_defconfig)) + (else + ;; Copy the defconfig input to the proper location. + #~(copy-file #$defconfig guix_defconfig))) + (chmod guix_defconfig #o644) + (modify-defconfig guix_defconfig '#$configs) + (invoke "make" "guix_defconfig") + (verify-config ".config" guix_defconfig)))))))))) + +(define (make-defconfig uri sha256-as-base32) + (origin (method url-fetch) + (uri uri) + (sha256 (base32 sha256-as-base32)))) + +(define (linux-srcarch) + "Return the linux SRCARCH name, which is set in the toplevel Makefile of +Linux and denotes the architecture-specific directory name below arch/ in its +source code. Some few architectures share a common folder. It resembles the +definition of SRCARCH based on ARCH in the Makefile and may be used to place a +defconfig file in the proper path." + (let ((linux-arch (platform-linux-architecture + (lookup-platform-by-target-or-system + (or (%current-target-system) + (%current-system)))))) + (match linux-arch + ("i386" "x86") + ("x86_64" "x86") + ("sparc32" "sparc") + ("sparc64" "sparc") + ("sh64" "sh") + (_ linux-arch)))) (define-public (system->defconfig system) "Some systems (notably powerpc-linux) require a special target for kernel -defconfig. Return the appropriate make target if applicable, otherwise return +defconfig. Return the appropriate Make target if applicable, otherwise return \"defconfig\"." (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig") ((string-prefix? "powerpc64-" system) "ppc64_defconfig") @@ -357,17 +480,17 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." ;; The current "stable" kernels. That is, the most recently released major ;; versions that are still supported upstream. -(define-public linux-libre-6.0-version "6.0.10") +(define-public linux-libre-6.0-version "6.0.13") (define-public linux-libre-6.0-gnu-revision "gnu") (define deblob-scripts-6.0 (linux-libre-deblob-scripts linux-libre-6.0-version linux-libre-6.0-gnu-revision (base32 "0iwbjrgiwch5v1xpnm9wk9zqw2v6lxja0k8yj2x0amxc9ma68176") - (base32 "06iqxkg5hakzvmz6gcz878k1sr553zbng2j1b2whgfg7zmhxkb34"))) + (base32 "16g2bin3xay30zfss1vlb7pwcss5giaxaksp4v1gk05wn51wjrqr"))) (define-public linux-libre-6.0-pristine-source (let ((version linux-libre-6.0-version) - (hash (base32 "1l0xak4w7c16cg8lhracy8r18zzdl0x5s654w6ivyw6dhk6pzr9r"))) + (hash (base32 "191dlxcmbx8vy6z2k04jq2kr6hwnaknsnsyycvqnjmvmdf6i3lq8"))) (make-linux-libre-source version (%upstream-linux-source version hash) deblob-scripts-6.0))) @@ -375,37 +498,37 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." ;; The "longterm" kernels — the older releases with long-term upstream support. ;; Here are the support timelines: ;; <https://www.kernel.org/category/releases.html> -(define-public linux-libre-5.15-version "5.15.80") +(define-public linux-libre-5.15-version "5.15.83") (define-public linux-libre-5.15-gnu-revision "gnu") (define deblob-scripts-5.15 (linux-libre-deblob-scripts linux-libre-5.15-version linux-libre-5.15-gnu-revision (base32 "0vj60bra81fmbx3lz924czbhxs4dmvd4d584g9mcs80b7c4q52kg") - (base32 "0h8a48dvgxyj3v08lp99kh5pfa93r4rks78cj0j1rwz1516xk8h3"))) + (base32 "1m73pgx8v047xb2gck2g7j7khniis8c9akn9vhzgsdfglrf8p6fj"))) (define-public linux-libre-5.15-pristine-source (let ((version linux-libre-5.15-version) - (hash (base32 "0kgxznd3sfbmnygjvp9dzhzg5chxlaxk6kldxmh1y0njcrj1lciv"))) + (hash (base32 "1wvzfhzqq9dps508wmp2gblfz93ipppnjzqm0n8pi1acq11hhna0"))) (make-linux-libre-source version (%upstream-linux-source version hash) deblob-scripts-5.15))) -(define-public linux-libre-5.10-version "5.10.156") +(define-public linux-libre-5.10-version "5.10.159") (define-public linux-libre-5.10-gnu-revision "gnu1") (define deblob-scripts-5.10 (linux-libre-deblob-scripts linux-libre-5.10-version linux-libre-5.10-gnu-revision (base32 "0mw7qn77y9c6wrnw4rjvf75cpm1w6n1aqqhf8cnghcb97p2yxxrf") - (base32 "1m9l554w6a72mq0kf7ggm44z247m2yz6zhafwqxh96qpjpcaabpj"))) + (base32 "0a96g4pjdgwvxn2wpz6rfc8nwdlkw138r9pp66kvfrrn08i313ii"))) (define-public linux-libre-5.10-pristine-source (let ((version linux-libre-5.10-version) - (hash (base32 "08srjps110zi4ivzh0z2jf78ddyfj2wivdliffb2f03jr9j9k7k7"))) + (hash (base32 "19yfi5vknxnw0cb8274q3pb5zjs6ny04n16m8xjdfdmznrbvza8v"))) (make-linux-libre-source version (%upstream-linux-source version hash) deblob-scripts-5.10))) -(define-public linux-libre-5.4-version "5.4.225") +(define-public linux-libre-5.4-version "5.4.227") (define-public linux-libre-5.4-gnu-revision "gnu1") (define deblob-scripts-5.4 (linux-libre-deblob-scripts @@ -415,12 +538,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." (base32 "1bgblfkcnrabnr9hpdl07qgps57h6bq4v5pjrxs798vq43db66va"))) (define-public linux-libre-5.4-pristine-source (let ((version linux-libre-5.4-version) - (hash (base32 "1ak0qlxzfylgvkldh2whq4mzynh1rymhnnc1yif9a5s3f7v9dxar"))) + (hash (base32 "14q5gy48j78vwnqivrgpdhj778n2jq5l7yiw5na1rwqmfh1wbvsy"))) (make-linux-libre-source version (%upstream-linux-source version hash) deblob-scripts-5.4))) -(define-public linux-libre-4.19-version "4.19.267") +(define-public linux-libre-4.19-version "4.19.269") (define-public linux-libre-4.19-gnu-revision "gnu1") (define deblob-scripts-4.19 (linux-libre-deblob-scripts @@ -430,12 +553,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." (base32 "0g1yhzxm3ixfll6n630v7lddcyvf888sg114nimh0lkvzd180s99"))) (define-public linux-libre-4.19-pristine-source (let ((version linux-libre-4.19-version) - (hash (base32 "035yxx13jz5f5ig2r6ybzgivm8vjafgnvjws0jfzha4w6klf7r9l"))) + (hash (base32 "02mjb16xxfj984vibpxvhjl84y5yg0jgzjccjdxnn8db4k9aa2vf"))) (make-linux-libre-source version (%upstream-linux-source version hash) deblob-scripts-4.19))) -(define-public linux-libre-4.14-version "4.14.300") +(define-public linux-libre-4.14-version "4.14.302") (define-public linux-libre-4.14-gnu-revision "gnu1") (define deblob-scripts-4.14 (linux-libre-deblob-scripts @@ -445,12 +568,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." (base32 "00i91lx938nqlgy63hiricqd0fnbbf26vgya9c5lb7m1f4x324im"))) (define-public linux-libre-4.14-pristine-source (let ((version linux-libre-4.14-version) - (hash (base32 "047vmh09icm45g7mnmdvyj9cam7747bcpah1s7n9dm5i2j2f906y"))) + (hash (base32 "102c9h0byr9v4bxzkdh7mnw1grm47ji6lf6l1gjlwah7f46j6ap3"))) (make-linux-libre-source version (%upstream-linux-source version hash) deblob-scripts-4.14))) -(define-public linux-libre-4.9-version "4.9.334") +(define-public linux-libre-4.9-version "4.9.336") (define-public linux-libre-4.9-gnu-revision "gnu1") (define deblob-scripts-4.9 (linux-libre-deblob-scripts @@ -460,7 +583,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." (base32 "0bib3641dbcqdkx3anna3caxnsg3nw9cnmhcklq0s93g3m57041h"))) (define-public linux-libre-4.9-pristine-source (let ((version linux-libre-4.9-version) - (hash (base32 "0sjh492mfic6llgwb957nj7gd7c0dvqnk97ngq8d50sjsyjznyk9"))) + (hash (base32 "032hgfvn7za2v49jjc3pdzx0cfglrmjkbl2d3pz857yc0q9y2v8z"))) (make-linux-libre-source version (%upstream-linux-source version hash) deblob-scripts-4.9))) @@ -502,14 +625,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." (define-public linux-libre-5.15-source (source-with-patches linux-libre-5.15-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch - (search-patch "linux-libre-infodocs-target.patch")))) + %linux-libre-arm-export-__sync_icache_dcache-patch))) (define-public linux-libre-5.10-source (source-with-patches linux-libre-5.10-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch - (search-patch "linux-libre-infodocs-target.patch")))) + %linux-libre-arm-export-__sync_icache_dcache-patch))) (define-public linux-libre-5.4-source (source-with-patches linux-libre-5.4-pristine-source @@ -777,10 +898,9 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." (configuration-file #f) (defconfig "defconfig") (extra-options %default-extra-linux-options) - (build-doc? (doc-supported? version)) (patches `(,%boot-logo-patch - ,@(if build-doc? + ,@(if (doc-supported? version) (list (search-patch "linux-libre-infodocs-target.patch")) '())))) @@ -794,8 +914,7 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." #:extra-version extra-version #:configuration-file configuration-file #:defconfig defconfig - #:extra-options extra-options - #:build-doc? build-doc?)) + #:extra-options extra-options)) (define* (make-linux-libre* version gnu-revision source supported-systems #:key @@ -804,10 +923,7 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." ;; See kernel-config for an example. (configuration-file #f) (defconfig "defconfig") - (extra-options %default-extra-linux-options) - (build-doc? (doc-supported? version))) - (when (and build-doc? (not (doc-supported? version))) - (error "unsupported 'build-doc?' for kernels <5.10")) + (extra-options %default-extra-linux-options)) (package (name (if extra-version (string-append "linux-libre-" extra-version) @@ -832,22 +948,8 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." (substitute* (find-files "." "^Makefile(\\.include)?$") (("/bin/pwd") "pwd")))) - #$@(if build-doc? - #~((add-before 'configure 'build-doc - (lambda _ - (substitute* "Documentation/Makefile" - ;; Remove problematic environment check script. - ((".*scripts/sphinx-pre-install.*") "")) - (invoke "make" "infodocs"))) - (add-after 'build-doc 'install-doc - (lambda _ - (with-directory-excursion "Documentation/output" - (invoke "make" "-C" "texinfo" "install-info" - (string-append "infodir=" #$output - "/share/info")))))) - #~()) - (replace 'configure - (lambda* (#:key inputs target #:allow-other-keys) + (add-before 'configure 'set-environment + (lambda* (#:key target #:allow-other-keys) ;; Avoid introducing timestamps. (setenv "KCONFIG_NOTIMESTAMP" "1") (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH")) @@ -863,18 +965,21 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." (%current-system)))))) (setenv "ARCH" 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")))) + ;; Allow EXTRAVERSION to be set via the environment. + (substitute* "Makefile" + (("^ *EXTRAVERSION[[:blank:]]*=") + "EXTRAVERSION ?=")) (setenv "EXTRAVERSION" #$(and extra-version - (string-append "-" extra-version))) - + (string-append "-" extra-version))))) + (replace 'configure + (lambda* (#:key inputs #:allow-other-keys) (let ((config (assoc-ref inputs "kconfig"))) - ;; Use a custom kernel configuration file or a default ;; configuration file. (if config @@ -882,17 +987,15 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." (copy-file config ".config") (chmod ".config" #o666)) (invoke "make" #$defconfig)) - ;; Appending works even when the option wasn't in the ;; file. The last one prevails if duplicated. (let ((port (open-file ".config" "a")) (extra-configuration #$(config->string extra-options))) (display extra-configuration port) (close-port port)) - (invoke "make" "oldconfig")))) (replace 'install - (lambda* (#:key inputs native-inputs #:allow-other-keys) + (lambda* (#:key inputs #:allow-other-keys) (let ((moddir (string-append #$output "/lib/modules")) (dtbdir (string-append #$output "/lib/dtbs"))) ;; Install kernel image, kernel configuration and link map. @@ -944,19 +1047,6 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." ("gmp" ,gmp) ("mpfr" ,mpfr) ("mpc" ,mpc) - - ;; For generating the documentation. - ,@(if build-doc? - ;; TODO: remove fontconfig after the 5.10 kernel is dropped. - ;; Also replace python-wrapper by python at that time. - `(("fontconfig" ,fontconfig) - ("graphviz" ,graphviz) - ("python" ,python-wrapper) - ("python-sphinx" ,python-sphinx) - ("texinfo" ,texinfo) - ("which" ,which)) - '()) - ,@(match (let ((arch (platform-linux-architecture (lookup-platform-by-target-or-system (or (%current-target-system) @@ -995,6 +1085,43 @@ Linux kernel. It has been modified to remove all non-free binary blobs.") (define-public linux-libre-source linux-libre-6.0-source) (define-public linux-libre linux-libre-6.0) +(define-public linux-libre-documentation + (package + (inherit linux-libre) + (name "linux-libre-documentation") + (arguments + (list + #:tests? #f + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (substitute* "Documentation/Makefile" + ;; Remove problematic environment check script. + ((".*scripts/sphinx-pre-install.*") "")) + (invoke "make" "infodocs"))) + (replace 'install + (lambda _ + (let* ((info-dir (string-append #$output "/share/info")) + (info (string-append info-dir + "/TheLinuxKernel.info.gz"))) + (with-directory-excursion "Documentation/output" + (invoke "make" "-C" "texinfo" "install-info" + (string-append "infodir=" info-dir))) + ;; Create a symlink, for convenience. + (symlink info (string-append info-dir + "/linux.info.gz")))))))) + (native-inputs + (list graphviz + perl + python + python-sphinx + texinfo + which)) + (synopsis "Documentation for the kernel Linux-Libre") + (description "This package provides the documentation for the kernel +Linux-Libre, as an Info manual. To consult it, run @samp{info linux}."))) + (define-public linux-libre-5.15 (make-linux-libre* linux-libre-5.15-version linux-libre-5.15-gnu-revision @@ -1238,7 +1365,6 @@ Linux kernel. It has been modified to remove all non-free binary blobs.") (inputs (modify-inputs (package-inputs base-linux-libre) (prepend cpio)))))) - ;;; ;;; Linux kernel modules. @@ -1405,6 +1531,33 @@ battery charging thresholds, keyboard backlight, fans and thermal monitors, and the notification, WiFi, and Bluetooth LED.") (license license:gpl2))) +(define-public tuxedo-keyboard + (package + (name "tuxedo-keyboard") + (version "3.1.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tuxedocomputers/tuxedo-keyboard.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "17n14yh55yrxx4qbx4ph9drbzx2ll4kdsfmlngrdgizhyzk7z7zv")))) + (build-system linux-module-build-system) + (arguments + (list #:tests? #f)) ; no test suite + (home-page "https://github.com/tuxedocomputers/tuxedo-keyboard") + (synopsis "Linux kernel modules to control keyboard on most Tuxedo computers") + (description + "This package provides the @code{tuxedo_keyboard}, @code{tuxedo_io}, +@code{clevo_wmi} @acronym{WMI, Windows Management Engine} and the +@code{clevo_acpi} @acronym{ACPI, Advanced Configuration and Power Interface} +kernel modules to control the keyboard on most Tuxedo computers. Only white +backlight only models are currently not supported. The @code{tuxedo_io} module +is also needed for the @code{tuxedo-control-center} (short tcc) package.") + (license license:gpl3+))) + (define-public ec (package (name "ec") @@ -1783,7 +1936,7 @@ It provides the commands @code{powercap-info} and @code{powercap-set}.") (define-public powerstat (package (name "powerstat") - (version "0.02.27") + (version "0.02.28") (source (origin (method git-fetch) @@ -1792,7 +1945,7 @@ It provides the commands @code{powercap-info} and @code{powercap-set}.") (commit (string-append "V" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1ik5yv2bhz2hvyga4h1m28rf0xpi20zpqm4swhvskyf1g6qf381z")))) + (base32 "1wydjxmb6qf7rqarpl8rblg4biq3r2kfcx7p3pzvsr0w1xwdiisd")))) (build-system gnu-build-system) (arguments `(#:make-flags @@ -2718,6 +2871,56 @@ IPv6 packet filter. Both commands are targeted at system administrators.") (license license:gpl2+))) +(define-public bolt + (package + (name "bolt") + (version "0.9.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.freedesktop.org/bolt/bolt") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0w66shv7ra8yrhr0byifahbq25wi8qfsm3rifz0j31l7cmnys3js")))) + (build-system meson-build-system) + (arguments + (list #:configure-flags '(list "--localstatedir=/var") + #:glib-or-gtk? #t ;To wrap binaries and/or compile schemas + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'replace-directories + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "meson.build" + (("udev.get_pkgconfig_variable..udevdir..") + (string-append "'" + #$output "/lib/udev'"))) + (substitute* "scripts/meson-install.sh" + (("mkdir.*") + "")))) + (add-before 'install 'no-polkit-magic + (lambda* (#:key outputs #:allow-other-keys) + (setenv "PKEXEC_UID" "something")))))) + (native-inputs (list pkg-config + `(,glib "bin") python asciidoc umockdev)) + (inputs (list eudev dbus polkit)) + (synopsis "Thunderbolt 3 device manager") + (description + "This package provides @command{boltd}, a userspace daemon +for Thunderbolt devices, and @command{boltctl}, a command-line utility for +managing those devices. + +The daemon @command{boltd} exposes devices via D-Bus to clients. It also +stores a database of previously authorized devices and will, depending on the +policy set for the individual devices, automatically authorize newly connected +devices without user interaction. + +The command-line utility @command{boltctl} manages Thunderbolt devices via +@command{boltd}. It can list devices, monitor changes, and initiate +authorization of devices.") + (home-page "https://gitlab.freedesktop.org/bolt/bolt") + (license license:gpl2+))) + (define-public jitterentropy-rngd (package (name "jitterentropy-rngd") @@ -3151,7 +3354,7 @@ devices. It replaces @code{iwconfig}, which is deprecated.") (define-public powertop (package (name "powertop") - (version "2.14") + (version "2.15") (source (origin (method git-fetch) @@ -3160,7 +3363,7 @@ devices. It replaces @code{iwconfig}, which is deprecated.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1zkr2y5nb1nr22nq8a3zli87iyfasfq6489p7h1k428pv8k45w4f")))) + (base32 "10vbk4vplmzp3p1mhwnhj81g6i5xvam9pdvmiy6cmd0xvnmdyy77")))) (build-system gnu-build-system) (arguments '(#:configure-flags @@ -3179,18 +3382,17 @@ devices. It replaces @code{iwconfig}, which is deprecated.") ;; These programs are only needed to calibrate, so using ;; relative file names avoids adding extra inputs. When they ;; are missing powertop gracefully handles it. - (("/usr/bin/hcitool") "hcitool") - (("/usr/bin/xset") "xset") - (("/usr/sbin/hciconfig") "hciconfig")) - #t)))))) + (("/usr/s?bin/(hciconfig|hcitool|xset)" _ command) + command)))))))) + (native-inputs + (list autoconf + autoconf-archive + automake + gettext-minimal + libtool + pkg-config)) (inputs (list kmod libnl ncurses pciutils zlib)) - (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("gettext" ,gettext-minimal) - ("libtool" ,libtool) - ("pkg-config" ,pkg-config))) (home-page "https://01.org/powertop/") (synopsis "Analyze power consumption on Intel-based laptops") (description @@ -3824,7 +4026,7 @@ from the module-init-tools project.") (define-public earlyoom (package (name "earlyoom") - (version "1.6.2") + (version "1.7") (source (origin (method git-fetch) (uri (git-reference @@ -3833,7 +4035,7 @@ from the module-init-tools project.") (file-name (git-file-name name version)) (sha256 (base32 - "16iyn51xlrsbshc7p5xl2338yyfzknaqc538sa7mamgccqwgyvvq")))) + "1xqrs6wz59ks76hdgfd4vaj010kbvllilgam2xxyn0g56kai71zi")))) (build-system gnu-build-system) (arguments (list @@ -5783,36 +5985,25 @@ uncompressed size will not match the number given by @command{tar} or obviously it can be shared with files outside our set).") (license license:gpl2+))) -(define-public f2fs-tools-1.7 +(define-public f2fs-tools (package (name "f2fs-tools") - (version "1.7.0") + (version "1.15.0") (source (origin - (method url-fetch) - (uri (string-append - "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk" - "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://git.kernel.org/pub/scm/linux/kernel\ +/git/jaegeuk/f2fs-tools.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "1m6bn1ibq0p53m0n97il91xqgjgn2pzlz74lb5bfzassx7159m1k")))) - + "1ffws8pbpzp9730v0wy5xjas698lnbd2p7wpr2gl4mx45rsay9a5")))) (build-system gnu-build-system) - (arguments - `(#:configure-flags '("CFLAGS=-fcommon") - #:phases - (modify-phases %standard-phases - (add-after 'install 'install-headers - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (out-include (string-append out "/include"))) - (install-file "include/f2fs_fs.h" out-include) - (install-file "mkfs/f2fs_format_utils.h" out-include) - #t)))))) (native-inputs (list autoconf automake libtool pkg-config)) (inputs - `(("libuuid" ,util-linux "lib") - ("libselinux" ,libselinux))) + (list `(,util-linux "lib"))) ;for libuuid (home-page "https://f2fs.wiki.kernel.org/") (synopsis "Userland tools for f2fs") (description @@ -5823,21 +6014,33 @@ disks and SD cards. This package provides the userland utilities.") ;; GPL2/LGPL2.1, everything else is GPL2 only. See 'COPYING'. (license (list license:gpl2 license:lgpl2.1)))) -(define-public f2fs-tools +(define-public f2fs-tools-1.7 (package - (inherit f2fs-tools-1.7) + (inherit f2fs-tools) (name "f2fs-tools") - (version "1.14.0") + (version "1.7.0") (source (origin - (method url-fetch) - (uri (string-append - "https://git.kernel.org/cgit/linux/kernel/git/jaegeuk" - "/f2fs-tools.git/snapshot/f2fs-tools-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url (git-reference-url + (origin-uri (package-source f2fs-tools)))) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "1lab1446c78xsjwhpki7s85z4171m8p9279c8yhm4882wba674k1")))) + "0wpzklw8smnngng0dm25jdmi7v5zfhpz02dksyxpz0a7kzzvnqqm")))) (inputs - `(("libuuid" ,util-linux "lib"))))) + (list `(,util-linux "lib") libselinux)) + (arguments + '(#:configure-flags '("CFLAGS=-fcommon") + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-headers + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (out-include (string-append out "/include"))) + (install-file "include/f2fs_fs.h" out-include) + (install-file "mkfs/f2fs_format_utils.h" out-include))))))))) (define-public f2fs-tools/static (static-package @@ -5855,18 +6058,9 @@ disks and SD cards. This package provides the userland utilities.") "-I" libuuid "/include/blkid") (string-append "libblkid_LIBS=-L" libuuid-static "/lib -lblkid"))) #:disallowed-references (,util-linux) + #:make-flags '("LDFLAGS=-all-static") #:phases (modify-phases %standard-phases ; TODO: f2fs phases. - (add-after 'unpack 'make-static - (lambda _ - (define (append-to-file name body) - (let ((file (open-file name "a"))) - (display body file) - (close-port file))) - (append-to-file "mkfs/Makefile.am" "\nmkfs_f2fs_LDFLAGS = -all-static\n") - (append-to-file "fsck/Makefile.am" "\nfsck_f2fs_LDFLAGS = -all-static\n") - (append-to-file "tools/Makefile.am" "\nf2fscrypt_LDFLAGS = -all-static -luuid\n") - #t)) (add-after 'install 'remove-store-references (lambda* (#:key outputs #:allow-other-keys) ;; Work around bug in our util-linux. @@ -6570,12 +6764,16 @@ not as a replacement for it.") (build-system gnu-build-system) (arguments `(#:configure-flags (list "--disable-pywrap") + #:modules (,@%gnu-build-system-modules + (ice-9 binary-ports) + (rnrs bytevectors) + (srfi srfi-26)) #:phases (modify-phases %standard-phases (add-after 'patch-source-shebangs 'patch-hardcoded-paths (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) - (utils-linux (assoc-ref inputs "utils-linux")) + (util-linux (assoc-ref inputs "util-linux")) (cryptsetup (assoc-ref inputs "cryptsetup")) (linux-pam (assoc-ref inputs "linux-pam")) (lvm2 (assoc-ref inputs "lvm2"))) @@ -6589,9 +6787,9 @@ not as a replacement for it.") "src/desktop/ecryptfs-mount-private.desktop.in" "src/desktop/ecryptfs-setup-private.desktop.in") (("/bin/mount") - (string-append utils-linux "/bin/mount")) + (string-append util-linux "/bin/mount")) (("/bin/umount") - (string-append utils-linux "/bin/umount")) + (string-append util-linux "/bin/umount")) (("/sbin/mount.ecryptfs_private") (string-append out "/sbin/mount.ecryptfs_private")) (("/sbin/umount.ecryptfs_private") @@ -6607,17 +6805,48 @@ not as a replacement for it.") (("/sbin/unix_chkpwd") (string-append linux-pam "/sbin/unix_chkpwd")) (("/sbin/dmsetup") - (string-append lvm2 "/sbin/dmsetup"))))))))) + (string-append lvm2 "/sbin/dmsetup")))))) + (add-after 'install 'wrap-scripts + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (add (map (lambda (bin) + (dirname (search-input-file + inputs (string-append "bin/" bin)))) + ;; For simplicity, we wrap all scripts the same. + (list "awk" "find" "gettext" "grep" "keyctl" "ls" + "lsof" "mount" "rsync" "sed" "which"))) + (script? (lambda (file) + (call-with-input-file file + (lambda (port) + (bytevector=? (string->utf8 "#!") + (get-bytevector-n port 2))))))) + (for-each (lambda (file) + (when (script? file) + (wrap-program file + ;; '= would be better than 'suffix but break + ;; setuid binaries. + `("PATH" ":" suffix (,@add + ,(string-append bin)))))) + (find-files bin ".")))))))) (native-inputs (list intltool perl ; for pod2man pkg-config)) (inputs - `(("keyutils" ,keyutils) - ("linux-pam" ,linux-pam) - ("utils-linux" ,util-linux) - ("cryptsetup" ,cryptsetup) - ("lvm2" ,lvm2) - ("nss" ,nss))) + (list coreutils + cryptsetup + findutils + gawk + grep + keyutils + linux-pam + lsof + lvm2 + nss + rsync + sed + util-linux + which)) (home-page "https://ecryptfs.org/") (synopsis "eCryptfs cryptographic file system utilities") (description @@ -6755,7 +6984,7 @@ the @code{mce-inject} module loaded if it exists.") (define-public mcelog (package (name "mcelog") - (version "189") + (version "190") (source (origin (method git-fetch) @@ -6764,7 +6993,7 @@ the @code{mce-inject} module loaded if it exists.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0ml12xmmmljp22a89fw23c6gmba4dngavgnisv665w67kbnv5085")) + (base32 "1466zkbxgjg8ik0gd9vwsjiwg0yg7g8ra4bw3lg3ypla2kiydy4q")) (modules '((guix build utils))) (snippet `(begin @@ -6800,7 +7029,7 @@ exceeded.") (define-public mtd-utils (package (name "mtd-utils") - (version "2.1.4") + (version "2.1.5") (source (origin (method url-fetch) (uri (string-append @@ -6808,7 +7037,7 @@ exceeded.") "mtd-utils-" version ".tar.bz2")) (sha256 (base32 - "168vyzpfa0n66i8lcf626b9jczjr81rqbdk7735lfb18bp8i2rrc")))) + "0ilz8hkcyvfcnqpy25kbr8fb71x9vl28wbmw56vvd68n2byjfviq")))) (arguments (list #:configure-flags (if (%current-target-system) ; When cross-compiling. @@ -6819,12 +7048,12 @@ exceeded.") (native-inputs (list cmocka pkg-config)) (inputs - `(("acl" ,acl) ; extended attributes (xattr) - ("libuuid" ,util-linux "lib") - ("lzo" ,lzo) - ("openssl" ,openssl) ; optional crypto support - ("zlib" ,zlib) - ("zstd" ,zstd "lib"))) + (list acl ; extended attributes (xattr) + lzo + openssl ; optional crypto support + `(,util-linux "lib") + zlib + `(,zstd "lib"))) (build-system gnu-build-system) (synopsis "MTD Flash Storage Utilities") (description "This package provides utilities for testing, partitioning, etc @@ -7419,14 +7648,14 @@ re-use code and to avoid re-inventing the wheel.") (define-public libnftnl (package (name "libnftnl") - (version "1.2.3") + (version "1.2.4") (source (origin (method url-fetch) (uri (string-append "mirror://netfilter.org/libnftnl/" "libnftnl-" version ".tar.bz2")) (sha256 - (base32 "0m82bmh8i24hwxmz7rxwxjll4904ghd2b1x1p5h8algrg6dyl5p9")))) + (base32 "0zs7c8swlirxnbhl8q1b0p8g3jrzns7fyxsrglz71zfdwhxj7zn0")))) (build-system gnu-build-system) (native-inputs (list pkg-config)) @@ -7502,7 +7731,7 @@ userspace queueing component and the logging subsystem.") (define-public libnetfilter-conntrack (package (name "libnetfilter-conntrack") - (version "1.0.8") + (version "1.0.9") (source (origin (method url-fetch) @@ -7511,8 +7740,7 @@ userspace queueing component and the logging subsystem.") "libnetfilter_conntrack-" version ".tar.bz2")) (sha256 - (base32 - "1ky1mqgnplw2h9jf0kn0a69d94jkydhbiipng9l2hdcj13h3pl8c")))) + (base32 "1a3rnpsba64dzy97wwjrxal89wr0nf9znvag2j18nkp3kzs9vgb7")))) (build-system gnu-build-system) (native-inputs (list pkg-config)) (inputs (list libnfnetlink libmnl)) @@ -7530,7 +7758,7 @@ conntrack-tools among many other applications.") (define-public libnetfilter-cttimeout (package (name "libnetfilter-cttimeout") - (version "1.0.0") + (version "1.0.1") (source (origin (method url-fetch) @@ -7538,8 +7766,7 @@ conntrack-tools among many other applications.") "libnetfilter_cttimeout/files/" "libnetfilter_cttimeout-" version ".tar.bz2")) (sha256 - (base32 - "1fpyz1zlvcq80244knvyvy87909xjqlj02lmw8yblz2m9xsi5axf")))) + (base32 "0983cpyvxyycbnzqlrzml80pph2z51r6s7sxp06ciq8468pxln8b")))) (build-system gnu-build-system) (native-inputs (list pkg-config)) (inputs (list libmnl)) @@ -7557,7 +7784,7 @@ by conntrack-tools.") (define-public libnetfilter-cthelper (package (name "libnetfilter-cthelper") - (version "1.0.0") + (version "1.0.1") (source (origin (method url-fetch) @@ -7565,8 +7792,7 @@ by conntrack-tools.") "libnetfilter_cthelper/files/" "libnetfilter_cthelper-" version ".tar.bz2")) (sha256 - (base32 - "0gfgzkc1fjniqwk4jxds72c0lcgfhq2591hrvjrvd9nrqiqqwq87")))) + (base32 "04n95ngil5l8m8v64dfjm1dwq0wd3kf4vw1zblsrff13hxa3s1ql")))) (build-system gnu-build-system) (native-inputs (list pkg-config)) (inputs (list libmnl)) @@ -7973,14 +8199,14 @@ available in the kernel Linux.") (define-public cpuid (package (name "cpuid") - (version "20221003") + (version "20221201") (source (origin (method url-fetch) (uri (string-append "http://www.etallen.com/cpuid/cpuid-" version ".src.tar.gz")) (sha256 (base32 - "01w318kxcksfbjwjnnc9ly12g0yp4vm6xjgfl8mmi0jndg0cbi33")))) + "0vlg5zc0dayyn9bzyb25fcaxid9svrsjjza11afplrhh50wdrzh8")))) (build-system gnu-build-system) (arguments (list #:make-flags @@ -8644,7 +8870,7 @@ the superuser to make device nodes.") (define-public fakeroot (package (name "fakeroot") - (version "1.28") + (version "1.30.1") (source (origin ;; There are no tags in the repository, so take this snapshot. @@ -8653,7 +8879,7 @@ the superuser to make device nodes.") "fakeroot/fakeroot_" version ".orig.tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "1hlh77b6m2cfm42lcav372mbjni5akbgs25yg4wgi1gndzihbm2n")) + (base32 "0xba5gfh7ygv6na8n1ckqd2jnpdr9q88qan385qxp85c47sb3srj")) (modules '((guix build utils) (ice-9 ftw))) (snippet @@ -8715,16 +8941,8 @@ the superuser to make device nodes.") (substitute* "test/compare-tar" (("tar -tvf") "tar --numeric-owner -tvf"))))))) (native-inputs - `(;; For bootstrapping the package. - ("autoconf" ,autoconf-2.71) - ("automake" ,automake) - ("libtool" ,libtool) - ("gettext" ,gettext-minimal) - ("po4a" ,po4a) - - ;; For tests. - ("sharutils" ,sharutils) - ("xz" ,xz))) + (list autoconf-2.71 automake gettext-minimal libtool po4a + sharutils xz)) ; for tests (inputs (list acl libcap util-linux sed coreutils)) (synopsis "Run commands in an environment with fake root privileges") @@ -8842,7 +9060,7 @@ types and interfaces and translates so that the X server can use them.") (list alsa-lib dbus eudev - ffmpeg + ffmpeg-4 gstreamer gst-plugins-base libva @@ -8886,6 +9104,7 @@ of Linux application development.") (modify-inputs (package-native-inputs pipewire) (prepend python-docutils))) (inputs (modify-inputs (package-inputs pipewire) + (replace "ffmpeg" ffmpeg) (prepend avahi bluez jack-2 @@ -9141,7 +9360,7 @@ and above.") (define-public bpftrace (package (name "bpftrace") - (version "0.15.0") + (version "0.16.0") (source (origin (method git-fetch) @@ -9150,7 +9369,7 @@ and above.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "022fg0kiz0liahj82wvlxmivkwyp86shs5fwr2v4blx7lh05k9zm")) + (base32 "0v1376wfk4gy5rrjdsck6r3347nb0bgbj70998z1bkx9z95wm3ab")) (patches (search-patches "bpftrace-disable-bfd-disasm.patch")))) (build-system cmake-build-system) (native-inputs @@ -9207,14 +9426,14 @@ receiving. It is dedicated to the PL011 UART of the Raspberry Pi.") (define-public ipset (package (name "ipset") - (version "7.15") + (version "7.16") (source (origin (method url-fetch) (uri (string-append "https://ipset.netfilter.org/" "ipset-" version ".tar.bz2")) (sha256 - (base32 "0l8pcaym6057hq3a4zwnk53p5y6xg1m3d3c83wn18h5nmnm4am8a")))) + (base32 "1l4nybq17gr2ick7bbb5gq46bsqiw4rxmrvi0qfkvpm1yk6xkcc7")))) (build-system gnu-build-system) (inputs (list libmnl)) @@ -9246,7 +9465,7 @@ then IP sets may be the proper tool for you.") (define-public liburing (package (name "liburing") - (version "2.2") + (version "2.3") (source (origin (method git-fetch) (uri (git-reference @@ -9255,7 +9474,7 @@ then IP sets may be the proper tool for you.") (file-name (git-file-name name version)) (sha256 (base32 - "1677zqqbd9nw9hrdaxqbd1zwy54cxfsv2z0bjipn23mrkz2xzy1k")))) + "1ngg5640adlinkal8b28x5snrbab9yr8jw1w539h39k4pqnsbpmw")))) (build-system gnu-build-system) (arguments `(;; Tests are dependent on kernel version and features @@ -9319,27 +9538,37 @@ provides user-space tools for creating EROFS file systems.") (sha256 (base32 "0r0339mg4rc12p63iiq2kwdqn1zjakyiv014i2a2l9s8v5rjik41")))) (native-inputs (list autoconf automake libtool)) - (inputs (list sqlite)) + (inputs (list perl perl-dbd-sqlite sqlite dmidecode kmod)) (arguments - `(#:configure-flags - (list "--enable-all" - ;; Don't install unused /etc/sysconfig/rasdaemon environment file. - "--with-sysconfdefdir=." - "--localstatedir=/var") - #:phases - (modify-phases %standard-phases - (add-before 'configure 'munge-autotools - (lambda _ - ;; For some reason upstream forces sysconfdir=/etc. This results - ;; in EPERM during the install phase. Removing the offending - ;; line lets sysconfdir correctly pick up DESTDIR. - (substitute* "configure.ac" - (("^test .* sysconfdir=/etc\n$") "")) - ;; Upstream tries to create /var/lib/rasdaemon at install time. - ;; This results in EPERM on guix. Instead, the service should - ;; create this at activation time. - (substitute* "Makefile.am" - (("^\\s*\\$\\(install_sh\\) -d .*@RASSTATEDIR@.*$") ""))))))) + (list + #:configure-flags + #~(list "--enable-all" + ;; Don't install unused /etc/sysconfig/rasdaemon environment file. + "--with-sysconfdefdir=." + "--localstatedir=/var") + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'munge-autotools + (lambda _ + ;; For some reason upstream forces sysconfdir=/etc. This results + ;; in EPERM during the install phase. Removing the offending + ;; line lets sysconfdir correctly pick up DESTDIR. + (substitute* "configure.ac" + (("^test .* sysconfdir=/etc\n$") "")) + ;; Upstream tries to create /var/lib/rasdaemon at install time. + ;; This results in EPERM on guix. Instead, the service should + ;; create this at activation time. + (substitute* "Makefile.am" + (("^\\s*\\$\\(install_sh\\) -d .*@RASSTATEDIR@.*$") "")))) + (add-after 'install 'fix-dmidecode-and-modprobe + (lambda _ + (substitute* (string-append #$output "/sbin/ras-mc-ctl") + (("find_prog \\(\"dmidecode\"\\).*$") (format #f "~s;~%" (string-append #$dmidecode "/sbin/dmidecode"))) + (("find_prog \\(\"modprobe\"\\).*$") (format #f "~s;~%" (string-append #$kmod "/bin/modprobe")))))) + (add-after 'wrap 'wrap-rasdaemon + (lambda _ + (wrap-program (string-append #$output "/sbin/ras-mc-ctl") + `("PERL5LIB" ":" prefix ,(string-split (getenv "PERL5LIB") #\:)))))))) (build-system gnu-build-system) (home-page "https://github.com/mchehab/rasdaemon") (synopsis "Platform Reliability, Availability, and Serviceability tools") |