GNU bug report logs -
#57387
[PATCH] gnu: Add restartd.
Previous Next
Reported by: Nicolas Graves <ngraves <at> ngraves.fr>
Date: Wed, 24 Aug 2022 16:01: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
[Message part 1 (text/plain, inline)]
Your message dated Sun, 18 Feb 2024 15:54:51 +0100
with message-id <87h6i5n7pg.fsf <at> gnu.org>
and subject line Re: [bug#57387] [PATCH v3] gnu: Add restartd.
has caused the debbugs.gnu.org bug report #57387,
regarding [PATCH] gnu: Add restartd.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
57387: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57387
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* gnu/packages/admin.scm (restartd): New variable.
---
gnu/packages/admin.scm | 67 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index a4c5189222..17a400bdf6 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -51,6 +51,7 @@
;;; Copyright © 2021 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
;;; Copyright © 2022 Wamm K. D. <jaft.r <at> outlook.com>
;;; Copyright © 2022 Roman Riabenko <roman <at> riabenko.com>
+;;; Copyright © 2022 Nicolas Graves <ngraves <at> ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -5455,6 +5456,72 @@ (define-public fail2ban
mechanisms if you really want to protect services.")
(license license:gpl2+)))
+(define-public restartd
+ (let* ((commit "7044125ac55056f2663536f7137170edf92ebd75")
+ (revision "1.1"))
+ (package
+ (name "restartd")
+ (version (git-version "0.2.3" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ajraymond/restartd")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1m1np00b4zvvwx63gzysbi38i5vj1jsjvh2s0p9czl6dzyz582z0"))
+ (patches
+ (list
+ ;; Fix segfault when run as normal user
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://patch-diff.githubusercontent.com/raw"
+ "/ajraymond/restartd/pull/6.patch"))
+ (sha256
+ (base32
+ "1cqhy6fngvql9ynacrf4f2nc7mzypvdbab5nil96qlclfvb3far8")))
+ ;; Fix compilation with gcc-10+
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://patch-diff.githubusercontent.com/raw"
+ "/ajraymond/restartd/pull/7.patch"))
+ (sha256
+ (base32
+ "0fk33af8sgrgxibmkyjlv3j8jikgbp4mkj84yamvhv38ic6x2rw6")))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:tests? #f ; no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'ensure-compilation
+ (lambda _
+ (substitute* "Makefile"
+ (("CC \\?= gcc") "CC = gcc"))))
+ (delete 'configure)
+ (replace 'install
+ (lambda _
+ (install-file "restartd.conf" (string-append #$output "/etc"))
+ (install-file "restartd" (string-append #$output "/sbin"))
+ (install-file "restartd.8"
+ (string-append #$output "/share/man/man8"))
+ (mkdir-p (string-append #$output "/share/man/fr/man8"))
+ (copy-file
+ "restartd.fr.8"
+ (string-append #$output "/share/man/fr/man8/restartd.8")))))))
+ (home-page "https://launchpad.net/debian/+source/restartd")
+ (synopsis "Daemon for restarting processes")
+ (description "This package provides a daemon for checking running and not
+running processes. It reads the /proc directory every n seconds and does a
+POSIX regexp on the process names. You can execute a script or a program if
+the process is or is not running. The daemon can only be called by the root
+user, but can use @code{sudo -u user} in the process called if needed.")
+ (license license:gpl2))))
+
(define-public rex
(package
(name "rex")
--
2.37.2
<#secure method=pgpmime mode=sign>
--
Best regards,
Nicolas Graves
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Nicolas Graves <ngraves <at> ngraves.fr> skribis:
> * gnu/packages/admin.scm (restartd): New variable.
> * gnu/packages/patches/restartd-update-robust.patch: Add file.
> * gnu/local.mk: Register gnu/packages/patches/restartd-update-robust.patch.
>
> Change-Id: I38b9b70e97b64f006a86d7618a75f1ec3ed8b034
Applied with the changes below, thanks!
Ludo’.
[Message part 5 (text/x-patch, inline)]
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 9f51427297..47c82e9678 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -5886,12 +5886,13 @@ (define-public restartd
(string-append #$output "/share/man/fr/man8/restartd.8")))))))
(home-page "https://launchpad.net/debian/+source/restartd")
(synopsis "Daemon for restarting processes")
- (description "This package provides a daemon for checking running and not
-running processes. It reads the /proc directory every n seconds and does a
-POSIX regexp on the process names. The daemon runs an user-provided script
-when it detects a program in the running processes, or an alternate script if
-it doesn't detect the program. The daemon can only be called by the root
-user, but can use @code{sudo -u user} in the process called if needed.")
+ (description "This package provides a daemon for checking running and
+not running processes. It reads the @file{/proc} directory every @var{n}
+seconds and does a POSIX regexp on the process names. The daemon runs a
+user-provided script when it detects a program in the running processes, or an
+alternate script if it doesn't detect the program. The daemon can only be
+called by the root user, but can use @command{sudo -u user} in the process
+called if needed.")
(license license:gpl2+))))
(define-public rex
This bug report was last modified 1 year and 149 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.