From 0d61634a3c621e62b96ccf527e315cbf86f3b08b Mon Sep 17 00:00:00 2001 From: sun_hai_10 Date: Wed, 27 Mar 2024 15:32:02 +0800 Subject: [PATCH] fix load plugin warning --- 0001-fix-plugin-warning.patch | 26 ++++++++++++++++++++++++++ libblockdev.spec | 10 +++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 0001-fix-plugin-warning.patch diff --git a/0001-fix-plugin-warning.patch b/0001-fix-plugin-warning.patch new file mode 100644 index 0000000..f8449ef --- /dev/null +++ b/0001-fix-plugin-warning.patch @@ -0,0 +1,26 @@ +From 7a7e0c8b9f7184e43ff6cebf7370976beb409bf2 Mon Sep 17 00:00:00 2001 +From: sun_hai_10 +Date: Wed, 27 Mar 2024 15:11:51 +0800 +Subject: [PATCH] fix plugin warning + +--- + src/python/gi/overrides/BlockDev.py | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/python/gi/overrides/BlockDev.py b/src/python/gi/overrides/BlockDev.py +index e2cb695..dd62445 100644 +--- a/src/python/gi/overrides/BlockDev.py ++++ b/src/python/gi/overrides/BlockDev.py +@@ -1122,9 +1122,7 @@ __all__.append("nvme_connect") + def plugin_specs_from_names(plugin_names): + ret = [] + for name in plugin_names: +- plugin = BlockDev.PluginSpec() +- plugin.name = bd_plugins[name.lower()] +- plugin.so_name = None ++ plugin = BlockDev.PluginSpec(name=bd_plugins[name.lower()], so_name=None) + ret.append(plugin) + + return ret +-- + diff --git a/libblockdev.spec b/libblockdev.spec index 949d9fb..91a6f0d 100644 --- a/libblockdev.spec +++ b/libblockdev.spec @@ -3,12 +3,14 @@ Name: libblockdev Version: 3.0.4 -Release: 1 +Release: 2 Summary: libblockdev is a C library supporting GObject introspection for manipulation of block devices License: LGPLv2+ URL: https://github.com/storaged-project/libblockdev Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}-1/%{name}-%{version}.tar.gz +Patch9001: 0001-fix-plugin-warning.patch + BuildRequires: make glib2-devel libyaml-devel libbytesize-devel parted-devel libuuid-devel ndctl-devel device-mapper-devel BuildRequires: device-mapper-devel systemd-devel nss-devel volume_key-devel >= 0.3.9-7 libblkid-devel libmount-devel BuildRequires: cryptsetup-devel kmod-devel libxslt glib2-doc gtk-doc python3-devel gobject-introspection-devel @@ -157,6 +159,12 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %changelog +* Wed Mar 27 2024 sunhai - 3.0.4-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: fix load plugin warning + * Tue Feb 6 2024 wangzhiqiang - 3.0.4-1 - upgrade version to 3.0.4 -- Gitee