From unknown Fri Jun 13 11:29:58 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48277] [PATCH 0/1] New wrap-in-search-paths function Resent-From: Edouard Klein Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 May 2021 15:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48277 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48277@debbugs.gnu.org Cc: Edouard Klein X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162040217631300 (code B ref -1); Fri, 07 May 2021 15:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 May 2021 15:42:56 +0000 Received: from localhost ([127.0.0.1]:44595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lf2cy-00088m-4E for submit@debbugs.gnu.org; Fri, 07 May 2021 11:42:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:50770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lf2cw-00088g-SV for submit@debbugs.gnu.org; Fri, 07 May 2021 11:42:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lf2cw-0000ig-LO for guix-patches@gnu.org; Fri, 07 May 2021 11:42:54 -0400 Received: from sender4-op-o11.zoho.com ([136.143.188.11]:17159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lf2cu-00042q-Di for guix-patches@gnu.org; Fri, 07 May 2021 11:42:54 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1620402166; cv=none; d=zohomail.com; s=zohoarc; b=GoxsFITMtI9ZUdxOdoJvMXvN9KNUOpmZtEYgufulJzmw5s/8wo6dfNbfMkpJgAeWt56kHO7tJezmRGBfAxxaiFHjiuFtrmOCUcVj3FhLCA3U1Y8rO1bpwqD88Q/YxQXSycBqjLOlWA0EANUnb918GOtAG7DFcZJtKJMNnyAmwAk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620402166; h=Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=Ft04r6IviiHYiBxfX9DVAkJOPTB+d2ySb0JC4iXAKdU=; b=gbkY+zhen1CH0JFaJSWiTyH36+Ukfv5SmFCdF3su+81eZkBIhP/CDyrZCEsFBTlxmAdZUQ1VqSLy/G03PnMJxIVtVs3KbfcxilHbjqmvYWzhkv55UZ/NFTUNYPNqqG/C4RcqF5Nuen6CaKBLtN5hj3uaagJVGb82YUFdwc8aBHU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=beaver-labs.com; spf=pass smtp.mailfrom=edk@beaver-labs.com; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1620402166; s=zoho; d=beaver-labs.com; i=edk@beaver-labs.com; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Transfer-Encoding; bh=Ft04r6IviiHYiBxfX9DVAkJOPTB+d2ySb0JC4iXAKdU=; b=FUOFhncXrcBQ2RmD/BeJPQ28GudXpnIMXcKPGS6AO6WZjvaK+WSaSGV66MYq3PIb gcQoWrZsrlBqLGWCorVZGcczv9EQzb0wVL1ibSD38fraNPd1shmQrT5b6Qht0p1caKq 87MGm96DNGDm9invJiW/ArXGeodEMmN4rPryPVW4= Received: from Rasoir.home (lfbn-idf3-1-808-29.w90-3.abo.wanadoo.fr [90.3.133.29]) by mx.zohomail.com with SMTPS id 1620402162999986.6860700940545; Fri, 7 May 2021 08:42:42 -0700 (PDT) From: Edouard Klein Date: Fri, 7 May 2021 17:42:08 +0200 Message-Id: <20210507154208.123628-1-edk@beaver-labs.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.11; envelope-from=edk@beaver-labs.com; helo=sender4-op-o11.zoho.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) This patch adds the wrap-in-search-paths function. This function takes an executable and a list of packages as arguments, and wrap the executable in the search-paths needed by the list of packages. Two use-cases have pushed me to create this function, but I suspect it may be useful in other cases. First, when running on a foreign distro, guix packages (especially python packages) can break the foreign distribution by putting Guix's python interpreter before the host's in the PATH. Scripts that rely on a #!/usr/bin/env python shebang then breaks. This for example breaks gdm on the latest Ubuntu when you install any package for which python is a propagated input. This new function solves this problem by allowing one to write a G-exp that wraps the needed execs in the search paths for their packages, without putting them in the default profile, therefore avoiding masking the host's command. A second use case is when defining operating-system-services, the system profile is not available to the environment where the command is launched, so if this command has any dynamically loaded part (as most executable today do), they won't be found despite being installed and present in the system profile. This new function solves the problem by allowing one to wrap the service executable with an activation-service, to that the sheperd-service can launch it wihtout having to source the system profile. See this thread on help-guix to see an example of the problem: https://lists.gnu.org/archive/html/help-guix/2021-04/msg00100.html Here is an example that can be built with guix build -f and demonstrate the use of the function. The (quite useless) resulting script will output the current version of flask, despite the flask binary not being in the current profile's PATH: (use-modules (gnu packages python-web) (gnu packages bash) (guix gexp) (guix modules) (guix search-paths) (gnu packages guile) (gnu packages gnupg)) (with-extensions (list guile-zlib guile-gcrypt) (with-imported-modules (source-module-closure '((guix build utils) (guix search-paths) )) #~(begin (use-modules (guix build utils) (guix search-paths)) (mkdir-p (string-append #$output "/bin/")) (with-output-to-file (string-append #$output "/bin/flask-version") (lambda _ (display (string-append "#!" #$bash "/bin/bash\n")) (display "flask --version\n"))) (chmod (string-append #$output "/bin/flask-version") #o755) (set-path-environment-variable "PATH" '("bin") (list #$bash)) #$(wrap-in-search-paths #~(string-append #$output "/bin/flask-version") (list python-flask))))) Edouard Klein (1): guix: search-paths: Add wrap-in-search-paths guix/search-paths.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) -- 2.31.1 From unknown Fri Jun 13 11:29:58 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48277] [PATCH 1/1] guix: search-paths: Add wrap-in-search-paths References: <20210507154208.123628-1-edk@beaver-labs.com> In-Reply-To: <20210507154208.123628-1-edk@beaver-labs.com> Resent-From: Edouard Klein Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 May 2021 15:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48277 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48277@debbugs.gnu.org Cc: edk@beaver-labs.com Received: via spool by 48277-submit@debbugs.gnu.org id=B48277.162040239231496 (code B ref 48277); Fri, 07 May 2021 15:47:02 +0000 Received: (at 48277) by debbugs.gnu.org; 7 May 2021 15:46:32 +0000 Received: from localhost ([127.0.0.1]:44613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lf2gR-0008Bw-NG for submit@debbugs.gnu.org; Fri, 07 May 2021 11:46:31 -0400 Received: from sender4-op-o11.zoho.com ([136.143.188.11]:17127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lf2gP-0008Bq-T8 for 48277@debbugs.gnu.org; Fri, 07 May 2021 11:46:30 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1620402387; cv=none; d=zohomail.com; s=zohoarc; b=YKDSQ6bjZ8FOAI7KKIoxvuvJVg84gdQZ5E4kDnhZ95njv8K2lZjVkU7bKjMn8NeC7lAFBpyp5pKqfN2a9lcQ90y7GcvBuF6eeuYc4eXqtBX5r6L9bxkFK467GIvqFCp5Yb0bmwpPM1X10dFz6Alfq60qbliw8aMZOdznDytzpEs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620402387; h=Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=ICtQ51TRk4yfPn3oMuR0U9FsL3PtXzoYjxjK4T3THa0=; b=H6uOy89vfPN/NN4+qldOlGkTa6gG1LIIiHNuX0rGdsw5nEn3mHGKilqEcmR1/5s3dySyKauuDC2hD8REQiYDIqdR0sKnPSIcpLR8m7Pgw+/eqHsIyxdN+iGAqaks/RwKkb83A5OkxuyP3Lg2Gut5K57e+9Mgd/8Tw/45pxxdCps= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=beaver-labs.com; spf=pass smtp.mailfrom=edk@beaver-labs.com; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1620402387; s=zoho; d=beaver-labs.com; i=edk@beaver-labs.com; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Transfer-Encoding; bh=ICtQ51TRk4yfPn3oMuR0U9FsL3PtXzoYjxjK4T3THa0=; b=KrxHQqgtSPupgPUff4L2AsHACFnJ0NCKmaaNAw7eFU0aVKb/+Kc0wA1rp/3+BaMk 0puB66fxcViQmTMyjTRSFoQdNQj3XkxQzZOCSBiWafc0bCKGrYz/fz80II6ToR4VWkQ S1RjsgA/vvs7SZemPIfdf0b7aSmFcnXzLnH33m1w= Received: from Rasoir.home (lfbn-idf3-1-808-29.w90-3.abo.wanadoo.fr [90.3.133.29]) by mx.zohomail.com with SMTPS id 1620402381114373.7891932316927; Fri, 7 May 2021 08:46:21 -0700 (PDT) From: Edouard Klein Date: Fri, 7 May 2021 17:45:05 +0200 Message-Id: <20210507154503.124177-1-edk@beaver-labs.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) From: edk@beaver-labs.com --- guix/search-paths.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/guix/search-paths.scm b/guix/search-paths.scm index 002e6342bb..34a632077c 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -18,6 +18,8 @@ (define-module (guix search-paths) #:use-module (guix records) + #:use-module (guix profiles) + #:use-module (guix gexp) #:use-module (guix build utils) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) @@ -35,6 +37,8 @@ search-path-specification->sexp sexp->search-path-specification + esps->wrap-sexp + wrap-in-search-paths string-tokenize* evaluate-search-paths environment-variable-definition @@ -96,6 +100,37 @@ a object." (with-error-to-port (%make-void-port "w") (lambda () exp))) +(define (esps->wrap-sexp esps) + "Return a list '(VARIABLE POSITION (STRING)) as expected by wrap-program, converted from the evaluated search-path-specification ESPS. + + An evaluated search-path-specification is the type of things returned in a list by evaluate-search-paths: (sps . string) couples. + + We do abuse wrap-program a bit, because it expects a list of directories, and the string we return is already a concatenation of the relevant directories. There would be no point in splitting it again and then having wrap-program joining it again, so we just pass it as is." + (match esps + ((sps . str) `(,(search-path-specification-variable sps) = (,str))))) + +(define (wrap-in-search-paths exec packages) + "Wrap EXEC in a script that will set the search paths to the values needed by the list of package PACKAGES." + (define (reconstruct-sps sps) + "Return a G-exp that evaluates, on the build strata, to the search-path-specification SPS." + #~(search-path-specification + (variable #$(search-path-specification-variable sps)) + (files (list #$@(search-path-specification-files sps))) + (separator #$(search-path-specification-separator sps)) + (file-type (quote #$(search-path-specification-file-type sps))) + (file-pattern #$(search-path-specification-file-pattern sps)))) + + (define (reconstruct-sps-list spsl) + "Return a G-exp that evaluates, on the build strata, to the list of search-path-specifications SPSL." + #~(list #$@(map reconstruct-sps spsl))) + + (let ((manifest (packages->manifest packages))) + #~(apply wrap-program #$exec + (map esps->wrap-sexp + (evaluate-search-paths + #$(reconstruct-sps-list (manifest-search-paths manifest)) + (list #$@(map manifest-entry-item (manifest-transitive-entries manifest)))))))) + ;; XXX: This procedure used to be in (guix utils) but since we want to be able ;; to use (guix search-paths) on the build side, we want to avoid the ;; dependency on (guix utils), and so this procedure is back here for now. -- 2.31.1 From unknown Fri Jun 13 11:29:58 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48277] [PATCH 0/1] New wrap-in-search-paths function Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 May 2021 18:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48277 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Edouard Klein , 48277@debbugs.gnu.org Received: via spool by 48277-submit@debbugs.gnu.org id=B48277.162058413828520 (code B ref 48277); Sun, 09 May 2021 18:16:01 +0000 Received: (at 48277) by debbugs.gnu.org; 9 May 2021 18:15:38 +0000 Received: from localhost ([127.0.0.1]:56588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lfnxq-0007Pv-2E for submit@debbugs.gnu.org; Sun, 09 May 2021 14:15:38 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:60602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lfnxo-0007Pk-69 for 48277@debbugs.gnu.org; Sun, 09 May 2021 14:15:37 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id 2iFa2500D0mfAB406iFadu; Sun, 09 May 2021 20:15:34 +0200 Message-ID: <7fa3822a2df127f16b92cfb0a35bf41176073eb7.camel@telenet.be> From: Maxime Devos Date: Sun, 09 May 2021 20:15:24 +0200 In-Reply-To: <20210507154208.123628-1-edk@beaver-labs.com> References: <20210507154208.123628-1-edk@beaver-labs.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-HX5Y+X6pQ3kb4IPP4YdI" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1620584134; bh=/b+77BqOViRe5A7J66CLjEYiiDgIZX9fIUXAOHSf99c=; h=Subject:From:To:Date:In-Reply-To:References; b=J2aH9XeW4LM8w2ZT7n2CzeUQzCWC7Q78Q8r3YWqgz5Zj+x2fYRPGRdIybF6NRxyzc Fh9wWWUji9nQPke8Yh2niwnzd7KN6RbpF/Dy3mPN/KS+ZikvfqSjZeiuw9cSIS4LDo qHdiose1G+tjhdzhvpY0dpBoc6pkFpO/uUIJBEJzdtK78M2GkSBv1ts4nmgemz7ZO0 MsPhs8By2uiUJW7RMVG2EabkXjQJKbclzgtGSuXCiGDPEdcCZ6FDMCqNvqtWHRc3Is ZS0/9QfSjTvFxvxDm+PMYruX2IGGS0GnpuBlHeiNk5wzEcFB8HAD19AxCv/iVyj2cB fvp2ZEHiXR/4g== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-HX5Y+X6pQ3kb4IPP4YdI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Edouard Klein schreef op vr 07-05-2021 om 17:42 [+0200]: > This patch adds the wrap-in-search-paths function [...]. > [... text about shepherd services, foreign distros, propagated-inputs, > gexps ...] I don't see any obvious problems with the patch, though I haven't tested. It would be easier to review if you modified one or two packages and services in guix itself to use this wrap-in-search-paths procedure though. (Preferably services with a system test in gnu/tests/*.scm.) Otherwise, guix would have a procedure that is not called from anywhere and isn't tested either, which is a bit of a hard sell. Not sure how this helps with > First, when running on a foreign distro, guix packages (especially python= packages) > can break the foreign distribution by putting Guix's python interpreter b= efore the > host's in the PATH. Scripts that rely on a #!/usr/bin/env python shebang = then breaks. > This for example breaks gdm on the latest Ubuntu when you install any pac= kage for > which python is a propagated input. , but this seems useful for shepherd services (as you mentioned). Greetings, Maxime. --=-HX5Y+X6pQ3kb4IPP4YdI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYJgmvBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kLQAP4lfjrklgHeNk8z4zM9zqirK6WF coeEqEss8TSVipedWgD9HqZBaun/PCBcIpFNlDplLKux8j1ZQ4IimfH1TTWtzQY= =7vAd -----END PGP SIGNATURE----- --=-HX5Y+X6pQ3kb4IPP4YdI-- From unknown Fri Jun 13 11:29:58 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48277] [PATCH 0/1] New wrap-in-search-paths function Resent-From: Edouard Klein Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 May 2021 19:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48277 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 48277@debbugs.gnu.org Received: via spool by 48277-submit@debbugs.gnu.org id=B48277.16205902135334 (code B ref 48277); Sun, 09 May 2021 19:57:02 +0000 Received: (at 48277) by debbugs.gnu.org; 9 May 2021 19:56:53 +0000 Received: from localhost ([127.0.0.1]:56658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lfpXp-0001Ny-5A for submit@debbugs.gnu.org; Sun, 09 May 2021 15:56:53 -0400 Received: from sender4-op-o10.zoho.com ([136.143.188.10]:17083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lfpXj-0001Nk-Cg for 48277@debbugs.gnu.org; Sun, 09 May 2021 15:56:51 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1620590204; cv=none; d=zohomail.com; s=zohoarc; b=mqPK6lp3xZpA0AAoRBebVeyHkVs7hj1UDWVAMKzZJyiSIpZHQOzKeqGOc/rM3Gsofe34Y+wggOSKXSlHJy+fQh/rBa3giyGcf9cQf4ASgzkuaDkNQQkbayTUqJXewlfYK9+QwkaiYdQo3x8/1cAb6Sq/6r6y6CWAFz//VOEWFsQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620590204; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=lZMNmfBHq6bDNAWSbEgKKiqh3aNSFBDX+obFZZJxNYE=; b=iShp3vxj74w5WR0b5tD19etTXIeyTn117Vz2NQDM+SWcq0JrMKjxwpXsqwLkjIKVNUfsQL7fXTWCX8TqpKyWBVt+kaS/QmWoiBLQ90WejCYaY3tF2cnBXYaAcDS4NM/ts73l+MIrfIJbtj32OszBBHfrTSRPPcftbRgbzXHC+WM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=rdklein.fr; spf=pass smtp.mailfrom=edou@rdklein.fr; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1620590204; s=zoho; d=rdklein.fr; i=edou@rdklein.fr; h=References:From:To:Cc:Subject:In-reply-to:Message-ID:Date:MIME-Version:Content-Type; bh=lZMNmfBHq6bDNAWSbEgKKiqh3aNSFBDX+obFZZJxNYE=; b=gCzZ1Vl1XLsjRXuowP3UJgYfg/LvazrXVg2Ww0Ob0nGTmpEF9StI76i0ig5ikxy3 1Cnl8zEFAVspIp/vcx3ftFDZ4yVDiLNP9iA84eJoX8U/J/AfQHBwp12oh8LvTgV6uhb Wz12yy2m9eIEmhk2rv+6FrMMvJvSZhRQs9GfftZM= Received: from Rasoir (lfbn-idf3-1-808-29.w90-3.abo.wanadoo.fr [90.3.133.29]) by mx.zohomail.com with SMTPS id 1620590201599904.2571976327558; Sun, 9 May 2021 12:56:41 -0700 (PDT) References: <20210507154208.123628-1-edk@beaver-labs.com> <7fa3822a2df127f16b92cfb0a35bf41176073eb7.camel@telenet.be> User-agent: mu4e 1.4.15; emacs 27.2 From: Edouard Klein In-reply-to: <7fa3822a2df127f16b92cfb0a35bf41176073eb7.camel@telenet.be> Message-ID: <878s4nu1ea.fsf@rdklein.fr> Date: Sun, 09 May 2021 21:56:29 +0200 MIME-Version: 1.0 Content-Type: text/plain X-ZohoMailClient: External X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Thanks for reviewing the patch, Good point about the tests. I'll try to send a follow-up patch on this thread with the requested changes to a tested service. Cheers, Edouard. Maxime Devos writes: > Edouard Klein schreef op vr 07-05-2021 om 17:42 [+0200]: >> This patch adds the wrap-in-search-paths function [...]. >> [... text about shepherd services, foreign distros, propagated-inputs, >> gexps ...] > > I don't see any obvious problems with the patch, though I haven't tested. > > It would be easier to review if you modified one or two packages > and services in guix itself to use this wrap-in-search-paths procedure > though. (Preferably services with a system test in gnu/tests/*.scm.) > Otherwise, guix would have a procedure that is not called from anywhere > and isn't tested either, which is a bit of a hard sell. > > Not sure how this helps with > >> First, when running on a foreign distro, guix packages (especially python packages) >> can break the foreign distribution by putting Guix's python interpreter before the >> host's in the PATH. Scripts that rely on a #!/usr/bin/env python shebang then breaks. >> This for example breaks gdm on the latest Ubuntu when you install any package for >> which python is a propagated input. > > , but this seems useful for shepherd services (as you mentioned). > > Greetings, > Maxime.