aboutsummaryrefslogtreecommitdiff
path: root/archival/rpm.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rpm: code shrinkRon Yorston2021-11-141-0/+4
| | | | | | | Since the WIN32 implementation of chown(2) does nothing there's no point in calling it. Saves 112 bytes.
* Merge branch 'busybox' into mergeRon Yorston2021-01-141-5/+7
|\
| * libbb: add and use infrastructure for fixed page size optimizationDenys Vlasenko2020-12-141-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta procps_scan 1121 1118 -3 getpagesize 6 - -6 rpm_main 1037 1027 -10 rpm2cpio_main 120 110 -10 ptok 38 21 -17 time_main 1282 1261 -21 mkswap_main 317 278 -39 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 0/6 up/down: 0/-106) Total: -106 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: create and use mmap() helpersDenys Vlasenko2020-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta mmap_anon - 22 +22 mmap_read - 21 +21 xmmap_anon - 16 +16 rpm_gettags 465 447 -18 bb_full_fd_action 498 480 -18 uevent_main 337 310 -27 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 0/3 up/down: 59/-63) Total: -4 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-08-161-1/+1
|\|
| * libbb: reduce the overhead of single parameter bb_error_msg() callsJames Byrne2019-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower overhead call to bb_perror_msg() when only a string was being printed with no parameters. This saves space for some CPU architectures because it avoids the overhead of a call to a variadic function. However there has never been a simple version of bb_error_msg(), and since 2007 many new calls to bb_perror_msg() have been added that only take a single parameter and so could have been using bb_simple_perror_message(). This changeset introduces 'simple' versions of bb_info_msg(), bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and bb_herror_msg_and_die(), and replaces all calls that only take a single parameter, or use something like ("%s", arg), with calls to the corresponding 'simple' version. Since it is likely that single parameter calls to the variadic functions may be accidentally reintroduced in the future a new debugging config option WARN_SIMPLE_MSG has been introduced. This uses some macro magic which will cause any such calls to generate a warning, but this is turned off by default to avoid use of the unpleasant macros in normal circumstances. This is a large changeset due to the number of calls that have been replaced. The only files that contain changes other than simple substitution of function calls are libbb.h, libbb/herror_msg.c, libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c, networking/udhcp/common.h and util-linux/mdev.c additonal macros have been added for logging so that single parameter and multiple parameter logging variants exist. The amount of space saved varies considerably by architecture, and was found to be as follows (for 'defconfig' using GCC 7.4): Arm: -92 bytes MIPS: -52 bytes PPC: -1836 bytes x86_64: -938 bytes Note that for the MIPS architecture only an exception had to be made disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h) because it made these files larger on MIPS. Signed-off-by: James Byrne <james.byrne@origamienergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: interpret absolute paths as relative to %SYSTEMDRIVE%Ron Yorston2019-03-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BusyBox contains hardcoded references to absolute paths which are unique in the *nix world but on Microsoft Windows are interpreted as being on the current drive. To make these unique again consider them to be relative to %SYSTEMDRIVE%. Support this by adding functions to: - determine the system drive (not using the environment variable); - change a process's current directory to the root of the system drive; - make relative paths absolute before changing directory (if needed). The following applications have been modified: - ash references /etc/profile from the system drive; - dpkg places its data store on and installs files to the system drive; - rpm installs files to the system drive; - man looks for configuration files and man pages on the system drive. See GitHub issue #158.
* | Merge branch 'busybox' into mergeRon Yorston2019-01-101-2/+2
|\|
| * config: update size informationDenys Vlasenko2018-12-281-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Post-merge fixesRon Yorston2017-08-221-0/+9
|/ | | | | - Update default configurations. - Changes required for rpm2cpio to compile
* rpm,rpm2cpio: do not compile not-configurred parts of rpm.cDenys Vlasenko2017-08-221-40/+48
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm,rpm2cpio: INIT_G() was missing (it is a nop here so far)Denys Vlasenko2017-08-101-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm2cpio: handle LZMA compressed rpms. closes 10166Denys Vlasenko2017-08-101-4/+13
| | | | | | | | | | | | | function old new delta rpm2cpio_main 78 120 +42 setup_lzma_on_fd - 29 +29 fork_transformer_and_free - 28 +28 ... setup_unzip_on_fd 56 32 -24 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/5 up/down: 104/-67) Total: 37 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm2cpio: use rpm_gettagsDenys Vlasenko2017-08-101-44/+10
| | | | | | | | | | | | function old new delta rpm_gettags - 451 +451 rpm2cpio_main 140 78 -62 skip_header 92 - -92 rpm_main 1477 1049 -428 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 451/-582) Total: -131 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm: prepare rpm_gettags for reuse in rpm2cpioDenys Vlasenko2017-08-101-11/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm,rpm2cpio: put both sources into one file, no code changesDenys Vlasenko2017-08-101-1/+96
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm: code shrinkDenys Vlasenko2017-08-091-87/+163
| | | | | | | | | | | | | | function old new delta rpm_getstr0 - 7 +7 rpm_getstr 112 110 -2 rpm_getint 120 118 -2 bsearch_rpmtag 15 13 -2 shell_builtin_read 1334 1320 -14 rpm_main 1548 1474 -74 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/5 up/down: 7/-94) Total: -87 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: deindent all help textsDenys Vlasenko2017-07-211-1/+1
| | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Update menuconfig items with approximate applet sizesDenys Vlasenko2017-07-181-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add most of the required setup_common_bufsiz() callsDenys Vlasenko2016-04-211-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko2016-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* zcat: complain if input is not compressedDenys Vlasenko2014-02-021-1/+1
| | | | | | | | | | | | | | | | | | function old new delta buffer_fill_and_print 178 191 +13 varvalue 735 743 +8 bbunpack 747 755 +8 open_zipped 85 89 +4 xmalloc_open_zipped_read_close 61 63 +2 get_addr_1 240 242 +2 fbsplash_main 1228 1230 +2 pstree_main 322 321 -1 builtin_type 121 119 -2 do_load 954 926 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/3 up/down: 39/-31) Total: 8 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* archival/*: move "config:" snippets into .c filesDenys Vlasenko2013-11-141-0/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* archival/*: move "applet:" snippets into .c filesDenys Vlasenko2013-11-141-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* archival/*: move "kbuild:" snippets into .c filesDenys Vlasenko2013-11-141-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm: unmap rpm file before working with next oneDenys Vlasenko2013-02-201-3/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm: stop using statics; move main() to the end of the source fileDenys Vlasenko2013-02-201-146/+141
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm: use "create+rename" method of replacing existing filesDenys Vlasenko2013-02-201-2/+2
| | | | | | | | Users were reporting getting errors like "ls: error while loading shared libraries: libc.so.6: ELF load command past end of file" while rpm was unpacking glibc tarball. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm: make -ql display more compatible; improve help textDenys Vlasenko2013-02-201-32/+36
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* update seamless uncompression codeDenys Vlasenko2012-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes "tar tf hello_world.txz" work without adding special-casing for ".txz" extension. It also removes ever-growing magic checking code in rpm2cpio and get_header_tar - we reuse one which lives in setup_unzip_on_fd. function old new delta unpack_gz_stream 7 566 +559 check_signature16 - 70 +70 setup_unzip_on_fd 99 142 +43 handle_SIGCHLD - 41 +41 unpack_bz2_stream 342 376 +34 unzip_main 2352 2385 +33 bbunpack 503 533 +30 open_transformer 74 102 +28 unpack_Z_stream 1278 1304 +26 unpack_gunzip 101 123 +22 init_transformer_aux_data - 18 +18 unpack_xz_stream 2388 2402 +14 open_zipped 131 141 +10 rpm_main 1358 1363 +5 get_header_tar_lzma 52 57 +5 get_header_tar_bz2 52 57 +5 unpack_lzma_stream 2698 2702 +4 hash_find 234 233 -1 get_header_tar 1759 1733 -26 get_header_tar_gz 92 57 -35 unpack_uncompress 51 12 -39 rpm2cpio_main 201 147 -54 unpack_unxz 67 12 -55 unpack_bz2_stream_prime 55 - -55 get_header_tar_Z 86 - -86 unpack_gz_stream_with_info 539 - -539 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 14/6 up/down: 947/-890) Total: 57 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rename archive.h to bb_archive.h. no code changesDenys Vlasenko2011-09-221-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move help text from include/usage.src.h to archival/*.cPere Orga2011-03-271-0/+13
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rename archival/libunarchive -> archival/libarchive; move bz/ into itDenys Vlasenko2010-11-031-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm: make rpm -i SRPM.rpm install it to surrent dir; better help textDenys Vlasenko2010-05-061-5/+13
| | | | | | | | | | function old new delta rpm_main 1355 1358 +3 packed_usage 26732 26728 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 3/-4) Total: -1 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm: code shrink. Now uses open_zipped's logic (factored out into ↵Denys Vlasenko2010-05-061-66/+31
| | | | | | | | | | | | | setup_unzip_on_fd()) function old new delta setup_unzip_on_fd - 80 +80 open_zipped 176 113 -63 rpm_main 1672 1355 -317 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 80/-380) Total: -300 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make it easier to distinquish "struct tm", pointer to one, etcDenys Vlasenko2010-01-091-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove some uses of argcDenys Vlasenko2010-01-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | function old new delta whoami_main 34 37 +3 logname_main 60 63 +3 hostid_main 35 38 +3 ttysize_main 136 135 -1 nmeter_main 673 672 -1 logger_main 387 386 -1 uuencode_main 330 328 -2 ifupdown_main 2125 2123 -2 mesg_main 158 155 -3 free_main 333 330 -3 cal_main 902 899 -3 acpid_main 443 440 -3 ar_main 196 189 -7 find_main 476 467 -9 ifconfig_main 1235 1221 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/12 up/down: 9/-49) Total: -40 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: more portability fixes by Dan FandrichDenys Vlasenko2009-09-231-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tar: fix --numeric-owner, --no-same-owner, --no-same-permissions bitsDenys Vlasenko2009-09-171-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko2009-04-211-2/+2
| | | | | | and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
* gunzip: restore mtime. approx +80 bytes of codeDenis Vlasenko2008-11-011-6/+9
| | | | | | rpm: make code more robust lsmod: small code shrink
* rpm: fix incompatibilities which prevented rpm -i foo.src.rpmDenis Vlasenko2008-10-161-4/+11
| | | | | | function old new delta fileaction_setowngrp 57 89 +32
* *: refactor handling of archived files. "tar f file.tar.lzma" now works too.Denis Vlasenko2008-08-051-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta unpack_Z_stream - 1229 +1229 open_zipped - 176 +176 unpack_bz2_stream_prime - 60 +60 tar_main 642 677 +35 find_main 406 418 +12 sv_main 1222 1233 +11 decode_format_string 829 837 +8 cmp_main 641 649 +8 popstring 134 140 +6 filter_accept_list_reassign 120 125 +5 parse_and_put_prompt 800 804 +4 passwd_main 1053 1049 -4 make_new_name_gunzip 119 114 -5 rpm_main 1688 1670 -18 prepare 302 283 -19 xmalloc_open_zipped_read_close 135 61 -74 uncompress 1229 - -1229 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 8/5 up/down: 1554/-1349) Total: 205 bytes
* open_transformer: do not return fd, it does not changeDenis Vlasenko2008-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | libbb: adopt zipped read from modprobe-small function old new delta getoptscmd 708 713 +5 qgravechar 106 109 +3 huft_build 1165 1168 +3 tr_main 474 472 -2 open_transformer 91 89 -2 evalvar 1376 1374 -2 rpm_main 1691 1688 -3 qrealloc 36 33 -3 get_header_tar_lzma 55 52 -3 get_header_tar_gz 100 97 -3 get_header_tar_bz2 55 52 -3 get_header_tar_Z 89 86 -3 find_main 418 406 -12 prepare 302 283 -19 xmalloc_open_zipped_read_close 161 135 -26 xmalloc_read 248 199 -49 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/13 up/down: 11/-130) Total: -119 bytes
* libbb: introduce and use xrealloc_vectorDenis Vlasenko2008-07-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta xrealloc_vector_helper - 51 +51 create_list 84 99 +15 getopt_main 690 695 +5 passwd_main 1049 1053 +4 get_cached 85 89 +4 msh_main 1377 1380 +3 add_match 42 41 -1 read_lines 720 718 -2 grave 1068 1066 -2 fill_match_lines 143 141 -2 add_to_dirlist 67 65 -2 add_input_file 49 47 -2 act 252 250 -2 fsck_main 2252 2246 -6 man_main 765 757 -8 bb_internal_initgroups 228 220 -8 cut_main 1052 1041 -11 add_edge_to_node 55 43 -12 dpkg_main 3851 3835 -16 ifupdown_main 2202 2178 -24 sort_main 838 812 -26 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 5/15 up/down: 82/-124) Total: -42 bytes
* libunarchive: stop using static data in archivers - archive_handle_tDenis Vlasenko2008-06-281-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | can trivially provide space for that. rpm: code shrink tar: simplify autodetection of bz2/.gz function old new delta static.not_first 1 - -1 static.end 1 - -1 bb_makedev 51 49 -2 static.saved_hardlinks_created 4 - -4 static.saved_hardlinks 4 - -4 longname 4 - -4 linkname 4 - -4 hash_file 251 247 -4 get_header_tar 1528 1521 -7 rpm_main 1711 1697 -14 get_header_cpio 965 944 -21 ------------------------------------------------------------------------------ (add/remove: 0/6 grow/shrink: 0/5 up/down: 0/-66) Total: -66 bytes text data bss dec hex filename 804926 611 6868 812405 c6575 busybox_old 804878 611 6852 812341 c6535 busybox_unstripped
* *: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko2008-06-271-1/+1
| | | | | | | text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
* open_transformer: do not duplicate "<program> -cf -"Denis Vlasenko2007-11-121-1/+1
| | | | | | | text data bss dec hex filename 677858 738 7236 685832 a7708 busybox_old 677804 738 7236 685778 a76d2 busybox_unstripped