Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2, 1/2] package/util-linux: select BR2_PACKAGE_UTIL_LINUX_LIBS
@ 2020-11-03 20:57 Fabrice Fontaine
  2020-11-03 20:57 ` [Buildroot] [PATCH v2,2/2] package/abootimg: use util-linux-libs Fabrice Fontaine
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Fontaine @ 2020-11-03 20:57 UTC (permalink / raw)
  To: buildroot

When util-linux is enabled, select BR2_PACKAGE_UTIL_LINUX_LIBS as
suggested by Yann E. Morin in
https://patchwork.ozlabs.org/project/buildroot/patch/20201101121536.1089498-1-fontaine.fabrice at gmail.com/

As a result, drop BR2_PACKAGE_UTIL_LINUX_LIBS workaround from libglib2

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2:
 - Drop eudev and systemd updates
 - Make BR2_PACKAGE_UTIL_LINUX_LIBS a visible option

 package/libglib2/libglib2.mk |  4 ----
 package/util-linux/Config.in | 10 +++++++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 6e9dbd7b26..43fcb27fae 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -86,12 +86,8 @@ endif
 
 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y)
 LIBGLIB2_CONF_OPTS += -Dlibmount=enabled
-ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS),y)
 LIBGLIB2_DEPENDENCIES += util-linux-libs
 else
-LIBGLIB2_DEPENDENCIES += util-linux
-endif
-else
 LIBGLIB2_CONF_OPTS += -Dlibmount=disabled
 endif
 
diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in
index 1f33eb5514..252de5c91b 100644
--- a/package/util-linux/Config.in
+++ b/package/util-linux/Config.in
@@ -1,5 +1,6 @@
 menuconfig BR2_PACKAGE_UTIL_LINUX
 	bool "util-linux"
+	select BR2_PACKAGE_UTIL_LINUX_LIBS
 	help
 	  Various useful/essential linux libraries and utilities.
 
@@ -7,10 +8,13 @@ menuconfig BR2_PACKAGE_UTIL_LINUX
 
 	  http://www.kernel.org/pub/linux/utils/util-linux/
 
-if BR2_PACKAGE_UTIL_LINUX
-
 config BR2_PACKAGE_UTIL_LINUX_LIBS
-	bool
+	bool "util-linux-libs"
+	help
+	  Only the libraries provided by util-linux; if you need the
+	  tools too, select util-linux.
+
+if BR2_PACKAGE_UTIL_LINUX
 
 config BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 	bool "libblkid"
-- 
2.28.0

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

* [Buildroot] [PATCH v2,2/2] package/abootimg: use util-linux-libs
  2020-11-03 20:57 [Buildroot] [PATCH v2, 1/2] package/util-linux: select BR2_PACKAGE_UTIL_LINUX_LIBS Fabrice Fontaine
@ 2020-11-03 20:57 ` Fabrice Fontaine
  2020-11-03 21:14   ` [Buildroot] [PATCH v2, 2/2] " Yann E. MORIN
  2020-12-01 21:19   ` Arnout Vandecappelle
  0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2020-11-03 20:57 UTC (permalink / raw)
  To: buildroot

abootimg only needs libblkid from util-linux-libs

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2:
 - Select util-linux-libs instead of util-linux

 package/abootimg/Config.in   | 2 +-
 package/abootimg/abootimg.mk | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/abootimg/Config.in b/package/abootimg/Config.in
index 30e5bd1fb0..8aa4cb414c 100644
--- a/package/abootimg/Config.in
+++ b/package/abootimg/Config.in
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_ABOOTIMG
 	bool "abootimg"
 	depends on BR2_USE_MMU	# libblkid
-	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBS
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 	help
 	  Tool to manipulate Android Boot Images, either on files
diff --git a/package/abootimg/abootimg.mk b/package/abootimg/abootimg.mk
index e906546948..d139d58ceb 100644
--- a/package/abootimg/abootimg.mk
+++ b/package/abootimg/abootimg.mk
@@ -9,8 +9,8 @@ ABOOTIMG_SITE = $(call github,ggrandou,abootimg,$(ABOOTIMG_VERSION))
 ABOOTIMG_LICENSE = GPL-2.0+
 ABOOTIMG_LICENSE_FILES = LICENSE
 
-# depends on libblkid from util-linux
-ABOOTIMG_DEPENDENCIES = util-linux
+# depends on libblkid from util-linux-libs
+ABOOTIMG_DEPENDENCIES = util-linux-libs
 
 define ABOOTIMG_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
-- 
2.28.0

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

* [Buildroot] [PATCH v2, 2/2] package/abootimg: use util-linux-libs
  2020-11-03 20:57 ` [Buildroot] [PATCH v2,2/2] package/abootimg: use util-linux-libs Fabrice Fontaine
@ 2020-11-03 21:14   ` Yann E. MORIN
  2020-12-01 21:19   ` Arnout Vandecappelle
  1 sibling, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2020-11-03 21:14 UTC (permalink / raw)
  To: buildroot

Fabrice, All,

On 2020-11-03 21:57 +0100, Fabrice Fontaine spake thusly:
> abootimg only needs libblkid from util-linux-libs
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2:
>  - Select util-linux-libs instead of util-linux
> 
>  package/abootimg/Config.in   | 2 +-
>  package/abootimg/abootimg.mk | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/package/abootimg/Config.in b/package/abootimg/Config.in
> index 30e5bd1fb0..8aa4cb414c 100644
> --- a/package/abootimg/Config.in
> +++ b/package/abootimg/Config.in
> @@ -1,7 +1,7 @@
>  config BR2_PACKAGE_ABOOTIMG
>  	bool "abootimg"
>  	depends on BR2_USE_MMU	# libblkid
> -	select BR2_PACKAGE_UTIL_LINUX
> +	select BR2_PACKAGE_UTIL_LINUX_LIBS
>  	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID

BR2_PACKAGE_UTIL_LINUX_LIBBLKID is an option of util-linux, so you can't
drop the "select BR2_PACKAGE_UTIL_LINUX"

That's again probably my fault, because I was maybe not exhaustive
enough on my previous reply in the libglib2 thread.

However, please see what I replied to the v1 of this series.

Still, it is not trivial, so we colectively need to think about it...

Regards,
Yann E. MORIN.

>  	help
>  	  Tool to manipulate Android Boot Images, either on files
> diff --git a/package/abootimg/abootimg.mk b/package/abootimg/abootimg.mk
> index e906546948..d139d58ceb 100644
> --- a/package/abootimg/abootimg.mk
> +++ b/package/abootimg/abootimg.mk
> @@ -9,8 +9,8 @@ ABOOTIMG_SITE = $(call github,ggrandou,abootimg,$(ABOOTIMG_VERSION))
>  ABOOTIMG_LICENSE = GPL-2.0+
>  ABOOTIMG_LICENSE_FILES = LICENSE
>  
> -# depends on libblkid from util-linux
> -ABOOTIMG_DEPENDENCIES = util-linux
> +# depends on libblkid from util-linux-libs
> +ABOOTIMG_DEPENDENCIES = util-linux-libs

>  define ABOOTIMG_BUILD_CMDS
>  	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
> -- 
> 2.28.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v2, 2/2] package/abootimg: use util-linux-libs
  2020-11-03 20:57 ` [Buildroot] [PATCH v2,2/2] package/abootimg: use util-linux-libs Fabrice Fontaine
  2020-11-03 21:14   ` [Buildroot] [PATCH v2, 2/2] " Yann E. MORIN
@ 2020-12-01 21:19   ` Arnout Vandecappelle
  1 sibling, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2020-12-01 21:19 UTC (permalink / raw)
  To: buildroot



On 03/11/2020 21:57, Fabrice Fontaine wrote:
> abootimg only needs libblkid from util-linux-libs
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2:
>  - Select util-linux-libs instead of util-linux
> 
>  package/abootimg/Config.in   | 2 +-
>  package/abootimg/abootimg.mk | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/package/abootimg/Config.in b/package/abootimg/Config.in
> index 30e5bd1fb0..8aa4cb414c 100644
> --- a/package/abootimg/Config.in
> +++ b/package/abootimg/Config.in
> @@ -1,7 +1,7 @@
>  config BR2_PACKAGE_ABOOTIMG
>  	bool "abootimg"
>  	depends on BR2_USE_MMU	# libblkid
> -	select BR2_PACKAGE_UTIL_LINUX
> +	select BR2_PACKAGE_UTIL_LINUX_LIBS
>  	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
>  	help
>  	  Tool to manipulate Android Boot Images, either on files
> diff --git a/package/abootimg/abootimg.mk b/package/abootimg/abootimg.mk
> index e906546948..d139d58ceb 100644
> --- a/package/abootimg/abootimg.mk
> +++ b/package/abootimg/abootimg.mk
> @@ -9,8 +9,8 @@ ABOOTIMG_SITE = $(call github,ggrandou,abootimg,$(ABOOTIMG_VERSION))
>  ABOOTIMG_LICENSE = GPL-2.0+
>  ABOOTIMG_LICENSE_FILES = LICENSE
>  
> -# depends on libblkid from util-linux
> -ABOOTIMG_DEPENDENCIES = util-linux
> +# depends on libblkid from util-linux-libs
> +ABOOTIMG_DEPENDENCIES = util-linux-libs

 This we definitely want to avoid in general. The problem is that some libraries
*may* be built in a different way in the second pass than in the first pass. The
whole reason we have this mess is because parts of util-linux depend on packages
that depend on util-linux libraries - and some of these parts may be in
libraries as well! So we *only* want to use util-linux-libs in specific cases
where we can check very carefully if the dependency chain is OK. For libmount/,
it is.

 I remember that I made this analysis when I applied the util-linux-libs split,
but unfortunately it doesn't seem to have made it to the commit message...


 Regards,
 Arnout


>  
>  define ABOOTIMG_BUILD_CMDS
>  	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
> 

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

end of thread, other threads:[~2020-12-01 21:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-03 20:57 [Buildroot] [PATCH v2, 1/2] package/util-linux: select BR2_PACKAGE_UTIL_LINUX_LIBS Fabrice Fontaine
2020-11-03 20:57 ` [Buildroot] [PATCH v2,2/2] package/abootimg: use util-linux-libs Fabrice Fontaine
2020-11-03 21:14   ` [Buildroot] [PATCH v2, 2/2] " Yann E. MORIN
2020-12-01 21:19   ` Arnout Vandecappelle

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