Skip to contentSkip to conversation

busybox: add new 1.20.0, remove deprecated, mark 1.18.x deprecated

PATCH New Gustavo Zacarias 5 participants 11 messages Apr 26, 2012 – Apr 29, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 busybox: add new 1.20.0, remove deprecated, mark 1.18.x deprecated

Add version 1.20.0, remove deprecated 1.16.x & 1.17.x versions and mark 1.18.x as deprecated.

---
 package/busybox/Config.in                          |   22 +-
 .../busybox/busybox-1.16.2/busybox-devmem.patch    |   76 --
 package/busybox/busybox-1.16.x.config              |  920 --------------------
 .../busybox-1.20.0/busybox-1.20.0-getty.patch      |   17 +
 .../busybox-1.20.0/busybox-1.20.0-lineedit.patch   |   22 +
 .../busybox-1.20.0/busybox-1.20.0-sed.patch        |   29 +
 ...busybox-1.17.x.config => busybox-1.20.x.config} |  206 +++--
 7 files changed, 208 insertions(+), 1084 deletions(-)
 delete mode 100644 package/busybox/busybox-1.16.2/busybox-devmem.patch
 delete mode 100644 package/busybox/busybox-1.16.x.config
 create mode 100644 package/busybox/busybox-1.20.0/busybox-1.20.0-getty.patch
 create mode 100644 package/busybox/busybox-1.20.0/busybox-1.20.0-lineedit.patch
 create mode 100644 package/busybox/busybox-1.20.0/busybox-1.20.0-sed.patch
 rename package/busybox/{busybox-1.17.x.config => busybox-1.20.x.config} (92%)
package/busybox/Config.in +8 -14
index c206509..b5770eb 100644
@@ -13,24 +13,20 @@ if BR2_PACKAGE_BUSYBOX
 
 choice
 	prompt "BusyBox Version"
-	default BR2_BUSYBOX_VERSION_1_19_X
+	default BR2_BUSYBOX_VERSION_1_20_X
 	help
 	  Select the version of BusyBox you wish to use.
 
-	config BR2_BUSYBOX_VERSION_1_16_X
-		bool "BusyBox 1.16.x"
-		depends on BR2_DEPRECATED
-
-	config BR2_BUSYBOX_VERSION_1_17_X
-		bool "BusyBox 1.17.x"
-		depends on BR2_DEPRECATED
-
 	config BR2_BUSYBOX_VERSION_1_18_X
 		bool "BusyBox 1.18.x"
+		depends on BR2_DEPRECATED
 
 	config BR2_BUSYBOX_VERSION_1_19_X
 		bool "BusyBox 1.19.x"
 
+	config BR2_BUSYBOX_VERSION_1_20_X
+		bool "BusyBox 1.20.x"
+
 	config BR2_PACKAGE_BUSYBOX_SNAPSHOT
 		bool "daily snapshot"
 
@@ -38,18 +34,16 @@ endchoice
 
 config BR2_BUSYBOX_VERSION
 	string
-	default "1.16.2"	if BR2_BUSYBOX_VERSION_1_16_X
-	default "1.17.4"	if BR2_BUSYBOX_VERSION_1_17_X
 	default "1.18.5"	if BR2_BUSYBOX_VERSION_1_18_X
 	default "1.19.4"	if BR2_BUSYBOX_VERSION_1_19_X
+	default "1.20.0"	if BR2_BUSYBOX_VERSION_1_20_X
 
 config BR2_PACKAGE_BUSYBOX_CONFIG
 	string "BusyBox configuration file to use?"
-	default "package/busybox/busybox-1.19.x.config" if BR2_PACKAGE_BUSYBOX_SNAPSHOT
-	default "package/busybox/busybox-1.16.x.config" if BR2_BUSYBOX_VERSION_1_16_X
-	default "package/busybox/busybox-1.17.x.config" if BR2_BUSYBOX_VERSION_1_17_X
+	default "package/busybox/busybox-1.20.x.config" if BR2_PACKAGE_BUSYBOX_SNAPSHOT
 	default "package/busybox/busybox-1.18.x.config" if BR2_BUSYBOX_VERSION_1_18_X
 	default "package/busybox/busybox-1.19.x.config" if BR2_BUSYBOX_VERSION_1_19_X
