Openembedded Devel Discussions
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/8] lvm2: Depend on autoconf-archive-native instead of autoconf-archive
@ 2017-02-18  2:10 Peter Kjellerstedt
  2017-02-18  2:10 ` [meta-oe][PATCH 2/8] lvm2: Make sure odirect is always enabled Peter Kjellerstedt
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Peter Kjellerstedt @ 2017-02-18  2:10 UTC (permalink / raw)
  To: openembedded-devel

This still satisfies the dependency, and allows lvm2 to be built when
packages that use GPL-3.0 have been disabled via INCOMPATIBLE_LICENSE.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-support/lvm2/lvm2_2.02.166.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 6983bca..c81faa7 100644
--- a/meta-oe/recipes-support/lvm2/lvm2_2.02.166.bb
+++ b/meta-oe/recipes-support/lvm2/lvm2_2.02.166.bb
@@ -3,6 +3,6 @@ require lvm2.inc
 SRC_URI[md5sum] = "c5a54ee0b86703daaad6e856439e115a"
 SRC_URI[sha256sum] = "e120b066b85b224552efda40204488c5123de068725676fd6e5c8bc655051b94"
 
-DEPENDS += "autoconf-archive"
+DEPENDS += "autoconf-archive-native"
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH 2/8] lvm2: Make sure odirect is always enabled
  2017-02-18  2:10 [meta-oe][PATCH 1/8] lvm2: Depend on autoconf-archive-native instead of autoconf-archive Peter Kjellerstedt
@ 2017-02-18  2:10 ` Peter Kjellerstedt
  2017-02-18  2:10 ` [meta-oe][PATCH 3/8] lvm2: Standardize how PACKAGECONFIG is defined Peter Kjellerstedt
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Peter Kjellerstedt @ 2017-02-18  2:10 UTC (permalink / raw)
  To: openembedded-devel

Make sure that even if PACKAGECONFIG is modified in a bbappend,
odirect will still be enabled.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-support/lvm2/lvm2.inc | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 333223a..f69acde 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -19,21 +19,18 @@ inherit autotools-brokensep pkgconfig systemd
 PACKAGECONFIG_class-target ??= " \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
                    thin-provisioning-tools \
-                   odirect \
 "
 
-# odirect is enabled by default also for native compilation because
-# there's currently a bug in lib/device/dev-io.c which prevents
-# compiling without it. It is better to stick to configurations that
-# were actually tested by upstream...
-PACKAGECONFIG ??= " \
-                   odirect \
-"
+# odirect is always enabled because there currently is a bug in
+# lib/device/dev-io.c which prevents compiling without it. It is
+# better to stick to configurations that were actually tested by
+# upstream...
+PACKAGECONFIG_append = " odirect"
 
+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[odirect] = "--enable-o_direct,--disable-o_direct"
 
 # Unset user/group to unbreak install.
 EXTRA_OECONF = "--with-user= \
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH 3/8] lvm2: Standardize how PACKAGECONFIG is defined
  2017-02-18  2:10 [meta-oe][PATCH 1/8] lvm2: Depend on autoconf-archive-native instead of autoconf-archive Peter Kjellerstedt
  2017-02-18  2:10 ` [meta-oe][PATCH 2/8] lvm2: Make sure odirect is always enabled Peter Kjellerstedt
@ 2017-02-18  2:10 ` Peter Kjellerstedt
  2017-02-18  2:10 ` [meta-oe][PATCH 4/8] lvm2: Add a PACKAGECONFIG for udev support Peter Kjellerstedt
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Peter Kjellerstedt @ 2017-02-18  2:10 UTC (permalink / raw)
  To: openembedded-devel

The change in 4071e6b4b0 broke support for redefining PACKAGECONFIG in
a bbappend without having to resort to use PACKAGECONFIG_class-target.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-support/lvm2/lvm2.inc | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index f69acde..7c4bbb9 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -16,11 +16,14 @@ S = "${WORKDIR}/LVM2.${PV}"
 
 inherit autotools-brokensep pkgconfig systemd
 
-PACKAGECONFIG_class-target ??= " \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
-                   thin-provisioning-tools \
+LVM2_PACKAGECONFIG = ""
+LVM2_PACKAGECONFIG_append_class-target = " \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
+    thin-provisioning-tools \
 "
 
