[libstoragemgmt] Update to version 0.1.0
tasleson
tasleson at fedoraproject.org
Tue Jul 8 00:29:32 UTC 2014
commit 9af18a8eb6d5e23e9b544550a28c0aed276acc34
Author: Tony Asleson <tasleson at redhat.com>
Date: Thu Jul 3 12:30:18 2014 -0500
Update to version 0.1.0
Signed-off-by: Tony Asleson <tasleson at redhat.com>
.gitignore | 1 +
libstoragemgmt.spec | 164 ++++++++++++++++++++++++++++++++++++++++-----------
sources | 2 +-
3 files changed, 131 insertions(+), 36 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 218d450..8422de4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@
/libstoragemgmt-0.0.22.tar.gz
/libstoragemgmt-0.0.23.tar.gz
/libstoragemgmt-0.0.24.tar.gz
+/libstoragemgmt-0.1.0.tar.gz
diff --git a/libstoragemgmt.spec b/libstoragemgmt.spec
index 0769f70..cb1be61 100644
--- a/libstoragemgmt.spec
+++ b/libstoragemgmt.spec
@@ -1,14 +1,44 @@
+%bcond_without rest_api
+%bcond_without ibm_v7k
+
+%if 0%{?rhel} <= 6
+%global with_rest_api 0
+# RHEL 6 does not have libmicrohttpd in main repo, but in EPEL repo
+# Hence we disable REST API daemon compiling.
+# If EPEL6 is enabled, please use:
+# rpmbuild -ba libstoragemgmt.spec --with rest_api
+%endif
+
+%if 0%{?rhel} >= 7
+%global with_ibm_v7k 0
+%endif
+
+%{?_with_rest_api:
+%global with_rest_api 1
+}
+%{?_without_rest_api:
+%global with_rest_api 0
+}
+%{?_with_ibm_v7k:
+%global with_ibm_v7k 1
+}
+%{?_without_ibm_v7k:
+%global with_ibm_v7k 0
+}
+
Name: libstoragemgmt
-Version: 0.0.24
-Release: 2%{?dist}
+Version: 0.1.0
+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
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: autoconf automake libtool yajl-devel libxml2-devel check-devel glib2-devel
+Requires: %{name}-python
+BuildRequires: autoconf automake libtool yajl-devel libxml2-devel check-devel openssl-devel
+BuildRequires: glib2-devel
+# Explicitly require gcc-c++
BuildRequires: gcc-c++
Requires: %{name}-python
@@ -42,7 +72,7 @@ Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
-%description python
+%description python
The %{name}-python package contains python client libraries as
well as python framework support and open source plug-ins written in python.
@@ -85,13 +115,13 @@ The %{name}-targetd-plugin package contains plug-in for targetd array
support.
-%if 0%{?fedora} || 0%{?rhel} <= 6
+%if 0%{?with_ibm_v7k}
%package ibm-v7k-plugin
Summary: Files for IBM v7k array support for %{name}
Group: System Environment/Libraries
-BuildRequires: python-paramiko
Requires: python-paramiko %{name}-python
Requires: libstoragemgmt-python = %{version}-%{release}
+BuildRequires: python-paramiko
BuildArch: noarch
%description ibm-v7k-plugin
@@ -103,10 +133,8 @@ support.
%package nstor-plugin
Summary: Files for NexentaStor array support for %{name}
Group: System Environment/Libraries
-BuildRequires: python-simplejson
Requires: %{name}-python
Requires: libstoragemgmt-python = %{version}-%{release}
-Requires: python-simplejson
BuildArch: noarch
%description nstor-plugin
@@ -121,6 +149,18 @@ 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}
+%package rest
+Summary: REST API daemon for %{name}
+Group: System Environment/Daemons
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: libmicrohttpd json-c
+BuildRequires: libmicrohttpd-devel json-c-devel
+
+%description rest
+the %{name}-rest package contains the http daemon for %{name} rest api.
+%endif
+
%prep
%setup -q
@@ -128,11 +168,14 @@ uevents generated by the kernel.
./autogen.sh
#Tell the install program to preserve file date/timestamps
-%if 0%{?rhel} >= 7
-%configure --disable-static --without-paramiko
-%else
-%configure --disable-static
+%configure \
+%if 0%{?with_ibm_v7k} != 1
+ --without-paramiko \
+%endif
+%if 0%{?with_rest_api} != 1
+ --without-rest-api \
%endif
+ --disable-static
V=1 make %{?_smp_mflags}
@@ -143,27 +186,35 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
install -d -m755 %{buildroot}/%{_unitdir}
-install -m644 packaging/daemon/libstoragemgmt.service %{buildroot}/%{_unitdir}/libstoragemgmt.service
+install -m644 packaging/daemon/libstoragemgmt.service \
+ %{buildroot}/%{_unitdir}/libstoragemgmt.service
#tempfiles.d configuration for /var/run
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
-install -m 0644 packaging/daemon/lsm-tmpfiles.conf %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
+install -m 0644 packaging/daemon/lsm-tmpfiles.conf \
+ %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
%else
#Need these to exist at install so we can start the daemon
mkdir -p %{buildroot}/etc/rc.d/init.d
-install packaging/daemon/libstoragemgmtd %{buildroot}/etc/rc.d/init.d/libstoragemgmtd
+install packaging/daemon/libstoragemgmtd \
+ %{buildroot}/etc/rc.d/init.d/libstoragemgmtd
%endif
#Need these to exist at install so we can start the daemon
mkdir -p %{buildroot}%{_localstatedir}/run/lsm/ipc
mkdir -p %{buildroot}/lib/udev/rules.d
-install -m 644 tools/udev/90-scsi-ua.rules %{buildroot}/lib/udev/rules.d/90-scsi-ua.rules
-install -m 755 tools/udev/scan-scsi-target %{buildroot}/lib/udev/scan-scsi-target
+install -m 644 tools/udev/90-scsi-ua.rules \
+ %{buildroot}/lib/udev/rules.d/90-scsi-ua.rules
+install -m 755 tools/udev/scan-scsi-target \
+ %{buildroot}/lib/udev/scan-scsi-target
%clean
rm -rf %{buildroot}
+%check
+make check
+
%pre
getent group libstoragemgmt >/dev/null || groupadd -r libstoragemgmt
getent passwd libstoragemgmt >/dev/null || \
@@ -180,6 +231,27 @@ if [ $1 -eq 1 ]; then
%endif
fi
+%if 0%{?with_rest_api}
+%preun rest
+if [ $1 -eq 0 ]; then
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
+ # On uninstall (not upgrade), disable and stop the units
+ /bin/systemctl --no-reload disable \
+ libstoragemgmt-rest.service >/dev/null 2>&1 || :
+ /bin/systemctl stop libstoragemgmt-rest.service >/dev/null 2>&1 || :
+%endif
+fi
+
+%postun rest
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
+ # On upgrade (not uninstall), optionally, restart the daemon
+ /bin/systemctl try-restart libstoragemgmt-rest.service >/dev/null 2>&1 || :
+%endif
+fi
+%endif
+
%preun
if [ $1 -eq 0 ]; then
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
@@ -214,6 +286,9 @@ fi
%{_bindir}/lsmcli
%{_bindir}/lsmd
%{_bindir}/simc_lsmplugin
+%{python_sitelib}/lsm/lsmcli/__init__.*
+%{python_sitelib}/lsm/lsmcli/data_display.*
+%{python_sitelib}/lsm/lsmcli/cmdline.*
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
%{_unitdir}/*
@@ -239,46 +314,53 @@ fi
#Python library files
%{python_sitelib}/lsm/__init__.*
%{python_sitelib}/lsm/external/*
-%{python_sitelib}/lsm/client.*
-%{python_sitelib}/lsm/cmdline.*
-%{python_sitelib}/lsm/common.*
-%{python_sitelib}/lsm/data.*
-%{python_sitelib}/lsm/iplugin.*
-%{python_sitelib}/lsm/pluginrunner.*
-%{python_sitelib}/lsm/simulator.*
-%{python_sitelib}/lsm/transport.*
+%{python_sitelib}/lsm/_client.*
+%{python_sitelib}/lsm/_common.*
+%{python_sitelib}/lsm/_data.*
+%{python_sitelib}/lsm/_iplugin.*
+%{python_sitelib}/lsm/_pluginrunner.*
+%{python_sitelib}/lsm/_transport.*
%{python_sitelib}/lsm/version.*
+%{python_sitelib}/lsm/plugin/__init__.*
+%{python_sitelib}/lsm/plugin/sim/__init__.*
+%{python_sitelib}/lsm/plugin/sim/simulator.*
+%{python_sitelib}/lsm/plugin/sim/simarray.*
%{_bindir}/sim_lsmplugin
%files smis-plugin
%defattr(-,root,root,-)
-%{python_sitelib}/lsm/eseries.*
-%{python_sitelib}/lsm/smis.*
-%{python_sitelib}/lsm/smisproxy.*
+%{python_sitelib}/lsm/plugin/smispy/__init__.*
+%{python_sitelib}/lsm/plugin/smispy/eseries.*
+%{python_sitelib}/lsm/plugin/smispy/smis.*
+%{python_sitelib}/lsm/plugin/smispy/smisproxy.*
%{_bindir}/smispy_lsmplugin
%files netapp-plugin
%defattr(-,root,root,-)
-%{python_sitelib}/lsm/na.*
-%{python_sitelib}/lsm/ontap.*
+%{python_sitelib}/lsm/plugin/ontap/__init__.*
+%{python_sitelib}/lsm/plugin/ontap/na.*
+%{python_sitelib}/lsm/plugin/ontap/ontap.*
%{_bindir}/ontap_lsmplugin
%files targetd-plugin
%defattr(-,root,root,-)
-%{python_sitelib}/lsm/targetd.*
+%{python_sitelib}/lsm/plugin/targetd/__init__.*
+%{python_sitelib}/lsm/plugin/targetd/targetd.*
%{_bindir}/targetd_lsmplugin
-%if 0%{?fedora} || 0%{?rhel} <= 6
+%if 0%{?with_ibm_v7k}
%files ibm-v7k-plugin
%defattr(-,root,root,-)
-%{python_sitelib}/lsm/ibmv7k.*
+%{python_sitelib}/lsm/plugin/v7k/__init__.*
+%{python_sitelib}/lsm/plugin/v7k/ibmv7k.*
%{_bindir}/v7k_lsmplugin
%endif
%files nstor-plugin
%defattr(-,root,root,-)
-%{python_sitelib}/lsm/nstor.*
+%{python_sitelib}/lsm/plugin/nstor/__init__.*
+%{python_sitelib}/lsm/plugin/nstor/nstor.*
%{_bindir}/nstor_lsmplugin
%files udev
@@ -286,7 +368,19 @@ fi
/lib/udev/scan-scsi-target
/lib/udev/rules.d/90-scsi-ua.rules
+%if 0%{?with_rest_api}
+%files rest
+%defattr(-,root,root,-)
+%{_bindir}/lsm_restd
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
+%{_unitdir}/libstoragemgmt-rest.service
+%endif
+%endif
+
%changelog
+* Thu Jul 3 2014 Tony Asleson <tasleson at redhat.com> - 0.1.0-1
+- New upstream release
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0.24-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/sources b/sources
index b7ac193..abcfedc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f1af0740e37d615a275129abe39742d9 libstoragemgmt-0.0.24.tar.gz
+7dc58e64078b0ca6f5e2fc9fd25d0893 libstoragemgmt-0.1.0.tar.gz
More information about the scm-commits
mailing list