2014-01-14 10:00:40 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-rtslib-fb
|
|
|
|
#
|
2020-03-03 18:15:41 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2014-01-14 10:00:40 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-09-17 08:17:54 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-01-14 10:00:40 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-12-11 23:16:48 +01:00
|
|
|
%define dbdir %{_sysconfdir}/target
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2018-04-16 22:19:21 +02:00
|
|
|
Name: python-rtslib-fb
|
2020-06-30 22:52:09 +02:00
|
|
|
Version: 2.1.73
|
2017-04-13 19:32:40 +02:00
|
|
|
Release: 0%{?dist}
|
2014-01-14 10:00:40 +01:00
|
|
|
Summary: API for Linux kernel SCSI target (aka LIO)
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2020-03-03 18:15:41 +01:00
|
|
|
URL: https://github.com/open-iscsi/rtslib-fb.git
|
2019-09-17 08:17:54 +02:00
|
|
|
Source: %{name}-v%{version}.tar.xz
|
2018-04-16 22:19:21 +02:00
|
|
|
Patch1: rbd-support.patch
|
2017-12-11 23:16:48 +01:00
|
|
|
BuildRequires: %{python_module pyudev}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: %{python_module six}
|
2016-04-21 12:30:18 +02:00
|
|
|
BuildRequires: fdupes
|
2017-12-11 23:16:48 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires: python-pyudev
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2018-02-25 21:09:51 +01:00
|
|
|
Provides: python-rtslib = %{version}-%{release}
|
2019-09-17 08:17:54 +02:00
|
|
|
Obsoletes: python-rtslib < %{version}
|
2018-12-07 14:07:22 +01:00
|
|
|
%if 0%{?sle_version} >= 150000
|
2018-04-16 22:19:21 +02:00
|
|
|
# explicit Provides advertising RBD support
|
|
|
|
Provides: python-rtslib-rbd = %{version}
|
|
|
|
Obsoletes: python-rtslib-rbd < %{version}
|
|
|
|
%endif
|
2017-12-11 23:16:48 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
2014-01-14 10:00:40 +01:00
|
|
|
|
|
|
|
%description
|
2017-11-28 09:56:02 +01:00
|
|
|
rtslib-fb is an object-based Python library for configuring the LIO generic
|
2014-01-14 10:00:40 +01:00
|
|
|
SCSI target, present in 3.x Linux kernel versions. rtslib-fb is licensed under
|
|
|
|
the Apache 2.0 license. Contributions are welcome
|
|
|
|
|
|
|
|
%prep
|
2019-09-17 08:17:54 +02:00
|
|
|
%setup -q -n %{name}-v%{version}
|
2018-12-07 14:07:22 +01:00
|
|
|
%if 0%{?sle_version} >= 150000
|
2018-04-16 22:19:21 +02:00
|
|
|
# RBD support is dependent on LIO changes present in the SLE/Leap kernel
|
|
|
|
%patch1 -p1
|
|
|
|
%endif
|
2014-01-14 10:00:40 +01:00
|
|
|
|
|
|
|
%build
|
2017-12-11 23:16:48 +01:00
|
|
|
%python_build
|
2014-01-14 10:00:40 +01:00
|
|
|
|
|
|
|
%install
|
2017-12-11 23:16:48 +01:00
|
|
|
%python_install
|
|
|
|
%python_clone -a %{buildroot}/%{_bindir}/targetctl
|
|
|
|
%fdupes %{buildroot}
|
|
|
|
install -d -m755 %{buildroot}%{_mandir}/man5
|
|
|
|
install -m644 doc/saveconfig.json.5 %{buildroot}%{_mandir}/man5
|
|
|
|
%python_clone -a %{buildroot}%{_mandir}/man5/saveconfig.json.5
|
|
|
|
install -d -m755 %{buildroot}%{_mandir}/man8
|
|
|
|
install -m644 doc/targetctl.8 %{buildroot}%{_mandir}/man8
|
|
|
|
%python_clone -a %{buildroot}%{_mandir}/man8/targetctl.8
|
|
|
|
install -d -m755 %{buildroot}/%{dbdir}
|
|
|
|
install -d -m755 %{buildroot}/%{dbdir}/pr
|
|
|
|
install -d -m755 %{buildroot}/%{dbdir}/alua
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative targetctl targetctl.8 saveconfig.json.5
|
2016-04-21 12:30:18 +02:00
|
|
|
|
2017-12-11 23:16:48 +01:00
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative targetctl
|
2014-01-14 10:00:40 +01:00
|
|
|
|
2017-12-11 23:16:48 +01:00
|
|
|
%files %{python_files}
|
|
|
|
%python_alternative %{_bindir}/targetctl
|
2014-01-14 10:00:40 +01:00
|
|
|
%{python_sitelib}/*
|
2020-03-03 18:15:41 +01:00
|
|
|
%license COPYING
|
|
|
|
%doc README.md
|
2017-12-11 23:16:48 +01:00
|
|
|
%doc %python_alternative %{_mandir}/man5/saveconfig.json.5.gz
|
|
|
|
%doc %python_alternative %{_mandir}/man8/targetctl.8.gz
|
2017-07-04 17:29:24 +02:00
|
|
|
%dir %{dbdir}
|
|
|
|
%dir %{dbdir}/pr
|
|
|
|
%dir %{dbdir}/alua
|
2016-04-21 12:30:18 +02:00
|
|
|
|
2014-01-14 10:00:40 +01:00
|
|
|
%changelog
|