[Toybox] [PATCH] scripts/runtest.sh: fix `toyonly` in a way that also works for mksh.

2020-12-07 Thread enh via Toybox
mksh doesn't support the =~ extension, so my previous change -- while fixing the host -- broke Android. --- scripts/runtest.sh | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) From 071720ada7d6cf1090d3279b95fc44ca566ca8d5 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 7 Dec

Re: [Toybox] [PATCH] tr: fix pathological flushing.

2020-12-05 Thread enh via Toybox
On Sat, Dec 5, 2020 at 3:38 AM Rob Landley wrote: > On 12/4/20 1:58 PM, enh via Toybox wrote: > > The AOSP build doesn't use tr (or anything that's still in pending), but > > the kernel folks have been more aggressive. They found that tr's > > pathological

[Toybox] [PATCH] tr: fix behavior if read fails.

2020-12-05 Thread enh via Toybox
--- toys/pending/tr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) From c4c3f78afe689728c374faca86bcc25ebbaba01a Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Sat, 5 Dec 2020 10:29:54 -0800 Subject: [PATCH] tr: fix behavior if read fails. --- toys/pending/tr.c | 2 +- 1 file chan

[Toybox] [PATCH] tr: fix pathological flushing.

2020-12-04 Thread enh via Toybox
The AOSP build doesn't use tr (or anything that's still in pending), but the kernel folks have been more aggressive. They found that tr's pathological flushing was adding minutes to their build times. Just removing the fflush() made tr significantly faster for my trivial test, but still slow, with

[Toybox] sed's supposed 'x' flag

2020-12-03 Thread enh via Toybox
i thought adding the 's' command's 'x' flag would be a nice warm up to trying to implement `tar --transform` ... but it turns out there's no such flag in GNU sed. we just misread the GNU tar manual (which never strictly claims this to be the case, but also didn't explicitly call out that this isn't

[Toybox] [PATCH] scripts/runtest.sh: fix `toyonly` for sed.

2020-12-03 Thread enh via Toybox
sed lies to fool autoconf, but also confuses the toybox test suite. Without this patch we're skipping all "toyonly" tests on both GNU and toybox sed. --- scripts/runtest.sh | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) From 8d983e22eae63d8adfe4484971730e062c7467ba Mon Sep 17 00:00:00 2

[Toybox] [PATCH] chmod: support complex modes.

2020-12-03 Thread enh via Toybox
Change 5109da9b3e6a898c8e0ad647303a1b375e3d97d3 caused test.test to call chmod with mode `u+s+s` which passes on the host (where you have a toybox test but a GNU chmod) but fails on Android where chmod is toybox too. Add the missing loop to string_to_mode(), which means this will also affect other

Re: [Toybox] [PATCH] readelf: harden against invalid input.

2020-11-18 Thread enh via Toybox
On Wed, Nov 18, 2020 at 1:27 AM Rob Landley wrote: > > On 11/17/20 6:29 PM, enh via Toybox wrote: > > On Thu, Nov 12, 2020 at 4:03 PM enh wrote: > >> > >> I also promised to fix readelf. Where in file(1) I made no attempt to > >> say what was bad (or even

Re: [Toybox] [PATCH] readelf: harden against invalid input.

2020-11-17 Thread enh via Toybox
On Thu, Nov 12, 2020 at 4:03 PM enh wrote: > > I also promised to fix readelf. Where in file(1) I made no attempt to > say what was bad (or even to change `goto bad` to explicitly say that > *anything* was bad), I believe that readelf is much more likely to be > shown invalid ELF

Re: [Toybox] printenv -0

2020-11-17 Thread enh via Toybox
oh: ` if (toys.optflags) delim = 0;` yeah, that would do it, and is presumably the "cheating" you mentioned :-) On Tue, Nov 17, 2020 at 12:00 PM enh wrote: > > yeah, works for me. although i don't understand _why_ that works --- i > thought the long name had to come

Re: [Toybox] printenv -0

2020-11-17 Thread enh via Toybox
yeah, works for me. although i don't understand _why_ that works --- i thought the long name had to come after the corresponding short name? new tests attached. On Tue, Nov 17, 2020 at 11:50 AM Rob Landley wrote: > > On 11/17/20 12:06 PM, enh via Toybox wrote: > > https://g

[Toybox] printenv -0

2020-11-17 Thread enh via Toybox
https://github.com/landley/toybox/commit/52bbc1e0a410b44a926b04aaae3b00f9f50da81e seems to have broken `printenv -0`. (`printenv --null` still works.) /tmp/toybox$ ./toybox printenv --null LOGNAME | xxd : 656e 6800enh. /tmp/toybox$ ./toybox printenv -0

Re: [Toybox] The wikipedia[citation needed] page is behind the times again.

2020-11-15 Thread enh via Toybox
On Sat, Nov 14, 2020, 20:02 Rob Landley wrote: > Somebody (not me) recently added a link to the busybox vs toybox talk to > the > toybox wikipedia page, and they removed it again as irrelevant. (The > Aristocrats! Wikimedia Foundation!) Maybe the bot > triggered > because it was a footnote that n

Re: [Toybox] [PATCH] date: add --iso and the %:z output format.

2020-11-15 Thread enh via Toybox
On Sun, Nov 15, 2020, 00:53 Rob Landley wrote: > On 11/14/20 5:06 PM, enh via Toybox wrote: > > I didn't know until implementing this that --iso is actually called > > --iso-8601 and that GNU date will actually accept any prefix. --iso-8 > > works fine too. I've as

[Toybox] [PATCH] date: add --iso and the %:z output format.

2020-11-14 Thread enh via Toybox
I didn't know until implementing this that --iso is actually called --iso-8601 and that GNU date will actually accept any prefix. --iso-8 works fine too. I've assumed that --iso (that I always used) and --iso-8601 (as given in the documentation) are the only two that matter. --- tests/date.test

[Toybox] [PATCH] readelf: harden against invalid input.

2020-11-12 Thread enh via Toybox
I also promised to fix readelf. Where in file(1) I made no attempt to say what was bad (or even to change `goto bad` to explicitly say that *anything* was bad), I believe that readelf is much more likely to be shown invalid ELF files, and that it would be useful to have some clue as to what's wrong

[Toybox] [PATCH] file: harden against invalid input.

2020-11-12 Thread enh via Toybox
I promised months ago I'd fix this, and there was a (not visible to the public but filed by a member of the public) bug filed against Android in the meantime, but judged No Security Impact because "toybox is not a security boundary". Anyway, it seemed high time I learned about fuzzing command-line

Re: [Toybox] FYI, devmem change

2020-11-12 Thread enh via Toybox
merged to AOSP today. i'll let you know if there's any feedback from angry kernel types. note that i am worried because "it never accepted hex addresses before" isn't true: ``` long long atolx(char *numstr) { char *c = numstr, *suffixes="cwbkmgtpe", *end; long long val; val = xstrtol(numstr,

Re: [Toybox] [PATCH] date: add --utc (synonymous with -u)

2020-11-11 Thread enh via Toybox
s patch :-) (i especially liked that the submitter showed how to search all debian source for uses of the longopts in question.) On Wed, Nov 11, 2020 at 10:07 AM enh wrote: > > --- > toys/posix/date.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) ___

