Skip to contentSkip to conversation

busybox 1.13.2: Add more upstream patches, bump PR

PATCH In review Tom Rini 3 participants 5 messages Apr 2, 2009 – Apr 16, 2009

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 busybox 1.13.2: Add more upstream patches, bump PR

This adds the awk, killall, printf, syslogd, top24, unzip and wget patches from http://busybox.net/downloads/fixes-1.13.2/

---
 .../busybox-1.13.2/busybox-1.13.2-awk.patch        |   46 ++++++++++++++++++++
 .../busybox-1.13.2/busybox-1.13.2-killall.patch    |   17 +++++++
 .../busybox-1.13.2/busybox-1.13.2-printf.patch     |   21 +++++++++
 .../busybox-1.13.2/busybox-1.13.2-syslogd.patch    |   30 +++++++++++++
 .../busybox-1.13.2/busybox-1.13.2-top24.patch      |   12 +++++
 .../busybox-1.13.2/busybox-1.13.2-unzip.patch      |   12 +++++
 .../busybox-1.13.2/busybox-1.13.2-wget.patch       |   41 +++++++++++++++++
 recipes/busybox/busybox_1.13.2.bb                  |    9 +++-
 8 files changed, 187 insertions(+), 1 deletions(-)
 create mode 100644 recipes/busybox/busybox-1.13.2/busybox-1.13.2-awk.patch
 create mode 100644 recipes/busybox/busybox-1.13.2/busybox-1.13.2-killall.patch
 create mode 100644 recipes/busybox/busybox-1.13.2/busybox-1.13.2-printf.patch
 create mode 100644 recipes/busybox/busybox-1.13.2/busybox-1.13.2-syslogd.patch
 create mode 100644 recipes/busybox/busybox-1.13.2/busybox-1.13.2-top24.patch
 create mode 100644 recipes/busybox/busybox-1.13.2/busybox-1.13.2-unzip.patch
 create mode 100644 recipes/busybox/busybox-1.13.2/busybox-1.13.2-wget.patch
