[v3] util-linux: split uuid in separate recipe to allow bootstrapping

Submitted by luca.boccassi@gmail.com on Nov. 23, 2020, 1:28 p.m. | Patch ID: 178226

Details

Message ID 20201123132823.3996355-1-luca.boccassi@gmail.com
State Superseded
Headers show

Commit Message

luca.boccassi@gmail.com Nov. 23, 2020, 1:28 p.m.
From: Luca Boccassi <luca.boccassi@microsoft.com>


In v2.35 util-linux  gained an (optional) build
dependency on libcryptsetup. But libcryptsetup build-depends on
util-linux for blkid (optional, can be disabled) and uuid (mandatory).
Split out util-linux-uuid in a different recipe to break the cycle.

Add a packageconfig switch (disabled by default) to allow using the
new dependency.

https://github.com/karelzak/util-linux/pull/898

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>

---
v1: util-linux 2.35 is not out yet, but I'd like to get the preparatory work
    underway as I'm not sure if this is the best approach or if there are
    alternatives. Suggestions and comments very welcome. Thanks!
v2: changed packages names to reflect old ones (eg: libuuid1 -> util-linux-libuuid)
    and leave uuid build enable in main recipe to allow for uuidgen build to happen,
    as it does not have its own autoconf switch. Delete the library manualy from
    the main recipe after build instead, and add dependency.
    Might help to break loop python3 -> util-linux -> libselinux -> python3, as it's
    only libuuid that is needed, see https://lists.yoctoproject.org/g/yocto/message/47570
v3: rebased and refactored to have a common util-linux.inc file


 .../nfs-utils/nfs-utils_2.5.1.bb              |  2 +-
 meta/recipes-core/udev/eudev_3.2.9.bb         |  2 +-
 .../util-linux/util-linux-uuid_2.36.bb        | 22 +++++++++
 meta/recipes-core/util-linux/util-linux.inc   | 40 ++++++++++++++++
 .../util-linux/util-linux_2.36.bb             | 48 ++++---------------
 .../btrfs-tools/btrfs-tools_5.7.bb            |  2 +-
 meta/recipes-devtools/e2fsprogs/e2fsprogs.inc |  2 +-
 meta/recipes-devtools/fdisk/gptfdisk_1.0.5.bb |  2 +-
 meta/recipes-devtools/mtd/mtd-utils_git.bb    |  2 +-
 meta/recipes-devtools/python/python3_3.9.0.bb |  2 +-
 .../syslinux/syslinux_6.04-pre2.bb            |  2 +-
 .../tcf-agent/tcf-agent_git.bb                |  2 +-
 meta/recipes-extended/mc/mc_4.8.25.bb         |  2 +-
 meta/recipes-extended/parted/parted_3.3.bb    |  2 +-
 meta/recipes-extended/wget/wget.inc           |  2 +-
 .../fontconfig/fontconfig_2.13.1.bb           |  2 +-
 meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb |  2 +-
 .../recipes-kernel/lttng/babeltrace2_2.0.3.bb |  2 +-
 meta/recipes-kernel/lttng/babeltrace_1.5.8.bb |  2 +-
 .../lttng/lttng-tools_2.12.2.bb               |  2 +-
 meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb |  2 +-
 .../gstreamer1.0-plugins-base_1.18.0.bb       |  2 +-
 meta/recipes-support/apr/apr_1.7.0.bb         |  2 +-
 meta/recipes-support/serf/serf_1.3.9.bb       |  2 +-
 24 files changed, 92 insertions(+), 60 deletions(-)
 create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.bb
 create mode 100644 meta/recipes-core/util-linux/util-linux.inc

