GNU bug report logs - #49685
[PATCH] gnu: Add task-spooler.

Previous Next

Package: guix-patches;

Reported by: Ivan Gankevich <i.gankevich <at> spbu.ru>

Date: Wed, 21 Jul 2021 18:38:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#49685: closed ([PATCH] gnu: Add task-spooler.)
Date: Tue, 10 Aug 2021 15:21:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 10 Aug 2021 17:20:40 +0200
with message-id <87bl65qqbb.fsf_-_ <at> gnu.org>
and subject line Re: bug#49685: [PATCH] gnu: Add task-spooler.
has caused the debbugs.gnu.org bug report #49685,
regarding [PATCH] gnu: Add task-spooler.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
49685: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49685
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ivan Gankevich <i.gankevich <at> spbu.ru>
To: guix-patches <at> gnu.org
Cc: Ivan Gankevich <i.gankevich <at> spbu.ru>
Subject: [PATCH] gnu: Add task-spooler.
Date: Wed, 21 Jul 2021 21:35:05 +0300
* 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 <stefan <at> xsteve.at>
+;;; Copyright © 2021 Ivan Gankevich <i.gankevich <at> spbu.ru>
 ;;;
 ;;; 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



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Ivan Gankevich <i.gankevich <at> spbu.ru>
Cc: 49685-done <at> debbugs.gnu.org
Subject: Re: bug#49685: [PATCH] gnu: Add task-spooler.
Date: Tue, 10 Aug 2021 17:20:40 +0200
Hi,

Ivan Gankevich <i.gankevich <at> spbu.ru> 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’s a much welcome change!  Applied.

> * gnu/packages/task-runners.scm (task-spooler): New variable.

Applied as well.

Thank you!

Ludo’.


This bug report was last modified 3 years and 345 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.