-
Notifications
You must be signed in to change notification settings - Fork 177
/
calamari.suse.spec
115 lines (101 loc) · 3.42 KB
/
calamari.suse.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#
# spec file for package calamari
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: calamari
Summary: Manage and monitor Ceph with a REST API
License: LGPL-2.1+
Group: System/Filesystems
Version: 1.3+git.1456408184.9f2ca76
Release: 0
Url: http://ceph.com/
Source0: %{name}-%{version}.tar.gz
# Don't allow installation alongside "big" calamari
Conflicts: calamari-server
# Force no database usage
Conflicts: python-SQLAlchemy
Conflicts: python-alembic
Requires: logrotate
Requires: python-dateutil
Requires: python-django
Requires: python-djangorestframework
Requires: python-gevent >= 1.0
Requires: python-pytz
Requires: python-setuptools
Requires: python-zerorpc
%{?systemd_requires}
BuildRequires: fdupes
BuildRequires: python-devel
BuildRequires: systemd
# For lsb_release binary
BuildRequires: lsb-release
BuildRequires: python-setuptools
# For /etc/*release files
%if 0%{?suse_version} == 1315 && (! 0%{?is_opensuse})
BuildRequires: sles-release
%else
BuildRequires: suse-release
%endif
BuildArch: noarch
%description
Calamari is a REST API for monitoring and controlling a Ceph cluster.
It is intended to be used by other frontent GUIs.
This calamari package is to be installed and run directly on Ceph MONs,
as opposed to previous versions which were packaged as calamari-server
and run on a separate host, using salt to talk to the cluster.
%prep
%setup -q
%build
echo "VERSION =\"%{version}\"" > rest-api/calamari_rest/version.py
%install
make DESTDIR=%{buildroot} install-lsb
mkdir -p %{buildroot}%{_sbindir}
ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rccalamari
%fdupes %{buildroot}%{python_sitelib}
%files
%defattr(-,root,root,-)
%doc COPYING*
%exclude /opt/calamari
%exclude %{_bindir}/calamari-ctl
%exclude %{_bindir}/cthulhu-manager
%exclude %{_sysconfdir}/calamari/alembic.ini
%exclude %{_sysconfdir}/graphite
%exclude %{_sysconfdir}/salt
%exclude %{_sysconfdir}/supervisor
%{python_sitelib}/calamari_*
%{python_sitelib}/cthulhu*
%{_bindir}/calamari-lite
%{_unitdir}/calamari.service
%{_sbindir}/rccalamari
%dir %{_sysconfdir}/calamari
%config(noreplace) %{_sysconfdir}/calamari/calamari.conf
%attr (644,-,-) %config(noreplace) %{_sysconfdir}/logrotate.d/calamari
%dir %{_localstatedir}/log/calamari
%pre
%service_add_pre calamari.service
%post
%service_add_post calamari.service
if [ ! -e /etc/calamari/secret.key ] ; then
# This is the same set of characters and whatnot as django's
# default secret key generation.
cat /dev/urandom | \
tr -dc 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(_=+)-' | \
head -c 50 > /etc/calamari/secret.key
chmod 600 /etc/calamari/secret.key
fi
%preun
%service_del_preun calamari.service
%postun
%service_del_postun calamari.service
%changelog