recipes/busybox/busybox-1.13.2/busybox-1.13.2-awk.patch new file +46 -0
new file mode 100644
index 0000000..0a5e680
@@ -0,0 +1,46 @@
+diff -urpN busybox-1.13.2/editors/awk.c busybox-1.13.2-awk/editors/awk.c
+--- busybox-1.13.2/editors/awk.c	2008-11-09 18:28:21.000000000 +0100
++++ busybox-1.13.2-awk/editors/awk.c	2009-02-26 12:17:05.000000000 +0100
+@@ -392,8 +392,12 @@ static const uint16_t PRIMES[] ALIGN2 = 
+ 
+ 
+ /* Globals. Split in two parts so that first one is addressed
+- * with (mostly short) negative offsets */
++ * with (mostly short) negative offsets.
++ * NB: it's unsafe to put members of type "double"
++ * into globals2 (gcc may fail to align them).
++ */
+ struct globals {
++	double t_double;
+ 	chain beginseq, mainseq, endseq;
+ 	chain *seq;
+ 	node *break_ptr, *continue_ptr;
+@@ -442,16 +446,16 @@ struct globals2 {
+ 	tsplitter exec_builtin__tspl;
+ 
+ 	/* biggest and least used members go last */
+-	double t_double;
+ 	tsplitter fsplitter, rsplitter;
+ };
+ #define G1 (ptr_to_globals[-1])
+ #define G (*(struct globals2 *)ptr_to_globals)
+ /* For debug. nm --size-sort awk.o | grep -vi ' [tr] ' */
+-/* char G1size[sizeof(G1)]; - 0x6c */
+-/* char Gsize[sizeof(G)]; - 0x1cc */
++/*char G1size[sizeof(G1)]; - 0x74 */
++/*char Gsize[sizeof(G)]; - 0x1c4 */
+ /* Trying to keep most of members accessible with short offsets: */
+-/* char Gofs_seed[offsetof(struct globals2, evaluate__seed)]; - 0x90 */
++/*char Gofs_seed[offsetof(struct globals2, evaluate__seed)]; - 0x90 */
++#define t_double     (G1.t_double    )
+ #define beginseq     (G1.beginseq    )
+ #define mainseq      (G1.mainseq     )
+ #define endseq       (G1.endseq      )
+@@ -479,7 +483,6 @@ struct globals2 {
+ #define t_info       (G.t_info      )
+ #define t_tclass     (G.t_tclass    )
+ #define t_string     (G.t_string    )
+-#define t_double     (G.t_double    )
+ #define t_lineno     (G.t_lineno    )
+ #define t_rollback   (G.t_rollback  )
+ #define intvar       (G.intvar      )
recipes/busybox/busybox-1.13.2/busybox-1.13.2-killall.patch new file +17 -0
new file mode 100644
index 0000000..9524f52
@@ -0,0 +1,17 @@
+--- busybox-1.13.2/include/libbb.h	Wed Dec 31 04:06:45 2008
++++ busybox-1.13.2-killall/include/libbb.h	Sat Feb 14 02:41:18 2009
+@@ -1275,7 +1275,13 @@
+ 	PSSCAN_UTIME    = 1 << 13,
+ 	PSSCAN_TTY      = 1 << 14,
+ 	PSSCAN_SMAPS	= (1 << 15) * ENABLE_FEATURE_TOPMEM,
+-	PSSCAN_ARGVN    = (1 << 16) * (ENABLE_PGREP || ENABLE_PKILL || ENABLE_PIDOF),
++	/* NB: used by find_pid_by_name(). Any applet using it
++	 * needs to be mentioned here. */
++	PSSCAN_ARGVN    = (1 << 16) * (ENABLE_KILLALL
++				|| ENABLE_PGREP || ENABLE_PKILL
++				|| ENABLE_PIDOF
++				|| ENABLE_SESTATUS 
++				),
+ 	USE_SELINUX(PSSCAN_CONTEXT = 1 << 17,)
+ 	PSSCAN_START_TIME = 1 << 18,
+ 	PSSCAN_CPU      = 1 << 19,
recipes/busybox/busybox-1.13.2/busybox-1.13.2-printf.patch new file +21 -0
new file mode 100644
index 0000000..281d457
@@ -0,0 +1,21 @@
+diff -urpN busybox-1.13.2/coreutils/printf.c busybox-1.13.2-printf/coreutils/printf.c
+--- busybox-1.13.2/coreutils/printf.c	2008-12-31 04:06:45.000000000 +0100
++++ busybox-1.13.2-printf/coreutils/printf.c	2009-03-03 15:13:12.000000000 +0100
+@@ -139,14 +139,14 @@ static void print_direc(char *format, un
+ 	char saved;
+ 	char *have_prec, *have_width;
+ 
++	saved = format[fmt_length];
++	format[fmt_length] = '\0';
++
+ 	have_prec = strstr(format, ".*");
+ 	have_width = strchr(format, '*');
+ 	if (have_width - 1 == have_prec)
+ 		have_width = NULL;
+ 
+-	saved = format[fmt_length];
+-	format[fmt_length] = '\0';
+-
+ 	switch (format[fmt_length - 1]) {
+ 	case 'c':
+ 		printf(format, *argument);
recipes/busybox/busybox-1.13.2/busybox-1.13.2-syslogd.patch new file +30 -0
new file mode 100644
index 0000000..1c24cdc
@@ -0,0 +1,30 @@
+diff -urpN busybox-1.13.2/sysklogd/syslogd.c busybox-1.13.2-syslogd/sysklogd/syslogd.c
+--- busybox-1.13.2/sysklogd/syslogd.c	2008-11-09 18:28:03.000000000 +0100
++++ busybox-1.13.2-syslogd/sysklogd/syslogd.c	2009-03-08 02:03:24.000000000 +0100
+@@ -301,17 +301,23 @@ static void log_locally(time_t now, char
+ 	}
+ #endif
+ 	if (G.logFD >= 0) {
++		/* Reopen log file every second. This allows admin
++		 * to delete the file and not worry about restarting us.
++		 * This costs almost nothing since it happens
++		 * _at most_ once a second.
++		 */
+ 		if (!now)
+ 			now = time(NULL);
+ 		if (G.last_log_time != now) {
+-			G.last_log_time = now; /* reopen log file every second */
++			G.last_log_time = now;
+ 			close(G.logFD);
+ 			goto reopen;
+ 		}
+ 	} else {
+  reopen:
+-		G.logFD = device_open(G.logFilePath, O_WRONLY | O_CREAT
+-					| O_NOCTTY | O_APPEND | O_NONBLOCK);
++		G.logFD = open(G.logFilePath, O_WRONLY | O_CREAT
++					| O_NOCTTY | O_APPEND | O_NONBLOCK,
++					0666);
+ 		if (G.logFD < 0) {
+ 			/* cannot open logfile? - print to /dev/console then */
+ 			int fd = device_open(DEV_CONSOLE, O_WRONLY | O_NOCTTY | O_NONBLOCK);
recipes/busybox/busybox-1.13.2/busybox-1.13.2-top24.patch new file +12 -0
new file mode 100644
index 0000000..25ee861
@@ -0,0 +1,12 @@
+diff -urpN busybox-1.13.2/procps/top.c busybox-1.13.2-top24/procps/top.c
+--- busybox-1.13.2/procps/top.c	2008-11-09 18:28:20.000000000 +0100
++++ busybox-1.13.2-top24/procps/top.c	2009-03-02 22:24:31.000000000 +0100
+@@ -200,7 +200,7 @@ static NOINLINE int read_cpu_jiffy(FILE 
+ 			&p_jif->usr, &p_jif->nic, &p_jif->sys, &p_jif->idle,
+ 			&p_jif->iowait, &p_jif->irq, &p_jif->softirq,
+ 			&p_jif->steal);
+-	if (ret > 4) {
++	if (ret >= 4) {
+ 		p_jif->total = p_jif->usr + p_jif->nic + p_jif->sys + p_jif->idle
+ 			+ p_jif->iowait + p_jif->irq + p_jif->softirq + p_jif->steal;
+ 		/* procps 2.x does not count iowait as busy time */
recipes/busybox/busybox-1.13.2/busybox-1.13.2-unzip.patch new file +12 -0
new file mode 100644
index 0000000..6b3f713
@@ -0,0 +1,12 @@
+diff -urpN busybox-1.13.2/archival/unzip.c busybox-1.13.2-unzip/archival/unzip.c
+--- busybox-1.13.2/archival/unzip.c	2008-11-09 18:28:02.000000000 +0100
++++ busybox-1.13.2-unzip/archival/unzip.c	2009-02-26 12:17:21.000000000 +0100
+@@ -140,7 +140,7 @@ struct BUG_cde_header_must_be_16_bytes {
+ };
+ 
+ #define FIX_ENDIANNESS_CDE(cde_header) do { \
+-	(cde_header).formatted.cds_offset = SWAP_LE16((cde_header).formatted.cds_offset); \
++	(cde_header).formatted.cds_offset = SWAP_LE32((cde_header).formatted.cds_offset); \
+ } while (0)
+ 
+ enum { zip_fd = 3 };
recipes/busybox/busybox-1.13.2/busybox-1.13.2-wget.patch new file +41 -0

41 lines not on this page · raw message

recipes/busybox/busybox_1.13.2.bb +8 -1
index 8ecbc1e..602e782 100644
@@ -1,13 +1,20 @@
 require busybox.inc
-PR = "r17"
+PR = "r18"
 
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
+  file://busybox-1.13.2-awk.patch;patch=1 \
   file://busybox-1.13.2-depmod.patch;patch=1 \
   file://busybox-1.13.2-init.patch;patch=1 \
+  file://busybox-1.13.2-killall.patch;patch=1 \
   file://busybox-1.13.2-mdev.patch;patch=1 \
   file://busybox-1.13.2-modprobe.patch;patch=1 \
+  file://busybox-1.13.2-printf.patch;patch=1 \
+  file://busybox-1.13.2-syslogd.patch;patch=1 \
   file://busybox-1.13.2-tar.patch;patch=1 \
+  file://busybox-1.13.2-top24.patch;patch=1 \
+  file://busybox-1.13.2-unzip.patch;patch=1 \
+  file://busybox-1.13.2-wget.patch;patch=1 \
   \
   file://udhcpscript.patch;patch=1 \
   file://udhcpc-fix-nfsroot.patch;patch=1 \
Signature · 4 lines
1.5.2.5

-- 
Tom Rini
Acked-by on v1 1/1
#2 lore raw
In reply to Tom Rini

Dnia czwartek, 2 kwietnia 2009 o 02:53:56 Tom Rini napisał(a):

Quoted 2 lines

This adds the awk, killall, printf, syslogd, top24, unzip and wget patches from http://busybox.net/downloads/fixes-1.13.2/

I will also Ack it for stable/2009 branch.

Regards,

Signature · 3 lines
JID:      [email protected]
Website:  http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
author
#3 lore raw
Quoted 7 lines · Marcin Juszkiewicz

Dnia czwartek, 2 kwietnia 2009 o 02:53:56 Tom Rini napisa??(a):

Quoted 2 lines

This adds the awk, killall, printf, syslogd, top24, unzip and wget patches from http://busybox.net/downloads/fixes-1.13.2/

I will also Ack it for stable/2009 branch.

Looking for 1 more ack. The awk patch is needed to fix problems that are seen on MIPS/FPU systems (for example, malta).

Signature · 1 line
Tom Rini
#4 lore raw
Quoted 11 lines · Tom Rini
Quoted 7 lines · Marcin Juszkiewicz

Dnia czwartek, 2 kwietnia 2009 o 02:53:56 Tom Rini napisa??(a):

Quoted 2 lines

This adds the awk, killall, printf, syslogd, top24, unzip and wget patches from http://busybox.net/downloads/fixes-1.13.2/

I will also Ack it for stable/2009 branch.

Looking for 1 more ack. The awk patch is needed to fix problems that are seen on MIPS/FPU systems (for example, malta).

Signature · 1 line
Denys