Blame SPECS/libstoragemgmt.spec

f144a8
Name:           libstoragemgmt
5b1bf2
Version:        1.1.0
5b1bf2
Release:        2%{?dist}
f144a8
Summary:        Storage array management library
f144a8
Group:          System Environment/Libraries
f144a8
License:        LGPLv2+
f144a8
URL:            http://sourceforge.net/projects/libstoragemgmt/
1f984a
Source0:        http://sourceforge.net/projects/libstoragemgmt/files/libstoragemgmt-%{version}.tar.gz
f144a8
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f144a8
Requires:       %{name}-python
5b1bf2
BuildRequires:  autoconf automake libtool yajl-devel libxml2-devel check-devel perl
5b1bf2
BuildRequires:  openssl-devel
5b1bf2
BuildRequires:  python-argparse
5b1bf2
BuildRequires:  glib2-devel
5b1bf2
# Explicitly require gcc-c++
5b1bf2
BuildRequires:  gcc-c++
5b1bf2
BuildRequires:  systemd
f144a8
Requires: initscripts
5b1bf2
Requires(post): systemd
5b1bf2
Requires(preun): systemd
5b1bf2
Requires(postun): systemd
5b1bf2
5b1bf2
Patch0: libstoragemgmt-1.1.0-remove_yaml_build_requirement.patch
f144a8
f144a8
%description
f144a8
The libStorageMgmt library will provide a vendor agnostic open source storage
f144a8
application programming interface (API) that will allow management of storage
f144a8
arrays.  The library includes a command line interface for interactive use and
f144a8
scripting (command lsmcli).  The library also has a daemon that is used for
f144a8
executing plug-ins in a separate process (lsmd).
f144a8
f144a8
%package        devel
f144a8
Summary:        Development files for %{name}
f144a8
Group:          Development/Libraries
f144a8
Requires:       %{name}%{?_isa} = %{version}-%{release}
f144a8
f144a8
%description    devel
f144a8
The %{name}-devel package contains libraries and header files for
f144a8
developing applications that use %{name}.
f144a8
f144a8
%package        python
f144a8
Summary:        Python client libraries and plug-in support for %{name}
f144a8
Group:          System Environment/Libraries
f144a8
Requires:       %{name} = %{version}-%{release}
f144a8
BuildArch:      noarch
f144a8
1f984a
%description    python
f144a8
The %{name}-python package contains python client libraries as
f144a8
well as python framework support and open source plug-ins written in python.
f144a8
f144a8
f144a8
%package        smis-plugin
f144a8
Summary:        Files for SMI-S generic array support for %{name}
f144a8
Group:          System Environment/Libraries
f144a8
BuildRequires:  pywbem
f144a8
Requires:       pywbem %{name}-python
f144a8
Requires:       libstoragemgmt-python = %{version}-%{release}
f144a8
BuildArch:      noarch
f144a8
f144a8
%description    smis-plugin
f144a8
The %{name}-smis-plugin package contains plug-in for generic SMI-S array
f144a8
support.
f144a8
f144a8
f144a8
%package        netapp-plugin
f144a8
Summary:        Files for NetApp array support for %{name}
f144a8
Group:          System Environment/Libraries
f144a8
BuildRequires:  m2crypto
f144a8
Requires:       m2crypto  %{name}-python
f144a8
Requires:       libstoragemgmt-python = %{version}-%{release}
f144a8
BuildArch:      noarch
f144a8
f144a8
%description    netapp-plugin
f144a8
The %{name}-netapp-plugin package contains plug-in for NetApp array
f144a8
support.
f144a8
f144a8
f144a8
%package        targetd-plugin
f144a8
Summary:        Files for targetd array support for %{name}
f144a8
Group:          System Environment/Libraries
f144a8
Requires:       %{name}-python
f144a8
Requires:       libstoragemgmt-python = %{version}-%{release}
f144a8
BuildArch:      noarch
f144a8
f144a8
%description    targetd-plugin
f144a8
The %{name}-targetd-plugin package contains plug-in for targetd array
f144a8
support.
f144a8
f144a8
f144a8
%package        nstor-plugin
f144a8
Summary:        Files for NexentaStor array support for %{name}
f144a8
Group:          System Environment/Libraries
f144a8
Requires:       %{name}-python
f144a8
Requires:       libstoragemgmt-python = %{version}-%{release}
f144a8
BuildArch:      noarch
f144a8
f144a8
%description    nstor-plugin
f144a8
The %{name}-nstor-plugin package contains plug-in for NexentaStor array
f144a8
support.
f144a8
1f984a
%package        udev
5b1bf2
Summary:        Udev files for %{name}
1f984a
Group:          System Environment/Base
1f984a
1f984a
%description    udev
1f984a
The %{name}-udev package contains udev rules and helper utilities for
1f984a
uevents generated by the kernel.
1f984a
f144a8
%prep
f144a8
%setup -q
5b1bf2
5b1bf2
%patch0 -p0 -b .remove_yaml_build_requirement.patch
f144a8
f144a8
%build
5b1bf2
./autogen.sh
f144a8
f144a8
#Tell the install program to preserve file date/timestamps
5b1bf2
%configure --without-rest-api --disable-static
f144a8
f144a8
V=1 make %{?_smp_mflags}
f144a8
f144a8
%install
f144a8
rm -rf %{buildroot}
f144a8
make install DESTDIR=%{buildroot}
f144a8
find %{buildroot} -name '*.la' -exec rm -f {} ';'
f144a8
f144a8
install -d -m755 %{buildroot}/%{_unitdir}
5b1bf2
install -m644 packaging/daemon/libstoragemgmt.service \
5b1bf2
    %{buildroot}/%{_unitdir}/libstoragemgmt.service
f144a8
f144a8
#tempfiles.d configuration for /var/run
5b1bf2
mkdir -p %{buildroot}/%{_tmpfilesdir}
5b1bf2
install -m 0644 packaging/daemon/lsm-tmpfiles.conf \
5b1bf2
    %{buildroot}/%{_tmpfilesdir}/%{name}.conf
f144a8
f144a8
#Need these to exist at install so we can start the daemon
f144a8
mkdir -p %{buildroot}%{_localstatedir}/run/lsm/ipc
f144a8
5b1bf2
#Files for udev handling
5b1bf2
mkdir -p %{buildroot}/usr/lib/udev/rules.d
5b1bf2
install -m 644 tools/udev/90-scsi-ua.rules \
5b1bf2
    %{buildroot}/usr/lib/udev/rules.d/90-scsi-ua.rules
5b1bf2
install -m 755 tools/udev/scan-scsi-target \
5b1bf2
    %{buildroot}/usr/lib/udev/scan-scsi-target
1f984a
f144a8
%clean
f144a8
rm -rf %{buildroot}
f144a8
5b1bf2
%check
5b1bf2
if ! make check
5b1bf2
then
5b1bf2
  cat test/test-suite.log || true
5b1bf2
  exit 1
5b1bf2
fi
5b1bf2
f144a8
%pre
f144a8
getent group libstoragemgmt >/dev/null || groupadd -r libstoragemgmt
f144a8
getent passwd libstoragemgmt >/dev/null || \
f144a8
    useradd -r -g libstoragemgmt -d /var/run/lsm -s /sbin/nologin \
f144a8
    -c "daemon account for libstoragemgmt" libstoragemgmt
f144a8
f144a8
%post
f144a8
/sbin/ldconfig
5b1bf2
%systemd_post libstoragemgmt.service
5b1bf2
5b1bf2
5b1bf2
%if 0%{?with_rest_api}
5b1bf2
%preun rest
5b1bf2
%systemd_preun libstoragemgmt-rest.service
5b1bf2
5b1bf2
%postun rest
5b1bf2
%systemd_postun libstoragemgmt-rest.service
f144a8
%endif
f144a8
f144a8
%preun
5b1bf2
%systemd_preun libstoragemgmt.service
f144a8
f144a8
%postun
f144a8
/sbin/ldconfig
5b1bf2
%systemd_postun libstoragemgmt.service
f144a8
f144a8
%files
f144a8
%defattr(-,root,root,-)
f144a8
%doc README COPYING.LIB
f144a8
%{_mandir}/man1/lsmcli.1*
f144a8
%{_mandir}/man1/lsmd.1*
f144a8
%{_libdir}/*.so.*
f144a8
%{_bindir}/lsmcli
f144a8
%{_bindir}/lsmd
f144a8
%{_bindir}/simc_lsmplugin
f144a8
f144a8
%{_unitdir}/*
f144a8
f144a8
%dir %attr(0755, libstoragemgmt, libstoragemgmt) %{_localstatedir}/run/lsm/
f144a8
%dir %attr(0755, libstoragemgmt, libstoragemgmt) %{_localstatedir}/run/lsm/ipc
f144a8
5b1bf2
%attr(0644, root, root)  %{_tmpfilesdir}/%{name}.conf
f144a8
f144a8
%files devel
f144a8
%defattr(-,root,root,-)
f144a8
%{_includedir}/*
f144a8
%{_libdir}/*.so
f144a8
%{_libdir}/pkgconfig/libstoragemgmt.pc
f144a8
f144a8
%files python
f144a8
%defattr(-,root,root,-)
f144a8
#Python library files
5b1bf2
%dir %{python_sitelib}/lsm
f144a8
%{python_sitelib}/lsm/__init__.*
5b1bf2
%dir %{python_sitelib}/lsm/external
f144a8
%{python_sitelib}/lsm/external/*
5b1bf2
%{python_sitelib}/lsm/_client.*
5b1bf2
%{python_sitelib}/lsm/_common.*
5b1bf2
%{python_sitelib}/lsm/_data.*
5b1bf2
%{python_sitelib}/lsm/_iplugin.*
5b1bf2
%{python_sitelib}/lsm/_pluginrunner.*
5b1bf2
%{python_sitelib}/lsm/_transport.*
f144a8
%{python_sitelib}/lsm/version.*
5b1bf2
%dir %{python_sitelib}/lsm/plugin
5b1bf2
%{python_sitelib}/lsm/plugin/__init__.*
5b1bf2
%dir %{python_sitelib}/lsm/plugin/sim
5b1bf2
%{python_sitelib}/lsm/plugin/sim/__init__.*
5b1bf2
%{python_sitelib}/lsm/plugin/sim/simulator.*
5b1bf2
%{python_sitelib}/lsm/plugin/sim/simarray.*
5b1bf2
%dir %{python_sitelib}/lsm/lsmcli
5b1bf2
%{python_sitelib}/lsm/lsmcli/__init__.*
5b1bf2
%{python_sitelib}/lsm/lsmcli/data_display.*
5b1bf2
%{python_sitelib}/lsm/lsmcli/cmdline.*
f144a8
%{_bindir}/sim_lsmplugin
f144a8
f144a8
%files smis-plugin
f144a8
%defattr(-,root,root,-)
5b1bf2
%dir %{python_sitelib}/lsm/plugin/smispy
5b1bf2
%{python_sitelib}/lsm/plugin/smispy/__init__.*
5b1bf2
%{python_sitelib}/lsm/plugin/smispy/smis.*
5b1bf2
%{python_sitelib}/lsm/plugin/smispy/dmtf.*
5b1bf2
%{python_sitelib}/lsm/plugin/smispy/utils.*
5b1bf2
%{python_sitelib}/lsm/plugin/smispy/smis_common.*
5b1bf2
%{python_sitelib}/lsm/plugin/smispy/smis_cap.*
5b1bf2
%{python_sitelib}/lsm/plugin/smispy/smis_sys.*
5b1bf2
%{python_sitelib}/lsm/plugin/smispy/smis_pool.*
5b1bf2
%{python_sitelib}/lsm/plugin/smispy/smis_disk.*
5b1bf2
%{python_sitelib}/lsm/plugin/smispy/smis_vol.*
5b1bf2
%{python_sitelib}/lsm/plugin/smispy/smis_ag.*
f144a8
%{_bindir}/smispy_lsmplugin
f144a8
f144a8
%files netapp-plugin
f144a8
%defattr(-,root,root,-)
5b1bf2
%dir %{python_sitelib}/lsm/plugin/ontap
5b1bf2
%{python_sitelib}/lsm/plugin/ontap/__init__.*
5b1bf2
%{python_sitelib}/lsm/plugin/ontap/na.*
5b1bf2
%{python_sitelib}/lsm/plugin/ontap/ontap.*
f144a8
%{_bindir}/ontap_lsmplugin
f144a8
f144a8
%files targetd-plugin
f144a8
%defattr(-,root,root,-)
5b1bf2
%dir %{python_sitelib}/lsm/plugin/targetd
5b1bf2
%{python_sitelib}/lsm/plugin/targetd/__init__.*
5b1bf2
%{python_sitelib}/lsm/plugin/targetd/targetd.*
f144a8
%{_bindir}/targetd_lsmplugin
f144a8
f144a8
%files nstor-plugin
f144a8
%defattr(-,root,root,-)
5b1bf2
%dir %{python_sitelib}/lsm/plugin/nstor
5b1bf2
%{python_sitelib}/lsm/plugin/nstor/__init__.*
5b1bf2
%{python_sitelib}/lsm/plugin/nstor/nstor.*
f144a8
%{_bindir}/nstor_lsmplugin
f144a8
1f984a
%files udev
1f984a
%defattr(-,root,root,-)
5b1bf2
/usr/lib/udev/scan-scsi-target
5b1bf2
/usr/lib/udev/rules.d/90-scsi-ua.rules
1f984a
f144a8
%changelog
5b1bf2
* Thu Dec 11 2014 Tony Asleson <tasleson@redhat.com> 1.1.0-2
5b1bf2
- Remove PyYAML build dependency
5b1bf2
5b1bf2
* Thu Dec 4 2014 Tony Asleson <tasleson@redhat.com> 1.1.0-1
5b1bf2
- New upstream release
5b1bf2
5b1bf2
* Mon Oct 6 2014 Tony Asleson  <tasleson@redhat.com> - 1.0.0-4
5b1bf2
- Fix rpmdiff, error for path names
5b1bf2
  https://bugzilla.redhat.com/show_bug.cgi?id=1149368
5b1bf2
- Fix rpmdiff, multilib regressions
5b1bf2
  https://bugzilla.redhat.com/show_bug.cgi?id=1149371
5b1bf2
5b1bf2
* Fri Oct 3 2014 Tony Asleson  <tasleson@redhat.com> - 1.0.0-3
5b1bf2
- Use new systemd rpm macros
5b1bf2
  https://bugzilla.redhat.com/show_bug.cgi?id=1149010
5b1bf2
- Place config file in correct tmpfiles.d directory
5b1bf2
  https://bugzilla.redhat.com/show_bug.cgi?id=1122087
5b1bf2
5b1bf2
* Mon Sep 8 2014 Tony Asleson  <tasleson@redhat.com> - 1.0.0-2
5b1bf2
- Removed REST sub-package
5b1bf2
5b1bf2
* Sun Sep 7 2014 Tony Asleson <tasleson@redhat.com> - 1.0.0-1
5b1bf2
- New upstream release
5b1bf2
1f984a
* Fri Feb 28 2014 Tony Asleson <tasleson@redhat.com> - 0.0.24-4
1f984a
- https://bugzilla.redhat.com/show_bug.cgi?id=1071382
1f984a
1f984a
* Mon Feb 10 2014 Tony Asleson <tasleson@redhat.com> - 0.0.24-3
1f984a
- Corrected coverity found bugs
1f984a
1f984a
* Thu Jan 30 2014 Tony Asleson <tasleson@redhat.com> - 0.0.24-2
1f984a
- Missed patch to correct python paths
1f984a
1f984a
* Thu Jan 30 2014 Tony Asleson <tasleson@redhat.com> - 0.0.24-1
1f984a
- New upstream release
1f984a
- Patch nstor plugin for json instead of simple-json
1f984a
1f984a
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.0.22-10
1f984a
- Mass rebuild 2014-01-24
1f984a
1f984a
* Fri Jan 3 2014 Ewan D. Milne <emilne@redhat.com> 0.0.22-9
1f984a
- Fixed DEVPATH parsing in scan-scsi-target
1f984a
1f984a
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.0.22-7
1f984a
- Mass rebuild 2013-12-27
1f984a
1f984a
* Mon Dec 2 2013 Tony Asleson <tasleson@redhat.com> 0.0.22-6
1f984a
- https://bugzilla.redhat.com/show_bug.cgi?id=1019467
1f984a
1f984a
* Fri Nov 22 2013 Tony Asleson <tasleson@redhat.com> 0.0.22-5
1f984a
- https://bugzilla.redhat.com/show_bug.cgi?id=1019320
1f984a
f144a8
* Mon Oct 14 2013 Tony Asleson <tasleson@redhat.com> 0.0.22-4
f144a8
- https://bugzilla.redhat.com/show_bug.cgi?id=905465
f144a8
f144a8
* Fri Oct 4 2013 Tony Asleson <tasleson@redhat.com> 0.0.22-3
f144a8
- https://bugzilla.redhat.com/show_bug.cgi?id=998898
f144a8
f144a8
* Tue Aug 13 2013 Tony Asleson <tasleson@redhat.com> 0.0.22-2
f144a8
- BZ 987027
f144a8
- BZ 990577
f144a8
- BZ 968384
f144a8
- New upstream release
f144a8
f144a8
* Tue Jul 16 2013 Tony Asleson <tasleson@redhat.com> 0.0.21-1
f144a8
- New upstream release
f144a8
- Put plug-ins in separate sub packages
f144a8
- Don't include IBM plug-in on RHEL > 6, missing paramiko
f144a8
f144a8
* Tue May 28 2013 Tony Asleson <tasleson@redhat.com> - 0.0.20-1
f144a8
- New upstream release
f144a8
- Separate package for python libraries
f144a8
- Make timestamps match on version.py in library
f144a8
- Add python-paramiko requirement for IBM plug-in
f144a8
f144a8
* Mon Apr 22 2013 Tony Asleson <tasleson@redhat.com> 0.0.19-1
f144a8
- New upstream release
f144a8
f144a8
* Fri Mar 8 2013 Tony Asleson <tasleson@redhat.com> 0.0.18-1
f144a8
- New upstream release
f144a8
- Corrected spec file for missing "fi" in postinstall
f144a8
f144a8
* Tue Jan 29 2013 Tony Asleson <tasleson@redhat.com> 0.0.16-1
f144a8
- New upstream release
f144a8
f144a8
* Wed Oct 31 2012 Tony Asleson <tasleson@redhat.com> 0.0.14-1 
f144a8
- Initial RHEL Release
f144a8
- Removed conditional checks for fedora as RHEL7 uses systemd
f144a8
f144a8
* Wed Oct 3 2012 Tony Asleson <tasleson@redhat.com> - 0.0.13-1
f144a8
- New upstream release
f144a8
f144a8
* Tue Sep 18 2012 Tony Asleson <tasleson@redhat.com> - 0.0.12-1
f144a8
- New upstream release
f144a8
f144a8
* Mon Aug 13 2012 Tony Asleson <tasleson@redhat.com> 0.0.11-1
f144a8
- New upstream release
f144a8
f144a8
* Fri Jul 27 2012 Dan HorĂ¡k <dan[at]danny.cz> - 0.0.9-3
f144a8
- detect also non-x86 arches in Pegasus check
f144a8
f144a8
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.9-2
f144a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f144a8
f144a8
* Tue Jun 12 2012 Tony Asleson <tasleson@redhat.com> 0.0.9-1
f144a8
- Initial checkin of lio plug-in
f144a8
- System filtering via URI (smispy)
f144a8
- Error code mapping (ontap)
f144a8
- Fixed build so same build tarball is used for all binaries
f144a8
f144a8
* Mon Jun 4 2012 Tony Asleson <tasleson@redhat.com> 0.0.8-1
f144a8
- Make building of SMI-S CPP plugin optional
f144a8
- Add pkg-config file
f144a8
- SMIS: Fix exception while retrieving Volumes
f144a8
- SMIS: Fix exception while retrieving Volumes
f144a8
- lsm: Add package imports
f144a8
- Make Smis class available in lsm python package
f144a8
- Add option to disable building C unit test
f144a8
- Make simulator classes available in lsm python package
f144a8
- Make ontap class available in lsm python package
f144a8
- Changes to support building on Fedora 17 (v2)
f144a8
- Spec. file updates from feedback from T. Callaway (spot)
f144a8
- F17 linker symbol visibility correction
f144a8
- Remove unneeded build dependencies and cleaned up some warnings
f144a8
- C Updates, client C library feature parity with python
f144a8
f144a8
* Fri May 11 2012 Tony Asleson <tasleson@redhat.com> 0.0.7-1
f144a8
- Bug fix for smi-s constants
f144a8
- Display formatting improvements
f144a8
- Added header option for lsmcli
f144a8
- Improved version handling for builds
f144a8
- Made terminology consistent
f144a8
- Ability to list visibility for access groups and volumes
f144a8
- Simulator plug-in fully supports all block operations
f144a8
- Added support for multiple systems with a single plug-in instance
f144a8
f144a8
* Fri Apr 20 2012 Tony Asleson <tasleson@redhat.com> 0.0.6-1
f144a8
- Documentation improvements (man & source code)
f144a8
- Support for access groups
f144a8
- Unified spec files Fedora/RHEL
f144a8
- Package version auto generate
f144a8
- Rpm target added to make
f144a8
- Bug fix for missing optional property on volume retrieval (smispy plug-in)
f144a8
f144a8
* Fri Apr 6 2012 Tony Asleson <tasleson@redhat.com> 0.0.5-1
f144a8
- Spec file clean-up improvements
f144a8
- Async. operation added to lsmcli and ability to check on job status
f144a8
- Sub volume replication support
f144a8
- Ability to check for child dependencies on VOLUMES, FS and files
f144a8
- SMI-S Bug fixes and improvements
f144a8
f144a8
* Mon Mar 26 2012 Tony Asleson <tasleson@redhat.com> 0.0.4-1
f144a8
- Restore from snapshot
f144a8
- Job identifiers string instead of integer
f144a8
- Updated license address
f144a8
f144a8
* Wed Mar 14 2012 Tony Asleson <tasleson@redhat.com> 0.0.3-1
f144a8
- Changes to installer, daemon uid, gid, /var/run/lsm/*
f144a8
- NFS improvements and bug fixes
f144a8
- Python library clean up (rpmlint errors)
f144a8
f144a8
* Sun Mar 11 2012 Tony Asleson <tasleson@redhat.com> 0.0.2-1
f144a8
- Added NetApp native plugin
f144a8
f144a8
* Mon Feb 6 2012 Tony Asleson <tasleson@redhat.com>  0.0.1alpha-1
f144a8
- Initial version of package