]> git.proxmox.com Git - ceph.git/blame - ceph/ceph.spec
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / ceph.spec
CommitLineData
7c673cae
FG
1# vim: set noexpandtab ts=8 sw=8 :
2#
3# spec file for package ceph
4#
11fdf7f2 5# Copyright (C) 2004-2019 The Ceph Project Developers. See COPYING file
7c673cae
FG
6# at the top-level directory of this distribution and at
7# https://github.com/ceph/ceph/blob/master/COPYING
8#
9# All modifications and additions to the file contributed by third parties
10# remain the property of their copyright owners, unless otherwise agreed
11# upon.
12#
13# This file is under the GNU Lesser General Public License, version 2.1
14#
15# Please submit bugfixes or comments via http://tracker.ceph.com/
d2e6a577 16#
11fdf7f2
TL
17
18#################################################################################
19# conditional build section
20#
21# please read http://rpm.org/user_doc/conditional_builds.html for explanation of
22# bcond syntax!
23#################################################################################
7c673cae 24%bcond_with make_check
eafe8130 25%bcond_without ceph_test_package
31f18b77 26%ifarch s390 s390x
7c673cae 27%bcond_with tcmalloc
31f18b77
FG
28%else
29%bcond_without tcmalloc
7c673cae 30%endif
7c673cae
FG
31%if 0%{?fedora} || 0%{?rhel}
32%bcond_without selinux
11fdf7f2
TL
33%bcond_without cephfs_java
34%bcond_without lttng
35%bcond_without libradosstriper
36%bcond_without ocf
37%bcond_without amqp_endpoint
38%global _remote_tarball_prefix https://download.ceph.com/tarballs/
7c673cae
FG
39%endif
40%if 0%{?suse_version}
41%bcond_with selinux
11fdf7f2
TL
42%bcond_with cephfs_java
43%bcond_with amqp_endpoint
44#Compat macro for new _fillupdir macro introduced in Nov 2017
45%if ! %{defined _fillupdir}
46%global _fillupdir /var/adm/fillup-templates
7c673cae 47%endif
11fdf7f2
TL
48%if 0%{?is_opensuse}
49%bcond_without libradosstriper
50%bcond_without ocf
51%else
52%bcond_with libradosstriper
53%bcond_with ocf
54%endif
55%ifarch x86_64 aarch64 ppc64le
7c673cae 56%bcond_without lttng
11fdf7f2
TL
57%else
58%bcond_with lttng
59%endif
60%endif
61%bcond_with seastar
62%if 0%{?fedora} >= 29 || 0%{?suse_version} >= 1500 || 0%{?rhel} >= 8
63# distros that need a py3 Ceph build
64%bcond_with python2
65%else
66# distros that need a py2 Ceph build
67%bcond_without python2
7c673cae 68%endif
11fdf7f2
TL
69%if 0%{?fedora} || 0%{?suse_version} >= 1500
70# distros that ship cmd2 and/or colorama
71%bcond_without cephfs_shell
72%else
73# distros that do _not_ ship cmd2/colorama
74%bcond_with cephfs_shell
75%endif
76%if 0%{without python2}
77%global _defined_if_python2_absent 1
7c673cae
FG
78%endif
79
80%if %{with selinux}
81# get selinux policy version
91327a77 82%{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0}
7c673cae
FG
83%endif
84
85%{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d}
86%{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create}
87%{!?python3_pkgversion: %global python3_pkgversion 3}
eafe8130 88%{!?python3_version_nodots: %global python3_version_nodots 3}
11fdf7f2
TL
89%{!?python3_version: %global python3_version 3}
90# define _python_buildid macro which will expand to the empty string when
91# building with python2
92%global _python_buildid %{?_defined_if_python2_absent:%{python3_pkgversion}}
7c673cae
FG
93
94# unify libexec for all targets
95%global _libexecdir %{_exec_prefix}/lib
96
97# disable dwz which compresses the debuginfo
98%global _find_debuginfo_dwz_opts %{nil}
31f18b77 99
7c673cae
FG
100#################################################################################
101# main package definition
102#################################################################################
103Name: ceph
92f5a8d4 104Version: 14.2.8
7c673cae 105Release: 0%{?dist}
31f18b77 106%if 0%{?fedora} || 0%{?rhel}
224ce89b 107Epoch: 2
31f18b77
FG
108%endif
109
3efd9988
FG
110# define _epoch_prefix macro which will expand to the empty string if epoch is
111# undefined
31f18b77
FG
112%global _epoch_prefix %{?epoch:%{epoch}:}
113
7c673cae 114Summary: User space components of the Ceph file system
94b18763 115License: LGPL-2.1 and CC-BY-SA-3.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and MIT
7c673cae
FG
116%if 0%{?suse_version}
117Group: System/Filesystems
118%endif
119URL: http://ceph.com/
92f5a8d4 120Source0: %{?_remote_tarball_prefix}ceph-14.2.8.tar.bz2
7c673cae 121%if 0%{?suse_version}
11fdf7f2 122# _insert_obs_source_lines_here
31f18b77 123ExclusiveArch: x86_64 aarch64 ppc64le s390x
7c673cae 124%endif
7c673cae
FG
125#################################################################################
126# dependencies that apply across all distro families
127#################################################################################
31f18b77
FG
128Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release}
129Requires: ceph-mds = %{_epoch_prefix}%{version}-%{release}
130Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
131Requires: ceph-mon = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
132Requires(post): binutils
133%if 0%{with cephfs_java}
134BuildRequires: java-devel
135BuildRequires: sharutils
136%endif
137%if 0%{with selinux}
138BuildRequires: checkpolicy
139BuildRequires: selinux-policy-devel
7c673cae 140%endif
31f18b77 141BuildRequires: gperf
11fdf7f2
TL
142%if 0%{?rhel} == 7
143BuildRequires: cmake3 > 3.5
144%else
145BuildRequires: cmake > 3.5
146%endif
7c673cae
FG
147BuildRequires: cryptsetup
148BuildRequires: fuse-devel
11fdf7f2
TL
149%if 0%{?rhel} == 7
150# devtoolset offers newer make and valgrind-devel, but the old ones are good
151# enough.
eafe8130
TL
152BuildRequires: devtoolset-8-gcc-c++ >= 8.2.1
153%else
7c673cae 154BuildRequires: gcc-c++
11fdf7f2 155%endif
7c673cae
FG
156BuildRequires: gdbm
157%if 0%{with tcmalloc}
91327a77
AA
158%if 0%{?fedora} || 0%{?rhel}
159BuildRequires: gperftools-devel >= 2.6.1
160%endif
161%if 0%{?suse_version}
7c673cae
FG
162BuildRequires: gperftools-devel >= 2.4
163%endif
91327a77 164%endif
7c673cae
FG
165BuildRequires: leveldb-devel > 1.2
166BuildRequires: libaio-devel
7c673cae
FG
167BuildRequires: libblkid-devel >= 2.17
168BuildRequires: libcurl-devel
eafe8130 169BuildRequires: libcap-ng-devel
7c673cae 170BuildRequires: libudev-devel
eafe8130 171BuildRequires: libnl3-devel
11fdf7f2 172BuildRequires: liboath-devel
7c673cae
FG
173BuildRequires: libtool
174BuildRequires: libxml2-devel
175BuildRequires: make
11fdf7f2 176BuildRequires: ncurses-devel
7c673cae 177BuildRequires: parted
eafe8130 178BuildRequires: patch
7c673cae
FG
179BuildRequires: perl
180BuildRequires: pkgconfig
11fdf7f2
TL
181BuildRequires: procps
182BuildRequires: python%{_python_buildid}
183BuildRequires: python%{_python_buildid}-devel
7c673cae 184BuildRequires: snappy-devel
11fdf7f2 185BuildRequires: sudo
7c673cae
FG
186BuildRequires: udev
187BuildRequires: util-linux
188BuildRequires: valgrind-devel
31f18b77 189BuildRequires: which
7c673cae
FG
190BuildRequires: xfsprogs
191BuildRequires: xfsprogs-devel
192BuildRequires: xmlstarlet
193BuildRequires: yasm
11fdf7f2
TL
194%if 0%{with amqp_endpoint}
195BuildRequires: librabbitmq-devel
196%endif
197%if 0%{with make_check}
198BuildRequires: jq
eafe8130 199BuildRequires: libuuid-devel
11fdf7f2
TL
200BuildRequires: python%{_python_buildid}-bcrypt
201BuildRequires: python%{_python_buildid}-coverage
202BuildRequires: python%{_python_buildid}-nose
203BuildRequires: python%{_python_buildid}-pecan
204BuildRequires: python%{_python_buildid}-requests
205BuildRequires: python%{_python_buildid}-six
206BuildRequires: python%{_python_buildid}-tox
207BuildRequires: python%{_python_buildid}-virtualenv
208%if 0%{?rhel} == 7
209BuildRequires: pyOpenSSL%{_python_buildid}
210%else
211BuildRequires: python%{_python_buildid}-pyOpenSSL
212%endif
213BuildRequires: socat
214%endif
215%if 0%{with seastar}
216BuildRequires: c-ares-devel
217BuildRequires: gnutls-devel
218BuildRequires: hwloc-devel
219BuildRequires: libpciaccess-devel
220BuildRequires: lksctp-tools-devel
221BuildRequires: protobuf-devel
222BuildRequires: ragel
223BuildRequires: systemtap-sdt-devel
224BuildRequires: yaml-cpp-devel
225%endif
7c673cae
FG
226#################################################################################
227# distro-conditional dependencies
228#################################################################################
229%if 0%{?suse_version}
230BuildRequires: pkgconfig(systemd)
231BuildRequires: systemd-rpm-macros
7c673cae
FG
232%{?systemd_requires}
233PreReq: %fillup_prereq
eafe8130 234BuildRequires: fdupes
7c673cae
FG
235BuildRequires: net-tools
236BuildRequires: libbz2-devel
7c673cae
FG
237BuildRequires: mozilla-nss-devel
238BuildRequires: keyutils-devel
239BuildRequires: libopenssl-devel
240BuildRequires: lsb-release
241BuildRequires: openldap2-devel
11fdf7f2
TL
242#BuildRequires: krb5
243#BuildRequires: krb5-devel
244BuildRequires: cunit-devel
245BuildRequires: python%{_python_buildid}-setuptools
246BuildRequires: python%{_python_buildid}-Cython
247BuildRequires: python%{_python_buildid}-PrettyTable
248BuildRequires: python%{_python_buildid}-Sphinx
31f18b77 249BuildRequires: rdma-core-devel
11fdf7f2 250BuildRequires: liblz4-devel >= 1.7
81eedcae
TL
251# for prometheus-alerts
252BuildRequires: golang-github-prometheus-prometheus
7c673cae 253%endif
d2e6a577 254%if 0%{?fedora} || 0%{?rhel}
7c673cae
FG
255Requires: systemd
256BuildRequires: boost-random
7c673cae
FG
257BuildRequires: nss-devel
258BuildRequires: keyutils-libs-devel
31f18b77 259BuildRequires: libibverbs-devel
11fdf7f2 260BuildRequires: librdmacm-devel
7c673cae 261BuildRequires: openldap-devel
11fdf7f2 262#BuildRequires: krb5-devel
7c673cae 263BuildRequires: openssl-devel
11fdf7f2 264BuildRequires: CUnit-devel
7c673cae 265BuildRequires: redhat-lsb-core
11fdf7f2
TL
266%if 0%{with python2}
267BuildRequires: python2-Cython
268%endif
269BuildRequires: python%{python3_pkgversion}-devel
270BuildRequires: python%{python3_pkgversion}-setuptools
eafe8130
TL
271%if 0%{?rhel}
272BuildRequires: python%{python3_version_nodots}-Cython
273%else
11fdf7f2 274BuildRequires: python%{python3_pkgversion}-Cython
eafe8130 275%endif
11fdf7f2
TL
276BuildRequires: python%{_python_buildid}-prettytable
277BuildRequires: python%{_python_buildid}-sphinx
278BuildRequires: lz4-devel >= 1.7
279%endif
280# distro-conditional make check dependencies
281%if 0%{with make_check}
282%if 0%{?fedora} || 0%{?rhel}
283BuildRequires: python%{_python_buildid}-cherrypy
284BuildRequires: python%{_python_buildid}-jwt
285BuildRequires: python%{_python_buildid}-routes
286BuildRequires: python%{_python_buildid}-werkzeug
287BuildRequires: xmlsec1
288%endif
289%if 0%{?suse_version}
290BuildRequires: python%{_python_buildid}-CherryPy
291BuildRequires: python%{_python_buildid}-PyJWT
292BuildRequires: python%{_python_buildid}-Routes
293BuildRequires: python%{_python_buildid}-Werkzeug
294BuildRequires: python%{_python_buildid}-numpy-devel
92f5a8d4 295BuildRequires: rpm-build
11fdf7f2
TL
296BuildRequires: xmlsec1-devel
297%endif
7c673cae
FG
298%endif
299# lttng and babeltrace for rbd-replay-prep
300%if %{with lttng}
301%if 0%{?fedora} || 0%{?rhel}
302BuildRequires: lttng-ust-devel
303BuildRequires: libbabeltrace-devel
304%endif
305%if 0%{?suse_version}
306BuildRequires: lttng-ust-devel
307BuildRequires: babeltrace-devel
308%endif
309%endif
7c673cae
FG
310%if 0%{?suse_version}
311BuildRequires: libexpat-devel
7c673cae
FG
312%endif
313%if 0%{?rhel} || 0%{?fedora}
314BuildRequires: expat-devel
7c673cae
FG
315%endif
316#hardened-cc1
317%if 0%{?fedora} || 0%{?rhel}
318BuildRequires: redhat-rpm-config
319%endif
11fdf7f2
TL
320%if 0%{with seastar}
321%if 0%{?fedora} || 0%{?rhel}
322BuildRequires: cryptopp-devel
323BuildRequires: numactl-devel
324BuildRequires: protobuf-compiler
325%endif
326%if 0%{?suse_version}
327BuildRequires: libcryptopp-devel
328BuildRequires: libnuma-devel
329%endif
330%endif
7c673cae
FG
331
332%description
333Ceph is a massively scalable, open-source, distributed storage system that runs
334on commodity hardware and delivers object, block and file system storage.
335
336
337#################################################################################
338# subpackages
339#################################################################################
340%package base
341Summary: Ceph Base Package
342%if 0%{?suse_version}
343Group: System/Filesystems
344%endif
11fdf7f2 345Provides: ceph-test:/usr/bin/ceph-kvstore-tool
31f18b77
FG
346Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
347Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
348Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
349Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
350Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
7c673cae 351%if 0%{with selinux}
31f18b77 352Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
7c673cae 353%endif
11fdf7f2 354Requires: cryptsetup
91327a77 355Requires: e2fsprogs
11fdf7f2
TL
356Requires: findutils
357Requires: grep
7c673cae 358Requires: logrotate
91327a77 359Requires: parted
7c673cae 360Requires: psmisc
11fdf7f2
TL
361Requires: python%{_python_buildid}-requests
362Requires: python%{_python_buildid}-setuptools
363Requires: util-linux
364Requires: xfsprogs
7c673cae 365Requires: which
91327a77 366%if 0%{?fedora} || 0%{?rhel}
91327a77
AA
367# The following is necessary due to tracker 36508 and can be removed once the
368# associated upstream bugs are resolved.
369%if 0%{with tcmalloc}
370Requires: gperftools-libs >= 2.6.1
371%endif
372%endif
7c673cae 373%if 0%{?suse_version}
11fdf7f2 374Recommends: chrony
7c673cae 375%endif
7c673cae
FG
376%description base
377Base is the package that includes all the files shared amongst ceph servers
378
379%package -n ceph-common
380Summary: Ceph Common
381%if 0%{?suse_version}
382Group: System/Filesystems
383%endif
31f18b77
FG
384Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
385Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
386Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
11fdf7f2
TL
387Requires: python%{_python_buildid}-rados = %{_epoch_prefix}%{version}-%{release}
388Requires: python%{_python_buildid}-rbd = %{_epoch_prefix}%{version}-%{release}
389Requires: python%{_python_buildid}-cephfs = %{_epoch_prefix}%{version}-%{release}
390Requires: python%{_python_buildid}-rgw = %{_epoch_prefix}%{version}-%{release}
391Requires: python%{_python_buildid}-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
392Requires: python%{_python_buildid}-requests
31f18b77 393%if 0%{?fedora} || 0%{?rhel}
11fdf7f2 394Requires: python%{_python_buildid}-prettytable
31f18b77
FG
395%endif
396%if 0%{?suse_version}
11fdf7f2
TL
397Requires: python%{_python_buildid}-PrettyTable
398%endif
399%if 0%{with libradosstriper}
400Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release}
31f18b77 401%endif
7c673cae
FG
402%{?systemd_requires}
403%if 0%{?suse_version}
404Requires(pre): pwdutils
405%endif
7c673cae
FG
406%description -n ceph-common
407Common utilities to mount and interact with a ceph storage cluster.
408Comprised of files that are common to Ceph clients and servers.
409
410%package mds
411Summary: Ceph Metadata Server Daemon
412%if 0%{?suse_version}
413Group: System/Filesystems
414%endif
31f18b77 415Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
416%description mds
417ceph-mds is the metadata server daemon for the Ceph distributed file system.
418One or more instances of ceph-mds collectively manage the file system
419namespace, coordinating access to the shared OSD cluster.
420
421%package mon
422Summary: Ceph Monitor Daemon
423%if 0%{?suse_version}
424Group: System/Filesystems
425%endif
11fdf7f2 426Provides: ceph-test:/usr/bin/ceph-monstore-tool
31f18b77 427Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
428%description mon
429ceph-mon is the cluster monitor daemon for the Ceph distributed file
430system. One or more instances of ceph-mon form a Paxos part-time
431parliament cluster that provides extremely reliable and durable storage
432of cluster membership, configuration, and state.
433
434%package mgr
435Summary: Ceph Manager Daemon
7c673cae
FG
436%if 0%{?suse_version}
437Group: System/Filesystems
438%endif
31f18b77 439Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
11fdf7f2
TL
440Requires: python%{_python_buildid}-bcrypt
441Requires: python%{_python_buildid}-pecan
442Requires: python%{_python_buildid}-six
31f18b77 443%if 0%{?fedora} || 0%{?rhel}
11fdf7f2
TL
444Requires: python%{_python_buildid}-cherrypy
445Requires: python%{_python_buildid}-werkzeug
31f18b77
FG
446%endif
447%if 0%{?suse_version}
11fdf7f2
TL
448Requires: python%{_python_buildid}-CherryPy
449Requires: python%{_python_buildid}-Werkzeug
450Recommends: python%{_python_buildid}-influxdb
451Recommends: ceph-mgr-dashboard = %{_epoch_prefix}%{version}-%{release}
452Recommends: ceph-mgr-diskprediction-local = %{_epoch_prefix}%{version}-%{release}
453Recommends: ceph-mgr-diskprediction-cloud = %{_epoch_prefix}%{version}-%{release}
454Recommends: ceph-mgr-rook = %{_epoch_prefix}%{version}-%{release}
eafe8130 455Recommends: ceph-mgr-k8sevents = %{_epoch_prefix}%{version}-%{release}
11fdf7f2
TL
456Recommends: ceph-mgr-ssh = %{_epoch_prefix}%{version}-%{release}
457%endif
458%if 0%{?rhel} == 7
459Requires: pyOpenSSL
460%else
461Requires: python%{_python_buildid}-pyOpenSSL
31f18b77 462%endif
7c673cae
FG
463%description mgr
464ceph-mgr enables python modules that provide services (such as the REST
465module derived from Calamari) and expose CLI hooks. ceph-mgr gathers
466the cluster maps, the daemon metadata, and performance counters, and
467exposes all these to the python modules.
468
11fdf7f2
TL
469%package mgr-dashboard
470Summary: Ceph Dashboard
471BuildArch: noarch
472%if 0%{?suse_version}
473Group: System/Filesystems
474%endif
475Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
494da23a 476Requires: ceph-grafana-dashboards = %{_epoch_prefix}%{version}-%{release}
11fdf7f2
TL
477%if 0%{?fedora} || 0%{?rhel}
478Requires: python%{_python_buildid}-cherrypy
479Requires: python%{_python_buildid}-jwt
480Requires: python%{_python_buildid}-routes
481Requires: python%{_python_buildid}-werkzeug
482%endif
483%if 0%{?suse_version}
484Requires: python%{_python_buildid}-CherryPy
485Requires: python%{_python_buildid}-PyJWT
486Requires: python%{_python_buildid}-Routes
487Requires: python%{_python_buildid}-Werkzeug
488%endif
489%if 0%{?rhel} == 7
490Requires: pyOpenSSL
491%else
492Requires: python%{_python_buildid}-pyOpenSSL
493%endif
494%description mgr-dashboard
495ceph-mgr-dashboard is a manager plugin, providing a web-based application
496to monitor and manage many aspects of a Ceph cluster and related components.
497See the Dashboard documentation at http://docs.ceph.com/ for details and a
498detailed feature overview.
499
500%package mgr-diskprediction-local
501Summary: ceph-mgr diskprediction_local plugin
502BuildArch: noarch
503%if 0%{?suse_version}
504Group: System/Filesystems
505%endif
506Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
507%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?suse_version}
508Requires: python%{_python_buildid}-numpy
509%if 0%{without python2}
510Requires: python3-scipy
511%else
512Requires: python2-scipy
513%endif
514%endif
515%if 0%{?rhel} == 7
516Requires: numpy
517Requires: scipy
518%endif
519%description mgr-diskprediction-local
520ceph-mgr-diskprediction-local is a ceph-mgr plugin that tries to predict
521disk failures using local algorithms and machine-learning databases.
522
523%package mgr-diskprediction-cloud
524Summary: ceph-mgr diskprediction_cloud plugin
525BuildArch: noarch
526%if 0%{?suse_version}
527Group: System/Filesystems
528%endif
529Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
530%description mgr-diskprediction-cloud
531ceph-mgr-diskprediction-cloud is a ceph-mgr plugin that tries to predict
532disk failures using services in the Google cloud.
533
534%package mgr-rook
535BuildArch: noarch
536Summary: ceph-mgr rook plugin
537%if 0%{?suse_version}
538Group: System/Filesystems
539%endif
540Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
541Requires: python%{_python_buildid}-kubernetes
542%description mgr-rook
543ceph-mgr-rook is a ceph-mgr plugin for orchestration functions using
544a Rook backend.
545
eafe8130
TL
546%package mgr-k8sevents
547BuildArch: noarch
548Summary: Ceph Manager plugin to orchestrate ceph-events to kubernetes' events API
549%if 0%{?suse_version}
550Group: System/Filesystems
551%endif
552Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
553Requires: python%{_python_buildid}-kubernetes
554%description mgr-k8sevents
555ceph-mgr-k8sevents is a ceph-mgr plugin that sends every ceph-events
556to kubernetes' events API
557
11fdf7f2
TL
558%package mgr-ssh
559Summary: ceph-mgr ssh module
560BuildArch: noarch
561%if 0%{?suse_version}
562Group: System/Filesystems
563%endif
564Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
565Requires: python%{_python_buildid}-remoto
566%description mgr-ssh
567ceph-mgr-ssh is a ceph-mgr module for orchestration functions using
568direct SSH connections for management operations.
569
7c673cae
FG
570%package fuse
571Summary: Ceph fuse-based client
572%if 0%{?suse_version}
573Group: System/Filesystems
574%endif
181888fb 575Requires: fuse
11fdf7f2 576Requires: python%{python3_pkgversion}
7c673cae
FG
577%description fuse
578FUSE based client for Ceph distributed network file system
579
580%package -n rbd-fuse
581Summary: Ceph fuse-based client
582%if 0%{?suse_version}
583Group: System/Filesystems
584%endif
31f18b77
FG
585Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
586Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
587%description -n rbd-fuse
588FUSE based client to map Ceph rbd images to files
589
590%package -n rbd-mirror
591Summary: Ceph daemon for mirroring RBD images
592%if 0%{?suse_version}
593Group: System/Filesystems
594%endif
a8e16298 595Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
31f18b77 596Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
11fdf7f2 597Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
598%description -n rbd-mirror
599Daemon for mirroring RBD images between Ceph clusters, streaming
600changes asynchronously.
601
602%package -n rbd-nbd
603Summary: Ceph RBD client base on NBD
604%if 0%{?suse_version}
605Group: System/Filesystems
606%endif
31f18b77
FG
607Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
608Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
609%description -n rbd-nbd
610NBD based client to map Ceph rbd images to local device
611
612%package radosgw
613Summary: Rados REST gateway
614%if 0%{?suse_version}
615Group: System/Filesystems
616%endif
a8e16298 617Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae 618%if 0%{with selinux}
31f18b77 619Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
7c673cae 620%endif
31f18b77
FG
621Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
622Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
623%if 0%{?rhel} || 0%{?fedora}
624Requires: mailcap
625%endif
626%description radosgw
627RADOS is a distributed object store used by the Ceph distributed
628storage system. This package provides a REST gateway to the
629object store that aims to implement a superset of Amazon's S3
630service as well as the OpenStack Object Storage ("Swift") API.
631
632%if %{with ocf}
633%package resource-agents
634Summary: OCF-compliant resource agents for Ceph daemons
635%if 0%{?suse_version}
636Group: System/Filesystems
637%endif
31f18b77 638Requires: ceph-base = %{_epoch_prefix}%{version}
7c673cae
FG
639Requires: resource-agents
640%description resource-agents
641Resource agents for monitoring and managing Ceph daemons
642under Open Cluster Framework (OCF) compliant resource
643managers such as Pacemaker.
644%endif
645
646%package osd
647Summary: Ceph Object Storage Daemon
648%if 0%{?suse_version}
649Group: System/Filesystems
650%endif
11fdf7f2 651Provides: ceph-test:/usr/bin/ceph-osdomap-tool
31f18b77 652Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
b32b8144 653Requires: lvm2
11fdf7f2
TL
654Requires: sudo
655Requires: libstoragemgmt
7c673cae
FG
656%description osd
657ceph-osd is the object storage daemon for the Ceph distributed file
658system. It is responsible for storing objects on a local file system
659and providing access to them over the network.
660
661%package -n librados2
662Summary: RADOS distributed object store client library
663%if 0%{?suse_version}
664Group: System/Libraries
665%endif
7c673cae 666%if 0%{?rhel} || 0%{?fedora}
31f18b77 667Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
668%endif
669%description -n librados2
670RADOS is a reliable, autonomic distributed object storage cluster
671developed as part of the Ceph distributed storage system. This is a
672shared library allowing applications to access the distributed object
673store using a simple file-like interface.
674
675%package -n librados-devel
676Summary: RADOS headers
677%if 0%{?suse_version}
678Group: Development/Libraries/C and C++
679%endif
31f18b77
FG
680Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
681Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
682Provides: librados2-devel = %{_epoch_prefix}%{version}-%{release}
683Obsoletes: librados2-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae 684%description -n librados-devel
11fdf7f2
TL
685This package contains C libraries and headers needed to develop programs
686that use RADOS object store.
687
688%package -n libradospp-devel
689Summary: RADOS headers
690%if 0%{?suse_version}
691Group: Development/Libraries/C and C++
692%endif
693Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
694Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
695%description -n libradospp-devel
696This package contains C++ libraries and headers needed to develop programs
7c673cae
FG
697that use RADOS object store.
698
699%package -n librgw2
700Summary: RADOS gateway client library
701%if 0%{?suse_version}
702Group: System/Libraries
703%endif
31f18b77 704Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
705%description -n librgw2
706This package provides a library implementation of the RADOS gateway
707(distributed object store with S3 and Swift personalities).
708
709%package -n librgw-devel
710Summary: RADOS gateway client library
711%if 0%{?suse_version}
712Group: Development/Libraries/C and C++
713%endif
31f18b77
FG
714Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
715Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
716Provides: librgw2-devel = %{_epoch_prefix}%{version}-%{release}
717Obsoletes: librgw2-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
718%description -n librgw-devel
719This package contains libraries and headers needed to develop programs
720that use RADOS gateway client library.
721
11fdf7f2 722%if 0%{with python2}
7c673cae
FG
723%package -n python-rgw
724Summary: Python 2 libraries for the RADOS gateway
725%if 0%{?suse_version}
11fdf7f2 726Group: Development/Libraries/Python
7c673cae 727%endif
31f18b77
FG
728Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
729Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
eafe8130 730%{?python_provide:%python_provide python-rgw}
31f18b77 731Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
732%description -n python-rgw
733This package contains Python 2 libraries for interacting with Cephs RADOS
734gateway.
11fdf7f2 735%endif
7c673cae
FG
736
737%package -n python%{python3_pkgversion}-rgw
738Summary: Python 3 libraries for the RADOS gateway
739%if 0%{?suse_version}
11fdf7f2 740Group: Development/Libraries/Python
7c673cae 741%endif
31f18b77
FG
742Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
743Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
eafe8130 744%{?python_provide:%python_provide python%{python3_pkgversion}-rgw}
81eedcae
TL
745%if 0%{without python2}
746Provides: python-rgw = %{_epoch_prefix}%{version}-%{release}
747Obsoletes: python-rgw < %{_epoch_prefix}%{version}-%{release}
748%endif
7c673cae
FG
749%description -n python%{python3_pkgversion}-rgw
750This package contains Python 3 libraries for interacting with Cephs RADOS
751gateway.
752
11fdf7f2 753%if 0%{with python2}
7c673cae
FG
754%package -n python-rados
755Summary: Python 2 libraries for the RADOS object store
756%if 0%{?suse_version}
11fdf7f2 757Group: Development/Libraries/Python
7c673cae 758%endif
31f18b77 759Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
eafe8130 760%{?python_provide:%python_provide python-rados}
31f18b77 761Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
762%description -n python-rados
763This package contains Python 2 libraries for interacting with Cephs RADOS
764object store.
11fdf7f2 765%endif
7c673cae
FG
766
767%package -n python%{python3_pkgversion}-rados
768Summary: Python 3 libraries for the RADOS object store
769%if 0%{?suse_version}
11fdf7f2 770Group: Development/Libraries/Python
7c673cae 771%endif
7c673cae 772Requires: python%{python3_pkgversion}
31f18b77 773Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
eafe8130 774%{?python_provide:%python_provide python%{python3_pkgversion}-rados}
81eedcae
TL
775%if 0%{without python2}
776Provides: python-rados = %{_epoch_prefix}%{version}-%{release}
777Obsoletes: python-rados < %{_epoch_prefix}%{version}-%{release}
778%endif
7c673cae
FG
779%description -n python%{python3_pkgversion}-rados
780This package contains Python 3 libraries for interacting with Cephs RADOS
781object store.
782
11fdf7f2 783%if 0%{with libradosstriper}
7c673cae
FG
784%package -n libradosstriper1
785Summary: RADOS striping interface
786%if 0%{?suse_version}
787Group: System/Libraries
788%endif
31f18b77 789Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
790%description -n libradosstriper1
791Striping interface built on top of the rados library, allowing
792to stripe bigger objects onto several standard rados objects using
793an interface very similar to the rados one.
794
795%package -n libradosstriper-devel
796Summary: RADOS striping interface headers
797%if 0%{?suse_version}
798Group: Development/Libraries/C and C++
799%endif
31f18b77
FG
800Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release}
801Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
11fdf7f2 802Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release}
31f18b77
FG
803Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
804Provides: libradosstriper1-devel = %{_epoch_prefix}%{version}-%{release}
805Obsoletes: libradosstriper1-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
806%description -n libradosstriper-devel
807This package contains libraries and headers needed to develop programs
808that use RADOS striping interface.
11fdf7f2 809%endif
7c673cae
FG
810
811%package -n librbd1
812Summary: RADOS block device client library
813%if 0%{?suse_version}
814Group: System/Libraries
815%endif
31f18b77
FG
816Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
817%if 0%{?suse_version}
818Requires(post): coreutils
819%endif
7c673cae 820%if 0%{?rhel} || 0%{?fedora}
31f18b77 821Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
822%endif
823%description -n librbd1
824RBD is a block device striped across multiple distributed objects in
825RADOS, a reliable, autonomic distributed object storage cluster
826developed as part of the Ceph distributed storage system. This is a
827shared library allowing applications to manage these block devices.
828
829%package -n librbd-devel
830Summary: RADOS block device headers
831%if 0%{?suse_version}
832Group: Development/Libraries/C and C++
833%endif
31f18b77
FG
834Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
835Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
11fdf7f2 836Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release}
31f18b77
FG
837Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
838Provides: librbd1-devel = %{_epoch_prefix}%{version}-%{release}
839Obsoletes: librbd1-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
840%description -n librbd-devel
841This package contains libraries and headers needed to develop programs
842that use RADOS block device.
843
11fdf7f2 844%if 0%{with python2}
7c673cae
FG
845%package -n python-rbd
846Summary: Python 2 libraries for the RADOS block device
847%if 0%{?suse_version}
11fdf7f2 848Group: Development/Libraries/Python
7c673cae 849%endif
31f18b77
FG
850Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
851Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
eafe8130 852%{?python_provide:%python_provide python-rbd}
31f18b77 853Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
854%description -n python-rbd
855This package contains Python 2 libraries for interacting with Cephs RADOS
856block device.
11fdf7f2 857%endif
7c673cae
FG
858
859%package -n python%{python3_pkgversion}-rbd
860Summary: Python 3 libraries for the RADOS block device
861%if 0%{?suse_version}
11fdf7f2 862Group: Development/Libraries/Python
7c673cae 863%endif
31f18b77
FG
864Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
865Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
eafe8130 866%{?python_provide:%python_provide python%{python3_pkgversion}-rbd}
11fdf7f2 867Provides: python3-rbd = %{_epoch_prefix}%{version}-%{release}
81eedcae
TL
868%if 0%{without python2}
869Provides: python-rbd = %{_epoch_prefix}%{version}-%{release}
870Obsoletes: python-rbd < %{_epoch_prefix}%{version}-%{release}
871%endif
7c673cae
FG
872%description -n python%{python3_pkgversion}-rbd
873This package contains Python 3 libraries for interacting with Cephs RADOS
874block device.
875
876%package -n libcephfs2
877Summary: Ceph distributed file system client library
878%if 0%{?suse_version}
879Group: System/Libraries
880%endif
224ce89b 881Obsoletes: libcephfs1
7c673cae 882%if 0%{?rhel} || 0%{?fedora}
31f18b77 883Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
884Obsoletes: ceph-libcephfs
885%endif
886%description -n libcephfs2
887Ceph is a distributed network file system designed to provide excellent
888performance, reliability, and scalability. This is a shared library
889allowing applications to access a Ceph distributed file system via a
890POSIX-like interface.
891
892%package -n libcephfs-devel
893Summary: Ceph distributed file system headers
894%if 0%{?suse_version}
895Group: Development/Libraries/C and C++
896%endif
31f18b77
FG
897Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
898Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
899Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
900Provides: libcephfs2-devel = %{_epoch_prefix}%{version}-%{release}
901Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
902%description -n libcephfs-devel
903This package contains libraries and headers needed to develop programs
904that use Cephs distributed file system.
905
11fdf7f2 906%if 0%{with python2}
7c673cae
FG
907%package -n python-cephfs
908Summary: Python 2 libraries for Ceph distributed file system
909%if 0%{?suse_version}
11fdf7f2 910Group: Development/Libraries/Python
7c673cae 911%endif
31f18b77 912Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
11fdf7f2
TL
913Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
914Requires: python-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
eafe8130 915%{?python_provide:%python_provide python-cephfs}
31f18b77 916Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
917%description -n python-cephfs
918This package contains Python 2 libraries for interacting with Cephs distributed
919file system.
11fdf7f2 920%endif
7c673cae
FG
921
922%package -n python%{python3_pkgversion}-cephfs
923Summary: Python 3 libraries for Ceph distributed file system
924%if 0%{?suse_version}
11fdf7f2 925Group: Development/Libraries/Python
7c673cae 926%endif
31f18b77
FG
927Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
928Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
11fdf7f2 929Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
eafe8130 930%{?python_provide:%python_provide python%{python3_pkgversion}-cephfs}
81eedcae
TL
931%if 0%{without python2}
932Provides: python-cephfs = %{_epoch_prefix}%{version}-%{release}
933Obsoletes: python-cephfs < %{_epoch_prefix}%{version}-%{release}
934%endif
7c673cae
FG
935%description -n python%{python3_pkgversion}-cephfs
936This package contains Python 3 libraries for interacting with Cephs distributed
937file system.
938
11fdf7f2
TL
939%if 0%{with python2}
940%package -n python-ceph-argparse
941Summary: Python 2 utility libraries for Ceph CLI
942%if 0%{?suse_version}
943Group: Development/Libraries/Python
944%endif
945%description -n python-ceph-argparse
946This package contains types and routines for Python 2 used by the Ceph CLI as
947well as the RESTful interface. These have to do with querying the daemons for
948command-description information, validating user command input against those
949descriptions, and submitting the command to the appropriate daemon.
950%endif
951
7c673cae
FG
952%package -n python%{python3_pkgversion}-ceph-argparse
953Summary: Python 3 utility libraries for Ceph CLI
954%if 0%{?suse_version}
11fdf7f2 955Group: Development/Libraries/Python
7c673cae 956%endif
eafe8130 957%{?python_provide:%python_provide python%{python3_pkgversion}-ceph-argparse}
7c673cae
FG
958%description -n python%{python3_pkgversion}-ceph-argparse
959This package contains types and routines for Python 3 used by the Ceph CLI as
960well as the RESTful interface. These have to do with querying the daemons for
961command-description information, validating user command input against those
962descriptions, and submitting the command to the appropriate daemon.
963
11fdf7f2
TL
964%if 0%{with cephfs_shell}
965%package -n cephfs-shell
966Summary: Interactive shell for Ceph file system
967Requires: python%{python3_pkgversion}-cmd2
968Requires: python%{python3_pkgversion}-colorama
969Requires: python%{python3_pkgversion}-cephfs
970%description -n cephfs-shell
971This package contains an interactive tool that allows accessing a Ceph
972file system without mounting it by providing a nice pseudo-shell which
973works like an FTP client.
974%endif
975
7c673cae
FG
976%if 0%{with ceph_test_package}
977%package -n ceph-test
978Summary: Ceph benchmarks and test tools
979%if 0%{?suse_version}
980Group: System/Benchmark
981%endif
b32b8144 982Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
7c673cae 983Requires: xmlstarlet
31f18b77 984Requires: jq
c07f9fc5 985Requires: socat
7c673cae
FG
986%description -n ceph-test
987This package contains Ceph benchmarks and test tools.
988%endif
989
990%if 0%{with cephfs_java}
991
992%package -n libcephfs_jni1
993Summary: Java Native Interface library for CephFS Java bindings
994%if 0%{?suse_version}
995Group: System/Libraries
996%endif
7c673cae 997Requires: java
31f18b77 998Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
999%description -n libcephfs_jni1
1000This package contains the Java Native Interface library for CephFS Java
1001bindings.
1002
1003%package -n libcephfs_jni-devel
1004Summary: Development files for CephFS Java Native Interface library
1005%if 0%{?suse_version}
1006Group: Development/Libraries/Java
1007%endif
7c673cae 1008Requires: java
31f18b77
FG
1009Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
1010Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
1011Provides: libcephfs_jni1-devel = %{_epoch_prefix}%{version}-%{release}
1012Obsoletes: libcephfs_jni1-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
1013%description -n libcephfs_jni-devel
1014This package contains the development files for CephFS Java Native Interface
1015library.
1016
1017%package -n cephfs-java
1018Summary: Java libraries for the Ceph File System
1019%if 0%{?suse_version}
1020Group: System/Libraries
1021%endif
7c673cae 1022Requires: java
31f18b77 1023Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
1024Requires: junit
1025BuildRequires: junit
1026%description -n cephfs-java
1027This package contains the Java libraries for the Ceph File System.
1028
1029%endif
1030
1031%package -n rados-objclass-devel
1032Summary: RADOS object class development kit
11fdf7f2
TL
1033%if 0%{?suse_version}
1034Group: Development/Libraries/C and C++
1035%endif
1036Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
1037%description -n rados-objclass-devel
1038This package contains libraries and headers needed to develop RADOS object
1039class plugins.
1040
1041%if 0%{with selinux}
1042
1043%package selinux
1044Summary: SELinux support for Ceph MON, OSD and MDS
1045%if 0%{?suse_version}
1046Group: System/Filesystems
1047%endif
31f18b77 1048Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae 1049Requires: policycoreutils, libselinux-utils
31f18b77 1050Requires(post): ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
1051Requires(post): selinux-policy-base >= %{_selinux_policy_version}, policycoreutils, gawk
1052Requires(postun): policycoreutils
1053%description selinux
1054This package contains SELinux support for Ceph MON, OSD and MDS. The package
1055also performs file-system relabelling which can take a long time on heavily
1056populated file-systems.
1057
1058%endif
1059
11fdf7f2 1060%if 0%{with python2}
7c673cae
FG
1061%package -n python-ceph-compat
1062Summary: Compatibility package for Cephs python libraries
1063%if 0%{?suse_version}
11fdf7f2 1064Group: Development/Libraries/Python
7c673cae 1065%endif
7c673cae 1066Obsoletes: python-ceph
31f18b77
FG
1067Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
1068Requires: python-rbd = %{_epoch_prefix}%{version}-%{release}
1069Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release}
1070Requires: python-rgw = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
1071Provides: python-ceph
1072%description -n python-ceph-compat
1073This is a compatibility package to accommodate python-ceph split into
1074python-rados, python-rbd, python-rgw and python-cephfs. Packages still
1075depending on python-ceph should be fixed to depend on python-rados,
1076python-rbd, python-rgw or python-cephfs instead.
11fdf7f2
TL
1077%endif
1078
1079%package grafana-dashboards
1080Summary: The set of Grafana dashboards for monitoring purposes
1081BuildArch: noarch
1082%if 0%{?suse_version}
1083Group: System/Filesystems
1084%endif
1085%description grafana-dashboards
1086This package provides a set of Grafana dashboards for monitoring of
1087Ceph clusters. The dashboards require a Prometheus server setup
1088collecting data from Ceph Manager "prometheus" module and Prometheus
1089project "node_exporter" module. The dashboards are designed to be
1090integrated with the Ceph Manager Dashboard web UI.
7c673cae 1091
81eedcae
TL
1092%if 0%{?suse_version}
1093%package prometheus-alerts
1094Summary: Prometheus alerts for a Ceph deplyoment
1095BuildArch: noarch
1096Group: System/Monitoring
1097%description prometheus-alerts
1098This package provides Ceph’s default alerts for Prometheus.
1099%endif
1100
7c673cae
FG
1101#################################################################################
1102# common
1103#################################################################################
1104%prep
92f5a8d4 1105%autosetup -p1 -n ceph-14.2.8
7c673cae
FG
1106
1107%build
81eedcae
TL
1108# LTO can be enabled as soon as the following GCC bug is fixed:
1109# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200
1110%define _lto_cflags %{nil}
11fdf7f2
TL
1111
1112%if 0%{?rhel} == 7
eafe8130 1113. /opt/rh/devtoolset-8/enable
11fdf7f2
TL
1114%endif
1115
7c673cae
FG
1116%if 0%{with cephfs_java}
1117# Find jni.h
1118for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do
1119 [ -d $i ] && java_inc="$java_inc -I$i"
1120done
1121%endif
1122
11fdf7f2
TL
1123%if 0%{?suse_version}
1124# the following setting fixed an OOM condition we once encountered in the OBS
7c673cae
FG
1125RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768"
1126%endif
7c673cae
FG
1127
1128export CPPFLAGS="$java_inc"
1129export CFLAGS="$RPM_OPT_FLAGS"
1130export CXXFLAGS="$RPM_OPT_FLAGS"
f64942e4 1131export LDFLAGS="$RPM_LD_FLAGS"
7c673cae 1132
11fdf7f2
TL
1133# Parallel build settings ...
1134CEPH_MFLAGS_JOBS="%{?_smp_mflags}"
1135CEPH_SMP_NCPUS=$(echo "$CEPH_MFLAGS_JOBS" | sed 's/-j//')
1136%if 0%{?__isa_bits} == 32
1137# 32-bit builds can use 3G memory max, which is not enough even for -j2
1138CEPH_SMP_NCPUS="1"
1139%endif
1140# do not eat all memory
1141echo "Available memory:"
1142free -h
1143echo "System limits:"
1144ulimit -a
1145if test -n "$CEPH_SMP_NCPUS" -a "$CEPH_SMP_NCPUS" -gt 1 ; then
eafe8130 1146 mem_per_process=2500
11fdf7f2
TL
1147 max_mem=$(LANG=C free -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p")
1148 max_jobs="$(($max_mem / $mem_per_process))"
1149 test "$CEPH_SMP_NCPUS" -gt "$max_jobs" && CEPH_SMP_NCPUS="$max_jobs" && echo "Warning: Reducing build parallelism to -j$max_jobs because of memory limits"
1150 test "$CEPH_SMP_NCPUS" -le 0 && CEPH_SMP_NCPUS="1" && echo "Warning: Not using parallel build at all because of memory limits"
1151fi
1152export CEPH_SMP_NCPUS
1153export CEPH_MFLAGS_JOBS="-j$CEPH_SMP_NCPUS"
7c673cae 1154
11fdf7f2 1155env | sort
7c673cae
FG
1156
1157mkdir build
1158cd build
11fdf7f2
TL
1159%if 0%{?rhel} == 7
1160CMAKE=cmake3
1161%else
1162CMAKE=cmake
1163%endif
1164${CMAKE} .. \
7c673cae
FG
1165 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
1166 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
1167 -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
1168 -DCMAKE_INSTALL_LOCALSTATEDIR=%{_localstatedir} \
1169 -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
1170 -DCMAKE_INSTALL_MANDIR=%{_mandir} \
1171 -DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \
c07f9fc5 1172 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
7c673cae 1173 -DWITH_MANPAGE=ON \
11fdf7f2
TL
1174 -DWITH_PYTHON3=%{python3_version} \
1175 -DWITH_MGR_DASHBOARD_FRONTEND=OFF \
1176%if %{with python2}
1177 -DWITH_PYTHON2=ON \
1178%else
1179 -DWITH_PYTHON2=OFF \
1180 -DMGR_PYTHON_VERSION=3 \
7c673cae 1181%endif
7c673cae
FG
1182%if 0%{without ceph_test_package}
1183 -DWITH_TESTS=OFF \
1184%endif
1185%if 0%{with cephfs_java}
1186 -DWITH_CEPHFS_JAVA=ON \
1187%endif
1188%if 0%{with selinux}
1189 -DWITH_SELINUX=ON \
1190%endif
1191%if %{with lttng}
1192 -DWITH_LTTNG=ON \
c07f9fc5 1193 -DWITH_BABELTRACE=ON \
7c673cae
FG
1194%else
1195 -DWITH_LTTNG=OFF \
c07f9fc5 1196 -DWITH_BABELTRACE=OFF \
7c673cae
FG
1197%endif
1198 $CEPH_EXTRA_CMAKE_ARGS \
1199%if 0%{with ocf}
1200 -DWITH_OCF=ON \
31f18b77
FG
1201%endif
1202%ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64
b32b8144 1203 -DWITH_BOOST_CONTEXT=ON \
31f18b77 1204%else
b32b8144 1205 -DWITH_BOOST_CONTEXT=OFF \
7c673cae 1206%endif
11fdf7f2
TL
1207%if 0%{with cephfs_shell}
1208 -DWITH_CEPHFS_SHELL=ON \
1209%endif
1210%if 0%{with libradosstriper}
1211 -DWITH_LIBRADOSSTRIPER=ON \
1212%else
1213 -DWITH_LIBRADOSSTRIPER=OFF \
1214%endif
1215%if 0%{with amqp_endpoint}
1216 -DWITH_RADOSGW_AMQP_ENDPOINT=ON \
1217%else
1218 -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \
1219%endif
1220 -DBOOST_J=$CEPH_SMP_NCPUS \
1221 -DWITH_GRAFANA=ON
7c673cae 1222
11fdf7f2 1223make "$CEPH_MFLAGS_JOBS"
7c673cae
FG
1224
1225
1226%if 0%{with make_check}
1227%check
1228# run in-tree unittests
1229cd build
11fdf7f2 1230ctest "$CEPH_MFLAGS_JOBS"
7c673cae
FG
1231%endif
1232
1233
7c673cae
FG
1234%install
1235pushd build
1236make DESTDIR=%{buildroot} install
1237# we have dropped sysvinit bits
1238rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph
1239popd
1240install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
1241%if 0%{?fedora} || 0%{?rhel}
1242install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph
1243%endif
1244%if 0%{?suse_version}
11fdf7f2 1245install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_fillupdir}/sysconfig.%{name}
7c673cae
FG
1246%endif
1247install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf
7c673cae
FG
1248install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset
1249mkdir -p %{buildroot}%{_sbindir}
1250install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
1251chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf
31f18b77 1252install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
b32b8144 1253install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
7c673cae
FG
1254
1255# firewall templates and /sbin/mount.ceph symlink
1256%if 0%{?suse_version}
7c673cae
FG
1257mkdir -p %{buildroot}/sbin
1258ln -sf %{_sbindir}/mount.ceph %{buildroot}/sbin/mount.ceph
1259%endif
1260
1261# udev rules
1262install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules
11fdf7f2
TL
1263
1264# sudoers.d
1265install -m 0600 -D sudoers.d/ceph-osd-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
7c673cae
FG
1266
1267#set up placeholder directories
1268mkdir -p %{buildroot}%{_sysconfdir}/ceph
1269mkdir -p %{buildroot}%{_localstatedir}/run/ceph
1270mkdir -p %{buildroot}%{_localstatedir}/log/ceph
1271mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp
1272mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon
1273mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/osd
1274mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mds
1275mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mgr
11fdf7f2
TL
1276mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash
1277mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash/posted
7c673cae
FG
1278mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/radosgw
1279mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-osd
1280mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds
1281mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw
1282mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mgr
d2e6a577 1283mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd
11fdf7f2 1284mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
7c673cae
FG
1285
1286%if 0%{?suse_version}
1287# create __pycache__ directories and their contents
1288%py3_compile %{buildroot}%{python3_sitelib}
81eedcae
TL
1289# prometheus alerts
1290install -m 644 -D monitoring/prometheus/alerts/ceph_default_alerts.yml %{buildroot}/etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml
eafe8130
TL
1291# hardlink duplicate files under /usr to save space
1292%fdupes %{buildroot}%{_prefix}
7c673cae 1293%endif
eafe8130 1294
11fdf7f2
TL
1295%if 0%{?rhel} == 8
1296%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}
1297%endif
7c673cae
FG
1298
1299%clean
1300rm -rf %{buildroot}
1301
1302#################################################################################
1303# files and systemd scriptlets
1304#################################################################################
1305%files
1306
1307%files base
11fdf7f2 1308%{_bindir}/ceph-crash
7c673cae
FG
1309%{_bindir}/crushtool
1310%{_bindir}/monmaptool
1311%{_bindir}/osdmaptool
b32b8144 1312%{_bindir}/ceph-kvstore-tool
7c673cae 1313%{_bindir}/ceph-run
7c673cae
FG
1314%{_libexecdir}/systemd/system-preset/50-ceph.preset
1315%{_sbindir}/ceph-create-keys
7c673cae
FG
1316%dir %{_libexecdir}/ceph
1317%{_libexecdir}/ceph/ceph_common.sh
1318%dir %{_libdir}/rados-classes
1319%{_libdir}/rados-classes/*
1320%dir %{_libdir}/ceph
1321%dir %{_libdir}/ceph/erasure-code
1322%{_libdir}/ceph/erasure-code/libec_*.so*
1323%dir %{_libdir}/ceph/compressor
1324%{_libdir}/ceph/compressor/libceph_*.so*
11fdf7f2 1325%{_unitdir}/ceph-crash.service
7c673cae
FG
1326%dir %{_libdir}/ceph/crypto
1327%{_libdir}/ceph/crypto/libceph_*.so*
7c673cae
FG
1328%if %{with lttng}
1329%{_libdir}/libos_tp.so*
1330%{_libdir}/libosd_tp.so*
1331%endif
7c673cae
FG
1332%config(noreplace) %{_sysconfdir}/logrotate.d/ceph
1333%if 0%{?fedora} || 0%{?rhel}
1334%config(noreplace) %{_sysconfdir}/sysconfig/ceph
1335%endif
1336%if 0%{?suse_version}
11fdf7f2 1337%{_fillupdir}/sysconfig.*
7c673cae
FG
1338%endif
1339%{_unitdir}/ceph.target
11fdf7f2 1340%if 0%{with python2}
d2e6a577
FG
1341%dir %{python_sitelib}/ceph_volume
1342%{python_sitelib}/ceph_volume/*
1343%{python_sitelib}/ceph_volume-*
11fdf7f2
TL
1344%else
1345%dir %{python3_sitelib}/ceph_volume
1346%{python3_sitelib}/ceph_volume/*
1347%{python3_sitelib}/ceph_volume-*
1348%endif
7c673cae 1349%{_mandir}/man8/ceph-deploy.8*
7c673cae
FG
1350%{_mandir}/man8/ceph-create-keys.8*
1351%{_mandir}/man8/ceph-run.8*
1352%{_mandir}/man8/crushtool.8*
1353%{_mandir}/man8/osdmaptool.8*
1354%{_mandir}/man8/monmaptool.8*
b32b8144 1355%{_mandir}/man8/ceph-kvstore-tool.8*
7c673cae 1356#set up placeholder directories
11fdf7f2
TL
1357%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash
1358%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash/posted
7c673cae
FG
1359%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/tmp
1360%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd
1361%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mds
1362%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rgw
1363%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mgr
d2e6a577 1364%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd
11fdf7f2 1365%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
7c673cae
FG
1366
1367%post base
1368/sbin/ldconfig
1369%if 0%{?suse_version}
1370%fillup_only
1371if [ $1 -eq 1 ] ; then
11fdf7f2 1372/usr/bin/systemctl preset ceph.target ceph-crash.service >/dev/null 2>&1 || :
7c673cae
FG
1373fi
1374%endif
1375%if 0%{?fedora} || 0%{?rhel}
11fdf7f2 1376%systemd_post ceph.target ceph-crash.service
7c673cae
FG
1377%endif
1378if [ $1 -eq 1 ] ; then
11fdf7f2 1379/usr/bin/systemctl start ceph.target ceph-crash.service >/dev/null 2>&1 || :
7c673cae
FG
1380fi
1381
1382%preun base
1383%if 0%{?suse_version}
11fdf7f2 1384%service_del_preun ceph.target ceph-crash.service
7c673cae
FG
1385%endif
1386%if 0%{?fedora} || 0%{?rhel}
11fdf7f2 1387%systemd_preun ceph.target ceph-crash.service
7c673cae
FG
1388%endif
1389
1390%postun base
1391/sbin/ldconfig
1392%if 0%{?suse_version}
1393DISABLE_RESTART_ON_UPDATE="yes"
11fdf7f2 1394%service_del_postun ceph.target
7c673cae
FG
1395%endif
1396%if 0%{?fedora} || 0%{?rhel}
11fdf7f2 1397%systemd_postun ceph.target
7c673cae 1398%endif
11fdf7f2 1399if [ $1 -ge 1 ] ; then
31f18b77
FG
1400 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1401 # "yes". In any case: if units are not running, do not touch them.
1402 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1403 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1404 source $SYSCONF_CEPH
1405 fi
31f18b77 1406fi
7c673cae
FG
1407
1408%files common
224ce89b 1409%dir %{_docdir}/ceph
31f18b77 1410%doc %{_docdir}/ceph/sample.ceph.conf
11fdf7f2 1411%license %{_docdir}/ceph/COPYING
7c673cae
FG
1412%{_bindir}/ceph
1413%{_bindir}/ceph-authtool
1414%{_bindir}/ceph-conf
1415%{_bindir}/ceph-dencoder
1416%{_bindir}/ceph-rbdnamer
1417%{_bindir}/ceph-syn
7c673cae
FG
1418%{_bindir}/cephfs-data-scan
1419%{_bindir}/cephfs-journal-tool
1420%{_bindir}/cephfs-table-tool
1421%{_bindir}/rados
1422%{_bindir}/radosgw-admin
1423%{_bindir}/rbd
1424%{_bindir}/rbd-replay
1425%{_bindir}/rbd-replay-many
1426%{_bindir}/rbdmap
1427%{_sbindir}/mount.ceph
1428%if 0%{?suse_version}
1429/sbin/mount.ceph
1430%endif
1431%if %{with lttng}
1432%{_bindir}/rbd-replay-prep
1433%endif
1434%{_bindir}/ceph-post-file
7c673cae
FG
1435%{_tmpfilesdir}/ceph-common.conf
1436%{_mandir}/man8/ceph-authtool.8*
1437%{_mandir}/man8/ceph-conf.8*
1438%{_mandir}/man8/ceph-dencoder.8*
1439%{_mandir}/man8/ceph-rbdnamer.8*
1440%{_mandir}/man8/ceph-syn.8*
1441%{_mandir}/man8/ceph-post-file.8*
1442%{_mandir}/man8/ceph.8*
1443%{_mandir}/man8/mount.ceph.8*
1444%{_mandir}/man8/rados.8*
1445%{_mandir}/man8/radosgw-admin.8*
1446%{_mandir}/man8/rbd.8*
1447%{_mandir}/man8/rbdmap.8*
1448%{_mandir}/man8/rbd-replay.8*
1449%{_mandir}/man8/rbd-replay-many.8*
1450%{_mandir}/man8/rbd-replay-prep.8*
1451%dir %{_datadir}/ceph/
1452%{_datadir}/ceph/known_hosts_drop.ceph.com
1453%{_datadir}/ceph/id_rsa_drop.ceph.com
1454%{_datadir}/ceph/id_rsa_drop.ceph.com.pub
1455%dir %{_sysconfdir}/ceph/
31f18b77 1456%config %{_sysconfdir}/bash_completion.d/ceph
7c673cae
FG
1457%config %{_sysconfdir}/bash_completion.d/rados
1458%config %{_sysconfdir}/bash_completion.d/rbd
1459%config %{_sysconfdir}/bash_completion.d/radosgw-admin
1460%config(noreplace) %{_sysconfdir}/ceph/rbdmap
1461%{_unitdir}/rbdmap.service
7c673cae
FG
1462%dir %{_udevrulesdir}
1463%{_udevrulesdir}/50-rbd.rules
1464%attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/
1465%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/
1466
1467%pre common
1468CEPH_GROUP_ID=167
1469CEPH_USER_ID=167
1470%if 0%{?rhel} || 0%{?fedora}
1471/usr/sbin/groupadd ceph -g $CEPH_GROUP_ID -o -r 2>/dev/null || :
1472/usr/sbin/useradd ceph -u $CEPH_USER_ID -o -r -g ceph -s /sbin/nologin -c "Ceph daemons" -d %{_localstatedir}/lib/ceph 2>/dev/null || :
1473%endif
1474%if 0%{?suse_version}
1475if ! getent group ceph >/dev/null ; then
1476 CEPH_GROUP_ID_OPTION=""
1477 getent group $CEPH_GROUP_ID >/dev/null || CEPH_GROUP_ID_OPTION="-g $CEPH_GROUP_ID"
1478 groupadd ceph $CEPH_GROUP_ID_OPTION -r 2>/dev/null || :
1479fi
1480if ! getent passwd ceph >/dev/null ; then
1481 CEPH_USER_ID_OPTION=""
1482 getent passwd $CEPH_USER_ID >/dev/null || CEPH_USER_ID_OPTION="-u $CEPH_USER_ID"
1483 useradd ceph $CEPH_USER_ID_OPTION -r -g ceph -s /sbin/nologin 2>/dev/null || :
1484fi
1485usermod -c "Ceph storage service" \
1486 -d %{_localstatedir}/lib/ceph \
1487 -g ceph \
1488 -s /sbin/nologin \
1489 ceph
1490%endif
1491exit 0
1492
1493%post common
1494%tmpfiles_create %{_tmpfilesdir}/ceph-common.conf
1495
1496%postun common
1497# Package removal cleanup
1498if [ "$1" -eq "0" ] ; then
1499 rm -rf %{_localstatedir}/log/ceph
1500 rm -rf %{_sysconfdir}/ceph
1501fi
1502
1503%files mds
1504%{_bindir}/ceph-mds
1505%{_mandir}/man8/ceph-mds.8*
1506%{_unitdir}/ceph-mds@.service
1507%{_unitdir}/ceph-mds.target
1508%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mds
1509
1510%post mds
1511%if 0%{?suse_version}
1512if [ $1 -eq 1 ] ; then
1513 /usr/bin/systemctl preset ceph-mds@\*.service ceph-mds.target >/dev/null 2>&1 || :
1514fi
1515%endif
1516%if 0%{?fedora} || 0%{?rhel}
1517%systemd_post ceph-mds@\*.service ceph-mds.target
1518%endif
1519if [ $1 -eq 1 ] ; then
1520/usr/bin/systemctl start ceph-mds.target >/dev/null 2>&1 || :
1521fi
1522
1523%preun mds
1524%if 0%{?suse_version}
1525%service_del_preun ceph-mds@\*.service ceph-mds.target
1526%endif
1527%if 0%{?fedora} || 0%{?rhel}
1528%systemd_preun ceph-mds@\*.service ceph-mds.target
1529%endif
1530
1531%postun mds
7c673cae
FG
1532%if 0%{?suse_version}
1533DISABLE_RESTART_ON_UPDATE="yes"
1534%service_del_postun ceph-mds@\*.service ceph-mds.target
1535%endif
1536%if 0%{?fedora} || 0%{?rhel}
1537%systemd_postun ceph-mds@\*.service ceph-mds.target
1538%endif
11fdf7f2 1539if [ $1 -ge 1 ] ; then
7c673cae
FG
1540 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1541 # "yes". In any case: if units are not running, do not touch them.
1542 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1543 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1544 source $SYSCONF_CEPH
1545 fi
1546 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1547 /usr/bin/systemctl try-restart ceph-mds@\*.service > /dev/null 2>&1 || :
1548 fi
1549fi
1550
1551%files mgr
1552%{_bindir}/ceph-mgr
11fdf7f2 1553%dir %{_datadir}/ceph/mgr
92f5a8d4 1554%{_datadir}/ceph/mgr/alerts
11fdf7f2
TL
1555%{_datadir}/ceph/mgr/ansible
1556%{_datadir}/ceph/mgr/balancer
1557%{_datadir}/ceph/mgr/crash
1558%{_datadir}/ceph/mgr/deepsea
1559%{_datadir}/ceph/mgr/devicehealth
1560%{_datadir}/ceph/mgr/influx
1561%{_datadir}/ceph/mgr/insights
1562%{_datadir}/ceph/mgr/iostat
1563%{_datadir}/ceph/mgr/localpool
1564%{_datadir}/ceph/mgr/mgr_module.*
1565%{_datadir}/ceph/mgr/mgr_util.*
1566%{_datadir}/ceph/mgr/orchestrator_cli
1567%{_datadir}/ceph/mgr/orchestrator.*
1568%{_datadir}/ceph/mgr/osd_perf_query
1569%{_datadir}/ceph/mgr/pg_autoscaler
1570%{_datadir}/ceph/mgr/progress
1571%{_datadir}/ceph/mgr/prometheus
1572%{_datadir}/ceph/mgr/rbd_support
1573%{_datadir}/ceph/mgr/restful
1574%{_datadir}/ceph/mgr/selftest
1575%{_datadir}/ceph/mgr/status
1576%{_datadir}/ceph/mgr/telegraf
1577%{_datadir}/ceph/mgr/telemetry
1578%{_datadir}/ceph/mgr/test_orchestrator
1579%{_datadir}/ceph/mgr/volumes
1580%{_datadir}/ceph/mgr/zabbix
7c673cae
FG
1581%{_unitdir}/ceph-mgr@.service
1582%{_unitdir}/ceph-mgr.target
1583%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mgr
1584
1585%post mgr
1586%if 0%{?suse_version}
1587if [ $1 -eq 1 ] ; then
1588 /usr/bin/systemctl preset ceph-mgr@\*.service ceph-mgr.target >/dev/null 2>&1 || :
1589fi
1590%endif
1591%if 0%{?fedora} || 0%{?rhel}
1592%systemd_post ceph-mgr@\*.service ceph-mgr.target
1593%endif
1594if [ $1 -eq 1 ] ; then
1595/usr/bin/systemctl start ceph-mgr.target >/dev/null 2>&1 || :
1596fi
1597
1598%preun mgr
1599%if 0%{?suse_version}
1600%service_del_preun ceph-mgr@\*.service ceph-mgr.target
1601%endif
1602%if 0%{?fedora} || 0%{?rhel}
1603%systemd_preun ceph-mgr@\*.service ceph-mgr.target
1604%endif
1605
1606%postun mgr
7c673cae
FG
1607%if 0%{?suse_version}
1608DISABLE_RESTART_ON_UPDATE="yes"
1609%service_del_postun ceph-mgr@\*.service ceph-mgr.target
1610%endif
1611%if 0%{?fedora} || 0%{?rhel}
1612%systemd_postun ceph-mgr@\*.service ceph-mgr.target
1613%endif
11fdf7f2 1614if [ $1 -ge 1 ] ; then
7c673cae
FG
1615 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1616 # "yes". In any case: if units are not running, do not touch them.
1617 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1618 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1619 source $SYSCONF_CEPH
1620 fi
1621 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1622 /usr/bin/systemctl try-restart ceph-mgr@\*.service > /dev/null 2>&1 || :
1623 fi
1624fi
1625
11fdf7f2
TL
1626%files mgr-dashboard
1627%{_datadir}/ceph/mgr/dashboard
1628
1629%post mgr-dashboard
1630if [ $1 -eq 1 ] ; then
1631 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1632fi
1633
1634%postun mgr-dashboard
1635if [ $1 -eq 1 ] ; then
1636 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1637fi
1638
1639%files mgr-diskprediction-local
1640%{_datadir}/ceph/mgr/diskprediction_local
1641
1642%post mgr-diskprediction-local
1643if [ $1 -eq 1 ] ; then
1644 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1645fi
1646
1647%postun mgr-diskprediction-local
1648if [ $1 -eq 1 ] ; then
1649 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1650fi
1651
1652%files mgr-diskprediction-cloud
1653%{_datadir}/ceph/mgr/diskprediction_cloud
1654
1655%post mgr-diskprediction-cloud
1656if [ $1 -eq 1 ] ; then
1657 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1658fi
1659
1660%postun mgr-diskprediction-cloud
1661if [ $1 -eq 1 ] ; then
1662 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1663fi
1664
1665%files mgr-rook
1666%{_datadir}/ceph/mgr/rook
1667
1668%post mgr-rook
1669if [ $1 -eq 1 ] ; then
1670 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1671fi
1672
1673%postun mgr-rook
1674if [ $1 -eq 1 ] ; then
1675 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1676fi
1677
eafe8130
TL
1678%files mgr-k8sevents
1679%{_datadir}/ceph/mgr/k8sevents
1680
1681%post mgr-k8sevents
1682if [ $1 -eq 1 ] ; then
1683 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1684fi
1685
1686%postun mgr-k8sevents
1687if [ $1 -eq 1 ] ; then
1688 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1689fi
1690
11fdf7f2
TL
1691%files mgr-ssh
1692%{_datadir}/ceph/mgr/ssh
1693
1694%post mgr-ssh
1695if [ $1 -eq 1 ] ; then
1696 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1697fi
1698
1699%postun mgr-ssh
1700if [ $1 -eq 1 ] ; then
1701 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1702fi
1703
7c673cae
FG
1704%files mon
1705%{_bindir}/ceph-mon
b32b8144 1706%{_bindir}/ceph-monstore-tool
7c673cae 1707%{_mandir}/man8/ceph-mon.8*
7c673cae
FG
1708%{_unitdir}/ceph-mon@.service
1709%{_unitdir}/ceph-mon.target
1710%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon
1711
1712%post mon
1713%if 0%{?suse_version}
1714if [ $1 -eq 1 ] ; then
1715 /usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || :
1716fi
1717%endif
1718%if 0%{?fedora} || 0%{?rhel}
1719%systemd_post ceph-mon@\*.service ceph-mon.target
1720%endif
1721if [ $1 -eq 1 ] ; then
1722/usr/bin/systemctl start ceph-mon.target >/dev/null 2>&1 || :
1723fi
1724
1725%preun mon
1726%if 0%{?suse_version}
1727%service_del_preun ceph-mon@\*.service ceph-mon.target
1728%endif
1729%if 0%{?fedora} || 0%{?rhel}
1730%systemd_preun ceph-mon@\*.service ceph-mon.target
1731%endif
1732
1733%postun mon
7c673cae
FG
1734%if 0%{?suse_version}
1735DISABLE_RESTART_ON_UPDATE="yes"
1736%service_del_postun ceph-mon@\*.service ceph-mon.target
1737%endif
1738%if 0%{?fedora} || 0%{?rhel}
1739%systemd_postun ceph-mon@\*.service ceph-mon.target
1740%endif
11fdf7f2 1741if [ $1 -ge 1 ] ; then
7c673cae
FG
1742 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1743 # "yes". In any case: if units are not running, do not touch them.
1744 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1745 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1746 source $SYSCONF_CEPH
1747 fi
1748 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1749 /usr/bin/systemctl try-restart ceph-mon@\*.service > /dev/null 2>&1 || :
1750 fi
1751fi
1752
1753%files fuse
7c673cae
FG
1754%{_bindir}/ceph-fuse
1755%{_mandir}/man8/ceph-fuse.8*
1756%{_sbindir}/mount.fuse.ceph
1757%{_unitdir}/ceph-fuse@.service
1758%{_unitdir}/ceph-fuse.target
1759
1760%files -n rbd-fuse
7c673cae
FG
1761%{_bindir}/rbd-fuse
1762%{_mandir}/man8/rbd-fuse.8*
1763
1764%files -n rbd-mirror
7c673cae
FG
1765%{_bindir}/rbd-mirror
1766%{_mandir}/man8/rbd-mirror.8*
1767%{_unitdir}/ceph-rbd-mirror@.service
1768%{_unitdir}/ceph-rbd-mirror.target
1769
1770%post -n rbd-mirror
1771%if 0%{?suse_version}
1772if [ $1 -eq 1 ] ; then
1773 /usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || :
1774fi
1775%endif
1776%if 0%{?fedora} || 0%{?rhel}
1777%systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1778%endif
1779if [ $1 -eq 1 ] ; then
1780/usr/bin/systemctl start ceph-rbd-mirror.target >/dev/null 2>&1 || :
1781fi
1782
1783%preun -n rbd-mirror
1784%if 0%{?suse_version}
1785%service_del_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1786%endif
1787%if 0%{?fedora} || 0%{?rhel}
1788%systemd_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1789%endif
1790
1791%postun -n rbd-mirror
7c673cae
FG
1792%if 0%{?suse_version}
1793DISABLE_RESTART_ON_UPDATE="yes"
1794%service_del_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1795%endif
1796%if 0%{?fedora} || 0%{?rhel}
1797%systemd_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1798%endif
11fdf7f2 1799if [ $1 -ge 1 ] ; then
7c673cae
FG
1800 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1801 # "yes". In any case: if units are not running, do not touch them.
1802 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1803 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1804 source $SYSCONF_CEPH
1805 fi
1806 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1807 /usr/bin/systemctl try-restart ceph-rbd-mirror@\*.service > /dev/null 2>&1 || :
1808 fi
1809fi
1810
1811%files -n rbd-nbd
7c673cae
FG
1812%{_bindir}/rbd-nbd
1813%{_mandir}/man8/rbd-nbd.8*
1814
1815%files radosgw
7c673cae
FG
1816%{_bindir}/radosgw
1817%{_bindir}/radosgw-token
31f18b77 1818%{_bindir}/radosgw-es
7c673cae
FG
1819%{_bindir}/radosgw-object-expirer
1820%{_mandir}/man8/radosgw.8*
1821%dir %{_localstatedir}/lib/ceph/radosgw
1822%{_unitdir}/ceph-radosgw@.service
1823%{_unitdir}/ceph-radosgw.target
1824
1825%post radosgw
1826%if 0%{?suse_version}
1827if [ $1 -eq 1 ] ; then
1828 /usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || :
1829fi
1830%endif
1831%if 0%{?fedora} || 0%{?rhel}
1832%systemd_post ceph-radosgw@\*.service ceph-radosgw.target
1833%endif
1834if [ $1 -eq 1 ] ; then
1835/usr/bin/systemctl start ceph-radosgw.target >/dev/null 2>&1 || :
1836fi
1837
1838%preun radosgw
1839%if 0%{?suse_version}
1840%service_del_preun ceph-radosgw@\*.service ceph-radosgw.target
1841%endif
1842%if 0%{?fedora} || 0%{?rhel}
1843%systemd_preun ceph-radosgw@\*.service ceph-radosgw.target
1844%endif
1845
1846%postun radosgw
7c673cae
FG
1847%if 0%{?suse_version}
1848DISABLE_RESTART_ON_UPDATE="yes"
1849%service_del_postun ceph-radosgw@\*.service ceph-radosgw.target
1850%endif
1851%if 0%{?fedora} || 0%{?rhel}
1852%systemd_postun ceph-radosgw@\*.service ceph-radosgw.target
1853%endif
11fdf7f2 1854if [ $1 -ge 1 ] ; then
7c673cae
FG
1855 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1856 # "yes". In any case: if units are not running, do not touch them.
1857 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1858 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1859 source $SYSCONF_CEPH
1860 fi
1861 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1862 /usr/bin/systemctl try-restart ceph-radosgw@\*.service > /dev/null 2>&1 || :
1863 fi
1864fi
1865
1866%files osd
1867%{_bindir}/ceph-clsinfo
1868%{_bindir}/ceph-bluestore-tool
1869%{_bindir}/ceph-objectstore-tool
b32b8144 1870%{_bindir}/ceph-osdomap-tool
7c673cae 1871%{_bindir}/ceph-osd
7c673cae 1872%{_libexecdir}/ceph/ceph-osd-prestart.sh
b32b8144
FG
1873%{_sbindir}/ceph-volume
1874%{_sbindir}/ceph-volume-systemd
7c673cae 1875%{_mandir}/man8/ceph-clsinfo.8*
7c673cae 1876%{_mandir}/man8/ceph-osd.8*
3efd9988 1877%{_mandir}/man8/ceph-bluestore-tool.8*
b32b8144
FG
1878%{_mandir}/man8/ceph-volume.8*
1879%{_mandir}/man8/ceph-volume-systemd.8*
7c673cae
FG
1880%{_unitdir}/ceph-osd@.service
1881%{_unitdir}/ceph-osd.target
b32b8144 1882%{_unitdir}/ceph-volume@.service
7c673cae 1883%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
3efd9988 1884%config(noreplace) %{_sysctldir}/90-ceph-osd.conf
11fdf7f2 1885%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
7c673cae
FG
1886
1887%post osd
1888%if 0%{?suse_version}
1889if [ $1 -eq 1 ] ; then
b32b8144 1890 /usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || :
7c673cae
FG
1891fi
1892%endif
1893%if 0%{?fedora} || 0%{?rhel}
b32b8144 1894%systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
1895%endif
1896if [ $1 -eq 1 ] ; then
1897/usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || :
1898fi
3efd9988
FG
1899%if 0%{?sysctl_apply}
1900 %sysctl_apply 90-ceph-osd.conf
1901%else
1902 /usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || :
1903%endif
7c673cae
FG
1904
1905%preun osd
1906%if 0%{?suse_version}
b32b8144 1907%service_del_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
1908%endif
1909%if 0%{?fedora} || 0%{?rhel}
b32b8144 1910%systemd_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
1911%endif
1912
1913%postun osd
7c673cae
FG
1914%if 0%{?suse_version}
1915DISABLE_RESTART_ON_UPDATE="yes"
b32b8144 1916%service_del_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
1917%endif
1918%if 0%{?fedora} || 0%{?rhel}
b32b8144 1919%systemd_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae 1920%endif
11fdf7f2 1921if [ $1 -ge 1 ] ; then
7c673cae
FG
1922 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1923 # "yes". In any case: if units are not running, do not touch them.
1924 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1925 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1926 source $SYSCONF_CEPH
1927 fi
1928 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
b32b8144 1929 /usr/bin/systemctl try-restart ceph-osd@\*.service ceph-volume@\*.service > /dev/null 2>&1 || :
7c673cae
FG
1930 fi
1931fi
1932
1933%if %{with ocf}
1934
1935%files resource-agents
7c673cae
FG
1936%dir %{_prefix}/lib/ocf
1937%dir %{_prefix}/lib/ocf/resource.d
1938%dir %{_prefix}/lib/ocf/resource.d/ceph
b32b8144 1939%attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/ceph/rbd
7c673cae
FG
1940
1941%endif
1942
1943%files -n librados2
7c673cae
FG
1944%{_libdir}/librados.so.*
1945%dir %{_libdir}/ceph
11fdf7f2 1946%{_libdir}/ceph/libceph-common.so.*
7c673cae
FG
1947%if %{with lttng}
1948%{_libdir}/librados_tp.so.*
1949%endif
eafe8130 1950%dir %{_sysconfdir}/ceph
7c673cae
FG
1951
1952%post -n librados2 -p /sbin/ldconfig
1953
1954%postun -n librados2 -p /sbin/ldconfig
1955
1956%files -n librados-devel
7c673cae
FG
1957%dir %{_includedir}/rados
1958%{_includedir}/rados/librados.h
7c673cae 1959%{_includedir}/rados/rados_types.h
7c673cae
FG
1960%{_libdir}/librados.so
1961%if %{with lttng}
1962%{_libdir}/librados_tp.so
1963%endif
1964%{_bindir}/librados-config
1965%{_mandir}/man8/librados-config.8*
1966
11fdf7f2
TL
1967%files -n libradospp-devel
1968%dir %{_includedir}/rados
1969%{_includedir}/rados/buffer.h
1970%{_includedir}/rados/buffer_fwd.h
1971%{_includedir}/rados/crc32c.h
1972%{_includedir}/rados/inline_memory.h
1973%{_includedir}/rados/librados.hpp
1974%{_includedir}/rados/librados_fwd.hpp
1975%{_includedir}/rados/page.h
1976%{_includedir}/rados/rados_types.hpp
1977
1978%if 0%{with python2}
7c673cae 1979%files -n python-rados
7c673cae
FG
1980%{python_sitearch}/rados.so
1981%{python_sitearch}/rados-*.egg-info
11fdf7f2 1982%endif
7c673cae
FG
1983
1984%files -n python%{python3_pkgversion}-rados
7c673cae
FG
1985%{python3_sitearch}/rados.cpython*.so
1986%{python3_sitearch}/rados-*.egg-info
1987
11fdf7f2 1988%if 0%{with libradosstriper}
7c673cae 1989%files -n libradosstriper1
7c673cae
FG
1990%{_libdir}/libradosstriper.so.*
1991
1992%post -n libradosstriper1 -p /sbin/ldconfig
1993
1994%postun -n libradosstriper1 -p /sbin/ldconfig
1995
1996%files -n libradosstriper-devel
7c673cae
FG
1997%dir %{_includedir}/radosstriper
1998%{_includedir}/radosstriper/libradosstriper.h
1999%{_includedir}/radosstriper/libradosstriper.hpp
2000%{_libdir}/libradosstriper.so
11fdf7f2 2001%endif
7c673cae
FG
2002
2003%files -n librbd1
7c673cae
FG
2004%{_libdir}/librbd.so.*
2005%if %{with lttng}
2006%{_libdir}/librbd_tp.so.*
2007%endif
2008
181888fb 2009%post -n librbd1 -p /sbin/ldconfig
7c673cae
FG
2010
2011%postun -n librbd1 -p /sbin/ldconfig
2012
2013%files -n librbd-devel
7c673cae
FG
2014%dir %{_includedir}/rbd
2015%{_includedir}/rbd/librbd.h
2016%{_includedir}/rbd/librbd.hpp
2017%{_includedir}/rbd/features.h
2018%{_libdir}/librbd.so
2019%if %{with lttng}
2020%{_libdir}/librbd_tp.so
2021%endif
2022
2023%files -n librgw2
7c673cae 2024%{_libdir}/librgw.so.*
11fdf7f2
TL
2025%{_libdir}/librgw_admin_user.so.*
2026%if %{with lttng}
eafe8130
TL
2027%{_libdir}/librgw_op_tp.so.*
2028%{_libdir}/librgw_rados_tp.so.*
11fdf7f2 2029%endif
7c673cae
FG
2030
2031%post -n librgw2 -p /sbin/ldconfig
2032
2033%postun -n librgw2 -p /sbin/ldconfig
2034
2035%files -n librgw-devel
7c673cae
FG
2036%dir %{_includedir}/rados
2037%{_includedir}/rados/librgw.h
11fdf7f2 2038%{_includedir}/rados/librgw_admin_user.h
7c673cae
FG
2039%{_includedir}/rados/rgw_file.h
2040%{_libdir}/librgw.so
11fdf7f2 2041%{_libdir}/librgw_admin_user.so
eafe8130
TL
2042%if %{with lttng}
2043%{_libdir}/librgw_op_tp.so
2044%{_libdir}/librgw_rados_tp.so
2045%endif
7c673cae 2046
11fdf7f2 2047%if 0%{with python2}
7c673cae 2048%files -n python-rgw
7c673cae
FG
2049%{python_sitearch}/rgw.so
2050%{python_sitearch}/rgw-*.egg-info
11fdf7f2 2051%endif
7c673cae
FG
2052
2053%files -n python%{python3_pkgversion}-rgw
7c673cae
FG
2054%{python3_sitearch}/rgw.cpython*.so
2055%{python3_sitearch}/rgw-*.egg-info
2056
11fdf7f2 2057%if 0%{with python2}
7c673cae 2058%files -n python-rbd
7c673cae
FG
2059%{python_sitearch}/rbd.so
2060%{python_sitearch}/rbd-*.egg-info
11fdf7f2 2061%endif
7c673cae
FG
2062
2063%files -n python%{python3_pkgversion}-rbd
7c673cae
FG
2064%{python3_sitearch}/rbd.cpython*.so
2065%{python3_sitearch}/rbd-*.egg-info
2066
2067%files -n libcephfs2
7c673cae 2068%{_libdir}/libcephfs.so.*
eafe8130 2069%dir %{_sysconfdir}/ceph
7c673cae
FG
2070
2071%post -n libcephfs2 -p /sbin/ldconfig
2072
2073%postun -n libcephfs2 -p /sbin/ldconfig
2074
2075%files -n libcephfs-devel
7c673cae
FG
2076%dir %{_includedir}/cephfs
2077%{_includedir}/cephfs/libcephfs.h
2078%{_includedir}/cephfs/ceph_statx.h
2079%{_libdir}/libcephfs.so
2080
11fdf7f2 2081%if 0%{with python2}
7c673cae 2082%files -n python-cephfs
7c673cae
FG
2083%{python_sitearch}/cephfs.so
2084%{python_sitearch}/cephfs-*.egg-info
2085%{python_sitelib}/ceph_volume_client.py*
11fdf7f2 2086%endif
7c673cae
FG
2087
2088%files -n python%{python3_pkgversion}-cephfs
7c673cae
FG
2089%{python3_sitearch}/cephfs.cpython*.so
2090%{python3_sitearch}/cephfs-*.egg-info
2091%{python3_sitelib}/ceph_volume_client.py
2092%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py*
2093
11fdf7f2
TL
2094%if 0%{with python2}
2095%files -n python-ceph-argparse
2096%{python_sitelib}/ceph_argparse.py*
2097%{python_sitelib}/ceph_daemon.py*
2098%endif
2099
7c673cae 2100%files -n python%{python3_pkgversion}-ceph-argparse
7c673cae
FG
2101%{python3_sitelib}/ceph_argparse.py
2102%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py*
2103%{python3_sitelib}/ceph_daemon.py
2104%{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py*
2105
11fdf7f2
TL
2106%if 0%{with cephfs_shell}
2107%files -n cephfs-shell
2108%{python3_sitelib}/cephfs_shell-*.egg-info
2109%{_bindir}/cephfs-shell
2110%endif
2111
7c673cae
FG
2112%if 0%{with ceph_test_package}
2113%files -n ceph-test
7c673cae
FG
2114%{_bindir}/ceph-client-debug
2115%{_bindir}/ceph_bench_log
2116%{_bindir}/ceph_kvstorebench
2117%{_bindir}/ceph_multi_stress_watch
2118%{_bindir}/ceph_erasure_code
2119%{_bindir}/ceph_erasure_code_benchmark
2120%{_bindir}/ceph_omapbench
2121%{_bindir}/ceph_objectstore_bench
2122%{_bindir}/ceph_perf_objectstore
2123%{_bindir}/ceph_perf_local
2124%{_bindir}/ceph_perf_msgr_client
2125%{_bindir}/ceph_perf_msgr_server
2126%{_bindir}/ceph_psim
2127%{_bindir}/ceph_radosacl
2128%{_bindir}/ceph_rgw_jsonparser
2129%{_bindir}/ceph_rgw_multiparser
2130%{_bindir}/ceph_scratchtool
2131%{_bindir}/ceph_scratchtoolpp
7c673cae 2132%{_bindir}/ceph_test_*
7c673cae 2133%{_bindir}/ceph-coverage
7c673cae 2134%{_bindir}/ceph-debugpack
11fdf7f2 2135%{_bindir}/cephdeduptool
7c673cae
FG
2136%{_mandir}/man8/ceph-debugpack.8*
2137%dir %{_libdir}/ceph
2138%{_libdir}/ceph/ceph-monstore-update-crush.sh
2139%endif
2140
2141%if 0%{with cephfs_java}
2142%files -n libcephfs_jni1
7c673cae
FG
2143%{_libdir}/libcephfs_jni.so.*
2144
2145%post -n libcephfs_jni1 -p /sbin/ldconfig
2146
2147%postun -n libcephfs_jni1 -p /sbin/ldconfig
2148
2149%files -n libcephfs_jni-devel
7c673cae
FG
2150%{_libdir}/libcephfs_jni.so
2151
2152%files -n cephfs-java
7c673cae
FG
2153%{_javadir}/libcephfs.jar
2154%{_javadir}/libcephfs-test.jar
2155%endif
2156
2157%files -n rados-objclass-devel
7c673cae
FG
2158%dir %{_includedir}/rados
2159%{_includedir}/rados/objclass.h
2160
2161%if 0%{with selinux}
2162%files selinux
7c673cae
FG
2163%attr(0600,root,root) %{_datadir}/selinux/packages/ceph.pp
2164%{_datadir}/selinux/devel/include/contrib/ceph.if
2165%{_mandir}/man8/ceph_selinux.8*
2166
2167%post selinux
2168# backup file_contexts before update
2169. /etc/selinux/config
2170FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
2171cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
2172
2173# Install the policy
2174/usr/sbin/semodule -i %{_datadir}/selinux/packages/ceph.pp
2175
2176# Load the policy if SELinux is enabled
2177if ! /usr/sbin/selinuxenabled; then
2178 # Do not relabel if selinux is not enabled
2179 exit 0
2180fi
2181
2182if diff ${FILE_CONTEXT} ${FILE_CONTEXT}.pre > /dev/null 2>&1; then
2183 # Do not relabel if file contexts did not change
2184 exit 0
2185fi
2186
2187# Check whether the daemons are running
2188/usr/bin/systemctl status ceph.target > /dev/null 2>&1
2189STATUS=$?
2190
2191# Stop the daemons if they were running
2192if test $STATUS -eq 0; then
2193 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
2194fi
2195
11fdf7f2
TL
2196# Relabel the files fix for first package install
2197/usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
31f18b77 2198
7c673cae
FG
2199rm -f ${FILE_CONTEXT}.pre
2200# The fixfiles command won't fix label for /var/run/ceph
2201/usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
2202
2203# Start the daemons iff they were running before
2204if test $STATUS -eq 0; then
2205 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
2206fi
2207exit 0
2208
2209%postun selinux
2210if [ $1 -eq 0 ]; then
2211 # backup file_contexts before update
2212 . /etc/selinux/config
2213 FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
2214 cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
2215
2216 # Remove the module
2217 /usr/sbin/semodule -n -r ceph > /dev/null 2>&1
2218
2219 # Reload the policy if SELinux is enabled
2220 if ! /usr/sbin/selinuxenabled ; then
2221 # Do not relabel if SELinux is not enabled
2222 exit 0
2223 fi
2224
2225 # Check whether the daemons are running
2226 /usr/bin/systemctl status ceph.target > /dev/null 2>&1
2227 STATUS=$?
2228
2229 # Stop the daemons if they were running
2230 if test $STATUS -eq 0; then
2231 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
2232 fi
2233
2234 /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
2235 rm -f ${FILE_CONTEXT}.pre
2236 # The fixfiles command won't fix label for /var/run/ceph
2237 /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
2238
2239 # Start the daemons if they were running before
2240 if test $STATUS -eq 0; then
2241 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
2242 fi
2243fi
2244exit 0
2245
2246%endif # with selinux
2247
11fdf7f2 2248%if 0%{with python2}
7c673cae
FG
2249%files -n python-ceph-compat
2250# We need an empty %%files list for python-ceph-compat, to tell rpmbuild to
2251# actually build this meta package.
11fdf7f2
TL
2252%endif
2253
2254%files grafana-dashboards
2255%if 0%{?suse_version}
81eedcae
TL
2256%attr(0755,root,root) %dir %{_sysconfdir}/grafana
2257%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards
2258%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard
11fdf7f2
TL
2259%else
2260%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard
2261%endif
2262%config %{_sysconfdir}/grafana/dashboards/ceph-dashboard/*
2263%doc monitoring/grafana/dashboards/README
2264%doc monitoring/grafana/README.md
7c673cae 2265
81eedcae
TL
2266%if 0%{?suse_version}
2267%files prometheus-alerts
2268%dir /etc/prometheus/SUSE/
2269%dir /etc/prometheus/SUSE/default_rules/
2270%config /etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml
2271%endif
2272
7c673cae
FG
2273
2274%changelog