From ba73b42fd6650f2b3a3f9280ec0478e935254bd4bc061478848d17f02d20b828 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 9 Apr 2015 07:42:34 +0000 Subject: [PATCH] Accepting request 294980 from home:pluskalm:branches:home:wanghaisu:HA-works New package, probable part of SLES12SP1, please add me and ngwang@suse.com as maintainers OBS-URL: https://build.opensuse.org/request/show/294980 OBS-URL: https://build.opensuse.org/package/show/Base:System/libstoragemgmt?expand=0&rev=1 --- .gitattributes | 23 +++ .gitignore | 1 + libstoragemgmt-1.1.0.tar.gz | 3 + libstoragemgmt.changes | 25 +++ libstoragemgmt.spec | 315 ++++++++++++++++++++++++++++++++++++ 5 files changed, 367 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 libstoragemgmt-1.1.0.tar.gz create mode 100644 libstoragemgmt.changes create mode 100644 libstoragemgmt.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/libstoragemgmt-1.1.0.tar.gz b/libstoragemgmt-1.1.0.tar.gz new file mode 100644 index 0000000..26de1a9 --- /dev/null +++ b/libstoragemgmt-1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45c2454ec37dd92dd1293e6e5d8641cdda4802285d17b77d5bdac30be5f95394 +size 718668 diff --git a/libstoragemgmt.changes b/libstoragemgmt.changes new file mode 100644 index 0000000..119cafc --- /dev/null +++ b/libstoragemgmt.changes @@ -0,0 +1,25 @@ +------------------------------------------------------------------- +Wed Apr 8 14:24:08 UTC 2015 - mpluskal@suse.com + +- Disable checks as they seem to fail on OBS + +------------------------------------------------------------------- +Wed Apr 8 14:19:39 UTC 2015 - mpluskal@suse.com + +- Use pkgconfig() dependencies +- Enable checks + +------------------------------------------------------------------- +Mon Mar 16 16:27:48 UTC 2015 - mpluskal@suse.com + +- More cleanups + +------------------------------------------------------------------- +Fri Mar 13 15:14:18 UTC 2015 - mpluskal@suse.com + +- Cleanup package + +------------------------------------------------------------------- +Thu Dec 11 03:13:02 UTC 2014 - nwang@suse.com + +- Initial package version 1.1.0 diff --git a/libstoragemgmt.spec b/libstoragemgmt.spec new file mode 100644 index 0000000..b32c0e1 --- /dev/null +++ b/libstoragemgmt.spec @@ -0,0 +1,315 @@ +# +# spec file for package libstoragemgmt +# +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%define libname %{name}1 +Name: libstoragemgmt +Version: 1.1.0 +Release: 0 +Summary: Storage array management library +License: LGPL-2.1+ +Group: System Environment/Libraries +Url: http://sourceforge.net/projects/libstoragemgmt/ +Source0: http://sourceforge.net/projects/libstoragemgmt/files/%{name}-%{version}.tar.gz +BuildRequires: pkg-config +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(libmicrohttpd) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(yajl) +BuildRequires: pkgconfig(openssl) +BuildRequires: python-M2Crypto +BuildRequires: python-PyYAML +BuildRequires: python-argparse +BuildRequires: python-devel +BuildRequires: python-pywbem +BuildRequires: pkgconfig(udev) +BuildRequires: pkgconfig(check) +BuildRequires: pkgconfig(json-c) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(systemd) +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%systemd_requires +%py_requires + +%description +The libStorageMgmt library will provide a vendor agnostic open source storage +application programming interface (API) that will allow management of storage +arrays. The library includes a command line interface for interactive use and +scripting (command lsmcli). The library also has a daemon that is used for +executing plug-ins in a separate process (lsmd). + +%package -n %{libname} +Summary: Storage array management library +Group: System Environment/Libraries + +%description -n %{libname} +The libStorageMgmt library will provide a vendor agnostic open source storage +application programming interface (API) that will allow management of storage +arrays. The library includes a command line interface for interactive use and +scripting (command lsmcli). The library also has a daemon that is used for +executing plug-ins in a separate process (lsmd). + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{libname} = %{version} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%package python +Summary: Python client libraries and plug-in support for %{name} +Group: System Environment/Libraries +Requires: %{name} = %{version} +Requires: python-argparse +BuildArch: noarch +%py_requires + +%description python +The %{name}-python package contains python client libraries as +well as python framework support and open source plug-ins written in python. + +%package smis-plugin +Summary: Files for SMI-S generic array support for %{name} +Group: System Environment/Libraries +Requires(post): %{name} = %{version} +Requires(postun): %{name} = %{version} +Requires: python-pywbem +BuildArch: noarch +%py_requires + +%description smis-plugin +The %{name}-smis-plugin package contains plug-in for generic SMI-S +array support. + +%package netapp-plugin +Summary: Files for NetApp array support for %{name} +Group: System Environment/Libraries +Requires(post): %{name} = %{version} +Requires(postun): %{name} = %{version} +Requires: python-M2Crypto +BuildArch: noarch +%py_requires + +%description netapp-plugin +The %{name}-netapp-plugin package contains plug-in for NetApp array +support. + +%package targetd-plugin +Summary: Files for targetd array support for %{name} +Group: System Environment/Libraries +Requires(post): %{name} = %{version} +Requires(postun): %{name} = %{version} +BuildArch: noarch +%py_requires + +%description targetd-plugin +The %{name}-targetd-plugin package contains plug-in for targetd +array support. + +%package nstor-plugin +Summary: Files for NexentaStor array support for %{name} +Group: System Environment/Libraries +Requires(post): %{name} = %{version} +Requires(postun): %{name} = %{version} +BuildArch: noarch +%py_requires + +%description nstor-plugin +The %{name}-nstor-plugin package contains plug-in for NexentaStor +array support. + +%package rest +Summary: REST API daemon for %{name} +Group: System Environment/Daemons +Requires: %{name} = %{version} + +%description rest +the %{name}-rest package contains the http daemon for %{name} +rest api. + +%prep +%setup -q + +%build +%configure \ + --disable-static + +make %{?_smp_mflags} + +%install +make DESTDIR=%{buildroot} install %{?_smp_mflags} +find %{buildroot} -type f -name "*.la" -delete -print + +install -d -m755 %{buildroot}/%{_unitdir} +install -d -m755 %{buildroot}/%{_sbindir} + +install -m 644 packaging/daemon/libstoragemgmt.service \ + %{buildroot}/%{_unitdir}/libstoragemgmt.service +ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} + +install -m 0644 packaging/daemon/libstoragemgmt-rest.service \ + %{buildroot}/%{_unitdir}/libstoragemgmt-rest.service +ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-rest + + +#tempfiles.d configuration for /var/run +mkdir -p %{buildroot}/%{_tmpfilesdir} +install -m 0644 packaging/daemon/lsm-tmpfiles.conf \ + %{buildroot}/%{_tmpfilesdir}/%{name}.conf + +#Files for udev handling +install -d %{buildroot}/%{_udevrulesdir} +install -m 644 tools/udev/90-scsi-ua.rules \ + %{buildroot}/%{_udevrulesdir}/90-scsi-ua.rules +install -m 755 tools/udev/scan-scsi-target \ + %{buildroot}/%{_libexecdir}/udev/scan-scsi-target + +# find all duplicates +%fdupes -s %{buildroot} + +#%check +# Tests seem to randomly fail in OBS +#make check + +%pre +getent group %{name} >/dev/null || groupadd -r %{name} +getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_localstatedir}/run/lsm -s /sbin/nologin -c "daemon account for libstoragemgmt" %{name} +%service_add_pre %{name}.service + +%post -n %{libname} -p /sbin/ldconfig + +%postun -n %{libname} -p /sbin/ldconfig + +%post +%service_add_post %{name}.service +%udev_rules_update +%tmpfiles_create %{_tmpfilesdir}/%{name}.conf + +%preun +%service_del_preun %{name}.service + +%postun +%service_del_postun %{name}.service + +%pre rest +%service_add_pre %{name}-rest.service + +%post rest +%service_add_post %{name}-rest.service + +%preun rest +%service_del_preun %{name}-rest.service + +%postun rest +%service_del_postun %{name}-rest.service + +# Need to restart lsmd if plugin is new installed or removed. +%post smis-plugin +%service_add_post %{name}.service + +%postun smis-plugin +%service_del_postun %{name}.service + +# Need to restart lsmd if plugin is new installed or removed. +%post netapp-plugin +%service_add_post %{name}.service + +%postun netapp-plugin +%service_del_postun %{name}.service + +# Need to restart lsmd if plugin is new installed or removed. +%post targetd-plugin +%service_add_post %{name}.service + +%postun targetd-plugin +%service_del_postun %{name}.service + +# Need to restart lsmd if plugin is new installed or removed. +%post nstor-plugin +%service_add_post %{name}.service + +%postun nstor-plugin +%service_del_postun %{name}.service + +%files +%defattr(-,root,root,-) +%doc README COPYING.LIB +%{_mandir}/man1/lsmcli.1* +%{_mandir}/man1/lsmd.1* +%{_bindir}/lsmcli +%{_bindir}/lsmd +%{_bindir}/simc_lsmplugin +%{_unitdir}/libstoragemgmt.service +%{_sbindir}/rclibstoragemgmt +%{_tmpfilesdir}/%{name}.conf +%{_libexecdir}/udev/scan-scsi-target +%{_udevrulesdir}/90-scsi-ua.rules + +%files -n %{libname} +%defattr(-,root,root,-) +%doc README COPYING.LIB +%doc README COPYING.LIB +%{_libdir}/*.so.* + +%files devel +%defattr(-,root,root,-) +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/libstoragemgmt.pc + +%files python +%defattr(-,root,root,-) +%dir %{python_sitelib}/lsm +%{python_sitelib}/lsm/external +%{python_sitelib}/lsm/_*.* +%{python_sitelib}/lsm/version.* +%dir %{python_sitelib}/lsm/plugin +%{python_sitelib}/lsm/plugin/__init__.* +%{python_sitelib}/lsm/plugin/sim +%{python_sitelib}/lsm/lsmcli +%{_bindir}/sim_lsmplugin + +%files smis-plugin +%defattr(-,root,root,-) +%{python_sitelib}/lsm/plugin/smispy +%{_bindir}/smispy_lsmplugin + +%files netapp-plugin +%defattr(-,root,root,-) +%{python_sitelib}/lsm/plugin/ontap* +%{_bindir}/ontap_lsmplugin + +%files targetd-plugin +%defattr(-,root,root,-) +%{python_sitelib}/lsm/plugin/targetd +%{_bindir}/targetd_lsmplugin + +%files nstor-plugin +%defattr(-,root,root,-) +%{python_sitelib}/lsm/plugin/nstor +%{_bindir}/nstor_lsmplugin + +%files rest +%defattr(-,root,root,-) +%{_bindir}/lsm_restd +%{_unitdir}/%{name}-rest.service +%{_sbindir}/rclibstoragemgmt-rest + +%changelog