Re: tar-1.26 not unpacking archives with symlinks?

2012-03-01 Thread Bernhard Reutner-Fischer
On Feb 29, 2012 6:33 PM, "Ed W"  wrote:
>
> Hi, I'm hitting an error when trying to unpack archives with the recently
unmasked tar-1.26.  Basically any symlinks in the archive trigger an
"unknown file" error.  This prevents me using emerge -k amongst other things
>
> I only see this on uclibc-0.9.33 based system, not on the build host
which uses glibc amd64
>
> Can anyone else repro this and shed any light on what the problem might
be?  Problem in tar or uclibc?
>

Can you provide a tarbalk with one file that exhibits the problem, plus an
strafe of the attempt to unpack it?
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


Re: tar-1.26 not unpacking archives with symlinks?

2012-03-13 Thread Natanael Copa
On Thu, Mar 1, 2012 at 5:45 PM, Bernhard Reutner-Fischer
 wrote:
> On Feb 29, 2012 6:33 PM, "Ed W"  wrote:
>>
>> Hi, I'm hitting an error when trying to unpack archives with the recently
> unmasked tar-1.26.  Basically any symlinks in the archive trigger an
> "unknown file" error.  This prevents me using emerge -k amongst other things
>>
>> I only see this on uclibc-0.9.33 based system, not on the build host
> which uses glibc amd64
>>
>> Can anyone else repro this and shed any light on what the problem might
> be?  Problem in tar or uclibc?
>>
>
> Can you provide a tarbalk with one file that exhibits the problem, plus an
> strafe of the attempt to unpack it?

I have seen this too and it only happens when the symlink is extracted
before the file it points to.

To reproduce:
  touch myfile
  ln -s myfile mylink
  tar -cf testcase1.tar mylink myfile

If the file comes first (tar -cf testcase2.tar myfile mylink) it will work.

The eopen("../testcase.tar", O_RDONLY|O_LARGEFILE) = 3
read(3, "mylink\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
10240) = 10240
fstat64(3, {st_mode=S_IFREG|0644, st_size=10240, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=10240, ...}) = 0
clock_gettime(CLOCK_REALTIME, {1331674689, 93257}) = 0
open("/etc/passwd", O_RDONLY)   = 4
ioctl(4, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or
TCGETS, 0x5e47954c) = -1 ENOTTY (Inappropriate ioctl for device)
brk(0x14e71000) = 0x14e71000
read(4, "root:x:0:0:root:/root:/bin/ash\nb"..., 8192) = 2853
close(4)= 0
open("/etc/group", O_RDONLY)= 4
ioctl(4, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or
TCGETS, 0x5e47954c) = -1 ENOTTY (Inappropriate ioctl for device)
read(4, "root:x:0:root\nbin:x:1:root,bin,d"..., 8192) = 1158
close(4)= 0
symlinkat("myfile", AT_FDCWD, "mylink") = 0
fstatat64(AT_FDCWD, "mylink", {st_mode=S_IFLNK|0777, st_size=6, ...},
AT_SYMLINK_NOFOLLOW) = 0
utimensat(AT_FDCWD, "mylink", {{1331674689, 930453230}, {1331674345,
0}}, AT_SYMLINK_NOFOLLOW) = 0
fstatat64(AT_FDCWD, "mylink", {st_mode=S_IFLNK|0777, st_size=6, ...},
AT_SYMLINK_NOFOLLOW) = 0
fchmodat(AT_FDCWD, "mylink", 0755)  = -1 ENOENT (No such file or directory)
write(2, "tar", 3tar)  = 3
write(2, ": ", 2: )   = 2
write(2, "mylink", 6mylink)   = 6
write(2, ": Cannot change mode to ", 24: Cannot change mode to ) = 24
write(2, "rwxr-xr-x", 9rwxr-xr-x)= 9
write(2, ": ", 2: )   = 2
write(2, "No such file or directory", 25No such file or directory) = 25
write(2, "\n", 1
)   = 1
openat(AT_FDCWD, "myfile",
O_WRONLY|O_CREAT|O_EXCL|O_NOCTTY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC,
0644) = 4
dup2(4, 4)  = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
utimensat(4, NULL, {{1331674689, 933786545}, {1331674327, 0}}, 0) = 0
close(4)= 0
clock_gettime(CLOCK_REALTIME, {1331674689, 938422399}) = 0
clock_gettime(CLOCK_REALTIME, {1331674689, 938497339}) = 0
close(3)= 0
write(2, "tar", 3tar)  = 3
write(2, ": ", 2: )   = 2
write(2, "Exiting with failure status due "..., 50Exiting with failure
status due to previous errors) = 50
write(2, "\n", 1
)   = 1
close(1)= 0
close(2)= 0
exit_group(2)   = ?
rror message from tar:
tar: mylink: Cannot change mode to rwxr-xr-x: No such file or directory
tar: Exiting with failure status due to previous errors