[Toybox] [PATCH] date: add --utc (synonymous with -u)

2020-11-11 Thread enh via Toybox
--- toys/posix/date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) From 608089dae59b1587f3f6cdcf280cf157df77e3de Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 11 Nov 2020 10:07:01 -0800 Subject: [PATCH] date: add --utc (synonymous with -u) --- toys/posix/date.c | 2 +- 1 fil

[Toybox] [PATCH] file: identify Android Binary XML.

2020-11-11 Thread enh via Toybox
Android is introducing a new binary XML format that is a drop-in replacement for many existing .xml files written by system_server. Since engineers may be surprised when encountering this new format, add it to the "file" tool to aid identification in the field. --- toys/posix/file.c | 5 + 1 f

Re: [Toybox] [PATCH] Make it easier to switch regex implementations.

2020-11-10 Thread enh via Toybox
On Tue, Nov 10, 2020 at 12:54 AM Rob Landley wrote: > > On 11/5/20 6:12 PM, enh wrote: > > On Mon, Nov 2, 2020 at 6:40 PM Rob Landley wrote: > >> > >> On 11/2/20 1:55 PM, enh wrote: > >>> On Fri, Oct 30, 2020 at 7:12 PM Rob Landley wrote: > &

[Toybox] [PATCH] xregcomp: add the specific regex we couldn't parse to the error message.

2020-11-06 Thread enh via Toybox
This makes it more likely that you can actually debug something like "sed: bad regex: empty (sub)expression" or "sed: bad regex: parentheses not balanced" from a build failure log, where you don't necessarily know where the failure came from. This also seems like it might be useful generally, alth

Re: [Toybox] [PATCH] Make it easier to switch regex implementations.

2020-11-05 Thread enh via Toybox
On Mon, Nov 2, 2020 at 6:40 PM Rob Landley wrote: > > On 11/2/20 1:55 PM, enh wrote: > > On Fri, Oct 30, 2020 at 7:12 PM Rob Landley wrote: > >> On 10/28/20 7:06 PM, enh via Toybox wrote: > >>> One reason to use toybox on the host is to get the same behavior

[Toybox] [PATCH] portability.h: ensure _FILE_OFFSET_BITS=64 takes effect.

2020-11-05 Thread enh via Toybox
I added a #include above this, which caused subtle breakages on 32-bit systems. Move it to the top of the file to fix it and avoid making a similar mistake in future. --- lib/portability.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) From 1ef988963269592ff1b92e40acbf6312f3e78597 Mo

Re: [Toybox] bionic?

