diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-03-11 15:09:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-03-12 15:35:08 +0000 |
commit | d42487bf52310d095178e480b7ddec2666471009 (patch) | |
tree | 60376f559b6692793354da9d0404beb75f08143f | |
parent | 6bb1621815f41fd09c971a0e26fb4bcd0963ab8a (diff) | |
download | poky-d42487bf52310d095178e480b7ddec2666471009.tar.gz |
util-linux: split uuid in separate recipe to allow bootstrapping
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
(From OE-Core rev: 5f204796e73f37ee67d0a86512ce3ab6f19f9ed0)
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/conf/distro/include/maintainers.inc | 1 | ||||
-rw-r--r-- | meta/recipes-core/util-linux/util-linux-uuid_2.36.2.bb | 20 | ||||
-rw-r--r-- | meta/recipes-core/util-linux/util-linux.inc | 41 | ||||
-rw-r--r-- | meta/recipes-core/util-linux/util-linux_2.36.2.bb | 57 |
4 files changed, 77 insertions, 42 deletions
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 9093f2d7fd..1272affaf5 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc | |||
@@ -723,6 +723,7 @@ RECIPE_MAINTAINER_pn-update-rc.d = "Ross Burton <ross.burton@arm.com>" | |||
723 | RECIPE_MAINTAINER_pn-usbinit = "Alexander Kanavin <alex.kanavin@gmail.com>" | 723 | RECIPE_MAINTAINER_pn-usbinit = "Alexander Kanavin <alex.kanavin@gmail.com>" |
724 | RECIPE_MAINTAINER_pn-usbutils = "Alexander Kanavin <alex.kanavin@gmail.com>" | 724 | RECIPE_MAINTAINER_pn-usbutils = "Alexander Kanavin <alex.kanavin@gmail.com>" |
725 | RECIPE_MAINTAINER_pn-util-linux = "Chen Qi <Qi.Chen@windriver.com>" | 725 | RECIPE_MAINTAINER_pn-util-linux = "Chen Qi <Qi.Chen@windriver.com>" |
726 | RECIPE_MAINTAINER_pn-util-linux-uuid = "Chen Qi <Qi.Chen@windriver.com>" | ||
726 | RECIPE_MAINTAINER_pn-util-macros = "Armin Kuster <akuster808@gmail.com>" | 727 | RECIPE_MAINTAINER_pn-util-macros = "Armin Kuster <akuster808@gmail.com>" |
727 | RECIPE_MAINTAINER_pn-v86d = "Alexander Kanavin <alex.kanavin@gmail.com>" | 728 | RECIPE_MAINTAINER_pn-v86d = "Alexander Kanavin <alex.kanavin@gmail.com>" |
728 | RECIPE_MAINTAINER_pn-vala = "Alexander Kanavin <alex.kanavin@gmail.com>" | 729 | 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 @@ | |||
1 | # To allow util-linux to optionally build-depend on cryptsetup, libuuid is | ||
2 | # split out of the main recipe, as it's needed by cryptsetup | ||
3 | |||
4 | require util-linux.inc | ||
5 | |||
6 | inherit autotools gettext pkgconfig | ||
7 | |||
8 | S = "${WORKDIR}/util-linux-${PV}" | ||
9 | EXTRA_OECONF += "--disable-all-programs --enable-libuuid" | ||
10 | PACKAGES = "util-linux-libuuid util-linux-libuuid-dev util-linux-libuuid-staticdev util-linux-libuuid-dbg" | ||
11 | FILES_util-linux-libuuid = "${libdir}/libuuid.so.*" | ||
12 | FILES_util-linux-libuuid-dev = "${libdir}/libuuid.so ${includedir} ${libdir}/pkgconfig" | ||
13 | FILES_util-linux-libuuid-staticdev = "${libdir}/libuuid.a" | ||
14 | FILES_util-linux-libuuid-dbg = "/usr/src ${libdir}/.debug" | ||
15 | |||
16 | do_install_append() { | ||
17 | rm -rf ${D}${datadir} ${D}${bindir} ${D}${base_bindir} ${D}${sbindir} ${D}${base_sbindir} ${D}${exec_prefix}/sbin | ||
18 | } | ||
19 | |||
20 | 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 @@ | |||
1 | SUMMARY = "A suite of basic system administration utilities" | ||
2 | HOMEPAGE = "https://en.wikipedia.org/wiki/Util-linux" | ||
3 | DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \ | ||
4 | commonly found on most Linux systems. Some of the more important utilities include \ | ||
5 | disk partitioning, kernel message management, filesystem creation, and system login." | ||
6 | |||
7 | SECTION = "base" | ||
8 | |||
9 | LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause" | ||
10 | LICENSE_${PN}-libblkid = "LGPLv2.1+" | ||
11 | LICENSE_${PN}-libfdisk = "LGPLv2.1+" | ||
12 | LICENSE_${PN}-libmount = "LGPLv2.1+" | ||
13 | LICENSE_${PN}-libsmartcols = "LGPLv2.1+" | ||
14 | LICENSE_${PN}-libuuid = "BSD-3-Clause" | ||
15 | |||
16 | LIC_FILES_CHKSUM = "file://README.licensing;md5=0fd5c050c6187d2bf0a4492b7f4e33da \ | ||
17 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
18 | file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
19 | file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \ | ||
20 | file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \ | ||
21 | file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \ | ||
22 | file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \ | ||
23 | file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \ | ||
24 | file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ | ||
25 | file://libfdisk/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ | ||
26 | file://libsmartcols/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ | ||
27 | " | ||
28 | |||
29 | FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:" | ||
30 | MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" | ||
31 | BPN = "util-linux" | ||
32 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \ | ||
33 | file://configure-sbindir.patch \ | ||
34 | file://runuser.pamd \ | ||
35 | file://runuser-l.pamd \ | ||
36 | file://ptest.patch \ | ||
37 | file://run-ptest \ | ||
38 | file://display_testname_for_subtest.patch \ | ||
39 | file://avoid_parallel_tests.patch \ | ||
40 | " | ||
41 | 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 @@ | |||
1 | SUMMARY = "A suite of basic system administration utilities" | 1 | require util-linux.inc |
2 | HOMEPAGE = "https://en.wikipedia.org/wiki/Util-linux" | ||
3 | DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \ | ||
4 | commonly found on most Linux systems. Some of the more important utilities include \ | ||
5 | disk partitioning, kernel message management, filesystem creation, and system login." | ||
6 | |||
7 | SECTION = "base" | ||
8 | |||
9 | LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause" | ||
10 | LICENSE_${PN}-libblkid = "LGPLv2.1+" | ||
11 | LICENSE_${PN}-libfdisk = "LGPLv2.1+" | ||
12 | LICENSE_${PN}-libmount = "LGPLv2.1+" | ||
13 | LICENSE_${PN}-libsmartcols = "LGPLv2.1+" | ||
14 | LICENSE_${PN}-libuuid = "BSD-3-Clause" | ||
15 | |||
16 | LIC_FILES_CHKSUM = "file://README.licensing;md5=0fd5c050c6187d2bf0a4492b7f4e33da \ | ||
17 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
18 | file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
19 | file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \ | ||
20 | file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \ | ||
21 | file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \ | ||
22 | file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \ | ||
23 | file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \ | ||
24 | file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ | ||
25 | file://libfdisk/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ | ||
26 | file://libsmartcols/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ | ||
27 | " | ||
28 | 2 | ||
29 | #gtk-doc is not enabled as it requires xmlto which requires util-linux | 3 | #gtk-doc is not enabled as it requires xmlto which requires util-linux |
30 | inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest | 4 | inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest |
31 | DEPENDS = "libcap-ng ncurses virtual/crypt zlib" | 5 | DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-uuid" |
32 | |||
33 | MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" | ||
34 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \ | ||
35 | file://configure-sbindir.patch \ | ||
36 | file://runuser.pamd \ | ||
37 | file://runuser-l.pamd \ | ||
38 | file://ptest.patch \ | ||
39 | file://run-ptest \ | ||
40 | file://display_testname_for_subtest.patch \ | ||
41 | file://avoid_parallel_tests.patch \ | ||
42 | " | ||
43 | SRC_URI[sha256sum] = "f7516ba9d8689343594356f0e5e1a5f0da34adfbc89023437735872bb5024c5f" | ||
44 | 6 | ||
45 | PACKAGES =+ "${PN}-swaponoff" | 7 | PACKAGES =+ "${PN}-swaponoff" |
46 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}" | 8 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}" |
@@ -87,8 +49,9 @@ python util_linux_binpackages () { | |||
87 | # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS | 49 | # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS |
88 | PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages " | 50 | PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages " |
89 | 51 | ||
52 | # skip libuuid as it will be packaged by the util-linux-uuid recipe | ||
90 | python util_linux_libpackages() { | 53 | python util_linux_libpackages() { |
91 | do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$', | 54 | do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(?!uuid)(.*)\.so\..*$', |
92 | output_pattern='${PN}-lib%s', | 55 | output_pattern='${PN}-lib%s', |
93 | description='${PN} lib%s', | 56 | description='${PN} lib%s', |
94 | extra_depends='', prepend=True, allow_links=True) | 57 | extra_depends='', prepend=True, allow_links=True) |
@@ -141,6 +104,7 @@ PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-pytho | |||
141 | PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" | 104 | PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" |
142 | # PCRE support in hardlink | 105 | # PCRE support in hardlink |
143 | PACKAGECONFIG[pcre2] = ",,libpcre2" | 106 | PACKAGECONFIG[pcre2] = ",,libpcre2" |
107 | PACKAGECONFIG[cryptsetup] = "--with-cryptsetup,--without-cryptsetup,cryptsetup" | ||
144 | 108 | ||
145 | EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'" | 109 | EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'" |
146 | 110 | ||
@@ -165,7 +129,10 @@ RRECOMMENDS_${PN}_class-nativesdk = "" | |||
165 | RDEPENDS_${PN}_class-native = "" | 129 | RDEPENDS_${PN}_class-native = "" |
166 | RDEPENDS_${PN}_class-nativesdk = "" | 130 | RDEPENDS_${PN}_class-nativesdk = "" |
167 | 131 | ||
168 | RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev" | 132 | RDEPENDS_${PN} += " util-linux-libuuid" |
133 | RDEPENDS_${PN}-dev += " util-linux-libuuid-dev" | ||
134 | |||
135 | RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev" | ||
169 | 136 | ||
170 | RDEPENDS_${PN}-bash-completion += "${PN}-lsblk" | 137 | RDEPENDS_${PN}-bash-completion += "${PN}-lsblk" |
171 | RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz" | 138 | 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 () { | |||
234 | rm -f ${D}${base_bindir}/kill | 201 | rm -f ${D}${base_bindir}/kill |
235 | } | 202 | } |
236 | 203 | ||
204 | # dm-verity support introduces a circular build dependency, so util-linux-uuid is split out for target builds | ||
205 | # Need to build libuuid for uuidgen, but then delete it and let the other recipe ship it | ||
206 | do_install_append () { | ||
207 | rm -rf ${D}${includedir}/uuid ${D}${libdir}/pkgconfig/uuid.pc ${D}${libdir}/libuuid* ${D}${base_libdir}/libuuid* | ||
208 | } | ||
209 | |||
237 | ALTERNATIVE_PRIORITY = "80" | 210 | ALTERNATIVE_PRIORITY = "80" |
238 | 211 | ||
239 | ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid" | 212 | ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid" |