]> git.proxmox.com Git - ceph.git/blame - ceph/ceph.spec.in
import ceph pacific 16.2.5
[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
b3b6e05e 1770%{_datadir}/ceph/mgr/nfs
9f95a23c
TL
1771%{_datadir}/ceph/mgr/orchestrator
1772%{_datadir}/ceph/mgr/osd_perf_query
1773%{_datadir}/ceph/mgr/osd_support
1774%{_datadir}/ceph/mgr/pg_autoscaler
1775%{_datadir}/ceph/mgr/progress
1776%{_datadir}/ceph/mgr/prometheus
1777%{_datadir}/ceph/mgr/rbd_support
1778%{_datadir}/ceph/mgr/restful
1779%{_datadir}/ceph/mgr/selftest
f67539c2
TL
1780%{_datadir}/ceph/mgr/snap_schedule
1781%{_datadir}/ceph/mgr/stats
9f95a23c
TL
1782%{_datadir}/ceph/mgr/status
1783%{_datadir}/ceph/mgr/telegraf
1784%{_datadir}/ceph/mgr/telemetry
1785%{_datadir}/ceph/mgr/test_orchestrator
1786%{_datadir}/ceph/mgr/volumes
1787%{_datadir}/ceph/mgr/zabbix
1788
11fdf7f2
TL
1789%files mgr-rook
1790%{_datadir}/ceph/mgr/rook
1791
1792%post mgr-rook
1793if [ $1 -eq 1 ] ; then
1794 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1795fi
1796
1797%postun mgr-rook
1798if [ $1 -eq 1 ] ; then
1799 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1800fi
1801
eafe8130
TL
1802%files mgr-k8sevents
1803%{_datadir}/ceph/mgr/k8sevents
1804
1805%post mgr-k8sevents
1806if [ $1 -eq 1 ] ; then
1807 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1808fi
1809
1810%postun mgr-k8sevents
1811if [ $1 -eq 1 ] ; then
1812 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1813fi
1814
9f95a23c
TL
1815%files mgr-cephadm
1816%{_datadir}/ceph/mgr/cephadm
11fdf7f2 1817
9f95a23c 1818%post mgr-cephadm
11fdf7f2
TL
1819if [ $1 -eq 1 ] ; then
1820 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1821fi
1822
9f95a23c 1823%postun mgr-cephadm
11fdf7f2
TL
1824if [ $1 -eq 1 ] ; then
1825 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1826fi
1827
7c673cae
FG
1828%files mon
1829%{_bindir}/ceph-mon
b32b8144 1830%{_bindir}/ceph-monstore-tool
7c673cae 1831%{_mandir}/man8/ceph-mon.8*
7c673cae
FG
1832%{_unitdir}/ceph-mon@.service
1833%{_unitdir}/ceph-mon.target
1834%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon
1835
1836%post mon
1837%if 0%{?suse_version}
1838if [ $1 -eq 1 ] ; then
1839 /usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || :
1840fi
1841%endif
1842%if 0%{?fedora} || 0%{?rhel}
1843%systemd_post ceph-mon@\*.service ceph-mon.target
1844%endif
1845if [ $1 -eq 1 ] ; then
1846/usr/bin/systemctl start ceph-mon.target >/dev/null 2>&1 || :
1847fi
1848
1849%preun mon
1850%if 0%{?suse_version}
1851%service_del_preun ceph-mon@\*.service ceph-mon.target
1852%endif
1853%if 0%{?fedora} || 0%{?rhel}
1854%systemd_preun ceph-mon@\*.service ceph-mon.target
1855%endif
1856
1857%postun mon
7c673cae 1858%systemd_postun ceph-mon@\*.service ceph-mon.target
11fdf7f2 1859if [ $1 -ge 1 ] ; then
7c673cae
FG
1860 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1861 # "yes". In any case: if units are not running, do not touch them.
1862 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1863 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1864 source $SYSCONF_CEPH
1865 fi
1866 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1867 /usr/bin/systemctl try-restart ceph-mon@\*.service > /dev/null 2>&1 || :
1868 fi
1869fi
1870
1871%files fuse
7c673cae
FG
1872%{_bindir}/ceph-fuse
1873%{_mandir}/man8/ceph-fuse.8*
1874%{_sbindir}/mount.fuse.ceph
f67539c2 1875%{_mandir}/man8/mount.fuse.ceph.8*
7c673cae
FG
1876%{_unitdir}/ceph-fuse@.service
1877%{_unitdir}/ceph-fuse.target
1878
f67539c2
TL
1879%files -n cephfs-mirror
1880%{_bindir}/cephfs-mirror
1881%{_mandir}/man8/cephfs-mirror.8*
1882%{_unitdir}/cephfs-mirror@.service
1883%{_unitdir}/cephfs-mirror.target
1884
1885%post -n cephfs-mirror
1886%if 0%{?suse_version}
1887if [ $1 -eq 1 ] ; then
1888 /usr/bin/systemctl preset cephfs-mirror@\*.service cephfs-mirror.target >/dev/null 2>&1 || :
1889fi
1890%endif
1891%if 0%{?fedora} || 0%{?rhel}
1892%systemd_post cephfs-mirror@\*.service cephfs-mirror.target
1893%endif
1894if [ $1 -eq 1 ] ; then
1895/usr/bin/systemctl start cephfs-mirror.target >/dev/null 2>&1 || :
1896fi
1897
1898%preun -n cephfs-mirror
1899%if 0%{?suse_version}
1900%service_del_preun cephfs-mirror@\*.service cephfs-mirror.target
1901%endif
1902%if 0%{?fedora} || 0%{?rhel}
1903%systemd_preun cephfs-mirror@\*.service cephfs-mirror.target
1904%endif
1905
1906%postun -n cephfs-mirror
1907%systemd_postun cephfs-mirror@\*.service cephfs-mirror.target
1908if [ $1 -ge 1 ] ; then
1909 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1910 # "yes". In any case: if units are not running, do not touch them.
1911 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1912 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1913 source $SYSCONF_CEPH
1914 fi
1915 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1916 /usr/bin/systemctl try-restart cephfs-mirror@\*.service > /dev/null 2>&1 || :
1917 fi
1918fi
1919
7c673cae 1920%files -n rbd-fuse
7c673cae
FG
1921%{_bindir}/rbd-fuse
1922%{_mandir}/man8/rbd-fuse.8*
1923
1924%files -n rbd-mirror
7c673cae
FG
1925%{_bindir}/rbd-mirror
1926%{_mandir}/man8/rbd-mirror.8*
1927%{_unitdir}/ceph-rbd-mirror@.service
1928%{_unitdir}/ceph-rbd-mirror.target
1929
1930%post -n rbd-mirror
1931%if 0%{?suse_version}
1932if [ $1 -eq 1 ] ; then
1933 /usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || :
1934fi
1935%endif
1936%if 0%{?fedora} || 0%{?rhel}
1937%systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1938%endif
1939if [ $1 -eq 1 ] ; then
1940/usr/bin/systemctl start ceph-rbd-mirror.target >/dev/null 2>&1 || :
1941fi
1942
1943%preun -n rbd-mirror
1944%if 0%{?suse_version}
1945%service_del_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1946%endif
1947%if 0%{?fedora} || 0%{?rhel}
1948%systemd_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1949%endif
1950
1951%postun -n rbd-mirror
7c673cae 1952%systemd_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
11fdf7f2 1953if [ $1 -ge 1 ] ; then
7c673cae
FG
1954 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1955 # "yes". In any case: if units are not running, do not touch them.
1956 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1957 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1958 source $SYSCONF_CEPH
1959 fi
1960 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1961 /usr/bin/systemctl try-restart ceph-rbd-mirror@\*.service > /dev/null 2>&1 || :
1962 fi
1963fi
1964
9f95a23c
TL
1965%files immutable-object-cache
1966%{_bindir}/ceph-immutable-object-cache
1967%{_mandir}/man8/ceph-immutable-object-cache.8*
1968%{_unitdir}/ceph-immutable-object-cache@.service
1969%{_unitdir}/ceph-immutable-object-cache.target
1970
1971%post immutable-object-cache
1972%if 0%{?suse_version}
1973if [ $1 -eq 1 ] ; then
1974 /usr/bin/systemctl preset ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target >/dev/null 2>&1 || :
1975fi
1976%endif
1977%if 0%{?fedora} || 0%{?rhel}
1978%systemd_post ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target
1979%endif
1980if [ $1 -eq 1 ] ; then
1981/usr/bin/systemctl start ceph-immutable-object-cache.target >/dev/null 2>&1 || :
1982fi
1983
1984%preun immutable-object-cache
1985%if 0%{?suse_version}
1986%service_del_preun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target
1987%endif
1988%if 0%{?fedora} || 0%{?rhel}
1989%systemd_preun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target
1990%endif
1991
1992%postun immutable-object-cache
1993test -n "$FIRST_ARG" || FIRST_ARG=$1
9f95a23c 1994%systemd_postun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target
9f95a23c
TL
1995if [ $FIRST_ARG -ge 1 ] ; then
1996 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1997 # "yes". In any case: if units are not running, do not touch them.
1998 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1999 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
2000 source $SYSCONF_CEPH
2001 fi
2002 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
2003 /usr/bin/systemctl try-restart ceph-immutable-object-cache@\*.service > /dev/null 2>&1 || :
2004 fi
2005fi
2006
7c673cae 2007%files -n rbd-nbd
7c673cae
FG
2008%{_bindir}/rbd-nbd
2009%{_mandir}/man8/rbd-nbd.8*
f67539c2
TL
2010%dir %{_libexecdir}/rbd-nbd
2011%{_libexecdir}/rbd-nbd/rbd-nbd_quiesce
7c673cae
FG
2012
2013%files radosgw
e306af50 2014%{_bindir}/ceph-diff-sorted
7c673cae
FG
2015%{_bindir}/radosgw
2016%{_bindir}/radosgw-token
31f18b77 2017%{_bindir}/radosgw-es
7c673cae 2018%{_bindir}/radosgw-object-expirer
f67539c2
TL
2019%{_bindir}/rgw-gap-list
2020%{_bindir}/rgw-gap-list-comparator
e306af50 2021%{_bindir}/rgw-orphan-list
9f95a23c 2022%{_libdir}/libradosgw.so*
7c673cae
FG
2023%{_mandir}/man8/radosgw.8*
2024%dir %{_localstatedir}/lib/ceph/radosgw
2025%{_unitdir}/ceph-radosgw@.service
2026%{_unitdir}/ceph-radosgw.target
2027
2028%post radosgw
9f95a23c 2029/sbin/ldconfig
7c673cae
FG
2030%if 0%{?suse_version}
2031if [ $1 -eq 1 ] ; then
2032 /usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || :
2033fi
2034%endif
2035%if 0%{?fedora} || 0%{?rhel}
2036%systemd_post ceph-radosgw@\*.service ceph-radosgw.target
2037%endif
2038if [ $1 -eq 1 ] ; then
2039/usr/bin/systemctl start ceph-radosgw.target >/dev/null 2>&1 || :
2040fi
2041
2042%preun radosgw
2043%if 0%{?suse_version}
2044%service_del_preun ceph-radosgw@\*.service ceph-radosgw.target
2045%endif
2046%if 0%{?fedora} || 0%{?rhel}
2047%systemd_preun ceph-radosgw@\*.service ceph-radosgw.target
2048%endif
2049
2050%postun radosgw
9f95a23c 2051/sbin/ldconfig
7c673cae 2052%systemd_postun ceph-radosgw@\*.service ceph-radosgw.target
11fdf7f2 2053if [ $1 -ge 1 ] ; then
7c673cae
FG
2054 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
2055 # "yes". In any case: if units are not running, do not touch them.
2056 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
2057 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
2058 source $SYSCONF_CEPH
2059 fi
2060 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
2061 /usr/bin/systemctl try-restart ceph-radosgw@\*.service > /dev/null 2>&1 || :
2062 fi
2063fi
2064
2065%files osd
2066%{_bindir}/ceph-clsinfo
2067%{_bindir}/ceph-bluestore-tool
f67539c2 2068%{_bindir}/ceph-erasure-code-tool
7c673cae 2069%{_bindir}/ceph-objectstore-tool
b32b8144 2070%{_bindir}/ceph-osdomap-tool
7c673cae 2071%{_bindir}/ceph-osd
7c673cae 2072%{_libexecdir}/ceph/ceph-osd-prestart.sh
b32b8144
FG
2073%{_sbindir}/ceph-volume
2074%{_sbindir}/ceph-volume-systemd
7c673cae 2075%{_mandir}/man8/ceph-clsinfo.8*
7c673cae 2076%{_mandir}/man8/ceph-osd.8*
3efd9988 2077%{_mandir}/man8/ceph-bluestore-tool.8*
b32b8144
FG
2078%{_mandir}/man8/ceph-volume.8*
2079%{_mandir}/man8/ceph-volume-systemd.8*
7c673cae
FG
2080%{_unitdir}/ceph-osd@.service
2081%{_unitdir}/ceph-osd.target
b32b8144 2082%{_unitdir}/ceph-volume@.service
7c673cae 2083%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
3efd9988 2084%config(noreplace) %{_sysctldir}/90-ceph-osd.conf
11fdf7f2 2085%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
7c673cae
FG
2086
2087%post osd
2088%if 0%{?suse_version}
2089if [ $1 -eq 1 ] ; then
b32b8144 2090 /usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || :
7c673cae
FG
2091fi
2092%endif
2093%if 0%{?fedora} || 0%{?rhel}
b32b8144 2094%systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
2095%endif
2096if [ $1 -eq 1 ] ; then
2097/usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || :
2098fi
3efd9988
FG
2099%if 0%{?sysctl_apply}
2100 %sysctl_apply 90-ceph-osd.conf
2101%else
2102 /usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || :
2103%endif
7c673cae
FG
2104
2105%preun osd
2106%if 0%{?suse_version}
b32b8144 2107%service_del_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
2108%endif
2109%if 0%{?fedora} || 0%{?rhel}
b32b8144 2110%systemd_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
2111%endif
2112
2113%postun osd
b32b8144 2114%systemd_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
11fdf7f2 2115if [ $1 -ge 1 ] ; then
7c673cae
FG
2116 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
2117 # "yes". In any case: if units are not running, do not touch them.
2118 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
2119 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
2120 source $SYSCONF_CEPH
2121 fi
2122 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
b32b8144 2123 /usr/bin/systemctl try-restart ceph-osd@\*.service ceph-volume@\*.service > /dev/null 2>&1 || :
7c673cae
FG
2124 fi
2125fi
2126
9f95a23c
TL
2127%if 0%{with seastar}
2128%files crimson-osd
2129%{_bindir}/crimson-osd
2130%endif
2131
7c673cae
FG
2132%if %{with ocf}
2133
2134%files resource-agents
7c673cae
FG
2135%dir %{_prefix}/lib/ocf
2136%dir %{_prefix}/lib/ocf/resource.d
2137%dir %{_prefix}/lib/ocf/resource.d/ceph
b32b8144 2138%attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/ceph/rbd
7c673cae
FG
2139
2140%endif
2141
2142%files -n librados2
7c673cae
FG
2143%{_libdir}/librados.so.*
2144%dir %{_libdir}/ceph
11fdf7f2 2145%{_libdir}/ceph/libceph-common.so.*
7c673cae
FG
2146%if %{with lttng}
2147%{_libdir}/librados_tp.so.*
2148%endif
eafe8130 2149%dir %{_sysconfdir}/ceph
7c673cae
FG
2150
2151%post -n librados2 -p /sbin/ldconfig
2152
2153%postun -n librados2 -p /sbin/ldconfig
2154
2155%files -n librados-devel
7c673cae
FG
2156%dir %{_includedir}/rados
2157%{_includedir}/rados/librados.h
7c673cae 2158%{_includedir}/rados/rados_types.h
7c673cae
FG
2159%{_libdir}/librados.so
2160%if %{with lttng}
2161%{_libdir}/librados_tp.so
2162%endif
2163%{_bindir}/librados-config
2164%{_mandir}/man8/librados-config.8*
2165
11fdf7f2
TL
2166%files -n libradospp-devel
2167%dir %{_includedir}/rados
2168%{_includedir}/rados/buffer.h
2169%{_includedir}/rados/buffer_fwd.h
2170%{_includedir}/rados/crc32c.h
2171%{_includedir}/rados/inline_memory.h
2172%{_includedir}/rados/librados.hpp
2173%{_includedir}/rados/librados_fwd.hpp
2174%{_includedir}/rados/page.h
2175%{_includedir}/rados/rados_types.hpp
2176
7c673cae 2177%files -n python%{python3_pkgversion}-rados
7c673cae
FG
2178%{python3_sitearch}/rados.cpython*.so
2179%{python3_sitearch}/rados-*.egg-info
2180
f67539c2
TL
2181%files -n libcephsqlite
2182%{_libdir}/libcephsqlite.so
2183
2184%post -n libcephsqlite -p /sbin/ldconfig
2185
2186%postun -n libcephsqlite -p /sbin/ldconfig
2187
2188%files -n libcephsqlite-devel
2189%{_includedir}/libcephsqlite.h
2190
11fdf7f2 2191%if 0%{with libradosstriper}
7c673cae 2192%files -n libradosstriper1
7c673cae
FG
2193%{_libdir}/libradosstriper.so.*
2194
2195%post -n libradosstriper1 -p /sbin/ldconfig
2196
2197%postun -n libradosstriper1 -p /sbin/ldconfig
2198
2199%files -n libradosstriper-devel
7c673cae
FG
2200%dir %{_includedir}/radosstriper
2201%{_includedir}/radosstriper/libradosstriper.h
2202%{_includedir}/radosstriper/libradosstriper.hpp
2203%{_libdir}/libradosstriper.so
11fdf7f2 2204%endif
7c673cae
FG
2205
2206%files -n librbd1
7c673cae
FG
2207%{_libdir}/librbd.so.*
2208%if %{with lttng}
2209%{_libdir}/librbd_tp.so.*
2210%endif
f67539c2
TL
2211%dir %{_libdir}/ceph/librbd
2212%{_libdir}/ceph/librbd/libceph_*.so*
7c673cae 2213
181888fb 2214%post -n librbd1 -p /sbin/ldconfig
7c673cae
FG
2215
2216%postun -n librbd1 -p /sbin/ldconfig
2217
2218%files -n librbd-devel
7c673cae
FG
2219%dir %{_includedir}/rbd
2220%{_includedir}/rbd/librbd.h
2221%{_includedir}/rbd/librbd.hpp
2222%{_includedir}/rbd/features.h
2223%{_libdir}/librbd.so
2224%if %{with lttng}
2225%{_libdir}/librbd_tp.so
2226%endif
2227
2228%files -n librgw2
7c673cae 2229%{_libdir}/librgw.so.*
11fdf7f2 2230%if %{with lttng}
eafe8130
TL
2231%{_libdir}/librgw_op_tp.so.*
2232%{_libdir}/librgw_rados_tp.so.*
11fdf7f2 2233%endif
7c673cae
FG
2234
2235%post -n librgw2 -p /sbin/ldconfig
2236
2237%postun -n librgw2 -p /sbin/ldconfig
2238
2239%files -n librgw-devel
7c673cae
FG
2240%dir %{_includedir}/rados
2241%{_includedir}/rados/librgw.h
2242%{_includedir}/rados/rgw_file.h
2243%{_libdir}/librgw.so
eafe8130
TL
2244%if %{with lttng}
2245%{_libdir}/librgw_op_tp.so
2246%{_libdir}/librgw_rados_tp.so
2247%endif
7c673cae 2248
7c673cae 2249%files -n python%{python3_pkgversion}-rgw
7c673cae
FG
2250%{python3_sitearch}/rgw.cpython*.so
2251%{python3_sitearch}/rgw-*.egg-info
2252
7c673cae 2253%files -n python%{python3_pkgversion}-rbd
7c673cae
FG
2254%{python3_sitearch}/rbd.cpython*.so
2255%{python3_sitearch}/rbd-*.egg-info
2256
2257%files -n libcephfs2
7c673cae 2258%{_libdir}/libcephfs.so.*
eafe8130 2259%dir %{_sysconfdir}/ceph
7c673cae
FG
2260
2261%post -n libcephfs2 -p /sbin/ldconfig
2262
2263%postun -n libcephfs2 -p /sbin/ldconfig
2264
2265%files -n libcephfs-devel
7c673cae
FG
2266%dir %{_includedir}/cephfs
2267%{_includedir}/cephfs/libcephfs.h
e306af50 2268%{_includedir}/cephfs/ceph_ll_client.h
f67539c2
TL
2269%dir %{_includedir}/cephfs/metrics
2270%{_includedir}/cephfs/metrics/Types.h
7c673cae
FG
2271%{_libdir}/libcephfs.so
2272
f67539c2
TL
2273%if %{with jaeger}
2274%files -n libjaeger
2275%{_libdir}/libopentracing.so.*
2276%{_libdir}/libthrift.so.*
2277%{_libdir}/libjaegertracing.so.*
2278%post -n libjaeger -p /sbin/ldconfig
2279%postun -n libjaeger -p /sbin/ldconfig
2280%endif
2281
7c673cae 2282%files -n python%{python3_pkgversion}-cephfs
7c673cae
FG
2283%{python3_sitearch}/cephfs.cpython*.so
2284%{python3_sitearch}/cephfs-*.egg-info
2285%{python3_sitelib}/ceph_volume_client.py
2286%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py*
2287
2288%files -n python%{python3_pkgversion}-ceph-argparse
7c673cae
FG
2289%{python3_sitelib}/ceph_argparse.py
2290%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py*
2291%{python3_sitelib}/ceph_daemon.py
2292%{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py*
2293
9f95a23c
TL
2294%files -n python%{python3_pkgversion}-ceph-common
2295%{python3_sitelib}/ceph
2296%{python3_sitelib}/ceph-*.egg-info
2297
11fdf7f2
TL
2298%if 0%{with cephfs_shell}
2299%files -n cephfs-shell
2300%{python3_sitelib}/cephfs_shell-*.egg-info
2301%{_bindir}/cephfs-shell
2302%endif
2303
f67539c2
TL
2304%files -n cephfs-top
2305%{python3_sitelib}/cephfs_top-*.egg-info
2306%{_bindir}/cephfs-top
2307%{_mandir}/man8/cephfs-top.8*
2308
7c673cae
FG
2309%if 0%{with ceph_test_package}
2310%files -n ceph-test
7c673cae
FG
2311%{_bindir}/ceph-client-debug
2312%{_bindir}/ceph_bench_log
2313%{_bindir}/ceph_kvstorebench
2314%{_bindir}/ceph_multi_stress_watch
7c673cae
FG
2315%{_bindir}/ceph_erasure_code_benchmark
2316%{_bindir}/ceph_omapbench
2317%{_bindir}/ceph_objectstore_bench
2318%{_bindir}/ceph_perf_objectstore
2319%{_bindir}/ceph_perf_local
2320%{_bindir}/ceph_perf_msgr_client
2321%{_bindir}/ceph_perf_msgr_server
2322%{_bindir}/ceph_psim
2323%{_bindir}/ceph_radosacl
2324%{_bindir}/ceph_rgw_jsonparser
2325%{_bindir}/ceph_rgw_multiparser
2326%{_bindir}/ceph_scratchtool
2327%{_bindir}/ceph_scratchtoolpp
7c673cae 2328%{_bindir}/ceph_test_*
7c673cae 2329%{_bindir}/ceph-coverage
7c673cae 2330%{_bindir}/ceph-debugpack
9f95a23c 2331%{_bindir}/ceph-dedup-tool
f67539c2
TL
2332%if 0%{with seastar}
2333%{_bindir}/crimson-store-nbd
2334%endif
7c673cae
FG
2335%{_mandir}/man8/ceph-debugpack.8*
2336%dir %{_libdir}/ceph
2337%{_libdir}/ceph/ceph-monstore-update-crush.sh
2338%endif
2339
2340%if 0%{with cephfs_java}
2341%files -n libcephfs_jni1
7c673cae
FG
2342%{_libdir}/libcephfs_jni.so.*
2343
2344%post -n libcephfs_jni1 -p /sbin/ldconfig
2345
2346%postun -n libcephfs_jni1 -p /sbin/ldconfig
2347
2348%files -n libcephfs_jni-devel
7c673cae
FG
2349%{_libdir}/libcephfs_jni.so
2350
2351%files -n cephfs-java
7c673cae
FG
2352%{_javadir}/libcephfs.jar
2353%{_javadir}/libcephfs-test.jar
2354%endif
2355
2356%files -n rados-objclass-devel
7c673cae
FG
2357%dir %{_includedir}/rados
2358%{_includedir}/rados/objclass.h
2359
2360%if 0%{with selinux}
2361%files selinux
7c673cae
FG
2362%attr(0600,root,root) %{_datadir}/selinux/packages/ceph.pp
2363%{_datadir}/selinux/devel/include/contrib/ceph.if
2364%{_mandir}/man8/ceph_selinux.8*
2365
2366%post selinux
2367# backup file_contexts before update
2368. /etc/selinux/config
2369FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
2370cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
2371
2372# Install the policy
2373/usr/sbin/semodule -i %{_datadir}/selinux/packages/ceph.pp
2374
2375# Load the policy if SELinux is enabled
2376if ! /usr/sbin/selinuxenabled; then
2377 # Do not relabel if selinux is not enabled
2378 exit 0
2379fi
2380
2381if diff ${FILE_CONTEXT} ${FILE_CONTEXT}.pre > /dev/null 2>&1; then
2382 # Do not relabel if file contexts did not change
2383 exit 0
2384fi
2385
2386# Check whether the daemons are running
2387/usr/bin/systemctl status ceph.target > /dev/null 2>&1
2388STATUS=$?
2389
2390# Stop the daemons if they were running
2391if test $STATUS -eq 0; then
2392 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
2393fi
2394
11fdf7f2
TL
2395# Relabel the files fix for first package install
2396/usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
31f18b77 2397
7c673cae
FG
2398rm -f ${FILE_CONTEXT}.pre
2399# The fixfiles command won't fix label for /var/run/ceph
2400/usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
2401
2402# Start the daemons iff they were running before
2403if test $STATUS -eq 0; then
2404 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
2405fi
2406exit 0
2407
2408%postun selinux
2409if [ $1 -eq 0 ]; then
2410 # backup file_contexts before update
2411 . /etc/selinux/config
2412 FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
2413 cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
2414
2415 # Remove the module
2416 /usr/sbin/semodule -n -r ceph > /dev/null 2>&1
2417
2418 # Reload the policy if SELinux is enabled
2419 if ! /usr/sbin/selinuxenabled ; then
2420 # Do not relabel if SELinux is not enabled
2421 exit 0
2422 fi
2423
2424 # Check whether the daemons are running
2425 /usr/bin/systemctl status ceph.target > /dev/null 2>&1
2426 STATUS=$?
2427
2428 # Stop the daemons if they were running
2429 if test $STATUS -eq 0; then
2430 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
2431 fi
2432
2433 /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
2434 rm -f ${FILE_CONTEXT}.pre
2435 # The fixfiles command won't fix label for /var/run/ceph
2436 /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
2437
2438 # Start the daemons if they were running before
2439 if test $STATUS -eq 0; then
2440 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
2441 fi
2442fi
2443exit 0
1911f103 2444%endif
7c673cae 2445
11fdf7f2
TL
2446%files grafana-dashboards
2447%if 0%{?suse_version}
81eedcae
TL
2448%attr(0755,root,root) %dir %{_sysconfdir}/grafana
2449%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards
11fdf7f2 2450%endif
801d1391 2451%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard
11fdf7f2
TL
2452%config %{_sysconfdir}/grafana/dashboards/ceph-dashboard/*
2453%doc monitoring/grafana/dashboards/README
2454%doc monitoring/grafana/README.md
7c673cae 2455
81eedcae 2456%files prometheus-alerts
801d1391
TL
2457%if 0%{?suse_version}
2458%attr(0755,root,root) %dir %{_sysconfdir}/prometheus
81eedcae 2459%endif
801d1391
TL
2460%attr(0755,root,root) %dir %{_sysconfdir}/prometheus/ceph
2461%config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml
7c673cae
FG
2462
2463%changelog