-- 
2.27.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144910): https://lists.openembedded.org/g/openembedded-core/message/144910
Mute This Topic: https://lists.openembedded.org/mt/78452881/3616849
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [michael@yoctoproject.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
index b8ad23a0d8..7bf3f1d898 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.1.bb
@@ -8,7 +8,7 @@  LICENSE = "MIT & GPLv2+ & BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84"
 
 # util-linux for libblkid
-DEPENDS = "libcap libevent util-linux sqlite3 libtirpc"
+DEPENDS = "libcap libevent util-linux util-linux-uuid sqlite3 libtirpc"
 RDEPENDS_${PN} = "${PN}-client"
 RRECOMMENDS_${PN} = "kernel-module-nfsd"
 
diff --git a/meta/recipes-core/udev/eudev_3.2.9.bb b/meta/recipes-core/udev/eudev_3.2.9.bb
index f96f8cbe78..4332ca9b7c 100644
--- a/meta/recipes-core/udev/eudev_3.2.9.bb
+++ b/meta/recipes-core/udev/eudev_3.2.9.bb
@@ -4,7 +4,7 @@  LICENSE = "GPLv2.0+ & LGPL-2.1+"
 LICENSE_libudev = "LGPL-2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
-DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux"
+DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux util-linux-uuid"
 
 PROVIDES = "udev"
 
diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.bb
new file mode 100644
index 0000000000..ffb2c87270
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.bb
@@ -0,0 +1,22 @@ 
+# To allow util-linux to optionally build-depend on cryptsetup, libuuid is
+# split out of the main recipe, as it's needed by cryptsetup
+
+require util-linux.inc
+
+inherit autotools gettext pkgconfig
+
+S = "${WORKDIR}/util-linux-${PV}"
+EXTRA_OECONF += "--disable-all-programs --enable-libuuid"
+DEBIAN_NOAUTONAME_util-linux-libuuid = "1"
+DEBIAN_NOAUTONAME_util-linux-libuuid-dev = "1"
+DEBIAN_NOAUTONAME_util-linux-libuuid-dbg = "1"
+PACKAGES = "util-linux-libuuid util-linux-libuuid-dev util-linux-libuuid-dbg"
+FILES_util-linux-libuuid = "${libdir}/libuuid.so.*"
+FILES_util-linux-libuuid-dev = "${libdir}/libuuid.so ${includedir} ${libdir}/pkgconfig"
+FILES_util-linux-libuuid-dbg = "/usr/src ${libdir}/.debug"
+
+do_install_append() {
+	rm -rf ${D}${datadir} ${D}${bindir} ${D}${base_bindir} ${D}${sbindir} ${D}${base_sbindir} ${D}${exec_prefix}/sbin
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
new file mode 100644
index 0000000000..c0634082cd
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -0,0 +1,40 @@ 
+SUMMARY = "A suite of basic system administration utilities"
+HOMEPAGE = "https://en.wikipedia.org/wiki/Util-linux"
+DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \
+commonly found on most Linux systems.  Some of the more important utilities include \
+disk partitioning, kernel message management, filesystem creation, and system login."
+
+SECTION = "base"
+
+LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause"
+LICENSE_${PN}-libblkid = "LGPLv2.1+"
+LICENSE_${PN}-libfdisk = "LGPLv2.1+"
+LICENSE_${PN}-libmount = "LGPLv2.1+"
+LICENSE_${PN}-libsmartcols = "LGPLv2.1+"
+LICENSE_${PN}-libuuid = "BSD-3-Clause"
+
+LIC_FILES_CHKSUM = "file://README.licensing;md5=0fd5c050c6187d2bf0a4492b7f4e33da \
+                    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \
+                    file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \
+                    file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \
+                    file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \
+                    file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \
+                    file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \
+                    file://libfdisk/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \
+                    file://libsmartcols/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \
+"
+
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:"
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${MAJOR_VERSION}.tar.xz \
+           file://configure-sbindir.patch \
+           file://runuser.pamd \
+           file://runuser-l.pamd \
+           file://ptest.patch \
+           file://run-ptest \
+           file://display_testname_for_subtest.patch \
+           file://avoid_parallel_tests.patch \
+           "
+SRC_URI[sha256sum] = "9e4b1c67eb13b9b67feb32ae1dc0d50e08ce9e5d82e1cccd0ee771ad2fa9e0b1"
diff --git a/meta/recipes-core/util-linux/util-linux_2.36.bb b/meta/recipes-core/util-linux/util-linux_2.36.bb
index 474f1e188c..5b721187e1 100644
--- a/meta/recipes-core/util-linux/util-linux_2.36.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.36.bb
@@ -1,47 +1,9 @@ 
-SUMMARY = "A suite of basic system administration utilities"
-HOMEPAGE = "https://en.wikipedia.org/wiki/Util-linux"
-DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \
-commonly found on most Linux systems.  Some of the more important utilities include \
-disk partitioning, kernel message management, filesystem creation, and system login."
-
-SECTION = "base"
-
-LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause"
-LICENSE_${PN}-libblkid = "LGPLv2.1+"
-LICENSE_${PN}-libfdisk = "LGPLv2.1+"
-LICENSE_${PN}-libmount = "LGPLv2.1+"
-LICENSE_${PN}-libsmartcols = "LGPLv2.1+"
-LICENSE_${PN}-libuuid = "BSD-3-Clause"
-
-LIC_FILES_CHKSUM = "file://README.licensing;md5=0fd5c050c6187d2bf0a4492b7f4e33da \
-                    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \
-                    file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \
-                    file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \
-                    file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \
-                    file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \
-                    file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \
-                    file://libfdisk/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \
-                    file://libsmartcols/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \
-"
+require util-linux.inc
 
 #gtk-doc is not enabled as it requires xmlto which requires util-linux
 inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest
 DEPENDS = "libcap-ng ncurses virtual/crypt zlib"
 
-MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \
-           file://configure-sbindir.patch \
-           file://runuser.pamd \
-           file://runuser-l.pamd \
-           file://ptest.patch \
-           file://run-ptest \
-           file://display_testname_for_subtest.patch \
-           file://avoid_parallel_tests.patch \
-           "
-SRC_URI[sha256sum] = "9e4b1c67eb13b9b67feb32ae1dc0d50e08ce9e5d82e1cccd0ee771ad2fa9e0b1"
-
 PACKAGES =+ "${PN}-swaponoff"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}"
 
@@ -141,6 +103,7 @@  PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-pytho
 PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
 # PCRE support in hardlink
 PACKAGECONFIG[pcre2] = ",,libpcre2"
+PACKAGECONFIG[cryptsetup] = "--with-cryptsetup,--without-cryptsetup,cryptsetup"
 
 EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'"
 
@@ -316,6 +279,13 @@  ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
 ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3"
 ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
 
+# dm-verity support introduces a circular build dependency, so util-linux-uuid is split out for target builds
+# Need to build libuuid for uuidgen, but then delete it and let the other recipe ship it
+do_install_append() {
+    rm -rf ${D}${includedir}/uuid ${D}${libdir}/pkgconfig/uuid.pc ${D}${libdir}/libuuid* ${D}/lib/libuuid*
+}
+PACKAGES_remove = "util-linux-libuuid util-linux-libuuid-dev util-linux-libuuid-dbg"
+
 
 BBCLASSEXTEND = "native nativesdk"
 
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.7.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.7.bb
index e61ea9bf89..abb579d608 100644
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.7.bb
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.7.bb
@@ -10,7 +10,7 @@  HOMEPAGE = "https://btrfs.wiki.kernel.org"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
 SECTION = "base"
-DEPENDS = "util-linux attr e2fsprogs lzo acl"
+DEPENDS = "util-linux util-linux-uuid attr e2fsprogs lzo acl"
 DEPENDS_append_class-target = " udev"
 RDEPENDS_${PN} = "libgcc"
 
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc b/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
index 009f5ed807..0452d32699 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
@@ -17,7 +17,7 @@  LIC_FILES_CHKSUM = "file://NOTICE;md5=d50be0580c0b0a7fbc7a4830bbe6c12b \
                       file://lib/et/et_name.c;beginline=1;endline=11;md5=ead236447dac7b980dbc5b4804d8c836 \
                       file://lib/ss/ss.h;beginline=1;endline=20;md5=6e89ad47da6e75fecd2b5e0e81e1d4a6"
 SECTION = "base"
-DEPENDS = "util-linux attr"
+DEPENDS = "util-linux util-linux-uuid attr"
 
 SRC_URI = "git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git"
 S = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/fdisk/gptfdisk_1.0.5.bb b/meta/recipes-devtools/fdisk/gptfdisk_1.0.5.bb
index c7850f03ca..dbbe6f21db 100644
--- a/meta/recipes-devtools/fdisk/gptfdisk_1.0.5.bb
+++ b/meta/recipes-devtools/fdisk/gptfdisk_1.0.5.bb
@@ -4,7 +4,7 @@  DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fd
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
 
-DEPENDS = "util-linux"
+DEPENDS = "util-linux util-linux-uuid"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz \
            file://0001-gptcurses-correctly-include-curses.h.patch \
diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 8d6bbfca3f..1a5111ea23 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -7,7 +7,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
 
 inherit autotools pkgconfig update-alternatives
 
-DEPENDS = "zlib e2fsprogs util-linux"
+DEPENDS = "zlib e2fsprogs util-linux util-linux-uuid"
 RDEPENDS_mtd-utils-tests += "bash"
 
 PV = "2.1.2"
diff --git a/meta/recipes-devtools/python/python3_3.9.0.bb b/meta/recipes-devtools/python/python3_3.9.0.bb
index 6402760a1b..09f1a5daee 100644
--- a/meta/recipes-devtools/python/python3_3.9.0.bb
+++ b/meta/recipes-devtools/python/python3_3.9.0.bb
@@ -63,7 +63,7 @@  ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config
 ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}"
 
 
-DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2"
+DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux util-linux-uuid libtirpc libnsl2"
 DEPENDS_append_class-target = " python3-native"
 DEPENDS_append_class-nativesdk = " python3-native"
 
diff --git a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
index 3e7eef3a75..9ed5b8dc22 100644
--- a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
+++ b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
@@ -6,7 +6,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
 
 # If you really want to run syslinux, you need mtools.  We just want the
 # ldlinux.* stuff for now, so skip mtools-native
-DEPENDS = "nasm-native util-linux e2fsprogs"
+DEPENDS = "nasm-native util-linux util-linux-uuid e2fsprogs"
 PV = "6.04-pre2"
 
 SRC_URI = "https://www.zytor.com/pub/syslinux/Testing/6.04/syslinux-${PV}.tar.xz \
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
index ed14fe66b1..174b9c0a5e 100644
--- a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -16,7 +16,7 @@  SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent \
            file://tcf-agent.service \
           "
 
-DEPENDS = "util-linux openssl"
+DEPENDS = "util-linux util-linux-uuid openssl"
 RDEPENDS_${PN} = "bash"
 
 S = "${WORKDIR}/git/agent"
diff --git a/meta/recipes-extended/mc/mc_4.8.25.bb b/meta/recipes-extended/mc/mc_4.8.25.bb
index 83c8a6ecf6..78565c9a9a 100644
--- a/meta/recipes-extended/mc/mc_4.8.25.bb
+++ b/meta/recipes-extended/mc/mc_4.8.25.bb
@@ -3,7 +3,7 @@  HOMEPAGE = "http://www.midnight-commander.org/"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
 SECTION = "console/utils"
-DEPENDS = "ncurses glib-2.0 util-linux"
+DEPENDS = "ncurses glib-2.0 util-linux util-linux-uuid"
 RDEPENDS_${PN} = "ncurses-terminfo-base"
 RRECOMMENDS_${PN} = "ncurses-terminfo"
 
diff --git a/meta/recipes-extended/parted/parted_3.3.bb b/meta/recipes-extended/parted/parted_3.3.bb
index a1fd3ef07b..f06cdc18e6 100644
--- a/meta/recipes-extended/parted/parted_3.3.bb
+++ b/meta/recipes-extended/parted/parted_3.3.bb
@@ -3,7 +3,7 @@  HOMEPAGE = "http://www.gnu.org/software/parted/parted.html"
 LICENSE = "GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"
 SECTION = "console/tools"
-DEPENDS = "ncurses readline util-linux virtual/libiconv"
+DEPENDS = "ncurses readline util-linux util-linux-uuid virtual/libiconv"
 
 SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
            file://no_check.patch \
diff --git a/meta/recipes-extended/wget/wget.inc b/meta/recipes-extended/wget/wget.inc
index 2338328216..7b7a3fae7a 100644
--- a/meta/recipes-extended/wget/wget.inc
+++ b/meta/recipes-extended/wget/wget.inc
@@ -32,7 +32,7 @@  PACKAGECONFIG[gnutls] = "--with-ssl=gnutls,,gnutls"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
 PACKAGECONFIG[iri] = "--enable-iri,--disable-iri,libidn2"
 PACKAGECONFIG[libpsl] = "--with-libpsl,--without-libpsl,libpsl"
-PACKAGECONFIG[libuuid] = "--with-libuuid,--without-libuuid,util-linux"
+PACKAGECONFIG[libuuid] = "--with-libuuid,--without-libuuid,util-linux-uuid"
 PACKAGECONFIG[openssl] = "--with-ssl=openssl,,openssl"
 PACKAGECONFIG[pcre] = "--enable-pcre,--disable-pcre,libpcre"
 PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
diff --git a/meta/recipes-graphics/fontconfig/fontconfig_2.13.1.bb b/meta/recipes-graphics/fontconfig/fontconfig_2.13.1.bb
index d0da419ce0..c9edf8dee6 100644
--- a/meta/recipes-graphics/fontconfig/fontconfig_2.13.1.bb
+++ b/meta/recipes-graphics/fontconfig/fontconfig_2.13.1.bb
@@ -18,7 +18,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=7a0449e9bc5370402a94c00204beca3d \
 
 SECTION = "libs"
 
