summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/lvm2
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2016-08-31 12:15:56 -0400
committerMartin Jansa <Martin.Jansa@gmail.com>2016-09-05 13:30:53 +0200
commit2e386b7c091018bf461fd78ce41c09cd1e2d2e1b (patch)
treecb9a09eac2e6c794dfe53aceec0a281211f504d3 /meta-oe/recipes-support/lvm2
parent99d4505d89e173dea9eccd49859691ca92a677d7 (diff)
downloadmeta-openembedded-2e386b7c091018bf461fd78ce41c09cd1e2d2e1b.tar.gz
lvm2: tweak MODPROBE_CMD for cross compile
Lvm uses variable MODPROBE_CMD at runtime, so build time detection of modprobe is incorrect. ------ |lvm lvcreate --thinpool wrl/pool00 --size 5556m --config devices { preferred_names=["^/dev/mapper/", "^/dev/md/", "^/dev/sd"] filter=["r|/loop1$|","r|/loop2$|","r|/loop3$|","r|/loop4$|","r|/loop5$|","r|/loop6$|","r|/loop7$|"] } |tmp/sysroots/x86_64-linux/usr/bin/modprobe: execvp failed: No such file or directory |tmp/sysroots/x86_64-linux/usr/bin/modprobe failed: 2 ------ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/lvm2')
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2.inc3
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2/0005-tweak-MODPROBE_CMD-for-cross-compile.patch38
2 files changed, 41 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 3a5e1c46a..e452f11bf 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -11,6 +11,7 @@ SRC_URI = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${PV}.tgz \
11 file://0002-use-PTHREAD_MUTEX_RECURSIVE-instead-of-PTHREAD_MUTEX.patch \ 11 file://0002-use-PTHREAD_MUTEX_RECURSIVE-instead-of-PTHREAD_MUTEX.patch \
12 file://0003-Guard-use-of-mallinfo-with-__GLIBC__.patch \ 12 file://0003-Guard-use-of-mallinfo-with-__GLIBC__.patch \
13 file://0004-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch \ 13 file://0004-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch \
14 file://0005-tweak-MODPROBE_CMD-for-cross-compile.patch \
14 " 15 "
15 16
16S = "${WORKDIR}/LVM2.${PV}" 17S = "${WORKDIR}/LVM2.${PV}"
@@ -39,6 +40,8 @@ EXTRA_OECONF = "--with-user= \
39 --with-systemdsystemunitdir=${systemd_system_unitdir} \ 40 --with-systemdsystemunitdir=${systemd_system_unitdir} \
40" 41"
41 42
43CACHED_CONFIGUREVARS += "MODPROBE_CMD=${base_sbindir}/modprobe"
44
42do_install_append() { 45do_install_append() {
43 # Install machine specific configuration file 46 # Install machine specific configuration file
44 install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf 47 install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0005-tweak-MODPROBE_CMD-for-cross-compile.patch b/meta-oe/recipes-support/lvm2/lvm2/0005-tweak-MODPROBE_CMD-for-cross-compile.patch
new file mode 100644
index 000000000..8db320d5e
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/lvm2/0005-tweak-MODPROBE_CMD-for-cross-compile.patch
@@ -0,0 +1,38 @@
1From 72866782f83c8cf85b10017df461128af90cae6e Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Tue, 30 Aug 2016 22:33:47 -0400
4Subject: [PATCH] tweak MODPROBE_CMD for cross compile
5
6Lvm uses variable MODPROBE_CMD at runtime, so build time detection of modprobe
7is incorrect.
8------
9|lvm lvcreate --thinpool wrl/pool00 --size 5556m --config devices
10{ preferred_names=["^/dev/mapper/", "^/dev/md/", "^/dev/sd"]
11filter=["r|/loop1$|","r|/loop2$|","r|/loop3$|","r|/loop4$|","r|/loop5$|","r|/loop6$|","r|/loop7$|"] }
12|tmp/sysroots/x86_64-linux/usr/bin/modprobe: execvp failed: No such file or directory
13|tmp/sysroots/x86_64-linux/usr/bin/modprobe failed: 2
14------
15
16Upstream-Status: Inappropriate [oe specific]
17
18Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
19---
20 configure.in | 2 --
21 1 file changed, 2 deletions(-)
22
23diff --git a/configure.in b/configure.in
24index 8e04782..77681b0 100644
25--- a/configure.in
26+++ b/configure.in
27@@ -1779,8 +1779,6 @@ if test "$UDEV_SYNC" = yes; then
28 fi
29
30 ################################################################################
31-AC_PATH_TOOL(MODPROBE_CMD, modprobe)
32-
33 if test -n "$MODPROBE_CMD"; then
34 AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
35 fi
36--
372.8.1
38