diff options
Diffstat (limited to 'poky/meta/recipes-core/util-linux')
4 files changed, 121 insertions, 42 deletions
diff --git a/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.36.2.bb b/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.36.2.bb new file mode 100644 index 000000000..9612c491c --- /dev/null +++ b/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.36.2.bb @@ -0,0 +1,16 @@ +# 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" +LICENSE = "BSD-3-Clause" + +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/poky/meta/recipes-core/util-linux/util-linux.inc b/poky/meta/recipes-core/util-linux/util-linux.inc new file mode 100644 index 000000000..cbf6102ee --- /dev/null +++ b/poky/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+" + +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 \ + file://Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch \ + " +SRC_URI[sha256sum] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f" diff --git a/poky/meta/recipes-core/util-linux/util-linux/Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch b/poky/meta/recipes-core/util-linux/util-linux/Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch new file mode 100644 index 000000000..272518914 --- /dev/null +++ b/poky/meta/recipes-core/util-linux/util-linux/Automake-use-EXTRA_LTLIBRARIES-instead-of-noinst_LTL.patch @@ -0,0 +1,49 @@ +Author: Luca Boccassi <luca.boccassi@microsoft.com> +Description: Automake: use EXTRA_LTLIBRARIES instead of noinst_LTLIBRARIES + noinst_LTLIBRARIES causes the libraries to be always built + unconditionally. EXTRA_LTLIBRARIES causes them to be built + only if other build target needs them. + In other words, avoid building libcommon.a and libtcolors.a + unless they are needed by another library/executable and + save some build time. +Upstream-Status: backport, commit:c65953d72bbc7412f32e566d9fa6e780d84f0696 +--- a/Makefile.am ++++ b/Makefile.am +@@ -39,7 +39,7 @@ bashcompletiondir = @bashcompletiondir@ + + dist_noinst_HEADERS = + noinst_PROGRAMS = +-noinst_LTLIBRARIES = ++EXTRA_LTLIBRARIES = + usrbin_exec_PROGRAMS = + usrsbin_exec_PROGRAMS = + dist_man_MANS = +@@ -169,7 +169,7 @@ else + edit_cmd += -e 's|@vendordir[@]||g' + endif + +-CLEANFILES += $(PATHFILES) ++CLEANFILES += $(PATHFILES) $(EXTRA_LTLIBRARIES) + EXTRA_DIST += $(PATHFILES:=.in) + + $(PATHFILES): Makefile +--- a/lib/Makemodule.am ++++ b/lib/Makemodule.am +@@ -9,7 +9,7 @@ + # Note that you need "make install-strip" (or proper rpm / Debian build) + # to generate binaries with only relevant stuff. + # +-noinst_LTLIBRARIES += libcommon.la ++EXTRA_LTLIBRARIES += libcommon.la + libcommon_la_CFLAGS = $(AM_CFLAGS) + libcommon_la_SOURCES = \ + lib/blkdev.c \ +@@ -59,7 +59,7 @@ libcommon_la_SOURCES += lib/sysfs.c + endif + endif + +-noinst_LTLIBRARIES += libtcolors.la ++EXTRA_LTLIBRARIES += libtcolors.la + libtcolors_la_CFLAGS = $(AM_CFLAGS) + libtcolors_la_SOURCES = lib/colors.c lib/color-names.c include/colors.h include/color-names.h + libtcolors_la_LIBADD = diff --git a/poky/meta/recipes-core/util-linux/util-linux_2.36.2.bb b/poky/meta/recipes-core/util-linux/util-linux_2.36.2.bb index 19950a272..c79cf782d 100644 --- a/poky/meta/recipes-core/util-linux/util-linux_2.36.2.bb +++ b/poky/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-libuuid" 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-libuuid 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-libuuid 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" |