-DEPENDS = "expat freetype zlib gperf-native util-linux"
+DEPENDS = "expat freetype zlib gperf-native util-linux util-linux-uuid"
 
 SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
            file://revert-static-pkgconfig.patch \
diff --git a/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb b/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb
index 54384521c8..ab8c4215d3 100644
--- a/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb
+++ b/meta/recipes-graphics/xorg-lib/libxt_1.2.0.bb
@@ -15,7 +15,7 @@  require xorg-lib-common.inc
 LICENSE = "MIT & MIT-style"
 LIC_FILES_CHKSUM = "file://COPYING;md5=73d55cea4d27ca1a09a5d23378b3ecf8"
 
-DEPENDS += "util-linux libxcb libsm virtual/libx11 xorgproto libxdmcp"
+DEPENDS += "util-linux util-linux-uuid libxcb libsm virtual/libx11 xorgproto libxdmcp"
 PROVIDES = "xt"
 
 PE = "1"
diff --git a/meta/recipes-kernel/lttng/babeltrace2_2.0.3.bb b/meta/recipes-kernel/lttng/babeltrace2_2.0.3.bb
index c65882581d..952cba0977 100644
--- a/meta/recipes-kernel/lttng/babeltrace2_2.0.3.bb
+++ b/meta/recipes-kernel/lttng/babeltrace2_2.0.3.bb
@@ -5,7 +5,7 @@  BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
 LICENSE = "MIT & GPLv2 & LGPLv2.1 & BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=a6a458c13f18385b7bc5069a6d7b176e"
 
-DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
+DEPENDS = "glib-2.0 util-linux util-linux-uuid popt bison-native flex-native"
 
 SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-2.0 \
            file://run-ptest \
diff --git a/meta/recipes-kernel/lttng/babeltrace_1.5.8.bb b/meta/recipes-kernel/lttng/babeltrace_1.5.8.bb
index 9e5d3a7a97..e618f1cf98 100644
--- a/meta/recipes-kernel/lttng/babeltrace_1.5.8.bb
+++ b/meta/recipes-kernel/lttng/babeltrace_1.5.8.bb
@@ -5,7 +5,7 @@  BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
 LICENSE = "MIT & GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
 
-DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
+DEPENDS = "glib-2.0 util-linux util-linux-uuid popt bison-native flex-native"
 
 SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.5 \
 	   file://run-ptest \
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb b/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb
index 0787e04d19..e645bc4743 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.12.2.bb
@@ -11,7 +11,7 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=40ef17463fbd6f377db3c47b1cbaded8 \
 
 include lttng-platforms.inc
 
-DEPENDS = "liburcu popt libxml2 util-linux"
+DEPENDS = "liburcu popt libxml2 util-linux util-linux-uuid"
 RDEPENDS_${PN} = "libgcc"
 RRECOMMENDS_${PN} += "${LTTNGMODULES}"
 RDEPENDS_${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod ${LTTNGMODULES} sed python3-core"
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb b/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb
index 67a4307c7b..d477528db5 100644
--- a/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-ust_2.12.0.bb
@@ -19,7 +19,7 @@  include lttng-platforms.inc
 
 EXTRA_OECONF = "--disable-numa"
 
-DEPENDS = "liburcu util-linux"
+DEPENDS = "liburcu util-linux util-linux-uuid"
 RDEPENDS_${PN}-bin = "python3-core"
 
 # For backwards compatibility after rename
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.bb
index a04af186f6..b42b62799e 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.0.bb
@@ -14,7 +14,7 @@  SRC_URI[sha256sum] = "762abdd1a950809a1cea62fff7f86b5f7d6bd5f6841e3e585c700b823c
 
 S = "${WORKDIR}/gst-plugins-base-${PV}"
 
-DEPENDS += "iso-codes util-linux zlib"
+DEPENDS += "iso-codes util-linux util-linux-uuid zlib"
 
 inherit gobject-introspection
 
diff --git a/meta/recipes-support/apr/apr_1.7.0.bb b/meta/recipes-support/apr/apr_1.7.0.bb
index 7073af8c98..ed0b9a0903 100644
--- a/meta/recipes-support/apr/apr_1.7.0.bb
+++ b/meta/recipes-support/apr/apr_1.7.0.bb
@@ -1,7 +1,7 @@ 
 SUMMARY = "Apache Portable Runtime (APR) library"
 HOMEPAGE = "http://apr.apache.org/"
 SECTION = "libs"
-DEPENDS = "util-linux"
+DEPENDS = "util-linux util-linux-uuid"
 
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \
diff --git a/meta/recipes-support/serf/serf_1.3.9.bb b/meta/recipes-support/serf/serf_1.3.9.bb
index 6a27f12102..c2800c69cc 100644
--- a/meta/recipes-support/serf/serf_1.3.9.bb
+++ b/meta/recipes-support/serf/serf_1.3.9.bb
@@ -17,7 +17,7 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
 inherit scons
 
-DEPENDS += " openssl apr apr-util util-linux expat"
+DEPENDS += " openssl apr apr-util util-linux util-linux-uuid expat"
 
 EXTRA_OESCONS = " \
                   LIBDIR=${libdir} \

Comments

Richard Purdie Dec. 10, 2020, 3:52 p.m.
On Mon, 2020-11-23 at 13:28 +0000, Luca Bocassi wrote:
> From: Luca Boccassi <luca.boccassi@microsoft.com>

> 

> In v2.35 util-linux  gained an (optional) build

> dependency on libcryptsetup. But libcryptsetup build-depends on

> util-linux for blkid (optional, can be disabled) and uuid (mandatory).

> Split out util-linux-uuid in a different recipe to break the cycle.

> 

> Add a packageconfig switch (disabled by default) to allow using the

> new dependency.

> 

> https://github.com/karelzak/util-linux/pull/898

> 

> Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>

> ---

> v1: util-linux 2.35 is not out yet, but I'd like to get the preparatory work

>     underway as I'm not sure if this is the best approach or if there are

>     alternatives. Suggestions and comments very welcome. Thanks!

> v2: changed packages names to reflect old ones (eg: libuuid1 -> util-linux-libuuid)

>     and leave uuid build enable in main recipe to allow for uuidgen build to happen,

>     as it does not have its own autoconf switch. Delete the library manualy from

>     the main recipe after build instead, and add dependency.

>     Might help to break loop python3 -> util-linux -> libselinux -> python3, as it's

>     only libuuid that is needed, see https://lists.yoctoproject.org/g/yocto/message/47570

> v3: rebased and refactored to have a common util-linux.inc file

> 


I'm afraid this causes do_package_qa errors in basic testing:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1668

I am worried about this change as we're starting to see a number of
circular dependencies in util-linux (there is a new bug about the
pylibmount PACKAGECONFIG option too), maybe we should flag this
upstream?

Multiple recipes like this usually turn into a maintenance nightmare
unfortunately which is part of my reluctance to go in this direction,
not sure we have any choice though.

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145449): https://lists.openembedded.org/g/openembedded-core/message/145449
Mute This Topic: https://lists.openembedded.org/mt/78452881/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-
Luca Boccassi via lists.openembedded.org Dec. 10, 2020, 6:47 p.m.
On Thu, 2020-12-10 at 15:52 +0000, Richard Purdie wrote:
> On Mon, 2020-11-23 at 13:28 +0000, Luca Bocassi wrote:

