-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathceph-iscsi-cli.spec
89 lines (73 loc) · 2.92 KB
/
ceph-iscsi-cli.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#
# spec file for package ceph-iscsi-cli
#
# Copyright (C) 2017-2018 The Ceph iSCSI CLI Project Developers. See
# COPYING file at the top-level directory of this distribution and at
# https://github.com/ceph-iscsi-cli/ceph/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/
#
Name: ceph-iscsi-cli
Version: 2.8
Release: 1%{?dist}
Summary: CLI configuration tool to manage multiple iSCSI gateways
Group: System/Filesystems
License: GPL-3.0-or-later
URL: https://github.com/ceph/ceph-iscsi-cli
Source0: https://github.com/ceph/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: systemd
Requires: python-rtslib >= 2.1.fb67
Requires: ceph-iscsi-config >= 2.6
Requires: python-requests >= 2.6
Requires: python-configshell >= 1.1
Requires: python-flask >= 0.10.1
Requires: pyOpenSSL >= 0.13
%description
This package provides a CLI interface similar to the targetcli tool used to
interact with the kernel LIO subsystem. The rpm installs two components; a CLI
shell (based on configshell) and an API service called rbd-target-api.
The CLI orchestrates iscsi configuration changes through the API service
running on EACH gateway node. The API service uses the same configuration
settings file '/etc/ceph/iscsi-gateway.cfg' as the rbd-target-gw service.
You should ensure that the 'cfg' file is consistent across gateways for
predictable behaviour.
%prep
%setup -q
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%install
%{__python} setup.py install --skip-build --root %{buildroot} --install-scripts %{_bindir}
mkdir -p %{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
mkdir -p %{buildroot}%{_sysconfdir}/systemd/system/rbd-target-gw.service.d
install -m 0644 .%{_sysconfdir}/systemd/system/rbd-target-gw.service.d/dependencies.conf %{buildroot}%{_sysconfdir}/systemd/system/rbd-target-gw.service.d/
%post
/bin/systemctl --system daemon-reload &> /dev/null || :
/bin/systemctl --system enable rbd-target-api &> /dev/null || :
%postun
/bin/systemctl --system daemon-reload &> /dev/null || :
%files
%doc README
%license LICENSE
%license COPYING
%{_bindir}/gwcli
%{_bindir}/rbd-target-api
%{_unitdir}/rbd-target-api.service
%{_sysconfdir}/systemd/system/rbd-target-gw.service.d
%{python2_sitelib}/*
%{_mandir}/man8/gwcli.8.gz
%attr(0770,root,root) %dir %{_localstatedir}/log/rbd-target-api
%changelog