Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/busybox: fix build with glibc 2.39
@ 2024-07-15 10:16 Fred Lefranc
  2024-07-15 10:31 ` Thomas Petazzoni via buildroot
  2024-07-15 11:10 ` [Buildroot] [PATCH v2] " Fred Lefranc
  0 siblings, 2 replies; 13+ messages in thread
From: Fred Lefranc @ 2024-07-15 10:16 UTC (permalink / raw)
  To: buildroot; +Cc: Fred Lefranc

When glibc was bumped to version 2.39 in commit
b5680f53d60acf8ff6010082f873438a39bd5d97 it removed the deprecated
libcrypt support.

As glibc's libcrypt was providing systemd's libcrypt dependency this
broke any systemd build using glibc version 2.39.

To fix this add the libxcrypt dependency to busybox which is the
preferred way of providing libcrypt support in busybox as the glibc
variant is only used as a fallback due to being deprecated.

Signed-off-by: Fred Lefranc <fred.lefranc+evs@gmail.com>
---
 package/busybox/Config.in  | 1 +
 package/busybox/busybox.mk | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/package/busybox/Config.in b/package/busybox/Config.in
index 3c2aa515f8..85fa0c7f9a 100644
--- a/package/busybox/Config.in
+++ b/package/busybox/Config.in
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_BUSYBOX
 	bool "BusyBox"
 	default y
+	select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
 	help
 	  The Swiss Army Knife of embedded Linux. It slices, it dices,
 	  it makes Julian Fries.
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index eb5e7ad922..d014b3d275 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -164,6 +164,10 @@ define BUSYBOX_SET_MDEV
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXCRYPT)$(BR2_TOOLCHAIN_USES_GLIBC),yy)
+	BUSYBOX_DEPENDENCIES += libxcrypt
+endif
+
 # sha passwords need USE_BB_CRYPT_SHA
 ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA256)$(BR2_TARGET_GENERIC_PASSWD_SHA512),y)
 define BUSYBOX_SET_CRYPT_SHA
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH] package/busybox: fix build with glibc 2.39
  2024-07-15 10:16 [Buildroot] [PATCH] package/busybox: fix build with glibc 2.39 Fred Lefranc
@ 2024-07-15 10:31 ` Thomas Petazzoni via buildroot
  2024-07-15 11:10 ` [Buildroot] [PATCH v2] " Fred Lefranc
  1 sibling, 0 replies; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-15 10:31 UTC (permalink / raw)
  To: Fred Lefranc; +Cc: Fred Lefranc, Yann E. MORIN, buildroot

Hello Fred,

On Mon, 15 Jul 2024 12:16:06 +0200
Fred Lefranc <fred.lefranc.evs@gmail.com> wrote:

> diff --git a/package/busybox/Config.in b/package/busybox/Config.in
> index 3c2aa515f8..85fa0c7f9a 100644
> --- a/package/busybox/Config.in
> +++ b/package/busybox/Config.in
> @@ -1,6 +1,7 @@
>  config BR2_PACKAGE_BUSYBOX
>  	bool "BusyBox"
>  	default y
> +	select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC

I'm not sure we want to make this a mandatory dependency. Indeed, with
our default Busybox configuration it's not needed.

> +ifeq ($(BR2_PACKAGE_LIBXCRYPT)$(BR2_TOOLCHAIN_USES_GLIBC),yy)
> +	BUSYBOX_DEPENDENCIES += libxcrypt

No indentation for BUSYBOX_DEPENDENCIES.

> +endif

So basically, I would just do:

ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
BUSYBOX_DEPENDENCIES += libxcrypt
endif

and leave it up to the users who tweak their Busybox configuration to
figure out that they need to enable BR2_PACKAGE_LIBXCRYPT.