> > From: Luca Boccassi <luca.boccassi@microsoft.com>

> > 

> > In v2.35 util-linux  gained an (optional) build

> > dependency on libcryptsetup. But libcryptsetup build-depends on

> > util-linux for blkid (optional, can be disabled) and uuid (mandatory).

> > Split out util-linux-uuid in a different recipe to break the cycle.

> > 

> > Add a packageconfig switch (disabled by default) to allow using the

> > new dependency.

> > 

> > https://github.com/karelzak/util-linux/pull/898

> > 

> > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>

> > ---

> > v1: util-linux 2.35 is not out yet, but I'd like to get the preparatory work

> >     underway as I'm not sure if this is the best approach or if there are

> >     alternatives. Suggestions and comments very welcome. Thanks!

> > v2: changed packages names to reflect old ones (eg: libuuid1 -> util-linux-libuuid)

> >     and leave uuid build enable in main recipe to allow for uuidgen build to happen,

> >     as it does not have its own autoconf switch. Delete the library manualy from

> >     the main recipe after build instead, and add dependency.

> >     Might help to break loop python3 -> util-linux -> libselinux -> python3, as it's

> >     only libuuid that is needed, see https://lists.yoctoproject.org/g/yocto/message/47570

> > v3: rebased and refactored to have a common util-linux.inc file

> > 

> 

> I'm afraid this causes do_package_qa errors in basic testing:

> 

> https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1668


Thanks, added RDEPENDS in v4. Strange that those didn't pop up when
building poky locally, I usually get QA warnings as expected. Anything
in local.conf to enable to get them?

> I am worried about this change as we're starting to see a number of

> circular dependencies in util-linux (there is a new bug about the

> pylibmount PACKAGECONFIG option too), maybe we should flag this

> upstream?

> 

> Multiple recipes like this usually turn into a maintenance nightmare

> unfortunately which is part of my reluctance to go in this direction,

> not sure we have any choice though.


Well I've added the feature, and both the maintainer and myself were
aware of the implications. It's optional, so on distros with multi-
stage bootstrapping functionality like Debian/Ubuntu/RHEL/Suse/etc it
can be automatically disabled for the first stage build. At runtime it
can also be optional via dlopen, if desired (via --configure flag).

Yocto could really use multi stage support - this isn't the first and
won't be the last occurrence. Just my 2c...

-- 
Kind regards,
Luca Boccassi
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145457): https://lists.openembedded.org/g/openembedded-core/message/145457
Mute This Topic: https://lists.openembedded.org/mt/78452881/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-
Richard Purdie Dec. 10, 2020, 8:04 p.m.
On Thu, 2020-12-10 at 18:47 +0000, Luca Boccassi wrote:
> On Thu, 2020-12-10 at 15:52 +0000, Richard Purdie wrote:

> > On Mon, 2020-11-23 at 13:28 +0000, Luca Bocassi wrote:

> > > From: Luca Boccassi <luca.boccassi@microsoft.com>

> > > 

> > > In v2.35 util-linux  gained an (optional) build

> > > dependency on libcryptsetup. But libcryptsetup build-depends on

> > > util-linux for blkid (optional, can be disabled) and uuid

> > > (mandatory).

> > > Split out util-linux-uuid in a different recipe to break the

> > > cycle.

> > > 

> > > Add a packageconfig switch (disabled by default) to allow using

> > > the

> > > new dependency.

> > > 

> > > https://github.com/karelzak/util-linux/pull/898

> > > 

> > > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>

> > > ---

> > > v1: util-linux 2.35 is not out yet, but I'd like to get the

> > > preparatory work

> > >     underway as I'm not sure if this is the best approach or if

> > > there are

> > >     alternatives. Suggestions and comments very welcome. Thanks!

> > > v2: changed packages names to reflect old ones (eg: libuuid1 ->

> > > util-linux-libuuid)

> > >     and leave uuid build enable in main recipe to allow for

> > > uuidgen build to happen,

> > >     as it does not have its own autoconf switch. Delete the

> > > library manualy from

> > >     the main recipe after build instead, and add dependency.

> > >     Might help to break loop python3 -> util-linux -> libselinux

> > > -> python3, as it's

> > >     only libuuid that is needed, see 

> > > https://lists.yoctoproject.org/g/yocto/message/47570

