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.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Vivien Kraus <vivien <at> planete-kraus.eu>
Cc: 52009 <at> debbugs.gnu.org
Subject: [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’.




This bug report was last modified 3 years and 218 days ago.

Previous Next


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