Blame SPECS/python-rtslib.spec

71285d
%if 0%{?fedora}
71285d
%global with_python3 1
71285d
%endif
71285d
71285d
%global oname rtslib-fb
71285d
71285d
Name:           python-rtslib
71285d
License:        ASL 2.0
71285d
Group:          System Environment/Libraries
71285d
Summary:        API for Linux kernel LIO SCSI target
71285d
Version:        2.1.fb63
85bcff
Release:        13%{?dist}
71285d
URL:            https://fedorahosted.org/targetcli-fb/
71285d
Source:         https://fedorahosted.org/released/targetcli-fb/%{oname}-%{version}.tar.gz
71285d
Source1:        target.service
71285d
Patch0:         0001-Turn-off-unsupported-fabrics.patch
71285d
Patch1:         0002-Fix-comparisons-to-None.patch
71285d
Patch2:         0003-Fix-exception-in-convert_scsi_hctl_to_path.patch
71285d
Patch3:         0004-Support-Reconfiguration-of-device-path.patch
71285d
Patch4:         0005-Remove-hba-only-directories-in-clear_existing.patch
71285d
Patch5:         0006-create-remove-stale-hba-only-dir.patch
dbfba8
Patch6:         0007-alua-enable-alua-for-pscsi-tcmu-if-kernel-reports-su.patch
dbfba8
Patch7:         0008-save_to_file-support-saveconfig-at-storage-object-le.patch
dbfba8
Patch8:         0009-restoreconfig-fix-alua-tpg-config-setup.patch
dbfba8
Patch9:         0010-Support-tcmu-hw-max-sectors.patch
dbfba8
Patch10:        0011-saveconfig-dump-control-string-containing-control-va.patch
dbfba8
Patch11:        0012-tcmu-add-control-constructor-arg.patch
dbfba8
Patch12:        0013-saveconfig-fix-failure-in-absence-of-save-file.patch
d7eb2d
Patch13:        0014-saveconfig-handle-no-attr-exception-in-_parse_info.patch
d7eb2d
Patch14:        0015-saveconfig-fix-missing-import.patch
d7eb2d
Patch15:        0016-saveconfig-way-for-block-level-save-with-delete-comm.patch
71285d
BuildArch:      noarch
71285d
BuildRequires:  python-devel epydoc python-setuptools systemd-units python-six python-pyudev
71285d
Requires:       python-kmod python-six python-pyudev
71285d
Requires(post): systemd
71285d
Requires(preun): systemd
71285d
Requires(postun): systemd
71285d
71285d
%if 0%{?with_python3}
71285d
BuildRequires:  python3-devel python-tools python3-setuptools
71285d
%endif
71285d
71285d
%package doc
71285d
Summary:        Documentation for python-rtslib
71285d
Group:          Documentation
71285d
Requires:       %{name} = %{version}-%{release}
71285d
71285d
71285d
%description
71285d
API for generic Linux SCSI kernel target. Includes the 'target'
71285d
service and targetctl tool for restoring configuration.
71285d
71285d
%description doc
71285d
API documentation for rtslib, to configure the generic Linux SCSI
71285d
multiprotocol kernel target.
71285d
71285d
%if 0%{?with_python3}
71285d
%package -n python3-rtslib
71285d
Summary:        API for Linux kernel LIO SCSI target
71285d
Group:          System Environment/Libraries
71285d
71285d
%description -n python3-rtslib
71285d
API for generic Linux SCSI kernel target.
71285d
%endif
71285d
71285d
%prep
71285d
%setup -q -n %{oname}-%{version}
71285d
%patch0 -p1
71285d
%patch1 -p1
71285d
%patch2 -p1
71285d
%patch3 -p1
71285d
%patch4 -p1
71285d
%patch5 -p1
dbfba8
%patch6 -p1
dbfba8
%patch7 -p1
dbfba8
%patch8 -p1
dbfba8
%patch9 -p1
dbfba8
%patch10 -p1
dbfba8
%patch11 -p1
dbfba8
%patch12 -p1
d7eb2d
%patch13 -p1
d7eb2d
%patch14 -p1
d7eb2d
%patch15 -p1
71285d
71285d
%if 0%{?with_python3}
71285d
rm -rf %{py3dir}
71285d
cp -a . %{py3dir}
71285d
%endif
71285d
71285d
%build
71285d
%{__python} setup.py build
71285d
gzip --stdout doc/targetctl.8 > doc/targetctl.8.gz
71285d
gzip --stdout doc/saveconfig.json.5 > doc/saveconfig.json.5.gz
71285d
mkdir -p doc/html
71285d
epydoc --no-sourcecode --html -n rtslib -o doc/html rtslib/*.py
71285d
71285d
%if 0%{?with_python3}
71285d
pushd %{py3dir}
71285d
2to3 --write --nobackups .
71285d
%{__python3} setup.py build
71285d
popd
71285d
%endif
71285d
71285d
%install
71285d
%{__python} setup.py install --skip-build --root %{buildroot}
71285d
mkdir -p %{buildroot}%{_mandir}/man8/
71285d
mkdir -p %{buildroot}%{_mandir}/man5/
71285d
mkdir -p %{buildroot}%{_unitdir}
71285d
mkdir -p %{buildroot}%{_sysconfdir}/target/backup
71285d
mkdir -p %{buildroot}%{_localstatedir}/target/pr
71285d
mkdir -p %{buildroot}%{_localstatedir}/target/alua
71285d
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/target.service
71285d
install -m 644 doc/targetctl.8.gz %{buildroot}%{_mandir}/man8/
71285d
install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/
71285d
71285d
%if 0%{?with_python3}
71285d
pushd %{py3dir}
71285d
# We don't want py3-converted scripts overwriting py2 scripts
71285d
# Shunt them elsewhere then delete
71285d
%{__python3} setup.py install --skip-build --root %{buildroot} --install-scripts py3scripts
71285d
rm -rf %{buildroot}/py3scripts
71285d
popd
71285d
%endif
71285d
71285d
%post
71285d
%systemd_post target.service
71285d
71285d
%preun
71285d
%systemd_preun target.service
71285d
71285d
%postun
71285d
%systemd_postun_with_restart target.service
71285d
71285d
%files
71285d
%{python_sitelib}/*
71285d
%{_bindir}/targetctl
71285d
%{_unitdir}/target.service
71285d
%doc COPYING README.md doc/getting_started.md
71285d
%{_mandir}/man8/targetctl.8.gz
71285d
%{_mandir}/man5/saveconfig.json.5.gz
71285d
%dir %{_sysconfdir}/target
71285d
%dir %{_sysconfdir}/target/backup
71285d
%dir %{_localstatedir}/target
71285d
%dir %{_localstatedir}/target/pr
71285d
%dir %{_localstatedir}/target/alua
71285d
71285d
%if 0%{?with_python3}
71285d
%files -n python3-rtslib
71285d
%{python3_sitelib}/*
71285d
%doc COPYING README.md
71285d
%endif
71285d
71285d
%files doc
71285d
%doc doc/html
71285d
71285d
%changelog
85bcff
* Wed Aug 08 2018 Maurizio Lombardi <mlombard@redhat.com> - 2.1.fb63-13
85bcff
- respin a new release to avoid problems with TPS tests
85bcff
d7eb2d
* Mon Jun 04 2018 Maurizio Lombardi <mlombard@redhat.com> - 2.1.fb63-12
d7eb2d
- saveconfig: way to block-level save with delete command
d7eb2d
dbfba8
* Tue Apr 24 2018 Maurizio Lombardi <mlombard@redhat.com> - 2.1.fb63-11
dbfba8
- Fix a failure in absence of save file
dbfba8
dbfba8
* Thu Apr 19 2018 Maurizio Lombardi <mlombard@redhat.com> - 2.1.fb63-10
dbfba8
- Add missing patch "tcmu: add control constructor arg"
dbfba8
dbfba8
* Fri Apr 13 2018 Maurizio Lombardi <mlombard@redhat.com> - 2.1.fb63-9
dbfba8
- Support tcmu hw max sectors
dbfba8
- saveconfig: dump control string containing control=value tuples
dbfba8
dbfba8
* Wed Apr 11 2018 Maurizio Lombardi <mlombard@redhat.com> - 2.1.fb63-8
dbfba8
- Fix ALUA tpg config setup
dbfba8
dbfba8
* Tue Apr 10 2018 Maurizio Lombardi <mlombard@redhat.com> - 2.1.fb63-7
dbfba8
- Introduce support to saveconfig at the storage object level
dbfba8
dbfba8
* Tue Mar 27 2018 Maurizio Lombardi <mlombard@redhat.com> - 2.1.fb63-6
dbfba8
- enable alua for pscsi/tcmu if kernel reports support 
dbfba8
71285d
* Mon Feb 26 2018 Maurizio Lombardi <mlombard@redhat.com> - 2.1.fb63-5
71285d
- rtslib never creates hba directories without a storage object within it,
71285d
  but if under some circumstance these existed then we should remove them.
71285d
71285d
* Wed Feb 21 2018 Maurizio Lombardi <mlombard@redhat.com> - 2.1.fb63-4
71285d
- Allow users to pass in a string into the attributes.
71285d
dbfba8
* Thu Nov 02 2017 Maurizio Lombardi <mlombard@redhat.com> - 2.1.fb63-3
71285d
- Enabled qla2xxx target support to fix #1327710
71285d
71285d
* Wed May 17 2017 Andy Grover <agrover@redhat.com> - 2.1.fb63-2
71285d
- Add patch 0003 to fix #1440172
71285d
71285d
* Thu Mar 2 2017 Andy Grover <agrover@redhat.com> - 2.1.fb63-1
71285d
- Rebuild to fix now-fixed issue with redhat-rpm-config in build system
71285d
71285d
* Fri Jul 29 2016 Andy Grover <agrover@redhat.com> - 2.1.fb57-5
71285d
- Rebuild to fix now-fixed issue with redhat-rpm-config in build system
71285d
71285d
* Wed Jul 27 2016 Andy Grover <agrover@redhat.com> - 2.1.fb57-4
71285d
- Add 0003-Fix-regex-in-get_size_for_disk_name.patch
71285d
71285d
* Wed Oct 28 2015 Andy Grover <agrover@redhat.com> - 2.1.fb57-3
71285d
- Add 0002-Fix-comparisons-to-None.patch for #1276044
71285d
71285d
* Mon Aug 24 2015 Andy Grover <agrover@redhat.com> - 2.1.fb57-2
71285d
- Include missing paths to resolve #1254670
71285d
71285d
* Tue Jul 14 2015 Andy Grover <agrover@redhat.com> - 2.1.fb57-1
71285d
- Update to latest Fedora version
71285d
71285d
* Thu Oct 9 2014 Andy Grover <agrover@redhat.com> - 2.1.fb50-1
71285d
- Update to latest Fedora version
71285d
71285d
* Mon Feb 24 2014 Andy Grover <agrover@redhat.com> - 2.1.fb46-1
71285d
- Update to latest Fedora version, fixes rhbz #1064753
71285d
71285d
* Wed Jan 15 2014 Andy Grover <agrover@redhat.com> - 2.1.fb45-1
71285d
- Update to latest Fedora version, to fix rhbz #1048803
71285d
71285d
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.1.fb44-2
71285d
- Mass rebuild 2013-12-27
71285d
71285d
* Wed Dec 18 2013 Andy Grover <agrover@redhat.com> - 2.1.fb44-1
71285d
- Update to latest Fedora version
71285d
71285d
* Wed Nov 6 2013 Andy Grover <agrover@redhat.com> - 2.1.fb41-3
71285d
- Don't overwrite py2 scripts with py3 scripts
71285d
71285d
* Mon Nov 4 2013 Andy Grover <agrover@redhat.com> - 2.1.fb41-2
71285d
- Update rtslib-fix-setup.patch with backported fixups
71285d
- Add in missing systemd requires
71285d
71285d
* Fri Nov 1 2013 Andy Grover <agrover@redhat.com> - 2.1.fb41-1
71285d
- New upstream version
71285d
- Remove obsolete spec stuff: clean, buildroot
71285d
- Add target.service
71285d
71285d
* Mon Sep 23 2013 Andy Grover <agrover@redhat.com> - 2.1.fb40-1
71285d
- New upstream version, fixes restore of mappedluns
71285d
71285d
* Wed Sep 11 2013 Andy Grover <agrover@redhat.com> - 2.1.fb39-1
71285d
- New upstream version, fixes fcoe
71285d
71285d
* Tue Sep 10 2013 Andy Grover <agrover@redhat.com> - 2.1.fb38-1
71285d
- New upstream version
71285d
71285d
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb37-2
71285d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
71285d
71285d
* Tue Jul 23 2013 Andy Grover <agrover@redhat.com> - 2.1.fb37-1
71285d
- New upstream version
71285d
- License now Apache 2.0
71285d
71285d
* Tue Jul 2 2013 Andy Grover <agrover@redhat.com> - 2.1.fb36-1
71285d
- New upstream version
71285d
- Remove fix-tabs.patch
71285d
71285d
* Fri Jun 7 2013 Andy Grover <agrover@redhat.com> - 2.1.fb35-1
71285d
- New upstream version
71285d
- add fix-tabs.patch
71285d
71285d
* Thu May 9 2013 Andy Grover <agrover@redhat.com> - 2.1.fb34-1
71285d
- New upstream version
71285d
71285d
* Thu May 2 2013 Andy Grover <agrover@redhat.com> - 2.1.fb33-1
71285d
- New upstream version
71285d
- Update source file location
71285d
71285d
* Tue Apr 16 2013 Andy Grover <agrover@redhat.com> - 2.1.fb32-2
71285d
- Add python3 subpackage
71285d
71285d
* Tue Apr 9 2013 Andy Grover <agrover@redhat.com> - 2.1.fb32-1
71285d
- New upstream version
71285d
71285d
* Tue Feb 26 2013 Andy Grover <agrover@redhat.com> - 2.1.fb30-1
71285d
- New upstream version
71285d
- Update description and summary
71285d
- Remove patch0, upstream doesn't include usb gadget any more
71285d
71285d
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb28-2
71285d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
71285d
71285d
* Mon Jan 7 2013 Andy Grover <agrover@redhat.com> - 2.1.fb28-1
71285d
- New upstream version
71285d
71285d
* Wed Jan 2 2013 Andy Grover <agrover@redhat.com> - 2.1.fb27-1
71285d
- Specfiles removed upstream, remove handling
71285d
- Refresh no-usb.patch
71285d
71285d
* Thu Dec 20 2012 Andy Grover <agrover@redhat.com> - 2.1.fb26-1
71285d
- New upstream release
71285d
- Remove kernel dependency
71285d
- Remove python-ethtool and python-ipaddr dependencies
71285d
71285d
* Tue Nov 13 2012 Andy Grover <agrover@redhat.com> - 2.1.fb24-1
71285d
- New upstream release
71285d
71285d
* Tue Oct 30 2012 Andy Grover <agrover@redhat.com> - 2.1.fb23-1
71285d
- New upstream release
71285d
71285d
* Thu Sep 6 2012 Andy Grover <agrover@redhat.com> - 2.1.fb22-1
71285d
- New upstream release
71285d
71285d
* Wed Aug 8 2012 Andy Grover <agrover@redhat.com> - 2.1.fb21-1
71285d
- New upstream release
71285d
71285d
* Tue Aug 7 2012 Andy Grover <agrover@redhat.com> - 2.1.fb20-2
71285d
- Add patch no-usb.patch
71285d
71285d
* Tue Aug 7 2012 Andy Grover <agrover@redhat.com> - 2.1.fb20-1
71285d
- New upstream release. Add kernel version dependency.
71285d
- Don't claim python_sitelib
71285d
71285d
* Thu Aug 2 2012 Andy Grover <agrover@redhat.com> - 2.1.fb19-1
71285d
- New upstream release. Add kmod dependency.
71285d
71285d
* Tue Jul 31 2012 Andy Grover <agrover@redhat.com> - 2.1.fb18-1
71285d
- New upstream release. Remove configobj dependency
71285d
71285d
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb17-2
71285d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
71285d
71285d
* Thu Jun 28 2012 Andy Grover <agrover@redhat.com> - 2.1.fb17-1
71285d
- New upstream release
71285d
- Remove patch retry-target-creation.patch, upstream has alternate
71285d
  fix.
71285d
71285d
* Tue Jun 12 2012 Andy Grover <agrover@redhat.com> - 2.1.fb15-1
71285d
- New upstream release
71285d
71285d
* Wed May 30 2012 Andy Grover <agrover@redhat.com> - 2.1.fb14-1
71285d
- Update Source URL to proper tarball
71285d
- Add patch retry-target-creation.patch
71285d
- New upstream release
71285d
71285d
* Mon Apr 9 2012 Andy Grover <agrover@redhat.com> - 2.1.fb13-1
71285d
- New upstream release
71285d
71285d
* Wed Feb 29 2012 Andy Grover <agrover@redhat.com> - 2.1.fb12-2
71285d
- Add -doc package of epydoc-generated html docs
71285d
71285d
* Wed Feb 29 2012 Andy Grover <agrover@redhat.com> - 2.1.fb12-1
71285d
- New upstream release
71285d
71285d
* Tue Feb 21 2012 Andy Grover <agrover@redhat.com> - 2.1.fb11-1
71285d
- New upstream release
71285d
71285d
* Fri Feb 10 2012 Andy Grover <agrover@redhat.com> - 2.1.fb9-1
71285d
- New upstream release
71285d
71285d
* Fri Feb 3 2012 Andy Grover <agrover@redhat.com> - 2.1.fb8-1
71285d
- New upstream release
71285d
71285d
* Tue Jan 24 2012 Andy Grover <agrover@redhat.com> - 2.1.fb7-1
71285d
- New upstream release
71285d
71285d
* Tue Jan 24 2012 Andy Grover <agrover@redhat.com> - 2.1.fb6-1
71285d
- New upstream release
71285d
71285d
* Fri Jan 13 2012 Andy Grover <agrover@redhat.com> - 2.1.fb5-1
71285d
- New upstream release
71285d
71285d
* Fri Jan 13 2012 Andy Grover <agrover@redhat.com> - 2.1.fb4-1
71285d
- New upstream release
71285d
71285d
* Tue Jan 10 2012 Andy Grover <agrover@redhat.com> - 2.1.fb3-1
71285d
- New upstream release
71285d
71285d
* Tue Dec 6 2011 Andy Grover <agrover@redhat.com> - 2.1.fb2-1
71285d
- New upstream release
71285d
71285d
* Tue Dec 6 2011 Andy Grover <agrover@redhat.com> - 2.1.fb1-1
71285d
- Change upstream URL
71285d
- New upstream release
71285d
- Remove upstreamed patches:
71285d
  * python-rtslib-git-version.patch
71285d
  * python-rtslib-use-ethtool.patch
71285d
  * python-rtslib-update-specpath.patch
71285d
71285d
* Mon Nov 14 2011 Andy Grover <agrover@redhat.com> - 1.99.1.git644eece-8
71285d
- Change archive instructions to use gzip -n
71285d
- Fix issues raised in Fedora package review (#744349)
71285d
71285d
* Thu Oct 6 2011 Andy Grover <agrover@redhat.com> - 1.99.1.git644eece-7
71285d
- Remove patch
71285d
  * python-rtslib-del-unused-specs.patch
71285d
71285d
* Wed Aug 17 2011 Andy Grover <agrover@redhat.com> - 1.99-6
71285d
- Update based on review comments
71285d
  - Fully document steps to build archive
71285d
  - Remove commented-out extraneous text
71285d
  - Remove a repeat in Requires line
71285d
  - Update git-version.patch to have proper sha1
71285d
  - Change location of fabric spec files to /var/lib/target
71285d
- Remove unused specs
71285d
71285d
* Tue May 10 2011 Andy Grover <agrover@redhat.com> - 1.99-1
71285d
- Initial packaging