diff options
Diffstat (limited to 'gnu/packages/linux.scm')
| -rw-r--r-- | gnu/packages/linux.scm | 327 |
1 files changed, 194 insertions, 133 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 601162b465f..2e1da21800d 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | ;;; Copyright © 2018, 2019 Pierre Langlois <pierre.langlois@gmx.com> | 33 | ;;; Copyright © 2018, 2019 Pierre Langlois <pierre.langlois@gmx.com> |
| 34 | ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com> | 34 | ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com> |
| 35 | ;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de> | 35 | ;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de> |
| 36 | ;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> | 36 | ;;; Copyright © 2019, 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
| 37 | ;;; Copyright © 2019 Stefan Stefanović <stefanx2ovic@gmail.com> | 37 | ;;; Copyright © 2019 Stefan Stefanović <stefanx2ovic@gmail.com> |
| 38 | ;;; Copyright © 2019-2022 Brice Waegeneire <brice@waegenei.re> | 38 | ;;; Copyright © 2019-2022 Brice Waegeneire <brice@waegenei.re> |
| 39 | ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net> | 39 | ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net> |
| @@ -108,8 +108,9 @@ | |||
| 108 | #:use-module (gnu packages docbook) | 108 | #:use-module (gnu packages docbook) |
| 109 | #:use-module (gnu packages documentation) | 109 | #:use-module (gnu packages documentation) |
| 110 | #:use-module (gnu packages elf) | 110 | #:use-module (gnu packages elf) |
| 111 | #:use-module (gnu packages flex) | ||
| 112 | #:use-module (gnu packages file) | 111 | #:use-module (gnu packages file) |
| 112 | #:use-module (gnu packages flex) | ||
| 113 | #:use-module (gnu packages fontutils) | ||
| 113 | #:use-module (gnu packages freedesktop) | 114 | #:use-module (gnu packages freedesktop) |
| 114 | #:use-module (gnu packages gawk) | 115 | #:use-module (gnu packages gawk) |
| 115 | #:use-module (gnu packages gcc) | 116 | #:use-module (gnu packages gcc) |
| @@ -119,6 +120,7 @@ | |||
| 119 | #:use-module (gnu packages gnupg) | 120 | #:use-module (gnu packages gnupg) |
| 120 | #:use-module (gnu packages golang) | 121 | #:use-module (gnu packages golang) |
| 121 | #:use-module (gnu packages gperf) | 122 | #:use-module (gnu packages gperf) |
| 123 | #:use-module (gnu packages graphviz) | ||
| 122 | #:use-module (gnu packages gstreamer) | 124 | #:use-module (gnu packages gstreamer) |
| 123 | #:use-module (gnu packages gtk) | 125 | #:use-module (gnu packages gtk) |
| 124 | #:use-module (gnu packages haskell-apps) | 126 | #:use-module (gnu packages haskell-apps) |
| @@ -355,7 +357,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." | |||
| 355 | ;; The current "stable" kernels. That is, the most recently released major | 357 | ;; The current "stable" kernels. That is, the most recently released major |
| 356 | ;; versions that are still supported upstream. | 358 | ;; versions that are still supported upstream. |
| 357 | 359 | ||
| 358 | (define-public linux-libre-6.0-version "6.0.9") | 360 | (define-public linux-libre-6.0-version "6.0.10") |
| 359 | (define-public linux-libre-6.0-gnu-revision "gnu") | 361 | (define-public linux-libre-6.0-gnu-revision "gnu") |
| 360 | (define deblob-scripts-6.0 | 362 | (define deblob-scripts-6.0 |
| 361 | (linux-libre-deblob-scripts | 363 | (linux-libre-deblob-scripts |
| @@ -365,7 +367,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." | |||
| 365 | (base32 "06iqxkg5hakzvmz6gcz878k1sr553zbng2j1b2whgfg7zmhxkb34"))) | 367 | (base32 "06iqxkg5hakzvmz6gcz878k1sr553zbng2j1b2whgfg7zmhxkb34"))) |
| 366 | (define-public linux-libre-6.0-pristine-source | 368 | (define-public linux-libre-6.0-pristine-source |
| 367 | (let ((version linux-libre-6.0-version) | 369 | (let ((version linux-libre-6.0-version) |
| 368 | (hash (base32 "1irip1yk62carcisxlacwcxsiqib4qswx6h5mfhv8f97x04a4531"))) | 370 | (hash (base32 "1l0xak4w7c16cg8lhracy8r18zzdl0x5s654w6ivyw6dhk6pzr9r"))) |
| 369 | (make-linux-libre-source version | 371 | (make-linux-libre-source version |
| 370 | (%upstream-linux-source version hash) | 372 | (%upstream-linux-source version hash) |
| 371 | deblob-scripts-6.0))) | 373 | deblob-scripts-6.0))) |
| @@ -373,7 +375,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." | |||
| 373 | ;; The "longterm" kernels — the older releases with long-term upstream support. | 375 | ;; The "longterm" kernels — the older releases with long-term upstream support. |
| 374 | ;; Here are the support timelines: | 376 | ;; Here are the support timelines: |
| 375 | ;; <https://www.kernel.org/category/releases.html> | 377 | ;; <https://www.kernel.org/category/releases.html> |
| 376 | (define-public linux-libre-5.15-version "5.15.79") | 378 | (define-public linux-libre-5.15-version "5.15.80") |
| 377 | (define-public linux-libre-5.15-gnu-revision "gnu") | 379 | (define-public linux-libre-5.15-gnu-revision "gnu") |
| 378 | (define deblob-scripts-5.15 | 380 | (define deblob-scripts-5.15 |
| 379 | (linux-libre-deblob-scripts | 381 | (linux-libre-deblob-scripts |
| @@ -383,12 +385,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." | |||
| 383 | (base32 "0h8a48dvgxyj3v08lp99kh5pfa93r4rks78cj0j1rwz1516xk8h3"))) | 385 | (base32 "0h8a48dvgxyj3v08lp99kh5pfa93r4rks78cj0j1rwz1516xk8h3"))) |
| 384 | (define-public linux-libre-5.15-pristine-source | 386 | (define-public linux-libre-5.15-pristine-source |
| 385 | (let ((version linux-libre-5.15-version) | 387 | (let ((version linux-libre-5.15-version) |
| 386 | (hash (base32 "0m61k7k6lj24z9a266q08wzghggjik2wizcabdwd1vn0vcqr18yb"))) | 388 | (hash (base32 "0kgxznd3sfbmnygjvp9dzhzg5chxlaxk6kldxmh1y0njcrj1lciv"))) |
| 387 | (make-linux-libre-source version | 389 | (make-linux-libre-source version |
| 388 | (%upstream-linux-source version hash) | 390 | (%upstream-linux-source version hash) |
| 389 | deblob-scripts-5.15))) | 391 | deblob-scripts-5.15))) |
| 390 | 392 | ||
| 391 | (define-public linux-libre-5.10-version "5.10.155") | 393 | (define-public linux-libre-5.10-version "5.10.156") |
| 392 | (define-public linux-libre-5.10-gnu-revision "gnu1") | 394 | (define-public linux-libre-5.10-gnu-revision "gnu1") |
| 393 | (define deblob-scripts-5.10 | 395 | (define deblob-scripts-5.10 |
| 394 | (linux-libre-deblob-scripts | 396 | (linux-libre-deblob-scripts |
| @@ -398,42 +400,42 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." | |||
| 398 | (base32 "1m9l554w6a72mq0kf7ggm44z247m2yz6zhafwqxh96qpjpcaabpj"))) | 400 | (base32 "1m9l554w6a72mq0kf7ggm44z247m2yz6zhafwqxh96qpjpcaabpj"))) |
| 399 | (define-public linux-libre-5.10-pristine-source | 401 | (define-public linux-libre-5.10-pristine-source |
| 400 | (let ((version linux-libre-5.10-version) | 402 | (let ((version linux-libre-5.10-version) |
| 401 | (hash (base32 "1wyla96qsdf50n7qjj4hdf36bj56whv7gc9mgw9bvrsqdi92gc7i"))) | 403 | (hash (base32 "08srjps110zi4ivzh0z2jf78ddyfj2wivdliffb2f03jr9j9k7k7"))) |
| 402 | (make-linux-libre-source version | 404 | (make-linux-libre-source version |
| 403 | (%upstream-linux-source version hash) | 405 | (%upstream-linux-source version hash) |
| 404 | deblob-scripts-5.10))) | 406 | deblob-scripts-5.10))) |
| 405 | 407 | ||
| 406 | (define-public linux-libre-5.4-version "5.4.224") | 408 | (define-public linux-libre-5.4-version "5.4.225") |
| 407 | (define-public linux-libre-5.4-gnu-revision "gnu1") | 409 | (define-public linux-libre-5.4-gnu-revision "gnu1") |
| 408 | (define deblob-scripts-5.4 | 410 | (define deblob-scripts-5.4 |
| 409 | (linux-libre-deblob-scripts | 411 | (linux-libre-deblob-scripts |
| 410 | linux-libre-5.4-version | 412 | linux-libre-5.4-version |
| 411 | linux-libre-5.4-gnu-revision | 413 | linux-libre-5.4-gnu-revision |
| 412 | (base32 "1nlgk8ajb5wl3aa96h9a0pb9j5a5wmrbpk63varn557x1d00r7wj") | 414 | (base32 "1nlgk8ajb5wl3aa96h9a0pb9j5a5wmrbpk63varn557x1d00r7wj") |
| 413 | (base32 "1vnjbdyssa7dwyjl9kg35alwvf7yh597cl74yr1wy2gk5bc9paw6"))) | 415 | (base32 "1bgblfkcnrabnr9hpdl07qgps57h6bq4v5pjrxs798vq43db66va"))) |
| 414 | (define-public linux-libre-5.4-pristine-source | 416 | (define-public linux-libre-5.4-pristine-source |
| 415 | (let ((version linux-libre-5.4-version) | 417 | (let ((version linux-libre-5.4-version) |
| 416 | (hash (base32 "0dixs4w7nmkjgxv9dxgjdy8v6r4parkpqyvdfyr0wqk0amdz4zcb"))) | 418 | (hash (base32 "1ak0qlxzfylgvkldh2whq4mzynh1rymhnnc1yif9a5s3f7v9dxar"))) |
| 417 | (make-linux-libre-source version | 419 | (make-linux-libre-source version |
| 418 | (%upstream-linux-source version hash) | 420 | (%upstream-linux-source version hash) |
| 419 | deblob-scripts-5.4))) | 421 | deblob-scripts-5.4))) |
| 420 | 422 | ||
| 421 | (define-public linux-libre-4.19-version "4.19.265") | 423 | (define-public linux-libre-4.19-version "4.19.267") |
| 422 | (define-public linux-libre-4.19-gnu-revision "gnu1") | 424 | (define-public linux-libre-4.19-gnu-revision "gnu1") |
| 423 | (define deblob-scripts-4.19 | 425 | (define deblob-scripts-4.19 |
| 424 | (linux-libre-deblob-scripts | 426 | (linux-libre-deblob-scripts |
| 425 | linux-libre-4.19-version | 427 | linux-libre-4.19-version |
| 426 | linux-libre-4.19-gnu-revision | 428 | linux-libre-4.19-gnu-revision |
| 427 | (base32 "06pqv050bkii0hc2v7ymny5264w1bca8db0dp1pw9mfmjg865am5") | 429 | (base32 "06pqv050bkii0hc2v7ymny5264w1bca8db0dp1pw9mfmjg865am5") |
| 428 | (base32 "00i91lx938nqlgy63hiricqd0fnbbf26vgya9c5lb7m1f4x324im"))) | 430 | (base32 "0g1yhzxm3ixfll6n630v7lddcyvf888sg114nimh0lkvzd180s99"))) |
| 429 | (define-public linux-libre-4.19-pristine-source | 431 | (define-public linux-libre-4.19-pristine-source |
| 430 | (let ((version linux-libre-4.19-version) | 432 | (let ((version linux-libre-4.19-version) |
| 431 | (hash (base32 "1l5cdpgng1gci1p1gdr2jzqw486h3w56gpyc7fbq74hlc6nnwh1p"))) | 433 | (hash (base32 "035yxx13jz5f5ig2r6ybzgivm8vjafgnvjws0jfzha4w6klf7r9l"))) |
| 432 | (make-linux-libre-source version | 434 | (make-linux-libre-source version |
| 433 | (%upstream-linux-source version hash) | 435 | (%upstream-linux-source version hash) |
| 434 | deblob-scripts-4.19))) | 436 | deblob-scripts-4.19))) |
| 435 | 437 | ||
| 436 | (define-public linux-libre-4.14-version "4.14.299") | 438 | (define-public linux-libre-4.14-version "4.14.300") |
| 437 | (define-public linux-libre-4.14-gnu-revision "gnu1") | 439 | (define-public linux-libre-4.14-gnu-revision "gnu1") |
| 438 | (define deblob-scripts-4.14 | 440 | (define deblob-scripts-4.14 |
| 439 | (linux-libre-deblob-scripts | 441 | (linux-libre-deblob-scripts |
| @@ -443,12 +445,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." | |||
| 443 | (base32 "00i91lx938nqlgy63hiricqd0fnbbf26vgya9c5lb7m1f4x324im"))) | 445 | (base32 "00i91lx938nqlgy63hiricqd0fnbbf26vgya9c5lb7m1f4x324im"))) |
| 444 | (define-public linux-libre-4.14-pristine-source | 446 | (define-public linux-libre-4.14-pristine-source |
| 445 | (let ((version linux-libre-4.14-version) | 447 | (let ((version linux-libre-4.14-version) |
| 446 | (hash (base32 "0p5ic2mrb9vl3qkzvqxhia3kygjv8xa6s1kqkwgd6b4rmq1kc8r6"))) | 448 | (hash (base32 "047vmh09icm45g7mnmdvyj9cam7747bcpah1s7n9dm5i2j2f906y"))) |
| 447 | (make-linux-libre-source version | 449 | (make-linux-libre-source version |
| 448 | (%upstream-linux-source version hash) | 450 | (%upstream-linux-source version hash) |
| 449 | deblob-scripts-4.14))) | 451 | deblob-scripts-4.14))) |
| 450 | 452 | ||
| 451 | (define-public linux-libre-4.9-version "4.9.333") | 453 | (define-public linux-libre-4.9-version "4.9.334") |
| 452 | (define-public linux-libre-4.9-gnu-revision "gnu1") | 454 | (define-public linux-libre-4.9-gnu-revision "gnu1") |
| 453 | (define deblob-scripts-4.9 | 455 | (define deblob-scripts-4.9 |
| 454 | (linux-libre-deblob-scripts | 456 | (linux-libre-deblob-scripts |
| @@ -458,7 +460,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." | |||
| 458 | (base32 "0bib3641dbcqdkx3anna3caxnsg3nw9cnmhcklq0s93g3m57041h"))) | 460 | (base32 "0bib3641dbcqdkx3anna3caxnsg3nw9cnmhcklq0s93g3m57041h"))) |
| 459 | (define-public linux-libre-4.9-pristine-source | 461 | (define-public linux-libre-4.9-pristine-source |
| 460 | (let ((version linux-libre-4.9-version) | 462 | (let ((version linux-libre-4.9-version) |
| 461 | (hash (base32 "0ash877gkrrc063h6ncl9d4gzyhndanpxsdgf1a93abbfv281gs1"))) | 463 | (hash (base32 "0sjh492mfic6llgwb957nj7gd7c0dvqnk97ngq8d50sjsyjznyk9"))) |
| 462 | (make-linux-libre-source version | 464 | (make-linux-libre-source version |
| 463 | (%upstream-linux-source version hash) | 465 | (%upstream-linux-source version hash) |
| 464 | deblob-scripts-4.9))) | 466 | deblob-scripts-4.9))) |
| @@ -494,17 +496,20 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." | |||
| 494 | (define-public linux-libre-6.0-source | 496 | (define-public linux-libre-6.0-source |
| 495 | (source-with-patches linux-libre-6.0-pristine-source | 497 | (source-with-patches linux-libre-6.0-pristine-source |
| 496 | (list %boot-logo-patch | 498 | (list %boot-logo-patch |
| 497 | %linux-libre-arm-export-__sync_icache_dcache-patch))) | 499 | %linux-libre-arm-export-__sync_icache_dcache-patch |
| 500 | (search-patch "linux-libre-infodocs-target.patch")))) | ||
| 498 | 501 | ||
| 499 | (define-public linux-libre-5.15-source | 502 | (define-public linux-libre-5.15-source |
| 500 | (source-with-patches linux-libre-5.15-pristine-source | 503 | (source-with-patches linux-libre-5.15-pristine-source |
| 501 | (list %boot-logo-patch | 504 | (list %boot-logo-patch |
| 502 | %linux-libre-arm-export-__sync_icache_dcache-patch))) | 505 | %linux-libre-arm-export-__sync_icache_dcache-patch |
| 506 | (search-patch "linux-libre-infodocs-target.patch")))) | ||
| 503 | 507 | ||
| 504 | (define-public linux-libre-5.10-source | 508 | (define-public linux-libre-5.10-source |
| 505 | (source-with-patches linux-libre-5.10-pristine-source | 509 | (source-with-patches linux-libre-5.10-pristine-source |
| 506 | (list %boot-logo-patch | 510 | (list %boot-logo-patch |
| 507 | %linux-libre-arm-export-__sync_icache_dcache-patch))) | 511 | %linux-libre-arm-export-__sync_icache_dcache-patch |
| 512 | (search-patch "linux-libre-infodocs-target.patch")))) | ||
| 508 | 513 | ||
| 509 | (define-public linux-libre-5.4-source | 514 | (define-public linux-libre-5.4-source |
| 510 | (source-with-patches linux-libre-5.4-pristine-source | 515 | (source-with-patches linux-libre-5.4-pristine-source |
| @@ -759,6 +764,11 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." | |||
| 759 | ;;; Kernel package utilities. | 764 | ;;; Kernel package utilities. |
| 760 | ;;; | 765 | ;;; |
| 761 | 766 | ||
| 767 | (define (doc-supported? version) | ||
| 768 | ;; Versions older than 5.10 have different enough build scripts that the | ||
| 769 | ;; infodocs patch doesn't apply. | ||
| 770 | (version>=? version "5.10")) | ||
| 771 | |||
| 762 | (define* (make-linux-libre version gnu-revision hash-string supported-systems | 772 | (define* (make-linux-libre version gnu-revision hash-string supported-systems |
| 763 | #:key | 773 | #:key |
| 764 | (extra-version #f) | 774 | (extra-version #f) |
| @@ -767,7 +777,13 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." | |||
| 767 | (configuration-file #f) | 777 | (configuration-file #f) |
| 768 | (defconfig "defconfig") | 778 | (defconfig "defconfig") |
| 769 | (extra-options %default-extra-linux-options) | 779 | (extra-options %default-extra-linux-options) |
| 770 | (patches (list %boot-logo-patch))) | 780 | (build-doc? (doc-supported? version)) |
| 781 | (patches | ||
| 782 | `(,%boot-logo-patch | ||
| 783 | ,@(if build-doc? | ||
| 784 | (list (search-patch | ||
| 785 | "linux-libre-infodocs-target.patch")) | ||
| 786 | '())))) | ||
| 771 | (make-linux-libre* version gnu-revision | 787 | (make-linux-libre* version gnu-revision |
| 772 | (origin | 788 | (origin |
| 773 | (method url-fetch) | 789 | (method url-fetch) |
| @@ -778,7 +794,8 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." | |||
| 778 | #:extra-version extra-version | 794 | #:extra-version extra-version |
| 779 | #:configuration-file configuration-file | 795 | #:configuration-file configuration-file |
| 780 | #:defconfig defconfig | 796 | #:defconfig defconfig |
| 781 | #:extra-options extra-options)) | 797 | #:extra-options extra-options |
| 798 | #:build-doc? build-doc?)) | ||
| 782 | 799 | ||
| 783 | (define* (make-linux-libre* version gnu-revision source supported-systems | 800 | (define* (make-linux-libre* version gnu-revision source supported-systems |
| 784 | #:key | 801 | #:key |
| @@ -787,7 +804,10 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." | |||
| 787 | ;; See kernel-config for an example. | 804 | ;; See kernel-config for an example. |
| 788 | (configuration-file #f) | 805 | (configuration-file #f) |
| 789 | (defconfig "defconfig") | 806 | (defconfig "defconfig") |
| 790 | (extra-options %default-extra-linux-options)) | 807 | (extra-options %default-extra-linux-options) |
| 808 | (build-doc? (doc-supported? version))) | ||
| 809 | (when (and build-doc? (not (doc-supported? version))) | ||
| 810 | (error "unsupported 'build-doc?' for kernels <5.10")) | ||
| 791 | (package | 811 | (package |
| 792 | (name (if extra-version | 812 | (name (if extra-version |
| 793 | (string-append "linux-libre-" extra-version) | 813 | (string-append "linux-libre-" extra-version) |
| @@ -796,11 +816,127 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." | |||
| 796 | (source source) | 816 | (source source) |
| 797 | (supported-systems supported-systems) | 817 | (supported-systems supported-systems) |
| 798 | (build-system gnu-build-system) | 818 | (build-system gnu-build-system) |
| 819 | (arguments | ||
| 820 | (list | ||
| 821 | #:modules '((guix build gnu-build-system) | ||
| 822 | (guix build utils) | ||
| 823 | (srfi srfi-1) | ||
| 824 | (srfi srfi-26) | ||
| 825 | (ice-9 ftw) | ||
| 826 | (ice-9 match)) | ||
| 827 | #:tests? #f | ||
| 828 | #:phases | ||
| 829 | #~(modify-phases %standard-phases | ||
| 830 | (add-after 'unpack 'patch-/bin/pwd | ||
| 831 | (lambda _ | ||
| 832 | (substitute* (find-files | ||
| 833 | "." "^Makefile(\\.include)?$") | ||
| 834 | (("/bin/pwd") "pwd")))) | ||
| 835 | #$@(if build-doc? | ||
| 836 | #~((add-before 'configure 'build-doc | ||
| 837 | (lambda _ | ||
| 838 | (substitute* "Documentation/Makefile" | ||
| 839 | ;; Remove problematic environment check script. | ||
| 840 | ((".*scripts/sphinx-pre-install.*") "")) | ||
| 841 | (invoke "make" "infodocs"))) | ||
| 842 | (add-after 'build-doc 'install-doc | ||
| 843 | (lambda _ | ||
| 844 | (with-directory-excursion "Documentation/output" | ||
| 845 | (invoke "make" "-C" "texinfo" "install-info" | ||
| 846 | (string-append "infodir=" #$output | ||
| 847 | "/share/info")))))) | ||
| 848 | #~()) | ||
| 849 | (replace 'configure | ||
| 850 | (lambda* (#:key inputs target #:allow-other-keys) | ||
| 851 | ;; Avoid introducing timestamps. | ||
| 852 | (setenv "KCONFIG_NOTIMESTAMP" "1") | ||
| 853 | (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH")) | ||
| 854 | |||
| 855 | ;; Other variables useful for reproducibility. | ||
| 856 | (setenv "KBUILD_BUILD_USER" "guix") | ||
| 857 | (setenv "KBUILD_BUILD_HOST" "guix") | ||
| 858 | |||
| 859 | ;; Set ARCH and CROSS_COMPILE. | ||
| 860 | (let ((arch #$(platform-linux-architecture | ||
| 861 | (lookup-platform-by-target-or-system | ||
| 862 | (or (%current-target-system) | ||
| 863 | (%current-system)))))) | ||
| 864 | (setenv "ARCH" arch) | ||
| 865 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) | ||
| 866 | |||
| 867 | (when target | ||
| 868 | (setenv "CROSS_COMPILE" (string-append target "-")) | ||
| 869 | (format #t "`CROSS_COMPILE' set to `~a'~%" | ||
| 870 | (getenv "CROSS_COMPILE")))) | ||
| 871 | |||
| 872 | (setenv "EXTRAVERSION" | ||
| 873 | #$(and extra-version | ||
| 874 | (string-append "-" extra-version))) | ||
| 875 | |||
| 876 | (let ((config (assoc-ref inputs "kconfig"))) | ||
| 877 | |||
| 878 | ;; Use a custom kernel configuration file or a default | ||
| 879 | ;; configuration file. | ||
| 880 | (if config | ||
| 881 | (begin | ||
| 882 | (copy-file config ".config") | ||
| 883 | (chmod ".config" #o666)) | ||
| 884 | (invoke "make" #$defconfig)) | ||
| 885 | |||
| 886 | ;; Appending works even when the option wasn't in the | ||
| 887 | ;; file. The last one prevails if duplicated. | ||
| 888 | (let ((port (open-file ".config" "a")) | ||
| 889 | (extra-configuration #$(config->string extra-options))) | ||
| 890 | (display extra-configuration port) | ||
| 891 | (close-port port)) | ||
| 892 | |||
| 893 | (invoke "make" "oldconfig")))) | ||
| 894 | (replace 'install | ||
| 895 | (lambda* (#:key inputs native-inputs #:allow-other-keys) | ||
| 896 | (let ((moddir (string-append #$output "/lib/modules")) | ||
| 897 | (dtbdir (string-append #$output "/lib/dtbs"))) | ||
| 898 | ;; Install kernel image, kernel configuration and link map. | ||
| 899 | (for-each (lambda (file) (install-file file #$output)) | ||
| 900 | (find-files "." "^(\\.config|bzImage|zImage|Image\ | ||
| 901 | |vmlinuz|System\\.map|Module\\.symvers)$")) | ||
| 902 | ;; Install device tree files | ||
| 903 | (unless (null? (find-files "." "\\.dtb$")) | ||
| 904 | (mkdir-p dtbdir) | ||
| 905 | (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir) | ||
| 906 | "dtbs_install")) | ||
| 907 | ;; Install kernel modules | ||
| 908 | (mkdir-p moddir) | ||
| 909 | (invoke "make" | ||
| 910 | ;; Disable depmod because the Guix system's | ||
| 911 | ;; module directory is an union of potentially | ||
| 912 | ;; multiple packages. It is not possible to use | ||
| 913 | ;; depmod to usefully calculate a dependency | ||
| 914 | ;; graph while building only one of them. | ||
| 915 | "DEPMOD=true" | ||
| 916 | (string-append "MODULE_DIR=" moddir) | ||
| 917 | (string-append "INSTALL_PATH=" #$output) | ||
| 918 | (string-append "INSTALL_MOD_PATH=" #$output) | ||
| 919 | "INSTALL_MOD_STRIP=1" | ||
| 920 | "modules_install") | ||
| 921 | (let* ((versions (filter (lambda (name) | ||
| 922 | (not (string-prefix? "." name))) | ||
| 923 | (scandir moddir))) | ||
| 924 | (version (match versions | ||
| 925 | ((x) x)))) | ||
| 926 | ;; There are symlinks to the build and source directory. | ||
| 927 | ;; Both will point to target /tmp/guix-build* and thus | ||
| 928 | ;; not be useful in a profile. Delete the symlinks. | ||
| 929 | (false-if-file-not-found | ||
| 930 | (delete-file | ||
| 931 | (string-append moddir "/" version "/build"))) | ||
| 932 | (false-if-file-not-found | ||
| 933 | (delete-file | ||
| 934 | (string-append moddir "/" version "/source")))))))))) | ||
| 799 | (native-inputs | 935 | (native-inputs |
| 800 | `(("perl" ,perl) | 936 | `(("perl" ,perl) |
| 801 | ("bc" ,bc) | 937 | ("bc" ,bc) |
| 802 | ("openssl" ,openssl) | 938 | ("openssl" ,openssl) |
| 803 | ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION | 939 | ("elfutils" ,elfutils) ;needed to enable CONFIG_STACK_VALIDATION |
| 804 | ("flex" ,flex) | 940 | ("flex" ,flex) |
| 805 | ("bison" ,bison) | 941 | ("bison" ,bison) |
| 806 | 942 | ||
| @@ -809,6 +945,18 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." | |||
| 809 | ("mpfr" ,mpfr) | 945 | ("mpfr" ,mpfr) |
| 810 | ("mpc" ,mpc) | 946 | ("mpc" ,mpc) |
| 811 | 947 | ||
| 948 | ;; For generating the documentation. | ||
| 949 | ,@(if build-doc? | ||
| 950 | ;; TODO: remove fontconfig after the 5.10 kernel is dropped. | ||
| 951 | ;; Also replace python-wrapper by python at that time. | ||
| 952 | `(("fontconfig" ,fontconfig) | ||
| 953 | ("graphviz" ,graphviz) | ||
| 954 | ("python" ,python-wrapper) | ||
| 955 | ("python-sphinx" ,python-sphinx) | ||
| 956 | ("texinfo" ,texinfo) | ||
| 957 | ("which" ,which)) | ||
| 958 | '()) | ||
| 959 | |||
| 812 | ,@(match (let ((arch (platform-linux-architecture | 960 | ,@(match (let ((arch (platform-linux-architecture |
| 813 | (lookup-platform-by-target-or-system | 961 | (lookup-platform-by-target-or-system |
| 814 | (or (%current-target-system) | 962 | (or (%current-target-system) |
| @@ -817,115 +965,14 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." | |||
| 817 | (configuration-file | 965 | (configuration-file |
| 818 | arch | 966 | arch |
| 819 | #:variant (version-major+minor version)))) | 967 | #:variant (version-major+minor version)))) |
| 820 | (#f ;no config for this platform | 968 | (#f ;no config for this platform |
| 821 | '()) | 969 | '()) |
| 822 | ((? string? config) | 970 | ((? string? config) |
| 823 | `(("kconfig" ,config)))))) | 971 | `(("kconfig" ,config)))))) |
| 824 | (arguments | ||
| 825 | (list #:modules '((guix build gnu-build-system) | ||
| 826 | (guix build utils) | ||
| 827 | (srfi srfi-1) | ||
| 828 | (srfi srfi-26) | ||
| 829 | (ice-9 ftw) | ||
| 830 | (ice-9 match)) | ||
| 831 | #:phases | ||
| 832 | #~(modify-phases %standard-phases | ||
| 833 | (add-after 'unpack 'patch-/bin/pwd | ||
| 834 | (lambda _ | ||
| 835 | (substitute* (find-files "." "^Makefile(\\.include)?$") | ||
| 836 | (("/bin/pwd") "pwd")))) | ||
| 837 | (replace 'configure | ||
| 838 | (lambda* (#:key inputs target #:allow-other-keys) | ||
| 839 | ;; Avoid introducing timestamps. | ||
| 840 | (setenv "KCONFIG_NOTIMESTAMP" "1") | ||
| 841 | (setenv "KBUILD_BUILD_TIMESTAMP" | ||
| 842 | (getenv "SOURCE_DATE_EPOCH")) | ||
| 843 | |||
| 844 | ;; Other variables useful for reproducibility. | ||
| 845 | (setenv "KBUILD_BUILD_USER" "guix") | ||
| 846 | (setenv "KBUILD_BUILD_HOST" "guix") | ||
| 847 | |||
| 848 | ;; Set ARCH and CROSS_COMPILE. | ||
| 849 | (let ((arch #$(platform-linux-architecture | ||
| 850 | (lookup-platform-by-target-or-system | ||
| 851 | (or (%current-target-system) | ||
| 852 | (%current-system)))))) | ||
| 853 | (setenv "ARCH" arch) | ||
| 854 | (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) | ||
| 855 | |||
| 856 | (when target | ||
| 857 | (setenv "CROSS_COMPILE" (string-append target "-")) | ||
| 858 | (format #t "`CROSS_COMPILE' set to `~a'~%" | ||
| 859 | (getenv "CROSS_COMPILE")))) | ||
| 860 | |||
| 861 | (setenv "EXTRAVERSION" | ||
| 862 | #$(and extra-version | ||
| 863 | (string-append "-" extra-version))) | ||
| 864 | |||
| 865 | (let ((config (assoc-ref inputs "kconfig"))) | ||
| 866 | |||
| 867 | ;; Use a custom kernel configuration file or a default | ||
| 868 | ;; configuration file. | ||
| 869 | (if config | ||
| 870 | (begin | ||
| 871 | (copy-file config ".config") | ||
| 872 | (chmod ".config" #o666)) | ||
| 873 | (invoke "make" #$defconfig)) | ||
| 874 | |||
| 875 | ;; Appending works even when the option wasn't in the | ||
| 876 | ;; file. The last one prevails if duplicated. | ||
| 877 | (let ((port (open-file ".config" "a")) | ||
| 878 | (extra-configuration #$(config->string extra-options))) | ||
| 879 | (display extra-configuration port) | ||
| 880 | (close-port port)) | ||
| 881 | |||
| 882 | (invoke "make" "oldconfig")))) | ||
| 883 | (replace 'install | ||
| 884 | (lambda* (#:key inputs native-inputs #:allow-other-keys) | ||
| 885 | (let ((moddir (string-append #$output "/lib/modules")) | ||
| 886 | (dtbdir (string-append #$output "/lib/dtbs"))) | ||
| 887 | ;; Install kernel image, kernel configuration and link map. | ||
| 888 | (for-each (lambda (file) (install-file file #$output)) | ||
| 889 | (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map|Module\\.symvers)$")) | ||
| 890 | ;; Install device tree files | ||
| 891 | (unless (null? (find-files "." "\\.dtb$")) | ||
| 892 | (mkdir-p dtbdir) | ||
| 893 | (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir) | ||
| 894 | "dtbs_install")) | ||
| 895 | ;; Install kernel modules | ||
| 896 | (mkdir-p moddir) | ||
| 897 | (invoke "make" | ||
| 898 | ;; Disable depmod because the Guix system's | ||
| 899 | ;; module directory is an union of potentially | ||
| 900 | ;; multiple packages. It is not possible to use | ||
| 901 | ;; depmod to usefully calculate a dependency | ||
| 902 | ;; graph while building only one of them. | ||
| 903 | "DEPMOD=true" | ||
| 904 | (string-append "MODULE_DIR=" moddir) | ||
| 905 | (string-append "INSTALL_PATH=" #$output) | ||
| 906 | (string-append "INSTALL_MOD_PATH=" #$output) | ||
| 907 | "INSTALL_MOD_STRIP=1" | ||
| 908 | "modules_install") | ||
| 909 | (let* ((versions (filter (lambda (name) | ||
| 910 | (not (string-prefix? "." name))) | ||
| 911 | (scandir moddir))) | ||
| 912 | (version (match versions | ||
| 913 | ((x) x)))) | ||
| 914 | ;; There are symlinks to the build and source directory. | ||
| 915 | ;; Both will point to target /tmp/guix-build* and thus | ||
| 916 | ;; not be useful in a profile. Delete the symlinks. | ||
| 917 | (false-if-file-not-found | ||
| 918 | (delete-file | ||
| 919 | (string-append moddir "/" version "/build"))) | ||
| 920 | (false-if-file-not-found | ||
| 921 | (delete-file | ||
| 922 | (string-append moddir "/" version "/source")))))))) | ||
| 923 | #:tests? #f)) | ||
| 924 | (home-page "https://www.gnu.org/software/linux-libre/") | 972 | (home-page "https://www.gnu.org/software/linux-libre/") |
| 925 | (synopsis "100% free redistribution of a cleaned Linux kernel") | 973 | (synopsis "100% free redistribution of a cleaned Linux kernel") |
| 926 | (description | 974 | (description "GNU Linux-Libre is a free (as in freedom) variant of the |
| 927 | "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel. | 975 | Linux kernel. It has been modified to remove all non-free binary blobs.") |
| 928 | It has been modified to remove all non-free binary blobs.") | ||
| 929 | (license license:gpl2) | 976 | (license license:gpl2) |
| 930 | (properties '((max-silent-time . 3600))))) ;don't timeout on blob scan. | 977 | (properties '((max-silent-time . 3600))))) ;don't timeout on blob scan. |
| 931 | 978 | ||
| @@ -5555,7 +5602,7 @@ and copy/paste text in the console and in xterm.") | |||
| 5555 | (define-public btrfs-progs | 5602 | (define-public btrfs-progs |
| 5556 | (package | 5603 | (package |
| 5557 | (name "btrfs-progs") | 5604 | (name "btrfs-progs") |
| 5558 | (version "5.18.1") | 5605 | (version "6.0.2") |
| 5559 | (source (origin | 5606 | (source (origin |
| 5560 | (method url-fetch) | 5607 | (method url-fetch) |
| 5561 | (uri (string-append "mirror://kernel.org/linux/kernel/" | 5608 | (uri (string-append "mirror://kernel.org/linux/kernel/" |
| @@ -5563,7 +5610,7 @@ and copy/paste text in the console and in xterm.") | |||
| 5563 | "btrfs-progs-v" version ".tar.xz")) | 5610 | "btrfs-progs-v" version ".tar.xz")) |
| 5564 | (sha256 | 5611 | (sha256 |
| 5565 | (base32 | 5612 | (base32 |
| 5566 | "0mbj3j2fpjds9i9gm8kk8a20yjacc562ibd1v9a96bpmrxfag63f")))) | 5613 | "063hmqwqlmp0llgqnfqgcj7slrv762kmbk6srhrgqifr94q8crb6")))) |
| 5567 | (build-system gnu-build-system) | 5614 | (build-system gnu-build-system) |
| 5568 | (outputs '("out" | 5615 | (outputs '("out" |
| 5569 | "static")) ; static versions of the binaries in "out" | 5616 | "static")) ; static versions of the binaries in "out" |
| @@ -8456,7 +8503,7 @@ compatible with Python's ConfigParser style of .INI files, including RFC | |||
| 8456 | (define-public xfsprogs | 8503 | (define-public xfsprogs |
| 8457 | (package | 8504 | (package |
| 8458 | (name "xfsprogs") | 8505 | (name "xfsprogs") |
| 8459 | (version "5.14.2") | 8506 | (version "6.0.0") |
| 8460 | (source (origin | 8507 | (source (origin |
| 8461 | (method url-fetch) | 8508 | (method url-fetch) |
| 8462 | (uri (string-append | 8509 | (uri (string-append |
| @@ -8464,7 +8511,7 @@ compatible with Python's ConfigParser style of .INI files, including RFC | |||
| 8464 | "xfsprogs-" version ".tar.gz")) | 8511 | "xfsprogs-" version ".tar.gz")) |
| 8465 | (sha256 | 8512 | (sha256 |
| 8466 | (base32 | 8513 | (base32 |
| 8467 | "0368dacdjq55ip38yizs9spdyl7b0b1c0vz3gr1gvcb9rw3a6dnp")))) | 8514 | "14hc61nfc73nqwhyasc4haj5g7046im1dwz61bx338f86mjj5n5y")))) |
| 8468 | (build-system gnu-build-system) | 8515 | (build-system gnu-build-system) |
| 8469 | (outputs (list "out" "python")) | 8516 | (outputs (list "out" "python")) |
| 8470 | (arguments | 8517 | (arguments |
| @@ -8503,6 +8550,20 @@ file systems.") | |||
| 8503 | ;; licensed under lgpl2.1. the other stuff is licensed under gpl2. | 8550 | ;; licensed under lgpl2.1. the other stuff is licensed under gpl2. |
| 8504 | (license (list license:gpl2 license:lgpl2.1)))) | 8551 | (license (list license:gpl2 license:lgpl2.1)))) |
| 8505 | 8552 | ||
| 8553 | (define-public xfsprogs-5.9 | ||
| 8554 | (package | ||
| 8555 | (inherit xfsprogs) | ||
| 8556 | (name "xfsprogs") | ||
| 8557 | (version "5.9.0") | ||
| 8558 | (source (origin | ||
| 8559 | (method url-fetch) | ||
| 8560 | (uri (string-append | ||
| 8561 | "mirror://kernel.org/linux/utils/fs/xfs/xfsprogs/" | ||
| 8562 | "xfsprogs-" version ".tar.gz")) | ||
| 8563 | (sha256 | ||
| 8564 | (base32 | ||
| 8565 | "13xkn9jpmwp4fm9r68vhgznkmxhnv83n2b39mhy2qdaph90w2a1l")))))) | ||
| 8566 | |||
| 8506 | (define-public xfsprogs/static | 8567 | (define-public xfsprogs/static |
| 8507 | (package | 8568 | (package |
| 8508 | (inherit xfsprogs) | 8569 | (inherit xfsprogs) |