+PACKAGECONFIG ??= "${LVM2_PACKAGECONFIG}"
+
 # odirect is always enabled because there currently is a bug in
 # lib/device/dev-io.c which prevents compiling without it. It is
 # better to stick to configurations that were actually tested by
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH 4/8] lvm2: Add a PACKAGECONFIG for udev support
  2017-02-18  2:10 [meta-oe][PATCH 1/8] lvm2: Depend on autoconf-archive-native instead of autoconf-archive Peter Kjellerstedt
  2017-02-18  2:10 ` [meta-oe][PATCH 2/8] lvm2: Make sure odirect is always enabled Peter Kjellerstedt
  2017-02-18  2:10 ` [meta-oe][PATCH 3/8] lvm2: Standardize how PACKAGECONFIG is defined Peter Kjellerstedt
@ 2017-02-18  2:10 ` Peter Kjellerstedt
  2017-02-18  2:10 ` [meta-oe][PATCH 5/8] lvm2: Add a PACKAGECONFIG for dmeventd Peter Kjellerstedt
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Peter Kjellerstedt @ 2017-02-18  2:10 UTC (permalink / raw)
  To: openembedded-devel

The added dependency on util-linux is necessary to avoid the following
QA warning which appears when the dependency on udev is removed:

  WARNING: lvm2-2.02.166-r0 do_package_qa: QA Issue: lvm2 rdepends on
  util-linux-libblkid, but it isn't a build dependency, missing
  util-linux in DEPENDS or PACKAGECONFIG? [build-deps]

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-support/lvm2/lvm2.inc | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 7c4bbb9..5d228ea 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -1,10 +1,11 @@
 SECTION = "utils"
 DESCRIPTION = "LVM2 is a set of utilities to manage logical volumes in Linux."
-DEPENDS_append_class-target = " udev"
 LICENSE = "GPLv2 & LGPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=12713b4d9386533feeb07d6e4831765a \
                     file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24"
 
+DEPENDS += "util-linux"
+
 SRC_URI = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${PV}.tgz \
            file://lvm.conf \
            file://0001-implement-libc-specific-reopen_stream.patch \
@@ -20,6 +21,7 @@ LVM2_PACKAGECONFIG = ""
 LVM2_PACKAGECONFIG_append_class-target = " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
     thin-provisioning-tools \
+    udev \
 "
 
 PACKAGECONFIG ??= "${LVM2_PACKAGECONFIG}"
@@ -34,6 +36,7 @@ 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-udev-prefix=,--disable-udev_sync --disable-udev_rules,udev"
 
 # Unset user/group to unbreak install.
 EXTRA_OECONF = "--with-user= \
@@ -51,17 +54,6 @@ EXTRA_OECONF = "--with-user= \
                 --with-thin-dump=${sbindir}/thin_dump \
                 --with-thin-repair=${sbindir}/thin_repair \
                 --with-thin-restore=${sbindir}/thin_restore \
-                ${EXTRA_OECONF_UDEV} \
-"
-
-EXTRA_OECONF_UDEV = " \
-                --disable-udev_sync \
-                --disable-udev_rules \
-"
-EXTRA_OECONF_UDEV_class-target = " \
-                --enable-udev_sync \
-                --enable-udev_rules \
-                --with-udev-prefix= \
 "
 
 CACHED_CONFIGUREVARS += "MODPROBE_CMD=${base_sbindir}/modprobe"
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH 5/8] lvm2: Add a PACKAGECONFIG for dmeventd
  2017-02-18  2:10 [meta-oe][PATCH 1/8] lvm2: Depend on autoconf-archive-native instead of autoconf-archive Peter Kjellerstedt
                   ` (2 preceding siblings ...)
  2017-02-18  2:10 ` [meta-oe][PATCH 4/8] lvm2: Add a PACKAGECONFIG for udev support Peter Kjellerstedt
@ 2017-02-18  2:10 ` Peter Kjellerstedt
  2017-02-18  2:10 ` [meta-oe][PATCH 6/8] lvm2: Add a PACKAGECONFIG for lvmetad Peter Kjellerstedt
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Peter Kjellerstedt @ 2017-02-18  2:10 UTC (permalink / raw)
  To: openembedded-devel

This allows the support for dmeventd to be disabled.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-support/lvm2/lvm2.inc | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 5d228ea..2c0ad29 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -17,7 +17,7 @@ S = "${WORKDIR}/LVM2.${PV}"
 
 inherit autotools-brokensep pkgconfig systemd
 
