From patchwork Sat Mar 23 07:12:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 62140 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 DD1BA27BBE9; Sat, 23 Mar 2024 08:42:44 +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=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,PDS_BTC_ID,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no 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 CF85227BBE2 for ; Sat, 23 Mar 2024 08:42:43 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rnwxK-0002yR-9t; Sat, 23 Mar 2024 04:42:22 -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 ) id 1rnwxJ-0002y0-1D for guix-patches@gnu.org; Sat, 23 Mar 2024 04:42:21 -0400 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 1rnwxI-0005yv-PW for guix-patches@gnu.org; Sat, 23 Mar 2024 04:42:20 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rnwxx-00064V-Pg for guix-patches@gnu.org; Sat, 23 Mar 2024 04:43:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69957] [PATCH gnome-team 1/2] gnu: duc: Fix build. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Mar 2024 08:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69957 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69957@debbugs.gnu.org Cc: rg@raghavgururajan.name, vivien@planete-kraus.eu, liliana.prikler@gmail.com, maxim.cournoyer@gmail.com Received: via spool by 69957-submit@debbugs.gnu.org id=B69957.171118333423236 (code B ref 69957); Sat, 23 Mar 2024 08:43:01 +0000 Received: (at 69957) by debbugs.gnu.org; 23 Mar 2024 08:42:14 +0000 Received: from localhost ([127.0.0.1]:37135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnwxC-00062b-0v for submit@debbugs.gnu.org; Sat, 23 Mar 2024 04:42:14 -0400 Received: from planete-kraus.eu ([89.234.140.182]:56800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnwx6-00062B-Dq for 69957@debbugs.gnu.org; Sat, 23 Mar 2024 04:42:12 -0400 Received: from planete-kraus.eu (localhost.localdomain [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 2348c4ec; Sat, 23 Mar 2024 08:41:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:to:cc :mime-version; s=albinoniA; bh=hORQmX8nsI1fUn0mFHUau/2MlgA=; b=K aE32SJaofW5YJtK8gxtGnFhY4VZPrhbAs2rvJGacIJwDbpops3qm7iTl39QLWd8v Ysa5SXStgn4pxvD42tQRUHGu83PFWt4S2/+hKrtySIMIXvmsjjd307i0usHqdCgd STGXga0F70UZvF5uz/fwycJDkblAccSBvOp1hrAdccflj+H50AQJFjB+ZHD0eAXc 14n0WfMKInonCQ9uYp+8yyCNur+T8bwcqNl9qXPVa4vc44cVJzosiFMt/3smxJ52 i/5u9lPw7hh9kl02WFgIiYNVeMDbKc4Cq64w1/pXsm/c4GvuocH8xh1+/1jacLak CpnHiL1Qtu83eEbDn2/ZA== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id f4a7b61f (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sat, 23 Mar 2024 08:41:20 +0000 (UTC) Message-ID: <89b68e33e58fd258fb33db7ee66111eb90c20b77.1711178973.git.vivien@planete-kraus.eu> In-Reply-To: References: Date: Sat, 23 Mar 2024 08:12:48 +0100 MIME-Version: 1.0 User-Agent: Evolution 3.48.4 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: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches X-Patchwork-Original-From: Vivien Kraus via Guix-patches via From: Vivien Kraus 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/duc-fix-test-sh.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/disk.scm (duc): Use it here. Change-Id: I664614dc35fb88f8ee63dbe727a38f17f4af0f8e --- gnu/local.mk | 1 + gnu/packages/disk.scm | 4 +- gnu/packages/patches/duc-fix-test-sh.patch | 70 ++++++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/duc-fix-test-sh.patch diff --git a/gnu/local.mk b/gnu/local.mk index 2ea9806b7e..24103a4da7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1114,6 +1114,7 @@ dist_patch_DATA = \ %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \ %D%/packages/patches/dstat-skip-devices-without-io.patch \ %D%/packages/patches/dtc-meson-cell-overflow.patch \ + %D%/packages/patches/duc-fix-test-sh.patch \ %D%/packages/patches/dune-common-skip-failing-tests.patch \ %D%/packages/patches/dune-grid-add-missing-include-cassert.patch \ %D%/packages/patches/dune-istl-fix-solver-playground.patch \ diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index b0117d77ce..ea18a98ab6 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -1562,7 +1562,9 @@ (define-public duc (file-name (git-file-name name version)) (sha256 (base32 - "0sglcn38rgn6y3m5ahngizyn3x2rzhqjphs7g0ppnlinkz56rcv4")))) + "0sglcn38rgn6y3m5ahngizyn3x2rzhqjphs7g0ppnlinkz56rcv4")) + (patches + (search-patches "duc-fix-test-sh.patch")))) (build-system gnu-build-system) (arguments `(#:phases diff --git a/gnu/packages/patches/duc-fix-test-sh.patch b/gnu/packages/patches/duc-fix-test-sh.patch new file mode 100644 index 0000000000..8b79e4bd03 --- /dev/null +++ b/gnu/packages/patches/duc-fix-test-sh.patch @@ -0,0 +1,70 @@ +From a84835e481d9b5fcfc101bb1fa5aba38a245b6f3 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Fabio Natali +Date: Wed, 30 Aug 2023 11:35:40 +0100 +Subject: [PATCH] Fix test.sh which used to fail in some circumstances + +duc's behaviour may legitimately vary depending on the system it is being run +on. The test.sh script used to fail in some circumstances as it was too strict +and it did not account for some legitimate behaviour differences. + +Fix: update `test.sh' variable +--- + +This is a squash of pull request https://github.com/zevv/duc/pull/318, +waiting to be merged. + + test.sh | 22 ++++++++++++++++------ + 1 file changed, 16 insertions(+), 6 deletions(-) + +diff --git a/test.sh b/test.sh +index eb592be..7668499 100755 +--- a/test.sh ++++ b/test.sh +@@ -130,8 +130,8 @@ fi + # Actual tests are below. If you add test cases above, these need to be tweaked. + #--------------------------------------------------------------------------------- + +- +-cat ${DUC_TEST_DIR}.out | grep -q "Indexed 77 files and 47 directories, (91869B apparent, 540672B actual)" ++# An exact match is expected on the apparent size; the actual size may vary. ++cat ${DUC_TEST_DIR}.out | grep -q "Indexed 77 files and 47 directories, (91869B apparent, [0-9]*B actual)" + + if [ "$?" = "0" ]; then + echo "report: ok" +@@ -153,16 +153,26 @@ if [ "$?" != "0" ]; then + exit 1 + fi + +-testsum="33e2be27a9e70e81d4006a2d7b555948" ++# When two or more hard links point to the same file and when running duc with ++# the `--check-hard-links' option, only one of the hard links will be ++# counted. However, duc may pick up and display a different hard link depending ++# on the system it is being run on. Since our tests include three hard links to ++# the same file, we should be expecting three possible outcomes, all equally ++# valid, each corresponding to one of the following MD5 checksums. ++testsum0="78dbf880ef6917ea665fddb5ebb44428" ++testsum1="38ab7b7d1ec6ac57d672c5618371386d" ++testsum2="33e2be27a9e70e81d4006a2d7b555948" + md5sum ${DUC_TEST_DIR}.out > /tmp/.duc.md5sum +-grep -q $testsum /tmp/.duc.md5sum ++grep -q "$testsum0\|$testsum1\|$testsum2" /tmp/.duc.md5sum + + if [ "$?" = "0" ]; then + echo "md5sum: ok" + else + echo "md5sum: failed" +- echo "expected: " +- echo "$testsum ${DUC_TEST_DIR}.out" ++ echo "expected one of: " ++ echo "$testsum0 ${DUC_TEST_DIR}.out" ++ echo "$testsum1 ${DUC_TEST_DIR}.out" ++ echo "$testsum2 ${DUC_TEST_DIR}.out" + echo "got: " + cat /tmp/.duc.md5sum + exit 1 + +base-commit: b8f9659688a38476df9f613be3342bb8e2d65402 +-- +2.41.0 + From patchwork Sat Mar 23 07:13:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 62139 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 1085427BBEA; Sat, 23 Mar 2024 08:42:38 +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=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,PP_MIME_FAKE_ASCII_TEXT,SPF_HELO_PASS, URIBL_BLOCKED autolearn=no 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 4457627BBE2 for ; Sat, 23 Mar 2024 08:42:37 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rnwxK-0002ya-Ce; Sat, 23 Mar 2024 04:42:22 -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 ) id 1rnwxJ-0002yD-HS for guix-patches@gnu.org; Sat, 23 Mar 2024 04:42:21 -0400 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 1rnwxJ-0005z1-9S for guix-patches@gnu.org; Sat, 23 Mar 2024 04:42:21 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rnwxy-00064d-93 for guix-patches@gnu.org; Sat, 23 Mar 2024 04:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69957] [PATCH gnome-team 2/2] gnu: duc: Update style. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Mar 2024 08:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69957 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69957@debbugs.gnu.org Cc: rg@raghavgururajan.name, vivien@planete-kraus.eu, liliana.prikler@gmail.com, maxim.cournoyer@gmail.com Received: via spool by 69957-submit@debbugs.gnu.org id=B69957.171118333923252 (code B ref 69957); Sat, 23 Mar 2024 08:43:02 +0000 Received: (at 69957) by debbugs.gnu.org; 23 Mar 2024 08:42:19 +0000 Received: from localhost ([127.0.0.1]:37139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnwxG-00062x-O8 for submit@debbugs.gnu.org; Sat, 23 Mar 2024 04:42:19 -0400 Received: from planete-kraus.eu ([89.234.140.182]:56800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnwxB-00062B-Kk for 69957@debbugs.gnu.org; Sat, 23 Mar 2024 04:42:14 -0400 Received: from planete-kraus.eu (localhost.localdomain [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id bdafc43f; Sat, 23 Mar 2024 08:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:in-reply-to:references:from:date:subject:to:cc :mime-version; s=albinoniA; bh=tTUqdreY4v52mbttUG191v7Lhx8=; b=J NeEl34kq7VuPPaC/8fvAQEOYvi6ydGHrAElNEXindf9MFry21EVjMR8WJRdELBJP WnQ1YFL2OvVwzAxDp3ndlqOkymnDFKgvbTsCooVlg++bSzycKNit0OpWa9WNAzqH CH0WbEggr91gyMHuK42+OHlGT/0aUKdVH+/Rgq8Hg4mpbZWVoH9xf21l/+XcIggI GNYgWVjncaKOCJKSIKwYxHavfy7apIUHZz0OE1Bcuf8DpwBtRhupEH3QBdxiWNZu Wx+kn6ojUg0zFpR4zoWDCMVlyOERflwjcFl9x9L9Io1DeLRW3fdvNVzIULgEEuxN YjXkV8YmRipdcC6BIXa/Q== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 1f438157 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sat, 23 Mar 2024 08:41:23 +0000 (UTC) Message-ID: <672487dc535ab1f95f95028a95e095b4d7922508.1711178973.git.vivien@planete-kraus.eu> In-Reply-To: References: Date: Sat, 23 Mar 2024 08:13:49 +0100 MIME-Version: 1.0 User-Agent: Evolution 3.48.4 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: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches X-Patchwork-Original-From: Vivien Kraus via Guix-patches via From: Vivien Kraus 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/disk.scm (duc) [arguments]: Convert to list of G-Expressions. Change-Id: Iefcdcc55b1e71f7e866cb04795ef74f3b675cfce --- gnu/packages/disk.scm | 55 ++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index ea18a98ab6..2e2c5739cc 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -1567,33 +1567,34 @@ (define-public duc (search-patches "duc-fix-test-sh.patch")))) (build-system gnu-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out"))) - (substitute* "src/duc/cmd-ui.c" - (("ncursesw/ncurses.h") "ncurses.h")) - (substitute* "examples/index.cgi" - (("/usr/local/bin/duc") - (string-append out "/bin/duc")))))) - (add-after 'install 'install-examples - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (doc (string-append out "/share/doc/" ,name "-" ,version))) - (copy-recursively "examples" (string-append doc "/examples"))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (substitute* "test.sh" - ;; Keep the test logs where --keep-failed can see them. - (("^(DUC_TEST_DIR=).*" _ assign) - (format #f "~a~a/test-directory~%" assign (getcwd))) - ;; XXX ‘actual size’ differed on my system (a consistent 348160 - ;; bytes where the tests expect 540672). However, the ‘apparent - ;; size’ matches, as does the actual test output. Good enough…? - ((" [0-9]*B actual") " [0-9]*B actual")) - (when tests? - (invoke "./test.sh"))))))) ; no ‘check’ target + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (substitute* "src/duc/cmd-ui.c" + (("ncursesw/ncurses.h") "ncurses.h")) + (substitute* "examples/index.cgi" + (("/usr/local/bin/duc") + (string-append out "/bin/duc")))))) + (add-after 'install 'install-examples + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (string-append out "/share/doc/" #$name "-" #$version))) + (copy-recursively "examples" (string-append doc "/examples"))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (substitute* "test.sh" + ;; Keep the test logs where --keep-failed can see them. + (("^(DUC_TEST_DIR=).*" _ assign) + (format #f "~a~a/test-directory~%" assign (getcwd))) + ;; XXX ‘actual size’ differed on my system (a consistent 348160 + ;; bytes where the tests expect 540672). However, the ‘apparent + ;; size’ matches, as does the actual test output. Good enough…? + ((" [0-9]*B actual") " [0-9]*B actual")) + (when tests? + (invoke "./test.sh"))))))) ; no ‘check’ target (native-inputs (list autoconf automake libtool pkg-config)) (inputs