2020-11-02 Thread enh via Toybox
On Mon, Nov 2, 2020 at 4:35 PM scsijon wrote: > > Date: Mon, 2 Nov 2020 11:55:01 -0800 > > From: enh > > To: Rob Landley > > Cc: toybox > > Subject: Re: [Toybox] [PATCH] Make it easier to switch regex > > implementations. > > Message-ID: > &

Re: [Toybox] [PATCH] Make it easier to switch regex implementations.

2020-11-02 Thread enh via Toybox
On Fri, Oct 30, 2020 at 7:12 PM Rob Landley wrote: > > > > On 10/28/20 7:06 PM, enh via Toybox wrote: > > One reason to use toybox on the host is to get the same behavior across > > Android/Linux/macOS. Unfortunately (as we've seen from a few bugs) one > > ar

Re: [Toybox] [PATCH] toys.h: remove unused declaration.

2020-11-02 Thread enh via Toybox
On Sat, Oct 31, 2020 at 8:12 AM Rob Landley wrote: > > On 10/28/20 4:35 PM, enh wrote: > > On Wed, Oct 28, 2020 at 2:26 PM Rob Landley wrote: > >> > >> On 10/28/20 10:47 AM, enh wrote: > >>> yeah, i don't have any particular use for it myself, but

[Toybox] [PATCH] Make it easier to switch regex implementations.

2020-10-28 Thread enh via Toybox
One reason to use toybox on the host is to get the same behavior across Android/Linux/macOS. Unfortunately (as we've seen from a few bugs) one area where that doesn't quite work is that toybox uses the libc regular expression implementation. That's fine, and mostly what users want, but those folks

Re: [Toybox] [PATCH] toys.h: remove unused declaration.

2020-10-28 Thread enh via Toybox
On Wed, Oct 28, 2020 at 2:26 PM Rob Landley wrote: > > On 10/28/20 10:47 AM, enh wrote: > > yeah, i don't have any particular use for it myself, but i accept the > > "behave more like the thing you're replacing" argument and i don't see > > any pr

Re: [Toybox] [PATCH] toys.h: remove unused declaration.

2020-10-28 Thread enh via Toybox
of people who don't know about `--` but would feel weird adding that everywhere. i did wonder about having "Try `toybox --help` for general information about arguments." automatically appended everywhere but i don't actually know whether anyone who doesn't know the stuff

[Toybox] [PATCH] toys.h: remove unused declaration.

2020-10-27 Thread enh via Toybox
--- toys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) From 1b718c66794596c088787ad058b0e23564284e69 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 27 Oct 2020 16:08:19 -0700 Subject: [PATCH] toys.h: remove unused declaration. --- toys.h | 2 +- 1 file changed, 1 insertion(+

Re: [Toybox] [PATCH] tar: add -I (--use-compress-program) support.

2020-10-20 Thread enh via Toybox
On Tue, Aug 25, 2020 at 1:20 AM Rob Landley wrote: > > On 8/24/20 12:15 PM, enh via Toybox wrote: > > unfortunately, -I was just the easy request... they also want --transform. > > > > this is the specific command: > > > > tar -I $(KGZIP) -c $(RCS_TAR_IGNORE)

Re: [Toybox] [PATCH] tar: fix heap buffer overrun.

2020-10-19 Thread enh via Toybox
On Thu, Oct 15, 2020 at 9:22 PM Rob Landley wrote: > > > > On 10/15/20 7:45 PM, enh wrote: > > On Thu, Oct 15, 2020 at 5:21 PM Rob Landley wrote: > >> > >> On 10/14/20 3:21 PM, enh wrote: > >>> i've sent a new fix that just touches dirtree_p

Re: [Toybox] [PATCH] tar: fix heap buffer overrun.

2020-10-15 Thread enh via Toybox
On Thu, Oct 15, 2020 at 5:21 PM Rob Landley wrote: > > On 10/14/20 3:21 PM, enh wrote: > > i've sent a new fix that just touches dirtree_path() so that it always > > honors the size request again. > > Applied, and then cosmetically fiddled with because I do tha

Re: [Toybox] sort -V test?

2020-10-15 Thread enh via Toybox
one reason bionic doesn't implement strverscmp() is that afaik not even the GNU tools use it. they all have slightly different ideas about how versions should be sorted :-/ (i'll also note that the old behavior matches sort's/librarians' general "something comes before nothing" rule, so the new be

Re: [Toybox] [PATCH] dirtree_path: always honor size request.

2020-10-15 Thread enh via Toybox
; On 10/14/20 3:19 PM, enh via Toybox wrote: > > tar asks dirtree_path() to reserve space for a trailing '/', but recent > > changes broke that for the case that was resolving to just a strdup(). > > > > Caught by `export ASAN=1` and `make test_tar`. > > P

[Toybox] [PATCH] chattr.test: don't fail on f2fs with compression enabled.

2020-10-15 Thread enh via Toybox
f2fs with compression enabled only lets you `chattr +c` on an empty file. --- tests/chattr.test | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) From 18b5e9287d7203795f703797d54c98c2f04140b0 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 15 Oct 2020 16:48:57 -0700 Subject: [P

Re: [Toybox] [PATCH] dirtree_path: always honor size request.

2020-10-15 Thread enh via Toybox
thanks. your cleanup works too --- i'd used xzalloc because i'm paranoid, but since tar is using strcat() to append "/" that's fine :-) On Thu, Oct 15, 2020 at 1:47 PM Rob Landley wrote: > > On 10/14/20 3:19 PM, enh via Toybox wrote: > > tar asks dirtree_p

[Toybox] [PATCH] stty: don't mangle c_iflags.

2020-10-14 Thread enh via Toybox
Fixes https://github.com/landley/toybox/issues/251 where `stty 300` was mangling c_iflags to 0x300 because even if we don't match a full hex specification of struct termios, sscanf() will have overwritten the first value, which is c_iflag. --- toys/pending/stty.c | 10 +++--- 1 file changed, 7

Re: [Toybox] [PATCH] tar: fix heap buffer overrun.

2020-10-14 Thread enh via Toybox
On Wed, Oct 14, 2020 at 1:56 AM Rob Landley wrote: > > On 10/13/20 4:19 PM, enh via Toybox wrote: > > tar was assuming the old behavior of dirtree_path() where there was > > always a spare byte free at the end. > > It's not the old behavior, tar.c is doing:

[Toybox] [PATCH] dirtree_path: always honor size request.

2020-10-14 Thread enh via Toybox
tar asks dirtree_path() to reserve space for a trailing '/', but recent changes broke that for the case that was resolving to just a strdup(). Caught by `export ASAN=1` and `make test_tar`. --- lib/dirtree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) From f1e716f962c2532a068da1e0d4b

[Toybox] [PATCH] tar: fix heap buffer overrun.

2020-10-13 Thread enh via Toybox
tar was assuming the old behavior of dirtree_path() where there was always a spare byte free at the end. Since removing that seems to have been an intentional change to dirtree_path(), change the caller to resize the string itself. Caught by ASan. --- toys/posix/tar.c | 9 +++-- 1 file change

[Toybox] ls test breakage

2020-10-12 Thread enh via Toybox
haven't had chance to take a look, but this seems to have broken the ls tests (seen on the github CI but also reproduced locally): commit 67bd0be1a4ed817954c9dcededf9bd9cb8c2f431 Author: Rob Landley Date: Sun Oct 11 02:59:54 2020 -0500 toysh: more variable/wildcard plumbing and tests. FA

Re: [Toybox] another dirtree regression

2020-10-06 Thread enh via Toybox
yeah, that patch fixes it for me. i'll sync AOSP. thanks! On Tue, Oct 6, 2020 at 1:43 PM Rob Landley wrote: > On 10/6/20 3:02 PM, enh via Toybox wrote: > > the recent dirtree changes seem to have regressed find(1): `find /etc/ > -maxdepth > > 1` now shows /etc//passwd

[Toybox] another dirtree regression

2020-10-06 Thread enh via Toybox
the recent dirtree changes seem to have regressed find(1): `find /etc/ -maxdepth 1` now shows /etc//passwd rather than /etc/passwd. haven't had chance to have a look at why yet... ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/

Re: [Toybox] tar test failures

2020-10-05 Thread enh via Toybox
On Fri, Oct 2, 2020 at 9:37 PM Rob Landley wrote: > On 10/2/20 4:13 PM, enh via Toybox wrote: > > bonus question: why didn't the toybox CI catch this? looks like the tar > tests > > aren't being run there for some reason, despite the `make > > defconfig`? http

Re: [Toybox] tar test failures

2020-10-02 Thread enh via Toybox
ain. isn't that a bug for everything not in pending? On Fri, Oct 2, 2020 at 2:06 PM enh wrote: > i haven't had time to look properly (and probably won't for a couple of > weeks), but this change seems to have badly broken tar, causing lots of the > tar tests to crash: &g

[Toybox] tar test failures

2020-10-02 Thread enh via Toybox
i haven't had time to look properly (and probably won't for a couple of weeks), but this change seems to have badly broken tar, causing lots of the tar tests to crash: commit 0d73d98537e4c058537ffa735b8592d1a89a1028 Author: Rob Landley Date: Sat Sep 26 23:42:38 2020 -0500 Teach dirtree tha

Re: [Toybox] [PATCH] Add fflush to lib/password; remove print from stty

2020-09-16 Thread enh via Toybox
I think I added that logging because that's what the "real" atty outputs. On Wed, Sep 16, 2020, 08:02 Chris Sarra via Toybox wrote: > Hey Rob, > I removed that xprintf in stty from our copy a long time ago to get rid > of a log we didn't really need, but that change can be ignored if others > f

Re: [Toybox] [PATCH] top: don't report GiB sizes in KiB.

2020-09-14 Thread enh via Toybox
On Mon, Sep 14, 2020 at 2:33 PM Rob Landley wrote: > On 9/14/20 2:49 PM, enh wrote: > > i think it will, it's just neither very helpful nor clear: > > > > ~$ top --version > > top: inappropriate '-version' > > Usage: > > top -hv | -bc

Re: [Toybox] [PATCH] top: don't report GiB sizes in KiB.

2020-09-14 Thread enh via Toybox
On Fri, Sep 11, 2020 at 4:48 PM Rob Landley wrote: > On 9/11/20 2:11 PM, enh wrote: > > Right now I have a patch to make the commas just care about > "1,234.5" vs > > "1.234,5" as a binary choice (which covers the vast majority of the > planet,

Re: [Toybox] [PATCH] lib/lib human_readable_long fix utf-8 LC_NUMERIC

2020-09-11 Thread enh via Toybox
On Wed, Sep 9, 2020 at 11:15 PM Rob Landley wrote: > On 9/9/20 7:19 PM, enh via Toybox wrote: > > don't apps need libc localization? not really. the POSIX localization > > functionality is so anaemic that it's really not useful even for "major > > minority&qu

Re: [Toybox] [PATCH] top: don't report GiB sizes in KiB.

2020-09-11 Thread enh via Toybox
On Fri, Sep 11, 2020 at 11:41 AM Rob Landley wrote: > On 9/10/20 1:42 PM, enh wrote: > > The design is short of shifting out from under human_readable(). The > above > > probably fixes it, but if this happens again I should step back and > rethink the > >

Re: [Toybox] [PATCH] top: don't report GiB sizes in KiB.

2020-09-10 Thread enh via Toybox
On Thu, Sep 10, 2020 at 1:42 AM Rob Landley wrote: > This is sort of moot now, but I composed it and hadn't hit send and it did > explain what I was thinking at the time, so... > > On 9/8/20 1:55 PM, enh wrote: > > > > > > On Mon, Sep 7, 2020 at 1:29 PM Rob

Re: [Toybox] [PATCH] lib/lib human_readable_long fix utf-8 LC_NUMERIC

2020-09-09 Thread enh via Toybox
if you've ever wondered why the same person (me) worked so hard to ensure that OEMs couldn't remove locale data from icu4c but also personally removed all the localization from the core Java libraries and libc... i'd always been a strong proponent of localization, but one of the first things i did

[Toybox] [PATCH] blkid: don't show empty tags.

2020-09-09 Thread enh via Toybox
The util-linux blkid (even if explicitly asked with -s) won't show you a tag with no value. --- toys/other/blkid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) From 5072ada1d7feae02161400650dfaf120f12d56f8 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 9 Sep 2020 12:31:50 -0700

Re: [Toybox] [PATCH] top: don't report GiB sizes in KiB.

2020-09-08 Thread enh via Toybox
On Mon, Sep 7, 2020 at 1:29 PM Rob Landley wrote: > On 9/6/20 6:45 AM, Jarno Mäkipää wrote: > > On Sun, Sep 6, 2020 at 12:34 PM Rob Landley wrote: > >> Elliott says there's a maximum limit on the number of digits users are > willing > >> to parse, and you're saying it's better to just have large

Re: [Toybox] Android binaries?

2020-09-08 Thread enh via Toybox
On Thu, Sep 3, 2020 at 11:34 PM Rob Landley wrote: > On 9/3/20 10:02 AM, enh wrote: > > Isn't it 6 digits now? 99 processes? (Didn't we have this > discussion already > > about ps? In theory top inherits that code...) > > > > > > Yes, b

Re: [Toybox] Android binaries?

2020-09-03 Thread enh via Toybox
On Thu, Sep 3, 2020, 01:04 Rob Landley wrote: > On 9/2/20 12:01 PM, enh wrote: > > if you choose sdk_arm64 (or sdk_x86_64) off ci.android.com > > <http://ci.android.com>, click on the little "download" icon on most > recent > > green build (or whicheve

Re: [Toybox] [PATCH] top: don't report GiB sizes in KiB.

2020-09-03 Thread enh via Toybox
value. So hard-coding MiB might be better in that it would be more likely to stick rather than getting reverted. Want me to send that patch? On Thu, Sep 3, 2020, 01:05 Rob Landley wrote: > On 9/2/20 12:01 PM, enh via Toybox wrote: > > 6 digits seems like a reasonable compromise for rea

[Toybox] [PATCH] top: don't report GiB sizes in KiB.

2020-09-02 Thread enh via Toybox
6 digits seems like a reasonable compromise for readability? That will still give KiB on tiny systems, but MiB on reasonable systems. The existing 8 digits gives numbers far too large to grok. This also matches procps top on my machine, though maybe that's hard-coded to always use MiB? --- toys/p

Re: [Toybox] Android binaries?

2020-09-02 Thread enh via Toybox
ng that we should change top to not use KiB on a machine with 64GiB of RAM, and that we need to examine /proc/sys/kernel/pid_max to know how wide pid fields need to be again :-) On Fri, Aug 21, 2020 at 4:36 PM enh wrote: > > > On Thu, Aug 20, 2020 at 3:57 AM Rob Landley wrote: > >

