unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#72164] linux-libre packaging: Learn to apply deblob script "errata" patches
@ 2024-07-17 19:59 Leo Famulari
  2024-07-18  0:59 ` Leo Famulari
  0 siblings, 1 reply; 2+ messages in thread
From: Leo Famulari @ 2024-07-17 19:59 UTC (permalink / raw)
  To: 72164

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

This adds the capability to apply "errata" patches to the linux-libre deblobbing scripts, which is necessary for linux-libre 6.10:

http://www.fsfla.org/pipermail/linux-libre/2024-July/003545.htmlo
https://issues.guix.gnu.org/72123#2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [bug#72164] linux-libre packaging: Learn to apply deblob script "errata" patches
  2024-07-17 19:59 [bug#72164] linux-libre packaging: Learn to apply deblob script "errata" patches Leo Famulari
@ 2024-07-18  0:59 ` Leo Famulari
  0 siblings, 0 replies; 2+ messages in thread
From: Leo Famulari @ 2024-07-18  0:59 UTC (permalink / raw)
  To: 72164


[-- Attachment #1.1: Type: text/plain, Size: 609 bytes --]

I tested the build of linux-libre 6.10 with the attached patches, and it
failed as dariqq said it would on #guix, because this kernel series
requires an update to the 'dwarves' package. I'm building again with the
dwarves update now.

https://logs.guix.gnu.org/guix/2024-07-17.log#204228

Also, these errata patches will only be required for 6.10, and not
subsequent releases in this series (6.10.1, etc).

We don't often end up including the mainline release in Guix, but rather
the subsequent stable releases, so in this case, it's not really
necessary to add this functionality. Although it would be nice.

[-- Attachment #1.2: 0001-gnu-linux-libre-Add-the-ability-to-apply-errata-patc.patch --]
[-- Type: text/plain, Size: 1941 bytes --]

From 3659eaef947623d502708441cfd6531acdc0fd90 Mon Sep 17 00:00:00 2001
Message-ID: <3659eaef947623d502708441cfd6531acdc0fd90.1721264342.git.leo@famulari.name>
From: Leo Famulari <leo@famulari.name>
Date: Wed, 17 Jul 2024 16:05:13 -0400
Subject: [PATCH 1/3] gnu: linux-libre: Add the ability to apply errata patches
 to the deblobbing scripts.

* gnu/packages/linux.scm (linux-libre-deblob-scripts): Accept an optional
parameter DEBLOB-ERRATA-PATCHES.

Change-Id: If3c87f713637428e1cd2eaf5ef962b8005395805
---
 gnu/packages/linux.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index e5aa712df7..0defc03e7a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -359,9 +359,11 @@ (define-public (system->defconfig system)
 ;;; Kernel source code deblobbing.
 ;;;
 
-(define (linux-libre-deblob-scripts version gnu-revision
+(define* (linux-libre-deblob-scripts version gnu-revision
                                     deblob-hash
-                                    deblob-check-hash)
+                                    deblob-check-hash
+                                    #:optional
+                                    (deblob-errata-patches '()))
   (list (version-major+minor version)
         (origin
           (method url-fetch)
@@ -370,6 +372,8 @@ (define (linux-libre-deblob-scripts version gnu-revision
                               "deblob-" (version-major+minor version)))
           (file-name (string-append "linux-libre-deblob-"
                                     version "-" gnu-revision))
+          (patches
+            (map search-patch deblob-errata-patches))
           (sha256 deblob-hash))
         (origin
           (method url-fetch)

base-commit: 6cfc88e3be73904fc87443cdd5c7d7961923e848
prerequisite-patch-id: 58efdd6ff2418b91eae89e7964de00b95f83105f
-- 
2.45.2


[-- Attachment #1.3: 0002-gnu-linux-libre-6.10-Add-the-errata-patchset-gnua.patch --]
[-- Type: text/plain, Size: 5247 bytes --]

From 82257a2285ba7a94a21c78bcc52a9241d604f977 Mon Sep 17 00:00:00 2001
Message-ID: <82257a2285ba7a94a21c78bcc52a9241d604f977.1721264342.git.leo@famulari.name>
In-Reply-To: <3659eaef947623d502708441cfd6531acdc0fd90.1721264342.git.leo@famulari.name>
References: <3659eaef947623d502708441cfd6531acdc0fd90.1721264342.git.leo@famulari.name>
From: Leo Famulari <leo@famulari.name>
Date: Wed, 17 Jul 2024 16:05:42 -0400
Subject: [PATCH 2/3] gnu: linux-libre 6.10: Add the errata patchset 'gnua'.

The original release of linux-libre 6.10-gnu contained a bug that
prevents compilation. This patch was released as linux-libre
6.10-gnua:

http://www.fsfla.org/pipermail/linux-libre/2024-July/003545.html

* gnu/packages/patches/linux-libre-scripts-6.10-gnu-6.10-gnua.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/linux.scm (deblob-scripts-6.10)
Use it.

Change-Id: I3a4f27515f4a0834823cd8af1feae243bdef6943
---
 gnu/local.mk                                  |  1 +
 gnu/packages/linux.scm                        |  3 +-
 ...nux-libre-scripts-6.10-gnu-6.10-gnua.patch | 43 +++++++++++++++++++
 3 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/linux-libre-scripts-6.10-gnu-6.10-gnua.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 638fb512eb..a7d08eb9ae 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1685,6 +1685,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/linbox-fix-pkgconfig.patch		\
   %D%/packages/patches/linphone-desktop-without-sdk.patch	\
   %D%/packages/patches/linux-libre-infodocs-target.patch	\
+  %D%/packages/patches/linux-libre-scripts-6.10-gnu-6.10-gnua.patch	\
   %D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \
   %D%/packages/patches/linux-pam-no-setfsuid.patch		\
   %D%/packages/patches/linux-pam-unix_chkpwd.patch		\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 0defc03e7a..bef7803fb9 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -522,7 +522,8 @@ (define deblob-scripts-6.10
    linux-libre-6.10-version
    linux-libre-6.10-gnu-revision
    (base32 "1q7w3jdd1hjb87h6713r8m8gq4xc81jnhxdrn1w8h2hh1vadvxix")
-   (base32 "00bx8g1ijswi9zypmwqhxsk9fdkzmarxdbdx5h6gpn7z4d1qly3j")))
+   (base32 "00bx8g1ijswi9zypmwqhxsk9fdkzmarxdbdx5h6gpn7z4d1qly3j")
+   '("linux-libre-scripts-6.10-gnu-6.10-gnua.patch")))
 (define-public linux-libre-6.10-pristine-source
   (let ((version linux-libre-6.10-version)
         (hash (base32 "09p2z3z8c3aq6ipqdc58x6s52sy0cmyg6mj4f0g5yk755r19hikp")))
diff --git a/gnu/packages/patches/linux-libre-scripts-6.10-gnu-6.10-gnua.patch b/gnu/packages/patches/linux-libre-scripts-6.10-gnu-6.10-gnua.patch
new file mode 100644
index 0000000000..e96997799a
--- /dev/null
+++ b/gnu/packages/patches/linux-libre-scripts-6.10-gnu-6.10-gnua.patch
@@ -0,0 +1,43 @@
+diff --git scripts/linux-libre-6.10-gnu/deblob-6.10 scripts/linux-libre-6.10-gnu/deblob-6.10
+index b8e39342b47a..ecdb90efcf58 100755
+--- linux-libre-6.10-gnu/linux-libre-deblob-6.10-gnu
++++ linux-libre-6.10-gnu/linux-libre-deblob-6.10-gnu
+@@ -927,7 +927,11 @@ reject_firmware drivers/gpu/drm/i915/display/intel_dmc.c
+ clean_blob drivers/gpu/drm/i915/display/intel_dmc.c
+ reject_firmware drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
+ clean_sed '/uc_fw->file_selected\.path = blob->path/ i\
+-		else if (blob->path == NONFREE_FIRMWARE)\
++		/* If the compiler unifies string literals, as expected,\
++		   do not bother with strcmp.  */\
++		else if ((char const *)NONFREE_FIRMWARE == (char const *)NONFREE_FIRMWARE\
++			 ? blob->path == (char const *)NONFREE_FIRMWARE\
++			 : !strcmp (blob->path, NONFREE_FIRMWARE))\
+ 			/* Never select an entry we would refuse to load.\
+ 			   If we find nothing, loading is disabled but the card\
+ 			   initialization proceeds as if the user had disabled\
+@@ -937,7 +941,11 @@ clean_sed '/uc_fw->file_selected\.path = blob->path/ i\
+ 
+ ' drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c 'disable non-Free firmware'
+ clean_sed '/Versionless file names must be unique/ i\
+-	    if (fw_blobs[i].blob.path != NONFREE_FIRMWARE)
++		/* If the compiler unifies string literals, as expected,\
++		   do not bother with strcmp.  */\
++		if ((char const *)NONFREE_FIRMWARE == (char const *)NONFREE_FIRMWARE\
++		    ? fw_blobs[i].blob.path != (char const *)NONFREE_FIRMWARE\
++		    : strcmp (fw_blobs[i].blob.path, NONFREE_FIRMWARE))
+ ' drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c 'avoid validation fails'
+ clean_blob drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
+ clean_blob drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
+@@ -3294,9 +3302,9 @@ announce SCSI_QLA_FC - "QLogic QLA2XXX Fibre Channel Support"
+ reject_firmware drivers/scsi/qla2xxx/qla_os.c
+ clean_sed '
+ /^config SCSI_QLA_FC$/,/^config /{
+-  /By default, firmware/i\
+-	/*(DEBLOBBED)*/
+-  /By default, firmware/,/linux-firmware tree/d
++  /^	  By default, firmware/i\
++	  /*(DEBLOBBED)*/
++  /^	  By default, firmware/,/linux-firmware tree/d
+ }' drivers/scsi/qla2xxx/Kconfig 'removed firmware notes'
+ clean_blob drivers/scsi/qla2xxx/qla_os.c
+ clean_kconfig drivers/scsi/qla2xxx/Kconfig SCSI_QLA_FC
-- 
2.45.2


[-- Attachment #1.4: 0003-gnu-dwarves-Update-to-1.27.patch --]
[-- Type: text/plain, Size: 1541 bytes --]

From 1942a6c7340ee124313f65602dd218471ddbc193 Mon Sep 17 00:00:00 2001
Message-ID: <1942a6c7340ee124313f65602dd218471ddbc193.1721264342.git.leo@famulari.name>
In-Reply-To: <3659eaef947623d502708441cfd6531acdc0fd90.1721264342.git.leo@famulari.name>
References: <3659eaef947623d502708441cfd6531acdc0fd90.1721264342.git.leo@famulari.name>
From: Leo Famulari <leo@famulari.name>
Date: Wed, 17 Jul 2024 20:53:39 -0400
Subject: [PATCH 3/3] gnu: dwarves: Update to 1.27.

* gnu/packages/linux.scm (dwarves): Update to 1.27.

Change-Id: Id986fdd240a6619544ff6be93cce00afd9fc31bd
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index bef7803fb9..141aaf33f5 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2421,7 +2421,7 @@ (define-public dislocker
 (define-public dwarves
   (package
     (name "dwarves")
-    (version "1.26")
+    (version "1.27")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -2430,7 +2430,7 @@ (define-public dwarves
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0xfq0r3whc3dk922ss8i5vwyfcqhgc95dy27mm69j5niy7i5kzrd"))
+                "0qwc3772az1h3c78pyswawyvyq9spj5s1prj7ckfij9nazp3a007"))
               (patches
                (search-patches "dwarves-threading-reproducibility.patch"))))
     (build-system cmake-build-system)
-- 
2.45.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-18  1:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-17 19:59 [bug#72164] linux-libre packaging: Learn to apply deblob script "errata" patches Leo Famulari
2024-07-18  0:59 ` Leo Famulari

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).