From patchwork Sat Feb 22 17:19:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 38983 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 8797427BBE2; Sat, 22 Feb 2025 17:26:19 +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=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 CD40627BBE9 for ; Sat, 22 Feb 2025 17:26:17 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tltGN-0004z3-U2; Sat, 22 Feb 2025 12:26:04 -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 1tltGM-0004yt-No for guix-patches@gnu.org; Sat, 22 Feb 2025 12:26:03 -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 1tltGM-0005j6-FO for guix-patches@gnu.org; Sat, 22 Feb 2025 12:26:02 -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:Date:From:To:Subject; bh=WQUqKmmMw1wec4c+hlYYIK6V1ep4ApqQwLXgdhu6C68=; b=YzysPpK8Ri7brON5dIF2ZR1+vEsW7DXLZvDtrAg84zV4R1SboC3JQQ0YSFh/6GwML8o9M75y14oKfDSKf+EV28y0MJEfoHB8X9JhuSJdN8VbLm51hichanlEkz/dG3xEwqqVINHflV6uRFNZhqYzsiZ8rvy9fOS+py5+c+dtlFugy00yZux6ipHBajPYqTs/eJoY0nnQVE3Dqd6axjsXDPfwEdkOzb7ogHBz5PtaBrc111NGs1+8FZhAaQgYaKL+TORoiFRgQSANrIOKKraqwI6+d/JdjCM4T7TlBh5y9gYzh2SpNhiPPHXxgOdfz/ZfuGrvZOK/qc2b70pP26tEtg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tltGM-0002xv-Ah for guix-patches@gnu.org; Sat, 22 Feb 2025 12:26:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76489] [PATCH] gnu: task-spooler: Update to 1.0.3. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Feb 2025 17:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 76489 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76489@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174024514411363 (code B ref -1); Sat, 22 Feb 2025 17:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Feb 2025 17:25:44 +0000 Received: from localhost ([127.0.0.1]:57078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tltG3-0002xC-Q6 for submit@debbugs.gnu.org; Sat, 22 Feb 2025 12:25:44 -0500 Received: from lists.gnu.org ([2001:470:142::17]:55724) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tltFz-0002ww-D9 for submit@debbugs.gnu.org; Sat, 22 Feb 2025 12:25:41 -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 1tltFq-0004uf-9D for guix-patches@gnu.org; Sat, 22 Feb 2025 12:25:30 -0500 Received: from 8.mo575.mail-out.ovh.net ([46.105.74.219]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tltFm-0005gU-GX for guix-patches@gnu.org; Sat, 22 Feb 2025 12:25:30 -0500 Received: from director2.ghost.mail-out.ovh.net (unknown [10.108.25.136]) by mo575.mail-out.ovh.net (Postfix) with ESMTP id 4Z0YmK518Tz1Xkd for ; Sat, 22 Feb 2025 17:25:21 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-zxw4q (unknown [10.111.182.119]) by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 196BE1FE90 for ; Sat, 22 Feb 2025 17:25:20 +0000 (UTC) Received: from ngraves.fr ([37.59.142.106]) by ghost-submission-5b5ff79f4f-zxw4q with ESMTPSA id I+zzKIAIumch8gEA/O4+Ig (envelope-from ) for ; Sat, 22 Feb 2025 17:25:20 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-106R006bad63f59-fe96-4d3b-b841-8b3aea4667da, C7A22B1C813CEE236724D5E01B4C661E7E423193) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 Date: Sat, 22 Feb 2025 18:19:55 +0100 Message-ID: <87o6yt3n9b.fsf@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 612771027409101562 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 49 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdejfeehudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecuogfuuhhsphgvtghtffhomhgrihhnucdlgeelmdenucfjughrpefhvffufffkgggtgfesthhqredttddtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeefiefggeeijeekgeeifeeuveevfeegtdeghffggeeileekhfeitefhhfdvteefieenucffohhmrghinhepghhnuhdrohhrghdphhhomhgvuhhnihigrdhnvghtnecukfhppeduvdejrddtrddtrddupdeltddrledvrdduudejrddugeegpdefjedrheelrddugedvrddutdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheejhegmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=WQUqKmmMw1wec4c+hlYYIK6V1ep4ApqQwLXgdhu6C68=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1740245121; v=1; b=h4W/LyJ3bKNE36R+w0G6qUwxyQa9KiC79BFwMn9dvHIiKBu3TdXhyoYFVRM5alzl4foMGtdc ErTv53QXctwxx0YJNsE93ITHJ/wd1jF9cq3X7LHufTs5adW+V3pgFEswhEbDSPorbbqe5mTldGN nmkqrhbXb82gQxomBeGloDbM+z2Xq/XIxvOLuPdqcvCEPnN8ChTkicnDbkM/CwGgYCyI5XY1tvI 1ud9JmJHzF35m9Aaq+pZnchorCufp/kdYAo9Rtw0VUbfCgBozye9WqZSR1LNWl0xBO+tWUn3RuZ SV/UW4aAiqCjWMrSz6f7CqxC8Yx7X+VBTicc8sqHm9NEQ== Received-SPF: pass client-ip=46.105.74.219; envelope-from=ngraves@ngraves.fr; helo=8.mo575.mail-out.ovh.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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-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/task-runners.scm: Sort modules. (task-spooler): Update to 1.0.3. [arguments]: Rewrite using gexps. Improve 'check phase. [inputs]: Improve style. --- gnu/packages/task-runners.scm | 67 ++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/gnu/packages/task-runners.scm b/gnu/packages/task-runners.scm index eb64f432e8..5c9e058f20 100644 --- a/gnu/packages/task-runners.scm +++ b/gnu/packages/task-runners.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2021 Stefan Reichör ;;; Copyright © 2021 Ivan Gankevich ;;; Copyright © 2024 Sharlatan Hellseher +;;; Copyright © 2025 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,17 +20,18 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages task-runners) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix git-download) - #:use-module (guix utils) #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages golang-xyz) #:use-module (gnu packages mail) #:use-module (guix build-system gnu) - #:use-module (guix build-system go)) + #:use-module (guix build-system go) + #:use-module (guix download) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix utils)) (define-public run (package @@ -63,54 +65,55 @@ (define-public run (define-public task-spooler (package (name "task-spooler") - (version "1.0.1") + (version "1.0.3") (source (origin (method url-fetch) (uri (string-append - "https://vicerveza.homeunix.net/~viric/soft/ts/ts-" version ".tar.gz")) - (sha256 (base32 "0y32sm2i2jxs88c307h76449fynk75p9qfw1k11l5ixrn03z67pl")))) + "https://vicerveza.homeunix.net/~viric/soft/ts/ts-" + version ".tar.gz")) + (sha256 + (base32 "0a5l8bjq869lvqys3amsil933vmm9b387axp1jv3bi9xah8k70zs")))) (build-system gnu-build-system) (arguments - `(#:make-flags - (let ((c-flags "-g -O2")) - (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - ,(string-append "CC=" (cc-for-target)) + (list + #:make-flags + #~(let ((c-flags "-g -O2")) + (list (string-append "PREFIX=" #$output) + #$(string-append "CC=" (cc-for-target)) (string-append "CFLAGS=" c-flags))) - #:phases - (modify-phases %standard-phases + #:phases + #~(modify-phases %standard-phases (delete 'configure) ;; no configuration script (add-after 'unpack 'rename-and-patch-paths - (lambda _ + (lambda* (#:key inputs #:allow-other-keys) ;; Rename "ts" to "tsp" to not interfere with "ts" command ;; from moreutils package. (rename-file "ts.1" "tsp.1"); (substitute* '("Makefile" "testbench.sh") (("\\bts\\b") "tsp")) ;; Patch gzip/sendmail/shell paths. - (substitute* "execute.c" - (("execlp\\(\"gzip\"") - (format #f "execlp(\"~a/bin/gzip\"" - (assoc-ref %build-inputs "gzip")))) + (substitute* '("execute.c" "list.c") + (("execlp\\(\"(gzip|sh)\"" all exe) + (format #f "execlp(~s" + (search-input-file + inputs (string-append "/bin/" exe))))) (substitute* "list.c" (("/bin/sh\\b") (which "sh"))) - (substitute* "env.c" - (("execlp\\(\"/bin/sh\"") - (format #f "execlp(\"~a/bin/sh\"" - (assoc-ref %build-inputs "bash")))) (substitute* "mail.c" (("execl\\(\"/usr/sbin/sendmail\"") - (format #f "execl(\"~a/sbin/sendmail\"" - (assoc-ref %build-inputs "sendmail")))))) + (format #f "execl(~s" + (search-input-file inputs "/sbin/sendmail")))))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "PATH" (string-join (list (getenv "PATH") (getcwd)) ":")) - (invoke "./testbench.sh"))))))) + (if tests? + (begin + (setenv "PATH" + (string-append (getenv "PATH") ":" (getcwd))) + (invoke "./testbench.sh")) + (format #t "test suite not run ~%"))))))) (inputs - `(("bash" ,bash-minimal) - ("gzip" ,gzip) - ("sendmail" ,sendmail))) + (list bash-minimal gzip sendmail)) (synopsis "UNIX task queue system") (description "Task spooler lets users run shell commands asynchronously one after the other in a separate process.")