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