2016-04-26 16:17:33 +02:00
|
|
|
#
|
|
|
|
# spec file for package targetcli-fb
|
|
|
|
#
|
2019-02-07 18:46:11 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-04-26 16:17:33 +02: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-05-21 12:08:17 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-04-26 16:17:33 +02:00
|
|
|
#
|
|
|
|
|
2016-07-27 22:47:33 +02:00
|
|
|
|
2018-01-09 23:18:46 +01:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2018-04-16 22:19:01 +02:00
|
|
|
Name: targetcli-fb
|
2018-10-19 02:45:23 +02:00
|
|
|
Version: 2.1.49
|
2016-11-02 00:17:15 +01:00
|
|
|
Release: 0
|
2016-07-27 22:47:33 +02:00
|
|
|
Summary: A command shell for managing the Linux LIO kernel target
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: System/Management
|
2019-02-07 18:46:11 +01:00
|
|
|
Url: https://github.com/open-iscsi/%{name}
|
2018-04-16 22:19:01 +02:00
|
|
|
Source: %{name}-%{version}.tar.xz
|
|
|
|
Source1: %{name}.service
|
2018-01-09 23:18:46 +01:00
|
|
|
BuildRequires: %{python_module configshell-fb}
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module pyparsing}
|
|
|
|
BuildRequires: %{python_module rtslib-fb}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: systemd
|
2016-07-27 22:47:33 +02:00
|
|
|
Requires: python-configshell-fb
|
2018-01-09 23:18:46 +01:00
|
|
|
Requires: python-dbus-python
|
2016-07-27 22:47:33 +02:00
|
|
|
Requires: python-rtslib-fb
|
|
|
|
Requires: python-six
|
2018-01-09 23:18:46 +01:00
|
|
|
Requires: targetcli-fb-common
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
%ifpython3
|
2018-02-25 21:08:25 +01:00
|
|
|
Provides: targetcli = %{version}-%{release}
|
2018-04-16 22:19:01 +02:00
|
|
|
Provides: targetcli-fb = %{version}-%{release}
|
2018-01-09 23:18:46 +01:00
|
|
|
%endif
|
2018-02-25 21:08:25 +01:00
|
|
|
Obsoletes: targetcli
|
2018-04-16 22:19:01 +02:00
|
|
|
Obsoletes: targetcli-fb
|
2016-07-27 22:47:33 +02:00
|
|
|
BuildArch: noarch
|
2018-12-07 15:59:19 +01:00
|
|
|
%if 0%{?sle_version} >= 150000
|
2018-04-16 22:19:01 +02:00
|
|
|
# explicit Provides advertising RBD support
|
|
|
|
Provides: targetcli-rbd = %{version}
|
|
|
|
Obsoletes: targetcli-rbd < %{version}
|
|
|
|
%endif
|
2016-04-26 16:17:33 +02:00
|
|
|
%{?systemd_requires}
|
2018-10-19 02:45:23 +02:00
|
|
|
Patch1: Split-out-blockdev-readonly-state-detection-helper.patch
|
|
|
|
Patch2: rbd-support.patch
|
2019-08-19 17:35:35 +02:00
|
|
|
Patch3: saveconfig-compress-the-backup-config-files
|
|
|
|
Patch4: targetcli-fb-fix-raise-exception-error-in-save_backups
|
|
|
|
Patch5: Add-emulate_pr-backstore-attribute.patch
|
|
|
|
Patch6: do-not-remove-the-first-digit-when-auto-completing-the-tpg-tag
|
|
|
|
Patch7: iscsi-discovery_auth-enable-is-a-number-not-a-string
|
2018-01-09 23:18:46 +01:00
|
|
|
|
|
|
|
%python_subpackages
|
2016-04-26 16:17:33 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
targetcli-fb is a command-line interface for configuring the LIO generic
|
|
|
|
SCSI target, present in 3.x Linux kernel versions.
|
|
|
|
|
|
|
|
targetcli-fb is a fork of the "targetcli" code written by RisingTide Systems.
|
|
|
|
The "-fb" differentiates between the original and this version. Please ensure
|
|
|
|
to use either all "fb" versions of the targetcli components -- targetcli,
|
|
|
|
rtslib, and configshell, or stick with all non-fb versions, since they are
|
|
|
|
no longer strictly compatible.
|
|
|
|
|
2018-01-09 23:18:46 +01:00
|
|
|
%package -n %{name}-common
|
|
|
|
Summary: Common targetcli-fb subpackage for either flavor of Python
|
|
|
|
Group: System/Management
|
|
|
|
Provides: %{python_module targetcli-fb-common}
|
|
|
|
|
|
|
|
%description -n %{name}-common
|
|
|
|
targetcli-fb-common is the invariant base package needed by both
|
|
|
|
python2-targetcli-fb and python3-targetcli-fb.
|
|
|
|
|
2016-04-26 16:17:33 +02:00
|
|
|
%prep
|
2018-04-16 22:19:01 +02:00
|
|
|
%setup -q
|
|
|
|
%patch1 -p1
|
2018-12-07 15:59:19 +01:00
|
|
|
%if 0%{?sle_version} >= 150000
|
2018-04-16 22:19:01 +02:00
|
|
|
# RBD support is dependent on LIO changes present in the SLE/Leap kernel
|
2018-10-19 02:45:23 +02:00
|
|
|
%patch2 -p1
|
2018-04-16 22:19:01 +02:00
|
|
|
%endif
|
2019-05-21 12:08:17 +02:00
|
|
|
%patch3 -p1
|
2019-08-19 17:35:35 +02:00
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
|
|
|
%patch7 -p1
|
2016-04-26 16:17:33 +02:00
|
|
|
|
|
|
|
%build
|
2018-01-09 23:18:46 +01:00
|
|
|
%python_build
|
2016-04-26 16:17:33 +02:00
|
|
|
|
|
|
|
%install
|
2018-01-09 23:18:46 +01:00
|
|
|
%python_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/targetcli
|
2016-11-02 00:17:15 +01:00
|
|
|
install -d -m755 %{buildroot}%{_sysconfdir}/target
|
|
|
|
install -d -m755 %{buildroot}%{_sysconfdir}/target/backup
|
|
|
|
install -d -m755 %{buildroot}%{_sbindir}
|
|
|
|
install -D -m644 targetcli.8 %{buildroot}%{_mandir}/man8/targetcli.8
|
2018-01-09 23:18:46 +01:00
|
|
|
install -D -m644 %{SOURCE1} %{buildroot}%{_unitdir}/targetcli.service
|
|
|
|
%fdupes %{buildroot}
|
2016-11-02 00:17:15 +01:00
|
|
|
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rctargetcli
|
2016-04-26 16:17:33 +02:00
|
|
|
|
|
|
|
%post
|
2018-01-09 23:18:46 +01:00
|
|
|
%python_install_alternative targetcli
|
2016-04-26 16:17:33 +02:00
|
|
|
|
|
|
|
%postun
|
2018-01-09 23:18:46 +01:00
|
|
|
%python_uninstall_alternative targetcli
|
2016-04-26 16:17:33 +02:00
|
|
|
|
|
|
|
%pre
|
|
|
|
%{service_add_pre targetcli.service}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%{stop_on_removal targetcli}
|
2018-01-09 23:18:46 +01:00
|
|
|
|
|
|
|
%post -n %{name}-common
|
|
|
|
%{service_add_post targetcli.service}
|
|
|
|
|
|
|
|
%postun -n %{name}-common
|
|
|
|
%{service_del_postun targetcli.service}
|
|
|
|
|
|
|
|
%pre -n %{name}-common
|
|
|
|
%{service_add_pre targetcli.service}
|
|
|
|
|
|
|
|
%preun -n %{name}-common
|
2016-04-26 16:17:33 +02:00
|
|
|
%{service_del_preun targetcli.service}
|
|
|
|
|
2018-01-09 23:18:46 +01:00
|
|
|
%files %{python_files}
|
|
|
|
%python_alternative %{_bindir}/targetcli
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%files -n %{name}-common
|
2016-04-26 16:17:33 +02:00
|
|
|
%doc COPYING README.md THANKS
|
|
|
|
%dir %{_sysconfdir}/target
|
|
|
|
%dir %{_sysconfdir}/target/backup
|
2018-01-09 23:18:46 +01:00
|
|
|
%doc %{_mandir}/man8/targetcli.8%{ext_man}
|
2016-04-26 16:17:33 +02:00
|
|
|
%{_unitdir}/targetcli.service
|
|
|
|
%{_sbindir}/rctargetcli
|
|
|
|
|
|
|
|
%changelog
|