emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57387: closed ([PATCH] gnu: Add restartd.)


From: GNU bug Tracking System
Subject: bug#57387: closed ([PATCH] gnu: Add restartd.)
Date: Sun, 18 Feb 2024 14:56:02 +0000

Your message dated Sun, 18 Feb 2024 15:54:51 +0100
with message-id <87h6i5n7pg.fsf@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@gnu.org.)


-- 
57387: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57387
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] gnu: Add restartd. Date: Wed, 24 Aug 2022 17:59:38 +0200
* 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@gmail.com>
 ;;; Copyright © 2022 Wamm K. D. <jaft.r@outlook.com>
 ;;; Copyright © 2022 Roman Riabenko <roman@riabenko.com>
+;;; Copyright © 2022 Nicolas Graves <ngraves@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



--- End Message ---
--- Begin Message --- Subject: Re: [bug#57387] [PATCH v3] gnu: Add restartd. Date: Sun, 18 Feb 2024 15:54:51 +0100 User-agent: Gnus/5.13 (Gnus v5.13)
Nicolas Graves <ngraves@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’.

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

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]