[Toybox] Navigating googlesource?

Yifan Hong elsk at google.com
Wed Apr 5 15:13:36 PDT 2023


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.

Note: The ./prebuilts/build-tools/path/linux-x86/tar is where we have a
symlink to the toybox binary. The toybox binary we are on is:
https://cs.android.com/android/_/android/platform/prebuilts/build-tools/+/ed9e3dea4e2a234cb4557280b7663dcbb2b5d288:linux-x86/bin/toybox;bpv=1
which is compiled from this hash:
https://android.googlesource.com/platform/external/toybox/+/6b6578da250d89a0a5929d4639fd8e44303c5a3d
"Add new test for "directory exists" and make TEST_HOST less chatty."

Could you please take a look? Thanks!

On Wed, Apr 5, 2023 at 2:33 PM enh <enh at google.com> wrote:

> typing the path name into cs.android.com is probably your best bet. that
> gets me
> https://cs.android.com/android/kernel/superproject/+/common-android-mainline:build/kernel/kleaf/impl/image/initramfs.bzl;bpv=0
> (and there's either a git blame "layer" or a little history tab you can pop
> up at the bottom).
>
> coincidentally,
> https://android-review.googlesource.com/c/kernel/build/+/2524056 is the
> attempt to switch back to toybox tar, which elsk@ is trying to do right
> now :-)
>
>
>
> On Wed, Apr 5, 2023 at 2:20 PM Rob Landley <rob at landley.net> wrote:
>
>> I have https://android-review.googlesource.com/c/kernel/build/+/2389693
>> open and
>> I think I fixed that in commit a3fc87752193 but I can't tell if the
>> workaround
>> ever got removed? (Or needed to be?)
>>
>> Clicking through to the initramfs.bzi file mentions TODO(b/243737262
>> <https://buganizer.corp.google.com/243737262>) but I
>> don't know how to access that...
>>
>> Is there something left for me to do here, or can I close the tab?
>>
>> Rob
>> _______________________________________________
>> Toybox mailing list
>> Toybox at lists.landley.net
>> http://lists.landley.net/listinfo.cgi/toybox-landley.net
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20230405/8cf3a45e/attachment-0001.htm>
-------------- next part --------------
$ rm -rf out/tmp

$ mkdir -p out/tmp

$ touch out/tmp/foo

$ ./prebuilts/build-tools/path/linux-x86/tar cvzf out/me.tar.gz -C out/tmp .
./
./foo

$ ./prebuilts/build-tools/path/linux-x86/tar tvf out/me.tar.gz
drwxr-xr-x elsk/primarygroup         0  2023-04-05 14:29 ./
-rw-r--r-- elsk/primarygroup         0  2023-04-05 14:29 ./foo

$ rm -rf out/tmp; mkdir -p out/tmp; ./prebuilts/build-tools/path/linux-x86/tar xvf out/me.tar.gz -C out/tmp ./foo

$ ls -lh out/tmp
total 0

$ rm -rf out/tmp; mkdir -p out/tmp; ./prebuilts/build-tools/path/linux-x86/tar xvf out/me.tar.gz -C out/tmp --wildcards '*foo'
./foo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: repro.sh
Type: application/x-shellscript
Size: 437 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20230405/8cf3a45e/attachment-0001.bin>


More information about the Toybox mailing list