python-rtslib/python-rtslib.spec

112 lines
3.1 KiB
RPMSpec
Raw Permalink Normal View History

2020-01-01 00:11:11 +08:00
%global oname rtslib-fb
2021-01-07 10:54:34 +08:00
Name: python-rtslib
2020-01-01 00:11:11 +08:00
Version: 2.1.70
Release: 5
2020-01-01 00:11:11 +08:00
Summary: Python object API for Linux kernel LIO SCSI target
License: ASL 2.0
2021-01-07 10:54:34 +08:00
URL: https://github.com/open-iscsi/%{oname}
2020-01-01 00:11:11 +08:00
Source0: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz
Patch1: 0001-saveconfig-copy-temp-configfile-with-permissions.patch
Patch2: 0002-saveconfig-open-the-temp-configfile-with-modes-set.patch
Patch3: 0003-save_to_file-fix-fd-open-mode.patch
2021-01-07 10:54:34 +08:00
BuildArch: noarch
BuildRequires: systemd
Requires(post): systemd
Requires(preun): systemd
2020-01-01 00:11:11 +08:00
Requires(postun): systemd
%description
2021-01-07 10:54:34 +08:00
python-rtslib is a python object API for generic Linux SCSI kernel target
2020-01-01 00:11:11 +08:00
which includes the 'target' service and targetctl tool for restoring
configuration.
%package -n python3-rtslib
2021-01-07 10:54:34 +08:00
Summary: Python3 object API for Linux kernel LIO SCSI target
2020-01-01 00:11:11 +08:00
BuildRequires: python3-devel, python3-setuptools
2021-01-07 10:54:34 +08:00
Requires: python3-kmod, python3-six, python3-pyudev
2020-01-01 00:11:11 +08:00
%{?python_provide:%python_provide python3-rtslib}
%description -n python3-rtslib
python3-rtslib is a python object API for generic Linux SCSI kernel
target which includes the 'target' service and targetctl tool for
restoring configuration.
%package -n target-restore
Summary: Systemd service for targetcli/rtslib
Requires: python3-rtslib = %{version}-%{release}
%description -n target-restore
Systemd service to restore the LIO kernel target settings on system
restart.
%package_help
%prep
%autosetup -n %{oname}-%{version} -p1
%build
%py3_build
%install
%py3_install
mkdir -p %{buildroot}%{_mandir}/man8/
mkdir -p %{buildroot}%{_mandir}/man5/
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_sysconfdir}/target/backup
mkdir -p %{buildroot}%{_localstatedir}/target/pr
mkdir -p %{buildroot}%{_localstatedir}/target/alua
2020-01-10 10:57:32 +08:00
install -m 644 systemd/target.service %{buildroot}%{_unitdir}/target.service
2021-01-07 10:54:34 +08:00
install -m 644 doc/targetctl.8 %{buildroot}%{_mandir}/man8/
install -m 644 doc/saveconfig.json.5 %{buildroot}%{_mandir}/man5/
2020-01-01 00:11:11 +08:00
%post -n target-restore
%systemd_post target.service
%preun -n target-restore
%systemd_preun target.service
%postun -n target-restore
%systemd_postun_with_restart target.service
%files -n python3-rtslib
%defattr(-,root,root)
%license COPYING
%{python3_sitelib}/*
%files -n target-restore
%defattr(-,root,root)
%{_bindir}/targetctl
%{_unitdir}/target.service
%dir %{_sysconfdir}/target
%dir %{_sysconfdir}/target/backup
%dir %{_localstatedir}/target
%dir %{_localstatedir}/target/pr
%dir %{_localstatedir}/target/alua
%files help
%defattr(-,root,root)
%doc README.md doc/getting_started.md
2021-01-07 10:54:34 +08:00
%{_mandir}/man8/targetctl.8*
%{_mandir}/man5/saveconfig.json.5*
2020-01-01 00:11:11 +08:00
%changelog
* Mon Jan 25 2020 Wenchao Hao <haowenchao@huawei.com> - 2.1.70-5
- fix CVE-2020-14019
2021-01-07 10:54:34 +08:00
* Thu Jan 07 2021 Lixiaokeng <lixiaokeng@huawei.com> - 2.1.70-4
- python2-kmod is removed and required by python2-rtslib. Remove python2-rtslib.
2020-01-10 10:57:32 +08:00
* Thu Jan 09 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.1.70-3
- re-package for rtslib-fb
* Wed Jan 01 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.1.70-2
2020-01-01 00:11:11 +08:00
- Strenthen spec
* Wed Sep 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.1.70-1
- Package init