-LVM2_PACKAGECONFIG = ""
+LVM2_PACKAGECONFIG = "dmeventd"
 LVM2_PACKAGECONFIG_append_class-target = " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
     thin-provisioning-tools \
@@ -32,6 +32,7 @@ PACKAGECONFIG ??= "${LVM2_PACKAGECONFIG}"
 # upstream...
 PACKAGECONFIG_append = " odirect"
 
+PACKAGECONFIG[dmeventd] = "--enable-dmeventd,--disable-dmeventd"
 PACKAGECONFIG[odirect] = "--enable-o_direct,--disable-o_direct"
 PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline"
 PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
@@ -45,7 +46,6 @@ EXTRA_OECONF = "--with-user= \
                 --enable-applib \
                 --enable-cmdlib \
                 --enable-pkgconfig \
-                --enable-dmeventd \
                 --enable-lvmetad \
                 --with-usrlibdir=${libdir} \
                 --with-systemdsystemunitdir=${systemd_system_unitdir} \
@@ -74,8 +74,9 @@ do_install_append() {
 }
 
 SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "lvm2-monitor.service dm-event.socket dm-event.service lvm2-lvmetad.socket \
-                         lvm2-pvscan@.service blk-availability.service"
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \
+                         lvm2-lvmetad.socket lvm2-pvscan@.service \
+                         blk-availability.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH 6/8] lvm2: Add a PACKAGECONFIG for lvmetad
  2017-02-18  2:10 [meta-oe][PATCH 1/8] lvm2: Depend on autoconf-archive-native instead of autoconf-archive Peter Kjellerstedt
                   ` (3 preceding siblings ...)
  2017-02-18  2:10 ` [meta-oe][PATCH 5/8] lvm2: Add a PACKAGECONFIG for dmeventd Peter Kjellerstedt
