All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luca Bocassi" <luca.boccassi@gmail.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>,
	Richard Purdie <richard.purdie@linuxfoundation.org>,
	Paul Eggleton <bluelightning@bluelightning.org>
Subject: Re: [OE-core] [PATCH v5] util-linux: split uuid in separate recipe to allow bootstrapping
Date: Tue, 02 Mar 2021 19:01:37 +0000	[thread overview]
Message-ID: <8381e86c6924947b9b7c1343cdfbf95ba57b718f.camel@gmail.com> (raw)
In-Reply-To: <CAMKF1sog1N1hWtSMTZtg4my86ZtPC_g=SVsD-c8MX5MKhcEwag@mail.gmail.com>

[-- 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 --]

  reply	other threads:[~2021-03-02 19:01 UTC|newest]

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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8381e86c6924947b9b7c1343cdfbf95ba57b718f.camel@gmail.com \
    --to=luca.boccassi@gmail.com \
    --cc=bluelightning@bluelightning.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.