From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2CBGKnQWnGFEgwEAgWs5BA (envelope-from ) for ; Mon, 22 Nov 2021 23:15:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oKznJXQWnGG0awAA1q6Kng (envelope-from ) for ; Mon, 22 Nov 2021 22:15:16 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2C4993285F for ; Mon, 22 Nov 2021 23:15:16 +0100 (CET) Received: from localhost ([::1]:39998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpHak-0001RD-4p for larch@yhetil.org; Mon, 22 Nov 2021 17:15:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpHaZ-0001R4-7j for guix-patches@gnu.org; Mon, 22 Nov 2021 17:15:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpHaX-0002LI-PT for guix-patches@gnu.org; Mon, 22 Nov 2021 17:15:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mpHaX-0004JR-KT for guix-patches@gnu.org; Mon, 22 Nov 2021 17:15:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52009] [PATCH core-updates-frozen] openresolv: Wrap it. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 Nov 2021 22:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52009 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 52009@debbugs.gnu.org Received: via spool by 52009-submit@debbugs.gnu.org id=B52009.163761927016521 (code B ref 52009); Mon, 22 Nov 2021 22:15:01 +0000 Received: (at 52009) by debbugs.gnu.org; 22 Nov 2021 22:14:30 +0000 Received: from localhost ([127.0.0.1]:49319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpHa2-0004IM-10 for submit@debbugs.gnu.org; Mon, 22 Nov 2021 17:14:30 -0500 Received: from planete-kraus.eu ([89.234.140.182]:58980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpHa0-0004I9-4C for 52009@debbugs.gnu.org; Mon, 22 Nov 2021 17:14:28 -0500 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 0f69e755; Mon, 22 Nov 2021 22:13:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= references:from:to:cc:subject:date:in-reply-to:message-id :mime-version:content-type; s=dkim; bh=9fODO23jOS6Sh3cLno95AvRce Lc=; b=JXpyXglUc5JFvNIriXJCfjJ+eP5SEFFALiPA0vjxPOXbnALE9q1ia69zF Qd8KVJN+92Y3JjUL2EUjG3LSps4RRogdAqPWfV/Mxq1T+cX28yhDJCPcpt2Jg0jk nH6+9UdCq2O3f3NXV9wnJtj7nfi6s5PDtmbVW5eTrPESYMcBFA= Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 7aa05ff5 (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO); Mon, 22 Nov 2021 22:13:26 +0000 (UTC) References: <8735nq5sz2.fsf@planete-kraus.eu> <877dczn9p0.fsf@gnu.org> User-agent: mu4e 1.6.10; emacs 27.2 Date: Mon, 22 Nov 2021 23:10:46 +0100 In-reply-to: <877dczn9p0.fsf@gnu.org> Message-ID: <87zgpvkfeu.fsf@planete-kraus.eu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches From: Vivien Kraus via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637619316; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=DDu46DhlmBOOr4Os/2FSwOh16mjP0AeT7T7r+hYDtDg=; b=Fdbuz9p+4FAO4FtpKDs2cke3iWZdQ1Nddyxn7/sK32+dZydair/S5kiFgpvZuCWw98Cwov syKp+wtw8tsbccvOPuQ7VJgm8UwLKfFf7KPdixjRmBoGhrSUzsxv2G4W70KHVA2u6D31lq 0QF3Gg6nK9u/U05V3N+bhZ5ec/Eh0TiJVkwsRBfitHM4xwySMQHwFuiB8DS9nkVxrz2PTK /CAKGCTaH/04u8Eyws4Gr4iWpsGKx3wZ7RzaPBaMfRcrrkhkPtmh3EHxNadz3R2X3bAiBS Aq87EyiaCE39BafRnjdxjFrd3t1UZgB7jsB0uCQwxsEvmeZITTo9gktfvDMv0A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637619316; a=rsa-sha256; cv=none; b=ktRZRuGkagDfi0viWVbiz3BkoZfZMaZB/GCLg+geORYelQg8tZbugForTDNvPoInbqToPZ CvW6uaVihSKyR/XtN5uaYlGYnFqJ2JZ2VEMWQgFu5qpFLrrc2mnnPL3w7w+wUfuNIvDGqg Ub+qS2lpmUWleXf4ZDLXPxp0CdU79/UNKF7fc3YO7nqlETO+pLRiC9QRdAKa96ySSrmigx 1DmfRsWXS/kELDwhMq3nwL9AKYd8F0iwx9JKEjMDy0rY8fvV9bkJ5kiSJ9Cxnrr9sdDHnl Ay4o5PKPGdbCTWm44AYcnFOt0LmxHGQTfwVorWwcrGPovRvS2D9JQieC0W4SZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=dkim header.b=JXpyXglU; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.38 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=dkim header.b=JXpyXglU; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2C4993285F X-Spam-Score: -3.38 X-Migadu-Scanner: scn0.migadu.com X-TUID: MyhQfP8lNQdG --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Vivien Kraus 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" ":" =3D (,(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 =E2=80=98substitute*=E2=80=99 something like: > > PATH=3D/gnu/store/=E2=80=A6-coreutils/bin:$PATH > > somewhere at the top? Good idea. > (We could also use =E2=80=98coreutils-minimal=E2=80=99 here.) It contains the required binaries, so let=E2=80=99s go with it. Vivien --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-openresolv-Wrap-resolvconf.patch Content-Description: Warpping openresolv, with coreutils-minimal and shell code >From 8b26dda4284de0c3db8aa40c5d9ddd6130ded590 Mon Sep 17 00:00:00 2001 From: Vivien Kraus 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 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index b289aa999e..f025b2242b 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -1417,7 +1417,22 @@ (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-minimal"))) + (substitute* (string-append out "/sbin/resolvconf") + (("RESOLVCONF=\"\\$0\"") + (format #f "\ +RESOLVCONF=\"$0\" +PATH=~a/bin:$PATH" + coreutils))))))))) + (inputs + `(("bash-minimal" ,bash-minimal) + ("coreutils-minimal" ,coreutils-minimal))) (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 --=-=-=--