All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] util-linux: split uuid in separate recipe to allow bootstrapping
@ 2019-12-05 20:13 luca.boccassi
  2019-12-05 23:29 ` Ross Burton
                   ` (2 more replies)
  0 siblings, 3 replies; 74+ messages in thread
From: luca.boccassi @ 2019-12-05 20:13 UTC (permalink / raw)
  To: openembedded-core

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

In the next release util-linux will gain 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.

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

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
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!

 .../util-linux/util-linux-uuid_2.34.bb        | 35 +++++++++++++++++++
 meta/recipes-core/util-linux/util-linux.inc   |  6 ++++
 meta/recipes-extended/wget/wget.inc           |  2 +-
 3 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.34.bb

diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.34.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.34.bb
new file mode 100644
index 0000000000..f106c6a18c
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-uuid_2.34.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Builds libuuid separately from util-linux for bootstrapping"
+HOMEPAGE = "http://userweb.kernel.org/~kzak/util-linux/"
+
+SECTION = "base"
+
+LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause"
+
+LIC_FILES_CHKSUM = "file://README.licensing;md5=972a134f1e14b2b060e365df2fab0099 \
+                    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"
+
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${MAJOR_VERSION}.tar.xz \
+           "
+
+SRC_URI[md5sum] = "a78cbeaed9c39094b96a48ba8f891d50"
+SRC_URI[sha256sum] = "743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5"
+
+inherit autotools gettext pkgconfig
+
+S = "${WORKDIR}/util-linux-${PV}"
+EXTRA_OECONF += "--disable-all-programs --enable-libuuid"
+RPROVIDES_libuuid-dev = "util-linux-libuuid-dev"
+RPROVIDES_libuuid = "util-linux-libuuid"
+
+do_install_append() {
+	rmdir ${D}${bindir} ${D}${sbindir}
+	rm -rf ${D}${datadir}
+}
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 1fa82363b1..ef6f95776a 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -288,6 +288,12 @@ 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"
 
+# split uuid out to allow in the near future a build-dependency on packages depending on it
+RPROVIDES_remove_class-target_${PN}-dev = "util-linux-libuuid-dev"
+PACKAGES_remove_class-target = "libuuid1 util-linux-libuuid1"
+DEPENDS_append_class-target = " util-linux-uuid"
+EXTRA_OECONF_remove_class-target = "--enable-libuuid"
+EXTRA_OECONF_append_class-target = " --disable-libuuid"
 
 BBCLASSEXTEND = "native nativesdk"
 
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"
-- 
2.20.1



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

* Re: [PATCH] util-linux: split uuid in separate recipe to allow bootstrapping
  2019-12-05 20:13 [PATCH] util-linux: split uuid in separate recipe to allow bootstrapping luca.boccassi
@ 2019-12-05 23:29 ` Ross Burton
  2019-12-09 16:24 ` [PATCH v2] " luca.boccassi
  2019-12-09 16:33 ` [PATCH] " Luca Boccassi
  2 siblings, 0 replies; 74+ messages in thread
From: Ross Burton @ 2019-12-05 23:29 UTC (permalink / raw)
  To: openembedded-core

On 05/12/2019 20:13, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <luca.boccassi@microsoft.com>
> 
> In the next release util-linux will gain 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.

<sigh>

At least please simply make util-linux-uuid just require util-linux and 
make the configuration changes required (presumably, disabling all tools 
but uuid).

Ross


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

* [PATCH v2] util-linux: split uuid in separate recipe to allow bootstrapping
  2019-12-05 20:13 [PATCH] util-linux: split uuid in separate recipe to allow bootstrapping luca.boccassi
  2019-12-05 23:29 ` Ross Burton
@ 2019-12-09 16:24 ` luca.boccassi
  2020-11-23 13:28   ` [PATCH v3] " Luca Bocassi
  2019-12-09 16:33 ` [PATCH] " Luca Boccassi
  2 siblings, 1 reply; 74+ messages in thread
From: luca.boccassi @ 2019-12-09 16:24 UTC (permalink / raw)
  To: openembedded-core; +Cc: Peter.Morrow

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

In the next release util-linux will gain 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.

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

 .../util-linux/util-linux-uuid_2.34.bb        | 40 +++++++++++++++++++
 meta/recipes-core/util-linux/util-linux.inc   | 11 +++++
 meta/recipes-extended/wget/wget.inc           |  2 +-
 3 files changed, 52 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.34.bb

diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.34.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.34.bb
new file mode 100644
index 0000000000..ec47f9ae62
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-uuid_2.34.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Builds libuuid separately from util-linux for bootstrapping"
+HOMEPAGE = "http://userweb.kernel.org/~kzak/util-linux/"
+
+SECTION = "base"
+
+LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause"
+
+LIC_FILES_CHKSUM = "file://README.licensing;md5=972a134f1e14b2b060e365df2fab0099 \
+                    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"
+
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${MAJOR_VERSION}.tar.xz \
+           "
+
+SRC_URI[md5sum] = "a78cbeaed9c39094b96a48ba8f891d50"
+SRC_URI[sha256sum] = "743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5"
+
+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() {
+	rmdir ${D}${bindir} ${D}${sbindir}
+	rm -rf ${D}${datadir}
+}
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 1fa82363b1..6973670589 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -288,6 +288,17 @@ 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 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
+RPROVIDES_remove_class-target_${PN}-dev = "util-linux-libuuid-dev"
+PACKAGES_remove_class-target = "util-linux-libuuid util-linux-libuuid-dev util-linux-libuuid-dbg"
+DEPENDS_append_class-target = " util-linux-uuid"
+RDEPENDS_append_class-target_${PN}-dev = " util-linux-libuuid-dev"
+RDEPENDS_append_class-target_${PN} = " util-linux-libuuid"
+do_install_append_class-target() {
+    rm -rf ${D}${includedir}/uuid ${D}${libdir}/pkgconfig/uuid.pc ${D}${libdir}/libuuid* ${D}/lib/libuuid*
+}
+
 
 BBCLASSEXTEND = "native nativesdk"
 
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"
-- 
2.20.1



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

* Re: [PATCH] util-linux: split uuid in separate recipe to allow bootstrapping
  2019-12-05 20:13 [PATCH] util-linux: split uuid in separate recipe to allow bootstrapping luca.boccassi
  2019-12-05 23:29 ` Ross Burton
  2019-12-09 16:24 ` [PATCH v2] " luca.boccassi
@ 2019-12-09 16:33 ` Luca Boccassi
  2 siblings, 0 replies; 74+ messages in thread
From: Luca Boccassi @ 2019-12-09 16:33 UTC (permalink / raw)
  To: openembedded-core

> On 05/12/2019 20:13, luca.boccassi@gmail.com wrote:
> > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > 
> > In the next release util-linux will gain 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.
> 
> <sigh>
> 
> At least please simply make util-linux-uuid just require util-linux
> and 
> make the configuration changes required (presumably, disabling all
> tools 
> but uuid).
> 
> Ross

Hi Ross,

(please CC me, I am not receiving mails to the list. Thanks!)

I tried that at first, but it was so complex that the recipe turned out
to be bigger than it is right now. And it wasn't even working, there
were tons of conflicts because of who-knows-what it was picking up due
to the dynamic generation.

-- 
Kind regards,
Luca Boccassi



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

* [PATCH v3] util-linux: split uuid in separate recipe to allow bootstrapping
  2019-12-09 16:24 ` [PATCH v2] " luca.boccassi
@ 2020-11-23 13:28   ` Luca Bocassi
  2020-12-10 15:52     ` [OE-core] " Richard Purdie
  2020-12-10 18:46     ` [PATCH v4] " Luca Bocassi
  0 siblings, 2 replies; 74+ messages in thread
From: Luca Bocassi @ 2020-11-23 13:28 UTC (permalink / raw)
  To: openembedded-core

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

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} \
-- 
2.27.0


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

* Re: [OE-core] [PATCH v3] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-11-23 13:28   ` [PATCH v3] " Luca Bocassi
@ 2020-12-10 15:52     ` Richard Purdie
  2020-12-10 18:47       ` Luca Boccassi
  2020-12-10 18:46     ` [PATCH v4] " Luca Bocassi
  1 sibling, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2020-12-10 15:52 UTC (permalink / raw)
  To: Luca Bocassi, openembedded-core

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


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

* [PATCH v4] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-11-23 13:28   ` [PATCH v3] " Luca Bocassi
  2020-12-10 15:52     ` [OE-core] " Richard Purdie
@ 2020-12-10 18:46     ` Luca Bocassi
  2021-01-19 20:52       ` Richard Purdie
                         ` (7 more replies)
  1 sibling, 8 replies; 74+ messages in thread
From: Luca Bocassi @ 2020-12-10 18:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: richard.purdie

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

In the next release util-linux will gain 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.

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
v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings

 .../nfs-utils/nfs-utils_2.5.2.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             | 56 ++++++-------------
 .../btrfs-tools/btrfs-tools_5.9.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.1.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, 99 insertions(+), 61 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

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.2.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.2.bb
index c7ac67cf31..33eff35e07 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.2.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.2.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..0eca39ef85 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}'"
 
@@ -165,7 +128,7 @@ RRECOMMENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
 
-RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
+RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev"
 
 RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
 RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz"
@@ -316,6 +279,19 @@ 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"
+RDEPENDS_${PN}-uuid = "util-linux-libuuid"
+RDEPENDS_${PN}-uuidgen = "util-linux-libuuid"
+RDEPENDS_${PN}-uuidparse = "util-linux-libuuid"
+RDEPENDS_${PN}-libfdisk = "util-linux-libuuid"
+RDEPENDS_${PN}-mkswap = "util-linux-libuuid"
+RDEPENDS_${PN}-swaplabel = "util-linux-libuuid"
+
 
 BBCLASSEXTEND = "native nativesdk"
 
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.9.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.9.bb
index 15a958e624..cd4ee60f8b 100644
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.9.bb
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.9.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 19a8950f15..eede402aea 100644
--- a/meta/recipes-devtools/python/python3_3.9.0.bb
+++ b/meta/recipes-devtools/python/python3_3.9.0.bb
@@ -69,7 +69,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.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.1.bb
index 1b2bd4fe14..c9bb0b7488 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.1.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.18.1.bb
@@ -13,7 +13,7 @@ SRC_URI[sha256sum] = "1ba654d7de30f7284b4c7071b32f881b609733ce02ab6d9d9ea29386a0
 
 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 2fbf96f997..77a9ac337c 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} \
-- 
2.29.2


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

* Re: [OE-core] [PATCH v3] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-10 15:52     ` [OE-core] " Richard Purdie
@ 2020-12-10 18:47       ` Luca Boccassi
  2020-12-10 20:04         ` Richard Purdie
  0 siblings, 1 reply; 74+ messages in thread
From: Luca Boccassi @ 2020-12-10 18:47 UTC (permalink / raw)
  To: richard.purdie, openembedded-core

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

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

* Re: [OE-core] [PATCH v3] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-10 18:47       ` Luca Boccassi
@ 2020-12-10 20:04         ` Richard Purdie
  2020-12-11  9:51           ` Luca Boccassi
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2020-12-10 20:04 UTC (permalink / raw)
  To: Luca Boccassi, openembedded-core

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


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

* Re: [OE-core] [PATCH v3] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-10 20:04         ` Richard Purdie
@ 2020-12-11  9:51           ` Luca Boccassi
  2020-12-11 16:54             ` Richard Purdie
  0 siblings, 1 reply; 74+ messages in thread
From: Luca Boccassi @ 2020-12-11  9:51 UTC (permalink / raw)
  To: richard.purdie, openembedded-core

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

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

* Re: [OE-core] [PATCH v3] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-11  9:51           ` Luca Boccassi
@ 2020-12-11 16:54             ` Richard Purdie
  2020-12-14 16:32               ` Luca Boccassi
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2020-12-11 16:54 UTC (permalink / raw)
  To: Luca Boccassi, openembedded-core

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


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

* Re: [OE-core] [PATCH v3] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-11 16:54             ` Richard Purdie
@ 2020-12-14 16:32               ` Luca Boccassi
  0 siblings, 0 replies; 74+ messages in thread
From: Luca Boccassi @ 2020-12-14 16:32 UTC (permalink / raw)
  To: richard.purdie, openembedded-core

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

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

* Re: [PATCH v4] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-10 18:46     ` [PATCH v4] " Luca Bocassi
@ 2021-01-19 20:52       ` Richard Purdie
  2021-01-19 23:13         ` [OE-core] " Paul Eggleton
  2021-02-25 15:30       ` [PATCH v5] " Luca Bocassi
                         ` (6 subsequent siblings)
  7 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-01-19 20:52 UTC (permalink / raw)
  To: luca.boccassi, openembedded-core

On Thu, 2020-12-10 at 18:46 +0000, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <luca.boccassi@microsoft.com>
> 
> In the next release util-linux will gain 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.
> 
> 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
> v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings

This patch got a bit lost before the holidays but I've been reminded we
need to resolve it.

I think the one remaining issue here is the need to change the DEPENDS
of so many other recipes, likely not just here in this patch but in
other layers. I think if util-linux DEPENDS on util-linux-uuid that
might remove the need for those changes? That should still allow you to
break the circular dependency problem?

I suspect libuuid should really be maintained/built as a separate
software project given the dependency problems but that isn't my
decision, we just have to deal with it.

I am also worried this is going to break AUH and mean we have to
manually handle this recipe but again, I suspect there is little to be
done and we just have to deal with it.

Could you resend it with the above DEPENDS change if that will work ok,
refreshed against OE-Core since we have util-linux 2.36.1 now and then
hopefully we can resolve this.

Cheers,

Richard



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

* Re: [OE-core] [PATCH v4] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-01-19 20:52       ` Richard Purdie
@ 2021-01-19 23:13         ` Paul Eggleton
  2021-01-19 23:23           ` Richard Purdie
  0 siblings, 1 reply; 74+ messages in thread
From: Paul Eggleton @ 2021-01-19 23:13 UTC (permalink / raw)
  To: openembedded-core, Richard Purdie; +Cc: luca.boccassi

Hi Richard

On Wednesday, 20 January 2021 09:52:41 NZDT Richard Purdie wrote:
> I think the one remaining issue here is the need to change the DEPENDS
> of so many other recipes, likely not just here in this patch but in
> other layers. I think if util-linux DEPENDS on util-linux-uuid that
> might remove the need for those changes? That should still allow you to
> break the circular dependency problem?

I have to admit to a gap in my own knowledge of how our build system handles 
transitive dependencies. Of course the recipe sysroot should still get 
everything it needs in it even if the dependency is only indirectly included, 
in the back of my mind I have the impression that there are expectations that 
all dependencies are explicitly called out and there are subtle issues if they 
aren't, but that could be a mistaken impression on my part.
 
> I suspect libuuid should really be maintained/built as a separate
> software project given the dependency problems but that isn't my
> decision, we just have to deal with it.

I agree that it would be better being separate, FWIW.

> I am also worried this is going to break AUH and mean we have to
> manually handle this recipe but again, I suspect there is little to be
> done and we just have to deal with it.

Could we perhaps fix the AUH to handle this properly? Do we need some kind of 
mechanism to get it to always upgrade the two recipes together or is that only 
part of the issue?

Cheers
Paul



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

* Re: [OE-core] [PATCH v4] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-01-19 23:13         ` [OE-core] " Paul Eggleton
@ 2021-01-19 23:23           ` Richard Purdie
  2021-01-19 23:28             ` Paul Eggleton
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-01-19 23:23 UTC (permalink / raw)
  To: Paul Eggleton, openembedded-core; +Cc: luca.boccassi

On Wed, 2021-01-20 at 12:13 +1300, Paul Eggleton wrote:
> On Wednesday, 20 January 2021 09:52:41 NZDT Richard Purdie wrote:
> > I think the one remaining issue here is the need to change the DEPENDS
> > of so many other recipes, likely not just here in this patch but in
> > other layers. I think if util-linux DEPENDS on util-linux-uuid that
> > might remove the need for those changes? That should still allow you to
> > break the circular dependency problem?
> 
> I have to admit to a gap in my own knowledge of how our build system handles 
> transitive dependencies. Of course the recipe sysroot should still get 
> everything it needs in it even if the dependency is only indirectly included, 
> in the back of my mind I have the impression that there are expectations that 
> all dependencies are explicitly called out and there are subtle issues if they 
> aren't, but that could be a mistaken impression on my part.

I do wonder a little about that as well. As you say, sysroot
dependencies should handle this. Anything linking against libuuid
should also establish an package level runtime dependency through the
linkage so I think this should work.

We definitely don't explicitly list every dependency in every recipe.

If this can work, it makes the migration path for people easier so I
think its at least worth investigating/testing.

Just while I'm thinking, the PACKAGES_remove also bothers me a little.
Can we rearrange the variables so libuuid is only added in the libuuid
recipe variant?

[the idea being that since we control the metadata in oe-core, we
shouldn't need to use _remove and can restructure so we don't need to,
they're hard to undo. I know we do use it in places sadly even in core]

> > I suspect libuuid should really be maintained/built as a separate
> > software project given the dependency problems but that isn't my
> > decision, we just have to deal with it.
> 
> I agree that it would be better being separate, FWIW.
> 
> > I am also worried this is going to break AUH and mean we have to
> > manually handle this recipe but again, I suspect there is little to be
> > done and we just have to deal with it.
> 
> Could we perhaps fix the AUH to handle this properly? Do we need some kind of 
> mechanism to get it to always upgrade the two recipes together or is that only 
> part of the issue?

I don't know for sure that AUH won't handle it, I just worry about it.
If it doesn't it definitely could be something we could fix there. I
just don't know of anyone with the time to spend on what is a marginal
corner case if it doesn't work.

Cheers,

Richard


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

* Re: [OE-core] [PATCH v4] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-01-19 23:23           ` Richard Purdie
@ 2021-01-19 23:28             ` Paul Eggleton
  2021-02-25 15:31               ` Luca Bocassi
  0 siblings, 1 reply; 74+ messages in thread
From: Paul Eggleton @ 2021-01-19 23:28 UTC (permalink / raw)
  To: openembedded-core, Richard Purdie; +Cc: luca.boccassi

On Wednesday, 20 January 2021 12:23:34 NZDT Richard Purdie wrote:
> On Wed, 2021-01-20 at 12:13 +1300, Paul Eggleton wrote:
> > On Wednesday, 20 January 2021 09:52:41 NZDT Richard Purdie wrote:
> > > I think the one remaining issue here is the need to change the DEPENDS
> > > of so many other recipes, likely not just here in this patch but in
> > > other layers. I think if util-linux DEPENDS on util-linux-uuid that
> > > might remove the need for those changes? That should still allow you to
> > > break the circular dependency problem?
> > 
> > I have to admit to a gap in my own knowledge of how our build system
> > handles transitive dependencies. Of course the recipe sysroot should
> > still get everything it needs in it even if the dependency is only
> > indirectly included, in the back of my mind I have the impression that
> > there are expectations that all dependencies are explicitly called out
> > and there are subtle issues if they aren't, but that could be a mistaken
> > impression on my part.
> 
> I do wonder a little about that as well. As you say, sysroot
> dependencies should handle this. Anything linking against libuuid
> should also establish an package level runtime dependency through the
> linkage so I think this should work.
> 
> We definitely don't explicitly list every dependency in every recipe.
> 
> If this can work, it makes the migration path for people easier so I
> think its at least worth investigating/testing.

OK, sure thing.

> Just while I'm thinking, the PACKAGES_remove also bothers me a little.
> Can we rearrange the variables so libuuid is only added in the libuuid
> recipe variant?
> 
> [the idea being that since we control the metadata in oe-core, we
> shouldn't need to use _remove and can restructure so we don't need to,
> they're hard to undo. I know we do use it in places sadly even in core]

Yes, that is a good point. We should be able to avoid using _remove and I 
don't like using it either given how heavy a hammer it is.

> > I agree that it would be better being separate, FWIW.
> > 
> > > I am also worried this is going to break AUH and mean we have to
> > > manually handle this recipe but again, I suspect there is little to be
> > > done and we just have to deal with it.
> > 
> > Could we perhaps fix the AUH to handle this properly? Do we need some kind
> > of mechanism to get it to always upgrade the two recipes together or is
> > that only part of the issue?
> 
> I don't know for sure that AUH won't handle it, I just worry about it.
> If it doesn't it definitely could be something we could fix there. I
> just don't know of anyone with the time to spend on what is a marginal
> corner case if it doesn't work.

Well, on the other hand if we're "causing" a problem with the AUH with this 
change it does behoove us to try to resolve that. It is something I'd be 
prepared to look into at least.

Cheers
Paul




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

* [PATCH v5] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-10 18:46     ` [PATCH v4] " Luca Bocassi
  2021-01-19 20:52       ` Richard Purdie
@ 2021-02-25 15:30       ` Luca Bocassi
  2021-02-26 19:02         ` [OE-core] " Khem Raj
                           ` (2 more replies)
  2021-03-04 12:27       ` [PATCH v6] " Luca Bocassi
                         ` (5 subsequent siblings)
  7 siblings, 3 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-02-25 15:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: richard.purdie, bluelightning

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

Recently 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.

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
v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
    Removed PACKAGES_remove and instead filter out libuuid via the package generation
    regex.
    Rebased on util-linux 2.36.2.

 .../util-linux/util-linux-uuid_2.36.2.bb      | 22 ++++++++
 meta/recipes-core/util-linux/util-linux.inc   | 41 ++++++++++++++
 .../util-linux/util-linux_2.36.2.bb           | 53 +++++--------------
 3 files changed, 75 insertions(+), 41 deletions(-)
 create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
 create mode 100644 meta/recipes-core/util-linux/util-linux.inc

diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
new file mode 100644
index 0000000000..ffb2c87270
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.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..b4f817ed82
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -0,0 +1,41 @@
+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 \
+"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:"
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+BPN = "util-linux"
+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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
diff --git a/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
index 19950a2726..d4406695f6 100644
--- a/meta/recipes-core/util-linux/util-linux_2.36.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
@@ -1,46 +1,8 @@
-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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
+DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid"
 
 PACKAGES =+ "${PN}-swaponoff"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}"
@@ -87,8 +49,9 @@ python util_linux_binpackages () {
 # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS
 PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages "
 
+# skip libuuid as it will be packaged by the util-linux-uuid recipe
 python util_linux_libpackages() {
-    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$',
+    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(?!uuid)(.*)\.so\..*$',
                       output_pattern='${PN}-lib%s',
                       description='${PN} lib%s',
                       extra_depends='', prepend=True, allow_links=True)
@@ -141,6 +104,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}'"
 
@@ -165,6 +129,8 @@ RRECOMMENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
 
+RDEPENDS_${PN}_append += " util-linux-uuid"
+
 RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
 
 RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
@@ -316,6 +282,11 @@ 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*
+}
 
 BBCLASSEXTEND = "native nativesdk"
 
-- 
2.29.2


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

* Re: [OE-core] [PATCH v4] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-01-19 23:28             ` Paul Eggleton
@ 2021-02-25 15:31               ` Luca Bocassi
  0 siblings, 0 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-02-25 15:31 UTC (permalink / raw)
  To: Paul Eggleton, openembedded-core, Richard Purdie

