unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Vivien Kraus <vivien@planete-kraus.eu>
Cc: 52009@debbugs.gnu.org
Subject: [bug#52009] [PATCH core-updates-frozen] openresolv: Wrap it.
Date: Mon, 22 Nov 2021 22:48:27 +0100	[thread overview]
Message-ID: <877dczn9p0.fsf@gnu.org> (raw)
In-Reply-To: <8735nq5sz2.fsf@planete-kraus.eu> (Vivien Kraus's message of "Sun, 21 Nov 2021 00:04:49 +0100")

Vivien Kraus <vivien@planete-kraus.eu> skribis:

> From 426c613e226b5c7e041d6a8476c09abfeffe151c Mon Sep 17 00:00:00 2001
> From: Vivien Kraus <vivien@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’.




  reply	other threads:[~2021-11-22 21:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-20 23:04 [bug#52009] [PATCH core-updates-frozen] openresolv: Wrap it Vivien Kraus via Guix-patches via
2021-11-22 21:48 ` Ludovic Courtès [this message]
2021-11-22 22:10   ` Vivien Kraus via Guix-patches via
2021-11-22 22:39     ` bug#52009: " Ludovic Courtès

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=877dczn9p0.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=52009@debbugs.gnu.org \
    --cc=vivien@planete-kraus.eu \
    /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).