diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2014-01-22 10:39:46 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-02 11:22:12 +0000 |
| commit | b1ea3455379e38d4e56970505c05b4104d5f1234 (patch) | |
| tree | 0900ad3eef7a6bd6d31d18abf0ce932e819da9cb /meta | |
| parent | 47208175027686339dd18df52b60ec2c43594918 (diff) | |
| download | poky-b1ea3455379e38d4e56970505c05b4104d5f1234.tar.gz | |
busybox: upgrade to stable 1.22.1
Upgrade busybox to the stable release 1.22.1.
During this upgrade, 9 patches are removed. Reasons are detailed below.
The following 6 patches are removed as they have been merged.
meta/recipes-core/busybox/busybox/busybox-lineedit-initialize-delptr.patch
meta/recipes-core/busybox/busybox/busybox-list-suid-and-non-suid-app-configs.patch
meta/recipes-core/busybox/busybox/busybox-sed-fix-sed-clusternewline-testcase.patch
meta/recipes-core/busybox/busybox/busybox-sulogin-empty-root-password.patch
meta/recipes-core/busybox/busybox/find-get-rid-of-nested-functions.patch
meta/recipes-core/busybox/busybox/testsuite-du-du-k-works-fix-false-positive.patch
The following three patches are removed because they are mainly about moving
binaries from /bin to /usr/bin to make the update-alternative work correctly
at rootfs time. We can easily solve this problem by changing recipes. There's
no compelling reason why such patches are needed.
meta/recipes-core/busybox/busybox/run-parts.in.usr-bin.patch
meta/recipes-core/busybox/busybox/stat-usr-bin.patch
meta/recipes-core/busybox/busybox/watch.in.usr-bin.patch
(From OE-Core rev: fa282186d82e8fe3c590d4ea79e464116e5ceea2)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-core/busybox/busybox/busybox-lineedit-initialize-delptr.patch | 23 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox/busybox-list-suid-and-non-suid-app-configs.patch | 179 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox/busybox-sed-fix-sed-clusternewline-testcase.patch | 262 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox/busybox-sulogin-empty-root-password.patch | 58 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox/find-get-rid-of-nested-functions.patch | 117 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox/run-parts.in.usr-bin.patch | 29 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox/stat-usr-bin.patch | 21 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox/testsuite-du-du-k-works-fix-false-positive.patch | 35 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox/watch.in.usr-bin.patch | 29 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox_1.22.1.bb (renamed from meta/recipes-core/busybox/busybox_1.21.1.bb) | 13 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox_git.bb | 11 |
11 files changed, 4 insertions, 773 deletions
diff --git a/meta/recipes-core/busybox/busybox/busybox-lineedit-initialize-delptr.patch b/meta/recipes-core/busybox/busybox/busybox-lineedit-initialize-delptr.patch deleted file mode 100644 index e59211bd5d..0000000000 --- a/meta/recipes-core/busybox/busybox/busybox-lineedit-initialize-delptr.patch +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | Derived from: | ||
| 2 | http://git.busybox.net/busybox/commit/?id=46031da862a60422f80050a905cea0b67026b021. | ||
| 3 | |||
| 4 | In vi mode, the 'p' and 'P' commands caused a segfault when nothing had | ||
| 5 | been put in the buffer yet because the delptr was not initialized. | ||
| 6 | |||
| 7 | Upstream-Status: Backport | ||
| 8 | |||
| 9 | Signed-off-by: Shawn J. Goff <shawn7400@gmail.com> | ||
| 10 | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||
| 11 | Signed-off-by: Ming Liu <ming.liu@windriver.com> | ||
| 12 | |||
| 13 | diff -urpN a/libbb/lineedit.c b/libbb/lineedit.c | ||
| 14 | --- a/libbb/lineedit.c | ||
| 15 | +++ b/libbb/lineedit.c | ||
| 16 | @@ -187,6 +187,7 @@ extern struct lineedit_statics *const li | ||
| 17 | cmdedit_termw = 80; \ | ||
| 18 | IF_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines = 1;) \ | ||
| 19 | IF_USERNAME_OR_HOMEDIR(home_pwd_buf = (char*)null_str;) \ | ||
| 20 | + IF_FEATURE_EDITING_VI(delptr = delbuf;) \ | ||
| 21 | } while (0) | ||
| 22 | |||
| 23 | static void deinit_S(void) | ||
diff --git a/meta/recipes-core/busybox/busybox/busybox-list-suid-and-non-suid-app-configs.patch b/meta/recipes-core/busybox/busybox/busybox-list-suid-and-non-suid-app-configs.patch deleted file mode 100644 index 753a044481..0000000000 --- a/meta/recipes-core/busybox/busybox/busybox-list-suid-and-non-suid-app-configs.patch +++ /dev/null | |||
| @@ -1,179 +0,0 @@ | |||
| 1 | Make busybox have the ability to list configuration items regarding suid | ||
| 2 | apps and non-suid apps separately. | ||
| 3 | |||
| 4 | From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | ||
| 5 | Date: Mon, 17 Jun 2013 11:06:05 +0800 | ||
| 6 | Subject: [PATCH] busybox: list suid and non-suid app configs | ||
| 7 | |||
| 8 | Upstream-Status: Pending | ||
| 9 | |||
| 10 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 11 | |||
| 12 | --- | ||
| 13 | Makefile.custom | 4 ++++ | ||
| 14 | applets/busybox.mksuid | 53 ++++++++++++++++++++++++++++++++++++++++++++ | ||
| 15 | include/applets.src.h | 9 +++++++- | ||
| 16 | scripts/kconfig/confdata.c | 24 ++++++++++++++++---- | ||
| 17 | 4 files changed, 85 insertions(+), 5 deletions(-) | ||
| 18 | create mode 100644 applets/busybox.mksuid | ||
| 19 | |||
| 20 | diff --git a/Makefile.custom b/Makefile.custom | ||
| 21 | index 6da79e6..a276d6f 100644 | ||
| 22 | --- a/Makefile.custom | ||
| 23 | +++ b/Makefile.custom | ||
| 24 | @@ -4,6 +4,10 @@ | ||
| 25 | |||
| 26 | busybox.links: $(srctree)/applets/busybox.mkll $(objtree)/include/autoconf.h include/applets.h | ||
| 27 | $(Q)-$(SHELL) $^ >$@ | ||
| 28 | +busybox.cfg.suid: $(srctree)/applets/busybox.mksuid $(objtree)/include/autoconf.h include/applets.h | ||
| 29 | + $(Q)-SUID="yes" $(SHELL) $^ > $@ | ||
| 30 | +busybox.cfg.nosuid: $(srctree)/applets/busybox.mksuid $(objtree)/include/autoconf.h include/applets.h | ||
| 31 | + $(Q)-SUID="DROP" $(SHELL) $^ > $@ | ||
| 32 | |||
| 33 | .PHONY: install | ||
| 34 | ifeq ($(CONFIG_INSTALL_APPLET_SYMLINKS),y) | ||
| 35 | diff --git a/applets/busybox.mksuid b/applets/busybox.mksuid | ||
| 36 | new file mode 100644 | ||
| 37 | index 0000000..e11a7a1 | ||
| 38 | --- /dev/null | ||
| 39 | +++ b/applets/busybox.mksuid | ||
| 40 | @@ -0,0 +1,53 @@ | ||
| 41 | +#!/bin/sh | ||
| 42 | +# Make list of configuration variables regarding suid handling | ||
| 43 | + | ||
| 44 | +# input $1: full path to autoconf.h | ||
| 45 | +# input $2: full path to applets.h | ||
| 46 | +# input $3: full path to .config | ||
| 47 | +# output (stdout): list of CONFIG_ that do or may require suid | ||
| 48 | + | ||
| 49 | +# If the environment variable SUID is not set or set to DROP, | ||
| 50 | +# lists all config options that do not require suid permissions. | ||
| 51 | +# Otherwise, lists all config options for applets that DO or MAY require | ||
| 52 | +# suid permissions. | ||
| 53 | + | ||
| 54 | +# Maintainer: Bernhard Reutner-Fischer | ||
| 55 | + | ||
| 56 | +export LC_ALL=POSIX | ||
| 57 | +export LC_CTYPE=POSIX | ||
| 58 | + | ||
| 59 | +CONFIG_H=${1:-include/autoconf.h} | ||
| 60 | +APPLETS_H=${2:-include/applets.h} | ||
| 61 | +DOT_CONFIG=${3:-.config} | ||
| 62 | + | ||
| 63 | +case ${SUID:-DROP} in | ||
| 64 | + [dD][rR][oO][pP]) USE="DROP" ;; | ||
| 65 | + *) USE="suid" ;; | ||
| 66 | +esac | ||
| 67 | + | ||
| 68 | +$HOSTCC -E -DMAKE_SUID -include $CONFIG_H $APPLETS_H | | ||
| 69 | + awk -v USE=${USE} ' | ||
| 70 | + /^SUID[ \t]/{ | ||
| 71 | + if (USE == "DROP") { | ||
| 72 | + if ($2 != "BB_SUID_DROP") next | ||
| 73 | + } else { | ||
| 74 | + if ($2 == "BB_SUID_DROP") next | ||
| 75 | + } | ||
| 76 | + cfg = $NF | ||
| 77 | + gsub("\"", "", cfg) | ||
| 78 | + cfg = substr(cfg, 8) | ||
| 79 | + s[i++] = "CONFIG_" cfg | ||
| 80 | + s[i++] = "CONFIG_FEATURE_" cfg "_.*" | ||
| 81 | + } | ||
| 82 | + END{ | ||
| 83 | + while (getline < ARGV[2]) { | ||
| 84 | + for (j in s) { | ||
| 85 | + if ($0 ~ "^" s[j] "=y$") { | ||
| 86 | + sub(/=.*/, "") | ||
| 87 | |||
| 88 | + if (s[j] !~ /\*$/) delete s[j] # can drop this applet now | ||
| 89 | + } | ||
| 90 | + } | ||
| 91 | + } | ||
| 92 | + } | ||
| 93 | +' - $DOT_CONFIG | ||
| 94 | diff --git a/include/applets.src.h b/include/applets.src.h | ||
| 95 | index 02b995b..8386c84 100644 | ||
| 96 | --- a/include/applets.src.h | ||
| 97 | +++ b/include/applets.src.h | ||
| 98 | @@ -52,6 +52,12 @@ s - suid type: | ||
| 99 | # define APPLET_NOEXEC(name,main,l,s,name2) LINK l name | ||
| 100 | # define APPLET_NOFORK(name,main,l,s,name2) LINK l name | ||
| 101 | |||
| 102 | +#elif defined(MAKE_SUID) | ||
| 103 | +# define APPLET(name,l,s) SUID s l name | ||
| 104 | +# define APPLET_ODDNAME(name,main,l,s,name2) SUID s l name | ||
| 105 | +# define APPLET_NOEXEC(name,main,l,s,name2) SUID s l name | ||
| 106 | +# define APPLET_NOFORK(name,main,l,s,name2) SUID s l name | ||
| 107 | + | ||
| 108 | #else | ||
| 109 | static struct bb_applet applets[] = { /* name, main, location, need_suid */ | ||
| 110 | # define APPLET(name,l,s) { #name, #name, l, s }, | ||
| 111 | @@ -414,7 +420,8 @@ IF_YES(APPLET_NOFORK(yes, yes, BB_DIR_USR_BIN, BB_SUID_DROP, yes)) | ||
| 112 | IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, BB_DIR_BIN, BB_SUID_DROP, zcat)) | ||
| 113 | IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP)) | ||
| 114 | |||
| 115 | -#if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE) | ||
| 116 | +#if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE) \ | ||
| 117 | + && !defined(MAKE_LINKS) && !defined(MAKE_SUID) | ||
| 118 | }; | ||
| 119 | #endif | ||
| 120 | |||
| 121 | diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c | ||
| 122 | index bd2d70e..303df0b 100644 | ||
| 123 | --- a/scripts/kconfig/confdata.c | ||
| 124 | +++ b/scripts/kconfig/confdata.c | ||
| 125 | @@ -474,7 +474,11 @@ int conf_write(const char *name) | ||
| 126 | fprintf(out_h, "#define CONFIG_%s 1\n", sym->name); | ||
| 127 | /* bbox */ | ||
| 128 | fprintf(out_h, "#define ENABLE_%s 1\n", sym->name); | ||
| 129 | - fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name); | ||
| 130 | + fprintf(out_h, "#ifdef MAKE_SUID\n"); | ||
| 131 | + fprintf(out_h, "# define IF_%s(...) __VA_ARGS__ \"CONFIG_%s\"\n", sym->name, sym->name); | ||
| 132 | + fprintf(out_h, "#else\n"); | ||
| 133 | + fprintf(out_h, "# define IF_%s(...) __VA_ARGS__\n", sym->name); | ||
| 134 | + fprintf(out_h, "#endif\n"); | ||
| 135 | fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name); | ||
| 136 | } | ||
| 137 | break; | ||
| 138 | @@ -506,7 +510,11 @@ int conf_write(const char *name) | ||
| 139 | fputs("\"\n", out_h); | ||
| 140 | /* bbox */ | ||
| 141 | fprintf(out_h, "#define ENABLE_%s 1\n", sym->name); | ||
| 142 | - fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name); | ||
| 143 | + fprintf(out_h, "#ifdef MAKE_SUID\n"); | ||
| 144 | + fprintf(out_h, "# define IF_%s(...) __VA_ARGS__ \"CONFIG_%s\"\n", sym->name, sym->name); | ||
| 145 | + fprintf(out_h, "#else\n"); | ||
| 146 | + fprintf(out_h, "# define IF_%s(...) __VA_ARGS__\n", sym->name); | ||
| 147 | + fprintf(out_h, "#endif\n"); | ||
| 148 | fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name); | ||
| 149 | } | ||
| 150 | break; | ||
| 151 | @@ -518,7 +526,11 @@ int conf_write(const char *name) | ||
| 152 | fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str); | ||
| 153 | /* bbox */ | ||
| 154 | fprintf(out_h, "#define ENABLE_%s 1\n", sym->name); | ||
| 155 | - fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name); | ||
| 156 | + fprintf(out_h, "#ifdef MAKE_SUID\n"); | ||
| 157 | + fprintf(out_h, "# define IF_%s(...) __VA_ARGS__ \"CONFIG_%s\"\n", sym->name, sym->name); | ||
| 158 | + fprintf(out_h, "#else\n"); | ||
| 159 | + fprintf(out_h, "# define IF_%s(...) __VA_ARGS__\n", sym->name); | ||
| 160 | + fprintf(out_h, "#endif\n"); | ||
| 161 | fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name); | ||
| 162 | } | ||
| 163 | break; | ||
| 164 | @@ -532,7 +544,11 @@ int conf_write(const char *name) | ||
| 165 | fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str); | ||
| 166 | /* bbox */ | ||
| 167 | fprintf(out_h, "#define ENABLE_%s 1\n", sym->name); | ||
| 168 | - fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name); | ||
| 169 | + fprintf(out_h, "#ifdef MAKE_SUID\n"); | ||
| 170 | + fprintf(out_h, "# define IF_%s(...) __VA_ARGS__ \"CONFIG_%s\"\n", sym->name, sym->name); | ||
| 171 | + fprintf(out_h, "#else\n"); | ||
| 172 | + fprintf(out_h, "# define IF_%s(...) __VA_ARGS__\n", sym->name); | ||
| 173 | + fprintf(out_h, "#endif\n"); | ||
| 174 | fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name); | ||
| 175 | } | ||
| 176 | break; | ||
| 177 | -- | ||
| 178 | 1.7.9.5 | ||
| 179 | |||
diff --git a/meta/recipes-core/busybox/busybox/busybox-sed-fix-sed-clusternewline-testcase.patch b/meta/recipes-core/busybox/busybox/busybox-sed-fix-sed-clusternewline-testcase.patch deleted file mode 100644 index 1894037422..0000000000 --- a/meta/recipes-core/busybox/busybox/busybox-sed-fix-sed-clusternewline-testcase.patch +++ /dev/null | |||
| @@ -1,262 +0,0 @@ | |||
| 1 | From 6394bcf17925715db042cfb24f5886b1bed1dfc9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
| 3 | Date: Thu, 31 Oct 2013 14:36:31 +0800 | ||
| 4 | Subject: [PATCH] sed: fix "sed clusternewline" and "autoinsert newline" testcase | ||
| 5 | |||
| 6 | Upstream-Status: Backport [busybox.net] | ||
| 7 | |||
| 8 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
| 9 | --- | ||
| 10 | editors/sed.c | 135 ++++++++++++++++++++++++++-------------------------- | ||
| 11 | testsuite/sed.tests | 4 -- | ||
| 12 | 2 files changed, 68 insertions(+), 71 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/editors/sed.c b/editors/sed.c | ||
| 15 | index f8ca5d3..98478b4 100644 | ||
| 16 | --- a/editors/sed.c | ||
| 17 | +++ b/editors/sed.c | ||
| 18 | @@ -845,37 +845,79 @@ static void append(char *s) | ||
| 19 | llist_add_to_end(&G.append_head, xstrdup(s)); | ||
| 20 | } | ||
| 21 | |||
| 22 | -static void flush_append(void) | ||
| 23 | +/* Output line of text. */ | ||
| 24 | +/* Note: | ||
| 25 | + * The tricks with NO_EOL_CHAR and last_puts_char are there to emulate gnu sed. | ||
| 26 | + * Without them, we had this: | ||
| 27 | + * echo -n thingy >z1 | ||
| 28 | + * echo -n again >z2 | ||
| 29 | + * >znull | ||
| 30 | + * sed "s/i/z/" z1 z2 znull | hexdump -vC | ||
| 31 | + * output: | ||
| 32 | + * gnu sed 4.1.5: | ||
| 33 | + * 00000000 74 68 7a 6e 67 79 0a 61 67 61 7a 6e |thzngy.agazn| | ||
| 34 | + * bbox: | ||
| 35 | + * 00000000 74 68 7a 6e 67 79 61 67 61 7a 6e |thzngyagazn| | ||
| 36 | + */ | ||
| 37 | +enum { | ||
| 38 | + NO_EOL_CHAR = 1, | ||
| 39 | + LAST_IS_NUL = 2, | ||
| 40 | +}; | ||
| 41 | +static void puts_maybe_newline(char *s, FILE *file, char *last_puts_char, char last_gets_char) | ||
| 42 | +{ | ||
| 43 | + char lpc = *last_puts_char; | ||
| 44 | + | ||
| 45 | + /* Need to insert a '\n' between two files because first file's | ||
| 46 | + * last line wasn't terminated? */ | ||
| 47 | + if (lpc != '\n' && lpc != '\0') { | ||
| 48 | + fputc('\n', file); | ||
| 49 | + lpc = '\n'; | ||
| 50 | + } | ||
| 51 | + fputs(s, file); | ||
| 52 | + | ||
| 53 | + /* 'x' - just something which is not '\n', '\0' or NO_EOL_CHAR */ | ||
| 54 | + if (s[0]) | ||
| 55 | + lpc = 'x'; | ||
| 56 | + | ||
| 57 | + /* had trailing '\0' and it was last char of file? */ | ||
| 58 | + if (last_gets_char == LAST_IS_NUL) { | ||
| 59 | + fputc('\0', file); | ||
| 60 | + lpc = 'x'; /* */ | ||
| 61 | + } else | ||
| 62 | + /* had trailing '\n' or '\0'? */ | ||
| 63 | + if (last_gets_char != NO_EOL_CHAR) { | ||
| 64 | + fputc(last_gets_char, file); | ||
| 65 | + lpc = last_gets_char; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + if (ferror(file)) { | ||
| 69 | + xfunc_error_retval = 4; /* It's what gnu sed exits with... */ | ||
| 70 | + bb_error_msg_and_die(bb_msg_write_error); | ||
| 71 | + } | ||
| 72 | + *last_puts_char = lpc; | ||
| 73 | +} | ||
| 74 | + | ||
| 75 | +static void flush_append(char *last_puts_char, char last_gets_char) | ||
| 76 | { | ||
| 77 | char *data; | ||
| 78 | |||
| 79 | /* Output appended lines. */ | ||
| 80 | while ((data = (char *)llist_pop(&G.append_head))) { | ||
| 81 | - fprintf(G.nonstdout, "%s\n", data); | ||
| 82 | + puts_maybe_newline(data, G.nonstdout, last_puts_char, last_gets_char); | ||
| 83 | free(data); | ||
| 84 | } | ||
| 85 | } | ||
| 86 | |||
| 87 | -static void add_input_file(FILE *file) | ||
| 88 | -{ | ||
| 89 | - G.input_file_list = xrealloc_vector(G.input_file_list, 2, G.input_file_count); | ||
| 90 | - G.input_file_list[G.input_file_count++] = file; | ||
| 91 | -} | ||
| 92 | - | ||
| 93 | /* Get next line of input from G.input_file_list, flushing append buffer and | ||
| 94 | * noting if we ran out of files without a newline on the last line we read. | ||
| 95 | */ | ||
| 96 | -enum { | ||
| 97 | - NO_EOL_CHAR = 1, | ||
| 98 | - LAST_IS_NUL = 2, | ||
| 99 | -}; | ||
| 100 | -static char *get_next_line(char *gets_char) | ||
| 101 | +static char *get_next_line(char *gets_char, char *last_puts_char, char last_gets_char) | ||
| 102 | { | ||
| 103 | char *temp = NULL; | ||
| 104 | int len; | ||
| 105 | char gc; | ||
| 106 | |||
| 107 | - flush_append(); | ||
| 108 | + flush_append(last_puts_char, last_gets_char); | ||
| 109 | |||
| 110 | /* will be returned if last line in the file | ||
| 111 | * doesn't end with either '\n' or '\0' */ | ||
| 112 | @@ -919,54 +961,6 @@ static char *get_next_line(char *gets_char) | ||
| 113 | return temp; | ||
| 114 | } | ||
| 115 | |||
| 116 | -/* Output line of text. */ | ||
| 117 | -/* Note: | ||
| 118 | - * The tricks with NO_EOL_CHAR and last_puts_char are there to emulate gnu sed. | ||
| 119 | - * Without them, we had this: | ||
| 120 | - * echo -n thingy >z1 | ||
| 121 | - * echo -n again >z2 | ||
| 122 | - * >znull | ||
| 123 | - * sed "s/i/z/" z1 z2 znull | hexdump -vC | ||
| 124 | - * output: | ||
| 125 | - * gnu sed 4.1.5: | ||
| 126 | - * 00000000 74 68 7a 6e 67 79 0a 61 67 61 7a 6e |thzngy.agazn| | ||
| 127 | - * bbox: | ||
| 128 | - * 00000000 74 68 7a 6e 67 79 61 67 61 7a 6e |thzngyagazn| | ||
| 129 | - */ | ||
| 130 | -static void puts_maybe_newline(char *s, FILE *file, char *last_puts_char, char last_gets_char) | ||
| 131 | -{ | ||
| 132 | - char lpc = *last_puts_char; | ||
| 133 | - | ||
| 134 | - /* Need to insert a '\n' between two files because first file's | ||
| 135 | - * last line wasn't terminated? */ | ||
| 136 | - if (lpc != '\n' && lpc != '\0') { | ||
| 137 | - fputc('\n', file); | ||
| 138 | - lpc = '\n'; | ||
| 139 | - } | ||
| 140 | - fputs(s, file); | ||
| 141 | - | ||
| 142 | - /* 'x' - just something which is not '\n', '\0' or NO_EOL_CHAR */ | ||
| 143 | - if (s[0]) | ||
| 144 | - lpc = 'x'; | ||
| 145 | - | ||
| 146 | - /* had trailing '\0' and it was last char of file? */ | ||
| 147 | - if (last_gets_char == LAST_IS_NUL) { | ||
| 148 | - fputc('\0', file); | ||
| 149 | - lpc = 'x'; /* */ | ||
| 150 | - } else | ||
| 151 | - /* had trailing '\n' or '\0'? */ | ||
| 152 | - if (last_gets_char != NO_EOL_CHAR) { | ||
| 153 | - fputc(last_gets_char, file); | ||
| 154 | - lpc = last_gets_char; | ||
| 155 | - } | ||
| 156 | - | ||
| 157 | - if (ferror(file)) { | ||
| 158 | - xfunc_error_retval = 4; /* It's what gnu sed exits with... */ | ||
| 159 | - bb_error_msg_and_die(bb_msg_write_error); | ||
| 160 | - } | ||
| 161 | - *last_puts_char = lpc; | ||
| 162 | -} | ||
| 163 | - | ||
| 164 | #define sed_puts(s, n) (puts_maybe_newline(s, G.nonstdout, &last_puts_char, n)) | ||
| 165 | |||
| 166 | static int beg_match(sed_cmd_t *sed_cmd, const char *pattern_space) | ||
| 167 | @@ -989,7 +983,7 @@ static void process_files(void) | ||
| 168 | int substituted; | ||
| 169 | |||
| 170 | /* Prime the pump */ | ||
| 171 | - next_line = get_next_line(&next_gets_char); | ||
| 172 | + next_line = get_next_line(&next_gets_char, &last_puts_char, '\n' /*last_gets_char*/); | ||
| 173 | |||
| 174 | /* Go through every line in each file */ | ||
| 175 | again: | ||
| 176 | @@ -1003,7 +997,7 @@ static void process_files(void) | ||
| 177 | |||
| 178 | /* Read one line in advance so we can act on the last line, | ||
| 179 | * the '$' address */ | ||
| 180 | - next_line = get_next_line(&next_gets_char); | ||
| 181 | + next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char); | ||
| 182 | linenum++; | ||
| 183 | |||
| 184 | /* For every line, go through all the commands */ | ||
| 185 | @@ -1176,6 +1170,7 @@ static void process_files(void) | ||
| 186 | /* Append line to linked list to be printed later */ | ||
| 187 | case 'a': | ||
| 188 | append(sed_cmd->string); | ||
| 189 | + last_gets_char = '\n'; | ||
| 190 | break; | ||
| 191 | |||
| 192 | /* Insert text before this line */ | ||
| 193 | @@ -1222,7 +1217,7 @@ static void process_files(void) | ||
| 194 | free(pattern_space); | ||
| 195 | pattern_space = next_line; | ||
| 196 | last_gets_char = next_gets_char; | ||
| 197 | - next_line = get_next_line(&next_gets_char); | ||
| 198 | + next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char); | ||
| 199 | substituted = 0; | ||
| 200 | linenum++; | ||
| 201 | break; | ||
| 202 | @@ -1258,7 +1253,7 @@ static void process_files(void) | ||
| 203 | pattern_space[len] = '\n'; | ||
| 204 | strcpy(pattern_space + len+1, next_line); | ||
| 205 | last_gets_char = next_gets_char; | ||
| 206 | - next_line = get_next_line(&next_gets_char); | ||
| 207 | + next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char); | ||
| 208 | linenum++; | ||
| 209 | break; | ||
| 210 | } | ||
| 211 | @@ -1362,7 +1357,7 @@ static void process_files(void) | ||
| 212 | |||
| 213 | /* Delete and such jump here. */ | ||
| 214 | discard_line: | ||
| 215 | - flush_append(); | ||
| 216 | + flush_append(&last_puts_char, last_gets_char); | ||
| 217 | free(pattern_space); | ||
| 218 | |||
| 219 | goto again; | ||
| 220 | @@ -1403,6 +1398,12 @@ static void add_cmd_block(char *cmdstr) | ||
| 221 | free(sv); | ||
| 222 | } | ||
| 223 | |||
| 224 | +static void add_input_file(FILE *file) | ||
| 225 | +{ | ||
| 226 | + G.input_file_list = xrealloc_vector(G.input_file_list, 2, G.input_file_count); | ||
| 227 | + G.input_file_list[G.input_file_count++] = file; | ||
| 228 | +} | ||
| 229 | + | ||
| 230 | int sed_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | ||
| 231 | int sed_main(int argc UNUSED_PARAM, char **argv) | ||
| 232 | { | ||
| 233 | diff --git a/testsuite/sed.tests b/testsuite/sed.tests | ||
| 234 | index 468565f..e26483c 100755 | ||
| 235 | --- a/testsuite/sed.tests | ||
| 236 | +++ b/testsuite/sed.tests | ||
| 237 | @@ -135,10 +135,8 @@ testing "sed empty file plus cat" "sed -e 's/nohit//' input -" "one\ntwo" \ | ||
| 238 | "" "one\ntwo" | ||
| 239 | testing "sed cat plus empty file" "sed -e 's/nohit//' input -" "one\ntwo" \ | ||
| 240 | "one\ntwo" "" | ||
| 241 | -test x"$SKIP_KNOWN_BUGS" = x"" && { | ||
| 242 | testing "sed append autoinserts newline" "sed -e '/woot/a woo' -" \ | ||
| 243 | "woot\nwoo\n" "" "woot" | ||
| 244 | -} | ||
| 245 | testing "sed insert doesn't autoinsert newline" "sed -e '/woot/i woo' -" \ | ||
| 246 | "woo\nwoot" "" "woot" | ||
| 247 | testing "sed print autoinsert newlines" "sed -e 'p' -" "one\none" "" "one" | ||
| 248 | @@ -154,11 +152,9 @@ testing "sed selective matches insert newline" \ | ||
| 249 | testing "sed selective matches noinsert newline" \ | ||
| 250 | "sed -ne 's/woo/bang/p' input -" "a bang\nb bang" "a woo\nb woo" \ | ||
| 251 | "c no\nd no" | ||
| 252 | -test x"$SKIP_KNOWN_BUGS" = x"" && { | ||
| 253 | testing "sed clusternewline" \ | ||
| 254 | "sed -e '/one/a 111' -e '/two/i 222' -e p input -" \ | ||
| 255 | "one\none\n111\n222\ntwo\ntwo" "one" "two" | ||
| 256 | -} | ||
| 257 | testing "sed subst+write" \ | ||
| 258 | "sed -e 's/i/z/' -e 'woutputw' input -; $ECHO -n X; cat outputw" \ | ||
| 259 | "thzngy\nagaznXthzngy\nagazn" "thingy" "again" | ||
| 260 | -- | ||
| 261 | 1.8.3 | ||
| 262 | |||
diff --git a/meta/recipes-core/busybox/busybox/busybox-sulogin-empty-root-password.patch b/meta/recipes-core/busybox/busybox/busybox-sulogin-empty-root-password.patch deleted file mode 100644 index baad298a3f..0000000000 --- a/meta/recipes-core/busybox/busybox/busybox-sulogin-empty-root-password.patch +++ /dev/null | |||
| @@ -1,58 +0,0 @@ | |||
| 1 | Upstream-Status: Backport | ||
| 2 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
| 3 | |||
| 4 | From b6dc13c2d3754704b1bf5af4e6b957b48585102f Mon Sep 17 00:00:00 2001 | ||
| 5 | From: Jonathan Liu <net147@gmail.com> | ||
| 6 | Date: Tue, 21 May 2013 17:01:55 +0200 | ||
| 7 | Subject: [PATCH] sulogin: allow system maintenance login if root password is | ||
| 8 | empty | ||
| 9 | |||
| 10 | The current password checking is unable to distinguish between the user | ||
| 11 | entering an empty password or pressing Control-D. As a result, an empty | ||
| 12 | password always results in normal startup. | ||
| 13 | |||
| 14 | We modify bb_ask to return NULL if Control-D is pressed without entering | ||
| 15 | a password. The sulogin applet is then modified to only proceed to | ||
| 16 | normal startup if bb_ask returns NULL. This covers EOF with no password, | ||
| 17 | interrupt by timeout and ^C. | ||
| 18 | |||
| 19 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
| 20 | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||
| 21 | --- | ||
| 22 | libbb/bb_askpass.c | 4 +++- | ||
| 23 | loginutils/sulogin.c | 4 ++-- | ||
| 24 | 2 files changed, 5 insertions(+), 3 deletions(-) | ||
| 25 | |||
| 26 | diff --git a/libbb/bb_askpass.c b/libbb/bb_askpass.c | ||
| 27 | index fe2b506..77c1bcd 100644 | ||
| 28 | --- a/libbb/bb_askpass.c | ||
| 29 | +++ b/libbb/bb_askpass.c | ||
| 30 | @@ -65,7 +65,9 @@ char* FAST_FUNC bb_ask(const int fd, int timeout, const char *prompt) | ||
| 31 | i = 0; | ||
| 32 | while (1) { | ||
| 33 | int r = read(fd, &ret[i], 1); | ||
| 34 | - if (r < 0) { | ||
| 35 | + if ((i == 0 && r == 0) /* EOF (^D) with no password */ | ||
| 36 | + || r < 0 | ||
| 37 | + ) { | ||
| 38 | /* read is interrupted by timeout or ^C */ | ||
| 39 | ret = NULL; | ||
| 40 | break; | ||
| 41 | diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c | ||
| 42 | index f79802a..65e6384 100644 | ||
| 43 | --- a/loginutils/sulogin.c | ||
| 44 | +++ b/loginutils/sulogin.c | ||
| 45 | @@ -83,8 +83,8 @@ int sulogin_main(int argc UNUSED_PARAM, char **argv) | ||
| 46 | cp = bb_ask(STDIN_FILENO, timeout, | ||
| 47 | "Give root password for system maintenance\n" | ||
| 48 | "(or type Control-D for normal startup):"); | ||
| 49 | - | ||
| 50 | - if (!cp || !*cp) { | ||
| 51 | + if (!cp) { | ||
| 52 | + /* ^D, ^C, timeout, or read error */ | ||
| 53 | bb_info_msg("Normal startup"); | ||
| 54 | return 0; | ||
| 55 | } | ||
| 56 | -- | ||
| 57 | 1.8.2.3 | ||
| 58 | |||
diff --git a/meta/recipes-core/busybox/busybox/find-get-rid-of-nested-functions.patch b/meta/recipes-core/busybox/busybox/find-get-rid-of-nested-functions.patch deleted file mode 100644 index d66ef79cf0..0000000000 --- a/meta/recipes-core/busybox/busybox/find-get-rid-of-nested-functions.patch +++ /dev/null | |||
| @@ -1,117 +0,0 @@ | |||
| 1 | Upstream-Status: Accepted | ||
| 2 | |||
| 3 | commit 6db5f679a21342249e6a6eb06ec70a337bf0d0b0 | ||
| 4 | Author: Denys Vlasenko <vda.linux@googlemail.com> | ||
| 5 | Date: Thu May 16 18:36:42 2013 +0200 | ||
| 6 | |||
| 7 | find:: get rid of nested function (it's a gcc-ism) | ||
| 8 | |||
| 9 | function old new delta | ||
| 10 | alloc_action - 80 +80 | ||
| 11 | parse_params 1459 1445 -14 | ||
| 12 | static.alloc_action 98 - -98 | ||
| 13 | |||
| 14 | (add/remove: 1/1 grow/shrink: 0/1 up/down: 80/-112) Total: -32 bytes | ||
| 15 | |||
| 16 | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||
| 17 | |||
| 18 | diff --git a/findutils/find.c b/findutils/find.c | ||
| 19 | index d4b7c8e..af913cc 100644 | ||
| 20 | --- a/findutils/find.c | ||
| 21 | +++ b/findutils/find.c | ||
| 22 | @@ -815,6 +815,31 @@ static const char* plus_minus_num(const char* str) | ||
| 23 | } | ||
| 24 | #endif | ||
| 25 | |||
| 26 | +/* Say no to GCCism */ | ||
| 27 | +#define USE_NESTED_FUNCTION 0 | ||
| 28 | + | ||
| 29 | +#if !USE_NESTED_FUNCTION | ||
| 30 | +struct pp_locals { | ||
| 31 | + action*** appp; | ||
| 32 | + unsigned cur_group; | ||
| 33 | + unsigned cur_action; | ||
| 34 | + IF_FEATURE_FIND_NOT( bool invert_flag; ) | ||
| 35 | +}; | ||
| 36 | +static action* alloc_action(struct pp_locals *ppl, int sizeof_struct, action_fp f) | ||
| 37 | +{ | ||
| 38 | + action *ap = xzalloc(sizeof_struct); | ||
| 39 | + action **app; | ||
| 40 | + action ***group = &ppl->appp[ppl->cur_group]; | ||
| 41 | + *group = app = xrealloc(*group, (ppl->cur_action+2) * sizeof(ppl->appp[0][0])); | ||
| 42 | + app[ppl->cur_action++] = ap; | ||
| 43 | + app[ppl->cur_action] = NULL; | ||
| 44 | + ap->f = f; | ||
| 45 | + IF_FEATURE_FIND_NOT( ap->invert = ppl->invert_flag; ) | ||
| 46 | + IF_FEATURE_FIND_NOT( ppl->invert_flag = 0; ) | ||
| 47 | + return ap; | ||
| 48 | +} | ||
| 49 | +#endif | ||
| 50 | + | ||
| 51 | static action*** parse_params(char **argv) | ||
| 52 | { | ||
| 53 | enum { | ||
| 54 | @@ -901,10 +926,18 @@ static action*** parse_params(char **argv) | ||
| 55 | IF_FEATURE_FIND_MAXDEPTH("-mindepth\0""-maxdepth\0") | ||
| 56 | ; | ||
| 57 | |||
| 58 | +#if !USE_NESTED_FUNCTION | ||
| 59 | + struct pp_locals ppl; | ||
| 60 | +#define appp (ppl.appp ) | ||
| 61 | +#define cur_group (ppl.cur_group ) | ||
| 62 | +#define cur_action (ppl.cur_action ) | ||
| 63 | +#define invert_flag (ppl.invert_flag) | ||
| 64 | +#define ALLOC_ACTION(name) (action_##name*)alloc_action(&ppl, sizeof(action_##name), (action_fp) func_##name) | ||
| 65 | +#else | ||
| 66 | action*** appp; | ||
| 67 | - unsigned cur_group = 0; | ||
| 68 | - unsigned cur_action = 0; | ||
| 69 | - IF_FEATURE_FIND_NOT( bool invert_flag = 0; ) | ||
| 70 | + unsigned cur_group; | ||
| 71 | + unsigned cur_action; | ||
| 72 | + IF_FEATURE_FIND_NOT( bool invert_flag; ) | ||
| 73 | |||
| 74 | /* This is the only place in busybox where we use nested function. | ||
| 75 | * So far more standard alternatives were bigger. */ | ||
| 76 | @@ -913,7 +946,7 @@ static action*** parse_params(char **argv) | ||
| 77 | action* alloc_action(int sizeof_struct, action_fp f) | ||
| 78 | { | ||
| 79 | action *ap; | ||
| 80 | - appp[cur_group] = xrealloc(appp[cur_group], (cur_action+2) * sizeof(*appp)); | ||
| 81 | + appp[cur_group] = xrealloc(appp[cur_group], (cur_action+2) * sizeof(appp[0][0])); | ||
| 82 | appp[cur_group][cur_action++] = ap = xzalloc(sizeof_struct); | ||
| 83 | appp[cur_group][cur_action] = NULL; | ||
| 84 | ap->f = f; | ||
| 85 | @@ -921,9 +954,12 @@ static action*** parse_params(char **argv) | ||
| 86 | IF_FEATURE_FIND_NOT( invert_flag = 0; ) | ||
| 87 | return ap; | ||
| 88 | } | ||
| 89 | - | ||
| 90 | #define ALLOC_ACTION(name) (action_##name*)alloc_action(sizeof(action_##name), (action_fp) func_##name) | ||
| 91 | +#endif | ||
| 92 | |||
| 93 | + cur_group = 0; | ||
| 94 | + cur_action = 0; | ||
| 95 | + IF_FEATURE_FIND_NOT( invert_flag = 0; ) | ||
| 96 | appp = xzalloc(2 * sizeof(appp[0])); /* appp[0],[1] == NULL */ | ||
| 97 | |||
| 98 | while (*argv) { | ||
| 99 | @@ -988,7 +1024,7 @@ static action*** parse_params(char **argv) | ||
| 100 | dbg("%d", __LINE__); | ||
| 101 | /* start new OR group */ | ||
| 102 | cur_group++; | ||
| 103 | - appp = xrealloc(appp, (cur_group+2) * sizeof(*appp)); | ||
| 104 | + appp = xrealloc(appp, (cur_group+2) * sizeof(appp[0])); | ||
| 105 | /*appp[cur_group] = NULL; - already NULL */ | ||
| 106 | appp[cur_group+1] = NULL; | ||
| 107 | cur_action = 0; | ||
| 108 | @@ -1246,6 +1282,9 @@ static action*** parse_params(char **argv) | ||
| 109 | dbg("exiting %s", __func__); | ||
| 110 | return appp; | ||
| 111 | #undef ALLOC_ACTION | ||
| 112 | +#undef appp | ||
| 113 | +#undef cur_action | ||
| 114 | +#undef invert_flag | ||
| 115 | } | ||
| 116 | |||
| 117 | int find_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | ||
diff --git a/meta/recipes-core/busybox/busybox/run-parts.in.usr-bin.patch b/meta/recipes-core/busybox/busybox/run-parts.in.usr-bin.patch deleted file mode 100644 index 45f69a937c..0000000000 --- a/meta/recipes-core/busybox/busybox/run-parts.in.usr-bin.patch +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [configuration] | ||
| 2 | |||
| 3 | # copy commit message from OE as the patch comment: | ||
| 4 | # commit f1b326c83be0d95571b991d8d2ee239982380b6b | ||
| 5 | # Author: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 6 | # Date: Fri Apr 30 15:37:38 2010 +0200 | ||
| 7 | # | ||
| 8 | # busybox: add patch for installing run-parts to /usr/bin/ instead of /bin | ||
| 9 | # | ||
| 10 | # * otherwise debianutils install will fail with | ||
| 11 | # update-alternatives: Error: cannot register alternative run-parts to /usr/bin/run-parts since it is | ||
| 12 | # | ||
| 13 | # Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 14 | # | ||
| 15 | # Poky doesn't have debianutils, but let's keep it for safety | ||
| 16 | # above comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-06 | ||
| 17 | |||
| 18 | diff -uNr busybox-1.15.3.orig//include/applets.src.h busybox-1.15.3/include/applets.src.h | ||
| 19 | --- busybox-1.15.3.orig//include/applets.src.h 2009-12-12 22:13:28.000000000 +0100 | ||
| 20 | +++ busybox-1.15.3/include/applets.src.h 2010-04-30 15:35:40.000000000 +0200 | ||
| 21 | @@ -304,7 +304,7 @@ | ||
| 22 | IF_RPM(APPLET(rpm, BB_DIR_BIN, BB_SUID_DROP)) | ||
| 23 | IF_RPM2CPIO(APPLET(rpm2cpio, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
| 24 | IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
| 25 | -IF_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, BB_DIR_BIN, BB_SUID_DROP, run_parts)) | ||
| 26 | +IF_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, BB_DIR_USR_BIN, BB_SUID_DROP, run_parts)) | ||
| 27 | IF_RUNCON(APPLET(runcon, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
| 28 | IF_RUNLEVEL(APPLET(runlevel, BB_DIR_SBIN, BB_SUID_DROP)) | ||
| 29 | IF_RUNSV(APPLET(runsv, BB_DIR_USR_BIN, _BB_SUID_DROP)) | ||
diff --git a/meta/recipes-core/busybox/busybox/stat-usr-bin.patch b/meta/recipes-core/busybox/busybox/stat-usr-bin.patch deleted file mode 100644 index 4049324e8b..0000000000 --- a/meta/recipes-core/busybox/busybox/stat-usr-bin.patch +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | busybox: move /bin/stat to /usr/bin/stat to match coreutils | ||
| 2 | |||
| 3 | The coreutils stat binary lives in /usr/bin, fix busybox to use the same path so | ||
| 4 | they can be properly tracked by alternatives. | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [embedded] | ||
| 7 | Signed-off-by: Andy Ross <andy.ross@windriver.com> | ||
| 8 | |||
| 9 | diff --git a/include/applets.src.h b/include/applets.src.h | ||
| 10 | index 0d33bfc..30ae3ad 100644 | ||
| 11 | --- a/include/applets.src.h | ||
| 12 | +++ b/include/applets.src.h | ||
| 13 | @@ -340,7 +340,7 @@ IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, soft | ||
| 14 | IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort)) | ||
| 15 | IF_SPLIT(APPLET(split, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
| 16 | IF_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, BB_DIR_SBIN, BB_SUID_DROP, start_stop_daemon)) | ||
| 17 | -IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP)) | ||
| 18 | +IF_STAT(APPLET(stat, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
| 19 | IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
| 20 | IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP)) | ||
| 21 | /* Needs to be run by root or be suid root - needs to change uid and gid: */ | ||
diff --git a/meta/recipes-core/busybox/busybox/testsuite-du-du-k-works-fix-false-positive.patch b/meta/recipes-core/busybox/busybox/testsuite-du-du-k-works-fix-false-positive.patch deleted file mode 100644 index 070c41be07..0000000000 --- a/meta/recipes-core/busybox/busybox/testsuite-du-du-k-works-fix-false-positive.patch +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | Upstream-Status: Accepted | ||
| 2 | |||
| 3 | [Yocto 2896] | ||
| 4 | |||
| 5 | Signed-off-by: Kang Kai <kai.kang@windriver.com> | ||
| 6 | --- | ||
| 7 | From 03b614739b923994ff0bef74622973ad18fefebd Mon Sep 17 00:00:00 2001 | ||
| 8 | From: Kang Kai <kai.kang@windriver.com> | ||
| 9 | Date: Mon, 28 Jan 2013 14:02:51 +0100 | ||
| 10 | Subject: [PATCH] testsuite/du/du-k-works: fix false positive | ||
| 11 | |||
| 12 | Signed-off-by: Kang Kai <kai.kang@windriver.com> | ||
| 13 | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||
| 14 | --- | ||
| 15 | testsuite/du/du-k-works | 4 ++++ | ||
| 16 | 1 files changed, 4 insertions(+), 0 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/testsuite/du/du-k-works b/testsuite/du/du-k-works | ||
| 19 | index 36dcaa8..417b0da 100644 | ||
| 20 | --- a/testsuite/du/du-k-works | ||
| 21 | +++ b/testsuite/du/du-k-works | ||
| 22 | @@ -2,6 +2,10 @@ mkdir du.testdir | ||
| 23 | cd du.testdir | ||
| 24 | dd if=/dev/zero of=file1 bs=1k count=64 2>/dev/null | ||
| 25 | dd if=/dev/zero of=file2 bs=1k count=16 2>/dev/null | ||
| 26 | +# ext4 on images <512M gives 81kb | ||
| 27 | +# ext3 on images <512M gives 83kb | ||
| 28 | test x"`busybox du -k .`" = x"80 ." \ | ||
| 29 | + -o x"`busybox du -k .`" = x"81 ." \ | ||
| 30 | + -o x"`busybox du -k .`" = x"83 ." \ | ||
| 31 | -o x"`busybox du -k .`" = x"84 ." \ | ||
| 32 | -o x"`busybox du -k .`" = x"88 ." | ||
| 33 | -- | ||
| 34 | 1.7.5.4 | ||
| 35 | |||
diff --git a/meta/recipes-core/busybox/busybox/watch.in.usr-bin.patch b/meta/recipes-core/busybox/busybox/watch.in.usr-bin.patch deleted file mode 100644 index e8e1edfb7e..0000000000 --- a/meta/recipes-core/busybox/busybox/watch.in.usr-bin.patch +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [configuration] | ||
| 2 | |||
| 3 | From f2372ab626a395d067704f4c318180fb6039de15 Mon Sep 17 00:00:00 2001 | ||
| 4 | From: Andreas Oberritter <obi@opendreambox.org> | ||
| 5 | Date: Sat, 24 Mar 2012 17:36:48 +0100 | ||
| 6 | Subject: [PATCH] watch: move from /bin to /usr/bin for compatibility with | ||
| 7 | procps | ||
| 8 | |||
| 9 | Signed-off-by: Andreas Oberritter <obi@opendreambox.org> | ||
| 10 | --- | ||
| 11 | include/applets.src.h | 2 +- | ||
| 12 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/include/applets.src.h b/include/applets.src.h | ||
| 15 | index 87d9cbb..c148a8c 100644 | ||
| 16 | --- a/include/applets.src.h | ||
| 17 | +++ b/include/applets.src.h | ||
| 18 | @@ -404,7 +404,7 @@ IF_VLOCK(APPLET(vlock, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) | ||
| 19 | IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
| 20 | /* Needs to be run by root or be suid root - needs to write to /dev/TTY: */ | ||
| 21 | IF_WALL(APPLET(wall, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) | ||
| 22 | -IF_WATCH(APPLET(watch, BB_DIR_BIN, BB_SUID_DROP)) | ||
| 23 | +IF_WATCH(APPLET(watch, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
| 24 | IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP)) | ||
| 25 | IF_WC(APPLET(wc, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
| 26 | IF_WGET(APPLET(wget, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
| 27 | -- | ||
| 28 | 1.7.5.4 | ||
| 29 | |||
diff --git a/meta/recipes-core/busybox/busybox_1.21.1.bb b/meta/recipes-core/busybox/busybox_1.22.1.bb index cf59f58e76..ffc9435398 100644 --- a/meta/recipes-core/busybox/busybox_1.21.1.bb +++ b/meta/recipes-core/busybox/busybox_1.22.1.bb | |||
| @@ -3,8 +3,6 @@ require busybox.inc | |||
| 3 | SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | 3 | SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ |
| 4 | file://get_header_tar.patch \ | 4 | file://get_header_tar.patch \ |
| 5 | file://busybox-appletlib-dependency.patch \ | 5 | file://busybox-appletlib-dependency.patch \ |
| 6 | file://run-parts.in.usr-bin.patch \ | ||
| 7 | file://watch.in.usr-bin.patch \ | ||
| 8 | file://busybox-udhcpc-no_deconfig.patch \ | 6 | file://busybox-udhcpc-no_deconfig.patch \ |
| 9 | file://find-touchscreen.sh \ | 7 | file://find-touchscreen.sh \ |
| 10 | file://busybox-cron \ | 8 | file://busybox-cron \ |
| @@ -22,24 +20,17 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | |||
| 22 | file://mdev.conf \ | 20 | file://mdev.conf \ |
| 23 | file://umount.busybox \ | 21 | file://umount.busybox \ |
| 24 | file://defconfig \ | 22 | file://defconfig \ |
| 25 | file://stat-usr-bin.patch \ | ||
| 26 | file://busybox-syslog.service.in \ | 23 | file://busybox-syslog.service.in \ |
| 27 | file://busybox-klogd.service.in \ | 24 | file://busybox-klogd.service.in \ |
| 28 | file://testsuite-du-du-k-works-fix-false-positive.patch \ | ||
| 29 | file://fail_on_no_media.patch \ | 25 | file://fail_on_no_media.patch \ |
| 30 | file://busybox-sulogin-empty-root-password.patch \ | ||
| 31 | file://run-ptest \ | 26 | file://run-ptest \ |
| 32 | file://inetd.conf \ | 27 | file://inetd.conf \ |
| 33 | file://inetd \ | 28 | file://inetd \ |
| 34 | file://login-utilities.cfg \ | 29 | file://login-utilities.cfg \ |
| 35 | file://busybox-list-suid-and-non-suid-app-configs.patch \ | ||
| 36 | file://busybox-sed-fix-sed-clusternewline-testcase.patch \ | ||
| 37 | file://find-get-rid-of-nested-functions.patch \ | ||
| 38 | file://busybox-lineedit-initialize-delptr.patch \ | ||
| 39 | " | 30 | " |
| 40 | 31 | ||
| 41 | SRC_URI[tarball.md5sum] = "795394f83903b5eec6567d51eebb417e" | 32 | SRC_URI[tarball.md5sum] = "337d1a15ab1cb1d4ed423168b1eb7d7e" |
| 42 | SRC_URI[tarball.sha256sum] = "cd5be0912ec856110ae12c76c3ec9cd5cba1df45b5a9da2b095b8284d1481303" | 33 | SRC_URI[tarball.sha256sum] = "ae0b029d0a9e4dd71a077a790840e496dd838998e4571b87b60fed7462b6678b" |
| 43 | 34 | ||
| 44 | EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" | 35 | EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" |
| 45 | 36 | ||
diff --git a/meta/recipes-core/busybox/busybox_git.bb b/meta/recipes-core/busybox/busybox_git.bb index 91ecff8212..f2cc119400 100644 --- a/meta/recipes-core/busybox/busybox_git.bb +++ b/meta/recipes-core/busybox/busybox_git.bb | |||
| @@ -1,16 +1,14 @@ | |||
| 1 | require busybox.inc | 1 | require busybox.inc |
| 2 | 2 | ||
| 3 | SRCREV = "e73f3c1d3d83699b723251f7e6a981021ce75475" | 3 | SRCREV = "d9e0c438e10e2155513e5d26498af472c5137d65" |
| 4 | # Lookout for PV bump too when SRCREV is changed | 4 | # Lookout for PV bump too when SRCREV is changed |
| 5 | PV = "1.21.1+git${SRCPV}" | 5 | PV = "1.22.1+git${SRCPV}" |
| 6 | 6 | ||
| 7 | S = "${WORKDIR}/git" | 7 | S = "${WORKDIR}/git" |
| 8 | 8 | ||
| 9 | SRC_URI = "git://busybox.net/busybox.git \ | 9 | SRC_URI = "git://busybox.net/busybox.git \ |
| 10 | file://get_header_tar.patch \ | 10 | file://get_header_tar.patch \ |
| 11 | file://busybox-appletlib-dependency.patch \ | 11 | file://busybox-appletlib-dependency.patch \ |
| 12 | file://run-parts.in.usr-bin.patch \ | ||
| 13 | file://watch.in.usr-bin.patch \ | ||
| 14 | file://busybox-udhcpc-no_deconfig.patch \ | 12 | file://busybox-udhcpc-no_deconfig.patch \ |
| 15 | file://find-touchscreen.sh \ | 13 | file://find-touchscreen.sh \ |
| 16 | file://busybox-cron \ | 14 | file://busybox-cron \ |
| @@ -28,18 +26,13 @@ SRC_URI = "git://busybox.net/busybox.git \ | |||
| 28 | file://mdev.conf \ | 26 | file://mdev.conf \ |
| 29 | file://umount.busybox \ | 27 | file://umount.busybox \ |
| 30 | file://defconfig \ | 28 | file://defconfig \ |
| 31 | file://stat-usr-bin.patch \ | ||
| 32 | file://busybox-syslog.service.in \ | 29 | file://busybox-syslog.service.in \ |
| 33 | file://busybox-klogd.service.in \ | 30 | file://busybox-klogd.service.in \ |
| 34 | file://testsuite-du-du-k-works-fix-false-positive.patch \ | ||
| 35 | file://fail_on_no_media.patch \ | 31 | file://fail_on_no_media.patch \ |
| 36 | file://busybox-sulogin-empty-root-password.patch \ | ||
| 37 | file://run-ptest \ | 32 | file://run-ptest \ |
| 38 | file://inetd.conf \ | 33 | file://inetd.conf \ |
| 39 | file://inetd \ | 34 | file://inetd \ |
| 40 | file://login-utilities.cfg \ | 35 | file://login-utilities.cfg \ |
| 41 | file://busybox-list-suid-and-non-suid-app-configs.patch \ | ||
| 42 | file://busybox-sed-fix-sed-clusternewline-testcase.patch \ | ||
| 43 | " | 36 | " |
| 44 | 37 | ||
| 45 | EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" | 38 | EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" |
