Skip to contentSkip to conversation

package/util-linux: allow musl build for login/runuser/su

PATCH Applied Bernd Kuhls 2 participants 3 messages Jun 20 – Jul 3

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/util-linux: allow musl build for login/runuser/su

Buildroot commit f89ca996b6deb660b53c33196b8b309fac659bf9 fixed the build of linux-pam with musl in 2020 but did not remove the restric- tions in place for login/runuser/su which were added earlier with these commits:

login (2015): 25ecd24579f293ef4fcc6847094c4af39f4113af runuser (2017): 09860f354ae0824cfead384e994d3f119e22b851 su (2017): c6488923fb785ac11f6ec78e53db5da22203b178

---
Gitlab pipeline passed:
https://gitlab.com/bkuhls/buildroot/-/commits/75fbf2c4a4cb132b66c59560f0470ebc063416fc

 package/util-linux/Config.in | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
package/util-linux/Config.in +3 -9
index c63cec2a9c..df7435e71a 100644
@@ -210,17 +210,15 @@ config BR2_PACKAGE_UTIL_LINUX_LOGIN
 	depends on BR2_ENABLE_LOCALE # linux-pam
 	depends on BR2_USE_WCHAR # linux-pam
 	depends on !BR2_STATIC_LIBS # linux-pam
-	depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam
 	depends on BR2_USE_MMU # fork(), linux-pam
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	select BR2_PACKAGE_LINUX_PAM
 	help
 	  Begin a session on the system
 
-comment "login needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
+comment "login needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
 		|| BR2_STATIC_LIBS \
-		|| BR2_TOOLCHAIN_USES_MUSL \
 		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 config BR2_PACKAGE_UTIL_LINUX_LOSETUP
@@ -366,7 +364,6 @@ config BR2_PACKAGE_UTIL_LINUX_RUNUSER
 	bool "runuser"
 	depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam
 	depends on !BR2_STATIC_LIBS
-	depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam
 	depends on BR2_USE_MMU # fork(), linux-pam
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	select BR2_PACKAGE_LINUX_PAM
@@ -375,10 +372,9 @@ config BR2_PACKAGE_UTIL_LINUX_RUNUSER
 	  to ask for a password, because it may be executed by the root
 	  user only)
 
-comment "runuser needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
+comment "runuser needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
 		|| BR2_STATIC_LIBS \
-		|| BR2_TOOLCHAIN_USES_MUSL \
 		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 config BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS
@@ -411,17 +407,15 @@ config BR2_PACKAGE_UTIL_LINUX_SU
 	bool "su"
 	depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam
 	depends on !BR2_STATIC_LIBS
-	depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam
 	depends on BR2_USE_MMU # fork(), linux-pam
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	select BR2_PACKAGE_LINUX_PAM
 	help
 	  Run a command with substitute user and group ID
 
-comment "su needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
+comment "su needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
 		|| BR2_STATIC_LIBS \
-		|| BR2_TOOLCHAIN_USES_MUSL \
 		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 config BR2_PACKAGE_UTIL_LINUX_SULOGIN
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Am 20.06.26 um 20:46 schrieb Bernd Kuhls:

Quoted 10 lines

Buildroot commit f89ca996b6deb660b53c33196b8b309fac659bf9 fixed the build of linux-pam with musl in 2020 but did not remove the restric- tions in place for login/runuser/su which were added earlier with these commits:

login (2015): 25ecd24579f293ef4fcc6847094c4af39f4113af runuser (2017): 09860f354ae0824cfead384e994d3f119e22b851 su (2017): c6488923fb785ac11f6ec78e53db5da22203b178

Applied to master, thank you!

Quoted 59 lines

---
Gitlab pipeline passed:
https://gitlab.com/bkuhls/buildroot/-/commits/75fbf2c4a4cb132b66c59560f0470ebc063416fc

  package/util-linux/Config.in | 12 +++---------
  1 file changed, 3 insertions(+), 9 deletions(-)
package/util-linux/Config.in +2 -7
index c63cec2a9c..df7435e71a 100644
@@ -210,17 +210,15 @@ config BR2_PACKAGE_UTIL_LINUX_LOGIN
  	depends on BR2_ENABLE_LOCALE # linux-pam
  	depends on BR2_USE_WCHAR # linux-pam
  	depends on !BR2_STATIC_LIBS # linux-pam
-	depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam
  	depends on BR2_USE_MMU # fork(), linux-pam
  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
  	select BR2_PACKAGE_LINUX_PAM
  	help
  	  Begin a session on the system
 
-comment "login needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
+comment "login needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
  	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
  		|| BR2_STATIC_LIBS \
