diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2019-08-23 18:05:07 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-08-24 05:20:43 -0700 |
commit | 3f64779eae2d8312f569bee863f90ec4f8176e6c (patch) | |
tree | 6cfc7122f3b1d1a10f9b7140d52d766dbb2377ef /meta-oe | |
parent | 0c63afaf35de7fb84282a71f5c4f3a9007bd8518 (diff) | |
download | meta-openembedded-3f64779eae2d8312f569bee863f90ec4f8176e6c.tar.gz |
libdevmapper/lvm2: force recipe libdevmapper to populate sysroot only
Previously, in order to fix circular dependencies, we split
libdm from lvm2 as a new recipe libdevmapper, and as running result
proved, we need to keep both of them built with the same configuration
option
With new configuration options added, it is hard to keep them the same,
so we make recipe libdevmapper to populate libdevmapper sysroot only,
and make lvm2 to provide package libdevmapper.
In this situation, option differ does not affect header and library API
between lvm2 and libdevmapper, although lvm2 and libdevmapper are different
at build time, but there is only one lvm2 at run time
Side effect:
- If one recipe DEPENDS on libdevmapper, it has to add libdevmapper to
its RDEPENDS or add lvm2 to DEPENDS, otherwise, there will be a
[file-rdeps] or [build-deps] QA warning
- It has to add `PREFERRED_RPROVIDER_libdevmapper = "lvm2"' to local.conf
to workaound 'Multiple providers' NOTE
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
3 files changed, 22 insertions, 67 deletions
diff --git a/meta-oe/recipes-support/lvm2/libdevmapper_2.03.02.bb b/meta-oe/recipes-support/lvm2/libdevmapper_2.03.02.bb index 2c4febbe0..32bc13d1b 100644 --- a/meta-oe/recipes-support/lvm2/libdevmapper_2.03.02.bb +++ b/meta-oe/recipes-support/lvm2/libdevmapper_2.03.02.bb | |||
@@ -1,3 +1,6 @@ | |||
1 | # Break circular dependencies, only populate sysroot (header, | ||
2 | # libraries) to other recipe for compiling, recipe lvm2 | ||
3 | # generates package libdevmapper | ||
1 | require lvm2.inc | 4 | require lvm2.inc |
2 | 5 | ||
3 | SRCREV = "913c28917e62577a2ef67152b2e5159237503dda" | 6 | SRCREV = "913c28917e62577a2ef67152b2e5159237503dda" |
@@ -10,6 +13,7 @@ do_install() { | |||
10 | oe_runmake 'DESTDIR=${D}' -C libdm install | 13 | oe_runmake 'DESTDIR=${D}' -C libdm install |
11 | } | 14 | } |
12 | 15 | ||
13 | RRECOMMENDS_${PN}_append_class-target = " lvm2-udevrules" | 16 | # Do not generate package libdevmapper |
17 | PACKAGES = "" | ||
14 | 18 | ||
15 | BBCLASSEXTEND = "native nativesdk" | 19 | BBCLASSEXTEND = "native nativesdk" |
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-explicitly-do-not-install-libdm.patch b/meta-oe/recipes-support/lvm2/lvm2/0001-explicitly-do-not-install-libdm.patch deleted file mode 100644 index 24160b405..000000000 --- a/meta-oe/recipes-support/lvm2/lvm2/0001-explicitly-do-not-install-libdm.patch +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | From 3c16d9aaa46602e7594d717d86e7f02066d21134 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 26 Nov 2018 17:20:20 +0800 | ||
4 | Subject: [PATCH] explicitly do not install libdm | ||
5 | |||
6 | Already have package libdevmapper which split from lvm2, | ||
7 | explicitly do not do the installation here. | ||
8 | |||
9 | Upstream-Status: Inappropriate [meta-oe specific] | ||
10 | |||
11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
12 | |||
13 | |||
14 | Update context for lvm2 2.03.02. | ||
15 | |||
16 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
17 | --- | ||
18 | libdm/Makefile.in | 6 ++++-- | ||
19 | libdm/dm-tools/Makefile.in | 6 ++++-- | ||
20 | 2 files changed, 8 insertions(+), 4 deletions(-) | ||
21 | |||
22 | diff --git a/libdm/Makefile.in b/libdm/Makefile.in | ||
23 | index e9bb5ae..4e9ae3f 100644 | ||
24 | --- a/libdm/Makefile.in | ||
25 | +++ b/libdm/Makefile.in | ||
26 | @@ -82,9 +82,11 @@ ifeq ("@PKGCONFIG@", "yes") | ||
27 | INSTALL_TYPE += install_pkgconfig | ||
28 | endif | ||
29 | |||
30 | -install: $(INSTALL_TYPE) install_include | ||
31 | +install: | ||
32 | + echo "Do not install device mapper in lvm2" | ||
33 | |||
34 | -install_device-mapper: install | ||
35 | +install_device-mapper: | ||
36 | + echo "Do not install device mapper in lvm2" | ||
37 | |||
38 | install_include: $(srcdir)/libdevmapper.h | ||
39 | @echo " [INSTALL] $<" | ||
40 | diff --git a/libdm/dm-tools/Makefile.in b/libdm/dm-tools/Makefile.in | ||
41 | index 15a9d8e..65e1306 100644 | ||
42 | --- a/libdm/dm-tools/Makefile.in | ||
43 | +++ b/libdm/dm-tools/Makefile.in | ||
44 | @@ -20,7 +20,8 @@ all: device-mapper | ||
45 | |||
46 | SOURCES2 = dmsetup.c | ||
47 | TARGETS_DM = dmsetup | ||
48 | -install_device-mapper: install_dmsetup_dynamic | ||
49 | +install_device-mapper: | ||
50 | + echo "Do not install device mapper in lvm2" | ||
51 | |||
52 | ifeq ("@STATIC_LINK@", "yes") | ||
53 | TARGETS_DM += dmsetup.static | ||
54 | @@ -93,6 +94,7 @@ install_dmfilemapd_static: dmfilemapd.static | ||
55 | .PHONY: install_dmsetup_dynamic install_dmsetup_static | ||
56 | .PHONY: install_dmfilemapd install_dmfilemapd_static | ||
57 | |||
58 | -install: install_device-mapper install_dmfilemapd | ||
59 | +install: | ||
60 | + echo "Do not install device mapper in lvm2" | ||
61 | |||
62 | device-mapper: $(TARGETS_DM) | ||
63 | -- | ||
64 | 2.7.4 | ||
65 | |||
diff --git a/meta-oe/recipes-support/lvm2/lvm2_2.03.02.bb b/meta-oe/recipes-support/lvm2/lvm2_2.03.02.bb index 9922ef79d..785c6960e 100644 --- a/meta-oe/recipes-support/lvm2/lvm2_2.03.02.bb +++ b/meta-oe/recipes-support/lvm2/lvm2_2.03.02.bb | |||
@@ -2,7 +2,7 @@ require lvm2.inc | |||
2 | 2 | ||
3 | SRCREV = "913c28917e62577a2ef67152b2e5159237503dda" | 3 | SRCREV = "913c28917e62577a2ef67152b2e5159237503dda" |
4 | 4 | ||
5 | SRC_URI += "file://0001-explicitly-do-not-install-libdm.patch \ | 5 | SRC_URI += " \ |
6 | file://0001-dev-hdc-open-failed-No-medium-found-will-print-out-i.patch \ | 6 | file://0001-dev-hdc-open-failed-No-medium-found-will-print-out-i.patch \ |
7 | " | 7 | " |
8 | 8 | ||
@@ -46,6 +46,13 @@ LVM2_PACKAGECONFIG_append_class-target = " \ | |||
46 | " | 46 | " |
47 | PACKAGECONFIG[udev] = "--enable-udev_sync --enable-udev_rules --with-udevdir=${nonarch_base_libdir}/udev/rules.d,--disable-udev_sync --disable-udev_rules,udev" | 47 | PACKAGECONFIG[udev] = "--enable-udev_sync --enable-udev_rules --with-udevdir=${nonarch_base_libdir}/udev/rules.d,--disable-udev_sync --disable-udev_rules,udev" |
48 | 48 | ||
49 | PACKAGES =+ "libdevmapper" | ||
50 | FILES_libdevmapper = " \ | ||
51 | ${libdir}/libdevmapper.so.* \ | ||
52 | ${sbindir}/dmsetup \ | ||
53 | ${sbindir}/dmstats \ | ||
54 | " | ||
55 | |||
49 | FILES_${PN} += "${libdir}/device-mapper/*.so" | 56 | FILES_${PN} += "${libdir}/device-mapper/*.so" |
50 | FILES_${PN}-scripts = " \ | 57 | FILES_${PN}-scripts = " \ |
51 | ${sbindir}/blkdeactivate \ | 58 | ${sbindir}/blkdeactivate \ |
@@ -65,4 +72,13 @@ RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})" | |||
65 | 72 | ||
66 | CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf" | 73 | CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf" |
67 | 74 | ||
75 | SYSROOT_PREPROCESS_FUNCS_append = " remove_libdevmapper_sysroot_preprocess" | ||
76 | remove_libdevmapper_sysroot_preprocess() { | ||
77 | rm -f ${SYSROOT_DESTDIR}${libdir}/libdevmapper.so* \ | ||
78 | ${SYSROOT_DESTDIR}${sbindir}/dmsetup \ | ||
79 | ${SYSROOT_DESTDIR}${sbindir}/dmstats \ | ||
80 | ${SYSROOT_DESTDIR}${includedir}/libdevmapper.h \ | ||
81 | ${SYSROOT_DESTDIR}${libdir}/pkgconfig/devmapper.pc | ||
82 | } | ||
83 | |||
68 | BBCLASSEXTEND = "native nativesdk" | 84 | BBCLASSEXTEND = "native nativesdk" |