changeset 828:c01df15147de

Upgrade busybox to 1.15.1.
author Rob Landley <rob@landley.net>
date Wed, 30 Sep 2009 01:53:53 -0500
parents 1093d3f26c5d
children 83e108bdf5a5
files download.sh sources/patches/busybox-pgrep.patch
diffstat 2 files changed, 4 insertions(+), 147 deletions(-) [+]
line wrap: on
line diff
--- a/download.sh	Wed Sep 30 01:52:35 2009 -0500
+++ b/download.sh	Wed Sep 30 01:53:53 2009 -0500
@@ -50,22 +50,22 @@
 
 URL=ftp://ftp.gnu.org/gnu/gcc/gcc-4.2.1/gcc-core-4.2.1.tar.bz2 \
 SHA1=43a138779e053a864bd16dfabcd3ffff04103213 \
-UNSTABLE=ftp://ftp.gnu.org/gnu/gcc/gcc-4.1.2/gcc-core-4.1.2.tar.bz2 \
+UNSTABLE=ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.1/gcc-core-4.4.1.tar.bz2 \
 download || dienow
 
 # The g++ version must match gcc version.
 
 URL=http://ftp.gnu.org/gnu/gcc/gcc-4.2.1/gcc-g++-4.2.1.tar.bz2 \
 SHA1=8f3785bd0e092f563e14ecd26921cd04275496a6 \
-UNSTABLE=http://ftp.gnu.org/gnu/gcc/gcc-4.1.2/gcc-g++-4.1.2.tar.bz2 \
+UNSTABLE=http://ftp.gnu.org/gnu/gcc/gcc-4.4.1/gcc-g++-4.4.1.tar.bz2 \
 download || dienow
 
 # Building a native root filesystem requires linux and uClibc (above) plus
 # BusyBox.  Adding a native toolchain requires binutils and gcc (above) plus
 # make and bash.
 
-URL=http://www.busybox.net/downloads/busybox-1.14.3.tar.bz2 \
-SHA1=0162e2210e7b95396ee35f005929f747ecb9ad8f \
+URL=http://www.busybox.net/downloads/busybox-1.15.1.tar.bz2 \
+SHA1= \
 UNSTABLE=http://busybox.net/downloads/busybox-snapshot.tar.bz2 \
 download || dienow
 
