Blame SPECS/python-rtslib.spec

6b4347
%if 0%{?fedora}
6b4347
%global with_python3 1
6b4347
%endif
6b4347
6b4347
%global oname rtslib-fb
6b4347
6b4347
Name:           python-rtslib
6b4347
License:        ASL 2.0
6b4347
Group:          System Environment/Libraries
6b4347
Summary:        API for Linux kernel LIO SCSI target
b0cc08
Version:        2.1.fb57
b0cc08
Release:        3%{?dist}
6b4347
URL:            https://fedorahosted.org/targetcli-fb/
6b4347
Source:         https://fedorahosted.org/released/targetcli-fb/%{oname}-%{version}.tar.gz
6b4347
Source1:        target.service
6b4347
Patch0:         0001-Turn-off-unsupported-fabrics.patch
b0cc08
Patch1:         0002-Fix-comparisons-to-None.patch
6b4347
BuildArch:      noarch
6b4347
BuildRequires:  python-devel epydoc python-setuptools systemd-units
b0cc08
Requires:       python-kmod python-six
6b4347
Requires(post): systemd
6b4347
Requires(preun): systemd
6b4347
Requires(postun): systemd
6b4347
6b4347
%if 0%{?with_python3}
6b4347
BuildRequires:  python3-devel python-tools python3-setuptools
6b4347
%endif
6b4347
6b4347
%package doc
6b4347
Summary:        Documentation for python-rtslib
6b4347
Group:          Documentation
6b4347
Requires:       %{name} = %{version}-%{release}
6b4347
6b4347
6b4347
%description
6b4347
API for generic Linux SCSI kernel target. Includes the 'target'
6b4347
service and targetctl tool for restoring configuration.
6b4347
6b4347
%description doc
6b4347
API documentation for rtslib, to configure the generic Linux SCSI
6b4347
multiprotocol kernel target.
6b4347
6b4347
%if 0%{?with_python3}
6b4347
%package -n python3-rtslib
6b4347
Summary:        API for Linux kernel LIO SCSI target
6b4347
Group:          System Environment/Libraries
6b4347
6b4347
%description -n python3-rtslib
6b4347
API for generic Linux SCSI kernel target.
6b4347
%endif
6b4347
6b4347
%prep
6b4347
%setup -q -n %{oname}-%{version}
6b4347
%patch0 -p1
b0cc08
%patch1 -p1
6b4347
6b4347
%if 0%{?with_python3}
6b4347
rm -rf %{py3dir}
6b4347
cp -a . %{py3dir}
6b4347
%endif
6b4347
6b4347
%build
6b4347
%{__python} setup.py build
6b4347
gzip --stdout doc/targetctl.8 > doc/targetctl.8.gz
6b4347
gzip --stdout doc/saveconfig.json.5 > doc/saveconfig.json.5.gz
6b4347
mkdir -p doc/html
6b4347
epydoc --no-sourcecode --html -n rtslib -o doc/html rtslib/*.py
6b4347
6b4347
%if 0%{?with_python3}
6b4347
pushd %{py3dir}
6b4347
2to3 --write --nobackups .
6b4347
%{__python3} setup.py build
6b4347
popd
6b4347
%endif
6b4347
6b4347
%install
6b4347
%{__python} setup.py install --skip-build --root %{buildroot}
6b4347
mkdir -p %{buildroot}%{_mandir}/man8/
6b4347
mkdir -p %{buildroot}%{_mandir}/man5/
6b4347
mkdir -p %{buildroot}%{_unitdir}
b0cc08
mkdir -p %{buildroot}%{_sysconfdir}/target/backup
b0cc08
mkdir -p %{buildroot}%{_localstatedir}/target/pr
b0cc08
mkdir -p %{buildroot}%{_localstatedir}/target/alua
6b4347
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/target.service
6b4347
install -m 644 doc/targetctl.8.gz %{buildroot}%{_mandir}/man8/
6b4347
install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/
6b4347
6b4347
%if 0%{?with_python3}
6b4347
pushd %{py3dir}
6b4347
# We don't want py3-converted scripts overwriting py2 scripts
6b4347
# Shunt them elsewhere then delete
6b4347
%{__python3} setup.py install --skip-build --root %{buildroot} --install-scripts py3scripts
6b4347
rm -rf %{buildroot}/py3scripts
6b4347
popd
6b4347
%endif
6b4347
6b4347
%post
6b4347
%systemd_post target.service
6b4347
6b4347
%preun
6b4347
%systemd_preun target.service
6b4347
6b4347
%postun
6b4347
%systemd_postun_with_restart target.service
6b4347
6b4347
%files
6b4347
%{python_sitelib}/*
6b4347
%{_bindir}/targetctl
6b4347
%{_unitdir}/target.service
6dcb0f
%doc COPYING README.md doc/getting_started.md
6b4347
%{_mandir}/man8/targetctl.8.gz
6b4347
%{_mandir}/man5/saveconfig.json.5.gz
b0cc08
%dir %{_sysconfdir}/target
b0cc08
%dir %{_sysconfdir}/target/backup
b0cc08
%dir %{_localstatedir}/target
b0cc08
%dir %{_localstatedir}/target/pr
b0cc08
%dir %{_localstatedir}/target/alua
6b4347
6b4347
%if 0%{?with_python3}
6b4347
%files -n python3-rtslib
6b4347
%{python3_sitelib}/*
6b4347
%doc COPYING README.md
6b4347
%endif
6b4347
6b4347
%files doc
6b4347
%doc doc/html
6b4347
6b4347
%changelog
b0cc08
* Wed Oct 28 2015 Andy Grover <agrover@redhat.com> - 2.1.fb57-3
b0cc08
- Add 0002-Fix-comparisons-to-None.patch for #1276044
b0cc08
b0cc08
* Mon Aug 24 2015 Andy Grover <agrover@redhat.com> - 2.1.fb57-2
b0cc08
- Include missing paths to resolve #1254670
b0cc08
b0cc08
* Tue Jul 14 2015 Andy Grover <agrover@redhat.com> - 2.1.fb57-1
b0cc08
- Update to latest Fedora version
b0cc08
2cc7fd
* Thu Oct 9 2014 Andy Grover <agrover@redhat.com> - 2.1.fb50-1
2cc7fd
- Update to latest Fedora version
2cc7fd
6dcb0f
* Mon Feb 24 2014 Andy Grover <agrover@redhat.com> - 2.1.fb46-1
6dcb0f
- Update to latest Fedora version, fixes rhbz #1064753
6dcb0f
6dcb0f
* Wed Jan 15 2014 Andy Grover <agrover@redhat.com> - 2.1.fb45-1
6dcb0f
- Update to latest Fedora version, to fix rhbz #1048803
6dcb0f
6dcb0f
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.1.fb44-2
6dcb0f
- Mass rebuild 2013-12-27
6dcb0f
6dcb0f
* Wed Dec 18 2013 Andy Grover <agrover@redhat.com> - 2.1.fb44-1
6dcb0f
- Update to latest Fedora version
6dcb0f
6b4347
* Wed Nov 6 2013 Andy Grover <agrover@redhat.com> - 2.1.fb41-3
6b4347
- Don't overwrite py2 scripts with py3 scripts
6b4347
6b4347
* Mon Nov 4 2013 Andy Grover <agrover@redhat.com> - 2.1.fb41-2
6b4347
- Update rtslib-fix-setup.patch with backported fixups
6b4347
- Add in missing systemd requires
6b4347
6b4347
* Fri Nov 1 2013 Andy Grover <agrover@redhat.com> - 2.1.fb41-1
6b4347
- New upstream version
6b4347
- Remove obsolete spec stuff: clean, buildroot
6b4347
- Add target.service
6b4347
6b4347
* Mon Sep 23 2013 Andy Grover <agrover@redhat.com> - 2.1.fb40-1
6b4347
- New upstream version, fixes restore of mappedluns
6b4347
6b4347
* Wed Sep 11 2013 Andy Grover <agrover@redhat.com> - 2.1.fb39-1
6b4347
- New upstream version, fixes fcoe
6b4347
6b4347
* Tue Sep 10 2013 Andy Grover <agrover@redhat.com> - 2.1.fb38-1
6b4347
- New upstream version
6b4347
6b4347
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb37-2
6b4347
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
6b4347
6b4347
* Tue Jul 23 2013 Andy Grover <agrover@redhat.com> - 2.1.fb37-1
6b4347
- New upstream version
6b4347
- License now Apache 2.0
6b4347
6b4347
* Tue Jul 2 2013 Andy Grover <agrover@redhat.com> - 2.1.fb36-1
6b4347
- New upstream version
6b4347
- Remove fix-tabs.patch
6b4347
6b4347
* Fri Jun 7 2013 Andy Grover <agrover@redhat.com> - 2.1.fb35-1
6b4347
- New upstream version
6b4347
- add fix-tabs.patch
6b4347
6b4347
* Thu May 9 2013 Andy Grover <agrover@redhat.com> - 2.1.fb34-1
6b4347
- New upstream version
6b4347
6b4347
* Thu May 2 2013 Andy Grover <agrover@redhat.com> - 2.1.fb33-1
6b4347
- New upstream version
6b4347
- Update source file location
6b4347
6b4347
* Tue Apr 16 2013 Andy Grover <agrover@redhat.com> - 2.1.fb32-2
6b4347
- Add python3 subpackage
6b4347
6b4347
* Tue Apr 9 2013 Andy Grover <agrover@redhat.com> - 2.1.fb32-1
6b4347
- New upstream version
6b4347
6b4347
* Tue Feb 26 2013 Andy Grover <agrover@redhat.com> - 2.1.fb30-1
6b4347
- New upstream version
6b4347
- Update description and summary
6b4347
- Remove patch0, upstream doesn't include usb gadget any more
6b4347
6b4347
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb28-2
6b4347
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
6b4347
6b4347
* Mon Jan 7 2013 Andy Grover <agrover@redhat.com> - 2.1.fb28-1
6b4347
- New upstream version
6b4347
6b4347
* Wed Jan 2 2013 Andy Grover <agrover@redhat.com> - 2.1.fb27-1
6b4347
- Specfiles removed upstream, remove handling
6b4347
- Refresh no-usb.patch
6b4347
6b4347
* Thu Dec 20 2012 Andy Grover <agrover@redhat.com> - 2.1.fb26-1
6b4347
- New upstream release
6b4347
- Remove kernel dependency
6b4347
- Remove python-ethtool and python-ipaddr dependencies
6b4347
6b4347
* Tue Nov 13 2012 Andy Grover <agrover@redhat.com> - 2.1.fb24-1
6b4347
- New upstream release
6b4347
6b4347
* Tue Oct 30 2012 Andy Grover <agrover@redhat.com> - 2.1.fb23-1
6b4347
- New upstream release
6b4347
6b4347
* Thu Sep 6 2012 Andy Grover <agrover@redhat.com> - 2.1.fb22-1
6b4347
- New upstream release
6b4347
6b4347
* Wed Aug 8 2012 Andy Grover <agrover@redhat.com> - 2.1.fb21-1
6b4347
- New upstream release
6b4347
6b4347
* Tue Aug 7 2012 Andy Grover <agrover@redhat.com> - 2.1.fb20-2
6b4347
- Add patch no-usb.patch
6b4347
6b4347
* Tue Aug 7 2012 Andy Grover <agrover@redhat.com> - 2.1.fb20-1
6b4347
- New upstream release. Add kernel version dependency.
6b4347
- Don't claim python_sitelib
6b4347
6b4347
* Thu Aug 2 2012 Andy Grover <agrover@redhat.com> - 2.1.fb19-1
6b4347
- New upstream release. Add kmod dependency.
6b4347
6b4347
* Tue Jul 31 2012 Andy Grover <agrover@redhat.com> - 2.1.fb18-1
6b4347
- New upstream release. Remove configobj dependency
6b4347
6b4347
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb17-2
6b4347
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
6b4347
6b4347
* Thu Jun 28 2012 Andy Grover <agrover@redhat.com> - 2.1.fb17-1
6b4347
- New upstream release
6b4347
- Remove patch retry-target-creation.patch, upstream has alternate
6b4347
  fix.
6b4347
6b4347
* Tue Jun 12 2012 Andy Grover <agrover@redhat.com> - 2.1.fb15-1
6b4347
- New upstream release
6b4347
6b4347
* Wed May 30 2012 Andy Grover <agrover@redhat.com> - 2.1.fb14-1
6b4347
- Update Source URL to proper tarball
6b4347
- Add patch retry-target-creation.patch
6b4347
- New upstream release
6b4347
6b4347
* Mon Apr 9 2012 Andy Grover <agrover@redhat.com> - 2.1.fb13-1
6b4347
- New upstream release
6b4347
6b4347
* Wed Feb 29 2012 Andy Grover <agrover@redhat.com> - 2.1.fb12-2
6b4347
- Add -doc package of epydoc-generated html docs
6b4347
6b4347
* Wed Feb 29 2012 Andy Grover <agrover@redhat.com> - 2.1.fb12-1
6b4347
- New upstream release
6b4347
6b4347
* Tue Feb 21 2012 Andy Grover <agrover@redhat.com> - 2.1.fb11-1
6b4347
- New upstream release
6b4347
6b4347
* Fri Feb 10 2012 Andy Grover <agrover@redhat.com> - 2.1.fb9-1
6b4347
- New upstream release
6b4347
6b4347
* Fri Feb 3 2012 Andy Grover <agrover@redhat.com> - 2.1.fb8-1
6b4347
- New upstream release
6b4347
6b4347
* Tue Jan 24 2012 Andy Grover <agrover@redhat.com> - 2.1.fb7-1
6b4347
- New upstream release
6b4347
6b4347
* Tue Jan 24 2012 Andy Grover <agrover@redhat.com> - 2.1.fb6-1
6b4347
- New upstream release
6b4347
6b4347
* Fri Jan 13 2012 Andy Grover <agrover@redhat.com> - 2.1.fb5-1
6b4347
- New upstream release
6b4347
6b4347
* Fri Jan 13 2012 Andy Grover <agrover@redhat.com> - 2.1.fb4-1
6b4347
- New upstream release
6b4347
6b4347
* Tue Jan 10 2012 Andy Grover <agrover@redhat.com> - 2.1.fb3-1
6b4347
- New upstream release
6b4347
6b4347
* Tue Dec 6 2011 Andy Grover <agrover@redhat.com> - 2.1.fb2-1
6b4347
- New upstream release
6b4347
6b4347
* Tue Dec 6 2011 Andy Grover <agrover@redhat.com> - 2.1.fb1-1
6b4347
- Change upstream URL
6b4347
- New upstream release
6b4347
- Remove upstreamed patches:
6b4347
  * python-rtslib-git-version.patch
6b4347
  * python-rtslib-use-ethtool.patch
6b4347
  * python-rtslib-update-specpath.patch
6b4347
6b4347
* Mon Nov 14 2011 Andy Grover <agrover@redhat.com> - 1.99.1.git644eece-8
6b4347
- Change archive instructions to use gzip -n
6b4347
- Fix issues raised in Fedora package review (#744349)
6b4347
6b4347
* Thu Oct 6 2011 Andy Grover <agrover@redhat.com> - 1.99.1.git644eece-7
6b4347
- Remove patch
6b4347
  * python-rtslib-del-unused-specs.patch
6b4347
6b4347
* Wed Aug 17 2011 Andy Grover <agrover@redhat.com> - 1.99-6
6b4347
- Update based on review comments
6b4347
  - Fully document steps to build archive
6b4347
  - Remove commented-out extraneous text
6b4347
  - Remove a repeat in Requires line
6b4347
  - Update git-version.patch to have proper sha1
6b4347
  - Change location of fabric spec files to /var/lib/target
6b4347
- Remove unused specs
6b4347
6b4347
* Tue May 10 2011 Andy Grover <agrover@redhat.com> - 1.99-1
6b4347
- Initial packaging