From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0P7ZEDhNBmO4vQAAbAwnHQ (envelope-from ) for ; Wed, 24 Aug 2022 18:09:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4NACEDhNBmMTaAEAG6o9tA (envelope-from ) for ; Wed, 24 Aug 2022 18:09:28 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E8B6D24159 for ; Wed, 24 Aug 2022 18:09:27 +0200 (CEST) Received: from localhost ([::1]:33438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQswY-0000ul-Fj for larch@yhetil.org; Wed, 24 Aug 2022 12:09:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQsoS-0002Bo-PN for guix-patches@gnu.org; Wed, 24 Aug 2022 12:01:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQsoQ-0003nD-OS for guix-patches@gnu.org; Wed, 24 Aug 2022 12:01:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQsoQ-0001CR-5X for guix-patches@gnu.org; Wed, 24 Aug 2022 12:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57387] [PATCH] gnu: Add restartd. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 24 Aug 2022 16:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57387 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57387@debbugs.gnu.org Cc: ngraves@ngraves.fr X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16613568604594 (code B ref -1); Wed, 24 Aug 2022 16:01:02 +0000 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) X-OVh-ClientIp: 213.44.161.47 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661357368; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=nmLVJHZLraddkeLmrZTL2j6egjWU50b+djrUEe34VlM=; b=FPEocRsn5lk2O97fyI/InWO+Z2zYht0eE9TMwPKejEvo1yaqohsMznxja4pdsUuC1FMHb1 vbBVYsCX0LZ8l1sMn9qUGDiuln/rNqPdqGjH8Aq5EuRNfgeU1zgm7IhQQas3VmbqQdidkB dVDQ5VAp9DMd6JEhVLYwwJAqPvwknn2Jo7E95/bRFL8Wuzi9nY5jVWpLzft/L0EzMvUoMc E9rgZsefp9ZDkM4k2YBvi9Pea1kxAFmVzZVGIyuIPZU/opOtjcFmCqOON7UJIcR4cU27+L KJrVcc9y/HrM3/3n3qa3I57KC5AcDyqVnFZP1FxsoOIhwkD+3HZZJNcwiuhOpw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661357368; a=rsa-sha256; cv=none; b=hB1gwNk13WH2hsrKbL8VWeV47BGCo3LiQqxMNowLH2hOWVrL5bZs26fLU5vUFsJn4zxGpz 802jVSKXy/tWXWDtzf3VkLMkQ4JBMyc/UbKNmlKQkd9AXaFuD71oMWVo9vKvcDDLBGL1tJ v8GuLqyrJLF3PSza0A82eIZpYGT9msydIvySNjfppdR8GabcAvEO2LwXdPA01C8zjxtns1 yh6e39kjjSLK/rFMg9A17Z3CVD1ukqUiZdzOouYFdhg+7WcPp61KRmbQW58ZActp32MUo8 C7ZjDEMU9Z82t0K+oU18nIRR9KBXziERz9BpwVphMOdr4AAjM2j6uWsXkDYBOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.81 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E8B6D24159 X-Spam-Score: -3.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7gXC1M2O3suG * 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