<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 17, 2022 at 1:58 PM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 8/16/22 14:36, enh wrote:<br>
> <br>
> <br>
> On Tue, Aug 16, 2022 at 12:22 PM enh <<a href="mailto:enh@google.com" target="_blank">enh@google.com</a> <mailto:<a href="mailto:enh@google.com" target="_blank">enh@google.com</a>>> wrote:<br>
> <br>
> <br>
> <br>
> On Tue, Aug 16, 2022 at 10:28 AM enh <<a href="mailto:enh@google.com" target="_blank">enh@google.com</a><br>
> <mailto:<a href="mailto:enh@google.com" target="_blank">enh@google.com</a>>> wrote:<br>
> <br>
> <br>
> <br>
> On Tue, Aug 16, 2022 at 1:43 AM Rob Landley <<a href="mailto:rob@landley.net" target="_blank">rob@landley.net</a><br>
> <mailto:<a href="mailto:rob@landley.net" target="_blank">rob@landley.net</a>>> wrote:<br>
> <br>
> On 8/15/22 18:50, enh via Toybox wrote:<br>
> > and here's their minimized repro case:<br>
> ><br>
> > echo > /tmp/foo.txt; echo /tmp/foo.txt > /tmp/find.txt<br>
> ><br>
> > cat /tmp/find.txt | prebuilts/build-tools/path/linux-x86/tar czf<br>
> /tmp/out.tar.gz \<br>
> > --absolute-names \<br>
> > --transform 's,^/,,' -T -<br>
> ><br>
> > This fails with<br>
> ><br>
> > tar: bad xform<br>
> <br>
> Hmmm...<br>
> <br>
> $ echo > /tmp/foo.txt; echo /tmp/foo.txt > /tmp/find.txt<br>
> $ cat /tmp/find.txt | PATH=$PWD/sub9:$PATH ./tar czf out.tar.gz \<br>
> --absolute-names --transform 's,^/,,' -T -<br>
> $ tar tvf /tmp/out.tar.gz<br>
> -rw-r--r-- landley/landley 1 2022-08-16 01:53 tmp/foo.txt<br>
> <br>
> Working for me? (The sub9 bit was because I stuck toybox sed in the<br>
> $PATH to<br>
> make sure that wasn't it...)<br>
> <br>
> <br>
> repos for me, both with their prebuilt but also with a fresh clone (on<br>
> either macos or linux):<br>
> <br>
> */tmp/toybox$ *cat /tmp/find.txt | ./toybox tar czf /tmp/out.tar.gz <br>
> --absolute-names --transform 's,^/,,' -T -<br>
> <br>
> tar: bad xform<br>
> <br>
> */tmp/toybox$ *<br>
> <br>
> <br>
> a bit of printf debugging shows we're reading nothing back:<br>
> <br>
> */tmp/toybox$ *cat /tmp/find.txt | strace -f ./toybox tar czf<br>
> /tmp/out.tar.gz --absolute-names --transform 's,^/,,' -T - 2> /tmp/out<br>
> <br>
> argv[0]="sed"<br>
> <br>
> argv[1]="-e"<br>
> <br>
> argv[2]="s,^/,,"<br>
> <br>
> pid=1779946<br>
> <br>
> stdin="/tmp/foo.txt"<br>
> <br>
> len=0 Success<br>
> <br>
> total=0 result="(null)"<br>
> <br>
> <br>
> but strace implies we're not actually exec()ing sed at all?<br>
<br>
> > Multiplexer instead of standalone build shouldn't make a difference if<br>
> > you've disabled command recursion.<br>
> <br>
> and if i `CONFIG_TOYBOX_NORECURSE=y`, it calls sed and works...<br>
> <br>
> (and, although we have NORECURSE=y on the *device*, apparently i didn't make the<br>
> equivalent change in the linux/mac host configs /facepalm) <br>
<br>
Sigh. I should have tested it anyway...<br>
<br>
And I just did and it's still working for me? Weird. Confirmed with strace that<br>
it didn't call external sed...<br></blockquote><div><br></div><div>a fresh `git clone` of your master branch?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Is this statically or dynamically linked, built against musl or bionic... grrr,<br></blockquote><div><br></div><div>glibc on debian (x86-64) and mac's anonymous libc on darwin (arm64).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
trying to build against your .config-linux from the 16th without running<br>
oldconfig causes it to throw a bunch of "CFG_WGET_LIBTLS" not defined errors.<br></blockquote><div><br></div><div>no need --- i'm just using your (macos_)?defconfig.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
And when I run oldconfig:<br>
<br>
$ ./toybox tar czf /tmp/out.tar.gz --absolute-names --transform 's,^/,,' -T<br>
/tmp/find.txt<br>
$ echo $?<br>
0<br>
<br>
Alright, let me try it in the android checkout directory... Still had to run<br>
oldconfig... And it ran fine for me.<br>
<br>
Something different about the build environment.<br></blockquote><div><br></div><div>but it's consistent across multiple users on multiple OSes, so i think it's _your_ setup that's the odd one out so far :-)</div><div><br></div><div>i've made Android's host tools consistent with the device tools for now, but there's probably _something_ for you to look into here...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Rob<br>
</blockquote></div></div>