Skip to contentSkip to conversation

lvm2: Depend on autoconf-archive-native instead of autoconf-archive

PATCH In review Peter Kjellerstedt 2 participants 15 messages Feb 18, 2017 – Mar 22, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/8 lvm2: Depend on autoconf-archive-native instead of autoconf-archive

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

---
 meta-oe/recipes-support/lvm2/lvm2_2.02.166.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/lvm2/lvm2_2.02.166.bb +1 -1
index 6983bca..c81faa7 100644
@@ -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"
Signature · 1 line
2.9.0
#1 lore raw

PATCH 2/8 lvm2: Make sure odirect is always enabled

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

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
meta-oe/recipes-support/lvm2/lvm2.inc +6 -9
index 333223a..f69acde 100644
@@ -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= \
Signature · 1 line
2.9.0
#2 lore raw

PATCH 3/8 lvm2: Standardize how PACKAGECONFIG is defined

In reply to Peter Kjellerstedt

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

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
meta-oe/recipes-support/lvm2/lvm2.inc +6 -3
index f69acde..7c4bbb9 100644
@@ -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
Signature · 1 line
2.9.0
#3 lore raw

PATCH 4/8 lvm2: Add a PACKAGECONFIG for udev support

In reply to Peter Kjellerstedt

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]

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
meta-oe/recipes-support/lvm2/lvm2.inc +4 -12
index 7c4bbb9..5d228ea 100644
@@ -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"
Signature · 1 line
2.9.0
#4 lore raw

PATCH 5/8 lvm2: Add a PACKAGECONFIG for dmeventd

In reply to Peter Kjellerstedt

This allows the support for dmeventd to be disabled.

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meta-oe/recipes-support/lvm2/lvm2.inc +5 -4
index 5d228ea..2c0ad29 100644
@@ -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 \
-                         [email protected] blk-availability.service"
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \
+                         lvm2-lvmetad.socket [email protected] \
+                         blk-availability.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
Signature · 1 line
2.9.0
#5 lore raw

PATCH 6/8 lvm2: Add a PACKAGECONFIG for lvmetad

In reply to Peter Kjellerstedt

This allows the support for lvmetad to be disabled.

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta-oe/recipes-support/lvm2/lvm2.inc +3 -3
index 2c0ad29..438ea7b 100644
@@ -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 [email protected] \
+                         ${@bb.utils.contains('PACKAGECONFIG', 'lvmetad', 'lvm2-lvmetad.socket [email protected]', '', d)} \
                          blk-availability.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
Signature · 1 line
2.9.0
#6 lore raw

PATCH 7/8 lvm2: Move bash scripts to a separate package

In reply to Peter Kjellerstedt

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.

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
meta-oe/recipes-support/lvm2/lvm2.inc +10 -2
index 438ea7b..1462841 100644
@@ -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 [email protected]', '', 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"
Signature · 1 line
2.9.0
#7 lore raw

PATCH 8/8 lvm2: Move libdevmapper to a separate package

In reply to Peter Kjellerstedt

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

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta-oe/recipes-support/lvm2/lvm2.inc +8 -1
index 1462841..e0a126e 100644
@@ -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"
Signature · 1 line
2.9.0
#8 lore raw

Re: [meta-oe][PATCH 8/8] lvm2: Move libdevmapper to a separate package

Quoted 2 lines · Peter Kjellerstedt

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.

Signature · 6 lines
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.
#9 lore raw

Re: [meta-oe][PATCH 8/8] lvm2: Move libdevmapper to a separate package

Quoted 9 lines · Patrick Ohly
Quoted 2 lines · Peter Kjellerstedt

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

Quoted 7 lines

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?

meta-oe/recipes-support/lvm2/lvm2.inc +5 -2
index b25d775f1..4804b6fb3 100644
@@ -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 \
Signature · 6 lines
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.
#10 lore raw

PATCH 1/1 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.

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-oe/recipes-support/lvm2/lvm2.inc +5 -2
index 3e79552..c0fe755 100644
@@ -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

Signature · 1 line
git-series 0.9.1
#11 lore raw

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.

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-oe/recipes-support/lvm2/lvm2.inc +5 -2
index 3e79552..cfa74d4 100644
@@ -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

Signature · 1 line
git-series 0.9.1
#12 lore raw

Re: [meta-oe][PATCH v2 1/2] lvm2: libdevicemapper package needs udev rules and dmsetup

Quoted 59 lines

-----Original Message-----
From: Patrick Ohly [mailto:[email protected]]
Sent: den 20 mars 2017 16:14
To: [email protected]
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.

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-oe/recipes- renamed from meta-oe/recipes-support/lvm2/lvm2.inc +0 -0

support/lvm2/lvm2.inc
index 3e79552..cfa74d4 100644

meta-oe/recipes-support/lvm2/lvm2.inc +5 -2
@@ -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 \
Quoted 3 lines

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

//Peter

#13 lore raw

PATCH v2 2/2 lvm2: fix lvm2-native RRECOMMENDS problem

In reply to Patrick Ohly

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)

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/lvm2/lvm2.inc +1 -1
index cfa74d4..d0be296 100644
@@ -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"
Signature · 1 line
git-series 0.9.1
#14 lore raw

Re: [meta-oe][PATCH v2 2/2] lvm2: fix lvm2-native RRECOMMENDS problem

Quoted 31 lines

-----Original Message-----
From: Patrick Ohly [mailto:[email protected]]
Sent: den 20 mars 2017 16:14
To: [email protected]
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)

---
 meta-oe/recipes-support/lvm2/lvm2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/lvm2/lvm2.inc +1 -2
index cfa74d4..d0be296 100644
@@ -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"
--
Quoted 1 line

git-series 0.9.1

//Peter