From e04ef05dcda39b81b1c23d0644038b930f5d42c4 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti de Araujo Date: Thu, 5 Nov 2009 18:11:13 -0300 Subject: [PATCH 030/118] busybox-1.14.3: adding more upstream patches From http://busybox.net/downloads/fixes-1.14.3/ Signed-off-by: Ricardo Salveti de Araujo --- .../busybox-1.14.3/busybox-1.14.3-ash.patch | 12 ++++ .../busybox-1.14.3/busybox-1.14.3-httpd.patch | 61 ++++++++++++++++++++ .../busybox-1.14.3/busybox-1.14.3-modprobe.patch | 11 ++++ .../busybox-1.14.3-trylink-gc-sections.patch | 15 +++++ recipes/busybox/busybox_1.14.3.bb | 6 ++- 5 files changed, 104 insertions(+), 1 deletions(-) create mode 100644 recipes/busybox/busybox-1.14.3/busybox-1.14.3-ash.patch create mode 100644 recipes/busybox/busybox-1.14.3/busybox-1.14.3-httpd.patch create mode 100644 recipes/busybox/busybox-1.14.3/busybox-1.14.3-modprobe.patch create mode 100644 recipes/busybox/busybox-1.14.3/busybox-1.14.3-trylink-gc-sections.patch diff --git a/recipes/busybox/busybox-1.14.3/busybox-1.14.3-ash.patch b/recipes/busybox/busybox-1.14.3/busybox-1.14.3-ash.patch new file mode 100644 index 0000000..589542b --- /dev/null +++ b/recipes/busybox/busybox-1.14.3/busybox-1.14.3-ash.patch @@ -0,0 +1,12 @@ +diff -urpN busybox-1.14.3/shell/ash.c busybox-1.14.3-ash/shell/ash.c +--- busybox-1.14.3/shell/ash.c 2009-08-02 20:16:37.000000000 +0200 ++++ busybox-1.14.3-ash/shell/ash.c 2009-09-12 16:03:28.000000000 +0200 +@@ -5786,7 +5786,7 @@ argstr(char *p, int flag, struct strlist + }; + const char *reject = spclchars; + int c; +- int quotes = flag & (EXP_FULL | EXP_CASE); /* do CTLESC */ ++ int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); /* do CTLESC */ + int breakall = flag & EXP_WORD; + int inquotes; + size_t length; diff --git a/recipes/busybox/busybox-1.14.3/busybox-1.14.3-httpd.patch b/recipes/busybox/busybox-1.14.3/busybox-1.14.3-httpd.patch new file mode 100644 index 0000000..1ba1207 --- /dev/null +++ b/recipes/busybox/busybox-1.14.3/busybox-1.14.3-httpd.patch @@ -0,0 +1,61 @@ +diff -urpN busybox-1.14.3/networking/httpd.c busybox-1.14.3-httpd/networking/httpd.c +--- busybox-1.14.3/networking/httpd.c 2009-08-02 20:16:36.000000000 +0200 ++++ busybox-1.14.3-httpd/networking/httpd.c 2009-09-09 01:54:40.000000000 +0200 +@@ -2101,8 +2101,12 @@ static void handle_incoming_and_exit(con + } + send_cgi_and_exit(urlcopy, prequest, length, cookie, content_type); + } ++#endif ++ ++ if (urlp[-1] == '/') ++ strcpy(urlp, index_page); ++ if (stat(tptr, &sb) == 0) { + #if ENABLE_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR +- { + char *suffix = strrchr(tptr, '.'); + if (suffix) { + Htaccess *cur; +@@ -2112,16 +2116,7 @@ static void handle_incoming_and_exit(con + } + } + } +- } + #endif +- if (prequest != request_GET && prequest != request_HEAD) { +- send_headers_and_exit(HTTP_NOT_IMPLEMENTED); +- } +-#endif /* FEATURE_HTTPD_CGI */ +- +- if (urlp[-1] == '/') +- strcpy(urlp, index_page); +- if (stat(tptr, &sb) == 0) { + file_size = sb.st_size; + last_mod = sb.st_mtime; + } +@@ -2135,19 +2130,18 @@ static void handle_incoming_and_exit(con + send_cgi_and_exit("/cgi-bin/index.cgi", prequest, length, cookie, content_type); + } + } +-#endif +- /* else { +- * fall through to send_file, it errors out if open fails +- * } +- */ ++ /* else fall through to send_file, it errors out if open fails: */ + ++ if (prequest != request_GET && prequest != request_HEAD) { ++ /* POST for files does not make sense */ ++ send_headers_and_exit(HTTP_NOT_IMPLEMENTED); ++ } + send_file_and_exit(tptr, +-#if ENABLE_FEATURE_HTTPD_CGI + (prequest != request_HEAD ? SEND_HEADERS_AND_BODY : SEND_HEADERS) ++ ); + #else +- SEND_HEADERS_AND_BODY ++ send_file_and_exit(tptr, SEND_HEADERS_AND_BODY); + #endif +- ); + } + + /* diff --git a/recipes/busybox/busybox-1.14.3/busybox-1.14.3-modprobe.patch b/recipes/busybox/busybox-1.14.3/busybox-1.14.3-modprobe.patch new file mode 100644 index 0000000..24f04d3 --- /dev/null +++ b/recipes/busybox/busybox-1.14.3/busybox-1.14.3-modprobe.patch @@ -0,0 +1,11 @@ +diff -urpN busybox-1.14.3/modutils/modprobe-small.c busybox-1.14.3-modprobe/modutils/modprobe-small.c +--- busybox-1.14.3/modutils/modprobe-small.c 2009-08-02 20:16:36.000000000 +0200 ++++ busybox-1.14.3-modprobe/modutils/modprobe-small.c 2009-09-09 01:55:27.000000000 +0200 +@@ -218,6 +218,7 @@ static void parse_module(module_info *in + bksp(); /* remove last ' ' */ + appendc('\0'); + info->aliases = copy_stringbuf(); ++ replace(info->aliases, '-', '_'); + + /* "dependency1 depandency2" */ + reset_stringbuf(); diff --git a/recipes/busybox/busybox-1.14.3/busybox-1.14.3-trylink-gc-sections.patch b/recipes/busybox/busybox-1.14.3/busybox-1.14.3-trylink-gc-sections.patch new file mode 100644 index 0000000..52a7aef --- /dev/null +++ b/recipes/busybox/busybox-1.14.3/busybox-1.14.3-trylink-gc-sections.patch @@ -0,0 +1,15 @@ +diff -urpN busybox-1.14.3/scripts/trylink busybox-1.14.3-trylink-gc-sections/scripts/trylink +--- busybox-1.14.3/scripts/trylink 2009-08-02 20:16:36.000000000 +0200 ++++ busybox-1.14.3-trylink-gc-sections/scripts/trylink 2009-09-09 01:53:45.000000000 +0200 +@@ -99,6 +99,11 @@ else + fi + )` + ++# The --gc-sections option is not supported by older versions of ld ++if test -n "$GC_SECTIONS"; then ++ GC_SECTIONS=`check_cc "$GC_SECTIONS" ""` ++fi ++ + # Sanitize lib list (dups, extra spaces etc) + LDLIBS=`echo "$LDLIBS" | xargs -n1 | sort | uniq | xargs` + diff --git a/recipes/busybox/busybox_1.14.3.bb b/recipes/busybox/busybox_1.14.3.bb index 8d45e1e..4ea8e8d 100644 --- a/recipes/busybox/busybox_1.14.3.bb +++ b/recipes/busybox/busybox_1.14.3.bb @@ -1,10 +1,14 @@ require busybox.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" DEFAULT_PREFERENCE = "-1" SRC_URI = "\ http://www.busybox.net/downloads/busybox-${PV}.tar.gz;name=tarball \ + file://busybox-1.14.3-ash.patch;patch=1 \ + file://busybox-1.14.3-httpd.patch;patch=1 \ + file://busybox-1.14.3-modprobe.patch;patch=1 \ + file://busybox-1.14.3-trylink-gc-sections.patch;patch=1 \ \ file://udhcpscript.patch;patch=1 \ file://udhcpc-fix-nfsroot.patch;patch=1 \ -- 1.6.3.3