From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 0O3BESnv1GUE1gAAqHPOHw:P1 (envelope-from ) for ; Tue, 20 Feb 2024 19:27:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 0O3BESnv1GUE1gAAqHPOHw (envelope-from ) for ; Tue, 20 Feb 2024 19:27:53 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=icYa8w+m; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=icYa8w+m; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=wolfsden.cz (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708453672; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=7W/eUypU6soehSNvQR5T0AQ+KIx9xoktLUOMGBgfc2g=; b=kupQOd5xSv8UTgxHVNcLACx6R/lC9NoPRCHb+XO3D6ESXsj6bdn5iZKAXLZeVvGX5+sFaA ARjxEymHESZkoVQfI5ch3we5JkdkyHYOThluuJQe/R+/30hroC60JsqvxKRmWsKBqVoZk/ qTErp59prcmY2GN6P1ZF1mxlkU8AuOrVWHhaftsnv7l2pt8Vs//GzcFCim0BxhpbkfJwEu B10g4BU+sTuKMF1uRxvW6inknqHoMbQVNXnurlKwCQ3BAcOQans30/D6XaKF/1FvERSDlh WqQIEmAjb6DTNiunou8v1fbCa0T+r748ymGFcC2SJ/npwwyxyCxSEaJwwWnInA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=icYa8w+m; dkim=fail ("headers rsa verify failed") header.d=wolfsden.cz header.s=mail header.b=icYa8w+m; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=wolfsden.cz (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708453672; a=rsa-sha256; cv=none; b=PRbYthwbtTf8C8HhF+ZXOSYnhjmEkk64lpuQqTiy5P1JH3ym8XQ/w5uR17D7PH6x5pDXSp WlGCJWj4DA9LjkfqwDxCrVLW9rDxKF7O54KH+eYHdKVCsAHr8eOpUqHNmbAbcG3iQ3GsK7 GcXVl64wQ9LSvvOX7+woq1VxwBOSu1l6J1fZRq6GsJa3/XkyAdm6cV9JaIOsiK2waRqbjg 5M84jq8HjIwpRqakBmy+hl+QuE0dqSlsUuVeOgp/Tdiin/XGUJUqyffcYvCgImJZzEguzr xUYndOQ2H6FaBGZyejzz0CLxoiMLT3sh2kBdhjUQRuQC0A1PQOIiFPO+0zyZZg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1B40277374 for ; Tue, 20 Feb 2024 19:27:52 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcUqF-0002da-0j; Tue, 20 Feb 2024 13:27:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcUqD-0002dA-BO for guix-patches@gnu.org; Tue, 20 Feb 2024 13:27:41 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rcUqD-0004Vx-2w for guix-patches@gnu.org; Tue, 20 Feb 2024 13:27:41 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcUqX-0000a7-Q9; Tue, 20 Feb 2024 13:28:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69105] [PATCH v2] gnu: linux-libre-documentation: Fix compilation. References: <25150d8343cac5ca79e4d1c7d40c538605529ba2.1707841329.git.~@wolfsden.cz> In-Reply-To: <25150d8343cac5ca79e4d1c7d40c538605529ba2.1707841329.git.~@wolfsden.cz> Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Tue, 20 Feb 2024 18:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69105 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69105@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, leo@famulari.name, Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 69105-submit@debbugs.gnu.org id=B69105.17084536422191 (code B ref 69105); Tue, 20 Feb 2024 18:28:01 +0000 Received: (at 69105) by debbugs.gnu.org; 20 Feb 2024 18:27:22 +0000 Received: from localhost ([127.0.0.1]:46533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcUpu-0000ZH-8h for submit@debbugs.gnu.org; Tue, 20 Feb 2024 13:27:22 -0500 Received: from wolfsden.cz ([37.205.8.62]:45794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1rcUpo-0000Z2-PZ for 69105@debbugs.gnu.org; Tue, 20 Feb 2024 13:27:20 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id B8241295EA0; Tue, 20 Feb 2024 18:26:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1708453611; bh=XlBZSvUWWtysXsIeSE6Y2fKbPd8JwQC1vBW4ZOuiNRk=; h=From:To:Cc:Subject:Date; b=icYa8w+mWbADq7JTtMdePlt/PrhkTqwiMRRJYFIFCeVUKvRoLSWR8+mEQuYIxsGyR 5TlzXuYg7f/IzYvmjXZ4WssLueMaPA6wo6Ek/8+SnPBf0Hey/vcmBGMjs89A+fSyFh Myqr1zhdqzAK9qu666i6g0AlqNdbq9aeDRhij6+zzArXwAjf8hW8cezCHVuuPWWJRJ h3KAbggHOr8M7J6hR1Lvx28kJe8ovNktt7527MoSfXnaoTvdGWbbGSt9QPuTE5W9Yn ch6VPYeuIxZiPQCOZ5ID3pfoA/pa5hs3WIPs7xMGxmJTdYhbu4gxfLQcqn8bBfVEgJ ruPI7fCF8NawdlyBmAmX7aUrK/QlBd7h6kS2tG2N1xrpnpIafx9TzB/N91KOWZodPm JgEzCn0uXzoEEkpIUYlIXttKzqCgW5ibGZ+YJ/h9fyDKTri5kLymSdEiilJRt3AUp4 yF5nFnKkCRYLbxOSIi4X3vPDr4q43DrGh7LcEg/azfJRQ2EcXbMa1Ze/nwumOA3cXf X6uUPcvhpNj0h8bd25n7rnH0ytDuUKVcGluG9y+uG9lhfJoCXeal00zrtXltacK7uD zjKLNJnBnjXTESAEKw+j33tkBYR6VVnrEs8jTReodoUixzjg6VdxoQLSfQijnzTiwK s3hvKMDHbK/DLT3sqNOS8yKc= Received: from localhost (unknown [146.70.134.132]) by wolfsden.cz (Postfix) with ESMTPSA id D46E8253827; Tue, 20 Feb 2024 18:26:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1708453611; bh=XlBZSvUWWtysXsIeSE6Y2fKbPd8JwQC1vBW4ZOuiNRk=; h=From:To:Cc:Subject:Date; b=icYa8w+mWbADq7JTtMdePlt/PrhkTqwiMRRJYFIFCeVUKvRoLSWR8+mEQuYIxsGyR 5TlzXuYg7f/IzYvmjXZ4WssLueMaPA6wo6Ek/8+SnPBf0Hey/vcmBGMjs89A+fSyFh Myqr1zhdqzAK9qu666i6g0AlqNdbq9aeDRhij6+zzArXwAjf8hW8cezCHVuuPWWJRJ h3KAbggHOr8M7J6hR1Lvx28kJe8ovNktt7527MoSfXnaoTvdGWbbGSt9QPuTE5W9Yn ch6VPYeuIxZiPQCOZ5ID3pfoA/pa5hs3WIPs7xMGxmJTdYhbu4gxfLQcqn8bBfVEgJ ruPI7fCF8NawdlyBmAmX7aUrK/QlBd7h6kS2tG2N1xrpnpIafx9TzB/N91KOWZodPm JgEzCn0uXzoEEkpIUYlIXttKzqCgW5ibGZ+YJ/h9fyDKTri5kLymSdEiilJRt3AUp4 yF5nFnKkCRYLbxOSIi4X3vPDr4q43DrGh7LcEg/azfJRQ2EcXbMa1Ze/nwumOA3cXf X6uUPcvhpNj0h8bd25n7rnH0ytDuUKVcGluG9y+uG9lhfJoCXeal00zrtXltacK7uD zjKLNJnBnjXTESAEKw+j33tkBYR6VVnrEs8jTReodoUixzjg6VdxoQLSfQijnzTiwK s3hvKMDHbK/DLT3sqNOS8yKc= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 20 Feb 2024 19:26:15 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -2.01 X-Spam-Score: -2.01 X-Migadu-Queue-Id: 1B40277374 X-TUID: 8Y7vVoz34bJE 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/patches/linux-libre-documentation-fix-kernel_feat.py.patch: Add patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/linux.scm (linux-libre-documentation): Use it. Change-Id: Ic96f14aa25df09f38e029ca70d2647cbf37c2365 --- v2: Commit the patch instead of fetching it. gnu/local.mk | 1 + gnu/packages/linux.scm | 5 ++ ...bre-documentation-fix-kernel_feat.py.patch | 52 +++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 gnu/packages/patches/linux-libre-documentation-fix-kernel_feat.py.patch diff --git a/gnu/local.mk b/gnu/local.mk index ab690795a7..a75577386c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1629,6 +1629,7 @@ dist_patch_DATA = \ %D%/packages/patches/linphone-desktop-without-sdk.patch \ %D%/packages/patches/linux-libre-infodocs-target.patch \ %D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \ + %D%/packages/patches/linux-libre-documentation-fix-kernel_feat.py.patch \ %D%/packages/patches/linux-pam-no-setfsuid.patch \ %D%/packages/patches/linux-pam-unix_chkpwd.patch \ %D%/packages/patches/linuxdcpp-openssl-1.1.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index b8b119e474..c23f07b1d5 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2003,6 +2003,11 @@ (define-public linux-libre-documentation (package (inherit linux-libre) (name "linux-libre-documentation") + (source + (origin + (inherit linux-libre-source) + (patches + (search-patches "linux-libre-documentation-fix-kernel_feat.py.patch")))) (arguments (list #:tests? #f 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 --- /dev/null +++ b/gnu/packages/patches/linux-libre-documentation-fix-kernel_feat.py.patch @@ -0,0 +1,52 @@ +From c23de7ceae59e4ca5894c3ecf4f785c50c0fa428 Mon Sep 17 00:00:00 2001 +From: Vegard Nossum +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 +Cc: Salvatore Bonaccorso +Cc: Jani Nikula +Cc: Mauro Carvalho Chehab +Cc: stable@vger.kernel.org +Signed-off-by: Vegard Nossum +Link: https://lore.kernel.org/r/20240205175133.774271-2-vegard.nossum@oracle.com +Signed-off-by: Jonathan Corbet +--- + 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 + base-commit: e9a6c7094822bc859d0694eeaf8f434317219367 -- 2.41.0