forked from pool/python-rtslib-fb
Accepting request 846965 from home:lee_duncan:branches:devel:languages:python
- Fixed issue in SPEC file w/r/t package split with common. Now, packages python3-rtslib-fb and python-rtslib-fb-common are built, and the former depends on the latter. The common package has the non-python parts (documentation, etc), and the python3-* part the python parts. OBS-URL: https://build.opensuse.org/request/show/846965 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rtslib-fb?expand=0&rev=58
This commit is contained in:
committed by
Git OBS Bridge
parent
2ba1fb7494
commit
dcfd9cf84b
@@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Nov 7 18:05:32 UTC 2020 - Lee Duncan <lduncan@suse.com>
|
||||||
|
|
||||||
|
- Fixed issue in SPEC file w/r/t package split with common.
|
||||||
|
Now, packages python3-rtslib-fb and python-rtslib-fb-common
|
||||||
|
are built, and the former depends on the latter. The common
|
||||||
|
package has the non-python parts (documentation, etc),
|
||||||
|
and the python3-* part the python parts.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Oct 23 18:20:23 UTC 2020 - Lee Duncan <lduncan@suse.com>
|
Fri Oct 23 18:20:23 UTC 2020 - Lee Duncan <lduncan@suse.com>
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ Summary: API for Linux kernel SCSI target (aka LIO)
|
|||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/open-iscsi/rtslib-fb.git
|
URL: https://github.com/open-iscsi/rtslib-fb.git
|
||||||
Source: %{name}-v%{version}.tar.xz
|
Source: python-rtslib-fb-v%{version}.tar.xz
|
||||||
Patch1: rbd-support.patch
|
Patch1: rbd-support.patch
|
||||||
Patch2: rtslib-Fix-handling-of-sysfs-RW-attrs-that-are-actually-RO.patch
|
Patch2: rtslib-Fix-handling-of-sysfs-RW-attrs-that-are-actually-RO.patch
|
||||||
Patch3: rtslib-target-service-for-suse.patch
|
Patch3: rtslib-target-service-for-suse.patch
|
||||||
@@ -34,8 +34,10 @@ BuildRequires: %{python_module setuptools}
|
|||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module six}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: %{name}-common
|
|
||||||
Requires: python-pyudev
|
Requires: python-pyudev
|
||||||
|
%define oldpython python
|
||||||
|
%define cpkg %{oldpython}-rtslib-fb-common
|
||||||
|
Requires: %{cpkg}
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
Provides: python-rtslib = %{version}-%{release}
|
Provides: python-rtslib = %{version}-%{release}
|
||||||
@@ -46,6 +48,7 @@ Provides: python-rtslib-rbd = %{version}
|
|||||||
Obsoletes: python-rtslib-rbd < %{version}
|
Obsoletes: python-rtslib-rbd < %{version}
|
||||||
%endif
|
%endif
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -53,17 +56,17 @@ rtslib-fb is an object-based Python library for configuring the LIO generic
|
|||||||
SCSI target, present in 3.x Linux kernel versions. rtslib-fb is licensed under
|
SCSI target, present in 3.x Linux kernel versions. rtslib-fb is licensed under
|
||||||
the Apache 2.0 license. Contributions are welcome
|
the Apache 2.0 license. Contributions are welcome
|
||||||
|
|
||||||
%package -n %{name}-common
|
%package -n %{cpkg}
|
||||||
Summary: Common python-rtslib-fb subpackage for Python 2 or 3
|
Summary: Common python-rtslib-fb subpackage for Python 2 or 3
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Provides: %{python_module python-rtslib-fb-common}
|
Obsoletes: %{name} < %{version}-%{release}
|
||||||
|
|
||||||
%description -n %{name}-common
|
%description -n %{cpkg}
|
||||||
python-rtslib-fb-common is the invariant base package needed by both
|
python-rtslib-fb-common is the invariant base package needed by both
|
||||||
python2-rtslib-fb and python3-rtslib-fb.
|
python2-rtslib-fb and python3-rtslib-fb.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-v%{version}
|
%setup -q -n python-rtslib-fb-v%{version}
|
||||||
%if 0%{?sle_version} >= 150000
|
%if 0%{?sle_version} >= 150000
|
||||||
# RBD support is dependent on LIO changes present in the SLE/Leap kernel
|
# RBD support is dependent on LIO changes present in the SLE/Leap kernel
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
@@ -105,23 +108,23 @@ ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rctarget
|
|||||||
%{stop_on_removal target}
|
%{stop_on_removal target}
|
||||||
%{service_del_preun target.service}
|
%{service_del_preun target.service}
|
||||||
|
|
||||||
%post -n %{name}-common
|
%post -n %{cpkg}
|
||||||
%{service_add_post target.service}
|
%{service_add_post target.service}
|
||||||
|
|
||||||
%postun -n %{name}-common
|
%postun -n %{cpkg}
|
||||||
%{service_del_postun target.service}
|
%{service_del_postun target.service}
|
||||||
|
|
||||||
%pre -n %{name}-common
|
%pre -n %{cpkg}
|
||||||
%{service_add_pre target.service}
|
%{service_add_pre target.service}
|
||||||
|
|
||||||
%preun -n %{name}-common
|
%preun -n %{cpkg}
|
||||||
%{service_del_preun target.service}
|
%{service_del_preun target.service}
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%python_alternative %{_bindir}/targetctl
|
%python_alternative %{_bindir}/targetctl
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%files -n %{name}-common
|
%files -n %{cpkg}
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%dir %{dbdir}
|
%dir %{dbdir}
|
||||||
|
Reference in New Issue
Block a user