From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:50602) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAAyV-0007QR-8X for guix-patches@gnu.org; Fri, 06 Mar 2020 06:17:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAAyU-0002Fl-5D for guix-patches@gnu.org; Fri, 06 Mar 2020 06:17:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38209) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jAAyU-0002FO-14 for guix-patches@gnu.org; Fri, 06 Mar 2020 06:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jAAyT-0008J1-Sd for guix-patches@gnu.org; Fri, 06 Mar 2020 06:17:01 -0500 Subject: [bug#39807] [PATCH] guix: pack: Only wrap executable files. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200227043604.13102-1-bavier@posteo.net> Date: Fri, 06 Mar 2020 12:16:32 +0100 In-Reply-To: <20200227043604.13102-1-bavier@posteo.net> (Eric Bavier's message of "Wed, 26 Feb 2020 22:36:04 -0600") Message-ID: <87d09pohrj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Eric Bavier Cc: 39807@debbugs.gnu.org, Eric Bavier Hi, Eric Bavier skribis: > From: Eric Bavier > > Hello Guix, > > This patch fixes some uses of relocatable git (e.g. octopus merge).=20 > Previously, guix pack would wrap all files in "bin", "sbin", and "libexec= ", > even non-executable files. This would cause issues for git when its shell > scripts in libexec would try to source other shell files that had been > wrapped and were no longer a valid shell file. Good catch! > I feel like a test should be added to tests/guix-pack-relocatable.sh, but > I'm not sure how to do that while keeping the test lightweight. Suggesti= ons > welcome. Not sure how to do that. Since =E2=80=98guix pack=E2=80=99 accepts manifes= ts, you could have a manifest containing a =E2=80=98computed-file=E2=80=99 with a file th= at shouldn=E2=80=99t be wrapped, and then you could ensure that=E2=80=99s indeed the case. Or y= ou could try with =E2=80=98git-minimal=E2=80=99 or some other package that exh= ibits the problem? > * guix/scripts/pack.scm (wrapped-package): Build wrappers for > executable files and symlink others. [...] > - (for-each build-wrapper > - (append (find-files (string-append input "/bin")) > - (find-files (string-append input "/sbin")) > - (find-files (string-append input "/libexec")= )))))) > + (receive (executables others) I=E2=80=99d prefer srfi-11 =E2=80=98let-values=E2=80=99. :-) Otherwise LGTM, thanks! Ludo=E2=80=99.