diff mbox series

[bug#69105] gnu: linux-libre-documentation: Fix compilation.

Message ID 25150d8343cac5ca79e4d1c7d40c538605529ba2.1707841329.git.~@wolfsden.cz
State New
Headers show
Series [bug#69105] gnu: linux-libre-documentation: Fix compilation. | expand

Commit Message

Tomas Volf Feb. 13, 2024, 4:22 p.m. UTC
When compiling linux-libre-documentation@6.6.16, the compilation fails with
following error message:

    Exception occurred:
      File "/tmp/guix-build-linux-libre-documentation-6.6.16.drv-0/linux-6.6.16/Documentation/sphinx/kernel_feat.py", line 112, in run
        nodeList = self.nestedParse(out_lines, fname)
    UnboundLocalError: local variable 'fname' referenced before assignment

This is already fixed upstream[0], so this commit backports the change.

0: https://lore.kernel.org/all/20240206054907.066a0325@coco.lan/t/

* gnu/packages/linux.scm (linux-libre-documentation): Apply patch fixing
compilation.

Change-Id: Ic96f14aa25df09f38e029ca70d2647cbf37c2365
---
 gnu/packages/linux.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)


base-commit: e9a6c7094822bc859d0694eeaf8f434317219367

Comments

Leo Famulari Feb. 18, 2024, 10:46 p.m. UTC | #1
On Tue, Feb 13, 2024 at 05:22:09PM +0100, Tomas Volf wrote:
> When compiling linux-libre-documentation@6.6.16, the compilation fails with
> following error message:
> 
>     Exception occurred:
>       File "/tmp/guix-build-linux-libre-documentation-6.6.16.drv-0/linux-6.6.16/Documentation/sphinx/kernel_feat.py", line 112, in run
>         nodeList = self.nestedParse(out_lines, fname)
>     UnboundLocalError: local variable 'fname' referenced before assignment
> 
> This is already fixed upstream[0], so this commit backports the change.
> 
> 0: https://lore.kernel.org/all/20240206054907.066a0325@coco.lan/t/
> 
> * gnu/packages/linux.scm (linux-libre-documentation): Apply patch fixing
> compilation.

Thanks! Pushed to the 'kernel-updates' branch for testing:

https://ci.guix.gnu.org/eval/1128579
Leo Famulari Feb. 20, 2024, 4:56 p.m. UTC | #2
On Sun, Feb 18, 2024 at 05:46:38PM -0500, Leo Famulari wrote:
> Thanks! Pushed to the 'kernel-updates' branch for testing:
> 
> https://ci.guix.gnu.org/eval/1128579

It failed to build due to a hash mismatch:

------
building path(s) `/gnu/store/1ps7177pmj9f4h8jf4dvrsq1ng6y5wxj-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428'
|   @ build-started /gnu/store/cnjyqmajcv79w9xjbrxrmsq950kfs0c9-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428.drv - x86_64-linux /var/log/guix/drvs/cn//jyqmajcv79w9xjbrxrmsq950kfs0c9-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428.drv.gz 14230

Starting download of /gnu/store/1ps7177pmj9f4h8jf4dvrsq1ng6y5wxj-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428
From https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/Documentation/sphinx/kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428...

 kernel_feat.py                               14.0MiB/s 00:00 | 2KiB transferred
 kernel_feat.py                                5.6MiB/s 00:00 | 2KiB transferred
@ hash-mismatch /gnu/store/1ps7177pmj9f4h8jf4dvrsq1ng6y5wxj-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428 sha256 0inw2pl7nh82sw8bhvvzqa61552bisl78yc1nyl2x6dmpyppzrld 0zzs7xfq7mhw30lqssz1ypkf35f3sw1zivz8abd8g8qwfbb6h2aa
hash mismatch for store item '/gnu/store/1ps7177pmj9f4h8jf4dvrsq1ng6y5wxj-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428'
@ build-failed /gnu/store/cnjyqmajcv79w9xjbrxrmsq950kfs0c9-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428.drv - 1 hash mismatch for store item '/gnu/store/1ps7177pmj9f4h8jf4dvrsq1ng6y5wxj-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428'
building path(s) `/gnu/store/6wvmyhb2fz08jgbnfpny2iqrlz4cp1mi-linux-6.6.17.tar.xz'
------

https://ci.guix.gnu.org/build/3508584/details
Tomas Volf Feb. 20, 2024, 6:29 p.m. UTC | #3
On 2024-02-20 11:56:04 -0500, Leo Famulari wrote:
> On Sun, Feb 18, 2024 at 05:46:38PM -0500, Leo Famulari wrote:
> > Thanks! Pushed to the 'kernel-updates' branch for testing:
> >
> > https://ci.guix.gnu.org/eval/1128579
>
> It failed to build due to a hash mismatch:
>
> ------
> building path(s) `/gnu/store/1ps7177pmj9f4h8jf4dvrsq1ng6y5wxj-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428'
> |   @ build-started /gnu/store/cnjyqmajcv79w9xjbrxrmsq950kfs0c9-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428.drv - x86_64-linux /var/log/guix/drvs/cn//jyqmajcv79w9xjbrxrmsq950kfs0c9-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428.drv.gz 14230
>
> Starting download of /gnu/store/1ps7177pmj9f4h8jf4dvrsq1ng6y5wxj-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428
> From https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/Documentation/sphinx/kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428...
>
>  kernel_feat.py                               14.0MiB/s 00:00 | 2KiB transferred
>  kernel_feat.py                                5.6MiB/s 00:00 | 2KiB transferred
> @ hash-mismatch /gnu/store/1ps7177pmj9f4h8jf4dvrsq1ng6y5wxj-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428 sha256 0inw2pl7nh82sw8bhvvzqa61552bisl78yc1nyl2x6dmpyppzrld 0zzs7xfq7mhw30lqssz1ypkf35f3sw1zivz8abd8g8qwfbb6h2aa
> hash mismatch for store item '/gnu/store/1ps7177pmj9f4h8jf4dvrsq1ng6y5wxj-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428'
> @ build-failed /gnu/store/cnjyqmajcv79w9xjbrxrmsq950kfs0c9-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428.drv - 1 hash mismatch for store item '/gnu/store/1ps7177pmj9f4h8jf4dvrsq1ng6y5wxj-kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428'
> building path(s) `/gnu/store/6wvmyhb2fz08jgbnfpny2iqrlz4cp1mi-linux-6.6.17.tar.xz'
> ------
>
> https://ci.guix.gnu.org/build/3508584/details

I see, I guess it was a mistake trying to fetch the patch in this way.  I've
sent a v2 that just adds it into the patches/ directory.  I hope that will work
fine.

Have a nice day,
Tomas Volf

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
Leo Famulari Feb. 21, 2024, 1:34 a.m. UTC | #4
On Tue, Feb 20, 2024 at 07:29:16PM +0100, Tomas Volf wrote:
> I see, I guess it was a mistake trying to fetch the patch in this way.  I've
> sent a v2 that just adds it into the patches/ directory.  I hope that will work
> fine.

I double-checked the hash and your original patch had the correct value.

For some reason, when the build farm tried to download the patch file
from the kernel infrastructure, the wrong data was received and the hash
did not match.

But when I downloaded the patch file "by hand" with `curl`, I received
the expected data.

Then, I applied your patch to a checkout of guix.git and successfully
built linux-libre-documentation with `./pre-inst-env [...]`.

So, I think your original patch is good.

Sometimes these transient errors occur. Including the patch directly in
our repo would be more reliable than fetching it, but there is the minor
negative effect of increasing the size of our codebase. I chose to fetch
the data in this case.

Thank you very much for working on this bug!

Patch version 1 pushed as b6f82b9ef1a3d51a39995598eab9f793656e9123
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index b8b119e474..49b9e01167 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2003,6 +2003,17 @@  (define-public linux-libre-documentation
   (package
     (inherit linux-libre)
     (name "linux-libre-documentation")
+    (source
+     (origin
+       (inherit linux-libre-source)
+       (patches
+        (list
+         (origin
+           (method url-fetch)
+           (uri "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/Documentation/sphinx/kernel_feat.py?id=c23de7ceae59e4ca5894c3ecf4f785c50c0fa428")
+           (sha256
+            (base32
+             "0inw2pl7nh82sw8bhvvzqa61552bisl78yc1nyl2x6dmpyppzrld")))))))
     (arguments
      (list
       #:tests? #f