[Toybox] [PATCH] xparsedate: support default date(1) output format.

2020-08-27 Thread enh via Toybox
This round trip occurs in practice with $KBUILD_BUILD_TIMESTAMP in kernel builds. --- lib/xwrap.c | 1 + tests/date.test | 4 2 files changed, 5 insertions(+) From 3dec968f901aef270cb1d9809a2f6aa459e54e3e Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 27 Aug 2020 09:37:25 -0700

[Toybox] [PATCH] tar.test: fix the -Igzip test to work with toybox file.

2020-08-25 Thread enh via Toybox
a, from Unix\n" "" "" +testing "-I gzip c" \ + "$TAR -Igzip file | file - | grep -q 'gzip compressed' && echo okay" \ + "okay\n" "" "" testing "-I gzip t" 'LST -Igzip -f "$FILES"

Re: [Toybox] [PATCH] tar: add -I (--use-compress-program) support.

2020-08-24 Thread enh via Toybox
On Sun, Aug 23, 2020 at 11:28 PM Rob Landley wrote: > On 8/22/20 2:45 PM, enh via Toybox wrote: > > This also changes the other compression options (such as -j) so that we > > pass no arguments for compression and just -d for decompression, which > > is what -I does to

Re: [Toybox] Android binaries?

2020-08-24 Thread enh via Toybox
On Mon, Aug 24, 2020 at 9:53 AM Rich Felker wrote: > On Sun, Aug 23, 2020 at 11:54:12PM -0500, Rob Landley wrote: > > On 8/21/20 6:36 PM, enh wrote: > > > I'm writing a "reporting bugs" FAQ entry because of the recent > github thread. > > > > &