I remember there was some discussion with Yann on IRC about this topic,
but I don't remember what the conclusion was, but the above would be my
suggestion.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH v2] package/busybox: fix build with glibc 2.39
  2024-07-15 10:16 [Buildroot] [PATCH] package/busybox: fix build with glibc 2.39 Fred Lefranc
  2024-07-15 10:31 ` Thomas Petazzoni via buildroot
@ 2024-07-15 11:10 ` Fred Lefranc
  2024-07-15 14:08   ` Thomas Petazzoni via buildroot
  2024-07-16  7:59   ` [Buildroot] [PATCH v3] " Fred Lefranc
  1 sibling, 2 replies; 13+ messages in thread
From: Fred Lefranc @ 2024-07-15 11:10 UTC (permalink / raw)
  To: buildroot; +Cc: Fred Lefranc

When glibc was bumped to version 2.39 in commit
b5680f53d60acf8ff6010082f873438a39bd5d97 it removed the deprecated
libcrypt support.

As glibc's libcrypt was providing systemd's libcrypt dependency this
broke any systemd build using glibc version 2.39.

To fix this add the libxcrypt dependency to busybox which is the
preferred way of providing libcrypt support in busybox as the glibc
variant is only used as a fallback due to being deprecated.

Signed-off-by: Fred Lefranc <fred.lefranc+evs@gmail.com>
---
Changes v1 -> v2
  - busybox.mk: fix BUSYBOX_DEPENDENCIES ident & remove the check
for BR2_TOOLCHAIN_USES_GLIBC (req by Thomas)
  - Config.in: remove libxcrypt mandatory dependency
(req by Thomas)
---
 package/busybox/busybox.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index eb5e7ad922..d25e5bf468 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -164,6 +164,10 @@ define BUSYBOX_SET_MDEV
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
+BUSYBOX_DEPENDENCIES += libxcrypt
+endif
+
 # sha passwords need USE_BB_CRYPT_SHA
 ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA256)$(BR2_TARGET_GENERIC_PASSWD_SHA512),y)
 define BUSYBOX_SET_CRYPT_SHA
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH v2] package/busybox: fix build with glibc 2.39
  2024-07-15 11:10 ` [Buildroot] [PATCH v2] " Fred Lefranc
@ 2024-07-15 14:08   ` Thomas Petazzoni via buildroot
  2024-07-15 14:54     ` Fred Lefranc
  2024-07-16  7:59   ` [Buildroot] [PATCH v3] " Fred Lefranc
  1 sibling, 1 reply; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-15 14:08 UTC (permalink / raw)
  To: Fred Lefranc; +Cc: Fred Lefranc, buildroot

Hello Fred,

On Mon, 15 Jul 2024 13:10:02 +0200
Fred Lefranc <fred.lefranc.evs@gmail.com> wrote:

> When glibc was bumped to version 2.39 in commit
> b5680f53d60acf8ff6010082f873438a39bd5d97 it removed the deprecated
> libcrypt support.
> 
> As glibc's libcrypt was providing systemd's libcrypt dependency this
> broke any systemd build using glibc version 2.39.
> 
> To fix this add the libxcrypt dependency to busybox which is the
> preferred way of providing libcrypt support in busybox as the glibc
> variant is only used as a fallback due to being deprecated.

I'm sorry but I don't follow you on this last paragraph, in particular
the part "as the glibc variant is only used as a fallback due to being
deprecated".

What happens is that recent glibc versions no longer provide libcrypt,
so libxcrypt should be used as a replacement. And it's up to the user
to enable BR2_PACKAGE_LIBXCRYPT if the user enables an applet in the
Busybox configuration that needs lib(x)crypt features.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH v2] package/busybox: fix build with glibc 2.39
  2024-07-15 14:08   ` Thomas Petazzoni via buildroot
@ 2024-07-15 14:54     ` Fred Lefranc
  0 siblings, 0 replies; 13+ messages in thread
From: Fred Lefranc @ 2024-07-15 14:54 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Fred Lefranc, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 1923 bytes --]

Hi Thomas,

Sorry I've been too fast to write the comment as I merely (incorrectly)
copied one from a systemd's similar patch.

Would this comment work for you?

