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