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