aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/libblockdev
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/libblockdev')
-rw-r--r--meta-oe/recipes-extended/libblockdev/files/0001-fix-pythondir-for-multilib-when-cross-compiling.patch32
-rw-r--r--meta-oe/recipes-extended/libblockdev/files/0001-lvm-Do-not-include-duplicate-entries-in-bd_lvm_lvs-o.patch100
-rw-r--r--meta-oe/recipes-extended/libblockdev/libblockdev_3.1.1.bb (renamed from meta-oe/recipes-extended/libblockdev/libblockdev_2.26.bb)24
3 files changed, 43 insertions, 113 deletions
diff --git a/meta-oe/recipes-extended/libblockdev/files/0001-fix-pythondir-for-multilib-when-cross-compiling.patch b/meta-oe/recipes-extended/libblockdev/files/0001-fix-pythondir-for-multilib-when-cross-compiling.patch
new file mode 100644
index 0000000000..ec3a9fe470
--- /dev/null
+++ b/meta-oe/recipes-extended/libblockdev/files/0001-fix-pythondir-for-multilib-when-cross-compiling.patch
@@ -0,0 +1,32 @@
+From 297abed277ce3aa0cf12adbfda3c8581afdba850 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Sun, 8 Oct 2023 19:30:29 -0700
+Subject: [PATCH] fix pythondir for multilib when cross compiling
+
+In case of cross compiling + multilib, the 'shell python3' line is
+not likely to give out correct result. Make use of pythondir instead.
+
+This patch is related to meta/recipes-devtools/automake/automake/0001-automake-Update-for-python.m4-to-respect-libdir.patch
+in oe-core, so this one is marked as oe specific.
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/python/gi/overrides/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/python/gi/overrides/Makefile.am b/src/python/gi/overrides/Makefile.am
+index 5e8e75f7..7c30601c 100644
+--- a/src/python/gi/overrides/Makefile.am
++++ b/src/python/gi/overrides/Makefile.am
+@@ -1,5 +1,5 @@
+ if WITH_PYTHON3
+-py3libdir = $(shell python3 -c "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '${exec_prefix}'}))")
++py3libdir = $(pythondir)
+ py3overridesdir = $(py3libdir)/gi/overrides
+ dist_py3overrides_DATA = BlockDev.py
+ endif
+--
+2.42.0
+
diff --git a/meta-oe/recipes-extended/libblockdev/files/0001-lvm-Do-not-include-duplicate-entries-in-bd_lvm_lvs-o.patch b/meta-oe/recipes-extended/libblockdev/files/0001-lvm-Do-not-include-duplicate-entries-in-bd_lvm_lvs-o.patch
deleted file mode 100644
index e608358bf7..0000000000
--- a/meta-oe/recipes-extended/libblockdev/files/0001-lvm-Do-not-include-duplicate-entries-in-bd_lvm_lvs-o.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From d10fb2c0ee60c97f4dfeab4506a347c26cb389df Mon Sep 17 00:00:00 2001
-From: Vojtech Trefny <vtrefny@redhat.com>
-Date: Tue, 7 Dec 2021 15:50:45 +0800
-Subject: [PATCH] lvm: Do not include duplicate entries in bd_lvm_lvs output
-
-We use "-o segtypes" for the "lvs" command which means multisegment
-LVs will be twice in the output.
-
-Signed-off-by: Vojtech Trefny <vtrefny@redhat.com>
-
-Upstream-Status: Backport [https://github.com/storaged-project/libblockdev/pull/671]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- src/plugins/lvm.c | 17 +++++++++++++++--
- tests/lvm_test.py | 41 +++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 56 insertions(+), 2 deletions(-)
-
-diff --git a/src/plugins/lvm.c b/src/plugins/lvm.c
-index 2be1dbd..acd5b84 100644
---- a/src/plugins/lvm.c
-+++ b/src/plugins/lvm.c
-@@ -1810,8 +1810,21 @@ BDLVMLVdata** bd_lvm_lvs (const gchar *vg_name, GError **error) {
- if (table && (num_items == 15)) {
- /* valid line, try to parse and record it */
- lvdata = get_lv_data_from_table (table, TRUE);
-- if (lvdata)
-- g_ptr_array_add (lvs, lvdata);
-+ if (lvdata) {
-+ /* ignore duplicate entries in lvs output, these are caused by multi segments LVs */
-+ for (gsize i = 0; i < lvs->len; i++) {
-+ if (g_strcmp0 (((BDLVMLVdata *) g_ptr_array_index (lvs, i))->lv_name, lvdata->lv_name) == 0) {
-+ g_debug("Duplicate LV entry for '%s' found in lvs output",
-+ lvdata->lv_name);
-+ bd_lvm_lvdata_free (lvdata);
-+ lvdata = NULL;
-+ break;
-+ }
-+ }
-+
-+ if (lvdata)
-+ g_ptr_array_add (lvs, lvdata);
-+ }
- } else
- if (table)
- g_hash_table_destroy (table);
-diff --git a/tests/lvm_test.py b/tests/lvm_test.py
-index eb94c91..ab0de21 100644
---- a/tests/lvm_test.py
-+++ b/tests/lvm_test.py
-@@ -915,6 +915,47 @@ class LvmTestLVs(LvmPVVGLVTestCase):
- lvs = BlockDev.lvm_lvs("testVG")
- self.assertEqual(len(lvs), 1)
-
-+class LvmTestLVsMultiSegment(LvmPVVGLVTestCase):
-+ def _clean_up(self):
-+ try:
-+ BlockDev.lvm_lvremove("testVG", "testLV2", True, None)
-+ except:
-+ pass
-+
-+ LvmPVVGLVTestCase._clean_up(self)
-+
-+ def test_lvs(self):
-+ """Verify that it's possible to gather info about LVs"""
-+
-+ succ = BlockDev.lvm_pvcreate(self.loop_dev, 0, 0, None)
-+ self.assertTrue(succ)
-+
-+ succ = BlockDev.lvm_vgcreate("testVG", [self.loop_dev], 0, None)
-+ self.assertTrue(succ)
-+
-+ succ = BlockDev.lvm_lvcreate("testVG", "testLV", 10 * 1024**2)
-+ self.assertTrue(succ)
-+
-+ lvs = BlockDev.lvm_lvs("testVG")
-+ self.assertEqual(len(lvs), 1)
-+ self.assertListEqual([lv.lv_name for lv in lvs], ["testLV"])
-+
-+ # add second LV
-+ succ = BlockDev.lvm_lvcreate("testVG", "testLV2", 10 * 1024**2)
-+ self.assertTrue(succ)
-+
-+ lvs = BlockDev.lvm_lvs("testVG")
-+ self.assertEqual(len(lvs), 2)
-+ self.assertListEqual([lv.lv_name for lv in lvs], ["testLV", "testLV2"])
-+
-+ # by resizing the first LV we will create two segments
-+ succ = BlockDev.lvm_lvresize("testVG", "testLV", 20 * 1024**2, None)
-+ self.assertTrue(succ)
-+
-+ lvs = BlockDev.lvm_lvs("testVG")
-+ self.assertEqual(len(lvs), 2)
-+ self.assertListEqual([lv.lv_name for lv in lvs], ["testLV", "testLV2"])
-+
- class LvmPVVGthpoolTestCase(LvmPVVGTestCase):
- def _clean_up(self):
- try:
---
-2.27.0
-
diff --git a/meta-oe/recipes-extended/libblockdev/libblockdev_2.26.bb b/meta-oe/recipes-extended/libblockdev/libblockdev_3.1.1.bb
index b9c3bbb407..1ad8036d7b 100644
--- a/meta-oe/recipes-extended/libblockdev/libblockdev_2.26.bb
+++ b/meta-oe/recipes-extended/libblockdev/libblockdev_3.1.1.bb
@@ -3,39 +3,37 @@ block devices. It has a plugin-based architecture where each technology (like \
LVM, Btrfs, MD RAID, Swap,...) is implemented in a separate plugin, possibly \
with multiple implementations (e.g. using LVM CLI or the new LVM DBus API)."
HOMEPAGE = "http://rhinstaller.github.io/libblockdev/"
-LICENSE = "LGPLv2+"
+LICENSE = "LGPL-2.0-or-later"
SECTION = "devel/lib"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c07cb499d259452f324bb90c3067d85c"
-inherit autotools gobject-introspection pkgconfig
+inherit autotools gobject-introspection pkgconfig lib_package
-SRC_URI = "git://github.com/storaged-project/libblockdev;branch=2.x-branch;protocol=https \
- file://0001-lvm-Do-not-include-duplicate-entries-in-bd_lvm_lvs-o.patch \
-"
-SRCREV = "47ff12242c89e36a33259d18b7068b26c3bb1c64"
+DEPENDS = "autoconf-archive-native glib-2.0 kmod udev libnvme"
+
+SRC_URI = "git://github.com/storaged-project/libblockdev;branch=3.1.x-devel;protocol=https \
+ file://0001-fix-pythondir-for-multilib-when-cross-compiling.patch \
+ "
+SRCREV = "68aaff5556afe26be749c29a2b7cbd714dce3050"
S = "${WORKDIR}/git"
-FILES:${PN} += "${libdir}/python2.7/dist-packages ${libdir}/python3.*/site-packages"
+FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}"
-PACKAGECONFIG ??= "python3 lvm dm kmod parted fs escrow btrfs crypto mdraid kbd mpath nvdimm"
+PACKAGECONFIG ??= "python3 lvm lvm-dbus dm parted fs escrow btrfs crypto mdraid mpath nvdimm tools"
PACKAGECONFIG[python3] = "--with-python3, --without-python3,,python3"
-PACKAGECONFIG[python2] = "--with-python2, --without-python2,,python"
PACKAGECONFIG[lvm] = "--with-lvm, --without-lvm, multipath-tools, lvm2"
PACKAGECONFIG[lvm-dbus] = "--with-lvm_dbus, --without-lvm_dbus, multipath-tools, lvm2"
PACKAGECONFIG[dm] = "--with-dm, --without-dm, multipath-tools, lvm2"
-PACKAGECONFIG[dmraid] = "--with-dmraid, --without-dmraid"
-PACKAGECONFIG[kmod] = "--with-kbd, --without-kbd, kmod"
PACKAGECONFIG[parted] = "--with-part, --without-part, parted"
PACKAGECONFIG[fs] = "--with-fs, --without-fs, util-linux"
PACKAGECONFIG[doc] = "--with-gtk-doc, --without-gtk-doc, gtk-doc-native"
PACKAGECONFIG[nvdimm] = "--with-nvdimm, --without-nvdimm, ndctl util-linux"
-PACKAGECONFIG[vdo] = "--with-vdo, --without-vdo"
PACKAGECONFIG[escrow] = "--with-escrow, --without-escrow, nss volume-key"
PACKAGECONFIG[btrfs] = "--with-btrfs,--without-btrfs,libbytesize btrfs-tools"
PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,cryptsetup nss volume-key"
PACKAGECONFIG[mdraid] = "--with-mdraid,--without-mdraid,libbytesize"
-PACKAGECONFIG[kbd] = "--with-kbd,--without-kbd,libbytesize"
PACKAGECONFIG[mpath] = "--with-mpath,--without-mpath, multipath-tools, lvm2"
+PACKAGECONFIG[tools] = "--with-tools,--without-tools,libbytesize libdevmapper"
export GIR_EXTRA_LIBS_PATH="${B}/src/utils/.libs"