[Toybox] Navigating googlesource?

Rob Landley rob at landley.net
Thu Apr 6 07:55:00 PDT 2023


On 4/5/23 17:13, Yifan Hong wrote:
> Hello Rob Landley,
> 
> The hack has not been reverted yet, but I'll do this immediately
> (https://android-review.git.corp.google.com/c/kernel/build/+/2525840). I'll
> also revert other hacks.
> 
> A separate issue I see with the prebuilt tar is that it doesn't seem to extract
> a single file prefixed with `./`. This is best illustrated with the following
> example (see attached repro.sh and result.txt)
> 
> That is, if an archive contains `./foo` as a entry, then extracting with `tar xf
> foo.tar.gz ./foo` doesn't seem to extract the file properly.

Huh, looks like I broke that since the 0.8.9 release. And what's _really_ weird is:

$ ./tar cv ./README > fweep.tar
./README
$ ./tar tv ./README < fweep.tar
$ ./tar cv ./README | ./tar tv ./README
./README

Doesn't work when written to/from a file but does when piping between two
processes? Something to do with the changed exit path  maybe? I wonder what
strace says...

openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 3
...
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
...
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 3

I hate glibc.

> Could you please take a look? Thanks!

Looking...

Rob


More information about the Toybox mailing list