4577 Commits

Author SHA1 Message Date
Rob Landley
e04cf99288 Add README files for binaries. 2022-05-05 02:58:25 -05:00
Rob Landley
d69a77d817 Add a few more things macos should be able to build. 2022-05-04 22:54:03 -05:00
Rob Landley
15839e5b61 First stab at an android_defconfig.
Not actually used by the android build, but I should keep better track.
Based on .config-device in the Android tree.
2022-05-04 22:30:56 -05:00
Rob Landley
529fe97a4b Add the two options netbsd has for this command. 2022-05-04 19:34:58 -05:00
Rob Landley
c3c3670b9d Quick pass over the roadmap. 2022-05-04 08:31:22 -05:00
Elliott Hughes
c6cb9445e2 xxd -r: don't seek unnecessarily on the output stream.
Also add a dup() to fix a double close() noticed in strace when looking at
the lseek() issue...

Fixes: https://github.com/landley/toybox/issues/338
2022-05-04 02:43:43 -05:00
Rob Landley
14efda08aa Display label properly. 2022-05-03 03:22:51 -05:00
Rob Landley
3e6797bb69 Remove obsolete config symbols. 2022-05-02 23:22:03 -05:00
Rob Landley
bc6d3db757 Add mkroot dynamic linking support, ala "scripts/mkroot.sh dynamic". 2022-05-02 19:15:03 -05:00
Rob Landley
b24289340e Only at one #define __MUSL__ to features.h. 2022-05-01 03:39:03 -05:00
Rob Landley
0a2b9b9dc4 When building musl-git-master, don't let "clean" delete it.
(Otherwise it'll git clone it again for each architecture, requiring net
access to build and undoing any local changes.)
2022-05-01 03:38:07 -05:00
Rob Landley
a3dd4d45c4 Add filename and line number to syntax error. 2022-05-01 03:06:15 -05:00
Rob Landley
e5b7997a07 Fix big endian again. 2022-04-30 21:36:22 -05:00
Rob Landley
3cfc0b54c4 Silence gcc warning that two 32 bit integers are identical.
(This warning is not generated on 64 bit targets, where two 64 bit integers
are identical.)
2022-04-30 20:13:38 -05:00
Keith Mok
80206bb537 brctl: Fix addif and defif
In br_addif and br_delif, the bridge
name is not passed to the ioctl.
2022-04-27 22:43:07 -05:00
Rob Landley
e8324105d0 Identify PDF 2022-04-27 17:26:02 -05:00
Rob Landley
5bce20565a Slight improvement to "is binary" check.
Freebsd's zlib/doc/txtvsbin.txt has an algorithm that's a little more
complicated but does point out that ascii below BEL should not be in the
first line of a shell script.
2022-04-27 17:04:48 -05:00
Rob Landley
f29ec45e39 Fix thinko. 2022-04-26 03:58:16 -05:00
Rob Landley
28a095f770 Fix wget port and have httpd return http 1.1 so wget recognizes it. 2022-04-26 03:23:20 -05:00
Rob Landley
6a31ec877e Put the test names in the test, not in a comment before the test. 2022-04-25 21:43:33 -05:00
Rob Landley
491a88ef4b Test cut -DF on TEST_HOST too.
I taught busybox to do it, and proposed it at coreutils months ago.
(They say not this release but next release...)
2022-04-25 21:40:40 -05:00
Rob Landley
5427339c2a Basic httpd smoketests. 2022-04-25 21:38:02 -05:00
Rob Landley
6e77d99557 Remove duplicate argument. 2022-04-25 20:59:34 -05:00
Rob Landley
41f9f4cd6c Remove wget from $PENDING lists. 2022-04-25 03:33:29 -05:00
Rob Landley
9d4197aaf7 Trivial cleanup. 2022-04-25 00:39:43 -05:00
Rob Landley
e3b461fc3f Silence two more "are never used uninitialized" warnings. 2022-04-25 00:12:23 -05:00
Rob Landley
a03525b1f6 Promote httpd to net 2022-04-24 22:04:07 -05:00
Rob Landley
a9d0e2386f Add simple static httpd.
And move url escape/unescape into lib/net.c.
2022-04-24 19:57:53 -05:00
Rob Landley
565f125b1c Eliminate one more sub-option (merge NETCAT_LISTEN into main netcat).
While I'm there, zap set_alarm(). Not a useful wrapper.
2022-04-22 05:28:45 -05:00
Rob Landley
c1065c7a34 Delete catv, which nobody uses (cat -v won long ago).
One less command sub-option requiring help text merging.

