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