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
Glenn L McGrath
02a415606c
Parse the include list to writeTarFile rather than argv, fixes a bug where tar files wernt being created.
2002-02-15 05:15:03 +00:00
Glenn L McGrath
8833a51781
Fix condition that prevented creation of compressed files
2002-02-13 03:32:11 +00:00
Matt Kraai
9bd49d6a22
* archival/gzip.c (ifname, ofname): Delete.
...
(gzip_main): Handle multiple files.
* include/usage.h (gzip_trivial_usage): Allow multiple FILEs.
(gzip_full_usage): Ditto.
* testsuite/gzip/gzip-accepts-multiple-files: New.
* testsuite/gzip/gzip-removes-original-file: New.
2002-02-05 22:31:48 +00:00
Matt Kraai
592a3e63ee
* archival/gzip.c (gzip_main): Display usage if given multiple files.
2002-02-05 19:34:53 +00:00
Matt Kraai
b75b6e2c35
* archival/tar.c (tar_main): Remove unused variable.
2002-01-08 16:03:41 +00:00
Matt Kraai
39fcb5a750
* archival/dpkg.c (create_list): Use chomp.
...
* archival/tar.c (append_file_list_to_list): Likewise.
2002-01-02 19:01:41 +00:00
Glenn L McGrath
87ac7028e0
unzip applet by Laurence Anderson
...
----------------------------------------------------------------------
2002-01-02 13:52:26 +00:00
Matt Kraai
1f0c43668a
Remove == TRUE' tests and convert
!= TRUE' and `== FALSE' tests to use !.
2001-12-20 23:13:26 +00:00
Matt Kraai
31c73af656
Perform clean up only if CONFIG_FEATURE_CLEAN_UP is defined.
2001-12-20 22:30:14 +00:00
Matt Kraai
2b1effdbbc
Write files when extracting an archive from standard input.
2001-12-20 22:09:31 +00:00
Eric Andersen
f3f9062ecf
Things like 'tar -c /tmp/*' and 'tar -cO /tmp/*' where the output
...
filename was not explicitly specified were segfaulting.
-Erik
2001-12-18 00:57:55 +00:00
Eric Andersen
db930948a9
More copyright and email addr cleanups
2001-12-06 08:20:14 +00:00
Aaron Lehmann
b9df470c4d
Commit my improvement on Rodney Brown's patch to g(un)zip, decreasing
...
binary size.
2001-12-06 03:22:43 +00:00
Glenn L McGrath
249f39a265
Simplify unzip(), remove unused checks and unneccessary variables
2001-12-05 16:01:02 +00:00
Glenn L McGrath
ef03dbcd4d
Simplify CRC table generation
2001-12-05 13:08:03 +00:00
Glenn L McGrath
aad44fb37a
Fix some fegfaults and picket fence
2001-12-05 04:40:52 +00:00
Glenn L McGrath
1dbbd2fe34
Fail gracefully if package depends on a virtual package.
2001-12-05 04:10:14 +00:00
Glenn L McGrath
38288bbf4c
gunzip was incorrectly reporting a failed crc and length (discovered by
...
Chang, Shu-Hao). The bitbuffer needs to be unwound after decompression,
as it was eating into the crc/size field.
2001-11-29 06:36:56 +00:00
Matt Kraai
efd7f03657
Fix opt type in dpkg ( closes : #118975 ).
2001-11-19 21:07:15 +00:00
Glenn L McGrath
fff11f1ab7
bzcat and bunzip -c support from Thomas Lundquist
2001-11-18 14:20:25 +00:00
Eric Andersen
9c6b5fcb0a
Minor warning cleanups
2001-11-17 07:23:46 +00:00
Matt Kraai
c8227639db
Change strdup calls to xstrdup (patch from Steve Merrifield).
2001-11-12 16:57:27 +00:00
Matt Kraai
9fb38f600c
Eliminate unused variable warnings.
2001-11-12 16:45:23 +00:00
Matt Kraai
a5f09c668e
Use fopen wrapper.
2001-11-12 16:44:55 +00:00
Eric Andersen
7131213460
config.in features patch from Giulio Orsero <giulioo@pobox.com>
...
with some minor edits from me
2001-11-10 09:53:23 +00:00
Glenn L McGrath
0a25b35c66
Fix create list segfault
2001-11-03 08:29:35 +00:00
Glenn L McGrath
7134d6581b
Attempt to fix libc compiling error regarding off_t
2001-10-27 13:14:52 +00:00
Eric Andersen
c265b17550
Wrap exclude_file() inside a #ifdef CONFIG_FEATURE_TAR_EXCLUDE block
2001-10-27 03:20:00 +00:00
Glenn L McGrath
ee28362597
Menu entry for tar creation support
2001-10-25 18:37:41 +00:00
Glenn L McGrath
ef0eab514d
Recovering from my previous commit
2001-10-25 14:49:48 +00:00
Glenn L McGrath
0d2fb76c11
Modify applets to use libunarchive
2001-10-25 14:26:05 +00:00
Glenn L McGrath
95ebf618b7
*** empty log message ***
2001-10-25 14:18:08 +00:00
Matt Kraai
3c2f27d9f1
Add CONFIG_FEATURE_TAR_EXCLUDE support.
2001-10-24 18:51:27 +00:00
Eric Andersen
99702ab221
Fix variable name -- was stuck at the old RPMUNPACK value. Doh!
2001-10-24 17:37:07 +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
Glenn L McGrath
6ccdd8c122
Abort if scripts return value != 0
2001-10-23 17:52:28 +00:00
Matt Kraai
a7512d74fa
Process extra empty lines correctly.
2001-10-18 17:03:59 +00:00
Matt Kraai
3dd4f5ed69
Remove xmalloc calls.
2001-10-18 15:08:30 +00:00
Eric Andersen
74400ccfd0
Scrub up some function prototypes.
...
-Erik
2001-10-18 04:11:39 +00:00