diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-10-05 00:27:49 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-10-05 00:27:49 +0000 |
commit | fe313941ac5ef2a4e80d22be43a9d5dc667276b7 (patch) | |
tree | d27f5408929c0080b09f7e472e41abc2370c8e24 /package/busybox | |
parent | 9e8f2ca1f0d1fe2ea5688c466f2f8b40a5e870c2 (diff) | |
download | mtk-20170518-fe313941ac5ef2a4e80d22be43a9d5dc667276b7.zip mtk-20170518-fe313941ac5ef2a4e80d22be43a9d5dc667276b7.tar.gz mtk-20170518-fe313941ac5ef2a4e80d22be43a9d5dc667276b7.tar.bz2 |
Upgrade busybox to 1.7.2 - clean up insmod crap - add some lineno/programname fixes for awx - clean up awk getopt stuff - remove unnecessary patches
SVN-Revision: 9130
Diffstat (limited to 'package/busybox')
48 files changed, 1965 insertions, 1303 deletions
diff --git a/package/busybox/Makefile b/package/busybox/Makefile index 3844e87..8fefb60 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox -PKG_VERSION:=1.4.2 +PKG_VERSION:=1.7.2 PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.busybox.net/downloads \ http://distfiles.gentoo.org/distfiles/ -PKG_MD5SUM:=b4c61fb15642be9dde20e8493788c585 +PKG_MD5SUM:=c91ec9756e2000073a9dd8fa9fc3f89e include $(INCLUDE_DIR)/package.mk diff --git a/package/busybox/config/Config.in b/package/busybox/config/Config.in index 4df12cc..d3c1cb6 100644 --- a/package/busybox/config/Config.in +++ b/package/busybox/config/Config.in @@ -100,8 +100,7 @@ config BUSYBOX_CONFIG_FEATURE_INSTALLER help Enable 'busybox --install [-s]' support. This will allow you to use busybox at runtime to create hard links or symlinks for all the - applets that are compiled into busybox. This feature requires the - /proc filesystem. + applets that are compiled into busybox. config BUSYBOX_CONFIG_LOCALE_SUPPORT bool "Enable locale support (system needs locale for this to work)" @@ -140,6 +139,13 @@ config BUSYBOX_CONFIG_FEATURE_CLEAN_UP Don't enable this unless you have a really good reason to clean things up manually. +config BUSYBOX_CONFIG_FEATURE_PIDFILE + bool "Support writing pidfiles" + default y + help + This option makes some applets (e.g. crond, syslogd, inetd) write + a pidfile in /var/run. Some applications rely on them. + config BUSYBOX_CONFIG_FEATURE_SUID bool "Support for SUID/SGID handling" default y @@ -155,13 +161,6 @@ config BUSYBOX_CONFIG_FEATURE_SUID are login, passwd, su, ping, traceroute, crontab, dnsd, ipcrm, ipcs, and vlock. -config BUSYBOX_CONFIG_FEATURE_SYSLOG - bool "Support for syslog" - default y - help - This option is auto-selected when you select any applet which may - send its output to syslog. You do not need to select it manually. - config BUSYBOX_CONFIG_FEATURE_SUID_CONFIG bool "Runtime SUID/SGID configuration via /etc/busybox.conf" default n if BUSYBOX_CONFIG_FEATURE_SUID @@ -202,14 +201,6 @@ config BUSYBOX_CONFIG_FEATURE_SUID_CONFIG_QUIET /etc/busybox.conf should be readable by the user needing the SUID, check this option to avoid users to be notified about missing permissions. -config BUSYBOX_CONFIG_FEATURE_HAVE_RPC - bool "RPC support" - default y - help - Select this if you have rpc support. - This automatically turns off all configuration options that rely - on RPC. - config BUSYBOX_CONFIG_SELINUX bool "Support NSA Security Enhanced Linux" default n @@ -230,6 +221,20 @@ config BUSYBOX_CONFIG_SELINUX Most people will leave this set to 'N'. +config BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS + bool "exec prefers applets" + default y + help + This is an experimental option which directs applets about to + call 'exec' to try and find an applicable busybox applet before + searching the PATH. This is typically done by exec'ing + /proc/self/exe. + This may affect shell, find -exec, xargs and similar applets. + They will use applets even if /bin/<applet> -> busybox link + is missing (or is not a link to busybox). However, this causes + problems in chroot jails without mounted /proc and with ps/top + (command name can be shown as 'exe' for applets started this way). + config BUSYBOX_CONFIG_BUSYBOX_EXEC_PATH string "Path to BusyBox executable" default "/proc/self/exe" @@ -240,6 +245,22 @@ config BUSYBOX_CONFIG_BUSYBOX_EXEC_PATH executable. If you haven't got /proc, set this to wherever you want to run BusyBox from. +# These are auto-selected by other options + +config BUSYBOX_CONFIG_FEATURE_SYSLOG + bool "Support for logging to syslog" + default y + help + This option is auto-selected when you select any applet which may + send its output to syslog. You do not need to select it manually. + +config BUSYBOX_CONFIG_FEATURE_HAVE_RPC + bool "RPC support" + default y + help + This is automatically selected if any of enabled applets need it. + You do not need to select it manually. + endmenu menu 'Build Options' @@ -298,7 +319,7 @@ config BUSYBOX_CONFIG_FEATURE_SHARED_BUSYBOX You need to have a working dynamic linker to use this variant. config BUSYBOX_CONFIG_LFS - bool "Support large files over 2 GB" + bool default y select BUSYBOX_CONFIG_FDISK_SUPPORT_LARGE_DISKS help @@ -343,21 +364,29 @@ config BUSYBOX_CONFIG_DEBUG Most people should answer N. -config BUSYBOX_CONFIG_DEBUG_PESSIMIZE - bool "Disable compiler optimizations." +config BUSYBOX_CONFIG_WERROR + bool "Abort compilation on any warning" default n - depends on BUSYBOX_CONFIG_DEBUG help - The compiler's optimization of source code can eliminate and reorder - code, resulting in an executable that's hard to understand when - stepping through it with a debugger. This switches it off, resulting - in a much bigger executable that more closely matches the source - code. + Selecting this will add -Werror to gcc command line. + + Most people should answer N. + +# Seems to be unused +#config DEBUG_PESSIMIZE +# bool "Disable compiler optimizations." +# default n +# depends on DEBUG +# help +# The compiler's optimization of source code can eliminate and reorder +# code, resulting in an executable that's hard to understand when +# stepping through it with a debugger. This switches it off, resulting +# in a much bigger executable that more closely matches the source +# code. choice prompt "Additional debugging library" default BUSYBOX_CONFIG_NO_DEBUG_LIB - depends on BUSYBOX_CONFIG_DEBUG help Using an additional debugging library will make BusyBox become considerable larger and will cause it to run more slowly. You @@ -417,31 +446,30 @@ config BUSYBOX_CONFIG_INSTALL_NO_USR that you really want this behaviour. choice - prompt "Applets links" - default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS - help - Choose how you install applets links. + prompt "Applets links" + default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS + help + Choose how you install applets links. config BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS - bool "as soft-links" - help - Install applets as soft-links to the busybox binary. This needs some - free inodes on the filesystem, but might help with filesystem - generators that can't cope with hard-links. + bool "as soft-links" + help + Install applets as soft-links to the busybox binary. This needs some + free inodes on the filesystem, but might help with filesystem + generators that can't cope with hard-links. config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS - bool "as hard-links" - help - Install applets as hard-links to the busybox binary. This might count - on a filesystem with few inodes. + bool "as hard-links" + help + Install applets as hard-links to the busybox binary. This might count + on a filesystem with few inodes. config BUSYBOX_CONFIG_INSTALL_APPLET_DONT - bool - prompt "not installed" - depends on BUSYBOX_CONFIG_FEATURE_INSTALLER || BUSYBOX_CONFIG_FEATURE_SH_STANDALONE_SHELL - help - Do not install applet links. Useful when using the -install feature - or a standalone shell for rescue pruposes. + bool "not installed" + depends on BUSYBOX_CONFIG_FEATURE_INSTALLER || BUSYBOX_CONFIG_FEATURE_SH_STANDALONE || BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS + help + Do not install applet links. Useful when using the -install feature + or a standalone shell for rescue purposes. endchoice @@ -476,3 +504,5 @@ source package/busybox/config/procps/Config.in source package/busybox/config/shell/Config.in source package/busybox/config/sysklogd/Config.in source package/busybox/config/runit/Config.in +source package/busybox/config/selinux/Config.in +source package/busybox/config/ipsvd/Config.in diff --git a/package/busybox/config/archival/Config.in b/package/busybox/config/archival/Config.in index 989d8d5..9895dba 100644 --- a/package/busybox/config/archival/Config.in +++ b/package/busybox/config/archival/Config.in @@ -142,6 +142,13 @@ config BUSYBOX_CONFIG_RPM help Mini RPM applet - queries and extracts RPM packages. +config BUSYBOX_CONFIG_FEATURE_RPM_BZ2 + bool "Enable handling of rpms with bzip2-compressed data inside" + default n + depends on BUSYBOX_CONFIG_RPM + help + Enable handling of rpms with bzip2-compressed data inside. + config BUSYBOX_CONFIG_TAR bool "tar" default y @@ -207,6 +214,15 @@ config BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY the old GNU format; help to kill this old format by repacking your ancient archives with the new format. +config BUSYBOX_CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY + bool "Enable untarring of tarballs with checksums produced by buggy Sun tar" + default n + depends on BUSYBOX_CONFIG_TAR + help + This option is required to unpack archives created by some old + version of Sun's tar (it was calculating checksum using signed arithmetic). + It is said to be fixed in newer Sun tar, but "old" tarballs still exist. + config BUSYBOX_CONFIG_FEATURE_TAR_GNU_EXTENSIONS bool "Enable support for some GNU tar extensions" default y diff --git a/package/busybox/config/console-tools/Config.in b/package/busybox/config/console-tools/Config.in index 661e894..7b044ea 100644 --- a/package/busybox/config/console-tools/Config.in +++ b/package/busybox/config/console-tools/Config.in @@ -85,7 +85,7 @@ config BUSYBOX_CONFIG_SETCONSOLE config BUSYBOX_CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS bool "Enable long options" default n - depends on BUSYBOX_CONFIG_SET_CONSOLE && BUSYBOX_CONFIG_GETOPT_LONG + depends on BUSYBOX_CONFIG_SETCONSOLE && BUSYBOX_CONFIG_GETOPT_LONG help Support long options for the setconsole applet. diff --git a/package/busybox/config/coreutils/Config.in b/package/busybox/config/coreutils/Config.in index 91f93e1..5a0220c 100644 --- a/package/busybox/config/coreutils/Config.in +++ b/package/busybox/config/coreutils/Config.in @@ -65,13 +65,6 @@ config BUSYBOX_CONFIG_CKSUM help cksum is used to calculate the CRC32 checksum of a file. -config BUSYBOX_CONFIG_CMP - bool "cmp" - default n - help - cmp is used to compare two files and returns the result - to standard output. - config BUSYBOX_CONFIG_COMM bool "comm" default n @@ -142,38 +135,6 @@ config BUSYBOX_CONFIG_DF df reports the amount of disk space used and available on filesystems. -config BUSYBOX_CONFIG_DIFF - bool "diff" - default n - help - diff compares two files or directories and outputs the - differences between them in a form that can be given to - the patch command. - -config BUSYBOX_CONFIG_FEATURE_DIFF_BINARY - bool "Enable checks for binary files" - default n - depends on BUSYBOX_CONFIG_DIFF - help - This option enables support for checking for binary files - before a comparison is carried out. - -config BUSYBOX_CONFIG_FEATURE_DIFF_DIR - bool "Enable directory support" - default n - depends on BUSYBOX_CONFIG_DIFF - help - This option enables support for directory and subdirectory - comparison. - -config BUSYBOX_CONFIG_FEATURE_DIFF_MINIMAL - bool "Enable -d option to find smaller sets of changes" - default n - depends on BUSYBOX_CONFIG_DIFF - help - Enabling this option allows the use of -d to make diff - try hard to find the smallest possible set of changes. - config BUSYBOX_CONFIG_DIRNAME bool "dirname" default y @@ -239,6 +200,19 @@ config BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS help Support long options for the env applet. +config BUSYBOX_CONFIG_EXPAND + bool "expand" + default n + help + By default, convert all tabs to spaces. + +config BUSYBOX_CONFIG_FEATURE_EXPAND_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_EXPAND && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the expand applet. + config BUSYBOX_CONFIG_EXPR bool "expr" default y @@ -474,6 +448,20 @@ config BUSYBOX_CONFIG_PWD help pwd is used to print the current directory. +config BUSYBOX_CONFIG_READLINK + bool "readlink" + default n + help + This program reads a symbolic link and returns the name + of the file it points to + +config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW + bool "Enable canonicalization by following all symlinks (-f)" + default n + depends on BUSYBOX_CONFIG_READLINK + help + Enable the readlink option (-f). + config BUSYBOX_CONFIG_REALPATH bool "realpath" default n @@ -536,6 +524,21 @@ config BUSYBOX_CONFIG_FEATURE_SORT_BIG The SuSv3 sort standard is available at: http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html +config BUSYBOX_CONFIG_SPLIT + bool "split" + default n + help + split a file into pieces. + +config BUSYBOX_CONFIG_FEATURE_SPLIT_FANCY + bool "fancy extensions" + default n + depends on BUSYBOX_CONFIG_SPLIT + help + Add support for features not required by SUSv3. + Supports additional suffixes 'b' for 512 bytes, + 'g' for 1GiB for the -b option. + config BUSYBOX_CONFIG_STAT bool "stat" default n @@ -665,6 +668,19 @@ config BUSYBOX_CONFIG_UNAME help uname is used to print system information. +config BUSYBOX_CONFIG_UNEXPAND + bool "unexpand" + default n + help + By default, convert only leading sequences of blanks to tabs. + +config BUSYBOX_CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_UNEXPAND && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the unexpand applet. + config BUSYBOX_CONFIG_UNIQ bool "uniq" default y @@ -689,14 +705,6 @@ config BUSYBOX_CONFIG_UUENCODE help uuencode is used to uuencode a file. -config BUSYBOX_CONFIG_WATCH - bool "watch" - default n - select BUSYBOX_CONFIG_DATE - help - watch is used to execute a program periodically, showing - output to the screen. - config BUSYBOX_CONFIG_WC bool "wc" default y diff --git a/package/busybox/config/debianutils/Config.in b/package/busybox/config/debianutils/Config.in index f047a90..bc37c15 100644 --- a/package/busybox/config/debianutils/Config.in +++ b/package/busybox/config/debianutils/Config.in @@ -17,20 +17,6 @@ config BUSYBOX_CONFIG_PIPE_PROGRESS help Display a dot to indicate pipe activity. -config BUSYBOX_CONFIG_READLINK - bool "readlink" - default n - help - This program reads a symbolic link and returns the name - of the file it points to - -config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW - bool "Enable canonicalization by following all symlinks (-f)" - default n - depends on BUSYBOX_CONFIG_READLINK - help - Enable the readlink option (-f). - config BUSYBOX_CONFIG_RUN_PARTS bool "run-parts" default n @@ -53,6 +39,15 @@ config BUSYBOX_CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS help Support long options for the run-parts applet. +config BUSYBOX_CONFIG_FEATURE_RUN_PARTS_FANCY + bool "Support additional arguments" + default n + depends on BUSYBOX_CONFIG_RUN_PARTS + help + Support additional options: + -l --list print the names of the all matching files (not + limited to executables), but don't actually run them. + config BUSYBOX_CONFIG_START_STOP_DAEMON bool "start-stop-daemon" default y diff --git a/package/busybox/config/editors/Config.in b/package/busybox/config/editors/Config.in index 8973c36..6d1f6f2 100644 --- a/package/busybox/config/editors/Config.in +++ b/package/busybox/config/editors/Config.in @@ -27,6 +27,45 @@ config BUSYBOX_CONFIG_FEATURE_AWK_MATH Enable math functions of the Awk programming language. NOTE: This will require libm to be present for linking. +config BUSYBOX_CONFIG_CMP + bool "cmp" + default n + help + cmp is used to compare two files and returns the result + to standard output. + +config BUSYBOX_CONFIG_DIFF + bool "diff" + default y + help + diff compares two files or directories and outputs the + differences between them in a form that can be given to + the patch command. + +config BUSYBOX_CONFIG_FEATURE_DIFF_BINARY + bool "Enable checks for binary files" + default n + depends on BUSYBOX_CONFIG_DIFF + help + This option enables support for checking for binary files + before a comparison is carried out. + +config BUSYBOX_CONFIG_FEATURE_DIFF_DIR + bool "Enable directory support" + default n + depends on BUSYBOX_CONFIG_DIFF + help + This option enables support for directory and subdirectory + comparison. + +config BUSYBOX_CONFIG_FEATURE_DIFF_MINIMAL + bool "Enable -d option to find smaller sets of changes" + default n + depends on BUSYBOX_CONFIG_DIFF + help + Enabling this option allows the use of -d to make diff + try hard to find the smallest possible set of changes. + config BUSYBOX_CONFIG_ED bool "ed" default n @@ -57,6 +96,16 @@ config BUSYBOX_CONFIG_VI learning curve. If you are not already comfortable with 'vi' you may wish to use something else. +config BUSYBOX_CONFIG_FEATURE_VI_MAX_LEN + int "Maximum line length in vi" + range 256 16384 + default 1024 + depends on BUSYBOX_CONFIG_VI + help + vi uses on-stack buffers for intermediate line buffers. + You may want to decrease this parameter if your target machine + benefits from smaller stack usage. + config BUSYBOX_CONFIG_FEATURE_VI_COLON bool "Enable \":\" colon commands (no \"ex\" mode)" default y diff --git a/package/busybox/config/findutils/Config.in b/package/busybox/config/findutils/Config.in index dc0bbce..3f89c33 100644 --- a/package/busybox/config/findutils/Config.in +++ b/package/busybox/config/findutils/Config.in @@ -30,7 +30,7 @@ config BUSYBOX_CONFIG_FEATURE_FIND_MTIME files, in days. config BUSYBOX_CONFIG_FEATURE_FIND_MMIN - bool "Enable modified time matching (-min) option" + bool "Enable modified time matching (-mmin) option" default n depends on BUSYBOX_CONFIG_FIND help @@ -57,8 +57,14 @@ config BUSYBOX_CONFIG_FEATURE_FIND_XDEV default y depends on BUSYBOX_CONFIG_FIND help - This option will allow find to restrict searches to a single - filesystem. + This option allows find to restrict searches to a single filesystem. + +config BUSYBOX_CONFIG_FEATURE_FIND_MAXDEPTH + bool "Enable -maxdepth N option" + default y + depends on BUSYBOX_CONFIG_FIND + help + This option enables -maxdepth N option. config BUSYBOX_CONFIG_FEATURE_FIND_NEWER bool "Enable -newer option for comparing file mtimes" @@ -83,6 +89,88 @@ config BUSYBOX_CONFIG_FEATURE_FIND_EXEC Support the 'find -exec' option for executing commands based upon the files matched. +config BUSYBOX_CONFIG_FEATURE_FIND_USER + bool "Enable username/uid matching (-user) option" + default y + depends on BUSYBOX_CONFIG_FIND + help + Support the 'find -user' option for searching by username or uid. + +config BUSYBOX_CONFIG_FEATURE_FIND_GROUP + bool "Enable group/gid matching (-group) option" + default y + depends on BUSYBOX_CONFIG_FIND + help + Support the 'find -group' option for searching by group name or gid. + +config BUSYBOX_CONFIG_FEATURE_FIND_NOT + bool "Enable the 'not' (!) operator" + default y + depends on BUSYBOX_CONFIG_FIND + help + Support the '!' operator to invert the test results. + If 'Enable full-blown desktop' is enabled, then will also support + the non-POSIX notation '-not'. + +config BUSYBOX_CONFIG_FEATURE_FIND_DEPTH + bool "Enable the -depth option" + default y + depends on BUSYBOX_CONFIG_FIND + help + Process each directory's contents before the directory itself. + +config BUSYBOX_CONFIG_FEATURE_FIND_PAREN + bool "Enable parens in options" + default y + depends on BUSYBOX_CONFIG_FIND + help + Enable usage of parens '(' to specify logical order of arguments. + +config BUSYBOX_CONFIG_FEATURE_FIND_SIZE + bool "Enable (-size) option allowing matching for file size" + default y + depends on BUSYBOX_CONFIG_FIND + help + Support the 'find -size' option for searching by file size. + +config BUSYBOX_CONFIG_FEATURE_FIND_PRUNE + bool "Enable (-prune) option allowing to exclude subdirectories" + default y + depends on BUSYBOX_CONFIG_FIND + help + If the file is a directory, dont descend into it. Useful for + exclusion .svn and CVS directories. + +config BUSYBOX_CONFIG_FEATURE_FIND_DELETE + bool "Enable -delete option allowing to delete files" + default n + depends on BUSYBOX_CONFIG_FIND && BUSYBOX_CONFIG_FEATURE_FIND_DEPTH + help + Support the 'find -delete' option for deleting files and direcotries. + WARNING: This option can do much harm if used wrong. Busybox will not + try to protect the user from doing stupid things. Use with care. + +config BUSYBOX_CONFIG_FEATURE_FIND_PATH + bool "Enable -path option allowing to match pathname patterns" + default y + depends on BUSYBOX_CONFIG_FIND + help + The -path option matches whole pathname instead of just filename. + +config BUSYBOX_CONFIG_FEATURE_FIND_REGEX + bool "Enable -regex: match pathname to regex" + default y + depends on BUSYBOX_CONFIG_FIND + help + The -regex option matches whole pathname against regular expression. + +config BUSYBOX_CONFIG_FEATURE_FIND_CONTEXT + bool "Enable (-context) option for matching security context" + default n + depends on BUSYBOX_CONFIG_FIND && BUSYBOX_CONFIG_SELINUX + help + Support the 'find -context' option for matching security context. + config BUSYBOX_CONFIG_GREP bool "grep" default y diff --git a/package/busybox/config/init/Config.in b/package/busybox/config/init/Config.in index b8ad0d6..104af26 100644 --- a/package/busybox/config/init/Config.in +++ b/package/busybox/config/init/Config.in @@ -38,6 +38,11 @@ config BUSYBOX_CONFIG_FEATURE_INIT_SCTTY behavour, but is often what you want in an embedded system where the console is only accessed during development or for maintenance. +config BUSYBOX_CONFIG_FEATURE_INIT_SYSLOG + bool "Enable init to write to syslog" + default y + depends on BUSYBOX_CONFIG_INIT + config BUSYBOX_CONFIG_FEATURE_EXTRA_QUIET bool "Be _extra_ quiet on boot" default n diff --git a/package/busybox/config/ipsvd/Config.in b/package/busybox/config/ipsvd/Config.in new file mode 100644 index 0000000..d163ade --- /dev/null +++ b/package/busybox/config/ipsvd/Config.in @@ -0,0 +1,20 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "ipsvd utilities" + +config BUSYBOX_CONFIG_TCPSVD + bool "tcpsvd" + default n + help + tcpsvd listens on a tcp port and runs a program for each new connection + +config BUSYBOX_CONFIG_UDPSVD + bool "udpsvd" + default n + help + udpsvd listens on a udp port and runs a program for each new connection + +endmenu diff --git a/package/busybox/config/libbb/Config.in b/package/busybox/config/libbb/Config.in index 4919f9b..4e23b8a 100644 --- a/package/busybox/config/libbb/Config.in +++ b/package/busybox/config/libbb/Config.in @@ -26,4 +26,105 @@ config BUSYBOX_CONFIG_MD5_SIZE_VS_SPEED 2 3.0 5088 3 (smallest) 5.1 4912 +config BUSYBOX_CONFIG_FEATURE_FAST_TOP + bool "Faster /proc scanning code (+100 bytes)" + default y + help + This option makes top (and ps) ~20% faster (or 20% less CPU hungry), + but code size is slightly bigger. + +config BUSYBOX_CONFIG_FEATURE_ETC_NETWORKS + bool "Support for /etc/networks" + default n + help + Enable support for network names in /etc/networks. This is + a rarely used feature which allows you to use names + instead of IP/mask pairs in route command. + +config BUSYBOX_CONFIG_FEATURE_EDITING + bool "Command line editing" + default y + help + Enable line editing (mainly for shell command line). + +config BUSYBOX_CONFIG_FEATURE_EDITING_MAX_LEN + int "Maximum length of input" + range 128 8192 + default 512 + depends on BUSYBOX_CONFIG_FEATURE_EDITING + help + Line editing code uses on-stack buffers for storage. + You may want to decrease this parameter if your target machine + benefits from smaller stack usage. + +config BUSYBOX_CONFIG_FEATURE_EDITING_FANCY_KEYS + bool "Additional editing keys" + default y + depends on BUSYBOX_CONFIG_FEATURE_EDITING + help + Enable additonal editing keys (Ctrl-E, Ctrl-U etc). + Arrow keys, Home/End/Delete and Ctrl-W work even without this option. + +config BUSYBOX_CONFIG_FEATURE_EDITING_VI + bool "vi-style line editing commands" + default n + depends on BUSYBOX_CONFIG_FEATURE_EDITING + help + Enable vi-style line editing. In shells, this mode can be + turned on and off with "set -o vi" and "set +o vi". + +config BUSYBOX_CONFIG_FEATURE_EDITING_HISTORY + int "History size" + range 0 99999 + default 256 + depends on BUSYBOX_CONFIG_FEATURE_EDITING + help + Specify command history size. + +config BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY + bool "History saving" + default n + depends on BUSYBOX_CONFIG_ASH && BUSYBOX_CONFIG_FEATURE_EDITING + help + Enable history saving in ash shell. + +config BUSYBOX_CONFIG_FEATURE_TAB_COMPLETION + bool "Tab completion" + default y + depends on BUSYBOX_CONFIG_FEATURE_EDITING + help + Enable tab completion. + +config BUSYBOX_CONFIG_FEATURE_USERNAME_COMPLETION + bool "Username completion" + default n + depends on BUSYBOX_CONFIG_FEATURE_TAB_COMPLETION + help + Enable username completion. + +config BUSYBOX_CONFIG_FEATURE_EDITING_FANCY_PROMPT + bool "Fancy shell prompts" + default y + depends on BUSYBOX_CONFIG_FEATURE_EDITING + help + Setting this option allows for prompts to use things like \w and + \$ and escape codes. + +config BUSYBOX_CONFIG_MONOTONIC_SYSCALL + bool "Use clock_gettime(CLOCK_MONOTONIC) syscall" + default n + help + Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring + time intervals (time, ping, traceroute etc need this). + Probably requires Linux 2.6+. If not selected, gettimeofday + will be used instead (which gives wrong results if date/time + is reset). + +config BUSYBOX_CONFIG_IOCTL_HEX2STR_ERROR + bool "Use ioctl names rather than hex values in error messages" + default y + help + Use ioctl names rather than hex values in error messages + (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this + saves about 1400 bytes. endmenu diff --git a/package/busybox/config/loginutils/Config.in b/package/busybox/config/loginutils/Config.in index 6171d02..15019c1 100644 --- a/package/busybox/config/loginutils/Config.in +++ b/package/busybox/config/loginutils/Config.in @@ -59,12 +59,29 @@ config BUSYBOX_CONFIG_ADDGROUP help Utility for creating a new group account. +config BUSYBOX_CONFIG_FEATURE_ADDUSER_TO_GROUP + bool "Support for adding users to groups" + default n + depends on BUSYBOX_CONFIG_ADDGROUP + help + If called with two non-option arguments, + addgroup will add an existing user to an + existing group. + config BUSYBOX_CONFIG_DELGROUP bool "delgroup" default n help Utility for deleting a group account. +config BUSYBOX_CONFIG_FEATURE_DEL_USER_FROM_GROUP + bool "Support for removing users from groups." + default n + depends on BUSYBOX_CONFIG_DELGROUP + help + If called with two non-option arguments, deluser + or delgroup will remove an user from a specified group. + config BUSYBOX_CONFIG_ADDUSER bool "adduser" default n @@ -111,6 +128,13 @@ config BUSYBOX_CONFIG_LOGIN Note that Busybox binary must be setuid root for this applet to work properly. +config BUSYBOX_CONFIG_PAM + bool "Support for PAM (Pluggable Authentication Modules)" + default n + depends on BUSYBOX_CONFIG_LOGIN + help + Use PAM in login(1) instead of direct access to password database. + config BUSYBOX_CONFIG_LOGIN_SCRIPTS bool "Support for login scripts" depends on BUSYBOX_CONFIG_LOGIN @@ -119,12 +143,20 @@ config BUSYBOX_CONFIG_LOGIN_SCRIPTS Enable this if you want login to execute $LOGIN_PRE_SUID_SCRIPT just prior to switching from root to logged-in user. +config BUSYBOX_CONFIG_FEATURE_NOLOGIN + bool "Support for /etc/nologin" + default n + depends on BUSYBOX_CONFIG_LOGIN + help + The file /etc/nologin is used by (some versions of) login(1). + If it exists, non-root logins are prohibited. + config BUSYBOX_CONFIG_FEATURE_SECURETTY bool "Support for /etc/securetty" default n depends on BUSYBOX_CONFIG_LOGIN help - The file /etc/securetty is used by (some versions of) login(1). + The file /etc/securetty is used by (some versions of) login(1). The file contains the device names of tty lines (one per line, without leading /dev/) on which root is allowed to login. @@ -149,6 +181,20 @@ config BUSYBOX_CONFIG_FEATURE_PASSWD_WEAK_CHECK help With this option passwd will refuse new passwords which are "weak". +config BUSYBOX_CONFIG_CRYPTPW + bool "cryptpw" + default n + help + Applet for crypting a string. + +config BUSYBOX_CONFIG_CHPASSWD + bool "chpasswd" + default n + help + chpasswd reads a file of user name and password pairs from + standard input and uses this information to update a group of + existing users. + config BUSYBOX_CONFIG_SU bool "su" default n diff --git a/package/busybox/config/miscutils/Config.in b/package/busybox/config/miscutils/Config.in index 7784a82..44f11a9 100644 --- a/package/busybox/config/miscutils/Config.in +++ b/package/busybox/config/miscutils/Config.in @@ -19,6 +19,13 @@ config BUSYBOX_CONFIG_BBCONFIG The bbconfig applet will print the config file with which busybox was built. +config BUSYBOX_CONFIG_CHRT + bool "chrt" + default n + help + manipulate real-time attributes of a process. + This requires sched_{g,s}etparam support in your libc. + config BUSYBOX_CONFIG_CROND bool "crond" default y @@ -256,19 +263,19 @@ config BUSYBOX_CONFIG_MAKEDEVS 'leaf' is traditionally what busybox follows, it allows multiple devices of a particluar type to be created per command. e.g. /dev/hda[0-9] - Device properties are passed as command line arguments. + Device properties are passed as command line arguments. . 'table' reads device properties from a file or stdin, allowing a batch of unrelated devices to be made with one command. - User/group names are allowed as an alternative to uid/gid. + User/group names are allowed as an alternative to uid/gid. choice prompt "Choose makedevs behaviour" - depends BUSYBOX_CONFIG_MAKEDEVS + depends on BUSYBOX_CONFIG_MAKEDEVS default BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_LEAF - bool "leaf" + bool "leaf" config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE bool "table" @@ -289,12 +296,6 @@ config BUSYBOX_CONFIG_MT to advance or rewind a tape past a specified number of archive files on the tape. -config BUSYBOX_CONFIG_NMETER - bool "nmeter" - default n - help - nmeter prints various system parameters continuously. - config BUSYBOX_CONFIG_RAIDAUTORUN bool "raidautorun" default n @@ -303,11 +304,11 @@ config BUSYBOX_CONFIG_RAIDAUTORUN search and start RAID arrays. config BUSYBOX_CONFIG_READAHEAD - bool "readahead" + bool "readahead" default n - depends on LFS + depends on BUSYBOX_CONFIG_LFS help - Preload the files listed on the command line into RAM cache so that + Preload the files listed on the command line into RAM cache so that subsequent reads on these files will not block on disk I/O. This applet just calls the readahead(2) system call on each file. @@ -320,19 +321,19 @@ config BUSYBOX_CONFIG_READAHEAD run this applet as a background job. config BUSYBOX_CONFIG_RUNLEVEL - bool "runlevel" + bool "runlevel" default n help - find the current and previous system runlevel. + find the current and previous system runlevel. This applet uses utmp but does not rely on busybox supporing utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. config BUSYBOX_CONFIG_RX - bool "rx" + bool "rx" default n help - Receive files using the Xmodem protocol. + Receive files using the Xmodem protocol. config BUSYBOX_CONFIG_STRINGS bool "strings" @@ -371,6 +372,14 @@ config BUSYBOX_CONFIG_TIME When the command finishes, time writes a message to standard output giving timing statistics about this program run. +config BUSYBOX_CONFIG_TTYSIZE + bool "ttysize" + default n + help + A replacement for "stty size". Unlike stty, can report only width, + only height, or both, in any order. It also does not complain on error, + but returns default 80x24. Usage in shell scripts: width=`ttysize w`. + config BUSYBOX_CONFIG_WATCHDOG bool "watchdog" default y diff --git a/package/busybox/config/modutils/Config.in b/package/busybox/config/modutils/Config.in index 9183145..7ffca93 100644 --- a/package/busybox/config/modutils/Config.in +++ b/package/busybox/config/modutils/Config.in @@ -134,7 +134,7 @@ config BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE config BUSYBOX_CONFIG_FEATURE_2_4_MODULES # Simulate indentation bool "Support version 2.2.x to 2.4.x Linux kernels" - default y + default n depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_RMMOD || BUSYBOX_CONFIG_MODPROBE help Support module loading for 2.2.x and 2.4.x Linux kernels. diff --git a/package/busybox/config/networking/Config.in b/package/busybox/config/networking/Config.in index 6c88baf..1da1dc5 100644 --- a/package/busybox/config/networking/Config.in +++ b/package/busybox/config/networking/Config.in @@ -12,17 +12,25 @@ config BUSYBOX_CONFIG_FEATURE_IPV6 Enable IPv6 support in busybox. This adds IPv6 support in the networking applets. +config BUSYBOX_CONFIG_VERBOSE_RESOLUTION_ERRORS + bool "Verbose resolution errors" + default y + help + Enable if you are not satisfied with simplistic + "can't resolve 'hostname.com'" and want to know more. + This may increase size of your executable a bit. + config BUSYBOX_CONFIG_ARP bool "arp" default n help - Manipulate the system ARP cache + Manipulate the system ARP cache. config BUSYBOX_CONFIG_ARPING bool "arping" default y help - Ping hosts by ARP packets + Ping hosts by ARP packets. config BUSYBOX_CONFIG_DNSD bool "dnsd" @@ -67,7 +75,7 @@ config BUSYBOX_CONFIG_HOSTNAME bool "hostname" default n help - Show or set the system's host name + Show or set the system's host name. config BUSYBOX_CONFIG_HTTPD bool "httpd" @@ -75,6 +83,14 @@ config BUSYBOX_CONFIG_HTTPD help Serve web pages via an HTTP server. +config BUSYBOX_CONFIG_FEATURE_HTTPD_USE_SENDFILE + bool "Use sendfile system call" + default y + depends on BUSYBOX_CONFIG_HTTPD + help + When enabled, httpd will use the kernel sendfile() function + instead of read/write loop. + config BUSYBOX_CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP bool "Support reloading the global config file using hup signal" default y @@ -132,7 +148,7 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR help This option enables support for running scripts through an interpreter. Turn this on if you want PHP scripts to work - properly. You need to supply an addition line in your httpd + properly. You need to supply an additional line in your httpd config file: *.php:/path/to/your/php @@ -154,6 +170,19 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR For example, httpd -e "<Hello World>" as "<Hello World>". +config BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES + bool "Enable support for custom error pages" + default y + depends on BUSYBOX_CONFIG_HTTPD + help + This option allows you to define custom error pages in + the configuration file instead of the default HTTP status + error pages. For instance, if you add the line: + E404:/path/e404.html + in the config file, the server will respond the specified + '/path/e404.html' file instead of the terse '404 NOT FOUND' + message. + config BUSYBOX_CONFIG_IFCONFIG bool "ifconfig" default y @@ -204,7 +233,6 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS config BUSYBOX_CONFIG_IFUPDOWN bool "ifupdown" default n - select BUSYBOX_CONFIG_RUN_PARTS help Activate or deactivate the specified interfaces. This applet makes use of either "ifconfig" and "route" or the "ip" command to actually @@ -215,8 +243,18 @@ config BUSYBOX_CONFIG_IFUPDOWN against my better judgement (since this will surely result in plenty of support questions on the mailing list), I do not force you to enable these additional options. It is up to you to supply either - "ifconfig" and "route" or the "ip" command, either via busybox or via - standalone utilities. + "ifconfig", "route" and "run-parts" or the "ip" command, either + via busybox or via standalone utilities. + +config BUSYBOX_CONFIG_IFUPDOWN_IFSTATE_PATH + string "Absolute path to ifstate file" + default "/var/run/ifstate" + help + ifupdown keeps state information in a file called ifstate. + Typically it is located in /var/run/ifstate, however + some distributions tend to put it in other places + (debian, for example, uses /etc/network/run/ifstate). + This config option defines location of ifstate. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IP bool "Use ip applet" @@ -259,7 +297,7 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV4 default n depends on BUSYBOX_CONFIG_IFUPDOWN help - If you want busybox to talk IPv4, leave this on. + If you want ifup/ifdown to talk IPv4, leave this on. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6 bool "Enable support for IPv6" @@ -268,13 +306,14 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPV6 help If you need support for IPv6, turn this option on. -config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_IPX - bool "Enable support for IPX" - default n - depends on BUSYBOX_CONFIG_IFUPDOWN - help - If this option is selected you can use busybox to work with IPX - networks. +### UNUSED +### config FEATURE_IFUPDOWN_IPX +### bool "Enable support for IPX" +### default n +### depends on IFUPDOWN +### help +### If this option is selected you can use busybox to work with IPX +### networks. config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING bool "Enable mapping support" @@ -284,6 +323,16 @@ config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_MAPPING This enables support for the "mapping" stanza, unless you have a weird network setup you don't need it. +config BUSYBOX_CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP + bool "Enable support for external dhcp clients" + default n + depends on BUSYBOX_CONFIG_IFUPDOWN + help + This enables support for the external dhcp clients. Clients are + tried in the following order: dhcpcd, dhclient, pump and udhcpc. + Otherwise, if udhcpc applet is enabled, it is used. + Otherwise, ifup/ifdown will have no support for DHCP. + config BUSYBOX_CONFIG_INETD bool "inetd" default n @@ -330,7 +379,7 @@ config BUSYBOX_CONFIG_FEATURE_INETD_RPC bool "Support RPC services" default n depends on BUSYBOX_CONFIG_INETD - depends on BUSYBOX_CONFIG_FEATURE_HAVE_RPC + select BUSYBOX_CONFIG_FEATURE_HAVE_RPC help Support Sun-RPC based services @@ -387,6 +436,7 @@ config BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS ip link -> iplink ip route -> iproute ip tunnel -> iptunnel + ip rule -> iprule Say N unless you desparately need the short form of the ip object commands. @@ -466,7 +516,7 @@ config BUSYBOX_CONFIG_NETMSG simple program for sending udp broadcast messages config BUSYBOX_CONFIG_NC_SERVER - bool "Netcat server options (-lp)" + bool "Netcat server options (-l)" default n depends on BUSYBOX_CONFIG_NC help @@ -487,6 +537,14 @@ config BUSYBOX_CONFIG_NETSTAT help netstat prints information about the Linux networking subsystem. +config BUSYBOX_CONFIG_FEATURE_NETSTAT_WIDE + bool " Enable wide netstat output" + default y + depends on BUSYBOX_CONFIG_NETSTAT + help + Add support for wide columns. Useful when displaying IPv6 addresses + (-W option). + config BUSYBOX_CONFIG_NSLOOKUP bool "nslookup" default y @@ -500,27 +558,25 @@ config BUSYBOX_CONFIG_PING ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. -config BUSYBOX_CONFIG_FEATURE_FANCY_PING - bool "Enable fancy ping output" - default y - depends on BUSYBOX_CONFIG_PING - help - Make the output from the ping applet include statistics, and at the - same time provide full support for ICMP packets. - config BUSYBOX_CONFIG_PING6 bool "ping6" default y - depends on BUSYBOX_CONFIG_FEATURE_IPV6 + depends on BUSYBOX_CONFIG_FEATURE_IPV6 && BUSYBOX_CONFIG_PING help This will give you a ping that can talk IPv6. -config BUSYBOX_CONFIG_FEATURE_FANCY_PING6 - bool "Enable fancy ping6 output" +config BUSYBOX_CONFIG_PSCAN + bool "pscan" + default n + help + Simple network port scanner. + +config BUSYBOX_CONFIG_FEATURE_FANCY_PING + bool "Enable fancy ping output" default y - depends on BUSYBOX_CONFIG_PING6 + depends on BUSYBOX_CONFIG_PING help - Make the output from the ping6 applet include statistics, and at the + Make the output from the ping applet include statistics, and at the same time provide full support for ICMP packets. config BUSYBOX_CONFIG_ROUTE @@ -529,6 +585,12 @@ config BUSYBOX_CONFIG_ROUTE help Route displays or manipulates the kernel's IP routing tables. +config BUSYBOX_CONFIG_SLATTACH + bool "slattach" + default n + help + slattach is a small utility to attach network interfaces to serial lines. + config BUSYBOX_CONFIG_TELNET bool "telnet" default y @@ -703,13 +765,6 @@ config BUSYBOX_CONFIG_FEATURE_WGET_AUTHENTICATION help Support authenticated HTTP transfers. -config BUSYBOX_CONFIG_FEATURE_WGET_IP6_LITERAL - bool "Enable IPv6 literal addresses" - default y - depends on BUSYBOX_CONFIG_WGET && BUSYBOX_CONFIG_FEATURE_IPV6 - help - Support IPv6 address literal notation in URLs. - config BUSYBOX_CONFIG_FEATURE_WGET_LONG_OPTIONS bool "Enable long options" default y diff --git a/package/busybox/config/networking/udhcp/Config.in b/package/busybox/config/networking/udhcp/Config.in index 04a2ada..65462ef 100644 --- a/package/busybox/config/networking/udhcp/Config.in +++ b/package/busybox/config/networking/udhcp/Config.in @@ -32,6 +32,16 @@ config BUSYBOX_CONFIG_APP_DUMPLEASES See http://udhcp.busybox.net for further details. +config BUSYBOX_CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY + bool "Rewrite the lease file at every new acknowledge" + default n + depends on BUSYBOX_CONFIG_APP_UDHCPD + help + If selected, udhcpd will write a new file with leases every + time a new lease has been accepted, thus eleminating the need + to send SIGUSR1 for the initial writing, or updating. Any timed + rewriting remains undisturbed + config BUSYBOX_CONFIG_APP_UDHCPC bool "udhcp Client (udhcpc)" default y @@ -44,17 +54,6 @@ config BUSYBOX_CONFIG_APP_UDHCPC See http://udhcp.busybox.net for further details. -config BUSYBOX_CONFIG_FEATURE_UDHCP_SYSLOG - bool "Log udhcp messages to syslog" - default n - depends on BUSYBOX_CONFIG_APP_UDHCPD || BUSYBOX_CONFIG_APP_UDHCPC - select BUSYBOX_CONFIG_FEATURE_SYSLOG - help - If not daemonized, udhcpd prints its messages to stdout/stderr. - If this option is selected, it will also log them to syslog. - - See http://udhcp.busybox.net for further details. - config BUSYBOX_CONFIG_FEATURE_UDHCP_DEBUG bool "Compile udhcp with noisy debugging messages" default n @@ -65,3 +64,11 @@ config BUSYBOX_CONFIG_FEATURE_UDHCP_DEBUG the background. See http://udhcp.busybox.net for further details. + +config BUSYBOX_CONFIG_FEATURE_RFC3397 + bool "Support for RFC3397 domain search (experimental)" + default y + depends on BUSYBOX_CONFIG_APP_UDHCPD || BUSYBOX_CONFIG_APP_UDHCPC + help + If selected, both client and server will support passing of domain + search lists via option 119, specified in RFC3397. diff --git a/package/busybox/config/procps/Config.in b/package/busybox/config/procps/Config.in index ef0c6a2..cd063db 100644 --- a/package/busybox/config/procps/Config.in +++ b/package/busybox/config/procps/Config.in @@ -43,6 +43,12 @@ config BUSYBOX_CONFIG_KILLALL5 default y depends on BUSYBOX_CONFIG_KILL +config BUSYBOX_CONFIG_NMETER + bool "nmeter" + default n + help + Prints selected system stats continuously, one line per update. + config BUSYBOX_CONFIG_PIDOF bool "pidof" default y @@ -74,7 +80,7 @@ config BUSYBOX_CONFIG_PS config BUSYBOX_CONFIG_FEATURE_PS_WIDE bool "Enable argument for wide output (-w)" - default y + default n depends on BUSYBOX_CONFIG_PS help Support argument 'w' for wide output. @@ -102,11 +108,25 @@ config BUSYBOX_CONFIG_TOP system. config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE - bool "Support showing CPU usage percentage (add 2k bytes)" + bool "Show CPU per-process usage percentage (adds 2k bytes)" default y depends on BUSYBOX_CONFIG_TOP help - Make top display CPU usage. + Make top display CPU usage for each process. + +config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS + bool "Show CPU global usage percentage (adds 0.5k bytes)" + default y + depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE + help + Makes top display "CPU: NN% usr NN% sys..." line. + +config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS + bool "Show 1/10th of a percent in CPU/mem statistics (adds 0.3k bytes)" + default n + depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE + help + Show 1/10th of a percent in CPU/mem statistics. config BUSYBOX_CONFIG_UPTIME bool "uptime" @@ -116,6 +136,14 @@ config BUSYBOX_CONFIG_UPTIME the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes. +config BUSYBOX_CONFIG_WATCH + bool "watch" + default n + #huh?? select DATE + help + watch is used to execute a program periodically, showing + output to the screen. + endmenu diff --git a/package/busybox/config/selinux/Config.in b/package/busybox/config/selinux/Config.in new file mode 100644 index 0000000..907c975 --- /dev/null +++ b/package/busybox/config/selinux/Config.in @@ -0,0 +1,108 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Selinux Utilities" + depends on BUSYBOX_CONFIG_SELINUX + +config BUSYBOX_CONFIG_CHCON + bool "chcon" + default n + depends on BUSYBOX_CONFIG_SELINUX + help + Enable support to change the security context of file. + +config BUSYBOX_CONFIG_FEATURE_CHCON_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_CHCON && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the chcon applet. + +config BUSYBOX_CONFIG_GETENFORCE + bool "getenforce" + default n + depends on BUSYBOX_CONFIG_SELINUX + help + Enable support to get the current mode of SELinux. + +config BUSYBOX_CONFIG_GETSEBOOL + bool "getsebool" + default n + depends on BUSYBOX_CONFIG_SELINUX + help + Enable support to get SELinux boolean values. + +config BUSYBOX_CONFIG_LOAD_POLICY + bool "load_policy" + default n + depends on BUSYBOX_CONFIG_SELINUX + help + Enable support to load SELinux policy. + +config BUSYBOX_CONFIG_MATCHPATHCON + bool "matchpathcon" + default n + depends on BUSYBOX_CONFIG_SELINUX + help + Enable support to get default security context of the + specified path from the file contexts configuration. + +config BUSYBOX_CONFIG_RESTORECON + bool "restorecon" + default n + depends on BUSYBOX_CONFIG_SELINUX + help + Enable support to relabel files. The feature is almost + the same as setfiles, but usage is a little different. + +config BUSYBOX_CONFIG_RUNCON + bool "runcon" + default n + depends on BUSYBOX_CONFIG_SELINUX + help + Enable support to run command in speficied security context. + +config BUSYBOX_CONFIG_FEATURE_RUNCON_LONG_OPTIONS + bool "Enable long options" + default n + depends on BUSYBOX_CONFIG_RUNCON && BUSYBOX_CONFIG_GETOPT_LONG + help + Support long options for the runcon applet. + +config BUSYBOX_CONFIG_SELINUXENABLED + bool "selinuxenabled" + default n + depends on BUSYBOX_CONFIG_SELINUX + help + Enable support for this command to be used within shell scripts + to determine if selinux is enabled. + +config BUSYBOX_CONFIG_SETENFORCE + bool "setenforce" + default n + depends on BUSYBOX_CONFIG_SELINUX + help + Enable support to modify the mode SELinux is running in. + +config BUSYBOX_CONFIG_SETFILES + bool "setfiles" + default n + depends on BUSYBOX_CONFIG_SELINUX + help + Enable support to modify to relabel files. + Notice: If you built libselinux with -D_FILE_OFFSET_BITS=64, + (It is default in libselinux's Makefile), you _must_ enable + CONFIG_LFS. + +config BUSYBOX_CONFIG_FEATURE_SETFILES_CHECK_OPTION + bool "Enable check option" + default n + depends on BUSYBOX_CONFIG_SETFILES + help + Support "-c" option (check the validity of the contexts against + the specified binary policy) for setfiles. Requires libsepol. + +endmenu + diff --git a/package/busybox/config/shell/Config.in b/package/busybox/config/shell/Config.in index d4cd52d..d2b1056 100644 --- a/package/busybox/config/shell/Config.in +++ b/package/busybox/config/shell/Config.in @@ -87,7 +87,7 @@ config BUSYBOX_CONFIG_ASH_MATH_SUPPORT config BUSYBOX_CONFIG_ASH_MATH_SUPPORT_64 bool "Extend Posix math support to 64 bit" - default n + default y depends on BUSYBOX_CONFIG_ASH_MATH_SUPPORT help Enable 64-bit math support in the ash shell. This will make @@ -107,7 +107,7 @@ config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO select BUSYBOX_CONFIG_ECHO depends on BUSYBOX_CONFIG_ASH help - Enable support for echo, built in to ash. + Enable support for echo, builtin to ash. config BUSYBOX_CONFIG_ASH_BUILTIN_TEST bool "Builtin version of 'test'" @@ -115,7 +115,7 @@ config BUSYBOX_CONFIG_ASH_BUILTIN_TEST select BUSYBOX_CONFIG_TEST depends on BUSYBOX_CONFIG_ASH help - Enable support for test, built in to ash. + Enable support for test, builtin to ash. config BUSYBOX_CONFIG_ASH_CMDCMD bool "'command' command to override shell builtins" @@ -135,7 +135,7 @@ config BUSYBOX_CONFIG_ASH_MAIL config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE bool "Optimize for size instead of speed" - default y + default n depends on BUSYBOX_CONFIG_ASH help Compile ash for reduced size at the price of speed. @@ -153,7 +153,7 @@ config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT config BUSYBOX_CONFIG_ASH_EXPAND_PRMT bool "Expand prompt string" - default n + default y depends on BUSYBOX_CONFIG_ASH help "PS#" may be contain volatile content, such as backquote commands. @@ -176,6 +176,54 @@ config BUSYBOX_CONFIG_HUSH word ), arithmetic expansion, aliases, brace expansion, tilde expansion, &> and >& redirection of stdout+stderr, etc. +config BUSYBOX_CONFIG_HUSH_HELP + bool "help builtin" + default n + depends on BUSYBOX_CONFIG_HUSH + help + Enable help builtin in hush. Code size + ~1 kbyte. + +config BUSYBOX_CONFIG_HUSH_INTERACTIVE + bool "Interactive mode" + default n + depends on BUSYBOX_CONFIG_HUSH + help + Enable interactive mode (prompt and command editing). + Without this, hush simply reads and executes commands + from stdin just like a shell script from the file. + No prompt, no PS1/PS2 magic shell variables. + +config BUSYBOX_CONFIG_HUSH_JOB + bool "Job control" + default n + depends on BUSYBOX_CONFIG_HUSH_INTERACTIVE + help + Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current + command (not entire shell), fg/bg builtins work. Without this option, + "cmd &" still works by simply spawning a process and immediately + prompting for next command (or executing next command in a script), + but no separate process group is formed. + +config BUSYBOX_CONFIG_HUSH_TICK + bool "Process substitution" + default n + depends on BUSYBOX_CONFIG_HUSH + help + Enable process substitution `command` and $(command) in hush. + +config BUSYBOX_CONFIG_HUSH_IF + bool "Support if/then/elif/else/fi" + default n + depends on BUSYBOX_CONFIG_HUSH + help + Enable if/then/elif/else/fi in hush. + +config BUSYBOX_CONFIG_HUSH_LOOPS + bool "Support for, while and until loops" + default n + depends on BUSYBOX_CONFIG_HUSH + help + Enable for, while and until loops in hush. config BUSYBOX_CONFIG_LASH bool "lash" @@ -216,12 +264,12 @@ config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET help Remove the busybox introduction when starting a shell. -config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE_SHELL +config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE bool "Standalone shell" default n - depends on BUSYBOX_CONFIG_MSH || BUSYBOX_CONFIG_LASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH + depends on (BUSYBOX_CONFIG_MSH || BUSYBOX_CONFIG_LASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS help - This option causes the selected busybox shell to use busybox applets + This option causes busybox shells to use busybox applets in preference to executables in the PATH whenever possible. For example, entering the command 'ifconfig' into the shell would cause busybox to use the ifconfig busybox applet. Specifying the fully @@ -230,66 +278,43 @@ config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE_SHELL is generally used when creating a statically linked version of busybox for use as a rescue shell, in the event that you screw up your system. - Note that this will *also* cause applets to take precedence - over shell builtins of the same name. So turning this on will - eliminate any performance gained by turning on the builtin "echo" - and "test" commands in ash. - - Note that when using this option, the shell will attempt to directly - run '/bin/busybox'. If you do not have the busybox binary sitting in - that exact location with that exact name, this option will not work at - all. - -config BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING - bool "Command line editing" - default y - depends on BUSYBOX_CONFIG_MSH || BUSYBOX_CONFIG_LASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH - help - Enable command editing in shell. - -config BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING_VI - bool "vi-style line editing commands" + This is implemented by re-execing /proc/self/exe (typically) + with right parameters. Some selected applets ("NOFORK" applets) + can even be executed without creating new process. + Instead, busybox will call <applet>_main() internally. + + However, this causes problems in chroot jails without mounted /proc + and with ps/top (command name can be shown as 'exe' for applets + started this way). +# untrue? +# Note that this will *also* cause applets to take precedence +# over shell builtins of the same name. So turning this on will +# eliminate any performance gained by turning on the builtin "echo" +# and "test" commands in ash. +# untrue? +# Note that when using this option, the shell will attempt to directly +# run '/bin/busybox'. If you do not have the busybox binary sitting in +# that exact location with that exact name, this option will not work at +# all. + +config BUSYBOX_CONFIG_CTTYHACK + bool "cttyhack" default n - depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING help - Enable vi-style line editing in the shell. This mode can be - turned on and off with "set -o vi" and "set +o vi". - -config BUSYBOX_CONFIG_FEATURE_COMMAND_HISTORY - int "History size" - range 0 99999 - default 15 - depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING - help - Specify command history size in shell. + One common problem reported on the mailing list is "can't access tty; + job control turned off" error message which typically appears when + one tries to use shell with stdin/stdout opened to /dev/console. + This device is special - it cannot be a controlling tty. -config BUSYBOX_CONFIG_FEATURE_COMMAND_SAVEHISTORY - bool "History saving" - default n - depends on BUSYBOX_CONFIG_ASH && BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING - help - Enable history saving in ash shell. - -config BUSYBOX_CONFIG_FEATURE_COMMAND_TAB_COMPLETION - bool "Tab completion" - default y - depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING - help - Enable tab completion in shell. + Proper solution is to use correct device instead of /dev/console. -config BUSYBOX_CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION - bool "Username completion" - default n - depends on BUSYBOX_CONFIG_FEATURE_COMMAND_TAB_COMPLETION - help - Enable username completion in shell. + cttyhack provides "quick and dirty" solution to this problem. + It analyzes stdin with various ioctls, trying to determine whether + it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line). + If it detects one, it closes stdin/out/err and reopens that device. + Then it executes given program. Usage example for /etc/inittab + (for busybox init): -config BUSYBOX_CONFIG_FEATURE_SH_FANCY_PROMPT - bool "Fancy shell prompts" - default y - depends on BUSYBOX_CONFIG_FEATURE_COMMAND_EDITING - help - Setting this option allows for prompts to use things like \w and - \$ and also using escape codes. + ::respawn:/bin/cttyhack /bin/sh endmenu diff --git a/package/busybox/config/sysklogd/Config.in b/package/busybox/config/sysklogd/Config.in index 12e08d3..9eebd77 100644 --- a/package/busybox/config/sysklogd/Config.in +++ b/package/busybox/config/sysklogd/Config.in @@ -59,6 +59,7 @@ config BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG config BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE int " Circular buffer size in Kbytes (minimum 4KB)" default 16 + range 4 2147483647 depends on BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG help This option sets the size of the circular buffer @@ -88,8 +89,6 @@ config BUSYBOX_CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING config BUSYBOX_CONFIG_KLOGD bool "klogd" default y - depends on BUSYBOX_CONFIG_SYSLOGD - select BUSYBOX_CONFIG_FEATURE_SYSLOG help klogd is a utility which intercepts and logs all messages from the Linux kernel and sends the messages diff --git a/package/busybox/config/util-linux/Config.in b/package/busybox/config/util-linux/Config.in index ab3dc37..28dc7b7 100644 --- a/package/busybox/config/util-linux/Config.in +++ b/package/busybox/config/util-linux/Config.in @@ -127,7 +127,7 @@ config BUSYBOX_CONFIG_FEATURE_SGI_LABEL config BUSYBOX_CONFIG_FEATURE_SUN_LABEL bool "Support SUN disklabels" default n - depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE + depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE help Enabling this option allows you to create or change SUN disklabels. Most people can safely leave this option disabled. @@ -181,7 +181,7 @@ config BUSYBOX_CONFIG_MKFS_MINIX this utility will do the job for you. comment "Minix filesystem support" - depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX + depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX config BUSYBOX_CONFIG_FEATURE_MINIX2 bool "Support Minix fs v2 (fsck_minix/mkfs_minix)" @@ -269,46 +269,41 @@ config BUSYBOX_CONFIG_MDEV bool "mdev" default n help - mdev is a mini-udev implementation: call it with -s to populate - /dev from /sys, then "echo /sbin/mdev > /proc/sys/kernel/hotplug" to - have it handle hotplug events afterwards. Device names are taken - from sysfs. + mdev is a mini-udev implementation for dynamically creating device + nodes in the /dev directory. + + For more information, please see docs/mdev.txt config BUSYBOX_CONFIG_FEATURE_MDEV_CONF bool "Support /etc/mdev.conf" default n depends on BUSYBOX_CONFIG_MDEV help - The mdev config file contains lines that look like: - - hd[a-z][0-9]* 0:3 660 - - That's device name (with regex match), uid:gid, and permissions. + Add support for the mdev config file to control ownership and + permissions of the device nodes. - Config file parsing stops on the first matching line. If no config - entry is matched, devices are created with default 0:0 660. (Make - the last line match .* to override this.) + For more information, please see docs/mdev.txt config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC bool "Support command execution at device addition/removal" default n depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF help - This adds support for an optional field to /etc/mdev.conf, consisting - of a special character and a command line to run after creating the - corresponding device(s) and before removing, ala: + This adds support for an optional field to /etc/mdev.conf for + executing commands when devices are created/removed. - hdc root:cdrom 660 *ln -s $MDEV cdrom + For more information, please see docs/mdev.txt - The $MDEV environment variable is set to the name of the device. - - The special characters and their meanings are: - @ Run after creating the device. - $ Run before removing the device. - * Run both after creating and before removing the device. +config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE + bool "Support loading of firmwares" + default n + depends on BUSYBOX_CONFIG_MDEV + help + Some devices need to load firmware before they can be usable. - Commands are executed via system() so you need /bin/sh, meaning you - probably want to select a default shell in the Shells menu. + These devices will request userspace look up the files in + /lib/firmware/ and if it exists, send it to the kernel for + loading into the hardware. config BUSYBOX_CONFIG_MKSWAP bool "mkswap" @@ -369,7 +364,7 @@ config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS bool "Support mounting NFS file systems" default y depends on BUSYBOX_CONFIG_MOUNT - depends on BUSYBOX_CONFIG_FEATURE_HAVE_RPC + select BUSYBOX_CONFIG_FEATURE_HAVE_RPC select BUSYBOX_CONFIG_FEATURE_SYSLOG help Enable mounting of NFS file systems. @@ -495,7 +490,7 @@ config BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP The umount command will also free that loopback device. You can still use the 'losetup' utility (to manually associate files - with loop devices) if you need to do something advanced, such as + with loop devices) if you need to do something advanced, such as specify an offset or cryptographic options to the loopback device. (If you don't want umount to free the loop device, use "umount -D".) diff --git a/package/busybox/patches/000-autoconf.patch b/package/busybox/patches/000-autoconf.patch index d19cf0c..52fd92a 100644 --- a/package/busybox/patches/000-autoconf.patch +++ b/package/busybox/patches/000-autoconf.patch @@ -1,12 +1,13 @@ -Index: busybox-1.4.2/applets/Kbuild +Index: busybox-1.7.2/applets/Kbuild =================================================================== ---- busybox-1.4.2.orig/applets/Kbuild 2007-06-04 13:21:32.429046704 +0200 -+++ busybox-1.4.2/applets/Kbuild 2007-06-04 13:21:32.495036672 +0200 -@@ -10,6 +10,7 @@ +--- busybox-1.7.2.orig/applets/Kbuild 2007-10-04 14:30:23.484330073 +0200 ++++ busybox-1.7.2/applets/Kbuild 2007-10-04 14:33:47.751970627 +0200 +@@ -20,6 +20,6 @@ + HOSTCFLAGS_usage.o = -I$(srctree)/include - # Generated file needs additional love - -+applets/usage: include/autoconf.h - applets/applets.o: include/usage_compressed.h - - hostprogs-y += usage + applets/applets.o: include/usage_compressed.h +-applets/usage: .config $(srctree)/applets/usage_compressed +-include/usage_compressed.h: applets/usage $(srctree)/applets/usage_compressed ++applets/usage: .config $(srctree)/applets/usage_compressed include/autoconf.h ++include/usage_compressed.h: applets/usage $(srctree)/applets/usage_compressed include/autoconf.h + $(call cmd,gen_usage_compressed) diff --git a/package/busybox/patches/110-wget_getopt_fix.patch b/package/busybox/patches/110-wget_getopt_fix.patch index fd530df..657f83a 100644 --- a/package/busybox/patches/110-wget_getopt_fix.patch +++ b/package/busybox/patches/110-wget_getopt_fix.patch @@ -1,13 +1,13 @@ -Index: busybox-1.4.2/networking/wget.c +Index: busybox-1.7.2/networking/wget.c =================================================================== ---- busybox-1.4.2.orig/networking/wget.c 2007-06-04 13:21:32.408049896 +0200 -+++ busybox-1.4.2/networking/wget.c 2007-06-04 13:21:32.681008400 +0200 -@@ -136,7 +136,7 @@ - { "directory-prefix", required_argument, NULL, 'P' }, - { "proxy", required_argument, NULL, 'Y' }, - { "user-agent", required_argument, NULL, 'U' }, -- { "passive-ftp", no_argument, NULL, 0xff }, -+ { "passive-ftp", no_argument, NULL, 0xfd }, - { "header", required_argument, NULL, 0xfe }, - { 0, 0, 0, 0 } - }; +--- busybox-1.7.2.orig/networking/wget.c 2007-10-04 14:35:17.057059834 +0200 ++++ busybox-1.7.2/networking/wget.c 2007-10-04 14:35:27.013627222 +0200 +@@ -140,7 +140,7 @@ + "directory-prefix\0" Required_argument "P" + "proxy\0" Required_argument "Y" + "user-agent\0" Required_argument "U" +- "passive-ftp\0" No_argument "\xff" ++ "passive-ftp\0" No_argument "\xfd" + "header\0" Required_argument "\xfe" + ; + applet_long_options = wget_longopts; diff --git a/package/busybox/patches/130-drop_werror.patch b/package/busybox/patches/130-drop_werror.patch deleted file mode 100644 index cd3a67b..0000000 --- a/package/busybox/patches/130-drop_werror.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: busybox-1.4.2/Makefile.flags -=================================================================== ---- busybox-1.4.2.orig/Makefile.flags 2007-06-04 13:21:32.387053088 +0200 -+++ busybox-1.4.2/Makefile.flags 2007-06-04 13:21:32.871979368 +0200 -@@ -16,7 +16,7 @@ - -D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP - - CFLAGS += \ -- -Wall -Wstrict-prototypes -Wshadow -Werror -Wundef \ -+ -Wall -Wstrict-prototypes -Wshadow -Wundef \ - -funsigned-char -fno-builtin-strlen -finline-limit=0 -static-libgcc \ - -Os -falign-functions=1 -falign-jumps=1 -falign-loops=1 \ - -fomit-frame-pointer -ffunction-sections -fdata-sections diff --git a/package/busybox/patches/243-udhcpc_changed_ifindex.patch b/package/busybox/patches/243-udhcpc_changed_ifindex.patch index 3a95174..b304604 100644 --- a/package/busybox/patches/243-udhcpc_changed_ifindex.patch +++ b/package/busybox/patches/243-udhcpc_changed_ifindex.patch @@ -1,9 +1,9 @@ -Index: busybox-1.4.2/networking/udhcp/dhcpc.c +Index: busybox-1.7.2/networking/udhcp/dhcpc.c =================================================================== ---- busybox-1.4.2.orig/networking/udhcp/dhcpc.c 2007-07-18 10:07:20.161035443 +0200 -+++ busybox-1.4.2/networking/udhcp/dhcpc.c 2007-07-18 10:09:15.515609124 +0200 -@@ -273,6 +273,12 @@ - tv.tv_sec = timeout - uptime(); +--- busybox-1.7.2.orig/networking/udhcp/dhcpc.c 2007-10-04 14:36:41.521873204 +0200 ++++ busybox-1.7.2/networking/udhcp/dhcpc.c 2007-10-04 14:38:28.231954268 +0200 +@@ -309,6 +309,12 @@ + jump_in: tv.tv_usec = 0; + /* When running on a bridge, the ifindex may have changed (e.g. if @@ -12,6 +12,6 @@ Index: busybox-1.4.2/networking/udhcp/dhcpc.c + * Workaround: refresh it here before processing the next packet */ + read_interface(client_config.interface, &client_config.ifindex, NULL, client_config.arp); + - if (listen_mode != LISTEN_NONE && fd < 0) { + if (listen_mode != LISTEN_NONE && sockfd < 0) { if (listen_mode == LISTEN_KERNEL) - fd = listen_socket(INADDR_ANY, CLIENT_PORT, client_config.interface); + sockfd = listen_socket(/*INADDR_ANY,*/ CLIENT_PORT, client_config.interface); diff --git a/package/busybox/patches/250-ash_export-n.patch b/package/busybox/patches/250-ash_export-n.patch index b5a8794..8ee2aee 100644 --- a/package/busybox/patches/250-ash_export-n.patch +++ b/package/busybox/patches/250-ash_export-n.patch @@ -1,37 +1,37 @@ -Index: busybox-1.4.2/shell/ash.c +Index: busybox-1.7.2/shell/ash.c =================================================================== ---- busybox-1.4.2.orig/shell/ash.c 2007-06-04 13:21:32.248074216 +0200 -+++ busybox-1.4.2/shell/ash.c 2007-06-04 13:21:34.000807760 +0200 -@@ -12237,9 +12237,18 @@ +--- busybox-1.7.2.orig/shell/ash.c 2007-09-03 13:48:38.000000000 +0200 ++++ busybox-1.7.2/shell/ash.c 2007-10-04 14:47:41.607489342 +0200 +@@ -11310,8 +11310,18 @@ const char *p; char **aptr; int flag = argv[0][0] == 'r'? VREADONLY : VEXPORT; + int mask = ~0; - int notp; ++ int nopt; -- notp = nextopt("p") - 'p'; -+ while ((notp = nextopt("np"))) { -+ if (notp == 'n') { +- if (nextopt("p") != 'p') { ++ while ((nopt = nextopt("np"))) { ++ if (nopt == 'n') { + mask = ~flag; + } else { /* p */ + break; + } + } + -+ notp -= 'p'; - if (notp && ((name = *(aptr = argptr)))) { - do { - if ((p = strchr(name, '=')) != NULL) { -@@ -12247,10 +12256,11 @@ - } else { - if ((vp = *findvar(hashvar(name), name))) { - vp->flags |= flag; -+ vp->flags &= mask; - continue; ++ if (nopt != 'p') { + aptr = argptr; + name = *aptr; + if (name) { +@@ -11323,10 +11333,11 @@ + vp = *findvar(hashvar(name), name); + if (vp) { + vp->flags |= flag; ++ vp->flags &= mask; + continue; + } } - } -- setvar(name, p, flag); -+ setvar(name, p, flag & mask); - } while ((name = *++aptr) != NULL); - } else { - showvars(argv[0], flag, 0); +- setvar(name, p, flag); ++ setvar(name, p, flag & mask); + } while ((name = *++aptr) != NULL); + return 0; + } diff --git a/package/busybox/patches/260-broadcast_plus.patch b/package/busybox/patches/260-broadcast_plus.patch deleted file mode 100644 index 60b2afc..0000000 --- a/package/busybox/patches/260-broadcast_plus.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: busybox-1.4.2/networking/ifconfig.c -=================================================================== ---- busybox-1.4.2.orig/networking/ifconfig.c 2007-06-29 02:03:17.046772952 +0200 -+++ busybox-1.4.2/networking/ifconfig.c 2007-06-29 02:03:49.938772608 +0200 -@@ -376,18 +376,18 @@ - #endif - sai.sin_family = AF_INET; - sai.sin_port = 0; -- if (!strcmp(host, bb_str_default)) { -- /* Default is special, meaning 0.0.0.0. */ -- sai.sin_addr.s_addr = INADDR_ANY; -- } - #if ENABLE_FEATURE_IFCONFIG_BROADCAST_PLUS -- else if ((host[0] == '+' && !host[1]) && (mask & A_BROADCAST) -+ if ((host[0] == '+' && !host[1]) && (mask & A_BROADCAST) - && (did_flags & (A_NETMASK|A_HOSTNAME)) == (A_NETMASK|A_HOSTNAME) - ) { - /* + is special, meaning broadcast is derived. */ - sai.sin_addr.s_addr = (~sai_netmask) | (sai_hostname & sai_netmask); -- } -+ } else - #endif -+ if (!strcmp(host, bb_str_default)) { -+ /* Default is special, meaning 0.0.0.0. */ -+ sai.sin_addr.s_addr = INADDR_ANY; -+ } - #if ENABLE_FEATURE_IPV6 - else if (inet_pton(AF_INET6, host, &sai6.sin6_addr) > 0) { - int sockfd6; diff --git a/package/busybox/patches/270-ash_performance.patch b/package/busybox/patches/270-ash_performance.patch deleted file mode 100644 index eff7a5b..0000000 --- a/package/busybox/patches/270-ash_performance.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: busybox-1.4.2/shell/ash.c -=================================================================== ---- busybox-1.4.2.orig/shell/ash.c 2007-07-01 05:33:08.371737750 +0200 -+++ busybox-1.4.2/shell/ash.c 2007-07-01 05:33:11.703946000 +0200 -@@ -3957,12 +3957,6 @@ - } - #endif - -- if (is_safe_applet(name)) { -- entry->cmdtype = CMDNORMAL; -- entry->u.index = -1; -- return; -- } -- - updatetbl = (path == pathval()); - if (!updatetbl) { - act |= DO_ALTPATH; -@@ -4074,6 +4068,12 @@ - goto success; - } - -+ if (is_safe_applet(name)) { -+ entry->cmdtype = CMDNORMAL; -+ entry->u.index = -1; -+ return; -+ } -+ - /* We failed. If there was an entry for this command, delete it */ - if (cmdp && updatetbl) - delete_cmd_entry(); diff --git a/package/busybox/patches/280-printf.patch b/package/busybox/patches/280-printf.patch deleted file mode 100644 index d8442dc..0000000 --- a/package/busybox/patches/280-printf.patch +++ /dev/null @@ -1,18 +0,0 @@ -Index: busybox-1.4.2/coreutils/printf.c -=================================================================== ---- busybox-1.4.2.orig/coreutils/printf.c 2007-07-09 03:00:31.808788500 +0200 -+++ busybox-1.4.2/coreutils/printf.c 2007-07-09 03:00:42.257441500 +0200 -@@ -60,11 +60,11 @@ - - static void conv_strtoul(char *arg, void *result) - { -- *(unsigned long*)result = bb_strtoul(arg, NULL, 10); -+ *(unsigned long*)result = bb_strtoul(arg, NULL, 0); - } - static void conv_strtol(char *arg, void *result) - { -- *(long*)result = bb_strtol(arg, NULL, 10); -+ *(long*)result = bb_strtol(arg, NULL, 0); - } - static void conv_strtod(char *arg, void *result) - { diff --git a/package/busybox/patches/310-passwd_access.patch b/package/busybox/patches/310-passwd_access.patch index 22e6abc..b8c8db7 100644 --- a/package/busybox/patches/310-passwd_access.patch +++ b/package/busybox/patches/310-passwd_access.patch @@ -1,19 +1,19 @@ Copyright (C) 2006 OpenWrt.org -Index: busybox-1.4.2/networking/httpd.c +Index: busybox-1.7.2/networking/httpd.c =================================================================== ---- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:32.190083032 +0200 -+++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:34.401746808 +0200 -@@ -1402,12 +1402,26 @@ +--- busybox-1.7.2.orig/networking/httpd.c 2007-09-30 01:54:12.000000000 +0200 ++++ busybox-1.7.2/networking/httpd.c 2007-10-04 14:59:20.287304836 +0200 +@@ -1527,12 +1527,26 @@ if (ENABLE_FEATURE_HTTPD_AUTH_MD5) { char *cipher; char *pp; + char *ppnew = NULL; + struct passwd *pwd = NULL; - if (strncmp(p, request, u-request) != 0) { - /* user uncompared */ + if (strncmp(p, request, u - request) != 0) { + /* user doesn't match */ continue; } pp = strchr(p, ':'); @@ -29,10 +29,10 @@ Index: busybox-1.4.2/networking/httpd.c + strcpy(ppnew + 1, pwd->pw_passwd); + pp = ppnew; + } - if (pp && pp[1] == '$' && pp[2] == '1' && - pp[3] == '$' && pp[4]) { - pp++; -@@ -1417,6 +1431,10 @@ + if (pp && pp[1] == '$' && pp[2] == '1' + && pp[3] == '$' && pp[4] + ) { +@@ -1543,6 +1557,10 @@ /* unauthorized */ continue; } diff --git a/package/busybox/patches/330-httpd_user_agent.patch b/package/busybox/patches/330-httpd_user_agent.patch deleted file mode 100644 index d9fa874..0000000 --- a/package/busybox/patches/330-httpd_user_agent.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: busybox-1.4.2/networking/httpd.c -=================================================================== ---- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:34.401746808 +0200 -+++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:34.588718384 +0200 -@@ -137,6 +137,7 @@ - const char *query; - - USE_FEATURE_HTTPD_CGI(char *referer;) -+ USE_FEATURE_HTTPD_CGI(char *user_agent;) - - const char *configFile; - -@@ -1066,6 +1067,7 @@ - if (cp) *cp = '\0'; /* delete :PORT */ - setenv1("REMOTE_ADDR", p); - } -+ setenv1("HTTP_USER_AGENT", config->user_agent); - #if ENABLE_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV - setenv_long("REMOTE_PORT", config->port); - #endif -@@ -1647,6 +1649,8 @@ - content_type = strdup(skip_whitespace(buf + sizeof("Content-Type:")-1)); - } else if ((STRNCASECMP(buf, "Referer:") == 0)) { - config->referer = strdup(skip_whitespace(buf + sizeof("Referer:")-1)); -+ } else if ((STRNCASECMP(buf, "User-Agent:") == 0)) { -+ config->user_agent = strdup(skip_whitespace(buf + sizeof("User-Agent:")-1)); - } - #endif - diff --git a/package/busybox/patches/350-httpd_redir.patch b/package/busybox/patches/350-httpd_redir.patch index d8f430b..7cb8246 100644 --- a/package/busybox/patches/350-httpd_redir.patch +++ b/package/busybox/patches/350-httpd_redir.patch @@ -1,69 +1,76 @@ -Index: busybox-1.4.2/include/usage.h +Index: busybox-1.7.2/include/usage.h =================================================================== ---- busybox-1.4.2.orig/include/usage.h 2007-06-04 13:21:32.103096256 +0200 -+++ busybox-1.4.2/include/usage.h 2007-06-04 13:21:35.005655000 +0200 -@@ -1257,7 +1257,8 @@ - USE_FEATURE_HTTPD_BASIC_AUTH(" [-r <realm>]") \ +--- busybox-1.7.2.orig/include/usage.h 2007-10-04 17:12:35.230910708 +0200 ++++ busybox-1.7.2/include/usage.h 2007-10-04 17:32:12.994027602 +0200 +@@ -1350,7 +1350,8 @@ + USE_FEATURE_HTTPD_BASIC_AUTH(" [-r realm]") \ USE_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \ " [-h home]" \ -- " [-d/-e <string>]" -+ " [-d/-e <string>]" \ +- " [-d/-e string]" ++ " [-d/-e string]" \ + " [-R <path> [-H <host>]]" #define httpd_full_usage \ - "Listen for incoming http server requests" \ - "\n\nOptions:\n" \ -@@ -1273,7 +1274,9 @@ - " -m PASS Crypt PASS with md5 algorithm\n") \ - " -h HOME Specifies http HOME directory (default ./)\n" \ - " -e STRING HTML encode STRING\n" \ -- " -d STRING URL decode STRING" -+ " -d STRING URL decode STRING\n" \ -+ " -R PATH Redirect target path\n" \ -+ " -H HOST Redirect target host" + "Listen for incoming HTTP requests" \ + "\n\nOptions:" \ +@@ -1368,6 +1369,8 @@ + "\n -h HOME Home directory (default .)" \ + "\n -e STRING HTML encode STRING" \ + "\n -d STRING URL decode STRING" \ ++ "\n -R PATH Redirect target path" \ ++ "\n -H HOST Redirect target host" \ #define hwclock_trivial_usage \ - "[-r|--show] [-s|--hctosys] [-w|--systohc] [-l|--localtime] [-u|--utc]" -Index: busybox-1.4.2/networking/httpd.c + "[-r|--show] [-s|--hctosys] [-w|--systohc]" \ +Index: busybox-1.7.2/networking/httpd.c =================================================================== ---- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:34.588718384 +0200 -+++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:35.006654848 +0200 -@@ -140,6 +140,8 @@ - USE_FEATURE_HTTPD_CGI(char *user_agent;) +--- busybox-1.7.2.orig/networking/httpd.c 2007-10-04 17:13:12.509035065 +0200 ++++ busybox-1.7.2/networking/httpd.c 2007-10-04 17:32:33.711208213 +0200 +@@ -230,6 +230,8 @@ - const char *configFile; -+ const char *redirectPath; -+ const char *redirectHost; + const char *found_mime_type; + const char *found_moved_temporarily; ++ const char *redirect_path; ++ const char *redirect_host; + Htaccess_IP *ip_a_d; /* config allow/deny lines */ - unsigned int rmt_ip; - #if ENABLE_FEATURE_HTTPD_CGI || DEBUG -@@ -880,8 +882,11 @@ + USE_FEATURE_HTTPD_BASIC_AUTH(const char *g_realm;) +@@ -264,6 +266,8 @@ + #define home_httpd (G.home_httpd ) + #define found_mime_type (G.found_mime_type ) + #define found_moved_temporarily (G.found_moved_temporarily) ++#define redirect_path (G.redirect_path ) ++#define redirect_host (G.redirect_host ) + #define ContentLength (G.ContentLength ) + #define last_mod (G.last_mod ) + #define ip_a_d (G.ip_a_d ) +@@ -901,8 +905,11 @@ } #endif if (responseNum == HTTP_MOVED_TEMPORARILY) { -- len += sprintf(buf+len, "Location: %s/%s%s\r\n", -+ len += sprintf(buf+len, "Location: %s%s%s%s%s%s\r\n", -+ (config->redirectHost ? "http://" : ""), -+ (config->redirectHost ? config->redirectHost : ""), - config->found_moved_temporarily, -+ (config->redirectHost ? "" : "/"), - (config->query ? "?" : ""), - (config->query ? config->query : "")); +- len += sprintf(iobuf + len, "Location: %s/%s%s\r\n", ++ len += sprintf(iobuf + len, "Location: %s%s%s%s%s%s\r\n", ++ (redirect_host ? "http://" : ""), ++ (redirect_host ? redirect_host : ""), + found_moved_temporarily, ++ (redirect_host ? "" : "/"), + (g_query ? "?" : ""), + (g_query ? g_query : "")); } -@@ -1594,8 +1599,12 @@ - *++purl = '\0'; /* so keep last character */ - test = purl; /* end ptr */ +@@ -1730,8 +1737,12 @@ + *++urlp = '\0'; /* so keep last character */ + tptr = urlp; /* end ptr */ -+ /* redirect active */ -+ if (config->redirectPath && (strncmp(url, config->redirectPath, strlen(config->redirectPath)) != 0)) -+ config->found_moved_temporarily = config->redirectPath; ++ /* redirect active */ ++ if (redirect_path && (strncmp(urlcopy, redirect_path, strlen(redirect_path)) != 0)) ++ found_moved_temporarily = redirect_path; + - /* If URL is directory, adding '/' */ -- if (test[-1] != '/') { -+ if(!config->redirectPath && (test[-1] != '/')) { - if (is_directory(url + 1, 1, &sb)) { - config->found_moved_temporarily = url; - } -@@ -1897,7 +1906,9 @@ + /* If URL is a directory, add '/' */ +- if (tptr[-1] != '/') { ++ if (!redirect_path && (tptr[-1] != '/')) { + if (is_directory(urlcopy + 1, 1, &sb)) { + found_moved_temporarily = urlcopy; + } +@@ -2004,7 +2015,9 @@ #endif enum { @@ -74,20 +81,18 @@ Index: busybox-1.4.2/networking/httpd.c d_opt_decode_url, h_opt_home_httpd, USE_FEATURE_HTTPD_ENCODE_URL_STR(e_opt_encode_url,) -@@ -1919,7 +1930,7 @@ - OPT_FOREGROUND = 1 << p_opt_foreground, - }; - --static const char httpd_opts[] = "c:d:h:" -+static const char httpd_opts[] = "R:H:c:d:h:" - USE_FEATURE_HTTPD_ENCODE_URL_STR("e:") - USE_FEATURE_HTTPD_BASIC_AUTH("r:") - USE_FEATURE_HTTPD_AUTH_MD5("m:") -@@ -1951,6 +1962,7 @@ - config->ContentLength = -1; - - opt = getopt32(argc, argv, httpd_opts, -+ &(config->redirectPath), &(config->redirectHost), - &(config->configFile), &url_for_decode, &home_httpd +@@ -2053,12 +2066,13 @@ + /* We do not "absolutize" path given by -h (home) opt. + * If user gives relative path in -h, $SCRIPT_FILENAME can end up + * relative too. */ +- opt = getopt32(argv, "c:d:h:" ++ opt = getopt32(argv, "R:H:c:d:h:" + USE_FEATURE_HTTPD_ENCODE_URL_STR("e:") + USE_FEATURE_HTTPD_BASIC_AUTH("r:") + USE_FEATURE_HTTPD_AUTH_MD5("m:") + USE_FEATURE_HTTPD_SETUID("u:") + "p:ifv", ++ &redirect_path, &redirect_host, + &configFile, &url_for_decode, &home_httpd USE_FEATURE_HTTPD_ENCODE_URL_STR(, &url_for_encode) - USE_FEATURE_HTTPD_BASIC_AUTH(, &(config->realm)) + USE_FEATURE_HTTPD_BASIC_AUTH(, &g_realm) diff --git a/package/busybox/patches/360-awk_multi_f.patch b/package/busybox/patches/360-awk_multi_f.patch new file mode 100644 index 0000000..8f738a6 --- /dev/null +++ b/package/busybox/patches/360-awk_multi_f.patch @@ -0,0 +1,72 @@ +Index: busybox-1.7.2/editors/awk.c +=================================================================== +--- busybox-1.7.2.orig/editors/awk.c 2007-10-04 19:57:46.859742242 +0200 ++++ busybox-1.7.2/editors/awk.c 2007-10-05 02:20:02.910793305 +0200 +@@ -2757,6 +2757,7 @@ + { + unsigned opt; + char *opt_F, *opt_W; ++ llist_t *opt_f = NULL; + llist_t *opt_v = NULL; + int i, j, flen; + var *v; +@@ -2816,8 +2817,8 @@ + *s1 = '='; + } + } +- opt_complementary = "v::"; +- opt = getopt32(argv, "F:v:f:W:", &opt_F, &opt_v, &g_progname, &opt_W); ++ opt_complementary = "v::f::"; ++ opt = getopt32(argv, "F:v:f:W:", &opt_F, &opt_v, &opt_f, &opt_W); + argv += optind; + argc -= optind; + if (opt & 0x1) +@@ -2826,25 +2827,31 @@ + if (!is_assignment(llist_pop(&opt_v))) + bb_show_usage(); + } +- if (opt & 0x4) { // -f +- char *s = s; /* die, gcc, die */ +- FILE *from_file = afopen(g_progname, "r"); +- /* one byte is reserved for some trick in next_token */ +- if (fseek(from_file, 0, SEEK_END) == 0) { +- flen = ftell(from_file); +- s = xmalloc(flen + 4); +- fseek(from_file, 0, SEEK_SET); +- i = 1 + fread(s + 1, 1, flen, from_file); +- } else { +- for (i = j = 1; j > 0; i += j) { +- s = xrealloc(s, i + 4096); +- j = fread(s + i, 1, 4094, from_file); ++ if (opt_f != NULL) { // -f ++ while (opt_f != NULL) { ++ char *s = NULL; ++ FILE *from_file; ++ ++ g_progname = opt_f->data; ++ from_file = afopen(g_progname, "r"); ++ /* one byte is reserved for some trick in next_token */ ++ if (fseek(from_file, 0, SEEK_END) == 0) { ++ flen = ftell(from_file); ++ s = xmalloc(flen + 4); ++ fseek(from_file, 0, SEEK_SET); ++ i = 1 + fread(s + 1, 1, flen, from_file); ++ } else { ++ for (i = j = 1; j > 0; i += j) { ++ s = xrealloc(s, i + 4096); ++ j = fread(s + i, 1, 4094, from_file); ++ } + } ++ s[i] = '\0'; ++ fclose(from_file); ++ parse_program(s + 1); ++ free(s); ++ opt_f = opt_f->link; + } +- s[i] = '\0'; +- fclose(from_file); +- parse_program(s + 1); +- free(s); + } else { // no -f: take program from 1st parameter + if (!argc) + bb_show_usage(); diff --git a/package/busybox/patches/400-revert_awk_getopt.patch b/package/busybox/patches/400-revert_awk_getopt.patch deleted file mode 100644 index 33c6790..0000000 --- a/package/busybox/patches/400-revert_awk_getopt.patch +++ /dev/null @@ -1,103 +0,0 @@ -Index: busybox-1.4.2/editors/awk.c -=================================================================== ---- busybox-1.4.2.orig/editors/awk.c 2007-06-15 23:43:26.460690280 +0200 -+++ busybox-1.4.2/editors/awk.c 2007-06-15 23:45:26.283474448 +0200 -@@ -2639,14 +2639,13 @@ - - int awk_main(int argc, char **argv) - { -- unsigned opt; -- char *opt_F, *opt_v, *opt_W; - int i, j, flen; - var *v; - var tv; - char **envp; - char *vnames = (char *)vNames; /* cheat */ - char *vvalues = (char *)vValues; -+ int c; - - /* Undo busybox.c, or else strtod may eat ','! This breaks parsing: - * $1,$2 == '$1,' '$2', NOT '$1' ',' '$2' */ -@@ -2694,40 +2693,56 @@ - free(s); - } - -- opt = getopt32(argc, argv, "F:v:f:W:", &opt_F, &opt_v, &programname, &opt_W); -- argv += optind; -- argc -= optind; -- if (opt & 0x1) setvar_s(V[FS], opt_F); // -F -- if (opt & 0x2) if (!is_assignment(opt_v)) bb_show_usage(); // -v -- if (opt & 0x4) { // -f -- char *s = s; /* die, gcc, die */ -- FILE *from_file = afopen(programname, "r"); -- /* one byte is reserved for some trick in next_token */ -- if (fseek(from_file, 0, SEEK_END) == 0) { -- flen = ftell(from_file); -- s = xmalloc(flen + 4); -- fseek(from_file, 0, SEEK_SET); -- i = 1 + fread(s + 1, 1, flen, from_file); -- } else { -- for (i = j = 1; j > 0; i += j) { -- s = xrealloc(s, i + 4096); -- j = fread(s + i, 1, 4094, from_file); -+ programname = NULL; -+ while((c = getopt(argc, argv, "F:v:f:W:")) != EOF) { -+ switch (c) { -+ case 'F': -+ setvar_s(V[FS], optarg); -+ break; -+ case 'v': -+ if (! is_assignment(optarg)) -+ bb_show_usage(); -+ break; -+ case 'f': { -+ FILE *F = afopen(programname = optarg, "r"); -+ char *s = NULL; -+ /* one byte is reserved for some trick in next_token */ -+ if (fseek(F, 0, SEEK_END) == 0) { -+ flen = ftell(F); -+ s = (char *)xmalloc(flen+4); -+ fseek(F, 0, SEEK_SET); -+ i = 1 + fread(s+1, 1, flen, F); -+ } else { -+ for (i=j=1; j>0; i+=j) { -+ s = (char *)xrealloc(s, i+4096); -+ j = fread(s+i, 1, 4094, F); -+ } -+ } -+ s[i] = '\0'; -+ fclose(F); -+ parse_program(s+1); -+ free(s); -+ break; - } -+ case 'W': -+ bb_error_msg("Warning: unrecognized option '-W %s' ignored\n", optarg); -+ break; -+ -+ default: -+ bb_show_usage(); - } -- s[i] = '\0'; -- fclose(from_file); -- parse_program(s + 1); -- free(s); -- } else { // no -f: take program from 1st parameter -+ } -+ argc -= optind; -+ argv += optind; -+ -+ if (!programname) { - if (!argc) - bb_show_usage(); - programname = "cmd. line"; - parse_program(*argv++); - argc--; - } -- if (opt & 0x8) // -W -- bb_error_msg("warning: unrecognized option '-W %s' ignored", opt_W); -- -+ - /* fill in ARGV array */ - setvar_i(V[ARGC], argc + 1); - setari_u(V[ARGV], 0, "awk"); diff --git a/package/busybox/patches/401-darwin_includes.patch b/package/busybox/patches/401-darwin_includes.patch index f563e10..6506f27 100644 --- a/package/busybox/patches/401-darwin_includes.patch +++ b/package/busybox/patches/401-darwin_includes.patch @@ -1,8 +1,8 @@ -Index: busybox-1.4.2/include/platform.h +Index: busybox-1.7.2/include/platform.h =================================================================== ---- busybox-1.4.2.orig/include/platform.h 2007-06-04 13:21:32.055103552 +0200 -+++ busybox-1.4.2/include/platform.h 2007-06-04 13:21:35.387596936 +0200 -@@ -128,9 +128,11 @@ +--- busybox-1.7.2.orig/include/platform.h 2007-09-03 13:48:46.000000000 +0200 ++++ busybox-1.7.2/include/platform.h 2007-10-04 15:20:58.301274440 +0200 +@@ -137,9 +137,11 @@ # include <netinet/in.h> #endif @@ -14,30 +14,20 @@ Index: busybox-1.4.2/include/platform.h /* ---- Compiler dependent settings ------------------------- */ #if (defined __digital__ && defined __unix__) -@@ -161,7 +163,7 @@ +@@ -179,7 +181,7 @@ #define HAVE_STDINT_H #else /* Largest integral types. */ -#if __BIG_ENDIAN__ +#if __BIG_ENDIAN__ && !__APPLE__ - typedef long int intmax_t; - typedef unsigned long int uintmax_t; + typedef long intmax_t; + typedef unsigned long uintmax_t; #else -Index: busybox-1.4.2/include/libbb.h +Index: busybox-1.7.2/include/libbb.h =================================================================== ---- busybox-1.4.2.orig/include/libbb.h 2007-06-04 13:21:32.062102488 +0200 -+++ busybox-1.4.2/include/libbb.h 2007-06-04 13:21:35.388596784 +0200 -@@ -17,7 +17,9 @@ - #include <errno.h> - #include <fcntl.h> - #include <inttypes.h> -+#ifndef __APPLE__ - #include <malloc.h> -+#endif - #include <netdb.h> - #include <setjmp.h> - #include <signal.h> -@@ -30,7 +32,9 @@ +--- busybox-1.7.2.orig/include/libbb.h 2007-09-16 20:48:10.000000000 +0200 ++++ busybox-1.7.2/include/libbb.h 2007-10-04 15:20:22.275221430 +0200 +@@ -31,7 +31,9 @@ #include <sys/mman.h> #include <sys/socket.h> #include <sys/stat.h> diff --git a/package/busybox/patches/410-httpd_cgi_headers.patch b/package/busybox/patches/410-httpd_cgi_headers.patch index 98f094e..cfbbed6 100644 --- a/package/busybox/patches/410-httpd_cgi_headers.patch +++ b/package/busybox/patches/410-httpd_cgi_headers.patch @@ -1,26 +1,18 @@ -Index: busybox-1.4.2/networking/httpd.c +Index: busybox-1.7.2/networking/httpd.c =================================================================== ---- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:35.006654848 +0200 -+++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:35.585566840 +0200 -@@ -1231,7 +1231,7 @@ - * "chopped up into small chunks" syndrome here */ - rbuf[count] = '\0'; - /* check to see if the user script added headers */ --#define HTTP_200 "HTTP/1.0 200 OK\r\n\r\n" -+#define HTTP_200 "HTTP/1.0 200 OK\r\n" - if (memcmp(rbuf, HTTP_200, 4) != 0) { - /* there is no "HTTP", do it ourself */ - full_write(s, HTTP_200, sizeof(HTTP_200)-1); -@@ -1242,9 +1242,9 @@ - * echo -en "Location: http://www.busybox.net\r\n" - * echo -en "\r\n" - */ -- //if (!strstr(rbuf, "ontent-")) { -- // full_write(s, "Content-type: text/plain\r\n\r\n", 28); -- //} -+ if (!strstr(rbuf, "ontent-")) { -+ full_write(s, "Content-type: text/plain\r\n\r\n", 28); -+ } - firstLine = 0; - } - if (full_write(s, rbuf, count) != count) +--- busybox-1.7.2.orig/networking/httpd.c 2007-10-04 15:06:51.993046080 +0200 ++++ busybox-1.7.2/networking/httpd.c 2007-10-04 15:25:10.815664410 +0200 +@@ -1314,10 +1314,10 @@ + if (full_write(1, HTTP_200, sizeof(HTTP_200)-1) != sizeof(HTTP_200)-1) + break; + } +- /* Commented out: +- if (!strstr(rbuf, "ontent-")) { +- full_write(s, "Content-type: text/plain\r\n\r\n", 28); ++ if (!strstr(rbuf, "ontent-") && !strstr(rbuf, "ocation:")) { ++ full_write(1, "Content-type: text/plain\r\n\r\n", 28); + } ++ /* Previously commented out: + * Counter-example of valid CGI without Content-type: + * echo -en "HTTP/1.0 302 Found\r\n" + * echo -en "Location: http://www.busybox.net\r\n" diff --git a/package/busybox/patches/420-httpd_sendcgi_fix.patch b/package/busybox/patches/420-httpd_sendcgi_fix.patch deleted file mode 100644 index 9998cc2..0000000 --- a/package/busybox/patches/420-httpd_sendcgi_fix.patch +++ /dev/null @@ -1,18 +0,0 @@ -Index: busybox-1.4.2/networking/httpd.c -=================================================================== ---- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:35.585566840 +0200 -+++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:35.775537960 +0200 -@@ -1218,9 +1218,10 @@ - #if PIPESIZE >= MAX_MEMORY_BUFF - # error "PIPESIZE >= MAX_MEMORY_BUFF" - #endif -- /* NB: was safe_read. If it *has to be* safe_read, */ -- /* please explain why in this comment... */ -- count = full_read(inFd, rbuf, PIPESIZE); -+ /* reverted back to safe_read, otherwise httpd may block if the */ -+ /* cgi-script outputs page date before it has fully received all */ -+ /* (eg POST) data */ -+ count = safe_read(inFd, rbuf, PIPESIZE); - if (count == 0) - break; /* closed */ - if (count < 0) diff --git a/package/busybox/patches/440-httpd_chdir.patch b/package/busybox/patches/440-httpd_chdir.patch index 8ef70b8..b3eb308 100644 --- a/package/busybox/patches/440-httpd_chdir.patch +++ b/package/busybox/patches/440-httpd_chdir.patch @@ -1,29 +1,12 @@ -Index: busybox-1.4.2/networking/httpd.c +Index: busybox-1.7.2/networking/httpd.c =================================================================== ---- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:35.775537960 +0200 -+++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:36.144481872 +0200 -@@ -102,6 +102,7 @@ - static const char default_path_httpd_conf[] = "/etc"; - static const char httpd_conf[] = "httpd.conf"; - static const char home[] = "./"; -+static const char *home_httpd = home; - - #define TIMEOUT 60 - -@@ -1505,6 +1506,8 @@ +--- busybox-1.7.2.orig/networking/httpd.c 2007-10-04 15:25:10.815664410 +0200 ++++ busybox-1.7.2/networking/httpd.c 2007-10-04 15:31:22.936870392 +0200 +@@ -1616,6 +1616,7 @@ #if ENABLE_FEATURE_HTTPD_BASIC_AUTH int credentials = -1; /* if not required this is Ok */ #endif -+ + xchdir(home_httpd); - sa.sa_handler = handle_sigalrm; - sigemptyset(&sa.sa_mask); -@@ -1942,7 +1945,6 @@ - int httpd_main(int argc, char *argv[]) - { - unsigned opt; -- const char *home_httpd = home; - char *url_for_decode; - USE_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;) - const char *s_port; + /* Allocation of iobuf is postponed until now + * (IOW, server process doesn't need to waste 8k) */ diff --git a/package/busybox/patches/440-usage_compressed_fix.patch b/package/busybox/patches/440-usage_compressed_fix.patch deleted file mode 100644 index c9e29ce..0000000 --- a/package/busybox/patches/440-usage_compressed_fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: busybox-1.4.2/applets/usage_compressed -=================================================================== ---- busybox-1.4.2.orig/applets/usage_compressed 2007-06-04 13:21:31.952119208 +0200 -+++ busybox-1.4.2/applets/usage_compressed 2007-06-04 13:21:36.331453448 +0200 -@@ -14,6 +14,6 @@ - - echo 'static const char packed_usage[] = ' - "$loc/usage" | bzip2 -1 | od -v -t x1 \ --| $SED -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' -+| $SED -e 's/^[^ ]*//' -e 's/ \([a-f0-9][a-f0-9]\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' - echo ';' - echo '#define SIZEOF_usage_messages' `expr 0 + $sz` diff --git a/package/busybox/patches/450-truncated_ping_results.patch b/package/busybox/patches/450-truncated_ping_results.patch deleted file mode 100644 index 34582c2..0000000 --- a/package/busybox/patches/450-truncated_ping_results.patch +++ /dev/null @@ -1,33 +0,0 @@ -Index: busybox-1.4.2/networking/ping.c -=================================================================== ---- busybox-1.4.2.orig/networking/ping.c 2007-06-04 13:21:31.931122400 +0200 -+++ busybox-1.4.2/networking/ping.c 2007-06-04 13:21:36.518425024 +0200 -@@ -70,7 +70,7 @@ - struct sockaddr_in pingaddr; - struct icmp *pkt; - int pingsock, c; -- char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN]; -+ char packet[datalen + ICMP_MINLEN + MAXIPLEN + MAXICMPLEN]; - - pingsock = create_icmp_socket(); - -@@ -86,7 +86,7 @@ - pkt->icmp_type = ICMP_ECHO; - pkt->icmp_cksum = in_cksum((unsigned short *) pkt, sizeof(packet)); - -- c = sendto(pingsock, packet, DEFDATALEN + ICMP_MINLEN, 0, -+ c = sendto(pingsock, packet, datalen + ICMP_MINLEN, 0, - (struct sockaddr *) &pingaddr, sizeof(struct sockaddr_in)); - - if (c < 0) { -@@ -274,6 +274,10 @@ - ++nreceived; - tp = (struct timeval *) icmppkt->icmp_data; - -+ /* If packet is too short, results will be truncated */ -+ if (sz < (ICMP_MINLEN + sizeof(tv.tv_sec) + sizeof(tv.tv_usec))) -+ return; -+ - if ((tv.tv_usec -= tp->tv_usec) < 0) { - --tv.tv_sec; - tv.tv_usec += 1000000; diff --git a/package/busybox/patches/450-usage_compressed_fix.patch b/package/busybox/patches/450-usage_compressed_fix.patch new file mode 100644 index 0000000..3a9d2ad --- /dev/null +++ b/package/busybox/patches/450-usage_compressed_fix.patch @@ -0,0 +1,12 @@ +Index: busybox-1.7.2/applets/usage_compressed +=================================================================== +--- busybox-1.7.2.orig/applets/usage_compressed 2007-09-03 13:48:55.000000000 +0200 ++++ busybox-1.7.2/applets/usage_compressed 2007-10-04 15:32:54.578092727 +0200 +@@ -14,6 +14,6 @@ + + echo 'static const char packed_usage[] ALIGN1 = ' + "$loc/usage" | bzip2 -1 | od -v -t x1 \ +-| $SED -e 's/^[^ ]*//' -e 's/ *\(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' ++| $SED -e 's/^[^ ]*//' -e 's/ *\([a-f0-9][a-f0-9]\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/' + echo ';' + echo '#define SIZEOF_usage_messages' `expr 0 + $sz` diff --git a/package/busybox/patches/460-httpd_cgi_bin.patch b/package/busybox/patches/460-httpd_cgi_bin.patch deleted file mode 100644 index d21c518..0000000 --- a/package/busybox/patches/460-httpd_cgi_bin.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: busybox-1.4.2/networking/httpd.c -=================================================================== ---- busybox-1.4.2.orig/networking/httpd.c 2007-06-21 18:12:06.791080496 +0200 -+++ busybox-1.4.2/networking/httpd.c 2007-06-21 18:14:48.914434000 +0200 -@@ -1715,8 +1715,8 @@ - test = url + 1; /* skip first '/' */ - - #if ENABLE_FEATURE_HTTPD_CGI -- if (strncmp(test, "cgi-bin", 7) == 0) { -- if (test[7] == '/' && test[8] == 0) -+ if (strncmp(test, "cgi-bin/", 8) == 0) { -+ if (test[8] == 0) - goto FORBIDDEN; /* protect listing cgi-bin/ */ - sendCgi(url, prequest, length, cookie, content_type); - break; diff --git a/package/busybox/patches/460-truncated_ping_results.patch b/package/busybox/patches/460-truncated_ping_results.patch new file mode 100644 index 0000000..e655acf --- /dev/null +++ b/package/busybox/patches/460-truncated_ping_results.patch @@ -0,0 +1,40 @@ +Index: busybox-1.7.2/networking/ping.c +=================================================================== +--- busybox-1.7.2.orig/networking/ping.c 2007-09-03 13:48:27.000000000 +0200 ++++ busybox-1.7.2/networking/ping.c 2007-10-04 15:38:15.424376713 +0200 +@@ -91,7 +91,7 @@ + struct sockaddr_in pingaddr; + struct icmp *pkt; + int pingsock, c; +- char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN]; ++ char packet[datalen + ICMP_MINLEN + MAXIPLEN + MAXICMPLEN]; + + pingsock = create_icmp_socket(); + pingaddr = lsa->sin; +@@ -101,7 +101,7 @@ + pkt->icmp_type = ICMP_ECHO; + pkt->icmp_cksum = in_cksum((unsigned short *) pkt, sizeof(packet)); + +- c = xsendto(pingsock, packet, DEFDATALEN + ICMP_MINLEN, ++ c = xsendto(pingsock, packet, datalen + ICMP_MINLEN, + (struct sockaddr *) &pingaddr, sizeof(pingaddr)); + + /* listen for replies */ +@@ -135,7 +135,7 @@ + struct icmp6_hdr *pkt; + int pingsock, c; + int sockopt; +- char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN]; ++ char packet[datalen + ICMP_MINLEN + MAXIPLEN + MAXICMPLEN]; + + pingsock = create_icmp6_socket(); + pingaddr = lsa->sin6; +@@ -147,7 +147,7 @@ + sockopt = offsetof(struct icmp6_hdr, icmp6_cksum); + setsockopt(pingsock, SOL_RAW, IPV6_CHECKSUM, &sockopt, sizeof(sockopt)); + +- c = xsendto(pingsock, packet, DEFDATALEN + sizeof (struct icmp6_hdr), ++ c = xsendto(pingsock, packet, datalen + sizeof (struct icmp6_hdr), + (struct sockaddr *) &pingaddr, sizeof(pingaddr)); + + /* listen for replies */ diff --git a/package/busybox/patches/470-insmod_search.patch b/package/busybox/patches/470-insmod_search.patch new file mode 100644 index 0000000..26c5650 --- /dev/null +++ b/package/busybox/patches/470-insmod_search.patch @@ -0,0 +1,488 @@ +Index: busybox-1.7.2/modutils/insmod.c +=================================================================== +--- busybox-1.7.2.orig/modutils/insmod.c 2007-09-03 13:48:35.000000000 +0200 ++++ busybox-1.7.2/modutils/insmod.c 2007-10-05 01:43:47.686834357 +0200 +@@ -61,19 +61,107 @@ + #include "libbb.h" + #include <libgen.h> + #include <sys/utsname.h> ++#if ENABLE_FEATURE_2_6_MODULES ++#include <sys/mman.h> ++#include <asm/unistd.h> ++#include <sys/syscall.h> ++#endif + + #if !ENABLE_FEATURE_2_4_MODULES && !ENABLE_FEATURE_2_6_MODULES + #undef ENABLE_FEATURE_2_4_MODULES + #define ENABLE_FEATURE_2_4_MODULES 1 + #endif + +-#if !ENABLE_FEATURE_2_4_MODULES +-#define insmod_ng_main insmod_main ++#if ENABLE_FEATURE_2_4_MODULES ++int insmod_main_24(int argc, char **argv); + #endif +- + #if ENABLE_FEATURE_2_6_MODULES +-extern int insmod_ng_main( int argc, char **argv); ++int insmod_main_26(int argc, char **argv); + #endif ++int insmod_main(int argc, char **argv); ++ ++static char *g_filename = NULL; ++#define _PATH_MODULES "/lib/modules" ++ ++static int check_module_name_match(const char *filename, struct stat *statbuf, ++ void *userdata, int depth) ++{ ++ char *fullname = (char *) userdata; ++ ++ if (fullname[0] == '\0') ++ return FALSE; ++ else { ++ char *tmp, *tmp1 = xstrdup(filename); ++ tmp = bb_get_last_path_component(tmp1); ++ if (strcmp(tmp, fullname) == 0) { ++ free(tmp1); ++ /* Stop searching if we find a match */ ++ g_filename = xstrdup(filename); ++ return FALSE; ++ } ++ free(tmp1); ++ } ++ return TRUE; ++} ++ ++static int find_module(char *filename) ++{ ++ char *module_dir, real_module_dir[FILENAME_MAX]; ++ int len, slen, ret = ENOENT, k_version; ++ struct utsname myuname; ++ const char *suffix; ++ struct stat st; ++ ++ /* check the kernel version */ ++ if ((uname(&myuname) != 0) || (myuname.release[0] != '2')) ++ return EINVAL; ++ ++ k_version = myuname.release[2] - '0'; ++#if ENABLE_FEATURE_2_4_MODULES ++ if (k_version <= 4) ++ suffix = ".o"; ++ else ++#endif ++ suffix = ".ko"; ++ ++ len = strlen(filename); ++ slen = strlen(suffix); ++ ++ /* check for suffix and absolute path first */ ++ if ((len < slen + 2) || (strcmp(filename + len - slen, suffix) != 0)) { ++ filename = xasprintf("%s%s", filename, suffix); ++ } else { ++ filename = strdup(filename); ++ if ((stat(filename, &st) == 0) && S_ISREG(st.st_mode)) ++ return 0; ++ } ++ ++ /* next: scan /lib/modules/<release> */ ++ /* Jump through hoops in case /lib/modules/`uname -r` ++ * is a symlink. We do not want recursive_action to ++ * follow symlinks, but we do want to follow the ++ * /lib/modules/`uname -r` dir, So resolve it ourselves ++ * if it is a link... */ ++ module_dir = concat_path_file(_PATH_MODULES, myuname.release); ++ if (realpath(module_dir, real_module_dir) != NULL) { ++ free(module_dir); ++ module_dir = real_module_dir; ++ } ++ ++ recursive_action(module_dir, ACTION_RECURSE, ++ check_module_name_match, 0, filename, 0); ++ ++ /* Check if we have a complete path */ ++ if (g_filename != NULL) { ++ if ((stat(g_filename, &st) == 0) && S_ISREG(st.st_mode)) ++ ret = 0; ++ else ++ free(g_filename); ++ } ++ free(filename); ++ ++ return ret; ++} + + + #if ENABLE_FEATURE_2_4_MODULES +@@ -677,7 +765,6 @@ + #endif + + +-#define _PATH_MODULES "/lib/modules" + enum { STRVERSIONLEN = 64 }; + + /*======================================================================*/ +@@ -790,37 +877,6 @@ + static int n_ext_modules_used; + extern int delete_module(const char *); + +-static char *m_filename; +-static char *m_fullName; +- +- +-/*======================================================================*/ +- +- +-static int check_module_name_match(const char *filename, struct stat *statbuf, +- void *userdata, int depth) +-{ +- char *fullname = (char *) userdata; +- +- if (fullname[0] == '\0') +- return FALSE; +- else { +- char *tmp, *tmp1 = xstrdup(filename); +- tmp = bb_get_last_path_component(tmp1); +- if (strcmp(tmp, fullname) == 0) { +- free(tmp1); +- /* Stop searching if we find a match */ +- m_filename = xstrdup(filename); +- return FALSE; +- } +- free(tmp1); +- } +- return TRUE; +-} +- +- +-/*======================================================================*/ +- + static struct obj_file *arch_new_file(void) + { + struct arch_file *f; +@@ -3952,33 +4008,35 @@ + void print_load_map(struct obj_file *f); + #endif + +-int insmod_main( int argc, char **argv); +-int insmod_main( int argc, char **argv) ++int insmod_main_24( int argc, char **argv) + { + char *opt_o, *arg1; + int len; + int k_crcs; +- char *tmp, *tmp1; + unsigned long m_size; + ElfW(Addr) m_addr; + struct obj_file *f; + struct stat st; + char *m_name = 0; +- int exit_status = EXIT_FAILURE; ++ int ret = EINVAL; + int m_has_modinfo; + #if ENABLE_FEATURE_INSMOD_VERSION_CHECKING + struct utsname uts_info; + char m_strversion[STRVERSIONLEN]; + int m_version, m_crcs; + #endif +-#if ENABLE_FEATURE_CLEAN_UP +- FILE *fp = 0; +-#else +- FILE *fp; +-#endif +- int k_version = 0; ++ FILE *fp = NULL; ++ int k_version; + struct utsname myuname; + ++ /* check the kernel version */ ++ if ((uname(&myuname) != 0) || (myuname.release[0] != '2')) ++ return EINVAL; ++ ++ k_version = myuname.release[2] - '0'; ++ if (k_version > 4) ++ return ENOTSUP; ++ + /* Parse any options */ + getopt32(argv, OPTION_STR, &opt_o); + arg1 = argv[optind]; +@@ -3987,110 +4045,18 @@ + m_name = xstrdup(opt_o); + } + +- if (arg1 == NULL) { ++ if (arg1 == NULL) + bb_show_usage(); +- } +- +- /* Grab the module name */ +- tmp1 = xstrdup(arg1); +- tmp = basename(tmp1); +- len = strlen(tmp); +- +- if (uname(&myuname) == 0) { +- if (myuname.release[0] == '2') { +- k_version = myuname.release[2] - '0'; +- } +- } +- +-#if ENABLE_FEATURE_2_6_MODULES +- if (k_version > 4 && len > 3 && tmp[len - 3] == '.' +- && tmp[len - 2] == 'k' && tmp[len - 1] == 'o' +- ) { +- len -= 3; +- tmp[len] = '\0'; +- } else +-#endif +- if (len > 2 && tmp[len - 2] == '.' && tmp[len - 1] == 'o') { +- len -= 2; +- tmp[len] = '\0'; +- } +- +- +-#if ENABLE_FEATURE_2_6_MODULES +- if (k_version > 4) +- m_fullName = xasprintf("%s.ko", tmp); +- else +-#endif +- m_fullName = xasprintf("%s.o", tmp); + +- if (!m_name) { +- m_name = tmp; +- } else { +- free(tmp1); +- tmp1 = 0; /* flag for free(m_name) before exit() */ +- } +- +- /* Get a filedesc for the module. Check we we have a complete path */ +- if (stat(arg1, &st) < 0 || !S_ISREG(st.st_mode) +- || (fp = fopen(arg1, "r")) == NULL +- ) { +- /* Hmm. Could not open it. First search under /lib/modules/`uname -r`, +- * but do not error out yet if we fail to find it... */ +- if (k_version) { /* uname succeedd */ +- char *module_dir; +- char *tmdn; +- char real_module_dir[FILENAME_MAX]; +- +- tmdn = concat_path_file(_PATH_MODULES, myuname.release); +- /* Jump through hoops in case /lib/modules/`uname -r` +- * is a symlink. We do not want recursive_action to +- * follow symlinks, but we do want to follow the +- * /lib/modules/`uname -r` dir, So resolve it ourselves +- * if it is a link... */ +- if (realpath(tmdn, real_module_dir) == NULL) +- module_dir = tmdn; +- else +- module_dir = real_module_dir; +- recursive_action(module_dir, ACTION_RECURSE, +- check_module_name_match, 0, m_fullName, 0); +- free(tmdn); +- } +- +- /* Check if we have found anything yet */ +- if (m_filename == 0 || ((fp = fopen(m_filename, "r")) == NULL)) { +- char module_dir[FILENAME_MAX]; +- +- free(m_filename); +- m_filename = 0; +- if (realpath (_PATH_MODULES, module_dir) == NULL) +- strcpy(module_dir, _PATH_MODULES); +- /* No module found under /lib/modules/`uname -r`, this +- * time cast the net a bit wider. Search /lib/modules/ */ +- if (!recursive_action(module_dir, ACTION_RECURSE, +- check_module_name_match, 0, m_fullName, 0) +- ) { +- if (m_filename == 0 +- || ((fp = fopen(m_filename, "r")) == NULL) +- ) { +- bb_error_msg("%s: no module by that name found", m_fullName); +- goto out; +- } +- } else +- bb_error_msg_and_die("%s: no module by that name found", m_fullName); +- } +- } else +- m_filename = xstrdup(arg1); +- +- if (flag_verbose) +- printf("Using %s\n", m_filename); ++ ret = find_module(arg1); ++ if (ret) ++ goto out; + +-#if ENABLE_FEATURE_2_6_MODULES +- if (k_version > 4) { +- argv[optind] = m_filename; +- optind--; +- return insmod_ng_main(argc - optind, argv + optind); ++ fp = fopen(g_filename, "r"); ++ if (!fp) { ++ ret = errno; ++ goto out; + } +-#endif + + f = obj_load(fp, LOADBITS); + if (f == NULL) +@@ -4120,7 +4086,7 @@ + "\t%s was compiled for kernel version %s\n" + "\twhile this kernel is version %s", + flag_force_load ? "warning: " : "", +- m_filename, m_strversion, uts_info.release); ++ g_filename, m_strversion, uts_info.release); + if (!flag_force_load) + goto out; + } +@@ -4173,7 +4139,7 @@ + hide_special_symbols(f); + + #if ENABLE_FEATURE_INSMOD_KSYMOOPS_SYMBOLS +- add_ksymoops_symbols(f, m_filename, m_name); ++ add_ksymoops_symbols(f, g_filename, m_name); + #endif /* FEATURE_INSMOD_KSYMOOPS_SYMBOLS */ + + new_create_module_ksymtab(f); +@@ -4220,8 +4186,7 @@ + if (flag_print_load_map) + print_load_map(f); + +- exit_status = EXIT_SUCCESS; +- ++ ret = 0; + out: + #if ENABLE_FEATURE_CLEAN_UP + if (fp) +@@ -4229,21 +4194,13 @@ + free(tmp1); + if (!tmp1) + free(m_name); +- free(m_filename); ++ free(g_filename); + #endif + return exit_status; + } +- +- + #endif + +- + #if ENABLE_FEATURE_2_6_MODULES +- +-#include <sys/mman.h> +-#include <asm/unistd.h> +-#include <sys/syscall.h> +- + /* We use error numbers in a loose translation... */ + static const char *moderror(int err) + { +@@ -4261,19 +4218,33 @@ + } + } + +-int insmod_ng_main(int argc, char **argv); +-int insmod_ng_main(int argc, char **argv) ++int insmod_main_26(int argc, char **argv) + { +- long ret; +- size_t len; ++ char *filename, *options; ++ struct utsname myuname; ++ int k_version; + int optlen; ++ size_t len; + void *map; +- char *filename, *options; ++ long ret = 0; ++ ++ /* check the kernel version */ ++ if ((uname(&myuname) != 0) || (myuname.release[0] != '2')) ++ return EINVAL; ++ ++ k_version = myuname.release[2] - '0'; ++ if (k_version <= 4) ++ return ENOTSUP; + + filename = *++argv; + if (!filename) + bb_show_usage(); + ++ g_filename = filename; ++ ret = find_module(filename); ++ if (ret) ++ goto done; ++ + /* Rest is options */ + options = xzalloc(1); + optlen = 0; +@@ -4283,36 +4254,46 @@ + optlen += sprintf(options + optlen, (strchr(*argv,' ') ? "\"%s\" " : "%s "), *argv); + } + +-#if 0 +- /* Any special reason why mmap? It isn't performace critical... */ +- int fd; +- struct stat st; +- unsigned long len; +- fd = xopen(filename, O_RDONLY); +- fstat(fd, &st); +- len = st.st_size; +- map = mmap(NULL, len, PROT_READ, MAP_PRIVATE, fd, 0); +- if (map == MAP_FAILED) { +- bb_perror_msg_and_die("cannot mmap '%s'", filename); +- } +- +- /* map == NULL on Blackfin, probably on other MMU-less systems too. Workaround. */ +- if (map == NULL) { +- map = xmalloc(len); +- xread(fd, map, len); +- } +-#else + len = MAXINT(ssize_t); +- map = xmalloc_open_read_close(filename, &len); +-#endif +- ++ map = xmalloc_open_read_close(g_filename, &len); + ret = syscall(__NR_init_module, map, len, options); + if (ret != 0) { + bb_perror_msg_and_die("cannot insert '%s': %s (%li)", +- filename, moderror(errno), ret); ++ g_filename, moderror(errno), ret); + } ++done: ++ if (g_filename && (g_filename != filename)) ++ free(g_filename); + +- return 0; ++ return ret; + } + + #endif ++ ++int insmod_main(int argc, char **argv) ++{ ++ int ret; ++ ++#if ENABLE_FEATURE_2_6_MODULES ++ ret = insmod_main_26(argc, argv); ++ if (ret != ENOTSUP) ++ goto done; ++#endif ++ ++#if ENABLE_FEATURE_2_4_MODULES ++ ret = insmod_main_24(argc, argv); ++ if (ret != ENOTSUP) ++ goto done; ++#endif ++ ++ fprintf(stderr, "Error: Kernel version not supported\n"); ++ return 1; ++ ++done: ++ if (ret) { ++ errno = ret; ++ bb_perror_msg("Loading module failed"); ++ return ret; ++ } else ++ return 0; ++} diff --git a/package/busybox/patches/911-ipkg.patch b/package/busybox/patches/500-ipkg.patch index d96063b..a186162 100644 --- a/package/busybox/patches/911-ipkg.patch +++ b/package/busybox/patches/500-ipkg.patch @@ -1,8 +1,8 @@ -Index: busybox-1.4.2/archival/Config.in +Index: busybox-1.7.2/archival/Config.in =================================================================== ---- busybox-1.4.2.orig/archival/Config.in 2007-06-04 13:21:31.573176816 +0200 -+++ busybox-1.4.2/archival/Config.in 2007-06-04 13:21:36.706396448 +0200 -@@ -121,6 +121,14 @@ +--- busybox-1.7.2.orig/archival/Config.in 2007-10-04 17:12:34.094845964 +0200 ++++ busybox-1.7.2/archival/Config.in 2007-10-04 17:14:22.056998379 +0200 +@@ -121,6 +121,15 @@ gzip is used to compress files. It's probably the most widely used UNIX compression program. @@ -11,17 +11,18 @@ Index: busybox-1.4.2/archival/Config.in + default n + select MD5SUM + select WGET ++ select DIFF + help + ipkg is the itsy package management system. + config RPM2CPIO bool "rpm2cpio" default n -Index: busybox-1.4.2/archival/dpkg.c +Index: busybox-1.7.2/archival/dpkg.c =================================================================== ---- busybox-1.4.2.orig/archival/dpkg.c 2007-06-04 13:21:31.579175904 +0200 -+++ busybox-1.4.2/archival/dpkg.c 2007-06-04 13:21:36.706396448 +0200 -@@ -1463,6 +1463,10 @@ +--- busybox-1.7.2.orig/archival/dpkg.c 2007-10-04 17:12:34.102846422 +0200 ++++ busybox-1.7.2/archival/dpkg.c 2007-10-04 17:14:22.060998604 +0200 +@@ -1455,6 +1455,10 @@ return ar_handle->sub_archive->buffer; } @@ -32,8 +33,8 @@ Index: busybox-1.4.2/archival/dpkg.c static void data_extract_all_prefix(archive_handle_t *archive_handle) { char *name_ptr = archive_handle->file_header->name; -@@ -1475,6 +1479,8 @@ - return; +@@ -1466,6 +1470,8 @@ + } } +*/ @@ -41,10 +42,10 @@ Index: busybox-1.4.2/archival/dpkg.c static void unpack_package(deb_file_t *deb_file) { const char *package_name = name_hashtable[package_hashtable[deb_file->package]->name]; -Index: busybox-1.4.2/archival/ipkg.c +Index: busybox-1.7.2/archival/ipkg.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/ipkg.c 2007-06-04 13:21:36.707396296 +0200 ++++ busybox-1.7.2/archival/ipkg.c 2007-10-04 17:14:22.084999973 +0200 @@ -0,0 +1,26 @@ +/* ipkg.c - the itsy package management system + @@ -72,22 +73,22 @@ Index: busybox-1.4.2/archival/ipkg.c +{ + return ipkg_op(argc, argv); +} -Index: busybox-1.4.2/archival/Kbuild +Index: busybox-1.7.2/archival/Kbuild =================================================================== ---- busybox-1.4.2.orig/archival/Kbuild 2007-06-04 13:21:31.588174536 +0200 -+++ busybox-1.4.2/archival/Kbuild 2007-06-04 13:21:36.707396296 +0200 +--- busybox-1.7.2.orig/archival/Kbuild 2007-10-04 17:12:34.110846879 +0200 ++++ busybox-1.7.2/archival/Kbuild 2007-10-04 17:14:22.109001341 +0200 @@ -15,6 +15,7 @@ lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o - lib-$(CONFIG_GUNZIP) += gunzip.o - lib-$(CONFIG_GZIP) += gzip.o + lib-$(CONFIG_GUNZIP) += bbunzip.o + lib-$(CONFIG_GZIP) += gzip.o bbunzip.o +lib-$(CONFIG_IPKG) += ipkg.o lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o lib-$(CONFIG_RPM) += rpm.o lib-$(CONFIG_TAR) += tar.o -Index: busybox-1.4.2/archival/libipkg/args.c +Index: busybox-1.7.2/archival/libipkg/args.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/args.c 2007-06-04 13:21:36.707396296 +0200 ++++ busybox-1.7.2/archival/libipkg/args.c 2007-10-04 17:14:22.145003392 +0200 @@ -0,0 +1,242 @@ +/* args.c - parse command-line args + @@ -331,10 +332,10 @@ Index: busybox-1.4.2/archival/libipkg/args.c +{ + bb_error_msg("version %s\n", IPKG_VERSION); +} -Index: busybox-1.4.2/archival/libipkg/args.h +Index: busybox-1.7.2/archival/libipkg/args.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/args.h 2007-06-04 13:21:36.707396296 +0200 ++++ busybox-1.7.2/archival/libipkg/args.h 2007-10-04 17:14:22.173004992 +0200 @@ -0,0 +1,72 @@ +/* args.h - parse command-line args + @@ -408,10 +409,10 @@ Index: busybox-1.4.2/archival/libipkg/args.h +void args_usage(char *complaint); + +#endif -Index: busybox-1.4.2/archival/libipkg/conffile.c +Index: busybox-1.7.2/archival/libipkg/conffile.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/conffile.c 2007-06-04 13:21:36.708396144 +0200 ++++ busybox-1.7.2/archival/libipkg/conffile.c 2007-10-04 17:14:22.249009320 +0200 @@ -0,0 +1,64 @@ +/* conffile.c - the itsy package management system + @@ -477,10 +478,10 @@ Index: busybox-1.4.2/archival/libipkg/conffile.c + + return ret; +} -Index: busybox-1.4.2/archival/libipkg/conffile.h +Index: busybox-1.7.2/archival/libipkg/conffile.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/conffile.h 2007-06-04 13:21:36.708396144 +0200 ++++ busybox-1.7.2/archival/libipkg/conffile.h 2007-10-04 17:14:22.277010917 +0200 @@ -0,0 +1,30 @@ +/* conffile.h - the itsy package management system + @@ -512,10 +513,10 @@ Index: busybox-1.4.2/archival/libipkg/conffile.h + +#endif + -Index: busybox-1.4.2/archival/libipkg/conffile_list.c +Index: busybox-1.7.2/archival/libipkg/conffile_list.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/conffile_list.c 2007-06-04 13:21:36.708396144 +0200 ++++ busybox-1.7.2/archival/libipkg/conffile_list.c 2007-10-04 17:14:22.301012282 +0200 @@ -0,0 +1,47 @@ +/* conffile_list.c - the itsy package management system + @@ -564,10 +565,10 @@ Index: busybox-1.4.2/archival/libipkg/conffile_list.c + return nv_pair_list_pop(list); +} + -Index: busybox-1.4.2/archival/libipkg/conffile_list.h +Index: busybox-1.7.2/archival/libipkg/conffile_list.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/conffile_list.h 2007-06-04 13:21:36.708396144 +0200 ++++ busybox-1.7.2/archival/libipkg/conffile_list.h 2007-10-04 17:14:22.325013650 +0200 @@ -0,0 +1,36 @@ +/* conffile_list.h - the itsy package management system + @@ -605,10 +606,10 @@ Index: busybox-1.4.2/archival/libipkg/conffile_list.h + +#endif + -Index: busybox-1.4.2/archival/libipkg/file_util.c +Index: busybox-1.7.2/archival/libipkg/file_util.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/file_util.c 2007-06-04 13:21:36.708396144 +0200 ++++ busybox-1.7.2/archival/libipkg/file_util.c 2007-10-04 17:14:22.353015250 +0200 @@ -0,0 +1,132 @@ +/* file_util.c - convenience routines for common stat operations + @@ -742,10 +743,10 @@ Index: busybox-1.4.2/archival/libipkg/file_util.c + return hash_file(file_name, HASH_MD5); +} + -Index: busybox-1.4.2/archival/libipkg/file_util.h +Index: busybox-1.7.2/archival/libipkg/file_util.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/file_util.h 2007-06-04 13:21:36.708396144 +0200 ++++ busybox-1.7.2/archival/libipkg/file_util.h 2007-10-04 17:14:22.377016616 +0200 @@ -0,0 +1,29 @@ +/* file_util.h - convenience routines for common file operations + @@ -776,10 +777,10 @@ Index: busybox-1.4.2/archival/libipkg/file_util.h +char *file_md5sum_alloc(const char *file_name); + +#endif -Index: busybox-1.4.2/archival/libipkg/hash_table.c +Index: busybox-1.7.2/archival/libipkg/hash_table.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/hash_table.c 2007-06-04 13:21:36.709395992 +0200 ++++ busybox-1.7.2/archival/libipkg/hash_table.c 2007-10-04 17:14:22.397017756 +0200 @@ -0,0 +1,155 @@ +/* hash.c - hash tables for ipkg + @@ -936,10 +937,10 @@ Index: busybox-1.4.2/archival/libipkg/hash_table.c + } +} + -Index: busybox-1.4.2/archival/libipkg/hash_table.h +Index: busybox-1.7.2/archival/libipkg/hash_table.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/hash_table.h 2007-06-04 13:21:36.709395992 +0200 ++++ busybox-1.7.2/archival/libipkg/hash_table.h 2007-10-04 17:14:22.425019349 +0200 @@ -0,0 +1,44 @@ +/* hash.h - hash tables for ipkg + @@ -985,10 +986,10 @@ Index: busybox-1.4.2/archival/libipkg/hash_table.h +void hash_table_foreach(hash_table_t *hash, void (*f)(const char *key, void *entry, void *data), void *data); + +#endif /* _HASH_TABLE_H_ */ -Index: busybox-1.4.2/archival/libipkg/ipkg_cmd.c +Index: busybox-1.7.2/archival/libipkg/ipkg_cmd.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_cmd.c 2007-06-04 13:21:36.710395840 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_cmd.c 2007-10-04 17:14:22.449020718 +0200 @@ -0,0 +1,1431 @@ +/* ipkg_cmd.c - the itsy package management system + @@ -2421,10 +2422,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_cmd.c +} + + -Index: busybox-1.4.2/archival/libipkg/ipkg_cmd.h +Index: busybox-1.7.2/archival/libipkg/ipkg_cmd.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_cmd.h 2007-06-04 13:21:36.710395840 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_cmd.h 2007-10-04 17:14:22.493023228 +0200 @@ -0,0 +1,46 @@ +/* ipkg_cmd.h - the itsy package management system + @@ -2472,10 +2473,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_cmd.h +int pkg_mark_provides(pkg_t *pkg); + +#endif -Index: busybox-1.4.2/archival/libipkg/ipkg_conf.c +Index: busybox-1.7.2/archival/libipkg/ipkg_conf.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_conf.c 2007-06-04 13:21:36.711395688 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_conf.c 2007-10-04 17:14:22.513024368 +0200 @@ -0,0 +1,711 @@ +/* ipkg_conf.c - the itsy package management system + @@ -3188,10 +3189,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_conf.c + sprintf_alloc(&root_filename, "%s%s", (conf->offline_root ? conf->offline_root : ""), filename); + return root_filename; +} -Index: busybox-1.4.2/archival/libipkg/ipkg_conf.h +Index: busybox-1.7.2/archival/libipkg/ipkg_conf.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_conf.h 2007-06-04 13:21:36.711395688 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_conf.h 2007-10-04 17:14:22.545026188 +0200 @@ -0,0 +1,107 @@ +/* ipkg_conf.h - the itsy package management system + @@ -3300,10 +3301,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_conf.h +char *root_filename_alloc(ipkg_conf_t *conf, char *filename); + +#endif -Index: busybox-1.4.2/archival/libipkg/ipkg_configure.c +Index: busybox-1.7.2/archival/libipkg/ipkg_configure.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_configure.c 2007-06-04 13:21:36.712395536 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_configure.c 2007-10-04 17:14:22.569027557 +0200 @@ -0,0 +1,40 @@ +/* ipkg_configure.c - the itsy package management system + @@ -3345,10 +3346,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_configure.c + return 0; +} + -Index: busybox-1.4.2/archival/libipkg/ipkg_configure.h +Index: busybox-1.7.2/archival/libipkg/ipkg_configure.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_configure.h 2007-06-04 13:21:36.712395536 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_configure.h 2007-10-04 17:14:22.593028927 +0200 @@ -0,0 +1,25 @@ +/* ipkg_configure.h - the itsy package management system + @@ -3375,10 +3376,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_configure.h +int ipkg_configure(ipkg_conf_t *ipkg_conf, pkg_t *pkg); + +#endif -Index: busybox-1.4.2/archival/libipkg/ipkg_download.c +Index: busybox-1.7.2/archival/libipkg/ipkg_download.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_download.c 2007-06-04 13:21:36.712395536 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_download.c 2007-10-04 17:14:22.617030294 +0200 @@ -0,0 +1,195 @@ +/* ipkg_download.c - the itsy package management system + @@ -3575,10 +3576,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_download.c + } + return 0; +} -Index: busybox-1.4.2/archival/libipkg/ipkg_download.h +Index: busybox-1.7.2/archival/libipkg/ipkg_download.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_download.h 2007-06-04 13:21:36.712395536 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_download.h 2007-10-04 17:14:22.645031887 +0200 @@ -0,0 +1,30 @@ +/* ipkg_download.h - the itsy package management system + @@ -3610,10 +3611,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_download.h +int ipkg_prepare_url_for_install(ipkg_conf_t *conf, const char *url, char **namep); + +#endif -Index: busybox-1.4.2/archival/libipkg/ipkg.h +Index: busybox-1.7.2/archival/libipkg/ipkg.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg.h 2007-06-04 13:21:36.712395536 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg.h 2007-10-04 17:14:22.669033256 +0200 @@ -0,0 +1,74 @@ +/* ipkg.h - the itsy package management system + @@ -3689,10 +3690,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg.h +extern ipkg_conf_t *global_conf; + +#endif -Index: busybox-1.4.2/archival/libipkg/ipkg_includes.h +Index: busybox-1.7.2/archival/libipkg/ipkg_includes.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_includes.h 2007-06-04 13:21:36.713395384 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_includes.h 2007-10-04 17:14:22.685034167 +0200 @@ -0,0 +1,79 @@ +#ifndef IPKG_INCLUDES_H +#define IPKG_INCLUDES_H @@ -3773,10 +3774,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_includes.h +#endif + +#endif /* IPKG_INCLUDES_H */ -Index: busybox-1.4.2/archival/libipkg/ipkg_install.c +Index: busybox-1.7.2/archival/libipkg/ipkg_install.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_install.c 2007-06-04 13:21:36.714395232 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_install.c 2007-10-04 17:14:22.725036446 +0200 @@ -0,0 +1,1942 @@ +/* ipkg_install.c - the itsy package management system + @@ -5720,10 +5721,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_install.c +} + +#endif -Index: busybox-1.4.2/archival/libipkg/ipkg_install.h +Index: busybox-1.7.2/archival/libipkg/ipkg_install.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_install.h 2007-06-04 13:21:36.715395080 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_install.h 2007-10-04 17:14:22.753038046 +0200 @@ -0,0 +1,35 @@ +/* ipkg_install.h - the itsy package management system + @@ -5760,10 +5761,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_install.h +int name_mark_dependencies_for_installation(ipkg_conf_t *conf, const char *pkg_name, pkg_vec_t *pkgs_needed); + +#endif -Index: busybox-1.4.2/archival/libipkg/ipkg_message.c +Index: busybox-1.7.2/archival/libipkg/ipkg_message.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_message.c 2007-06-04 13:21:36.715395080 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_message.c 2007-10-04 17:24:58.037240829 +0200 @@ -0,0 +1,61 @@ +/* ipkg_message.c - the itsy package management system + @@ -5788,7 +5789,7 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_message.c +#ifndef IPKG_LIB + +void -+ipkg_message (ipkg_conf_t * conf, message_level_t level, char *fmt, ...) ++ipkg_message (ipkg_conf_t * conf, message_level_t level, const char *fmt, ...) +{ + va_list ap; + @@ -5812,7 +5813,7 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_message.c +//#define ipkg_message(conf, level, fmt, arg...) ipkg_cb_message(conf, level, fmt, ## arg) + +void -+ipkg_message (ipkg_conf_t * conf, message_level_t level, char *fmt, ...) ++ipkg_message (ipkg_conf_t * conf, message_level_t level, const char *fmt, ...) +{ + va_list ap; + char ts[256]; @@ -5826,10 +5827,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_message.c + } +} +#endif -Index: busybox-1.4.2/archival/libipkg/ipkg_message.h +Index: busybox-1.7.2/archival/libipkg/ipkg_message.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_message.h 2007-06-04 13:21:36.715395080 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_message.h 2007-10-04 17:23:42.072911866 +0200 @@ -0,0 +1,32 @@ +/* ipkg_message.h - the itsy package management system + @@ -5860,13 +5861,13 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_message.h + IPKG_DEBUG2, /* more debug level message */ +} message_level_t; + -+extern void ipkg_message(ipkg_conf_t *conf, message_level_t level, char *fmt, ...); ++extern void ipkg_message(ipkg_conf_t *conf, message_level_t level, const char *fmt, ...); + +#endif /* _IPKG_MESSAGE_H_ */ -Index: busybox-1.4.2/archival/libipkg/ipkg_remove.c +Index: busybox-1.7.2/archival/libipkg/ipkg_remove.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_remove.c 2007-06-04 13:21:36.716394928 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_remove.c 2007-10-04 17:14:22.801040776 +0200 @@ -0,0 +1,383 @@ +/* ipkg_remove.c - the itsy package management system + @@ -6251,10 +6252,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_remove.c + + return 0; +} -Index: busybox-1.4.2/archival/libipkg/ipkg_remove.h +Index: busybox-1.7.2/archival/libipkg/ipkg_remove.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_remove.h 2007-06-04 13:21:36.716394928 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_remove.h 2007-10-04 17:14:22.821041916 +0200 @@ -0,0 +1,33 @@ +/* ipkg_remove.h - the itsy package management system + @@ -6289,10 +6290,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_remove.h + + +#endif -Index: busybox-1.4.2/archival/libipkg/ipkg_upgrade.c +Index: busybox-1.7.2/archival/libipkg/ipkg_upgrade.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_upgrade.c 2007-06-04 13:21:36.716394928 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_upgrade.c 2007-10-04 17:14:22.837042832 +0200 @@ -0,0 +1,77 @@ +/* ipkg_upgrade.c - the itsy package management system + @@ -6371,10 +6372,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_upgrade.c + new->state_flag |= SF_USER; + return ipkg_install_pkg(conf, new,1); +} -Index: busybox-1.4.2/archival/libipkg/ipkg_upgrade.h +Index: busybox-1.7.2/archival/libipkg/ipkg_upgrade.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_upgrade.h 2007-06-04 13:21:36.716394928 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_upgrade.h 2007-10-04 17:14:22.877045111 +0200 @@ -0,0 +1,18 @@ +/* ipkg_upgrade.c - the itsy package management system + @@ -6394,10 +6395,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_upgrade.h +#include "ipkg.h" + +int ipkg_upgrade_pkg(ipkg_conf_t *conf, pkg_t *old); -Index: busybox-1.4.2/archival/libipkg/ipkg_utils.c +Index: busybox-1.7.2/archival/libipkg/ipkg_utils.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_utils.c 2007-06-04 13:21:36.716394928 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_utils.c 2007-10-04 17:14:22.897046251 +0200 @@ -0,0 +1,181 @@ +/* ipkg_utils.c - the itsy package management system + @@ -6580,10 +6581,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_utils.c +} + + -Index: busybox-1.4.2/archival/libipkg/ipkg_utils.h +Index: busybox-1.7.2/archival/libipkg/ipkg_utils.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/ipkg_utils.h 2007-06-04 13:21:36.717394776 +0200 ++++ busybox-1.7.2/archival/libipkg/ipkg_utils.h 2007-10-04 17:14:22.921047615 +0200 @@ -0,0 +1,29 @@ +/* ipkg_utils.h - the itsy package management system + @@ -6614,10 +6615,10 @@ Index: busybox-1.4.2/archival/libipkg/ipkg_utils.h +int line_is_blank(const char *line); + +#endif -Index: busybox-1.4.2/archival/libipkg/Kbuild +Index: busybox-1.7.2/archival/libipkg/Kbuild =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/Kbuild 2007-06-04 13:21:36.717394776 +0200 ++++ busybox-1.7.2/archival/libipkg/Kbuild 2007-10-04 17:14:22.937048531 +0200 @@ -0,0 +1,60 @@ +# Makefile for busybox +# @@ -6679,10 +6680,10 @@ Index: busybox-1.4.2/archival/libipkg/Kbuild +IPKG_ARCH:=$(TARGET_ARCH) +endif +CFLAGS += -DIPKG_LIB -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(IPKG_ARCH)\"" -Index: busybox-1.4.2/archival/libipkg/libipkg.c +Index: busybox-1.7.2/archival/libipkg/libipkg.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/libipkg.c 2007-06-04 13:21:36.717394776 +0200 ++++ busybox-1.7.2/archival/libipkg/libipkg.c 2007-10-04 17:14:22.949049213 +0200 @@ -0,0 +1,527 @@ +/* ipkglib.c - the itsy package management system + @@ -7211,11 +7212,11 @@ Index: busybox-1.4.2/archival/libipkg/libipkg.c +} + +#endif /* IPKG_LIB */ -Index: busybox-1.4.2/archival/libipkg/libipkg.h +Index: busybox-1.7.2/archival/libipkg/libipkg.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/libipkg.h 2007-06-04 13:21:36.718394624 +0200 -@@ -0,0 +1,87 @@ ++++ busybox-1.7.2/archival/libipkg/libipkg.h 2007-10-04 17:20:55.967446056 +0200 +@@ -0,0 +1,88 @@ +/* ipkglib.h - the itsy package management system + + Florian Boor <florian.boor@kernelconcepts.de> @@ -7239,6 +7240,7 @@ Index: busybox-1.4.2/archival/libipkg/libipkg.h +#include "ipkg_conf.h" +#include "ipkg_message.h" + ++#include "libbb.h" +#include "args.h" +#include "pkg.h" + @@ -7303,10 +7305,10 @@ Index: busybox-1.4.2/archival/libipkg/libipkg.h + + +#endif -Index: busybox-1.4.2/archival/libipkg/nv_pair.c +Index: busybox-1.7.2/archival/libipkg/nv_pair.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/nv_pair.c 2007-06-04 13:21:36.718394624 +0200 ++++ busybox-1.7.2/archival/libipkg/nv_pair.c 2007-10-04 17:14:22.989051492 +0200 @@ -0,0 +1,40 @@ +/* nv_pair.c - the itsy package management system + @@ -7348,10 +7350,10 @@ Index: busybox-1.4.2/archival/libipkg/nv_pair.c +} + + -Index: busybox-1.4.2/archival/libipkg/nv_pair.h +Index: busybox-1.7.2/archival/libipkg/nv_pair.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/nv_pair.h 2007-06-04 13:21:36.718394624 +0200 ++++ busybox-1.7.2/archival/libipkg/nv_pair.h 2007-10-04 17:14:23.037054223 +0200 @@ -0,0 +1,32 @@ +/* nv_pair.h - the itsy package management system + @@ -7385,10 +7387,10 @@ Index: busybox-1.4.2/archival/libipkg/nv_pair.h + +#endif + -Index: busybox-1.4.2/archival/libipkg/nv_pair_list.c +Index: busybox-1.7.2/archival/libipkg/nv_pair_list.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/nv_pair_list.c 2007-06-04 13:21:36.718394624 +0200 ++++ busybox-1.7.2/archival/libipkg/nv_pair_list.c 2007-10-04 17:14:23.053055147 +0200 @@ -0,0 +1,98 @@ +/* nv_pair_list.c - the itsy package management system + @@ -7488,10 +7490,10 @@ Index: busybox-1.4.2/archival/libipkg/nv_pair_list.c + } + return NULL; +} -Index: busybox-1.4.2/archival/libipkg/nv_pair_list.h +Index: busybox-1.7.2/archival/libipkg/nv_pair_list.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/nv_pair_list.h 2007-06-04 13:21:36.718394624 +0200 ++++ busybox-1.7.2/archival/libipkg/nv_pair_list.h 2007-10-04 17:14:23.073056281 +0200 @@ -0,0 +1,60 @@ +/* nv_pair_list.h - the itsy package management system + @@ -7553,10 +7555,10 @@ Index: busybox-1.4.2/archival/libipkg/nv_pair_list.h + +#endif + -Index: busybox-1.4.2/archival/libipkg/pkg.c +Index: busybox-1.7.2/archival/libipkg/pkg.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg.c 2007-06-04 13:21:36.720394320 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg.c 2007-10-04 17:14:23.093057411 +0200 @@ -0,0 +1,1747 @@ +/* pkg.c - the itsy package management system + @@ -9305,10 +9307,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg.c + } + return 0; +} -Index: busybox-1.4.2/archival/libipkg/pkg_depends.c +Index: busybox-1.7.2/archival/libipkg/pkg_depends.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_depends.c 2007-06-04 13:21:36.724393712 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_depends.c 2007-10-04 17:14:23.109058340 +0200 @@ -0,0 +1,1031 @@ +/* pkg_depends.c - the itsy package management system + @@ -10341,10 +10343,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_depends.c + + return 0; +} -Index: busybox-1.4.2/archival/libipkg/pkg_depends.h +Index: busybox-1.7.2/archival/libipkg/pkg_depends.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_depends.h 2007-06-04 13:21:36.724393712 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_depends.h 2007-10-04 17:14:23.129059469 +0200 @@ -0,0 +1,105 @@ +/* pkg_depends.h - the itsy package management system + @@ -10451,10 +10453,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_depends.h +int pkg_dependence_satisfied(ipkg_conf_t *conf, depend_t *depend); + +#endif -Index: busybox-1.4.2/archival/libipkg/pkg_dest.c +Index: busybox-1.7.2/archival/libipkg/pkg_dest.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_dest.c 2007-06-04 13:21:36.725393560 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_dest.c 2007-10-04 17:14:23.173061979 +0200 @@ -0,0 +1,92 @@ +/* pkg_dest.c - the itsy package management system + @@ -10548,10 +10550,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_dest.c + + dest->root_dir = NULL; +} -Index: busybox-1.4.2/archival/libipkg/pkg_dest.h +Index: busybox-1.7.2/archival/libipkg/pkg_dest.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_dest.h 2007-06-04 13:21:36.725393560 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_dest.h 2007-10-04 17:14:23.197063348 +0200 @@ -0,0 +1,38 @@ +/* pkg_dest.h - the itsy package management system + @@ -10591,10 +10593,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_dest.h + +#endif + -Index: busybox-1.4.2/archival/libipkg/pkg_dest_list.c +Index: busybox-1.7.2/archival/libipkg/pkg_dest_list.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_dest_list.c 2007-06-04 13:21:36.725393560 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_dest_list.c 2007-10-04 17:14:23.213064259 +0200 @@ -0,0 +1,85 @@ +/* pkg_dest_list.c - the itsy package management system + @@ -10681,10 +10683,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_dest_list.c +{ + return (pkg_dest_list_elt_t *) void_list_pop((void_list_t *) list); +} -Index: busybox-1.4.2/archival/libipkg/pkg_dest_list.h +Index: busybox-1.7.2/archival/libipkg/pkg_dest_list.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_dest_list.h 2007-06-04 13:21:36.725393560 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_dest_list.h 2007-10-04 17:14:23.229065168 +0200 @@ -0,0 +1,50 @@ +/* pkg_dest_list.h - the itsy package management system + @@ -10736,10 +10738,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_dest_list.h + +#endif + -Index: busybox-1.4.2/archival/libipkg/pkg_extract.c +Index: busybox-1.7.2/archival/libipkg/pkg_extract.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_extract.c 2007-06-04 13:21:36.726393408 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_extract.c 2007-10-04 17:14:23.245066087 +0200 @@ -0,0 +1,224 @@ +/* pkg_extract.c - the itsy package management system + @@ -10965,10 +10967,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_extract.c + + return 0; +} -Index: busybox-1.4.2/archival/libipkg/pkg_extract.h +Index: busybox-1.7.2/archival/libipkg/pkg_extract.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_extract.h 2007-06-04 13:21:36.726393408 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_extract.h 2007-10-04 17:14:23.265067225 +0200 @@ -0,0 +1,32 @@ +/* pkg_extract.c - the itsy package management system + @@ -11002,11 +11004,11 @@ Index: busybox-1.4.2/archival/libipkg/pkg_extract.h +int pkg_extract_data_file_names_to_stream(pkg_t *pkg, FILE *file); + +#endif -Index: busybox-1.4.2/archival/libipkg/pkg.h +Index: busybox-1.7.2/archival/libipkg/pkg.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg.h 2007-06-04 13:21:36.726393408 +0200 -@@ -0,0 +1,232 @@ ++++ busybox-1.7.2/archival/libipkg/pkg.h 2007-10-04 17:22:15.623985424 +0200 +@@ -0,0 +1,229 @@ +/* pkg.h - the itsy package management system + + Carl D. Worth @@ -11040,9 +11042,6 @@ Index: busybox-1.4.2/archival/libipkg/pkg.h + +struct ipkg_conf; + -+ -+#define ARRAY_SIZE(array) sizeof(array) / sizeof((array)[0]) -+ +/* I think "Size" is currently the shortest field name */ +#define PKG_MINIMUM_FIELD_NAME_LEN 4 + @@ -11239,10 +11238,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg.h +int pkg_write_changed_filelists(ipkg_conf_t *conf); + +#endif -Index: busybox-1.4.2/archival/libipkg/pkg_hash.c +Index: busybox-1.7.2/archival/libipkg/pkg_hash.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_hash.c 2007-06-04 13:21:36.727393256 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_hash.c 2007-10-04 17:14:23.329070878 +0200 @@ -0,0 +1,616 @@ +/* ipkg_hash.c - the itsy package management system + @@ -11860,10 +11859,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_hash.c +} + + -Index: busybox-1.4.2/archival/libipkg/pkg_hash.h +Index: busybox-1.7.2/archival/libipkg/pkg_hash.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_hash.h 2007-06-04 13:21:36.727393256 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_hash.h 2007-10-04 17:14:23.349072007 +0200 @@ -0,0 +1,61 @@ +/* pkg_hash.h - the itsy package management system + @@ -11926,10 +11925,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_hash.h + +#endif + -Index: busybox-1.4.2/archival/libipkg/pkg_parse.c +Index: busybox-1.7.2/archival/libipkg/pkg_parse.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_parse.c 2007-06-04 13:21:36.727393256 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_parse.c 2007-10-04 17:14:23.369073144 +0200 @@ -0,0 +1,366 @@ +/* pkg_parse.c - the itsy package management system + @@ -12297,10 +12296,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_parse.c + + return 0; +} -Index: busybox-1.4.2/archival/libipkg/pkg_parse.h +Index: busybox-1.7.2/archival/libipkg/pkg_parse.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_parse.h 2007-06-04 13:21:36.728393104 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_parse.h 2007-10-04 17:14:23.389074295 +0200 @@ -0,0 +1,31 @@ +/* pkg_parse.h - the itsy package management system + @@ -12333,10 +12332,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_parse.h +int pkg_valorize_other_field(pkg_t *pkg, char ***raw); + +#endif -Index: busybox-1.4.2/archival/libipkg/pkg_src.c +Index: busybox-1.7.2/archival/libipkg/pkg_src.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_src.c 2007-06-04 13:21:36.728393104 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_src.c 2007-10-04 17:14:23.433076797 +0200 @@ -0,0 +1,43 @@ +/* pkg_src.c - the itsy package management system + @@ -12381,10 +12380,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_src.c +} + + -Index: busybox-1.4.2/archival/libipkg/pkg_src.h +Index: busybox-1.7.2/archival/libipkg/pkg_src.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_src.h 2007-06-04 13:21:36.728393104 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_src.h 2007-10-04 17:14:23.457078165 +0200 @@ -0,0 +1,34 @@ +/* pkg_src.h - the itsy package management system + @@ -12420,10 +12419,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_src.h +void pkg_src_deinit(pkg_src_t *src); + +#endif -Index: busybox-1.4.2/archival/libipkg/pkg_src_list.c +Index: busybox-1.7.2/archival/libipkg/pkg_src_list.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_src_list.c 2007-06-04 13:21:36.728393104 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_src_list.c 2007-10-04 17:14:23.481079530 +0200 @@ -0,0 +1,75 @@ +/* pkg_src_list.c - the itsy package management system + @@ -12500,10 +12499,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_src_list.c +{ + return (pkg_src_list_elt_t *) void_list_pop((void_list_t *) list); +} -Index: busybox-1.4.2/archival/libipkg/pkg_src_list.h +Index: busybox-1.7.2/archival/libipkg/pkg_src_list.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_src_list.h 2007-06-04 13:21:36.728393104 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_src_list.h 2007-10-04 17:14:23.497080447 +0200 @@ -0,0 +1,57 @@ +/* pkg_src_list.h - the itsy package management system + @@ -12562,10 +12561,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_src_list.h + +#endif + -Index: busybox-1.4.2/archival/libipkg/pkg_vec.c +Index: busybox-1.7.2/archival/libipkg/pkg_vec.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_vec.c 2007-06-04 13:21:36.729392952 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_vec.c 2007-10-04 17:14:23.513081356 +0200 @@ -0,0 +1,230 @@ +/* pkg_vec.c - the itsy package management system + @@ -12797,10 +12796,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_vec.c + qsort(vec->pkgs, vec->len, sizeof(pkg_t *), (compare_fcn_t)compar); +} + -Index: busybox-1.4.2/archival/libipkg/pkg_vec.h +Index: busybox-1.7.2/archival/libipkg/pkg_vec.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/pkg_vec.h 2007-06-04 13:21:36.729392952 +0200 ++++ busybox-1.7.2/archival/libipkg/pkg_vec.h 2007-10-04 17:14:23.565084313 +0200 @@ -0,0 +1,64 @@ +/* pkg_vec.h - the itsy package management system + @@ -12866,10 +12865,10 @@ Index: busybox-1.4.2/archival/libipkg/pkg_vec.h +void abstract_pkg_vec_sort(pkg_vec_t *vec, int (*compar)(abstract_pkg_t *, abstract_pkg_t *)); +#endif + -Index: busybox-1.4.2/archival/libipkg/sprintf_alloc.h +Index: busybox-1.7.2/archival/libipkg/sprintf_alloc.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/sprintf_alloc.h 2007-06-04 13:21:36.729392952 +0200 ++++ busybox-1.7.2/archival/libipkg/sprintf_alloc.h 2007-10-04 17:14:23.589085682 +0200 @@ -0,0 +1,25 @@ +/* sprintf_alloca.c -- like sprintf with memory allocation + @@ -12896,10 +12895,10 @@ Index: busybox-1.4.2/archival/libipkg/sprintf_alloc.h +#define sprintf_alloc(str, fmt, args...) *str = xasprintf(fmt, ## args) + +#endif -Index: busybox-1.4.2/archival/libipkg/str_list.c +Index: busybox-1.7.2/archival/libipkg/str_list.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/str_list.c 2007-06-04 13:21:36.729392952 +0200 ++++ busybox-1.7.2/archival/libipkg/str_list.c 2007-10-04 17:14:23.609086833 +0200 @@ -0,0 +1,76 @@ +/* str_list.c - the itsy package management system + @@ -12977,10 +12976,10 @@ Index: busybox-1.4.2/archival/libipkg/str_list.c + (void *)target_str, + (void_list_cmp_t)strcmp); +} -Index: busybox-1.4.2/archival/libipkg/str_list.h +Index: busybox-1.7.2/archival/libipkg/str_list.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/str_list.h 2007-06-04 13:21:36.729392952 +0200 ++++ busybox-1.7.2/archival/libipkg/str_list.h 2007-10-04 17:14:23.673090470 +0200 @@ -0,0 +1,51 @@ +/* str_list.h - the itsy package management system + @@ -13033,11 +13032,11 @@ Index: busybox-1.4.2/archival/libipkg/str_list.h +char *str_list_remove_elt(str_list_t *list, const char *target_str); + +#endif -Index: busybox-1.4.2/archival/libipkg/str_util.c +Index: busybox-1.7.2/archival/libipkg/str_util.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/str_util.c 2007-06-04 13:21:36.730392800 +0200 -@@ -0,0 +1,73 @@ ++++ busybox-1.7.2/archival/libipkg/str_util.c 2007-10-04 17:20:30.425990533 +0200 +@@ -0,0 +1,63 @@ +/* str_utils.c - the itsy package management system + + Carl D. Worth @@ -13086,16 +13085,6 @@ Index: busybox-1.4.2/archival/libipkg/str_util.c + return 0; +} + -+int str_tolower(char *str) -+{ -+ while (*str) { -+ *str = tolower(*str); -+ str++; -+ } -+ -+ return 0; -+} -+ +int str_toupper(char *str) +{ + while (*str) { @@ -13111,11 +13100,11 @@ Index: busybox-1.4.2/archival/libipkg/str_util.c + return str ? strdup(str) : NULL; +} + -Index: busybox-1.4.2/archival/libipkg/str_util.h +Index: busybox-1.7.2/archival/libipkg/str_util.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/str_util.h 2007-06-04 13:21:36.730392800 +0200 -@@ -0,0 +1,28 @@ ++++ busybox-1.7.2/archival/libipkg/str_util.h 2007-10-04 17:20:40.670574336 +0200 +@@ -0,0 +1,27 @@ +/* str_utils.h - the itsy package management system + + Carl D. Worth @@ -13139,15 +13128,14 @@ Index: busybox-1.4.2/archival/libipkg/str_util.h +int str_starts_with(const char *str, const char *prefix); +int str_ends_with(const char *str, const char *suffix); +int str_chomp(char *str); -+int str_tolower(char *str); +int str_toupper(char *str); +char *str_dup_safe(const char *str); + +#endif -Index: busybox-1.4.2/archival/libipkg/user.c +Index: busybox-1.7.2/archival/libipkg/user.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/user.c 2007-06-04 13:21:36.730392800 +0200 ++++ busybox-1.7.2/archival/libipkg/user.c 2007-10-04 17:14:23.757095256 +0200 @@ -0,0 +1,58 @@ +/* user.c - the itsy package management system + @@ -13207,10 +13195,10 @@ Index: busybox-1.4.2/archival/libipkg/user.c + + return response; +} -Index: busybox-1.4.2/archival/libipkg/user.h +Index: busybox-1.7.2/archival/libipkg/user.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/user.h 2007-06-04 13:21:36.730392800 +0200 ++++ busybox-1.7.2/archival/libipkg/user.h 2007-10-04 17:14:23.785096849 +0200 @@ -0,0 +1,23 @@ +/* user.c - the itsy package management system + @@ -13235,10 +13223,10 @@ Index: busybox-1.4.2/archival/libipkg/user.h + +char *get_user_response(const char *format, ...); + -Index: busybox-1.4.2/archival/libipkg/void_list.c +Index: busybox-1.7.2/archival/libipkg/void_list.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/void_list.c 2007-06-04 13:21:36.731392648 +0200 ++++ busybox-1.7.2/archival/libipkg/void_list.c 2007-10-04 17:14:23.805098002 +0200 @@ -0,0 +1,194 @@ +/* void_list.c - the itsy package management system + @@ -13434,10 +13422,10 @@ Index: busybox-1.4.2/archival/libipkg/void_list.c + else + return NULL; +} -Index: busybox-1.4.2/archival/libipkg/void_list.h +Index: busybox-1.7.2/archival/libipkg/void_list.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/void_list.h 2007-06-04 13:21:36.731392648 +0200 ++++ busybox-1.7.2/archival/libipkg/void_list.h 2007-10-04 17:14:23.841100046 +0200 @@ -0,0 +1,59 @@ +/* void_list.h - the itsy package management system + @@ -13498,10 +13486,10 @@ Index: busybox-1.4.2/archival/libipkg/void_list.h +void *void_list_remove_elt(void_list_t *list, const void *target_data, void_list_cmp_t cmp); + +#endif -Index: busybox-1.4.2/archival/libipkg/xsystem.c +Index: busybox-1.7.2/archival/libipkg/xsystem.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/xsystem.c 2007-06-04 13:21:36.731392648 +0200 ++++ busybox-1.7.2/archival/libipkg/xsystem.c 2007-10-04 17:14:23.865101421 +0200 @@ -0,0 +1,64 @@ +/* xsystem.c - system(3) with error messages + @@ -13567,10 +13555,10 @@ Index: busybox-1.4.2/archival/libipkg/xsystem.c + return -1; +} + -Index: busybox-1.4.2/archival/libipkg/xsystem.h +Index: busybox-1.7.2/archival/libipkg/xsystem.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/archival/libipkg/xsystem.h 2007-06-04 13:21:36.731392648 +0200 ++++ busybox-1.7.2/archival/libipkg/xsystem.h 2007-10-04 17:14:23.885102559 +0200 @@ -0,0 +1,34 @@ +/* xsystem.h - system(3) with error messages + @@ -13606,12 +13594,12 @@ Index: busybox-1.4.2/archival/libipkg/xsystem.h + +#endif + -Index: busybox-1.4.2/archival/libunarchive/data_extract_all.c +Index: busybox-1.7.2/archival/libunarchive/data_extract_all.c =================================================================== ---- busybox-1.4.2.orig/archival/libunarchive/data_extract_all.c 2007-06-04 13:21:31.879130304 +0200 -+++ busybox-1.4.2/archival/libunarchive/data_extract_all.c 2007-06-04 13:21:36.731392648 +0200 -@@ -117,3 +117,17 @@ - utime(file_header->name, &t); +--- busybox-1.7.2.orig/archival/libunarchive/data_extract_all.c 2007-10-04 17:12:34.462866938 +0200 ++++ busybox-1.7.2/archival/libunarchive/data_extract_all.c 2007-10-04 17:14:23.905103687 +0200 +@@ -129,3 +129,17 @@ + } } } + @@ -13628,23 +13616,23 @@ Index: busybox-1.4.2/archival/libunarchive/data_extract_all.c + } +} + -Index: busybox-1.4.2/archival/libunarchive/Kbuild +Index: busybox-1.7.2/archival/libunarchive/Kbuild =================================================================== ---- busybox-1.4.2.orig/archival/libunarchive/Kbuild 2007-06-04 13:21:31.886129240 +0200 -+++ busybox-1.4.2/archival/libunarchive/Kbuild 2007-06-04 13:21:36.732392496 +0200 -@@ -47,6 +47,7 @@ - lib-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o - lib-$(CONFIG_GUNZIP) += $(GUNZIP_FILES) - lib-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o +--- busybox-1.7.2.orig/archival/libunarchive/Kbuild 2007-10-04 17:12:34.474867620 +0200 ++++ busybox-1.7.2/archival/libunarchive/Kbuild 2007-10-04 17:14:23.925104840 +0200 +@@ -55,6 +55,7 @@ + lib-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o + lib-$(CONFIG_GUNZIP) += $(GUNZIP_FILES) + lib-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o +lib-$(CONFIG_IPKG) += $(GUNZIP_FILES) get_header_tar.o get_header_tar_gz.o - lib-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o - lib-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o - lib-$(CONFIG_TAR) += get_header_tar.o -Index: busybox-1.4.2/include/applets.h + lib-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o + lib-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o + lib-$(CONFIG_FEATURE_RPM_BZ2) += decompress_bunzip2.o +Index: busybox-1.7.2/include/applets.h =================================================================== ---- busybox-1.4.2.orig/include/applets.h 2007-06-04 13:21:34.786688288 +0200 -+++ busybox-1.4.2/include/applets.h 2007-06-04 13:21:36.732392496 +0200 -@@ -160,6 +160,7 @@ +--- busybox-1.7.2.orig/include/applets.h 2007-10-04 17:13:12.525035978 +0200 ++++ busybox-1.7.2/include/applets.h 2007-10-04 17:24:51.052842811 +0200 +@@ -190,6 +190,7 @@ USE_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER)) USE_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) USE_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) @@ -13652,11 +13640,11 @@ Index: busybox-1.4.2/include/applets.h USE_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_NEVER)) USE_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER)) USE_IPRULE(APPLET(iprule, _BB_DIR_BIN, _BB_SUID_NEVER)) -Index: busybox-1.4.2/include/unarchive.h +Index: busybox-1.7.2/include/unarchive.h =================================================================== ---- busybox-1.4.2.orig/include/unarchive.h 2007-06-04 13:21:31.897127568 +0200 -+++ busybox-1.4.2/include/unarchive.h 2007-06-04 13:21:36.732392496 +0200 -@@ -76,6 +76,7 @@ +--- busybox-1.7.2.orig/include/unarchive.h 2007-10-04 17:12:34.486868309 +0200 ++++ busybox-1.7.2/include/unarchive.h 2007-10-04 17:14:23.989108482 +0200 +@@ -74,6 +74,7 @@ extern void data_skip(archive_handle_t *archive_handle); extern void data_extract_all(archive_handle_t *archive_handle); @@ -13664,11 +13652,11 @@ Index: busybox-1.4.2/include/unarchive.h extern void data_extract_to_stdout(archive_handle_t *archive_handle); extern void data_extract_to_buffer(archive_handle_t *archive_handle); -Index: busybox-1.4.2/include/usage.h +Index: busybox-1.7.2/include/usage.h =================================================================== ---- busybox-1.4.2.orig/include/usage.h 2007-06-04 13:21:35.005655000 +0200 -+++ busybox-1.4.2/include/usage.h 2007-06-04 13:21:36.734392192 +0200 -@@ -1133,6 +1133,82 @@ +--- busybox-1.7.2.orig/include/usage.h 2007-10-04 17:13:12.629041904 +0200 ++++ busybox-1.7.2/include/usage.h 2007-10-04 17:14:23.993108707 +0200 +@@ -1226,6 +1226,82 @@ "$ ls -la /tmp/busybox*\n" \ "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n" @@ -13749,13 +13737,13 @@ Index: busybox-1.4.2/include/usage.h + "\teg: ipkg info 'libstd*' or ipkg search '*libop*' or ipkg remove 'libncur*'\n" + #define halt_trivial_usage \ - "[-d<delay>] [-n<nosync>] [-f<force>]" + "[-d delay] [-n] [-f]" #define halt_full_usage \ -Index: busybox-1.4.2/Makefile +Index: busybox-1.7.2/Makefile =================================================================== ---- busybox-1.4.2.orig/Makefile 2007-06-04 13:21:31.910125592 +0200 -+++ busybox-1.4.2/Makefile 2007-06-04 13:21:36.734392192 +0200 -@@ -423,6 +423,7 @@ +--- busybox-1.7.2.orig/Makefile 2007-10-04 17:12:34.502869218 +0200 ++++ busybox-1.7.2/Makefile 2007-10-04 17:14:24.021110304 +0200 +@@ -428,6 +428,7 @@ libs-y := \ archival/ \ diff --git a/package/busybox/patches/913-libbb_hash.patch b/package/busybox/patches/501-libbb_hash.patch index e371b32..c6c36fc 100644 --- a/package/busybox/patches/913-libbb_hash.patch +++ b/package/busybox/patches/501-libbb_hash.patch @@ -1,10 +1,10 @@ -Index: busybox-1.4.2/coreutils/md5_sha1_sum.c +Index: busybox-1.7.2/coreutils/md5_sha1_sum.c =================================================================== ---- busybox-1.4.2.orig/coreutils/md5_sha1_sum.c 2007-06-04 13:21:31.536182440 +0200 -+++ busybox-1.4.2/coreutils/md5_sha1_sum.c 2007-06-04 13:21:37.709243992 +0200 -@@ -8,76 +8,10 @@ +--- busybox-1.7.2.orig/coreutils/md5_sha1_sum.c 2007-09-03 13:48:39.000000000 +0200 ++++ busybox-1.7.2/coreutils/md5_sha1_sum.c 2007-10-04 15:45:02.423570273 +0200 +@@ -8,75 +8,10 @@ - #include "busybox.h" + #include "libbb.h" -typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t; - @@ -36,9 +36,8 @@ Index: busybox-1.4.2/coreutils/md5_sha1_sum.c - - src_fd = STDIN_FILENO; - if (NOT_LONE_DASH(filename)) { -- src_fd = open(filename, O_RDONLY); +- src_fd = open_or_warn(filename, O_RDONLY); - if (src_fd < 0) { -- bb_perror_msg("%s", filename); - return NULL; - } - } @@ -76,35 +75,35 @@ Index: busybox-1.4.2/coreutils/md5_sha1_sum.c - return hash_value; -} - + int md5_sha1_sum_main(int argc, char **argv); int md5_sha1_sum_main(int argc, char **argv) { - int return_value = EXIT_SUCCESS; -Index: busybox-1.4.2/include/libbb.h +Index: busybox-1.7.2/include/libbb.h =================================================================== ---- busybox-1.4.2.orig/include/libbb.h 2007-06-04 13:21:35.388596784 +0200 -+++ busybox-1.4.2/include/libbb.h 2007-06-04 13:21:37.709243992 +0200 -@@ -641,6 +641,7 @@ +--- busybox-1.7.2.orig/include/libbb.h 2007-10-04 15:20:22.275221430 +0200 ++++ busybox-1.7.2/include/libbb.h 2007-10-04 15:42:10.585777803 +0200 +@@ -947,6 +947,7 @@ extern const char bb_uuenc_tbl_std[]; - void bb_uuencode(const unsigned char *s, char *store, const int length, const char *tbl); + void bb_uuencode(char *store, const void *s, int length, const char *tbl); +typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t; typedef struct sha1_ctx_t { uint32_t count[2]; uint32_t hash[5]; -@@ -662,6 +663,8 @@ +@@ -968,6 +969,8 @@ void md5_begin(md5_ctx_t *ctx); void md5_hash(const void *data, size_t length, md5_ctx_t *ctx); void *md5_end(void *resbuf, md5_ctx_t *ctx); +unsigned char *hash_bin_to_hex(unsigned char *hash_value, unsigned hash_length); +uint8_t *hash_file(const char *filename, hash_algo_t hash_algo); - uint32_t *crc32_filltable(int endian); + uint32_t *crc32_filltable(uint32_t *tbl256, int endian); -Index: busybox-1.4.2/libbb/Kbuild +Index: busybox-1.7.2/libbb/Kbuild =================================================================== ---- busybox-1.4.2.orig/libbb/Kbuild 2007-06-04 13:21:31.548180616 +0200 -+++ busybox-1.4.2/libbb/Kbuild 2007-06-04 13:21:37.710243840 +0200 -@@ -37,6 +37,7 @@ +--- busybox-1.7.2.orig/libbb/Kbuild 2007-09-03 13:48:41.000000000 +0200 ++++ busybox-1.7.2/libbb/Kbuild 2007-10-04 15:42:10.613779401 +0200 +@@ -38,6 +38,7 @@ lib-y += get_last_path_component.o lib-y += get_line_from_file.o lib-y += getopt32.o @@ -112,11 +111,11 @@ Index: busybox-1.4.2/libbb/Kbuild lib-y += herror_msg.o lib-y += herror_msg_and_die.o lib-y += human_readable.o -Index: busybox-1.4.2/libbb/hash.c +Index: busybox-1.7.2/libbb/hash.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/libbb/hash.c 2007-06-04 13:21:37.710243840 +0200 -@@ -0,0 +1,82 @@ ++++ busybox-1.7.2/libbb/hash.c 2007-10-04 15:45:08.279904000 +0200 +@@ -0,0 +1,81 @@ +/* + * Copyright (C) 2003 Glenn L. McGrath + * Copyright (C) 2003-2004 Erik Andersen @@ -158,20 +157,19 @@ Index: busybox-1.4.2/libbb/hash.c + + src_fd = STDIN_FILENO; + if (NOT_LONE_DASH(filename)) { -+ src_fd = open(filename, O_RDONLY); ++ src_fd = open_or_warn(filename, O_RDONLY); + if (src_fd < 0) { -+ bb_perror_msg("%s", filename); + return NULL; + } + } + + /* figure specific hash algorithims */ -+ if (hash_algo==HASH_MD5) { ++ if (ENABLE_MD5SUM && hash_algo==HASH_MD5) { + md5_begin(&context.md5); + update = (void (*)(const void*, size_t, void*))md5_hash; + final = (void (*)(void*, void*))md5_end; + hash_len = 16; -+ } else if (hash_algo==HASH_SHA1) { ++ } else if (ENABLE_SHA1SUM && hash_algo==HASH_SHA1) { + sha1_begin(&context.sha1); + update = (void (*)(const void*, size_t, void*))sha1_hash; + final = (void (*)(void*, void*))sha1_end; diff --git a/package/busybox/patches/920-awx.patch b/package/busybox/patches/510-awx.patch index 2abab32..571b323 100644 --- a/package/busybox/patches/920-awx.patch +++ b/package/busybox/patches/510-awx.patch @@ -1,10 +1,10 @@ -Index: busybox-1.4.2/editors/awk.c +Index: busybox-1.7.2/editors/awk.c =================================================================== ---- busybox-1.4.2.orig/editors/awk.c 2007-06-04 13:21:35.202625056 +0200 -+++ busybox-1.4.2/editors/awk.c 2007-06-04 13:21:37.927210856 +0200 -@@ -30,6 +30,11 @@ +--- busybox-1.7.2.orig/editors/awk.c 2007-10-05 01:39:50.073293533 +0200 ++++ busybox-1.7.2/editors/awk.c 2007-10-05 02:16:42.539374788 +0200 +@@ -33,6 +33,11 @@ /* these flags are static, don't change them when value is changed */ - #define VF_DONTTOUCH (VF_ARRAY | VF_SPECIAL | VF_WALK | VF_CHILD | VF_DIRTY) + #define VF_DONTTOUCH (VF_ARRAY | VF_SPECIAL | VF_WALK | VF_CHILD | VF_DIRTY) +#ifdef CONFIG_AWX +#define fputs(s, stream) fputs_hook(s, stream) @@ -13,15 +13,14 @@ Index: busybox-1.4.2/editors/awk.c + /* Variable */ typedef struct var_s { - unsigned short type; /* flags */ -@@ -50,10 +55,15 @@ - char *programname; + unsigned type; /* flags */ +@@ -54,9 +59,14 @@ } chain; -+typedef var *(*awk_cfunc)(var *res, var *args, int nargs); /* Function */ ++typedef var *(*awk_cfunc)(var *res, var *args, int nargs); typedef struct func_s { - unsigned short nargs; + unsigned nargs; - struct chain_s body; + enum { AWKFUNC, CFUNC } type; + union { @@ -31,17 +30,17 @@ Index: busybox-1.4.2/editors/awk.c } func; /* I/O stream */ -@@ -1312,7 +1322,8 @@ +@@ -1400,7 +1410,8 @@ next_token(TC_FUNCTION); - pos++; - f = newfunc(t.string); + g_pos++; + f = newfunc(t_string); - f->body.first = NULL; + f->type = AWKFUNC; + f->x.body.first = NULL; f->nargs = 0; while (next_token(TC_VARIABLE | TC_SEQTERM) & TC_VARIABLE) { - v = findvar(ahash, t.string); -@@ -1321,7 +1332,7 @@ + v = findvar(ahash, t_string); +@@ -1409,7 +1420,7 @@ if (next_token(TC_COMMA | TC_SEQTERM) & TC_SEQTERM) break; } @@ -50,33 +49,34 @@ Index: busybox-1.4.2/editors/awk.c chain_group(); clear_array(ahash); -@@ -2260,7 +2271,8 @@ +@@ -2372,7 +2383,8 @@ break; case XC( OC_FUNC ): -- if (! op->r.f->body.first) +- if (!op->r.f->body.first) + if ((op->r.f->type == AWKFUNC) && + !op->r.f->x.body.first) - runtime_error(EMSG_UNDEF_FUNC); + syntax_error(EMSG_UNDEF_FUNC); X.v = R.v = nvalloc(op->r.f->nargs+1); -@@ -2277,7 +2289,11 @@ +@@ -2389,7 +2401,10 @@ fnargs = X.v; - L.s = programname; + L.s = g_progname; - res = evaluate(op->r.f->body.first, res); + if (op->r.f->type == AWKFUNC) + res = evaluate(op->r.f->x.body.first, res); + else if (op->r.f->type == CFUNC) + res = op->r.f->x.cfunc(res, fnargs, op->r.f->nargs); -+ - programname = L.s; + g_progname = L.s; nvfree(fnargs); -@@ -2637,6 +2653,11 @@ - return &rsm; +@@ -2753,6 +2768,13 @@ } + int awk_main(int argc, char **argv); ++int awx_main(int argc, char **argv); ++ +#ifdef CONFIG_AWX +static int is_awx = 0; +#include "awx.c" @@ -84,23 +84,24 @@ Index: busybox-1.4.2/editors/awk.c + int awk_main(int argc, char **argv) { - int i, j, flen; -@@ -2693,6 +2714,10 @@ - free(s); + unsigned opt; +@@ -2817,6 +2839,11 @@ + *s1 = '='; + } } - ++ +#ifdef CONFIG_AWX + do_awx(argc, argv); +#endif + - programname = NULL; - while((c = getopt(argc, argv, "F:v:f:W:")) != EOF) { - switch (c) { -Index: busybox-1.4.2/editors/awx.c + opt_complementary = "v::f::"; + opt = getopt32(argv, "F:v:f:W:", &opt_F, &opt_v, &opt_f, &opt_W); + argv += optind; +Index: busybox-1.7.2/editors/awx.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/editors/awx.c 2007-06-04 13:21:37.928210704 +0200 -@@ -0,0 +1,633 @@ ++++ busybox-1.7.2/editors/awx.c 2007-10-05 02:10:16.393369582 +0200 +@@ -0,0 +1,636 @@ +/* + * awk web extension + * @@ -126,7 +127,7 @@ Index: busybox-1.4.2/editors/awx.c +static int lang_inuse = 0; + +/* look up a translation symbol from the hash */ -+static inline char *translate_lookup(char *str) ++static inline const char *translate_lookup(char *str) +{ + char *name, *def, *p; + hash_item *hi; @@ -151,7 +152,7 @@ Index: busybox-1.4.2/editors/awx.c +/* look for translation markers in the line and return the translated string */ +static char *translate_line(char *line) +{ -+ char *tok[MAX_TR * 3]; ++ const char *tok[MAX_TR * 3]; + char *l, *p, *p2 = NULL, *res; + int len = 0, _pos = 0, i, tr_abort = 0; + static char *backlog = NULL; @@ -283,7 +284,7 @@ Index: busybox-1.4.2/editors/awx.c +{ + const char *langfmt = "/usr/lib/webif/lang/%s.txt"; + char lbuf[LINE_BUF]; -+ char *lang; ++ const char *lang; + + if (!lang_inuse) + init_lang(res, args, nargs); @@ -299,7 +300,7 @@ Index: busybox-1.4.2/editors/awx.c +} + +/* read the contents of an entire file */ -+static char *get_file(char *fname) ++static char *get_file(const char *fname) +{ + FILE *F; + char *s = NULL; @@ -343,8 +344,8 @@ Index: busybox-1.4.2/editors/awx.c + + tv = nvalloc(1); + memset(&tmp, 0, sizeof(tmp)); -+ pos = p; -+ t.lineno = 1; ++ g_pos = p; ++ t_lineno = 1; + while ((tclass = next_token(TC_EOF | TC_OPSEQ | + TC_OPTERM | TC_BEGIN | TC_FUNCDECL)) != TC_EOF) { + if (tclass & TC_OPTERM) @@ -357,13 +358,13 @@ Index: busybox-1.4.2/editors/awx.c + chain_group(); + } else if (tclass & TC_FUNCDECL) { + next_token(TC_FUNCTION); -+ pos++; -+ f = newfunc(t.string); ++ g_pos++; ++ f = newfunc(t_string); + f->type = AWKFUNC; + f->x.body.first = NULL; + f->nargs = 0; + while (next_token(TC_VARIABLE | TC_SEQTERM) & TC_VARIABLE) { -+ v = findvar(ahash, t.string); ++ v = findvar(ahash, t_string); + v->x.aidx = (f->nargs)++; + + if (next_token(TC_COMMA | TC_SEQTERM) & TC_SEQTERM) @@ -382,10 +383,12 @@ Index: busybox-1.4.2/editors/awx.c + +/* include an awk file and run its BEGIN{} section */ +static xhash *includes = NULL; -+static void include_file(char *filename) ++static void include_file(const char *filename) +{ + char *s; + var *v; ++ int oldlnr = g_lineno; ++ const char *oldprg = g_progname; + + if (!includes) + includes = hash_init(); @@ -402,13 +405,17 @@ Index: busybox-1.4.2/editors/awx.c + fprintf(stderr, "Could not open file.\n"); + return; + } ++ g_lineno = 1; ++ g_progname = xstrdup(filename); + parse_include(s+1); + free(s); ++ g_lineno = oldlnr; ++ g_progname = oldprg; +} + +static var *include(var *res, var *args, int nargs) +{ -+ char *s; ++ const char *s; + + s = getvar_s(args); + if (s && (strlen(s) > 0)) @@ -424,7 +431,7 @@ Index: busybox-1.4.2/editors/awx.c + node *n; + + memset(&body, 0, sizeof(body)); -+ pos = str; ++ g_pos = str; + seq = &body; + + /* end of expression, assume that there's going to be a free byte @@ -456,7 +463,7 @@ Index: busybox-1.4.2/editors/awx.c + + if (!e || !e->var) + return; -+ lineno = e->line; ++ g_lineno = e->line; + switch (e->t) { + case T_TEXT: + s = malloc(strlen(e->var) + 2); @@ -502,38 +509,36 @@ Index: busybox-1.4.2/editors/awx.c +} + +/* awk method render(), which opens a template file and processes all awk ssi calls */ -+static void render_file(char *filename) ++static void render_file(const char *filename) +{ + struct template_cb tcb; + struct template_element *e; + FILE *f; -+ char *oldprg; -+ int oldlnr; ++ const char *oldprg = g_progname; ++ int oldlnr = g_lineno; + + if (!filename) + return; + -+ oldlnr = lineno; -+ oldprg = programname; -+ programname = filename; -+ + f = fopen(filename, "r"); + if (!f) + return; + ++ g_progname = xstrdup(filename); ++ g_lineno = 1; + memset(&tcb, 0, sizeof(tcb)); + tcb.handle_element = render_element; + e = parse_template(&tcb, f); + execute_template(&tcb, e); + free_template(&tcb, e); + fclose(f); -+ programname = oldprg; -+ lineno = oldlnr; ++ g_progname = oldprg; ++ g_lineno = oldlnr; +} + +static var *render(var *res, var *args, int nargs) +{ -+ char *s; ++ const char *s; + + s = getvar_s(args); + if (!s) @@ -555,7 +560,7 @@ Index: busybox-1.4.2/editors/awx.c +} + +/* registers a global c function for the awk interpreter */ -+static void register_cfunc(char *name, awk_cfunc cfunc, int nargs) ++static void register_cfunc(const char *name, awk_cfunc cfunc, int nargs) +{ + func *f; + @@ -573,7 +578,7 @@ Index: busybox-1.4.2/editors/awx.c + setvar_u(findvar(formvar, name), value); +} + -+static char *cgi_getvar(char *name) ++static const char *cgi_getvar(const char *name) +{ + if (!formvar) { + formvar = hash_init(); @@ -589,8 +594,7 @@ Index: busybox-1.4.2/editors/awx.c +/* function call for accessing cgi form variables */ +static var *getvar(var *res, var *args, int nargs) +{ -+ char *s; -+ char *svar; ++ const char *s, *svar; + + s = getvar_s(args); + if (!s) @@ -608,7 +612,7 @@ Index: busybox-1.4.2/editors/awx.c +/* call an awk function without arguments by string reference */ +static var *call(var *res, var *args, int nargs) +{ -+ char *s = getvar_s(args); ++ const char *s = getvar_s(args); + func *f; + + if (!s) @@ -629,10 +633,10 @@ Index: busybox-1.4.2/editors/awx.c + char *tmp, *s = NULL; + + zero_out_var(&tv); -+ programname = name; ++ g_progname = name; + + /* read the main controller source */ -+ s = get_file(programname); ++ s = get_file(g_progname); + if (!s) { + fprintf(stderr, "Could not open file\n"); + return 1; @@ -650,7 +654,7 @@ Index: busybox-1.4.2/editors/awx.c + + action = newvar("ACTION"); + if (!(strlen(getvar_s(action)) > 0)) { -+ tmp = cgi_getvar("action"); ++ tmp = (char *) cgi_getvar("action"); + if (!tmp || (strlen(tmp) <= 0)) + tmp = strdup("default"); + @@ -694,21 +698,21 @@ Index: busybox-1.4.2/editors/awx.c + return 0; + + /* fill in ARGV array */ -+ setvar_i(V[ARGC], argc + 1); -+ setari_u(V[ARGV], 0, "awx"); ++ setvar_i(intvar[ARGC], argc + 1); ++ setari_u(intvar[ARGV], 0, "awx"); + i = 0; + while (*args) -+ setari_u(V[ARGV], ++i, *args++); ++ setari_u(intvar[ARGV], ++i, *args++); + + while((c = getopt(argc, argv, "i:f:")) != EOF) { + switch(c) { + case 'i': -+ programname = optarg; ++ g_progname = optarg; + include_file(optarg); + break; + case 'f': + ret = 0; -+ programname = optarg; ++ g_progname = optarg; + render_file(optarg); + goto done; + } @@ -734,10 +738,10 @@ Index: busybox-1.4.2/editors/awx.c + return awk_main(argc, argv); +} + -Index: busybox-1.4.2/editors/awx_parser.h +Index: busybox-1.7.2/editors/awx_parser.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/editors/awx_parser.h 2007-06-04 13:21:37.928210704 +0200 ++++ busybox-1.7.2/editors/awx_parser.h 2007-10-05 01:43:59.487506840 +0200 @@ -0,0 +1,38 @@ +#ifndef __TEMPLATE_PARSER_H +#define __TEMPLATE_PARSER_H @@ -777,10 +781,10 @@ Index: busybox-1.4.2/editors/awx_parser.h +void free_template(struct template_cb *cb, struct template_element *e); + +#endif -Index: busybox-1.4.2/editors/awx_parser.l +Index: busybox-1.7.2/editors/awx_parser.l =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/editors/awx_parser.l 2007-06-04 13:21:37.929210552 +0200 ++++ busybox-1.7.2/editors/awx_parser.l 2007-10-05 01:43:59.547510259 +0200 @@ -0,0 +1,302 @@ +%{ +#include <stdio.h> @@ -1084,10 +1088,10 @@ Index: busybox-1.4.2/editors/awx_parser.l + free(e); + return free_template(cb, next); +} -Index: busybox-1.4.2/editors/Config.in +Index: busybox-1.7.2/editors/Config.in =================================================================== ---- busybox-1.4.2.orig/editors/Config.in 2007-06-04 13:21:31.486190040 +0200 -+++ busybox-1.4.2/editors/Config.in 2007-06-04 13:21:37.929210552 +0200 +--- busybox-1.7.2.orig/editors/Config.in 2007-10-05 01:39:50.097294897 +0200 ++++ busybox-1.7.2/editors/Config.in 2007-10-05 01:43:59.583512308 +0200 @@ -12,6 +12,13 @@ Awk is used as a pattern scanning and processing language. This is the BusyBox implementation of that programming language. @@ -1102,11 +1106,11 @@ Index: busybox-1.4.2/editors/Config.in config FEATURE_AWK_MATH bool "Enable math functions (requires libm)" default y -Index: busybox-1.4.2/editors/Kbuild +Index: busybox-1.7.2/editors/Kbuild =================================================================== ---- busybox-1.4.2.orig/editors/Kbuild 2007-06-04 13:21:31.492189128 +0200 -+++ busybox-1.4.2/editors/Kbuild 2007-06-04 13:21:37.929210552 +0200 -@@ -10,3 +10,12 @@ +--- busybox-1.7.2.orig/editors/Kbuild 2007-10-05 01:39:50.105295361 +0200 ++++ busybox-1.7.2/editors/Kbuild 2007-10-05 01:43:59.627514818 +0200 +@@ -12,3 +12,12 @@ lib-$(CONFIG_PATCH) += patch.o lib-$(CONFIG_SED) += sed.o lib-$(CONFIG_VI) += vi.o @@ -1119,22 +1123,22 @@ Index: busybox-1.4.2/editors/Kbuild +editors/awx_parser.o: editors/awx_parser.c FORCE + $(call cmd,force_checksrc) + $(call if_changed_rule,cc_o_c) -Index: busybox-1.4.2/include/applets.h +Index: busybox-1.7.2/include/applets.h =================================================================== ---- busybox-1.4.2.orig/include/applets.h 2007-06-04 13:21:36.732392496 +0200 -+++ busybox-1.4.2/include/applets.h 2007-06-04 13:21:37.929210552 +0200 -@@ -60,6 +60,7 @@ +--- busybox-1.7.2.orig/include/applets.h 2007-10-05 01:43:59.203490652 +0200 ++++ busybox-1.7.2/include/applets.h 2007-10-05 01:43:59.647515958 +0200 +@@ -76,6 +76,7 @@ USE_ARPING(APPLET(arping, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) USE_ASH(APPLET_NOUSAGE(ash, ash, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_AWK(APPLET(awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_AWK(APPLET_NOEXEC(awk, awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER, awk)) +USE_AWX(APPLET_NOUSAGE(awx, awx, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) - USE_BASENAME(APPLET(basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_BASENAME(APPLET_NOFORK(basename, basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER, basename)) USE_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER)) //USE_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER)) -Index: busybox-1.4.2/include/cgi.h +Index: busybox-1.7.2/include/cgi.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/include/cgi.h 2007-06-04 13:21:37.929210552 +0200 ++++ busybox-1.7.2/include/cgi.h 2007-10-05 01:43:59.667517098 +0200 @@ -0,0 +1,8 @@ +#ifndef CGI_H +#define CGI_H @@ -1144,10 +1148,10 @@ Index: busybox-1.4.2/include/cgi.h +int cgi_init(var_handler); + +#endif -Index: busybox-1.4.2/libbb/cgi.c +Index: busybox-1.7.2/libbb/cgi.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ busybox-1.4.2/libbb/cgi.c 2007-06-04 13:21:37.930210400 +0200 ++++ busybox-1.7.2/libbb/cgi.c 2007-10-05 01:43:59.707519378 +0200 @@ -0,0 +1,457 @@ +/* -------------------------------------------------------------------------- + * functions for processing cgi form data @@ -1606,14 +1610,15 @@ Index: busybox-1.4.2/libbb/cgi.c + + return retval; +} -Index: busybox-1.4.2/libbb/Kbuild +Index: busybox-1.7.2/libbb/Kbuild =================================================================== ---- busybox-1.4.2.orig/libbb/Kbuild 2007-06-04 13:21:37.710243840 +0200 -+++ busybox-1.4.2/libbb/Kbuild 2007-06-04 13:21:37.930210400 +0200 -@@ -118,3 +118,6 @@ - lib-$(CONFIG_MDEV) += xregcomp.o - lib-$(CONFIG_LESS) += xregcomp.o - lib-$(CONFIG_DEVFSD) += xregcomp.o -+ +--- busybox-1.7.2.orig/libbb/Kbuild 2007-10-05 01:43:59.387501141 +0200 ++++ busybox-1.7.2/libbb/Kbuild 2007-10-05 01:43:59.751521884 +0200 +@@ -99,6 +99,7 @@ + lib-y += xreadlink.o + + # conditionally compiled objects: +lib-$(CONFIG_AWX) += cgi.o -+ + lib-$(CONFIG_FEATURE_MOUNT_LOOP) += loop.o + lib-$(CONFIG_LOSETUP) += loop.o + lib-$(CONFIG_FEATURE_MTAB_SUPPORT) += mtab.o diff --git a/package/busybox/patches/999-insmod2.6_search.patch b/package/busybox/patches/999-insmod2.6_search.patch deleted file mode 100644 index 5a93b02..0000000 --- a/package/busybox/patches/999-insmod2.6_search.patch +++ /dev/null @@ -1,196 +0,0 @@ ---- busybox/modutils/insmod.c 2007-05-11 12:10:43.000000000 +0200 -+++ busybox/modutils/insmod.c 2007-05-11 12:12:15.000000000 +0200 -@@ -75,6 +75,30 @@ - extern int insmod_ng_main( int argc, char **argv); - #endif - -+static char *m_filename; -+static char *m_fullName; -+#define _PATH_MODULES "/lib/modules" -+ -+static int check_module_name_match(const char *filename, struct stat *statbuf, -+ void *userdata, int depth) -+{ -+ char *fullname = (char *) userdata; -+ -+ if (fullname[0] == '\0') -+ return FALSE; -+ else { -+ char *tmp, *tmp1 = xstrdup(filename); -+ tmp = bb_get_last_path_component(tmp1); -+ if (strcmp(tmp, fullname) == 0) { -+ free(tmp1); -+ /* Stop searching if we find a match */ -+ m_filename = xstrdup(filename); -+ return FALSE; -+ } -+ free(tmp1); -+ } -+ return TRUE; -+} - - #if ENABLE_FEATURE_2_4_MODULES - -@@ -680,7 +704,6 @@ - #endif - - --#define _PATH_MODULES "/lib/modules" - enum { STRVERSIONLEN = 64 }; - - /*======================================================================*/ -@@ -793,37 +816,6 @@ - static int n_ext_modules_used; - extern int delete_module(const char *); - --static char *m_filename; --static char *m_fullName; -- -- --/*======================================================================*/ -- -- --static int check_module_name_match(const char *filename, struct stat *statbuf, -- void *userdata, int depth) --{ -- char *fullname = (char *) userdata; -- -- if (fullname[0] == '\0') -- return FALSE; -- else { -- char *tmp, *tmp1 = xstrdup(filename); -- tmp = bb_get_last_path_component(tmp1); -- if (strcmp(tmp, fullname) == 0) { -- free(tmp1); -- /* Stop searching if we find a match */ -- m_filename = xstrdup(filename); -- return FALSE; -- } -- free(tmp1); -- } -- return TRUE; --} -- -- --/*======================================================================*/ -- - static struct obj_file *arch_new_file(void) - { - struct arch_file *f; -@@ -4265,14 +4257,97 @@ - long ret; - size_t len; - void *map; -- char *filename, *options; -+ char *options, *tmp; -+ struct stat st; -+#if ENABLE_FEATURE_CLEAN_UP -+ FILE *fp = 0; -+#else -+ FILE *fp; -+#endif -+ int k_version = 0; -+ struct utsname myuname; - -- filename = *++argv; -- if (!filename) -+ if (argc < 2) - bb_show_usage(); - -+#if !ENABLE_FEATURE_2_4_MODULES -+ /* Grab the module name */ -+ tmp = basename(xstrdup(argv[1])); -+ len = strlen(tmp); -+ -+ if (uname(&myuname) == 0) { -+ if (myuname.release[0] == '2') { -+ k_version = myuname.release[2] - '0'; -+ } -+ } -+ -+ if (len > 3 && tmp[len - 3] == '.' && tmp[len - 2] == 'k' && tmp[len - 1] == 'o') { -+ len -= 3; -+ tmp[len] = '\0'; -+ } -+ -+ -+ m_fullName = xasprintf("%s.ko", tmp); -+ -+ /* Get a filedesc for the module. Check we we have a complete path */ -+ if (stat(argv[1], &st) < 0 || !S_ISREG(st.st_mode) -+ || (fp = fopen(argv[1], "r")) == NULL -+ ) { -+ /* Hmm. Could not open it. First search under /lib/modules/`uname -r`, -+ * but do not error out yet if we fail to find it... */ -+ if (k_version) { /* uname succeedd */ -+ char *module_dir; -+ char *tmdn; -+ char real_module_dir[FILENAME_MAX]; -+ -+ tmdn = concat_path_file(_PATH_MODULES, myuname.release); -+ /* Jump through hoops in case /lib/modules/`uname -r` -+ * is a symlink. We do not want recursive_action to -+ * follow symlinks, but we do want to follow the -+ * /lib/modules/`uname -r` dir, So resolve it ourselves -+ * if it is a link... */ -+ if (realpath(tmdn, real_module_dir) == NULL) -+ module_dir = tmdn; -+ else -+ module_dir = real_module_dir; -+ recursive_action(module_dir, TRUE, FALSE, FALSE, -+ check_module_name_match, 0, m_fullName, 0); -+ free(tmdn); -+ } -+ -+ /* Check if we have found anything yet */ -+ if (m_filename == 0 || ((fp = fopen(m_filename, "r")) == NULL)) { -+ char module_dir[FILENAME_MAX]; -+ -+ free(m_filename); -+ m_filename = 0; -+ if (realpath (_PATH_MODULES, module_dir) == NULL) -+ strcpy(module_dir, _PATH_MODULES); -+ /* No module found under /lib/modules/`uname -r`, this -+ * time cast the net a bit wider. Search /lib/modules/ */ -+ if (!recursive_action(module_dir, TRUE, FALSE, FALSE, -+ check_module_name_match, 0, m_fullName, 0) -+ ) { -+ if (m_filename == 0 -+ || ((fp = fopen(m_filename, "r")) == NULL) -+ ) { -+ bb_error_msg("%s: no module by that name found", m_fullName); -+#if ENABLE_FEATURE_CLEAN_UP -+ if(fp) -+ fclose(fp); -+ free(m_filename); -+#endif -+ } -+ } else -+ bb_error_msg_and_die("%s: no module by that name found", m_fullName); -+ } -+ } else -+ m_filename = xstrdup(argv[1]); -+#endif -+ - /* Rest is options */ - options = xstrdup(""); -+ argv++; - while (*++argv) { - int optlen = strlen(options); - options = xrealloc(options, optlen + 2 + strlen(*argv) + 2); -@@ -4300,13 +4375,13 @@ - } - #else - len = MAXINT(ssize_t); -- map = xmalloc_open_read_close(filename, &len); -+ map = xmalloc_open_read_close(m_filename, &len); - #endif - - ret = syscall(__NR_init_module, map, len, options); - if (ret != 0) { - bb_perror_msg_and_die("cannot insert '%s': %s (%li)", -- filename, moderror(errno), ret); -+ m_filename, moderror(errno), ret); - } - - return 0; |