Blame SPECS/libstoragemgmt.spec

f144a8
Name:           libstoragemgmt
1f984a
Version:        0.0.24
f144a8
Release:        4%{?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
1f984a
Patch0:         %{name}-0.0.24-python_env.patch
1f984a
Patch1:         %{name}-0.0.24-nstor-json.patch
1f984a
Patch2:         %{name}-0.0.24-coverity-fix.patch
1f984a
Patch3:         %{name}-0.0.24-comment_out_ua_udev_rules.patch
f144a8
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f144a8
f144a8
BuildRequires:  autoconf automake libtool yajl-devel libxml2-devel check-devel glib2-devel
1f984a
BuildRequires: gcc-c++
f144a8
Requires:       %{name}-python
f144a8
f144a8
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
f144a8
BuildRequires:  systemd-units
f144a8
Requires: initscripts
f144a8
Requires(post): systemd-units
f144a8
Requires(preun): systemd-units
f144a8
Requires(postun): systemd-units
f144a8
%endif
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
%if 0%{?fedora} || 0%{?rhel} <= 6
f144a8
%package        ibm-v7k-plugin
f144a8
Summary:        Files for IBM v7k array support for %{name}
f144a8
Group:          System Environment/Libraries
f144a8
BuildRequires:  python-paramiko
f144a8
Requires:       python-paramiko %{name}-python
f144a8
Requires:       libstoragemgmt-python = %{version}-%{release}
f144a8
BuildArch:      noarch
f144a8
f144a8
%description    ibm-v7k-plugin
f144a8
The %{name}-ibm-v7k-plugin package contains plug-in for IBM v7k array
f144a8
support.
f144a8
%endif
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
1f984a
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
f144a8
%patch0 -p0
f144a8
%patch1 -p0
f144a8
%patch2 -p0
f144a8
%patch3 -p0
f144a8
f144a8
%build
f144a8
bash autogen.sh
f144a8
f144a8
#Tell the install program to preserve file date/timestamps
f144a8
%if 0%{?rhel} >= 7
f144a8
%configure --disable-static --without-paramiko
f144a8
%else
1f984a
%configure --disable-static
f144a8
%endif
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
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
f144a8
install -d -m755 %{buildroot}/%{_unitdir}
f144a8
install -m644 packaging/daemon/libstoragemgmt.service %{buildroot}/%{_unitdir}/libstoragemgmt.service
f144a8
f144a8
#tempfiles.d configuration for /var/run
f144a8
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
f144a8
install -m 0644 packaging/daemon/lsm-tmpfiles.conf %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
f144a8
%else
f144a8
#Need these to exist at install so we can start the daemon
f144a8
mkdir -p %{buildroot}/etc/rc.d/init.d
f144a8
install packaging/daemon/libstoragemgmtd %{buildroot}/etc/rc.d/init.d/libstoragemgmtd
f144a8
%endif
f144a8
f144a8
#Need these to exist at install so we can start the daemon
f144a8
mkdir -p %{buildroot}%{_localstatedir}/run/lsm/ipc
f144a8
1f984a
mkdir -p %{buildroot}/lib/udev/rules.d
1f984a
install -m 644 tools/udev/90-scsi-ua.rules %{buildroot}/lib/udev/rules.d/90-scsi-ua.rules
1f984a
install -m 755 tools/udev/scan-scsi-target %{buildroot}/lib/udev/scan-scsi-target
1f984a
f144a8
%clean
f144a8
rm -rf %{buildroot}
f144a8
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
f144a8
if [ $1 -eq 1 ]; then
f144a8
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
f144a8
    /bin/systemctl enable libstoragemgmt.service >/dev/null 2>&1 || :
f144a8
%else
f144a8
    /sbin/chkconfig --add libstoragemgmtd
f144a8
%endif
f144a8
fi
f144a8
f144a8
%preun
f144a8
if [ $1 -eq 0 ]; then
f144a8
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
f144a8
    # On uninstall (not upgrade), disable and stop the units
f144a8
    /bin/systemctl --no-reload disable libstoragemgmt.service >/dev/null 2>&1 || :
f144a8
    /bin/systemctl stop libstoragemgmt.service >/dev/null 2>&1 || :
f144a8
%else
f144a8
    /etc/rc.d/init.d/libstoragemgmtd stop > /dev/null 2>&1 || :
f144a8
    /sbin/chkconfig --del libstoragemgmtd
f144a8
%endif
f144a8
fi
f144a8
f144a8
%postun
f144a8
/sbin/ldconfig
f144a8
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
f144a8
if [ $1 -ge 1 ] ; then
f144a8
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
f144a8
    # On upgrade (not uninstall), optionally, restart the daemon
f144a8
    /bin/systemctl try-restart libstoragemgmt.service >/dev/null 2>&1 || :
f144a8
%else
f144a8
    #Restart the daemond
f144a8
    /etc/rc.d/init.d/libstoragemgmtd restart  >/dev/null 2>&1 || :
f144a8
%endif
f144a8
fi
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
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
f144a8
%{_unitdir}/*
f144a8
%endif
f144a8
f144a8
%dir %attr(0755, libstoragemgmt, libstoragemgmt) %{_localstatedir}/run/lsm/
f144a8
%dir %attr(0755, libstoragemgmt, libstoragemgmt) %{_localstatedir}/run/lsm/ipc
f144a8
f144a8
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
f144a8
%attr(0644, root, root)  %{_sysconfdir}/tmpfiles.d/%{name}.conf
f144a8
%else
f144a8
%attr(0755, root, root) /etc/rc.d/init.d/libstoragemgmtd
f144a8
%endif
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
f144a8
%{python_sitelib}/lsm/__init__.*
f144a8
%{python_sitelib}/lsm/external/*
f144a8
%{python_sitelib}/lsm/client.*
f144a8
%{python_sitelib}/lsm/cmdline.*
f144a8
%{python_sitelib}/lsm/common.*
f144a8
%{python_sitelib}/lsm/data.*
f144a8
%{python_sitelib}/lsm/iplugin.*
f144a8
%{python_sitelib}/lsm/pluginrunner.*
f144a8
%{python_sitelib}/lsm/simulator.*
f144a8
%{python_sitelib}/lsm/transport.*
f144a8
%{python_sitelib}/lsm/version.*
f144a8
%{_bindir}/sim_lsmplugin
f144a8
f144a8
%files smis-plugin
f144a8
%defattr(-,root,root,-)
f144a8
%{python_sitelib}/lsm/eseries.*
f144a8
%{python_sitelib}/lsm/smis.*
f144a8
%{python_sitelib}/lsm/smisproxy.*
f144a8
%{_bindir}/smispy_lsmplugin
f144a8
f144a8
%files netapp-plugin
f144a8
%defattr(-,root,root,-)
f144a8
%{python_sitelib}/lsm/na.*
f144a8
%{python_sitelib}/lsm/ontap.*
f144a8
%{_bindir}/ontap_lsmplugin
f144a8
f144a8
%files targetd-plugin
f144a8
%defattr(-,root,root,-)
1f984a
%{python_sitelib}/lsm/targetd.*
f144a8
%{_bindir}/targetd_lsmplugin
f144a8
f144a8
f144a8
%if 0%{?fedora} || 0%{?rhel} <= 6
f144a8
%files ibm-v7k-plugin
f144a8
%defattr(-,root,root,-)
f144a8
%{python_sitelib}/lsm/ibmv7k.*
f144a8
%{_bindir}/v7k_lsmplugin
f144a8
%endif
f144a8
f144a8
%files nstor-plugin
f144a8
%defattr(-,root,root,-)
1f984a
%{python_sitelib}/lsm/nstor.*
f144a8
%{_bindir}/nstor_lsmplugin
f144a8
1f984a
%files udev
1f984a
%defattr(-,root,root,-)
1f984a
/lib/udev/scan-scsi-target
1f984a
/lib/udev/rules.d/90-scsi-ua.rules
1f984a
f144a8
%changelog
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