unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Nicolas Graves <ngraves@ngraves.fr>, 57387@debbugs.gnu.org
Subject: [bug#57387] [PATCH] gnu: Add restartd.
Date: Fri, 26 Aug 2022 16:03:41 +0200	[thread overview]
Message-ID: <48ad6a74-1b21-acf8-7f63-6ec86927e47a@telenet.be> (raw)
In-Reply-To: <87r1134g0f.fsf@ngraves.fr>


[-- Attachment #1.1.1: Type: text/plain, Size: 2252 bytes --]

On 26-08-2022 09:32, Nicolas Graves via Guix-patches via wrote:

> [...]
> +         (patches
> +          (search-patches
> +           "restartd-fix-compilation.patch"
> +           "restartd-add-error-handling-for-robustness.patch"))))
> [...]
>   (define-public rex
>     (package
>       (name "rex")
> diff --git a/gnu/packages/patches/restartd-add-error-handling-for-robustness.patch b/gnu/packages/patches/restartd-add-error-handling-for-robustness.patch
> new file mode 100644
> index 0000000000..f0abcf1dac
> --- /dev/null
> +++ b/gnu/packages/patches/restartd-add-error-handling-for-robustness.patch
> @@ -0,0 +1,232 @@
> +From ec606eb15091ff8ffa672500413128c29814f8ad Mon Sep 17 00:00:00 2001
> +From: Yin Kangkai <yinkangkai@xiaomi.com>, Maxime Devos <maximedevos@telenet.be>
A bit of a nitpick, but Yin Kagkai was not involved in this patch, I 
wrote it myself ...
> +Date: Thu, 25 Aug 2022 14:29:25 +0200
> +Subject: [PATCH] Add some error handling for robustness.
> +
> +This makes the code a little more robust. What if /var/run does not
> +exist, or we do not have permission to open
> +/var/run/restartd.pid (EPERM?) due to SELinux misconfiguration?
> +This patch also avoids segmentation fault when run from non-root user.
> +---
> +[..]
> +            for(i=0; i<config_process_number; i++) {
> +                if (strlen(config_process[i].processes) > 0) {
> +                    if (strlen(config_process[i].running) > 0) {
> +                        strcpy(config_process[i].status, "running");
> +-                       syslog(LOG_INFO, "%s is running, executing '%s'",
> ++                       /* syslog(LOG_INFO, "%s is running, executing '%s'",
> +                               config_process[i].name,
> +-                              config_process[i].running);
> ++                              config_process[i].running); */

... the commenting syslog thing was an unrelated patch, maybe various 
commits were squashed?

When I tried out the patch, I added a local copy of 
https://patch-diff.githubusercontent.com/raw/ajraymond/restartd/pull/8.patch 
to the list of patches and "guix build" succeeded, there was no need to 
squash things.

Greetings,
Maaxime.



[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2022-08-26 14:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=48ad6a74-1b21-acf8-7f63-6ec86927e47a@telenet.be \
    --to=maximedevos@telenet.be \
    --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).