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