Accepting request 920167 from devel:languages:python
revert OBS-URL: https://build.opensuse.org/request/show/920167 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rtslib-fb?expand=0&rev=61
This commit is contained in:
parent
f82845f897
commit
99db447357
@ -1,8 +1,3 @@
|
|||||||
-------------------------------------------------------------------
|
|
||||||
Tue Aug 24 07:35:46 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
|
||||||
|
|
||||||
- Use libalternatives instead of update-alternatives.
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Nov 7 18:05:32 UTC 2020 - Lee Duncan <lduncan@suse.com>
|
Sat Nov 7 18:05:32 UTC 2020 - Lee Duncan <lduncan@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-rtslib-fb
|
# spec file for package python-rtslib-fb
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,12 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?suse_version} > 1500
|
|
||||||
%bcond_without libalternatives
|
|
||||||
%else
|
|
||||||
%bcond_with libalternatives
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%define dbdir %{_sysconfdir}/target
|
%define dbdir %{_sysconfdir}/target
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-rtslib-fb
|
Name: python-rtslib-fb
|
||||||
@ -44,12 +38,8 @@ Requires: python-pyudev
|
|||||||
%define oldpython python
|
%define oldpython python
|
||||||
%define cpkg %{oldpython}-rtslib-fb-common
|
%define cpkg %{oldpython}-rtslib-fb-common
|
||||||
Requires: %{cpkg}
|
Requires: %{cpkg}
|
||||||
%if %{with libalternatives}
|
|
||||||
Requires: alts
|
|
||||||
%else
|
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
%endif
|
|
||||||
Provides: python-rtslib = %{version}-%{release}
|
Provides: python-rtslib = %{version}-%{release}
|
||||||
Obsoletes: python-rtslib < %{version}
|
Obsoletes: python-rtslib < %{version}
|
||||||
%if 0%{?sle_version} >= 150000
|
%if 0%{?sle_version} >= 150000
|
||||||
@ -89,14 +79,7 @@ python2-rtslib-fb and python3-rtslib-fb.
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
%if ! %{with libalternatives}
|
%python_clone -a %{buildroot}/%{_bindir}/targetctl
|
||||||
%python_clone -a %{buildroot}/%{_bindir}/targetctl
|
|
||||||
%else
|
|
||||||
%python_clone %{buildroot}%{_bindir}/targetctl
|
|
||||||
ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/targetctl
|
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/targetctl
|
|
||||||
%python_expand echo "binary=%{_bindir}/targetctl-%{$python_version}" > %{buildroot}%{_datadir}/libalternatives/targetctl/10%{$python_version_nodots}.conf
|
|
||||||
%endif
|
|
||||||
%fdupes %{buildroot}
|
%fdupes %{buildroot}
|
||||||
install -d -m755 %{buildroot}%{_mandir}/man5
|
install -d -m755 %{buildroot}%{_mandir}/man5
|
||||||
install -m644 doc/saveconfig.json.5 %{buildroot}%{_mandir}/man5
|
install -m644 doc/saveconfig.json.5 %{buildroot}%{_mandir}/man5
|
||||||
@ -111,25 +94,15 @@ install -d -m755 %{buildroot}%{_sbindir}
|
|||||||
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rctarget
|
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rctarget
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if ! %{with libalternatives}
|
|
||||||
%python_install_alternative targetctl
|
%python_install_alternative targetctl
|
||||||
%endif
|
|
||||||
%{service_add_post target.service}
|
%{service_add_post target.service}
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%if ! %{with libalternatives}
|
|
||||||
%python_uninstall_alternative targetctl
|
%python_uninstall_alternative targetctl
|
||||||
%endif
|
|
||||||
%{service_del_postun target.service}
|
%{service_del_postun target.service}
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%{service_add_pre target.service}
|
%{service_add_pre target.service}
|
||||||
%if %{with libalternatives}
|
|
||||||
# removing old update-alternatives entries
|
|
||||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
|
||||||
%python_uninstall_alternative targetctl
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%{stop_on_removal target}
|
%{stop_on_removal target}
|
||||||
@ -148,15 +121,7 @@ fi
|
|||||||
%{service_del_preun target.service}
|
%{service_del_preun target.service}
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%if ! 0%{with libalternatives}
|
|
||||||
%python_alternative %{_bindir}/targetctl
|
%python_alternative %{_bindir}/targetctl
|
||||||
%else
|
|
||||||
%dir %{_datadir}/libalternatives
|
|
||||||
%dir %{_datadir}/libalternatives/targetctl
|
|
||||||
%{_datadir}/libalternatives/targetctl/10%python_version_nodots.conf
|
|
||||||
%{_bindir}/targetctl
|
|
||||||
%{_bindir}/targetctl-%python_version
|
|
||||||
%endif
|
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%files -n %{cpkg}
|
%files -n %{cpkg}
|
||||||
|
Loading…
Reference in New Issue
Block a user