From ba2b94e45c7b99f51f3b4daa9edc43d69c1a797e Mon Sep 17 00:00:00 2001 From: s17723959267 Date: Fri, 11 Sep 2020 15:10:47 +0800 Subject: [PATCH] Remove python2 require --- python-rtslib.spec | 46 ++++------------------------------------------ 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/python-rtslib.spec b/python-rtslib.spec index 5c092cc..9dac389 100644 --- a/python-rtslib.spec +++ b/python-rtslib.spec @@ -1,11 +1,9 @@ -%bcond_without python2 %bcond_with python3 - %global oname rtslib-fb Name: python-rtslib Version: 2.1.70 -Release: 5 +Release: 6 Summary: Python object API for Linux kernel LIO SCSI target License: ASL 2.0 @@ -28,19 +26,6 @@ Obsoletes: python-rtslib-doc which includes the 'target' service and targetctl tool for restoring configuration. -%if %{with python2} -%package -n python2-rtslib -Summary: Python2 object API for Linux kernel LIO SCSI target -BuildRequires: python2-devel, python2-setuptools -Requires: python2-kmod, python2-six, python2-pyudev -%{?python_provide:%python_provide python2-rtslib} - -%description -n python2-rtslib -python2-rtslib is a python object API for generic Linux SCSI kernel -target which includes the 'target' service and targetctl tool for -restoring configuration. -%endif - %if %{with python3} %package -n python3-rtslib Summary: Python3 object API for Linux kernel LIO SCSI target @@ -58,8 +43,6 @@ restoring configuration. Summary: Systemd service for targetcli/rtslib %if %{with python3} Requires: python3-rtslib = %{version}-%{release} -%else -Requires: python2-rtslib = %{version}-%{release} %endif %description -n target-restore @@ -77,12 +60,6 @@ cp -a . %{py3dir} %endif %build -%if %{with python2} -%py2_build -mkdir -p doc/html -epydoc --no-sourcecode --html -n rtslib -o doc/html rtslib/*.py -%endif - gzip --stdout doc/targetctl.8 > doc/targetctl.8.gz gzip --stdout doc/saveconfig.json.5 > doc/saveconfig.json.5.gz @@ -97,14 +74,6 @@ popd pushd %{py3dir} %py3_install popd -%if %{with python2} -%{__python2} setup.py install --skip-build --root %{buildroot} --install-scripts py2scripts -rm -rf %{buildroot}/py2scripts -%endif -%else -%if %{with python2} -%py2_install -%endif %endif mkdir -p %{buildroot}%{_mandir}/man8/ @@ -126,13 +95,6 @@ install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/ %postun -n target-restore %systemd_postun_with_restart target.service -%if %{with python2} -%files -n python2-rtslib -%defattr(-,root,root) -%license COPYING -%{python2_sitelib}/* -%endif - %if %{with python3} %files -n python3-rtslib %defattr(-,root,root) @@ -152,14 +114,14 @@ install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/ %files help %defattr(-,root,root) -%if %{with python2} -%doc doc/html -%endif %doc README.md doc/getting_started.md %{_mandir}/man8/targetctl.8.gz %{_mandir}/man5/saveconfig.json.5.gz %changelog +* Fri Sep 11 2020 wenzhanli - 2.1.70-6 +- Remove python2 require + * Fri Jul 17 2020 Ruijun Ge - 2.1.70-5 - fix CVE-2020-14019 -- Gitee