aboutsummaryrefslogtreecommitdiffstats
path: root/package/busybox/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-10-05 00:27:49 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-10-05 00:27:49 +0000
commitf6327aee6385ead5f58362516cfc2032e4208b55 (patch)
tree4d2e182e425873bcf891efcd1b3af569a158bedc /package/busybox/patches
parent7d70e0ec58f7124bb4bc6cceadeffab92007e522 (diff)
downloadupstream-f6327aee6385ead5f58362516cfc2032e4208b55.tar.gz
upstream-f6327aee6385ead5f58362516cfc2032e4208b55.tar.bz2
upstream-f6327aee6385ead5f58362516cfc2032e4208b55.zip
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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9130 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/busybox/patches')
-rw-r--r--package/busybox/patches/000-autoconf.patch21
-rw-r--r--package/busybox/patches/110-wget_getopt_fix.patch24
-rw-r--r--package/busybox/patches/130-drop_werror.patch13
-rw-r--r--package/busybox/patches/243-udhcpc_changed_ifindex.patch14
-rw-r--r--package/busybox/patches/250-ash_export-n.patch48
-rw-r--r--package/busybox/patches/260-broadcast_plus.patch29
-rw-r--r--package/busybox/patches/270-ash_performance.patch30
-rw-r--r--package/busybox/patches/280-printf.patch18
-rw-r--r--package/busybox/patches/310-passwd_access.patch20
-rw-r--r--package/busybox/patches/330-httpd_user_agent.patch29
-rw-r--r--package/busybox/patches/350-httpd_redir.patch137
-rw-r--r--package/busybox/patches/360-awk_multi_f.patch72
-rw-r--r--package/busybox/patches/400-revert_awk_getopt.patch103
-rw-r--r--package/busybox/patches/401-darwin_includes.patch32
-rw-r--r--package/busybox/patches/410-httpd_cgi_headers.patch42
-rw-r--r--package/busybox/patches/420-httpd_sendcgi_fix.patch18
-rw-r--r--package/busybox/patches/440-httpd_chdir.patch29
-rw-r--r--package/busybox/patches/440-usage_compressed_fix.patch12
-rw-r--r--package/busybox/patches/450-truncated_ping_results.patch33
-rw-r--r--package/busybox/patches/450-usage_compressed_fix.patch12
-rw-r--r--package/busybox/patches/460-httpd_cgi_bin.patch15
-rw-r--r--package/busybox/patches/460-truncated_ping_results.patch40
-rw-r--r--package/busybox/patches/470-insmod_search.patch488
-rw-r--r--package/busybox/patches/500-ipkg.patch (renamed from package/busybox/patches/911-ipkg.patch)400
-rw-r--r--package/busybox/patches/501-libbb_hash.patch (renamed from package/busybox/patches/913-libbb_hash.patch)50
-rw-r--r--package/busybox/patches/510-awx.patch (renamed from package/busybox/patches/920-awx.patch)205
-rw-r--r--package/busybox/patches/999-insmod2.6_search.patch196
27 files changed, 1104 insertions, 1026 deletions
diff --git a/package/busybox/patches/000-autoconf.patch b/package/busybox/patches/000-autoconf.patch
index d19cf0ce53..52fd92a631 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 fd530df9d3..657f83a71a 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 cd3a67b5d8..0000000000
--- 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 3a9517418f..b304604232 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 b5a8794f5a..8ee2aee5ef 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 60b2afc242..0000000000
--- 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 eff7a5bb11..0000000000
--- 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 d8442dc575..0000000000
--- 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 22e6abcb01..b8c8db7387 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 d9fa874af5..0000000000
--- 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 d8f430b89d..7cb82461b7 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 0000000000..8f738a6ffb
--- /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 33c6790fe1..0000000000
--- 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 f563e10863..6506f279b5 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 98f094ee58..cfbbed6234 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 9998cc2455..0000000000
--- 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 8ef70b84d3..b3eb3081c6 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 c9e29cec00..0000000000
--- 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 34582c2ba9..0000000000
--- 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 0000000000..3a9d2ad9e8
--- /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 d21c518348..0000000000
--- 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 0000000000..e655acfdf2
--- /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 0000000000..26c5650eb6
--- /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 d96063b233..a18616261e 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 e371b32838..c6c36fc355 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 2abab323e5..571b32397d 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 5a93b02887..0000000000
--- 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;