GNU bug report logs - #57387
[PATCH] gnu: Add restartd.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Wed, 24 Aug 2022 16:01:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxime Devos <maximedevos <at> telenet.be>
To: Nicolas Graves <ngraves <at> ngraves.fr>, 57387 <at> debbugs.gnu.org
Subject: [bug#57387] [PATCH] gnu: Add restartd.
Date: Fri, 26 Aug 2022 16:03:41 +0200
[Message part 1 (text/plain, inline)]
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 <at> xiaomi.com>, Maxime Devos <maximedevos <at> 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.


[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

This bug report was last modified 1 year and 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.