When glibc was bumped to version 2.39 in commit
b5680f53d60acf8ff6010082f873438a39bd5d97 it removed the deprecated
libcrypt support.

As glibc's libcrypt was providing busybox's libcrypt dependency this
broke any busybox build using glibc version 2.39.

To fix this, add the libxcrypt dependency to busybox when
BR2_PACKAGE_LIBXCRYPT is selected. The user still has to select the
libxcrypt package for this patch to work properly.

Regards,
Fred

On Mon, Jul 15, 2024 at 4:08 PM Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> Hello Fred,
>
> On Mon, 15 Jul 2024 13:10:02 +0200
> Fred Lefranc <fred.lefranc.evs@gmail.com> wrote:
>
> > When glibc was bumped to version 2.39 in commit
> > b5680f53d60acf8ff6010082f873438a39bd5d97 it removed the deprecated
> > libcrypt support.
> >
> > As glibc's libcrypt was providing systemd's libcrypt dependency this
> > broke any systemd build using glibc version 2.39.
> >
> > To fix this add the libxcrypt dependency to busybox which is the
> > preferred way of providing libcrypt support in busybox as the glibc
> > variant is only used as a fallback due to being deprecated.
>
> I'm sorry but I don't follow you on this last paragraph, in particular
> the part "as the glibc variant is only used as a fallback due to being
> deprecated".
>
> What happens is that recent glibc versions no longer provide libcrypt,
> so libxcrypt should be used as a replacement. And it's up to the user
> to enable BR2_PACKAGE_LIBXCRYPT if the user enables an applet in the
> Busybox configuration that needs lib(x)crypt features.
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>

