Update to 1.2.1

Signed-off-by: Gris Ge <fge@redhat.com>
This commit is contained in:
Gris Ge 2015-06-19 18:55:55 +08:00
parent 8c09b04528
commit 1cac7eb8a3
4 changed files with 233 additions and 95 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@
/libstoragemgmt-0.1.0.tar.gz
/libstoragemgmt-1.0.0.tar.gz
/libstoragemgmt-1.1.0.tar.gz
/libstoragemgmt-1.2.1.tar.gz

View File

@ -1,36 +0,0 @@
diff -up libstoragemgmt-0.0.9/configure.ac.secondary libstoragemgmt-0.0.9/configure.ac
--- libstoragemgmt-0.0.9/configure.ac.secondary 2012-07-27 13:13:45.000000000 +0200
+++ libstoragemgmt-0.0.9/configure.ac 2012-07-27 13:18:52.000000000 +0200
@@ -111,6 +111,14 @@ if test "x${want_smis_cpp}" = "xyes"; th
*Linux*) case `uname -m` in
x86_64) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_X86_64_GNU";;
i?86) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_IX86_GNU";;
+ ia64) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_IA64_GNU";;
+ ppc) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_PPC_GNU";;
+ ppc64) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_PPC64_GNU";;
+ s390) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_ZSERIES_GNU";;
+ s390x) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_ZSERIES64_GNU";;
+ sparcv9) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_SPARCV9_GNU";;
+ sparc64) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_SPARC64_GNU";;
+ arm*) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_XSCALE_GNU";;
esac
esac
if test "$PEGASUS_CFLAGS" = "" ; then
diff -up libstoragemgmt-0.0.9/configure.secondary libstoragemgmt-0.0.9/configure
--- libstoragemgmt-0.0.9/configure.secondary 2012-07-27 13:19:25.000000000 +0200
+++ libstoragemgmt-0.0.9/configure 2012-07-27 13:21:04.000000000 +0200
@@ -19274,6 +19274,14 @@ if test "x${want_smis_cpp}" = "xyes"; th
*Linux*) case `uname -m` in
x86_64) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_X86_64_GNU";;
i?86) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_IX86_GNU";;
+ ia64) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_IA64_GNU";;
+ ppc) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_PPC_GNU";;
+ ppc64) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_PPC64_GNU";;
+ s390) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_ZSERIES_GNU";;
+ s390x) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_ZSERIES64_GNU";;
+ sparcv9) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_SPARCV9_GNU";;
+ sparc64) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_SPARC64_GNU";;
+ arm*) PEGASUS_CFLAGS="-DPEGASUS_PLATFORM_LINUX_XSCALE_GNU";;
esac
esac
if test "$PEGASUS_CFLAGS" = "" ; then

View File