@ 2017-02-18  2:10 ` Peter Kjellerstedt
  2017-02-18  2:10 ` [meta-oe][PATCH 7/8] lvm2: Move bash scripts to a separate package Peter Kjellerstedt
  2017-02-18  2:10 ` [meta-oe][PATCH 8/8] lvm2: Move libdevmapper " Peter Kjellerstedt
  6 siblings, 0 replies; 15+ messages in thread
From: Peter Kjellerstedt @ 2017-02-18  2:10 UTC (permalink / raw)
  To: openembedded-devel

This allows the support for lvmetad to be disabled.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-support/lvm2/lvm2.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 2c0ad29..438ea7b 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -17,7 +17,7 @@ S = "${WORKDIR}/LVM2.${PV}"
 
 inherit autotools-brokensep pkgconfig systemd
 
-LVM2_PACKAGECONFIG = "dmeventd"
+LVM2_PACKAGECONFIG = "dmeventd lvmetad"
 LVM2_PACKAGECONFIG_append_class-target = " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
     thin-provisioning-tools \
@@ -33,6 +33,7 @@ PACKAGECONFIG ??= "${LVM2_PACKAGECONFIG}"
 PACKAGECONFIG_append = " odirect"
 
 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"
@@ -46,7 +47,6 @@ EXTRA_OECONF = "--with-user= \
                 --enable-applib \
                 --enable-cmdlib \
                 --enable-pkgconfig \
-                --enable-lvmetad \
                 --with-usrlibdir=${libdir} \
                 --with-systemdsystemunitdir=${systemd_system_unitdir} \
                 --disable-thin_check_needs_check \
@@ -75,7 +75,7 @@ do_install_append() {
 
 SYSTEMD_PACKAGES = "${PN}"
 SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \
-                         lvm2-lvmetad.socket lvm2-pvscan@.service \
+                         ${@bb.utils.contains('PACKAGECONFIG', 'lvmetad', 'lvm2-lvmetad.socket lvm2-pvscan@.service', '', d)} \
                          blk-availability.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH 7/8] lvm2: Move bash scripts to a separate package
  2017-02-18  2:10 [meta-oe][PATCH 1/8] lvm2: Depend on autoconf-archive-native instead of autoconf-archive Peter Kjellerstedt
                   ` (4 preceding siblings ...)
  2017-02-18  2:10 ` [meta-oe][PATCH 6/8] lvm2: Add a PACKAGECONFIG for lvmetad Peter Kjellerstedt
@ 2017-02-18  2:10 ` Peter Kjellerstedt
  2017-02-18  2:10 ` [meta-oe][PATCH 8/8] lvm2: Move libdevmapper " Peter Kjellerstedt
  6 siblings, 0 replies; 15+ messages in thread
From: Peter Kjellerstedt @ 2017-02-18  2:10 UTC (permalink / raw)
  To: openembedded-devel

By putting the bash scripts in a separate package (lvm2-scripts), the
lvm2 package no longer needs to depend on bash. For backwards
compatibility, the lvm2 package recommends the lvm2-scripts package.

Also remove the adding of ${libdir}/device-mapper/.debug to
FILES_${PN}-dbg as it has not been needed since Krogoth.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-support/lvm2/lvm2.inc | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 438ea7b..1462841 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -73,6 +73,8 @@ do_install_append() {
     fi
 }
 
+PACKAGE_BEFORE_PN = "${PN}-scripts"
+
 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)} \
@@ -82,8 +84,14 @@ SYSTEMD_AUTO_ENABLE = "disable"
 TARGET_CC_ARCH += "${LDFLAGS}"
 
 FILES_${PN} += "${libdir}/device-mapper/*.so ${base_libdir}/udev"
-FILES_${PN}-dbg += "${libdir}/device-mapper/.debug"
+FILES_${PN}-scripts = " \
+    ${sbindir}/blkdeactivate \
+    ${sbindir}/fsadm \
+    ${sbindir}/lvmconf \
+    ${sbindir}/lvmdump \
+"
 
-RDEPENDS_${PN} = "bash"
+RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash"
+RRECOMMENDS_${PN} = "${PN}-scripts (= ${EXTENDPKGV})"
 
 CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf"
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH 8/8] lvm2: Move libdevmapper to a separate package
  2017-02-18  2:10 [meta-oe][PATCH 1/8] lvm2: Depend on autoconf-archive-native instead of autoconf-archive Peter Kjellerstedt
                   ` (5 preceding siblings ...)
  2017-02-18  2:10 ` [meta-oe][PATCH 7/8] lvm2: Move bash scripts to a separate package Peter Kjellerstedt
@ 2017-02-18  2:10 ` Peter Kjellerstedt
  2017-03-16 15:42   ` Patrick Ohly
  6 siblings, 1 reply; 15+ messages in thread
From: Peter Kjellerstedt @ 2017-02-18  2:10 UTC (permalink / raw)
  To: openembedded-devel

This allows, e.g., cryptsetup to use libdevmapper without having to
pull in all of lvm2.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-support/lvm2/lvm2.inc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 1462841..e0a126e 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -73,7 +73,7 @@ do_install_append() {
     fi
 }
 
-PACKAGE_BEFORE_PN = "${PN}-scripts"
+PACKAGE_BEFORE_PN = "${PN}-scripts libdevmapper libdevmapper-dev"
 
 SYSTEMD_PACKAGES = "${PN}"
 SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \
@@ -90,8 +90,15 @@ FILES_${PN}-scripts = " \
     ${sbindir}/lvmconf \
     ${sbindir}/lvmdump \
 "
+FILES_libdevmapper = "${libdir}/libdevmapper.so.*"
+FILES_libdevmapper-dev = " \
+    ${libdir}/libdevmapper.so \
+    ${libdir}/pkgconfig/devmapper.pc \
+    ${includedir}/libdevmapper.h \
+"
 
 RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash"
+RDEPENDS_libdevmapper-dev = "libdevmapper (= ${EXTENDPKGV})"
 RRECOMMENDS_${PN} = "${PN}-scripts (= ${EXTENDPKGV})"
 
 CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf"
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [meta-oe][PATCH 8/8] lvm2: Move libdevmapper to a separate package
  2017-02-18  2:10 ` [meta-oe][PATCH 8/8] lvm2: Move libdevmapper " Peter Kjellerstedt
@ 2017-03-16 15:42   ` Patrick Ohly
  2017-03-16 17:22     ` Patrick Ohly
  0 siblings, 1 reply; 15+ messages in thread
From: Patrick Ohly @ 2017-03-16 15:42 UTC (permalink / raw)
  To: openembedded-devel, Peter Kjellerstedt

On Sat, 2017-02-18 at 03:10 +0100, Peter Kjellerstedt wrote:
> This allows, e.g., cryptsetup to use libdevmapper without having to
> pull in all of lvm2.

