Glenn L McGrath
0337c467a0
Add some help descriptions
2002-12-06 22:40:54 +00:00
Eric Andersen
536018278a
Kill the now obsolete docs/Configure.help file, and move all existing
...
help texts into their respective Config.in file.
-Erik
2002-12-05 21:12:42 +00:00
Eric Andersen
c9f20d9fb9
Yet another major rework of the BusyBox config system, using the considerably
...
modified Kbuild system I put into uClibc. With this, there should be no more
need to modify Rules.mak since I've moved all the interesting options into the
config system. I think I've got everything updated, but you never know, I may
have made some mistakes, so watch closely.
-Erik
2002-12-05 08:41:41 +00:00
Glenn L McGrath
6f9b45b9ef
Unlink before mkdir, mknod, symlink to overwrite
2002-12-04 22:26:30 +00:00
Glenn L McGrath
b963875a3e
Move compare_string_array to libbb
2002-12-02 00:01:36 +00:00
Glenn L McGrath
f3faf41334
fix warning
2002-12-01 21:52:40 +00:00
Aaron Lehmann
a170e1c858
Change if(x)free(x); to free(x);
2002-11-28 11:27:31 +00:00
Glenn L McGrath
d211214d42
Use error_msg instead of printf(stderr
2002-11-28 09:22:14 +00:00
Glenn L McGrath
fedbfe4059
Style
2002-11-28 09:09:47 +00:00
Glenn L McGrath
ec87d37305
Check that one and only one of the [cxt] options is given
2002-11-27 07:52:22 +00:00
Glenn L McGrath
f66de64a11
Use vfork instead of fork, some more cleanup from Vladimir N. Oleynik
2002-11-25 23:57:27 +00:00
Glenn L McGrath
eda4f53f2e
Add an input buffer (currently 32kB) to speed things up heaps, it still requires 25% longer to decompress as compared to upstream.
2002-11-24 06:01:20 +00:00
Glenn L McGrath
b7a76df4d1
Fix long filename support
2002-11-23 10:44:47 +00:00
Glenn L McGrath
83bf47c02f
Speed and memory usage improvements from Laurence Adnerson
2002-11-20 22:00:31 +00:00
Glenn L McGrath
0126fda5bb
read_gz patch 3 from Laurence Anderson
2002-11-20 06:46:46 +00:00
Glenn L McGrath
a0d395eac9
Use read_gz, remove fork() woohoo!
2002-11-19 08:22:03 +00:00
Glenn L McGrath
fd73b8c2ce
Patch from Laurence Anderson to provide a read_gz function, doesnt require fork(), pipe(), consistent with read_bz2 and more flexible.
2002-11-17 21:33:30 +00:00
Glenn L McGrath
36233bdd71
Remove #defines around get_header_ptr, we allways need it.
2002-11-16 21:34:57 +00:00
Glenn L McGrath
02fcd2d2df
Allow short reads as we are looping anyway.
2002-11-15 21:58:30 +00:00
Glenn L McGrath
2666679692
Dont chdir untill after we open the archive
2002-11-15 08:48:47 +00:00
Glenn L McGrath
e356883ffb
Minor cleanups
2002-11-13 00:24:20 +00:00
Glenn L McGrath
034c371bb2
Reduce block size to 512 to prevent short read's when reading from a pipe
2002-11-12 23:34:15 +00:00
Glenn L McGrath
5703341123
#ifdef, not just #if... grrr
2002-11-08 08:07:38 +00:00
Glenn L McGrath
f6bf7a03fe
Fix reading from stdin (me), Fix tar segfault when no arguments specified (Geoffrey Lee)
2002-11-08 07:09:42 +00:00
Glenn L McGrath
62d28828d6
Use a switch instead of successive if (strcmp()) statments.
2002-11-06 23:35:28 +00:00
Glenn L McGrath
747381c602
Split deb_extract() into more generic functions
2002-11-06 22:54:41 +00:00
Glenn L McGrath
ea12202288
Terminate the buffer with a '\0'
2002-11-06 22:31:45 +00:00
Glenn L McGrath
d8d1191505
Support for bziped debs, i.e. use .tar.bz2 instead .tar.gz internally
2002-11-05 13:56:04 +00:00
Glenn L McGrath
7f2a95319b
Fail silently if a partial tar header is read as tar.bz2 is leaving trailing junk (not sure why), add some missing files
2002-11-05 02:56:57 +00:00
Glenn L McGrath
18bbca18ac
enable .tar.bz2 for dpkg-deb
2002-11-05 01:52:23 +00:00
Glenn L McGrath
8e94098423
Change filter paramaters, filters can be more powefull now
2002-11-04 23:47:31 +00:00
Glenn L McGrath
f92caa7619
Call lseek directly rather than via data_align()
2002-11-03 14:14:53 +00:00
Glenn L McGrath
237ae42fc9
Abstract read and seek in unarchiving code, convert bunzip to file descriptors, support tar -j
2002-11-03 14:05:15 +00:00
Glenn L McGrath
2fc54a9258
Fix #define syntax
2002-11-03 12:50:33 +00:00
Glenn L McGrath
6ab32eb34c
Move data_extract_all_prefix to dpkg, its only used there.
2002-11-03 11:57:10 +00:00
Glenn L McGrath
b8e556e5f5
Add copyright notice and license, use strcat+strcpy instead of sprintf
2002-11-03 11:46:49 +00:00
Glenn L McGrath
9c60b29071
Use xread_char to save a few bytes, fix indenting of comments
2002-11-03 10:57:25 +00:00
Glenn L McGrath
60bce4905c
Move bunzip2 idecompression code to libunarchive
2002-11-03 07:28:38 +00:00
Glenn L McGrath
bf1cc8b1b7
Make uncompress a seperate applet so it doesnt pull in all the gunzip code
2002-11-01 23:38:54 +00:00
Glenn L McGrath
d6aec8619d
Allow short reads when filling compress buffer
2002-11-01 22:28:13 +00:00
Glenn L McGrath
9ef0944456
Allow the .Z prefix if compress support enabled
2002-11-01 22:11:53 +00:00
Glenn L McGrath
b2f67b4068
Make it a fatal error if bad chksum or crc, if not we should return an error code
2002-11-01 22:08:59 +00:00
Glenn L McGrath
563ac6e789
Report errror if the first magic character doesnt match
2002-11-01 21:40:52 +00:00
Eric Andersen
18921bd00d
A bugfix from Danny Lepage:
...
It seems that under busybox unstable, "tar -c -f - blabla" create
a tar file named "-" instead of writing to stdout.
The included patch should fix this.
2002-10-26 10:05:37 +00:00
Glenn L McGrath
9ffd5776eb
Move unzip.c uncompress.c from libbb to archiveal/libunarchive
2002-10-22 01:07:32 +00:00
Glenn L McGrath
61b7904afd
Update dpkg to use new unarchive code
2002-10-19 10:40:55 +00:00
Glenn L McGrath
c5c1a8a112
Fix exclude/include problem
2002-10-19 06:19:22 +00:00
Glenn L McGrath
05fa661123
Find a string in a list
2002-10-19 05:10:51 +00:00
Glenn L McGrath
25bca9566d
Remove entries from the accept list as they are matched so we can determine if any files that were specified in the list wernt found.
2002-10-19 02:18:51 +00:00
Glenn L McGrath
98f824aa22
Dont use absolute pathname (dunno why i did that), fix tar filename/stdin problems
2002-10-19 00:46:35 +00:00
Glenn L McGrath
934805aec1
Put bac kthe code that handles cases where a '-' wasnt specified prior to the options.
2002-10-18 23:59:40 +00:00
Eric Andersen
2a2ab1479c
Fix an obvious thinko
...
-Erik
2002-10-18 22:31:02 +00:00
Eric Andersen
71ae64bdc6
last_patch61 from vodz:
...
New complex patch for decrease size devel version. Requires previous patch.
Also removed small problems from dutmp and tar applets.
Also includes vodz' last_patch61_2:
Last patch correcting comment for #endif and more integrated
with libbb (very reduce size if used "cat" applet also).
Requires last_patch61 for modutils/config.in.
2002-10-10 04:20:21 +00:00
Glenn L McGrath
2983330512
Fix segfault when testing if reaidng from stdin "-"
2002-10-06 23:25:23 +00:00
Eric Andersen
02e6ba91e8
Vodz' last_patch57:
...
Hi, Erik.
my_getpw(uid/gid) and applets used it have problem:
if username for uid not found, applets can`t detect it
(but code pessent). Also "%8ld " format is bad:
spaces not required (applets have self format
or spec format (tar applet) and overflow for "id" applet...)
This problem also pressent in stable version.
Patch for unstable in attach.
--w
vodz
2002-09-30 20:39:56 +00:00
Eric Andersen
d9d47c3078
Patch from Konstantin Isakov <ikm@pisem.net>:
...
In most cases, dirname returns the same argument it was given, so this code
works nice, but there's one special case: when the name contains no
dirname, it returns "." (stored statically in the body of itself), and we
get a segfault in attempt to free() it.
This patch fixes this problem.
2002-09-30 20:14:57 +00:00
Glenn L McGrath
5c99581880
Save status so we know if to delete compressed file
2002-09-30 05:30:29 +00:00
Glenn L McGrath
8132e933e6
Fix for using '-' as the filename when reading from stdin
2002-09-28 02:06:39 +00:00
Glenn L McGrath
2e41d0cb77
Fix compress support and prevent a segfault
2002-09-27 06:46:02 +00:00
Glenn L McGrath
a47a3eada6
Fix simple define problem
2002-09-26 16:01:21 +00:00
Glenn L McGrath
69eab26401
Remove files made obsolete by new unarchiving code
2002-09-25 03:04:03 +00:00
Glenn L McGrath
7ca04f328e
New common unarchive code.
2002-09-25 02:47:48 +00:00
Manuel Novoa III
6c32a8add4
Modified so that it "works" for archs other than i386... arm in particular.
...
Also tried to clean up the logic a little, and ensure that read errors
or invalid archives resulted in error returns. This could use a lot more
work... Volunteers?
2002-09-17 21:02:16 +00:00
Eric Andersen
8fede28c74
Patch from Matthias Lang <matthias@corelatus.se> to fix gunzip
...
error handling and prevent gunzip from hanging.
2002-09-16 07:25:41 +00:00
Glenn L McGrath
b3c4e9add5
Support for GNU style long filename and linknames
2002-09-15 16:54:49 +00:00
Glenn L McGrath
c3b7f7d6e7
chmod on the NEW file
2002-08-26 17:17:27 +00:00
Glenn L McGrath
abac53b33c
Reorganise, make it just one function, remove -v option it didnt work properly anyway, dont setvbuf it doesnt make any difference in performance.
2002-08-24 14:32:17 +00:00
Glenn L McGrath
1ee52e8b14
Run through indent, use braces
2002-08-24 10:30:36 +00:00
Glenn L McGrath
4534af2763
replace some global const ints with defines
2002-08-22 19:31:35 +00:00
Glenn L McGrath
0775a07d87
Specify cast
2002-08-22 19:22:32 +00:00
Glenn L McGrath
4cc2e5e944
Remove duplicate variable definition
2002-08-22 19:15:26 +00:00
Glenn L McGrath
9fef17dec3
Run through indent, fix comments
2002-08-22 18:41:20 +00:00
Glenn L McGrath
99b12543cf
Run through ident, fix comments
2002-08-22 17:47:09 +00:00
Glenn L McGrath
a0ee881ba4
Run through indent, use /* */ style comments, change extern to static
2002-08-22 13:44:08 +00:00
Glenn L McGrath
d827e8b665
Run through indent
2002-08-22 13:21:26 +00:00
Glenn L McGrath
75762705a3
Honour the USTAR prefix field, this enables a 155 byte path length plus the normal 100 byte filename.
...
The catch is gnu tar cannot create archives that use the prefix field, you need to use s-tar.
2002-08-22 11:50:31 +00:00
Aaron Lehmann
8fc5d6d2da
Tar inlining, #if 0 out unused function
2002-08-21 13:11:34 +00:00
Glenn L McGrath
1d23f3a492
Enable support for the old tar header format, enable via menu's
2002-08-13 05:06:43 +00:00
Robert Griebl
f2f26e7fdd
Added tar -cz support (creating gzipped tar files without a gzip pipe)
2002-07-23 22:05:47 +00:00
Robert Griebl
d378c3149c
Applied vodz' patches #49 and #50 (with a small correction in runshell.c)
...
#49 : I found one memory overflow and memory leak in "ln" applet.
Last patch reduced also 54 bytes. ;)
#50 : I found bug in loginutils/Makefile.in.
New patch have also new function to libbb and
aplied this to applets and other cosmetic changes.
2002-07-19 00:05:54 +00:00
Eric Andersen
2276d83639
Fixup warnings and undefined operations that show up in gcc-3.1
...
-Erik
2002-07-11 11:11:56 +00:00
Aaron Lehmann
9031481ac3
inline many functions that are only called once. saves about 300 bytes
...
on i386. also staticify most functions.
2002-06-23 22:13:22 +00:00
Aaron Lehmann
8c26fbe537
remove cleanUpAndFail, and replace it with exit(). because that's what
...
it does unless srcMode was set, and srcMode is never set.
2002-06-23 21:56:13 +00:00
Aaron Lehmann
9f92d5f2a2
Major revamp. I've been trying to clean up the code. the bzerror stuff
...
still needs major attention (i.e. removal).
Removed references to uninitialized variables like progName,
smallMode, noisy, etc. Remove functions and code for handling "small"
decompression mode, since it is all unreachable. Remove
total_{in,out}* counters - they are never used. Remove panic()
function and assert_h and their uses because they are all for "should
never happen" circumstances. Replace internal malloc/free wrappers
with xmalloc and free. Remove conditional in if(foo)free(foo);
situations. Remove bogus
if (sizeof(int) != 4) {
return BZ_CONFIG_ERROR;
}
(...etc...) code and code for handling BZ_CONFIG_ERROR. Someone should
go through and change the applet to use well-defined types when
appropriate - it expects sizeof(short)==2 && sizeof(int)==4. Until
this commit these were explicitly checked for, and the applet would
exit if these types were not the right size. (I think this is wrong
even as an interim solution.)
With gcc 3.1 reduces size of binary on i386-linux by about 700 bytes.
Lightly tested.
2002-06-22 06:35:29 +00:00
Glenn L McGrath
a94a06a38e
Patch from Randolfe Averty to fixup package conflict checks, cleanup some memory leaks and reorganise dependency checking.
...
Some further memory leaks fixed by me.
2002-05-29 13:45:34 +00:00
Robert Griebl
94a6a956f0
Support old-style compress (.Z) files via libbb / unzip( ) calls
...
(configurable) - When enabled an applet "uncompress" is also made
available (oddname to gunzip)
[the cvs add for this file got lost somehow...]
2002-05-19 19:00:14 +00:00
Robert Griebl
f6495eb767
Support old-style compress (.Z) files via libbb / unzip( ) calls
...
(configurable) - When enabled an applet "uncompress" is also made
available (oddname to gunzip)
2002-05-15 22:13:47 +00:00
Robert Griebl
7ac868460a
gunzip'ing many files to stdout works now
...
Fixed a missing initialisation and made a for loop more readable.
2002-05-15 21:57:42 +00:00
Robert Griebl
081df62b92
Don't delete source file when decompressing to stdout
...
This is the normal GNU gunzip behaviour
2002-05-15 21:45:52 +00:00
Matt Kraai
a4a65e7f99
* archival/gunzip.c (gunzip_file): New.
...
(gunzip_main): Handle no arguments correctly.
2002-04-29 15:32:32 +00:00
Matt Kraai
a0782684fd
* archival/bunzip2.c (bunzip2_main): Do not remove files if writing to standard
...
output.
* testsuite/bunzip2/bzcat-does-not-remove-compressed-file: New.
2002-04-15 15:01:37 +00:00
Eric Andersen
d75ac02a4f
Rework per how I did things in version in 0.60.3 so it can
...
properly uncompress multiple files now.
-Erik
2002-04-13 09:10:34 +00:00
Eric Andersen
114de55668
Patch from Laurence Anderson <L.D.Anderson@warwick.ac.uk> for
...
better tape drive support in tar/cpio by using an intervening
pipe...
2002-04-13 08:43:01 +00:00
Eric Andersen
1d1d2f9b18
Update some missing copyright notices
2002-04-13 08:31:59 +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
50e4d660ac
Fix email addr
2002-04-06 05:15:46 +00:00
Matt Kraai
cf32ac543c
* archival/bunzip2.c (bunzip2_main): Remove compressed file.
...
* testsuite/bunzip2/bunzip2-removes-compressed-file: New.
2002-03-27 17:46:44 +00:00
Matt Kraai
9cdb0601eb
* archival/bunzip2.c: Include <unistd.h>.
...
(bunzip2_main): Read data from standard input if FILE argument is `-' or
omitted.
* include/usage.h (bunzip2_trivial_usage, bunzip2_full_usage): Rewrite.
* testsuite/bunzip2/bunzip2-reads-from-standard-input: New.
2002-03-27 17:31:01 +00:00
Matt Kraai
ef8b112d77
* archival/gzip.c (gzip_main): Ensure that the output is a terminal and use
...
error_msg to display the error message.
2002-03-22 22:55:51 +00:00
Eric Andersen
89de1e7930
Reinitialize initial shift register value for on each pass.
...
-Erik
2002-03-20 13:30:40 +00:00