aboutsummaryrefslogtreecommitdiffstats
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)
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 3a5e1c46aa..e452f11bf9 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 \
file://0002-use-PTHREAD_MUTEX_RECURSIVE-instead-of-PTHREAD_MUTEX.patch \
file://0003-Guard-use-of-mallinfo-with-__GLIBC__.patch \
file://0004-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch \
+ file://0005-tweak-MODPROBE_CMD-for-cross-compile.patch \
"
S = "${WORKDIR}/LVM2.${PV}"
@@ -39,6 +40,8 @@ EXTRA_OECONF = "--with-user= \
--with-systemdsystemunitdir=${systemd_system_unitdir} \
"
+CACHED_CONFIGUREVARS += "MODPROBE_CMD=${base_sbindir}/modprobe"
+
do_install_append() {
# Install machine specific configuration file
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 0000000000..8db320d5e1
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/lvm2/0005-tweak-MODPROBE_CMD-for-cross-compile.patch
@@ -0,0 +1,38 @@
+From 72866782f83c8cf85b10017df461128af90cae6e Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Aug 2016 22:33:47 -0400
+Subject: [PATCH] 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
+------
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.in | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 8e04782..77681b0 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1779,8 +1779,6 @@ if test "$UDEV_SYNC" = yes; then
+ fi
+
+ ################################################################################
+-AC_PATH_TOOL(MODPROBE_CMD, modprobe)
+-
+ if test -n "$MODPROBE_CMD"; then
+ AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
+ fi
+--
+2.8.1
+