> > > v3: rebased and refactored to have a common util-linux.inc file

> > > 

> > 

> > I'm afraid this causes do_package_qa errors in basic testing:

> > 

> > https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1668

> 

> Thanks, added RDEPENDS in v4. Strange that those didn't pop up when

> building poky locally, I usually get QA warnings as expected.

> Anything

> in local.conf to enable to get them?


No, you should see it in a standard build. It did make me wonder how
this was tested :/.

> > I am worried about this change as we're starting to see a number of

> > circular dependencies in util-linux (there is a new bug about the

> > pylibmount PACKAGECONFIG option too), maybe we should flag this

> > upstream?

> > 

> > Multiple recipes like this usually turn into a maintenance

> > nightmare

> > unfortunately which is part of my reluctance to go in this

> > direction,

> > not sure we have any choice though.

> 

> Well I've added the feature, and both the maintainer and myself were

> aware of the implications. It's optional, so on distros with multi-

> stage bootstrapping functionality like Debian/Ubuntu/RHEL/Suse/etc it

> can be automatically disabled for the first stage build. At runtime

> it can also be optional via dlopen, if desired (via --configure

> flag).


I have to ask why libuuid couldn't be done in a separate repository and
avoid the need to do a multi-stage build of a component? To me at
least, it would seem to make sense to logically split the library code
out, then it avoids all the complexity. Yes, that means a different
component to release but that isn't unusual.

> Yocto could really use multi stage support - this isn't the first and

> won't be the last occurrence. Just my 2c...


Well, we can do it as you're proving, its just ugly and hard to
maintain. I don't think the other distros will be particularly happy
about needing to do it either. Outside of libgcc, we've not really
found that we need to do this often at all and the compiler/libc
interface is a lot more "special" than uuid.

Thanks for updating the patch. I'll put it back into the queue and test
the new version.

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145458): https://lists.openembedded.org/g/openembedded-core/message/145458
Mute This Topic: https://lists.openembedded.org/mt/78452881/3616849
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [michael@yoctoproject.org]
-=-=-=-=-=-=-=-=-=-=-=-
Luca Boccassi via lists.openembedded.org Dec. 11, 2020, 9:51 a.m.
On Thu, 2020-12-10 at 20:04 +0000, Richard Purdie wrote:
> On Thu, 2020-12-10 at 18:47 +0000, Luca Boccassi wrote:

> > On Thu, 2020-12-10 at 15:52 +0000, Richard Purdie wrote:

> > > On Mon, 2020-11-23 at 13:28 +0000, Luca Bocassi wrote:

> > > > From: Luca Boccassi <luca.boccassi@microsoft.com>

> > > > 

> > > > In v2.35 util-linux  gained an (optional) build

> > > > dependency on libcryptsetup. But libcryptsetup build-depends on

> > > > util-linux for blkid (optional, can be disabled) and uuid

> > > > (mandatory).

> > > > Split out util-linux-uuid in a different recipe to break the

> > > > cycle.

> > > > 

> > > > Add a packageconfig switch (disabled by default) to allow using

> > > > the

> > > > new dependency.

> > > > 

> > > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkarelzak%2Futil-linux%2Fpull%2F898&amp;data=04%7C01%7CLuca.Boccassi%40microsoft.com%7Cf1cc5d5a36b94793f16708d89d46dfac%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637432275624402419%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=k69BQ6hOpusjBlcC%2FBo%2BFRLsAc%2FiYd5pLPfh65lcRdQ%3D&amp;reserved=0

> > > > 

> > > > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>

> > > > ---

> > > > v1: util-linux 2.35 is not out yet, but I'd like to get the

> > > > preparatory work

> > > >     underway as I'm not sure if this is the best approach or if

> > > > there are

> > > >     alternatives. Suggestions and comments very welcome. Thanks!

> > > > v2: changed packages names to reflect old ones (eg: libuuid1 ->

> > > > util-linux-libuuid)

> > > >     and leave uuid build enable in main recipe to allow for

> > > > uuidgen build to happen,

> > > >     as it does not have its own autoconf switch. Delete the

> > > > library manualy from

> > > >     the main recipe after build instead, and add dependency.

> > > >     Might help to break loop python3 -> util-linux -> libselinux

> > > > -> python3, as it's

> > > >     only libuuid that is needed, see 

> > > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.yoctoproject.org%2Fg%2Fyocto%2Fmessage%2F47570&amp;data=04%7C01%7CLuca.Boccassi%40microsoft.com%7Cf1cc5d5a36b94793f16708d89d46dfac%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637432275624402419%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=poH8DFxARF1Myy%2BRRirbOE3bJzu5uSO%2F%2BLfsalK%2F4ro%3D&amp;reserved=0

> > > > v3: rebased and refactored to have a common util-linux.inc file

> > > > 

> > > 

> > > I'm afraid this causes do_package_qa errors in basic testing:

> > > 

> > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fautobuilder.yoctoproject.org%2Ftyphoon%2F%23%2Fbuilders%2F83%2Fbuilds%2F1668&amp;data=04%7C01%7CLuca.Boccassi%40microsoft.com%7Cf1cc5d5a36b94793f16708d89d46dfac%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637432275624402419%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=uiLItrvBcoNjjjCFZaUlQfC1%2B26N%2BnV72BUiy%2FuBq0M%3D&amp;reserved=0

> > 

> > Thanks, added RDEPENDS in v4. Strange that those didn't pop up when

> > building poky locally, I usually get QA warnings as expected.

> > Anything

> > in local.conf to enable to get them?

> 

> No, you should see it in a standard build. It did make me wonder how

> this was tested :/.


Very weird. Maybe some packageconfig difference? I did not go through
all the possible permutations manually.

We have been using this recipe change in production for a year now, so
it has plenty of builds behind.

> > > I am worried about this change as we're starting to see a number of

> > > circular dependencies in util-linux (there is a new bug about the

> > > pylibmount PACKAGECONFIG option too), maybe we should flag this

