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