Re: [Toybox] [PATCH] Introducing toys/pending/watchdog.c

2020-08-24 Thread enh via Toybox
On Sun, Aug 23, 2020 at 11:59 PM Rob Landley wrote: > On 8/22/20 3:05 PM, enh via Toybox wrote: > > On Sat, Aug 22, 2020 at 11:22 AM Chris Sarra via Toybox > > mailto:toybox@lists.landley.net>> wrote: > > > > This patch introduces a simple watchdog implement

Re: [Toybox] Android binaries?

2020-08-24 Thread enh via Toybox
On Sun, Aug 23, 2020 at 9:45 PM Rob Landley wrote: > On 8/21/20 6:36 PM, enh wrote: > > > > > > On Thu, Aug 20, 2020 at 3:57 AM Rob Landley > <mailto:r...@landley.net>> wrote: > > > > You said way back when that you were thinking of putting up

Re: [Toybox] [PATCH] Introducing toys/pending/watchdog.c

2020-08-22 Thread enh via Toybox
On Sat, Aug 22, 2020 at 11:22 AM Chris Sarra via Toybox < toybox@lists.landley.net> wrote: > This patch introduces a simple watchdog implementation for toybox. We > send the appropriate ioctls to set the relevant timeouts, and intercept > signals to safely shut down if required. > --- > toys/pend