Minor cleanups while I'm there ala whitespace and FLAG() macros.
2022-04-22 04:59:38 -05:00
Elliott Hughes
1a87671b2e xargs: open child's stdin non-O_CLOEXEC.
O_CLOEXEC is the default in toybox, so although the code as written
_looked_ correct, we need to |O_CLOEXEC to have the fd survive the
exec().

Found by folks building the kernel with toybox.
2022-04-22 02:27:38 -05:00
Rob Landley
f5edb3fd79 Teach wget about basic url escapes, and don't allow server to specify
../../../file as a filename.
2022-04-20 16:59:15 -05:00
Rob Landley
88508108c0 Promote wget. 2022-04-20 10:29:47 -05:00
Rob Landley
2cb5c879db Have wget use TOYBOX_LIBCRYPTO for openssl support. 2022-04-20 10:28:23 -05:00
Rob Landley
1b2750d444 Fix ssl selection visibility in menuconfig, and detect local filename for
for wget http://landley.net/toybox
2022-04-19 04:21:25 -05:00
Rob Landley
feb39a12c3 Move struct ptr_len into only remaining user. 2022-04-19 01:33:17 -05:00
Rob Landley
f6c1bbc89e Don't use ptr_len and fix error return from "make test_bc" when it succeeds. 2022-04-19 01:27:07 -05:00
Rob Landley
8b97a1fb86 Thinko spotted by Elliott: actually compare with variable, not if (constant). 2022-04-15 19:10:40 -05:00
Rob Landley
9798b60669 Grab definition of UNSTRIPPED and friends. 2022-04-12 18:10:30 -05:00
Rob Landley
ee08909445 Unset ASAN after consuming it so scripts/portability.sh can be sourced twice. 2022-04-12 18:09:47 -05:00
Rob Landley
cda84ae988 Move arch-specific dead code elimination setup into scripts/portability.sh 2022-04-12 17:25:51 -05:00
Rob Landley
cecd169cde Collate ASAN setup, move generated/instlist into generated/unstripped,
use $UNSTRIPPED variable in more places and move definition to ./configure.
2022-04-12 17:22:18 -05:00
Rob Landley
c371967729 Comment template tweak. 2022-04-12 05:16:18 -05:00
Rob Landley
b08d3573d4 Add kconfig-language.txt from Linux 2.6.12. 2022-04-12 03:48:32 -05:00
Rob Landley
a6e0c86f77 All PEDANTIC_ARGS does is set a macro that's never used. 2022-04-12 02:31:17 -05:00
Elliott Hughes
50361a1b07 lib/portability.c: don't assume we have __NR_copy_file_range.
Android's host tools currently build with glibc from 2012, but even if
we were more up to date (or had already switched to musl for host tools,
which hopefully will be the case by this time next year), it was added
to glibc recently enough to miss the "seven year window".
2022-04-11 22:52:14 -05:00
Rob Landley
cd4c2da20a Update man page URL in hello/skeleton examples, and fix hello to
wait for PID 1. (rdinit=/bin/hello would kernel panic if pid 1 exits,
and wait() returns "No child processes" error, so pause() instead.)
2022-04-11 15:45:36 -05:00
Rob Landley
164b1c72f6 Fix mkroot m68k target's network connection. 2022-04-11 15:28:46 -05:00
Rob Landley
601828982a More wget cleanup.
Fix path, null terminate THIS line instead of chomp() whole header
(no guarantee the line we're looking for is last, although if it isn't
inserting the null terminator would truncate later searches),
don't assume server sent back a valid header with a " " in first line
(it SHOULD, but might not), don't interpret "-" filename from remote
end as stdout.
2022-04-08 04:31:50 -05:00
Rob Landley
418405e221 Cleanup pass on wget.
TT.postdata -> TT.p, replace both WGET_IS_HTTP macros with a test in
wget_info() setting TT.https (although still want an HTTP macro to include
the WGET_SSL test because I don't trust the compiler to do dead code
elimination based on a global in a union), inline wget_redirect() and
wget_filename() at their only caller, use xmprintf() for request rather
than copying user-defined strings into toybuf without bounds checking,
try not to assume other side sent us good data.
2022-04-08 03:59:13 -05:00