From unknown Fri Sep 05 08:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49685] [PATCH] gnu: Add task-spooler. Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 18:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49685 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49685@debbugs.gnu.org Cc: Ivan Gankevich X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162689263528151 (code B ref -1); Wed, 21 Jul 2021 18:38:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jul 2021 18:37:15 +0000 Received: from localhost ([127.0.0.1]:38583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6H5m-0007Jy-UF for submit@debbugs.gnu.org; Wed, 21 Jul 2021 14:37:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:52584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6H5l-0007Jr-S1 for submit@debbugs.gnu.org; Wed, 21 Jul 2021 14:37:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6H5k-0001ny-SJ for guix-patches@gnu.org; Wed, 21 Jul 2021 14:37:13 -0400 Received: from mail.spbu.ru ([195.70.197.23]:37757 helo=cgp2.pu.ru) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1m6H5g-0008Pi-Fh for guix-patches@gnu.org; Wed, 21 Jul 2021 14:37:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=VaP5Xy8qowNl31BRkyB4rqn8ZzJZXO104v/PzOd5dN4=; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject :Cc:To:From; b=Z25fjak3zs2f86ahZy2WEbDxCt5VfU+T3jyldN6QBEgL5NRIw5s1JwHSGbZG/2 D4vQCvVwYR7vqboZHRK8LZmR74RcgkJkWb8RifhtoJIQE0aUkCK5fwiIfaN3znqi5z7pE3QUA1GMl vgSFGfUgVTagWOgd/p2x/qMrStLoFdk4+ifKNUEWN0W4aUJ41Isj9shaTwr2ovBCtpYGbUGwkHxft IL53iVN9QgFQLu6Wo+oy4jYXE+Yxjb3fKN3HB/kwxL2GGr5pudq05hpVjwWpGQbzyKcWLfPyU5KRR jZx2lbmLngpispDKBoU10xc6cT7Vm9Azxx0Or8tAd4ctFrixA== Received: from [172.27.221.159] (account st018947@spbu.ru HELO localhost.localdomain) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 173293618; Wed, 21 Jul 2021 21:37:04 +0300 From: Ivan Gankevich Date: Wed, 21 Jul 2021 21:35:05 +0300 Message-Id: <20210721183504.9388-1-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=195.70.197.23; envelope-from=i.gankevich@spbu.ru; helo=cgp2.pu.ru 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * gnu/packages/task-runners.scm (task-spooler): New variable. --- gnu/packages/task-runners.scm | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/task-runners.scm b/gnu/packages/task-runners.scm index 49a07fa3bd..5b47076696 100644 --- a/gnu/packages/task-runners.scm +++ b/gnu/packages/task-runners.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Stefan Reichör +;;; Copyright © 2021 Ivan Gankevich ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,8 +20,12 @@ (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 (gnu packages compression) #:use-module (gnu packages golang) + #:use-module (gnu packages mail) + #:use-module (guix build-system gnu) #:use-module (guix build-system go)) (define-public run @@ -47,3 +52,56 @@ using a Runfile.") (home-page "https://github.com/TekWizely/run") (license license:expat))) + +(define-public task-spooler + (package + (name "task-spooler") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://vicerveza.homeunix.net/~viric/soft/ts/ts-" version ".tar.gz")) + (sha256 (base32 "0y32sm2i2jxs88c307h76449fynk75p9qfw1k11l5ixrn03z67pl")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (let ((c-flags "-g -O2")) + (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + "CC=gcc" + (string-append "CFLAGS=" c-flags) + (string-append "LDFLAGS=" c-flags))) + #:phases + (modify-phases %standard-phases + (delete 'configure) ;; no configuration script + (add-after 'unpack 'rename-and-patch-paths + (lambda _ + ;; 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\"" (which "gzip")))) + (substitute* "list.c" + (("/bin/sh\\b") (which "sh"))) + (substitute* "env.c" + (("execlp\\(\"/bin/sh\"") (format #f "execlp(\"~a\"" (which "sh")))) + (substitute* "mail.c" + (("execl\\(\"/usr/sbin/sendmail\"") + (format #f "execl(\"~a/usr/sbin/sendmail\"" + (assoc-ref %build-inputs "sendmail")))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "PATH" (string-join (list (getenv "PATH") (getcwd)) ":")) + (invoke "./testbench.sh"))))))) + (inputs + `(("gzip" ,gzip) + ("sendmail" ,sendmail))) + (synopsis "UNIX task queue system") + (description "Task spooler let users run shell commands asynchronously +one after the other in a separate process.") + (home-page "https://vicerveza.homeunix.net/~viric/soft/ts/") + (license license:gpl2+))) -- 2.32.0 From unknown Fri Sep 05 08:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49685] [PATCH] gnu: Add task-spooler. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 19:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49685 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ivan Gankevich , 49685@debbugs.gnu.org Received: via spool by 49685-submit@debbugs.gnu.org id=B49685.162689404930650 (code B ref 49685); Wed, 21 Jul 2021 19:01:01 +0000 Received: (at 49685) by debbugs.gnu.org; 21 Jul 2021 19:00:49 +0000 Received: from localhost ([127.0.0.1]:38607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6HSb-0007yI-9V for submit@debbugs.gnu.org; Wed, 21 Jul 2021 15:00:49 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:39928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6HSY-0007y9-Jt for 49685@debbugs.gnu.org; Wed, 21 Jul 2021 15:00:47 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id Xv0k2500D0mfAB406v0kH0; Wed, 21 Jul 2021 21:00:44 +0200 Message-ID: From: Maxime Devos Date: Wed, 21 Jul 2021 21:00:26 +0200 In-Reply-To: <20210721183504.9388-1-i.gankevich@spbu.ru> References: <20210721183504.9388-1-i.gankevich@spbu.ru> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-xixty6XcRO0UrIgtQFAX" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626894045; bh=cObyyAcb2yWpzqPLv/D5CjTSRgszHgfS96TlkXBofoQ=; h=Subject:From:To:Date:In-Reply-To:References; b=maRZYbkISam79Dx+Y90/bo71zkyuosbXd254Zqy/EGaJlTlCSzhkDAybhAKKF23Ez nPj7g+L3EhoiBcl/bPG8enph5Ge3PR0XTCAulFdr51MFfjRD1ZeQp22TnpRyOXGYUb TBkbaB4ESJKSoT/TlUU8i0sUkzhoNpms30wtAtBanVjzW/FX186zTXWYxrDSWsSwQ5 KD/b8oPFOR1LTIHdlUQViiKLXSPfrRhbsEmXSjXOcN+wKQHbvAlynDa1xuCD7bpP4v ZmC1yvi6n9osZcHCNFsM2BepqcmWiJRT+rxQSeHk6QLKFj7wyJKI0J3mR6sqlM5gRW TPw8E5jdcpvkA== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-xixty6XcRO0UrIgtQFAX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ivan Gankevich schreef op wo 21-07-2021 om 21:35 [+0300]: > +(define-public task-spooler > + (package > + (name "task-spooler") > + (version "1.0.1") > + (source > + (origin > + (method url-fetch) > + (uri (string-append > + "https://vicerveza.homeunix.net/~viric/soft/ts/ts-" versi= on ".tar.gz")) > + (sha256 (base32 "0y32sm2i2jxs88c307h76449fynk75p9qfw1k11l5ixrn03= z67pl")))) > + (build-system gnu-build-system) > + (arguments > + `(#:make-flags > + (let ((c-flags "-g -O2")) > + (list (string-append "PREFIX=3D" (assoc-ref %outputs "out")) > + "CC=3Dgcc" This shoul be ,(string-append "CC=3D" (cc-for-target)), such that the cross= -compiler is used when cross-compililng. > + (string-append "CFLAGS=3D" c-flags) > + (string-append "LDFLAGS=3D" c-flags))) Why are you adding "-g -O2" to LDFLAGS? I understand adding it to CFLAGS, but I don't see why it would be added to CFLAGS. > + #:phases > + (modify-phases %standard-phases > + (delete 'configure) ;; no configuration script > + (add-after 'unpack 'rename-and-patch-paths > + (lambda _ > + ;; 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\"" (which= "gzip")))) This needs to be (search-input-file "bin/gzip") instead of (which "gzip") for cross-compilation purposes ('which' searches for a native "gzip" in $PA= TH) 'search-input-file' is not yet defined on 'master' (it's only on 'core-upda= tes' currently), so you could do something like (string-append (assoc-ref inputs "gzip") "/bin/gzip") > + (substitute* "list.c" > + (("/bin/sh\\b") (which "sh"))) Ditto (and you need to add "bash-minimal" to "inputs"). > + (substitute* "env.c" > + (("execlp\\(\"/bin/sh\"") (format #f "execlp(\"~a\"" (wh= ich "sh")))) Ditto. > + (substitute* "mail.c" > + (("execl\\(\"/usr/sbin/sendmail\"") > + (format #f "execl(\"~a/usr/sbin/sendmail\"" > + (assoc-ref %build-inputs "sendmail")))))) If you fix 'sendemail' to install things in "sbin" instead of "usr/sbin", then you can do (search-input-file inputs "bin/sendmail"). > + (replace 'check > + (lambda* (#:key tests? #:allow-other-keys) > + (when tests? > + (setenv "PATH" (string-join (list (getenv "PATH") (getcw= d)) ":")) Greetings, Maxime. --=-xixty6XcRO0UrIgtQFAX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYPhuyhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lLVAQDttromNVh3RsKLN8QcOj2Fdsz+ C5q40UyLlG0NmyR59QEA1fhdVIZHkp5KJ+6t7NMpEEeoWksTg/v3EmOSGpbSugs= =R7c/ -----END PGP SIGNATURE----- --=-xixty6XcRO0UrIgtQFAX-- From unknown Fri Sep 05 08:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49685] [PATCH] gnu: sendmail: Install executables to $prefix/sbin and $prefix/bin directories. References: <20210721183504.9388-1-i.gankevich@spbu.ru> In-Reply-To: <20210721183504.9388-1-i.gankevich@spbu.ru> Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Jul 2021 18:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49685 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49685@debbugs.gnu.org Cc: Ivan Gankevich Received: via spool by 49685-submit@debbugs.gnu.org id=B49685.16270643668382 (code B ref 49685); Fri, 23 Jul 2021 18:20:02 +0000 Received: (at 49685) by debbugs.gnu.org; 23 Jul 2021 18:19:26 +0000 Received: from localhost ([127.0.0.1]:44572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6zle-0002B8-2w for submit@debbugs.gnu.org; Fri, 23 Jul 2021 14:19:26 -0400 Received: from mail.spbu.ru ([195.70.197.23]:57335 helo=cgp2.pu.ru) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6zlQ-0002Ad-Vb for 49685@debbugs.gnu.org; Fri, 23 Jul 2021 14:19:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=fOLy2ghORIfusXr8o51t0zcEYosDI62zJYsECoax1Qw=; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From; b=TAS44N1UflkbrcKFbJslAF6PeL/XScs5mlieMc416Se+bIEX4TBAPHKU1ml/wJP1rAPqV2MOJI Mqgq5pUSK4HLVSQKsTBPbIGb0MZQERqfEj2sBFJ6J/jsEv3O7SOWwfpZurTEyQ+SQUX8PS3qMZpII 74TJntry61IdReCTcRvGKvB/xAQnTvhaJL77Gx8v1BC+AJ8/IpXZiHtwnDvIExE0AZrBS3nX9VrQ1 NDWWFC+KnT65k0L/4+bMWuBM8V7FT0SaSWvM3k6Y4tT8r0lCkbTKAACjBJBaLDYHPLTmRBUS1TBgP 7cNz4cP1hENY9Hj/Fmi/FVBuTpkZJBSN7esmg== Received: from [172.27.221.159] (account st018947@spbu.ru HELO localhost.localdomain) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 173762293; Fri, 23 Jul 2021 21:18:50 +0300 From: Ivan Gankevich Date: Fri, 23 Jul 2021 21:15:39 +0300 Message-Id: <20210723181538.8402-1-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Currently "sendmail" installs executables to $PREFIX/usr/sbin and $PREFIX/usr/bin directories. This patch changes them to $PREFIX/sbin and $PREFIX/bin respectively. Also this patch fixes broken symlinks in $PREFIX/bin and updates package definitions that use old sendmail paths. * gnu/packages/mail.scm (sendmail): Set new paths. [arguments]<#:phases>{replace-/usr}: Remove /usr prefix. [arguments]<#:phases>{post-install}: Fix broken symlinks [arguments]<#:phases>{configure}: Set paths without /usr prefix. * gnu/packages/mail.scm (claws-mail): Use new sendmail paths. * gnu/packages/version-control.scm (python-git-multimail): Use new sendmail paths. --- gnu/packages/mail.scm | 28 ++++++++++++++++++++++++---- gnu/packages/version-control.scm | 2 +- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index f0f1540cc9..a76a56694c 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1635,7 +1635,7 @@ compresses it.") (let* ((mailutils (assoc-ref inputs "mailutils")) (inc (string-append mailutils "/bin/mu-mh/inc")) (send-mail (assoc-ref inputs "sendmail")) - (sendmail (string-append send-mail "/usr/sbin/sendmail"))) + (sendmail (string-append send-mail "/sbin/sendmail"))) (substitute* "src/common/defs.h" (("/usr/bin/mh/inc") inc) (("/usr/sbin/sendmail") sendmail))))) @@ -2881,6 +2881,13 @@ powerful user customization features.") (substitute* "devtools/bin/Build" (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh")))) #t)) + (add-before 'build 'replace-/usr + (lambda _ + (substitute* + '("devtools/OS/Linux" + "cf/ostype/mklinux.m4" + "cf/ostype/linux.m4") + (("/usr/sbin") "/sbin")))) (replace 'configure (lambda _ @@ -2892,6 +2899,11 @@ powerful user customization features.") (with-output-to-file "devtools/Site/site.config.m4" (lambda () (format #t " +define(`confEBINDIR', `/sbin') +define(`confSBINDIR', `/sbin') +define(`confMBINDIR', `/sbin') +define(`confUBINDIR', `/bin') +define(`confLINKS', `') define(`confCC', `gcc') define(`confOPTIMIZE', `-g -O2') define(`confLIBS', `-lresolv') @@ -2910,13 +2922,21 @@ define(`confINST_DEP', `') (add-before 'install 'pre-install (lambda _ (let ((out (assoc-ref %outputs "out"))) - (mkdir-p (string-append out "/usr/bin")) - (mkdir-p (string-append out "/usr/sbin")) + (mkdir-p (string-append out "/bin")) + (mkdir-p (string-append out "/sbin")) (mkdir-p (string-append out "/etc/mail")) (setenv "DESTDIR" out) (with-directory-excursion "cf/cf" (invoke "sh" "Build" "install-cf")) - #t)))) + #t))) + (add-after 'install 'post-install + (lambda _ + ;; Make symbolic links manually, because build script uses + ;; absolute paths for them and ignores DESTDIR. + (for-each + (lambda (name) + (symlink "../sbin/sendmail" (string-append %output "/bin/" name))) + '("hoststat" "newaliases" "mailq" "purgestat"))))) ;; There is no make check. There are some post installation tests, but those ;; require root privileges #:tests? #f)) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 7c1dbe8b26..814a87904e 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -1036,7 +1036,7 @@ a built-in cache to decrease server I/O pressure.") "'")) (("/usr/sbin/sendmail") (string-append (assoc-ref inputs "sendmail") - "/usr/sbin/sendmail"))) + "/sbin/sendmail"))) #t))))) (inputs `(("git" ,git) -- 2.32.0 From unknown Fri Sep 05 08:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49685] [PATCH] gnu: Add task-spooler. References: <20210721183504.9388-1-i.gankevich@spbu.ru> In-Reply-To: <20210721183504.9388-1-i.gankevich@spbu.ru> Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Jul 2021 18:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49685 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49685@debbugs.gnu.org Cc: Ivan Gankevich Received: via spool by 49685-submit@debbugs.gnu.org id=B49685.16270643938490 (code B ref 49685); Fri, 23 Jul 2021 18:20:02 +0000 Received: (at 49685) by debbugs.gnu.org; 23 Jul 2021 18:19:53 +0000 Received: from localhost ([127.0.0.1]:44579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6zm4-0002CR-Mr for submit@debbugs.gnu.org; Fri, 23 Jul 2021 14:19:53 -0400 Received: from mail.spbu.ru ([195.70.197.23]:32864 helo=cgp2.pu.ru) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6zm1-0002B6-Vh for 49685@debbugs.gnu.org; Fri, 23 Jul 2021 14:19:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=iXxhN91oV31jMCB4UYJ2LI9m0j7aYz3yASA3toNcnEE=; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject :Cc:To:From; b=LgpQ8JvQgaSrX5v7P0FKzY+ubi+vPejhPZkGp2QBehVQmkvoanBUM5fEvLZ2Q/ eLqGK9Nh3nLXLBgYokBocdiQWPrQMWLOgyrlc+2PFZq1Wjd5ojxYAM0wPAgABeYfAUCMdf4MezZu+ Ngycdjv3t8+EZzk3mwnsxNSBi8ECfvDF7A1cqEcRKQmo+6AHd308MY0PDa4Jeg8pgNHTKuvRLLJMp B8KXAedqKUeERawKco1EJwgBWL5eH8ugot7dFwqkf6/qpQ9jY8gv6mat37loHsrLIA/L9FGYcgJHH eEAw/2ZXwKUGQMIVC6Dg39SW8rX+E4c1NkmjfQH6xlVhB0UiQ== Received: from [172.27.221.159] (account st018947@spbu.ru HELO localhost.localdomain) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 173762376; Fri, 23 Jul 2021 21:19:24 +0300 From: Ivan Gankevich Date: Fri, 23 Jul 2021 21:19:03 +0300 Message-Id: <20210723181902.8703-1-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/task-runners.scm (task-spooler): New variable. --- gnu/packages/task-runners.scm | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/gnu/packages/task-runners.scm b/gnu/packages/task-runners.scm index 49a07fa3bd..237a6ec1b6 100644 --- a/gnu/packages/task-runners.scm +++ b/gnu/packages/task-runners.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Stefan Reichör +;;; Copyright © 2021 Ivan Gankevich ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,8 +20,14 @@ (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) + #:use-module (gnu packages mail) + #:use-module (guix build-system gnu) #:use-module (guix build-system go)) (define-public run @@ -47,3 +54,60 @@ using a Runfile.") (home-page "https://github.com/TekWizely/run") (license license:expat))) + +(define-public task-spooler + (package + (name "task-spooler") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://vicerveza.homeunix.net/~viric/soft/ts/ts-" version ".tar.gz")) + (sha256 (base32 "0y32sm2i2jxs88c307h76449fynk75p9qfw1k11l5ixrn03z67pl")))) + (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)) + (string-append "CFLAGS=" c-flags))) + #:phases + (modify-phases %standard-phases + (delete 'configure) ;; no configuration script + (add-after 'unpack 'rename-and-patch-paths + (lambda _ + ;; 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* "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")))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "PATH" (string-join (list (getenv "PATH") (getcwd)) ":")) + (invoke "./testbench.sh"))))))) + (inputs + `(("bash" ,bash-minimal) + ("gzip" ,gzip) + ("sendmail" ,sendmail))) + (synopsis "UNIX task queue system") + (description "Task spooler let users run shell commands asynchronously +one after the other in a separate process.") + (home-page "https://vicerveza.homeunix.net/~viric/soft/ts/") + (license license:gpl2+))) -- 2.32.0 From unknown Fri Sep 05 08:56:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49685] [PATCH] gnu: Add task-spooler. Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Jul 2021 18:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49685 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 49685@debbugs.gnu.org Received: via spool by 49685-submit@debbugs.gnu.org id=B49685.16270645808796 (code B ref 49685); Fri, 23 Jul 2021 18:23:01 +0000 Received: (at 49685) by debbugs.gnu.org; 23 Jul 2021 18:23:00 +0000 Received: from localhost ([127.0.0.1]:44586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6zp6-0002Hn-AA for submit@debbugs.gnu.org; Fri, 23 Jul 2021 14:23:00 -0400 Received: from mail.spbu.ru ([195.70.197.23]:52269 helo=cgp2.pu.ru) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6zp4-0002HU-7w for 49685@debbugs.gnu.org; Fri, 23 Jul 2021 14:22:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=wHCSqPLuiNo68Anj2itPdA8R0Or5fd36ikAT8K4PxU4=; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; b=Pe3WQP9s7NxUzk0 EA0/JdhhOd98181hf94VH83sdjTQzVz5P+SOGd70Iqz1dBDctpcu/vubISs5x5nze/57Mgz/aoYny MpqDwlDxJVwWSxgfpi0nRvqW/7pJKRSYrwssHeoorVPs5JdI2LTk4Ji6IKKe8Y+DwJUdOyVVAsExF gftqwZ99VPTN65xHaSYic6hsQIXAm+9FYlxhb1M3pwA+Y8NVpUsjj7v1PRMBeM9bvyT/duPRZ5rki JhiKMMEXcFmjUmN4W4ulbEH+Sfq2umpmLMXD47cM4p2bIjC1mWKzkszIxATT12XfQN3LEMCVO6j+8 GjllAZm69R4IPHQQ+ZQ== Received: from [172.27.221.159] (account st018947@spbu.ru HELO localhost) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 173762824; Fri, 23 Jul 2021 21:22:52 +0300 Date: Fri, 23 Jul 2021 21:22:52 +0300 From: Ivan Gankevich Message-ID: References: <20210721183504.9388-1-i.gankevich@spbu.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> + (arguments >> + `(#:make-flags >> + (let ((c-flags "-g -O2")) >> + (list (string-append "PREFIX=" (assoc-ref %outputs "out")) >> + "CC=gcc" > >This shoul be ,(string-append "CC=" (cc-for-target)), such that the cross-compiler >is used when cross-compililng. Fixed! >> + (string-append "CFLAGS=" c-flags) >> + (string-append "LDFLAGS=" c-flags))) > >Why are you adding "-g -O2" to LDFLAGS? I understand adding it to CFLAGS, >but I don't see why it would be added to CFLAGS. You’re right. Removed LDFLAGS. >> + ;; Patch gzip/sendmail/shell paths. >> + (substitute* "execute.c" >> + (("execlp\\(\"gzip\"") (format #f "execlp(\"~a\"" (which "gzip")))) > >This needs to be (search-input-file "bin/gzip") instead of (which "gzip") >for cross-compilation purposes ('which' searches for a native "gzip" in $PATH) >'search-input-file' is not yet defined on 'master' (it's only on 'core-updates' >currently), so you could do something like > > (string-append (assoc-ref inputs "gzip") "/bin/gzip") Changed “which” to “string-append” here and everywhere else. >If you fix 'sendemail' to install things in "sbin" instead of >"usr/sbin", then you can do (search-input-file inputs "bin/sendmail"). I’ve sent a separate patch that fixes /sbin and /bin directories for “sendmail”. Thank you for the review, Maxime! From unknown Fri Sep 05 08:56:37 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ivan Gankevich Subject: bug#49685: closed (Re: bug#49685: [PATCH] gnu: Add task-spooler.) Message-ID: References: <87bl65qqbb.fsf_-_@gnu.org> <20210721183504.9388-1-i.gankevich@spbu.ru> X-Gnu-PR-Message: they-closed 49685 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 49685@debbugs.gnu.org Date: Tue, 10 Aug 2021 15:21:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1628608861-30601-1" This is a multi-part message in MIME format... ------------=_1628608861-30601-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #49685: [PATCH] gnu: Add task-spooler. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 49685@debbugs.gnu.org. --=20 49685: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D49685 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1628608861-30601-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 49685-done) by debbugs.gnu.org; 10 Aug 2021 15:20:50 +0000 Received: from localhost ([127.0.0.1]:60450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDTYg-0007wz-0A for submit@debbugs.gnu.org; Tue, 10 Aug 2021 11:20:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDTYe-0007wm-Dk for 49685-done@debbugs.gnu.org; Tue, 10 Aug 2021 11:20:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53570) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDTYY-0002tO-2n; Tue, 10 Aug 2021 11:20:42 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=45066 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDTYX-0001xv-Pi; Tue, 10 Aug 2021 11:20:41 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ivan Gankevich Subject: Re: bug#49685: [PATCH] gnu: Add task-spooler. References: <20210721183504.9388-1-i.gankevich@spbu.ru> <20210723181538.8402-1-i.gankevich@spbu.ru> Date: Tue, 10 Aug 2021 17:20:40 +0200 In-Reply-To: <20210723181538.8402-1-i.gankevich@spbu.ru> (Ivan Gankevich's message of "Fri, 23 Jul 2021 21:15:39 +0300") Message-ID: <87bl65qqbb.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49685-done Cc: 49685-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Ivan Gankevich skribis: > Currently "sendmail" installs executables to $PREFIX/usr/sbin and > $PREFIX/usr/bin directories. This patch changes them to $PREFIX/sbin and > $PREFIX/bin respectively. Also this patch fixes broken symlinks in > $PREFIX/bin and updates package definitions that use old sendmail paths. > > * gnu/packages/mail.scm (sendmail): Set new paths. > [arguments]<#:phases>{replace-/usr}: Remove /usr prefix. > [arguments]<#:phases>{post-install}: Fix broken symlinks > [arguments]<#:phases>{configure}: Set paths without /usr prefix. > * gnu/packages/mail.scm (claws-mail): Use new sendmail paths. > * gnu/packages/version-control.scm (python-git-multimail): Use new > sendmail paths. That=E2=80=99s a much welcome change! Applied. > * gnu/packages/task-runners.scm (task-spooler): New variable. Applied as well. Thank you! Ludo=E2=80=99. ------------=_1628608861-30601-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Jul 2021 18:37:15 +0000 Received: from localhost ([127.0.0.1]:38583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6H5m-0007Jy-UF for submit@debbugs.gnu.org; Wed, 21 Jul 2021 14:37:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:52584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6H5l-0007Jr-S1 for submit@debbugs.gnu.org; Wed, 21 Jul 2021 14:37:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6H5k-0001ny-SJ for guix-patches@gnu.org; Wed, 21 Jul 2021 14:37:13 -0400 Received: from mail.spbu.ru ([195.70.197.23]:37757 helo=cgp2.pu.ru) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1m6H5g-0008Pi-Fh for guix-patches@gnu.org; Wed, 21 Jul 2021 14:37:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=VaP5Xy8qowNl31BRkyB4rqn8ZzJZXO104v/PzOd5dN4=; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject :Cc:To:From; b=Z25fjak3zs2f86ahZy2WEbDxCt5VfU+T3jyldN6QBEgL5NRIw5s1JwHSGbZG/2 D4vQCvVwYR7vqboZHRK8LZmR74RcgkJkWb8RifhtoJIQE0aUkCK5fwiIfaN3znqi5z7pE3QUA1GMl vgSFGfUgVTagWOgd/p2x/qMrStLoFdk4+ifKNUEWN0W4aUJ41Isj9shaTwr2ovBCtpYGbUGwkHxft IL53iVN9QgFQLu6Wo+oy4jYXE+Yxjb3fKN3HB/kwxL2GGr5pudq05hpVjwWpGQbzyKcWLfPyU5KRR jZx2lbmLngpispDKBoU10xc6cT7Vm9Azxx0Or8tAd4ctFrixA== Received: from [172.27.221.159] (account st018947@spbu.ru HELO localhost.localdomain) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 173293618; Wed, 21 Jul 2021 21:37:04 +0300 From: Ivan Gankevich To: guix-patches@gnu.org Subject: [PATCH] gnu: Add task-spooler. Date: Wed, 21 Jul 2021 21:35:05 +0300 Message-Id: <20210721183504.9388-1-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=195.70.197.23; envelope-from=i.gankevich@spbu.ru; helo=cgp2.pu.ru 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Ivan Gankevich X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * gnu/packages/task-runners.scm (task-spooler): New variable. --- gnu/packages/task-runners.scm | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/task-runners.scm b/gnu/packages/task-runners.scm index 49a07fa3bd..5b47076696 100644 --- a/gnu/packages/task-runners.scm +++ b/gnu/packages/task-runners.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Stefan Reichör +;;; Copyright © 2021 Ivan Gankevich ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,8 +20,12 @@ (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 (gnu packages compression) #:use-module (gnu packages golang) + #:use-module (gnu packages mail) + #:use-module (guix build-system gnu) #:use-module (guix build-system go)) (define-public run @@ -47,3 +52,56 @@ using a Runfile.") (home-page "https://github.com/TekWizely/run") (license license:expat))) + +(define-public task-spooler + (package + (name "task-spooler") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://vicerveza.homeunix.net/~viric/soft/ts/ts-" version ".tar.gz")) + (sha256 (base32 "0y32sm2i2jxs88c307h76449fynk75p9qfw1k11l5ixrn03z67pl")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (let ((c-flags "-g -O2")) + (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + "CC=gcc" + (string-append "CFLAGS=" c-flags) + (string-append "LDFLAGS=" c-flags))) + #:phases + (modify-phases %standard-phases + (delete 'configure) ;; no configuration script + (add-after 'unpack 'rename-and-patch-paths + (lambda _ + ;; 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\"" (which "gzip")))) + (substitute* "list.c" + (("/bin/sh\\b") (which "sh"))) + (substitute* "env.c" + (("execlp\\(\"/bin/sh\"") (format #f "execlp(\"~a\"" (which "sh")))) + (substitute* "mail.c" + (("execl\\(\"/usr/sbin/sendmail\"") + (format #f "execl(\"~a/usr/sbin/sendmail\"" + (assoc-ref %build-inputs "sendmail")))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "PATH" (string-join (list (getenv "PATH") (getcwd)) ":")) + (invoke "./testbench.sh"))))))) + (inputs + `(("gzip" ,gzip) + ("sendmail" ,sendmail))) + (synopsis "UNIX task queue system") + (description "Task spooler let users run shell commands asynchronously +one after the other in a separate process.") + (home-page "https://vicerveza.homeunix.net/~viric/soft/ts/") + (license license:gpl2+))) -- 2.32.0 ------------=_1628608861-30601-1--