Ticket #5619: busybox-1.14.3.patch

File busybox-1.14.3.patch, 9.9 KB (added by acoul <alex at ozo.com>, 9 years ago)
  • Makefile

    diff -Nru busybox/Makefile busybox.new/Makefile
    old new  
    88include $(TOPDIR)/rules.mk 
    99 
    1010PKG_NAME:=busybox 
    11 PKG_VERSION:=1.13.4 
     11PKG_VERSION:=1.14.3 
    1212PKG_RELEASE:=1 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
    1515PKG_SOURCE_URL:=http://www.busybox.net/downloads \ 
    1616                http://distfiles.gentoo.org/distfiles/ 
    17 PKG_MD5SUM:=8a5eb7f15d4077d18fa97bda7a4e5412 
     17PKG_MD5SUM:=d170bf5f97a41aec3a505eab690d5699 
    1818 
    1919include $(INCLUDE_DIR)/package.mk 
    2020 
  • patches/001-init_avoid_loop_opening_tty.patch

    diff -Nru busybox/patches/001-init_avoid_loop_opening_tty.patch busybox.new/patches/001-init_avoid_loop_opening_tty.patch
    old new  
    1 --- a/init/init.c 
    2 +++ b/init/init.c 
    3 @@ -497,12 +497,11 @@ static void run_actions(int action_type) 
    4         for (a = init_action_list; a; a = tmp) { 
    5                 tmp = a->next; 
    6                 if (a->action_type & action_type) { 
    7 -                       // Pointless: run() will error out if open of device fails. 
    8 -                       ///* a->terminal of "" means "init's console" */ 
    9 -                       //if (a->terminal[0] && access(a->terminal, R_OK | W_OK)) { 
    10 -                       //      //message(L_LOG | L_CONSOLE, "Device %s cannot be opened in RW mode", a->terminal /*, strerror(errno)*/); 
    11 -                       //      delete_init_action(a); 
    12 -                       //} else 
    13 +                       /* a->terminal of "" means "init's console" */ 
    14 +                       if (a->terminal[0] && access(a->terminal, R_OK | W_OK)) { 
    15 +                               //message(L_LOG | L_CONSOLE, "Device %s cannot be opened in RW mode", a->terminal /*, strerror(errno)*/); 
    16 +                               delete_init_action(a); 
    17 +                       } else 
    18                         if (a->action_type & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) { 
    19                                 waitfor(run(a)); 
    20                                 delete_init_action(a); 
  • patches/200-etc_crontabs.patch

    diff -Nru busybox/patches/200-etc_crontabs.patch busybox.new/patches/200-etc_crontabs.patch
    old new  
    1 --- a/miscutils/crond.c 
    2 +++ b/miscutils/crond.c 
    3 @@ -24,7 +24,7 @@ 
    4   
    5   
    6  #ifndef CRONTABS 
    7 -#define CRONTABS        "/var/spool/cron/crontabs" 
    8 +#define CRONTABS        "/etc/crontabs" 
    9  #endif 
    10  #ifndef TMPDIR 
    11  #define TMPDIR          "/var/spool/cron" 
    12 --- a/miscutils/crontab.c 
    13 +++ b/miscutils/crontab.c 
    14 @@ -13,7 +13,7 @@ 
    15  #include "libbb.h" 
    16   
    17  #ifndef CRONTABS 
    18 -#define CRONTABS        "/var/spool/cron/crontabs" 
    19 +#define CRONTABS        "/etc/crontabs" 
    20  #endif 
    21  #ifndef CRONUPDATE 
    22  #define CRONUPDATE      "cron.update" 
     1--- busybox-1.14.3/scripts/defconfig.old        2009-08-05 14:30:41.642554187 +0300 
     2+++ busybox-1.14.3/scripts/defconfig    2009-08-05 14:33:18.960179006 +0300 
     3@@ -566,7 +566,7 @@ 
     4 CONFIG_CROND=y 
     5 CONFIG_FEATURE_CROND_D=y 
     6 CONFIG_FEATURE_CROND_CALL_SENDMAIL=y 
     7-CONFIG_FEATURE_CROND_DIR="/var/spool/cron" 
     8+CONFIG_FEATURE_CROND_DIR="/etc/crontabs" 
     9 CONFIG_CRONTAB=y 
     10 CONFIG_DC=y 
     11 CONFIG_FEATURE_DC_LIBM=y 
  • patches/243-udhcpc_changed_ifindex.patch

    diff -Nru busybox/patches/243-udhcpc_changed_ifindex.patch busybox.new/patches/243-udhcpc_changed_ifindex.patch
    old new  
    1 --- a/networking/udhcp/dhcpc.c 
    2 +++ b/networking/udhcp/dhcpc.c 
    3 @@ -320,6 +320,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c 
    4         for (;;) { 
    5                 unsigned timestamp_before_wait; 
     1--- busybox-1.14.3/networking/udhcp/dhcpc.c.old 2009-08-05 14:38:06.539303907 +0300 
     2+++ busybox-1.14.3/networking/udhcp/dhcpc.c     2009-08-05 14:39:36.846178568 +0300 
     3@@ -327,6 +327,12 @@ 
     4                /* silence "uninitialized!" warning */ 
     5                unsigned timestamp_before_wait = timestamp_before_wait; 
    66  
    7 +               /* When running on a bridge, the ifindex may have changed (e.g. if 
    8 +                * member interfaces were added/removed or if the status of the 
    9 +                * bridge changed). 
    10 +                * Workaround: refresh it here before processing the next packet */ 
    11 +               udhcp_read_interface(client_config.interface, &client_config.ifindex, NULL, client_config.arp); 
     7+                /* When running on a bridge, the ifindex may have changed (e.g. if 
     8+                * member interfaces were added/removed or if the status of the 
     9+                * bridge changed). 
     10+                * Workaround: refresh it here before processing the next packet */ 
     11+                udhcp_read_interface(client_config.interface, &client_config.ifindex, NULL, client_config.arp); 
    1212+ 
    13                 if (listen_mode != LISTEN_NONE && sockfd < 0) { 
    14                         if (listen_mode == LISTEN_KERNEL) 
    15                                 sockfd = udhcp_listen_socket(/*INADDR_ANY,*/ CLIENT_PORT, client_config.interface); 
     13                //bb_error_msg("sockfd:%d, listen_mode:%d", sockfd, listen_mode); 
     14  
     15                /* Was opening raw or udp socket here 
  • patches/350-httpd_redir.patch

    diff -Nru busybox/patches/350-httpd_redir.patch busybox.new/patches/350-httpd_redir.patch
    old new  
    2121        USE_FEATURE_HWCLOCK_LONG_OPTIONS( \ 
    2222--- a/networking/httpd.c 
    2323+++ b/networking/httpd.c 
    24 @@ -248,6 +248,8 @@ struct globals { 
     24@@ -248,6 +248,8 @@ 
    2525  
    2626        const char *found_mime_type; 
    2727        const char *found_moved_temporarily; 
     
    3030        Htaccess_IP *ip_a_d;    /* config allow/deny lines */ 
    3131  
    3232        USE_FEATURE_HTTPD_BASIC_AUTH(const char *g_realm;) 
    33 @@ -295,6 +297,8 @@ struct globals { 
     33@@ -294,6 +296,8 @@ 
    3434 #define index_page        (G.index_page       ) 
    3535 #define found_mime_type   (G.found_mime_type  ) 
    3636 #define found_moved_temporarily (G.found_moved_temporarily) 
     
    3939 #define last_mod          (G.last_mod         ) 
    4040 #define ip_a_d            (G.ip_a_d           ) 
    4141 #define g_realm           (G.g_realm          ) 
    42 @@ -1003,8 +1007,11 @@ static void send_headers(int responseNum 
     42@@ -993,8 +997,11 @@ 
    4343        } 
    4444 #endif 
    4545        if (responseNum == HTTP_MOVED_TEMPORARILY) { 
     
    5252                                (g_query ? "?" : ""), 
    5353                                (g_query ? g_query : "")); 
    5454        } 
    55 @@ -1939,8 +1946,12 @@ static void handle_incoming_and_exit(con 
     55@@ -1925,8 +1932,12 @@ 
    5656        } while (*++tptr); 
    5757        *++urlp = '\0';       /* terminate after last character */ 
    5858  
     
    6666                if (is_directory(urlcopy + 1, 1, &sb)) { 
    6767                        found_moved_temporarily = urlcopy; 
    6868                } 
    69 @@ -2293,7 +2304,9 @@ static void sighup_handler(int sig) 
    70  #endif 
     69@@ -2273,7 +2284,9 @@ 
     70 } 
    7171  
    7272 enum { 
    7373-       c_opt_config_file = 0, 
     
    7777        d_opt_decode_url, 
    7878        h_opt_home_httpd, 
    7979        USE_FEATURE_HTTPD_ENCODE_URL_STR(e_opt_encode_url,) 
    80 @@ -2342,12 +2355,13 @@ int httpd_main(int argc UNUSED_PARAM, ch 
     80@@ -2322,12 +2335,13 @@ 
    8181        /* We do not "absolutize" path given by -h (home) opt. 
    8282         * If user gives relative path in -h, 
    8383         * $SCRIPT_FILENAME will not be set. */ 
     
    8989                        USE_FEATURE_HTTPD_SETUID("u:") 
    9090                        "p:ifv", 
    9191+                       &redirect_path, &redirect_host, 
    92                         &configFile, &url_for_decode, &home_httpd 
     92                        &opt_c_configFile, &url_for_decode, &home_httpd 
    9393                        USE_FEATURE_HTTPD_ENCODE_URL_STR(, &url_for_encode) 
    9494                        USE_FEATURE_HTTPD_BASIC_AUTH(, &g_realm) 
  • patches/470-insmod_search.patch

    diff -Nru busybox/patches/470-insmod_search.patch busybox.new/patches/470-insmod_search.patch
    old new  
    1 --- a/modutils/insmod.c 
    2 +++ b/modutils/insmod.c 
     1--- busybox-1.14.3/modutils/insmod.c.orig       2009-08-02 21:16:36.000000000 +0300 
     2+++ busybox-1.14.3/modutils/insmod.c    2009-08-05 14:52:29.931223194 +0300 
    33@@ -9,6 +9,99 @@ 
    44  
    55 #include "libbb.h" 
     
    100100  
    101101 int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 
    102102 int insmod_main(int argc UNUSED_PARAM, char **argv) 
    103 @@ -25,9 +118,14 @@ int insmod_main(int argc UNUSED_PARAM, c 
     103@@ -33,9 +126,14 @@ 
    104104        if (!filename) 
    105105                bb_show_usage(); 
    106106  
    107107-       rc = bb_init_module(filename, parse_cmdline_module_options(argv)); 
    108 +       rc = find_module(filename); 
    109 +       if (rc || (g_filename == NULL)) 
    110 +                       goto done; 
    111 + 
    112 +       rc = bb_init_module(g_filename, parse_cmdline_module_options(argv)); 
     108+        rc = find_module(filename); 
     109+        if (rc || (g_filename == NULL)) 
     110+                        goto done; 
     111+   
     112+        rc = bb_init_module(g_filename, parse_cmdline_module_options(argv)); 
    113113        if (rc) 
    114                 bb_error_msg("cannot insert '%s': %s", filename, moderror(rc)); 
     114                bb_error_msg("can't insert '%s': %s", filename, moderror(rc)); 
    115115- 
    116 +       free (g_filename); 
    117 +done: 
     116+        free (g_filename); 
     117+  done: 
    118118        return rc; 
    119119 } 
  • patches/530-watchdog_fix.patch

    diff -Nru busybox/patches/530-watchdog_fix.patch busybox.new/patches/530-watchdog_fix.patch
    old new  
    1 --- a/miscutils/watchdog.c 
    2 +++ b/miscutils/watchdog.c 
    3 @@ -10,7 +10,8 @@ 
    4   */ 
    5   
    6  #include "libbb.h" 
    7 -#include "linux/watchdog.h" 
    8 +#include <linux/types.h> 
    9 +#include <linux/watchdog.h> 
    10   
    11  #define OPT_FOREGROUND  (1 << 0) 
    12  #define OPT_STIMER      (1 << 1) 
  • patches/901-df_human_readable.patch

    diff -Nru busybox/patches/901-df_human_readable.patch busybox.new/patches/901-df_human_readable.patch
    old new  
    1 --- a/coreutils/df.c 
    2 +++ b/coreutils/df.c 
    3 @@ -53,8 +53,8 @@ int df_main(int argc, char **argv) 
    4                 OPT_ALL   = (1 << 2) * ENABLE_FEATURE_DF_FANCY, 
    5                 OPT_INODE = (1 << 3) * ENABLE_FEATURE_DF_FANCY, 
    6                 OPT_BSIZE = (1 << 4) * ENABLE_FEATURE_DF_FANCY, 
    7 -               OPT_HUMAN = (1 << 5) * ENABLE_FEATURE_HUMAN_READABLE, 
    8 -               OPT_MEGA  = (1 << 6) * ENABLE_FEATURE_HUMAN_READABLE, 
    9 +               OPT_HUMAN = (1 << (2 + 3*ENABLE_FEATURE_DF_FANCY)) * ENABLE_FEATURE_HUMAN_READABLE, 
    10 +               OPT_MEGA  = (1 << (3 + 3*ENABLE_FEATURE_DF_FANCY)) * ENABLE_FEATURE_HUMAN_READABLE, 
    11         }; 
    12         const char *disp_units_hdr = NULL; 
    13         char *chp;