From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 24 12:01:00 2022 Received: (at submit) by debbugs.gnu.org; 24 Aug 2022 16:01:00 +0000 Received: from localhost ([127.0.0.1]:47737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQsoN-0001C2-Ib for submit@debbugs.gnu.org; Wed, 24 Aug 2022 12:01:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:34194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQsoK-0001Bt-7n for submit@debbugs.gnu.org; Wed, 24 Aug 2022 12:00:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsoF-00023N-Fv for guix-patches@gnu.org; Wed, 24 Aug 2022 12:00:56 -0400 Received: from 5.mo582.mail-out.ovh.net ([46.105.54.31]:46903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsoC-0003lf-Vl for guix-patches@gnu.org; Wed, 24 Aug 2022 12:00:51 -0400 Received: from player714.ha.ovh.net (unknown [10.110.115.223]) by mo582.mail-out.ovh.net (Postfix) with ESMTP id A7F3925339 for ; Wed, 24 Aug 2022 16:00:37 +0000 (UTC) Received: from ngraves.fr (met42-h01-213-44-161-47.dsl.sta.abo.bbox.fr [213.44.161.47]) (Authenticated sender: ngraves@ngraves.fr) by player714.ha.ovh.net (Postfix) with ESMTPSA id B43F92DC566D8; Wed, 24 Aug 2022 16:00:15 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-97G00249d7fd29-18ef-4f8b-aa6d-23b55671f8ba, C81D10A3153E3B48FB49E2C2A639964CC11D294F) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 213.44.161.47 From: Nicolas Graves To: guix-patches@gnu.org Subject: [PATCH] gnu: Add restartd. Date: Wed, 24 Aug 2022 17:59:38 +0200 Message-ID: <87czcp8wet.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 5414734127433114338 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrvdejuddgleekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkfggtgfgsehtqhertddttdejnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepjeejjeejhfdutdelheetvedthefgueelgfeuhfdttdejtdduueeukeejgeevleeunecuffhomhgrihhnpehgihhthhhusgdrtghomhdpghhithhhuhgsuhhsvghrtghonhhtvghnthdrtghomhdplhgruhhntghhphgrugdrnhgvthenucfkpheptddrtddrtddrtddpvddufedrgeegrdduiedurdegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhlrgihvghrjedugedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekvd Received-SPF: pass client-ip=46.105.54.31; envelope-from=ngraves@ngraves.fr; helo=5.mo582.mail-out.ovh.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: ngraves@ngraves.fr X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * 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 =C2=A9 2021 Artyom V. Poptsov ;;; Copyright =C2=A9 2022 Wamm K. D. ;;; Copyright =C2=A9 2022 Roman Riabenko +;;; Copyright =C2=A9 2022 Nicolas Graves ;;; ;;; 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+))) =20 +(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 \\?=3D gcc") "CC =3D gcc")))) + (delete 'configure) + (replace 'install + (lambda _ + (install-file "restartd.conf" (string-append #$output "/et= c")) + (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 an= d 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 ro= ot +user, but can use @code{sudo -u user} in the process called if needed.") + (license license:gpl2)))) + (define-public rex (package (name "rex") --=20 2.37.2 <#secure method=3Dpgpmime mode=3Dsign> --=20 Best regards, Nicolas Graves