diff options
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-support/lvm2')
11 files changed, 227 insertions, 242 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch b/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch index 5b55111d..3c4a3a15 100644 --- a/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch +++ b/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch @@ -1,26 +1,27 @@ -From 916ea0c70fd063ab7b81f16fd917a75dc02edf4f Mon Sep 17 00:00:00 2001 -From: Peter Kjellerstedt <pkj@axis.com> -Date: Fri, 17 Mar 2017 03:18:28 +0100 -Subject: [PATCH] Avoid bashisms in init scripts +From ea66faf68c93735edb1f2691cd7364b8cab83fef Mon Sep 17 00:00:00 2001 +From: Peter Kjellerstedt <peter.kjellerstedt@axis.com> +Date: Mon, 26 Nov 2018 14:53:09 +0800 +Subject: [PATCH 1/3] Avoid bashisms in init scripts Upstream-Status: Inappropriate Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> + +Rebase to 2.03.01 + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- - scripts/blk_availability_init_red_hat.in | 4 ++-- - scripts/clvmd_init_red_hat.in | 6 +++--- - scripts/cmirrord_init_red_hat.in | 4 ++-- - scripts/lvm2_cluster_activation_red_hat.sh.in | 4 ++-- - scripts/lvm2_lvmetad_init_red_hat.in | 4 ++-- - scripts/lvm2_lvmpolld_init_red_hat.in | 4 ++-- - scripts/lvm2_monitoring_init_red_hat.in | 4 ++-- - scripts/lvm2_monitoring_init_rhel4 | 4 ++-- - 8 files changed, 17 insertions(+), 17 deletions(-) + scripts/blk_availability_init_red_hat.in | 4 ++-- + scripts/cmirrord_init_red_hat.in | 4 ++-- + scripts/lvm2_lvmpolld_init_red_hat.in | 4 ++-- + scripts/lvm2_monitoring_init_red_hat.in | 4 ++-- + scripts/lvm2_monitoring_init_rhel4 | 4 ++-- + 5 files changed, 10 insertions(+), 10 deletions(-) -Index: LVM2.2.02.177/scripts/blk_availability_init_red_hat.in -=================================================================== ---- LVM2.2.02.177.orig/scripts/blk_availability_init_red_hat.in -+++ LVM2.2.02.177/scripts/blk_availability_init_red_hat.in +diff --git a/scripts/blk_availability_init_red_hat.in b/scripts/blk_availability_init_red_hat.in +index 347c395..b2e9cf9 100644 +--- a/scripts/blk_availability_init_red_hat.in ++++ b/scripts/blk_availability_init_red_hat.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh @@ -35,38 +36,10 @@ Index: LVM2.2.02.177/scripts/blk_availability_init_red_hat.in + echo "Usage: $0 {start|stop|status}" ;; esac -Index: LVM2.2.02.177/scripts/clvmd_init_red_hat.in -=================================================================== ---- LVM2.2.02.177.orig/scripts/clvmd_init_red_hat.in -+++ LVM2.2.02.177/scripts/clvmd_init_red_hat.in -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # - # clvmd - Clustered LVM Daemon init script - # -@@ -161,7 +161,7 @@ restart() { - fi - } - --[ "$EUID" != "0" ] && { -+[ "$(id -u)" != "0" ] && { - echo "clvmd init script can only be executed as root user" - exit 4 - } -@@ -206,7 +206,7 @@ case "$1" in - ;; - - *) -- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" -+ echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - rtrn=2 - ;; - esac -Index: LVM2.2.02.177/scripts/cmirrord_init_red_hat.in -=================================================================== ---- LVM2.2.02.177.orig/scripts/cmirrord_init_red_hat.in -+++ LVM2.2.02.177/scripts/cmirrord_init_red_hat.in +diff --git a/scripts/cmirrord_init_red_hat.in b/scripts/cmirrord_init_red_hat.in +index c82f8f5..a3a321d 100755 +--- a/scripts/cmirrord_init_red_hat.in ++++ b/scripts/cmirrord_init_red_hat.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh @@ -82,48 +55,10 @@ Index: LVM2.2.02.177/scripts/cmirrord_init_red_hat.in ;; esac -Index: LVM2.2.02.177/scripts/lvm2_cluster_activation_red_hat.sh.in -=================================================================== ---- LVM2.2.02.177.orig/scripts/lvm2_cluster_activation_red_hat.sh.in -+++ LVM2.2.02.177/scripts/lvm2_cluster_activation_red_hat.sh.in -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - sbindir="@SBINDIR@" - -@@ -54,7 +54,7 @@ case "$1" in - rtrn=$? - ;; - *) -- echo $"Usage: $0 {activate|deactivate}" -+ echo "Usage: $0 {activate|deactivate}" - rtrn=3 - ;; - esac -Index: LVM2.2.02.177/scripts/lvm2_lvmetad_init_red_hat.in -=================================================================== ---- LVM2.2.02.177.orig/scripts/lvm2_lvmetad_init_red_hat.in -+++ LVM2.2.02.177/scripts/lvm2_lvmetad_init_red_hat.in -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # - # Copyright (C) 2012-2017 Red Hat, Inc. All rights reserved. - # -@@ -103,7 +103,7 @@ case "$1" in - ;; - - *) -- echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}" -+ echo "Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}" - ;; - esac - -Index: LVM2.2.02.177/scripts/lvm2_lvmpolld_init_red_hat.in -=================================================================== ---- LVM2.2.02.177.orig/scripts/lvm2_lvmpolld_init_red_hat.in -+++ LVM2.2.02.177/scripts/lvm2_lvmpolld_init_red_hat.in +diff --git a/scripts/lvm2_lvmpolld_init_red_hat.in b/scripts/lvm2_lvmpolld_init_red_hat.in +index 176ff5d..825f6ad 100644 +--- a/scripts/lvm2_lvmpolld_init_red_hat.in ++++ b/scripts/lvm2_lvmpolld_init_red_hat.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh @@ -139,10 +74,10 @@ Index: LVM2.2.02.177/scripts/lvm2_lvmpolld_init_red_hat.in ;; esac -Index: LVM2.2.02.177/scripts/lvm2_monitoring_init_red_hat.in -=================================================================== ---- LVM2.2.02.177.orig/scripts/lvm2_monitoring_init_red_hat.in -+++ LVM2.2.02.177/scripts/lvm2_monitoring_init_red_hat.in +diff --git a/scripts/lvm2_monitoring_init_red_hat.in b/scripts/lvm2_monitoring_init_red_hat.in +index 95e4125..dff89cd 100644 +--- a/scripts/lvm2_monitoring_init_red_hat.in ++++ b/scripts/lvm2_monitoring_init_red_hat.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh @@ -158,10 +93,10 @@ Index: LVM2.2.02.177/scripts/lvm2_monitoring_init_red_hat.in ;; esac -Index: LVM2.2.02.177/scripts/lvm2_monitoring_init_rhel4 -=================================================================== ---- LVM2.2.02.177.orig/scripts/lvm2_monitoring_init_rhel4 -+++ LVM2.2.02.177/scripts/lvm2_monitoring_init_rhel4 +diff --git a/scripts/lvm2_monitoring_init_rhel4 b/scripts/lvm2_monitoring_init_rhel4 +index 8eb06c5..2e8d0f7 100644 +--- a/scripts/lvm2_monitoring_init_rhel4 ++++ b/scripts/lvm2_monitoring_init_rhel4 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh @@ -177,3 +112,6 @@ Index: LVM2.2.02.177/scripts/lvm2_monitoring_init_rhel4 ;; esac +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch b/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch deleted file mode 100644 index 9ab1c06d..00000000 --- a/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b1ad91a059d99afd1ce25823b7c0a8d3ac63d2fd Mon Sep 17 00:00:00 2001 -From: Dengke Du <dengke.du@windriver.com> -Date: Tue, 25 Oct 2016 11:55:49 +0000 -Subject: [PATCH 3/4] include fcntl.h for O_* defines and fcntl() signature - -On glibc _somehow_ this header gets pulled in indirectly - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Signed-off-by: Dengke Du <dengke.du@windriver.com> ---- -Upstream-Status: Pending ---- - libdaemon/server/daemon-server.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c -index 6af6de9..a9590e7 100644 ---- a/libdaemon/server/daemon-server.c -+++ b/libdaemon/server/daemon-server.c -@@ -18,6 +18,7 @@ - #include "daemon-server.h" - #include "daemon-log.h" - -+#include <fcntl.h> - #include <dlfcn.h> - #include <errno.h> - #include <pthread.h> --- -2.9.3 - diff --git a/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0005-do-not-build-manual.patch b/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0005-do-not-build-manual.patch index e3ce4c8a..7117d99a 100644 --- a/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0005-do-not-build-manual.patch +++ b/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0005-do-not-build-manual.patch @@ -1,7 +1,7 @@ -From 51d661ff33bb254d7b335a9c87acf5c6e7a94192 Mon Sep 17 00:00:00 2001 +From 103ac1c1200df8190372d973e004776cffe8e659 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Tue, 31 Jul 2018 15:08:34 +0800 -Subject: [PATCH] do not build manual +Date: Mon, 26 Nov 2018 14:59:55 +0800 +Subject: [PATCH 2/3] do not build manual On some host (ubuntu 1404), build manual failed. ... @@ -14,34 +14,39 @@ Do not build man to workaround the issue. Upstream-Status: Pending Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + + +Update context for lvm2 2.03.02. + +Signed-off-by: Kai Kang <kai.kang@windriver.com> --- Makefile.in | 6 +++--- configure.ac | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in -index e2f5a84..acf31e5 100644 +index 6a1a990..80cba91 100644 --- a/Makefile.in +++ b/Makefile.in @@ -18,7 +18,7 @@ top_builddir = @top_builddir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ --SUBDIRS = conf daemons include lib libdaemon libdm man scripts device_mapper tools -+SUBDIRS = conf daemons include lib libdaemon libdm scripts device_mapper tools +-SUBDIRS = conf daemons include lib libdaemon libdm man scripts tools ++SUBDIRS = conf daemons include lib libdaemon libdm scripts tools ifeq ("@UDEV_RULES@", "yes") SUBDIRS += udev -@@ -41,7 +41,7 @@ ifeq ($(MAKECMDGOALS),clean) +@@ -33,7 +33,7 @@ ifeq ($(MAKECMDGOALS),clean) endif # FIXME Should use intermediate Makefiles here! ifeq ($(MAKECMDGOALS),distclean) - SUBDIRS = conf include man test scripts \ + SUBDIRS = conf include test scripts \ libdaemon lib tools daemons libdm \ - udev po liblvm python device_mapper + udev po tools.distclean: test.distclean -@@ -71,7 +71,7 @@ liblvm.device-mapper: include.device-mapper +@@ -65,7 +65,7 @@ libdm.device-mapper: include.device-mapper daemons.device-mapper: libdm.device-mapper tools.device-mapper: libdm.device-mapper scripts.device-mapper: include.device-mapper @@ -51,17 +56,17 @@ index e2f5a84..acf31e5 100644 ifeq ("@INTL@", "yes") lib.pofile: include.pofile diff --git a/configure.ac b/configure.ac -index aa374ea..5a92cba 100644 +index 7fd0561..4154dc0 100644 --- a/configure.ac +++ b/configure.ac -@@ -2124,7 +2124,6 @@ libdm/Makefile +@@ -1812,7 +1812,6 @@ libdaemon/server/Makefile + libdm/Makefile + libdm/dm-tools/Makefile libdm/libdevmapper.pc - liblvm/Makefile - liblvm/liblvm2app.pc -man/Makefile po/Makefile - python/Makefile - python/setup.py + scripts/lvm2-pvscan.service + scripts/blkdeactivate.sh -- 2.7.4 diff --git a/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0006-start-lvm2-monitor.service-after-tmp.mount.patch b/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0006-start-lvm2-monitor.service-after-tmp.mount.patch index 0e68d62f..9f9383ef 100644 --- a/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0006-start-lvm2-monitor.service-after-tmp.mount.patch +++ b/external/meta-openembedded/meta-oe/recipes-support/lvm2/files/0006-start-lvm2-monitor.service-after-tmp.mount.patch @@ -1,6 +1,6 @@ -From 24a2c47fd01dde1710f1fa66f5c30ce7010c5956 Mon Sep 17 00:00:00 2001 +From e213ed33a28704f6f538df41a91b7ce95594a4f8 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 21 Sep 2017 15:28:10 +0800 +Date: Tue, 15 Oct 2019 18:12:54 +0800 Subject: [PATCH] start lvm2-monitor.service after tmp.mount The lvm2-monitor.service reqires the existence of locking_dir @@ -9,24 +9,25 @@ So start lvm2-monitor.service after tmp.mount Upstream-Status: Inappropriate [oe specific] +Rebase to v2_03_05 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- scripts/lvm2_monitoring_systemd_red_hat.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lvm2_monitoring_systemd_red_hat.service.in b/scripts/lvm2_monitoring_systemd_red_hat.service.in -index 22238b7..93b2bee 100644 +index 4bf744a..46766cb 100644 --- a/scripts/lvm2_monitoring_systemd_red_hat.service.in +++ b/scripts/lvm2_monitoring_systemd_red_hat.service.in @@ -2,7 +2,7 @@ Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8) - Requires=dm-event.socket lvm2-lvmetad.socket --After=dm-event.socket dm-event.service lvm2-lvmetad.socket lvm2-activation.service lvm2-lvmetad.service -+After=dm-event.socket dm-event.service lvm2-lvmetad.socket lvm2-activation.service lvm2-lvmetad.service tmp.mount - Before=local-fs-pre.target + Requires=dm-event.socket +-After=dm-event.socket dm-event.service lvm2-activation.service ++After=dm-event.socket dm-event.service lvm2-activation.service tmp.mount + Before=local-fs-pre.target shutdown.target DefaultDependencies=no Conflicts=shutdown.target -- -1.8.3.1 +2.7.4 diff --git a/external/meta-openembedded/meta-oe/recipes-support/lvm2/libdevmapper_2.02.180.bb b/external/meta-openembedded/meta-oe/recipes-support/lvm2/libdevmapper_2.02.180.bb deleted file mode 100644 index 26af3275..00000000 --- a/external/meta-openembedded/meta-oe/recipes-support/lvm2/libdevmapper_2.02.180.bb +++ /dev/null @@ -1,17 +0,0 @@ -require lvm2.inc - -SRC_URI[md5sum] = "bc26da66e96727babbd288bb0f050339" -SRC_URI[sha256sum] = "24997e26dfc916151707c9da504d38d0473bec3481a8230b676bc079041bead6" - -DEPENDS += "autoconf-archive-native" - -TARGET_CC_ARCH += "${LDFLAGS}" - -do_install() { - oe_runmake 'DESTDIR=${D}' -C libdm install - oe_runmake 'DESTDIR=${D}' -C tools install_device-mapper -} - -RRECOMMENDS_${PN}_append_class-target = " lvm2-udevrules" - -BBCLASSEXTEND = "native nativesdk" diff --git a/external/meta-openembedded/meta-oe/recipes-support/lvm2/libdevmapper_2.03.06.bb b/external/meta-openembedded/meta-oe/recipes-support/lvm2/libdevmapper_2.03.06.bb new file mode 100644 index 00000000..be558ce1 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-support/lvm2/libdevmapper_2.03.06.bb @@ -0,0 +1,17 @@ +# Break circular dependencies, only populate sysroot (header, +# libraries) to other recipe for compiling, recipe lvm2 +# generates package libdevmapper +require lvm2.inc + +DEPENDS += "autoconf-archive-native" + +TARGET_CC_ARCH += "${LDFLAGS}" + +do_install() { + oe_runmake 'DESTDIR=${D}' -C libdm install +} + +# Do not generate package libdevmapper +PACKAGES = "" + +BBCLASSEXTEND = "native nativesdk" diff --git a/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2.inc b/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2.inc index 26a887ea..01c9df45 100644 --- a/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2.inc +++ b/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2.inc @@ -5,31 +5,26 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=12713b4d9386533feeb07d6e4831765a \ file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24" -DEPENDS += "util-linux libaio" +DEPENDS += "libaio" -SRC_URI = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${PV}.tgz \ +SRC_URI = "git://sourceware.org/git/lvm2.git \ file://lvm.conf \ file://0001-implement-libc-specific-reopen_stream.patch \ file://0002-Guard-use-of-mallinfo-with-__GLIBC__.patch \ - file://0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch \ file://0004-tweak-MODPROBE_CMD-for-cross-compile.patch \ file://0001-Avoid-bashisms-in-init-scripts.patch \ file://0005-do-not-build-manual.patch \ file://0006-start-lvm2-monitor.service-after-tmp.mount.patch \ " - -UPSTREAM_CHECK_URI = "ftp://sources.redhat.com/pub/lvm2/" -UPSTREAM_CHECK_REGEX = "LVM2\.(?P<pver>\d+(\.\d+)+)" - -S = "${WORKDIR}/LVM2.${PV}" +SRCREV = "b9391b1b9f0b73303fa21f8f92574d17ce4c2b02" +S = "${WORKDIR}/git" inherit autotools-brokensep pkgconfig systemd license -LVM2_PACKAGECONFIG = "dmeventd lvmetad" +LVM2_PACKAGECONFIG = "dmeventd" LVM2_PACKAGECONFIG_append_class-target = " \ ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \ ${@incompatible_license_contains('GPLv3', '', 'thin-provisioning-tools', d)} \ - udev \ " # odirect is always enabled because there currently is a bug in @@ -39,18 +34,15 @@ LVM2_PACKAGECONFIG_append_class-target = " \ PACKAGECONFIG ??= "odirect ${LVM2_PACKAGECONFIG}" PACKAGECONFIG[dmeventd] = "--enable-dmeventd,--disable-dmeventd" -PACKAGECONFIG[lvmetad] = "--enable-lvmetad,--disable-lvmetad" PACKAGECONFIG[odirect] = "--enable-o_direct,--disable-o_direct" PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline" PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" PACKAGECONFIG[thin-provisioning-tools] = "--with-thin=internal,--with-thin=none,,thin-provisioning-tools" -PACKAGECONFIG[udev] = "--enable-udev_sync --enable-udev_rules --with-udevdir=${nonarch_base_libdir}/udev/rules.d,--disable-udev_sync --disable-udev_rules,udev" # Unset user/group to unbreak install. EXTRA_OECONF = "--with-user= \ --with-group= \ --enable-realtime \ - --enable-applib \ --enable-cmdlib \ --enable-pkgconfig \ --with-usrlibdir=${libdir} \ diff --git a/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-dev-hdc-open-failed-No-medium-found-will-print-out-i.patch b/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-dev-hdc-open-failed-No-medium-found-will-print-out-i.patch new file mode 100644 index 00000000..24d5b1b4 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-dev-hdc-open-failed-No-medium-found-will-print-out-i.patch @@ -0,0 +1,32 @@ +From 93c93e3b85492e58f9451841e6079d00c497efa4 Mon Sep 17 00:00:00 2001 +From: Jiping Ma <jiping.ma2@windriver.com> +Date: Mon, 25 Feb 2019 13:29:12 +0800 +Subject: [PATCH] "/dev/hdc: open failed: No medium found" will print out in + lvmdiskscan. + +commit [57bb46c5e7f8] introduce this issue. +"/dev/hdc: open failed: No medium found" will be print out +after run lvmdiskscan. change dev_open_readonly() +to dev_open_readonly_quiet() in fuction _dev_get_size_dev(). + +Signed-off-by: Jiping Ma <jiping.ma2@windriver.com> +--- + lib/device/dev-io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/device/dev-io.c b/lib/device/dev-io.c +index dc95131..81a66b0 100644 +--- a/lib/device/dev-io.c ++++ b/lib/device/dev-io.c +@@ -338,7 +338,7 @@ static int _dev_get_size_dev(struct device *dev, uint64_t *size) + } + + if (fd <= 0) { +- if (!dev_open_readonly(dev)) ++ if (!dev_open_readonly_quiet(dev)) + return_0; + fd = dev_fd(dev); + do_close = 1; +-- +1.9.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-explicitly-do-not-install-libdm.patch b/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-explicitly-do-not-install-libdm.patch deleted file mode 100644 index 7f5dd933..00000000 --- a/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-explicitly-do-not-install-libdm.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 5a3e13ae94318c2bed60f875bb3852c45ce0113c Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 25 May 2017 05:27:11 -0400 -Subject: [PATCH] explicitly do not install libdm - -Already have package libdevmapper which split from lvm2, -explicitly do not do the installation here. - -Upstream-Status: Inappropriate [meta-oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> -Signed-off-by: Andrew Bresticker <abrestic@waymo.com> ---- - libdm/Makefile.in | 6 ++++-- - tools/Makefile.in | 3 ++- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/libdm/Makefile.in b/libdm/Makefile.in -index 66ec39513..c779c9d86 100644 ---- a/libdm/Makefile.in -+++ b/libdm/Makefile.in -@@ -77,9 +77,11 @@ ifeq ("@PKGCONFIG@", "yes") - INSTALL_TYPE += install_pkgconfig - endif - --install: $(INSTALL_TYPE) install_include -+install: -+ echo "Do not install device mapper in lvm2" - --install_device-mapper: install -+install_device-mapper: -+ echo "Do not install device mapper in lvm2" - - install_include: $(srcdir)/libdevmapper.h - $(INSTALL_DATA) -D $< $(includedir)/$(<F) -diff --git a/tools/Makefile.in b/tools/Makefile.in -index 103b76732..63ba7fc04 100644 ---- a/tools/Makefile.in -+++ b/tools/Makefile.in -@@ -267,7 +267,8 @@ install_dmsetup_static: dmsetup.static - $(Q) $(INSTALL_PROGRAM) -D $< $(staticdir)/$(<F) - $(Q) $(LN_S) -f $(<F) $(staticdir)/dmstats - --install_device-mapper: $(INSTALL_DMSETUP_TARGETS) -+install_device-mapper: -+ echo "Do not install device mapper in lvm2" - - install_lvm2: $(INSTALL_LVM_TARGETS) - --- -2.19.0.397.gdd90340f6a-goog - diff --git a/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch b/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch new file mode 100644 index 00000000..16de8c0a --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch @@ -0,0 +1,73 @@ +From 27b56cb6b5dfc75ea8ddb395dc9ef41fb7a09c93 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Mon, 2 Sep 2019 23:04:50 -0400 +Subject: [PATCH] fix command /bin/findmnt, /bin/lsblk, /bin/sort not found + +In oe-core (util-linux and coreutils), the commands locates in +${bindir} rather than /bin, add BINDIR to configure it + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + configure.ac | 3 +++ + scripts/blkdeactivate.sh.in | 7 ++++--- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d1431e2..54e5a7b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1495,6 +1495,8 @@ fi + + SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))" + ++BINDIR="$(eval echo $(eval echo $bindir))" ++ + SBINDIR="$(eval echo $(eval echo $sbindir))" + LVM_PATH="$SBINDIR/lvm" + AC_DEFINE_UNQUOTED(LVM_PATH, ["$LVM_PATH"], [Path to lvm binary.]) +@@ -1721,6 +1723,7 @@ AC_SUBST(SACKPT_CFLAGS) + AC_SUBST(SACKPT_LIBS) + AC_SUBST(SALCK_CFLAGS) + AC_SUBST(SALCK_LIBS) ++AC_SUBST(BINDIR) + AC_SUBST(SBINDIR) + AC_SUBST(SELINUX_LIBS) + AC_SUBST(SELINUX_PC) +diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in +index a4b8a8f..3db4226 100644 +--- a/scripts/blkdeactivate.sh.in ++++ b/scripts/blkdeactivate.sh.in +@@ -41,13 +41,14 @@ UMOUNT="/bin/umount" + + sbindir="@SBINDIR@" + DMSETUP="$sbindir/dmsetup" ++bindir="@BINDIR@" + LVM="$sbindir/lvm" + + if "$UMOUNT" --help | grep -- "--all-targets" >"$DEV_DIR/null"; then + UMOUNT_OPTS="--all-targets " + else + UMOUNT_OPTS="" +- FINDMNT="/bin/findmnt -r --noheadings -u -o TARGET" ++ FINDMNT="$bindir/findmnt -r --noheadings -u -o TARGET" + FINDMNT_READ="read -r mnt" + fi + DMSETUP_OPTS="" +@@ -55,10 +56,10 @@ LVM_OPTS="" + MDADM_OPTS="" + MPATHD_OPTS="" + +-LSBLK="/bin/lsblk -r --noheadings -o TYPE,KNAME,NAME,MOUNTPOINT" ++LSBLK="$bindir/lsblk -r --noheadings -o TYPE,KNAME,NAME,MOUNTPOINT" + LSBLK_VARS="local devtype local kname local name local mnt" + LSBLK_READ="read -r devtype kname name mnt" +-SORT_MNT="/bin/sort -r -u -k 4" ++SORT_MNT="$bindir/sort -r -u -k 4" + + # Do not show tool errors by default (only done/skipping summary + # message provided by this script) and no verbose mode by default. +-- +2.8.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.02.180.bb b/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.03.06.bb index 7bd7b09d..e2b551bb 100644 --- a/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.02.180.bb +++ b/external/meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.03.06.bb @@ -1,9 +1,9 @@ require lvm2.inc -SRC_URI[md5sum] = "bc26da66e96727babbd288bb0f050339" -SRC_URI[sha256sum] = "24997e26dfc916151707c9da504d38d0473bec3481a8230b676bc079041bead6" - -SRC_URI += "file://0001-explicitly-do-not-install-libdm.patch" +SRC_URI += " \ + file://0001-dev-hdc-open-failed-No-medium-found-will-print-out-i.patch \ + file://0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch \ + " DEPENDS += "autoconf-archive-native" @@ -32,14 +32,26 @@ PACKAGE_BEFORE_PN = "${PN}-scripts ${PN}-udevrules" SYSTEMD_PACKAGES = "${PN}" SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'lvmetad', 'lvm2-lvmetad.socket lvm2-pvscan@.service', '', d)} \ - blk-availability.service" + blk-availability.service lvm2-pvscan@.service" SYSTEMD_AUTO_ENABLE = "disable" TARGET_CC_ARCH += "${LDFLAGS}" EXTRA_OECONF_append_class-nativesdk = " --with-confdir=${sysconfdir}" +DEPENDS += "util-linux" +LVM2_PACKAGECONFIG_append_class-target = " \ + udev \ +" +PACKAGECONFIG[udev] = "--enable-udev_sync --enable-udev_rules --with-udevdir=${nonarch_base_libdir}/udev/rules.d,--disable-udev_sync --disable-udev_rules,udev,${PN}-udevrules" + +PACKAGES =+ "libdevmapper" +FILES_libdevmapper = " \ + ${libdir}/libdevmapper.so.* \ + ${sbindir}/dmsetup \ + ${sbindir}/dmstats \ +" + FILES_${PN} += "${libdir}/device-mapper/*.so" FILES_${PN}-scripts = " \ ${sbindir}/blkdeactivate \ @@ -50,13 +62,27 @@ FILES_${PN}-scripts = " \ # Specified explicitly for the udev rules, just in case that it does not get picked # up automatically: FILES_${PN}-udevrules = "${nonarch_base_libdir}/udev/rules.d" -RDEPENDS_${PN}-udevrules = "${PN}" +RDEPENDS_${PN}-udevrules = "libdevmapper" RDEPENDS_${PN}_append_class-target = " libdevmapper" RDEPENDS_${PN}_append_class-nativesdk = " libdevmapper" -RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash" +RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) \ + bash \ + util-linux-lsblk \ + util-linux-findmnt \ + coreutils \ +" RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})" CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf" +SYSROOT_PREPROCESS_FUNCS_append = " remove_libdevmapper_sysroot_preprocess" +remove_libdevmapper_sysroot_preprocess() { + rm -f ${SYSROOT_DESTDIR}${libdir}/libdevmapper.so* \ + ${SYSROOT_DESTDIR}${sbindir}/dmsetup \ + ${SYSROOT_DESTDIR}${sbindir}/dmstats \ + ${SYSROOT_DESTDIR}${includedir}/libdevmapper.h \ + ${SYSROOT_DESTDIR}${libdir}/pkgconfig/devmapper.pc +} + BBCLASSEXTEND = "native nativesdk" |