Skip to contentSkip to conversation

busybox: no need to disable clear and reset

PATCH New Arnout Vandecappelle (Essensium/Mind) 3 participants 5 messages Apr 24, 2017 – May 1, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 busybox: no need to disable clear and reset

Removing clear and reset from the busybox config when the ncurses tools are enabled is not really needed.

Since commit 802bff9c42, the busybox install will not overwrite existing programs. Therefore, the tools will be installed correctly regardless of the order of the build:
- if busybox is built first, the clear and reset apps are installed, but they will be overwritten by ncurses;
- if ncurses is built first, it will install the clear and reset apps, and busybox will no longer install them.

We prefer not to modify the busybox configuration when not strictly necessary, because it is surprising for the user that his configuration is not applied. Clearly, it's not ideal that busybox is configured with redundant apps, but if the user wants to shrink it, it's possible to provide a custom config.

This partially reverts commit 33c72344a8686a136c1da6a056ed6c0945bbf8b7.

---
 package/busybox/busybox.mk | 12 ------------
 1 file changed, 12 deletions(-)
package/busybox/busybox.mk +0 -12
index 689830e7f8..a536ed2953 100644
@@ -148,17 +148,6 @@ define BUSYBOX_MUSL_TWEAKS
 endef
 endif
 
-ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PROGS),y)
-# Ncurses package overlaps:
-#     /usr/bin/clear
-#     /usr/bin/reset -> /usr/bin/tset (symlink)
-#
-define BUSYBOX_DISABLE_NCURSES_PROGS
-	$(call KCONFIG_DISABLE_OPT,CONFIG_CLEAR,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_DISABLE_OPT,CONFIG_RESET,$(BUSYBOX_BUILD_CONFIG))
-endef
-endif
-
 define BUSYBOX_INSTALL_UDHCPC_SCRIPT
 	if grep -q CONFIG_UDHCPC=y $(@D)/.config; then \
 		$(INSTALL) -m 0755 -D package/busybox/udhcpc.script \
@@ -240,7 +229,6 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS
 	$(BUSYBOX_SET_WATCHDOG)
 	$(BUSYBOX_SET_SELINUX)
 	$(BUSYBOX_MUSL_TWEAKS)
-	$(BUSYBOX_DISABLE_NCURSES_PROGS)
 endef
 
 define BUSYBOX_CONFIGURE_CMDS
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 busybox: no need to disable clear and reset

Arnout,

On Apr 24, 2017 3:13 PM, "Arnout Vandecappelle (Essensium/Mind)" < [email protected]> wrote:

Removing clear and reset from the busybox config when the ncurses tools are enabled is not really needed.

Since commit 802bff9c42, the busybox install will not overwrite existing programs. Therefore, the tools will be installed correctly regardless of the order of the build:
- if busybox is built first, the clear and reset apps are installed, but they will be overwritten by ncurses;
- if ncurses is built first, it will install the clear and reset apps, and busybox will no longer install them.

We prefer not to modify the busybox configuration when not strictly necessary, because it is surprising for the user that his configuration is not applied. Clearly, it's not ideal that busybox is configured with redundant apps, but if the user wants to shrink it, it's possible to provide a custom config.

This partially reverts commit 33c72344a8686a136c1da6a056ed6c0945bbf8b7.

I'll give this a test tonight

---
 package/busybox/busybox.mk | 12 ------------
 1 file changed, 12 deletions(-)
package/busybox/busybox.mk +0 -12
index 689830e7f8..a536ed2953 100644
@@ -148,17 +148,6 @@ define BUSYBOX_MUSL_TWEAKS
 endef
 endif
 
-ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PROGS),y)
-# Ncurses package overlaps:
-#     /usr/bin/clear
-#     /usr/bin/reset -> /usr/bin/tset (symlink)
-#
-define BUSYBOX_DISABLE_NCURSES_PROGS
-       $(call KCONFIG_DISABLE_OPT,CONFIG_CLEAR,$(BUSYBOX_BUILD_CONFIG))
-       $(call KCONFIG_DISABLE_OPT,CONFIG_RESET,$(BUSYBOX_BUILD_CONFIG))
-endef
-endif
-
 define BUSYBOX_INSTALL_UDHCPC_SCRIPT
        if grep -q CONFIG_UDHCPC=y $(@D)/.config; then \
                $(INSTALL) -m 0755 -D package/busybox/udhcpc.script \
@@ -240,7 +229,6 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS
        $(BUSYBOX_SET_WATCHDOG)
        $(BUSYBOX_SET_SELINUX)
        $(BUSYBOX_MUSL_TWEAKS)
-       $(BUSYBOX_DISABLE_NCURSES_PROGS)
 endef
 
 define BUSYBOX_CONFIGURE_CMDS

--
2.11.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170424/563bb696/attachment.html>