[Toybox] [PATCH] tar: add -I (--use-compress-program) support.

2020-08-22 Thread enh via Toybox
--- a/tests/tar.test +++ b/tests/tar.test @@ -161,6 +161,13 @@ testing "manually specify bz2" 'LST -jf "$FILES"/tar/tar.tbz2' \ "drwxr-x--- enh/eng 0 2017-05-13 01:05 dir/\n-rw-r- enh/eng 12 2017-05-13 01:05 dir/file\n" \ "" ""

Re: [Toybox] Android binaries?

2020-08-21 Thread enh via Toybox
On Thu, Aug 20, 2020 at 3:57 AM Rob Landley wrote: > You said way back when that you were thinking of putting up downloadable > current > toybox android-built binaries somewhere. Did that ever happen? > the "build a static toybox" part did, but the "add it to the artifacts" part didn't. the NDK

Re: [Toybox] [PATCH] xputsl: fix the *other* line in this function :-)

2020-08-21 Thread enh via Toybox
i was going to suggest that you might want to take some time off, or at least try to get more sleep :-) On Fri, Aug 21, 2020 at 2:53 PM Rob Landley wrote: > On 8/21/20 1:02 PM, enh via Toybox wrote: > > Some of the grep tests were still failing because we weren't flushing > &g

Re: [Toybox] [PATCH] xputsl: write to stdout, not stdin!

2020-08-21 Thread enh via Toybox
g list. (this is github being helpful, btw --- i haven't even tried to sync AOSP yet. i'm just looking at the commits with the red X next to them on https://github.com/landley/toybox/commits/master. ) On Wed, Aug 19, 2020 at 11:59 PM Rob Landley wrote: > On 8/19/20 7:33 PM, enh via Toybo

[Toybox] [PATCH] xputsl: fix the *other* line in this function :-)

2020-08-21 Thread enh via Toybox
Some of the grep tests were still failing because we weren't flushing stdout --- xflush takes a bool that says whether to actually flush, so we need to pass 1, not 0. --- lib/xwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) From b59ed3613b44aa07f9844f95abfc4d789ca4773d Mon Sep 17 00:0

