diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2013-11-14 11:39:00 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-11-14 11:39:00 +0100 |
| commit | f6beef63c64abfc126ea4e73147af29d152f1a9e (patch) | |
| tree | 71b1f243cda3ab4836219386f017e3d95a7f41d9 | |
| parent | ac216873095a0d7c30737df5cdfa3bf6c261f079 (diff) | |
| download | busybox-w32-f6beef63c64abfc126ea4e73147af29d152f1a9e.tar.gz busybox-w32-f6beef63c64abfc126ea4e73147af29d152f1a9e.tar.bz2 busybox-w32-f6beef63c64abfc126ea4e73147af29d152f1a9e.zip | |
archival/*: move "config:" snippets into .c files
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| -rw-r--r-- | archival/Config.src | 350 | ||||
| -rw-r--r-- | archival/ar.c | 40 | ||||
| -rw-r--r-- | archival/bbunzip.c | 70 | ||||
| -rw-r--r-- | archival/bzip2.c | 13 | ||||
| -rw-r--r-- | archival/cpio.c | 29 | ||||
| -rw-r--r-- | archival/dpkg.c | 12 | ||||
| -rw-r--r-- | archival/dpkg_deb.c | 22 | ||||
| -rw-r--r-- | archival/gzip.c | 28 | ||||
| -rw-r--r-- | archival/lzop.c | 15 | ||||
| -rw-r--r-- | archival/rpm.c | 6 | ||||
| -rw-r--r-- | archival/rpm2cpio.c | 6 | ||||
| -rw-r--r-- | archival/tar.c | 101 | ||||
| -rw-r--r-- | archival/unzip.c | 10 |
13 files changed, 349 insertions, 353 deletions
diff --git a/archival/Config.src b/archival/Config.src index ae1afc594..76635ba78 100644 --- a/archival/Config.src +++ b/archival/Config.src | |||
| @@ -5,8 +5,6 @@ | |||
| 5 | 5 | ||
| 6 | menu "Archival Utilities" | 6 | menu "Archival Utilities" |
| 7 | 7 | ||
| 8 | INSERT | ||
| 9 | |||
| 10 | config FEATURE_SEAMLESS_XZ | 8 | config FEATURE_SEAMLESS_XZ |
| 11 | bool "Make tar, rpm, modprobe etc understand .xz data" | 9 | bool "Make tar, rpm, modprobe etc understand .xz data" |
| 12 | default y | 10 | default y |
| @@ -37,352 +35,6 @@ config FEATURE_SEAMLESS_Z | |||
| 37 | help | 35 | help |
| 38 | Make tar, rpm, modprobe etc understand .Z data. | 36 | Make tar, rpm, modprobe etc understand .Z data. |
| 39 | 37 | ||
| 40 | config AR | 38 | INSERT |
| 41 | bool "ar" | ||
| 42 | default n # needs to be improved to be able to replace binutils ar | ||
| 43 | help | ||
| 44 | ar is an archival utility program used to create, modify, and | ||
| 45 | extract contents from archives. An archive is a single file holding | ||
| 46 | a collection of other files in a structure that makes it possible to | ||
| 47 | retrieve the original individual files (called archive members). | ||
| 48 | The original files' contents, mode (permissions), timestamp, owner, | ||
| 49 | and group are preserved in the archive, and can be restored on | ||
| 50 | extraction. | ||
| 51 | |||
| 52 | The stored filename is limited to 15 characters. (for more information | ||
| 53 | see long filename support). | ||
| 54 | ar has 60 bytes of overheads for every stored file. | ||
| 55 | |||
| 56 | This implementation of ar can extract archives, it cannot create or | ||
| 57 | modify them. | ||
| 58 | On an x86 system, the ar applet adds about 1K. | ||
| 59 | |||
| 60 | Unless you have a specific application which requires ar, you should | ||
| 61 | probably say N here. | ||
| 62 | |||
| 63 | config FEATURE_AR_LONG_FILENAMES | ||
| 64 | bool "Support for long filenames (not needed for debs)" | ||
| 65 | default y | ||
| 66 | depends on AR | ||
| 67 | help | ||
| 68 | By default the ar format can only store the first 15 characters | ||
| 69 | of the filename, this option removes that limitation. | ||
| 70 | It supports the GNU ar long filename method which moves multiple long | ||
| 71 | filenames into a the data section of a new ar entry. | ||
| 72 | |||
| 73 | config FEATURE_AR_CREATE | ||
| 74 | bool "Support archive creation" | ||
| 75 | default y | ||
| 76 | depends on AR | ||
| 77 | help | ||
| 78 | This enables archive creation (-c and -r) with busybox ar. | ||
| 79 | |||
| 80 | config BUNZIP2 | ||
| 81 | bool "bunzip2" | ||
| 82 | default y | ||
| 83 | help | ||
| 84 | bunzip2 is a compression utility using the Burrows-Wheeler block | ||
| 85 | sorting text compression algorithm, and Huffman coding. Compression | ||
| 86 | is generally considerably better than that achieved by more | ||
| 87 | conventional LZ77/LZ78-based compressors, and approaches the | ||
| 88 | performance of the PPM family of statistical compressors. | ||
| 89 | |||
| 90 | Unless you have a specific application which requires bunzip2, you | ||
| 91 | should probably say N here. | ||
| 92 | |||
| 93 | config BZIP2 | ||
| 94 | bool "bzip2" | ||
| 95 | default y | ||
| 96 | help | ||
| 97 | bzip2 is a compression utility using the Burrows-Wheeler block | ||
| 98 | sorting text compression algorithm, and Huffman coding. Compression | ||
| 99 | is generally considerably better than that achieved by more | ||
| 100 | conventional LZ77/LZ78-based compressors, and approaches the | ||
| 101 | performance of the PPM family of statistical compressors. | ||
| 102 | |||
| 103 | Unless you have a specific application which requires bzip2, you | ||
| 104 | should probably say N here. | ||
| 105 | |||
| 106 | config CPIO | ||
| 107 | bool "cpio" | ||
| 108 | default y | ||
| 109 | help | ||
| 110 | cpio is an archival utility program used to create, modify, and | ||
| 111 | extract contents from archives. | ||
| 112 | cpio has 110 bytes of overheads for every stored file. | ||
| 113 | |||
| 114 | This implementation of cpio can extract cpio archives created in the | ||
| 115 | "newc" or "crc" format, it cannot create or modify them. | ||
| 116 | |||
| 117 | Unless you have a specific application which requires cpio, you | ||
| 118 | should probably say N here. | ||
| 119 | |||
| 120 | config FEATURE_CPIO_O | ||
| 121 | bool "Support for archive creation" | ||
| 122 | default y | ||
| 123 | depends on CPIO | ||
| 124 | help | ||
| 125 | This implementation of cpio can create cpio archives in the "newc" | ||
| 126 | format only. | ||
| 127 | |||
| 128 | config FEATURE_CPIO_P | ||
| 129 | bool "Support for passthrough mode" | ||
| 130 | default y | ||
| 131 | depends on FEATURE_CPIO_O | ||
| 132 | help | ||
| 133 | Passthrough mode. Rarely used. | ||
| 134 | |||
| 135 | config DPKG | ||
| 136 | bool "dpkg" | ||
| 137 | default n | ||
| 138 | select FEATURE_SEAMLESS_GZ | ||
| 139 | help | ||
| 140 | dpkg is a medium-level tool to install, build, remove and manage | ||
| 141 | Debian packages. | ||
| 142 | |||
| 143 | This implementation of dpkg has a number of limitations, | ||
| 144 | you should use the official dpkg if possible. | ||
| 145 | |||
| 146 | config DPKG_DEB | ||
| 147 | bool "dpkg_deb" | ||
| 148 | default n | ||
| 149 | select FEATURE_SEAMLESS_GZ | ||
| 150 | help | ||
| 151 | dpkg-deb unpacks and provides information about Debian archives. | ||
| 152 | |||
| 153 | This implementation of dpkg-deb cannot pack archives. | ||
| 154 | |||
| 155 | Unless you have a specific application which requires dpkg-deb, | ||
| 156 | say N here. | ||
| 157 | |||
| 158 | config FEATURE_DPKG_DEB_EXTRACT_ONLY | ||
| 159 | bool "Extract only (-x)" | ||
| 160 | default n | ||
| 161 | depends on DPKG_DEB | ||
| 162 | help | ||
| 163 | This reduces dpkg-deb to the equivalent of | ||
| 164 | "ar -p <deb> data.tar.gz | tar -zx". However it saves space as none | ||
| 165 | of the extra dpkg-deb, ar or tar options are needed, they are linked | ||
| 166 | to internally. | ||
| 167 | |||
| 168 | config GUNZIP | ||
| 169 | bool "gunzip" | ||
| 170 | default y | ||
| 171 | help | ||
| 172 | gunzip is used to decompress archives created by gzip. | ||
| 173 | You can use the `-t' option to test the integrity of | ||
| 174 | an archive, without decompressing it. | ||
| 175 | |||
| 176 | config GZIP | ||
| 177 | bool "gzip" | ||
| 178 | default y | ||
| 179 | help | ||
| 180 | gzip is used to compress files. | ||
| 181 | It's probably the most widely used UNIX compression program. | ||
| 182 | |||
| 183 | config FEATURE_GZIP_LONG_OPTIONS | ||
| 184 | bool "Enable long options" | ||
| 185 | default y | ||
| 186 | depends on GZIP && LONG_OPTS | ||
| 187 | help | ||
| 188 | Enable use of long options, increases size by about 106 Bytes | ||
| 189 | |||
| 190 | config GZIP_FAST | ||
| 191 | int "Trade memory for gzip speed (0:small,slow - 2:fast,big)" | ||
| 192 | default 0 | ||
| 193 | range 0 2 | ||
| 194 | depends on GZIP | ||
| 195 | help | ||
| 196 | Enable big memory options for gzip. | ||
| 197 | 0: small buffers, small hash-tables | ||
| 198 | 1: larger buffers, larger hash-tables | ||
| 199 | 2: larger buffers, largest hash-tables | ||
| 200 | Larger models may give slightly better compression | ||
| 201 | |||
| 202 | config LZOP | ||
| 203 | bool "lzop" | ||
| 204 | default y | ||
| 205 | help | ||
| 206 | Lzop compression/decompresion. | ||
| 207 | |||
| 208 | config LZOP_COMPR_HIGH | ||
| 209 | bool "lzop compression levels 7,8,9 (not very useful)" | ||
| 210 | default n | ||
| 211 | depends on LZOP | ||
| 212 | help | ||
| 213 | High levels (7,8,9) of lzop compression. These levels | ||
| 214 | are actually slower than gzip at equivalent compression ratios | ||
| 215 | and take up 3.2K of code. | ||
| 216 | |||
| 217 | config RPM2CPIO | ||
| 218 | bool "rpm2cpio" | ||
| 219 | default y | ||
| 220 | help | ||
| 221 | Converts a RPM file into a CPIO archive. | ||
| 222 | |||
| 223 | config RPM | ||
| 224 | bool "rpm" | ||
| 225 | default y | ||
| 226 | help | ||
| 227 | Mini RPM applet - queries and extracts RPM packages. | ||
| 228 | |||
| 229 | config TAR | ||
| 230 | bool "tar" | ||
| 231 | default y | ||
| 232 | help | ||
| 233 | tar is an archiving program. It's commonly used with gzip to | ||
| 234 | create compressed archives. It's probably the most widely used | ||
| 235 | UNIX archive program. | ||
| 236 | |||
| 237 | config FEATURE_TAR_CREATE | ||
| 238 | bool "Enable archive creation" | ||
| 239 | default y | ||
| 240 | depends on TAR | ||
| 241 | help | ||
| 242 | If you enable this option you'll be able to create | ||
| 243 | tar archives using the `-c' option. | ||
| 244 | |||
| 245 | config FEATURE_TAR_AUTODETECT | ||
| 246 | bool "Autodetect compressed tarballs" | ||
| 247 | default y | ||
| 248 | depends on TAR && (FEATURE_SEAMLESS_Z || FEATURE_SEAMLESS_GZ || FEATURE_SEAMLESS_BZ2 || FEATURE_SEAMLESS_LZMA || FEATURE_SEAMLESS_XZ) | ||
| 249 | help | ||
| 250 | With this option tar can automatically detect compressed | ||
| 251 | tarballs. Currently it works only on files (not pipes etc). | ||
| 252 | |||
| 253 | config FEATURE_TAR_FROM | ||
| 254 | bool "Enable -X (exclude from) and -T (include from) options)" | ||
| 255 | default y | ||
| 256 | depends on TAR | ||
| 257 | help | ||
| 258 | If you enable this option you'll be able to specify | ||
| 259 | a list of files to include or exclude from an archive. | ||
| 260 | |||
| 261 | config FEATURE_TAR_OLDGNU_COMPATIBILITY | ||
| 262 | bool "Support for old tar header format" | ||
| 263 | default y | ||
| 264 | depends on TAR || DPKG | ||
| 265 | help | ||
| 266 | This option is required to unpack archives created in | ||
| 267 | the old GNU format; help to kill this old format by | ||
| 268 | repacking your ancient archives with the new format. | ||
| 269 | |||
| 270 | config FEATURE_TAR_OLDSUN_COMPATIBILITY | ||
| 271 | bool "Enable untarring of tarballs with checksums produced by buggy Sun tar" | ||
| 272 | default y | ||
| 273 | depends on TAR || DPKG | ||
| 274 | help | ||
| 275 | This option is required to unpack archives created by some old | ||
| 276 | version of Sun's tar (it was calculating checksum using signed | ||
| 277 | arithmetic). It is said to be fixed in newer Sun tar, but "old" | ||
| 278 | tarballs still exist. | ||
| 279 | |||
| 280 | config FEATURE_TAR_GNU_EXTENSIONS | ||
| 281 | bool "Support for GNU tar extensions (long filenames)" | ||
| 282 | default y | ||
| 283 | depends on TAR || DPKG | ||
| 284 | help | ||
| 285 | With this option busybox supports GNU long filenames and | ||
| 286 | linknames. | ||
| 287 | |||
| 288 | config FEATURE_TAR_LONG_OPTIONS | ||
| 289 | bool "Enable long options" | ||
| 290 | default y | ||
| 291 | depends on TAR && LONG_OPTS | ||
| 292 | help | ||
| 293 | Enable use of long options, increases size by about 400 Bytes | ||
| 294 | |||
| 295 | config FEATURE_TAR_TO_COMMAND | ||
| 296 | bool "Support for writing to an external program" | ||
| 297 | default y | ||
| 298 | depends on TAR && FEATURE_TAR_LONG_OPTIONS | ||
| 299 | help | ||
| 300 | If you enable this option you'll be able to instruct tar to send | ||
| 301 | the contents of each extracted file to the standard input of an | ||
| 302 | external program. | ||
| 303 | |||
| 304 | config FEATURE_TAR_UNAME_GNAME | ||
| 305 | bool "Enable use of user and group names" | ||
| 306 | default y | ||
| 307 | depends on TAR | ||
| 308 | help | ||
| 309 | Enables use of user and group names in tar. This affects contents | ||
| 310 | listings (-t) and preserving permissions when unpacking (-p). | ||
| 311 | +200 bytes. | ||
| 312 | |||
| 313 | config FEATURE_TAR_NOPRESERVE_TIME | ||
| 314 | bool "Enable -m (do not preserve time) option" | ||
| 315 | default y | ||
| 316 | depends on TAR | ||
| 317 | help | ||
| 318 | With this option busybox supports GNU tar -m | ||
| 319 | (do not preserve time) option. | ||
| 320 | |||
| 321 | config FEATURE_TAR_SELINUX | ||
| 322 | bool "Support for extracting SELinux labels" | ||
| 323 | default n | ||
| 324 | depends on TAR && SELINUX | ||
| 325 | help | ||
| 326 | With this option busybox supports restoring SELinux labels | ||
| 327 | when extracting files from tar archives. | ||
| 328 | |||
| 329 | config UNCOMPRESS | ||
| 330 | bool "uncompress" | ||
| 331 | default n | ||
| 332 | help | ||
| 333 | uncompress is used to decompress archives created by compress. | ||
| 334 | Not much used anymore, replaced by gzip/gunzip. | ||
| 335 | |||
| 336 | config UNLZMA | ||
| 337 | bool "unlzma" | ||
| 338 | default y | ||
| 339 | help | ||
| 340 | unlzma is a compression utility using the Lempel-Ziv-Markov chain | ||
| 341 | compression algorithm, and range coding. Compression | ||
| 342 | is generally considerably better than that achieved by the bzip2 | ||
| 343 | compressors. | ||
| 344 | |||
| 345 | The BusyBox unlzma applet is limited to decompression only. | ||
| 346 | On an x86 system, this applet adds about 4K. | ||
| 347 | |||
| 348 | config FEATURE_LZMA_FAST | ||
| 349 | bool "Optimize unlzma for speed" | ||
| 350 | default n | ||
| 351 | depends on UNLZMA | ||
| 352 | help | ||
| 353 | This option reduces decompression time by about 25% at the cost of | ||
| 354 | a 1K bigger binary. | ||
| 355 | |||
| 356 | config LZMA | ||
| 357 | bool "Provide lzma alias which supports only unpacking" | ||
| 358 | default y | ||
| 359 | depends on UNLZMA | ||
| 360 | help | ||
| 361 | Enable this option if you want commands like "lzma -d" to work. | ||
| 362 | IOW: you'll get lzma applet, but it will always require -d option. | ||
| 363 | |||
| 364 | config UNXZ | ||
| 365 | bool "unxz" | ||
| 366 | default y | ||
| 367 | help | ||
| 368 | unxz is a unlzma successor. | ||
| 369 | |||
| 370 | config XZ | ||
| 371 | bool "Provide xz alias which supports only unpacking" | ||
| 372 | default y | ||
| 373 | depends on UNXZ | ||
| 374 | help | ||
| 375 | Enable this option if you want commands like "xz -d" to work. | ||
| 376 | IOW: you'll get xz applet, but it will always require -d option. | ||
| 377 | |||
| 378 | config UNZIP | ||
| 379 | bool "unzip" | ||
| 380 | default y | ||
| 381 | help | ||
| 382 | unzip will list or extract files from a ZIP archive, | ||
| 383 | commonly found on DOS/WIN systems. The default behavior | ||
| 384 | (with no options) is to extract the archive into the | ||
| 385 | current directory. Use the `-d' option to extract to a | ||
| 386 | directory of your choice. | ||
| 387 | 39 | ||
| 388 | endmenu | 40 | endmenu |
diff --git a/archival/ar.c b/archival/ar.c index 866856f87..f86c52d9b 100644 --- a/archival/ar.c +++ b/archival/ar.c | |||
| @@ -17,6 +17,46 @@ | |||
| 17 | * http://www.unix-systems.org/single_unix_specification_v2/xcu/ar.html | 17 | * http://www.unix-systems.org/single_unix_specification_v2/xcu/ar.html |
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| 20 | //config:config AR | ||
| 21 | //config: bool "ar" | ||
| 22 | //config: default n # needs to be improved to be able to replace binutils ar | ||
| 23 | //config: help | ||
| 24 | //config: ar is an archival utility program used to create, modify, and | ||
| 25 | //config: extract contents from archives. An archive is a single file holding | ||
| 26 | //config: a collection of other files in a structure that makes it possible to | ||
| 27 | //config: retrieve the original individual files (called archive members). | ||
| 28 | //config: The original files' contents, mode (permissions), timestamp, owner, | ||
| 29 | //config: and group are preserved in the archive, and can be restored on | ||
| 30 | //config: extraction. | ||
| 31 | //config: | ||
| 32 | //config: The stored filename is limited to 15 characters. (for more information | ||
| 33 | //config: see long filename support). | ||
| 34 | //config: ar has 60 bytes of overheads for every stored file. | ||
| 35 | //config: | ||
| 36 | //config: This implementation of ar can extract archives, it cannot create or | ||
| 37 | //config: modify them. | ||
| 38 | //config: On an x86 system, the ar applet adds about 1K. | ||
| 39 | //config: | ||
| 40 | //config: Unless you have a specific application which requires ar, you should | ||
| 41 | //config: probably say N here. | ||
| 42 | //config: | ||
| 43 | //config:config FEATURE_AR_LONG_FILENAMES | ||
| 44 | //config: bool "Support for long filenames (not needed for debs)" | ||
| 45 | //config: default y | ||
| 46 | //config: depends on AR | ||
| 47 | //config: help | ||
| 48 | //config: By default the ar format can only store the first 15 characters | ||
| 49 | //config: of the filename, this option removes that limitation. | ||
| 50 | //config: It supports the GNU ar long filename method which moves multiple long | ||
| 51 | //config: filenames into a the data section of a new ar entry. | ||
| 52 | //config: | ||
| 53 | //config:config FEATURE_AR_CREATE | ||
| 54 | //config: bool "Support archive creation" | ||
| 55 | //config: default y | ||
| 56 | //config: depends on AR | ||
| 57 | //config: help | ||
| 58 | //config: This enables archive creation (-c and -r) with busybox ar. | ||
| 59 | |||
| 20 | //applet:IF_AR(APPLET(ar, BB_DIR_USR_BIN, BB_SUID_DROP)) | 60 | //applet:IF_AR(APPLET(ar, BB_DIR_USR_BIN, BB_SUID_DROP)) |
| 21 | //kbuild:lib-$(CONFIG_AR) += ar.o | 61 | //kbuild:lib-$(CONFIG_AR) += ar.o |
| 22 | 62 | ||
diff --git a/archival/bbunzip.c b/archival/bbunzip.c index eb6f114ad..b3fb90f31 100644 --- a/archival/bbunzip.c +++ b/archival/bbunzip.c | |||
| @@ -215,6 +215,13 @@ char* FAST_FUNC make_new_name_generic(char *filename, const char *expected_ext) | |||
| 215 | //usage: "\n -c Write to stdout" | 215 | //usage: "\n -c Write to stdout" |
| 216 | //usage: "\n -f Overwrite" | 216 | //usage: "\n -f Overwrite" |
| 217 | 217 | ||
| 218 | //config:config UNCOMPRESS | ||
| 219 | //config: bool "uncompress" | ||
| 220 | //config: default n | ||
| 221 | //config: help | ||
| 222 | //config: uncompress is used to decompress archives created by compress. | ||
| 223 | //config: Not much used anymore, replaced by gzip/gunzip. | ||
| 224 | |||
| 218 | //applet:IF_UNCOMPRESS(APPLET(uncompress, BB_DIR_BIN, BB_SUID_DROP)) | 225 | //applet:IF_UNCOMPRESS(APPLET(uncompress, BB_DIR_BIN, BB_SUID_DROP)) |
| 219 | //kbuild:lib-$(CONFIG_UNCOMPRESS) += bbunzip.o | 226 | //kbuild:lib-$(CONFIG_UNCOMPRESS) += bbunzip.o |
| 220 | #if ENABLE_UNCOMPRESS | 227 | #if ENABLE_UNCOMPRESS |
| @@ -278,6 +285,14 @@ int uncompress_main(int argc UNUSED_PARAM, char **argv) | |||
| 278 | //usage:#define zcat_full_usage "\n\n" | 285 | //usage:#define zcat_full_usage "\n\n" |
| 279 | //usage: "Decompress to stdout" | 286 | //usage: "Decompress to stdout" |
| 280 | 287 | ||
| 288 | //config:config GUNZIP | ||
| 289 | //config: bool "gunzip" | ||
| 290 | //config: default y | ||
| 291 | //config: help | ||
| 292 | //config: gunzip is used to decompress archives created by gzip. | ||
| 293 | //config: You can use the `-t' option to test the integrity of | ||
| 294 | //config: an archive, without decompressing it. | ||
| 295 | |||
| 281 | //applet:IF_GUNZIP(APPLET(gunzip, BB_DIR_BIN, BB_SUID_DROP)) | 296 | //applet:IF_GUNZIP(APPLET(gunzip, BB_DIR_BIN, BB_SUID_DROP)) |
| 282 | //applet:IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, BB_DIR_BIN, BB_SUID_DROP, zcat)) | 297 | //applet:IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, BB_DIR_BIN, BB_SUID_DROP, zcat)) |
| 283 | //kbuild:lib-$(CONFIG_GZIP) += bbunzip.o | 298 | //kbuild:lib-$(CONFIG_GZIP) += bbunzip.o |
| @@ -361,6 +376,19 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv) | |||
| 361 | //usage:#define bzcat_full_usage "\n\n" | 376 | //usage:#define bzcat_full_usage "\n\n" |
| 362 | //usage: "Decompress to stdout" | 377 | //usage: "Decompress to stdout" |
| 363 | 378 | ||
| 379 | //config:config BUNZIP2 | ||
| 380 | //config: bool "bunzip2" | ||
| 381 | //config: default y | ||
| 382 | //config: help | ||
| 383 | //config: bunzip2 is a compression utility using the Burrows-Wheeler block | ||
| 384 | //config: sorting text compression algorithm, and Huffman coding. Compression | ||
| 385 | //config: is generally considerably better than that achieved by more | ||
| 386 | //config: conventional LZ77/LZ78-based compressors, and approaches the | ||
| 387 | //config: performance of the PPM family of statistical compressors. | ||
| 388 | //config: | ||
| 389 | //config: Unless you have a specific application which requires bunzip2, you | ||
| 390 | //config: should probably say N here. | ||
| 391 | |||
| 364 | //applet:IF_BUNZIP2(APPLET(bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP)) | 392 | //applet:IF_BUNZIP2(APPLET(bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP)) |
| 365 | //applet:IF_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP, bzcat)) | 393 | //applet:IF_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP, bzcat)) |
| 366 | //kbuild:lib-$(CONFIG_BZIP2) += bbunzip.o | 394 | //kbuild:lib-$(CONFIG_BZIP2) += bbunzip.o |
| @@ -432,6 +460,34 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv) | |||
| 432 | //usage:#define xzcat_full_usage "\n\n" | 460 | //usage:#define xzcat_full_usage "\n\n" |
| 433 | //usage: "Decompress to stdout" | 461 | //usage: "Decompress to stdout" |
| 434 | 462 | ||
| 463 | //config:config UNLZMA | ||
| 464 | //config: bool "unlzma" | ||
| 465 | //config: default y | ||
| 466 | //config: help | ||
| 467 | //config: unlzma is a compression utility using the Lempel-Ziv-Markov chain | ||
| 468 | //config: compression algorithm, and range coding. Compression | ||
| 469 | //config: is generally considerably better than that achieved by the bzip2 | ||
| 470 | //config: compressors. | ||
| 471 | //config: | ||
| 472 | //config: The BusyBox unlzma applet is limited to decompression only. | ||
| 473 | //config: On an x86 system, this applet adds about 4K. | ||
| 474 | //config: | ||
| 475 | //config:config FEATURE_LZMA_FAST | ||
| 476 | //config: bool "Optimize unlzma for speed" | ||
| 477 | //config: default n | ||
| 478 | //config: depends on UNLZMA | ||
| 479 | //config: help | ||
| 480 | //config: This option reduces decompression time by about 25% at the cost of | ||
| 481 | //config: a 1K bigger binary. | ||
| 482 | //config: | ||
| 483 | //config:config LZMA | ||
| 484 | //config: bool "Provide lzma alias which supports only unpacking" | ||
| 485 | //config: default y | ||
| 486 | //config: depends on UNLZMA | ||
| 487 | //config: help | ||
| 488 | //config: Enable this option if you want commands like "lzma -d" to work. | ||
| 489 | //config: IOW: you'll get lzma applet, but it will always require -d option. | ||
| 490 | |||
| 435 | //applet:IF_UNLZMA(APPLET(unlzma, BB_DIR_USR_BIN, BB_SUID_DROP)) | 491 | //applet:IF_UNLZMA(APPLET(unlzma, BB_DIR_USR_BIN, BB_SUID_DROP)) |
| 436 | //applet:IF_UNLZMA(APPLET_ODDNAME(lzcat, unlzma, BB_DIR_USR_BIN, BB_SUID_DROP, lzcat)) | 492 | //applet:IF_UNLZMA(APPLET_ODDNAME(lzcat, unlzma, BB_DIR_USR_BIN, BB_SUID_DROP, lzcat)) |
| 437 | //applet:IF_LZMA(APPLET_ODDNAME(lzma, unlzma, BB_DIR_USR_BIN, BB_SUID_DROP, lzma)) | 493 | //applet:IF_LZMA(APPLET_ODDNAME(lzma, unlzma, BB_DIR_USR_BIN, BB_SUID_DROP, lzma)) |
| @@ -461,6 +517,20 @@ int unlzma_main(int argc UNUSED_PARAM, char **argv) | |||
| 461 | #endif | 517 | #endif |
| 462 | 518 | ||
| 463 | 519 | ||
| 520 | //config:config UNXZ | ||
| 521 | //config: bool "unxz" | ||
| 522 | //config: default y | ||
| 523 | //config: help | ||
| 524 | //config: unxz is a unlzma successor. | ||
| 525 | //config: | ||
| 526 | //config:config XZ | ||
| 527 | //config: bool "Provide xz alias which supports only unpacking" | ||
| 528 | //config: default y | ||
| 529 | //config: depends on UNXZ | ||
| 530 | //config: help | ||
| 531 | //config: Enable this option if you want commands like "xz -d" to work. | ||
| 532 | //config: IOW: you'll get xz applet, but it will always require -d option. | ||
| 533 | |||
| 464 | //applet:IF_UNXZ(APPLET(unxz, BB_DIR_USR_BIN, BB_SUID_DROP)) | 534 | //applet:IF_UNXZ(APPLET(unxz, BB_DIR_USR_BIN, BB_SUID_DROP)) |
| 465 | //applet:IF_UNXZ(APPLET_ODDNAME(xzcat, unxz, BB_DIR_USR_BIN, BB_SUID_DROP, xzcat)) | 535 | //applet:IF_UNXZ(APPLET_ODDNAME(xzcat, unxz, BB_DIR_USR_BIN, BB_SUID_DROP, xzcat)) |
| 466 | //applet:IF_XZ(APPLET_ODDNAME(xz, unxz, BB_DIR_USR_BIN, BB_SUID_DROP, xz)) | 536 | //applet:IF_XZ(APPLET_ODDNAME(xz, unxz, BB_DIR_USR_BIN, BB_SUID_DROP, xz)) |
diff --git a/archival/bzip2.c b/archival/bzip2.c index eabd1c2d6..f7718b411 100644 --- a/archival/bzip2.c +++ b/archival/bzip2.c | |||
| @@ -7,6 +7,19 @@ | |||
| 7 | * about bzip2 library code. | 7 | * about bzip2 library code. |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | //config:config BZIP2 | ||
| 11 | //config: bool "bzip2" | ||
| 12 | //config: default y | ||
| 13 | //config: help | ||
| 14 | //config: bzip2 is a compression utility using the Burrows-Wheeler block | ||
| 15 | //config: sorting text compression algorithm, and Huffman coding. Compression | ||
| 16 | //config: is generally considerably better than that achieved by more | ||
| 17 | //config: conventional LZ77/LZ78-based compressors, and approaches the | ||
| 18 | //config: performance of the PPM family of statistical compressors. | ||
| 19 | //config: | ||
| 20 | //config: Unless you have a specific application which requires bzip2, you | ||
| 21 | //config: should probably say N here. | ||
| 22 | |||
| 10 | //applet:IF_BZIP2(APPLET(bzip2, BB_DIR_USR_BIN, BB_SUID_DROP)) | 23 | //applet:IF_BZIP2(APPLET(bzip2, BB_DIR_USR_BIN, BB_SUID_DROP)) |
| 11 | //kbuild:lib-$(CONFIG_BZIP2) += bzip2.o | 24 | //kbuild:lib-$(CONFIG_BZIP2) += bzip2.o |
| 12 | 25 | ||
diff --git a/archival/cpio.c b/archival/cpio.c index 41eb6f659..1cce7c8b4 100644 --- a/archival/cpio.c +++ b/archival/cpio.c | |||
| @@ -13,6 +13,35 @@ | |||
| 13 | #include "libbb.h" | 13 | #include "libbb.h" |
| 14 | #include "bb_archive.h" | 14 | #include "bb_archive.h" |
| 15 | 15 | ||
| 16 | //config:config CPIO | ||
| 17 | //config: bool "cpio" | ||
| 18 | //config: default y | ||
| 19 | //config: help | ||
| 20 | //config: cpio is an archival utility program used to create, modify, and | ||
| 21 | //config: extract contents from archives. | ||
| 22 | //config: cpio has 110 bytes of overheads for every stored file. | ||
| 23 | //config: | ||
| 24 | //config: This implementation of cpio can extract cpio archives created in the | ||
| 25 | //config: "newc" or "crc" format, it cannot create or modify them. | ||
| 26 | //config: | ||
| 27 | //config: Unless you have a specific application which requires cpio, you | ||
| 28 | //config: should probably say N here. | ||
| 29 | //config: | ||
| 30 | //config:config FEATURE_CPIO_O | ||
| 31 | //config: bool "Support for archive creation" | ||
| 32 | //config: default y | ||
| 33 | //config: depends on CPIO | ||
| 34 | //config: help | ||
| 35 | //config: This implementation of cpio can create cpio archives in the "newc" | ||
| 36 | //config: format only. | ||
| 37 | //config: | ||
| 38 | //config:config FEATURE_CPIO_P | ||
| 39 | //config: bool "Support for passthrough mode" | ||
| 40 | //config: default y | ||
| 41 | //config: depends on FEATURE_CPIO_O | ||
| 42 | //config: help | ||
| 43 | //config: Passthrough mode. Rarely used. | ||
| 44 | |||
| 16 | //applet:IF_CPIO(APPLET(cpio, BB_DIR_BIN, BB_SUID_DROP)) | 45 | //applet:IF_CPIO(APPLET(cpio, BB_DIR_BIN, BB_SUID_DROP)) |
| 17 | //kbuild:lib-$(CONFIG_CPIO) += cpio.o | 46 | //kbuild:lib-$(CONFIG_CPIO) += cpio.o |
| 18 | 47 | ||
diff --git a/archival/dpkg.c b/archival/dpkg.c index 288e7fa9f..2893cfc2d 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | * | 14 | * |
| 15 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 15 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 16 | */ | 16 | */ |
| 17 | |||
| 18 | /* | 17 | /* |
| 19 | * known difference between busybox dpkg and the official dpkg that i don't | 18 | * known difference between busybox dpkg and the official dpkg that i don't |
| 20 | * consider important, its worth keeping a note of differences anyway, just to | 19 | * consider important, its worth keeping a note of differences anyway, just to |
| @@ -27,6 +26,17 @@ | |||
| 27 | * - (unknown, please let me know when you find any) | 26 | * - (unknown, please let me know when you find any) |
| 28 | */ | 27 | */ |
| 29 | 28 | ||
| 29 | //config:config DPKG | ||
| 30 | //config: bool "dpkg" | ||
| 31 | //config: default n | ||
| 32 | //config: select FEATURE_SEAMLESS_GZ | ||
| 33 | //config: help | ||
| 34 | //config: dpkg is a medium-level tool to install, build, remove and manage | ||
| 35 | //config: Debian packages. | ||
| 36 | //config: | ||
| 37 | //config: This implementation of dpkg has a number of limitations, | ||
| 38 | //config: you should use the official dpkg if possible. | ||
| 39 | |||
| 30 | //applet:IF_DPKG(APPLET(dpkg, BB_DIR_USR_BIN, BB_SUID_DROP)) | 40 | //applet:IF_DPKG(APPLET(dpkg, BB_DIR_USR_BIN, BB_SUID_DROP)) |
| 31 | //kbuild:lib-$(CONFIG_DPKG) += dpkg.o | 41 | //kbuild:lib-$(CONFIG_DPKG) += dpkg.o |
| 32 | 42 | ||
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c index 6924f8911..81b5352a2 100644 --- a/archival/dpkg_deb.c +++ b/archival/dpkg_deb.c | |||
| @@ -5,6 +5,28 @@ | |||
| 5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | //config:config DPKG_DEB | ||
| 9 | //config: bool "dpkg_deb" | ||
| 10 | //config: default n | ||
| 11 | //config: select FEATURE_SEAMLESS_GZ | ||
| 12 | //config: help | ||
| 13 | //config: dpkg-deb unpacks and provides information about Debian archives. | ||
| 14 | //config: | ||
| 15 | //config: This implementation of dpkg-deb cannot pack archives. | ||
| 16 | //config: | ||
| 17 | //config: Unless you have a specific application which requires dpkg-deb, | ||
| 18 | //config: say N here. | ||
| 19 | //config: | ||
| 20 | //config:config FEATURE_DPKG_DEB_EXTRACT_ONLY | ||
| 21 | //config: bool "Extract only (-x)" | ||
| 22 | //config: default n | ||
| 23 | //config: depends on DPKG_DEB | ||
| 24 | //config: help | ||
| 25 | //config: This reduces dpkg-deb to the equivalent of | ||
| 26 | //config: "ar -p <deb> data.tar.gz | tar -zx". However it saves space as none | ||
| 27 | //config: of the extra dpkg-deb, ar or tar options are needed, they are linked | ||
| 28 | //config: to internally. | ||
| 29 | |||
| 8 | //applet:IF_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, BB_DIR_USR_BIN, BB_SUID_DROP, dpkg_deb)) | 30 | //applet:IF_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, BB_DIR_USR_BIN, BB_SUID_DROP, dpkg_deb)) |
| 9 | //kbuild:lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o | 31 | //kbuild:lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o |
| 10 | 32 | ||
diff --git a/archival/gzip.c b/archival/gzip.c index 5d6fdb91c..1e779c9c3 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | * | 15 | * |
| 16 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 16 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 17 | */ | 17 | */ |
| 18 | |||
| 19 | /* big objects in bss: | 18 | /* big objects in bss: |
| 20 | * 00000020 b bl_count | 19 | * 00000020 b bl_count |
| 21 | * 00000074 b base_length | 20 | * 00000074 b base_length |
| @@ -31,7 +30,6 @@ | |||
| 31 | * 00000480 b static_ltree | 30 | * 00000480 b static_ltree |
| 32 | * 000008f4 b dyn_ltree | 31 | * 000008f4 b dyn_ltree |
| 33 | */ | 32 | */ |
| 34 | |||
| 35 | /* TODO: full support for -v for DESKTOP | 33 | /* TODO: full support for -v for DESKTOP |
| 36 | * "/usr/bin/gzip -v a bogus aa" should say: | 34 | * "/usr/bin/gzip -v a bogus aa" should say: |
| 37 | a: 85.1% -- replaced with a.gz | 35 | a: 85.1% -- replaced with a.gz |
| @@ -39,6 +37,32 @@ gzip: bogus: No such file or directory | |||
| 39 | aa: 85.1% -- replaced with aa.gz | 37 | aa: 85.1% -- replaced with aa.gz |
| 40 | */ | 38 | */ |
| 41 | 39 | ||
| 40 | //config:config GZIP | ||
| 41 | //config: bool "gzip" | ||
| 42 | //config: default y | ||
| 43 | //config: help | ||
| 44 | //config: gzip is used to compress files. | ||
| 45 | //config: It's probably the most widely used UNIX compression program. | ||
| 46 | //config: | ||
| 47 | //config:config FEATURE_GZIP_LONG_OPTIONS | ||
| 48 | //config: bool "Enable long options" | ||
| 49 | //config: default y | ||
| 50 | //config: depends on GZIP && LONG_OPTS | ||
| 51 | //config: help | ||
| 52 | //config: Enable use of long options, increases size by about 106 Bytes | ||
| 53 | //config: | ||
| 54 | //config:config GZIP_FAST | ||
| 55 | //config: int "Trade memory for gzip speed (0:small,slow - 2:fast,big)" | ||
| 56 | //config: default 0 | ||
| 57 | //config: range 0 2 | ||
| 58 | //config: depends on GZIP | ||
| 59 | //config: help | ||
| 60 | //config: Enable big memory options for gzip. | ||
| 61 | //config: 0: small buffers, small hash-tables | ||
| 62 | //config: 1: larger buffers, larger hash-tables | ||
| 63 | //config: 2: larger buffers, largest hash-tables | ||
| 64 | //config: Larger models may give slightly better compression | ||
| 65 | |||
| 42 | //applet:IF_GZIP(APPLET(gzip, BB_DIR_BIN, BB_SUID_DROP)) | 66 | //applet:IF_GZIP(APPLET(gzip, BB_DIR_BIN, BB_SUID_DROP)) |
| 43 | //kbuild:lib-$(CONFIG_GZIP) += gzip.o | 67 | //kbuild:lib-$(CONFIG_GZIP) += gzip.o |
| 44 | 68 | ||
diff --git a/archival/lzop.c b/archival/lzop.c index 9007d5311..5062d9300 100644 --- a/archival/lzop.c +++ b/archival/lzop.c | |||
| @@ -25,6 +25,21 @@ | |||
| 25 | "Minimalized" for busybox by Alain Knaff | 25 | "Minimalized" for busybox by Alain Knaff |
| 26 | */ | 26 | */ |
| 27 | 27 | ||
| 28 | //config:config LZOP | ||
| 29 | //config: bool "lzop" | ||
| 30 | //config: default y | ||
| 31 | //config: help | ||
| 32 | //config: Lzop compression/decompresion. | ||
| 33 | //config: | ||
| 34 | //config:config LZOP_COMPR_HIGH | ||
| 35 | //config: bool "lzop compression levels 7,8,9 (not very useful)" | ||
| 36 | //config: default n | ||
| 37 | //config: depends on LZOP | ||
| 38 | //config: help | ||
| 39 | //config: High levels (7,8,9) of lzop compression. These levels | ||
| 40 | //config: are actually slower than gzip at equivalent compression ratios | ||
| 41 | //config: and take up 3.2K of code. | ||
| 42 | |||
| 28 | //applet:IF_LZOP(APPLET(lzop, BB_DIR_BIN, BB_SUID_DROP)) | 43 | //applet:IF_LZOP(APPLET(lzop, BB_DIR_BIN, BB_SUID_DROP)) |
| 29 | //applet:IF_LZOP(APPLET_ODDNAME(lzopcat, lzop, BB_DIR_USR_BIN, BB_SUID_DROP, lzopcat)) | 44 | //applet:IF_LZOP(APPLET_ODDNAME(lzopcat, lzop, BB_DIR_USR_BIN, BB_SUID_DROP, lzopcat)) |
| 30 | //applet:IF_LZOP(APPLET_ODDNAME(unlzop, lzop, BB_DIR_USR_BIN, BB_SUID_DROP, unlzop)) | 45 | //applet:IF_LZOP(APPLET_ODDNAME(unlzop, lzop, BB_DIR_USR_BIN, BB_SUID_DROP, unlzop)) |
diff --git a/archival/rpm.c b/archival/rpm.c index 81a1d1d54..885eddd64 100644 --- a/archival/rpm.c +++ b/archival/rpm.c | |||
| @@ -7,6 +7,12 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | //config:config RPM | ||
| 11 | //config: bool "rpm" | ||
| 12 | //config: default y | ||
| 13 | //config: help | ||
| 14 | //config: Mini RPM applet - queries and extracts RPM packages. | ||
| 15 | |||
| 10 | //applet:IF_RPM(APPLET(rpm, BB_DIR_BIN, BB_SUID_DROP)) | 16 | //applet:IF_RPM(APPLET(rpm, BB_DIR_BIN, BB_SUID_DROP)) |
| 11 | //kbuild:lib-$(CONFIG_RPM) += rpm.o | 17 | //kbuild:lib-$(CONFIG_RPM) += rpm.o |
| 12 | 18 | ||
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c index c48fc14cd..61adde795 100644 --- a/archival/rpm2cpio.c +++ b/archival/rpm2cpio.c | |||
| @@ -7,6 +7,12 @@ | |||
| 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | //config:config RPM2CPIO | ||
| 11 | //config: bool "rpm2cpio" | ||
| 12 | //config: default y | ||
| 13 | //config: help | ||
| 14 | //config: Converts a RPM file into a CPIO archive. | ||
| 15 | |||
| 10 | //applet:IF_RPM2CPIO(APPLET(rpm2cpio, BB_DIR_USR_BIN, BB_SUID_DROP)) | 16 | //applet:IF_RPM2CPIO(APPLET(rpm2cpio, BB_DIR_USR_BIN, BB_SUID_DROP)) |
| 11 | //kbuild:lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o | 17 | //kbuild:lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o |
| 12 | 18 | ||
diff --git a/archival/tar.c b/archival/tar.c index 25042589c..3877ea4db 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | * | 22 | * |
| 23 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 23 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 24 | */ | 24 | */ |
| 25 | |||
| 26 | /* TODO: security with -C DESTDIR option can be enhanced. | 25 | /* TODO: security with -C DESTDIR option can be enhanced. |
| 27 | * Consider tar file created via: | 26 | * Consider tar file created via: |
| 28 | * $ tar cvf bug.tar anything.txt | 27 | * $ tar cvf bug.tar anything.txt |
| @@ -42,6 +41,106 @@ | |||
| 42 | * This doesn't feel right, and IIRC GNU tar doesn't do that. | 41 | * This doesn't feel right, and IIRC GNU tar doesn't do that. |
| 43 | */ | 42 | */ |
| 44 | 43 | ||
| 44 | //config:config TAR | ||
| 45 | //config: bool "tar" | ||
| 46 | //config: default y | ||
| 47 | //config: help | ||
| 48 | //config: tar is an archiving program. It's commonly used with gzip to | ||
| 49 | //config: create compressed archives. It's probably the most widely used | ||
| 50 | //config: UNIX archive program. | ||
| 51 | //config: | ||
| 52 | //config:config FEATURE_TAR_CREATE | ||
| 53 | //config: bool "Enable archive creation" | ||
| 54 | //config: default y | ||
| 55 | //config: depends on TAR | ||
| 56 | //config: help | ||
| 57 | //config: If you enable this option you'll be able to create | ||
| 58 | //config: tar archives using the `-c' option. | ||
| 59 | //config: | ||
| 60 | //config:config FEATURE_TAR_AUTODETECT | ||
| 61 | //config: bool "Autodetect compressed tarballs" | ||
| 62 | //config: default y | ||
| 63 | //config: depends on TAR && (FEATURE_SEAMLESS_Z || FEATURE_SEAMLESS_GZ || FEATURE_SEAMLESS_BZ2 || FEATURE_SEAMLESS_LZMA || FEATURE_SEAMLESS_XZ) | ||
| 64 | //config: help | ||
| 65 | //config: With this option tar can automatically detect compressed | ||
| 66 | //config: tarballs. Currently it works only on files (not pipes etc). | ||
| 67 | //config: | ||
| 68 | //config:config FEATURE_TAR_FROM | ||
| 69 | //config: bool "Enable -X (exclude from) and -T (include from) options)" | ||
| 70 | //config: default y | ||
| 71 | //config: depends on TAR | ||
| 72 | //config: help | ||
| 73 | //config: If you enable this option you'll be able to specify | ||
| 74 | //config: a list of files to include or exclude from an archive. | ||
| 75 | //config: | ||
| 76 | //config:config FEATURE_TAR_OLDGNU_COMPATIBILITY | ||
| 77 | //config: bool "Support for old tar header format" | ||
| 78 | //config: default y | ||
| 79 | //config: depends on TAR || DPKG | ||
| 80 | //config: help | ||
| 81 | //config: This option is required to unpack archives created in | ||
| 82 | //config: the old GNU format; help to kill this old format by | ||
| 83 | //config: repacking your ancient archives with the new format. | ||
| 84 | //config: | ||
| 85 | //config:config FEATURE_TAR_OLDSUN_COMPATIBILITY | ||
| 86 | //config: bool "Enable untarring of tarballs with checksums produced by buggy Sun tar" | ||
| 87 | //config: default y | ||
| 88 | //config: depends on TAR || DPKG | ||
| 89 | //config: help | ||
| 90 | //config: This option is required to unpack archives created by some old | ||
| 91 | //config: version of Sun's tar (it was calculating checksum using signed | ||
| 92 | //config: arithmetic). It is said to be fixed in newer Sun tar, but "old" | ||
| 93 | //config: tarballs still exist. | ||
| 94 | //config: | ||
| 95 | //config:config FEATURE_TAR_GNU_EXTENSIONS | ||
| 96 | //config: bool "Support for GNU tar extensions (long filenames)" | ||
| 97 | //config: default y | ||
| 98 | //config: depends on TAR || DPKG | ||
| 99 | //config: help | ||
| 100 | //config: With this option busybox supports GNU long filenames and | ||
| 101 | //config: linknames. | ||
| 102 | //config: | ||
| 103 | //config:config FEATURE_TAR_LONG_OPTIONS | ||
| 104 | //config: bool "Enable long options" | ||
| 105 | //config: default y | ||
| 106 | //config: depends on TAR && LONG_OPTS | ||
| 107 | //config: help | ||
| 108 | //config: Enable use of long options, increases size by about 400 Bytes | ||
| 109 | //config: | ||
| 110 | //config:config FEATURE_TAR_TO_COMMAND | ||
| 111 | //config: bool "Support for writing to an external program" | ||
| 112 | //config: default y | ||
| 113 | //config: depends on TAR && FEATURE_TAR_LONG_OPTIONS | ||
| 114 | //config: help | ||
| 115 | //config: If you enable this option you'll be able to instruct tar to send | ||
| 116 | //config: the contents of each extracted file to the standard input of an | ||
| 117 | //config: external program. | ||
| 118 | //config: | ||
| 119 | //config:config FEATURE_TAR_UNAME_GNAME | ||
| 120 | //config: bool "Enable use of user and group names" | ||
| 121 | //config: default y | ||
| 122 | //config: depends on TAR | ||
| 123 | //config: help | ||
| 124 | //config: Enables use of user and group names in tar. This affects contents | ||
| 125 | //config: listings (-t) and preserving permissions when unpacking (-p). | ||
| 126 | //config: +200 bytes. | ||
| 127 | //config: | ||
| 128 | //config:config FEATURE_TAR_NOPRESERVE_TIME | ||
| 129 | //config: bool "Enable -m (do not preserve time) option" | ||
| 130 | //config: default y | ||
| 131 | //config: depends on TAR | ||
| 132 | //config: help | ||
| 133 | //config: With this option busybox supports GNU tar -m | ||
| 134 | //config: (do not preserve time) option. | ||
| 135 | //config: | ||
| 136 | //config:config FEATURE_TAR_SELINUX | ||
| 137 | //config: bool "Support for extracting SELinux labels" | ||
| 138 | //config: default n | ||
| 139 | //config: depends on TAR && SELINUX | ||
| 140 | //config: help | ||
| 141 | //config: With this option busybox supports restoring SELinux labels | ||
| 142 | //config: when extracting files from tar archives. | ||
| 143 | |||
| 45 | //applet:IF_TAR(APPLET(tar, BB_DIR_BIN, BB_SUID_DROP)) | 144 | //applet:IF_TAR(APPLET(tar, BB_DIR_BIN, BB_SUID_DROP)) |
| 46 | //kbuild:lib-$(CONFIG_TAR) += tar.o | 145 | //kbuild:lib-$(CONFIG_TAR) += tar.o |
| 47 | 146 | ||
diff --git a/archival/unzip.c b/archival/unzip.c index 9825986bf..fcfc9a448 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
| @@ -17,6 +17,16 @@ | |||
| 17 | * Zip64 + other methods | 17 | * Zip64 + other methods |
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| 20 | //config:config UNZIP | ||
| 21 | //config: bool "unzip" | ||
| 22 | //config: default y | ||
| 23 | //config: help | ||
| 24 | //config: unzip will list or extract files from a ZIP archive, | ||
| 25 | //config: commonly found on DOS/WIN systems. The default behavior | ||
| 26 | //config: (with no options) is to extract the archive into the | ||
| 27 | //config: current directory. Use the `-d' option to extract to a | ||
| 28 | //config: directory of your choice. | ||
| 29 | |||
| 20 | //applet:IF_UNZIP(APPLET(unzip, BB_DIR_USR_BIN, BB_SUID_DROP)) | 30 | //applet:IF_UNZIP(APPLET(unzip, BB_DIR_USR_BIN, BB_SUID_DROP)) |
| 21 | //kbuild:lib-$(CONFIG_UNZIP) += unzip.o | 31 | //kbuild:lib-$(CONFIG_UNZIP) += unzip.o |
| 22 | 32 | ||
