Commit Graph

429 Commits

Author SHA1 Message Date
Denis Vlasenko
52b5eba715 applets/applets.o must be rebuilt if usage.h is modified. 2006-10-19 22:11:06 +00:00
Denis Vlasenko
13c5a6832f mount: support user mounts if CONFIG_DESKTOP 2006-10-16 22:39:51 +00:00
Denis Vlasenko
1385899416 attempt to regularize atoi mess. 2006-10-08 12:49:22 +00:00
Denis Vlasenko
01c27fc5ac which: -84 bytes 2006-10-05 21:10:53 +00:00
Denis Vlasenko
7d219aab70 build system overhaul 2006-10-05 10:17:08 +00:00
Denis Vlasenko
8f8f268cfd bb_applet_name -> applet_name 2006-10-03 21:00:43 +00:00
Denis Vlasenko
40920825d5 rename bb_default_error_retval -> xfunc_error_retval 2006-10-03 20:28:06 +00:00
Denis Vlasenko
01a74f9649 applets.c: fix indentation 2006-09-23 16:34:39 +00:00
Rob Landley
e9a7a6212b Change license statements (and clean up headers) on some of the files that
Erik or I are primary copyright holders on.
2006-09-22 02:52:41 +00:00
Rob Landley
eb84a42fdd The Software Freedom Law Center wants us to add a copyright notice to the
generated binaries, to make copyright enforcement easier.  Our liason with
them (Bradley Kuhn) suggested the following text:

> Copyright (C) YEAR-2006  Erik Andersen, Rob Landley, and others.
> Licensed under GPLv2.  See source distribution for full notice.

And the busybox help message seems the least offensive place to put it.  (At
some point in the future, I need to strip 128 bytes from the binary to feel
good about this, though. :)

Minor header file cleanup while I was there, since libbb.h already #includes
most of that stuff...
2006-09-20 21:41:13 +00:00
Denis Vlasenko
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
Rob Landley
519d7df930 Another whack at scripts/individual. Now builds 212 applets. 2006-08-09 20:56:23 +00:00
Rob Landley
affb7a61a6 scripts/individual now builds 171 applets. Some of them may even work. :) 2006-08-05 00:41:39 +00:00
Rob Landley
cb376eebf0 Digging up my old "make standalone" stuff from a year ago:
http://busybox.net/lists/busybox/2005-September/015766.html

I renamed it "individual" to not confuse it with the standalone shell.  (Which
it isn't compatible with for obvious reasons.)  Configure busybox (I did
make defconfig), then run scripts/individual and it'll build an individual
version of each applet in the "build" subdirectory.