--- a/sources/patches/busybox-pgrep.patch	Wed Sep 30 01:52:35 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-diff --git a/include/usage.h b/include/usage.h
-index e606925..20fd909 100644
---- a/include/usage.h
-+++ b/include/usage.h
-@@ -3207,7 +3207,7 @@
-        "$ patch -p0 -i example.diff"
- 
- #define pgrep_trivial_usage \
--       "[-flnovx] pattern"
-+       "[-flnovx] [-s SID|-P ppid|pattern]"
- #define pgrep_full_usage "\n\n" \
-        "Display process(es) selected by regex pattern\n" \
-      "\nOptions:" \
-@@ -3217,6 +3217,8 @@
-      "\n	-o	Show the oldest process only" \
-      "\n	-v	Negate the matching" \
-      "\n	-x	Match whole name (not substring)" \
-+     "\n	-s	Match session ID (0 for this one)" \
-+     "\n	-P	Match parent process ID" \
- 
- #if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
- #define pidof_trivial_usage \
-@@ -3309,7 +3311,8 @@
-        "the new root file system"
- 
- #define pkill_trivial_usage \
--       "[-l] | [-fnovx] [-signal] pattern"
-+       "[-l|-SIGNAL] [-fnovx] [-s SID|-P ppid|pattern]"
-+
- #define pkill_full_usage "\n\n" \
-        "Send a signal to process(es) selected by regex pattern\n" \
-      "\nOptions:" \
-@@ -3319,6 +3322,10 @@
-      "\n	-o	Signal the oldest process only" \
-      "\n	-v	Negate the matching" \
-      "\n	-x	Match whole name (not substring)" \
-+     "\n	-s	Match session ID (0 for this one)" \
-+     "\n	-P	Match parent process ID" \
-+     "\n\nSignal, if present, must be first option."
-+
- 
- #define popmaildir_trivial_usage \
-        "[OPTIONS] Maildir [connection-helper ...]"
-diff --git a/procps/pgrep.c b/procps/pgrep.c
-index 0e8e529..a336bdf 100644
---- a/procps/pgrep.c
-+++ b/procps/pgrep.c
-@@ -49,10 +49,8 @@ int pgrep_main(int argc UNUSED_PARAM, char **argv)
- 	int signo = SIGTERM;
- 	unsigned opt;
- 	int scan_mask = PSSCAN_COMM;
--	char *first_arg;
--	int first_arg_idx;
--	int matched_pid;
--	char *cmd_last;
-+	int matched_pid, matched_sid = 0, matched_ppid = 0;
-+	char *cmd_last, *which_sid = NULL, *which_ppid = NULL;
- 	procps_status_t *proc;
- 	/* These are initialized to 0 */
- 	struct {
-@@ -64,45 +62,39 @@ int pgrep_main(int argc UNUSED_PARAM, char **argv)
- 
- 	memset(&Z, 0, sizeof(Z));
- 
--	/* We must avoid interpreting -NUM (signal num) as an option */
--	first_arg_idx = 1;
--	while (1) {
--		first_arg = argv[first_arg_idx];
--		if (!first_arg)
--			break;
--		/* not "-<small_letter>..."? */
--		if (first_arg[0] != '-' || first_arg[1] < 'a' || first_arg[1] > 'z') {
--			argv[first_arg_idx] = NULL; /* terminate argv here */
--			break;
-+	/* Parse -SIGNAL for pkill.  Must be first option, if present. */
-+	if (pkill && argv[1] && argv[1][0]=='-') {
-+		int temp = get_signum(argv[1]+1);
-+		if (temp != -1) {
-+			signo = temp;
-+			argv++;
- 		}
--		first_arg_idx++;
- 	}
--	opt = getopt32(argv, "vlfxon");
--	argv[first_arg_idx] = first_arg;
-+
-+	/* Parse remaining options */
-+	opt = getopt32(argv, "vlfxons:P:", &which_sid, &which_ppid);
-+
-+	if (pkill && OPT_LIST) { /* -l: print the whole signal list */
-+		print_signames();
-+		return 0;
-+	}
-+
-+	if (which_sid) {
-+		matched_sid = xatol(which_sid);
-+		if (!matched_sid) matched_sid = getsid(pid);
-+	}
-+	if (which_ppid) matched_ppid = xatol(which_ppid);
- 
- 	argv += optind;
- 	//argc -= optind; - unused anyway
- 	if (OPT_FULL)
- 		scan_mask |= PSSCAN_ARGVN;
- 
--	if (pkill) {
--		if (OPT_LIST) { /* -l: print the whole signal list */
--			print_signames();
--			return 0;
--		}
--		if (first_arg && first_arg[0] == '-') {
--			signo = get_signum(&first_arg[1]);
--			if (signo < 0) /* || signo > MAX_SIGNUM ? */
--				bb_error_msg_and_die("bad signal name '%s'", &first_arg[1]);
--			argv++;
--		}
--	}
--
- 	/* One pattern is required */
--	if (!argv[0] || argv[1])
-+	if (!which_sid && !which_ppid && (!argv[0] || argv[1]))
- 		bb_show_usage();
- 
--	xregcomp(&re_buffer, argv[0], 0);
-+	if (argv[0]) xregcomp(&re_buffer, argv[0], 0);
- 	matched_pid = 0;
- 	cmd_last = NULL;
- 	proc = NULL;
-@@ -120,8 +112,13 @@ int pgrep_main(int argc UNUSED_PARAM, char **argv)
- 				i--;
- 			}
- 		}
-+
-+		if (matched_ppid && matched_ppid != proc->ppid) continue;
-+		if (matched_sid && matched_sid != proc->sid) continue;
-+
- 		/* NB: OPT_INVERT is always 0 or 1 */
--		if ((regexec(&re_buffer, cmd, 1, re_match, 0) == 0 /* match found */
-+		if (!argv[0] ||
-+			(regexec(&re_buffer, cmd, 1, re_match, 0) == 0 /* match found */
- 		     && (!OPT_ANCHOR || (re_match[0].rm_so == 0 && re_match[0].rm_eo == (regoff_t)strlen(cmd)))) ^ OPT_INVERT
- 		) {
- 			matched_pid = proc->pid;