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