all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob c3d1d06a89ce8ee05bf775ef382ba1b54ef1c728 2070 bytes (raw)
name: gnu/packages/patches/linux-libre-documentation-fix-kernel_feat.py.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 
From c23de7ceae59e4ca5894c3ecf4f785c50c0fa428 Mon Sep 17 00:00:00 2001
From: Vegard Nossum <vegard.nossum@oracle.com>
Date: Mon, 5 Feb 2024 18:51:26 +0100
Subject: docs: kernel_feat.py: fix build error for missing files

If the directory passed to the '.. kernel-feat::' directive does not
exist or the get_feat.pl script does not find any files to extract
features from, Sphinx will report the following error:

    Sphinx parallel build error:
    UnboundLocalError: local variable 'fname' referenced before assignment
    make[2]: *** [Documentation/Makefile:102: htmldocs] Error 2

This is due to how I changed the script in c48a7c44a1d0 ("docs:
kernel_feat.py: fix potential command injection"). Before that, the
filename passed along to self.nestedParse() in this case was weirdly
just the whole get_feat.pl invocation.

We can fix it by doing what kernel_abi.py does -- just pass
self.arguments[0] as 'fname'.

Fixes: c48a7c44a1d0 ("docs: kernel_feat.py: fix potential command injection")
Cc: Justin Forbes <jforbes@fedoraproject.org>
Cc: Salvatore Bonaccorso <carnil@debian.org>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Link: https://lore.kernel.org/r/20240205175133.774271-2-vegard.nossum@oracle.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 Documentation/sphinx/kernel_feat.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'Documentation/sphinx/kernel_feat.py')

diff --git a/Documentation/sphinx/kernel_feat.py b/Documentation/sphinx/kernel_feat.py
index b9df61eb450138..03ace5f01b5c02 100644
--- a/Documentation/sphinx/kernel_feat.py
+++ b/Documentation/sphinx/kernel_feat.py
@@ -109,7 +109,7 @@ class KernelFeat(Directive):
             else:
                 out_lines += line + "\n"

-        nodeList = self.nestedParse(out_lines, fname)
+        nodeList = self.nestedParse(out_lines, self.arguments[0])
         return nodeList

     def nestedParse(self, lines, fname):
--
cgit 1.2.3-korg


debug log:

solving 9d535395be ...
found 9d535395be in https://yhetil.org/guix/c8b84010194e489181067c52d67436b866292154.1708453575.git.~@wolfsden.cz/

applying [1/1] https://yhetil.org/guix/c8b84010194e489181067c52d67436b866292154.1708453575.git.~@wolfsden.cz/
diff --git a/gnu/packages/patches/linux-libre-documentation-fix-kernel_feat.py.patch b/gnu/packages/patches/linux-libre-documentation-fix-kernel_feat.py.patch
new file mode 100644
index 0000000000..9d535395be

Checking patch gnu/packages/patches/linux-libre-documentation-fix-kernel_feat.py.patch...
1:58: new blank line at EOF.
+
Applied patch gnu/packages/patches/linux-libre-documentation-fix-kernel_feat.py.patch cleanly.
warning: 1 line adds whitespace errors.

index at:
100644 c3d1d06a89ce8ee05bf775ef382ba1b54ef1c728	gnu/packages/patches/linux-libre-documentation-fix-kernel_feat.py.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.