2018-11-15 10:30:18 +01:00
|
|
|
#
|
|
|
|
# spec file for package ceph-iscsi
|
|
|
|
#
|
|
|
|
# Copyright (C) 2017-2018 The Ceph iSCSI Project Developers. See
|
|
|
|
# COPYING file at the top-level directory of this distribution and at
|
|
|
|
# https://github.com/ceph/ceph-iscsi/blob/master/COPYING
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon.
|
|
|
|
#
|
|
|
|
# This file is under the GNU General Public License, version 3 or any
|
|
|
|
# later version.
|
|
|
|
#
|
|
|
|
# Please submit bugfixes or comments via http://tracker.ceph.com/
|
|
|
|
#
|
2019-02-28 14:44:21 +01:00
|
|
|
%if 0%{?rhel} == 7
|
|
|
|
%global with_python2 1
|
2018-11-15 10:30:18 +01:00
|
|
|
%endif
|
|
|
|
|
2019-02-28 14:44:21 +01:00
|
|
|
|
2018-11-15 10:30:18 +01:00
|
|
|
Name: ceph-iscsi
|
2019-05-21 15:07:14 +02:00
|
|
|
Version: 3.0+1558443949.g9784103
|
2018-11-15 10:30:18 +01:00
|
|
|
Release: 1%{?dist}
|
|
|
|
Group: System/Filesystems
|
|
|
|
Summary: Python modules for Ceph iSCSI gateway configuration management
|
2019-02-28 14:44:21 +01:00
|
|
|
%if 0%{?suse_version}
|
2018-11-15 10:30:18 +01:00
|
|
|
License: GPL-3.0-or-later
|
2019-02-28 14:44:21 +01:00
|
|
|
%else
|
|
|
|
License: GPLv3+
|
|
|
|
%endif
|
2018-11-15 10:30:18 +01:00
|
|
|
URL: https://github.com/ceph/ceph-iscsi
|
2019-02-28 14:32:18 +01:00
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
Source98: checkin.sh
|
|
|
|
Source99: README-checkin.txt
|
|
|
|
%endif
|
2018-11-15 10:30:18 +01:00
|
|
|
|
2019-02-28 14:44:21 +01:00
|
|
|
BuildArch: noarch
|
2018-11-15 10:30:18 +01:00
|
|
|
|
2019-02-28 14:44:21 +01:00
|
|
|
Obsoletes: ceph-iscsi-config
|
|
|
|
Obsoletes: ceph-iscsi-cli
|
2019-02-28 14:32:18 +01:00
|
|
|
|
2019-02-28 14:44:21 +01:00
|
|
|
%if 0%{?with_python2}
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
Requires: python-rados >= 10.2.2
|
|
|
|
Requires: python-rbd >= 10.2.2
|
|
|
|
Requires: python-netifaces >= 0.10.4
|
|
|
|
Requires: python-rtslib >= 2.1.fb67
|
|
|
|
Requires: rpm-python >= 4.11
|
|
|
|
Requires: python-cryptography
|
|
|
|
Requires: python-flask >= 0.10.1
|
2019-03-15 11:17:07 +01:00
|
|
|
Requires: python-configshell
|
2019-02-28 14:44:21 +01:00
|
|
|
%else
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
2018-11-15 10:30:18 +01:00
|
|
|
Requires: python3-rados >= 10.2.2
|
|
|
|
Requires: python3-rbd >= 10.2.2
|
|
|
|
Requires: python3-netifaces >= 0.10.4
|
|
|
|
Requires: python3-rtslib >= 2.1.fb67
|
2019-02-28 14:32:18 +01:00
|
|
|
Requires: python3-cryptography
|
2019-02-28 14:44:21 +01:00
|
|
|
Requires: python3-rpm >= 4.11
|
|
|
|
%if 0%{?suse_version}
|
2018-11-15 10:30:18 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: fdupes
|
2019-02-28 14:44:21 +01:00
|
|
|
Requires: python3-Flask >= 0.10.1
|
2019-03-15 11:17:07 +01:00
|
|
|
Requires: python3-configshell-fb
|
2019-02-28 14:44:21 +01:00
|
|
|
%else
|
|
|
|
Requires: python3-flask >= 0.10.1
|
2019-03-15 11:17:07 +01:00
|
|
|
Requires: python3-configshell
|
2019-02-28 14:44:21 +01:00
|
|
|
%endif
|
2018-11-15 10:30:18 +01:00
|
|
|
%endif
|
|
|
|
|
2019-05-09 12:33:02 +02:00
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
%{?systemd_requires}
|
2018-11-15 10:30:18 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Python package providing the modules used to handle the configuration of an
|
|
|
|
iSCSI gateway, backed by Ceph RBD. The RPM installs configuration management
|
|
|
|
logic (ceph_iscsi_config modules), an rbd-target-gw systemd service, and
|
|
|
|
a CLI-based management tool 'gwcli', replacing the 'targetcli' tool.
|
|
|
|
|
|
|
|
The configuration management modules may be are consumed by custom Ansible
|
|
|
|
playbooks and the rbd-target-gw daemon.
|
|
|
|
|
|
|
|
The rbd-target-gw service is responsible for startup and shutdown actions,
|
|
|
|
replacing the 'target' service used in standalone LIO implementations.
|
|
|
|
In addition, rbd-target-gw also provides a REST API utilized by the Ceph
|
|
|
|
dashboard and gwcli tool, and a prometheus exporter for gateway LIO
|
|
|
|
performance statistics, supporting monitoring and visualisation tools like
|
|
|
|
Grafana.
|
|
|
|
|
|
|
|
%prep
|
2019-02-28 14:44:21 +01:00
|
|
|
%autosetup -p1
|
2018-11-15 10:30:18 +01:00
|
|
|
|
|
|
|
%build
|
2019-02-28 14:44:21 +01:00
|
|
|
%if 0%{?with_python2}
|
2018-11-15 10:30:18 +01:00
|
|
|
%{__python2} setup.py build
|
2019-02-28 14:44:21 +01:00
|
|
|
%else
|
2018-11-15 10:30:18 +01:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
%python3_build
|
2019-02-28 14:44:21 +01:00
|
|
|
%else
|
|
|
|
%{py3_build}
|
|
|
|
%endif
|
2018-11-15 10:30:18 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
2019-02-28 14:44:21 +01:00
|
|
|
%if 0%{?with_python2}
|
2018-11-15 10:30:18 +01:00
|
|
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot} --install-scripts %{_bindir}
|
2019-02-28 14:44:21 +01:00
|
|
|
%else
|
2018-11-15 10:30:18 +01:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
%python3_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2019-02-28 14:44:21 +01:00
|
|
|
%else
|
|
|
|
%{py3_install}
|
|
|
|
%endif
|
2018-11-15 10:30:18 +01:00
|
|
|
%endif
|
|
|
|
mkdir -p %{buildroot}%{_unitdir}
|
|
|
|
install -m 0644 .%{_unitdir}/rbd-target-gw.service %{buildroot}%{_unitdir}
|
|
|
|
install -m 0644 .%{_unitdir}/rbd-target-api.service %{buildroot}%{_unitdir}
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/man8
|
|
|
|
install -m 0644 gwcli.8 %{buildroot}%{_mandir}/man8/
|
|
|
|
gzip %{buildroot}%{_mandir}/man8/gwcli.8
|
2019-02-28 14:44:21 +01:00
|
|
|
mkdir -p %{buildroot}%{_unitdir}/rbd-target-gw.service.d
|
|
|
|
install -m 0644 .%{_sysconfdir}/systemd/system/rbd-target-gw.service.d/dependencies.conf %{buildroot}%{_unitdir}/rbd-target-gw.service.d/
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
mkdir -p %{buildroot}%{_sbindir}
|
|
|
|
ln -s service %{buildroot}%{_sbindir}/rcrbd-target-gw
|
|
|
|
ln -s service %{buildroot}%{_sbindir}/rcrbd-target-api
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%service_add_pre rbd-target-gw.service rbd-target-api.service
|
|
|
|
%endif
|
2018-11-15 10:30:18 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
2019-05-09 12:33:02 +02:00
|
|
|
%systemd_post rbd-target-gw.service
|
|
|
|
%systemd_post rbd-target-api.service
|
2018-11-15 10:30:18 +01:00
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version}
|
2018-11-16 01:37:50 +01:00
|
|
|
%service_add_post rbd-target-gw.service rbd-target-api.service
|
2018-11-15 10:30:18 +01:00
|
|
|
%endif
|
|
|
|
|
2019-02-28 14:44:21 +01:00
|
|
|
%preun
|
2019-05-09 12:33:02 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
|
|
|
%systemd_preun rbd-target-gw.service
|
|
|
|
%systemd_preun rbd-target-api.service
|
|
|
|
%endif
|
2018-11-15 10:30:18 +01:00
|
|
|
%if 0%{?suse_version}
|
2019-02-28 14:44:21 +01:00
|
|
|
%service_del_preun rbd-target-gw.service rbd-target-api.service
|
2018-11-15 10:30:18 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
2019-05-09 12:33:02 +02:00
|
|
|
%systemd_postun rbd-target-gw.service
|
|
|
|
%systemd_postun rbd-target-api.service
|
2018-11-15 10:30:18 +01:00
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version}
|
2018-11-16 01:37:50 +01:00
|
|
|
%service_del_postun rbd-target-gw.service rbd-target-api.service
|
2018-11-15 10:30:18 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
2019-02-28 14:44:21 +01:00
|
|
|
%files
|
2018-11-15 10:30:18 +01:00
|
|
|
%license LICENSE
|
|
|
|
%license COPYING
|
|
|
|
%doc README
|
|
|
|
%doc iscsi-gateway.cfg_sample
|
2019-02-28 14:44:21 +01:00
|
|
|
%if 0%{?with_python2}
|
2018-11-15 10:30:18 +01:00
|
|
|
%{python2_sitelib}/*
|
2019-02-28 14:44:21 +01:00
|
|
|
%else
|
2018-11-15 10:30:18 +01:00
|
|
|
%{python3_sitelib}/*
|
|
|
|
%endif
|
|
|
|
%{_bindir}/gwcli
|
|
|
|
%{_bindir}/rbd-target-gw
|
|
|
|
%{_bindir}/rbd-target-api
|
|
|
|
%{_unitdir}/rbd-target-gw.service
|
|
|
|
%{_unitdir}/rbd-target-api.service
|
|
|
|
%{_mandir}/man8/gwcli.8.gz
|
2018-12-07 16:54:39 +01:00
|
|
|
%attr(0770,root,root) %dir %{_localstatedir}/log/rbd-target-gw
|
|
|
|
%attr(0770,root,root) %dir %{_localstatedir}/log/rbd-target-api
|
2019-02-28 14:44:21 +01:00
|
|
|
%dir %{_unitdir}/rbd-target-gw.service.d
|
|
|
|
%{_unitdir}/rbd-target-gw.service.d/dependencies.conf
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%{_sbindir}/rcrbd-target-gw
|
|
|
|
%{_sbindir}/rcrbd-target-api
|
|
|
|
%endif
|
2018-11-15 10:30:18 +01:00
|
|
|
|
|
|
|
%changelog
|
|
|
|
|