diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2019-09-03 01:43:58 -0400 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-09-03 07:25:28 -0700 |
commit | 7897ca7d19d5a0ac83d84eb040aa61311693f54b (patch) | |
tree | f9154ebb8bf48e3b4206257509ab3137c34fbdd2 /meta-oe/recipes-support | |
parent | c20f2aa82f184d6a4a15fc927f0a887e30bbbe2c (diff) | |
download | meta-openembedded-7897ca7d19d5a0ac83d84eb040aa61311693f54b.tar.gz |
lvm2: fix blkdeactivate failed with command not found
Run blkdeactivate failed:
...
root@intel-x86-64:~# /usr/sbin/blkdeactivate
Deactivating block devices:
/usr/sbin/blkdeactivate: line 345: /bin/lsblk: No such file or directory
/usr/sbin/blkdeactivate: line 345: /bin/sort: No such file or directory
/usr/sbin/blkdeactivate: line 345: /bin/lsblk: No such file or directory
/usr/sbin/blkdeactivate: line 384: SKIP_DEVICE_LIST: bad array subscript
...
- Add missing runtime depends
- Set location of the commands
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r-- | meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch | 73 | ||||
-rw-r--r-- | meta-oe/recipes-support/lvm2/lvm2_2.03.02.bb | 8 |
2 files changed, 80 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch b/meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch new file mode 100644 index 000000000..16de8c0a1 --- /dev/null +++ b/meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 27b56cb6b5dfc75ea8ddb395dc9ef41fb7a09c93 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 2 Sep 2019 23:04:50 -0400 | ||
4 | Subject: [PATCH] fix command /bin/findmnt, /bin/lsblk, /bin/sort not found | ||
5 | |||
6 | In oe-core (util-linux and coreutils), the commands locates in | ||
7 | ${bindir} rather than /bin, add BINDIR to configure it | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe specific] | ||
10 | |||
11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
12 | --- | ||
13 | configure.ac | 3 +++ | ||
14 | scripts/blkdeactivate.sh.in | 7 ++++--- | ||
15 | 2 files changed, 7 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/configure.ac b/configure.ac | ||
18 | index d1431e2..54e5a7b 100644 | ||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -1495,6 +1495,8 @@ fi | ||
22 | |||
23 | SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))" | ||
24 | |||
25 | +BINDIR="$(eval echo $(eval echo $bindir))" | ||
26 | + | ||
27 | SBINDIR="$(eval echo $(eval echo $sbindir))" | ||
28 | LVM_PATH="$SBINDIR/lvm" | ||
29 | AC_DEFINE_UNQUOTED(LVM_PATH, ["$LVM_PATH"], [Path to lvm binary.]) | ||
30 | @@ -1721,6 +1723,7 @@ AC_SUBST(SACKPT_CFLAGS) | ||
31 | AC_SUBST(SACKPT_LIBS) | ||
32 | AC_SUBST(SALCK_CFLAGS) | ||
33 | AC_SUBST(SALCK_LIBS) | ||
34 | +AC_SUBST(BINDIR) | ||
35 | AC_SUBST(SBINDIR) | ||
36 | AC_SUBST(SELINUX_LIBS) | ||
37 | AC_SUBST(SELINUX_PC) | ||
38 | diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in | ||
39 | index a4b8a8f..3db4226 100644 | ||
40 | --- a/scripts/blkdeactivate.sh.in | ||
41 | +++ b/scripts/blkdeactivate.sh.in | ||
42 | @@ -41,13 +41,14 @@ UMOUNT="/bin/umount" | ||
43 | |||
44 | sbindir="@SBINDIR@" | ||
45 | DMSETUP="$sbindir/dmsetup" | ||
46 | +bindir="@BINDIR@" | ||
47 | LVM="$sbindir/lvm" | ||
48 | |||
49 | if "$UMOUNT" --help | grep -- "--all-targets" >"$DEV_DIR/null"; then | ||
50 | UMOUNT_OPTS="--all-targets " | ||
51 | else | ||
52 | UMOUNT_OPTS="" | ||
53 | - FINDMNT="/bin/findmnt -r --noheadings -u -o TARGET" | ||
54 | + FINDMNT="$bindir/findmnt -r --noheadings -u -o TARGET" | ||
55 | FINDMNT_READ="read -r mnt" | ||
56 | fi | ||
57 | DMSETUP_OPTS="" | ||
58 | @@ -55,10 +56,10 @@ LVM_OPTS="" | ||
59 | MDADM_OPTS="" | ||
60 | MPATHD_OPTS="" | ||
61 | |||
62 | -LSBLK="/bin/lsblk -r --noheadings -o TYPE,KNAME,NAME,MOUNTPOINT" | ||
63 | +LSBLK="$bindir/lsblk -r --noheadings -o TYPE,KNAME,NAME,MOUNTPOINT" | ||
64 | LSBLK_VARS="local devtype local kname local name local mnt" | ||
65 | LSBLK_READ="read -r devtype kname name mnt" | ||
66 | -SORT_MNT="/bin/sort -r -u -k 4" | ||
67 | +SORT_MNT="$bindir/sort -r -u -k 4" | ||
68 | |||
69 | # Do not show tool errors by default (only done/skipping summary | ||
70 | # message provided by this script) and no verbose mode by default. | ||
71 | -- | ||
72 | 2.8.1 | ||
73 | |||
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 785c6960e..f42bd8ed2 100644 --- a/meta-oe/recipes-support/lvm2/lvm2_2.03.02.bb +++ b/meta-oe/recipes-support/lvm2/lvm2_2.03.02.bb | |||
@@ -4,6 +4,7 @@ SRCREV = "913c28917e62577a2ef67152b2e5159237503dda" | |||
4 | 4 | ||
5 | SRC_URI += " \ | 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 | file://0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch \ | ||
7 | " | 8 | " |
8 | 9 | ||
9 | DEPENDS += "autoconf-archive-native" | 10 | DEPENDS += "autoconf-archive-native" |
@@ -67,7 +68,12 @@ RDEPENDS_${PN}-udevrules = "libdevmapper" | |||
67 | RDEPENDS_${PN}_append_class-target = " libdevmapper" | 68 | RDEPENDS_${PN}_append_class-target = " libdevmapper" |
68 | RDEPENDS_${PN}_append_class-nativesdk = " libdevmapper" | 69 | RDEPENDS_${PN}_append_class-nativesdk = " libdevmapper" |
69 | 70 | ||
70 | RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash" | 71 | RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) \ |
72 | bash \ | ||
73 | util-linux-lsblk \ | ||
74 | util-linux-findmnt \ | ||
75 | coreutils \ | ||
76 | " | ||
71 | RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})" | 77 | RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})" |
72 | 78 | ||
73 | CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf" | 79 | CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf" |