@ -1,36 +1,25 @@
%bcond_with rest_api
%{?_with_rest_api:
%global with_rest_api 1
}
%{?_without_rest_api:
%global with_rest_api 0
}
%define udev_dir /lib
# Later versions moved /lib to /usr/lib
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 || 0%{?suse_version}
%define udev_dir /usr/lib
%endif
%bcond_without megaraid
%bcond_without hpsa
%bcond_without test
Name: libstoragemgmt
Version: 1.1.0
Release: 4%{?dist}
Version: 1.2.1
Release: 1%{?dist}
Summary: Storage array management library
Group: System Environment/Libraries
License: LGPLv2+
URL: http://sourceforge.net/projects/libstoragemgmt/
Source0: http://sourceforge.net/projects/libstoragemgmt/files/libstoragemgmt-%{version}.tar.gz
URL: https://github.com/libstorage/libstoragemgmt
Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %{name}-python
BuildRequires: autoconf automake libtool yajl-devel libxml2-devel check-devel perl
BuildRequires: openssl-devel
BuildRequires: python-argparse
BuildRequires: glib2-devel
# Explicitly require gcc-c++
BuildRequires: gcc-c++
BuildRequires: PyYAML
BuildRequires: systemd
BuildRequires: bash-completion
BuildRequires: libconfig-devel
Requires: initscripts
Requires(post): systemd
Requires(preun): systemd
@ -67,11 +56,14 @@ well as python framework support and open source plug-ins written in python.
Summary: Files for SMI-S generic array support for %{name}
Group: System Environment/Libraries
BuildRequires: pywbem
Requires: pywbem %{name}-python
Requires: libstoragemgmt-python = %{version}-%{release}
Requires: pywbem
BuildArch: noarch
Provides: %{name}-ibm-v7k-plugin = 2:%{version}-%{release}
Obsoletes: %{name}-ibm-v7k-plugin <= 2:0.1.0-3
Requires: %{name}-python = %{version}
Requires(post): %{name}-python = %{version}
Requires(postun): %{name}-python = %{version}
%description smis-plugin
The %{name}-smis-plugin package contains plug-in for generic SMI-S array
@ -82,8 +74,11 @@ support.
Summary: Files for NetApp array support for %{name}
Group: System Environment/Libraries
BuildRequires: m2crypto
Requires: m2crypto %{name}-python
Requires: libstoragemgmt-python = %{version}-%{release}
Requires: m2crypto
Requires: %{name}-python = %{version}
Requires(post): %{name}-python = %{version}
Requires(postun): %{name}-python = %{version}
Requires: %{name}-python = %{version}-%{release}
BuildArch: noarch
%description netapp-plugin
@ -94,8 +89,9 @@ support.
%package targetd-plugin
Summary: Files for targetd array support for %{name}
Group: System Environment/Libraries
Requires: %{name}-python
Requires: libstoragemgmt-python = %{version}-%{release}
Requires: %{name}-python = %{version}
Requires(post): %{name}-python = %{version}
Requires(postun): %{name}-python = %{version}
BuildArch: noarch
%description targetd-plugin
@ -106,8 +102,9 @@ support.
%package nstor-plugin
Summary: Files for NexentaStor array support for %{name}
Group: System Environment/Libraries
Requires: %{name}-python
Requires: libstoragemgmt-python = %{version}-%{release}
Requires: %{name}-python = %{version}
Requires(post): %{name}-python = %{version}
Requires(postun): %{name}-python = %{version}
BuildArch: noarch
%description nstor-plugin
@ -122,11 +119,13 @@ Group: System Environment/Base
The %{name}-udev package contains udev rules and helper utilities for
uevents generated by the kernel.
%if 0%{?with_rest_api}
%if 0%{with rest_api}
%package rest
Summary: REST API daemon for %{name}
Group: System Environment/Daemons
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}
Requires(post): %{name} = %{version}
Requires(postun): %{name} = %{version}
Requires: libmicrohttpd json-c
BuildRequires: libmicrohttpd-devel json-c-devel
@ -134,16 +133,44 @@ BuildRequires: libmicrohttpd-devel json-c-devel
the %{name}-rest package contains the http daemon for %{name} rest api.
%endif
%if 0%{with megaraid}
%package megaraid-plugin
Summary: Files for LSI MegaRAID support for %{name}
Group: System Environment/Libraries
Requires: %{name}-python = %{version}
Requires(post): %{name}-python = %{version}
Requires(postun): %{name}-python = %{version}
BuildArch: noarch
%description megaraid-plugin
The %{name}-megaraid-plugin package contains the plugin for LSI
MegaRAID storage management via storcli.
%endif
%if 0%{with hpsa}
%package hpsa-plugin
Summary: Files for HP SmartArray support for %{name}
Group: System Environment/Libraries
Requires: %{name}-python = %{version}
Requires(post): %{name}-python = %{version}
Requires(postun): %{name}-python = %{version}
BuildArch: noarch
%description hpsa-plugin
The %{name}-hpsa-plugin package contains the plugin for HP
SmartArray storage management via hpssacli.
%endif
%prep
%setup -q
%build
./autogen.sh
%configure \
%if 0%{?with_rest_api} != 1
%if ! 0%{with rest_api}
--without-rest-api \
%endif
%{?_without_megaraid} \
%{?_without_hpsa} \
--disable-static
V=1 make %{?_smp_mflags}
@ -154,33 +181,32 @@ make install DESTDIR=%{buildroot}
find %{buildroot} -name '*.la' -exec rm -f {} ';'
install -d -m755 %{buildroot}/%{_unitdir}
install -m644 packaging/daemon/libstoragemgmt.service \
%{buildroot}/%{_unitdir}/libstoragemgmt.service
install -m644 packaging/daemon/%{name}.service \
%{buildroot}/%{_unitdir}/%{name}.service
#tempfiles.d configuration for /var/run
#tempfiles.d configuration for /run
mkdir -p %{buildroot}/%{_tmpfilesdir}
install -m 0644 packaging/daemon/lsm-tmpfiles.conf \
%{buildroot}/%{_tmpfilesdir}/%{name}.conf
#Need these to exist at install so we can start the daemon
mkdir -p %{buildroot}%{_localstatedir}/run/lsm/ipc
#Files for udev handling
mkdir -p %{buildroot}/%{udev_dir}/udev/rules.d
mkdir -p %{buildroot}/%{_udevrulesdir}
install -m 644 tools/udev/90-scsi-ua.rules \
%{buildroot}/%{udev_dir}/udev/rules.d/90-scsi-ua.rules
%{buildroot}/%{_udevrulesdir}/90-scsi-ua.rules
install -m 755 tools/udev/scan-scsi-target \
%{buildroot}/%{udev_dir}/udev/scan-scsi-target
%{buildroot}/%{_udevrulesdir}/../scan-scsi-target
%clean
rm -rf %{buildroot}
%if 0%{with test}
%check
if ! make check
then
cat test/test-suite.log || true
exit 1
fi
%endif
%pre
getent group libstoragemgmt >/dev/null || groupadd -r libstoragemgmt
@ -190,46 +216,134 @@ getent passwd libstoragemgmt >/dev/null || \
%post
/sbin/ldconfig
%systemd_post libstoragemgmt.service
# Create tmp socket folders.
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
%systemd_post %{name}.service
%if 0%{?with_rest_api}
%if 0%{with rest_api}
%preun rest
%systemd_preun libstoragemgmt-rest.service
%systemd_preun %{name}-rest.service
%postun rest
%systemd_postun libstoragemgmt-rest.service
%systemd_postun %{name}-rest.service
%endif
%preun
%systemd_preun libstoragemgmt.service
%systemd_preun %{name}.service
%postun
/sbin/ldconfig
%systemd_postun libstoragemgmt.service
%systemd_postun %{name}.service
# Need to restart lsmd if plugin is new installed or removed.
%post smis-plugin
if [ $1 -eq 1 ]; then
# New install.
/usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
%postun smis-plugin
if [ $1 -eq 0 ]; then
# Remove
/usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
# Need to restart lsmd if plugin is new installed or removed.
%post netapp-plugin
if [ $1 -eq 1 ]; then
# New install.
/usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
%postun netapp-plugin
if [ $1 -eq 0 ]; then
# Remove
/usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
# Need to restart lsmd if plugin is new installed or removed.
%post targetd-plugin
if [ $1 -eq 1 ]; then
# New install.
/usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
%postun targetd-plugin
if [ $1 -eq 0 ]; then
# Remove
/usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
# Need to restart lsmd if plugin is new installed or removed.
%post nstor-plugin
if [ $1 -eq 1 ]; then
# New install.
/usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
%postun nstor-plugin
if [ $1 -eq 0 ]; then
# Remove
/usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
%if 0%{with megaraid}
# Need to restart lsmd if plugin is new installed or removed.
%post megaraid-plugin
if [ $1 -eq 1 ]; then
# New install.
/usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
%postun megaraid-plugin
if [ $1 -eq 0 ]; then
# Remove
/usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
%endif
%if 0%{with hpsa}
# Need to restart lsmd if plugin is new installed or removed.
%post hpsa-plugin
if [ $1 -eq 1 ]; then
# New install.
/usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
%postun hpsa-plugin
if [ $1 -eq 0 ]; then
# Remove
/usr/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
%endif
%files
%defattr(-,root,root,-)
%doc README COPYING.LIB
%doc README COPYING.LIB NEWS
%{_mandir}/man1/lsmcli.1*
%{_mandir}/man1/lsmd.1*
%{_mandir}/man5/lsmd.conf.5*
%{_libdir}/*.so.*
%{_bindir}/lsmcli
%{_datadir}/bash-completion/completions/lsmcli
%{_bindir}/lsmd
%{_bindir}/simc_lsmplugin
%dir %{_sysconfdir}/lsm
%dir %{_sysconfdir}/lsm/pluginconf.d
%config(noreplace) %{_sysconfdir}/lsm/lsmd.conf
%{_mandir}/man1/simc_lsmplugin.1*
%{_unitdir}/*
%{_unitdir}/%{name}.service
%dir %attr(0755, libstoragemgmt, libstoragemgmt) %{_localstatedir}/run/lsm/
%dir %attr(0755, libstoragemgmt, libstoragemgmt) %{_localstatedir}/run/lsm/ipc
%ghost %dir %attr(0755, -, -) /run/lsm/
%ghost %dir %attr(0755, -, -) /run/lsm/ipc
%attr(0644, root, root) %{_tmpfilesdir}/%{name}.conf
%attr(0644, root, root) %{_tmpfilesdir}/%{name}.conf
%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/libstoragemgmt.pc
%{_libdir}/pkgconfig/%{name}.pc
%files python
%defattr(-,root,root,-)
@ -256,6 +370,8 @@ getent passwd libstoragemgmt >/dev/null || \
%{python_sitelib}/lsm/lsmcli/data_display.*
%{python_sitelib}/lsm/lsmcli/cmdline.*
%{_bindir}/sim_lsmplugin
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/sim.conf
%{_mandir}/man1/sim_lsmplugin.1*
%files smis-plugin
%defattr(-,root,root,-)
@ -272,6 +388,7 @@ getent passwd libstoragemgmt >/dev/null || \
%{python_sitelib}/lsm/plugin/smispy/smis_vol.*
%{python_sitelib}/lsm/plugin/smispy/smis_ag.*
%{_bindir}/smispy_lsmplugin
%{_mandir}/man1/smispy_lsmplugin.1*
%files netapp-plugin
%defattr(-,root,root,-)
@ -280,6 +397,7 @@ getent passwd libstoragemgmt >/dev/null || \
%{python_sitelib}/lsm/plugin/ontap/na.*
%{python_sitelib}/lsm/plugin/ontap/ontap.*
%{_bindir}/ontap_lsmplugin
%{_mandir}/man1/ontap_lsmplugin.1*
%files targetd-plugin
%defattr(-,root,root,-)
@ -287,6 +405,7 @@ getent passwd libstoragemgmt >/dev/null || \
%{python_sitelib}/lsm/plugin/targetd/__init__.*
%{python_sitelib}/lsm/plugin/targetd/targetd.*
%{_bindir}/targetd_lsmplugin
%{_mandir}/man1/targetd_lsmplugin.1*
%files nstor-plugin
%defattr(-,root,root,-)
@ -294,20 +413,73 @@ getent passwd libstoragemgmt >/dev/null || \
%{python_sitelib}/lsm/plugin/nstor/__init__.*
%{python_sitelib}/lsm/plugin/nstor/nstor.*
%{_bindir}/nstor_lsmplugin
%{_mandir}/man1/nstor_lsmplugin.1*
%files udev
%defattr(-,root,root,-)
%{udev_dir}/udev/scan-scsi-target
%{udev_dir}/udev/rules.d/90-scsi-ua.rules
%{_udevrulesdir}/../scan-scsi-target
%{_udevrulesdir}/90-scsi-ua.rules
%if 0%{?with_rest_api}
%if 0%{with rest_api}
%files rest
%defattr(-,root,root,-)
%{_bindir}/lsm_restd
%{_unitdir}/libstoragemgmt-rest.service
%{_unitdir}/%{name}-rest.service
%endif
%if 0%{with megaraid}
%files megaraid-plugin
%defattr(-,root,root,-)
%dir %{python_sitelib}/lsm/plugin/megaraid
%{python_sitelib}/lsm/plugin/megaraid/__init__.*
%{python_sitelib}/lsm/plugin/megaraid/megaraid.*
%{python_sitelib}/lsm/plugin/megaraid/utils.*
%{_bindir}/megaraid_lsmplugin
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/megaraid.conf
%{_mandir}/man1/megaraid_lsmplugin.1*
%endif
%if 0%{with hpsa}
%files hpsa-plugin
%defattr(-,root,root,-)
%dir %{python_sitelib}/lsm/plugin/hpsa
%{python_sitelib}/lsm/plugin/hpsa/__init__.*
%{python_sitelib}/lsm/plugin/hpsa/hpsa.*
%{python_sitelib}/lsm/plugin/hpsa/utils.*
%{_bindir}/hpsa_lsmplugin
%config(noreplace) %{_sysconfdir}/lsm/pluginconf.d/hpsa.conf
%{_mandir}/man1/hpsa_lsmplugin.1*
%endif
%changelog
* Fri Jun 19 2015 Gris Ge <fge@redhat.com> - 1.2.1-1
- New upstream release 1.2.1.
- Changed upstream URL and source URL to github.
- New sub-pacakges:
* libstoragemgmt-megaraid-plugin
New plugin in 1.2.0 release.
* libstoragemgmt-hpsa-plugin
New plugin in 1.2.0 release.
- Add bash-completion script for lsmcli.
- New rpmbuild switch:
* '--without test'
Use to skip 'make check' test to save debug time.
* '--without megaraid'
Don't compile megaraid plugin.
* '--without hpsa'
Don't compile hpsa plugin.
- Remove PyYAML BuildRequires.
- Add NEWS(changelog) to document folder.
- Replace the hardcoded udev path with %{_udevrulesdir}.
- Fix rpmlint error 'dir-or-file-in-var-run'.
- Mark /run/lsm and /run/lsm/ipc as %ghost folder.
- Fix rpmlint warnning 'W: non-standard-uid /run/lsm libstoragemgmt'.
- Add 'Requires(post)' and 'Requires(postun)' to plugins in order
to make sure plugin is installed after libstoragemgmt and removed before
libstoragemgmt.
- Fix the incorrect use of %bcond_with and %bcond_without.
- Removed autogen.sh which is not required for release version any more.
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
@ -458,3 +630,4 @@ getent passwd libstoragemgmt >/dev/null || \
* Mon Feb 6 2012 Tony Asleson <tasleson@redhat.com> 0.0.1alpha-1
- Initial version of package

View File

@ -1 +1 @@
ef4f82813df7996ec5cfcd2c68f23aef libstoragemgmt-1.1.0.tar.gz
138fd89916cb5bde45af7315a8582511 libstoragemgmt-1.2.1.tar.gz