[-- Attachment #1: Type: text/plain, Size: 3284 bytes --]

On Wed, 2021-01-20 at 12:28 +1300, Paul Eggleton wrote:
> On Wednesday, 20 January 2021 12:23:34 NZDT Richard Purdie wrote:
> > On Wed, 2021-01-20 at 12:13 +1300, Paul Eggleton wrote:
> > > On Wednesday, 20 January 2021 09:52:41 NZDT Richard Purdie wrote:
> > > > I think the one remaining issue here is the need to change the DEPENDS
> > > > of so many other recipes, likely not just here in this patch but in
> > > > other layers. I think if util-linux DEPENDS on util-linux-uuid that
> > > > might remove the need for those changes? That should still allow you to
> > > > break the circular dependency problem?
> > > 
> > > I have to admit to a gap in my own knowledge of how our build system
> > > handles transitive dependencies. Of course the recipe sysroot should
> > > still get everything it needs in it even if the dependency is only
> > > indirectly included, in the back of my mind I have the impression that
> > > there are expectations that all dependencies are explicitly called out
> > > and there are subtle issues if they aren't, but that could be a mistaken
> > > impression on my part.
> > 
> > I do wonder a little about that as well. As you say, sysroot
> > dependencies should handle this. Anything linking against libuuid
> > should also establish an package level runtime dependency through the
> > linkage so I think this should work.
> > 
> > We definitely don't explicitly list every dependency in every recipe.
> > 
> > If this can work, it makes the migration path for people easier so I
> > think its at least worth investigating/testing.
> 
> OK, sure thing.
> 
> > Just while I'm thinking, the PACKAGES_remove also bothers me a little.
> > Can we rearrange the variables so libuuid is only added in the libuuid
> > recipe variant?
> > 
> > [the idea being that since we control the metadata in oe-core, we
> > shouldn't need to use _remove and can restructure so we don't need to,
> > they're hard to undo. I know we do use it in places sadly even in core]
> 
> Yes, that is a good point. We should be able to avoid using _remove and I 
> don't like using it either given how heavy a hammer it is.
> 
> > > I agree that it would be better being separate, FWIW.
> > > 
> > > > I am also worried this is going to break AUH and mean we have to
> > > > manually handle this recipe but again, I suspect there is little to be
> > > > done and we just have to deal with it.
> > > 
> > > Could we perhaps fix the AUH to handle this properly? Do we need some kind
> > > of mechanism to get it to always upgrade the two recipes together or is
> > > that only part of the issue?
> > 
> > I don't know for sure that AUH won't handle it, I just worry about it.
> > If it doesn't it definitely could be something we could fix there. I
> > just don't know of anyone with the time to spend on what is a marginal
> > corner case if it doesn't work.
> 
> Well, on the other hand if we're "causing" a problem with the AUH with this 
> change it does behoove us to try to resolve that. It is something I'd be 
> prepared to look into at least.
> 
> Cheers
> Paul

Thank you both for the reviews and suggestions, sorry it took a while
to get back to this. Just sent v5.

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* Re: [OE-core] [PATCH v5] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-02-25 15:30       ` [PATCH v5] " Luca Bocassi
@ 2021-02-26 19:02         ` Khem Raj
  2021-03-02 19:01           ` Luca Bocassi
  2021-02-27 14:52         ` Alexandre Belloni
  2021-03-03 22:30         ` Richard Purdie
  2 siblings, 1 reply; 74+ messages in thread
From: Khem Raj @ 2021-02-26 19:02 UTC (permalink / raw)
  To: Luca Bocassi
  Cc: Patches and discussions about the oe-core layer, Richard Purdie,
	Paul Eggleton

seeing dependency loops
http://sprunge.us/E5c3NC

On Thu, Feb 25, 2021 at 7:30 AM Luca Bocassi <luca.boccassi@gmail.com> wrote:
>
> From: Luca Boccassi <luca.boccassi@microsoft.com>
>
> Recently 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.
>
> 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
> v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
> v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
>     Removed PACKAGES_remove and instead filter out libuuid via the package generation
>     regex.
>     Rebased on util-linux 2.36.2.
>
>  .../util-linux/util-linux-uuid_2.36.2.bb      | 22 ++++++++
>  meta/recipes-core/util-linux/util-linux.inc   | 41 ++++++++++++++
>  .../util-linux/util-linux_2.36.2.bb           | 53 +++++--------------
>  3 files changed, 75 insertions(+), 41 deletions(-)
>  create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
>  create mode 100644 meta/recipes-core/util-linux/util-linux.inc
>
> diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
> new file mode 100644
> index 0000000000..ffb2c87270
> --- /dev/null
> +++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.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..b4f817ed82
> --- /dev/null
> +++ b/meta/recipes-core/util-linux/util-linux.inc
> @@ -0,0 +1,41 @@
> +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 \
> +"
> +
> +FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:"
> +MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
> +BPN = "util-linux"
> +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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
> diff --git a/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
> index 19950a2726..d4406695f6 100644
> --- a/meta/recipes-core/util-linux/util-linux_2.36.2.bb
> +++ b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
> @@ -1,46 +1,8 @@
> -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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
> +DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid"
>
>  PACKAGES =+ "${PN}-swaponoff"
>  PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}"
> @@ -87,8 +49,9 @@ python util_linux_binpackages () {
>  # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS
>  PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages "
>
> +# skip libuuid as it will be packaged by the util-linux-uuid recipe
>  python util_linux_libpackages() {
> -    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$',
> +    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(?!uuid)(.*)\.so\..*$',
>                        output_pattern='${PN}-lib%s',
>                        description='${PN} lib%s',
>                        extra_depends='', prepend=True, allow_links=True)
> @@ -141,6 +104,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}'"
>
> @@ -165,6 +129,8 @@ RRECOMMENDS_${PN}_class-nativesdk = ""
>  RDEPENDS_${PN}_class-native = ""
>  RDEPENDS_${PN}_class-nativesdk = ""
>
> +RDEPENDS_${PN}_append += " util-linux-uuid"
> +
>  RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
>
>  RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
> @@ -316,6 +282,11 @@ 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*
> +}
>
>  BBCLASSEXTEND = "native nativesdk"
>
> --
> 2.29.2
>
>
> 
>

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

* Re: [OE-core] [PATCH v5] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-02-25 15:30       ` [PATCH v5] " Luca Bocassi
  2021-02-26 19:02         ` [OE-core] " Khem Raj
@ 2021-02-27 14:52         ` Alexandre Belloni
  2021-02-27 15:08           ` Alexandre Belloni
  2021-03-03 22:30         ` Richard Purdie
  2 siblings, 1 reply; 74+ messages in thread
From: Alexandre Belloni @ 2021-02-27 14:52 UTC (permalink / raw)
  To: Luca Bocassi; +Cc: openembedded-core, richard.purdie, bluelightning

Hello,

On 25/02/2021 15:30:35+0000, Luca Bocassi wrote:
> From: Luca Boccassi <luca.boccassi@microsoft.com>
> 
> Recently 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.
> 
> 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
> v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
> v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
>     Removed PACKAGES_remove and instead filter out libuuid via the package generation
>     regex.
>     Rebased on util-linux 2.36.2.
> 
>  .../util-linux/util-linux-uuid_2.36.2.bb      | 22 ++++++++
>  meta/recipes-core/util-linux/util-linux.inc   | 41 ++++++++++++++
>  .../util-linux/util-linux_2.36.2.bb           | 53 +++++--------------
>  3 files changed, 75 insertions(+), 41 deletions(-)
>  create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
>  create mode 100644 meta/recipes-core/util-linux/util-linux.inc
> 

With this patch, there is a very weird failure on the autobuilders, two
a-full builds failed with this:

ERROR: musl-1.2.2+gitAUTOINC+e5d2823631-r0 do_package: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:extend_recipe_sysroot(d)
     0003:
File: '/home/pokybuild/yocto-worker/poky-tiny/build/meta/classes/staging.bbclass', lineno: 582, function: extend_recipe_sysroot
     0578:                    if "/bin/" in l or "/sbin/" in l:
     0579:                        # defer /*bin/* files until last in case they need libs
     0580:                        binfiles[l] = (targetdir, dest)
     0581:                    else:
 *** 0582:                        staging_copyfile(l, targetdir, dest, postinsts, seendirs)
     0583:
     0584:    # Handle deferred binfiles
     0585:    for l in binfiles:
     0586:        (targetdir, dest) = binfiles[l]
File: '/home/pokybuild/yocto-worker/poky-tiny/build/meta/classes/staging.bbclass', lineno: 157, function: staging_copyfile
     0153:        os.symlink(linkto, dest)
     0154:        #bb.warn(c)
     0155:    else:
     0156:        try:
 *** 0157:            os.link(c, dest)
     0158:        except OSError as err:
     0159:            if err.errno == errno.EXDEV:
     0160:                bb.utils.copyfile(c, dest)
     0161:            else:
Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/sysroots-components/core2-32/libgcc/usr/lib/i686-poky-linux-musl/10.2.0/libgcc_eh.a' -> '/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/core2-32-poky-linux-musl/musl/1.2.2+gitAUTOINC+e5d2823631-r0/recipe-sysroot/usr/lib/i686-poky-linux-musl/10.2.0/libgcc_eh.a'
ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/core2-32-poky-linux-musl/musl/1.2.2+gitAUTOINC+e5d2823631-r0/temp/log.do_package.4051328
NOTE: recipe musl-1.2.2+gitAUTOINC+e5d2823631-r0: task do_package: Failed
ERROR: Task (/home/pokybuild/yocto-worker/poky-tiny/build/meta/recipes-core/musl/musl_git.bb:do_package) failed with exit code '1'

This also happens with glibc-2.33-r0:


ERROR: glibc-2.33-r0 do_package: Error executing a python function in exec_python_func() autogenerated:
[...]
Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-worker/edgerouter/build/build/tmp/sysroots-components/mips64/libgcc/usr/lib/mips64-poky-linux/10.2.0/libgcc.a' -> '/home/pokybuild/yocto-worker/edgerouter/build/build/tmp/work/mips64-poky-linux/glibc/2.33-r0/recipe-sysroot/usr/lib/mips64-poky-linux/10.2.0/libgcc.a'
ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/edgerouter/build/build/tmp/work/mips64-poky-linux/glibc/2.33-r0/temp/log.do_package.29993
NOTE: recipe glibc-2.33-r0: task do_package: Failed
ERROR: Task (/home/pokybuild/yocto-worker/edgerouter/build/meta/recipes-core/glibc/glibc_2.33.bb:do_package) failed with exit code '1'

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [OE-core] [PATCH v5] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-02-27 14:52         ` Alexandre Belloni
@ 2021-02-27 15:08           ` Alexandre Belloni
  2021-02-27 15:15             ` Alexandre Belloni
  0 siblings, 1 reply; 74+ messages in thread
From: Alexandre Belloni @ 2021-02-27 15:08 UTC (permalink / raw)
  To: Luca Bocassi; +Cc: openembedded-core, richard.purdie, bluelightning

On 27/02/2021 15:52:25+0100, Alexandre Belloni wrote:
> Hello,
> 
> On 25/02/2021 15:30:35+0000, Luca Bocassi wrote:
> > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > 
> > Recently 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.
> > 
> > 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
> > v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
> > v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
> >     Removed PACKAGES_remove and instead filter out libuuid via the package generation
> >     regex.
> >     Rebased on util-linux 2.36.2.
> > 
> >  .../util-linux/util-linux-uuid_2.36.2.bb      | 22 ++++++++
> >  meta/recipes-core/util-linux/util-linux.inc   | 41 ++++++++++++++
> >  .../util-linux/util-linux_2.36.2.bb           | 53 +++++--------------
> >  3 files changed, 75 insertions(+), 41 deletions(-)
> >  create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
> >  create mode 100644 meta/recipes-core/util-linux/util-linux.inc
> > 
> 
> With this patch, there is a very weird failure on the autobuilders, two
> a-full builds failed with this:
> 
> ERROR: musl-1.2.2+gitAUTOINC+e5d2823631-r0 do_package: Error executing a python function in exec_python_func() autogenerated:
> The stack trace of python calls that resulted in this exception/failure was:
> File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
>      0001:
>  *** 0002:extend_recipe_sysroot(d)
>      0003:
> File: '/home/pokybuild/yocto-worker/poky-tiny/build/meta/classes/staging.bbclass', lineno: 582, function: extend_recipe_sysroot
>      0578:                    if "/bin/" in l or "/sbin/" in l:
>      0579:                        # defer /*bin/* files until last in case they need libs
>      0580:                        binfiles[l] = (targetdir, dest)
>      0581:                    else:
>  *** 0582:                        staging_copyfile(l, targetdir, dest, postinsts, seendirs)
>      0583:
>      0584:    # Handle deferred binfiles
>      0585:    for l in binfiles:
>      0586:        (targetdir, dest) = binfiles[l]
> File: '/home/pokybuild/yocto-worker/poky-tiny/build/meta/classes/staging.bbclass', lineno: 157, function: staging_copyfile
>      0153:        os.symlink(linkto, dest)
>      0154:        #bb.warn(c)
>      0155:    else:
>      0156:        try:
>  *** 0157:            os.link(c, dest)
>      0158:        except OSError as err:
>      0159:            if err.errno == errno.EXDEV:
>      0160:                bb.utils.copyfile(c, dest)
>      0161:            else:
> Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/sysroots-components/core2-32/libgcc/usr/lib/i686-poky-linux-musl/10.2.0/libgcc_eh.a' -> '/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/core2-32-poky-linux-musl/musl/1.2.2+gitAUTOINC+e5d2823631-r0/recipe-sysroot/usr/lib/i686-poky-linux-musl/10.2.0/libgcc_eh.a'
> ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/core2-32-poky-linux-musl/musl/1.2.2+gitAUTOINC+e5d2823631-r0/temp/log.do_package.4051328
> NOTE: recipe musl-1.2.2+gitAUTOINC+e5d2823631-r0: task do_package: Failed
> ERROR: Task (/home/pokybuild/yocto-worker/poky-tiny/build/meta/recipes-core/musl/musl_git.bb:do_package) failed with exit code '1'
> 
> This also happens with glibc-2.33-r0:
> 
> 
> ERROR: glibc-2.33-r0 do_package: Error executing a python function in exec_python_func() autogenerated:
> [...]
> Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-worker/edgerouter/build/build/tmp/sysroots-components/mips64/libgcc/usr/lib/mips64-poky-linux/10.2.0/libgcc.a' -> '/home/pokybuild/yocto-worker/edgerouter/build/build/tmp/work/mips64-poky-linux/glibc/2.33-r0/recipe-sysroot/usr/lib/mips64-poky-linux/10.2.0/libgcc.a'
> ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/edgerouter/build/build/tmp/work/mips64-poky-linux/glibc/2.33-r0/temp/log.do_package.29993
> NOTE: recipe glibc-2.33-r0: task do_package: Failed
> ERROR: Task (/home/pokybuild/yocto-worker/edgerouter/build/meta/recipes-core/glibc/glibc_2.33.bb:do_package) failed with exit code '1'
> 

Not sure this helps but we also get:

WARNING: nativesdk-util-linux-2.36.2-r0 do_package_qa: QA Issue: nativesdk-util-linux rdepends on nativesdk-util-linux-uuid, but it isn't a build dependency? [build-deps]


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [OE-core] [PATCH v5] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-02-27 15:08           ` Alexandre Belloni
@ 2021-02-27 15:15             ` Alexandre Belloni
  2021-03-02 17:31               ` Luca Bocassi
  0 siblings, 1 reply; 74+ messages in thread
From: Alexandre Belloni @ 2021-02-27 15:15 UTC (permalink / raw)
  To: Luca Bocassi; +Cc: openembedded-core, richard.purdie, bluelightning

On 27/02/2021 16:08:02+0100, Alexandre Belloni wrote:
> On 27/02/2021 15:52:25+0100, Alexandre Belloni wrote:
> > Hello,
> > 
> > On 25/02/2021 15:30:35+0000, Luca Bocassi wrote:
> > > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > > 
> > > Recently 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.
> > > 
> > > 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
> > > v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
> > > v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
> > >     Removed PACKAGES_remove and instead filter out libuuid via the package generation
> > >     regex.
> > >     Rebased on util-linux 2.36.2.
> > > 
> > >  .../util-linux/util-linux-uuid_2.36.2.bb      | 22 ++++++++
> > >  meta/recipes-core/util-linux/util-linux.inc   | 41 ++++++++++++++
> > >  .../util-linux/util-linux_2.36.2.bb           | 53 +++++--------------
> > >  3 files changed, 75 insertions(+), 41 deletions(-)
> > >  create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
> > >  create mode 100644 meta/recipes-core/util-linux/util-linux.inc
> > > 
> > 
> > With this patch, there is a very weird failure on the autobuilders, two
> > a-full builds failed with this:
> > 
> > ERROR: musl-1.2.2+gitAUTOINC+e5d2823631-r0 do_package: Error executing a python function in exec_python_func() autogenerated:
> > The stack trace of python calls that resulted in this exception/failure was:
> > File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
> >      0001:
> >  *** 0002:extend_recipe_sysroot(d)
> >      0003:
> > File: '/home/pokybuild/yocto-worker/poky-tiny/build/meta/classes/staging.bbclass', lineno: 582, function: extend_recipe_sysroot
> >      0578:                    if "/bin/" in l or "/sbin/" in l:
> >      0579:                        # defer /*bin/* files until last in case they need libs
> >      0580:                        binfiles[l] = (targetdir, dest)
> >      0581:                    else:
> >  *** 0582:                        staging_copyfile(l, targetdir, dest, postinsts, seendirs)
> >      0583:
> >      0584:    # Handle deferred binfiles
> >      0585:    for l in binfiles:
> >      0586:        (targetdir, dest) = binfiles[l]
> > File: '/home/pokybuild/yocto-worker/poky-tiny/build/meta/classes/staging.bbclass', lineno: 157, function: staging_copyfile
> >      0153:        os.symlink(linkto, dest)
> >      0154:        #bb.warn(c)
> >      0155:    else:
> >      0156:        try:
> >  *** 0157:            os.link(c, dest)
> >      0158:        except OSError as err:
> >      0159:            if err.errno == errno.EXDEV:
> >      0160:                bb.utils.copyfile(c, dest)
> >      0161:            else:
> > Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/sysroots-components/core2-32/libgcc/usr/lib/i686-poky-linux-musl/10.2.0/libgcc_eh.a' -> '/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/core2-32-poky-linux-musl/musl/1.2.2+gitAUTOINC+e5d2823631-r0/recipe-sysroot/usr/lib/i686-poky-linux-musl/10.2.0/libgcc_eh.a'
> > ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/core2-32-poky-linux-musl/musl/1.2.2+gitAUTOINC+e5d2823631-r0/temp/log.do_package.4051328
> > NOTE: recipe musl-1.2.2+gitAUTOINC+e5d2823631-r0: task do_package: Failed
> > ERROR: Task (/home/pokybuild/yocto-worker/poky-tiny/build/meta/recipes-core/musl/musl_git.bb:do_package) failed with exit code '1'
> > 
> > This also happens with glibc-2.33-r0:
> > 
> > 
> > ERROR: glibc-2.33-r0 do_package: Error executing a python function in exec_python_func() autogenerated:
> > [...]
> > Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-worker/edgerouter/build/build/tmp/sysroots-components/mips64/libgcc/usr/lib/mips64-poky-linux/10.2.0/libgcc.a' -> '/home/pokybuild/yocto-worker/edgerouter/build/build/tmp/work/mips64-poky-linux/glibc/2.33-r0/recipe-sysroot/usr/lib/mips64-poky-linux/10.2.0/libgcc.a'
> > ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/edgerouter/build/build/tmp/work/mips64-poky-linux/glibc/2.33-r0/temp/log.do_package.29993
> > NOTE: recipe glibc-2.33-r0: task do_package: Failed
> > ERROR: Task (/home/pokybuild/yocto-worker/edgerouter/build/meta/recipes-core/glibc/glibc_2.33.bb:do_package) failed with exit code '1'
> > 
> 
> Not sure this helps but we also get:
> 
> WARNING: nativesdk-util-linux-2.36.2-r0 do_package_qa: QA Issue: nativesdk-util-linux rdepends on nativesdk-util-linux-uuid, but it isn't a build dependency? [build-deps]
> 
> 

and I'm adding https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/3137/steps/12/logs/stdio :

ERROR: util-linux-uuid-2.36.2-r0 do_package: QA Issue: util-linux-uuid: Files/directories were installed but not shipped in any package:
  /usr/lib/libuuid.a
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [OE-core] [PATCH v5] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-02-27 15:15             ` Alexandre Belloni
@ 2021-03-02 17:31               ` Luca Bocassi
  2021-03-02 18:49                 ` Alexandre Belloni
  0 siblings, 1 reply; 74+ messages in thread
From: Luca Bocassi @ 2021-03-02 17:31 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: openembedded-core, richard.purdie, bluelightning

[-- Attachment #1: Type: text/plain, Size: 7081 bytes --]

On Sat, 2021-02-27 at 16:15 +0100, Alexandre Belloni wrote:
> On 27/02/2021 16:08:02+0100, Alexandre Belloni wrote:
> > On 27/02/2021 15:52:25+0100, Alexandre Belloni wrote:
> > > Hello,
> > > 
> > > On 25/02/2021 15:30:35+0000, Luca Bocassi wrote:
> > > > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > 
> > > > Recently 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.
> > > > 
> > > > 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
> > > > v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
> > > > v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
> > > >     Removed PACKAGES_remove and instead filter out libuuid via the package generation
> > > >     regex.
> > > >     Rebased on util-linux 2.36.2.
> > > > 
> > > >  .../util-linux/util-linux-uuid_2.36.2.bb      | 22 ++++++++
> > > >  meta/recipes-core/util-linux/util-linux.inc   | 41 ++++++++++++++
> > > >  .../util-linux/util-linux_2.36.2.bb           | 53 +++++--------------
> > > >  3 files changed, 75 insertions(+), 41 deletions(-)
> > > >  create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
> > > >  create mode 100644 meta/recipes-core/util-linux/util-linux.inc
> > > > 
> > > 
> > > With this patch, there is a very weird failure on the autobuilders, two
> > > a-full builds failed with this:
> > > 
> > > ERROR: musl-1.2.2+gitAUTOINC+e5d2823631-r0 do_package: Error executing a python function in exec_python_func() autogenerated:
> > > The stack trace of python calls that resulted in this exception/failure was:
> > > File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
> > >      0001:
> > >  *** 0002:extend_recipe_sysroot(d)
> > >      0003:
> > > File: '/home/pokybuild/yocto-worker/poky-tiny/build/meta/classes/staging.bbclass', lineno: 582, function: extend_recipe_sysroot
> > >      0578:                    if "/bin/" in l or "/sbin/" in l:
> > >      0579:                        # defer /*bin/* files until last in case they need libs
> > >      0580:                        binfiles[l] = (targetdir, dest)
> > >      0581:                    else:
> > >  *** 0582:                        staging_copyfile(l, targetdir, dest, postinsts, seendirs)
> > >      0583:
> > >      0584:    # Handle deferred binfiles
> > >      0585:    for l in binfiles:
> > >      0586:        (targetdir, dest) = binfiles[l]
> > > File: '/home/pokybuild/yocto-worker/poky-tiny/build/meta/classes/staging.bbclass', lineno: 157, function: staging_copyfile
> > >      0153:        os.symlink(linkto, dest)
> > >      0154:        #bb.warn(c)
> > >      0155:    else:
> > >      0156:        try:
> > >  *** 0157:            os.link(c, dest)
> > >      0158:        except OSError as err:
> > >      0159:            if err.errno == errno.EXDEV:
> > >      0160:                bb.utils.copyfile(c, dest)
> > >      0161:            else:
> > > Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/sysroots-components/core2-32/libgcc/usr/lib/i686-poky-linux-musl/10.2.0/libgcc_eh.a' -> '/home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/core2-32-poky-linux-musl/musl/1.2.2+gitAUTOINC+e5d2823631-r0/recipe-sysroot/usr/lib/i686-poky-linux-musl/10.2.0/libgcc_eh.a'
> > > ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/poky-tiny/build/build/tmp/work/core2-32-poky-linux-musl/musl/1.2.2+gitAUTOINC+e5d2823631-r0/temp/log.do_package.4051328
> > > NOTE: recipe musl-1.2.2+gitAUTOINC+e5d2823631-r0: task do_package: Failed
> > > ERROR: Task (/home/pokybuild/yocto-worker/poky-tiny/build/meta/recipes-core/musl/musl_git.bb:do_package) failed with exit code '1'
> > > 
> > > This also happens with glibc-2.33-r0:
> > > 
> > > 
> > > ERROR: glibc-2.33-r0 do_package: Error executing a python function in exec_python_func() autogenerated:
> > > [...]
> > > Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-worker/edgerouter/build/build/tmp/sysroots-components/mips64/libgcc/usr/lib/mips64-poky-linux/10.2.0/libgcc.a' -> '/home/pokybuild/yocto-worker/edgerouter/build/build/tmp/work/mips64-poky-linux/glibc/2.33-r0/recipe-sysroot/usr/lib/mips64-poky-linux/10.2.0/libgcc.a'
> > > ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/edgerouter/build/build/tmp/work/mips64-poky-linux/glibc/2.33-r0/temp/log.do_package.29993
> > > NOTE: recipe glibc-2.33-r0: task do_package: Failed
> > > ERROR: Task (/home/pokybuild/yocto-worker/edgerouter/build/meta/recipes-core/glibc/glibc_2.33.bb:do_package) failed with exit code '1'
> > > 

I see those kind of errors without this patch all the time, when a
build directory is hosed, and normally it means it's time for a rm -rf
and start over. It happens quite often when building in the same
directory multiple times. Are you sure it's related to this particular
patch?

> > Not sure this helps but we also get:
> > 
> > WARNING: nativesdk-util-linux-2.36.2-r0 do_package_qa: QA Issue: nativesdk-util-linux rdepends on nativesdk-util-linux-uuid, but it isn't a build dependency? [build-deps]

Uhm I don't understand this warning, it _is_ a build dependency? Any
idea?

-DEPENDS = "libcap-ng ncurses virtual/crypt zlib"
+DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid"

> and I'm adding https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/3137/steps/12/logs/stdio :
> 
> ERROR: util-linux-uuid-2.36.2-r0 do_package: QA Issue: util-linux-uuid: Files/directories were installed but not shipped in any package:
>   /usr/lib/libuuid.a
> Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.

Whops, indeed I forgot the static archive, fixed now.

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* Re: [OE-core] [PATCH v5] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-02 17:31               ` Luca Bocassi
@ 2021-03-02 18:49                 ` Alexandre Belloni
  0 siblings, 0 replies; 74+ messages in thread
From: Alexandre Belloni @ 2021-03-02 18:49 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: openembedded-core, richard.purdie, bluelightning

Hi,

On 02/03/2021 17:31:06+0000, Luca Boccassi wrote:
> > > > ERROR: glibc-2.33-r0 do_package: Error executing a python function in exec_python_func() autogenerated:
> > > > [...]
> > > > Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-worker/edgerouter/build/build/tmp/sysroots-components/mips64/libgcc/usr/lib/mips64-poky-linux/10.2.0/libgcc.a' -> '/home/pokybuild/yocto-worker/edgerouter/build/build/tmp/work/mips64-poky-linux/glibc/2.33-r0/recipe-sysroot/usr/lib/mips64-poky-linux/10.2.0/libgcc.a'
> > > > ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/edgerouter/build/build/tmp/work/mips64-poky-linux/glibc/2.33-r0/temp/log.do_package.29993
> > > > NOTE: recipe glibc-2.33-r0: task do_package: Failed
> > > > ERROR: Task (/home/pokybuild/yocto-worker/edgerouter/build/meta/recipes-core/glibc/glibc_2.33.bb:do_package) failed with exit code '1'
> > > > 
> 
> I see those kind of errors without this patch all the time, when a
> build directory is hosed, and normally it means it's time for a rm -rf
> and start over. It happens quite often when building in the same
> directory multiple times. Are you sure it's related to this particular
> patch?
> 

No, not completely sure, however, the issue was gone as soon as the
patch has been removed. Richard may have more insight.

> > > Not sure this helps but we also get:
> > > 
> > > WARNING: nativesdk-util-linux-2.36.2-r0 do_package_qa: QA Issue: nativesdk-util-linux rdepends on nativesdk-util-linux-uuid, but it isn't a build dependency? [build-deps]
> 
> Uhm I don't understand this warning, it _is_ a build dependency? Any
> idea?
> 

This was the failing build if you want to look at the config to try to
reproduce:

https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/3440

> -DEPENDS = "libcap-ng ncurses virtual/crypt zlib"
> +DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid"
> 
> > and I'm adding https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/3137/steps/12/logs/stdio :
> > 
> > ERROR: util-linux-uuid-2.36.2-r0 do_package: QA Issue: util-linux-uuid: Files/directories were installed but not shipped in any package:
> >   /usr/lib/libuuid.a
> > Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
> 
> Whops, indeed I forgot the static archive, fixed now.
> 
> -- 
> Kind regards,
> Luca Boccassi



-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [OE-core] [PATCH v5] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-02-26 19:02         ` [OE-core] " Khem Raj
@ 2021-03-02 19:01           ` Luca Bocassi
  0 siblings, 0 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-03-02 19:01 UTC (permalink / raw)
  To: Khem Raj
  Cc: Patches and discussions about the oe-core layer, Richard Purdie,
	Paul Eggleton

[-- Attachment #1: Type: text/plain, Size: 11867 bytes --]

On Fri, 2021-02-26 at 11:02 -0800, Khem Raj wrote:
> seeing dependency loops
> http://sprunge.us/E5c3NC

Thanks for the heads-up - didn't see when building locally with a
minimal poky, anything in particular needed in the local.conf to
trigger it?

> On Thu, Feb 25, 2021 at 7:30 AM Luca Bocassi <luca.boccassi@gmail.com> wrote:
> > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > 
> > Recently 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.
> > 
> > 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
> > v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
> > v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
> >     Removed PACKAGES_remove and instead filter out libuuid via the package generation
> >     regex.
> >     Rebased on util-linux 2.36.2.
> > 
> >  .../util-linux/util-linux-uuid_2.36.2.bb      | 22 ++++++++
> >  meta/recipes-core/util-linux/util-linux.inc   | 41 ++++++++++++++
> >  .../util-linux/util-linux_2.36.2.bb           | 53 +++++--------------
> >  3 files changed, 75 insertions(+), 41 deletions(-)
> >  create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
> >  create mode 100644 meta/recipes-core/util-linux/util-linux.inc
> > 
> > diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
> > new file mode 100644
> > index 0000000000..ffb2c87270
> > --- /dev/null
> > +++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.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..b4f817ed82
> > --- /dev/null
> > +++ b/meta/recipes-core/util-linux/util-linux.inc
> > @@ -0,0 +1,41 @@
> > +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 \
> > +"
> > +
> > +FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:"
> > +MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
> > +BPN = "util-linux"
> > +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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
> > diff --git a/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
> > index 19950a2726..d4406695f6 100644
> > --- a/meta/recipes-core/util-linux/util-linux_2.36.2.bb
> > +++ b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
> > @@ -1,46 +1,8 @@
> > -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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
> > +DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid"
> > 
> >  PACKAGES =+ "${PN}-swaponoff"
> >  PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}"
> > @@ -87,8 +49,9 @@ python util_linux_binpackages () {
> >  # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS
> >  PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages "
> > 
> > +# skip libuuid as it will be packaged by the util-linux-uuid recipe
> >  python util_linux_libpackages() {
> > -    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$',
> > +    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(?!uuid)(.*)\.so\..*$',
> >                        output_pattern='${PN}-lib%s',
> >                        description='${PN} lib%s',
> >                        extra_depends='', prepend=True, allow_links=True)
> > @@ -141,6 +104,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}'"
> > 
> > @@ -165,6 +129,8 @@ RRECOMMENDS_${PN}_class-nativesdk = ""
> >  RDEPENDS_${PN}_class-native = ""
> >  RDEPENDS_${PN}_class-nativesdk = ""
> > 
> > +RDEPENDS_${PN}_append += " util-linux-uuid"
> > +
> >  RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
> > 
> >  RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
> > @@ -316,6 +282,11 @@ 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*
> > +}
> > 
> >  BBCLASSEXTEND = "native nativesdk"
> > 
> > --
> > 2.29.2
> > 
> > 
> > 
> > 


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* Re: [PATCH v5] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-02-25 15:30       ` [PATCH v5] " Luca Bocassi
  2021-02-26 19:02         ` [OE-core] " Khem Raj
  2021-02-27 14:52         ` Alexandre Belloni
@ 2021-03-03 22:30         ` Richard Purdie
  2021-03-04 12:05           ` Luca Bocassi
  2 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-03-03 22:30 UTC (permalink / raw)
  To: luca.boccassi, openembedded-core; +Cc: bluelightning

On Thu, 2021-02-25 at 15:30 +0000, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <luca.boccassi@microsoft.com>
> 
> diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
> new file mode 100644
> index 0000000000..ffb2c87270
> --- /dev/null
> +++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
> @@ -0,0 +1,22 @@
> 
[...]
> +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"
> +
[...]
> diff --git a/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
> index 19950a2726..d4406695f6 100644
> --- a/meta/recipes-core/util-linux/util-linux_2.36.2.bb
> +++ b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
> @@ -1,46 +1,8 @@
> [...]
> 
> +RDEPENDS_${PN}_append += " util-linux-uuid"
> +

I know this patch has caused a bit of confusion as it blew up in testing. 
I can't explain why you didn't see that but I did spot why its breaking. 
I've cut this email to the bare bones of the problem for clarity.

In util-linux-uuid, you set PACKAGES as above with util-linux-libuuid.

In util-linux, you set it to refer to a util-linux-uuid package which 
does not exist. It needs s/uuid/libuuid/. RDEPENDS refer to PACKAGES 
namespace so need to be consistent.

Why the tools haven't been clearer about the issue, I don't know but
that is no doubt causing many of the issues.

Cheers,

Richard




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

* Re: [PATCH v5] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-03 22:30         ` Richard Purdie
@ 2021-03-04 12:05           ` Luca Bocassi
  0 siblings, 0 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-03-04 12:05 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: bluelightning

[-- Attachment #1: Type: text/plain, Size: 2961 bytes --]

On Wed, 2021-03-03 at 22:30 +0000, Richard Purdie wrote:
> On Thu, 2021-02-25 at 15:30 +0000, luca.boccassi@gmail.com wrote:
> > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > 
> > diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
> > new file mode 100644
> > index 0000000000..ffb2c87270
> > --- /dev/null
> > +++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
> > @@ -0,0 +1,22 @@
> > 
> [...]
> > +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"
> > +
> [...]
> > diff --git a/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
> > index 19950a2726..d4406695f6 100644
> > --- a/meta/recipes-core/util-linux/util-linux_2.36.2.bb
> > +++ b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
> > @@ -1,46 +1,8 @@
> > [...]
> > 
> > +RDEPENDS_${PN}_append += " util-linux-uuid"
> > +
> 
> I know this patch has caused a bit of confusion as it blew up in testing. 
> I can't explain why you didn't see that but I did spot why its breaking. 
> I've cut this email to the bare bones of the problem for clarity.
> 
> In util-linux-uuid, you set PACKAGES as above with util-linux-libuuid.
> 
> In util-linux, you set it to refer to a util-linux-uuid package which 
> does not exist. It needs s/uuid/libuuid/. RDEPENDS refer to PACKAGES 
> namespace so need to be consistent.
> 
> Why the tools haven't been clearer about the issue, I don't know but
> that is no doubt causing many of the issues.
> 
> Cheers,
> 
> Richard

Thanks for the suggestion, I had completely missed it - I get confused
all the time w.r.t. using the source package name or the binary package
names in the various fields.

I'll shortly send v6 with the following changes:

- install .a in libuuid-dev
- change rdepends on uuid /uuid/libuuid/
- add rdepends on uuid-dev to libuuid-dev
- remove rprovides of libuuid-dev from uuid-dev

The local.conf I am using to test this adds the following lines on top
of the default that's auto-generated:

PACKAGECONFIG_append_pn-util-linux += " cryptsetup"
PACKAGECONFIG_remove_pn-cryptsetup += " blkid"
PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"

Not sure why the issue wasn't seen, I suspect there's some additional
packages that need to be included for it to manifest, although I'm not
sure which.

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* [PATCH v6] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-10 18:46     ` [PATCH v4] " Luca Bocassi
  2021-01-19 20:52       ` Richard Purdie
  2021-02-25 15:30       ` [PATCH v5] " Luca Bocassi
@ 2021-03-04 12:27       ` Luca Bocassi
  2021-03-05  0:13         ` Richard Purdie
  2021-03-05 11:02       ` [PATCH v7] " Luca Bocassi
                         ` (4 subsequent siblings)
  7 siblings, 1 reply; 74+ messages in thread
From: Luca Bocassi @ 2021-03-04 12:27 UTC (permalink / raw)
  To: openembedded-core; +Cc: richard.purdie, bluelightning

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

Recently 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.

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
v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
    Removed PACKAGES_remove and instead filter out libuuid via the package generation
    regex.
    Rebased on util-linux 2.36.2.
v6: install libuuid.a in libuuid-dev
    change rdepends on uuid to use binary package rather than source
    add rdepends on uuid-dev to libuuid-dev
    remove rprovides of libuuid-dev from uuid-dev

 .../util-linux/util-linux-uuid_2.36.2.bb      | 22 ++++++++
 meta/recipes-core/util-linux/util-linux.inc   | 41 ++++++++++++++
 .../util-linux/util-linux_2.36.2.bb           | 56 +++++--------------
 3 files changed, 77 insertions(+), 42 deletions(-)
 create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
 create mode 100644 meta/recipes-core/util-linux/util-linux.inc

diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
new file mode 100644
index 0000000000..febbeeb405
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.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.a ${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..b4f817ed82
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -0,0 +1,41 @@
+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 \
+"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:"
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+BPN = "util-linux"
+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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
diff --git a/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
index 19950a2726..a06bf11b4f 100644
--- a/meta/recipes-core/util-linux/util-linux_2.36.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
@@ -1,46 +1,8 @@
-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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
+DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid"
 
 PACKAGES =+ "${PN}-swaponoff"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}"
@@ -87,8 +49,9 @@ python util_linux_binpackages () {
 # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS
 PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages "
 
+# skip libuuid as it will be packaged by the util-linux-uuid recipe
 python util_linux_libpackages() {
-    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$',
+    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(?!uuid)(.*)\.so\..*$',
                       output_pattern='${PN}-lib%s',
                       description='${PN} lib%s',
                       extra_depends='', prepend=True, allow_links=True)
@@ -141,6 +104,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}'"
 
@@ -165,7 +129,10 @@ RRECOMMENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
 
-RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
+RDEPENDS_${PN}_append += " util-linux-libuuid"
+RDEPENDS_${PN}-dev_append += " util-linux-libuuid-dev"
+
+RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev"
 
 RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
 RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz"
@@ -316,6 +283,11 @@ 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*
+}
 
 BBCLASSEXTEND = "native nativesdk"
 
-- 
2.29.2


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

* Re: [PATCH v6] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-04 12:27       ` [PATCH v6] " Luca Bocassi
@ 2021-03-05  0:13         ` Richard Purdie
  2021-03-05 11:03           ` Luca Bocassi
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-03-05  0:13 UTC (permalink / raw)
  To: luca.boccassi, openembedded-core; +Cc: bluelightning

On Thu, 2021-03-04 at 12:27 +0000, luca.boccassi@gmail.com wrote:
> 
> -RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
> +RDEPENDS_${PN}_append += " util-linux-libuuid"
> +RDEPENDS_${PN}-dev_append += " util-linux-libuuid-dev"

The mysterious libgcov.a issues which appeared in builds when this patch
was added are due to the lines above. Changing them to:

RDEPENDS_${PN} += " util-linux-libuuid"
RDEPENDS_${PN}-dev += " util-linux-libuuid-dev"

resolves the issue. To illustrate, have a look at "bitbake glibc -g" in
the task-depends.dot file before and after that change.

The problem is the native BBCLASSEXTEND code can't handle the
RDEPENDS_${PN}_append correctly and it means in the native case it
adds a dependency on util-linux-libuuid rather than a native
version.

Why does that cause the gcov error? Its because there are early toolchain
util-linux-native dependencies which ends up meaning glibc sees a libgcc 
dependency. It usually uses libgcc-initial and that has overlapping files
with libgcc and libgcov.a is the first in the sorted list.

Again, we should have better errors for a native recipe depending upon
a target one and show better errors for this configuration issue. It 
does at least explain the seemingly strange errors.

Cheers,

Richard



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

* [PATCH v7] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-10 18:46     ` [PATCH v4] " Luca Bocassi
                         ` (2 preceding siblings ...)
  2021-03-04 12:27       ` [PATCH v6] " Luca Bocassi
@ 2021-03-05 11:02       ` Luca Bocassi
  2021-03-08 19:29         ` Richard Purdie
  2021-03-09 11:13       ` [PATCH v8] " Luca Bocassi
                         ` (3 subsequent siblings)
  7 siblings, 1 reply; 74+ messages in thread
From: Luca Bocassi @ 2021-03-05 11:02 UTC (permalink / raw)
  To: openembedded-core; +Cc: richard.purdie, bluelightning

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

Recently 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.

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
v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
    Removed PACKAGES_remove and instead filter out libuuid via the package generation
    regex.
    Rebased on util-linux 2.36.2.
v6: install libuuid.a in libuuid-dev
    change rdepends on uuid to use binary package rather than source
    add rdepends on uuid-dev to libuuid-dev
    remove rprovides of libuuid-dev from uuid-dev
v7: do not use '_append' for RDEPENDS, as it is not supported by BBCLASSEXTEND, use
    simply '+='

 .../util-linux/util-linux-uuid_2.36.2.bb      | 22 ++++++++
 meta/recipes-core/util-linux/util-linux.inc   | 41 ++++++++++++++
 .../util-linux/util-linux_2.36.2.bb           | 56 +++++--------------
 3 files changed, 77 insertions(+), 42 deletions(-)
 create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
 create mode 100644 meta/recipes-core/util-linux/util-linux.inc

diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
new file mode 100644
index 0000000000..febbeeb405
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.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.a ${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..b4f817ed82
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -0,0 +1,41 @@
+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 \
+"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:"
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+BPN = "util-linux"
+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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
diff --git a/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
index 19950a2726..c0f4b603a7 100644
--- a/meta/recipes-core/util-linux/util-linux_2.36.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
@@ -1,46 +1,8 @@
-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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
+DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid"
 
 PACKAGES =+ "${PN}-swaponoff"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}"
@@ -87,8 +49,9 @@ python util_linux_binpackages () {
 # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS
 PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages "
 
+# skip libuuid as it will be packaged by the util-linux-uuid recipe
 python util_linux_libpackages() {
-    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$',
+    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(?!uuid)(.*)\.so\..*$',
                       output_pattern='${PN}-lib%s',
                       description='${PN} lib%s',
                       extra_depends='', prepend=True, allow_links=True)
@@ -141,6 +104,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}'"
 
@@ -165,7 +129,10 @@ RRECOMMENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
 
-RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
+RDEPENDS_${PN} += " util-linux-libuuid"
+RDEPENDS_${PN}-dev += " util-linux-libuuid-dev"
+
+RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev"
 
 RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
 RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz"
@@ -316,6 +283,11 @@ 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*
+}
 
 BBCLASSEXTEND = "native nativesdk"
 
-- 
2.29.2


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

* Re: [PATCH v6] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-05  0:13         ` Richard Purdie
@ 2021-03-05 11:03           ` Luca Bocassi
  0 siblings, 0 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-03-05 11:03 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: bluelightning

[-- Attachment #1: Type: text/plain, Size: 1646 bytes --]

On Fri, 2021-03-05 at 00:13 +0000, Richard Purdie wrote:
> On Thu, 2021-03-04 at 12:27 +0000, luca.boccassi@gmail.com wrote:
> > -RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
> > +RDEPENDS_${PN}_append += " util-linux-libuuid"
> > +RDEPENDS_${PN}-dev_append += " util-linux-libuuid-dev"
> 
> The mysterious libgcov.a issues which appeared in builds when this patch
> was added are due to the lines above. Changing them to:
> 
> RDEPENDS_${PN} += " util-linux-libuuid"
> RDEPENDS_${PN}-dev += " util-linux-libuuid-dev"
> 
> resolves the issue. To illustrate, have a look at "bitbake glibc -g" in
> the task-depends.dot file before and after that change.
> 
> The problem is the native BBCLASSEXTEND code can't handle the
> RDEPENDS_${PN}_append correctly and it means in the native case it
> adds a dependency on util-linux-libuuid rather than a native
> version.
> 
> Why does that cause the gcov error? Its because there are early toolchain
> util-linux-native dependencies which ends up meaning glibc sees a libgcc 
> dependency. It usually uses libgcc-initial and that has overlapping files
> with libgcc and libgcov.a is the first in the sorted list.
> 
> Again, we should have better errors for a native recipe depending upon
> a target one and show better errors for this configuration issue. It 
> does at least explain the seemingly strange errors.

Thank you! Sent v7 as suggested after a quick rebuild check.

When to use '_append' vs '+=' is one of the things I'm never sure about
and invariably I get it wrong most of the times.

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* Re: [PATCH v7] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-05 11:02       ` [PATCH v7] " Luca Bocassi
@ 2021-03-08 19:29         ` Richard Purdie
  2021-03-09 11:07           ` Luca Bocassi
  2021-03-09 11:18           ` [OE-core] " Kory Maincent
  0 siblings, 2 replies; 74+ messages in thread
From: Richard Purdie @ 2021-03-08 19:29 UTC (permalink / raw)
  To: luca.boccassi, openembedded-core
  Cc: bluelightning, Kory Maincent, Alexandre Belloni

On Fri, 2021-03-05 at 11:02 +0000, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <luca.boccassi@microsoft.com>
> 
> Recently 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.
> 
> 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
> v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
> v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
>     Removed PACKAGES_remove and instead filter out libuuid via the package generation
>     regex.
>     Rebased on util-linux 2.36.2.
> v6: install libuuid.a in libuuid-dev
>     change rdepends on uuid to use binary package rather than source
>     add rdepends on uuid-dev to libuuid-dev
>     remove rprovides of libuuid-dev from uuid-dev
> v7: do not use '_append' for RDEPENDS, as it is not supported by BBCLASSEXTEND, use
>     simply '+='

This is looking closer but not there yet I'm afraid. Testing showed:

https://autobuilder.yoctoproject.org/typhoon/#/builders/57/builds/3152
https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/3188

so far.

Cheers,

Richard


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

* Re: [PATCH v7] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-08 19:29         ` Richard Purdie
@ 2021-03-09 11:07           ` Luca Bocassi
  2021-03-09 11:18           ` [OE-core] " Kory Maincent
  1 sibling, 0 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-03-09 11:07 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core
  Cc: bluelightning, Kory Maincent, Alexandre Belloni

[-- Attachment #1: Type: text/plain, Size: 2562 bytes --]

On Mon, 2021-03-08 at 19:29 +0000, Richard Purdie wrote:
> On Fri, 2021-03-05 at 11:02 +0000, luca.boccassi@gmail.com wrote:
> > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > 
> > Recently 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.
> > 
> > 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
> > v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
> > v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
> >     Removed PACKAGES_remove and instead filter out libuuid via the package generation
> >     regex.
> >     Rebased on util-linux 2.36.2.
> > v6: install libuuid.a in libuuid-dev
> >     change rdepends on uuid to use binary package rather than source
> >     add rdepends on uuid-dev to libuuid-dev
> >     remove rprovides of libuuid-dev from uuid-dev
> > v7: do not use '_append' for RDEPENDS, as it is not supported by BBCLASSEXTEND, use
> >     simply '+='
> 
> This is looking closer but not there yet I'm afraid. Testing showed:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/57/builds/3152
> https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/3188
> 
> so far.
> 
> Cheers,
> 
> Richard

Thank you, these seems to be easy fixes: -staticdev package was missing
(forgot it's separate from -dev) and there's a libx32 directory to take
care of. Will do a quick build test and send v8.

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* [PATCH v8] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-10 18:46     ` [PATCH v4] " Luca Bocassi
                         ` (3 preceding siblings ...)
  2021-03-05 11:02       ` [PATCH v7] " Luca Bocassi
@ 2021-03-09 11:13       ` Luca Bocassi
  2021-03-09 13:56       ` [PATCH v9] " Luca Bocassi
                         ` (2 subsequent siblings)
  7 siblings, 0 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-03-09 11:13 UTC (permalink / raw)
  To: openembedded-core; +Cc: richard.purdie, bluelightning

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

Recently 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.

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
v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
    Removed PACKAGES_remove and instead filter out libuuid via the package generation
    regex.
    Rebased on util-linux 2.36.2.
v6: install libuuid.a in libuuid-dev
    change rdepends on uuid to use binary package rather than source
    add rdepends on uuid-dev to libuuid-dev
    remove rprovides of libuuid-dev from uuid-dev
v7: do not use '_append' for RDEPENDS, as it is not supported by BBCLASSEXTEND, use
    simply '+='
v8: added missing libuuid-staticdev package
    remove libx32/libuuid* too

 .../util-linux/util-linux-uuid_2.36.2.bb      | 24 ++++++++
 meta/recipes-core/util-linux/util-linux.inc   | 41 +++++++++++++
 .../util-linux/util-linux_2.36.2.bb           | 57 +++++--------------
 3 files changed, 80 insertions(+), 42 deletions(-)
 create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
 create mode 100644 meta/recipes-core/util-linux/util-linux.inc

diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
new file mode 100644
index 0000000000..338c1ea015
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
@@ -0,0 +1,24 @@
+# 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-staticdev = "1"
+DEBIAN_NOAUTONAME_util-linux-libuuid-dbg = "1"
+PACKAGES = "util-linux-libuuid util-linux-libuuid-dev util-linux-libuuid-staticdev 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-staticdev = "${libdir}/libuuid.a"
+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..b4f817ed82
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -0,0 +1,41 @@
+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 \
+"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:"
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+BPN = "util-linux"
+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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
diff --git a/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
index 19950a2726..f6c3c8c108 100644
--- a/meta/recipes-core/util-linux/util-linux_2.36.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
@@ -1,46 +1,8 @@
-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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
+DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid"
 
 PACKAGES =+ "${PN}-swaponoff"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}"
@@ -87,8 +49,9 @@ python util_linux_binpackages () {
 # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS
 PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages "
 
+# skip libuuid as it will be packaged by the util-linux-uuid recipe
 python util_linux_libpackages() {
-    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$',
+    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(?!uuid)(.*)\.so\..*$',
                       output_pattern='${PN}-lib%s',
                       description='${PN} lib%s',
                       extra_depends='', prepend=True, allow_links=True)
@@ -141,6 +104,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}'"
 
@@ -165,7 +129,10 @@ RRECOMMENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
 
-RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
+RDEPENDS_${PN} += " util-linux-libuuid"
+RDEPENDS_${PN}-dev += " util-linux-libuuid-dev"
+
+RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev"
 
 RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
 RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz"
@@ -234,6 +201,12 @@ do_install_append_class-native () {
 	rm -f ${D}${base_bindir}/kill
 }
 
+# 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* ${D}/libx32/libuuid*
+}
+
 ALTERNATIVE_PRIORITY = "80"
 
 ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
-- 
2.29.2


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

* Re: [OE-core] [PATCH v7] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-08 19:29         ` Richard Purdie
  2021-03-09 11:07           ` Luca Bocassi
@ 2021-03-09 11:18           ` Kory Maincent
  2021-03-09 13:26             ` Luca Bocassi
  1 sibling, 1 reply; 74+ messages in thread
From: Kory Maincent @ 2021-03-09 11:18 UTC (permalink / raw)
  To: luca.boccassi, openembedded-core
  Cc: Richard Purdie, bluelightning, Alexandre Belloni

On Mon, 08 Mar 2021 19:29:20 +0000
"Richard Purdie" <richard.purdie@linuxfoundation.org> wrote:

> On Fri, 2021-03-05 at 11:02 +0000, luca.boccassi@gmail.com wrote:
> > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > 
> > Recently 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.
> > 
> > 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 v4: added RDEPENDS on
> > util-linux-libuuid on various packages to fix QA warnings v5: remove
> > RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid. Removed
> > PACKAGES_remove and instead filter out libuuid via the package generation
> > regex. Rebased on util-linux 2.36.2.
> > v6: install libuuid.a in libuuid-dev
> >     change rdepends on uuid to use binary package rather than source
> >     add rdepends on uuid-dev to libuuid-dev
> >     remove rprovides of libuuid-dev from uuid-dev
> > v7: do not use '_append' for RDEPENDS, as it is not supported by
> > BBCLASSEXTEND, use simply '+='  
> 
> This is looking closer but not there yet I'm afraid. Testing showed:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/57/builds/3152
> https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/3188
> 

It miss also the Maintainer description for linux-util-uuid recipe:
https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/1901/steps/14/logs/stdio

Regards, 

Köry

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

* Re: [OE-core] [PATCH v7] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-09 11:18           ` [OE-core] " Kory Maincent
@ 2021-03-09 13:26             ` Luca Bocassi
  2021-03-09 13:47               ` Kory Maincent
  0 siblings, 1 reply; 74+ messages in thread
From: Luca Bocassi @ 2021-03-09 13:26 UTC (permalink / raw)
  To: Köry Maincent, openembedded-core
  Cc: Richard Purdie, bluelightning, Alexandre Belloni

[-- Attachment #1: Type: text/plain, Size: 2822 bytes --]

On Tue, 2021-03-09 at 12:18 +0100, Köry Maincent wrote:
> On Mon, 08 Mar 2021 19:29:20 +0000
> "Richard Purdie" <richard.purdie@linuxfoundation.org> wrote:
> 
> > On Fri, 2021-03-05 at 11:02 +0000, luca.boccassi@gmail.com wrote:
> > > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > > 
> > > Recently 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.
> > > 
> > > 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 v4: added RDEPENDS on
> > > util-linux-libuuid on various packages to fix QA warnings v5: remove
> > > RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid. Removed
> > > PACKAGES_remove and instead filter out libuuid via the package generation
> > > regex. Rebased on util-linux 2.36.2.
> > > v6: install libuuid.a in libuuid-dev
> > >     change rdepends on uuid to use binary package rather than source
> > >     add rdepends on uuid-dev to libuuid-dev
> > >     remove rprovides of libuuid-dev from uuid-dev
> > > v7: do not use '_append' for RDEPENDS, as it is not supported by
> > > BBCLASSEXTEND, use simply '+='  
> > 
> > This is looking closer but not there yet I'm afraid. Testing showed:
> > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/57/builds/3152
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/3188
> > 
> 
> It miss also the Maintainer description for linux-util-uuid recipe:
> https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/1901/steps/14/logs/stdio
> 
> Regards, 
> 
> Köry

Hi,

The DESCRIPTION field is in the util-linux.inc which is included by the
recipe. Or is that something else entirely? What is it, precisely?

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* Re: [OE-core] [PATCH v7] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-09 13:26             ` Luca Bocassi
@ 2021-03-09 13:47               ` Kory Maincent
  2021-03-09 13:48                 ` Richard Purdie
  0 siblings, 1 reply; 74+ messages in thread
From: Kory Maincent @ 2021-03-09 13:47 UTC (permalink / raw)
  To: Luca Boccassi
  Cc: openembedded-core, Richard Purdie, bluelightning, Alexandre Belloni

On Tue, 09 Mar 2021 13:26:55 +0000
Luca Boccassi <luca.boccassi@gmail.com> wrote:

> > 
> > It miss also the Maintainer description for linux-util-uuid recipe:
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/1901/steps/14/logs/stdio
> > 
> > Regards, 
> > 
> > Köry  
> 
> Hi,
> 
> The DESCRIPTION field is in the util-linux.inc which is included by the
> recipe. Or is that something else entirely? What is it, precisely?
> 

Sorry I was not enough explicit.
When you add a new recipe to oe-core you need to update the file:
meta/conf/distro/include/maintainers.inc

Regards,

Köry

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

* Re: [OE-core] [PATCH v7] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-09 13:47               ` Kory Maincent
@ 2021-03-09 13:48                 ` Richard Purdie
  2021-03-09 13:56                   ` Luca Bocassi
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-03-09 13:48 UTC (permalink / raw)
  To: Köry Maincent, Luca Boccassi
  Cc: openembedded-core, bluelightning, Alexandre Belloni

On Tue, 2021-03-09 at 14:47 +0100, Köry Maincent wrote:
> On Tue, 09 Mar 2021 13:26:55 +0000
> Luca Boccassi <luca.boccassi@gmail.com> wrote:
> 
> > > 
> > > It miss also the Maintainer description for linux-util-uuid recipe:
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/1901/steps/14/logs/stdio
> > > 
> > > Regards, 
> > > 
> > > Köry  
> > 
> > Hi,
> > 
> > The DESCRIPTION field is in the util-linux.inc which is included by the
> > recipe. Or is that something else entirely? What is it, precisely?
> > 
> 
> Sorry I was not enough explicit.
> When you add a new recipe to oe-core you need to update the file:
> meta/conf/distro/include/maintainers.inc

The test which failed can be run as:

oe-selftest -r distrodata.Distrodata.test_maintainers

Cheers,

Richard


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

* [PATCH v9] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-10 18:46     ` [PATCH v4] " Luca Bocassi
                         ` (4 preceding siblings ...)
  2021-03-09 11:13       ` [PATCH v8] " Luca Bocassi
@ 2021-03-09 13:56       ` Luca Bocassi
  2021-03-09 23:43         ` Richard Purdie
  2021-03-11 14:38       ` [PATCH v10] " Luca Bocassi
  2021-03-11 15:09       ` [PATCH v11] " Luca Bocassi
  7 siblings, 1 reply; 74+ messages in thread
From: Luca Bocassi @ 2021-03-09 13:56 UTC (permalink / raw)
  To: openembedded-core; +Cc: richard.purdie, bluelightning

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

Recently 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.

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
v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
    Removed PACKAGES_remove and instead filter out libuuid via the package generation
    regex.
    Rebased on util-linux 2.36.2.
v6: install libuuid.a in libuuid-dev
    change rdepends on uuid to use binary package rather than source
    add rdepends on uuid-dev to libuuid-dev
    remove rprovides of libuuid-dev from uuid-dev
v7: do not use '_append' for RDEPENDS, as it is not supported by BBCLASSEXTEND, use
    simply '+='
v8: added missing libuuid-staticdev package
    remove libx32/libuuid* too
v9: set RECIPE_MAINTAINER_pn-util-linux-uuid, same value as RECIPE_MAINTAINER_pn-util-linux

 meta/conf/distro/include/maintainers.inc      |  1 +
 .../util-linux/util-linux-uuid_2.36.2.bb      | 24 ++++++++
 meta/recipes-core/util-linux/util-linux.inc   | 41 +++++++++++++
 .../util-linux/util-linux_2.36.2.bb           | 57 +++++--------------
 4 files changed, 81 insertions(+), 42 deletions(-)
 create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
 create mode 100644 meta/recipes-core/util-linux/util-linux.inc

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 3d8e3d5de0..c6a97bc280 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -720,6 +720,7 @@ RECIPE_MAINTAINER_pn-update-rc.d = "Ross Burton <ross.burton@arm.com>"
 RECIPE_MAINTAINER_pn-usbinit = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-usbutils = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-util-linux = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-util-linux-uuid = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-util-macros = "Armin Kuster <akuster808@gmail.com>"
 RECIPE_MAINTAINER_pn-v86d = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-vala = "Alexander Kanavin <alex.kanavin@gmail.com>"
diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
new file mode 100644
index 0000000000..338c1ea015
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
@@ -0,0 +1,24 @@
+# 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-staticdev = "1"
+DEBIAN_NOAUTONAME_util-linux-libuuid-dbg = "1"
+PACKAGES = "util-linux-libuuid util-linux-libuuid-dev util-linux-libuuid-staticdev 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-staticdev = "${libdir}/libuuid.a"
+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..b4f817ed82
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -0,0 +1,41 @@
+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 \
+"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:"
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+BPN = "util-linux"
+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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
diff --git a/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
index 19950a2726..f6c3c8c108 100644
--- a/meta/recipes-core/util-linux/util-linux_2.36.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
@@ -1,46 +1,8 @@
-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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
+DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid"
 
 PACKAGES =+ "${PN}-swaponoff"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}"
@@ -87,8 +49,9 @@ python util_linux_binpackages () {
 # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS
 PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages "
 
+# skip libuuid as it will be packaged by the util-linux-uuid recipe
 python util_linux_libpackages() {
-    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$',
+    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(?!uuid)(.*)\.so\..*$',
                       output_pattern='${PN}-lib%s',
                       description='${PN} lib%s',
                       extra_depends='', prepend=True, allow_links=True)
@@ -141,6 +104,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}'"
 
@@ -165,7 +129,10 @@ RRECOMMENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
 
-RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
+RDEPENDS_${PN} += " util-linux-libuuid"
+RDEPENDS_${PN}-dev += " util-linux-libuuid-dev"
+
+RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev"
 
 RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
 RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz"
@@ -234,6 +201,12 @@ do_install_append_class-native () {
 	rm -f ${D}${base_bindir}/kill
 }
 
+# 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* ${D}/libx32/libuuid*
+}
+
 ALTERNATIVE_PRIORITY = "80"
 
 ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
-- 
2.29.2


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

* Re: [OE-core] [PATCH v7] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-09 13:48                 ` Richard Purdie
@ 2021-03-09 13:56                   ` Luca Bocassi
  0 siblings, 0 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-03-09 13:56 UTC (permalink / raw)
  To: Richard Purdie, Köry Maincent
  Cc: openembedded-core, bluelightning, Alexandre Belloni

[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]

On Tue, 2021-03-09 at 13:48 +0000, Richard Purdie wrote:
> On Tue, 2021-03-09 at 14:47 +0100, Köry Maincent wrote:
> > On Tue, 09 Mar 2021 13:26:55 +0000
> > Luca Boccassi <luca.boccassi@gmail.com> wrote:
> > 
> > > > It miss also the Maintainer description for linux-util-uuid recipe:
> > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/1901/steps/14/logs/stdio
> > > > 
> > > > Regards, 
> > > > 
> > > > Köry  
> > > 
> > > Hi,
> > > 
> > > The DESCRIPTION field is in the util-linux.inc which is included by the
> > > recipe. Or is that something else entirely? What is it, precisely?
> > > 
> > 
> > Sorry I was not enough explicit.
> > When you add a new recipe to oe-core you need to update the file:
> > meta/conf/distro/include/maintainers.inc
> 
> The test which failed can be run as:
> 
> oe-selftest -r distrodata.Distrodata.test_maintainers
> 
> Cheers,
> 
> Richard

Got it, thanks. Sent v9, set to the same value as util-linux for now,
since the sources are shared.

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* Re: [PATCH v9] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-09 13:56       ` [PATCH v9] " Luca Bocassi
@ 2021-03-09 23:43         ` Richard Purdie
  2021-03-10 18:28           ` Luca Bocassi
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-03-09 23:43 UTC (permalink / raw)
  To: luca.boccassi, openembedded-core; +Cc: bluelightning, Kory Maincent

On Tue, 2021-03-09 at 13:56 +0000, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <luca.boccassi@microsoft.com>
> 
> Recently 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.
> 
> 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
> v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
> v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
>     Removed PACKAGES_remove and instead filter out libuuid via the package generation
>     regex.
>     Rebased on util-linux 2.36.2.
> v6: install libuuid.a in libuuid-dev
>     change rdepends on uuid to use binary package rather than source
>     add rdepends on uuid-dev to libuuid-dev
>     remove rprovides of libuuid-dev from uuid-dev
> v7: do not use '_append' for RDEPENDS, as it is not supported by BBCLASSEXTEND, use
>     simply '+='
> v8: added missing libuuid-staticdev package
>     remove libx32/libuuid* too
> v9: set RECIPE_MAINTAINER_pn-util-linux-uuid, same value as RECIPE_MAINTAINER_pn-util-linux

Sorry, there are still issues:

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/3207
https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/1608
https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/3159

:(

I really want to get this into the release but we're past feature freeze and
running out of opportunity as each broken test run is delaying other patches.

I'm a little unclear if debian renaming was allowed before the split and if
so, why it is disabled in the split version. I suspect there is a missing
MLPREFIX somewhere causing the multilib issue too.

Cheers,

Richard



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

* Re: [PATCH v9] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-09 23:43         ` Richard Purdie
@ 2021-03-10 18:28           ` Luca Bocassi
  2021-03-11 10:15             ` Luca Bocassi
  0 siblings, 1 reply; 74+ messages in thread
From: Luca Bocassi @ 2021-03-10 18:28 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: bluelightning, Kory Maincent

[-- Attachment #1: Type: text/plain, Size: 3278 bytes --]

On Tue, 2021-03-09 at 23:43 +0000, Richard Purdie wrote:
> On Tue, 2021-03-09 at 13:56 +0000, luca.boccassi@gmail.com wrote:
> > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > 
> > Recently 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.
> > 
> > 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
> > v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
> > v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
> >     Removed PACKAGES_remove and instead filter out libuuid via the package generation
> >     regex.
> >     Rebased on util-linux 2.36.2.
> > v6: install libuuid.a in libuuid-dev
> >     change rdepends on uuid to use binary package rather than source
> >     add rdepends on uuid-dev to libuuid-dev
> >     remove rprovides of libuuid-dev from uuid-dev
> > v7: do not use '_append' for RDEPENDS, as it is not supported by BBCLASSEXTEND, use
> >     simply '+='
> > v8: added missing libuuid-staticdev package
> >     remove libx32/libuuid* too
> > v9: set RECIPE_MAINTAINER_pn-util-linux-uuid, same value as RECIPE_MAINTAINER_pn-util-linux
> 
> Sorry, there are still issues:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/3207
> https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/1608
> https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/3159
> 
> :(
> 
> I really want to get this into the release but we're past feature freeze and
> running out of opportunity as each broken test run is delaying other patches.

No problem at all, it's absolutely fine to postpone, I am in no
immediate rush as I have local backports in use. As long as we get
things sorted at some point it's all good for me, so please don't delay
other patches because of this.

> I'm a little unclear if debian renaming was allowed before the split and if
> so, why it is disabled in the split version. I suspect there is a missing
> MLPREFIX somewhere causing the multilib issue too.

I do not remember why the DEBIAN_NOAUTONAME was added at this point.
I'll try to send a new version tomorrow.

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* Re: [PATCH v9] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-10 18:28           ` Luca Bocassi
@ 2021-03-11 10:15             ` Luca Bocassi
  2021-03-11 10:31               ` Richard Purdie
  0 siblings, 1 reply; 74+ messages in thread
From: Luca Bocassi @ 2021-03-11 10:15 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: bluelightning, Kory Maincent

[-- Attachment #1: Type: text/plain, Size: 3837 bytes --]

On Wed, 2021-03-10 at 18:28 +0000, Luca Boccassi wrote:
> On Tue, 2021-03-09 at 23:43 +0000, Richard Purdie wrote:
> > On Tue, 2021-03-09 at 13:56 +0000, luca.boccassi@gmail.com wrote:
> > > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > > 
> > > Recently 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.
> > > 
> > > 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
> > > v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
> > > v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
> > >     Removed PACKAGES_remove and instead filter out libuuid via the package generation
> > >     regex.
> > >     Rebased on util-linux 2.36.2.
> > > v6: install libuuid.a in libuuid-dev
> > >     change rdepends on uuid to use binary package rather than source
> > >     add rdepends on uuid-dev to libuuid-dev
> > >     remove rprovides of libuuid-dev from uuid-dev
> > > v7: do not use '_append' for RDEPENDS, as it is not supported by BBCLASSEXTEND, use
> > >     simply '+='
> > > v8: added missing libuuid-staticdev package
> > >     remove libx32/libuuid* too
> > > v9: set RECIPE_MAINTAINER_pn-util-linux-uuid, same value as RECIPE_MAINTAINER_pn-util-linux
> > 
> > Sorry, there are still issues:
> > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/3207
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/1608
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/3159
> > 
> > :(
> > 
> > I really want to get this into the release but we're past feature freeze and
> > running out of opportunity as each broken test run is delaying other patches.
> 
> No problem at all, it's absolutely fine to postpone, I am in no
> immediate rush as I have local backports in use. As long as we get
> things sorted at some point it's all good for me, so please don't delay
> other patches because of this.
> 
> > I'm a little unclear if debian renaming was allowed before the split and if
> > so, why it is disabled in the split version. I suspect there is a missing
> > MLPREFIX somewhere causing the multilib issue too.
> 
> I do not remember why the DEBIAN_NOAUTONAME was added at this point.
> I'll try to send a new version tomorrow.

So without DEBIAN_NOAUTONAME these are the package names:

libuuid1-2.36.2-r0.core2_64.rpm
libuuid-dbg-2.36.2-r0.core2_64.rpm
libuuid-dev-2.36.2-r0.core2_64.rpm
util-linux-uuid-src-2.36.2-r0.core2_64.rpm

that's going to be a problem as they don't match anymore, right? Since
they used to be util-linux-libuuid, etc. Although the poky image build
completed just fine...

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* Re: [PATCH v9] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-11 10:15             ` Luca Bocassi
@ 2021-03-11 10:31               ` Richard Purdie
  2021-03-11 14:37                 ` Luca Bocassi
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-03-11 10:31 UTC (permalink / raw)
  To: Luca Boccassi, openembedded-core; +Cc: bluelightning, Kory Maincent

On Thu, 2021-03-11 at 10:15 +0000, Luca Boccassi wrote:
> On Wed, 2021-03-10 at 18:28 +0000, Luca Boccassi wrote:
> > On Tue, 2021-03-09 at 23:43 +0000, Richard Purdie wrote:
> > 
> > 
> > No problem at all, it's absolutely fine to postpone, I am in no
> > immediate rush as I have local backports in use. As long as we get
> > things sorted at some point it's all good for me, so please don't delay
> > other patches because of this.
> > 
> > > I'm a little unclear if debian renaming was allowed before the split and if
> > > so, why it is disabled in the split version. I suspect there is a missing
> > > MLPREFIX somewhere causing the multilib issue too.
> > 
> > I do not remember why the DEBIAN_NOAUTONAME was added at this point.
> > I'll try to send a new version tomorrow.
> 
> So without DEBIAN_NOAUTONAME these are the package names:
> 
> libuuid1-2.36.2-r0.core2_64.rpm
> libuuid-dbg-2.36.2-r0.core2_64.rpm
> libuuid-dev-2.36.2-r0.core2_64.rpm
> util-linux-uuid-src-2.36.2-r0.core2_64.rpm
> 
> that's going to be a problem as they don't match anymore, right? Since
> they used to be util-linux-libuuid, etc. Although the poky image build
> completed just fine...

The above looks fine, they don't have to match. I think this would match 
what happens to the package before your patch too although I've not 
checked.

Cheers,

Richard



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

* Re: [PATCH v9] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-11 10:31               ` Richard Purdie
@ 2021-03-11 14:37                 ` Luca Bocassi
  0 siblings, 0 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-03-11 14:37 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: bluelightning, Kory Maincent

[-- Attachment #1: Type: text/plain, Size: 1965 bytes --]

On Thu, 2021-03-11 at 10:31 +0000, Richard Purdie wrote:
> On Thu, 2021-03-11 at 10:15 +0000, Luca Boccassi wrote:
> > On Wed, 2021-03-10 at 18:28 +0000, Luca Boccassi wrote:
> > > On Tue, 2021-03-09 at 23:43 +0000, Richard Purdie wrote:
> > > 
> > > 
> > > No problem at all, it's absolutely fine to postpone, I am in no
> > > immediate rush as I have local backports in use. As long as we get
> > > things sorted at some point it's all good for me, so please don't delay
> > > other patches because of this.
> > > 
> > > > I'm a little unclear if debian renaming was allowed before the split and if
> > > > so, why it is disabled in the split version. I suspect there is a missing
> > > > MLPREFIX somewhere causing the multilib issue too.
> > > 
> > > I do not remember why the DEBIAN_NOAUTONAME was added at this point.
> > > I'll try to send a new version tomorrow.
> > 
> > So without DEBIAN_NOAUTONAME these are the package names:
> > 
> > libuuid1-2.36.2-r0.core2_64.rpm
> > libuuid-dbg-2.36.2-r0.core2_64.rpm
> > libuuid-dev-2.36.2-r0.core2_64.rpm
> > util-linux-uuid-src-2.36.2-r0.core2_64.rpm
> > 
> > that's going to be a problem as they don't match anymore, right? Since
> > they used to be util-linux-libuuid, etc. Although the poky image build
> > completed just fine...
> 
> The above looks fine, they don't have to match. I think this would match 
> what happens to the package before your patch too although I've not 
> checked.
> 

Ok, sent v10.

The other issue was a missing rm -f ${D}/lib64/libuuid* - is there a
better way to handle all of this than this line? ${libdir} doesn't seem
to match in some cases so I have to manually specify lib/libx32/lib64,
is there a better variable to use?

do_install_append () {
	rm -rf ${D}${includedir}/uuid ${D}${libdir}/pkgconfig/uuid.pc ${D}${libdir}/libuuid* ${D}/lib/libuuid* ${D}/libx32/libuuid* ${D}/lib64/libuuid*
}

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* [PATCH v10] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-10 18:46     ` [PATCH v4] " Luca Bocassi
                         ` (5 preceding siblings ...)
  2021-03-09 13:56       ` [PATCH v9] " Luca Bocassi
@ 2021-03-11 14:38       ` Luca Bocassi
  2021-03-11 14:44         ` Richard Purdie
  2021-03-11 15:09       ` [PATCH v11] " Luca Bocassi
  7 siblings, 1 reply; 74+ messages in thread
From: Luca Bocassi @ 2021-03-11 14:38 UTC (permalink / raw)
  To: openembedded-core; +Cc: richard.purdie, bluelightning

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

Recently 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.

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
v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
    Removed PACKAGES_remove and instead filter out libuuid via the package generation
    regex.
    Rebased on util-linux 2.36.2.
v6: install libuuid.a in libuuid-dev
    change rdepends on uuid to use binary package rather than source
    add rdepends on uuid-dev to libuuid-dev
    remove rprovides of libuuid-dev from uuid-dev
v7: do not use '_append' for RDEPENDS, as it is not supported by BBCLASSEXTEND, use
    simply '+='
v8: added missing libuuid-staticdev package
    remove libx32/libuuid* too
v9: set RECIPE_MAINTAINER_pn-util-linux-uuid, same value as RECIPE_MAINTAINER_pn-util-linux
v10: removed DEBIAN_NOAUTONAME
     remove lib64/libuuid* too

 meta/conf/distro/include/maintainers.inc      |  1 +
 .../util-linux/util-linux-uuid_2.36.2.bb      | 20 +++++++
 meta/recipes-core/util-linux/util-linux.inc   | 41 +++++++++++++
 .../util-linux/util-linux_2.36.2.bb           | 57 +++++--------------
 4 files changed, 77 insertions(+), 42 deletions(-)
 create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
 create mode 100644 meta/recipes-core/util-linux/util-linux.inc

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 3d8e3d5de0..c6a97bc280 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -720,6 +720,7 @@ RECIPE_MAINTAINER_pn-update-rc.d = "Ross Burton <ross.burton@arm.com>"
 RECIPE_MAINTAINER_pn-usbinit = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-usbutils = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-util-linux = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-util-linux-uuid = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-util-macros = "Armin Kuster <akuster808@gmail.com>"
 RECIPE_MAINTAINER_pn-v86d = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-vala = "Alexander Kanavin <alex.kanavin@gmail.com>"
diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
new file mode 100644
index 0000000000..65e4d23b7e
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
@@ -0,0 +1,20 @@
+# 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"
+PACKAGES = "util-linux-libuuid util-linux-libuuid-dev util-linux-libuuid-staticdev 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-staticdev = "${libdir}/libuuid.a"
+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..b4f817ed82
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -0,0 +1,41 @@
+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 \
+"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:"
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+BPN = "util-linux"
+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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
diff --git a/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
index 19950a2726..34b353efbd 100644
--- a/meta/recipes-core/util-linux/util-linux_2.36.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
@@ -1,46 +1,8 @@
-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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
+DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid"
 
 PACKAGES =+ "${PN}-swaponoff"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}"
@@ -87,8 +49,9 @@ python util_linux_binpackages () {
 # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS
 PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages "
 
+# skip libuuid as it will be packaged by the util-linux-uuid recipe
 python util_linux_libpackages() {
-    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$',
+    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(?!uuid)(.*)\.so\..*$',
                       output_pattern='${PN}-lib%s',
                       description='${PN} lib%s',
                       extra_depends='', prepend=True, allow_links=True)
@@ -141,6 +104,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}'"
 
@@ -165,7 +129,10 @@ RRECOMMENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
 
-RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
+RDEPENDS_${PN} += " util-linux-libuuid"
+RDEPENDS_${PN}-dev += " util-linux-libuuid-dev"
+
+RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev"
 
 RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
 RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz"
@@ -234,6 +201,12 @@ do_install_append_class-native () {
 	rm -f ${D}${base_bindir}/kill
 }
 
+# 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* ${D}/libx32/libuuid* ${D}/lib64/libuuid*
+}
+
 ALTERNATIVE_PRIORITY = "80"
 
 ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
-- 
2.29.2


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

* Re: [PATCH v10] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-11 14:38       ` [PATCH v10] " Luca Bocassi
@ 2021-03-11 14:44         ` Richard Purdie
  2021-03-11 15:10           ` Luca Bocassi
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-03-11 14:44 UTC (permalink / raw)
  To: luca.boccassi, openembedded-core; +Cc: bluelightning

On Thu, 2021-03-11 at 14:38 +0000, luca.boccassi@gmail.com wrote:
> +# 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* ${D}/libx32/libuuid* ${D}/lib64/libuuid*
> +}
> +

I think you can replace:

${D}/lib/libuuid* ${D}/libx32/libuuid* ${D}/lib64/libuuid*

with 

${D}${base_libdir}/libuuid*

?

Cheers,

Richard


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

* [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2020-12-10 18:46     ` [PATCH v4] " Luca Bocassi
                         ` (6 preceding siblings ...)
  2021-03-11 14:38       ` [PATCH v10] " Luca Bocassi
@ 2021-03-11 15:09       ` Luca Bocassi
  2021-03-14 22:10         ` Richard Purdie
  2021-03-25  9:17         ` Oleksiy Obitotskyy
  7 siblings, 2 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-03-11 15:09 UTC (permalink / raw)
  To: openembedded-core; +Cc: richard.purdie, bluelightning

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

Recently 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.

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
v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
    Removed PACKAGES_remove and instead filter out libuuid via the package generation
    regex.
    Rebased on util-linux 2.36.2.
v6: install libuuid.a in libuuid-dev
    change rdepends on uuid to use binary package rather than source
    add rdepends on uuid-dev to libuuid-dev
    remove rprovides of libuuid-dev from uuid-dev
v7: do not use '_append' for RDEPENDS, as it is not supported by BBCLASSEXTEND, use
    simply '+='
v8: added missing libuuid-staticdev package
    remove libx32/libuuid* too
v9: set RECIPE_MAINTAINER_pn-util-linux-uuid, same value as RECIPE_MAINTAINER_pn-util-linux
v10: removed DEBIAN_NOAUTONAME
     remove lib64/libuuid* too
v11: use ${D}${base_libdir}/libuuid* instead of manually specifying /lib|/libx32|/lib64

 meta/conf/distro/include/maintainers.inc      |  1 +
 .../util-linux/util-linux-uuid_2.36.2.bb      | 20 +++++++
 meta/recipes-core/util-linux/util-linux.inc   | 41 +++++++++++++
 .../util-linux/util-linux_2.36.2.bb           | 57 +++++--------------
 4 files changed, 77 insertions(+), 42 deletions(-)
 create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
 create mode 100644 meta/recipes-core/util-linux/util-linux.inc

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 3d8e3d5de0..c6a97bc280 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -720,6 +720,7 @@ RECIPE_MAINTAINER_pn-update-rc.d = "Ross Burton <ross.burton@arm.com>"
 RECIPE_MAINTAINER_pn-usbinit = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-usbutils = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-util-linux = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-util-linux-uuid = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-util-macros = "Armin Kuster <akuster808@gmail.com>"
 RECIPE_MAINTAINER_pn-v86d = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-vala = "Alexander Kanavin <alex.kanavin@gmail.com>"
diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
new file mode 100644
index 0000000000..65e4d23b7e
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
@@ -0,0 +1,20 @@
+# 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"
+PACKAGES = "util-linux-libuuid util-linux-libuuid-dev util-linux-libuuid-staticdev 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-staticdev = "${libdir}/libuuid.a"
+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..b4f817ed82
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -0,0 +1,41 @@
+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 \
+"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:"
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+BPN = "util-linux"
+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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
diff --git a/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
index 19950a2726..50a70cd452 100644
--- a/meta/recipes-core/util-linux/util-linux_2.36.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
@@ -1,46 +1,8 @@
-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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
+DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid"
 
 PACKAGES =+ "${PN}-swaponoff"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}"
@@ -87,8 +49,9 @@ python util_linux_binpackages () {
 # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS
 PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages "
 
+# skip libuuid as it will be packaged by the util-linux-uuid recipe
 python util_linux_libpackages() {
-    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$',
+    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(?!uuid)(.*)\.so\..*$',
                       output_pattern='${PN}-lib%s',
                       description='${PN} lib%s',
                       extra_depends='', prepend=True, allow_links=True)
@@ -141,6 +104,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}'"
 
@@ -165,7 +129,10 @@ RRECOMMENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
 
-RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
+RDEPENDS_${PN} += " util-linux-libuuid"
+RDEPENDS_${PN}-dev += " util-linux-libuuid-dev"
+
+RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev"
 
 RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
 RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz"
@@ -234,6 +201,12 @@ do_install_append_class-native () {
 	rm -f ${D}${base_bindir}/kill
 }
 
+# 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}${base_libdir}/libuuid*
+}
+
 ALTERNATIVE_PRIORITY = "80"
 
 ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
-- 
2.29.2


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

* Re: [PATCH v10] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-11 14:44         ` Richard Purdie
@ 2021-03-11 15:10           ` Luca Bocassi
  0 siblings, 0 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-03-11 15:10 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: bluelightning

[-- Attachment #1: Type: text/plain, Size: 768 bytes --]

On Thu, 2021-03-11 at 14:44 +0000, Richard Purdie wrote:
> On Thu, 2021-03-11 at 14:38 +0000, luca.boccassi@gmail.com wrote:
> > +# 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* ${D}/libx32/libuuid* ${D}/lib64/libuuid*
> > +}
> > +
> 
> I think you can replace:
> 
> ${D}/lib/libuuid* ${D}/libx32/libuuid* ${D}/lib64/libuuid*
> 
> with 
> 
> ${D}${base_libdir}/libuuid*
> 
> ?

Thanks, seems to work locally, sent v11

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* Re: [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-11 15:09       ` [PATCH v11] " Luca Bocassi
@ 2021-03-14 22:10         ` Richard Purdie
  2021-03-15 10:44           ` Luca Bocassi
  2021-03-25  9:17         ` Oleksiy Obitotskyy
  1 sibling, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-03-14 22:10 UTC (permalink / raw)
  To: luca.boccassi, openembedded-core; +Cc: bluelightning

On Thu, 2021-03-11 at 15:09 +0000, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <luca.boccassi@microsoft.com>
> 
> Recently 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.
> 
> https://github.com/karelzak/util-linux/pull/898
> 
> Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>

Unfortunately I noticed we had a performance regression in buildtimes in 
recent changes. The closest I have this narrowed down to so far:

https://autobuilder.yocto.io/pub/non-release/20210314-14/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210314181831_d42487bf52.html

suggests it may be this change. I have more tests queued to confirm
that definitively, if so we'll have to figure out why as this shouldn't
really happen, its an 8% regression :(.

Cheers,

Richard




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

* Re: [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-14 22:10         ` Richard Purdie
@ 2021-03-15 10:44           ` Luca Bocassi
  2021-03-15 10:49             ` Richard Purdie
  0 siblings, 1 reply; 74+ messages in thread
From: Luca Bocassi @ 2021-03-15 10:44 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: bluelightning

[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]

On Sun, 2021-03-14 at 22:10 +0000, Richard Purdie wrote:
> On Thu, 2021-03-11 at 15:09 +0000, luca.boccassi@gmail.com wrote:
> > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > 
> > Recently 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.
> > 
> > https://github.com/karelzak/util-linux/pull/898
> > 
> > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> 
> Unfortunately I noticed we had a performance regression in buildtimes in 
> recent changes. The closest I have this narrowed down to so far:
> 
> https://autobuilder.yocto.io/pub/non-release/20210314-14/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210314181831_d42487bf52.html
> 
> suggests it may be this change. I have more tests queued to confirm
> that definitively, if so we'll have to figure out why as this shouldn't
> really happen, its an 8% regression :(.
> 
> Cheers,
> 
> Richard

Hi,

Very strange that a single recipe could do that - is there something
wrong in the new .bb that I missed and could cause this?

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* Re: [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-15 10:44           ` Luca Bocassi
@ 2021-03-15 10:49             ` Richard Purdie
  2021-03-15 11:50               ` Luca Bocassi
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-03-15 10:49 UTC (permalink / raw)
  To: Luca Boccassi, openembedded-core; +Cc: bluelightning

On Mon, 2021-03-15 at 10:44 +0000, Luca Boccassi wrote:
> On Sun, 2021-03-14 at 22:10 +0000, Richard Purdie wrote:
> > On Thu, 2021-03-11 at 15:09 +0000, luca.boccassi@gmail.com wrote:
> > > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > > 
> > > Recently 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.
> > > 
> > > https://github.com/karelzak/util-linux/pull/898
> > > 
> > > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > 
> > Unfortunately I noticed we had a performance regression in buildtimes in 
> > recent changes. The closest I have this narrowed down to so far:
> > 
> > https://autobuilder.yocto.io/pub/non-release/20210314-14/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210314181831_d42487bf52.html
> > 
> > suggests it may be this change. I have more tests queued to confirm
> > that definitively, if so we'll have to figure out why as this shouldn't
> > really happen, its an 8% regression :(.
> 
> Very strange that a single recipe could do that - is there something
> wrong in the new .bb that I missed and could cause this?

I'm wondering if it is because we're building util-linux twice now and
there is some key choke point in the dependency chain. I have no evidence
for that yet, it is just speculation though.

Cheers,

Richard



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

* Re: [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-15 10:49             ` Richard Purdie
@ 2021-03-15 11:50               ` Luca Bocassi
  2021-03-15 12:21                 ` Richard Purdie
  0 siblings, 1 reply; 74+ messages in thread
From: Luca Bocassi @ 2021-03-15 11:50 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: bluelightning

[-- Attachment #1: Type: text/plain, Size: 2305 bytes --]

On Mon, 2021-03-15 at 10:49 +0000, Richard Purdie wrote:
> On Mon, 2021-03-15 at 10:44 +0000, Luca Boccassi wrote:
> > On Sun, 2021-03-14 at 22:10 +0000, Richard Purdie wrote:
> > > On Thu, 2021-03-11 at 15:09 +0000, luca.boccassi@gmail.com wrote:
> > > > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > 
> > > > Recently 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.
> > > > 
> > > > https://github.com/karelzak/util-linux/pull/898
> > > > 
> > > > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > > 
> > > Unfortunately I noticed we had a performance regression in buildtimes in 
> > > recent changes. The closest I have this narrowed down to so far:
> > > 
> > > https://autobuilder.yocto.io/pub/non-release/20210314-14/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210314181831_d42487bf52.html
> > > 
> > > suggests it may be this change. I have more tests queued to confirm
> > > that definitively, if so we'll have to figure out why as this shouldn't
> > > really happen, its an 8% regression :(.
> > 
> > Very strange that a single recipe could do that - is there something
> > wrong in the new .bb that I missed and could cause this?
> 
> I'm wondering if it is because we're building util-linux twice now and
> there is some key choke point in the dependency chain. I have no evidence
> for that yet, it is just speculation though.

With the autoconf options I've set, on my laptop it takes 32s to do
configure + make -j2. Most of that is autoconf - make -j2 takes 8s.

Only 3 libraries are built with this combination: libcommon.a,
libtcolors.a, and libuuid.a/so. No executables or anything else is
built. It doesn't look like libtcolors is actually needed, I'll see if
I can prepare a patch to skip it, but I don't think it will buy more
than 1s, it's just two object files.

The good news is that meson support is about to land upstream, which
should be significantly faster than autoconf + make:

https://github.com/karelzak/util-linux/commits/topic/meson

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* Re: [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-15 11:50               ` Luca Bocassi
@ 2021-03-15 12:21                 ` Richard Purdie
  2021-03-15 13:04                   ` Luca Bocassi
  2021-03-15 13:55                   ` [OE-core] " Martin Jansa
  0 siblings, 2 replies; 74+ messages in thread
From: Richard Purdie @ 2021-03-15 12:21 UTC (permalink / raw)
  To: Luca Boccassi, openembedded-core; +Cc: bluelightning

On Mon, 2021-03-15 at 11:50 +0000, Luca Boccassi wrote:
> On Mon, 2021-03-15 at 10:49 +0000, Richard Purdie wrote:
> > On Mon, 2021-03-15 at 10:44 +0000, Luca Boccassi wrote:
> > > On Sun, 2021-03-14 at 22:10 +0000, Richard Purdie wrote:
> > > > On Thu, 2021-03-11 at 15:09 +0000, luca.boccassi@gmail.com wrote:
> > > > > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > > 
> > > > > Recently 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.
> > > > > 
> > > > > https://github.com/karelzak/util-linux/pull/898
> > > > > 
> > > > > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > 
> > > > Unfortunately I noticed we had a performance regression in buildtimes in 
> > > > recent changes. The closest I have this narrowed down to so far:
> > > > 
> > > > https://autobuilder.yocto.io/pub/non-release/20210314-14/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210314181831_d42487bf52.html
> > > > 
> > > > suggests it may be this change. I have more tests queued to confirm
> > > > that definitively, if so we'll have to figure out why as this shouldn't
> > > > really happen, its an 8% regression :(.
> > > 
> > > Very strange that a single recipe could do that - is there something
> > > wrong in the new .bb that I missed and could cause this?
> > 
> > I'm wondering if it is because we're building util-linux twice now and
> > there is some key choke point in the dependency chain. I have no evidence
> > for that yet, it is just speculation though.
> 
> With the autoconf options I've set, on my laptop it takes 32s to do
> configure + make -j2. Most of that is autoconf - make -j2 takes 8s.
> 
> Only 3 libraries are built with this combination: libcommon.a,
> libtcolors.a, and libuuid.a/so. No executables or anything else is
> built. It doesn't look like libtcolors is actually needed, I'll see if
> I can prepare a patch to skip it, but I don't think it will buy more
> than 1s, it's just two object files.
> 
> The good news is that meson support is about to land upstream, which
> should be significantly faster than autoconf + make:
> 
> https://github.com/karelzak/util-linux/commits/topic/meson

Meson definitely improves the speed! I was wondering if it was from
configure for example.

I now have more performance test results in (takes time to interleave 
them with testing of master):

https://autobuilder.yocto.io/pub/non-release/20210315-1/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210315005048_6bb1621815.html

and I think this means it isn't from the util-linux change but one of 
another three. I'm not entirely convinced those changes could do this
but it is what the data says. 

I've queued more bisection to narrow it down from there...

Cheers,

Richard





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

* Re: [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-15 12:21                 ` Richard Purdie
@ 2021-03-15 13:04                   ` Luca Bocassi
  2021-03-15 13:55                   ` [OE-core] " Martin Jansa
  1 sibling, 0 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-03-15 13:04 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: bluelightning

[-- Attachment #1: Type: text/plain, Size: 3612 bytes --]

On Mon, 2021-03-15 at 12:21 +0000, Richard Purdie wrote:
> On Mon, 2021-03-15 at 11:50 +0000, Luca Boccassi wrote:
> > On Mon, 2021-03-15 at 10:49 +0000, Richard Purdie wrote:
> > > On Mon, 2021-03-15 at 10:44 +0000, Luca Boccassi wrote:
> > > > On Sun, 2021-03-14 at 22:10 +0000, Richard Purdie wrote:
> > > > > On Thu, 2021-03-11 at 15:09 +0000, luca.boccassi@gmail.com wrote:
> > > > > > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > > > 
> > > > > > Recently 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.
> > > > > > 
> > > > > > https://github.com/karelzak/util-linux/pull/898
> > > > > > 
> > > > > > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > > 
> > > > > Unfortunately I noticed we had a performance regression in buildtimes in 
> > > > > recent changes. The closest I have this narrowed down to so far:
> > > > > 
> > > > > https://autobuilder.yocto.io/pub/non-release/20210314-14/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210314181831_d42487bf52.html
> > > > > 
> > > > > suggests it may be this change. I have more tests queued to confirm
> > > > > that definitively, if so we'll have to figure out why as this shouldn't
> > > > > really happen, its an 8% regression :(.
> > > > 
> > > > Very strange that a single recipe could do that - is there something
> > > > wrong in the new .bb that I missed and could cause this?
> > > 
> > > I'm wondering if it is because we're building util-linux twice now and
> > > there is some key choke point in the dependency chain. I have no evidence
> > > for that yet, it is just speculation though.
> > 
> > With the autoconf options I've set, on my laptop it takes 32s to do
> > configure + make -j2. Most of that is autoconf - make -j2 takes 8s.
> > 
> > Only 3 libraries are built with this combination: libcommon.a,
> > libtcolors.a, and libuuid.a/so. No executables or anything else is
> > built. It doesn't look like libtcolors is actually needed, I'll see if
> > I can prepare a patch to skip it, but I don't think it will buy more
> > than 1s, it's just two object files.
> > 
> > The good news is that meson support is about to land upstream, which
> > should be significantly faster than autoconf + make:
> > 
> > https://github.com/karelzak/util-linux/commits/topic/meson
> 
> Meson definitely improves the speed! I was wondering if it was from
> configure for example.
> 
> I now have more performance test results in (takes time to interleave 
> them with testing of master):
> 
> https://autobuilder.yocto.io/pub/non-release/20210315-1/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210315005048_6bb1621815.html
> 
> and I think this means it isn't from the util-linux change but one of 
> another three. I'm not entirely convinced those changes could do this
> but it is what the data says. 
> 
> I've queued more bisection to narrow it down from there...
> 
> Cheers,
> 
> Richard

Ok, that's good news then (at least for me!) - in the meanwhile I had a
look at automake anyway, and found out the compile time can be halved
since libcommon and libtcolors are not needed by libuuid:

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

Not sure if worth backporting, as it's just a dozen object files, the
big time chunk is from autoconf anyway.

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-15 12:21                 ` Richard Purdie
  2021-03-15 13:04                   ` Luca Bocassi
@ 2021-03-15 13:55                   ` Martin Jansa
  2021-03-15 13:57                     ` Richard Purdie
       [not found]                     ` <166C88B2CBAB1BAF.20509@lists.openembedded.org>
  1 sibling, 2 replies; 74+ messages in thread
From: Martin Jansa @ 2021-03-15 13:55 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Luca Boccassi, openembedded-core, bluelightning

[-- Attachment #1: Type: text/plain, Size: 6367 bytes --]

On Mon, Mar 15, 2021 at 12:21:37PM +0000, Richard Purdie wrote:
> On Mon, 2021-03-15 at 11:50 +0000, Luca Boccassi wrote:
> > On Mon, 2021-03-15 at 10:49 +0000, Richard Purdie wrote:
> > > On Mon, 2021-03-15 at 10:44 +0000, Luca Boccassi wrote:
> > > > On Sun, 2021-03-14 at 22:10 +0000, Richard Purdie wrote:
> > > > > On Thu, 2021-03-11 at 15:09 +0000, luca.boccassi@gmail.com wrote:
> > > > > > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > > > 
> > > > > > Recently 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.
> > > > > > 
> > > > > > https://github.com/karelzak/util-linux/pull/898
> > > > > > 
> > > > > > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > > 
> > > > > Unfortunately I noticed we had a performance regression in buildtimes in 
> > > > > recent changes. The closest I have this narrowed down to so far:
> > > > > 
> > > > > https://autobuilder.yocto.io/pub/non-release/20210314-14/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210314181831_d42487bf52.html
> > > > > 
> > > > > suggests it may be this change. I have more tests queued to confirm
> > > > > that definitively, if so we'll have to figure out why as this shouldn't
> > > > > really happen, its an 8% regression :(.
> > > > 
> > > > Very strange that a single recipe could do that - is there something
> > > > wrong in the new .bb that I missed and could cause this?
> > > 
> > > I'm wondering if it is because we're building util-linux twice now and
> > > there is some key choke point in the dependency chain. I have no evidence
> > > for that yet, it is just speculation though.
> > 
> > With the autoconf options I've set, on my laptop it takes 32s to do
> > configure + make -j2. Most of that is autoconf - make -j2 takes 8s.
> > 
> > Only 3 libraries are built with this combination: libcommon.a,
> > libtcolors.a, and libuuid.a/so. No executables or anything else is
> > built. It doesn't look like libtcolors is actually needed, I'll see if
> > I can prepare a patch to skip it, but I don't think it will buy more
> > than 1s, it's just two object files.
> > 
> > The good news is that meson support is about to land upstream, which
> > should be significantly faster than autoconf + make:
> > 
> > https://github.com/karelzak/util-linux/commits/topic/meson
> 
> Meson definitely improves the speed! I was wondering if it was from
> configure for example.
> 
> I now have more performance test results in (takes time to interleave 
> them with testing of master):
> 
> https://autobuilder.yocto.io/pub/non-release/20210315-1/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210315005048_6bb1621815.html
> 
> and I think this means it isn't from the util-linux change but one of 
> another three. I'm not entirely convinced those changes could do this
> but it is what the data says. 
> 
> I've queued more bisection to narrow it down from there...

BTW: this split also needs manual cleanup in the TMPDIR, right?

Incremental build fails with:
ERROR: util-linux-uuid-2.36.2-r0 do_packagedata: The recipe util-linux-uuid is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
  /OE/build/oe-core/tmp-glibc/pkgdata/qemux86-64/shlibs2/util-linux-libuuid.list
    (matched in manifest-qemux86_64-util-linux.packagedata)
  /OE/build/oe-core/tmp-glibc/pkgdata/qemux86-64/runtime/util-linux-libuuid.packaged
    (matched in manifest-qemux86_64-util-linux.packagedata)
  /OE/build/oe-core/tmp-glibc/pkgdata/qemux86-64/runtime/util-linux-libuuid
    (matched in manifest-qemux86_64-util-linux.packagedata)
Please verify which recipe should provide the above files.

The build has stopped, as continuing in this scenario WILL break things - if not now, possibly in the future (we've seen builds fail several months later). If the system knew how to recover from this automatically it would, however there are several different scenarios which can result in this and we don't know which one this is. It may be you have switched providers of something like virtual/kernel (e.g. from linux-yocto to linux-yocto-dev), in that case you need to execute the clean task for both recipes and it will resolve this error. It may be you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning those recipes should again resolve this error, however switching DISTRO_FEATURES on an existing build directory is not supported - you should really clean out tmp and rebuild (reusing sstate should be safe). It could be the overlapping files detected are harmless in which case adding them to SSTATE_DUPWHITELIST may be the correct solution. It could also be your build is including two different conflicting versions of things (e.g. bluez 4 and bluez 5 and the correct solution for that would be to resolve the conflict. If in doubt, please ask on the mailing list, sharing the error and filelist above.
ERROR: util-linux-uuid-2.36.2-r0 do_packagedata: If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases.
ERROR: Logfile of failure stored in: /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/util-linux-uuid/2.36.2-r0/temp/log.do_packagedata.2055738
NOTE: recipe util-linux-uuid-2.36.2-r0: task do_packagedata: Failed
ERROR: Task (/OE/build/oe-core/openembedded-core/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb:do_packagedata) failed with exit code '1'

as util-linux-uuid doesn't depend on util-linux (and even cannot depend on it), then
nothing ensures that older util-linux (including libuuid) is removed from sstate-control
before this new separate util-linux-uuid is running packagedata.

Not sure if there is something we can do in cases like this and
bumping OELAYOUT_ABI because of this 1 recipe seems a bit overkill.

"bitbake -c clean util-linux" should be enough to unblock util-linux-uuid, but it
needs to be executed for every MACHINE (or at least every TUNE_PKGARCH) in given
TMPDIR.

Cheers,

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-15 13:55                   ` [OE-core] " Martin Jansa
@ 2021-03-15 13:57                     ` Richard Purdie
       [not found]                     ` <166C88B2CBAB1BAF.20509@lists.openembedded.org>
  1 sibling, 0 replies; 74+ messages in thread
From: Richard Purdie @ 2021-03-15 13:57 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Luca Boccassi, openembedded-core, bluelightning

On Mon, 2021-03-15 at 14:55 +0100, Martin Jansa wrote:
> On Mon, Mar 15, 2021 at 12:21:37PM +0000, Richard Purdie wrote:
> > On Mon, 2021-03-15 at 11:50 +0000, Luca Boccassi wrote:
> > > On Mon, 2021-03-15 at 10:49 +0000, Richard Purdie wrote:
> > > > On Mon, 2021-03-15 at 10:44 +0000, Luca Boccassi wrote:
> > > > > On Sun, 2021-03-14 at 22:10 +0000, Richard Purdie wrote:
> > > > > > On Thu, 2021-03-11 at 15:09 +0000, luca.boccassi@gmail.com wrote:
> > > > > > > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > > > > 
> > > > > > > Recently 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.
> > > > > > > 
> > > > > > > https://github.com/karelzak/util-linux/pull/898
> > > > > > > 
> > > > > > > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > > > 
> > > > > > Unfortunately I noticed we had a performance regression in buildtimes in 
> > > > > > recent changes. The closest I have this narrowed down to so far:
> > > > > > 
> > > > > > https://autobuilder.yocto.io/pub/non-release/20210314-14/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210314181831_d42487bf52.html
> > > > > > 
> > > > > > suggests it may be this change. I have more tests queued to confirm
> > > > > > that definitively, if so we'll have to figure out why as this shouldn't
> > > > > > really happen, its an 8% regression :(.
> > > > > 
> > > > > Very strange that a single recipe could do that - is there something
> > > > > wrong in the new .bb that I missed and could cause this?
> > > > 
> > > > I'm wondering if it is because we're building util-linux twice now and
> > > > there is some key choke point in the dependency chain. I have no evidence
> > > > for that yet, it is just speculation though.
> > > 
> > > With the autoconf options I've set, on my laptop it takes 32s to do
> > > configure + make -j2. Most of that is autoconf - make -j2 takes 8s.
> > > 
> > > Only 3 libraries are built with this combination: libcommon.a,
> > > libtcolors.a, and libuuid.a/so. No executables or anything else is
> > > built. It doesn't look like libtcolors is actually needed, I'll see if
> > > I can prepare a patch to skip it, but I don't think it will buy more
> > > than 1s, it's just two object files.
> > > 
> > > The good news is that meson support is about to land upstream, which
> > > should be significantly faster than autoconf + make:
> > > 
> > > https://github.com/karelzak/util-linux/commits/topic/meson
> > 
> > Meson definitely improves the speed! I was wondering if it was from
> > configure for example.
> > 
> > I now have more performance test results in (takes time to interleave 
> > them with testing of master):
> > 
> > https://autobuilder.yocto.io/pub/non-release/20210315-1/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210315005048_6bb1621815.html
> > 
> > and I think this means it isn't from the util-linux change but one of 
> > another three. I'm not entirely convinced those changes could do this
> > but it is what the data says. 
> > 
> > I've queued more bisection to narrow it down from there...
> 
> BTW: this split also needs manual cleanup in the TMPDIR, right?

It shouldn't. The system should spot that util-linux has changed and uninstall
it from the sysroots as it goes. There is something not working right there :(

Cheers,

Richard



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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
       [not found]                     ` <166C88B2CBAB1BAF.20509@lists.openembedded.org>
@ 2021-03-15 21:51                       ` Richard Purdie
  2021-03-24 16:52                         ` Scott Branden
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-03-15 21:51 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Luca Boccassi, openembedded-core, bluelightning

On Mon, 2021-03-15 at 13:57 +0000, Richard Purdie via lists.openembedded.org wrote:
> On Mon, 2021-03-15 at 14:55 +0100, Martin Jansa wrote:
> > On Mon, Mar 15, 2021 at 12:21:37PM +0000, Richard Purdie wrote:
> > > On Mon, 2021-03-15 at 11:50 +0000, Luca Boccassi wrote:
> > > > On Mon, 2021-03-15 at 10:49 +0000, Richard Purdie wrote:
> > > > > On Mon, 2021-03-15 at 10:44 +0000, Luca Boccassi wrote:
> > > > > > On Sun, 2021-03-14 at 22:10 +0000, Richard Purdie wrote:
> > > > > > > On Thu, 2021-03-11 at 15:09 +0000, luca.boccassi@gmail.com wrote:
> > > > > > > > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > > > > > 
> > > > > > > > Recently 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.
> > > > > > > > 
> > > > > > > > https://github.com/karelzak/util-linux/pull/898
> > > > > > > > 
> > > > > > > > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > > > > 
> > > > > > > Unfortunately I noticed we had a performance regression in buildtimes in 
> > > > > > > recent changes. The closest I have this narrowed down to so far:
> > > > > > > 
> > > > > > > https://autobuilder.yocto.io/pub/non-release/20210314-14/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210314181831_d42487bf52.html
> > > > > > > 
> > > > > > > suggests it may be this change. I have more tests queued to confirm
> > > > > > > that definitively, if so we'll have to figure out why as this shouldn't
> > > > > > > really happen, its an 8% regression :(.
> > > > > > 
> > > > > > Very strange that a single recipe could do that - is there something
> > > > > > wrong in the new .bb that I missed and could cause this?
> > > > > 
> > > > > I'm wondering if it is because we're building util-linux twice now and
> > > > > there is some key choke point in the dependency chain. I have no evidence
> > > > > for that yet, it is just speculation though.
> > > > 
> > > > With the autoconf options I've set, on my laptop it takes 32s to do
> > > > configure + make -j2. Most of that is autoconf - make -j2 takes 8s.
> > > > 
> > > > Only 3 libraries are built with this combination: libcommon.a,
> > > > libtcolors.a, and libuuid.a/so. No executables or anything else is
> > > > built. It doesn't look like libtcolors is actually needed, I'll see if
> > > > I can prepare a patch to skip it, but I don't think it will buy more
> > > > than 1s, it's just two object files.
> > > > 
> > > > The good news is that meson support is about to land upstream, which
> > > > should be significantly faster than autoconf + make:
> > > > 
> > > > https://github.com/karelzak/util-linux/commits/topic/meson
> > > 
> > > Meson definitely improves the speed! I was wondering if it was from
> > > configure for example.
> > > 
> > > I now have more performance test results in (takes time to interleave 
> > > them with testing of master):
> > > 
> > > https://autobuilder.yocto.io/pub/non-release/20210315-1/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210315005048_6bb1621815.html
> > > 
> > > and I think this means it isn't from the util-linux change but one of 
> > > another three. I'm not entirely convinced those changes could do this
> > > but it is what the data says. 
> > > 
> > > I've queued more bisection to narrow it down from there...
> > 
> > BTW: this split also needs manual cleanup in the TMPDIR, right?
> 
> It shouldn't. The system should spot that util-linux has changed and uninstall
> it from the sysroots as it goes. There is something not working right there :(

I was wrong about that, the system doesn't have code for this, it has code for
the sysroots but not for other sstate tasks.

I think this is an oversight and we need to simplify things and make this cleanup
happen pre-build, much like the "unreachable" tasks cleanup happens today. If we
do make this happen, we probably need to add parallelism as the number of stale
sstate tasks being cleaned could be substantial.

Cheers,

Richard








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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-15 21:51                       ` Richard Purdie
@ 2021-03-24 16:52                         ` Scott Branden
  2021-03-24 17:03                           ` Luca Boccassi
  0 siblings, 1 reply; 74+ messages in thread
From: Scott Branden @ 2021-03-24 16:52 UTC (permalink / raw)
  To: Richard Purdie, Martin Jansa
  Cc: Luca Boccassi, openembedded-core, bluelightning

[-- Attachment #1: Type: text/plain, Size: 5176 bytes --]

I have not debugged yet, but I suspect this change is causing the following failure if I merge the latest poky into our builds:

ERROR: mc:host:util-linux-uuid-2.36.2-r0 do_package: QA Issue: util-linux-uuid: Files/directories were installed but not shipped in any package:
  /usr/lib/debug
  /usr/lib/debug/usr
  /usr/lib/debug/usr/lib
  /usr/lib/debug/usr/lib/libuuid.so.1.3.0.debug
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
util-linux-uuid: 4 installed and not shipped files. [installed-vs-shipped]
ERROR: mc:host:util-linux-uuid-2.36.2-r0 do_package: Fatal QA errors found, failing task.
ERROR: Logfile of failure stored in: /hdd/yocto/genx/poky/build/tmp/work/core2-64-poky-linux/util-linux-uuid/2.36.2-r0/temp/log.do_package.31753
ERROR: Task (mc:host:/hdd/yocto/genx/poky/build/../meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb:do_package) failed with exit code '1'

On 2021-03-15 2:51 p.m., Richard Purdie wrote:
> On Mon, 2021-03-15 at 13:57 +0000, Richard Purdie via lists.openembedded.org wrote:
>> On Mon, 2021-03-15 at 14:55 +0100, Martin Jansa wrote:
>>> On Mon, Mar 15, 2021 at 12:21:37PM +0000, Richard Purdie wrote:
>>>> On Mon, 2021-03-15 at 11:50 +0000, Luca Boccassi wrote:
>>>>> On Mon, 2021-03-15 at 10:49 +0000, Richard Purdie wrote:
>>>>>> On Mon, 2021-03-15 at 10:44 +0000, Luca Boccassi wrote:
>>>>>>> On Sun, 2021-03-14 at 22:10 +0000, Richard Purdie wrote:
>>>>>>>> On Thu, 2021-03-11 at 15:09 +0000, luca.boccassi@gmail.com wrote:
>>>>>>>>> From: Luca Boccassi <luca.boccassi@microsoft.com>
>>>>>>>>>
>>>>>>>>> Recently 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.
>>>>>>>>>
>>>>>>>>> https://github.com/karelzak/util-linux/pull/898
>>>>>>>>>
>>>>>>>>> Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
>>>>>>>>
>>>>>>>> Unfortunately I noticed we had a performance regression in buildtimes in 
>>>>>>>> recent changes. The closest I have this narrowed down to so far:
>>>>>>>>
>>>>>>>> https://autobuilder.yocto.io/pub/non-release/20210314-14/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210314181831_d42487bf52.html
>>>>>>>>
>>>>>>>> suggests it may be this change. I have more tests queued to confirm
>>>>>>>> that definitively, if so we'll have to figure out why as this shouldn't
>>>>>>>> really happen, its an 8% regression :(.
>>>>>>>
>>>>>>> Very strange that a single recipe could do that - is there something
>>>>>>> wrong in the new .bb that I missed and could cause this?
>>>>>>
>>>>>> I'm wondering if it is because we're building util-linux twice now and
>>>>>> there is some key choke point in the dependency chain. I have no evidence
>>>>>> for that yet, it is just speculation though.
>>>>>
>>>>> With the autoconf options I've set, on my laptop it takes 32s to do
>>>>> configure + make -j2. Most of that is autoconf - make -j2 takes 8s.
>>>>>
>>>>> Only 3 libraries are built with this combination: libcommon.a,
>>>>> libtcolors.a, and libuuid.a/so. No executables or anything else is
>>>>> built. It doesn't look like libtcolors is actually needed, I'll see if
>>>>> I can prepare a patch to skip it, but I don't think it will buy more
>>>>> than 1s, it's just two object files.
>>>>>
>>>>> The good news is that meson support is about to land upstream, which
>>>>> should be significantly faster than autoconf + make:
>>>>>
>>>>> https://github.com/karelzak/util-linux/commits/topic/meson
>>>>
>>>> Meson definitely improves the speed! I was wondering if it was from
>>>> configure for example.
>>>>
>>>> I now have more performance test results in (takes time to interleave 
>>>> them with testing of master):
>>>>
>>>> https://autobuilder.yocto.io/pub/non-release/20210315-1/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210315005048_6bb1621815.html
>>>>
>>>> and I think this means it isn't from the util-linux change but one of 
>>>> another three. I'm not entirely convinced those changes could do this
>>>> but it is what the data says. 
>>>>
>>>> I've queued more bisection to narrow it down from there...
>>>
>>> BTW: this split also needs manual cleanup in the TMPDIR, right?
>>
>> It shouldn't. The system should spot that util-linux has changed and uninstall
>> it from the sysroots as it goes. There is something not working right there :(
> 
> I was wrong about that, the system doesn't have code for this, it has code for
> the sysroots but not for other sstate tasks.
> 
> I think this is an oversight and we need to simplify things and make this cleanup
> happen pre-build, much like the "unreachable" tasks cleanup happens today. If we
> do make this happen, we probably need to add parallelism as the number of stale
> sstate tasks being cleaned could be substantial.
> 
> Cheers,
> 
> Richard
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4212 bytes --]

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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-24 16:52                         ` Scott Branden
@ 2021-03-24 17:03                           ` Luca Boccassi
  2021-03-24 17:37                             ` Richard Purdie
  0 siblings, 1 reply; 74+ messages in thread
From: Luca Boccassi @ 2021-03-24 17:03 UTC (permalink / raw)
  To: richard.purdie, scott.branden, martin.jansa
  Cc: openembedded-core, bluelightning

On Wed, 2021-03-24 at 09:52 -0700, Scott Branden wrote:
> I have not debugged yet, but I suspect this change is causing the following failure if I merge the latest poky into our builds:
> 
> ERROR: mc:host:util-linux-uuid-2.36.2-r0 do_package: QA Issue: util-linux-uuid: Files/directories were installed but not shipped in any package:
>   /usr/lib/debug
>   /usr/lib/debug/usr
>   /usr/lib/debug/usr/lib
>   /usr/lib/debug/usr/lib/libuuid.so.1.3.0.debug
> Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
> util-linux-uuid: 4 installed and not shipped files. [installed-vs-shipped]
> ERROR: mc:host:util-linux-uuid-2.36.2-r0 do_package: Fatal QA errors found, failing task.
> ERROR: Logfile of failure stored in: /hdd/yocto/genx/poky/build/tmp/work/core2-64-poky-linux/util-linux-uuid/2.36.2-r0/temp/log.do_package.31753
> ERROR: Task (mc:host:/hdd/yocto/genx/poky/build/../meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb:do_package) failed with exit code '1'

It most certainly is - is /usr/lib/debug configurable or supported?
Currently we have:

FILES_util-linux-libuuid-dbg = "/usr/src ${libdir}/.debug"

I'll send a patch to extend it and include /usr/lib/debug too

> On 2021-03-15 2:51 p.m., Richard Purdie wrote:
> > On Mon, 2021-03-15 at 13:57 +0000, Richard Purdie via lists.openembedded.org wrote:
> > > On Mon, 2021-03-15 at 14:55 +0100, Martin Jansa wrote:
> > > > On Mon, Mar 15, 2021 at 12:21:37PM +0000, Richard Purdie wrote:
> > > > > On Mon, 2021-03-15 at 11:50 +0000, Luca Boccassi wrote:
> > > > > > On Mon, 2021-03-15 at 10:49 +0000, Richard Purdie wrote:
> > > > > > > On Mon, 2021-03-15 at 10:44 +0000, Luca Boccassi wrote:
> > > > > > > > On Sun, 2021-03-14 at 22:10 +0000, Richard Purdie wrote:
> > > > > > > > > On Thu, 2021-03-11 at 15:09 +0000, luca.boccassi@gmail.com wrote:
> > > > > > > > > > From: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > > > > > > > 
> > > > > > > > > > Recently 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.
> > > > > > > > > > 
> > > > > > > > > > https://github.com/karelzak/util-linux/pull/898
> > > > > > > > > > 
> > > > > > > > > > Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > > > > > > 
> > > > > > > > > Unfortunately I noticed we had a performance regression in buildtimes in 
> > > > > > > > > recent changes. The closest I have this narrowed down to so far:
> > > > > > > > > 
> > > > > > > > > https://autobuilder.yocto.io/pub/non-release/20210314-14/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210314181831_d42487bf52.html
> > > > > > > > > 
> > > > > > > > > suggests it may be this change. I have more tests queued to confirm
> > > > > > > > > that definitively, if so we'll have to figure out why as this shouldn't
> > > > > > > > > really happen, its an 8% regression :(.
> > > > > > > > 
> > > > > > > > Very strange that a single recipe could do that - is there something
> > > > > > > > wrong in the new .bb that I missed and could cause this?
> > > > > > > 
> > > > > > > I'm wondering if it is because we're building util-linux twice now and
> > > > > > > there is some key choke point in the dependency chain. I have no evidence
> > > > > > > for that yet, it is just speculation though.
> > > > > > 
> > > > > > With the autoconf options I've set, on my laptop it takes 32s to do
> > > > > > configure + make -j2. Most of that is autoconf - make -j2 takes 8s.
> > > > > > 
> > > > > > Only 3 libraries are built with this combination: libcommon.a,
> > > > > > libtcolors.a, and libuuid.a/so. No executables or anything else is
> > > > > > built. It doesn't look like libtcolors is actually needed, I'll see if
> > > > > > I can prepare a patch to skip it, but I don't think it will buy more
> > > > > > than 1s, it's just two object files.
> > > > > > 
> > > > > > The good news is that meson support is about to land upstream, which
> > > > > > should be significantly faster than autoconf + make:
> > > > > > 
> > > > > > https://github.com/karelzak/util-linux/commits/topic/meson
> > > > > 
> > > > > Meson definitely improves the speed! I was wondering if it was from
> > > > > configure for example.
> > > > > 
> > > > > I now have more performance test results in (takes time to interleave 
> > > > > them with testing of master):
> > > > > 
> > > > > https://autobuilder.yocto.io/pub/non-release/20210315-1/testresults/buildperf-ubuntu1604/perf-ubuntu1604_master_20210315005048_6bb1621815.html
> > > > > 
> > > > > and I think this means it isn't from the util-linux change but one of 
> > > > > another three. I'm not entirely convinced those changes could do this
> > > > > but it is what the data says. 
> > > > > 
> > > > > I've queued more bisection to narrow it down from there...
> > > > 
> > > > BTW: this split also needs manual cleanup in the TMPDIR, right?
> > > 
> > > It shouldn't. The system should spot that util-linux has changed and uninstall
> > > it from the sysroots as it goes. There is something not working right there :(
> > 
> > I was wrong about that, the system doesn't have code for this, it has code for
> > the sysroots but not for other sstate tasks.
> > 
> > I think this is an oversight and we need to simplify things and make this cleanup
> > happen pre-build, much like the "unreachable" tasks cleanup happens today. If we
> > do make this happen, we probably need to add parallelism as the number of stale
> > sstate tasks being cleaned could be substantial.
> > 
> > Cheers,
> > 
> > Richard
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 


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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-24 17:03                           ` Luca Boccassi
@ 2021-03-24 17:37                             ` Richard Purdie
  2021-03-24 17:52                               ` Luca Bocassi
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-03-24 17:37 UTC (permalink / raw)
  To: Luca Boccassi, scott.branden, martin.jansa
  Cc: openembedded-core, bluelightning

On Wed, 2021-03-24 at 17:03 +0000, Luca Boccassi wrote:
> On Wed, 2021-03-24 at 09:52 -0700, Scott Branden wrote:
> > I have not debugged yet, but I suspect this change is causing the following failure if I merge the latest poky into our builds:
> > 
> > ERROR: mc:host:util-linux-uuid-2.36.2-r0 do_package: QA Issue: util-linux-uuid: Files/directories were installed but not shipped in any package:
> >   /usr/lib/debug
> >   /usr/lib/debug/usr
> >   /usr/lib/debug/usr/lib
> >   /usr/lib/debug/usr/lib/libuuid.so.1.3.0.debug
> > Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
> > util-linux-uuid: 4 installed and not shipped files. [installed-vs-shipped]
> > ERROR: mc:host:util-linux-uuid-2.36.2-r0 do_package: Fatal QA errors found, failing task.
> > ERROR: Logfile of failure stored in: /hdd/yocto/genx/poky/build/tmp/work/core2-64-poky-linux/util-linux-uuid/2.36.2-r0/temp/log.do_package.31753
> > ERROR: Task (mc:host:/hdd/yocto/genx/poky/build/../meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb:do_package) failed with exit code '1'
> 
> It most certainly is - is /usr/lib/debug configurable or supported?
> Currently we have:
> 
> FILES_util-linux-libuuid-dbg = "/usr/src ${libdir}/.debug"

Does it need to be set at all or will the default not cover this?

Cheers,

Richard


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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-24 17:37                             ` Richard Purdie
@ 2021-03-24 17:52                               ` Luca Bocassi
  0 siblings, 0 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-03-24 17:52 UTC (permalink / raw)
  To: Richard Purdie, scott.branden, martin.jansa
  Cc: openembedded-core, bluelightning

[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]

On Wed, 2021-03-24 at 17:37 +0000, Richard Purdie wrote:
> On Wed, 2021-03-24 at 17:03 +0000, Luca Boccassi wrote:
> > On Wed, 2021-03-24 at 09:52 -0700, Scott Branden wrote:
> > > I have not debugged yet, but I suspect this change is causing the following failure if I merge the latest poky into our builds:
> > > 
> > > ERROR: mc:host:util-linux-uuid-2.36.2-r0 do_package: QA Issue: util-linux-uuid: Files/directories were installed but not shipped in any package:
> > >   /usr/lib/debug
> > >   /usr/lib/debug/usr
> > >   /usr/lib/debug/usr/lib
> > >   /usr/lib/debug/usr/lib/libuuid.so.1.3.0.debug
> > > Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
> > > util-linux-uuid: 4 installed and not shipped files. [installed-vs-shipped]
> > > ERROR: mc:host:util-linux-uuid-2.36.2-r0 do_package: Fatal QA errors found, failing task.
> > > ERROR: Logfile of failure stored in: /hdd/yocto/genx/poky/build/tmp/work/core2-64-poky-linux/util-linux-uuid/2.36.2-r0/temp/log.do_package.31753
> > > ERROR: Task (mc:host:/hdd/yocto/genx/poky/build/../meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb:do_package) failed with exit code '1'
> > 
> > It most certainly is - is /usr/lib/debug configurable or supported?
> > Currently we have:
> > 
> > FILES_util-linux-libuuid-dbg = "/usr/src ${libdir}/.debug"
> 
> Does it need to be set at all or will the default not cover this?
> 
> Cheers,
> 
> Richard

IIRC there were QA failures without it, but I cannot remember exactly.

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-11 15:09       ` [PATCH v11] " Luca Bocassi
  2021-03-14 22:10         ` Richard Purdie
@ 2021-03-25  9:17         ` Oleksiy Obitotskyy
  2021-03-25  9:34           ` Richard Purdie
  1 sibling, 1 reply; 74+ messages in thread
From: Oleksiy Obitotskyy @ 2021-03-25  9:17 UTC (permalink / raw)
  To: Luca Bocassi, openembedded-core; +Cc: richard.purdie, bluelightning

Could you look into this warning.

WARNING: util-linux-2.36.2-r0 do_package_qa: QA Issue: util-linux-dev rdepends on util-linux-libuuid-dev, but it isn't a build dependency? [build-deps]

https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3226

Regards,
Oleksiy

________________________________________
From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> on behalf of Luca Bocassi <luca.boccassi@gmail.com>
Sent: Thursday, March 11, 2021 17:09
To: openembedded-core@lists.openembedded.org
Cc: richard.purdie@linuxfoundation.org; bluelightning@bluelightning.org
Subject: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping

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

Recently 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.

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
v4: added RDEPENDS on util-linux-libuuid on various packages to fix QA warnings
v5: remove RDEPENDS and instead have util-linux RDEPEND on util-linux-uuid.
    Removed PACKAGES_remove and instead filter out libuuid via the package generation
    regex.
    Rebased on util-linux 2.36.2.
v6: install libuuid.a in libuuid-dev
    change rdepends on uuid to use binary package rather than source
    add rdepends on uuid-dev to libuuid-dev
    remove rprovides of libuuid-dev from uuid-dev
v7: do not use '_append' for RDEPENDS, as it is not supported by BBCLASSEXTEND, use
    simply '+='
v8: added missing libuuid-staticdev package
    remove libx32/libuuid* too
v9: set RECIPE_MAINTAINER_pn-util-linux-uuid, same value as RECIPE_MAINTAINER_pn-util-linux
v10: removed DEBIAN_NOAUTONAME
     remove lib64/libuuid* too
v11: use ${D}${base_libdir}/libuuid* instead of manually specifying /lib|/libx32|/lib64

 meta/conf/distro/include/maintainers.inc      |  1 +
 .../util-linux/util-linux-uuid_2.36.2.bb      | 20 +++++++
 meta/recipes-core/util-linux/util-linux.inc   | 41 +++++++++++++
 .../util-linux/util-linux_2.36.2.bb           | 57 +++++--------------
 4 files changed, 77 insertions(+), 42 deletions(-)
 create mode 100644 meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
 create mode 100644 meta/recipes-core/util-linux/util-linux.inc

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 3d8e3d5de0..c6a97bc280 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -720,6 +720,7 @@ RECIPE_MAINTAINER_pn-update-rc.d = "Ross Burton <ross.burton@arm.com>"
 RECIPE_MAINTAINER_pn-usbinit = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-usbutils = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-util-linux = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-util-linux-uuid = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER_pn-util-macros = "Armin Kuster <akuster808@gmail.com>"
 RECIPE_MAINTAINER_pn-v86d = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-vala = "Alexander Kanavin <alex.kanavin@gmail.com>"
diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
new file mode 100644
index 0000000000..65e4d23b7e
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb
@@ -0,0 +1,20 @@
+# 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"
+PACKAGES = "util-linux-libuuid util-linux-libuuid-dev util-linux-libuuid-staticdev 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-staticdev = "${libdir}/libuuid.a"
+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..b4f817ed82
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -0,0 +1,41 @@
+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 \
+"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:"
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+BPN = "util-linux"
+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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
diff --git a/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
index 19950a2726..50a70cd452 100644
--- a/meta/recipes-core/util-linux/util-linux_2.36.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.36.2.bb
@@ -1,46 +1,8 @@
-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] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f"
+DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid"

 PACKAGES =+ "${PN}-swaponoff"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}"
@@ -87,8 +49,9 @@ python util_linux_binpackages () {
 # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS
 PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages "

+# skip libuuid as it will be packaged by the util-linux-uuid recipe
 python util_linux_libpackages() {
-    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$',
+    do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(?!uuid)(.*)\.so\..*$',
                       output_pattern='${PN}-lib%s',
                       description='${PN} lib%s',
                       extra_depends='', prepend=True, allow_links=True)
@@ -141,6 +104,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}'"

@@ -165,7 +129,10 @@ RRECOMMENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""

-RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
+RDEPENDS_${PN} += " util-linux-libuuid"
+RDEPENDS_${PN}-dev += " util-linux-libuuid-dev"
+
+RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev"

 RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
 RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz"
@@ -234,6 +201,12 @@ do_install_append_class-native () {
        rm -f ${D}${base_bindir}/kill
 }

+# 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}${base_libdir}/libuuid*
+}
+
 ALTERNATIVE_PRIORITY = "80"

 ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
--
2.29.2


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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-25  9:17         ` Oleksiy Obitotskyy
@ 2021-03-25  9:34           ` Richard Purdie
  2021-03-25  9:48             ` Luca Bocassi
  2021-03-25 14:22             ` Peter Kjellerstedt
  0 siblings, 2 replies; 74+ messages in thread
From: Richard Purdie @ 2021-03-25  9:34 UTC (permalink / raw)
  To: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco),
	Luca Bocassi, openembedded-core
  Cc: bluelightning, Peter Kjellerstedt, Khem Raj

On Thu, 2021-03-25 at 09:17 +0000, Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco) wrote:
> Could you look into this warning.
> 
> WARNING: util-linux-2.36.2-r0 do_package_qa: QA Issue: util-linux-dev rdepends on util-linux-libuuid-dev, but it isn't a build dependency? [build-deps]
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3226

That failure was my fault when testing some fixes.

I've sent out a patch which renames util-linux-uuid to util-linux-libuuid
and sorts out the license issue Peter reported.

I'm optimistic this fixes the various issues people have been having
and simplifies the recipe a bit as an added bonus.

The patch has already tested cleanly on the autobuilder (the above warning
was from an earlier aborted build before I opted to rename the recipe).

Khem: Thanks for the related meta-oe tweak, I think the rename whilst 
slightly painful now is the best way forward overall.

Cheers,

Richard


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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-25  9:34           ` Richard Purdie
@ 2021-03-25  9:48             ` Luca Bocassi
  2021-03-25 14:22             ` Peter Kjellerstedt
  1 sibling, 0 replies; 74+ messages in thread
From: Luca Bocassi @ 2021-03-25  9:48 UTC (permalink / raw)
  To: Richard Purdie,
	Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco),
	openembedded-core
  Cc: bluelightning, Peter Kjellerstedt, Khem Raj

On Thu, 2021-03-25 at 09:34 +0000, Richard Purdie wrote:
> On Thu, 2021-03-25 at 09:17 +0000, Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco) wrote:
> > Could you look into this warning.
> > 
> > WARNING: util-linux-2.36.2-r0 do_package_qa: QA Issue: util-linux-dev rdepends on util-linux-libuuid-dev, but it isn't a build dependency? [build-deps]
> > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3226
> 
> That failure was my fault when testing some fixes.
> 
> I've sent out a patch which renames util-linux-uuid to util-linux-libuuid
> and sorts out the license issue Peter reported.
> 
> I'm optimistic this fixes the various issues people have been having
> and simplifies the recipe a bit as an added bonus.
> 
> The patch has already tested cleanly on the autobuilder (the above warning
> was from an earlier aborted build before I opted to rename the recipe).
> 
> Khem: Thanks for the related meta-oe tweak, I think the rename whilst 
> slightly painful now is the best way forward overall.
> 
> Cheers,
> 
> Richard

Looks good to me, thanks!

-- 
Kind regards,
Luca Boccassi


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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-25  9:34           ` Richard Purdie
  2021-03-25  9:48             ` Luca Bocassi
@ 2021-03-25 14:22             ` Peter Kjellerstedt
  2021-03-25 14:27               ` Richard Purdie
  1 sibling, 1 reply; 74+ messages in thread
From: Peter Kjellerstedt @ 2021-03-25 14:22 UTC (permalink / raw)
  To: Richard Purdie,
	Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco),
	Luca Bocassi, openembedded-core
  Cc: bluelightning, Khem Raj

> -----Original Message-----
> From: Richard Purdie <richard.purdie@linuxfoundation.org>
> Sent: den 25 mars 2021 10:34
> To: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco)
> <oobitots@cisco.com>; Luca Bocassi <luca.boccassi@gmail.com>;
> openembedded-core@lists.openembedded.org
> Cc: bluelightning@bluelightning.org; Peter Kjellerstedt
> <peter.kjellerstedt@axis.com>; Khem Raj <raj.khem@gmail.com>
> Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> recipe to allow bootstrapping
> 
> On Thu, 2021-03-25 at 09:17 +0000, Oleksiy Obitotskyi -X (oobitots -
> GLOBALLOGIC INC at Cisco) wrote:
> > Could you look into this warning.
> >
> > WARNING: util-linux-2.36.2-r0 do_package_qa: QA Issue: util-linux-dev
> rdepends on util-linux-libuuid-dev, but it isn't a build dependency?
> [build-deps]
> >
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3226
> 
> That failure was my fault when testing some fixes.
> 
> I've sent out a patch which renames util-linux-uuid to util-linux-libuuid
> and sorts out the license issue Peter reported.

I don't mind the recipe being renamed and cleaned up, but I would prefer 
to see my entire patch for the license parts being either integrated before 
this or squashed into it, whichever you prefer. It does not make sense to 
use the same LIC_FILES_CHKSUM for util-linux-libuuid as for util-linux, 
and setting the other LICENSE variables in util-linux.inc no longer makes 
sense as they are only relevant for util-linux.

> I'm optimistic this fixes the various issues people have been having
> and simplifies the recipe a bit as an added bonus.
> 
> The patch has already tested cleanly on the autobuilder (the above warning
> was from an earlier aborted build before I opted to rename the recipe).
> 
> Khem: Thanks for the related meta-oe tweak, I think the rename whilst
> slightly painful now is the best way forward overall.
> 
> Cheers,
> 
> Richard

//Peter


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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-25 14:22             ` Peter Kjellerstedt
@ 2021-03-25 14:27               ` Richard Purdie
  2021-03-25 15:45                 ` Luca Bocassi
  2021-03-25 16:19                 ` Peter Kjellerstedt
  0 siblings, 2 replies; 74+ messages in thread
From: Richard Purdie @ 2021-03-25 14:27 UTC (permalink / raw)
  To: Peter Kjellerstedt,
	Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco),
	Luca Bocassi, openembedded-core
  Cc: bluelightning, Khem Raj

On Thu, 2021-03-25 at 14:22 +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > Sent: den 25 mars 2021 10:34
> > To: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco)
> > <oobitots@cisco.com>; Luca Bocassi <luca.boccassi@gmail.com>;
> > openembedded-core@lists.openembedded.org
> > Cc: bluelightning@bluelightning.org; Peter Kjellerstedt
> > <peter.kjellerstedt@axis.com>; Khem Raj <raj.khem@gmail.com>
> > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> > recipe to allow bootstrapping
> > 
> > On Thu, 2021-03-25 at 09:17 +0000, Oleksiy Obitotskyi -X (oobitots -
> > GLOBALLOGIC INC at Cisco) wrote:
> > > Could you look into this warning.
> > > 
> > > WARNING: util-linux-2.36.2-r0 do_package_qa: QA Issue: util-linux-dev
> > rdepends on util-linux-libuuid-dev, but it isn't a build dependency?
> > [build-deps]
> > > 
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3226
> > 
> > That failure was my fault when testing some fixes.
> > 
> > I've sent out a patch which renames util-linux-uuid to util-linux-libuuid
> > and sorts out the license issue Peter reported.
> 
> I don't mind the recipe being renamed and cleaned up, but I would prefer 
> to see my entire patch for the license parts being either integrated before 
> this or squashed into it, whichever you prefer. It does not make sense to 
> use the same LIC_FILES_CHKSUM for util-linux-libuuid as for util-linux, 
> and setting the other LICENSE variables in util-linux.inc no longer makes 
> sense as they are only relevant for util-linux.

I'm torn on that. Code with the other licenses is present, just not used
in the final output and I personally suspect that having one LIC_FILES_CHKSUM 
is going to be easier to maintain in the future rather than two separate ones.

Cheers,

Richard




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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-25 14:27               ` Richard Purdie
@ 2021-03-25 15:45                 ` Luca Bocassi
  2021-03-25 16:01                   ` Khem Raj
  2021-03-25 16:19                 ` Peter Kjellerstedt
  1 sibling, 1 reply; 74+ messages in thread
From: Luca Bocassi @ 2021-03-25 15:45 UTC (permalink / raw)
  To: Richard Purdie, Peter Kjellerstedt,
	Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco),
	openembedded-core
  Cc: bluelightning, Khem Raj

On Thu, 2021-03-25 at 14:27 +0000, Richard Purdie wrote:
> On Thu, 2021-03-25 at 14:22 +0000, Peter Kjellerstedt wrote:
> > > -----Original Message-----
> > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > Sent: den 25 mars 2021 10:34
> > > To: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco)
> > > <oobitots@cisco.com>; Luca Bocassi <luca.boccassi@gmail.com>;
> > > openembedded-core@lists.openembedded.org
> > > Cc: bluelightning@bluelightning.org; Peter Kjellerstedt
> > > <peter.kjellerstedt@axis.com>; Khem Raj <raj.khem@gmail.com>
> > > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> > > recipe to allow bootstrapping
> > > 
> > > On Thu, 2021-03-25 at 09:17 +0000, Oleksiy Obitotskyi -X (oobitots -
> > > GLOBALLOGIC INC at Cisco) wrote:
> > > > Could you look into this warning.
> > > > 
> > > > WARNING: util-linux-2.36.2-r0 do_package_qa: QA Issue: util-linux-dev
> > > rdepends on util-linux-libuuid-dev, but it isn't a build dependency?
> > > [build-deps]
> > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3226
> > > 
> > > That failure was my fault when testing some fixes.
> > > 
> > > I've sent out a patch which renames util-linux-uuid to util-linux-libuuid
> > > and sorts out the license issue Peter reported.
> > 
> > I don't mind the recipe being renamed and cleaned up, but I would prefer 
> > to see my entire patch for the license parts being either integrated before 
> > this or squashed into it, whichever you prefer. It does not make sense to 
> > use the same LIC_FILES_CHKSUM for util-linux-libuuid as for util-linux, 
> > and setting the other LICENSE variables in util-linux.inc no longer makes 
> > sense as they are only relevant for util-linux.
> 
> I'm torn on that. Code with the other licenses is present, just not used
> in the final output and I personally suspect that having one LIC_FILES_CHKSUM 
> is going to be easier to maintain in the future rather than two separate ones.

FWIW, in Debian the license definitions always cover the _sources_, not
the built binaries. IOW: even if you don't build and distribute a
subtool, the license metadata must cover it. I'd think this would be
even more important for Yocto since you exclusively distribute sources,
not binaries.

-- 
Kind regards,
Luca Boccassi


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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-25 15:45                 ` Luca Bocassi
@ 2021-03-25 16:01                   ` Khem Raj
  0 siblings, 0 replies; 74+ messages in thread
From: Khem Raj @ 2021-03-25 16:01 UTC (permalink / raw)
  To: Luca Boccassi
  Cc: Richard Purdie, Peter Kjellerstedt,
	Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco),
	openembedded-core, bluelightning

On Thu, Mar 25, 2021 at 8:45 AM Luca Boccassi <luca.boccassi@gmail.com> wrote:
>
> On Thu, 2021-03-25 at 14:27 +0000, Richard Purdie wrote:
> > On Thu, 2021-03-25 at 14:22 +0000, Peter Kjellerstedt wrote:
> > > > -----Original Message-----
> > > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > > Sent: den 25 mars 2021 10:34
> > > > To: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco)
> > > > <oobitots@cisco.com>; Luca Bocassi <luca.boccassi@gmail.com>;
> > > > openembedded-core@lists.openembedded.org
> > > > Cc: bluelightning@bluelightning.org; Peter Kjellerstedt
> > > > <peter.kjellerstedt@axis.com>; Khem Raj <raj.khem@gmail.com>
> > > > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> > > > recipe to allow bootstrapping
> > > >
> > > > On Thu, 2021-03-25 at 09:17 +0000, Oleksiy Obitotskyi -X (oobitots -
> > > > GLOBALLOGIC INC at Cisco) wrote:
> > > > > Could you look into this warning.
> > > > >
> > > > > WARNING: util-linux-2.36.2-r0 do_package_qa: QA Issue: util-linux-dev
> > > > rdepends on util-linux-libuuid-dev, but it isn't a build dependency?
> > > > [build-deps]
> > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3226
> > > >
> > > > That failure was my fault when testing some fixes.
> > > >
> > > > I've sent out a patch which renames util-linux-uuid to util-linux-libuuid
> > > > and sorts out the license issue Peter reported.
> > >
> > > I don't mind the recipe being renamed and cleaned up, but I would prefer
> > > to see my entire patch for the license parts being either integrated before
> > > this or squashed into it, whichever you prefer. It does not make sense to
> > > use the same LIC_FILES_CHKSUM for util-linux-libuuid as for util-linux,
> > > and setting the other LICENSE variables in util-linux.inc no longer makes
> > > sense as they are only relevant for util-linux.
> >
> > I'm torn on that. Code with the other licenses is present, just not used
> > in the final output and I personally suspect that having one LIC_FILES_CHKSUM
> > is going to be easier to maintain in the future rather than two separate ones.
>
> FWIW, in Debian the license definitions always cover the _sources_, not
> the built binaries. IOW: even if you don't build and distribute a
> subtool, the license metadata must cover it. I'd think this would be
> even more important for Yocto since you exclusively distribute sources,
> not binaries.

ideally, it would be good to have both expressed distinctly since we also have
tooling for end users to create manifests for whats strictly on target
images. we perhaps
need source license which is perhaps at recipe level and then target
license which is at package level.

>
> --
> Kind regards,
> Luca Boccassi
>

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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-25 14:27               ` Richard Purdie
  2021-03-25 15:45                 ` Luca Bocassi
@ 2021-03-25 16:19                 ` Peter Kjellerstedt
  2021-03-25 16:51                   ` Richard Purdie
  1 sibling, 1 reply; 74+ messages in thread
From: Peter Kjellerstedt @ 2021-03-25 16:19 UTC (permalink / raw)
  To: Richard Purdie,
	Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco),
	Luca Bocassi, openembedded-core
  Cc: bluelightning, Khem Raj

> -----Original Message-----
> From: Richard Purdie <richard.purdie@linuxfoundation.org>
> Sent: den 25 mars 2021 15:27
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Oleksiy Obitotskyi -
> X (oobitots - GLOBALLOGIC INC at Cisco) <oobitots@cisco.com>; Luca Bocassi
> <luca.boccassi@gmail.com>; openembedded-core@lists.openembedded.org
> Cc: bluelightning@bluelightning.org; Khem Raj <raj.khem@gmail.com>
> Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> recipe to allow bootstrapping
> 
> On Thu, 2021-03-25 at 14:22 +0000, Peter Kjellerstedt wrote:
> > > -----Original Message-----
> > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > Sent: den 25 mars 2021 10:34
> > > To: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco)
> > > <oobitots@cisco.com>; Luca Bocassi <luca.boccassi@gmail.com>;
> > > openembedded-core@lists.openembedded.org
> > > Cc: bluelightning@bluelightning.org; Peter Kjellerstedt
> > > <peter.kjellerstedt@axis.com>; Khem Raj <raj.khem@gmail.com>
> > > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> > > recipe to allow bootstrapping
> > >
> > > On Thu, 2021-03-25 at 09:17 +0000, Oleksiy Obitotskyi -X (oobitots -
> > > GLOBALLOGIC INC at Cisco) wrote:
> > > > Could you look into this warning.
> > > >
> > > > WARNING: util-linux-2.36.2-r0 do_package_qa: QA Issue: util-linux-
> dev
> > > rdepends on util-linux-libuuid-dev, but it isn't a build dependency?
> > > [build-deps]
> > > >
> > > >
> https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3226
> > >
> > > That failure was my fault when testing some fixes.
> > >
> > > I've sent out a patch which renames util-linux-uuid to util-linux-
> libuuid
> > > and sorts out the license issue Peter reported.
> >
> > I don't mind the recipe being renamed and cleaned up, but I would prefer
> > to see my entire patch for the license parts being either integrated
> before
> > this or squashed into it, whichever you prefer. It does not make sense
> to
> > use the same LIC_FILES_CHKSUM for util-linux-libuuid as for util-linux,
> > and setting the other LICENSE variables in util-linux.inc no longer
> makes
> > sense as they are only relevant for util-linux.
> 
> I'm torn on that. Code with the other licenses is present, just not used
> in the final output and I personally suspect that having one LIC_FILES_CHKSUM
> is going to be easier to maintain in the future rather than two separate
> ones.

I actually checked all the files that go into -dev and -src before suggesting 
this change, and all files are either marked as public domain or use a 
BSD-3-Clause license.

> Cheers,
> 
> Richard

//Peter


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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-25 16:19                 ` Peter Kjellerstedt
@ 2021-03-25 16:51                   ` Richard Purdie
  2021-03-26 18:06                     ` Peter Kjellerstedt
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-03-25 16:51 UTC (permalink / raw)
  To: Peter Kjellerstedt,
	Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco),
	Luca Bocassi, openembedded-core
  Cc: bluelightning, Khem Raj

On Thu, 2021-03-25 at 16:19 +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > Sent: den 25 mars 2021 15:27
> > To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Oleksiy Obitotskyi -
> > X (oobitots - GLOBALLOGIC INC at Cisco) <oobitots@cisco.com>; Luca Bocassi
> > <luca.boccassi@gmail.com>; openembedded-core@lists.openembedded.org
> > Cc: bluelightning@bluelightning.org; Khem Raj <raj.khem@gmail.com>
> > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> > recipe to allow bootstrapping
> > 
> > On Thu, 2021-03-25 at 14:22 +0000, Peter Kjellerstedt wrote:
> > > > -----Original Message-----
> > > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > > Sent: den 25 mars 2021 10:34
> > > > To: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco)
> > > > <oobitots@cisco.com>; Luca Bocassi <luca.boccassi@gmail.com>;
> > > > openembedded-core@lists.openembedded.org
> > > > Cc: bluelightning@bluelightning.org; Peter Kjellerstedt
> > > > <peter.kjellerstedt@axis.com>; Khem Raj <raj.khem@gmail.com>
> > > > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> > > > recipe to allow bootstrapping
> > > > 
> > > > On Thu, 2021-03-25 at 09:17 +0000, Oleksiy Obitotskyi -X (oobitots -
> > > > GLOBALLOGIC INC at Cisco) wrote:
> > > > > Could you look into this warning.
> > > > > 
> > > > > WARNING: util-linux-2.36.2-r0 do_package_qa: QA Issue: util-linux-
> > dev
> > > > rdepends on util-linux-libuuid-dev, but it isn't a build dependency?
> > > > [build-deps]
> > > > > 
> > > > > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3226
> > > > 
> > > > That failure was my fault when testing some fixes.
> > > > 
> > > > I've sent out a patch which renames util-linux-uuid to util-linux-
> > libuuid
> > > > and sorts out the license issue Peter reported.
> > > 
> > > I don't mind the recipe being renamed and cleaned up, but I would prefer
> > > to see my entire patch for the license parts being either integrated
> > before
> > > this or squashed into it, whichever you prefer. It does not make sense
> > to
> > > use the same LIC_FILES_CHKSUM for util-linux-libuuid as for util-linux,
> > > and setting the other LICENSE variables in util-linux.inc no longer
> > makes
> > > sense as they are only relevant for util-linux.
> > 
> > I'm torn on that. Code with the other licenses is present, just not used
> > in the final output and I personally suspect that having one LIC_FILES_CHKSUM
> > is going to be easier to maintain in the future rather than two separate
> > ones.
> 
> I actually checked all the files that go into -dev and -src before suggesting 
> this change, and all files are either marked as public domain or use a 
> BSD-3-Clause license.

There is a difference between what ends up in ${S} and what ends up in the 
binary packages. LICENSE clearly governs the latter. Its the scope of 
LIC_FILES_CHECKSUM which there are differences of opinion on.

Cheers,

Richard


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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-25 16:51                   ` Richard Purdie
@ 2021-03-26 18:06                     ` Peter Kjellerstedt
  2021-03-26 18:12                       ` Richard Purdie
  0 siblings, 1 reply; 74+ messages in thread
From: Peter Kjellerstedt @ 2021-03-26 18:06 UTC (permalink / raw)
  To: Richard Purdie,
	Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco),
	Luca Bocassi, openembedded-core
  Cc: bluelightning, Khem Raj

> -----Original Message-----
> From: Richard Purdie <richard.purdie@linuxfoundation.org>
> Sent: den 25 mars 2021 17:52
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Oleksiy Obitotskyi -
> X (oobitots - GLOBALLOGIC INC at Cisco) <oobitots@cisco.com>; Luca Bocassi
> <luca.boccassi@gmail.com>; openembedded-core@lists.openembedded.org
> Cc: bluelightning@bluelightning.org; Khem Raj <raj.khem@gmail.com>
> Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> recipe to allow bootstrapping
> 
> On Thu, 2021-03-25 at 16:19 +0000, Peter Kjellerstedt wrote:
> > > -----Original Message-----
> > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > Sent: den 25 mars 2021 15:27
> > > To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Oleksiy
> Obitotskyi -
> > > X (oobitots - GLOBALLOGIC INC at Cisco) <oobitots@cisco.com>; Luca
> Bocassi
> > > <luca.boccassi@gmail.com>; openembedded-core@lists.openembedded.org
> > > Cc: bluelightning@bluelightning.org; Khem Raj <raj.khem@gmail.com>
> > > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> > > recipe to allow bootstrapping
> > >
> > > On Thu, 2021-03-25 at 14:22 +0000, Peter Kjellerstedt wrote:
> > > > > -----Original Message-----
> > > > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > > > Sent: den 25 mars 2021 10:34
> > > > > To: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco)
> > > > > <oobitots@cisco.com>; Luca Bocassi <luca.boccassi@gmail.com>;
> > > > > openembedded-core@lists.openembedded.org
> > > > > Cc: bluelightning@bluelightning.org; Peter Kjellerstedt
> > > > > <peter.kjellerstedt@axis.com>; Khem Raj <raj.khem@gmail.com>
> > > > > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in
> separate
> > > > > recipe to allow bootstrapping
> > > > >
> > > > > On Thu, 2021-03-25 at 09:17 +0000, Oleksiy Obitotskyi -X (oobitots
> -
> > > > > GLOBALLOGIC INC at Cisco) wrote:
> > > > > > Could you look into this warning.
> > > > > >
> > > > > > WARNING: util-linux-2.36.2-r0 do_package_qa: QA Issue: util-
> linux-
> > > dev
> > > > > rdepends on util-linux-libuuid-dev, but it isn't a build
> dependency?
> > > > > [build-deps]
> > > > > >
> > > > > >
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3226
> > > > >
> > > > > That failure was my fault when testing some fixes.
> > > > >
> > > > > I've sent out a patch which renames util-linux-uuid to util-linux-
> > > libuuid
> > > > > and sorts out the license issue Peter reported.
> > > >
> > > > I don't mind the recipe being renamed and cleaned up, but I would
> prefer
> > > > to see my entire patch for the license parts being either integrated
> > > before
> > > > this or squashed into it, whichever you prefer. It does not make
> sense
> > > to
> > > > use the same LIC_FILES_CHKSUM for util-linux-libuuid as for util-
> linux,
> > > > and setting the other LICENSE variables in util-linux.inc no longer
> > > makes
> > > > sense as they are only relevant for util-linux.
> > >
> > > I'm torn on that. Code with the other licenses is present, just not
> used
> > > in the final output and I personally suspect that having one
> LIC_FILES_CHKSUM
> > > is going to be easier to maintain in the future rather than two
> separate
> > > ones.
> >
> > I actually checked all the files that go into -dev and -src before
> suggesting
> > this change, and all files are either marked as public domain or use a
> > BSD-3-Clause license.
> 
> There is a difference between what ends up in ${S} and what ends up in the
> binary packages. LICENSE clearly governs the latter. Its the scope of
> LIC_FILES_CHECKSUM which there are differences of opinion on.

Well, the latter governs what ends up in ${PN}-lic, so having a lot of 
unrelated (to the installed packages) license files in LIC_FILES_CHECKSUM 
does not make sense (to me). If everything that is built and (possibly) 
installed and thus distributed is covered by BSD-3-Clause licenses, why 
should ${PN}-lic include a lot of license files for unrelated code?

> Cheers,
> 
> Richard

//Peter


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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-26 18:06                     ` Peter Kjellerstedt
@ 2021-03-26 18:12                       ` Richard Purdie
  2021-03-26 18:22                         ` Andre McCurdy
  0 siblings, 1 reply; 74+ messages in thread
From: Richard Purdie @ 2021-03-26 18:12 UTC (permalink / raw)
  To: Peter Kjellerstedt,
	Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco),
	Luca Bocassi, openembedded-core
  Cc: bluelightning, Khem Raj

On Fri, 2021-03-26 at 18:06 +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > Sent: den 25 mars 2021 17:52
> > To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Oleksiy Obitotskyi -
> > X (oobitots - GLOBALLOGIC INC at Cisco) <oobitots@cisco.com>; Luca Bocassi
> > <luca.boccassi@gmail.com>; openembedded-core@lists.openembedded.org
> > Cc: bluelightning@bluelightning.org; Khem Raj <raj.khem@gmail.com>
> > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> > recipe to allow bootstrapping
> > 
> > On Thu, 2021-03-25 at 16:19 +0000, Peter Kjellerstedt wrote:
> > > > -----Original Message-----
> > > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > > Sent: den 25 mars 2021 15:27
> > > > To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Oleksiy
> > Obitotskyi -
> > > > X (oobitots - GLOBALLOGIC INC at Cisco) <oobitots@cisco.com>; Luca
> > Bocassi
> > > > <luca.boccassi@gmail.com>; openembedded-core@lists.openembedded.org
> > > > Cc: bluelightning@bluelightning.org; Khem Raj <raj.khem@gmail.com>
> > > > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> > > > recipe to allow bootstrapping
> > > > 
> > > > On Thu, 2021-03-25 at 14:22 +0000, Peter Kjellerstedt wrote:
> > > > > > -----Original Message-----
> > > > > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > > > > Sent: den 25 mars 2021 10:34
> > > > > > To: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco)
> > > > > > <oobitots@cisco.com>; Luca Bocassi <luca.boccassi@gmail.com>;
> > > > > > openembedded-core@lists.openembedded.org
> > > > > > Cc: bluelightning@bluelightning.org; Peter Kjellerstedt
> > > > > > <peter.kjellerstedt@axis.com>; Khem Raj <raj.khem@gmail.com>
> > > > > > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in
> > separate
> > > > > > recipe to allow bootstrapping
> > > > > > 
> > > > > > On Thu, 2021-03-25 at 09:17 +0000, Oleksiy Obitotskyi -X (oobitots
> > -
> > > > > > GLOBALLOGIC INC at Cisco) wrote:
> > > > > > > Could you look into this warning.
> > > > > > > 
> > > > > > > WARNING: util-linux-2.36.2-r0 do_package_qa: QA Issue: util-
> > linux-
> > > > dev
> > > > > > rdepends on util-linux-libuuid-dev, but it isn't a build
> > dependency?
> > > > > > [build-deps]
> > > > > > > 
> > > > > > > 
> > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3226
> > > > > > 
> > > > > > That failure was my fault when testing some fixes.
> > > > > > 
> > > > > > I've sent out a patch which renames util-linux-uuid to util-linux-
> > > > libuuid
> > > > > > and sorts out the license issue Peter reported.
> > > > > 
> > > > > I don't mind the recipe being renamed and cleaned up, but I would
> > prefer
> > > > > to see my entire patch for the license parts being either integrated
> > > > before
> > > > > this or squashed into it, whichever you prefer. It does not make
> > sense
> > > > to
> > > > > use the same LIC_FILES_CHKSUM for util-linux-libuuid as for util-
> > linux,
> > > > > and setting the other LICENSE variables in util-linux.inc no longer
> > > > makes
> > > > > sense as they are only relevant for util-linux.
> > > > 
> > > > I'm torn on that. Code with the other licenses is present, just not
> > used
> > > > in the final output and I personally suspect that having one
> > LIC_FILES_CHKSUM
> > > > is going to be easier to maintain in the future rather than two
> > separate
> > > > ones.
> > > 
> > > I actually checked all the files that go into -dev and -src before
> > suggesting
> > > this change, and all files are either marked as public domain or use a
> > > BSD-3-Clause license.
> > 
> > There is a difference between what ends up in ${S} and what ends up in the
> > binary packages. LICENSE clearly governs the latter. Its the scope of
> > LIC_FILES_CHECKSUM which there are differences of opinion on.
> 
> Well, the latter governs what ends up in ${PN}-lic, so having a lot of 
> unrelated (to the installed packages) license files in LIC_FILES_CHECKSUM 
> does not make sense (to me). If everything that is built and (possibly) 
> installed and thus distributed is covered by BSD-3-Clause licenses, why 
> should ${PN}-lic include a lot of license files for unrelated code?

I hadn't considered ${PN}-lic :(.

We can't win. If we change LIC_FILES_CHKSUM we'll see complaints from
people scanning the code that there are licenses present in WORKDIR that
are not in LIC_FILES_CHKSUM. If we don't change it, ${PN}-lic does give
more information than necessary. I still think the latter is probably
safer and makes recipe upgrades easier.

Licensing in general needs a step back and an overhaul. Sadly people are 
generally only prepared to do this piecemeal solving their specific
issue rather than the general case and big picture.

Cheers,

Richard




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

* Re: [OE-core] [PATCH v11] util-linux: split uuid in separate recipe to allow bootstrapping
  2021-03-26 18:12                       ` Richard Purdie
@ 2021-03-26 18:22                         ` Andre McCurdy
  0 siblings, 0 replies; 74+ messages in thread
From: Andre McCurdy @ 2021-03-26 18:22 UTC (permalink / raw)
  To: Richard Purdie
  Cc: Peter Kjellerstedt,
	Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco),
	Luca Bocassi, openembedded-core, bluelightning, Khem Raj

On Fri, Mar 26, 2021 at 11:12 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Fri, 2021-03-26 at 18:06 +0000, Peter Kjellerstedt wrote:
> > > -----Original Message-----
> > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > Sent: den 25 mars 2021 17:52
> > > To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Oleksiy Obitotskyi -
> > > X (oobitots - GLOBALLOGIC INC at Cisco) <oobitots@cisco.com>; Luca Bocassi
> > > <luca.boccassi@gmail.com>; openembedded-core@lists.openembedded.org
> > > Cc: bluelightning@bluelightning.org; Khem Raj <raj.khem@gmail.com>
> > > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> > > recipe to allow bootstrapping
> > >
> > > On Thu, 2021-03-25 at 16:19 +0000, Peter Kjellerstedt wrote:
> > > > > -----Original Message-----
> > > > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > > > Sent: den 25 mars 2021 15:27
> > > > > To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Oleksiy
> > > Obitotskyi -
> > > > > X (oobitots - GLOBALLOGIC INC at Cisco) <oobitots@cisco.com>; Luca
> > > Bocassi
> > > > > <luca.boccassi@gmail.com>; openembedded-core@lists.openembedded.org
> > > > > Cc: bluelightning@bluelightning.org; Khem Raj <raj.khem@gmail.com>
> > > > > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in separate
> > > > > recipe to allow bootstrapping
> > > > >
> > > > > On Thu, 2021-03-25 at 14:22 +0000, Peter Kjellerstedt wrote:
> > > > > > > -----Original Message-----
> > > > > > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > > > > > Sent: den 25 mars 2021 10:34
> > > > > > > To: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco)
> > > > > > > <oobitots@cisco.com>; Luca Bocassi <luca.boccassi@gmail.com>;
> > > > > > > openembedded-core@lists.openembedded.org
> > > > > > > Cc: bluelightning@bluelightning.org; Peter Kjellerstedt
> > > > > > > <peter.kjellerstedt@axis.com>; Khem Raj <raj.khem@gmail.com>
> > > > > > > Subject: Re: [OE-core] [PATCH v11] util-linux: split uuid in
> > > separate
> > > > > > > recipe to allow bootstrapping
> > > > > > >
> > > > > > > On Thu, 2021-03-25 at 09:17 +0000, Oleksiy Obitotskyi -X (oobitots
> > > -
> > > > > > > GLOBALLOGIC INC at Cisco) wrote:
> > > > > > > > Could you look into this warning.
> > > > > > > >
> > > > > > > > WARNING: util-linux-2.36.2-r0 do_package_qa: QA Issue: util-
> > > linux-
> > > > > dev
> > > > > > > rdepends on util-linux-libuuid-dev, but it isn't a build
> > > dependency?
> > > > > > > [build-deps]
> > > > > > > >
> > > > > > > >
> > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/61/builds/3226
> > > > > > >
> > > > > > > That failure was my fault when testing some fixes.
> > > > > > >
> > > > > > > I've sent out a patch which renames util-linux-uuid to util-linux-
> > > > > libuuid
> > > > > > > and sorts out the license issue Peter reported.
> > > > > >
> > > > > > I don't mind the recipe being renamed and cleaned up, but I would
> > > prefer
> > > > > > to see my entire patch for the license parts being either integrated
> > > > > before
> > > > > > this or squashed into it, whichever you prefer. It does not make
> > > sense
> > > > > to
> > > > > > use the same LIC_FILES_CHKSUM for util-linux-libuuid as for util-
> > > linux,
> > > > > > and setting the other LICENSE variables in util-linux.inc no longer
> > > > > makes
> > > > > > sense as they are only relevant for util-linux.
> > > > >
> > > > > I'm torn on that. Code with the other licenses is present, just not
> > > used
> > > > > in the final output and I personally suspect that having one
> > > LIC_FILES_CHKSUM
> > > > > is going to be easier to maintain in the future rather than two
> > > separate
> > > > > ones.
> > > >
> > > > I actually checked all the files that go into -dev and -src before
> > > suggesting
> > > > this change, and all files are either marked as public domain or use a
> > > > BSD-3-Clause license.
> > >
> > > There is a difference between what ends up in ${S} and what ends up in the
> > > binary packages. LICENSE clearly governs the latter. Its the scope of
> > > LIC_FILES_CHECKSUM which there are differences of opinion on.
> >
> > Well, the latter governs what ends up in ${PN}-lic, so having a lot of
> > unrelated (to the installed packages) license files in LIC_FILES_CHECKSUM
> > does not make sense (to me). If everything that is built and (possibly)
> > installed and thus distributed is covered by BSD-3-Clause licenses, why
> > should ${PN}-lic include a lot of license files for unrelated code?
>
> I hadn't considered ${PN}-lic :(.
>
> We can't win. If we change LIC_FILES_CHKSUM we'll see complaints from
> people scanning the code that there are licenses present in WORKDIR that
> are not in LIC_FILES_CHKSUM.

If there's code in the upstream tar file etc which is not involved at
all in the build of the one particular sub component you're interested
in then this type of complaint can be solved by removing the unused
code from ${S} as part of do_patch.

> If we don't change it, ${PN}-lic does give
> more information than necessary. I still think the latter is probably
> safer and makes recipe upgrades easier.
>
> Licensing in general needs a step back and an overhaul. Sadly people are
> generally only prepared to do this piecemeal solving their specific
> issue rather than the general case and big picture.
>
> Cheers,
>
> Richard
>
>
>
>
> 
>

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

end of thread, other threads:[~2021-03-26 18:22 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 20:13 [PATCH] util-linux: split uuid in separate recipe to allow bootstrapping luca.boccassi
2019-12-05 23:29 ` Ross Burton
2019-12-09 16:24 ` [PATCH v2] " luca.boccassi
2020-11-23 13:28   ` [PATCH v3] " Luca Bocassi
2020-12-10 15:52     ` [OE-core] " Richard Purdie
2020-12-10 18:47       ` Luca Boccassi
2020-12-10 20:04         ` Richard Purdie
2020-12-11  9:51           ` Luca Boccassi
2020-12-11 16:54             ` Richard Purdie
2020-12-14 16:32               ` Luca Boccassi
2020-12-10 18:46     ` [PATCH v4] " Luca Bocassi
2021-01-19 20:52       ` Richard Purdie
2021-01-19 23:13         ` [OE-core] " Paul Eggleton
2021-01-19 23:23           ` Richard Purdie
2021-01-19 23:28             ` Paul Eggleton
2021-02-25 15:31               ` Luca Bocassi
2021-02-25 15:30       ` [PATCH v5] " Luca Bocassi
2021-02-26 19:02         ` [OE-core] " Khem Raj
2021-03-02 19:01           ` Luca Bocassi
2021-02-27 14:52         ` Alexandre Belloni
2021-02-27 15:08           ` Alexandre Belloni
2021-02-27 15:15             ` Alexandre Belloni
2021-03-02 17:31               ` Luca Bocassi
2021-03-02 18:49                 ` Alexandre Belloni
2021-03-03 22:30         ` Richard Purdie
2021-03-04 12:05           ` Luca Bocassi
2021-03-04 12:27       ` [PATCH v6] " Luca Bocassi
2021-03-05  0:13         ` Richard Purdie
2021-03-05 11:03           ` Luca Bocassi
2021-03-05 11:02       ` [PATCH v7] " Luca Bocassi
2021-03-08 19:29         ` Richard Purdie
2021-03-09 11:07           ` Luca Bocassi
2021-03-09 11:18           ` [OE-core] " Kory Maincent
2021-03-09 13:26             ` Luca Bocassi
2021-03-09 13:47               ` Kory Maincent
2021-03-09 13:48                 ` Richard Purdie
2021-03-09 13:56                   ` Luca Bocassi
2021-03-09 11:13       ` [PATCH v8] " Luca Bocassi
2021-03-09 13:56       ` [PATCH v9] " Luca Bocassi
2021-03-09 23:43         ` Richard Purdie
2021-03-10 18:28           ` Luca Bocassi
2021-03-11 10:15             ` Luca Bocassi
2021-03-11 10:31               ` Richard Purdie
2021-03-11 14:37                 ` Luca Bocassi
2021-03-11 14:38       ` [PATCH v10] " Luca Bocassi
2021-03-11 14:44         ` Richard Purdie
2021-03-11 15:10           ` Luca Bocassi
2021-03-11 15:09       ` [PATCH v11] " Luca Bocassi
2021-03-14 22:10         ` Richard Purdie
2021-03-15 10:44           ` Luca Bocassi
2021-03-15 10:49             ` Richard Purdie
2021-03-15 11:50               ` Luca Bocassi
2021-03-15 12:21                 ` Richard Purdie
2021-03-15 13:04                   ` Luca Bocassi
2021-03-15 13:55                   ` [OE-core] " Martin Jansa
2021-03-15 13:57                     ` Richard Purdie
     [not found]                     ` <166C88B2CBAB1BAF.20509@lists.openembedded.org>
2021-03-15 21:51                       ` Richard Purdie
2021-03-24 16:52                         ` Scott Branden
2021-03-24 17:03                           ` Luca Boccassi
2021-03-24 17:37                             ` Richard Purdie
2021-03-24 17:52                               ` Luca Bocassi
2021-03-25  9:17         ` Oleksiy Obitotskyy
2021-03-25  9:34           ` Richard Purdie
2021-03-25  9:48             ` Luca Bocassi
2021-03-25 14:22             ` Peter Kjellerstedt
2021-03-25 14:27               ` Richard Purdie
2021-03-25 15:45                 ` Luca Bocassi
2021-03-25 16:01                   ` Khem Raj
2021-03-25 16:19                 ` Peter Kjellerstedt
2021-03-25 16:51                   ` Richard Purdie
2021-03-26 18:06                     ` Peter Kjellerstedt
2021-03-26 18:12                       ` Richard Purdie
2021-03-26 18:22                         ` Andre McCurdy
2019-12-09 16:33 ` [PATCH] " Luca Boccassi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.