[OE-core] [PATCH] util-linux: split uuid in separate recipe to allow bootstrapping

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 5 20:13:05 UTC 2019


From: Luca Boccassi <luca.boccassi at 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 at microsoft.com>
---
util-linux 2.35 is not out yet, but I'd like to get the preparatory work
underway as I'm not sure if this is the best approach or if there are
alternatives. Suggestions and comments very welcome. Thanks!

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

diff --git a/meta/recipes-core/util-linux/util-linux-uuid_2.34.bb b/meta/recipes-core/util-linux/util-linux-uuid_2.34.bb
new file mode 100644
index 0000000000..f106c6a18c
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-uuid_2.34.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Builds libuuid separately from util-linux for bootstrapping"
+HOMEPAGE = "http://userweb.kernel.org/~kzak/util-linux/"
+
+SECTION = "base"
+
+LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause"
+
+LIC_FILES_CHKSUM = "file://README.licensing;md5=972a134f1e14b2b060e365df2fab0099 \
+                    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \
+                    file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \
+                    file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \
+                    file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \
+                    file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \
+                    file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04"
+
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${MAJOR_VERSION}.tar.xz \
+           "
+
+SRC_URI[md5sum] = "a78cbeaed9c39094b96a48ba8f891d50"
+SRC_URI[sha256sum] = "743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5"
+
+inherit autotools gettext pkgconfig
+
+S = "${WORKDIR}/util-linux-${PV}"
+EXTRA_OECONF += "--disable-all-programs --enable-libuuid"
+RPROVIDES_libuuid-dev = "util-linux-libuuid-dev"
+RPROVIDES_libuuid = "util-linux-libuuid"
+
+do_install_append() {
+	rmdir ${D}${bindir} ${D}${sbindir}
+	rm -rf ${D}${datadir}
+}
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 1fa82363b1..ef6f95776a 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -288,6 +288,12 @@ ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
 ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3"
 ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
 
+# split uuid out to allow in the near future a build-dependency on packages depending on it
+RPROVIDES_remove_class-target_${PN}-dev = "util-linux-libuuid-dev"
+PACKAGES_remove_class-target = "libuuid1 util-linux-libuuid1"
+DEPENDS_append_class-target = " util-linux-uuid"
+EXTRA_OECONF_remove_class-target = "--enable-libuuid"
+EXTRA_OECONF_append_class-target = " --disable-libuuid"
 
 BBCLASSEXTEND = "native nativesdk"
 
diff --git a/meta/recipes-extended/wget/wget.inc b/meta/recipes-extended/wget/wget.inc
index 2338328216..7b7a3fae7a 100644
--- a/meta/recipes-extended/wget/wget.inc
+++ b/meta/recipes-extended/wget/wget.inc
@@ -32,7 +32,7 @@ PACKAGECONFIG[gnutls] = "--with-ssl=gnutls,,gnutls"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
 PACKAGECONFIG[iri] = "--enable-iri,--disable-iri,libidn2"
 PACKAGECONFIG[libpsl] = "--with-libpsl,--without-libpsl,libpsl"
-PACKAGECONFIG[libuuid] = "--with-libuuid,--without-libuuid,util-linux"
+PACKAGECONFIG[libuuid] = "--with-libuuid,--without-libuuid,util-linux-uuid"
 PACKAGECONFIG[openssl] = "--with-ssl=openssl,,openssl"
 PACKAGECONFIG[pcre] = "--enable-pcre,--disable-pcre,libpcre"
 PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-- 
2.20.1



More information about the Openembedded-core mailing list