unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 57387@debbugs.gnu.org
Cc: ngraves@ngraves.fr
Subject: [bug#57387] [PATCH] gnu: Add restartd.
Date: Wed, 24 Aug 2022 17:59:38 +0200	[thread overview]
Message-ID: <87czcp8wet.fsf@ngraves.fr> (raw)

* 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




             reply	other threads:[~2022-08-24 16:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 15:59 Nicolas Graves via Guix-patches via [this message]
2022-08-24 18:09 ` [bug#57387] [PATCH] gnu: Add restartd 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czcp8wet.fsf@ngraves.fr \
    --to=guix-patches@gnu.org \
    --cc=57387@debbugs.gnu.org \
    --cc=ngraves@ngraves.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).