summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2017-04-24 16:06:41 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2017-04-26 20:13:32 +0200
commit7f17da154372b5ec33947766783444961e8aa67c (patch)
treeead705af475f594c4a08e69f2fab319a3b249bde /meta-oe/recipes-support
parent7e4166e80b6994d8ea1a4eacffa4fe9d386c72ec (diff)
downloadmeta-openembedded-7f17da154372b5ec33947766783444961e8aa67c.tar.gz
lvm2: separate libdevmapper to avoid circular dependency
If we enable 'cryptsetup' PACKAGECONFIG for systemd, there would be circular dependency issue among 'systemd', 'cryptsetup' and 'lvm2'. cryptsetup only needs libdevmapper from lvm2. So we separte libdevmapper into a new recipe to solve this circular dependency issue. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r--meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch (renamed from meta-oe/recipes-support/lvm2/lvm2/0001-Avoid-bashisms-in-init-scripts.patch)0
-rw-r--r--meta-oe/recipes-support/lvm2/files/0001-implement-libc-specific-reopen_stream.patch (renamed from meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch)0
-rw-r--r--meta-oe/recipes-support/lvm2/files/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch (renamed from meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch)0
-rw-r--r--meta-oe/recipes-support/lvm2/files/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch (renamed from meta-oe/recipes-support/lvm2/lvm2/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch)0
-rw-r--r--meta-oe/recipes-support/lvm2/files/0004-tweak-MODPROBE_CMD-for-cross-compile.patch (renamed from meta-oe/recipes-support/lvm2/lvm2/0004-tweak-MODPROBE_CMD-for-cross-compile.patch)0
-rw-r--r--meta-oe/recipes-support/lvm2/files/lvm.conf (renamed from meta-oe/recipes-support/lvm2/lvm2/lvm.conf)0
-rw-r--r--meta-oe/recipes-support/lvm2/libdevmapper_2.02.166.bb31
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2.inc75
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2_2.02.166.bb73
9 files changed, 104 insertions, 75 deletions
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-Avoid-bashisms-in-init-scripts.patch b/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch
index e86ab25e6..e86ab25e6 100644
--- a/meta-oe/recipes-support/lvm2/lvm2/0001-Avoid-bashisms-in-init-scripts.patch
+++ b/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch b/meta-oe/recipes-support/lvm2/files/0001-implement-libc-specific-reopen_stream.patch
index 5d72402bd..5d72402bd 100644
--- a/meta-oe/recipes-support/lvm2/lvm2/0001-implement-libc-specific-reopen_stream.patch
+++ b/meta-oe/recipes-support/lvm2/files/0001-implement-libc-specific-reopen_stream.patch
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch b/meta-oe/recipes-support/lvm2/files/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch
index 95dcede33..95dcede33 100644
--- a/meta-oe/recipes-support/lvm2/lvm2/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch
+++ b/meta-oe/recipes-support/lvm2/files/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch b/meta-oe/recipes-support/lvm2/files/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch
index 9ab1c06d2..9ab1c06d2 100644
--- a/meta-oe/recipes-support/lvm2/lvm2/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch
+++ b/meta-oe/recipes-support/lvm2/files/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0004-tweak-MODPROBE_CMD-for-cross-compile.patch b/meta-oe/recipes-support/lvm2/files/0004-tweak-MODPROBE_CMD-for-cross-compile.patch
index aaeaa725d..aaeaa725d 100644
--- a/meta-oe/recipes-support/lvm2/lvm2/0004-tweak-MODPROBE_CMD-for-cross-compile.patch
+++ b/meta-oe/recipes-support/lvm2/files/0004-tweak-MODPROBE_CMD-for-cross-compile.patch
diff --git a/meta-oe/recipes-support/lvm2/lvm2/lvm.conf b/meta-oe/recipes-support/lvm2/files/lvm.conf
index 9e3b5fe29..9e3b5fe29 100644
--- a/meta-oe/recipes-support/lvm2/lvm2/lvm.conf
+++ b/meta-oe/recipes-support/lvm2/files/lvm.conf
diff --git a/meta-oe/recipes-support/lvm2/libdevmapper_2.02.166.bb b/meta-oe/recipes-support/lvm2/libdevmapper_2.02.166.bb
new file mode 100644
index 000000000..462e8fb01
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/libdevmapper_2.02.166.bb
@@ -0,0 +1,31 @@
1require lvm2.inc
2
3SRC_URI[md5sum] = "c5a54ee0b86703daaad6e856439e115a"
4SRC_URI[sha256sum] = "e120b066b85b224552efda40204488c5123de068725676fd6e5c8bc655051b94"
5
6DEPENDS += "autoconf-archive-native"
7
8PACKAGECONFIG = ""
9
10# Unset user/group to unbreak install.
11EXTRA_OECONF = "--with-user= \
12 --with-group= \
13 --enable-pkgconfig \
14 --with-usrlibdir=${libdir} \
15"
16
17TARGET_CC_ARCH += "${LDFLAGS}"
18
19do_install_append() {
20 # Remove things unrelated to libdevmapper
21 rm -rf ${D}${sysconfdir}
22 for i in `ls ${D}${sbindir}/*`; do
23 if [ $i != ${D}${sbindir}/dmsetup ]; then
24 rm $i
25 fi
26 done
27 # Remove docs
28 rm -rf ${D}${datadir}
29}
30
31RRECOMMENDS_${PN} += "lvm2-udevrules"
diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index e295e20fa..cb5a9e042 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -18,15 +18,6 @@ S = "${WORKDIR}/LVM2.${PV}"
18 18
19inherit autotools-brokensep pkgconfig systemd 19inherit autotools-brokensep pkgconfig systemd
20 20
21LVM2_PACKAGECONFIG = "dmeventd lvmetad"
22LVM2_PACKAGECONFIG_append_class-target = " \
23 ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \
24 thin-provisioning-tools \
25 udev \
26"
27
28PACKAGECONFIG ??= "${LVM2_PACKAGECONFIG}"
29
30# odirect is always enabled because there currently is a bug in 21# odirect is always enabled because there currently is a bug in
31# lib/device/dev-io.c which prevents compiling without it. It is 22# lib/device/dev-io.c which prevents compiling without it. It is
32# better to stick to configurations that were actually tested by 23# better to stick to configurations that were actually tested by
@@ -40,69 +31,3 @@ PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline"
40PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" 31PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
41PACKAGECONFIG[thin-provisioning-tools] = "--with-thin=internal,--with-thin=none,,thin-provisioning-tools" 32PACKAGECONFIG[thin-provisioning-tools] = "--with-thin=internal,--with-thin=none,,thin-provisioning-tools"
42PACKAGECONFIG[udev] = "--enable-udev_sync --enable-udev_rules --with-udevdir=${nonarch_base_libdir}/udev/rules.d,--disable-udev_sync --disable-udev_rules,udev" 33PACKAGECONFIG[udev] = "--enable-udev_sync --enable-udev_rules --with-udevdir=${nonarch_base_libdir}/udev/rules.d,--disable-udev_sync --disable-udev_rules,udev"
43
44# Unset user/group to unbreak install.
45EXTRA_OECONF = "--with-user= \
46 --with-group= \
47 --enable-realtime \
48 --enable-applib \
49 --enable-cmdlib \
50 --enable-pkgconfig \
51 --with-usrlibdir=${libdir} \
52 --with-systemdsystemunitdir=${systemd_system_unitdir} \
53 --disable-thin_check_needs_check \
54 --with-thin-check=${sbindir}/thin_check \
55 --with-thin-dump=${sbindir}/thin_dump \
56 --with-thin-repair=${sbindir}/thin_repair \
57 --with-thin-restore=${sbindir}/thin_restore \
58"
59
60CACHED_CONFIGUREVARS += "MODPROBE_CMD=${base_sbindir}/modprobe"
61
62do_install_append() {
63 # Install machine specific configuration file
64 install -d ${D}${sysconfdir}/lvm
65 install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf
66 sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf
67 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
68 oe_runmake 'DESTDIR=${D}' install install_systemd_units
69 sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_system_unitdir}/blk-availability.service
70 else
71 oe_runmake 'DESTDIR=${D}' install install_initscripts
72 mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d
73 rm -rf ${D}${sysconfdir}/rc.d
74 fi
75}
76
77PACKAGE_BEFORE_PN = "${PN}-scripts libdevmapper libdevmapper-dev"
78
79SYSTEMD_PACKAGES = "${PN}"
80SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \
81 ${@bb.utils.contains('PACKAGECONFIG', 'lvmetad', 'lvm2-lvmetad.socket lvm2-pvscan@.service', '', d)} \
82 blk-availability.service"
83SYSTEMD_AUTO_ENABLE = "disable"
84
85TARGET_CC_ARCH += "${LDFLAGS}"
86
87FILES_${PN} += "${libdir}/device-mapper/*.so"
88FILES_${PN}-scripts = " \
89 ${sbindir}/blkdeactivate \
90 ${sbindir}/fsadm \
91 ${sbindir}/lvmconf \
92 ${sbindir}/lvmdump \
93"
94# Specified explicitly for the udev rules, just in case that it does not get picked
95# up automatically:
96RDEPENDS_${PN}_append_class-target = " libdevmapper"
97FILES_libdevmapper = "${sbindir}/dmsetup ${libdir}/libdevmapper.so.* ${nonarch_base_libdir}/udev/rules.d"
98FILES_libdevmapper-dev = " \
99 ${libdir}/libdevmapper.so \
100 ${libdir}/pkgconfig/devmapper.pc \
101 ${includedir}/libdevmapper.h \
102"
103
104RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash"
105RDEPENDS_libdevmapper-dev = "libdevmapper (= ${EXTENDPKGV})"
106RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})"
107
108CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf"
diff --git a/meta-oe/recipes-support/lvm2/lvm2_2.02.166.bb b/meta-oe/recipes-support/lvm2/lvm2_2.02.166.bb
index c81faa7e5..7939f0552 100644
--- a/meta-oe/recipes-support/lvm2/lvm2_2.02.166.bb
+++ b/meta-oe/recipes-support/lvm2/lvm2_2.02.166.bb
@@ -5,4 +5,77 @@ SRC_URI[sha256sum] = "e120b066b85b224552efda40204488c5123de068725676fd6e5c8bc655
5 5
6DEPENDS += "autoconf-archive-native" 6DEPENDS += "autoconf-archive-native"
7 7
8LVM2_PACKAGECONFIG = "dmeventd lvmetad"
9LVM2_PACKAGECONFIG_append_class-target = " \
10 ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \
11 thin-provisioning-tools \
12 udev \
13"
14
15PACKAGECONFIG ??= "${LVM2_PACKAGECONFIG}"
16
17# Unset user/group to unbreak install.
18EXTRA_OECONF = "--with-user= \
19 --with-group= \
20 --enable-realtime \
21 --enable-applib \
22 --enable-cmdlib \
23 --enable-pkgconfig \
24 --with-usrlibdir=${libdir} \
25 --with-systemdsystemunitdir=${systemd_system_unitdir} \
26 --disable-thin_check_needs_check \
27 --with-thin-check=${sbindir}/thin_check \
28 --with-thin-dump=${sbindir}/thin_dump \
29 --with-thin-repair=${sbindir}/thin_repair \
30 --with-thin-restore=${sbindir}/thin_restore \
31"
32
33CACHED_CONFIGUREVARS += "MODPROBE_CMD=${base_sbindir}/modprobe"
34
35do_install_append() {
36 # Install machine specific configuration file
37 install -d ${D}${sysconfdir}/lvm
38 install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf
39 sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf
40 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
41 oe_runmake 'DESTDIR=${D}' install install_systemd_units
42 sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_system_unitdir}/blk-availability.service
43 else
44 oe_runmake 'DESTDIR=${D}' install install_initscripts
45 mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d
46 rm -rf ${D}${sysconfdir}/rc.d
47 fi
48 # Remove things related to libdevmapper
49 rm -f ${D}${sbindir}/dmsetup
50 rm -f ${D}${libdir}/libdevmapper.so.*
51 rm -f ${D}${libdir}/libdevmapper.so ${D}${libdir}/pkgconfig/devmapper.pc ${D}${includedir}/libdevmapper.h
52}
53
54PACKAGE_BEFORE_PN = "${PN}-scripts ${PN}-udevrules"
55
56SYSTEMD_PACKAGES = "${PN}"
57SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \
58 ${@bb.utils.contains('PACKAGECONFIG', 'lvmetad', 'lvm2-lvmetad.socket lvm2-pvscan@.service', '', d)} \
59 blk-availability.service"
60SYSTEMD_AUTO_ENABLE = "disable"
61
62TARGET_CC_ARCH += "${LDFLAGS}"
63
64FILES_${PN} += "${libdir}/device-mapper/*.so"
65FILES_${PN}-scripts = " \
66 ${sbindir}/blkdeactivate \
67 ${sbindir}/fsadm \
68 ${sbindir}/lvmconf \
69 ${sbindir}/lvmdump \
70"
71# Specified explicitly for the udev rules, just in case that it does not get picked
72# up automatically:
73FILES_${PN}-udevrules = "${nonarch_base_libdir}/udev/rules.d"
74RDEPENDS_${PN}_append_class-target = " libdevmapper"
75
76RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash"
77RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})"
78
79CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf"
80
8BBCLASSEXTEND = "native nativesdk" 81BBCLASSEXTEND = "native nativesdk"