I'm experiencing an issue where both kpartx and cryptsetup hang
infinitely. For kpartx, I traced it down to the lack of dmsetup udev
rules in the rootfs, the same problem as in
https://github.com/docker/docker/issues/22025#issuecomment-243943728

Adding lvm2 to my image fixed it, but that defeats the purpose of this
patch... ;-}

Peter, do you know which parts of lvm2 are needed for kpartx
+libdevicemapper to work correctly? My initial attempt with moving just
the udev rules to the libdevicemapper packages was either flawed or
incomplete.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [meta-oe][PATCH 8/8] lvm2: Move libdevmapper to a separate package
  2017-03-16 15:42   ` Patrick Ohly
@ 2017-03-16 17:22     ` Patrick Ohly
  2017-03-20 13:32       ` [meta-oe][PATCH] lvm2: libdevicemapper package needs udev rules and dmsetup Patrick Ohly
  0 siblings, 1 reply; 15+ messages in thread
From: Patrick Ohly @ 2017-03-16 17:22 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Peter Kjellerstedt

On Thu, 2017-03-16 at 16:42 +0100, Patrick Ohly wrote:
> On Sat, 2017-02-18 at 03:10 +0100, Peter Kjellerstedt wrote:
> > This allows, e.g., cryptsetup to use libdevmapper without having to
> > pull in all of lvm2.
> 
> I'm experiencing an issue where both kpartx and cryptsetup hang
> infinitely. For kpartx, I traced it down to the lack of dmsetup udev
> rules in the rootfs, the same problem as in
> https://github.com/docker/docker/issues/22025#issuecomment-243943728
> 
> Adding lvm2 to my image fixed it, but that defeats the purpose of this
> patch... ;-}
> 
> Peter, do you know which parts of lvm2 are needed for kpartx
> +libdevicemapper to work correctly? My initial attempt with moving just
> the udev rules to the libdevicemapper packages was either flawed or
> incomplete.

The rules call dmsetup. Moving that also to libdevicemapper works for
me, see below. Shall I submit that as patch?

diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index b25d775f1..4804b6fb3 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -83,14 +83,17 @@ SYSTEMD_AUTO_ENABLE = "disable"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
-FILES_${PN} += "${libdir}/device-mapper/*.so ${nonarch_base_libdir}/udev"
+FILES_${PN} += "${libdir}/device-mapper/*.so"
 FILES_${PN}-scripts = " \
     ${sbindir}/blkdeactivate \
     ${sbindir}/fsadm \
     ${sbindir}/lvmconf \
     ${sbindir}/lvmdump \
 "
-FILES_libdevmapper = "${libdir}/libdevmapper.so.*"
+# Specified explicitly for the udev rules, just in case that it does not get picked
+# up automatically:
+RDEPENDS_${PN} += "libdevmapper"
+FILES_libdevmapper = "${sbindir}/dmsetup ${libdir}/libdevmapper.so.* ${nonarch_base_libdir}/udev/rules.d"
 FILES_libdevmapper-dev = " \
     ${libdir}/libdevmapper.so \
     ${libdir}/pkgconfig/devmapper.pc \


-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH] lvm2: libdevicemapper package needs udev rules and dmsetup
  2017-03-16 17:22     ` Patrick Ohly
@ 2017-03-20 13:32       ` Patrick Ohly
  2017-03-20 15:14         ` [meta-oe][PATCH v2 1/2] " Patrick Ohly
  0 siblings, 1 reply; 15+ messages in thread
From: Patrick Ohly @ 2017-03-20 13:32 UTC (permalink / raw)
  To: openembedded-devel; +Cc: peter.kjellerstedt

Applications like kpartx and cryptsetup were broken by moving only
libdevicemapper itself into a separate package: as a result of that
change, lvm2 was not getting pulled into images anymore although
libdevicemapper depends on dmsetup and udev rules to be fully
functional.

