all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#57387] [PATCH] gnu: Add restartd.
@ 2022-08-24 15:59 Nicolas Graves via Guix-patches via
  2022-08-24 18:09 ` Maxime Devos
                   ` (6 more replies)
  0 siblings, 7 replies; 23+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2022-08-24 15:59 UTC (permalink / raw)
  To: 57387; +Cc: ngraves

* 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




^ permalink raw reply related	[flat|nested] 23+ messages in thread
[parent not found: <87edvu1hy9.fsf@ngraves.fr>]

end of thread, other threads:[~2024-02-18 14:55 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-24 15:59 [bug#57387] [PATCH] gnu: Add restartd Nicolas Graves via Guix-patches via
2022-08-24 18:09 ` Maxime Devos
2022-08-24 18:14   ` ( via Guix-patches via
2022-08-25  9:14 ` Nicolas Graves via Guix-patches via
2022-08-25  9:16 ` Nicolas Graves via Guix-patches via
2022-08-25 10:34   ` Maxime Devos
2022-08-25 11:33   ` Maxime Devos
2022-08-26  7:32 ` Nicolas Graves via Guix-patches via
2022-08-26 14:03   ` Maxime Devos
2022-08-26 16:57     ` Nicolas Graves via Guix-patches via
2022-08-26 19:07       ` Maxime Devos
2022-08-26 22:16 ` Nicolas Graves via Guix-patches via
2022-08-28 17:38   ` Maxime Devos
2022-09-11 14:53   ` Mathieu Othacehe
2022-09-11 18:13     ` Nicolas Graves via Guix-patches via
2022-09-12  7:36       ` Mathieu Othacehe
2022-09-13  8:45         ` Nicolas Graves via Guix-patches via
2022-09-14  7:48   ` Mathieu Othacehe
2024-02-03 14:07     ` Nicolas Graves via Guix-patches via
2024-02-03 13:36 ` [bug#57387] [PATCH v2] " Nicolas Graves via Guix-patches via
2024-02-03 14:06 ` [bug#57387] [PATCH v3] " Nicolas Graves via Guix-patches via
2024-02-18 14:54   ` bug#57387: " Ludovic Courtès
     [not found] <87edvu1hy9.fsf@ngraves.fr>
2022-09-29 13:14 ` [bug#57387] [PATCH] " Nicolas Graves via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.