diff options
author | Magnus Kroken <mkroken@gmail.com> | 2017-08-23 23:13:34 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2017-08-30 22:34:41 +0200 |
commit | 89f8a01daba938e77e94ef311233be49c23a7a55 (patch) | |
tree | 927ba3ca70a8549b446a565c8f20353b9866a86e /package/utils/busybox/patches | |
parent | 9adfeccd8415ed7e999855539a5fca9bfc9a3e4b (diff) | |
download | upstream-89f8a01daba938e77e94ef311233be49c23a7a55.tar.gz upstream-89f8a01daba938e77e94ef311233be49c23a7a55.tar.bz2 upstream-89f8a01daba938e77e94ef311233be49c23a7a55.zip |
busybox: update to 1.27.2
Refresh patches, delete patches backported from upstream.
This fixes ntpd sync issues (ntpd would not sync if the first provided
peer address was unreachable).
Signed-off-by: Magnus Kroken <mkroken@gmail.com>
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Diffstat (limited to 'package/utils/busybox/patches')
8 files changed, 5 insertions, 315 deletions
diff --git a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch deleted file mode 100644 index 682a68eebd..0000000000 --- a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/util-linux/mount.c -+++ b/util-linux/mount.c -@@ -245,9 +245,6 @@ - #if ENABLE_FEATURE_MOUNT_NFS - /* This is just a warning of a common mistake. Possibly this should be a - * uclibc faq entry rather than in busybox... */ --# if defined(__UCLIBC__) && ! defined(__UCLIBC_HAS_RPC__) --# error "You need to build uClibc with UCLIBC_HAS_RPC for NFS support" --# endif - # include <rpc/rpc.h> - # include <rpc/pmap_prot.h> - # include <rpc/pmap_clnt.h> diff --git a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch index 8ef8f2211b..5f64c19d05 100644 --- a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch +++ b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -704,6 +704,7 @@ static int bcast_or_ucast(struct dhcp_pa +@@ -706,6 +706,7 @@ static int bcast_or_ucast(struct dhcp_pa static NOINLINE int send_discover(uint32_t xid, uint32_t requested) { struct dhcp_packet packet; @@ -8,7 +8,7 @@ /* Fill in: op, htype, hlen, cookie, chaddr fields, * random xid field (we override it below), -@@ -721,6 +722,7 @@ static NOINLINE int send_discover(uint32 +@@ -723,6 +724,7 @@ static NOINLINE int send_discover(uint32 */ add_client_options(&packet); diff --git a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch index f5e3a075ae..727f69409c 100644 --- a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch +++ b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -1439,6 +1439,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c +@@ -1442,6 +1442,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c /* silence "uninitialized!" warning */ unsigned timestamp_before_wait = timestamp_before_wait; diff --git a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch index 3df8d930b1..7b77d2970b 100644 --- a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch +++ b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -1110,7 +1110,6 @@ static void perform_renew(void) +@@ -1112,7 +1112,6 @@ static void perform_renew(void) state = RENEW_REQUESTED; break; case RENEW_REQUESTED: /* impatient are we? fine, square 1 */ diff --git a/package/utils/busybox/patches/301-ip-link-fix-netlink-msg-size.patch b/package/utils/busybox/patches/301-ip-link-fix-netlink-msg-size.patch index 360324bf7c..ca76c44cc8 100644 --- a/package/utils/busybox/patches/301-ip-link-fix-netlink-msg-size.patch +++ b/package/utils/busybox/patches/301-ip-link-fix-netlink-msg-size.patch @@ -1,6 +1,6 @@ --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c -@@ -470,7 +470,7 @@ static int do_add_or_delete(char **argv, +@@ -598,7 +598,7 @@ static int do_add_or_delete(char **argv, } xrtnl_open(&rth); ll_init_map(&rth); diff --git a/package/utils/busybox/patches/302-ip-rule-add-suppress-prefixlength.patch b/package/utils/busybox/patches/302-ip-rule-add-suppress-prefixlength.patch deleted file mode 100644 index 7b4797505e..0000000000 --- a/package/utils/busybox/patches/302-ip-rule-add-suppress-prefixlength.patch +++ /dev/null @@ -1,145 +0,0 @@ -From dbac30c3784c267bbe44a2a3ebed4e827c8fe82a Mon Sep 17 00:00:00 2001 -From: Stefan Tomanek <stefan.tomanek@wertarbyte.de> -Date: Tue, 13 Jun 2017 19:06:09 +0200 -Subject: [PATCH] ip rule: add suppress_{prefixlength,ifgroup} options - -(cherry-picked from 192dce4b84fb32346ebc5194de7daa5da3b8d1b4) - -function old new delta -iprule_modify 816 887 +71 -print_rule 610 680 +70 ------------------------------------------------------------------------------- -(add/remove: 0/0 grow/shrink: 2/0 up/down: 141/0) Total: 141 bytes - -Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de> -Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> ---- - networking/libiproute/iprule.c | 73 ++++++++++++++++++++++++++---------------- - 1 file changed, 46 insertions(+), 27 deletions(-) - ---- a/networking/libiproute/iprule.c -+++ b/networking/libiproute/iprule.c -@@ -17,25 +17,32 @@ - #include <netinet/ip.h> - #include <arpa/inet.h> - -+/* from <linux/fib_rules.h>: */ -+#define FRA_SUPPRESS_IFGROUP 13 -+#define FRA_SUPPRESS_PREFIXLEN 14 -+ - #include "ip_common.h" /* #include "libbb.h" is inside */ - #include "rt_names.h" - #include "utils.h" - --/* --static void usage(void) __attribute__((noreturn)); -- --static void usage(void) --{ -- fprintf(stderr, "Usage: ip rule [ list | add | del ] SELECTOR ACTION\n"); -- fprintf(stderr, "SELECTOR := [ from PREFIX ] [ to PREFIX ] [ tos TOS ] [ fwmark FWMARK ]\n"); -- fprintf(stderr, " [ dev STRING ] [ pref NUMBER ]\n"); -- fprintf(stderr, "ACTION := [ table TABLE_ID ] [ nat ADDRESS ]\n"); -- fprintf(stderr, " [ prohibit | reject | unreachable ]\n"); -- fprintf(stderr, " [ realms [SRCREALM/]DSTREALM ]\n"); -- fprintf(stderr, "TABLE_ID := [ local | main | default | NUMBER ]\n"); -- exit(-1); --} --*/ -+/* If you add stuff here, update iprule_full_usage */ -+static const char keywords[] ALIGN1 = -+ "from\0""to\0""preference\0""order\0""priority\0" -+ "tos\0""fwmark\0""realms\0""table\0""lookup\0" -+ "suppress_prefixlength\0""suppress_ifgroup\0" -+ "dev\0""iif\0""nat\0""map-to\0""type\0""help\0" -+ ; -+#define keyword_preference (keywords + sizeof("from") + sizeof("to")) -+#define keyword_fwmark (keyword_preference + sizeof("preference") + sizeof("order") + sizeof("priority") + sizeof("tos")) -+#define keyword_realms (keyword_fwmark + sizeof("fwmark")) -+#define keyword_suppress_prefixlength (keyword_realms + sizeof("realms") + sizeof("table") + sizeof("lookup")) -+#define keyword_suppress_ifgroup (keyword_suppress_prefixlength + sizeof("suppress_prefixlength")) -+enum { -+ ARG_from = 1, ARG_to, ARG_preference, ARG_order, ARG_priority, -+ ARG_tos, ARG_fwmark, ARG_realms, ARG_table, ARG_lookup, -+ ARG_suppress_prefixlength, ARG_suppress_ifgroup, -+ ARG_dev, ARG_iif, ARG_nat, ARG_map_to, ARG_type, ARG_help, -+}; - - static int FAST_FUNC print_rule(const struct sockaddr_nl *who UNUSED_PARAM, - struct nlmsghdr *n, void *arg UNUSED_PARAM) -@@ -119,6 +126,17 @@ static int FAST_FUNC print_rule(const st - else if (r->rtm_table) - printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table)); - -+ if (tb[FRA_SUPPRESS_PREFIXLEN]) { -+ int pl = *(uint32_t*)RTA_DATA(tb[FRA_SUPPRESS_PREFIXLEN]); -+ if (pl != -1) -+ printf("%s %d ", keyword_suppress_prefixlength, pl); -+ } -+ if (tb[FRA_SUPPRESS_IFGROUP]) { -+ int grp = *(uint32_t*)RTA_DATA(tb[FRA_SUPPRESS_IFGROUP]); -+ if (grp != -1) -+ printf("%s %d ", keyword_suppress_ifgroup, grp); -+ } -+ - if (tb[RTA_FLOW]) { - uint32_t to = *(uint32_t*)RTA_DATA(tb[RTA_FLOW]); - uint32_t from = to>>16; -@@ -174,15 +192,6 @@ static int iprule_list(char **argv) - /* Return value becomes exitcode. It's okay to not return at all */ - static int iprule_modify(int cmd, char **argv) - { -- static const char keywords[] ALIGN1 = -- "from\0""to\0""preference\0""order\0""priority\0" -- "tos\0""fwmark\0""realms\0""table\0""lookup\0""dev\0" -- "iif\0""nat\0""map-to\0""type\0""help\0"; -- enum { -- ARG_from = 1, ARG_to, ARG_preference, ARG_order, ARG_priority, -- ARG_tos, ARG_fwmark, ARG_realms, ARG_table, ARG_lookup, ARG_dev, -- ARG_iif, ARG_nat, ARG_map_to, ARG_type, ARG_help -- }; - bool table_ok = 0; - struct rtnl_handle rth; - struct { -@@ -232,7 +241,7 @@ static int iprule_modify(int cmd, char * - ) { - uint32_t pref; - NEXT_ARG(); -- pref = get_u32(*argv, "preference"); -+ pref = get_u32(*argv, keyword_preference); - addattr32(&req.n, sizeof(req), RTA_PRIORITY, pref); - } else if (key == ARG_tos) { - uint32_t tos; -@@ -243,13 +252,13 @@ static int iprule_modify(int cmd, char * - } else if (key == ARG_fwmark) { - uint32_t fwmark; - NEXT_ARG(); -- fwmark = get_u32(*argv, "fwmark"); -+ fwmark = get_u32(*argv, keyword_fwmark); - addattr32(&req.n, sizeof(req), RTA_PROTOINFO, fwmark); - } else if (key == ARG_realms) { - uint32_t realm; - NEXT_ARG(); - if (get_rt_realms(&realm, *argv)) -- invarg_1_to_2(*argv, "realms"); -+ invarg_1_to_2(*argv, keyword_realms); - addattr32(&req.n, sizeof(req), RTA_FLOW, realm); - } else if (key == ARG_table || - key == ARG_lookup -@@ -265,6 +274,16 @@ static int iprule_modify(int cmd, char * - addattr32(&req.n, sizeof(req), RTA_TABLE, tid); - } - table_ok = 1; -+ } else if (key == ARG_suppress_prefixlength) { -+ int prefix_length; -+ NEXT_ARG(); -+ prefix_length = get_u32(*argv, keyword_suppress_prefixlength); -+ addattr32(&req.n, sizeof(req), FRA_SUPPRESS_PREFIXLEN, prefix_length); -+ } else if (key == ARG_suppress_ifgroup) { -+ int grp; -+ NEXT_ARG(); -+ grp = get_u32(*argv, keyword_suppress_ifgroup); -+ addattr32(&req.n, sizeof(req), FRA_SUPPRESS_IFGROUP, grp); - } else if (key == ARG_dev || - key == ARG_iif - ) { diff --git a/package/utils/busybox/patches/401-vi-don-t-touch-file-with-x-when-modified_count-0.patch b/package/utils/busybox/patches/401-vi-don-t-touch-file-with-x-when-modified_count-0.patch deleted file mode 100644 index e83999d303..0000000000 --- a/package/utils/busybox/patches/401-vi-don-t-touch-file-with-x-when-modified_count-0.patch +++ /dev/null @@ -1,100 +0,0 @@ -From e88608eae24ae5934034e1ecb6c494fefbf1b9ae Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko <vda.linux@googlemail.com> -Date: Mon, 13 Mar 2017 20:50:42 +0100 -Subject: [PATCH 1/2] vi: don't touch file with :x when modified_count == 0 - -Along with it, there are other changes - - - Check for uppercase X is removed as the expression will be always false and - :X itself is another totally different command in standard vim - - The status line will show number of written lines instead of lines requested - by the colon command. This is also how the standard vim is doing, though - the difference is that '!' has to be explicitly specified in vim to allow - partial writes - -Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> -Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> ---- - editors/vi.c | 43 ++++++++++++++++++++++++++----------------- - 1 file changed, 26 insertions(+), 17 deletions(-) - ---- a/editors/vi.c -+++ b/editors/vi.c -@@ -1038,7 +1038,9 @@ static void colon(char *buf) - || strncmp(p, "wn", cnt) == 0 - || (p[0] == 'x' && !p[1]) - ) { -- cnt = file_write(current_filename, text, end - 1); -+ if (modified_count != 0 || p[0] != 'x') { -+ cnt = file_write(current_filename, text, end - 1); -+ } - if (cnt < 0) { - if (cnt == -1) - status_line_bold("Write error: %s", strerror(errno)); -@@ -1049,8 +1051,9 @@ static void colon(char *buf) - current_filename, - count_lines(text, end - 1), cnt - ); -- if (p[0] == 'x' || p[1] == 'q' || p[1] == 'n' -- || p[0] == 'X' || p[1] == 'Q' || p[1] == 'N' -+ if (p[0] == 'x' -+ || p[1] == 'q' || p[1] == 'n' -+ || p[1] == 'Q' || p[1] == 'N' - ) { - editing = 0; - } -@@ -1480,16 +1483,19 @@ static void colon(char *buf) - goto ret; - } - #endif -- // how many lines in text[]? -- li = count_lines(q, r); -- size = r - q + 1; - //if (useforce) { - // if "fn" is not write-able, chmod u+w - // sprintf(syscmd, "chmod u+w %s", fn); - // system(syscmd); - // forced = TRUE; - //} -- l = file_write(fn, q, r); -+ if (modified_count != 0 || cmd[0] != 'x') { -+ size = r - q + 1; -+ l = file_write(fn, q, r); -+ } else { -+ size = 0; -+ l = 0; -+ } - //if (useforce && forced) { - // chmod u-w - // sprintf(syscmd, "chmod u-w %s", fn); -@@ -1500,17 +1506,20 @@ static void colon(char *buf) - if (l == -1) - status_line_bold_errno(fn); - } else { -+ // how many lines written -+ li = count_lines(q, q + l - 1); - status_line("'%s' %dL, %dC", fn, li, l); -- if (q == text && r == end - 1 && l == size) { -- modified_count = 0; -- last_modified_count = -1; -- } -- if ((cmd[0] == 'x' || cmd[1] == 'q' || cmd[1] == 'n' -- || cmd[0] == 'X' || cmd[1] == 'Q' || cmd[1] == 'N' -- ) -- && l == size -- ) { -- editing = 0; -+ if (l == size) { -+ if (q == text && q + l == end) { -+ modified_count = 0; -+ last_modified_count = -1; -+ } -+ if (cmd[0] == 'x' -+ || cmd[1] == 'q' || cmd[1] == 'n' -+ || cmd[1] == 'Q' || cmd[1] == 'N' -+ ) { -+ editing = 0; -+ } - } - } - #if ENABLE_FEATURE_VI_YANKMARK diff --git a/package/utils/busybox/patches/402-vi-avoid-touching-a-new-file-with-ZZ-when-no-editing.patch b/package/utils/busybox/patches/402-vi-avoid-touching-a-new-file-with-ZZ-when-no-editing.patch deleted file mode 100644 index b56cf735c2..0000000000 --- a/package/utils/busybox/patches/402-vi-avoid-touching-a-new-file-with-ZZ-when-no-editing.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 8f3bf4f0d3605b50a8e4c48c89aeabc455f04884 Mon Sep 17 00:00:00 2001 -From: Yousong Zhou <yszhou4tech@gmail.com> -Date: Fri, 24 Mar 2017 21:13:10 +0100 -Subject: [PATCH 2/2] vi: avoid touching a new file with ZZ when no editing has - been done - -This is the behaviour observed with standard vim and busybox vi of at -least 1.22.1. It was changed with commit "32afd3a vi: some -simplifications" which happened before 1.23.0. - -Mistyping filename on command line happens fairly often and it's better -we restore the old behaviour to avoid a few unnecessary flash writes and -sometimes efforts of debugging bugs caused by those unneeded stray -files. - -Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> -Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> ---- - editors/vi.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - ---- a/editors/vi.c -+++ b/editors/vi.c -@@ -719,14 +719,6 @@ static int init_text_buffer(char *fn) - { - int rc; - -- flush_undo_data(); -- modified_count = 0; -- last_modified_count = -1; --#if ENABLE_FEATURE_VI_YANKMARK -- /* init the marks */ -- memset(mark, 0, sizeof(mark)); --#endif -- - /* allocate/reallocate text buffer */ - free(text); - text_size = 10240; -@@ -741,6 +733,14 @@ static int init_text_buffer(char *fn) - // file doesnt exist. Start empty buf with dummy line - char_insert(text, '\n', NO_UNDO); - } -+ -+ flush_undo_data(); -+ modified_count = 0; -+ last_modified_count = -1; -+#if ENABLE_FEATURE_VI_YANKMARK -+ /* init the marks */ -+ memset(mark, 0, sizeof(mark)); -+#endif - return rc; - } - |