For example, "kpartx -as" started to hang while waiting for the udev
rules to trigger, which is what creates the /dev/mapper/ entries for
the new partitions (see also
https://github.com/docker/docker/issues/22025#issuecomment-243943728).

Putting udev rules and dmsetup also into libdevicemapper is perhaps
counter-intuitive, but necessary to keep the package functioning. A
full lvm2 installation is guaranteed to pull them in, too, both
because of implicit library dependencies and (just to be sure) an
explicit RDEPENDS.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 meta-oe/recipes-support/lvm2/lvm2.inc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 3e79552..c0fe755 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -83,14 +83,17 @@ SYSTEMD_AUTO_ENABLE = "disable"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
-FILES_${PN} += "${libdir}/device-mapper/*.so ${nonarch_base_libdir}/udev"
+FILES_${PN} += "${libdir}/device-mapper/*.so"
 FILES_${PN}-scripts = " \
     ${sbindir}/blkdeactivate \
     ${sbindir}/fsadm \
     ${sbindir}/lvmconf \
     ${sbindir}/lvmdump \
 "
-FILES_libdevmapper = "${libdir}/libdevmapper.so.*"
+# Specified explicitly for the udev rules, just in case that it does not get picked
+# up automatically:
+RDEPENDS_${PN} += "libdevmapper"
+FILES_libdevmapper = "${sbindir}/dmsetup ${libdir}/libdevmapper.so.* ${nonarch_base_libdir}/udev/rules.d"
 FILES_libdevmapper-dev = " \
     ${libdir}/libdevmapper.so \
     ${libdir}/pkgconfig/devmapper.pc \

base-commit: 6c584374a599f6f8d3607f20ecfc13a67ccf1da1
-- 
git-series 0.9.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH v2 1/2] lvm2: libdevicemapper package needs udev rules and dmsetup
  2017-03-20 13:32       ` [meta-oe][PATCH] lvm2: libdevicemapper package needs udev rules and dmsetup Patrick Ohly
@ 2017-03-20 15:14         ` Patrick Ohly
  2017-03-20 15:14           ` [meta-oe][PATCH v2 2/2] lvm2: fix lvm2-native RRECOMMENDS problem Patrick Ohly
  2017-03-22  9:00           ` [meta-oe][PATCH v2 1/2] lvm2: libdevicemapper package needs udev rules and dmsetup Peter Kjellerstedt
  0 siblings, 2 replies; 15+ messages in thread
From: Patrick Ohly @ 2017-03-20 15:14 UTC (permalink / raw)
  To: openembedded-devel; +Cc: peter.kjellerstedt

Applications like kpartx and cryptsetup were broken by moving only
libdevicemapper itself into a separate package: as a result of that
change, lvm2 was not getting pulled into images anymore although
libdevicemapper depends on dmsetup and udev rules to be fully
functional.

For example, "kpartx -as" started to hang while waiting for the udev
rules to trigger, which is what creates the /dev/mapper/ entries for
the new partitions (see also
https://github.com/docker/docker/issues/22025#issuecomment-243943728).

Putting udev rules and dmsetup also into libdevicemapper is perhaps
counter-intuitive, but necessary to keep the package functioning. A
full lvm2 installation is guaranteed to pull them in, too, both
because of implicit library dependencies and (just to be sure) an
explicit RDEPENDS.

lvm2-native doesn't have packages, so this RDEPENDS must be limited to
the target case.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 meta-oe/recipes-support/lvm2/lvm2.inc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 3e79552..cfa74d4 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -83,14 +83,17 @@ SYSTEMD_AUTO_ENABLE = "disable"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
-FILES_${PN} += "${libdir}/device-mapper/*.so ${nonarch_base_libdir}/udev"
+FILES_${PN} += "${libdir}/device-mapper/*.so"
 FILES_${PN}-scripts = " \
     ${sbindir}/blkdeactivate \
     ${sbindir}/fsadm \
     ${sbindir}/lvmconf \
     ${sbindir}/lvmdump \
 "
-FILES_libdevmapper = "${libdir}/libdevmapper.so.*"
+# Specified explicitly for the udev rules, just in case that it does not get picked
+# up automatically:
+RDEPENDS_${PN}_append_class-target = " libdevmapper"
+FILES_libdevmapper = "${sbindir}/dmsetup ${libdir}/libdevmapper.so.* ${nonarch_base_libdir}/udev/rules.d"
 FILES_libdevmapper-dev = " \
     ${libdir}/libdevmapper.so \
     ${libdir}/pkgconfig/devmapper.pc \

base-commit: 6c584374a599f6f8d3607f20ecfc13a67ccf1da1
-- 
git-series 0.9.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [meta-oe][PATCH v2 2/2] lvm2: fix lvm2-native RRECOMMENDS problem
  2017-03-20 15:14         ` [meta-oe][PATCH v2 1/2] " Patrick Ohly
@ 2017-03-20 15:14           ` Patrick Ohly
  2017-03-22  9:01             ` Peter Kjellerstedt
  2017-03-22  9:00           ` [meta-oe][PATCH v2 1/2] lvm2: libdevicemapper package needs udev rules and dmsetup Peter Kjellerstedt
  1 sibling, 1 reply; 15+ messages in thread
From: Patrick Ohly @ 2017-03-20 15:14 UTC (permalink / raw)
  To: openembedded-devel; +Cc: peter.kjellerstedt

lvm2-native doesn't have packages, so the RRECOMMENDS must be limited
to the target case. This fixes:

ERROR: Nothing RPROVIDES 'lvm2-native-scripts-native' (but virtual:native:.../meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.02.166.bb RDEPENDS on or otherwise requires it)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 meta-oe/recipes-support/lvm2/lvm2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index cfa74d4..d0be296 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -103,6 +103,6 @@ FILES_libdevmapper-dev = " \
 RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash"
 RDEPENDS_${PN} = " bash"
 RDEPENDS_libdevmapper-dev = "libdevmapper (= ${EXTENDPKGV})"
-RRECOMMENDS_${PN} = "${PN}-scripts (= ${EXTENDPKGV})"
+RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})"
 
 CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf"
