GNU bug report logs - #52009
[PATCH core-updates-frozen] openresolv: Wrap it.

Previous Next

Package: guix-patches;

Reported by: Vivien Kraus <vivien <at> planete-kraus.eu>

Date: Sat, 20 Nov 2021 23:06:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52009 in the body.
You can then email your comments to 52009 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#52009; Package guix-patches. (Sat, 20 Nov 2021 23:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vivien Kraus <vivien <at> planete-kraus.eu>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 20 Nov 2021 23:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vivien Kraus <vivien <at> planete-kraus.eu>
To: guix-patches <at> gnu.org
Subject: [PATCH core-updates-frozen] openresolv: Wrap it.
Date: Sun, 21 Nov 2021 00:04:49 +0100
[Message part 1 (text/plain, inline)]
Dear guix,

When I boot my system on core-updates-frozen, I get an error message:

/gnu/store/xxx-openresolv-3.12.0/sbin/resolvconf: line 824: mkdir: command not found
Failed to create needed directory /var/run/resolvconf

I didn’t experience any DNS issue, but my network is simple on that
machine. In any case, I think it would do no harm to wrap resolvconf to
set its path to the coreutils so that it can find mkdir and rm. I didn’t
find resolvconf to invoke any other program.

What do you think?

Best regards,

Vivien

[0001-gnu-openresolv-Wrap-resolvconf.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#52009; Package guix-patches. (Mon, 22 Nov 2021 21:49:01 GMT) Full text and rfc822 format available.

Message #8 received at 52009 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Vivien Kraus <vivien <at> planete-kraus.eu>
Cc: 52009 <at> debbugs.gnu.org
Subject: Re: bug#52009: [PATCH core-updates-frozen] openresolv: Wrap it.
Date: Mon, 22 Nov 2021 22:48:27 +0100
Vivien Kraus <vivien <at> planete-kraus.eu> skribis:

> From 426c613e226b5c7e041d6a8476c09abfeffe151c Mon Sep 17 00:00:00 2001
> From: Vivien Kraus <vivien <at> planete-kraus.eu>
> Date: Sat, 20 Nov 2021 23:48:17 +0100
> Subject: [PATCH] gnu: openresolv: Wrap resolvconf.
>
> * gnu/packages/dns.scm (openresolv) [phases]: Wrap resolvconf to set PATH, for
> coreutils programs mkdir and rm.
> * gnu/packages/dns.scm (openresolv) [inputs]: Add coreutils, and bash-minimal
> to run the wrapper and the wrapped script.

[...]

> +         (add-after 'install 'wrap-program
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out"))
> +                   (coreutils (assoc-ref inputs "coreutils")))
> +               (wrap-program (string-append out "/sbin/resolvconf")
> +                 `("PATH" ":" = (,(string-append coreutils "/bin"))))))))))
> +    (inputs
> +     `(("bash-minimal" ,bash-minimal)
> +       ("coreutils" ,coreutils)))

Since /sbin/resolvconf is a shell script, how about, instead of wrapping
it, inserting with ‘substitute*’ something like:

  PATH=/gnu/store/…-coreutils/bin:$PATH

somewhere at the top?

That would be more lightweight.

(We could also use ‘coreutils-minimal’ here.)

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#52009; Package guix-patches. (Mon, 22 Nov 2021 22:15:01 GMT) Full text and rfc822 format available.

Message #11 received at 52009 <at> debbugs.gnu.org (full text, mbox):

From: Vivien Kraus <vivien <at> planete-kraus.eu>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 52009 <at> debbugs.gnu.org
Subject: Re: bug#52009: [PATCH core-updates-frozen] openresolv: Wrap it.
Date: Mon, 22 Nov 2021 23:10:46 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
> Vivien Kraus <vivien <at> planete-kraus.eu> skribis:
>> +         (add-after 'install 'wrap-program
>> +           (lambda* (#:key inputs outputs #:allow-other-keys)
>> +             (let ((out (assoc-ref outputs "out"))
>> +                   (coreutils (assoc-ref inputs "coreutils")))
>> +               (wrap-program (string-append out "/sbin/resolvconf")
>> +                 `("PATH" ":" = (,(string-append coreutils "/bin"))))))))))
>> +    (inputs
>> +     `(("bash-minimal" ,bash-minimal)
>> +       ("coreutils" ,coreutils)))
>
> Since /sbin/resolvconf is a shell script, how about, instead of wrapping
> it, inserting with ‘substitute*’ something like:
>
>   PATH=/gnu/store/…-coreutils/bin:$PATH
>
> somewhere at the top?

Good idea.

> (We could also use ‘coreutils-minimal’ here.)

It contains the required binaries, so let’s go with it.

Vivien

[0001-gnu-openresolv-Wrap-resolvconf.patch (text/x-patch, attachment)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 22 Nov 2021 22:40:01 GMT) Full text and rfc822 format available.

Notification sent to Vivien Kraus <vivien <at> planete-kraus.eu>:
bug acknowledged by developer. (Mon, 22 Nov 2021 22:40:01 GMT) Full text and rfc822 format available.

Message #16 received at 52009-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Vivien Kraus <vivien <at> planete-kraus.eu>
Cc: 52009-done <at> debbugs.gnu.org
Subject: Re: bug#52009: [PATCH core-updates-frozen] openresolv: Wrap it.
Date: Mon, 22 Nov 2021 23:39:25 +0100
Vivien Kraus <vivien <at> planete-kraus.eu> skribis:

>>From 8b26dda4284de0c3db8aa40c5d9ddd6130ded590 Mon Sep 17 00:00:00 2001
> From: Vivien Kraus <vivien <at> planete-kraus.eu>
> Date: Sat, 20 Nov 2021 23:48:17 +0100
> Subject: [PATCH] gnu: openresolv: Wrap resolvconf.
>
> * gnu/packages/dns.scm (openresolv) [phases]: Wrap resolvconf to set PATH, for
> coreutils programs mkdir and rm.
> * gnu/packages/dns.scm (openresolv) [inputs]: Add coreutils, and bash-minimal
> to run the wrapper and the wrapped script.

That was fast!  Applied without “bash-minimal” (it’s no longer needed.)

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 21 Dec 2021 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 88 days ago.

Previous Next


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