+	default "package/busybox/busybox-1.20.x.config" if BR2_BUSYBOX_VERSION_1_20_X
 	help
 	  Some people may wish to use their own modified BusyBox configuration
 	  file, and will specify their config file location with this option.
package/busybox/busybox-1.16.2/busybox-devmem.patch deleted +0 -76

76 lines not on this page · raw message

package/busybox/busybox-1.16.x.config deleted +0 -920

920 lines not on this page · raw message

package/busybox/busybox-1.20.0/busybox-1.20.0-getty.patch new file +17 -0
new file mode 100644
index 0000000..ed52159
@@ -0,0 +1,17 @@
+--- busybox-1.20.0/loginutils/getty.c
++++ busybox-1.20.0-getty/loginutils/getty.c
+@@ -561,8 +561,14 @@ int getty_main(int argc UNUSED_PARAM, ch
+ 		 */
+ 		fd = open("/dev/tty", O_RDWR | O_NONBLOCK);
+ 		if (fd >= 0) {
++			/* TIOCNOTTY sends SIGHUP to the foreground
++			 * process group - which may include us!
++			 * Make sure to not die on it:
++			 */
++			sighandler_t old = signal(SIGHUP, SIG_IGN);
+ 			ioctl(fd, TIOCNOTTY);
+ 			close(fd);
++			signal(SIGHUP, old);
+ 		}
+ 	}
+ 
package/busybox/busybox-1.20.0/busybox-1.20.0-lineedit.patch new file +22 -0
new file mode 100644
index 0000000..ee236ff
@@ -0,0 +1,22 @@
+--- busybox-1.20.0/libbb/lineedit.c
++++ busybox-1.20.0-lineedit/libbb/lineedit.c
+@@ -1352,8 +1352,7 @@ static void load_history(line_input_t *s
+ 		/* fill temp_h[], retaining only last MAX_HISTORY lines */
+ 		memset(temp_h, 0, sizeof(temp_h));
+ 		idx = 0;
+-		if (!ENABLE_FEATURE_EDITING_SAVE_ON_EXIT)
+-			st_parm->cnt_history_in_file = 0;
++		st_parm->cnt_history_in_file = 0;
+ 		while ((line = xmalloc_fgetline(fp)) != NULL) {
+ 			if (line[0] == '\0') {
+ 				free(line);
+@@ -1361,8 +1360,7 @@ static void load_history(line_input_t *s
+ 			}
+ 			free(temp_h[idx]);
+ 			temp_h[idx] = line;
+-			if (!ENABLE_FEATURE_EDITING_SAVE_ON_EXIT)
+-				st_parm->cnt_history_in_file++;
++			st_parm->cnt_history_in_file++;
+ 			idx++;
+ 			if (idx == st_parm->max_history)
+ 				idx = 0;
package/busybox/busybox-1.20.0/busybox-1.20.0-sed.patch new file +29 -0
new file mode 100644
index 0000000..70dc63f
@@ -0,0 +1,29 @@
+--- busybox-1.20.0/editors/sed.c
++++ busybox-1.20.0-sed/editors/sed.c
+@@ -743,7 +743,7 @@ static int do_subst_command(sed_cmd_t *s
+ 		 */
+ 		if (!G.regmatch[0].rm_so && !G.regmatch[0].rm_eo && match_count) {
+ 			pipe_putc(*line++);
+-			continue;
++			goto next;
+ 		}
+ 
+ 		match_count++;
+@@ -755,7 +755,7 @@ static int do_subst_command(sed_cmd_t *s
+ 		) {
+ 			for (i = 0; i < G.regmatch[0].rm_eo; i++)
+ 				pipe_putc(*line++);
+-			continue;
++			goto next;
+ 		}
+ 
+ 		/* print everything before the match */
+@@ -773,7 +773,7 @@ static int do_subst_command(sed_cmd_t *s
+ 		/* if we're not doing this globally, get out now */
+ 		if (sed_cmd->which_match != 0)
+ 			break;
+-
++ next:
+ 		if (*line == '\0')
+ 			break;
+ 
package/busybox/busybox-1.20.x.config renamed from package/busybox/busybox-1.17.x.config +132 -74

511 lines not on this page · raw message

Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 2/2 lsof: add busybox tweaks

Since busybox 1.20+ includes a lsof applet make sure lsof gets built after busybox so that we get the full-blown version if both are enabled. Also hide the lsof package unless BUSYBOX_SHOW_OTHERS is true.

---
 package/Config.in    |    2 ++
 package/lsof/lsof.mk |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)
package/Config.in +2 -0
index 64fce62..7f9b234 100644
@@ -24,7 +24,9 @@ source "package/dmalloc/Config.in"
 source "package/kexec/Config.in"
 source "package/latencytop/Config.in"
 source "package/lmbench/Config.in"
+if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/lsof/Config.in"
+endif
 source "package/ltp-testsuite/Config.in"
 source "package/lttng-babeltrace/Config.in"
 source "package/lttng-modules/Config.in"
package/lsof/lsof.mk +3 -0
index c07fb2d..7bc22c0 100644
@@ -8,6 +8,9 @@ LSOF_VERSION = 4.85
 LSOF_SOURCE = lsof_$(LSOF_VERSION).tar.bz2
 LSOF_SITE = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
 
+# Make certain full-blown lsof gets built after the busybox version (1.20+)
+LSOF_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox)
+
 BR2_LSOF_CFLAGS =
 ifeq ($(BR2_LARGEFILE),)
 BR2_LSOF_CFLAGS += -U_FILE_OFFSET_BITS
Signature · 1 line
1.7.3.4
#2 lore raw

PATCH 2/2 lsof: add busybox tweaks

Quoted 15 lines · Gustavo Zacarias

Since busybox 1.20+ includes a lsof applet make sure lsof gets built after busybox so that we get the full-blown version if both are enabled. Also hide the lsof package unless BUSYBOX_SHOW_OTHERS is true.

---
 package/Config.in    |    2 ++
 package/lsof/lsof.mk |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)
package/Config.in +0 -0
index 64fce62..7f9b234 100644

package/Config.in source "package/dmalloc/Config.in" · line 28

Quoted 5 lines
package/Config.in +1 -0
@@ -24,7 +24,9 @@ source "package/dmalloc/Config.in"
 source "package/kexec/Config.in"
 source "package/latencytop/Config.in"
 source "package/lmbench/Config.in"
+if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/lsof/Config.in"

put a depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS

in lsof/Config.in

Best Regards,
J.

#3 lore raw

PATCH 2/2 lsof: add busybox tweaks

Le Thu, 26 Apr 2012 16:08:40 +0200,
Jean-Christophe PLAGNIOL-VILLARD <[email protected]> a ?crit :

Quoted 5 lines
Quoted 2 lines

+if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
source "package/lsof/Config.in"

put a depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS

in lsof/Config.in

No, that's not what we do for all other packages. Gustavo's patch is correct with regard to the current guidelines.

Now, whether we should change those guidelines to something else is a different story. But if we change the guideline, it should be changed for all packages and not just for lsof.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH 2/2 lsof: add busybox tweaks

Quoted 7 lines · Thomas Petazzoni

Le Thu, 26 Apr 2012 16:08:40 +0200,
Jean-Christophe PLAGNIOL-VILLARD <[email protected]> a ?crit :

Quoted 4 lines
Quoted 2 lines

+if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
source "package/lsof/Config.in"

put a depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS

Quoted 8 lines
Quoted 1 line

in lsof/Config.in

No, that's not what we do for all other packages. Gustavo's patch is correct with regard to the current guidelines.

Now, whether we should change those guidelines to something else is a different story. But if we change the guideline, it should be changed for all packages and not just for lsof.

package/kmod/Config.in is already like this

and it's more clean

Best Regards,
J.

#5 lore raw

PATCH 2/2 lsof: add busybox tweaks

Quoted 9 lines · On Friday 27 April 2012 02:55:58 Jean-Christophe PLAGNIOL-VILLARD wrote:
Quoted 6 lines

No, that's not what we do for all other packages. Gustavo's patch is correct with regard to the current guidelines.

Now, whether we should change those guidelines to something else is a different story. But if we change the guideline, it should be changed for all packages and not just for lsof.

package/kmod/Config.in is already like this

and it's more clean

I agree that it's better to do it in the package's Config.in.

And changing the guideline doesn't automatically mean that all
packages have to change. Only new packages (or patches) must follow the guideline.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#6 lore raw

PATCH 2/2 lsof: add busybox tweaks

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Hi,

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

Now, whether we should change those guidelines to something else is a different story. But if we change the guideline, it should be changed for all packages and not just for lsof.

package/kmod/Config.in is already like this

The main reason why it's done like this is that it's only the _TOOLS suboption that should depend on the _SHOW_OTHERS option.

Quoted 1 line
Quoted 1 line

and it's more clean

Arnout> I agree that it's better to do it in the package's Config.in.

Arnout> And changing the guideline doesn't automatically mean that all Arnout> packages have to change. Only new packages (or patches) must follow Arnout> the guideline.

True. But the first thing to decide on is if this _SHOW_OTHERS option is really useful. It was afaik introduced long time ago to encourage people to use the busybox applets instead of the full blown versions, but perhaps we should just let people decide for themselves?

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH 2/2 lsof: add busybox tweaks

Quoted 4 lines · On Sunday 29 April 2012 10:36:05 Peter Korsgaard wrote:

True. But the first thing to decide on is if this _SHOW_OTHERS option is really useful. It was afaik introduced long time ago to encourage people to use the busybox applets instead of the full blown versions, but perhaps we should just let people decide for themselves?

Admittedly, the first thing I do when a start configuring is to enable
_SHOW_OTHERS. However, I think it is very useful for Joe Random User to be informed of which packages are redundant because they are already provided by busybox. Still, maybe a better way is to mention that in the package's menu entry:

package/lsof/Config.in +1 -1
index cc7512c..c3a878f 100644
@@ -1,5 +1,5 @@
 config BR2_PACKAGE_LSOF
-       bool "lsof"
+       bool "lsof (also in busybox)"
        help
          lsof (LiSt Open Files)
          The lsof tool lists information about files opened by

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#8 lore raw

PATCH 2/2 lsof: add busybox tweaks

In reply to Peter Korsgaard
Quoted 6 lines · Peter Korsgaard

True. But the first thing to decide on is if this _SHOW_OTHERS option is
really useful. It was afaik introduced long time ago to encourage people
to use the busybox applets instead of the full blown versions, but perhaps we should just let people decide for themselves?

I'd just kill it altogether, i'm not a fan of hidden options since they're prone to noise (people asking where it is) if they can be avoided.
And probably use Arnout's idea of appending it to the menu text or help.
Regards.

#9 lore raw

PATCH 2/2 lsof: add busybox tweaks

In reply to Gustavo Zacarias
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> Since busybox 1.20+ includes a lsof applet make sure lsof gets Gustavo> built after busybox so that we get the full-blown version if Gustavo> both are enabled. Also hide the lsof package unless Gustavo> BUSYBOX_SHOW_OTHERS is true.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#10 lore raw

PATCH 1/2 busybox: add new 1.20.0, remove deprecated, mark 1.18.x deprecated

In reply to Gustavo Zacarias
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> Add version 1.20.0, remove deprecated 1.16.x & 1.17.x versions Gustavo> and mark 1.18.x as deprecated.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard