package/util-linux: build libraries as a separate package
RFC PATCH 1/1 package/util-linux: build libraries as a separate package
From: Carlos Santos <[email protected]>
The findmount and lsblk utilities need udev to work correctly but cannot be built with udev support because the packages providing libudev (eudev and systemd) depend on util-linux, creating a chicken-egg problem. Solve it by means of the following changes:
- Add the util-linux-libs package, which provides libblkid, libfdisk, libmount, libsmartcols and libuuid. It needs a small patch to install the uuidd.h header, used to build the uuidd utility.
- Make util-linux depend on util-linux-libs and build only the programs. This requires a quite intrusive patch that modifies Makefile.am and some Makemodule.am files, thus requiring AUTORECONF.
- Make eudev, systemd and all other packages that originally depended on util-linux depend on util-linux-libs.
- Add legacy options, so defconfigs selecting the libraries by means of the old configs (BR2_PACKAGE_UTIL_LINUX_LIBBLKID, etc.) keep working.
--- Config.in.legacy | 40 ++ boot/gummiboot/Config.in | 4 +- boot/syslinux/Config.in | 4 +- package/Config.in | 1 + package/Config.in.host | 1 + package/abootimg/Config.in | 4 +- package/apr/apr.mk | 2 +- package/asterisk/Config.in | 4 +- package/azure-iot-sdk-c/Config.in | 4 +- package/bcache-tools/Config.in | 6 +- package/btrfs-progs/Config.in | 6 +- package/cryptsetup/Config.in | 6 +- package/e2fsprogs/Config.in | 6 +- package/efl/Config.in | 6 +- package/eudev/Config.in | 4 +- package/eudev/eudev.mk | 2 +- package/f2fs-tools/Config.in | 4 +- package/f2fs-tools/f2fs-tools.mk | 2 +- package/fontconfig/Config.in | 4 +- package/freeswitch/Config.in | 4 +- package/gerbera/Config.in | 4 +- package/gptfdisk/Config.in | 4 +- package/gupnp/Config.in | 4 +- package/libcrossguid/Config.in | 4 +- package/libglib2/Config.in | 4 +- package/libpjsip/libpjsip.mk | 2 +- package/lighttpd/lighttpd.mk | 2 +- package/lttng-babeltrace/Config.in | 4 +- package/lttng-libust/Config.in | 4 +- package/lttng-tools/Config.in | 4 +- package/mosquitto/mosquitto.mk | 2 +- package/mtd/Config.in | 4 +- package/network-manager/Config.in | 4 +- package/nilfs-utils/Config.in | 8 +- package/ntfs-3g/ntfs-3g.mk | 2 +- package/nvme/nvme.mk | 2 +- package/parted/Config.in | 4 +- package/qpid-proton/Config.in | 4 +- package/rsyslog/rsyslog.mk | 2 +- package/syslog-ng/syslog-ng.mk | 2 +- package/systemd/Config.in | 16 +- package/systemd/systemd.mk | 2 +- package/taskd/Config.in | 4 +- package/tcf-agent/Config.in | 4 +- .../0001-libuuid-install-uuidd.h.patch | 26 ++ package/util-linux-libs/Config.in | 47 ++ package/util-linux-libs/Config.in.host | 10 + package/util-linux-libs/util-linux-libs.hash | 9 + package/util-linux-libs/util-linux-libs.mk | 96 ++++ .../0005-Use-installed-libraries.patch | 432 ++++++++++++++++++ package/util-linux/Config.in | 100 ++-- package/util-linux/Config.in.host | 2 +- package/util-linux/util-linux.mk | 91 ++-- package/wget/wget.mk | 2 +- package/xen/Config.in | 4 +- package/xfsprogs/Config.in | 6 +- package/zeromq/Config.in | 4 +- 57 files changed, 841 insertions(+), 198 deletions(-) create mode 100644 package/util-linux-libs/0001-libuuid-install-uuidd.h.patch create mode 100644 package/util-linux-libs/Config.in create mode 100644 package/util-linux-libs/Config.in.host create mode 100644 package/util-linux-libs/util-linux-libs.hash create mode 100644 package/util-linux-libs/util-linux-libs.mk create mode 100644 package/util-linux/0005-Use-installed-libraries.patch
Config.in.legacy +40 -0
@@ -146,6 +146,46 @@ endif comment "Legacy options removed in 2019.05" +config BR2_PACKAGE_UTIL_LINUX_LIBBLKID + bool "libblkid option moved to util-linux-libs" + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID + help + The util-linux libraries are provided by the util-linux-libs + package, now. + +config BR2_PACKAGE_UTIL_LINUX_LIBFDISK + bool "libfdisk option moved to util-linux-libs" + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_FDISK + help + The util-linux libraries are provided by the util-linux-libs + package, now. + +config BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + bool "libmount option moved to util-linux-libs" + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_MOUNT + help + The util-linux libraries are provided by the util-linux-libs + package, now. + +config BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + bool "libsmartcols option moved to util-linux-libs" + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_SMARTCOLS + help + The util-linux libraries are provided by the util-linux-libs + package, now. + +config BR2_PACKAGE_UTIL_LINUX_LIBUUID + bool "libuuid option moved to util-linux-libs" + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID + help + The util-linux libraries are provided by the util-linux-libs + package, now. + config BR2_PACKAGE_LUNIT bool "lunit package removed" select BR2_LEGACY
boot/gummiboot/Config.in +2 -2
@@ -3,8 +3,8 @@ config BR2_TARGET_GUMMIBOOT depends on BR2_i386 || BR2_x86_64 depends on BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS select BR2_PACKAGE_GNU_EFI - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID help gummiboot is a simple UEFI boot manager which executes configured EFI images. The default entry is selected by a
boot/syslinux/Config.in +2 -2
@@ -6,8 +6,8 @@ config BR2_TARGET_SYSLINUX if !BR2_TARGET_SYSLINUX_PXELINUX && \ !BR2_TARGET_SYSLINUX_MBR && \ !BR2_TARGET_SYSLINUX_EFI - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help The syslinux bootloader for x86 systems. This includes: syslinux, pxelinux, extlinux.
package/Config.in +1 -0
@@ -2229,6 +2229,7 @@ menu "System tools" source "package/tpm2-tools/Config.in" source "package/tpm2-totp/Config.in" source "package/unscd/Config.in" + source "package/util-linux-libs/Config.in" source "package/util-linux/Config.in" source "package/xen/Config.in" source "package/xvisor/Config.in"
package/Config.in.host +1 -0
@@ -65,6 +65,7 @@ menu "Host utilities" source "package/tegrarcm/Config.in.host" source "package/ti-cgt-pru/Config.in.host" source "package/uboot-tools/Config.in.host" + source "package/util-linux-libs/Config.in.host" source "package/util-linux/Config.in.host" source "package/utp_com/Config.in.host" source "package/vboot-utils/Config.in.host"
package/abootimg/Config.in +2 -2
@@ -1,8 +1,8 @@ config BR2_PACKAGE_ABOOTIMG bool "abootimg" depends on BR2_USE_MMU # libblkid - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID help Tool to manipulate Android Boot Images, either on files or directly on /dev block devices.
package/apr/apr.mk +1 -1
@@ -57,7 +57,7 @@ else APR_CONF_OPTS += --disable-nonportable-atomics endif -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS_UUID),y) APR_DEPENDENCIES += util-linux endif
package/asterisk/Config.in +2 -2
@@ -12,8 +12,8 @@ config BR2_PACKAGE_ASTERISK select BR2_PACKAGE_LIBILBC select BR2_PACKAGE_LIBXML2 select BR2_PACKAGE_SQLITE - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help Asterisk is an open source framework for building communications applications. Asterisk turns an ordinary
package/azure-iot-sdk-c/Config.in +2 -2
@@ -5,8 +5,8 @@ config BR2_PACKAGE_AZURE_IOT_SDK_C select BR2_PACKAGE_LIBCURL select BR2_PACKAGE_LIBXML2 select BR2_PACKAGE_OPENSSL - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help Microsoft Azure IoT Hub device SDK for C is used to connect devices running C code to Azure IoT Hub.
package/bcache-tools/Config.in +3 -3
@@ -2,9 +2,9 @@ config BR2_PACKAGE_BCACHE_TOOLS bool "bcache tools" depends on BR2_PACKAGE_HAS_UDEV depends on BR2_USE_MMU # util-linux (libblkid) - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID + select BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID help Bcache is a Linux kernel block layer cache. It allows one or more fast disk drives such as flash-based solid state drives
package/btrfs-progs/Config.in +3 -3
@@ -3,9 +3,9 @@ config BR2_PACKAGE_BTRFS_PROGS depends on BR2_USE_MMU # util-linux depends on BR2_TOOLCHAIN_HAS_THREADS select BR2_PACKAGE_LZO - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID select BR2_PACKAGE_ZLIB help Btrfs filesystem utilities
package/cryptsetup/Config.in +3 -3
@@ -6,9 +6,9 @@ config BR2_PACKAGE_CRYPTSETUP depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c select BR2_PACKAGE_POPT select BR2_PACKAGE_LVM2 - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID + select BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID select BR2_PACKAGE_JSON_C help This tool helps manipulate dm-crypt and luks partitions for
package/e2fsprogs/Config.in +3 -3
@@ -1,9 +1,9 @@ menuconfig BR2_PACKAGE_E2FSPROGS bool "e2fsprogs" depends on BR2_USE_MMU # util-linux/libblkid - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help The EXT2 file system utilities.
package/efl/Config.in +3 -3
@@ -116,10 +116,10 @@ config BR2_PACKAGE_EFL_UTIL_LINUX_LIBMOUNT bool "Enable libmount support (recommended)" default y depends on BR2_PACKAGE_EFL_EEZE - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_MOUNT # libblkid is part of required tools, see EFL's README. - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID help Libmount is used heavily inside Eeze for support of removable devices etc... and disabling this will hurt support for
package/eudev/Config.in +2 -2
@@ -5,8 +5,8 @@ config BR2_PACKAGE_EUDEV depends on BR2_USE_WCHAR # needs C99 compiler depends on !BR2_STATIC_LIBS # kmod select BR2_PACKAGE_HAS_UDEV - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID select BR2_PACKAGE_KMOD help eudev is a fork of systemd-udev with the goal of obtaining
package/eudev/eudev.mk +1 -1
@@ -18,7 +18,7 @@ EUDEV_CONF_OPTS = \ --enable-kmod \ --enable-blkid -EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod +EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux-libs kmod EUDEV_PROVIDES = udev ifeq ($(BR2_ROOTFS_MERGED_USR),)
package/f2fs-tools/Config.in +2 -2
@@ -1,8 +1,8 @@ config BR2_PACKAGE_F2FS_TOOLS bool "f2fs-tools" depends on BR2_USE_WCHAR # uses wchar_t - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help Tools for Flash-Friendly File System (F2FS)
package/f2fs-tools/f2fs-tools.mk +1 -1
@@ -23,7 +23,7 @@ else F2FS_TOOLS_CONF_OPTS += --without-selinux endif -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID),y) # util-linux is a dependency already, no need to list it again F2FS_TOOLS_CONF_OPTS += --with-blkid else
package/fontconfig/Config.in +2 -2
@@ -2,8 +2,8 @@ config BR2_PACKAGE_FONTCONFIG bool "fontconfig" select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_EXPAT - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help Fontconfig is a library for configuring and customizing font access.
package/freeswitch/Config.in +2 -2
@@ -20,8 +20,8 @@ config BR2_PACKAGE_FREESWITCH select BR2_PACKAGE_SPEEXDSP select BR2_PACKAGE_SQLITE select BR2_PACKAGE_TIFF - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID select BR2_PACKAGE_ZLIB help FreeSWITCH is a scalable open source cross-platform
package/gerbera/Config.in +2 -2
@@ -10,8 +10,8 @@ config BR2_PACKAGE_GERBERA select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE select BR2_PACKAGE_LIBUPNP18 select BR2_PACKAGE_SQLITE - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID select BR2_PACKAGE_ZLIB help A free media server.
package/gptfdisk/Config.in +2 -2
@@ -4,8 +4,8 @@ comment "gptfdisk needs a toolchain w/ C++" config BR2_PACKAGE_GPTFDISK bool "gptfdisk" depends on BR2_INSTALL_LIBSTDCPP - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID select BR2_PACKAGE_GPTFDISK_GDISK if \ !(BR2_PACKAGE_GPTFDISK_SGDISK || BR2_PACKAGE_GPTFDISK_CGDISK) help
package/gupnp/Config.in +2 -2
@@ -6,8 +6,8 @@ config BR2_PACKAGE_GUPNP select BR2_PACKAGE_LIBGLIB2 select BR2_PACKAGE_GSSDP select BR2_PACKAGE_LIBXML2 - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help GUPnP implements the UPnP specification: resource announcement and discovery, description, control, event notification, and
package/libcrossguid/Config.in +2 -2
@@ -2,8 +2,8 @@ config BR2_PACKAGE_LIBCROSSGUID bool "libcrossguid" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help Lightweight cross platform C++ GUID/UUID library
package/libglib2/Config.in +2 -2
@@ -7,8 +7,8 @@ config BR2_PACKAGE_LIBGLIB2 select BR2_PACKAGE_LIBFFI select BR2_PACKAGE_PCRE select BR2_PACKAGE_PCRE_UCP - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_MOUNT select BR2_PACKAGE_ZLIB help Low-level core library that forms the basis of GTK+ and GNOME.
package/libpjsip/libpjsip.mk +1 -1
@@ -82,7 +82,7 @@ LIBPJSIP_CONF_OPTS += \ --disable-speex-codec endif -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS_UUID),y) LIBPJSIP_DEPENDENCIES += util-linux endif
package/lighttpd/lighttpd.mk +1 -1
@@ -55,7 +55,7 @@ endif ifeq ($(BR2_PACKAGE_LIGHTTPD_WEBDAV),y) LIGHTTPD_DEPENDENCIES += libxml2 sqlite LIGHTTPD_CONF_OPTS += --with-webdav-props -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS_UUID),y) LIGHTTPD_CONF_OPTS += --with-webdav-locks LIGHTTPD_DEPENDENCIES += util-linux else
package/lttng-babeltrace/Config.in +2 -2
@@ -3,8 +3,8 @@ config BR2_PACKAGE_LTTNG_BABELTRACE depends on BR2_USE_WCHAR # libglib2 depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 depends on BR2_USE_MMU # libglib2 - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID select BR2_PACKAGE_LIBGLIB2 select BR2_PACKAGE_POPT help
package/lttng-libust/Config.in +2 -2
@@ -6,8 +6,8 @@ config BR2_PACKAGE_LTTNG_LIBUST depends on BR2_TOOLCHAIN_HAS_THREADS depends on !BR2_STATIC_LIBS select BR2_PACKAGE_LIBURCU - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help Userspace tracing library for the LTTng 2.x tracing infrastructure. It allows userspace programs to create
package/lttng-tools/Config.in +2 -2
@@ -7,8 +7,8 @@ config BR2_PACKAGE_LTTNG_TOOLS select BR2_PACKAGE_LIBURCU select BR2_PACKAGE_LIBXML2 select BR2_PACKAGE_POPT - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help Userspace utilities for the LTTng 2.x tracing infrastructure.
package/mosquitto/mosquitto.mk +1 -1
@@ -44,7 +44,7 @@ else MOSQUITTO_MAKE_OPTS += WITH_SRV=no endif -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS_UUID),y) MOSQUITTO_DEPENDENCIES += util-linux MOSQUITTO_MAKE_OPTS += WITH_UUID=yes else
package/mtd/Config.in +2 -2
@@ -18,8 +18,8 @@ config BR2_PACKAGE_MTD_JFFS_UTILS config BR2_PACKAGE_MTD_UBIFS_UTILS bool select BR2_PACKAGE_LZO - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID select BR2_PACKAGE_ZLIB comment "MTD tools selection"
package/network-manager/Config.in +2 -2
@@ -13,8 +13,8 @@ config BR2_PACKAGE_NETWORK_MANAGER select BR2_PACKAGE_LIBGCRYPT select BR2_PACKAGE_LIBNL select BR2_PACKAGE_LIBGUDEV - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID select BR2_PACKAGE_WIRELESS_TOOLS select BR2_PACKAGE_WIRELESS_TOOLS_LIB select BR2_PACKAGE_READLINE
package/nilfs-utils/Config.in +4 -4
@@ -2,10 +2,10 @@ config BR2_PACKAGE_NILFS_UTILS bool "nilfs-utils" depends on BR2_USE_MMU # util-linux libmount, libblkid depends on BR2_TOOLCHAIN_HAS_THREADS # sem_open() - select BR2_PACKAGE_UTIL_LINUX_LIBUUID - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID - select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT - select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID + select BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID + select BR2_PACKAGE_UTIL_LINUX_LIBS_MOUNT help Tools for creating and managing NILFS2 filesystems.
package/ntfs-3g/ntfs-3g.mk +1 -1
@@ -18,7 +18,7 @@ NTFS_3G_CONF_OPTS += --with-fuse=external NTFS_3G_DEPENDENCIES += libfuse endif -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS_UUID),y) NTFS_3G_DEPENDENCIES += util-linux endif
package/nvme/nvme.mk +1 -1
@@ -11,7 +11,7 @@ NVME_LICENSE_FILES = LICENSE # Yes, LIBUUID=0 means libuuid support enabled. # LIBUUID=1 means libuuid support disabled. -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS_UUID),y) NVME_DEPENDENCIES += util-linux NVME_MAKE_OPTS += LIBUUID=0 else
package/parted/Config.in +2 -2
@@ -1,8 +1,8 @@ config BR2_PACKAGE_PARTED bool "parted" depends on BR2_USE_WCHAR - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help parted, the GNU partition resizing program
package/qpid-proton/Config.in +2 -2
@@ -1,8 +1,8 @@ config BR2_PACKAGE_QPID_PROTON bool "qpid-proton" depends on !BR2_STATIC_LIBS # build a shared library - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help The AMQP messaging toolkit
package/rsyslog/rsyslog.mk +1 -1
@@ -52,7 +52,7 @@ else RSYSLOG_CONF_OPTS += --disable-pgsql endif -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS_UUID),y) RSYSLOG_DEPENDENCIES += util-linux RSYSLOG_CONF_OPTS += --enable-uuid else
package/syslog-ng/syslog-ng.mk +1 -1
@@ -60,7 +60,7 @@ else SYSLOG_NG_CONF_OPTS += --disable-json endif -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS_UUID),y) SYSLOG_NG_DEPENDENCIES += util-linux endif
package/systemd/Config.in +8 -8
@@ -22,14 +22,14 @@ menuconfig BR2_PACKAGE_SYSTEMD select BR2_PACKAGE_HAS_UDEV select BR2_PACKAGE_DBUS # runtime dependency only select BR2_PACKAGE_LIBCAP - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID - select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT - select BR2_PACKAGE_UTIL_LINUX_BINARIES - select BR2_PACKAGE_UTIL_LINUX_AGETTY - select BR2_PACKAGE_UTIL_LINUX_MOUNT - select BR2_PACKAGE_UTIL_LINUX_NOLOGIN - select BR2_PACKAGE_UTIL_LINUX_FSCK + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID + select BR2_PACKAGE_UTIL_LINUX_LIBS_MOUNT + select BR2_PACKAGE_UTIL_LINUX_LIBS_BINARIES + select BR2_PACKAGE_UTIL_LINUX_LIBS_AGETTY + select BR2_PACKAGE_UTIL_LINUX_LIBS_MOUNT + select BR2_PACKAGE_UTIL_LINUX_LIBS_NOLOGIN + select BR2_PACKAGE_UTIL_LINUX_LIBS_FSCK select BR2_PACKAGE_KMOD select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools select BR2_PACKAGE_KMOD_TOOLS
package/systemd/systemd.mk +1 -1
@@ -15,7 +15,7 @@ SYSTEMD_DEPENDENCIES = \ host-intltool \ kmod \ libcap \ - util-linux + util-linux-libs SYSTEMD_PROVIDES = udev
package/taskd/Config.in +2 -2
@@ -5,8 +5,8 @@ config BR2_PACKAGE_TASKD depends on BR2_USE_MMU # fork() depends on BR2_INSTALL_LIBSTDCPP select BR2_PACKAGE_GNUTLS - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help Task management synchronization daemon.
package/tcf-agent/Config.in +2 -2
@@ -3,8 +3,8 @@ config BR2_PACKAGE_TCF_AGENT depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_PACKAGE_TCF_AGENT_ARCH_SUPPORTS depends on BR2_USE_MMU # util-linux - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help Target Communication Framework Agent is an example application using the Target Communication Framework
package/util-linux-libs/0001-libuuid-install-uuidd.h.patch new file +26 -0
@@ -0,0 +1,26 @@ +From f7b77eaf6719e64c64179794f79c9d9cd0f7c778 Mon Sep 17 00:00:00 2001 +From: Carlos Santos <[email protected]> +Date: Mon, 6 May 2019 19:58:51 -0300 +Subject: [PATCH] libuuid: install uuidd.h + +Signed-off-by: Carlos Santos <[email protected]> +--- + libuuid/src/Makemodule.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libuuid/src/Makemodule.am b/libuuid/src/Makemodule.am +index e58fa261c..4387666f4 100644 +--- a/libuuid/src/Makemodule.am ++++ b/libuuid/src/Makemodule.am +@@ -6,7 +6,7 @@ test_uuid_parser_CFLAGS = $(AM_CFLAGS) -I$(ul_libuuid_incdir) + + # includes + uuidincdir = $(includedir)/uuid +-uuidinc_HEADERS = libuuid/src/uuid.h ++uuidinc_HEADERS = libuuid/src/uuid.h libuuid/src/uuidd.h + + usrlib_exec_LTLIBRARIES += libuuid.la + +-- +2.20.1 +
package/util-linux-libs/Config.in new file +47 -0
47 lines not on this page · raw message
package/util-linux-libs/Config.in.host new file +10 -0
@@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_UTIL_LINUX_LIBS + bool + help + Various useful/essential linux libraries. The utilities are + provided by the util-linux package. + + Things like mkfs, mkswap, swapon, fdisk, mount, dmesg, etc. + depend on these libraries. + + http://www.kernel.org/pub/linux/utils/util-linux/
package/util-linux-libs/util-linux-libs.hash new file +9 -0
@@ -0,0 +1,9 @@ +# From https://www.kernel.org/pub/linux/utils/util-linux/v2.33/sha256sums.asc +sha256 f261b9d73c35bfeeea04d26941ac47ee1df937bd3b0583e748217c1ea423658a util-linux-2.33.tar.xz +# License files, locally calculated +sha256 4335620e8f478ee4dc4d26540448d39469091ef1d8e3fbbbb8bf753206ceac74 README.licensing +sha256 9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d Documentation/licenses/COPYING.BSD-3-Clause +sha256 ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8 Documentation/licenses/COPYING.BSD-4-Clause-UC +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Documentation/licenses/COPYING.GPL-2.0-or-later +sha256 e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63 Documentation/licenses/COPYING.ISC +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 Documentation/licenses/COPYING.LGPL-2.1-or-later
package/util-linux-libs/util-linux-libs.mk new file +96 -0
96 lines not on this page · raw message
package/util-linux/0005-Use-installed-libraries.patch new file +432 -0
432 lines not on this page · raw message
package/util-linux/Config.in +40 -60
181 lines not on this page · raw message
package/util-linux/Config.in.host +1 -1
@@ -1,5 +1,5 @@ config BR2_PACKAGE_HOST_UTIL_LINUX - bool "host util-linux" + bool help Various useful/essential linux libraries and utilities.
package/util-linux/util-linux.mk +46 -45
162 lines not on this page · raw message
package/wget/wget.mk +1 -1
@@ -28,7 +28,7 @@ else WGET_CONF_OPTS += --without-libidn endif -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS_UUID),y) WGET_DEPENDENCIES += util-linux endif
package/xen/Config.in +2 -2
@@ -28,8 +28,8 @@ config BR2_PACKAGE_XEN_TOOLS select BR2_PACKAGE_NCURSES select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_PIXMAN - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID select BR2_PACKAGE_YAJL select BR2_PACKAGE_ARGP_STANDALONE if !BR2_TOOLCHAIN_USES_GLIBC help
package/xfsprogs/Config.in +3 -3
@@ -6,9 +6,9 @@ config BR2_PACKAGE_XFSPROGS bool "xfsprogs" depends on BR2_USE_MMU # fork() depends on BR2_TOOLCHAIN_HAS_THREADS - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID + select BR2_PACKAGE_UTIL_LINUX_LIBS_BLKID help The XFS file system utilities and libraries
package/zeromq/Config.in +2 -2
@@ -5,8 +5,8 @@ config BR2_PACKAGE_ZEROMQ bool "zeromq" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBS + select BR2_PACKAGE_UTIL_LINUX_LIBS_UUID help ?MQ (ZeroMQ, 0MQ, zmq) looks like an embeddable networking library but acts like a concurrency framework. It gives you
Signature · 1 line
2.20.1
RFC PATCH 1/1 package/util-linux: build libraries as a separate package
Hello Carlos,
Quoted 4 lines · On Tue, 7 May 2019 13:51:58 -0300 unixmania at gmail.com wrote:
The findmount and lsblk utilities need udev to work correctly but cannot be built with udev support because the packages providing libudev (eudev and systemd) depend on util-linux, creating a chicken-egg problem. Solve it by means of the following changes:
Thanks a lot for working on this topic. It is obviously becoming a nightmare :-/
Quoted 6 lines
- Add the util-linux-libs package, which provides libblkid, libfdisk, libmount, libsmartcols and libuuid. It needs a small patch to install the
uuidd.hheader, used to build the uuidd utility.
- Make util-linux depend on util-linux-libs and build only the programs. This requires a quite intrusive patch that modifies Makefile.am and some Makemodule.am files, thus requiring AUTORECONF.
Could you get in touch with upstream util-linux, expose the problem, and see if they would be willing to merge some changes that would help building only the programs ?
The best would of course be for upstream to realize that there is now a circular dependency, and that it should be broken up by splitting util-linux upstream itself in two separate projects.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
RFC PATCH 1/1 package/util-linux: build libraries as a separate package
On 2019-05-07 21:54 +0200, Thomas Petazzoni spake thusly:
Quoted 5 lines
Hello Carlos,
On Tue, 7 May 2019 13:51:58 -0300
unixmania at gmail.com wrote:
Quoted 7 lines
Quoted 4 lines
The findmount and lsblk utilities need udev to work correctly but cannot be built with udev support because the packages providing libudev (eudev and systemd) depend on util-linux, creating a chicken-egg problem. Solve it by means of the following changes:
Thanks a lot for working on this topic. It is obviously becoming a nightmare :-/
Indeed, this is not a nice situation.
However, here is what I propose we do
1- introduce util-linux-libs as you did, with a blind kconfig option
(i.e. BR2_PACKAGE_UTIL_LINUX_LIBS exists but has no a prompt)
2- update util-linux to depend on util=linux-libs when it is enabled 3- change the existing udev providers (eudev and systemd) to depend on
and select util-linux-libs instead of util-linux
So yes, this means that we end up with the libs installed twice. That would be reported by the check-uniq-file step.
However, I believe this is really not a problem in fact. chekc-uniq-file was initially introduced in preparation of top-level parallel build, but the reason it was introduced is no longer 100% valid, as the trend is now to install to a per-package target/ dir, and assemble the whole at the end, in a reproducible order.
And even if check-uniq-files would still be needed, we could teach it to ignore specific cases, like this util-linux vs. util-linux-libs duality.
So, in case upstream is not amenable to splitting util-linux, or at least teach it to separate the libs and progs builds, or while waiting they do it, we can prepare the above.
And when they finally release a version that can build either only libs or only progs, we'll be ready and we'll just have to adpat both packages' CONF_OPTS to pass appropriate --enable and --disable flags.
Regards,
Yann E. MORIN.
Quoted 26 lines
Quoted 6 lines
- Add the util-linux-libs package, which provides libblkid, libfdisk, libmount, libsmartcols and libuuid. It needs a small patch to install the
uuidd.hheader, used to build the uuidd utility.
- Make util-linux depend on util-linux-libs and build only the programs. This requires a quite intrusive patch that modifies Makefile.am and some Makemodule.am files, thus requiring AUTORECONF.Could you get in touch with upstream util-linux, expose the problem, and see if they would be willing to merge some changes that would help building only the programs ?
The best would of course be for upstream to realize that there is now a circular dependency, and that it should be broken up by splitting util-linux upstream itself in two separate projects.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ 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. | '------------------------------^-------^------------------^--------------------'
RFC PATCH 1/1 package/util-linux: build libraries as a separate package
Quoted 25 lines · Yann E. MORIN
On 2019-05-07 21:54 +0200, Thomas Petazzoni spake thusly:
Quoted 5 lines
Hello Carlos,
On Tue, 7 May 2019 13:51:58 -0300
unixmania at gmail.com wrote:Quoted 7 lines
Quoted 4 lines
The findmount and lsblk utilities need udev to work correctly but cannot be built with udev support because the packages providing libudev (eudev and systemd) depend on util-linux, creating a chicken-egg problem. Solve it by means of the following changes:
Thanks a lot for working on this topic. It is obviously becoming a nightmare :-/
Indeed, this is not a nice situation.
However, here is what I propose we do
1- introduce util-linux-libs as you did, with a blind kconfig option
(i.e.BR2_PACKAGE_UTIL_LINUX_LIBSexists but has no a prompt)
2- update util-linux to depend on util=linux-libs when it is enabled 3- change the existing udev providers (eudev and systemd) to depend on
and select util-linux-libs instead of util-linux
Quoted 8 lines
So yes, this means that we end up with the libs installed twice. That would be reported by the check-uniq-file step.
However, I believe this is really not a problem in fact. chekc-uniq-file was initially introduced in preparation of top-level parallel build, but the reason it was introduced is no longer 100% valid, as the trend is now to install to a per-package target/ dir, and assemble the whole at the end, in a reproducible order.
I think it's a risky approach because we end up building some packages with the libraries created by util-linux-libs and other packages with the libraries from util-linux. I theory both builds would generate the same code but in fact we don't know. Think about analyzing a core dump, for instance.
Signature · 1 line
Carlos Santos <[email protected]>
RFC PATCH 1/1 package/util-linux: build libraries as a separate package
Quoted 35 lines · Carlos A. M. dos Santos
Quoted 25 lines · Yann E. MORIN
On 2019-05-07 21:54 +0200, Thomas Petazzoni spake thusly:
Quoted 5 lines
Hello Carlos,
On Tue, 7 May 2019 13:51:58 -0300
unixmania at gmail.com wrote:Quoted 7 lines
Quoted 4 lines
The findmount and lsblk utilities need udev to work correctly but cannot be built with udev support because the packages providing libudev (eudev and systemd) depend on util-linux, creating a chicken-egg problem. Solve it by means of the following changes:
Thanks a lot for working on this topic. It is obviously becoming a nightmare :-/
Indeed, this is not a nice situation.
However, here is what I propose we do
1- introduce util-linux-libs as you did, with a blind kconfig option
(i.e.BR2_PACKAGE_UTIL_LINUX_LIBSexists but has no a prompt)
2- update util-linux to depend on util=linux-libs when it is enabled 3- change the existing udev providers (eudev and systemd) to depend on
and select util-linux-libs instead of util-linuxQuoted 8 lines
So yes, this means that we end up with the libs installed twice. That would be reported by the check-uniq-file step.
However, I believe this is really not a problem in fact. chekc-uniq-file was initially introduced in preparation of top-level parallel build, but the reason it was introduced is no longer 100% valid, as the trend is now to install to a per-package target/ dir, and assemble the whole at the end, in a reproducible order.
Quoted 3 lines
I think it's a risky approach because we end up building some packages with the libraries created by util-linux-libs and other packages with the libraries from util-linux.
True, but it is well-defined which package will use which version:
eudev/systemd will use util-linux-libs, all the rest uses util-linux.
Quoted 3 lines
I theory both builds would generate the
same code but in fact we don't know. Think about analyzing a core dump, for instance.
If it is a shared library, the version from util-linux wil always be used.
If it is a static library, it's linked into the executable so even if it's a
different version, the executable will be internally consistent.
And we can be sure that the source code is identical, so any debug symbols will
point to the right source.
So, assuming that upstream will go in the right direction, Yann's proposal is
not bad as a temporary solution.
Regards,
Arnout
RFC PATCH 1/1 package/util-linux: build libraries as a separate package
I submitted a new patch using a slightly different approach:
https://patchwork.ozlabs.org/patch/1097541/
Signature · 1 line
Carlos Santos <[email protected]>
RFC PATCH 1/1 package/util-linux: build libraries as a separate package
In reply to Thomas PetazzoniQuoted 21 lines · Thomas Petazzoni
Hello Carlos,
Quoted 4 lines · On Tue, 7 May 2019 13:51:58 -0300 unixmania at gmail.com wrote:
The findmount and lsblk utilities need udev to work correctly but cannot be built with udev support because the packages providing libudev (eudev and systemd) depend on util-linux, creating a chicken-egg problem. Solve it by means of the following changes:
Thanks a lot for working on this topic. It is obviously becoming a nightmare :-/
Quoted 6 lines
- Add the util-linux-libs package, which provides libblkid, libfdisk, libmount, libsmartcols and libuuid. It needs a small patch to install the
uuidd.hheader, used to build the uuidd utility.
- Make util-linux depend on util-linux-libs and build only the programs. This requires a quite intrusive patch that modifies Makefile.am and some Makemodule.am files, thus requiring AUTORECONF.
Quoted 7 lines
Could you get in touch with upstream util-linux, expose the problem, and see if they would be willing to merge some changes that would help building only the programs ?
The best would of course be for upstream to realize that there is now a circular dependency, and that it should be broken up by splitting util-linux upstream itself in two separate projects.
I'm in contact with Karel Zak, the util-linux maintainer and already asked for subgestions on how to avoid building the libraries or at least install them.
Signature · 1 line
Carlos Santos <[email protected]>