* 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
* 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
* [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 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-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: [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: [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
* 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
* [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 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
* 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
* 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
* [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
* [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: [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
* 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
* [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 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
[parent not found: <166C88B2CBAB1BAF.20509@lists.openembedded.org>]
* 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