Upgrade 1.9.6

Signed-off-by: cherry530 <xuping33@huawei.com>
This commit is contained in:
cherry530 2023-02-07 10:51:56 +08:00
parent 82185efc57
commit a94013b64d
8 changed files with 70 additions and 3152 deletions

View File

@ -1,9 +0,0 @@
diff --git a/packaging/daemon/libstoragemgmt.conf b/packaging/daemon/libstoragemgmt.conf
index 1c118a9..cdb43c2 100644
--- a/packaging/daemon/libstoragemgmt.conf
+++ b/packaging/daemon/libstoragemgmt.conf
@@ -1,2 +1,2 @@
-D /var/run/lsm 0775 root libstoragemgmt -
-D /var/run/lsm/ipc 0775 root libstoragemgmt -
+D /run/lsm 0775 root libstoragemgmt -
+D /run/lsm/ipc 0775 root libstoragemgmt -

View File

@ -1,36 +0,0 @@
From 50cd68b994d988c116731a1ff36f3537c6103890 Mon Sep 17 00:00:00 2001
From: Tony Asleson <tasleson@redhat.com>
Date: Wed, 12 Feb 2020 10:04:58 -0600
Subject: [PATCH 1/1] Specify signed char
x86 architecture default to signed characters. Other architectures
default to unsigned characters. When building on non-x86 arch we
get the following error
./json.hpp:22700:42: required from here
./json.hpp:8494:24: error: comparison is always true due to limited
range of data type [-Werror=type-limits]
8494 | if ('\x00' <= c and c <= '\x1F')
| ~~~~~~~^~~~
Signed-off-by: Tony Asleson <tasleson@redhat.com>
---
c_binding/json.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/c_binding/json.hpp b/c_binding/json.hpp
index 6b6655a..a4ed769 100644
--- a/c_binding/json.hpp
+++ b/c_binding/json.hpp
@@ -3097,7 +3097,7 @@ scan_number_done:
std::size_t chars_read = 0;
/// raw input token string (for error messages)
- std::vector<char> token_string {};
+ std::vector<signed char> token_string {};
/// buffer for variable-length tokens (numbers, strings)
string_t token_buffer {};
--
2.32.0

View File

@ -1,29 +0,0 @@
From 2ba3527ae5dc345ee91797c6445bb7fe009b02e3 Mon Sep 17 00:00:00 2001
From: Tony Asleson <tasleson@redhat.com>
Date: Thu, 23 May 2019 14:35:51 -0500
Subject: [PATCH 1/2] simarray._block_rounding: Use integer division
This was causing problems for py2 vs. py3 code. Always use integer
division.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
---
plugin/sim/simarray.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugin/sim/simarray.py b/plugin/sim/simarray.py
index 6f0a582..bc7817b 100644
--- a/plugin/sim/simarray.py
+++ b/plugin/sim/simarray.py
@@ -1268,7 +1268,7 @@ def _check_pool_free_space(self, sim_pool_id, size_bytes):
@staticmethod
def _block_rounding(size_bytes):
- return (size_bytes + BackStore.BLK_SIZE - 1) / \
+ return (size_bytes + BackStore.BLK_SIZE - 1) // \
BackStore.BLK_SIZE * BackStore.BLK_SIZE
def sim_vol_create(self, name, size_bytes, sim_pool_id, is_hw_raid_vol=0):
--
2.37.3.windows.1

View File

@ -1,72 +0,0 @@
From 4e8c6efae3bf8c016c560e58771b7a4db7032efe Mon Sep 17 00:00:00 2001
From: Tony Asleson <tasleson@redhat.com>
Date: Thu, 23 May 2019 14:43:41 -0500
Subject: [PATCH 2/2] sim_array [volume|fs]_resize: Change re-size behavior
The simulator only allows size increments of a block size. The code was
returning success if the user specified 1 byte more for the resize, but
internally it wasn't updating the size, eg. it was leaving the previous
rounded down size. This goes against the documentation for the volume
re-size where we may round up for resize. This change rounds up the
supplied value. If the rounded up size matches current size we return
no state change, else we round up and update the simulator value to match.
This also matches the expected behavior that when successful the new size
will indeed be different, although it may be larger than specified and
if the exact operation is repeated, it will fail with no state change.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
---
plugin/sim/simarray.py | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/plugin/sim/simarray.py b/plugin/sim/simarray.py
index bc7817b..8552e3d 100644
--- a/plugin/sim/simarray.py
+++ b/plugin/sim/simarray.py
@@ -1367,18 +1367,12 @@ def _sim_ag_ids_of_masked_vol(self, sim_vol_id):
'vol_masks', 'vol_id="%s"' % sim_vol_id))
def sim_vol_resize(self, sim_vol_id, new_size_bytes):
- org_new_size_bytes = new_size_bytes
new_size_bytes = BackStore._block_rounding(new_size_bytes)
sim_vol = self.sim_vol_of_id(sim_vol_id)
if sim_vol['total_space'] == new_size_bytes:
- if org_new_size_bytes != new_size_bytes:
- # Even volume size is identical to rounded size,
- # but it's not what user requested, hence we silently pass.
- return
- else:
- raise LsmError(
- ErrorNumber.NO_STATE_CHANGE,
- "Volume size is identical to requested")
+ raise LsmError(
+ ErrorNumber.NO_STATE_CHANGE,
+ "Volume size is identical to requested")
sim_pool = self.sim_pool_of_id(sim_vol['pool_id'])
@@ -1610,17 +1604,13 @@ def sim_fs_delete(self, sim_fs_id):
self._data_delete("fss", 'id="%s"' % sim_fs_id)
def sim_fs_resize(self, sim_fs_id, new_size_bytes):
- org_new_size_bytes = new_size_bytes
new_size_bytes = BackStore._block_rounding(new_size_bytes)
sim_fs = self.sim_fs_of_id(sim_fs_id)
if sim_fs['total_space'] == new_size_bytes:
- if new_size_bytes != org_new_size_bytes:
- return
- else:
- raise LsmError(
- ErrorNumber.NO_STATE_CHANGE,
- "File System size is identical to requested")
+ raise LsmError(
+ ErrorNumber.NO_STATE_CHANGE,
+ "File System size is identical to requested")
# TODO(Gris Ge): If a fs is in a clone/snapshot relationship, resize
# should be handled properly.
--
2.37.3.windows.1

File diff suppressed because it is too large Load Diff

Binary file not shown.

BIN
libstoragemgmt-1.9.6.tar.gz Normal file

Binary file not shown.

View File

@ -1,22 +1,15 @@
%global py2_build_dir %{_builddir}/%{name}-%{version}-%{release}-python2
%define with_python2 0
Name: libstoragemgmt
Version: 1.8.0
Release: 7
Version: 1.9.6
Release: 1
Summary: Storage array management library
License: LGPLv2+
URL: https://github.com/libstorage/libstoragemgmt
Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz
Patch1: 0001-change-run-dir.patch
Patch2: 0002-Specify-signed-char.patch
Patch3: fix-too-many-argument-for-format.patch
Patch6000: backport-0001-simarray._block_rounding-Use-integer-division.patch
Patch6001: backport-0002-sim_array-volume-fs-_resize-Change-re-size-behavior.patch
BuildRequires: gcc gcc-c++ autoconf automake libtool libxml2-devel check-devel perl-interpreter
BuildRequires: openssl-devel glib2-devel systemd bash-completion libconfig-devel systemd-devel
BuildRequires: glib2-devel systemd bash-completion libconfig-devel systemd-devel
BuildRequires: procps sqlite-devel python3-six python3-devel systemd systemd-devel chrpath valgrind
%{?systemd_requires}
@ -70,7 +63,6 @@ Python2 for libstoragemgmt-clibs.
%package -n python3-libstoragemgmt
Summary: python3 for libstoragemgmt
Requires: %{name} = %{version}-%{release} python3-libstoragemgmt-clibs
BuildArch: noarch
%{?python_provide:%python_provide python3-%{name}}
@ -134,7 +126,6 @@ Udev files for %{name}.
%package nfs-plugin
Summary: Files for NFS local filesystem support for %{name}
BuildArch: noarch
Requires: python3-%{name} = %{version} nfs-utils
Requires(post): python3-%{name} = %{version}
Requires(postun): python3-%{name} = %{version}
@ -142,9 +133,8 @@ Requires(postun): python3-%{name} = %{version}
%description nfs-plugin
Files for NFS local filesystem support for %{name}
%package nfs-plugin-clibs
Summary: clibs package for nfs-plugin
Summary: clibs package for nfs-plugin
Requires: %{name} = %{version}-%{release}
%description nfs-plugin-clibs
@ -305,24 +295,38 @@ fi
%{_libexecdir}/lsm.d/*.py*
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/sim.conf
%{_bindir}/sim_lsmplugin
%dir %{python3_sitelib}/lsm
%{python3_sitelib}/lsm/*.py
%{python3_sitelib}/lsm/__pycache__/
%{python3_sitelib}/lsm/external/*
%{python3_sitelib}/lsm/lsmcli/*
%{python3_sitelib}/lsm/plugin/sim/*
%{python3_sitelib}/lsm/plugin/__init__.py
%{python3_sitelib}/lsm/plugin/__pycache__/
%dir %{python3_sitearch}/lsm
%{python3_sitearch}/lsm/*.py
%{python3_sitearch}/lsm/__pycache__/
%{python3_sitearch}/lsm/lsmcli/*
%dir %{python3_sitearch}/sim_plugin
%{python3_sitearch}/sim_plugin/__pycache__/
%{python3_sitearch}/sim_plugin/__init__.*
%{python3_sitearch}/sim_plugin/simulator.*
%{python3_sitearch}/sim_plugin/simarray.*
%files -n python3-%{name}-clibs
%defattr(-,root,root)
%{python3_sitelib}/lsm/_clib.*
%{python3_sitearch}/lsm/_clib.*
%files smis-plugin
%defattr(-,root,root)
%dir %{python3_sitelib}/lsm/plugin/smispy
%dir %{python3_sitelib}/smispy_plugin
%dir %{python3_sitelib}/smispy_plugin/__pycache__
%{python3_sitelib}/smispy_plugin/__pycache__/*
%{python3_sitelib}/smispy_plugin/__init__.*
%{python3_sitelib}/smispy_plugin/smis.*
%{python3_sitelib}/smispy_plugin/dmtf.*
%{python3_sitelib}/smispy_plugin/utils.*
%{python3_sitelib}/smispy_plugin/smis_common.*
%{python3_sitelib}/smispy_plugin/smis_cap.*
%{python3_sitelib}/smispy_plugin/smis_sys.*
%{python3_sitelib}/smispy_plugin/smis_pool.*
%{python3_sitelib}/smispy_plugin/smis_disk.*
%{python3_sitelib}/smispy_plugin/smis_vol.*
%{python3_sitelib}/smispy_plugin/smis_ag.*
%{_bindir}/smispy_lsmplugin
%{python3_sitelib}/lsm/plugin/smispy/*
%{_mandir}/man1/smispy_lsmplugin.1*
%files netapp-plugin
%defattr(-,root,root)
@ -330,27 +334,41 @@ fi
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/hpsa.conf
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/arcconf.conf
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/local.conf
%{_bindir}/ontap_lsmplugin
%{_bindir}/targetd_lsmplugin
%{_bindir}/nstor_lsmplugin
%{_bindir}/megaraid_lsmplugin
%{_bindir}/hpsa_lsmplugin
%{_bindir}/arcconf_lsmplugin
%{_bindir}/local_lsmplugin
%dir %{python3_sitelib}/lsm/plugin/ontap
%{python3_sitelib}/lsm/plugin/ontap/*
%dir %{python3_sitelib}/lsm/plugin/targetd
%{python3_sitelib}/lsm/plugin/targetd/*
%dir %{python3_sitelib}/lsm/plugin/nstor
%{python3_sitelib}/lsm/plugin/nstor/*
%dir %{python3_sitelib}/lsm/plugin/megaraid
%{python3_sitelib}/lsm/plugin/megaraid/*
%dir %{python3_sitelib}/lsm/plugin/hpsa
%{python3_sitelib}/lsm/plugin/hpsa/*
%dir %{python3_sitelib}/lsm/plugin/arcconf
%{python3_sitelib}/lsm/plugin/arcconf/*
%dir %{python3_sitelib}/lsm/plugin/local
%{python3_sitelib}/lsm/plugin/local/*
%{python3_sitelib}/hpsa_plugin/__pycache__/*
%{python3_sitelib}/hpsa_plugin/__init__.*
%{python3_sitelib}/hpsa_plugin/hpsa.*
%{python3_sitelib}/hpsa_plugin/utils.*
%{_mandir}/man1/hpsa_lsmplugin.1*
%dir %{python3_sitelib}/arcconf_plugin
%dir %{python3_sitelib}/arcconf_plugin/__pycache__
%{python3_sitelib}/arcconf_plugin/__pycache__/*
%{python3_sitelib}/arcconf_plugin/__init__.*
%{python3_sitelib}/arcconf_plugin/arcconf.*
%{python3_sitelib}/arcconf_plugin/utils.*
%dir %{python3_sitelib}/local_plugin
%dir %{python3_sitelib}/local_plugin/__pycache__
%{python3_sitelib}/local_plugin/__pycache__/*
%{python3_sitelib}/local_plugin/__init__.*
%{python3_sitelib}/local_plugin/local.*
%{_mandir}/man1/local_lsmplugin.1*
%dir %{python3_sitelib}/megaraid_plugin
%dir %{python3_sitelib}/megaraid_plugin/__pycache__
%{python3_sitelib}/megaraid_plugin/__pycache__/*
%{python3_sitelib}/megaraid_plugin/__init__.*
%{python3_sitelib}/megaraid_plugin/megaraid.*
%{python3_sitelib}/megaraid_plugin/utils.*
%{_mandir}/man1/megaraid_lsmplugin.1*
%dir %{python3_sitelib}/targetd_plugin
%dir %{python3_sitelib}/targetd_plugin/__pycache__
%{python3_sitelib}/targetd_plugin/__pycache__/*
%{python3_sitelib}/targetd_plugin/__init__.*
%{python3_sitelib}/targetd_plugin/targetd.*
%{_mandir}/man1/targetd_lsmplugin.1*
%files udev
%defattr(-,root,root)
@ -361,13 +379,15 @@ fi
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/nfs.conf
%{_bindir}/nfs_lsmplugin
%dir %{python3_sitelib}/lsm/plugin/nfs
%{python3_sitelib}/lsm/plugin/nfs/__pycache__/*
%{python3_sitelib}/lsm/plugin/nfs/__init__.*
%{python3_sitelib}/lsm/plugin/nfs/nfs.*
%dir %{python3_sitearch}/nfs_plugin
%dir %{python3_sitearch}/nfs_plugin/__pycache__
%{python3_sitearch}/nfs_plugin/__pycache__/*
%{python3_sitearch}/nfs_plugin/__init__.*
%{python3_sitearch}/nfs_plugin/nfs.*
%{_mandir}/man1/nfs_lsmplugin.1*
%files nfs-plugin-clibs
%{python3_sitelib}/lsm/plugin/nfs/nfs_clib.*
%files nfs-plugin-clibs
%{python3_sitearch}/nfs_plugin/nfs_clib.*
%files help
%defattr(-,root,root)
@ -375,6 +395,9 @@ fi
%{_mandir}/man*/*
%changelog
* Tue Feb 7 2023 xu_ping <xuping33@h-partners.com> - 1.9.6-1
- Upgrade 1.9.6
* Sat Jan 7 2023 mengwenhua <mengwenhua@xfusion.com> - 1.8.0-7
- Sim fs resize