gnu: Add daemonize.

  • Done
  • quality assurance status badge
Details
3 participants
  • Leo Famulari
  • Ricardo Wurmus
  • Winter Hound
Owner
unassigned
Submitted by
Winter Hound
Severity
normal
W
W
Winter Hound wrote on 20 Apr 2021 23:07
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
2832341618952534@mail.yandex.com
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(+)

Toggle diff (47 lines)
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
L
L
Leo Famulari wrote on 21 Apr 2021 03:05
(name . Winter Hound)(address . winterhound@yandex.com)(address . 47923@debbugs.gnu.org)
YH96XJickL+GYT2s@jasmine.lan
On Wed, Apr 21, 2021 at 02:37:02AM +0530, Winter Hound wrote:
Toggle quote (5 lines)
> 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:


Toggle quote (3 lines)
> + (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.

Toggle quote (7 lines)
> + #: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?
W
W
Winter Hound wrote on 21 Apr 2021 07:17
(name . Leo Famulari)(address . leo@famulari.name)(name . 47923@debbugs.gnu.org)(address . 47923@debbugs.gnu.org)
2739041618982045@mail.yandex.com
Attachment: file
W
W
Winter Hound wrote on 21 Apr 2021 07:18
(name . Leo Famulari)(address . leo@famulari.name)(name . 47923@debbugs.gnu.org)(address . 47923@debbugs.gnu.org)
1076831618982265@mail.yandex.com
Attachment: file
W
W
Winter Hound wrote on 21 Apr 2021 08:21
gnu: Add daemonize.
(name . 47923@debbugs.gnu.org)(address . 47923@debbugs.gnu.org)
546401618986027@mail.yandex.com
From efa01c6dd1ba1f29189608feab0c6ae20ef806ec Mon Sep 17 00:00:00 2001
From: WinterHound <winterhound@yandex.com>
Date: Wed, 21 Apr 2021 11:41:20 +0530
Subject: [PATCH] gnu: Add daemonize.

---
gnu/packages/admin.scm | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index f96f662562..809a6978ca 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -40,6 +40,7 @@
;;; Copyright © 2021 qblade <qblade@protonmail.com>
;;; Copyright © 2021 Hyunseok Kim <lasnesne@lagunposprasihopre.org>
;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
+;;; Copyright © 2021 WinterHound <winterhound@yandex.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -484,13 +485,7 @@ services.")
(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)))))
+ `(#:tests? #f)) ;; No tests available.
(synopsis "Command line utility to run a program as a Unix daemon")
(description
"daemonize runs a command as a Unix daemon.
--
2.31.1
R
R
Ricardo Wurmus wrote on 22 Apr 2021 10:37
877dkusojj.fsf@elephly.net
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!

--
Ricardo
Closed
?