From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Tom=C3=A1=C5=A1_?= =?UTF-8?Q?=C4=8Cech?= Subject: bug#20081: patch-source-shebangs crashes on broken symlink Date: Thu, 12 Mar 2015 10:36:33 +0100 Message-ID: <20150312093633.GN16813@crashnator.suse.cz> References: <20150311150211.GK16813@crashnator.suse.cz> <20150311173230.GA12508@debian.math.u-bordeaux1.fr> <20150311191235.GA29520@venom> <87oanyv9yo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1X+6QtwRodzgDPAC" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVzYA-0007zC-2b for bug-guix@gnu.org; Thu, 12 Mar 2015 05:37:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVzY6-00040C-GD for bug-guix@gnu.org; Thu, 12 Mar 2015 05:37:05 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:44886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVzY6-000407-D0 for bug-guix@gnu.org; Thu, 12 Mar 2015 05:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YVzY5-0007Vu-Rc for bug-guix@gnu.org; Thu, 12 Mar 2015 05:37:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <87oanyv9yo.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 20081@debbugs.gnu.org --1X+6QtwRodzgDPAC Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 12, 2015 at 10:30:55AM +0100, Ludovic Court=C3=A8s wrote: >Tom=C3=A1=C5=A1 =C4=8Cech skribis: > >> On Wed, Mar 11, 2015 at 06:32:30PM +0100, Andreas Enge wrote: >>>On Wed, Mar 11, 2015 at 04:02:11PM +0100, Tom=C3=A1=C5=A1 =C4=8Cech wrot= e: >>>> I'm trying to create package for taskwarrior. >>>> Source tarball contain symlinks to nonexisting file `task': >>> >>>I would argue that this is not a bug in guix, but in the tarball. >>>You can remove the link with an additional phase before 'configure, see,= for >>>instance, the dvdisaster package in cdrom.scm. >> >> I agree with you that the fishy part is in tarball, but we could make >> build more robust. Getting backtrace is not nice way to end a build. > >I agree. I think we should patch =E2=80=98find-files=E2=80=99 in core-upd= ates to not >follow symlinks: > >=1B[1;32mdiff --git a/guix/build/utils.scm b/guix/build/utils.scm=1B[0;0m >=1B[0;0mindex a5a6167..9cbddcd 100644=1B[0;0m >=1B[1;31m--- a/guix/build/utils.scm=1B[0;0m >=1B[1;34m+++ b/guix/build/utils.scm=1B[0;0m >=1B[1;35m@@ -288,7 +288,8 @@ matches REGEXP."=1B[0;0m >=1B[0;0m file (strerror errno))=1B[0;0m >=1B[0;0m result)=1B[0;0m >=1B[0;0m '()=1B[0;0m >=1B[1;31m- dir)=1B[0;0m >=1B[1;34m+ dir=1B[0;0m >=1B[1;34m+ lstat)=1B[0;0m >=1B[0;0m string=1B[0;0m =1B[0;0m >=1B[0;0m =0C=1B[0;0m > >Thoughts? Ignoring symlinks is nice solution. I'd add comment: We won't touch broken symlinks, symlinks pointing within the sources will be fixed anyway. Thanks! S_W --1X+6QtwRodzgDPAC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlUBXh4ACgkQ37XrCapiVCPEogCgmuX0kWgAXthUXzweqbpl/PeI 5MwAoKkmg7jZ0h0dRIpxAPo3NcN3S+Hi =rC0J -----END PGP SIGNATURE----- --1X+6QtwRodzgDPAC--