[-- Attachment #1.2: Type: text/html, Size: 2545 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH v3] package/busybox: fix build with glibc 2.39
  2024-07-15 11:10 ` [Buildroot] [PATCH v2] " Fred Lefranc
  2024-07-15 14:08   ` Thomas Petazzoni via buildroot
@ 2024-07-16  7:59   ` Fred Lefranc
  2024-07-16 14:23     ` Thomas Petazzoni via buildroot
  2024-07-17 12:11     ` [Buildroot] [PATCH v4] " Fred Lefranc
  1 sibling, 2 replies; 13+ messages in thread
From: Fred Lefranc @ 2024-07-16  7:59 UTC (permalink / raw)
  To: buildroot; +Cc: Fred Lefranc

When glibc was bumped to version 2.39 in commit
b5680f53d60acf8ff6010082f873438a39bd5d97 it removed the deprecated
libcrypt support.

As glibc's libcrypt was providing busybox's libcrypt dependency this
broke any busybox build using glibc version 2.39.

To fix this, add the libxcrypt dependency to busybox when
BR2_PACKAGE_LIBXCRYPT is selected. The user still has to select the
libxcrypt package for this patch to work properly.

Signed-off-by: Fred Lefranc <fred.lefranc+evs@gmail.com>
---
Changes v2 -> v3
  - fix commit message
Changes v1 -> v2
  - busybox.mk: fix BUSYBOX_DEPENDENCIES ident & remove the check
for BR2_TOOLCHAIN_USES_GLIBC (req by Thomas)
  - Config.in: remove libxcrypt mandatory dependency
(req by Thomas)
---
 package/busybox/busybox.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index eb5e7ad922..d25e5bf468 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -164,6 +164,10 @@ define BUSYBOX_SET_MDEV
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
+BUSYBOX_DEPENDENCIES += libxcrypt
+endif
+
 # sha passwords need USE_BB_CRYPT_SHA
 ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA256)$(BR2_TARGET_GENERIC_PASSWD_SHA512),y)
 define BUSYBOX_SET_CRYPT_SHA
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH v3] package/busybox: fix build with glibc 2.39
  2024-07-16  7:59   ` [Buildroot] [PATCH v3] " Fred Lefranc
@ 2024-07-16 14:23     ` Thomas Petazzoni via buildroot
  2024-07-16 17:32       ` Fred Lefranc
  2024-07-17 12:11     ` [Buildroot] [PATCH v4] " Fred Lefranc
  1 sibling, 1 reply; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-16 14:23 UTC (permalink / raw)
  To: Fred Lefranc; +Cc: Fred Lefranc, buildroot

Hello Fred,

On Tue, 16 Jul 2024 09:59:34 +0200
Fred Lefranc <fred.lefranc.evs@gmail.com> wrote:

> When glibc was bumped to version 2.39 in commit
> b5680f53d60acf8ff6010082f873438a39bd5d97 it removed the deprecated
> libcrypt support.
> 
> As glibc's libcrypt was providing busybox's libcrypt dependency this
> broke any busybox build using glibc version 2.39.

Thanks for the new patch, but this still is wrong or too vague.

When you say "this broke any busybox build", it means that Busybox
build is completely broken. However, I don't see any Busybox build
failures in our autobuilders. So quite certainly, it's not all Busybox
builds that are broken.

So your commit should much better document which Busybox configurations
are broken. What is the build failure you encounter? After enabling
which option?

From a quick look, <crypt.h> is included by libbb/pw_encrypt.c, which
does:

#if !ENABLE_USE_BB_CRYPT
# if !defined(__FreeBSD__)
#  include <crypt.h>
# endif
#endif

So it's only if you *disable* USE_BB_CRYPT that you will have an issue
I believe? And USE_BB_CRYPT is enabled in our default configuration.

Could you please be a lot more specific/precise in your commit log? I
think your change is correct, but your commit log doesn't provide a
good justification for it.

On my side, I confirm that I can reproduce the build issue if I disable
USE_BB_CRYPT in my Busybox configuration. Is this the issue you're
seeing?

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH v3] package/busybox: fix build with glibc 2.39
  2024-07-16 14:23     ` Thomas Petazzoni via buildroot
@ 2024-07-16 17:32       ` Fred Lefranc
  2024-07-16 19:39         ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 13+ messages in thread
From: Fred Lefranc @ 2024-07-16 17:32 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Fred Lefranc, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 2568 bytes --]

Hi Thomas,

Here is a revised version:

Hi Thomas

When glibc was bumped to version 2.39 in commit
b5680f53d60acf8ff6010082f873438a39bd5d97
it removed the deprecated libcrypt support.

Busybox has internal crypt functions that are enabled by default. However,
a user
can choose to use the system's crypt function instead by disabling
CONFIG_USE_BB_CRYPT.
In such situations, glibc's libcrypt was providing busybox's libcrypt
dependency
and so busybox builds are broken when using glibc version 2.39 with
CONFIG_USE_BB_CRYPT
disabled.

To fix this, add the libxcrypt dependency to busybox when
BR2_PACKAGE_LIBXCRYPT is
selected. The user still has to select the libxcrypt package for this patch
to work
properly.


Regards,
Fred

On Tue, Jul 16, 2024 at 4:23 PM Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> Hello Fred,
>
> On Tue, 16 Jul 2024 09:59:34 +0200
> Fred Lefranc <fred.lefranc.evs@gmail.com> wrote:
>
> > When glibc was bumped to version 2.39 in commit
> > b5680f53d60acf8ff6010082f873438a39bd5d97 it removed the deprecated
> > libcrypt support.
> >
> > As glibc's libcrypt was providing busybox's libcrypt dependency this
> > broke any busybox build using glibc version 2.39.
>
> Thanks for the new patch, but this still is wrong or too vague.
>
> When you say "this broke any busybox build", it means that Busybox
> build is completely broken. However, I don't see any Busybox build
> failures in our autobuilders. So quite certainly, it's not all Busybox
> builds that are broken.
>
> So your commit should much better document which Busybox configurations
> are broken. What is the build failure you encounter? After enabling
> which option?
>
> From a quick look, <crypt.h> is included by libbb/pw_encrypt.c, which
> does:
>
> #if !ENABLE_USE_BB_CRYPT
> # if !defined(__FreeBSD__)
> #  include <crypt.h>
> # endif
> #endif
>
> So it's only if you *disable* USE_BB_CRYPT that you will have an issue
> I believe? And USE_BB_CRYPT is enabled in our default configuration.
>
> Could you please be a lot more specific/precise in your commit log? I
> think your change is correct, but your commit log doesn't provide a
> good justification for it.
>
> On my side, I confirm that I can reproduce the build issue if I disable
> USE_BB_CRYPT in my Busybox configuration. Is this the issue you're
> seeing?
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>

[-- Attachment #1.2: Type: text/html, Size: 3275 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH v3] package/busybox: fix build with glibc 2.39
  2024-07-16 17:32       ` Fred Lefranc
@ 2024-07-16 19:39         ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-16 19:39 UTC (permalink / raw)
  To: Fred Lefranc; +Cc: Fred Lefranc, buildroot

Hello Fred,

On Tue, 16 Jul 2024 19:32:05 +0200
Fred Lefranc <fred.lefranc.evs@gmail.com> wrote:

> Here is a revised version:

This is much better. Minor comments.

> When glibc was bumped to version 2.39 in commit
> b5680f53d60acf8ff6010082f873438a39bd5d97
> it removed the deprecated libcrypt support.
> 
> Busybox has internal crypt functions that are enabled by default. However,
> a user
> can choose to use the system's crypt function instead by disabling
> CONFIG_USE_BB_CRYPT.
> In such situations, glibc's libcrypt was providing busybox's libcrypt
> dependency
> and so busybox builds are broken when using glibc version 2.39 with
> CONFIG_USE_BB_CRYPT
> disabled.

In this last sentence, the usage of English tenses doesn't seem correct
to me (even though I'm not a native speaker). What about:

In such situation, until the upgrade of glibc to 2.39, Busybox could
rely on the libcrypt provided by glibc. However, this the bump of glibc
to 2.39, glibc no longer provides libcrypt, causing a build failure
with Busybox configurations that have CONFIG_USE_BB_CRYPT disabled.

> 
> To fix this, add the libxcrypt dependency to busybox when
> BR2_PACKAGE_LIBXCRYPT is
> selected. The user still has to select the libxcrypt package for this patch
> to work
> properly.

Replace last sentence with:

The user is still responsible for enabling BR2_PACKAGE_LIBXCRYPT when
their Busybox configuration has CONFIG_USE_BB_CRYPT disabled.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH v4] package/busybox: fix build with glibc 2.39
  2024-07-16  7:59   ` [Buildroot] [PATCH v3] " Fred Lefranc
  2024-07-16 14:23     ` Thomas Petazzoni via buildroot
@ 2024-07-17 12:11     ` Fred Lefranc
  2024-07-17 14:58       ` Thomas Petazzoni via buildroot
  2024-08-28  8:49       ` Peter Korsgaard
  1 sibling, 2 replies; 13+ messages in thread
From: Fred Lefranc @ 2024-07-17 12:11 UTC (permalink / raw)
  To: buildroot; +Cc: Fred Lefranc

When glibc was bumped to version 2.39 in commit b5680f53d60acf8ff6010082f873438a39bd5d97,
it removed the deprecated libcrypt support.

In such a situation, until the upgrade of glibc to 2.39, Busybox could rely on the
libcrypt provided by glibc. Since version 2.39, glibc no longer provides libcrypt,
causing a build failure with Busybox configurations that have CONFIG_USE_BB_CRYPT
disabled.

To fix this, add the libxcrypt dependency to Busybox when BR2_PACKAGE_LIBXCRYPT is
selected. The user is still responsible for enabling BR2_PACKAGE_LIBXCRYPT when
their Busybox configuration has CONFIG_USE_BB_CRYPT disabled.

Signed-off-by: Fred Lefranc <fred.lefranc+evs@gmail.com>
---
Changes v3 -> v4
  - fix commit message to explain the non-working case
Changes v2 -> v3
  - fix commit message
Changes v1 -> v2
  - busybox.mk: fix BUSYBOX_DEPENDENCIES ident & remove the check
for BR2_TOOLCHAIN_USES_GLIBC (req by Thomas)
  - Config.in: remove libxcrypt mandatory dependency
(req by Thomas)
---
 package/busybox/busybox.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index eb5e7ad922..d25e5bf468 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -164,6 +164,10 @@ define BUSYBOX_SET_MDEV
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
+BUSYBOX_DEPENDENCIES += libxcrypt
+endif
+
 # sha passwords need USE_BB_CRYPT_SHA
 ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA256)$(BR2_TARGET_GENERIC_PASSWD_SHA512),y)
 define BUSYBOX_SET_CRYPT_SHA
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH v4] package/busybox: fix build with glibc 2.39
  2024-07-17 12:11     ` [Buildroot] [PATCH v4] " Fred Lefranc
@ 2024-07-17 14:58       ` Thomas Petazzoni via buildroot
  2024-07-17 15:52         ` Fred Lefranc
  2024-08-28  8:49       ` Peter Korsgaard
  1 sibling, 1 reply; 13+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-17 14:58 UTC (permalink / raw)
  To: Fred Lefranc; +Cc: Fred Lefranc, buildroot

On Wed, 17 Jul 2024 14:11:46 +0200
Fred Lefranc <fred.lefranc.evs@gmail.com> wrote:

> When glibc was bumped to version 2.39 in commit b5680f53d60acf8ff6010082f873438a39bd5d97,
> it removed the deprecated libcrypt support.
> 
> In such a situation, until the upgrade of glibc to 2.39, Busybox could rely on the
> libcrypt provided by glibc. Since version 2.39, glibc no longer provides libcrypt,
> causing a build failure with Busybox configurations that have CONFIG_USE_BB_CRYPT
> disabled.
> 
> To fix this, add the libxcrypt dependency to Busybox when BR2_PACKAGE_LIBXCRYPT is
> selected. The user is still responsible for enabling BR2_PACKAGE_LIBXCRYPT when
> their Busybox configuration has CONFIG_USE_BB_CRYPT disabled.
> 
> Signed-off-by: Fred Lefranc <fred.lefranc+evs@gmail.com>
> ---
> Changes v3 -> v4
>   - fix commit message to explain the non-working case
> Changes v2 -> v3
>   - fix commit message
> Changes v1 -> v2
>   - busybox.mk: fix BUSYBOX_DEPENDENCIES ident & remove the check
> for BR2_TOOLCHAIN_USES_GLIBC (req by Thomas)
>   - Config.in: remove libxcrypt mandatory dependency
> (req by Thomas)
> ---
>  package/busybox/busybox.mk | 4 ++++
>  1 file changed, 4 insertions(+)

Thanks for your persistence, patch applied! The lines of the commit log
were a bit too long, so I rewrapped the paragraphs.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH v4] package/busybox: fix build with glibc 2.39
  2024-07-17 14:58       ` Thomas Petazzoni via buildroot
@ 2024-07-17 15:52         ` Fred Lefranc
  0 siblings, 0 replies; 13+ messages in thread
From: Fred Lefranc @ 2024-07-17 15:52 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Fred Lefranc, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 1686 bytes --]

Thanks Thomas

On Wed, Jul 17, 2024 at 4:58 PM Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> On Wed, 17 Jul 2024 14:11:46 +0200
> Fred Lefranc <fred.lefranc.evs@gmail.com> wrote:
>
> > When glibc was bumped to version 2.39 in commit
> b5680f53d60acf8ff6010082f873438a39bd5d97,
> > it removed the deprecated libcrypt support.
> >
> > In such a situation, until the upgrade of glibc to 2.39, Busybox could
> rely on the
> > libcrypt provided by glibc. Since version 2.39, glibc no longer provides
> libcrypt,
> > causing a build failure with Busybox configurations that have
> CONFIG_USE_BB_CRYPT
> > disabled.
> >
> > To fix this, add the libxcrypt dependency to Busybox when
> BR2_PACKAGE_LIBXCRYPT is
> > selected. The user is still responsible for enabling
> BR2_PACKAGE_LIBXCRYPT when
> > their Busybox configuration has CONFIG_USE_BB_CRYPT disabled.
> >
> > Signed-off-by: Fred Lefranc <fred.lefranc+evs@gmail.com>
> > ---
> > Changes v3 -> v4
> >   - fix commit message to explain the non-working case
> > Changes v2 -> v3
> >   - fix commit message
> > Changes v1 -> v2
> >   - busybox.mk: fix BUSYBOX_DEPENDENCIES ident & remove the check
> > for BR2_TOOLCHAIN_USES_GLIBC (req by Thomas)
> >   - Config.in: remove libxcrypt mandatory dependency
> > (req by Thomas)
> > ---
> >  package/busybox/busybox.mk | 4 ++++
> >  1 file changed, 4 insertions(+)
>
> Thanks for your persistence, patch applied! The lines of the commit log
> were a bit too long, so I rewrapped the paragraphs.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>

[-- Attachment #1.2: Type: text/html, Size: 2479 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Buildroot] [PATCH v4] package/busybox: fix build with glibc 2.39
  2024-07-17 12:11     ` [Buildroot] [PATCH v4] " Fred Lefranc
  2024-07-17 14:58       ` Thomas Petazzoni via buildroot
@ 2024-08-28  8:49       ` Peter Korsgaard
  1 sibling, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2024-08-28  8:49 UTC (permalink / raw)
  To: Fred Lefranc; +Cc: Fred Lefranc, buildroot

>>>>> "Fred" == Fred Lefranc <fred.lefranc.evs@gmail.com> writes:

 > When glibc was bumped to version 2.39 in commit b5680f53d60acf8ff6010082f873438a39bd5d97,
 > it removed the deprecated libcrypt support.

 > In such a situation, until the upgrade of glibc to 2.39, Busybox could rely on the
 > libcrypt provided by glibc. Since version 2.39, glibc no longer provides libcrypt,
 > causing a build failure with Busybox configurations that have CONFIG_USE_BB_CRYPT
 > disabled.

 > To fix this, add the libxcrypt dependency to Busybox when BR2_PACKAGE_LIBXCRYPT is
 > selected. The user is still responsible for enabling BR2_PACKAGE_LIBXCRYPT when
 > their Busybox configuration has CONFIG_USE_BB_CRYPT disabled.

 > Signed-off-by: Fred Lefranc <fred.lefranc+evs@gmail.com>
 > ---
 > Changes v3 -> v4
 >   - fix commit message to explain the non-working case
 > Changes v2 -> v3
 >   - fix commit message
 > Changes v1 -> v2
 >   - busybox.mk: fix BUSYBOX_DEPENDENCIES ident & remove the check
 > for BR2_TOOLCHAIN_USES_GLIBC (req by Thomas)
 >   - Config.in: remove libxcrypt mandatory dependency
 > (req by Thomas)

Committed to 2024.05.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-08-28  8:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-15 10:16 [Buildroot] [PATCH] package/busybox: fix build with glibc 2.39 Fred Lefranc
2024-07-15 10:31 ` Thomas Petazzoni via buildroot
2024-07-15 11:10 ` [Buildroot] [PATCH v2] " Fred Lefranc
2024-07-15 14:08   ` Thomas Petazzoni via buildroot
2024-07-15 14:54     ` Fred Lefranc
2024-07-16  7:59   ` [Buildroot] [PATCH v3] " Fred Lefranc
2024-07-16 14:23     ` Thomas Petazzoni via buildroot
2024-07-16 17:32       ` Fred Lefranc
2024-07-16 19:39         ` Thomas Petazzoni via buildroot
2024-07-17 12:11     ` [Buildroot] [PATCH v4] " Fred Lefranc
2024-07-17 14:58       ` Thomas Petazzoni via buildroot
2024-07-17 15:52         ` Fred Lefranc
2024-08-28  8:49       ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox