- Update to version 1.6.0:

OBS-URL: https://build.opensuse.org/package/show/Base:System/libstoragemgmt?expand=0&rev=41
This commit is contained in:
Martin Pluskal 2017-10-26 09:27:01 +00:00 committed by Git OBS Bridge
parent 0248c83fd9
commit 7c1f5a9816
7 changed files with 133 additions and 184 deletions

View File

@ -1,42 +0,0 @@
From 2a2d9a8200f987b42966ab4e96b7769b8f9a159f Mon Sep 17 00:00:00 2001
From: Gris Ge <fge@redhat.com>
Date: Wed, 22 Feb 2017 16:18:20 +0800
Subject: [PATCH] udev: Fix gcc warning on non-x86 platform.
Issue:
Got failure on s390x:
scan-scsi-target.c:90:2: error: comparison is always true due to limited
range of data type [-Werror=type-limits]
Root cause:
The error is on these lines:
char c;
...
while ((c = getopt_long(argc, argv, "rh", longopts, NULL)) != -1) {
On non-x86 platform, char is unsigned. Which makes the (c != -1)
always true.
Fix:
Take return of getopt_long() as int.
Signed-off-by: Gris Ge <fge@redhat.com>
---
tools/udev/scan-scsi-target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: tools/udev/scan-scsi-target.c
===================================================================
--- tools/udev/scan-scsi-target.c.orig
+++ tools/udev/scan-scsi-target.c
@@ -54,7 +54,7 @@ static void __attribute__ ((__noreturn__
int main(int argc, char **argv)
{
- char c;
+ int c;
char *devpath;
char *sysfs_path;

View File

@ -1,83 +0,0 @@
From fa8e9e94c6d06ac135d4363293b00b1a42ebf5c4 Mon Sep 17 00:00:00 2001
From: Gris Ge <fge@redhat.com>
Date: Thu, 23 Feb 2017 22:06:26 +0800
Subject: [PATCH] Simc plugin: Fix gcc warning on fallthrough switch.
Issue:
GCC(gcc-7.0.1-0.9.fc26.x86_64) is warning on fallthrough switch.
Fix:
Use if and else if check instead.
Misc:
Don't want to mess with GCC and CLANG on this trivial issue by
using GCC extention: `__attribute__((fallthrough))`.
Signed-off-by: Gris Ge <fge@redhat.com>
---
plugin/simc/ops_v1_2.c | 38 ++++++++++++++++++--------------------
1 file changed, 18 insertions(+), 20 deletions(-)
diff --git a/plugin/simc/ops_v1_2.c b/plugin/simc/ops_v1_2.c
index 3703161..3bdc2ba 100644
--- a/plugin/simc/ops_v1_2.c
+++ b/plugin/simc/ops_v1_2.c
@@ -63,36 +63,34 @@ int volume_raid_info(lsm_plugin_ptr c, lsm_volume *volume,
_good(_str_to_int(err_msg, lsm_hash_string_get(sim_p, "member_type"),
(int *) &member_type), rc, out);
- switch(member_type) {
- case LSM_POOL_MEMBER_TYPE_POOL:
+ if (member_type == LSM_POOL_MEMBER_TYPE_POOL) {
_good(_str_to_uint64(err_msg, lsm_hash_string_get(sim_p,
"parent_pool_id"),
&sim_p_id), rc, out);
_good(_db_sim_pool_of_sim_id(err_msg, db, sim_p_id, &sim_p), rc, out);
- case LSM_POOL_MEMBER_TYPE_DISK:
- _good(_str_to_int(err_msg, lsm_hash_string_get(sim_p, "raid_type"),
- (int *) raid_type), rc, out);
- _good(_str_to_uint32(err_msg, lsm_hash_string_get(sim_p, "strip_size"),
- strip_size), rc, out);
- *min_io_size = *strip_size;
- _good(_str_to_uint32(err_msg, lsm_hash_string_get(sim_p, "disk_count"),
- disk_count), rc, out);
- _good(_str_to_uint32(err_msg, lsm_hash_string_get(sim_p,
- "data_disk_count"),
- &data_disk_count), rc, out);
- if ((*raid_type == LSM_VOLUME_RAID_TYPE_RAID1) ||
- (*raid_type == LSM_VOLUME_RAID_TYPE_JBOD))
- *opt_io_size = _BLOCK_SIZE;
- else
- *opt_io_size = *strip_size * data_disk_count;
- break;
- default:
+ } else if (member_type != LSM_POOL_MEMBER_TYPE_DISK) {
rc = LSM_ERR_PLUGIN_BUG;
_lsm_err_msg_set(err_msg, "BUG: Got unknown pool member type %d",
member_type);
goto out;
}
+ _good(_str_to_int(err_msg, lsm_hash_string_get(sim_p, "raid_type"),
+ (int *) raid_type), rc, out);
+ _good(_str_to_uint32(err_msg, lsm_hash_string_get(sim_p, "strip_size"),
+ strip_size), rc, out);
+ *min_io_size = *strip_size;
+ _good(_str_to_uint32(err_msg, lsm_hash_string_get(sim_p, "disk_count"),
+ disk_count), rc, out);
+ _good(_str_to_uint32(err_msg, lsm_hash_string_get(sim_p,
+ "data_disk_count"),
+ &data_disk_count), rc, out);
+ if ((*raid_type == LSM_VOLUME_RAID_TYPE_RAID1) ||
+ (*raid_type == LSM_VOLUME_RAID_TYPE_JBOD))
+ *opt_io_size = _BLOCK_SIZE;
+ else
+ *opt_io_size = *strip_size * data_disk_count;
+
out:
_db_sql_trans_rollback(db);
if (sim_vol != NULL)
--
2.12.2

View File

@ -1,16 +0,0 @@
Index: c_binding/libses.c
===================================================================
--- c_binding/libses.c.orig
+++ c_binding/libses.c
@@ -341,9 +341,9 @@ static int _ses_sg_paths_get(char *err_m
(strncmp(sg_name, "sg", strlen("sg")) != 0))
continue;
sysfs_sg_type_path = (char *)
- malloc(sizeof(char) * (sizeof(_SYSFS_SG_ROOT_PATH) +
+ malloc(sizeof(char) * (strlen(_SYSFS_SG_ROOT_PATH) +
strlen("/") +
- sizeof(sg_name) +
+ strlen(sg_name) +
strlen("/device/type") +
1 /* trailing \0 */));
_alloc_null_check(err_msg, sysfs_sg_type_path, rc, out);

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a820f6bf987dc72498f25cd0bfa226a922ccdfa9a445c1c7c430e3a4cd29d7ee
size 946730

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e6e6ebfb0dbd4a747cd87952c1a9eb1865866eda681cecf8729e523094a057b7
size 1044284

View File

@ -1,3 +1,35 @@
-------------------------------------------------------------------
Thu Oct 26 08:57:13 UTC 2017 - mpluskal@suse.com
- Update to version 1.6.0:
* New error number for deleting volume/fs with child dependency:
+ C: LSM_ERR_HAS_CHILD_DEPENDENCY
+ Python: lsm.ErrorNumber.HAS_CHILD_DEPENDENCY
* Fix incorrect SCSI VPD query for 0x89 and 0xb1.
* Fix regression on using libstoragemgmt with pywbem 0.7.0.
* Updates on manpage and help message of lsmcli.
- Changes for version 1.5.0:
* New plugin -- LibstorageMgmt NFS server plugin(nfs://).
* New plugin -- LibstorageMgmt Local Pseudo plugin(local://).
* New plugin -- LibstorageMgmt Microsemi storage plugin(arcconf://).
* Removed support of lmiwbem due to missing self-signed CA verification and inactive upstream of lmiwbem.
* Support SES actions on kernel bsg module(old code was using sg kernel module).
* Add manpages for every C API using kernel-doc.
* New URI parameter ca_cert_file for ONTAP, SMI-S, targetd plugin.
* Bug fixes:
+ Fix the ONTAP SSL connection.
+ Sim plugin: Fix sqlite3 transaction of fs_child_dependency_rm().
+ MegaRAID: Handle when both perccli and storcli are installed.
+ MegaRAID plugin: Support pool status for rebuild and check.
+ Fixed C++ code compile warnings.
* Library adds:
+ Query health status of local disk:
+ lsm_local_disk_health_status_get()/lsm.LocalDisk.health_status_get()
- Drop no longer needed patches:
* 0001-Fix-gcc-warning-on-non-x86-platform.patch
* 0001-Simc-plugin-Fix-gcc-warning-on-fallthrough-switch.patch
* 0002-C-library-Bug-fix-for-incorrect-use-of-sizeof.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jun 1 06:22:27 UTC 2017 - nwang@suse.com Thu Jun 1 06:22:27 UTC 2017 - nwang@suse.com

View File

@ -19,19 +19,13 @@
%define libname %{name}1 %define libname %{name}1
%bcond_with test %bcond_with test
Name: libstoragemgmt Name: libstoragemgmt
Version: 1.4.0 Version: 1.6.0
Release: 0 Release: 0
Summary: Storage array management library Summary: Storage array management library
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: System/Libraries
Url: https://github.com/libstorage/libstoragemgmt Url: https://github.com/libstorage/libstoragemgmt
Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM 0001-Fix-gcc-warning-on-non-x86-platform.patch -- Fix build in ppc64le/s390x related to getopt_long
Patch0: 0001-Fix-gcc-warning-on-non-x86-platform.patch
# PATCH-FIX-UPSTREAM 0002-C-library-Bug-fix-for-incorrect-use-of-sizeof.patch
Patch1: 0002-C-library-Bug-fix-for-incorrect-use-of-sizeof.patch
# PATCH-FIX-UPSTREAM 0001-Simc-plugin-Fix-gcc-warning-on-fallthrough-switch.patch
Patch2: 0001-Simc-plugin-Fix-gcc-warning-on-fallthrough-switch.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libconfig-devel BuildRequires: libconfig-devel
@ -196,29 +190,56 @@ BuildArch: noarch
The %{name}-hpsa-plugin package contains the plugin for HP SmartArray storage The %{name}-hpsa-plugin package contains the plugin for HP SmartArray storage
management via hpssacli. management via hpssacli.
%package nfs-plugin
Summary: Files for nfs support for %{name}
Group: System/Libraries
Requires(post): %{name} = %{version}
Requires(postun): %{name} = %{version}
BuildArch: noarch
%description nfs-plugin
The %{name}-nfs-plugin package contains the plugin for nfs based storage.
%package local-plugin
Summary: Files for HP local pseudo support for %{name}
Group: System/Libraries
Requires(post): %{name} = %{version}
Requires(postun): %{name} = %{version}
BuildArch: noarch
%description local-plugin
The %{name}-local-plugin package contains the plugin for local pseudo
storage.
%package arcconf-plugin
Summary: Files for Microsemi storage support for %{name}
Group: System/Libraries
Requires(post): %{name} = %{version}
Requires(postun): %{name} = %{version}
BuildArch: noarch
%description arcconf-plugin
The %{name}-arcconf-plugin package contains the plugin for Microsemi
storage.
%prep %prep
%setup -q %setup -q
%patch0
%patch1
%patch2 -p1
%build %build
%configure \ %configure \
--disable-static \ --disable-static \
%if ! %{with test} %if ! %{with test}
--without-test --without-test
%endif %endif
make %{?_smp_mflags} V=1 make %{?_smp_mflags} V=1
%install %install
make DESTDIR=%{buildroot} install %{?_smp_mflags} %make_install
find %{buildroot} -type f -name "*.la" -delete -print find %{buildroot} -type f -name "*.la" -delete -print
install -d -m755 %{buildroot}/%{_unitdir}
install -d -m755 %{buildroot}/%{_sbindir} install -d -m755 %{buildroot}/%{_sbindir}
install -m 0644 packaging/daemon/libstoragemgmt.service \ install -Dpm 0644 packaging/daemon/libstoragemgmt.service \
%{buildroot}/%{_unitdir}/libstoragemgmt.service %{buildroot}/%{_unitdir}/libstoragemgmt.service
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
@ -235,7 +256,7 @@ install -m 755 tools/udev/scan-scsi-target \
%{buildroot}/%{_libexecdir}/udev/scan-scsi-target %{buildroot}/%{_libexecdir}/udev/scan-scsi-target
# find all duplicates # find all duplicates
%fdupes -s %{buildroot} %fdupes -s %{buildroot}%{python_sitelib}
%if %{with test} %if %{with test}
%check %check
@ -254,10 +275,10 @@ if [ $1 -eq 1 ]; then
useradd -r -g %{name} -d %{_localstatedir}/run/lsm -s /sbin/nologin \ useradd -r -g %{name} -d %{_localstatedir}/run/lsm -s /sbin/nologin \
-c "daemon account for libstoragemgmt" %{name} -c "daemon account for libstoragemgmt" %{name}
fi fi
%service_add_pre %{name}.service %service_add_pre %{name}.service
%post -n %{libname} -p /sbin/ldconfig %post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig
%post %post
@ -289,8 +310,6 @@ if [ $1 -eq 0 ]; then
%{_bindir}/systemctl try-restart ${name}.service || : %{_bindir}/systemctl try-restart ${name}.service || :
fi fi
# Need to restart lsmd if plugin is new installed or removed.
%post netapp-plugin %post netapp-plugin
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
# New install. # New install.
@ -303,8 +322,6 @@ if [ $1 -eq 0 ]; then
%{_bindir}/systemctl try-restart ${name}.service || : %{_bindir}/systemctl try-restart ${name}.service || :
fi fi
# Need to restart lsmd if plugin is new installed or removed.
%post targetd-plugin %post targetd-plugin
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
# New install. # New install.
@ -317,8 +334,6 @@ if [ $1 -eq 0 ]; then
%{_bindir}/systemctl try-restart ${name}.service || : %{_bindir}/systemctl try-restart ${name}.service || :
fi fi
# Need to restart lsmd if plugin is new installed or removed.
%post nstor-plugin %post nstor-plugin
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
# New install. # New install.
@ -331,8 +346,6 @@ if [ $1 -eq 0 ]; then
%{_bindir}/systemctl try-restart ${name}.service || : %{_bindir}/systemctl try-restart ${name}.service || :
fi fi
# Need to restart lsmd if plugin is new installed or removed.
%post megaraid-plugin %post megaraid-plugin
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
# New install. # New install.
@ -345,8 +358,6 @@ if [ $1 -eq 0 ]; then
%{_bindir}/systemctl try-restart ${name}.service || : %{_bindir}/systemctl try-restart ${name}.service || :
fi fi
# Need to restart lsmd if plugin is new installed or removed.
%post hpsa-plugin %post hpsa-plugin
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
# New install. # New install.
@ -359,11 +370,46 @@ if [ $1 -eq 0 ]; then
%{_bindir}/systemctl try-restart ${name}.service || : %{_bindir}/systemctl try-restart ${name}.service || :
fi fi
%post nfs-plugin
if [ $1 -eq 1 ]; then
# New install.
%{_bindir}/systemctl try-restart ${name}.service || :
fi
%postun nfs-plugin
if [ $1 -eq 0 ]; then
# Remove
%{_bindir}/systemctl try-restart ${name}.service || :
fi
%post local-plugin
if [ $1 -eq 1 ]; then
# New install.
%{_bindir}/systemctl try-restart ${name}.service || :
fi
%postun local-plugin
if [ $1 -eq 0 ]; then
# Remove
%{_bindir}/systemctl try-restart ${name}.service || :
fi
%post arcconf-plugin
if [ $1 -eq 1 ]; then
# New install.
%{_bindir}/systemctl try-restart ${name}.service || :
fi
%postun arcconf-plugin
if [ $1 -eq 0 ]; then
# Remove
%{_bindir}/systemctl try-restart ${name}.service || :
fi
%post udev %post udev
%udev_rules_update %udev_rules_update
%files %files
%defattr(-,root,root)
%{_mandir}/man1/lsmcli.1%{ext_man} %{_mandir}/man1/lsmcli.1%{ext_man}
%{_mandir}/man1/lsmd.1%{ext_man} %{_mandir}/man1/lsmd.1%{ext_man}
%{_mandir}/man5/lsmd.conf.5* %{_mandir}/man5/lsmd.conf.5*
@ -382,23 +428,20 @@ fi
%ghost %dir /run/lsm/ipc %ghost %dir /run/lsm/ipc
%files udev %files udev
%defattr(-,root,root)
%{_libexecdir}/udev/scan-scsi-target %{_libexecdir}/udev/scan-scsi-target
%{_udevrulesdir}/90-scsi-ua.rules %{_udevrulesdir}/90-scsi-ua.rules
%files -n %{libname} %files -n %{libname}
%defattr(-,root,root)
%doc README COPYING.LIB %doc README COPYING.LIB
%{_libdir}/libstoragemgmt.so.* %{_libdir}/libstoragemgmt.so.*
%files devel %files devel
%defattr(-,root,root)
%{_includedir}/* %{_includedir}/*
%{_mandir}/man3/*%{ext_man}
%{_libdir}/libstoragemgmt.so %{_libdir}/libstoragemgmt.so
%{_libdir}/pkgconfig/libstoragemgmt.pc %{_libdir}/pkgconfig/libstoragemgmt.pc
%files -n python-%{name} %files -n python-%{name}
%defattr(-,root,root)
%dir %{python_sitelib}/lsm %dir %{python_sitelib}/lsm
%{python_sitelib}/lsm/external %{python_sitelib}/lsm/external
%{python_sitelib}/lsm/_*.py* %{python_sitelib}/lsm/_*.py*
@ -413,35 +456,30 @@ fi
%{_mandir}/man1/sim_lsmplugin.1%{ext_man} %{_mandir}/man1/sim_lsmplugin.1%{ext_man}
%files smis-plugin %files smis-plugin
%defattr(-,root,root)
%dir %{python_sitelib}/lsm/plugin/smispy %dir %{python_sitelib}/lsm/plugin/smispy
%{python_sitelib}/lsm/plugin/smispy/*.py* %{python_sitelib}/lsm/plugin/smispy/*.py*
%{_bindir}/smispy_lsmplugin %{_bindir}/smispy_lsmplugin
%{_mandir}/man1/smispy_lsmplugin.1%{ext_man} %{_mandir}/man1/smispy_lsmplugin.1%{ext_man}
%files netapp-plugin %files netapp-plugin
%defattr(-,root,root)
%dir %{python_sitelib}/lsm/plugin/ontap %dir %{python_sitelib}/lsm/plugin/ontap
%{python_sitelib}/lsm/plugin/ontap/*.py* %{python_sitelib}/lsm/plugin/ontap/*.py*
%{_bindir}/ontap_lsmplugin %{_bindir}/ontap_lsmplugin
%{_mandir}/man1/ontap_lsmplugin.1%{ext_man} %{_mandir}/man1/ontap_lsmplugin.1%{ext_man}
%files targetd-plugin %files targetd-plugin
%defattr(-,root,root)
%dir %{python_sitelib}/lsm/plugin/targetd %dir %{python_sitelib}/lsm/plugin/targetd
%{python_sitelib}/lsm/plugin/targetd/*.py* %{python_sitelib}/lsm/plugin/targetd/*.py*
%{_bindir}/targetd_lsmplugin %{_bindir}/targetd_lsmplugin
%{_mandir}/man1/targetd_lsmplugin.1%{ext_man} %{_mandir}/man1/targetd_lsmplugin.1%{ext_man}
%files nstor-plugin %files nstor-plugin
%defattr(-,root,root)
%dir %{python_sitelib}/lsm/plugin/nstor %dir %{python_sitelib}/lsm/plugin/nstor
%{python_sitelib}/lsm/plugin/nstor/*.py* %{python_sitelib}/lsm/plugin/nstor/*.py*
%{_bindir}/nstor_lsmplugin %{_bindir}/nstor_lsmplugin
%{_mandir}/man1/nstor_lsmplugin.1%{ext_man} %{_mandir}/man1/nstor_lsmplugin.1%{ext_man}
%files megaraid-plugin %files megaraid-plugin
%defattr(-,root,root)
%dir %{python_sitelib}/lsm/plugin/megaraid %dir %{python_sitelib}/lsm/plugin/megaraid
%{python_sitelib}/lsm/plugin/megaraid/*.py* %{python_sitelib}/lsm/plugin/megaraid/*.py*
%{_bindir}/megaraid_lsmplugin %{_bindir}/megaraid_lsmplugin
@ -449,15 +487,35 @@ fi
%{_mandir}/man1/megaraid_lsmplugin.1%{ext_man} %{_mandir}/man1/megaraid_lsmplugin.1%{ext_man}
%files hpsa-plugin %files hpsa-plugin
%defattr(-,root,root)
%dir %{python_sitelib}/lsm/plugin/hpsa %dir %{python_sitelib}/lsm/plugin/hpsa
%{python_sitelib}/lsm/plugin/hpsa/*.py* %{python_sitelib}/lsm/plugin/hpsa/*.py*
%{_bindir}/hpsa_lsmplugin %{_bindir}/hpsa_lsmplugin
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/hpsa.conf %config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/hpsa.conf
%{_mandir}/man1/hpsa_lsmplugin.1%{ext_man} %{_mandir}/man1/hpsa_lsmplugin.1%{ext_man}
%files nfs-plugin
%dir %{python_sitelib}/lsm/plugin/nfs
%{python_sitelib}/lsm/plugin/nfs/*.py*
%{_bindir}/nfs_lsmplugin
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/nfs.conf
%{_mandir}/man1/nfs_lsmplugin.1%{ext_man}
%files local-plugin
%dir %{python_sitelib}/lsm/plugin/local
%{python_sitelib}/lsm/plugin/local/*.py*
%{_bindir}/local_lsmplugin
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/local.conf
%{_mandir}/man1/local_lsmplugin.1%{ext_man}
%files arcconf-plugin
%dir %{python_sitelib}/lsm/plugin/arcconf
%{python_sitelib}/lsm/plugin/arcconf/*.py*
%{_bindir}/arcconf_lsmplugin
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/arcconf.conf
%{_mandir}/man1/arcconf_lsmplugin.1%{ext_man}
%files -n python-%{name}-clibs %files -n python-%{name}-clibs
%defattr(-,root,root)
%{python_sitelib}/lsm/_clib.* %{python_sitelib}/lsm/_clib.*
%{python_sitelib}/lsm/plugin/nfs/nfs_clib.*
%changelog %changelog