Currently it builds 146 and fails to build 104 applets out of "make defconfig".
I haven't taught it about multi-file applets yet (like tar), or the ones where
two applets get built from the same source (for example, zcat is a trivial
variant of gunzip so there is no zcat.c).  But here's a start.
2006-08-04 21:05:33 +00:00
Rob Landley
e1a0f5372f Unbreak allbareconfig. (Todo item: rewrite dependency checker. Yeah, I
already have that one, but it moves up the list...)
2006-07-26 15:38:46 +00:00
Rob Landley
534374755d Cleaup read() and write() variants, plus a couple of new functions like
xlseek and fdlength() for the new mkswap.
2006-07-16 08:14:35 +00:00
Rob Landley
ea224be6aa skip_whitespace() shouldn't claim its return value is const, it doesn't know
that and callers wind up typecasting it back.
2006-06-18 20:20:07 +00:00
Mike Frysinger
e3fdf2431a add a --noclobber flag 2006-06-07 18:12:27 +00:00
Mike Frysinger
81514ecca3 add support for cleaning out previous busybox install 2006-06-07 18:08:25 +00:00
Mike Frysinger
74b29a107f dont install emtpy libdirs 2006-06-07 17:27:46 +00:00
Mike Frysinger
55b12105b5 dont mix tabs and spaces, kthx 2006-06-07 17:24:29 +00:00
Bernhard Reutner-Fischer
e15d7573a1 - move #include busybox.h to the very top so we pull in the config
and eventual platform specific includes in early.
2006-06-02 20:56:16 +00:00
Bernhard Reutner-Fischer
b1629b1b2a - remove emacs layout block as suggested by Robert P.J. Day
- use shorter boilerplate while at it
2006-05-19 19:29:19 +00:00
Mike Frysinger
39440e520c pull Rules.mak from top_srcdir as pointed out by Robert P. J. Day on the mailing list 2006-05-13 02:33:09 +00:00
Rob Landley
9fb272a222 Dennis Vlasenko pointed out that run_applet_by_name sets bb_applet_name already. 2006-05-07 01:44:23 +00:00
Rob Landley
1801e9cde7 Rich Felker writes:
mistake in a macro caused statement before declaration.
2006-05-03 20:19:14 +00:00
Rob Landley
73f54702bc Fixup a build break if ENABLE_SHOW_USAGE switched off. (Fallout from the
compressed usage messages patch).
2006-05-01 00:53:40 +00:00
Rob Landley
7e21d5f6b1 Patch from Dennis Vlasenko to add the option to compress help text. 2006-04-27 23:34:46 +00:00
Bernhard Reutner-Fischer
81901a096c - add option to suppress the terse usage messages. Saves 6.8k for defconfig:
text	   data	    bss	    dec	    hex	filename
 861791	  11264	1039140	1912195	 1d2d83	busybox.have-terse-usage
 854799	  11264	1039140	1905203	 1d1233	busybox.no-terse