#2 lore raw

PATCH 1/1 busybox: no need to disable clear and reset

In reply to Arnout Vandecappelle (Essensium/Mind)

Arnout,

Quoted 11 lines · Arnout Vandecappelle (Essensium/Mind)

Removing clear and reset from the busybox config when the ncurses tools are enabled is not really needed.

Since commit 802bff9c42, the busybox install will not overwrite existing programs. Therefore, the tools will be installed correctly regardless of the order of the build:
- if busybox is built first, the clear and reset apps are installed, but they will be overwritten by ncurses;
- if ncurses is built first, it will install the clear and reset apps, and busybox will no longer install them.

Quoted 8 lines

We prefer not to modify the busybox configuration when not strictly necessary, because it is surprising for the user that his configuration is not applied. Clearly, it's not ideal that busybox is configured with redundant apps, but if the user wants to shrink it, it's possible to provide a custom config.

This partially reverts commit 33c72344a8686a136c1da6a056ed6c0945bbf8b7.

Verified with a the BR default config doing a clean make all for each case.

Quoted 40 lines
---
 package/busybox/busybox.mk | 12 ------------
 1 file changed, 12 deletions(-)
package/busybox/busybox.mk +0 -13
index 689830e7f8..a536ed2953 100644
@@ -148,17 +148,6 @@ define BUSYBOX_MUSL_TWEAKS
 endef
 endif
 
-ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PROGS),y)
-# Ncurses package overlaps:
-#     /usr/bin/clear
-#     /usr/bin/reset -> /usr/bin/tset (symlink)
-#
-define BUSYBOX_DISABLE_NCURSES_PROGS
-       $(call KCONFIG_DISABLE_OPT,CONFIG_CLEAR,$(BUSYBOX_BUILD_CONFIG))
-       $(call KCONFIG_DISABLE_OPT,CONFIG_RESET,$(BUSYBOX_BUILD_CONFIG))
-endef
-endif
-
 define BUSYBOX_INSTALL_UDHCPC_SCRIPT
        if grep -q CONFIG_UDHCPC=y $(@D)/.config; then \
                $(INSTALL) -m 0755 -D package/busybox/udhcpc.script \
@@ -240,7 +229,6 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS
        $(BUSYBOX_SET_WATCHDOG)
        $(BUSYBOX_SET_SELINUX)
        $(BUSYBOX_MUSL_TWEAKS)
-       $(BUSYBOX_DISABLE_NCURSES_PROGS)
 endef
 
 define BUSYBOX_CONFIGURE_CMDS
--

2.11.0

Signature · 8 lines
Matthew L Weber / Pr Software Engineer
Airborne Information Systems / Security Systems and Software / Secure Platforms
MS 131-100, C Ave NE, Cedar Rapids, IA, 52498, USA
www.rockwellcollins.com

Note: Any Export License Required Information and License Restricted
Third Party Intellectual Property (TPIP) content must be encrypted and
sent to matthew.weber at corp.rockwellcollins.com.
#3 lore raw

PATCH 1/1 busybox: no need to disable clear and reset

In reply to Arnout Vandecappelle (Essensium/Mind)
Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

Removing clear and reset from the busybox config when the ncurses tools are enabled is not really needed.

Since commit 802bff9c42, the busybox install will not overwrite existing programs. Therefore, the tools will be installed correctly regardless of the order of the build:
- if busybox is built first, the clear and reset apps are installed, but they will be overwritten by ncurses;
- if ncurses is built first, it will install the clear and reset apps, and busybox will no longer install them.

We prefer not to modify the busybox configuration when not strictly necessary, because it is surprising for the user that his configuration is not applied. Clearly, it's not ideal that busybox is configured with redundant apps, but if the user wants to shrink it, it's possible to provide a custom config.

Quoted 5 lines

This partially reverts commit 33c72344a8686a136c1da6a056ed6c0945bbf8b7.

Committed, thanks!

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

PATCH 1/1 busybox: no need to disable clear and reset

In reply to Arnout Vandecappelle (Essensium/Mind)
Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

Removing clear and reset from the busybox config when the ncurses tools are enabled is not really needed.

Since commit 802bff9c42, the busybox install will not overwrite existing programs. Therefore, the tools will be installed correctly regardless of the order of the build:
- if busybox is built first, the clear and reset apps are installed, but they will be overwritten by ncurses;
- if ncurses is built first, it will install the clear and reset apps, and busybox will no longer install them.

We prefer not to modify the busybox configuration when not strictly necessary, because it is surprising for the user that his configuration is not applied. Clearly, it's not ideal that busybox is configured with redundant apps, but if the user wants to shrink it, it's possible to provide a custom config.

Quoted 5 lines

This partially reverts commit 33c72344a8686a136c1da6a056ed6c0945bbf8b7.

Committed to 2017.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard