Skip to contentSkip to conversation

package/util-linux: select BR2_PACKAGE_UTIL_LINUX_LIBS

PATCH New Fabrice Fontaine 3 participants 4 messages Nov 3, 2020 – Dec 1, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 package/util-linux: select BR2_PACKAGE_UTIL_LINUX_LIBS

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

---
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(-)
package/libglib2/libglib2.mk +0 -4
index 6e9dbd7b26..43fcb27fae 100644
@@ -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
 
package/util-linux/Config.in +7 -3
index 1f33eb5514..252de5c91b 100644
@@ -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"
Signature · 1 line
2.28.0
#1 lore raw

PATCH v2 2/2 package/abootimg: use util-linux-libs

abootimg only needs libblkid from util-linux-libs

---
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(-)
package/abootimg/Config.in +1 -1
index 30e5bd1fb0..8aa4cb414c 100644
@@ -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
package/abootimg/abootimg.mk +2 -2
index e906546948..d139d58ceb 100644
@@ -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)
Signature · 1 line
2.28.0
#2 lore raw

PATCH v2 2/2 package/abootimg: use util-linux-libs

Fabrice, All,

On 2020-11-03 21:57 +0100, Fabrice Fontaine spake thusly:

Quoted 16 lines

abootimg only needs libblkid from util-linux-libs

---
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(-)
package/abootimg/Config.in +0 -0
index 30e5bd1fb0..8aa4cb414c 100644

package/abootimg/Config.in line 5

Quoted 6 lines
package/abootimg/Config.in +1 -1
@@ -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.

Quoted 24 lines
package/abootimg/Config.in +0 -0
 	help
 	  Tool to manipulate Android Boot Images, either on files
package/abootimg/abootimg.mk +2 -2
index e906546948..d139d58ceb 100644
@@ -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)
Signature · 6 lines
2.28.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH v2 2/2 package/abootimg: use util-linux-libs

In reply to Fabrice Fontaine
Quoted 29 lines · Fabrice Fontaine

abootimg only needs libblkid from util-linux-libs

---
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(-)
package/abootimg/Config.in +1 -1
index 30e5bd1fb0..8aa4cb414c 100644
@@ -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
package/abootimg/abootimg.mk +0 -0
index e906546948..d139d58ceb 100644

package/abootimg/abootimg.mk ABOOTIMG_SITE = $(call github,ggrandou,abootimg,$(ABOOTIMG_VERSION)) · line 13

Quoted 7 lines
package/abootimg/abootimg.mk +2 -2
@@ -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

Quoted 4 lines
package/abootimg/abootimg.mk +0 -0
 define ABOOTIMG_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)