From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WLfZFm8jNGBKDQAA0tVLHw (envelope-from ) for ; Mon, 22 Feb 2021 21:34:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id hCCdEm8jNGA2IQAAB5/wlQ (envelope-from ) for ; Mon, 22 Feb 2021 21:34:39 +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 9529827541 for ; Mon, 22 Feb 2021 22:34:38 +0100 (CET) Received: from localhost ([::1]:47166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEIqj-0000M5-Bv for larch@yhetil.org; Mon, 22 Feb 2021 16:34:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEIqZ-0000Ld-Aq for guix-devel@gnu.org; Mon, 22 Feb 2021 16:34:27 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35381) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEIqY-0002RR-Vt; Mon, 22 Feb 2021 16:34:26 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=40576 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lEIqY-0001fF-E1; Mon, 22 Feb 2021 16:34:26 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: =?utf-8?Q?=E2=80=9Cguix?= pack =?utf-8?Q?-RR=E2=80=9D?= and ignored environment variables References: <87tuq4ku6n.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 =?utf-8?Q?Vent=C3=B4se?= an 229 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 22 Feb 2021 22:34:23 +0100 In-Reply-To: <87tuq4ku6n.fsf@elephly.net> (Ricardo Wurmus's message of "Mon, 22 Feb 2021 16:18:08 +0100") Message-ID: <87wnuz9480.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.87 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 9529827541 X-Spam-Score: -2.87 X-Migadu-Scanner: scn0.migadu.com X-TUID: srkX6iOxJd/A Hey ho! Ricardo Wurmus skribis: > today I wanted to offer a pack of Guile Studio, which provides a wrapper > script =E2=80=9Cguile-studio=E2=80=9D that sets EMACSLOADPATH and then sp= awns Emacs: > > #!/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh > EMACSLOADPATH=3D/gnu/store/7z33lhy9m8xqgym9w3hj30y1w290c8hn-emacs-27.1/sh= are/emacs/site-lisp:/gnu/store/22qrgczgs13r81vh0assi44g65352jsb-emacs-f-0.2= 0.0/share/emacs/site-lisp:/gnu/store/02wl4g5r2jcw3xa50wlvxrzgnbvfl4j9-emacs= -memoize-1.1/share/emacs/site-lisp:/gnu/store/5ypb61cywf1jcxb2p85a85a2m19yv= bgd-emacs-all-the-icons-4.0.1/share/emacs/site-lisp:/gnu/store/hf1gv2fn3ksn= mswmqs2iqpi6762l3vw8-emacs-all-the-icons-dired-1.0-1.980b774/share/emacs/si= te-lisp:/gnu/store/253a5n1ss5j7q1bn21nxlm468csmnnys-emacs-dired-sidebar-0.1= .0-2.da77919/share/emacs/site-lisp:/gnu/store/kfmh5kngrh2911nlwp5wsrjmpwfj7= kj4-emacs-doom-modeline-3.0.0/share/emacs/site-lisp:/gnu/store/khrdrw2b06jn= f632l886y0ayk2vb62il-emacs-modus-themes-1.1.1/share/emacs/site-lisp:/gnu/st= ore/p7igyy5yfkc1fvnvx19h2g49f6qaajs5-emacs-geiser-0.12/share/emacs/site-lis= p:/gnu/store/zf82m64bp66v3sh0rr4p6c26z996dmix-emacs-company-0.9.13/share/em= acs/site-lisp:/gnu/store/syrgm56fbk0722rnr59wpircv9n73r2n-emacs-ivy-0.13.1/= share/emacs/site-lisp:/gnu/store/425l8kf2rpk9c418vi8i42mw365b4a18-emacs-fly= check-31-2.9bcf6b6/share/emacs/site-lisp:/gnu/store/5z9jjvcfj8qka4ly8iysyrg= vyzksj6ig-emacs-flycheck-guile-0.2/share/emacs/site-lisp:/gnu/store/43bpv64= d0a6x8bmqcdp4fsawhmspd5mk-emacs-paren-face-1.0.7/share/emacs/site-lisp:/gnu= /store/gpwzl1nsis1s3q48sl8qn0hm4g41qgyz-emacs-dash-2.18.0/share/emacs/site-= lisp:/gnu/store/gcw8lz0xvansb4dpfiq9m3kzqx0qc12n-emacs-s-1.12.0/share/emacs= /site-lisp:/gnu/store/0iwc19qcn2ylrnpsqrfmg8jsij0q6yz7-emacs-dired-hacks-0.= 0.1-3.d1a2bda/share/emacs/site-lisp:/gnu/store/1a6aqvylh3qym2n3npp9gbvcfpzy= glgg-emacs-shrink-path-0.3.1/share/emacs/site-lisp:/gnu/store/60qfm0v7v3h9b= l3x5q6iw1kb1phy0w2z-emacs-hydra-0.15.0/share/emacs/site-lisp:/gnu/store/jvd= h3zi4fc28ipk2g1na1i6vfa8xismi-emacs-eimp-1.4.0-1.2e7536f/share/emacs/site-l= isp: > exec /gnu/store/7z33lhy9m8xqgym9w3hj30y1w290c8hn-emacs-27.1/bin/emacs -mm= --no-site-file --no-site-lisp --no-x-resources --no-init-file --load /gnu/= store/z2wix8r2gqs4lwwnq744qpj54051y8cy-guile-studio-0.1.0-1.93622e7/share/g= uile-studio.el > > Unfortunately, Emacs fails to find ivy when I launch it from a > relocatable pack in a container (to ensure that the contents of the pack > are sufficient). Here=E2=80=99s what I did: > > $ guix pack -RR -S /bin=3Dbin glibc-locales guile-studio guile > $ cp the-pack.tar.gz /tmp/test > $ cd /tmp/test > $ xhost +local: > $ guix environment --container -E ^DISPLAY$ --share=3D/tmp/.X11-unix = --ad-hoc tar gzip bash coreutils > [env] $ tar xf the-pack.tar.gz > [env] $ ./bin/guile-studio > > I look at the value of =E2=80=9Cload-path=E2=80=9D in Emacs and I don=E2= =80=99t see any of the > items that are mentioned on the EMACSLOADPATH environment variable, only > things provided by Emacs itself. =E2=80=9C(getenv "EMACSLOADPATH")=E2=80= =99 returns > nil. > > Are shell wrappers not working when using the binary wrapper produced by > =E2=80=98guix pack -RR=E2=80=99? Hmm I did this test: --8<---------------cut here---------------start------------->8--- $ guix pack -RR grep -S /bin=3Dbin /gnu/store/ghi97dm2wap95vhzm03m7rfff4fmd9rh-tarball-pack.tar.gz --8<---------------cut here---------------end--------------->8--- and then: --8<---------------cut here---------------start------------->8--- $ unshare -mrf # cd /tmp # mkdir pack # cd pack # tar xf /gnu/store/ghi97dm2wap95vhzm03m7rfff4fmd9rh-tarball-pack.tar.gz # mount -t tmpfs none /gnu/store # ./bin/egrep --version grep (GNU grep) 3.4 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel and others; see . # echo /gnu/store/* /gnu/store/* --8<---------------cut here---------------end--------------->8--- where =E2=80=98egrep=E2=80=99 is a script. So it looks alright. My guess is that the container you created contains some store items, such as the bash that appears in shebang. Relocatable wrappers don=E2=80= =99t do the namespace/proot/fakechroot dance when the original binary in the store exists, and instead they executed it directly. But in your case, since you have an incomplete store, you=E2=80=99re maybe running bash from = the store (thus without store mappings), and somehow things go wrong somewhere down the road?=E2=80=A6 Thanks, Ludo=E2=80=99.