GNU bug report logs -
#20081
patch-source-shebangs crashes on broken symlink
Previous Next
Reported by: Tomáš Čech <sleep_walker <at> suse.cz>
Date: Wed, 11 Mar 2015 15:03:02 UTC
Severity: normal
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20081 in the body.
You can then email your comments to 20081 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#20081
; Package
guix
.
(Wed, 11 Mar 2015 15:03:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tomáš Čech <sleep_walker <at> suse.cz>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Wed, 11 Mar 2015 15:03:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I'm trying to create package for taskwarrior.
Source tarball contain symlinks to nonexisting file `task':
$ tar tvf /gnu/store/*-task*.tar.gz | grep -E '/src/(tw|cal |calendar|task)'
lrwxr-xr-x ultrafredde/staff 0 2015-02-16 23:45 task-2.4.1/src/cal -> task
lrwxr-xr-x ultrafredde/staff 0 2015-02-16 23:45 task-2.4.1/src/calendar -> task
lrwxr-xr-x ultrafredde/staff 0 2015-02-16 23:45 task-2.4.1/src/tw -> task
When I run build, I got this backtrace:
phase `unpack' succeeded after 0 seconds
starting phase `patch-usr-bin-file'
phase `patch-usr-bin-file' succeeded after 0 seconds
starting phase `patch-source-shebangs'
Backtrace:
In ice-9/boot-9.scm:
157: 15 [catch #t #<catch-closure f65740> ...]
In unknown file:
?: 14 [apply-smob/1 #<catch-closure f65740>]
In ice-9/boot-9.scm:
63: 13 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 12 [eval # #]
In ice-9/boot-9.scm:
2401: 11 [save-module-excursion #<procedure f82880 at ice-9/boot-9.scm:4045:3 ()>]
4050: 10 [#<procedure f82880 at ice-9/boot-9.scm:4045:3 ()>]
1724: 9 [%start-stack load-stack #<procedure f959a0 at ice-9/boot-9.scm:4041:10 ()>]
1729: 8 [#<procedure f97c60 ()>]
In unknown file:
?: 7 [primitive-load "/gnu/store/ix1s7q448frw02wy9xvzhd66vh08lxcw-taskwarrior-2.4.1-guile-builder"]
In ice-9/eval.scm:
387: 6 [eval # ()]
In srfi/srfi-1.scm:
830: 5 [every1 #<procedure 12eb680 at /gnu/store/dyv4k9p9na96q4yzahdlvij3nadaz65h-module-import/guix/build/gnu-build-system.scm:507:9 (expr)> ...]
In /gnu/store/dyv4k9p9na96q4yzahdlvij3nadaz65h-module-import/guix/build/gnu-build-system.scm:
511: 4 [#<procedure 12eb680 at /gnu/store/dyv4k9p9na96q4yzahdlvij3nadaz65h-module-import/guix/build/gnu-build-system.scm:507:9 (expr)> #]
164: 3 [patch-source-shebangs # ...]
In unknown file:
?: 2 [remove #<procedure ee4d60 at ice-9/boot-9.scm:1460:6 (str)> #]
In ice-9/boot-9.scm:
1461: 1 [#<procedure ee4d60 at ice-9/boot-9.scm:1460:6 (str)> "./src/cal"]
In unknown file:
?: 0 [stat "./src/cal" #<undefined>]
ERROR: In procedure stat:
ERROR: In procedure stat: No such file or directory: "./src/cal"
builder for `/gnu/store/vr408ijifflkqjk9lgpj3sv469fj2pik-taskwarrior-2.4.1.drv' failed with exit code 1
cannot build derivation `/gnu/store/367g51d6vh8v5m1q58hls6bn40ha1262-profile.drv': 1 dependencies couldn't be built
guix package: error: build failed: build of `/gnu/store/367g51d6vh8v5m1q58hls6bn40ha1262-profile.drv' failed
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#20081
; Package
guix
.
(Wed, 11 Mar 2015 17:33:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 20081 <at> debbugs.gnu.org (full text, mbox):
On Wed, Mar 11, 2015 at 04:02:11PM +0100, Tomáš Čech wrote:
> 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.
Andreas
Information forwarded
to
bug-guix <at> gnu.org
:
bug#20081
; Package
guix
.
(Wed, 11 Mar 2015 19:14:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 20081 <at> debbugs.gnu.org (full text, mbox):
On Wed, Mar 11, 2015 at 06:32:30PM +0100, Andreas Enge wrote:
>On Wed, Mar 11, 2015 at 04:02:11PM +0100, Tomáš Čech wrote:
>> 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.
And we alone are getting into this problem it is not usual to
preprocess source files before compilation.
I already worked around the bug to confirm I correctly identified the cause.
S_W
Information forwarded
to
bug-guix <at> gnu.org
:
bug#20081
; Package
guix
.
(Wed, 11 Mar 2015 20:19:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 20081 <at> debbugs.gnu.org (full text, mbox):
Andreas Enge <andreas <at> enge.fr> writes:
> On Wed, Mar 11, 2015 at 04:02:11PM +0100, Tomáš Čech wrote:
>> 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.
The phase should go after the 'unpack' phase rather than before
configure, but otherwise I agree with Andreas.
Mark
Information forwarded
to
bug-guix <at> gnu.org
:
bug#20081
; Package
guix
.
(Thu, 12 Mar 2015 09:31:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 20081 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tomáš Čech <sleep_walker <at> suse.cz> 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áš Čech wrote:
>>> 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 ‘find-files’ in core-updates to not
follow symlinks:
[Message part 2 (text/x-patch, inline)]
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index a5a6167..9cbddcd 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -288,7 +288,8 @@ matches REGEXP."
file (strerror errno))
result)
'()
- dir)
+ dir
+ lstat)
string<?))
[Message part 3 (text/plain, inline)]
Thoughts?
Thanks,
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#20081
; Package
guix
.
(Thu, 12 Mar 2015 09:37:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 20081 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, Mar 12, 2015 at 10:30:55AM +0100, Ludovic Courtès wrote:
>Tomáš Čech <sleep_walker <at> suse.cz> 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áš Čech wrote:
>>>> 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 ‘find-files’ in core-updates to not
>follow symlinks:
>
>[1;32mdiff --git a/guix/build/utils.scm b/guix/build/utils.scm[0;0m
>[0;0mindex a5a6167..9cbddcd 100644[0;0m
>[1;31m--- a/guix/build/utils.scm[0;0m
>[1;34m+++ b/guix/build/utils.scm[0;0m
>[1;35m@@ -288,7 +288,8 @@ matches REGEXP."[0;0m
>[0;0m file (strerror errno))[0;0m
>[0;0m result)[0;0m
>[0;0m '()[0;0m
>[1;31m- dir)[0;0m
>[1;34m+ dir[0;0m
>[1;34m+ lstat)[0;0m
>[0;0m string<?))[0;0m
>[0;0m [0;0m
>[0;0m [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
[Message part 2 (application/pgp-signature, inline)]
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Mon, 06 Apr 2015 21:23:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tomáš Čech <sleep_walker <at> suse.cz>
:
bug acknowledged by developer.
(Mon, 06 Apr 2015 21:23:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 20081-done <at> debbugs.gnu.org (full text, mbox):
ludo <at> gnu.org (Ludovic Courtès) skribis:
> Tomáš Čech <sleep_walker <at> suse.cz> 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áš Čech wrote:
>>>> 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 ‘find-files’ in core-updates to not
> follow symlinks:
Done in 347f54e.
Thanks,
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#20081
; Package
guix
.
(Wed, 22 Apr 2015 19:08:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 20081 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
during my clean-up of taskwarrior package I removed section which
removes broken symlinks. Even though this bug is considered as fixed, I
believe I reproduced it after 347f54e.
...
task-2.4.3/src/ViewText.cpp
task-2.4.3/src/ViewText.h
task-2.4.3/src/wcwidth6.cpp
phase `unpack' succeeded after 0 seconds
starting phase `patch-usr-bin-file'
phase `patch-usr-bin-file' succeeded after 0 seconds
starting phase `patch-source-shebangs'
Backtrace:
In ice-9/boot-9.scm:
157: 15 [catch #t #<catch-closure 2357aa0> ...]
In unknown file:
?: 14 [apply-smob/1 #<catch-closure 2357aa0>]
In ice-9/boot-9.scm:
63: 13 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 12 [eval # #]
In ice-9/boot-9.scm:
2401: 11 [save-module-excursion #<procedure 2374880 at ice-9/boot-9.scm:4045:3 ()>]
4050: 10 [#<procedure 2374880 at ice-9/boot-9.scm:4045:3 ()>]
1724: 9 [%start-stack load-stack ...]
1729: 8 [#<procedure 2389c60 ()>]
In unknown file:
?: 7 [primitive-load "/gnu/store/06l4f3al56cg49rfiy79risam0f8yb4y-taskwarrior-2.4.3-guile-builder"]
In ice-9/eval.scm:
387: 6 [eval # ()]
In srfi/srfi-1.scm:
830: 5 [every1 #<procedure 2590d00 at /gnu/store/j8w9vf3diyvkccsa21p9fqpwsl3wlsy3-module-import/guix/build/gnu-build-system.scm:580:9 (expr)> ...]
In /gnu/store/j8w9vf3diyvkccsa21p9fqpwsl3wlsy3-module-import/guix/build/gnu-build-system.scm:
584: 4 [#<procedure 2590d00 at /gnu/store/j8w9vf3diyvkccsa21p9fqpwsl3wlsy3-module-import/guix/build/gnu-build-system.scm:580:9 (expr)> #]
167: 3 [patch-source-shebangs # ...]
In unknown file:
?: 2 [remove #<procedure 22cd0e0 at ice-9/boot-9.scm:1460:6 (str)> #]
In ice-9/boot-9.scm:
1461: 1 [#<procedure 22cd0e0 at ice-9/boot-9.scm:1460:6 (str)> "./src/cal"]
In unknown file:
?: 0 [stat "./src/cal" #<undefined>]
ERROR: In procedure stat:
ERROR: In procedure stat: No such file or directory: "./src/cal"
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#20081
; Package
guix
.
(Thu, 23 Apr 2015 19:00:04 GMT)
Full text and
rfc822 format available.
Message #31 received at 20081 <at> debbugs.gnu.org (full text, mbox):
Tomáš Čech <tcech <at> suse.cz> skribis:
> starting phase `patch-source-shebangs'
> Backtrace:
> In ice-9/boot-9.scm:
> 157: 15 [catch #t #<catch-closure 2357aa0> ...]
> In unknown file:
> ?: 14 [apply-smob/1 #<catch-closure 2357aa0>]
> In ice-9/boot-9.scm:
> 63: 13 [call-with-prompt prompt0 ...]
> In ice-9/eval.scm:
> 432: 12 [eval # #]
> In ice-9/boot-9.scm:
> 2401: 11 [save-module-excursion #<procedure 2374880 at ice-9/boot-9.scm:4045:3 ()>]
> 4050: 10 [#<procedure 2374880 at ice-9/boot-9.scm:4045:3 ()>]
> 1724: 9 [%start-stack load-stack ...]
> 1729: 8 [#<procedure 2389c60 ()>]
> In unknown file:
> ?: 7 [primitive-load "/gnu/store/06l4f3al56cg49rfiy79risam0f8yb4y-taskwarrior-2.4.3-guile-builder"]
> In ice-9/eval.scm:
> 387: 6 [eval # ()]
> In srfi/srfi-1.scm:
> 830: 5 [every1 #<procedure 2590d00 at /gnu/store/j8w9vf3diyvkccsa21p9fqpwsl3wlsy3-module-import/guix/build/gnu-build-system.scm:580:9 (expr)> ...]
> In /gnu/store/j8w9vf3diyvkccsa21p9fqpwsl3wlsy3-module-import/guix/build/gnu-build-system.scm:
> 584: 4 [#<procedure 2590d00 at /gnu/store/j8w9vf3diyvkccsa21p9fqpwsl3wlsy3-module-import/guix/build/gnu-build-system.scm:580:9 (expr)> #]
> 167: 3 [patch-source-shebangs # ...]
> In unknown file:
> ?: 2 [remove #<procedure 22cd0e0 at ice-9/boot-9.scm:1460:6 (str)> #]
> In ice-9/boot-9.scm:
> 1461: 1 [#<procedure 22cd0e0 at ice-9/boot-9.scm:1460:6 (str)> "./src/cal"]
> In unknown file:
> ?: 0 [stat "./src/cal" #<undefined>]
I believe this is Really Fixed™ by cb85eb5 (in core-updates.)
Thanks!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 22 May 2015 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 35 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.