packages: busybox/busybox.spec, busybox/busybox-1.18.1-bzip2.patch (NEW), b...

arekm arekm at pld-linux.org
Sun Jan 9 09:09:48 CET 2011


Author: arekm                        Date: Sun Jan  9 08:09:48 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 1.18.1

---- Files affected:
packages/busybox:
   busybox.spec (1.182 -> 1.183) , busybox-1.18.1-bzip2.patch (NONE -> 1.1)  (NEW), busybox-1.18.1-cpio.patch (NONE -> 1.1)  (NEW), busybox-1.18.1-hush.patch (NONE -> 1.1)  (NEW), busybox-1.18.1-mkswap.patch (NONE -> 1.1)  (NEW), busybox-1.18.1-warning.patch (NONE -> 1.1)  (NEW), busybox-1.18.0-buildsys.patch (1.1 -> NONE)  (REMOVED), busybox-1.18.0-runsvdir.patch (1.1 -> NONE)  (REMOVED), busybox-1.18.0-sha.patch (1.1 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/busybox/busybox.spec
diff -u packages/busybox/busybox.spec:1.182 packages/busybox/busybox.spec:1.183
--- packages/busybox/busybox.spec:1.182	Thu Dec  9 20:59:28 2010
+++ packages/busybox/busybox.spec	Sun Jan  9 09:09:42 2011
@@ -37,18 +37,20 @@
 Summary(pt_BR.UTF-8):	BusyBox é um conjunto de utilitários UNIX em um único binário
 Name:		busybox
 # stable line only
-Version:	1.18.0
-Release:	0.1
+Version:	1.18.1
+Release:	1
 License:	GPL
 Group:		Applications
 Source0:	http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
-# Source0-md5:	7a8150a10558a5292fa1f52f1c65b0f5
+# Source0-md5:	f15fe752d8b7012aa5e59f83b88ccb1c
 Source1:	%{name}.config
 Source2:	%{name}-initrd.config
 %{?with_altconfig:Source3:	%{cfgfile}}
-Patch100:	busybox-1.18.0-buildsys.patch
-Patch101:	busybox-1.18.0-runsvdir.patch
-Patch102:	busybox-1.18.0-sha.patch
+Patch100:	busybox-1.18.1-bzip2.patch
+Patch101:	busybox-1.18.1-cpio.patch
+Patch102:	busybox-1.18.1-hush.patch
+Patch103:	busybox-1.18.1-mkswap.patch
+Patch104:	busybox-1.18.1-warning.patch
 Patch1:		%{name}-logconsole.patch
 Patch2:		%{name}-printf-gettext.patch
 Patch3:		%{name}-loadfont.patch
@@ -158,6 +160,8 @@
 %patch100 -p1
 %patch101 -p1
 %patch102 -p1
+%patch103 -p1
+%patch104 -p1
 %patch1 -p1
 %patch2 -p1
 #%patch3 -p1
@@ -294,6 +298,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.183  2011/01/09 08:09:42  arekm
+- up to 1.18.1
+
 Revision 1.182  2010/12/09 19:59:28  arekm
 - up to 1.18.0
 

================================================================
Index: packages/busybox/busybox-1.18.1-bzip2.patch
diff -u /dev/null packages/busybox/busybox-1.18.1-bzip2.patch:1.1
--- /dev/null	Sun Jan  9 09:09:48 2011
+++ packages/busybox/busybox-1.18.1-bzip2.patch	Sun Jan  9 09:09:42 2011
@@ -0,0 +1,40 @@
+diff -urpN busybox-1.18.1/archival/bzip2.c busybox-1.18.1-bzip2/archival/bzip2.c
+--- busybox-1.18.1/archival/bzip2.c	2010-12-20 01:41:26.000000000 +0100
++++ busybox-1.18.1-bzip2/archival/bzip2.c	2010-12-30 04:43:11.000000000 +0100
+@@ -128,10 +128,12 @@ IF_DESKTOP(long long) int FAST_FUNC comp
+ 			break;
+ 	}
+ 
+-#if ENABLE_FEATURE_CLEAN_UP
++	/* Can't be conditional on ENABLE_FEATURE_CLEAN_UP -
++	 * we are called repeatedly
++	 */
+ 	BZ2_bzCompressEnd(strm);
+ 	free(iobuf);
+-#endif
++
+ 	return total;
+ }
+ 
+diff -urpN busybox-1.18.1/archival/libarchive/bz/bzlib.c busybox-1.18.1-bzip2/archival/libarchive/bz/bzlib.c
+--- busybox-1.18.1/archival/libarchive/bz/bzlib.c	2010-12-20 01:41:26.000000000 +0100
++++ busybox-1.18.1-bzip2/archival/libarchive/bz/bzlib.c	2010-12-30 04:43:11.000000000 +0100
+@@ -361,7 +361,6 @@ int BZ2_bzCompress(bz_stream *strm, int 
+ 
+ 
+ /*---------------------------------------------------*/
+-#if ENABLE_FEATURE_CLEAN_UP
+ static
+ void BZ2_bzCompressEnd(bz_stream *strm)
+ {
+@@ -372,9 +371,8 @@ void BZ2_bzCompressEnd(bz_stream *strm)
+ 	free(s->arr2);
+ 	free(s->ftab);
+ 	free(s->crc32table);
+-	free(strm->state);
++	free(s);
+ }
+-#endif
+ 
+ 
+ /*---------------------------------------------------*/

================================================================
Index: packages/busybox/busybox-1.18.1-cpio.patch
diff -u /dev/null packages/busybox/busybox-1.18.1-cpio.patch:1.1
--- /dev/null	Sun Jan  9 09:09:48 2011
+++ packages/busybox/busybox-1.18.1-cpio.patch	Sun Jan  9 09:09:42 2011
@@ -0,0 +1,20 @@
+diff -urpN busybox-1.18.1/archival/cpio.c busybox-1.18.1-cpio/archival/cpio.c
+--- busybox-1.18.1/archival/cpio.c	2010-12-20 01:41:26.000000000 +0100
++++ busybox-1.18.1-cpio/archival/cpio.c	2010-12-26 02:26:38.000000000 +0100
+@@ -308,16 +308,12 @@ int cpio_main(int argc UNUSED_PARAM, cha
+ 	/* -L makes sense only with -o or -p */
+ 
+ #if !ENABLE_FEATURE_CPIO_O
+-	/* no parameters */
+-	opt_complementary = "=0";
+ 	opt = getopt32(argv, OPTION_STR, &cpio_filename);
+ 	argv += optind;
+ 	if (opt & CPIO_OPT_FILE) { /* -F */
+ 		xmove_fd(xopen(cpio_filename, O_RDONLY), STDIN_FILENO);
+ 	}
+ #else
+-	/* _exactly_ one parameter for -p, thus <= 1 param if -p is allowed */
+-	opt_complementary = ENABLE_FEATURE_CPIO_P ? "?1" : "=0";
+ 	opt = getopt32(argv, OPTION_STR "oH:" IF_FEATURE_CPIO_P("p"), &cpio_filename, &cpio_fmt);
+ 	argv += optind;
+ 	if ((opt & (CPIO_OPT_FILE|CPIO_OPT_CREATE)) == CPIO_OPT_FILE) { /* -F without -o */

================================================================
Index: packages/busybox/busybox-1.18.1-hush.patch
diff -u /dev/null packages/busybox/busybox-1.18.1-hush.patch:1.1
--- /dev/null	Sun Jan  9 09:09:48 2011
+++ packages/busybox/busybox-1.18.1-hush.patch	Sun Jan  9 09:09:42 2011
@@ -0,0 +1,259 @@
+diff -urpN busybox-1.18.1/shell/hush.c busybox-1.18.1-hush/shell/hush.c
+--- busybox-1.18.1/shell/hush.c	2010-12-21 05:31:04.000000000 +0100
++++ busybox-1.18.1-hush/shell/hush.c	2011-01-07 14:59:19.649956156 +0100
+@@ -913,7 +913,7 @@ static const struct built_in_command blt
+  */
+ #if HUSH_DEBUG
+ /* prevent disasters with G.debug_indent < 0 */
+-# define indent() fprintf(stderr, "%*s", (G.debug_indent * 2) & 0xff, "")
++# define indent() fdprintf(2, "%*s", (G.debug_indent * 2) & 0xff, "")
+ # define debug_enter() (G.debug_indent++)
+ # define debug_leave() (G.debug_indent--)
+ #else
+@@ -923,56 +923,56 @@ static const struct built_in_command blt
+ #endif
+ 
+ #ifndef debug_printf
+-# define debug_printf(...) (indent(), fprintf(stderr, __VA_ARGS__))
++# define debug_printf(...) (indent(), fdprintf(2, __VA_ARGS__))
+ #endif
+ 
+ #ifndef debug_printf_parse
+-# define debug_printf_parse(...) (indent(), fprintf(stderr, __VA_ARGS__))
++# define debug_printf_parse(...) (indent(), fdprintf(2, __VA_ARGS__))
+ #endif
+ 
+ #ifndef debug_printf_exec
+-#define debug_printf_exec(...) (indent(), fprintf(stderr, __VA_ARGS__))
++#define debug_printf_exec(...) (indent(), fdprintf(2, __VA_ARGS__))
+ #endif
+ 
+ #ifndef debug_printf_env
+-# define debug_printf_env(...) (indent(), fprintf(stderr, __VA_ARGS__))
++# define debug_printf_env(...) (indent(), fdprintf(2, __VA_ARGS__))
+ #endif
+ 
+ #ifndef debug_printf_jobs
+-# define debug_printf_jobs(...) (indent(), fprintf(stderr, __VA_ARGS__))
++# define debug_printf_jobs(...) (indent(), fdprintf(2, __VA_ARGS__))
+ # define DEBUG_JOBS 1
+ #else
+ # define DEBUG_JOBS 0
+ #endif
+ 
+ #ifndef debug_printf_expand
+-# define debug_printf_expand(...) (indent(), fprintf(stderr, __VA_ARGS__))
++# define debug_printf_expand(...) (indent(), fdprintf(2, __VA_ARGS__))
+ # define DEBUG_EXPAND 1
+ #else
+ # define DEBUG_EXPAND 0
+ #endif
+ 
+ #ifndef debug_printf_varexp
+-# define debug_printf_varexp(...) (indent(), fprintf(stderr, __VA_ARGS__))
++# define debug_printf_varexp(...) (indent(), fdprintf(2, __VA_ARGS__))
+ #endif
+ 
+ #ifndef debug_printf_glob
+-# define debug_printf_glob(...) (indent(), fprintf(stderr, __VA_ARGS__))
++# define debug_printf_glob(...) (indent(), fdprintf(2, __VA_ARGS__))
+ # define DEBUG_GLOB 1
+ #else
+ # define DEBUG_GLOB 0
+ #endif
+ 
+ #ifndef debug_printf_list
+-# define debug_printf_list(...) (indent(), fprintf(stderr, __VA_ARGS__))
++# define debug_printf_list(...) (indent(), fdprintf(2, __VA_ARGS__))
+ #endif
+ 
+ #ifndef debug_printf_subst
+-# define debug_printf_subst(...) (indent(), fprintf(stderr, __VA_ARGS__))
++# define debug_printf_subst(...) (indent(), fdprintf(2, __VA_ARGS__))
+ #endif
+ 
+ #ifndef debug_printf_clean
+-# define debug_printf_clean(...) (indent(), fprintf(stderr, __VA_ARGS__))
++# define debug_printf_clean(...) (indent(), fdprintf(2, __VA_ARGS__))
+ # define DEBUG_CLEAN 1
+ #else
+ # define DEBUG_CLEAN 0
+@@ -982,9 +982,9 @@ static const struct built_in_command blt
+ static void debug_print_strings(const char *prefix, char **vv)
+ {
+ 	indent();
+-	fprintf(stderr, "%s:\n", prefix);
++	fdprintf(2, "%s:\n", prefix);
+ 	while (*vv)
+-		fprintf(stderr, " '%s'\n", *vv++);
++		fdprintf(2, " '%s'\n", *vv++);
+ }
+ #else
+ # define debug_print_strings(prefix, vv) ((void)0)
+@@ -1416,6 +1416,22 @@ static void hush_exit(int exitcode)
+ 		builtin_eval(argv);
+ 	}
+ 
++#if ENABLE_FEATURE_CLEAN_UP
++	{
++		struct variable *cur_var;
++		if (G.cwd != bb_msg_unknown)
++			free((char*)G.cwd);
++		cur_var = G.top_var;
++		while (cur_var) {
++			struct variable *tmp = cur_var;
++			if (!cur_var->max_len)
++				free(cur_var->varstr);
++			cur_var = cur_var->next;
++			free(tmp);
++		}
++	}
++#endif
++
+ #if ENABLE_HUSH_JOB
+ 	fflush_all();
+ 	sigexit(- (exitcode & 0xff));
+@@ -2158,22 +2174,22 @@ static void debug_print_list(const char 
+ 	int i = 0;
+ 
+ 	indent();
+-	fprintf(stderr, "%s: list:%p n:%d string_start:%d length:%d maxlen:%d glob:%d quoted:%d escape:%d\n",
++	fdprintf(2, "%s: list:%p n:%d string_start:%d length:%d maxlen:%d glob:%d quoted:%d escape:%d\n",
+ 			prefix, list, n, string_start, o->length, o->maxlen,
+ 			!!(o->o_expflags & EXP_FLAG_GLOB),
+ 			o->has_quoted_part,
+ 			!!(o->o_expflags & EXP_FLAG_ESC_GLOB_CHARS));
+ 	while (i < n) {
+ 		indent();
+-		fprintf(stderr, " list[%d]=%d '%s' %p\n", i, (int)list[i],
+-				o->data + (int)list[i] + string_start,
+-				o->data + (int)list[i] + string_start);
++		fdprintf(2, " list[%d]=%d '%s' %p\n", i, (int)(uintptr_t)list[i],
++				o->data + (int)(uintptr_t)list[i] + string_start,
++				o->data + (int)(uintptr_t)list[i] + string_start);
+ 		i++;
+ 	}
+ 	if (n) {
+-		const char *p = o->data + (int)list[n - 1] + string_start;
++		const char *p = o->data + (int)(uintptr_t)list[n - 1] + string_start;
+ 		indent();
+-		fprintf(stderr, " total_sz:%ld\n", (long)((p + strlen(p) + 1) - o->data));
++		fdprintf(2, " total_sz:%ld\n", (long)((p + strlen(p) + 1) - o->data));
+ 	}
+ }
+ #else
+@@ -2672,18 +2688,18 @@ static void debug_print_tree(struct pipe
+ 
+ 	pin = 0;
+ 	while (pi) {
+-		fprintf(stderr, "%*spipe %d res_word=%s followup=%d %s\n", lvl*2, "",
++		fdprintf(2, "%*spipe %d res_word=%s followup=%d %s\n", lvl*2, "",
+ 				pin, RES[pi->res_word], pi->followup, PIPE[pi->followup]);
+ 		prn = 0;
+ 		while (prn < pi->num_cmds) {
+ 			struct command *command = &pi->cmds[prn];
+ 			char **argv = command->argv;
+ 
+-			fprintf(stderr, "%*s cmd %d assignment_cnt:%d",
++			fdprintf(2, "%*s cmd %d assignment_cnt:%d",
+ 					lvl*2, "", prn,
+ 					command->assignment_cnt);
+ 			if (command->group) {
+-				fprintf(stderr, " group %s: (argv=%p)%s%s\n",
++				fdprintf(2, " group %s: (argv=%p)%s%s\n",
+ 						CMDTYPE[command->cmd_type],
+ 						argv
+ # if !BB_MMU
+@@ -2697,10 +2713,10 @@ static void debug_print_tree(struct pipe
+ 				continue;
+ 			}
+ 			if (argv) while (*argv) {
+-				fprintf(stderr, " '%s'", *argv);
++				fdprintf(2, " '%s'", *argv);
+ 				argv++;
+ 			}
+-			fprintf(stderr, "\n");
++			fdprintf(2, "\n");
+ 			prn++;
+ 		}
+ 		pi = pi->next;
+@@ -4106,7 +4122,16 @@ static struct pipe *parse_stream(char **
+ 				if (IS_NULL_CMD(ctx.command)
+ 				 && dest.length == 0 && !dest.has_quoted_part
+ 				) {
+-					continue;
++					/* This newline can be ignored. But...
++					 * without the below check, interactive shell
++					 * will ignore even lines with bare <newline>,
++					 * and show the continuation prompt:
++					 * ps1_prompt$ <enter>
++					 * ps2> _   <=== wrong prompt, should be ps1
++					 */
++					struct pipe *pi = ctx.list_head;
++					if (pi->num_cmds != 0)
++						continue;
+ 				}
+ 				/* Treat newline as a command separator. */
+ 				done_pipe(&ctx, PIPE_SEQ);
+@@ -7445,7 +7470,7 @@ int hush_main(int argc, char **argv)
+ 	unsigned builtin_argc;
+ 	char **e;
+ 	struct variable *cur_var;
+-	struct variable shell_ver;
++	struct variable *shell_ver;
+ 
+ 	INIT_G();
+ 	if (EXIT_SUCCESS) /* if EXIT_SUCCESS == 0, it is already done */
+@@ -7454,17 +7479,17 @@ int hush_main(int argc, char **argv)
+ 	G.argv0_for_re_execing = argv[0];
+ #endif
+ 	/* Deal with HUSH_VERSION */
+-	memset(&shell_ver, 0, sizeof(shell_ver));
+-	shell_ver.flg_export = 1;
+-	shell_ver.flg_read_only = 1;
++	shell_ver = xzalloc(sizeof(*shell_ver));
++	shell_ver->flg_export = 1;
++	shell_ver->flg_read_only = 1;
+ 	/* Code which handles ${var<op>...} needs writable values for all variables,
+ 	 * therefore we xstrdup: */
+-	shell_ver.varstr = xstrdup(hush_version_str),
+-	G.top_var = &shell_ver;
++	shell_ver->varstr = xstrdup(hush_version_str);
+ 	/* Create shell local variables from the values
+ 	 * currently living in the environment */
+ 	debug_printf_env("unsetenv '%s'\n", "HUSH_VERSION");
+ 	unsetenv("HUSH_VERSION"); /* in case it exists in initial env */
++	G.top_var = shell_ver;
+ 	cur_var = G.top_var;
+ 	e = environ;
+ 	if (e) while (*e) {
+@@ -7479,8 +7504,8 @@ int hush_main(int argc, char **argv)
+ 		e++;
+ 	}
+ 	/* (Re)insert HUSH_VERSION into env (AFTER we scanned the env!) */
+-	debug_printf_env("putenv '%s'\n", shell_ver.varstr);
+-	putenv(shell_ver.varstr);
++	debug_printf_env("putenv '%s'\n", shell_ver->varstr);
++	putenv(shell_ver->varstr);
+ 
+ 	/* Export PWD */
+ 	set_pwd_var(/*exp:*/ 1);
+@@ -7840,18 +7865,6 @@ int hush_main(int argc, char **argv)
+ 	parse_and_run_file(stdin);
+ 
+  final_return:
+-#if ENABLE_FEATURE_CLEAN_UP
+-	if (G.cwd != bb_msg_unknown)
+-		free((char*)G.cwd);
+-	cur_var = G.top_var->next;
+-	while (cur_var) {
+-		struct variable *tmp = cur_var;
+-		if (!cur_var->max_len)
+-			free(cur_var->varstr);
+-		cur_var = cur_var->next;
+-		free(tmp);
+-	}
+-#endif
+ 	hush_exit(G.last_exitcode);
+ }
+ 

================================================================
Index: packages/busybox/busybox-1.18.1-mkswap.patch
diff -u /dev/null packages/busybox/busybox-1.18.1-mkswap.patch:1.1
--- /dev/null	Sun Jan  9 09:09:48 2011
+++ packages/busybox/busybox-1.18.1-mkswap.patch	Sun Jan  9 09:09:42 2011
@@ -0,0 +1,12 @@
+diff -urpN busybox-1.18.1/util-linux/mkswap.c busybox-1.18.1-mkswap/util-linux/mkswap.c
+--- busybox-1.18.1/util-linux/mkswap.c	2010-12-20 01:41:27.000000000 +0100
++++ busybox-1.18.1-mkswap/util-linux/mkswap.c	2011-01-05 11:41:24.455856773 +0100
+@@ -15,7 +15,7 @@ static void mkswap_selinux_setcontext(in
+ 	if (!is_selinux_enabled())
+ 		return;
+ 
+-	xfstat(fd, &stbuf, argv[0]);
++	xfstat(fd, &stbuf, path);
+ 	if (S_ISREG(stbuf.st_mode)) {
+ 		security_context_t newcon;
+ 		security_context_t oldcon = NULL;

================================================================
Index: packages/busybox/busybox-1.18.1-warning.patch
diff -u /dev/null packages/busybox/busybox-1.18.1-warning.patch:1.1
--- /dev/null	Sun Jan  9 09:09:48 2011
+++ packages/busybox/busybox-1.18.1-warning.patch	Sun Jan  9 09:09:42 2011
@@ -0,0 +1,28 @@
+diff -urpN busybox-1.18.1/libbb/procps.c busybox-1.18.1-warning/libbb/procps.c
+--- busybox-1.18.1/libbb/procps.c	2010-12-21 05:29:45.000000000 +0100
++++ busybox-1.18.1-warning/libbb/procps.c	2011-01-07 13:41:22.000000000 +0100
+@@ -154,6 +154,7 @@ static unsigned long fast_strtoul_10(cha
+ 	return n;
+ }
+ 
++# if ENABLE_FEATURE_FAST_TOP
+ static long fast_strtol_10(char **endptr)
+ {
+ 	if (**endptr != '-')
+@@ -162,6 +163,7 @@ static long fast_strtol_10(char **endptr
+ 	(*endptr)++;
+ 	return - (long)fast_strtoul_10(endptr);
+ }
++# endif
+ 
+ static char *skip_fields(char *str, int count)
+ {
+@@ -448,7 +450,7 @@ procps_status_t* FAST_FUNC procps_scan(p
+ //FIXME: is it safe to assume this field exists?
+ 			sp->last_seen_on_cpu = fast_strtoul_10(&cp);
+ # endif
+-#endif /* end of !ENABLE_FEATURE_TOP_SMP_PROCESS */
++#endif /* FEATURE_FAST_TOP */
+ 
+ #if ENABLE_FEATURE_PS_ADDITIONAL_COLUMNS
+ 			sp->niceness = tasknice;
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/busybox/busybox.spec?r1=1.182&r2=1.183&f=u



More information about the pld-cvs-commit mailing list