From unknown Sun Jun 22 17:16:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32293: wrap-program with non-colon separtor produces incorrect bash substitutions Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 27 Jul 2018 15:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32293 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 32293@debbugs.gnu.org X-Debbugs-Original-To: "Bug-guix\@gnu org" Received: via spool by submit@debbugs.gnu.org id=B.15327066843024 (code B ref -1); Fri, 27 Jul 2018 15:52:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jul 2018 15:51:24 +0000 Received: from localhost ([127.0.0.1]:60548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fj51Y-0000mi-BX for submit@debbugs.gnu.org; Fri, 27 Jul 2018 11:51:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fj51V-0000mQ-Sa for submit@debbugs.gnu.org; Fri, 27 Jul 2018 11:51:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fj51P-00017J-Tg for submit@debbugs.gnu.org; Fri, 27 Jul 2018 11:51:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51921) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fj51P-000177-Po for submit@debbugs.gnu.org; Fri, 27 Jul 2018 11:51:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fj51O-0002wV-JL for bug-guix@gnu.org; Fri, 27 Jul 2018 11:51:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fj51N-00015M-Tr for bug-guix@gnu.org; Fri, 27 Jul 2018 11:51:14 -0400 Received: from mail1.fsfe.org ([2001:aa8:ffed:f5f3::151]:40252) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fj51N-00013R-N6 for bug-guix@gnu.org; Fri, 27 Jul 2018 11:51:13 -0400 User-agent: mu4e 1.0; emacs 26.1 From: Jelle Licht Date: Fri, 27 Jul 2018 17:51:06 +0200 Message-ID: <878t5w8yol.fsf@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.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: -6.0 (------) Hi all, While working to package some lua-related stuff, I need to deal with the LUA_PATH environment variable. This variable uses `;' as a separator, and as such, I wanted to wrap one of my programs --8<---------------cut here---------------start------------->8--- ... (wrap-program (string-append out "/bin/fennel") `("LUA_PATH" ";" prefix (,path))) ... --8<---------------cut here---------------end--------------->8--- ... which gives me the following snippet for the fennel script: --8<---------------cut here---------------start------------->8--- export LUA_PATH="/gnu/store/3yjzvzwczi37snccrxbw7xsmbns1qc7a-fennel-1-1.f2a3d3b/share/lua/5.3/?.lua${LUA_PATH;+;}$LUA_PATH" --8<---------------cut here---------------end--------------->8--- ... which is not a correct bash substitution. I _think_ the first `;' in `{LUA_PATH;+;}' needs to be a colon instead, at least if `wrap-program' is only used to generate bash-compliant wrappers. It seems this can be (easily?) fixed around guix/build/utils.scm:1055, but any changes I made there had me starting to build bash and other things from scratch. From unknown Sun Jun 22 17:16:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32293: wrap-program with non-colon separtor produces incorrect bash substitutions Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 19 Aug 2018 10:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32293 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Jelle Licht Cc: 32293@debbugs.gnu.org Received: via spool by 32293-submit@debbugs.gnu.org id=B32293.15346762145520 (code B ref 32293); Sun, 19 Aug 2018 10:57:02 +0000 Received: (at 32293) by debbugs.gnu.org; 19 Aug 2018 10:56:54 +0000 Received: from localhost ([127.0.0.1]:54416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frLO9-0001Qy-U1 for submit@debbugs.gnu.org; Sun, 19 Aug 2018 06:56:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frLO8-0001Ql-Q3 for 32293@debbugs.gnu.org; Sun, 19 Aug 2018 06:56:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frLO2-0007B5-HP for 32293@debbugs.gnu.org; Sun, 19 Aug 2018 06:56:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frLO2-0007B1-DR; Sun, 19 Aug 2018 06:56:46 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=50624 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1frLO1-0000Jp-7Y; Sun, 19 Aug 2018 06:56:45 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <878t5w8yol.fsf@fsfe.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 2 Fructidor an 226 de la =?UTF-8?Q?R=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: Sun, 19 Aug 2018 12:56:43 +0200 In-Reply-To: <878t5w8yol.fsf@fsfe.org> (Jelle Licht's message of "Fri, 27 Jul 2018 17:51:06 +0200") Message-ID: <87a7pik4k4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.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: -6.0 (------) Hello Jelle! Jelle Licht skribis: > While working to package some lua-related stuff, I need to deal with the > LUA_PATH environment variable. This variable uses `;' as a separator, and > as such, I wanted to wrap one of my programs > > ... > (wrap-program (string-append out "/bin/fennel") > `("LUA_PATH" ";" prefix (,path))) > ... > > > ... which gives me the following snippet for the fennel script: > > export LUA_PATH=3D"/gnu/store/3yjzvzwczi37snccrxbw7xsmbns1qc7a-fennel-1-1= .f2a3d3b/share/lua/5.3/?.lua${LUA_PATH;+;}$LUA_PATH" > > ... which is not a correct bash substitution. I _think_ the first `;' in > `{LUA_PATH;+;}' needs to be a colon instead, at least if `wrap-program' > is only used to generate bash-compliant wrappers. > > It seems this can be (easily?) fixed around guix/build/utils.scm:1055, > but any changes I made there had me starting to build bash and other > things from scratch. It=E2=80=99s indeed where the bug lies. Changing that file involves a full rebuild (because every package build process uses it), but that=E2=80=99s O= K: you can test the =E2=80=98wrap-program=E2=80=99 procedure independently (at= the REPL, for example), and then we can push this change to =E2=80=98core-updates=E2= =80=99. We need to check whether =E2=80=98core-updates=E2=80=99 still accepts full-= rebuild changes at this stage, though. Thanks, Ludo=E2=80=99. From unknown Sun Jun 22 17:16:50 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jelle Licht Subject: bug#32293: closed (Re: bug#32293: wrap-program with non-colon separtor produces incorrect bash substitutions) Message-ID: References: <87o9dx6psw.fsf@fsfe.org> <878t5w8yol.fsf@fsfe.org> X-Gnu-PR-Message: they-closed 32293 X-Gnu-PR-Package: guix Reply-To: 32293@debbugs.gnu.org Date: Mon, 20 Aug 2018 15:07:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1534777622-11784-1" This is a multi-part message in MIME format... ------------=_1534777622-11784-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #32293: wrap-program with non-colon separtor produces incorrect bash substi= tutions which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 32293@debbugs.gnu.org. --=20 32293: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D32293 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1534777622-11784-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 32293-done) by debbugs.gnu.org; 20 Aug 2018 15:06:11 +0000 Received: from localhost ([127.0.0.1]:55745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frlkx-00032v-Dm for submit@debbugs.gnu.org; Mon, 20 Aug 2018 11:06:11 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:40810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frlkv-00032m-Kl for 32293-done@debbugs.gnu.org; Mon, 20 Aug 2018 11:06:10 -0400 References: <878t5w8yol.fsf@fsfe.org> <87a7pik4k4.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Jelle Licht To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#32293: wrap-program with non-colon separtor produces incorrect bash substitutions In-reply-to: <87a7pik4k4.fsf@gnu.org> Date: Mon, 20 Aug 2018 17:06:07 +0200 Message-ID: <87o9dx6psw.fsf@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32293-done Cc: Jelle Licht , 32293-done@debbugs.gnu.org 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: -3.3 (---) Ludovic Court=C3=A8s writes: > Hello Jelle! > > Jelle Licht skribis: > >> While working to package some lua-related stuff, I need to deal with the >> LUA_PATH environment variable. This variable uses `;' as a separator, and >> as such, I wanted to wrap one of my programs >> >> ... >> (wrap-program (string-append out "/bin/fennel") >> `("LUA_PATH" ";" prefix (,path))) >> ... >> >> >> ... which gives me the following snippet for the fennel script: >> >> export LUA_PATH=3D"/gnu/store/3yjzvzwczi37snccrxbw7xsmbns1qc7a-fennel-1-= 1.f2a3d3b/share/lua/5.3/?.lua${LUA_PATH;+;}$LUA_PATH" >> >> ... which is not a correct bash substitution. I _think_ the first `;' in >> `{LUA_PATH;+;}' needs to be a colon instead, at least if `wrap-program' >> is only used to generate bash-compliant wrappers. >> >> It seems this can be (easily?) fixed around guix/build/utils.scm:1055, >> but any changes I made there had me starting to build bash and other >> things from scratch. > > It=E2=80=99s indeed where the bug lies. Changing that file involves a fu= ll > rebuild (because every package build process uses it), but that=E2=80=99s= OK: > you can test the =E2=80=98wrap-program=E2=80=99 procedure independently (= at the REPL, > for example), and then we can push this change to =E2=80=98core-updates= =E2=80=99. > > We need to check whether =E2=80=98core-updates=E2=80=99 still accepts ful= l-rebuild > changes at this stage, though. I pushed this on core-updates as e6c4e41102. > > Thanks, > Ludo=E2=80=99. ------------=_1534777622-11784-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Jul 2018 15:51:24 +0000 Received: from localhost ([127.0.0.1]:60548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fj51Y-0000mi-BX for submit@debbugs.gnu.org; Fri, 27 Jul 2018 11:51:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fj51V-0000mQ-Sa for submit@debbugs.gnu.org; Fri, 27 Jul 2018 11:51:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fj51P-00017J-Tg for submit@debbugs.gnu.org; Fri, 27 Jul 2018 11:51:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51921) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fj51P-000177-Po for submit@debbugs.gnu.org; Fri, 27 Jul 2018 11:51:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fj51O-0002wV-JL for bug-guix@gnu.org; Fri, 27 Jul 2018 11:51:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fj51N-00015M-Tr for bug-guix@gnu.org; Fri, 27 Jul 2018 11:51:14 -0400 Received: from mail1.fsfe.org ([2001:aa8:ffed:f5f3::151]:40252) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fj51N-00013R-N6 for bug-guix@gnu.org; Fri, 27 Jul 2018 11:51:13 -0400 User-agent: mu4e 1.0; emacs 26.1 From: Jelle Licht To: "Bug-guix\@gnu org" Subject: wrap-program with non-colon separtor produces incorrect bash substitutions Date: Fri, 27 Jul 2018 17:51:06 +0200 Message-ID: <878t5w8yol.fsf@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit 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: -6.0 (------) Hi all, While working to package some lua-related stuff, I need to deal with the LUA_PATH environment variable. This variable uses `;' as a separator, and as such, I wanted to wrap one of my programs --8<---------------cut here---------------start------------->8--- ... (wrap-program (string-append out "/bin/fennel") `("LUA_PATH" ";" prefix (,path))) ... --8<---------------cut here---------------end--------------->8--- ... which gives me the following snippet for the fennel script: --8<---------------cut here---------------start------------->8--- export LUA_PATH="/gnu/store/3yjzvzwczi37snccrxbw7xsmbns1qc7a-fennel-1-1.f2a3d3b/share/lua/5.3/?.lua${LUA_PATH;+;}$LUA_PATH" --8<---------------cut here---------------end--------------->8--- ... which is not a correct bash substitution. I _think_ the first `;' in `{LUA_PATH;+;}' needs to be a colon instead, at least if `wrap-program' is only used to generate bash-compliant wrappers. It seems this can be (easily?) fixed around guix/build/utils.scm:1055, but any changes I made there had me starting to build bash and other things from scratch. ------------=_1534777622-11784-1--