From patchwork Fri Mar 7 18:38:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 39789 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2194D27BBEA; Fri, 7 Mar 2025 18:42:41 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6AABF27BBE9 for ; Fri, 7 Mar 2025 18:42:40 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqcdr-0001wZ-2E; Fri, 07 Mar 2025 13:41:51 -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 1tqcdR-0001KK-CN for guix-patches@gnu.org; Fri, 07 Mar 2025 13:41:28 -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 1tqcdM-0003Ga-QC for guix-patches@gnu.org; Fri, 07 Mar 2025 13:41:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=ngSWPaxRtzaJn9zX+45ReBH4hc3i/SOmL/yNnhXzCbA=; b=AhSAXbUbsZ7T5HPi2Cko6viZZAhj/nrIcK77eapmjKXW/kCpXm4ZFVRSnB6FXx8/g4ZUEA/VemSCyJG6ygg/nOxOSWq9eFCswpcemFJjGKayP2hP0HDfqpvAqjV4jFW6Azygw2MH1y8f3jLNm2O9dLJNcXNDKqQf48ELtFVp+gwX21e2iXgU59dtxf9DnPn4d8zpDUHIs/fxJH2yeTp6MuWFzbz3dB5y3kwDdsPcp2j6K8+VB7vyUwhkeE54jkm/n+mCbFZxk3TqQM4X5IgXuLj5juH4Rj1yvWw6JT5u8kpeMQcc+Nj1SK7c2v+dTcWnU1WCArD/+dnlIW0vBP8W/A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tqcdM-0006pQ-Mb for guix-patches@gnu.org; Fri, 07 Mar 2025 13:41:20 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76819] [PATCH v7 25/35] gnu: indent: Update to 2.2.13-0.1737c92. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Mar 2025 18:41:20 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76819 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76819@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 76819-submit@debbugs.gnu.org id=B76819.174137287326070 (code B ref 76819); Fri, 07 Mar 2025 18:41:20 +0000 Received: (at 76819) by debbugs.gnu.org; 7 Mar 2025 18:41:13 +0000 Received: from localhost ([127.0.0.1]:50257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tqcdD-0006m9-Uh for submit@debbugs.gnu.org; Fri, 07 Mar 2025 13:41:12 -0500 Received: from 2.mo560.mail-out.ovh.net ([188.165.53.149]:59535) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tqccB-0006Wi-AV for 76819@debbugs.gnu.org; Fri, 07 Mar 2025 13:40:10 -0500 Received: from director1.ghost.mail-out.ovh.net (unknown [10.108.25.4]) by mo560.mail-out.ovh.net (Postfix) with ESMTP id 4Z8ZpY3ST5z1ddp for <76819@debbugs.gnu.org>; Fri, 7 Mar 2025 18:40:05 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-m69p9 (unknown [10.111.174.164]) by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 2AE471FE71; Fri, 7 Mar 2025 18:40:05 +0000 (UTC) Received: from ngraves.fr ([37.59.142.105]) by ghost-submission-5b5ff79f4f-m69p9 with ESMTPSA id DSY0NYQ9y2eWKwQAFZKZYQ (envelope-from ); Fri, 07 Mar 2025 18:40:05 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-105G006f253b977-bde0-49f5-b7b9-ee95b0f3d900, 93CD87FFD4632086FD827B47E208BFE70AFEC0F0) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 Date: Fri, 7 Mar 2025 19:38:54 +0100 Message-ID: <20250307183914.8825-25-ngraves@ngraves.fr> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250307183914.8825-1-ngraves@ngraves.fr> References: <20250307183914.8825-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 4432949411692864226 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduuddugeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpedugeelfeekhedugedvieffleekgeffiefhkeejudelveeuuefhheevtefghedtheenucffohhmrghinhepghhnuhdrohhrghenucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggedpfeejrdehledrudegvddruddtheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepjeeikeduleesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheeitdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=ngSWPaxRtzaJn9zX+45ReBH4hc3i/SOmL/yNnhXzCbA=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1741372805; v=1; b=Gtkx9tCISOhR4Sckg79C5zhq6hWZuAFHRJ8nvn54LgRN5htt5r7P4ooEstCvNsqrYyl56iZY RI/WxIc1pT7cHUl0QTKxpDYrhh0w2Qu1OSblraDuaQ8BtFTBoggw4G/Hsx1jzJp+/4S6HmHqP3/ 9wkP9d5V7bLVJXLVec5jIGL8heyEF59fnI2EeZIrr26L07G4k0Bm2/eo8wHH69diIkNl+Xwg9mW 3HgP/NXlgd6LBwropjJ5Bn3zks0sUMQ0ZToQR4A9CMFYoBWdbymQjw1ZruM9j2q3peSRq5awIuW NEGr1P8gcqv0cghO/NGEhxMNQrBsv+pNGcJjuJVDAKqkg== 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/indent-CVE-2024-0911.patch: Delete file. * gnu/local.mk: Unregister patch. * gnu/packages/code.scm (indent): Update to 2.2.13-0.1737c92. [arguments]{phases}: Add phase 'patch-bootstrap. [native-inputs]: Add autoconf-2.71, automake, gettext-minimal. [properties]: Add lint-hidden-cves. --- gnu/local.mk | 1 - gnu/packages/code.scm | 61 +++++++++++++------ .../patches/indent-CVE-2024-0911.patch | 61 ------------------- 3 files changed, 42 insertions(+), 81 deletions(-) delete mode 100644 gnu/packages/patches/indent-CVE-2024-0911.patch diff --git a/gnu/local.mk b/gnu/local.mk index 2d602e0708..d08f3bba0a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1610,7 +1610,6 @@ dist_patch_DATA = \ %D%/packages/patches/idris-test-ffi008.patch \ %D%/packages/patches/igraph-fix-varargs-integer-size.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ - %D%/packages/patches/indent-CVE-2024-0911.patch \ %D%/packages/patches/inferno-fix-crash.patch \ %D%/packages/patches/instead-use-games-path.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index 770a379a56..2b065f2cd4 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm @@ -22,6 +22,7 @@ ;;; Copyright © 2024 Sharlatan Hellseher ;;; Copyright © 2024 Artyom V. Poptsov ;;; Copyright © 2024 Jordan Moore +;;; Copyright © 2025 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -64,6 +65,7 @@ (define-module (gnu packages code) #:use-module (gnu packages emacs) #:use-module (gnu packages flex) #:use-module (gnu packages gcc) + #:use-module (gnu packages gettext) #:use-module (gnu packages golang-build) #:use-module (gnu packages golang-crypto) #:use-module (gnu packages golang-web) @@ -875,29 +877,50 @@ (define-public astyle (license license:lgpl3+))) (define-public indent - (package - (name "indent") - (version "2.2.13") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/indent/indent-" version - ".tar.gz")) - (sha256 - (base32 "15c0ayp9rib7hzvrcxm5ijs0mpagw5y8kf5w0jr9fryfqi7n6r4y")) - ;; Remove patch when updating. - (patches (search-patches "indent-CVE-2024-0911.patch")))) - (build-system gnu-build-system) - (native-inputs - (list texinfo)) - (synopsis "Code reformatter") - (description - "Indent is a program that makes source code easier to read by + (let ((commit "1737c929cbe2ec8a181107df9742894a44c57f71") + (revision "0")) + (package + (name "indent") + (version (git-version "2.2.13" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/indent") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "138bqlwvfjv3w1plw2zzf0nqw38lhgimzx1gic6p8r5kizjp9123")))) + (build-system gnu-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-bootstrap + (lambda _ + (substitute* "bootstrap" + (("^(wget|\\./configure|rm)" all) + (string-append "#" all))) + (call-with-output-file "doc/version.texi" + (lambda (port) + (format port "\ +@set UPDATED +@set EDITION ~a +@set VERSION ~a" + #$version + #$version)))))))) + (native-inputs + (list autoconf-2.71 automake gettext-minimal texinfo)) + (home-page "https://www.gnu.org/software/indent/") + (synopsis "Code reformatter") + (description + "Indent is a program that makes source code easier to read by reformatting it in a consistent style. It can change the style to one of several different styles such as GNU, BSD or K&R. It has some flexibility to deal with incomplete or malformed syntax. GNU indent offers several extensions over the standard utility.") - (license license:gpl3+) - (home-page "https://www.gnu.org/software/indent/"))) + (license license:gpl3+) + (properties '((lint-hidden-cves . ("CVE-2023-40305" + "CVE-2024-0911"))))))) (define-public amalgamate (let* ((commit "c91f07eea1133aa184f652b8f1398eaf03586208") diff --git a/gnu/packages/patches/indent-CVE-2024-0911.patch b/gnu/packages/patches/indent-CVE-2024-0911.patch deleted file mode 100644 index 4687d3f59a..0000000000 --- a/gnu/packages/patches/indent-CVE-2024-0911.patch +++ /dev/null @@ -1,61 +0,0 @@ -Upstream issue: https://lists.gnu.org/archive/html/bug-indent/2024-01/msg00001.html -Signed-off-by: Petr Písař ---- - regression/TEST | 2 +- - regression/input/comment-parent-heap-underread.c | 3 +++ - regression/standard/comment-parent-heap-underread.c | 5 +++++ - src/output.c | 2 +- - 4 files changed, 10 insertions(+), 2 deletions(-) - create mode 100644 regression/input/comment-parent-heap-underread.c - create mode 100644 regression/standard/comment-parent-heap-underread.c - -diff --git a/regression/TEST b/regression/TEST -index 7c07c2e..951b1a2 100755 ---- a/regression/TEST -+++ b/regression/TEST -@@ -40,6 +40,7 @@ BUGS="case-label.c one-line-1.c one-line-2.c one-line-3.c \ - macro.c enum.c elif.c nested.c wrapped-string.c minus_predecrement.c \ - bug-gnu-33364.c float-constant-suffix.c block-comments.c \ -- no-forced-nl-in-block-init.c hexadecimal_float.c binary-constant.c" -+ no-forced-nl-in-block-init.c hexadecimal_float.c binary-constant.c \ -+ comment-parent-heap-underread.c" - - INDENTSRC="args.c backup.h backup.c dirent_def.h globs.c indent.h \ - indent.c indent_globs.h io.c lexi.c memcpy.c parse.c pr_comment.c \ -diff --git a/regression/input/comment-parent-heap-underread.c -b/regression/input/comment-parent-heap-underread.c -new file mode 100644 -index 0000000..68e13cf ---- /dev/null -+++ b/regression/input/comment-parent-heap-underread.c -@@ -0,0 +1,3 @@ -+void foo(void) { -+/*a*/(1); -+} -diff --git a/regression/standard/comment-parent-heap-underread.c -b/regression/standard/comment-parent-heap-underread.c -new file mode 100644 -index 0000000..9a1c6e3 ---- /dev/null -+++ b/regression/standard/comment-parent-heap-underread.c -@@ -0,0 +1,5 @@ -+void -+foo (void) -+{ -+/*a*/ (1); -+} -diff --git a/src/output.c b/src/output.c -index ee01bcc..17eee6e 100644 ---- a/src/output.c -+++ b/src/output.c -@@ -290,7 +290,7 @@ void set_buf_break ( - /* Did we just parse a bracket that will be put on the next line - * by this line break? */ - -- if ((*token == '(') || (*token == '[')) -+ if (level > 0 && ((*token == '(') || (*token == '['))) - { - --level; /* then don't take it into account */ - } --- -2.43.0