It's the fchmodat() that fails which makes me wonder why it works on GNU libc.

-- 
Natanael Copa
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


Re: tar-1.26 not unpacking archives with symlinks?

2012-03-13 Thread Mike Frysinger
On Tuesday 13 March 2012 17:40:38 Natanael Copa wrote:
> I have seen this too and it only happens when the symlink is extracted
> before the file it points to.
> 
> To reproduce:
>   touch myfile
>   ln -s myfile mylink
>   tar -cf testcase1.tar mylink myfile

i vaguely recall seeing this before and the issue came down to tar not 
detecting the right features.  might want to compare the config.log output 
between glibc and uclibc to see how they differ.
-mike


signature.asc
Description: This is a digitally signed message part.
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Re: tar-1.26 not unpacking archives with symlinks?

2012-03-14 Thread Natanael Copa
(resending due to uclibc blocked the uncompressed config.log)

On Wed, Mar 14, 2012 at 3:44 AM, Mike Frysinger  wrote:
> On Tuesday 13 March 2012 17:40:38 Natanael Copa wrote:
>> I have seen this too and it only happens when the symlink is extracted
>> before the file it points to.
>>
>> To reproduce:
>>   touch myfile
>>   ln -s myfile mylink
>>   tar -cf testcase1.tar mylink myfile
>
> i vaguely recall seeing this before and the issue came down to tar not
> detecting the right features.  might want to compare the config.log output
> between glibc and uclibc to see how they differ.

I don't have an glibc box handy available. Attached is the config.log
when building with uclibc on 84_64.

-- 
Natanael Copa


config.log.bz2
Description: BZip2 compressed data
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Re: tar-1.26 not unpacking archives with symlinks?

2012-03-14 Thread Ed W

On 13/03/2012 21:40, Natanael Copa wrote:

I have seen this too and it only happens when the symlink is extracted
before the file it points to.

To reproduce:
   touch myfile
   ln -s myfile mylink
   tar -cf testcase1.tar mylink myfile

If the file comes first (tar -cf testcase2.tar myfile mylink) it will work.



Thanks - interesting

On the surface I don't see why it's a problem to tar a link which 
doesn't even have a destination file..?  Dangling symlinks should be 
something that is supported?


Also, curious why older tar code works, but newer is tickling this..

I'm beyond capacity with another project at the moment - thanks for 
confirming the problem Natanael!


Cheers

Ed W
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


Re: tar-1.26 not unpacking archives with symlinks?

2012-04-01 Thread Mike Frysinger
On Wednesday 29 February 2012 12:33:02 Ed W wrote:
> Hi, I'm hitting an error when trying to unpack archives with the
> recently unmasked tar-1.26.  Basically any symlinks in the archive
> trigger an "unknown file" error.  This prevents me using emerge -k
> amongst other things
> 
> I only see this on uclibc-0.9.33 based system, not on the build host
> which uses glibc amd64
> 
> Can anyone else repro this and shed any light on what the problem might
> be?  Problem in tar or uclibc?

fchmodat() is a syscall that takes 3 args.  uClibc was providing a stub that 
treated it as 4.  i fixed things up, so if you want to try with the fix i just 
committed, that'd be nice ...
-mike


signature.asc
Description: This is a digitally signed message part.
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Re: tar-1.26 not unpacking archives with symlinks?

2012-04-03 Thread Ed W

On 02/04/2012 05:38, Mike Frysinger wrote:

On Wednesday 29 February 2012 12:33:02 Ed W wrote:

Hi, I'm hitting an error when trying to unpack archives with the
recently unmasked tar-1.26.  Basically any symlinks in the archive
trigger an "unknown file" error.  This prevents me using emerge -k
amongst other things

I only see this on uclibc-0.9.33 based system, not on the build host
which uses glibc amd64

Can anyone else repro this and shed any light on what the problem might
be?  Problem in tar or uclibc?

fchmodat() is a syscall that takes 3 args.  uClibc was providing a stub that
treated it as 4.  i fixed things up, so if you want to try with the fix i just
committed, that'd be nice ...
-mike


Excellent - many thanks

Out of the country at present - will verify on my return

Again many thanks

Ed W
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc