X-Loop: help-debbugs@HIDDEN Subject: [bug#77750] [PATCH] gnu: cppcheck: Update to 2.17.1 Resent-From: Florent Pruvost <florent.pruvost@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Fri, 11 Apr 2025 17:23:01 +0000 Resent-Message-ID: <handler.77750.B.174439215315205 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 77750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77750 <at> debbugs.gnu.org Cc: Florent Pruvost <florent.pruvost@HIDDEN> X-Debbugs-Original-To: guix-patches@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.174439215315205 (code B ref -1); Fri, 11 Apr 2025 17:23:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Apr 2025 17:22:33 +0000 Received: from localhost ([127.0.0.1]:51638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u3I5H-0003x8-Ni for submit <at> debbugs.gnu.org; Fri, 11 Apr 2025 13:22:32 -0400 Received: from lists.gnu.org ([2001:470:142::17]:55170) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <florent.pruvost@HIDDEN>) id 1u3Eeu-0006l2-LL for submit <at> debbugs.gnu.org; Fri, 11 Apr 2025 09:43:05 -0400 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 <florent.pruvost@HIDDEN>) id 1u3Eem-0003PL-BQ for guix-patches@HIDDEN; Fri, 11 Apr 2025 09:42:56 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <florent.pruvost@HIDDEN>) id 1u3Eei-0002Ed-Je for guix-patches@HIDDEN; Fri, 11 Apr 2025 09:42:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wqU2t6+24LzPdrqupRlLwylGX6GYCjAAQcgswXohvNU=; b=K7Yy1cpZvZ2HT66gPfEzcF/07FsNanXMSGym7W9h/0Ajcl79iAvsKmnk SwXsR8cRKSgp36wzXTkV2xWo5cZGid+vPlzewCR4rqdwELFWcAly9b4EU KmaboVt5QHOc/1u1zFafIqfvkxog+6uWieM2sM0Sh1Xx5kPTG2PpwpOYb 8=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=florent.pruvost@HIDDEN; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.15,205,1739833200"; d="scan'208";a="217495795" Received: from unknown (HELO esthar.bordeaux.inria.fr) ([193.50.110.177]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2025 15:42:48 +0200 From: Florent Pruvost <florent.pruvost@HIDDEN> Date: Fri, 11 Apr 2025 15:42:38 +0200 Message-ID: <20250411134238.320182-1-florent.pruvost@HIDDEN> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=192.134.164.83; envelope-from=florent.pruvost@HIDDEN; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Fri, 11 Apr 2025 13:22:30 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/packages/check.scm (cppcheck): Update to 2.17.1. [source]: Update hash. [arguments]: Add patch to fix basedir in test. [patches]: Remove cppcheck-disable-char-signedness-test.patch. [patches]: Add cppcheck-fix-basedir-test.patch. Change-Id: Iebd33e2966ef30a3cd5b7b157f1051fcacbe1884 --- gnu/local.mk | 2 +- gnu/packages/check.scm | 6 ++-- ...ppcheck-disable-char-signedness-test.patch | 27 -------------- .../patches/cppcheck-fix-basedir-test.patch | 36 +++++++++++++++++++ 4 files changed, 40 insertions(+), 31 deletions(-) delete mode 100644 gnu/packages/patches/cppcheck-disable-char-signedness-test.patch create mode 100644 gnu/packages/patches/cppcheck-fix-basedir-test.patch diff --git a/gnu/local.mk b/gnu/local.mk index 29bf4c72b8..83bb56f304 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1145,7 +1145,7 @@ dist_patch_DATA = \ %D%/packages/patches/corefx-mono-5.4.0-patches.patch \ %D%/packages/patches/corefx-mono-pre-5.8.0-patches.patch \ %D%/packages/patches/coreutils-gnulib-tests.patch \ - %D%/packages/patches/cppcheck-disable-char-signedness-test.patch \ + %D%/packages/patches/cppcheck-fix-basedir-test.patch \ %D%/packages/patches/cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch\ %D%/packages/patches/cpulimit-with-glib-2.32.patch \ %D%/packages/patches/crawl-upgrade-saves.patch \ diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 8193dd785f..db820766eb 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -791,7 +791,7 @@ (define-public cmocka (define-public cppcheck (package (name "cppcheck") - (version "2.10.3") + (version "2.17.1") (source (origin (method git-fetch) (uri (git-reference @@ -799,8 +799,8 @@ (define-public cppcheck (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1xfxcg00rxjrb9m2k78yd3jjlldkciv67fsbmjb6n3l43hgfxb9k")) - (patches (search-patches "cppcheck-disable-char-signedness-test.patch")))) + (base32 "19ap9ai9s4vsygyqfa215mrmpz4vki63d5b4qdb89zvbldaf3hlf")) + (patches (search-patches "cppcheck-fix-basedir-test.patch")))) (build-system cmake-build-system) (arguments '(#:configure-flags '("-DBUILD_TESTS=ON"))) diff --git a/gnu/packages/patches/cppcheck-disable-char-signedness-test.patch b/gnu/packages/patches/cppcheck-disable-char-signedness-test.patch deleted file mode 100644 index d39d300f84..0000000000 --- a/gnu/packages/patches/cppcheck-disable-char-signedness-test.patch +++ /dev/null @@ -1,27 +0,0 @@ -https://sources.debian.org/data/main/c/cppcheck/2.10-2/debian/patches/disable-some-tests-about-char-signedness -https://trac.cppcheck.net/ticket/11537 - -Description: Disable some tests affected by char signedness. -Author: Joachim Reichel <reichel@HIDDEN> -Bug: https://trac.cppcheck.net/ticket/11537 - -Index: cppcheck/test/testcondition.cpp -=================================================================== ---- cppcheck.orig/test/testcondition.cpp -+++ cppcheck/test/testcondition.cpp -@@ -4939,6 +4939,7 @@ private: - "}\n"); - ASSERT_EQUALS("[test.cpp:4]: (style) Condition 'it!=vector.end()' is always true\n", errout.str()); - -+#if 0 - // #11303 - check("void f(int n) {\n" - " std::vector<char> buffer(n);\n" -@@ -4947,6 +4948,7 @@ private: - " buffer.back() == '\\0') {}\n" - "}\n"); - ASSERT_EQUALS("[test.cpp:5]: (style) Condition 'buffer.back()=='\\0'' is always false\n", errout.str()); -+#endif - - // #9353 - check("typedef struct { std::string s; } X;\n" diff --git a/gnu/packages/patches/cppcheck-fix-basedir-test.patch b/gnu/packages/patches/cppcheck-fix-basedir-test.patch new file mode 100644 index 0000000000..06a1422629 --- /dev/null +++ b/gnu/packages/patches/cppcheck-fix-basedir-test.patch @@ -0,0 +1,36 @@ +Fix the test "TestFileLister" by giving precisely the source directory instead of guessing it. +Author: Florent Pruvost <florent.pruvost@HIDDEN> + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 467e6e95e..d68d83e3d 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -85,6 +85,7 @@ if (BUILD_TESTS) + elseif(TEST ${NAME}) + else() + add_test(NAME ${NAME} COMMAND $<TARGET_FILE:testrunner> ${NAME} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) ++ set_tests_properties(${NAME} PROPERTIES ENVIRONMENT "PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}") + endif() + endfunction() + +diff --git a/test/testfilelister.cpp b/test/testfilelister.cpp +index 3e2f56dfc..ecf0f9c6e 100644 +--- a/test/testfilelister.cpp ++++ b/test/testfilelister.cpp +@@ -45,15 +45,7 @@ private: + + // TODO: generate file list instead + static std::string findBaseDir() { +- std::string basedir; +- while (!Path::isDirectory(Path::join(basedir, ".github"))) { +- const std::string abspath = Path::getAbsoluteFilePath(basedir); +- basedir += "../"; +- // no more going up +- if (Path::getAbsoluteFilePath(basedir) == abspath) +- throw std::runtime_error("could not find repository root directory"); +- } +- return basedir; ++ return Path::getAbsoluteFilePath(std::getenv("PROJECT_SOURCE_DIR")) + "/"; + } + + void recursiveAddFiles() const { base-commit: 6036f1f3053bc9b4f0411b5e8aeaab5bd7f4ec7b -- 2.43.0
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Florent Pruvost <florent.pruvost@HIDDEN> Subject: bug#77750: Acknowledgement ([PATCH] gnu: cppcheck: Update to 2.17.1) Message-ID: <handler.77750.B.174439215315205.ack <at> debbugs.gnu.org> References: <20250411134238.320182-1-florent.pruvost@HIDDEN> X-Gnu-PR-Message: ack 77750 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 77750 <at> debbugs.gnu.org Date: Fri, 11 Apr 2025 17:23:01 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 77750 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 77750: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77750 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.