2006-03-31 18:43:55 +00:00
Rob Landley
d1968672ef When cross-compiling, the install directory for shared libraries has to come
from gcc (target machine), not uname (host machine).
2006-03-24 02:42:58 +00:00
Bernhard Reutner-Fischer
e0fe937593 - correct typo 2006-03-23 16:52:59 +00:00
Bernhard Reutner-Fischer
df10094870 - revert back to r14406 2006-03-13 19:04:00 +00:00
Bernhard Reutner-Fischer
07a79e75f5 - backout using features which are not available with the previous stable
version of make (3.71.1).
2006-03-09 09:03:37 +00:00
Rob Landley
dfba741457 Robert P. Day removed 8 gazillion occurrences of "extern" on function
definitions.  (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Bernhard Reutner-Fischer
022eb311d5 - use absolute path for top_builddir and top_srcdir.
Fixes make trying to include the very same file in an endless loop.
2006-03-02 17:33:25 +00:00
Bernhard Reutner-Fischer
5d26126b9e - fixes parallel builds (make -j)
- use less resources for the buildsystem itself
2006-03-01 22:54:48 +00:00
Mike Frysinger
dcbad607fc add s390x to the list 2006-02-20 19:28:34 +00:00
"Vladimir N. Oleynik"
eaa3b29a6d forgoten new file for 14080 revison 2006-02-16 15:41:12 +00:00
"Vladimir N. Oleynik"
dd1ccddf1b moved BB_BANNER to applets/version.c file: make kernel like version,
removed depend loop: busybox.h depend with BB_BT, and all sources depend with busybox.h
2006-02-16 15:40:24 +00:00
Mike Frysinger
b38673fb9f make the build system puuuuuuuuuuurty 2006-02-02 01:41:53 +00:00
Tim Riker
c1ef7bdd8d just whitespace 2006-01-25 00:08:53 +00:00
Bernhard Reutner-Fischer
86f5c9906b - add platform.h.
- use shorter boilerplate while at it.
2006-01-22 22:55:11 +00:00
Rob Landley
c8e41157a2 Update readme and install.sh usage message. 2006-01-19 21:22:37 +00:00
Bernhard Reutner-Fischer
7ca61b6f33 - shared libbusybox.
- IMA compilation option (aka IPO, IPA,..)
Please holler if i broke something..
2006-01-15 14:04:57 +00:00
Bernhard Reutner-Fischer
f00680eb59 - use HOSTCC instead of a hardcoded cc 2005-12-29 16:53:47 +00:00
Rob Landley
a930bd3332 Stephane Billiart said:
the attached patch makes applet list in busybox.links
correctly include tr and watchdog.
Currently, they don't appear because they are prefixed
with ENABLE_ in include/applets.h
2005-12-16 06:12:46 +00:00
Rob Landley
e0c418e13b The rest of Yann E. Morin's install revamp. 2005-12-15 07:25:54 +00:00
Rob Landley
cc59aae65f Macro was wrong, name(void) vs name(x), and apparently gcc 2.95 cares about
matching up macro arguments even when the macro substitutes to nothing...
2005-12-07 23:17:28 +00:00
Bernhard Reutner-Fischer
6973abcfa8 - remove warning about "'static' is not at beginning of declaration". 2005-10-28 09:45:07 +00:00
Rob Landley
046d6e7a95 show_usage should use bb_default_error_retval. 2005-10-12 21:50:02 +00:00
Bernhard Reutner-Fischer
14b1c1da9a - remove explicit dependency of busybox.o and applets.o and usage.h from the
Makefile. Instead fix the invocation of bb_mkdep.
2005-10-05 14:52:21 +00:00
Bernhard Reutner-Fischer
83e1884d0c - busybox.o and applets.o depend on usage.h 2005-10-05 13:53:46 +00:00
"Vladimir N. Oleynik"
74078685e6 busybox.c: ENABLE_LOCALE logic correct. 2005-09-29 08:19:04 +00:00
Mike Frysinger
62f18e1f20 use the shorter license header 2005-09-24 07:16:29 +00:00
Mike Frysinger
0d4ee68be5 use brief license line 2005-09-24 06:01:57 +00:00
"Vladimir N. Oleynik"
10a1fe6169 remove infinity loop ./busybox --help busybox 2005-09-05 11:25:27 +00:00
Rob Landley
8a7a678b03 Fixes so "make allnoconfig" works again.
The configure system's save function edited out sub-menus that wouldn't be
displayed in the current configuration, meaning config.h wouldn't have #udef
entries for those symbols, meaning bb_config.h would have the relevant
ENABLE_ missing instead of defined to 0.  This broke the build.

So I fixed it, and then reorganized the applets.c and busybox.c to take
away the warnings this revealed (code that would be optimized out was making
calls to functions that hadn't been prototyped.  So I added an #else case
to those #ifdefs to #define the relevant functions to empty macros to
placate the warnings.

I also reorganized the applets.c code to make adding such an #else case less
of a pain (and make the need for prototyping go away by moving the functions
up before they were used, and generally wind up with fewer #ifdefs in
the code by putting all the logic in one place).  This resulted in a huge
seeming patch, when most if it just moves code from one place to another
without touching it...

Upside: make allyesconfig and make allnoconfig should both work now.
2005-09-05 04:13:33 +00:00
Rob Landley
b766c39456 General cleanup of command line parsing to allow "busybox" to work as a prefix.
(I.E. any argv[0] that starts with "busybox" winds up in busybox_main().)

Added testing/busybox.tests which tests the following permutations:

./busybox
./busybox-suffix
./busybox cat
./busybox-suffix cat
./busybox --help
./busybox-suffix --help
./busybox --help cat
./busybox-suffix --help cat
./busybox --help unknown
./busybox-suffix --help unknown
./unknown

Also repair the test suite so ./runtest calls the ".tests" scripts properly.

Note: you can now go "busybox busybox busbox ls -l" and it'll take it.  The
new code is pretty generic.  I can block that if anybody can come up with a
good reason to...
2005-09-04 11:10:37 +00:00
Rob Landley
9139770764 Busybox should only multiplex based on argv[1] when it's called as "busybox".
Otherwise if you build busybox without a given applet you get the wrong error
message when you call it via a symlink to that applet.

(You also get the wrong behavior; it tries to use argv[1] as the command
name just like busybox does for _any_ unknown, and although I doubt
"echo rm -rf *" is common usage there's no upside and enough downside to
make me nervous.)

This fixes it.
2005-09-01 00:02:56 +00:00
Mike Frysinger
4d00896d05 use toplevel ARFLAGS and update default ARFLAGS to be quiet 2005-07-27 01:09:24 +00:00
Mike Frysinger
2c12d435e5 output busybox help to stdout, not stderr 2005-04-22 02:19:01 +00:00
Eric Andersen
7daa076d3e egor duda writes:
Hi!

I've created a patch to busybox' build system to allow building it in
separate tree in a manner similar to kbuild from kernel version 2.6.

That is, one runs command like
'make O=/build/some/where/for/specific/target/and/options'
and everything is built in this exact directory, provided that it exists.

I understand that applyingc such invasive changes during 'release
candidates' stage of development is at best unwise. So, i'm currently
asking for comments about this patch, starting from whether such thing
is needed at all to whether it coded properly.

'make check' should work now, and one make creates Makefile in build
directory, so one can run 'make' in build directory after that.

One possible caveat is that if we build in some directory other than
source one, the source directory should be 'distclean'ed first.

egor
2004-10-08 07:46:08 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.

Erik - please apply.

Authors - please check that I didn't corrupt any meaning.

Package importers - see if any of these changes should be
passed to the upstream authors.

I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.

What is "pretect redefined for test" in cmdedit.c?

Good luck on the 1.00 release!

      - Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
674b08a6b8 Fix it so usage is _always_ in sync with applets.c. Previously,
broken depends allowed these to get out of sync.
2004-04-06 14:28:35 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Glenn L McGrath
7fc504c6f7 Vodz. last_patch_128
- declare applet_using as static from applets.c
- small correction to cmdedit,
   previous version cleared history after Ctrl-C
- small spelling correction (by Friedrich Lobenstock)
2004-02-22 11:13:28 +00:00
Manuel Novoa III
7b565a0c8a Patch from Florian Schirmer <jolt@tuxbox.org>. When I rewrote the parser,
I overlooked the case of someone wanting to use a valid but empty suid
config file.
2004-02-17 10:16:21 +00:00
Manuel Novoa III
31b98dd097 Rewrite parse_config_file(). Among the old version's problems:
No checking for lines that were too long.
  No checking that fgets returning NULL was actually due to EOF.
  Various whitespace handling inconsistencies.
  Bloat (switches and multiple identical function calls).
  Failure to check for trailing characters in some cases.
  Dynamicly allocated memory was not free()d on error.
Given that this controls suid/sgid behavior, the sloppy coding was
really inexcusable.  :-(
2004-02-01 10:03:05 +00:00
Tim Riker
b1ffba0401 wrap bb help output if CONFIG_FEATURE_AUTOWIDTH 2003-11-07 19:37:20 +00:00
Glenn L McGrath
fd7bc13557 Woops, the previous patch reversal wasnt complete, breaking everything. 2003-10-04 00:05:47 +00:00
Glenn L McGrath
f86bd9f2cd Reverse my previous changes and make a note about why its dont this way 2003-10-03 13:21:10 +00:00
Glenn L McGrath
4a77c781ef argc has already been decremented 2003-10-03 07:51:30 +00:00
Glenn L McGrath
cb920d9778 Patch from Rob Landley, Simplify organisation of arguments. 2003-10-03 03:25:30 +00:00
Eric Andersen
cb81e6484d Update a bunch of docs. Run a script to update my email addr. 2003-07-14 21:21:08 +00:00
Glenn L McGrath
2faee7b1ed Vodz, last_path_87, formatiing changes 2003-05-26 14:09:12 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Glenn L McGrath
4d4ef19c76 I miscalculated on this one, change it back 2002-11-28 21:49:06 +00:00
Glenn L McGrath
6ead3abd55 Save a few bytes in show_usage 2002-11-28 08:33:04 +00:00
Eric Andersen
a6f6e06107 Fix dependancy so we rebuild busybox.o, usage.o and busybox.o
whenever the config changes.
 -Erik
2002-09-30 20:39:12 +00:00
Eric Andersen
c38678d14b Apply vodz' last_patch52 2002-09-16 06:22:25 +00:00
Glenn L McGrath
b37367aa77 Run through indent, use /* */ style comments instead of // 2002-08-22 13:12:40 +00:00
Robert Griebl
88947dd05e Added a compile time option to suppress the "Using fallback.." message
if no busybox.conf file is existant.
2002-07-18 23:59:17 +00:00
Robert Griebl
e4f9f3a960 Don't treat a non-existant/-readable config file as an empty config, but
use the compiled in _BB_SUID_* flags (same as for parse errors)
2002-07-16 21:53:59 +00:00
Eric Andersen
887ca79f04 Scrub pwd.h and grp.h handling so we don't have to play any
silly games.
 -Erik
2002-07-03 23:19:26 +00:00
Robert Griebl
0c789a4255 If config file can not be parsed, use compiled in BB_SUID_... values as a
fallback method
2002-06-06 17:30:16 +00:00
Robert Griebl
c9aca4561d Implement two types of suid/sgid support for BusyBox:
1) tinylogin like with compile time selection and a chown root.root
2) Runtime configurable via /etc/busybox.conf (docu is in the works)
[Parts of this patch may overlap with my other two patches]
2002-06-04 20:06:25 +00:00
Eric Andersen
85208e2ab9 Completely rework the config system so that it no longer annoys me to work on
the busybox development tree.  This eliminates the use of recursive make, and
once again allows us to run 'make' in a subdirectory with the expected result.
And things are now much faster too.  Greatly improved IMHO...
 -Erik
2002-04-12 12:05:57 +00:00
Eric Andersen
fcffa2cc1a Apply lash_patch35 from vodz, which brings several nice size_optimizations. 2002-04-06 05:17:57 +00:00
Eric Andersen
fb74a45088 Vodz' last_patch31
Very minimal last corrections:

    1) busybox.c: fix warining
    2) docs/: add applets for list from pwd_grp
    3) usage.h: add -n option for route
    4) run_parts.c: many todo fix for busybox style
    5) addgroup.c: add #ifdef CONFIG_FEATURE_SHADOWPASSWDS, reduce one
    perror_msg
    6) adduser.c: fix bug "variable i not initialize" and
       add #ifdef CONFIG_FEATURE_SHADOWPASSWDS
