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