remove "%bcond_with python3" from spec file to resolve local rpmbuild failure issue
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
This commit is contained in:
parent
905b7ddfab
commit
3e6d34e636
@ -1,10 +1,8 @@
|
|||||||
%bcond_with python3
|
|
||||||
|
|
||||||
%global oname rtslib-fb
|
%global oname rtslib-fb
|
||||||
|
|
||||||
Name: python-rtslib
|
Name: python-rtslib
|
||||||
Version: 2.1.70
|
Version: 2.1.70
|
||||||
Release: 7
|
Release: 8
|
||||||
Summary: Python object API for Linux kernel LIO SCSI target
|
Summary: Python object API for Linux kernel LIO SCSI target
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
@ -28,7 +26,6 @@ Obsoletes: python-rtslib-doc
|
|||||||
which includes the 'target' service and targetctl tool for restoring
|
which includes the 'target' service and targetctl tool for restoring
|
||||||
configuration.
|
configuration.
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%package -n python3-rtslib
|
%package -n python3-rtslib
|
||||||
Summary: Python3 object API for Linux kernel LIO SCSI target
|
Summary: Python3 object API for Linux kernel LIO SCSI target
|
||||||
BuildRequires: python3-devel, python3-setuptools
|
BuildRequires: python3-devel, python3-setuptools
|
||||||
@ -39,13 +36,10 @@ Requires: python3-kmod, python3-six, python3-pyudev
|
|||||||
python3-rtslib is a python object API for generic Linux SCSI kernel
|
python3-rtslib is a python object API for generic Linux SCSI kernel
|
||||||
target which includes the 'target' service and targetctl tool for
|
target which includes the 'target' service and targetctl tool for
|
||||||
restoring configuration.
|
restoring configuration.
|
||||||
%endif
|
|
||||||
|
|
||||||
%package -n target-restore
|
%package -n target-restore
|
||||||
Summary: Systemd service for targetcli/rtslib
|
Summary: Systemd service for targetcli/rtslib
|
||||||
%if %{with python3}
|
|
||||||
Requires: python3-rtslib = %{version}-%{release}
|
Requires: python3-rtslib = %{version}-%{release}
|
||||||
%endif
|
|
||||||
|
|
||||||
%description -n target-restore
|
%description -n target-restore
|
||||||
Systemd service to restore the LIO kernel target settings on system
|
Systemd service to restore the LIO kernel target settings on system
|
||||||
@ -56,27 +50,21 @@ restart.
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -n %{oname}-%{version} -p1
|
%autosetup -n %{oname}-%{version} -p1
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
rm -rf %{py3dir}
|
rm -rf %{py3dir}
|
||||||
cp -a . %{py3dir}
|
cp -a . %{py3dir}
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
gzip --stdout doc/targetctl.8 > doc/targetctl.8.gz
|
gzip --stdout doc/targetctl.8 > doc/targetctl.8.gz
|
||||||
gzip --stdout doc/saveconfig.json.5 > doc/saveconfig.json.5.gz
|
gzip --stdout doc/saveconfig.json.5 > doc/saveconfig.json.5.gz
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
%py3_build
|
%py3_build
|
||||||
popd
|
popd
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with python3}
|
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
%py3_install
|
%py3_install
|
||||||
popd
|
popd
|
||||||
%endif
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_mandir}/man8/
|
mkdir -p %{buildroot}%{_mandir}/man8/
|
||||||
mkdir -p %{buildroot}%{_mandir}/man5/
|
mkdir -p %{buildroot}%{_mandir}/man5/
|
||||||
@ -97,12 +85,10 @@ install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/
|
|||||||
%postun -n target-restore
|
%postun -n target-restore
|
||||||
%systemd_postun_with_restart target.service
|
%systemd_postun_with_restart target.service
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%files -n python3-rtslib
|
%files -n python3-rtslib
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n target-restore
|
%files -n target-restore
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -121,6 +107,9 @@ install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/
|
|||||||
%{_mandir}/man5/saveconfig.json.5.gz
|
%{_mandir}/man5/saveconfig.json.5.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 6 2021 zhanchengbin <zhanchengbin1@huawei.com> - 2.1.70-8
|
||||||
|
- remove "%bcond_with python3" from spec file to resolve local rpmbuild failure issue
|
||||||
|
|
||||||
* Mon Nov 2 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 2.1.70-7
|
* Mon Nov 2 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 2.1.70-7
|
||||||
- backport upstream patch to solve one problem
|
- backport upstream patch to solve one problem
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user