2001-12-18 14:06:03 +00:00
Eric Andersen
8fc0589777 *** empty log message *** 2001-10-31 11:45:10 +00:00
Eric Andersen
1552ff7efb Move usage.h to include/usage.h 2001-10-31 11:07:12 +00:00
Eric Andersen
6cf47a79ac Run parts applet by Emanuele Aina <faina.mail@tiscalinet.it> 2001-10-31 10:24:36 +00:00
Eric Andersen
3cd2760ba1 Fixup the new buildsystem a bit. 2001-10-24 07:58:02 +00:00
Eric Andersen
4bcdd72142 Oops. Forgot these.... 2001-10-24 05:26:42 +00:00
Eric Andersen
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Eric Andersen
c2af1ee036 Commit the start-stop-daemon applet. This was contributed by David
Kimdon <dwhedon@gordian.com> on october 7th -- the day I was fired from
Lineo.  So it seems I totally forgot about this patch until now.
Sorry about that David!
2001-10-18 19:33:06 +00:00
Glenn L McGrath
3550753445 Remove duplicate tftp -l option help 2001-10-05 10:11:28 +00:00
Glenn L McGrath
ad117d8a21 Apply Magnus Damm's patch, adds tftp blocksize support, and some cleanups. 2001-10-05 04:40:37 +00:00
Glenn L McGrath
24e2833cdf Initial support for for bunzip2....
This code could be improvemed by
 1) supporting more options,
 2) Creating a shared crc table with gunzip, or perhaps generated on the fly.
 3) Removing any remaining unneccessary code (e.g. if (noisy))
2001-10-05 03:48:57 +00:00
Eric Andersen
63ae66198d use the pedantically correct compiler for preprocessing 2001-09-26 06:20:54 +00:00