[Toybox] [PATCH] Fix cp -P to not follow symlinks.

2020-08-21 Thread enh via Toybox
Also fix help text to say that it is not the default. [this patch originally uploaded by mast at https://android-review.googlesource.com/c/platform/external/toybox/+/1406088; if i'd realized i could get a patch text file in one click directly from gerrit, i'd have forwarded this last night before

Re: [Toybox] [PATCH] cpio: fixes for Android kernel build.

2020-08-21 Thread enh via Toybox
On Fri, Aug 21, 2020 at 3:06 AM Rob Landley wrote: > > > On 8/19/20 6:05 PM, enh wrote: > > > > On Wed, Aug 19, 2020 at 3:59 PM Rob Landley > <mailto:r...@landley.net>> wrote: > > > > > > > > On 8/19/20 4:51 PM, enh via Toybox wrote:

[Toybox] [PATCH] xputsl: write to stdout, not stdin!

2020-08-19 Thread enh via Toybox
This is why the tests have been failing since 42303209f44a335025b9cd1dbe5dd2f3069f2e99. --- lib/xwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 0001-xputsl-write-to-stdout-not-stdin.patch Description: Binary data ___ Toybox mailing list T

Re: [Toybox] [PATCH] xputsl: remove unused variable.

2020-08-19 Thread enh via Toybox
(fix for the bigger problem sent to list.) On Wed, Aug 19, 2020 at 3:47 PM enh wrote: > hmm the change that caused this build warning might have bigger > problems though --- it seems to have broken tests on both macOS and > Ubuntu: https://github.com/landley/toybox/runs/10052409

Re: [Toybox] [PATCH] cpio: fixes for Android kernel build.

2020-08-19 Thread enh via Toybox
On Wed, Aug 19, 2020 at 3:59 PM Rob Landley wrote: > > > On 8/19/20 4:51 PM, enh via Toybox wrote: > > Allow -pd to work by changing -p from an option that takes an > > argument to an option that implies there will be an argument (that > > is, `-pd x` is `-p -d x` wit

Re: [Toybox] [PATCH] xputsl: remove unused variable.

2020-08-19 Thread enh via Toybox
hmm the change that caused this build warning might have bigger problems though --- it seems to have broken tests on both macOS and Ubuntu: https://github.com/landley/toybox/runs/1005240909 On Wed, Aug 19, 2020 at 11:28 AM enh wrote: > > --- > lib/xwrap.c | 2 -- > 1 fil

[Toybox] [PATCH] cpio: fixes for Android kernel build.

2020-08-19 Thread enh via Toybox
Allow -pd to work by changing -p from an option that takes an argument to an option that implies there will be an argument (that is, `-pd x` is `-p -d x` with x being the directory for -p, rather than `-p d x` with d being the directory, as we previously interpreted it). Fix -d (aka --make-directo

[Toybox] [PATCH] xputsl: remove unused variable.

2020-08-19 Thread enh via Toybox
--- lib/xwrap.c | 2 -- 1 file changed, 2 deletions(-) 0001-xputsl-remove-unused-variable.patch Description: Binary data ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] GitHub Apps - Repo Lockdown · GitHub

2020-08-19 Thread enh via Toybox
On Wed, Aug 19, 2020 at 12:21 AM Rob Landley wrote: > On 8/18/20 12:17 PM, enh wrote: > > But closing it, I have to navigate to the website which I'm not > always logged > > into even when I am online. (Why github-generated .patch files don't > have

Re: [Toybox] GitHub Apps - Repo Lockdown · GitHub

2020-08-18 Thread enh via Toybox
On Tue, Aug 18, 2020 at 1:54 AM Rob Landley wrote: > On 8/17/20 10:55 AM, enh wrote: > > On Sun, Aug 16, 2020 at 8:14 PM Rob Landley wrote: > >> > >> On 8/16/20 2:31 PM, enh via Toybox wrote: > >>> https://github.com/apps/repo-lockdown > >>>

Re: [Toybox] GitHub Apps - Repo Lockdown · GitHub

2020-08-17 Thread enh via Toybox
If we're lucky, Eric will know how to set them up to go to the mailing list... On Mon, Aug 17, 2020, 11:45 Rob Landley wrote: > On 8/16/20 10:23 PM, Rob Landley wrote: > > On 8/16/20 2:31 PM, enh via Toybox wrote: > >> https://github.com/apps/repo-lockdown > >>

Re: [Toybox] GitHub Apps - Repo Lockdown · GitHub

2020-08-17 Thread enh via Toybox
On Sun, Aug 16, 2020 at 8:14 PM Rob Landley wrote: > > On 8/16/20 2:31 PM, enh via Toybox wrote: > > https://github.com/apps/repo-lockdown > > > > Turns out there is a way to automate telling folks with pull requests to > > try the > > mailing list instead. Se

[Toybox] GitHub Apps - Repo Lockdown · GitHub

2020-08-16 Thread enh via Toybox
https://github.com/apps/repo-lockdown Turns out there is a way to automate telling folks with pull requests to try the mailing list instead. See link. (This came up on the tzdata mailing list. I have no personal experience.) ___ Toybox mailing list Toyb

Re: [Toybox] [PATCH] list_signals: fit to window size.

2020-08-13 Thread enh via Toybox
if you're wondering "does busybox do this?" which i should have mentioned in the commit message but forgot to... this isn't relevant for busybox because they just output one per line, which is unreadable in a different way :-) On Thu, Aug 13, 2020 at 9:32 AM enh wrote: >

[Toybox] [PATCH] list_signals: fit to window size.

2020-08-13 Thread enh via Toybox
Helps for terminals narrower than 80 columns (such as ConnectBot on a current Android device). --- lib/lib.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) From 8b8cde8f2306ebc8aea281e5f048693f6b73e662 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 13 Aug 2020 09:31:04 -07

