Message ID | 8735nq5sz2.fsf@planete-kraus.eu |
---|---|
State | Accepted |
Headers | show |
Series | [bug#52009,core-updates-frozen] openresolv: Wrap it. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
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’.
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. --- gnu/packages/dns.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index b289aa999e..55c6c0d82d 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -1417,7 +1417,18 @@ (define-public openresolv #:configure-flags (list (string-append "--sysconfdir=/etc")) #:make-flags - (list (string-append "SYSCONFDIR=/" (assoc-ref %outputs "out") "/etc")))) + (list (string-append "SYSCONFDIR=/" (assoc-ref %outputs "out") "/etc")) + #:phases + (modify-phases %standard-phases + (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))) (home-page "https://roy.marples.name/projects/openresolv/") (synopsis "Resolvconf POSIX compliant implementation, a middleman for resolv.conf") (description "openresolv is an implementation of @command{resolvconf}, the -- 2.34.0