aboutsummaryrefslogtreecommitdiffstats
path: root/package/busybox/patches
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2010-08-15 20:28:05 +0000
committerNicolas Thill <nico@openwrt.org>2010-08-15 20:28:05 +0000
commiteff931f7d04ccafce57577ea427ee203f5ba63aa (patch)
tree64a21ffaee38c196263d4bceaf9b547c17e6b65a /package/busybox/patches
parent2f75adb30214b53b778a58a24304c26a2284fb80 (diff)
downloadmaster-187ad058-eff931f7d04ccafce57577ea427ee203f5ba63aa.tar.gz
master-187ad058-eff931f7d04ccafce57577ea427ee203f5ba63aa.tar.bz2
master-187ad058-eff931f7d04ccafce57577ea427ee203f5ba63aa.zip
package/busybox: add missing bits from 1.17.1 update (mostly config stuff), rename upstream patches so they're applied first
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22665 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/busybox/patches')
-rw-r--r--package/busybox/patches/000-autoconf.patch11
-rw-r--r--package/busybox/patches/000-upstream-mktemp.patch (renamed from package/busybox/patches/920-mktemp.patch)0
-rw-r--r--package/busybox/patches/000-upstream-sed.patch (renamed from package/busybox/patches/921-sed.patch)0
-rw-r--r--package/busybox/patches/000-upstream-shell.patch (renamed from package/busybox/patches/922-shell.patch)0
-rw-r--r--package/busybox/patches/241-udhcpc-oversized_packets.patch40
-rw-r--r--package/busybox/patches/250-ash_export-n.patch4
-rw-r--r--package/busybox/patches/300-netmsg.patch31
-rw-r--r--package/busybox/patches/310-passwd_access.patch2
-rw-r--r--package/busybox/patches/340-lock_util.patch2
-rw-r--r--package/busybox/patches/350-httpd_redir.patch19
-rw-r--r--package/busybox/patches/470-insmod_search.patch2
-rw-r--r--package/busybox/patches/510-awk_include.patch19
-rw-r--r--package/busybox/patches/610-syslog-remote-retry-connection.patch28
-rw-r--r--package/busybox/patches/803-id_getgrouplist.patch4
14 files changed, 92 insertions, 70 deletions
diff --git a/package/busybox/patches/000-autoconf.patch b/package/busybox/patches/000-autoconf.patch
new file mode 100644
index 0000000000..d237457348
--- /dev/null
+++ b/package/busybox/patches/000-autoconf.patch
@@ -0,0 +1,11 @@
+--- a/applets/Kbuild.src
++++ b/applets/Kbuild.src
+@@ -28,7 +28,7 @@ HOSTCFLAGS_usage_pod.o = -I$(srctree_sla
+ applets/applets.o: include/usage_compressed.h include/applet_tables.h
+
+ applets/applet_tables: .config include/applets.h
+-applets/usage: .config include/applets.h
++applets/usage: .config include/applets.h include/autoconf.h
+ applets/usage_pod: .config include/applet_tables.h include/applets.h
+
+ quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
diff --git a/package/busybox/patches/920-mktemp.patch b/package/busybox/patches/000-upstream-mktemp.patch
index a7727ca81f..a7727ca81f 100644
--- a/package/busybox/patches/920-mktemp.patch
+++ b/package/busybox/patches/000-upstream-mktemp.patch
diff --git a/package/busybox/patches/921-sed.patch b/package/busybox/patches/000-upstream-sed.patch
index 7693d626ff..7693d626ff 100644
--- a/package/busybox/patches/921-sed.patch
+++ b/package/busybox/patches/000-upstream-sed.patch
diff --git a/package/busybox/patches/922-shell.patch b/package/busybox/patches/000-upstream-shell.patch
index 4f0058e38a..4f0058e38a 100644
--- a/package/busybox/patches/922-shell.patch
+++ b/package/busybox/patches/000-upstream-shell.patch
diff --git a/package/busybox/patches/241-udhcpc-oversized_packets.patch b/package/busybox/patches/241-udhcpc-oversized_packets.patch
index b810752fcb..ef9e7f4be1 100644
--- a/package/busybox/patches/241-udhcpc-oversized_packets.patch
+++ b/package/busybox/patches/241-udhcpc-oversized_packets.patch
@@ -12,7 +12,7 @@
/* Construct a ip/udp header for a packet, send packet */
int FAST_FUNC udhcp_send_raw_packet(struct dhcp_packet *dhcp_pkt,
uint32_t source_nip, int source_port,
-@@ -173,11 +178,12 @@ int FAST_FUNC udhcp_send_raw_packet(stru
+@@ -173,10 +178,10 @@ int FAST_FUNC udhcp_send_raw_packet(stru
{
struct sockaddr_ll dest_sll;
struct ip_udp_dhcp_packet packet;
@@ -20,27 +20,36 @@
int fd;
int result = -1;
const char *msg;
-
+ int p_len = udhcp_get_payload_len(dhcp_pkt);
-+
+
fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
if (fd < 0) {
- msg = "socket(%s)";
-@@ -186,7 +192,7 @@ int FAST_FUNC udhcp_send_raw_packet(stru
+@@ -185,8 +190,8 @@ int FAST_FUNC udhcp_send_raw_packet(stru
+ }
memset(&dest_sll, 0, sizeof(dest_sll));
- memset(&packet, 0, offsetof(struct ip_udp_dhcp_packet, data));
+- memset(&packet, 0, offsetof(struct ip_udp_dhcp_packet, data));
- packet.data = *dhcp_pkt; /* struct copy */
++ memset(&packet, 0, sizeof(packet));
+ memcpy(&(packet.data), dhcp_pkt, p_len);
dest_sll.sll_family = AF_PACKET;
dest_sll.sll_protocol = htons(ETH_P_IP);
-@@ -208,27 +214,25 @@ int FAST_FUNC udhcp_send_raw_packet(stru
- * In order to work with those buggy servers,
- * we truncate packets after end option byte.
- */
-- padding = DHCP_OPTIONS_BUFSIZE - 1 - udhcp_end_option(packet.data.options);
+@@ -199,36 +204,24 @@ int FAST_FUNC udhcp_send_raw_packet(stru
+ goto ret_close;
+ }
+- /* We were sending full-sized DHCP packets (zero padded),
+- * but some badly configured servers were seen dropping them.
+- * Apparently they drop all DHCP packets >576 *ethernet* octets big,
+- * whereas they may only drop packets >576 *IP* octets big
+- * (which for typical Ethernet II means 590 octets: 6+6+2 + 576).
+- *
+- * In order to work with those buggy servers,
+- * we truncate packets after end option byte.
+- */
+- padding = DHCP_OPTIONS_BUFSIZE - 1 - udhcp_end_option(packet.data.options);
+-
packet.ip.protocol = IPPROTO_UDP;
packet.ip.saddr = source_nip;
packet.ip.daddr = dest_nip;
@@ -65,11 +74,11 @@
udhcp_dump_packet(dhcp_pkt);
- result = sendto(fd, &packet, IP_UPD_DHCP_SIZE - padding, /*flags:*/ 0,
-+ result = sendto(fd, &packet, p_len, 0,
++ result = sendto(fd, &packet, p_len, /*flags:*/ 0,
(struct sockaddr *) &dest_sll, sizeof(dest_sll));
msg = "sendto";
ret_close:
-@@ -246,7 +250,6 @@ int FAST_FUNC udhcp_send_kernel_packet(s
+@@ -246,7 +239,6 @@ int FAST_FUNC udhcp_send_kernel_packet(s
uint32_t dest_nip, int dest_port)
{
struct sockaddr_in client;
@@ -77,10 +86,11 @@
int fd;
int result = -1;
const char *msg;
-@@ -278,8 +281,7 @@ int FAST_FUNC udhcp_send_kernel_packet(s
+@@ -277,9 +269,7 @@ int FAST_FUNC udhcp_send_kernel_packet(s
+ }
udhcp_dump_packet(dhcp_pkt);
-
+-
- padding = DHCP_OPTIONS_BUFSIZE - 1 - udhcp_end_option(dhcp_pkt->options);
- result = safe_write(fd, dhcp_pkt, DHCP_SIZE - padding);
+ result = safe_write(fd, dhcp_pkt, udhcp_get_payload_len(dhcp_pkt));
diff --git a/package/busybox/patches/250-ash_export-n.patch b/package/busybox/patches/250-ash_export-n.patch
index 48efdcf942..9c23920b88 100644
--- a/package/busybox/patches/250-ash_export-n.patch
+++ b/package/busybox/patches/250-ash_export-n.patch
@@ -1,6 +1,6 @@
--- a/shell/ash.c
+++ b/shell/ash.c
-@@ -12428,8 +12428,17 @@ exportcmd(int argc UNUSED_PARAM, char **
+@@ -12429,8 +12429,17 @@ exportcmd(int argc UNUSED_PARAM, char **
const char *p;
char **aptr;
int flag = argv[0][0] == 'r' ? VREADONLY : VEXPORT;
@@ -19,7 +19,7 @@
aptr = argptr;
name = *aptr;
if (name) {
-@@ -12441,10 +12450,12 @@ exportcmd(int argc UNUSED_PARAM, char **
+@@ -12442,10 +12451,12 @@ exportcmd(int argc UNUSED_PARAM, char **
vp = *findvar(hashvar(name), name);
if (vp) {
vp->flags |= flag;
diff --git a/package/busybox/patches/300-netmsg.patch b/package/busybox/patches/300-netmsg.patch
index 7e48930bbc..b7dd5d9869 100644
--- a/package/busybox/patches/300-netmsg.patch
+++ b/package/busybox/patches/300-netmsg.patch
@@ -8,18 +8,6 @@
IF_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_DROP))
IF_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_DROP))
IF_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_DROP))
---- a/include/usage.src.h
-+++ b/include/usage.src.h
-@@ -2961,6 +2961,9 @@ INSERT
- " or\n" \
- "$ nameif -c /etc/my_mactab_file\n" \
-
-+#define netmsg_trivial_usage NOUSAGE_STR
-+#define netmsg_full_usage ""
-+
- #define netstat_trivial_usage \
- "[-laentuwxr"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]"
- #define netstat_full_usage "\n\n" \
--- a/networking/Config.src
+++ b/networking/Config.src
@@ -623,6 +623,12 @@ config FEATURE_NAMEIF_EXTENDED
@@ -30,7 +18,7 @@
+ bool "netmsg"
+ default n
+ help
-+ simple program for sending udp broadcast messages
++ simple program for sending udp broadcast messages
+
config NETSTAT
bool "netstat"
@@ -111,3 +99,20 @@
+ close(s);
+ exit(1);
+}
+--- a/include/usage.src.h
++++ b/include/usage.src.h
+@@ -1,3 +1,4 @@
++
+ /* vi: set sw=8 ts=8: */
+ /*
+ * This file suffers from chronically incorrect tabification
+@@ -2961,6 +2962,9 @@ INSERT
+ " or\n" \
+ "$ nameif -c /etc/my_mactab_file\n" \
+
++#define netmsg_trivial_usage NOUSAGE_STR
++#define netmsg_full_usage ""
++
+ #define netstat_trivial_usage \
+ "[-laentuwxr"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]"
+ #define netstat_full_usage "\n\n" \
diff --git a/package/busybox/patches/310-passwd_access.patch b/package/busybox/patches/310-passwd_access.patch
index 24241c1260..5faf6faf19 100644
--- a/package/busybox/patches/310-passwd_access.patch
+++ b/package/busybox/patches/310-passwd_access.patch
@@ -3,7 +3,7 @@
--- a/networking/httpd.c
+++ b/networking/httpd.c
-@@ -1717,21 +1717,32 @@ static int check_user_passwd(const char
+@@ -1717,21 +1717,32 @@ static int check_user_passwd(const char
if (ENABLE_FEATURE_HTTPD_AUTH_MD5) {
char *md5_passwd;
diff --git a/package/busybox/patches/340-lock_util.patch b/package/busybox/patches/340-lock_util.patch
index b974b04469..473d1b9ac1 100644
--- a/package/busybox/patches/340-lock_util.patch
+++ b/package/busybox/patches/340-lock_util.patch
@@ -10,7 +10,7 @@
IF_LOGNAME(APPLET_NOFORK(logname, logname, _BB_DIR_USR_BIN, _BB_SUID_DROP, logname))
--- a/include/usage.src.h
+++ b/include/usage.src.h
-@@ -2319,6 +2319,9 @@ INSERT
+@@ -2320,6 +2320,9 @@ INSERT
#define loadkmap_example_usage \
"$ loadkmap < /etc/i18n/lang-keymap\n"
diff --git a/package/busybox/patches/350-httpd_redir.patch b/package/busybox/patches/350-httpd_redir.patch
index 2bd569c296..7437d898c2 100644
--- a/package/busybox/patches/350-httpd_redir.patch
+++ b/package/busybox/patches/350-httpd_redir.patch
@@ -1,6 +1,6 @@
--- a/include/usage.src.h
+++ b/include/usage.src.h
-@@ -1718,7 +1718,8 @@ INSERT
+@@ -1719,7 +1719,8 @@ INSERT
IF_FEATURE_HTTPD_SETUID(" [-u USER[:GRP]]") \
IF_FEATURE_HTTPD_BASIC_AUTH(" [-r REALM]") \
" [-h HOME]\n" \
@@ -10,16 +10,15 @@
#define httpd_full_usage "\n\n" \
"Listen for incoming HTTP requests\n" \
"\nOptions:" \
-@@ -2321,6 +2322,9 @@ INSERT
+@@ -1737,6 +1738,8 @@ INSERT
+ "\n -m STRING MD5 crypt STRING") \
+ "\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 lock_trivial_usage NOUSAGE_STR
- #define lock_full_usage ""
-+
-+#define lock_trivial_usage NOUSAGE_STR
-+#define lock_full_usage ""
-
- #define logger_trivial_usage \
- "[OPTIONS] [MESSAGE]"
+ #define hwclock_trivial_usage \
+ IF_FEATURE_HWCLOCK_LONG_OPTIONS( \
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -250,6 +250,8 @@ struct globals {
diff --git a/package/busybox/patches/470-insmod_search.patch b/package/busybox/patches/470-insmod_search.patch
index ef170a20c8..8f52d985f7 100644
--- a/package/busybox/patches/470-insmod_search.patch
+++ b/package/busybox/patches/470-insmod_search.patch
@@ -124,7 +124,7 @@
string "Default directory containing modules"
default "/lib/modules"
- depends on DEPMOD || MODPROBE || MODPROBE_SMALL || MODINFO
-+ depends on DEPMOD || MODPROBE || MODPROBE_SMALL || MODINFO || INSMOD
++ depends on DEPMOD || INSMOD || MODPROBE || MODPROBE_SMALL || MODINFO
help
Directory that contains kernel modules.
Defaults to "/lib/modules"
diff --git a/package/busybox/patches/510-awk_include.patch b/package/busybox/patches/510-awk_include.patch
index 36dd080f97..07f28c9de1 100644
--- a/package/busybox/patches/510-awk_include.patch
+++ b/package/busybox/patches/510-awk_include.patch
@@ -1,6 +1,11 @@
--- a/editors/awk.c
+++ b/editors/awk.c
-@@ -70,9 +70,14 @@ typedef struct chain_s {
+@@ -1,3 +1,4 @@
++
+ /* vi: set sw=4 ts=4: */
+ /*
+ * awk implementation for busybox
+@@ -70,9 +71,14 @@ typedef struct chain_s {
} chain;
/* Function */
@@ -15,7 +20,7 @@
} func;
/* I/O stream */
-@@ -1453,7 +1458,8 @@ static void parse_program(char *p)
+@@ -1453,7 +1459,8 @@ static void parse_program(char *p)
next_token(TC_FUNCTION);
g_pos++;
f = newfunc(t_string);
@@ -25,7 +30,7 @@
f->nargs = 0;
while (next_token(TC_VARIABLE | TC_SEQTERM) & TC_VARIABLE) {
v = findvar(ahash, t_string);
-@@ -1462,7 +1468,7 @@ static void parse_program(char *p)
+@@ -1462,7 +1469,7 @@ static void parse_program(char *p)
if (next_token(TC_COMMA | TC_SEQTERM) & TC_SEQTERM)
break;
}
@@ -34,7 +39,7 @@
chain_group();
clear_array(ahash);
-@@ -2547,7 +2553,8 @@ static var *evaluate(node *op, var *res)
+@@ -2547,7 +2554,8 @@ static var *evaluate(node *op, var *res)
var *vbeg, *v;
const char *sv_progname;
@@ -44,7 +49,7 @@
syntax_error(EMSG_UNDEF_FUNC);
vbeg = v = nvalloc(op->r.f->nargs + 1);
-@@ -2564,7 +2571,10 @@ static var *evaluate(node *op, var *res)
+@@ -2564,7 +2572,10 @@ static var *evaluate(node *op, var *res)
fnargs = vbeg;
sv_progname = g_progname;
@@ -56,7 +61,7 @@
g_progname = sv_progname;
nvfree(fnargs);
-@@ -2942,6 +2952,143 @@ static rstream *next_input_file(void)
+@@ -2942,6 +2953,143 @@ static rstream *next_input_file(void)
#undef files_happen
}
@@ -200,7 +205,7 @@
int awk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int awk_main(int argc, char **argv)
{
-@@ -3007,6 +3154,9 @@ int awk_main(int argc, char **argv)
+@@ -3007,6 +3155,9 @@ int awk_main(int argc, char **argv)
*s1 = '=';
}
}
diff --git a/package/busybox/patches/610-syslog-remote-retry-connection.patch b/package/busybox/patches/610-syslog-remote-retry-connection.patch
index 949ac9fd47..94cd3ded04 100644
--- a/package/busybox/patches/610-syslog-remote-retry-connection.patch
+++ b/package/busybox/patches/610-syslog-remote-retry-connection.patch
@@ -1,34 +1,26 @@
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
-@@ -98,6 +98,8 @@ struct globals {
- GLOBALS
-
- #if ENABLE_FEATURE_REMOTE_LOG
-+ len_and_sockaddr *remoteAddr;
-+ int remoteFD;
- llist_t *remoteHosts;
- #endif
- #if ENABLE_FEATURE_IPC_SYSLOG
-@@ -554,6 +556,7 @@ static void do_syslogd(void) NORETURN;
- static void do_syslogd(void)
+@@ -555,6 +555,7 @@ static void do_syslogd(void)
{
int sock_fd;
-+ int send_err = 0;
#if ENABLE_FEATURE_REMOTE_LOG
++ int send_err = 0;
llist_t *item;
#endif
-@@ -637,10 +640,23 @@ static void do_syslogd(void)
+ #if ENABLE_FEATURE_SYSLOGD_DUP
+@@ -636,11 +637,23 @@ static void do_syslogd(void)
+ if (rh->remoteFD == -1)
continue;
}
- /* Send message to remote logger, ignore possible error */
+- /* Send message to remote logger, ignore possible error */
- /* TODO: on some errors, close and set G.remoteFD to -1
- * so that DNS resolution and connect is retried? */
- sendto(rh->remoteFD, recvbuf, sz+1, MSG_DONTWAIT,
- &(rh->remoteAddr->u.sa), rh->remoteAddr->len);
++ /* Send message to remote logger */
+ if (sendto(rh->remoteFD, recvbuf, sz+1, MSG_DONTWAIT,
-+ &G.remoteAddr->u.sa, G.remoteAddr->len) == -1 ) {
++ &(rh->remoteAddr->u.sa), rh->remoteAddr->len) == -1)
+ send_err = errno;
-+ }
+
+ /* On some errors, close and set G.remoteFD to -1
+ * so that DNS resolution and connect is retried */
@@ -38,8 +30,8 @@
+ case EISCONN:
+ case ENOTCONN:
+ case EPIPE:
-+ close(G.remoteFD);
-+ G.remoteFD = -1;
++ close(rh->remoteFD);
++ rh->remoteFD = -1;
+ break;
+ }
}
diff --git a/package/busybox/patches/803-id_getgrouplist.patch b/package/busybox/patches/803-id_getgrouplist.patch
index 48aa57c04f..dd2dee66f6 100644
--- a/package/busybox/patches/803-id_getgrouplist.patch
+++ b/package/busybox/patches/803-id_getgrouplist.patch
@@ -31,7 +31,7 @@ Signed-off-by: Nicolas Thill <nico@openwrt.org>
/* I guess *n < 0 might indicate error. Anyway,
* malloc'ing -1 bytes won't be good, so: */
//if (*n < 0)
-@@ -154,6 +160,7 @@ int id_main(int argc UNUSED_PARAM, char
+@@ -154,6 +160,7 @@ int id_main(int argc UNUSED_PARAM, char
if (egid != rgid)
status |= print_group(egid, " ");
}
@@ -39,7 +39,7 @@ Signed-off-by: Nicolas Thill <nico@openwrt.org>
/* We are supplying largish buffer, trying
* to not run get_groups() twice. That might be slow
* ("user database in remote SQL server" case) */
-@@ -181,6 +188,7 @@ int id_main(int argc UNUSED_PARAM, char
+@@ -181,6 +188,7 @@ int id_main(int argc UNUSED_PARAM, char
}
if (ENABLE_FEATURE_CLEAN_UP)
free(groups);