-		|| BR2_TOOLCHAIN_USES_MUSL \
  		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
  config BR2_PACKAGE_UTIL_LINUX_LOSETUP
@@ -366,7 +364,6 @@ config BR2_PACKAGE_UTIL_LINUX_RUNUSER
  	bool "runuser"
  	depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam
  	depends on !BR2_STATIC_LIBS
-	depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam
  	depends on BR2_USE_MMU # fork(), linux-pam
  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
  	select BR2_PACKAGE_LINUX_PAM
@@ -375,10 +372,9 @@ config BR2_PACKAGE_UTIL_LINUX_RUNUSER
  	  to ask for a password, because it may be executed by the root
  	  user only)
 
-comment "runuser needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
+comment "runuser needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
  	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
  		|| BR2_STATIC_LIBS \
-		|| BR2_TOOLCHAIN_USES_MUSL \
  		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
  config BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS
@@ -411,17 +407,15 @@ config BR2_PACKAGE_UTIL_LINUX_SU
  	bool "su"
  	depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam
  	depends on !BR2_STATIC_LIBS
-	depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam
  	depends on BR2_USE_MMU # fork(), linux-pam
  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
  	select BR2_PACKAGE_LINUX_PAM
  	help

package/util-linux/Config.in config BR2_PACKAGE_UTIL_LINUX_SU · line 421

Quoted 10 lines
package/util-linux/Config.in +1 -2
  	  Run a command with substitute user and group ID
 
-comment "su needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
+comment "su needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
  	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
  		|| BR2_STATIC_LIBS \
-		|| BR2_TOOLCHAIN_USES_MUSL \
  		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
  config BR2_PACKAGE_UTIL_LINUX_SULOGIN

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Bernd Kuhls

In reply of:

Quoted 10 lines

Buildroot commit f89ca996b6deb660b53c33196b8b309fac659bf9 fixed the build of linux-pam with musl in 2020 but did not remove the restric- tions in place for login/runuser/su which were added earlier with these commits:

login (2015): 25ecd24579f293ef4fcc6847094c4af39f4113af runuser (2017): 09860f354ae0824cfead384e994d3f119e22b851 su (2017): c6488923fb785ac11f6ec78e53db5da22203b178

Applied to 2025.02.x & 2026.05.x. Thanks

Quoted 76 lines

---
Gitlab pipeline passed:
https://gitlab.com/bkuhls/buildroot/-/commits/75fbf2c4a4cb132b66c59560f0470ebc063416fc

 package/util-linux/Config.in | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
package/util-linux/Config.in +3 -9
index c63cec2a9c..df7435e71a 100644
@@ -210,17 +210,15 @@ config BR2_PACKAGE_UTIL_LINUX_LOGIN
 	depends on BR2_ENABLE_LOCALE # linux-pam
 	depends on BR2_USE_WCHAR # linux-pam
 	depends on !BR2_STATIC_LIBS # linux-pam
-	depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam
 	depends on BR2_USE_MMU # fork(), linux-pam
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	select BR2_PACKAGE_LINUX_PAM
 	help
 	  Begin a session on the system
 
-comment "login needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
+comment "login needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
 		|| BR2_STATIC_LIBS \
-		|| BR2_TOOLCHAIN_USES_MUSL \
 		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 config BR2_PACKAGE_UTIL_LINUX_LOSETUP
@@ -366,7 +364,6 @@ config BR2_PACKAGE_UTIL_LINUX_RUNUSER
 	bool "runuser"
 	depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam
 	depends on !BR2_STATIC_LIBS
-	depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam
 	depends on BR2_USE_MMU # fork(), linux-pam
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	select BR2_PACKAGE_LINUX_PAM
@@ -375,10 +372,9 @@ config BR2_PACKAGE_UTIL_LINUX_RUNUSER
 	  to ask for a password, because it may be executed by the root
 	  user only)
 
-comment "runuser needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
+comment "runuser needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
 		|| BR2_STATIC_LIBS \
-		|| BR2_TOOLCHAIN_USES_MUSL \
 		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 config BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS
@@ -411,17 +407,15 @@ config BR2_PACKAGE_UTIL_LINUX_SU
 	bool "su"
 	depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam
 	depends on !BR2_STATIC_LIBS
-	depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam
 	depends on BR2_USE_MMU # fork(), linux-pam
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	select BR2_PACKAGE_LINUX_PAM
 	help
 	  Run a command with substitute user and group ID
 
-comment "su needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
+comment "su needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
 		|| BR2_STATIC_LIBS \
-		|| BR2_TOOLCHAIN_USES_MUSL \
 		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 config BR2_PACKAGE_UTIL_LINUX_SULOGIN
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot