1e0f349
%global oname rtslib-fb
cdb3c35
55e95fb
Name:             python-rtslib
55e95fb
License:          ASL 2.0
55e95fb
Summary:          API for Linux kernel LIO SCSI target
9aceee8
Version:          2.1.fb69
9712c7b
Release:          6%{?dist}
9aceee8
URL:              https://github.com/open-iscsi/%{oname}
9aceee8
Source:           %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz
55e95fb
Source1:          target.service
55e95fb
Patch0:           0001-disable-xen_pvscsi.patch
55e95fb
BuildArch:        noarch
34848b6
BuildRequires:    epydoc
34848b6
BuildRequires:    systemd
55e95fb
Requires(post):   systemd
55e95fb
Requires(preun):  systemd
87ea119
Requires(postun): systemd
cdb3c35
db19bb6
ba95f29
%global _description\
ba95f29
API for generic Linux SCSI kernel target. Includes the 'target'\
34848b6
service and targetctl tool for restoring configuration.
ba95f29
ba95f29
%description %_description
5545297
ba95f29
4a40bda
%package doc
07fac6f
Summary:        Documentation for python-rtslib
34848b6
Requires:       python3-rtslib = %{version}-%{release}
4a40bda
4a40bda
%description doc
4a40bda
API documentation for rtslib, to configure the generic Linux SCSI
758a230
multiprotocol kernel target.
4a40bda
5545297
db19bb6
%package -n python3-rtslib
db19bb6
Summary:        API for Linux kernel LIO SCSI target
55e95fb
55e95fb
BuildRequires:  python3-devel
55e95fb
BuildRequires:  python3-setuptools
34848b6
BuildRequires:  python3-kmod
34848b6
BuildRequires:  python3-six
34848b6
BuildRequires:  python3-pyudev
55e95fb
55e95fb
Requires:       python3-kmod
55e95fb
Requires:       python3-six
55e95fb
Requires:       python3-pyudev
db19bb6
db19bb6
%description -n python3-rtslib
db19bb6
API for generic Linux SCSI kernel target.
db19bb6
5545297
5545297
%package -n target-restore
5545297
Summary:        Systemd service for targetcli/rtslib
5545297
Requires:       python3-rtslib = %{version}-%{release}
5545297
5545297
%description -n target-restore
5545297
Systemd service to restore the LIO kernel target settings
5545297
on system restart.
5545297
5545297
cdb3c35
%prep
d47eeff
%setup -q -n %{oname}-%{version}
5be92b3
%patch0 -p1
cdb3c35
db19bb6
cdb3c35
%build
55e95fb
gzip --stdout doc/targetctl.8 > doc/targetctl.8.gz
55e95fb
gzip --stdout doc/saveconfig.json.5 > doc/saveconfig.json.5.gz
cdb3c35
55e95fb
%py3_build
34848b6
34848b6
mkdir -p doc/html
34848b6
epydoc --no-sourcecode --html -n rtslib -o doc/html rtslib/*.py
db19bb6
cdb3c35
%install
5545297
# remove py2 scripts if py3 enabled
55e95fb
%py3_install
5545297
e44b55a
mkdir -p %{buildroot}%{_mandir}/man8/
e44b55a
mkdir -p %{buildroot}%{_mandir}/man5/
e44b55a
mkdir -p %{buildroot}%{_unitdir}
5545297
mkdir -p %{buildroot}%{_sysconfdir}/target/backup
5545297
mkdir -p %{buildroot}%{_localstatedir}/target/pr
5545297
mkdir -p %{buildroot}%{_localstatedir}/target/alua
e44b55a
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/target.service
e44b55a
install -m 644 doc/targetctl.8.gz %{buildroot}%{_mandir}/man8/
e44b55a
install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/
cdb3c35
5545297
%post -n target-restore
e44b55a
%systemd_post target.service
e44b55a
5545297
%preun -n target-restore
e44b55a
%systemd_preun target.service
e44b55a
5545297
%postun -n target-restore
e44b55a
%systemd_postun_with_restart target.service
cdb3c35
cdb3c35
db19bb6
%files -n python3-rtslib
55e95fb
%license COPYING
db19bb6
%{python3_sitelib}/*
55e95fb
%doc README.md doc/getting_started.md
db19bb6
5545297
%files -n target-restore
5545297
%{_bindir}/targetctl
5545297
%{_unitdir}/target.service
5545297
%dir %{_sysconfdir}/target
5545297
%dir %{_sysconfdir}/target/backup
831c49f
%dir %{_localstatedir}/target
5545297
%dir %{_localstatedir}/target/pr
5545297
%dir %{_localstatedir}/target/alua
5545297
%{_mandir}/man8/targetctl.8.gz
5545297
%{_mandir}/man5/saveconfig.json.5.gz
5545297
4a40bda
%files doc
4a40bda
%doc doc/html
4a40bda
cdb3c35
%changelog
9712c7b
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.1.fb69-6
9712c7b
- Rebuilt for Python 3.8.0rc1 (#1748018)
9712c7b
9535c93
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.1.fb69-5
9535c93
- Rebuilt for Python 3.8
9535c93
538c6bd
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.fb69-4
538c6bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
538c6bd
0ab530c
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.fb69-3
0ab530c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
0ab530c
34848b6
* Fri Oct 12 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.1.fb69-2
34848b6
- Python2 binary package has been removed
34848b6
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
34848b6
9aceee8
* Wed Oct 10 2018 Andy Grover <agrover@redhat.com> - 2.1.fb69-1
9aceee8
- New upstream version
9aceee8
- Fix URL so spectool -g works
9aceee8
9bbf98e
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.fb67-5
9bbf98e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
9bbf98e
1d8c4d8
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.1.fb67-4
1d8c4d8
- Rebuilt for Python 3.7
1d8c4d8
55e95fb
* Fri Mar 16 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.1.fb67-3
55e95fb
- Don't build the Python 2 subpackage on EL > 7
55e95fb
335797b
* Thu Feb 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.1.fb67-2
335797b
- Update Python 2 dependency declarations to new packaging standards
335797b
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
335797b
ef8831c
* Wed Feb 14 2018 Andy Grover <agrover@redhat.com> - 2.1.fb67-1
ef8831c
- New upstream version
ef8831c
ec3ac87
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.fb66-2
ec3ac87
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ec3ac87
9efd289
* Wed Jan 31 2018 Andy Grover <agrover@redhat.com> - 2.1.fb66-1
9efd289
- New upstream version
9efd289
56a1bae
* Fri Jan 26 2018 Andy Grover <agrover@redhat.com> - 2.1.fb65-1
56a1bae
- New upstream version
56a1bae
55bb49d
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 2.1.fb63-4
55bb49d
- Cleanup spec file conditionals
55bb49d
ba95f29
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.1.fb63-3
ba95f29
- Python 2 binary package renamed to python2-rtslib
ba95f29
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
ba95f29
37fb69e
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.fb63-2
37fb69e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
37fb69e
2da89a1
* Wed Mar 1 2017 Andy Grover <agrover@redhat.com> - 2.1.fb63-1
2da89a1
- New upstream version
2da89a1
750c7f0
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.fb60-4
750c7f0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
750c7f0
f105b2d
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.1.fb60-3
f105b2d
- Rebuild for Python 3.6
f105b2d
8fe126b
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb60-2
8fe126b
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
8fe126b
aecbd43
* Thu Apr 7 2016 Andy Grover <agrover@redhat.com> - 2.1.fb60-1
aecbd43
- New upstream version
aecbd43
7a6aae7
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.fb59-2
7a6aae7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
7a6aae7
af0e64b
* Fri Dec 11 2015 Andy Grover <agrover@redhat.com> - 2.1.fb59-1
af0e64b
- New upstream version
af0e64b
5be92b3
* Tue Dec 8 2015 Andy Grover <agrover@redhat.com> - 2.1.fb58-2
5be92b3
- Add patch 0001-disable-xen_pvscsi.patch
5be92b3
814c9bc
* Tue Dec 1 2015 Andy Grover <agrover@redhat.com> - 2.1.fb58-1
814c9bc
- New upstream version
814c9bc
2ee0139
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb57-5
2ee0139
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
2ee0139
82d5ff2
* Mon Aug 31 2015 Andy Grover <agrover@redhat.com> - 2.1.fb57-4
82d5ff2
- Fix deps for python3 pkg
82d5ff2
831c49f
* Fri Aug 28 2015 Andy Grover <agrover@redhat.com> - 2.1.fb57-3
831c49f
- Fix an unowned directory
831c49f
5545297
* Tue Aug 18 2015 Andy Grover <agrover@redhat.com> - 2.1.fb57-2
5545297
- Move targetctl and scripts to separate 'target-restore' pkg
5545297
ddd8b6f
* Tue Jun 23 2015 Andy Grover <agrover@redhat.com> - 2.1.fb57-1
ddd8b6f
- New upstream version
ddd8b6f
- Change from 2to3 to python-six
ddd8b6f
00d86c0
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb53-2
00d86c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
00d86c0
6176c56
* Fri Apr 17 2015 Andy Grover <agrover@redhat.com> - 2.1.fb53-1
6176c56
- New upstream version
6176c56
9b1c037
* Tue Jan 13 2015 Andy Grover <agrover@redhat.com> - 2.1.fb52-1
9b1c037
- New upstream version
9b1c037
2802247
* Tue Dec 2 2014 Andy Grover <agrover@redhat.com> - 2.1.fb51-1
2802247
- New upstream version
2802247
9928e06
* Wed Sep 24 2014 Andy Grover <agrover@redhat.com> - 2.1.fb50-1
9928e06
- New upstream version
9928e06
bf39292
* Thu Aug 28 2014 Andy Grover <agrover@redhat.com> - 2.1.fb49-1
bf39292
- New upstream version
bf39292
61c5458
* Fri Jun 20 2014 Andy Grover <agrover@redhat.com> - 2.1.fb48-1
61c5458
- New upstream version
61c5458
75b7468
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb47-3
75b7468
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
75b7468
ab7724e
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 2.1.fb47-2
ab7724e
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
ab7724e
4ca1723
* Fri Mar 14 2014 Andy Grover <agrover@redhat.com> - 2.1.fb47-1
4ca1723
- New upstream version
4ca1723
58d788d
* Tue Feb 18 2014 Andy Grover <agrover@redhat.com> - 2.1.fb46-1
58d788d
- New upstream version
58d788d
c07289c
* Wed Jan 15 2014 Andy Grover <agrover@redhat.com> - 2.1.fb45-1
c07289c
- New upstream version
c07289c
4e8af65
* Wed Dec 18 2013 Andy Grover <agrover@redhat.com> - 2.1.fb44-1
4e8af65
- New upstream version
4e8af65
31948f8
* Wed Dec 4 2013 Andy Grover <agrover@redhat.com> - 2.1.fb43-1
31948f8
- New upstream version
31948f8
- Remove rtslib-fix-setup.patch
31948f8
204c228
* Wed Nov 6 2013 Andy Grover <agrover@redhat.com> - 2.1.fb41-3
204c228
- Don't overwrite py2 scripts with py3 scripts
204c228
87ea119
* Mon Nov 4 2013 Andy Grover <agrover@redhat.com> - 2.1.fb41-2
87ea119
- Update rtslib-fix-setup.patch with backported fixups
87ea119
- Add in missing systemd requires
87ea119
e44b55a
* Fri Nov 1 2013 Andy Grover <agrover@redhat.com> - 2.1.fb41-1
e44b55a
- New upstream version
e44b55a
- Remove obsolete spec stuff: clean, buildroot
e44b55a
- Add target.service
e44b55a
bee6913
* Mon Sep 23 2013 Andy Grover <agrover@redhat.com> - 2.1.fb40-1
bee6913
- New upstream version, fixes restore of mappedluns
bee6913
a64ae98
* Wed Sep 11 2013 Andy Grover <agrover@redhat.com> - 2.1.fb39-1
a64ae98
- New upstream version, fixes fcoe
a64ae98
4e08640
* Tue Sep 10 2013 Andy Grover <agrover@redhat.com> - 2.1.fb38-1
4e08640
- New upstream version
4e08640
81efc9f
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb37-2
81efc9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
81efc9f
bb37a4f
* Tue Jul 23 2013 Andy Grover <agrover@redhat.com> - 2.1.fb37-1
bb37a4f
- New upstream version
bb37a4f
- License now Apache 2.0
bb37a4f
dc03ae2
* Tue Jul 2 2013 Andy Grover <agrover@redhat.com> - 2.1.fb36-1
dc03ae2
- New upstream version
dc03ae2
- Remove fix-tabs.patch
dc03ae2
40d2e61
* Fri Jun 7 2013 Andy Grover <agrover@redhat.com> - 2.1.fb35-1
40d2e61
- New upstream version
026774b
- add fix-tabs.patch
40d2e61
daa5652
* Thu May 9 2013 Andy Grover <agrover@redhat.com> - 2.1.fb34-1
daa5652
- New upstream version
daa5652
1c43281
* Thu May 2 2013 Andy Grover <agrover@redhat.com> - 2.1.fb33-1
1c43281
- New upstream version
1c43281
- Update source file location
1c43281
db19bb6
* Tue Apr 16 2013 Andy Grover <agrover@redhat.com> - 2.1.fb32-2
db19bb6
- Add python3 subpackage
db19bb6
ba0a461
* Tue Apr 9 2013 Andy Grover <agrover@redhat.com> - 2.1.fb32-1
ba0a461
- New upstream version
ba0a461
758a230
* Tue Feb 26 2013 Andy Grover <agrover@redhat.com> - 2.1.fb30-1
758a230
- New upstream version
758a230
- Update description and summary
758a230
- Remove patch0, upstream doesn't include usb gadget any more
758a230
9741cea
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb28-2
9741cea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
9741cea
d22c9df
* Mon Jan 7 2013 Andy Grover <agrover@redhat.com> - 2.1.fb28-1
d22c9df
- New upstream version
d22c9df
d2ded5e
* Wed Jan 2 2013 Andy Grover <agrover@redhat.com> - 2.1.fb27-1
d2ded5e
- Specfiles removed upstream, remove handling
d2ded5e
- Refresh no-usb.patch
d2ded5e
a7d93d8
* Thu Dec 20 2012 Andy Grover <agrover@redhat.com> - 2.1.fb26-1
a7d93d8
- New upstream release
a7d93d8
- Remove kernel dependency
a7d93d8
- Remove python-ethtool and python-ipaddr dependencies
a7d93d8
0984b1b
* Tue Nov 13 2012 Andy Grover <agrover@redhat.com> - 2.1.fb24-1
0984b1b
- New upstream release
0984b1b
ed6af64
* Tue Oct 30 2012 Andy Grover <agrover@redhat.com> - 2.1.fb23-1
ed6af64
- New upstream release
ed6af64
ea90b3d
* Thu Sep 6 2012 Andy Grover <agrover@redhat.com> - 2.1.fb22-1
ea90b3d
- New upstream release
ea90b3d
cfaeab3
* Wed Aug 8 2012 Andy Grover <agrover@redhat.com> - 2.1.fb21-1
cfaeab3
- New upstream release
cfaeab3
2390f8f
* Tue Aug 7 2012 Andy Grover <agrover@redhat.com> - 2.1.fb20-2
2390f8f
- Add patch no-usb.patch
2390f8f
07fac6f
* Tue Aug 7 2012 Andy Grover <agrover@redhat.com> - 2.1.fb20-1
07fac6f
- New upstream release. Add kernel version dependency.
07fac6f
- Don't claim python_sitelib
07fac6f
a44f021
* Thu Aug 2 2012 Andy Grover <agrover@redhat.com> - 2.1.fb19-1
a44f021
- New upstream release. Add kmod dependency.
a44f021
56ce802
* Tue Jul 31 2012 Andy Grover <agrover@redhat.com> - 2.1.fb18-1
56ce802
- New upstream release. Remove configobj dependency
56ce802
043859f
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.fb17-2
043859f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
043859f
c0700ff
* Thu Jun 28 2012 Andy Grover <agrover@redhat.com> - 2.1.fb17-1
c0700ff
- New upstream release
c0700ff
- Remove patch retry-target-creation.patch, upstream has alternate
c0700ff
  fix.
c0700ff
2a96162
* Tue Jun 12 2012 Andy Grover <agrover@redhat.com> - 2.1.fb15-1
2a96162
- New upstream release
2a96162
d47eeff
* Wed May 30 2012 Andy Grover <agrover@redhat.com> - 2.1.fb14-1
d47eeff
- Update Source URL to proper tarball
d47eeff
- Add patch retry-target-creation.patch
d47eeff
- New upstream release
d47eeff
e7fb19a
* Mon Apr 9 2012 Andy Grover <agrover@redhat.com> - 2.1.fb13-1
e7fb19a
- New upstream release
e7fb19a
4a40bda
* Wed Feb 29 2012 Andy Grover <agrover@redhat.com> - 2.1.fb12-2
4a40bda
- Add -doc package of epydoc-generated html docs
4a40bda
e4220a0
* Wed Feb 29 2012 Andy Grover <agrover@redhat.com> - 2.1.fb12-1
e4220a0
- New upstream release
e4220a0
e43d519
* Tue Feb 21 2012 Andy Grover <agrover@redhat.com> - 2.1.fb11-1
9918394
- New upstream release
9918394
e44b55a
* Fri Feb 10 2012 Andy Grover <agrover@redhat.com> - 2.1.fb9-1
0645dca
- New upstream release
0645dca
7a25e1c
* Fri Feb 3 2012 Andy Grover <agrover@redhat.com> - 2.1.fb8-1
7a25e1c
- New upstream release
7a25e1c
603a4ba
* Tue Jan 24 2012 Andy Grover <agrover@redhat.com> - 2.1.fb7-1
603a4ba
- New upstream release
603a4ba
57befe3
* Tue Jan 24 2012 Andy Grover <agrover@redhat.com> - 2.1.fb6-1
57befe3
- New upstream release
57befe3
43cf7df
* Fri Jan 13 2012 Andy Grover <agrover@redhat.com> - 2.1.fb5-1
43cf7df
- New upstream release
43cf7df
6970e1d
* Fri Jan 13 2012 Andy Grover <agrover@redhat.com> - 2.1.fb4-1
6970e1d
- New upstream release
6970e1d
e9dc557
* Tue Jan 10 2012 Andy Grover <agrover@redhat.com> - 2.1.fb3-1
e9dc557
- New upstream release
e9dc557
d3f4f0a
* Tue Dec 6 2011 Andy Grover <agrover@redhat.com> - 2.1.fb2-1
d3f4f0a
- New upstream release
d3f4f0a
1e0f349
* Tue Dec 6 2011 Andy Grover <agrover@redhat.com> - 2.1.fb1-1
1e0f349
- Change upstream URL
1e0f349
- New upstream release
1e0f349
- Remove upstreamed patches:
1e0f349
  * python-rtslib-git-version.patch
1e0f349
  * python-rtslib-use-ethtool.patch
1e0f349
  * python-rtslib-update-specpath.patch
1e0f349
cdb3c35
* Mon Nov 14 2011 Andy Grover <agrover@redhat.com> - 1.99.1.git644eece-8
cdb3c35
- Change archive instructions to use gzip -n
cdb3c35
- Fix issues raised in Fedora package review (#744349)
cdb3c35
cdb3c35
* Thu Oct 6 2011 Andy Grover <agrover@redhat.com> - 1.99.1.git644eece-7
cdb3c35
- Remove patch
cdb3c35
  * python-rtslib-del-unused-specs.patch
cdb3c35
cdb3c35
* Wed Aug 17 2011 Andy Grover <agrover@redhat.com> - 1.99-6
cdb3c35
- Update based on review comments
cdb3c35
  - Fully document steps to build archive
cdb3c35
  - Remove commented-out extraneous text
cdb3c35
  - Remove a repeat in Requires line
cdb3c35
  - Update git-version.patch to have proper sha1
cdb3c35
  - Change location of fabric spec files to /var/lib/target
cdb3c35
- Remove unused specs
cdb3c35
cdb3c35
* Tue May 10 2011 Andy Grover <agrover@redhat.com> - 1.99-1
cdb3c35
- Initial packaging