-- 
git-series 0.9.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [meta-oe][PATCH v2 1/2] lvm2: libdevicemapper package needs udev rules and dmsetup
  2017-03-20 15:14         ` [meta-oe][PATCH v2 1/2] " Patrick Ohly
  2017-03-20 15:14           ` [meta-oe][PATCH v2 2/2] lvm2: fix lvm2-native RRECOMMENDS problem Patrick Ohly
@ 2017-03-22  9:00           ` Peter Kjellerstedt
  1 sibling, 0 replies; 15+ messages in thread
From: Peter Kjellerstedt @ 2017-03-22  9:00 UTC (permalink / raw)
  To: Patrick Ohly, openembedded-devel@lists.openembedded.org

> -----Original Message-----
> From: Patrick Ohly [mailto:patrick.ohly@intel.com]
> Sent: den 20 mars 2017 16:14
> To: openembedded-devel@lists.openembedded.org
> Cc: Peter Kjellerstedt; Patrick Ohly
> Subject: [meta-oe][PATCH v2 1/2] lvm2: libdevicemapper package needs
> udev rules and dmsetup
> 
> Applications like kpartx and cryptsetup were broken by moving only
> libdevicemapper itself into a separate package: as a result of that
> change, lvm2 was not getting pulled into images anymore although
> libdevicemapper depends on dmsetup and udev rules to be fully
> functional.
> 
> For example, "kpartx -as" started to hang while waiting for the udev
> rules to trigger, which is what creates the /dev/mapper/ entries for
> the new partitions (see also
> https://github.com/docker/docker/issues/22025#issuecomment-243943728).
> 
> Putting udev rules and dmsetup also into libdevicemapper is perhaps
> counter-intuitive, but necessary to keep the package functioning. A
> full lvm2 installation is guaranteed to pull them in, too, both
> because of implicit library dependencies and (just to be sure) an
> explicit RDEPENDS.
> 
> lvm2-native doesn't have packages, so this RDEPENDS must be limited to
> the target case.
> 
> Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
> ---
>  meta-oe/recipes-support/lvm2/lvm2.inc | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-
> support/lvm2/lvm2.inc
> index 3e79552..cfa74d4 100644
> --- a/meta-oe/recipes-support/lvm2/lvm2.inc
> +++ b/meta-oe/recipes-support/lvm2/lvm2.inc
> @@ -83,14 +83,17 @@ SYSTEMD_AUTO_ENABLE = "disable"
> 
>  TARGET_CC_ARCH += "${LDFLAGS}"
> 
> -FILES_${PN} += "${libdir}/device-mapper/*.so ${nonarch_base_libdir}/udev"
> +FILES_${PN} += "${libdir}/device-mapper/*.so"
>  FILES_${PN}-scripts = " \
>      ${sbindir}/blkdeactivate \
>      ${sbindir}/fsadm \
>      ${sbindir}/lvmconf \
>      ${sbindir}/lvmdump \
>  "
> -FILES_libdevmapper = "${libdir}/libdevmapper.so.*"
> +# Specified explicitly for the udev rules, just in case that it does not get picked
> +# up automatically:
> +RDEPENDS_${PN}_append_class-target = " libdevmapper"
> +FILES_libdevmapper = "${sbindir}/dmsetup ${libdir}/libdevmapper.so.* ${nonarch_base_libdir}/udev/rules.d"
>  FILES_libdevmapper-dev = " \
>      ${libdir}/libdevmapper.so \
>      ${libdir}/pkgconfig/devmapper.pc \
> 
> base-commit: 6c584374a599f6f8d3607f20ecfc13a67ccf1da1
> --
> git-series 0.9.1

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>

//Peter



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [meta-oe][PATCH v2 2/2] lvm2: fix lvm2-native RRECOMMENDS problem
  2017-03-20 15:14           ` [meta-oe][PATCH v2 2/2] lvm2: fix lvm2-native RRECOMMENDS problem Patrick Ohly
