Skip to contentSkip to conversation

busybox: remove musl specific tweaks

PATCH New Baruch Siach 2 participants 4 messages May 8, 2018 – May 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 busybox: remove musl specific tweaks

Busybox build fine under current musl using its provided shadow passwords and utmp/wtmp support.

---
 package/busybox/busybox.mk | 16 ----------------
 1 file changed, 16 deletions(-)
package/busybox/busybox.mk +0 -16
index 60a55a2c78a0..7033c4304a94 100644
@@ -156,21 +156,6 @@ define BUSYBOX_INTERNAL_SHADOW_PASSWORDS
 endef
 endif
 
-# We also need to use internal shadow password functions when using
-# the musl C library, since some of them are not yet implemented by
-# musl.
-#
-# Do not use utmp/wmtp support. wmtp support is not available in musl,
-# and utmp support is not sufficient for Busybox.
-ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
-define BUSYBOX_MUSL_TWEAKS
-	$(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_PWD_GRP,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_SHADOW,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_DISABLE_OPT,CONFIG_FEATURE_UTMP,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_DISABLE_OPT,CONFIG_FEATURE_WTMP,$(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 \
@@ -293,7 +278,6 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS
 	$(BUSYBOX_SET_WATCHDOG)
 	$(BUSYBOX_SET_SELINUX)
 	$(BUSYBOX_SET_INDIVIDUAL_BINARIES)
-	$(BUSYBOX_MUSL_TWEAKS)
 endef
 
 define BUSYBOX_CONFIGURE_CMDS
Signature · 1 line
2.17.0
#1 lore raw

PATCH 2/3 busybox: remove shadow passwords config tweaks

These configuration tweaks were added for compatibility with Blackfin toolchains that bundled a uClibc version without shadow passwords support. Blackfin is gone, so this is no longer needed.

---
 package/busybox/busybox.mk | 9 ---------
 1 file changed, 9 deletions(-)
package/busybox/busybox.mk +0 -9
index 7033c4304a94..75fe7e137b97 100644
@@ -148,14 +148,6 @@ define BUSYBOX_PREFER_STATIC
 endef
 endif
 
-# Disable shadow passwords support if unsupported by the C library
-ifeq ($(BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS),)
-define BUSYBOX_INTERNAL_SHADOW_PASSWORDS
-	$(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_PWD_GRP,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_SHADOW,$(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 \
@@ -273,7 +265,6 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS
 	$(BUSYBOX_SET_MDEV)
 	$(BUSYBOX_SET_CRYPT_SHA)
 	$(BUSYBOX_LINUX_PAM)
-	$(BUSYBOX_INTERNAL_SHADOW_PASSWORDS)
 	$(BUSYBOX_SET_INIT)
 	$(BUSYBOX_SET_WATCHDOG)
 	$(BUSYBOX_SET_SELINUX)
Signature · 1 line
2.17.0
#2 lore raw

PATCH 3/3 toolchain: remove BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS

In reply to Baruch Siach

Commit b9882925a4 (toolchain: introduce BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS) added this symbol to identify Blackfin toolchains without shadow passwords support. We no longer support Blackfin.

Cc Thomas De Schampheleire <[email protected]>
Cc Thomas Petazzoni <[email protected]>
---
 toolchain/Config.in                                          | 5 -----
 .../toolchain-external-custom/Config.in.options              | 3 ---
 2 files changed, 8 deletions(-)
toolchain/Config.in +0 -5
index 121ddb4fa49a..77f95ee1c32c 100644
@@ -15,7 +15,6 @@ config BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 	select BR2_TOOLCHAIN_HAS_THREADS_NPTL
-	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 	select BR2_TOOLCHAIN_SUPPORTS_PIE
 
 config BR2_TOOLCHAIN_USES_UCLIBC
@@ -43,7 +42,6 @@ choice
 config BR2_TOOLCHAIN_BUILDROOT
 	bool "Buildroot toolchain"
 	depends on BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT
-	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 
 config BR2_TOOLCHAIN_EXTERNAL
 	bool "External toolchain"
@@ -108,9 +106,6 @@ config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 config BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	bool
 
-config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
-	bool
-
 config BR2_TOOLCHAIN_HAS_SSP
 	bool
 
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +0 -3
index 65d94d0adfd8..55370e967a37 100644
@@ -277,9 +277,6 @@ choice
 config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
 	bool "uClibc/uClibc-ng"
 	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
-	# For the time being, we assume that all custom external
-	# toolchains have shadow password support.
-	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 	help
 	  Select this option if your external toolchain uses the
 	  uClibc (available from http://www.uclibc.org/)
Signature · 1 line
2.17.0
#3 lore raw

PATCH 1/3 busybox: remove musl specific tweaks

In reply to Baruch Siach

Hello,

Quoted 8 lines · Baruch Siach

Busybox build fine under current musl using its provided shadow passwords and utmp/wtmp support.

---
 package/busybox/busybox.mk | 16 ----------------
 1 file changed, 16 deletions(-)

Series applied to next. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com