unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58008: [PATCH] gnu: linux: Fix the extra-version parameter in make-linux-libre*.
@ 2022-09-22 16:50 Stefan via Bug reports for GNU Guix
  0 siblings, 0 replies; only message in thread
From: Stefan via Bug reports for GNU Guix @ 2022-09-22 16:50 UTC (permalink / raw)
  To: 58008, leo

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

Hi Leo!

I’m addressing you directly because of the entry in etc/teams.scm.

I found and fixed a bug in make-linux-libre*. The split of the phase 'configure into a separate 'set-environment will be used by another patch. 

Actually this is part of a patch series in 48314. But it is an independent fix, which can reduce the size of that other ticket.

If this patch is accepted, I may send another part of that patch series separately.


Bye

Stefan


[-- Attachment #2: 01-gnu-linux-fix-extra-version.patch --]
[-- Type: application/octet-stream, Size: 3312 bytes --]

gnu: linux: Fix the extra-version parameter in make-linux-libre*.

From: Stefan <stefan-guix@vodafonemail.de>

* gnu/packages/linux.scm (make-linux-libre*) ['set-environment]: Make
the Makefile accept EXTRAVERSION from the environment. Fix the usage of
an empty extra-version string. Split this new phase out of and adding
if before …
['configure]: … to make the phases more hackable.
---
 gnu/packages/linux.scm |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 306c18e398..1a35e857c3 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -64,6 +64,7 @@
 ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;; Copyright © 2022 Rene Saavedra <nanuui@protonmail.com>
 ;;; Copyright © 2022 muradm <mail@muradm.net>
+;;; Copyright © 2022 Stefan <stefan-guix@vodafonemail.de>
 
 ;;;
 ;;; This file is part of GNU Guix.
@@ -824,8 +825,8 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
                  (lambda _
                    (substitute* (find-files "." "^Makefile(\\.include)?$")
                      (("/bin/pwd") "pwd"))))
-               (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"
@@ -847,13 +848,16 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
                        (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)))
-
+                                  (not (string-null? 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
@@ -871,7 +875,7 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
 
                      (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.

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-22 19:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 16:50 bug#58008: [PATCH] gnu: linux: Fix the extra-version parameter in make-linux-libre* Stefan via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).