From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:60085) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGnie-00050J-OK for guix-patches@gnu.org; Tue, 24 Mar 2020 13:52:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGnid-0002Nw-Pi for guix-patches@gnu.org; Tue, 24 Mar 2020 13:52:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49596) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGnid-0002Ns-Mo for guix-patches@gnu.org; Tue, 24 Mar 2020 13:52:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jGnic-0008Uu-3h for guix-patches@gnu.org; Tue, 24 Mar 2020 13:52:02 -0400 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> <87d09pohrj.fsf@gnu.org> Date: Tue, 24 Mar 2020 18:51:36 +0100 In-Reply-To: <87d09pohrj.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 06 Mar 2020 12:16:32 +0100") Message-ID: <87h7ydljyv.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 Ping! :-) Ludovic Court=C3=A8s skribis: > 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 "libexe= c", >> even non-executable files. This would cause issues for git when its she= ll >> 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. Suggest= ions >> welcome. > > Not sure how to do that. Since =E2=80=98guix pack=E2=80=99 accepts manif= ests, you could > have a manifest containing a =E2=80=98computed-file=E2=80=99 with a file = that shouldn=E2=80=99t > be wrapped, and then you could ensure that=E2=80=99s indeed the case. Or= you > could try with =E2=80=98git-minimal=E2=80=99 or some other package that e= xhibits 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.