> > > upstream?

> > > 

> > > Multiple recipes like this usually turn into a maintenance

> > > nightmare

> > > unfortunately which is part of my reluctance to go in this

> > > direction,

> > > not sure we have any choice though.

> > 

> > Well I've added the feature, and both the maintainer and myself were

> > aware of the implications. It's optional, so on distros with multi-

> > stage bootstrapping functionality like Debian/Ubuntu/RHEL/Suse/etc it

> > can be automatically disabled for the first stage build. At runtime

> > it can also be optional via dlopen, if desired (via --configure

> > flag).

> 

> I have to ask why libuuid couldn't be done in a separate repository and

> avoid the need to do a multi-stage build of a component? To me at

> least, it would seem to make sense to logically split the library code

> out, then it avoids all the complexity. Yes, that means a different

> component to release but that isn't unusual.


Because there's no need for the extra complications - again, it's all
optional features, so bootstrapping is not an issue when the tooling is
there to support it.
I'm not a util-linux maintainer so my opinion on the subject counts for
precisely nothing, but as a contributor and user I'd not be very happy
if it was stuck to the lowest common denominator.

> > Yocto could really use multi stage support - this isn't the first and

> > won't be the last occurrence. Just my 2c...

> 

> Well, we can do it as you're proving, its just ugly and hard to

> maintain. I don't think the other distros will be particularly happy

> about needing to do it either. Outside of libgcc, we've not really

> found that we need to do this often at all and the compiler/libc

> interface is a lot more "special" than uuid.


But that's what I'm saying: it doesn't have to be ugly, if the
infrastructure is there to support it.

On Debian and derivatives, you just mark the dependency with <!stage1>
- and that's it. When bootstrapping you start from stage1 and the
resolver skips those. If the package configure/make scripts are done
well, by default optional dependencies are skipped if not available and
if not explicitly set - and util-linux does that.
In the RPM world, the spec has conditional macros and you set the
appropriate one at the build config level (eg: in the lower ring
project on OBS).
It's not perfect of course, and requires attention, and there are
complications and gotchas, and things do go wrong at times - but such
is life in the software world.


> Thanks for updating the patch. I'll put it back into the queue and test

> the new version.


Thank you - does the approach of adding RDEPENDS look right? The
interaction between those variables and the native/nativesdk builds
still confuses me a lot, and I get it wrong all the time.

-- 
Kind regards,
Luca Boccassi
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145469): https://lists.openembedded.org/g/openembedded-core/message/145469
Mute This Topic: https://lists.openembedded.org/mt/78452881/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-
Richard Purdie Dec. 11, 2020, 4:54 p.m.
On Fri, 2020-12-11 at 09:51 +0000, Luca Boccassi wrote:
> On Thu, 2020-12-10 at 20:04 +0000, Richard Purdie wrote:

> > On Thu, 2020-12-10 at 18:47 +0000, Luca Boccassi wrote:

> > > On Thu, 2020-12-10 at 15:52 +0000, Richard Purdie wrote:

> > > > On Mon, 2020-11-23 at 13:28 +0000, Luca Bocassi wrote:

> > I have to ask why libuuid couldn't be done in a separate repository and

> > avoid the need to do a multi-stage build of a component? To me at

> > least, it would seem to make sense to logically split the library code

> > out, then it avoids all the complexity. Yes, that means a different

> > component to release but that isn't unusual.

> 

> Because there's no need for the extra complications - again, it's all

> optional features, so bootstrapping is not an issue when the tooling is

> there to support it.

> I'm not a util-linux maintainer so my opinion on the subject counts for

> precisely nothing, but as a contributor and user I'd not be very happy

> if it was stuck to the lowest common denominator.


If its all optional and not that important I start to wonder why we
should bother with it.

My point is there has to be complexity somewhere for this "mutli-stage" 
approach to work. How much of it you see depends on the system and how
it handles it but you'd agree that having a simple more linear
dependency tree *is* simpler and easier to work with than something
which has multiple stages (and more efficient on build resources too).

> > > Yocto could really use multi stage support - this isn't the first and

> > > won't be the last occurrence. Just my 2c...

> > 

> > Well, we can do it as you're proving, its just ugly and hard to

> > maintain. I don't think the other distros will be particularly happy

> > about needing to do it either. Outside of libgcc, we've not really

> > found that we need to do this often at all and the compiler/libc

> > interface is a lot more "special" than uuid.

> 

> But that's what I'm saying: it doesn't have to be ugly, if the

> infrastructure is there to support it.


I'm sure we (OE) could "hide" it but regardless of whether the code is
hidden or not, its still ugly, not often used and hard to maintain for
someone. We don't want to encourage this though.

> On Debian and derivatives, you just mark the dependency with <!stage1>

> - and that's it. When bootstrapping you start from stage1 and the

> resolver skips those. If the package configure/make scripts are done

> well, by default optional dependencies are skipped if not available and

> if not explicitly set - and util-linux does that.

> In the RPM world, the spec has conditional macros and you set the

> appropriate one at the build config level (eg: in the lower ring

> project on OBS).

> It's not perfect of course, and requires attention, and there are

> complications and gotchas, and things do go wrong at times - but such

> is life in the software world.


Complexity is fine, where it makes sense and is needed. You're failing
to convince me its needed here at all. I believe this does need to be
mentioned to the upstream maintainer as they're probably not aware of
the issues it causes. Obviously someone else will have to do that
though since you believe its "fine".

> 

> > Thanks for updating the patch. I'll put it back into the queue and test

> > the new version.

> 

> Thank you - does the approach of adding RDEPENDS look right? The

> interaction between those variables and the native/nativesdk builds

> still confuses me a lot, and I get it wrong all the time.


