diff mbox series

[bug#47923] gnu: Add daemonize.

Message ID 2832341618952534@mail.yandex.com
State Accepted
Headers show
Series [bug#47923] gnu: Add daemonize. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

WinterHound April 20, 2021, 9:07 p.m. UTC

Comments

Leo Famulari April 21, 2021, 1:05 a.m. UTC | #1
On Wed, Apr 21, 2021 at 02:37:02AM +0530, Winter Hound wrote:
> From f9e100cf01ea72544996b54b78a08502ca33a413 Mon Sep 17 00:00:00 2001
> From: WinterHound <winterhound@yandex.com>
> Date: Wed, 21 Apr 2021 02:17:13 +0530
> Subject: [PATCH] gnu: Add daemonize.

Thanks for the patch!

Don't forget to add yourself to the list of authors of
gnu/packages/admin.scm. There's an example in commit
3ddece896fddc38a29ab7e69f7c74f35e5a381fb, which was your patch adding
kirc:

https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3ddece896fddc38a29ab7e69f7c74f35e5a381fb

> +    (arguments
> +     `(#:tests? #f

I'm guessing this program doesn't have a test suite?

We prefer to document why #:tests? are #f. A code comment like "No test
suite" is sufficient.

> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'patch-makefile
> +           (lambda _
> +             (substitute* "Makefile.in"
> +               (("/sbin") "/bin")) #t)))))

Why change this output directory? We usually respect the upstream
decision about whether executable binaries go in 'sbin' or 'bin'. Guix
will add both directories to $PATH, so it will work either way.

Otherwise, looks good! Can you send a revised patch or answer those
questions?
Ricardo Wurmus April 22, 2021, 8:37 a.m. UTC | #2
Hi,

I squashed your two commits, edited the description, moved the 
home-page field up for consistency, remove an extra semicolon (we 
use only one semicolon for margin comments), and pushed the result 
as commit 296e230896babea785bb0f7cd34ab10645f146e8.

Thank you!
diff mbox series

Patch

From f9e100cf01ea72544996b54b78a08502ca33a413 Mon Sep 17 00:00:00 2001
From: WinterHound <winterhound@yandex.com>
Date: Wed, 21 Apr 2021 02:17:13 +0530
Subject: [PATCH] gnu: Add daemonize.

---
 gnu/packages/admin.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 57d509a184..f96f662562 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -469,6 +469,40 @@  services.")
     (license license:public-domain)
     (home-page "https://cr.yp.to/daemontools.html")))
 
+(define-public daemonize
+  (package
+    (name "daemonize")
+    (version "1.7.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/bmc/daemonize")
+             (commit (string-append "release-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0w4g0iyssyw7dd0061881z8s5czcl01mz6v00znax57zfxjqpvnm"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-makefile
+           (lambda _
+             (substitute* "Makefile.in"
+               (("/sbin") "/bin")) #t)))))
+    (synopsis "Command line utility to run a program as a Unix daemon")
+    (description
+     "daemonize runs a command as a Unix daemon.
+As defined in W.  Richard Stevens' 1990 book,
+Unix Network Programming (Addison-Wesley, 1990),
+a daemon is \"a process that executes 'in the background'
+(i.e., without an associated terminal or login shell)
+either waiting for some event to occur,
+or waiting to perform some specified task on a periodic basis.\"")
+    (home-page "http://software.clapper.org/daemonize/")
+    (license license:bsd-3)))
+
 (define-public dfc
   (package
    (name "dfc")
-- 
2.31.1