[Toybox] [PATCH] toybox: fit list of commands in terminal width.

2020-08-13 Thread enh via Toybox
This can still be pretty ragged because it just leaves space for the longest name at the end of each line rather than measuring the name that actually comes next, but at least with this change we never over-run. I noticed this because ConnectBot on my current device gives me a 60-column terminal.

[Toybox] [PATCH] getty: ensure utmp is updated.

2020-08-11 Thread enh via Toybox
The key issues here turned out to be that getty is responsible for creating the file if it doesn't exist, and that the -H flag doesn't control whether utmp is updated, but whether or not to override the hostname within the utmp entry. While I'm here switch to the more modern utx APIs that all the

Re: [Toybox] Horrible microsoft github tests spamming me.

2020-08-11 Thread enh via Toybox
which projects go to which email addresses. > huh. annoyingly, i only seem to have android, android-ndk, and google listed there. (if i click on "things you're watching", toybox is in *that* list, but the "change notification settings" on that page just takes me back to wh

Re: [Toybox] toybox: xargs: add actual support for -P max-proc flag

2020-08-10 Thread enh via Toybox
On Mon, Aug 3, 2020 at 12:09 PM enh wrote: > On Mon, Aug 3, 2020 at 3:52 AM Rob Landley wrote: > > > > On 7/31/20 4:19 PM, Mark Salyzyn via Toybox wrote: > > > On 7/31/20 12:30 PM, Mark Salyzyn wrote: > > >> -P flag was fake just to provide compatibility

Re: [Toybox] Horrible microsoft github tests spamming me.

2020-08-05 Thread enh via Toybox
On Tue, Aug 4, 2020 at 8:40 PM Rob Landley wrote: > > > > On 8/4/20 10:38 AM, enh wrote: > > On Mon, Aug 3, 2020 at 11:41 PM Rob Landley wrote: > >> > >> I got email about https://github.com/landley/toybox/runs/940149373 in > >> which one > >

Re: [Toybox] Horrible microsoft github tests spamming me.

2020-08-04 Thread enh via Toybox
i the only one who shudders at that word because it's only really used in connection with Vichy France, and has no positive connotations for me? > - Eric > > On Tue, Aug 4, 2020 at 4:38 PM enh via Toybox > wrote: >> >> On Mon, Aug 3, 2020 at 11:41 PM Rob Landley wro

Re: [Toybox] [PATCH] xparsedate: support UTC offsets.

2020-08-04 Thread enh via Toybox
On Tue, Aug 4, 2020 at 3:27 AM Rob Landley wrote: > > On 8/3/20 7:07 PM, enh via Toybox wrote: > > Requested in https://github.com/landley/toybox/issues/130, quoting an > > old version of the toybox help. > > The magic tz[10] length is ok within a function, but passing a

[Toybox] [PATCH] date.test: add more UTC offset tests.

2020-08-04 Thread enh via Toybox
Rob's code supports more formats than mine did, so add the extra tests. --- tests/date.test | 9 + 1 file changed, 9 insertions(+) From f2f627f72b84e4dc455e94ed59dea1f5dc3341e1 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 4 Aug 2020 10:12:51 -0700 Subject: [PATCH] date.test: a

Re: [Toybox] Horrible microsoft github tests spamming me.

2020-08-04 Thread enh via Toybox
On Mon, Aug 3, 2020 at 11:41 PM Rob Landley wrote: > > I got email about https://github.com/landley/toybox/runs/940149373 in which > one > of the cpio tests spuriously failed. I cannot cut and paste the failure > because > microsoft github's crammed so much javascript into the reporting page tha

[Toybox] [PATCH] xparsedate: support UTC offsets.

2020-08-03 Thread enh via Toybox
Requested in https://github.com/landley/toybox/issues/130, quoting an old version of the toybox help. This is also supported by coreutils. Set $LANG to C in the date tests so that they pass with TEST_HOST=1 (they were already failing for me, presumably related to a newer glibc). --- lib/xwrap.c

<    4   5   6   7   8   9   10   11   12   13   >