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