@ 2017-03-22  9:01             ` Peter Kjellerstedt
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Kjellerstedt @ 2017-03-22  9:01 UTC (permalink / raw)
  To: Patrick Ohly, openembedded-devel@lists.openembedded.org

> -----Original Message-----
> From: Patrick Ohly [mailto:patrick.ohly@intel.com]
> Sent: den 20 mars 2017 16:14
> To: openembedded-devel@lists.openembedded.org
> Cc: Peter Kjellerstedt; Patrick Ohly
> Subject: [meta-oe][PATCH v2 2/2] lvm2: fix lvm2-native RRECOMMENDS
> problem
> 
> lvm2-native doesn't have packages, so the RRECOMMENDS must be limited
> to the target case. This fixes:
> 
> ERROR: Nothing RPROVIDES 'lvm2-native-scripts-native' (but virtual:native:.../meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.02.166.bb RDEPENDS on or otherwise requires it)
> 
> Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
> ---
>  meta-oe/recipes-support/lvm2/lvm2.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
> index cfa74d4..d0be296 100644
> --- a/meta-oe/recipes-support/lvm2/lvm2.inc
> +++ b/meta-oe/recipes-support/lvm2/lvm2.inc
> @@ -103,6 +103,6 @@ FILES_libdevmapper-dev = " \
>  RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash"
>  RDEPENDS_${PN} = " bash"
>  RDEPENDS_libdevmapper-dev = "libdevmapper (= ${EXTENDPKGV})"
> -RRECOMMENDS_${PN} = "${PN}-scripts (= ${EXTENDPKGV})"
> +RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})"
> 
>  CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf"
> --
> git-series 0.9.1

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>

//Peter



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-03-22  9:01 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-18  2:10 [meta-oe][PATCH 1/8] lvm2: Depend on autoconf-archive-native instead of autoconf-archive Peter Kjellerstedt
2017-02-18  2:10 ` [meta-oe][PATCH 2/8] lvm2: Make sure odirect is always enabled Peter Kjellerstedt
2017-02-18  2:10 ` [meta-oe][PATCH 3/8] lvm2: Standardize how PACKAGECONFIG is defined Peter Kjellerstedt
2017-02-18  2:10 ` [meta-oe][PATCH 4/8] lvm2: Add a PACKAGECONFIG for udev support Peter Kjellerstedt
2017-02-18  2:10 ` [meta-oe][PATCH 5/8] lvm2: Add a PACKAGECONFIG for dmeventd Peter Kjellerstedt
2017-02-18  2:10 ` [meta-oe][PATCH 6/8] lvm2: Add a PACKAGECONFIG for lvmetad Peter Kjellerstedt
2017-02-18  2:10 ` [meta-oe][PATCH 7/8] lvm2: Move bash scripts to a separate package Peter Kjellerstedt
2017-02-18  2:10 ` [meta-oe][PATCH 8/8] lvm2: Move libdevmapper " Peter Kjellerstedt
2017-03-16 15:42   ` Patrick Ohly
2017-03-16 17:22     ` Patrick Ohly
2017-03-20 13:32       ` [meta-oe][PATCH] lvm2: libdevicemapper package needs udev rules and dmsetup Patrick Ohly
2017-03-20 15:14         ` [meta-oe][PATCH v2 1/2] " Patrick Ohly
2017-03-20 15:14           ` [meta-oe][PATCH v2 2/2] lvm2: fix lvm2-native RRECOMMENDS problem Patrick Ohly
2017-03-22  9:01             ` Peter Kjellerstedt
2017-03-22  9:00           ` [meta-oe][PATCH v2 1/2] lvm2: libdevicemapper package needs udev rules and dmsetup Peter Kjellerstedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox