diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-01-14 00:18:27 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-01-14 00:18:27 +0000 |
commit | 3a4e0d4002e89ab8c57e13abc2686c3be55e01b8 (patch) | |
tree | 178488437c87f719bb8829bdccbd1696d59cbb47 /sys-apps/busybox | |
parent | Switch github to https instead of ssh. (diff) | |
download | gentoo-2-3a4e0d4002e89ab8c57e13abc2686c3be55e01b8.tar.gz gentoo-2-3a4e0d4002e89ab8c57e13abc2686c3be55e01b8.tar.bz2 gentoo-2-3a4e0d4002e89ab8c57e13abc2686c3be55e01b8.zip |
Add some patches from upstream.
(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'sys-apps/busybox')
-rw-r--r-- | sys-apps/busybox/ChangeLog | 8 | ||||
-rw-r--r-- | sys-apps/busybox/busybox-1.22.0.ebuild | 4 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.22.0-find.patch | 40 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.22.0-grep.patch | 80 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.22.0-lineedit.patch | 12 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.22.0-ntpd.patch | 11 |
6 files changed, 152 insertions, 3 deletions
diff --git a/sys-apps/busybox/ChangeLog b/sys-apps/busybox/ChangeLog index 7c0b10a720f1..ce03f504ee1f 100644 --- a/sys-apps/busybox/ChangeLog +++ b/sys-apps/busybox/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/busybox # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.363 2014/01/01 17:18:40 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.364 2014/01/14 00:18:27 vapier Exp $ + + 14 Jan 2014; Mike Frysinger <vapier@gentoo.org> + +files/busybox-1.22.0-find.patch, +files/busybox-1.22.0-grep.patch, + +files/busybox-1.22.0-lineedit.patch, +files/busybox-1.22.0-ntpd.patch, + busybox-1.22.0.ebuild: + Add some patches from upstream. *busybox-1.22.0 (01 Jan 2014) diff --git a/sys-apps/busybox/busybox-1.22.0.ebuild b/sys-apps/busybox/busybox-1.22.0.ebuild index df8ea8906216..018e40582f37 100644 --- a/sys-apps/busybox/busybox-1.22.0.ebuild +++ b/sys-apps/busybox/busybox-1.22.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.22.0.ebuild,v 1.1 2014/01/01 17:18:40 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.22.0.ebuild,v 1.2 2014/01/14 00:18:27 vapier Exp $ # See `man savedconfig.eclass` for info on how to use USE=savedconfig. @@ -66,7 +66,7 @@ src_prepare() { # patches go here! epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch - #epatch "${FILESDIR}"/${P}-*.patch + epatch "${FILESDIR}"/${P}-*.patch cp "${FILESDIR}"/ginit.c init/ || die # flag cleanup diff --git a/sys-apps/busybox/files/busybox-1.22.0-find.patch b/sys-apps/busybox/files/busybox-1.22.0-find.patch new file mode 100644 index 000000000000..75a06a85880f --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.22.0-find.patch @@ -0,0 +1,40 @@ +--- busybox-1.22.0/findutils/find.c ++++ busybox-1.22.0-find/findutils/find.c +@@ -1291,9 +1291,27 @@ int find_main(int argc, char **argv) MAI + int find_main(int argc UNUSED_PARAM, char **argv) + { + int i, firstopt, status = EXIT_SUCCESS; ++ char **past_HLP, *saved; + + INIT_G(); + ++ /* "find -type f" + getopt("+HLP") => disaster. ++ * Need to avoid getopt running into a non-HLP option. ++ * Do this by temporarily storing NULL there: ++ */ ++ past_HLP = argv; ++ for (;;) { ++ saved = *++past_HLP; ++ if (!saved) ++ break; ++ if (saved[0] != '-') ++ break; ++ if (!saved[1]) ++ break; /* it is "-" */ ++ if ((saved+1)[strspn(saved+1, "HLP")] != '\0') ++ break; ++ } ++ *past_HLP = NULL; + /* "+": stop on first non-option */ + i = getopt32(argv, "+HLP"); + if (i & (1<<0)) +@@ -1301,7 +1319,8 @@ int find_main(int argc UNUSED_PARAM, cha + if (i & (1<<1)) + G.recurse_flags |= ACTION_FOLLOWLINKS | ACTION_DANGLING_OK; + /* -P is default and is ignored */ +- argv += optind; ++ argv = past_HLP; /* same result as "argv += optind;" */ ++ *past_HLP = saved; + + for (firstopt = 0; argv[firstopt]; firstopt++) { + if (argv[firstopt][0] == '-') diff --git a/sys-apps/busybox/files/busybox-1.22.0-grep.patch b/sys-apps/busybox/files/busybox-1.22.0-grep.patch new file mode 100644 index 000000000000..053245d9e34a --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.22.0-grep.patch @@ -0,0 +1,80 @@ +--- busybox-1.22.0/findutils/grep.c ++++ busybox-1.22.0-grep/findutils/grep.c +@@ -373,6 +373,9 @@ static int grep_file(FILE *file) + opt_f_not_found: ; + } + } else { ++#if ENABLE_EXTRA_COMPAT ++ unsigned start_pos; ++#endif + char *match_at; + + if (!(gl->flg_mem_alocated_compiled & COMPILED)) { +@@ -389,15 +392,18 @@ static int grep_file(FILE *file) + #if !ENABLE_EXTRA_COMPAT + gl->matched_range.rm_so = 0; + gl->matched_range.rm_eo = 0; ++#else ++ start_pos = 0; + #endif + match_at = line; + opt_w_again: ++//bb_error_msg("'%s' start_pos:%d line_len:%d", match_at, start_pos, line_len); + if ( + #if !ENABLE_EXTRA_COMPAT + regexec(&gl->compiled_regex, match_at, 1, &gl->matched_range, 0) == 0 + #else + re_search(&gl->compiled_regex, match_at, line_len, +- /*start:*/ 0, /*range:*/ line_len, ++ start_pos, /*range:*/ line_len, + &gl->matched_range) >= 0 + #endif + ) { +@@ -416,8 +422,24 @@ static int grep_file(FILE *file) + if (!c || (!isalnum(c) && c != '_')) { + found = 1; + } else { +- match_at += gl->matched_range.rm_eo; +- goto opt_w_again; ++ /* ++ * Why check gl->matched_range.rm_eo? ++ * Zero-length match makes -w skip the line: ++ * "echo foo | grep ^" prints "foo", ++ * "echo foo | grep -w ^" prints nothing. ++ * Without such check, we can loop forever. ++ */ ++#if !ENABLE_EXTRA_COMPAT ++ if (gl->matched_range.rm_eo != 0) { ++ match_at += gl->matched_range.rm_eo; ++ goto opt_w_again; ++ } ++#else ++ if (gl->matched_range.rm_eo > start_pos) { ++ start_pos = gl->matched_range.rm_eo; ++ goto opt_w_again; ++ } ++#endif + } + } + } +--- busybox-1.22.0/testsuite/grep.tests ++++ busybox-1.22.0-grep/testsuite/grep.tests +@@ -147,6 +147,18 @@ testing "grep -w doesn't stop on 1st mis + "foop foo\n" \ + "" + ++testing "grep -w ^str doesn't match str not at the beginning" \ ++ "grep -w ^str input" \ ++ "" \ ++ "strstr\n" \ ++ "" ++ ++testing "grep -w ^ doesn't hang" \ ++ "grep -w ^ input" \ ++ "" \ ++ "anything\n" \ ++ "" ++ + # testing "test name" "commands" "expected result" "file input" "stdin" + # file input will be file called "input" + # test can create a file "actual" instead of writing to stdout diff --git a/sys-apps/busybox/files/busybox-1.22.0-lineedit.patch b/sys-apps/busybox/files/busybox-1.22.0-lineedit.patch new file mode 100644 index 000000000000..e4143140d656 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.22.0-lineedit.patch @@ -0,0 +1,12 @@ +--- busybox-1.22.0/libbb/lineedit.c ++++ busybox-1.22.0-lineedit/libbb/lineedit.c +@@ -1255,7 +1255,9 @@ line_input_t* FAST_FUNC new_line_input_t + { + line_input_t *n = xzalloc(sizeof(*n)); + n->flags = flags; ++#if MAX_HISTORY > 0 + n->max_history = MAX_HISTORY; ++#endif + return n; + } + diff --git a/sys-apps/busybox/files/busybox-1.22.0-ntpd.patch b/sys-apps/busybox/files/busybox-1.22.0-ntpd.patch new file mode 100644 index 000000000000..1334f577e6a2 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.22.0-ntpd.patch @@ -0,0 +1,11 @@ +--- busybox-1.22.0/networking/ntpd.c ++++ busybox-1.22.0-ntpd/networking/ntpd.c +@@ -1445,6 +1445,8 @@ update_local_clock(peer_t *p) + + run_script("step", offset); + ++ recv_time += offset; ++ + #if USING_INITIAL_FREQ_ESTIMATION + if (G.discipline_state == STATE_NSET) { + set_new_values(STATE_FREQ, /*offset:*/ 0, recv_time); |