I've just looked and to be honest, no, it doesn't look right at all :(.
You're adding dependencies in a recipe where the packages don't exist.

Also, if the recipes are properly structuctred, there should be no need
to do this:

PACKAGES_remove = "util-linux-libuuid util-linux-libuuid-dev util-linux-libuuid-dbg"

The more I look at the patch, the more I'm worried :(. As is, its not
going to work. I'm not even sure how its being tested or can work.

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145477): https://lists.openembedded.org/g/openembedded-core/message/145477
Mute This Topic: https://lists.openembedded.org/mt/78452881/3616849
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [michael@yoctoproject.org]
-=-=-=-=-=-=-=-=-=-=-=-
luca.boccassi@gmail.com Dec. 12, 2020, 7:13 a.m.
This is a system generated Comment: Patch 178226 was automatically marked as superseded by patch 178660.
Luca Boccassi via lists.openembedded.org Dec. 14, 2020, 4:32 p.m.
On Fri, 2020-12-11 at 16:54 +0000, Richard Purdie wrote:
> On Fri, 2020-12-11 at 09:51 +0000, Luca Boccassi wrote:

> > On Thu, 2020-12-10 at 20:04 +0000, Richard Purdie wrote:

> > > On Thu, 2020-12-10 at 18:47 +0000, Luca Boccassi wrote:

> > > > On Thu, 2020-12-10 at 15:52 +0000, Richard Purdie wrote:

> > > > > On Mon, 2020-11-23 at 13:28 +0000, Luca Bocassi wrote:

> > > I have to ask why libuuid couldn't be done in a separate repository and

> > > avoid the need to do a multi-stage build of a component? To me at

> > > least, it would seem to make sense to logically split the library code

> > > out, then it avoids all the complexity. Yes, that means a different

> > > component to release but that isn't unusual.

> > 

> > Because there's no need for the extra complications - again, it's all

> > optional features, so bootstrapping is not an issue when the tooling is

> > there to support it.

> > I'm not a util-linux maintainer so my opinion on the subject counts for

> > precisely nothing, but as a contributor and user I'd not be very happy

> > if it was stuck to the lowest common denominator.

> 

> If its all optional and not that important I start to wonder why we

> should bother with it.

> 

> My point is there has to be complexity somewhere for this "mutli-stage" 

> approach to work. How much of it you see depends on the system and how

> it handles it but you'd agree that having a simple more linear

> dependency tree *is* simpler and easier to work with than something

> which has multiple stages (and more efficient on build resources too).


Optional doesn't always imply unimportant - for some users it's not
needed, for others it is, so it's optional. We are in the latter group,
hence the work to implement and support it in a multitude of places.

> > > > Yocto could really use multi stage support - this isn't the first and

> > > > won't be the last occurrence. Just my 2c...

> > > 

> > > Well, we can do it as you're proving, its just ugly and hard to

> > > maintain. I don't think the other distros will be particularly happy

> > > about needing to do it either. Outside of libgcc, we've not really

> > > found that we need to do this often at all and the compiler/libc

> > > interface is a lot more "special" than uuid.

> > 

> > But that's what I'm saying: it doesn't have to be ugly, if the

> > infrastructure is there to support it.

> 

> I'm sure we (OE) could "hide" it but regardless of whether the code is

> hidden or not, its still ugly, not often used and hard to maintain for

> someone. We don't want to encourage this though.

> 

> > On Debian and derivatives, you just mark the dependency with <!stage1>

> > - and that's it. When bootstrapping you start from stage1 and the

> > resolver skips those. If the package configure/make scripts are done

> > well, by default optional dependencies are skipped if not available and

> > if not explicitly set - and util-linux does that.

> > In the RPM world, the spec has conditional macros and you set the

> > appropriate one at the build config level (eg: in the lower ring

> > project on OBS).

> > It's not perfect of course, and requires attention, and there are

> > complications and gotchas, and things do go wrong at times - but such

> > is life in the software world.

> 

> Complexity is fine, where it makes sense and is needed. You're failing

> to convince me its needed here at all. I believe this does need to be

> mentioned to the upstream maintainer as they're probably not aware of

> the issues it causes. Obviously someone else will have to do that

> though since you believe its "fine".


I'm sure it wasn't intentional, but this passage comes across as quite
condescending. Everybody involved is perfectly capable of understanding
how this works and what it implies.

> > > Thanks for updating the patch. I'll put it back into the queue and test

> > > the new version.

> > 

> > Thank you - does the approach of adding RDEPENDS look right? The

> > interaction between those variables and the native/nativesdk builds

> > still confuses me a lot, and I get it wrong all the time.

> 

> I've just looked and to be honest, no, it doesn't look right at all :(.

> You're adding dependencies in a recipe where the packages don't exist.


Could you please be more specific? Dependencies on packages from other
recipes are pretty much normal. In what way is this different?
And most importantly, do you have a suggestion on how would you like to
see this done instead?

> Also, if the recipes are properly structuctred, there should be no need

> to do this:

> 

> PACKAGES_remove = "util-linux-libuuid util-linux-libuuid-dev util-linux-libuuid-dbg"


The recipe is what it is - I'm not adding this auto-generation of
packages, it was there already, so I have to work with it. If you have
a preference for handling it differently please let me know and I'll
apply it.

> The more I look at the patch, the more I'm worried :(. As is, its not

> going to work. I'm not even sure how its being tested or can work.


As already mentioned, the v2 has not only been tested but used in
production for a year. Every subsequent revision is recent, so
obviously hasn't been used yet, but it is also pretty much a 1:1
application of Yocto maintainers requests. I've already asked for a
specific configuration to try, as the basic poky one created by oe-
init-build-env didn't show any issue. The CI infrastructure is
completely opaque and imperscrutable to a casual passerby, so
unfortunately I wasn't able to extract anything usable from it.

-- 
Kind regards,
Luca Boccassi
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145603): https://lists.openembedded.org/g/openembedded-core/message/145603
Mute This Topic: https://lists.openembedded.org/mt/78452881/1003190
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-