]> git.proxmox.com Git - ceph.git/blame - ceph/ceph.spec.in
import 15.2.2 octopus source
[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
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
9f95a23c 101Version: @PROJECT_VERSION@
7c673cae 102Release: @RPM_RELEASE@%{?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/
11fdf7f2 117Source0: %{?_remote_tarball_prefix}@TARBALL_BASENAME@.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
648%endif
649%if 0%{?rhel} || 0%{?fedora}
650Requires: openssh-clients
651%endif
652%description mgr-cephadm
653ceph-mgr-cephadm is a ceph-mgr module for orchestration functions using
654the integrated cephadm deployment tool management operations.
11fdf7f2 655
7c673cae
FG
656%package fuse
657Summary: Ceph fuse-based client
658%if 0%{?suse_version}
659Group: System/Filesystems
660%endif
181888fb 661Requires: fuse
11fdf7f2 662Requires: python%{python3_pkgversion}
7c673cae
FG
663%description fuse
664FUSE based client for Ceph distributed network file system
665
666%package -n rbd-fuse
667Summary: Ceph fuse-based client
668%if 0%{?suse_version}
669Group: System/Filesystems
670%endif
31f18b77
FG
671Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
672Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
673%description -n rbd-fuse
674FUSE based client to map Ceph rbd images to files
675
676%package -n rbd-mirror
677Summary: Ceph daemon for mirroring RBD images
678%if 0%{?suse_version}
679Group: System/Filesystems
680%endif
a8e16298 681Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
31f18b77 682Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
11fdf7f2 683Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
684%description -n rbd-mirror
685Daemon for mirroring RBD images between Ceph clusters, streaming
686changes asynchronously.
687
9f95a23c
TL
688%package immutable-object-cache
689Summary: Ceph daemon for immutable object cache
690%if 0%{?suse_version}
691Group: System/Filesystems
692%endif
693Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
694%description immutable-object-cache
695Daemon for immutable object cache.
696
7c673cae
FG
697%package -n rbd-nbd
698Summary: Ceph RBD client base on NBD
699%if 0%{?suse_version}
700Group: System/Filesystems
701%endif
31f18b77
FG
702Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
703Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
704%description -n rbd-nbd
705NBD based client to map Ceph rbd images to local device
706
707%package radosgw
708Summary: Rados REST gateway
709%if 0%{?suse_version}
710Group: System/Filesystems
711%endif
a8e16298 712Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae 713%if 0%{with selinux}
31f18b77 714Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
7c673cae 715%endif
31f18b77
FG
716Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
717Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
718%if 0%{?rhel} || 0%{?fedora}
719Requires: mailcap
720%endif
721%description radosgw
722RADOS is a distributed object store used by the Ceph distributed
723storage system. This package provides a REST gateway to the
724object store that aims to implement a superset of Amazon's S3
725service as well as the OpenStack Object Storage ("Swift") API.
726
727%if %{with ocf}
728%package resource-agents
729Summary: OCF-compliant resource agents for Ceph daemons
730%if 0%{?suse_version}
731Group: System/Filesystems
732%endif
31f18b77 733Requires: ceph-base = %{_epoch_prefix}%{version}
7c673cae
FG
734Requires: resource-agents
735%description resource-agents
736Resource agents for monitoring and managing Ceph daemons
737under Open Cluster Framework (OCF) compliant resource
738managers such as Pacemaker.
739%endif
740
741%package osd
742Summary: Ceph Object Storage Daemon
743%if 0%{?suse_version}
744Group: System/Filesystems
745%endif
11fdf7f2 746Provides: ceph-test:/usr/bin/ceph-osdomap-tool
31f18b77 747Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
b32b8144 748Requires: lvm2
11fdf7f2 749Requires: sudo
9f95a23c 750Requires: libstoragemgmt
7c673cae
FG
751%description osd
752ceph-osd is the object storage daemon for the Ceph distributed file
753system. It is responsible for storing objects on a local file system
754and providing access to them over the network.
755
9f95a23c
TL
756%if 0%{with seastar}
757%package crimson-osd
758Summary: Ceph Object Storage Daemon (crimson)
759%if 0%{?suse_version}
760Group: System/Filesystems
761%endif
762Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release}
763%description crimson-osd
764crimson-osd is the object storage daemon for the Ceph distributed file
765system. It is responsible for storing objects on a local file system
766and providing access to them over the network.
767%endif
768
7c673cae
FG
769%package -n librados2
770Summary: RADOS distributed object store client library
771%if 0%{?suse_version}
772Group: System/Libraries
773%endif
7c673cae 774%if 0%{?rhel} || 0%{?fedora}
31f18b77 775Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
776%endif
777%description -n librados2
778RADOS is a reliable, autonomic distributed object storage cluster
779developed as part of the Ceph distributed storage system. This is a
780shared library allowing applications to access the distributed object
781store using a simple file-like interface.
782
783%package -n librados-devel
784Summary: RADOS headers
785%if 0%{?suse_version}
786Group: Development/Libraries/C and C++
787%endif
31f18b77
FG
788Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
789Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
790Provides: librados2-devel = %{_epoch_prefix}%{version}-%{release}
791Obsoletes: librados2-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae 792%description -n librados-devel
11fdf7f2
TL
793This package contains C libraries and headers needed to develop programs
794that use RADOS object store.
795
796%package -n libradospp-devel
797Summary: RADOS headers
798%if 0%{?suse_version}
799Group: Development/Libraries/C and C++
800%endif
801Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
802Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
803%description -n libradospp-devel
804This package contains C++ libraries and headers needed to develop programs
7c673cae
FG
805that use RADOS object store.
806
807%package -n librgw2
808Summary: RADOS gateway client library
809%if 0%{?suse_version}
810Group: System/Libraries
811%endif
31f18b77 812Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
813%description -n librgw2
814This package provides a library implementation of the RADOS gateway
815(distributed object store with S3 and Swift personalities).
816
817%package -n librgw-devel
818Summary: RADOS gateway client library
819%if 0%{?suse_version}
820Group: Development/Libraries/C and C++
821%endif
31f18b77
FG
822Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
823Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
824Provides: librgw2-devel = %{_epoch_prefix}%{version}-%{release}
825Obsoletes: librgw2-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
826%description -n librgw-devel
827This package contains libraries and headers needed to develop programs
828that use RADOS gateway client library.
829
7c673cae
FG
830%package -n python%{python3_pkgversion}-rgw
831Summary: Python 3 libraries for the RADOS gateway
832%if 0%{?suse_version}
11fdf7f2 833Group: Development/Libraries/Python
7c673cae 834%endif
31f18b77
FG
835Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
836Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
eafe8130 837%{?python_provide:%python_provide python%{python3_pkgversion}-rgw}
81eedcae
TL
838Provides: python-rgw = %{_epoch_prefix}%{version}-%{release}
839Obsoletes: python-rgw < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
840%description -n python%{python3_pkgversion}-rgw
841This package contains Python 3 libraries for interacting with Cephs RADOS
842gateway.
843
7c673cae
FG
844%package -n python%{python3_pkgversion}-rados
845Summary: Python 3 libraries for the RADOS object store
846%if 0%{?suse_version}
11fdf7f2 847Group: Development/Libraries/Python
7c673cae 848%endif
7c673cae 849Requires: python%{python3_pkgversion}
31f18b77 850Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
eafe8130 851%{?python_provide:%python_provide python%{python3_pkgversion}-rados}
81eedcae 852Provides: python-rados = %{_epoch_prefix}%{version}-%{release}
9f95a23c 853Obsoletes: python-rados < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
854%description -n python%{python3_pkgversion}-rados
855This package contains Python 3 libraries for interacting with Cephs RADOS
856object store.
857
11fdf7f2 858%if 0%{with libradosstriper}
7c673cae
FG
859%package -n libradosstriper1
860Summary: RADOS striping interface
861%if 0%{?suse_version}
862Group: System/Libraries
863%endif
31f18b77 864Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
865%description -n libradosstriper1
866Striping interface built on top of the rados library, allowing
867to stripe bigger objects onto several standard rados objects using
868an interface very similar to the rados one.
869
870%package -n libradosstriper-devel
871Summary: RADOS striping interface headers
872%if 0%{?suse_version}
873Group: Development/Libraries/C and C++
874%endif
31f18b77
FG
875Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release}
876Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
11fdf7f2 877Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release}
31f18b77
FG
878Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
879Provides: libradosstriper1-devel = %{_epoch_prefix}%{version}-%{release}
880Obsoletes: libradosstriper1-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
881%description -n libradosstriper-devel
882This package contains libraries and headers needed to develop programs
883that use RADOS striping interface.
11fdf7f2 884%endif
7c673cae
FG
885
886%package -n librbd1
887Summary: RADOS block device client library
888%if 0%{?suse_version}
889Group: System/Libraries
890%endif
31f18b77
FG
891Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
892%if 0%{?suse_version}
893Requires(post): coreutils
894%endif
7c673cae 895%if 0%{?rhel} || 0%{?fedora}
31f18b77 896Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
897%endif
898%description -n librbd1
899RBD is a block device striped across multiple distributed objects in
900RADOS, a reliable, autonomic distributed object storage cluster
901developed as part of the Ceph distributed storage system. This is a
902shared library allowing applications to manage these block devices.
903
904%package -n librbd-devel
905Summary: RADOS block device headers
906%if 0%{?suse_version}
907Group: Development/Libraries/C and C++
908%endif
31f18b77
FG
909Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
910Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
11fdf7f2 911Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release}
31f18b77
FG
912Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
913Provides: librbd1-devel = %{_epoch_prefix}%{version}-%{release}
914Obsoletes: librbd1-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
915%description -n librbd-devel
916This package contains libraries and headers needed to develop programs
917that use RADOS block device.
918
7c673cae
FG
919%package -n python%{python3_pkgversion}-rbd
920Summary: Python 3 libraries for the RADOS block device
921%if 0%{?suse_version}
11fdf7f2 922Group: Development/Libraries/Python
7c673cae 923%endif
31f18b77
FG
924Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
925Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
eafe8130 926%{?python_provide:%python_provide python%{python3_pkgversion}-rbd}
81eedcae
TL
927Provides: python-rbd = %{_epoch_prefix}%{version}-%{release}
928Obsoletes: python-rbd < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
929%description -n python%{python3_pkgversion}-rbd
930This package contains Python 3 libraries for interacting with Cephs RADOS
931block device.
932
933%package -n libcephfs2
934Summary: Ceph distributed file system client library
935%if 0%{?suse_version}
936Group: System/Libraries
937%endif
1911f103 938Obsoletes: libcephfs1 < %{_epoch_prefix}%{version}-%{release}
7c673cae 939%if 0%{?rhel} || 0%{?fedora}
31f18b77 940Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
941Obsoletes: ceph-libcephfs
942%endif
943%description -n libcephfs2
944Ceph is a distributed network file system designed to provide excellent
945performance, reliability, and scalability. This is a shared library
946allowing applications to access a Ceph distributed file system via a
947POSIX-like interface.
948
949%package -n libcephfs-devel
950Summary: Ceph distributed file system headers
951%if 0%{?suse_version}
952Group: Development/Libraries/C and C++
953%endif
31f18b77
FG
954Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
955Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
956Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
957Provides: libcephfs2-devel = %{_epoch_prefix}%{version}-%{release}
958Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
959%description -n libcephfs-devel
960This package contains libraries and headers needed to develop programs
961that use Cephs distributed file system.
962
7c673cae
FG
963%package -n python%{python3_pkgversion}-cephfs
964Summary: Python 3 libraries for Ceph distributed file system
965%if 0%{?suse_version}
11fdf7f2 966Group: Development/Libraries/Python
7c673cae 967%endif
31f18b77
FG
968Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
969Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
11fdf7f2 970Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
eafe8130 971%{?python_provide:%python_provide python%{python3_pkgversion}-cephfs}
81eedcae
TL
972Provides: python-cephfs = %{_epoch_prefix}%{version}-%{release}
973Obsoletes: python-cephfs < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
974%description -n python%{python3_pkgversion}-cephfs
975This package contains Python 3 libraries for interacting with Cephs distributed
976file system.
977
978%package -n python%{python3_pkgversion}-ceph-argparse
979Summary: Python 3 utility libraries for Ceph CLI
980%if 0%{?suse_version}
11fdf7f2 981Group: Development/Libraries/Python
7c673cae 982%endif
eafe8130 983%{?python_provide:%python_provide python%{python3_pkgversion}-ceph-argparse}
7c673cae
FG
984%description -n python%{python3_pkgversion}-ceph-argparse
985This package contains types and routines for Python 3 used by the Ceph CLI as
986well as the RESTful interface. These have to do with querying the daemons for
987command-description information, validating user command input against those
988descriptions, and submitting the command to the appropriate daemon.
989
9f95a23c
TL
990%package -n python%{python3_pkgversion}-ceph-common
991Summary: Python 3 utility libraries for Ceph
992%if 0%{?suse_version}
993Group: Development/Libraries/Python
994%endif
995%{?python_provide:%python_provide python%{python3_pkgversion}-ceph-common}
996%description -n python%{python3_pkgversion}-ceph-common
997This package contains data structures, classes and functions used by Ceph.
998It also contains utilities used for the cephadm orchestrator.
999
11fdf7f2
TL
1000%if 0%{with cephfs_shell}
1001%package -n cephfs-shell
1002Summary: Interactive shell for Ceph file system
1003Requires: python%{python3_pkgversion}-cmd2
1004Requires: python%{python3_pkgversion}-colorama
1005Requires: python%{python3_pkgversion}-cephfs
1006%description -n cephfs-shell
1007This package contains an interactive tool that allows accessing a Ceph
1008file system without mounting it by providing a nice pseudo-shell which
1009works like an FTP client.
1010%endif
1011
7c673cae
FG
1012%if 0%{with ceph_test_package}
1013%package -n ceph-test
1014Summary: Ceph benchmarks and test tools
1015%if 0%{?suse_version}
1016Group: System/Benchmark
1017%endif
b32b8144 1018Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
7c673cae 1019Requires: xmlstarlet
31f18b77 1020Requires: jq
c07f9fc5 1021Requires: socat
7c673cae
FG
1022%description -n ceph-test
1023This package contains Ceph benchmarks and test tools.
1024%endif
1025
1026%if 0%{with cephfs_java}
1027
1028%package -n libcephfs_jni1
1029Summary: Java Native Interface library for CephFS Java bindings
1030%if 0%{?suse_version}
1031Group: System/Libraries
1032%endif
7c673cae 1033Requires: java
31f18b77 1034Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
1035%description -n libcephfs_jni1
1036This package contains the Java Native Interface library for CephFS Java
1037bindings.
1038
1039%package -n libcephfs_jni-devel
1040Summary: Development files for CephFS Java Native Interface library
1041%if 0%{?suse_version}
1042Group: Development/Libraries/Java
1043%endif
7c673cae 1044Requires: java
31f18b77
FG
1045Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
1046Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
1047Provides: libcephfs_jni1-devel = %{_epoch_prefix}%{version}-%{release}
1048Obsoletes: libcephfs_jni1-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
1049%description -n libcephfs_jni-devel
1050This package contains the development files for CephFS Java Native Interface
1051library.
1052
1053%package -n cephfs-java
1054Summary: Java libraries for the Ceph File System
1055%if 0%{?suse_version}
1056Group: System/Libraries
1057%endif
7c673cae 1058Requires: java
31f18b77 1059Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
1060Requires: junit
1061BuildRequires: junit
1062%description -n cephfs-java
1063This package contains the Java libraries for the Ceph File System.
1064
1065%endif
1066
1067%package -n rados-objclass-devel
1068Summary: RADOS object class development kit
11fdf7f2
TL
1069%if 0%{?suse_version}
1070Group: Development/Libraries/C and C++
1071%endif
1072Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
1073%description -n rados-objclass-devel
1074This package contains libraries and headers needed to develop RADOS object
1075class plugins.
1076
1077%if 0%{with selinux}
1078
1079%package selinux
1080Summary: SELinux support for Ceph MON, OSD and MDS
1081%if 0%{?suse_version}
1082Group: System/Filesystems
1083%endif
31f18b77 1084Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae 1085Requires: policycoreutils, libselinux-utils
31f18b77 1086Requires(post): ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
1087Requires(post): selinux-policy-base >= %{_selinux_policy_version}, policycoreutils, gawk
1088Requires(postun): policycoreutils
1089%description selinux
1090This package contains SELinux support for Ceph MON, OSD and MDS. The package
1091also performs file-system relabelling which can take a long time on heavily
1092populated file-systems.
1093
1094%endif
1095
11fdf7f2
TL
1096%package grafana-dashboards
1097Summary: The set of Grafana dashboards for monitoring purposes
1098BuildArch: noarch
1099%if 0%{?suse_version}
1100Group: System/Filesystems
1101%endif
1102%description grafana-dashboards
1103This package provides a set of Grafana dashboards for monitoring of
1104Ceph clusters. The dashboards require a Prometheus server setup
1105collecting data from Ceph Manager "prometheus" module and Prometheus
1106project "node_exporter" module. The dashboards are designed to be
1107integrated with the Ceph Manager Dashboard web UI.
7c673cae 1108
81eedcae
TL
1109%package prometheus-alerts
1110Summary: Prometheus alerts for a Ceph deplyoment
1111BuildArch: noarch
1112Group: System/Monitoring
1113%description prometheus-alerts
1114This package provides Ceph’s default alerts for Prometheus.
81eedcae 1115
7c673cae
FG
1116#################################################################################
1117# common
1118#################################################################################
1119%prep
1120%autosetup -p1 -n @TARBALL_BASENAME@
1121
1122%build
81eedcae
TL
1123# LTO can be enabled as soon as the following GCC bug is fixed:
1124# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200
1125%define _lto_cflags %{nil}
11fdf7f2
TL
1126
1127%if 0%{?rhel} == 7
eafe8130 1128. /opt/rh/devtoolset-8/enable
11fdf7f2
TL
1129%endif
1130
7c673cae
FG
1131%if 0%{with cephfs_java}
1132# Find jni.h
1133for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do
1134 [ -d $i ] && java_inc="$java_inc -I$i"
1135done
1136%endif
1137
11fdf7f2
TL
1138%if 0%{?suse_version}
1139# the following setting fixed an OOM condition we once encountered in the OBS
7c673cae
FG
1140RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768"
1141%endif
7c673cae
FG
1142
1143export CPPFLAGS="$java_inc"
1144export CFLAGS="$RPM_OPT_FLAGS"
1145export CXXFLAGS="$RPM_OPT_FLAGS"
f64942e4 1146export LDFLAGS="$RPM_LD_FLAGS"
7c673cae 1147
11fdf7f2
TL
1148# Parallel build settings ...
1149CEPH_MFLAGS_JOBS="%{?_smp_mflags}"
1150CEPH_SMP_NCPUS=$(echo "$CEPH_MFLAGS_JOBS" | sed 's/-j//')
1151%if 0%{?__isa_bits} == 32
1152# 32-bit builds can use 3G memory max, which is not enough even for -j2
1153CEPH_SMP_NCPUS="1"
1154%endif
1155# do not eat all memory
1156echo "Available memory:"
1157free -h
1158echo "System limits:"
1159ulimit -a
1160if test -n "$CEPH_SMP_NCPUS" -a "$CEPH_SMP_NCPUS" -gt 1 ; then
eafe8130 1161 mem_per_process=2500
11fdf7f2
TL
1162 max_mem=$(LANG=C free -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p")
1163 max_jobs="$(($max_mem / $mem_per_process))"
1164 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"
1165 test "$CEPH_SMP_NCPUS" -le 0 && CEPH_SMP_NCPUS="1" && echo "Warning: Not using parallel build at all because of memory limits"
1166fi
1167export CEPH_SMP_NCPUS
1168export CEPH_MFLAGS_JOBS="-j$CEPH_SMP_NCPUS"
7c673cae 1169
11fdf7f2 1170env | sort
7c673cae
FG
1171
1172mkdir build
1173cd build
11fdf7f2
TL
1174%if 0%{?rhel} == 7
1175CMAKE=cmake3
1176%else
1177CMAKE=cmake
1178%endif
1179${CMAKE} .. \
7c673cae
FG
1180 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
1181 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
1182 -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
1183 -DCMAKE_INSTALL_LOCALSTATEDIR=%{_localstatedir} \
1184 -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
1185 -DCMAKE_INSTALL_MANDIR=%{_mandir} \
1186 -DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \
c07f9fc5 1187 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
7c673cae 1188 -DWITH_MANPAGE=ON \
11fdf7f2
TL
1189 -DWITH_PYTHON3=%{python3_version} \
1190 -DWITH_MGR_DASHBOARD_FRONTEND=OFF \
7c673cae
FG
1191%if 0%{without ceph_test_package}
1192 -DWITH_TESTS=OFF \
1193%endif
1194%if 0%{with cephfs_java}
1195 -DWITH_CEPHFS_JAVA=ON \
1196%endif
1197%if 0%{with selinux}
1198 -DWITH_SELINUX=ON \
1199%endif
1200%if %{with lttng}
1201 -DWITH_LTTNG=ON \
c07f9fc5 1202 -DWITH_BABELTRACE=ON \
7c673cae
FG
1203%else
1204 -DWITH_LTTNG=OFF \
c07f9fc5 1205 -DWITH_BABELTRACE=OFF \
7c673cae
FG
1206%endif
1207 $CEPH_EXTRA_CMAKE_ARGS \
1208%if 0%{with ocf}
1209 -DWITH_OCF=ON \
31f18b77
FG
1210%endif
1211%ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64
b32b8144 1212 -DWITH_BOOST_CONTEXT=ON \
31f18b77 1213%else
b32b8144 1214 -DWITH_BOOST_CONTEXT=OFF \
7c673cae 1215%endif
11fdf7f2
TL
1216%if 0%{with cephfs_shell}
1217 -DWITH_CEPHFS_SHELL=ON \
1218%endif
1219%if 0%{with libradosstriper}
1220 -DWITH_LIBRADOSSTRIPER=ON \
1221%else
1222 -DWITH_LIBRADOSSTRIPER=OFF \
1223%endif
1224%if 0%{with amqp_endpoint}
1225 -DWITH_RADOSGW_AMQP_ENDPOINT=ON \
1226%else
1227 -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \
9f95a23c
TL
1228%endif
1229%if 0%{with kafka_endpoint}
1230 -DWITH_RADOSGW_KAFKA_ENDPOINT=ON \
1231%else
1232 -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \
1233%endif
1234%if 0%{with cmake_verbose_logging}
1235 -DCMAKE_VERBOSE_MAKEFILE=ON \
11fdf7f2
TL
1236%endif
1237 -DBOOST_J=$CEPH_SMP_NCPUS \
1238 -DWITH_GRAFANA=ON
7c673cae 1239
9f95a23c
TL
1240%if %{with cmake_verbose_logging}
1241cat ./CMakeFiles/CMakeOutput.log
1242cat ./CMakeFiles/CMakeError.log
1243%endif
1244
11fdf7f2 1245make "$CEPH_MFLAGS_JOBS"
7c673cae
FG
1246
1247
1248%if 0%{with make_check}
1249%check
1250# run in-tree unittests
1251cd build
11fdf7f2 1252ctest "$CEPH_MFLAGS_JOBS"
7c673cae
FG
1253%endif
1254
1255
7c673cae
FG
1256%install
1257pushd build
1258make DESTDIR=%{buildroot} install
1259# we have dropped sysvinit bits
1260rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph
1261popd
1262install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
1263%if 0%{?fedora} || 0%{?rhel}
1264install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph
1265%endif
1266%if 0%{?suse_version}
11fdf7f2 1267install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_fillupdir}/sysconfig.%{name}
7c673cae
FG
1268%endif
1269install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf
7c673cae
FG
1270install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset
1271mkdir -p %{buildroot}%{_sbindir}
1272install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
1273chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf
31f18b77 1274install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
b32b8144 1275install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
7c673cae 1276
9f95a23c
TL
1277install -m 0755 src/cephadm/cephadm %{buildroot}%{_sbindir}/cephadm
1278mkdir -p %{buildroot}%{_sharedstatedir}/cephadm
1279chmod 0700 %{buildroot}%{_sharedstatedir}/cephadm
1280mkdir -p %{buildroot}%{_sharedstatedir}/cephadm/.ssh
1281chmod 0700 %{buildroot}%{_sharedstatedir}/cephadm/.ssh
1282touch %{buildroot}%{_sharedstatedir}/cephadm/.ssh/authorized_keys
1283chmod 0600 %{buildroot}%{_sharedstatedir}/cephadm/.ssh/authorized_keys
1284
7c673cae
FG
1285# firewall templates and /sbin/mount.ceph symlink
1286%if 0%{?suse_version}
7c673cae
FG
1287mkdir -p %{buildroot}/sbin
1288ln -sf %{_sbindir}/mount.ceph %{buildroot}/sbin/mount.ceph
1289%endif
1290
1291# udev rules
1292install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules
11fdf7f2
TL
1293
1294# sudoers.d
1295install -m 0600 -D sudoers.d/ceph-osd-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
9f95a23c
TL
1296install -m 0600 -D sudoers.d/cephadm %{buildroot}%{_sysconfdir}/sudoers.d/cephadm
1297
1298%if 0%{?rhel} >= 8
1299pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/*
1300pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_sbindir}/*
1301%endif
7c673cae
FG
1302
1303#set up placeholder directories
1304mkdir -p %{buildroot}%{_sysconfdir}/ceph
1305mkdir -p %{buildroot}%{_localstatedir}/run/ceph
1306mkdir -p %{buildroot}%{_localstatedir}/log/ceph
1307mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp
1308mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon
1309mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/osd
1310mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mds
1311mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mgr
11fdf7f2
TL
1312mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash
1313mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash/posted
7c673cae
FG
1314mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/radosgw
1315mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-osd
1316mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds
1317mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw
1318mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mgr
d2e6a577 1319mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd
11fdf7f2 1320mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
7c673cae 1321
801d1391
TL
1322# prometheus alerts
1323install -m 644 -D monitoring/prometheus/alerts/ceph_default_alerts.yml %{buildroot}/etc/prometheus/ceph/ceph_default_alerts.yml
1324
7c673cae
FG
1325%if 0%{?suse_version}
1326# create __pycache__ directories and their contents
1327%py3_compile %{buildroot}%{python3_sitelib}
eafe8130
TL
1328# hardlink duplicate files under /usr to save space
1329%fdupes %{buildroot}%{_prefix}
7c673cae 1330%endif
eafe8130 1331
11fdf7f2
TL
1332%if 0%{?rhel} == 8
1333%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}
1334%endif
7c673cae
FG
1335
1336%clean
1337rm -rf %{buildroot}
1338
1339#################################################################################
1340# files and systemd scriptlets
1341#################################################################################
1342%files
1343
1344%files base
11fdf7f2 1345%{_bindir}/ceph-crash
7c673cae
FG
1346%{_bindir}/crushtool
1347%{_bindir}/monmaptool
1348%{_bindir}/osdmaptool
b32b8144 1349%{_bindir}/ceph-kvstore-tool
7c673cae 1350%{_bindir}/ceph-run
7c673cae
FG
1351%{_libexecdir}/systemd/system-preset/50-ceph.preset
1352%{_sbindir}/ceph-create-keys
7c673cae
FG
1353%dir %{_libexecdir}/ceph
1354%{_libexecdir}/ceph/ceph_common.sh
1355%dir %{_libdir}/rados-classes
1356%{_libdir}/rados-classes/*
1357%dir %{_libdir}/ceph
1358%dir %{_libdir}/ceph/erasure-code
1359%{_libdir}/ceph/erasure-code/libec_*.so*
1360%dir %{_libdir}/ceph/compressor
1361%{_libdir}/ceph/compressor/libceph_*.so*
11fdf7f2 1362%{_unitdir}/ceph-crash.service
7c673cae
FG
1363%dir %{_libdir}/ceph/crypto
1364%{_libdir}/ceph/crypto/libceph_*.so*
7c673cae
FG
1365%if %{with lttng}
1366%{_libdir}/libos_tp.so*
1367%{_libdir}/libosd_tp.so*
1368%endif
7c673cae
FG
1369%config(noreplace) %{_sysconfdir}/logrotate.d/ceph
1370%if 0%{?fedora} || 0%{?rhel}
1371%config(noreplace) %{_sysconfdir}/sysconfig/ceph
1372%endif
1373%if 0%{?suse_version}
11fdf7f2 1374%{_fillupdir}/sysconfig.*
7c673cae
FG
1375%endif
1376%{_unitdir}/ceph.target
11fdf7f2
TL
1377%dir %{python3_sitelib}/ceph_volume
1378%{python3_sitelib}/ceph_volume/*
1379%{python3_sitelib}/ceph_volume-*
7c673cae 1380%{_mandir}/man8/ceph-deploy.8*
7c673cae
FG
1381%{_mandir}/man8/ceph-create-keys.8*
1382%{_mandir}/man8/ceph-run.8*
1383%{_mandir}/man8/crushtool.8*
1384%{_mandir}/man8/osdmaptool.8*
1385%{_mandir}/man8/monmaptool.8*
b32b8144 1386%{_mandir}/man8/ceph-kvstore-tool.8*
7c673cae 1387#set up placeholder directories
11fdf7f2
TL
1388%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash
1389%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash/posted
7c673cae
FG
1390%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/tmp
1391%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd
1392%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mds
1393%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rgw
1394%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mgr
d2e6a577 1395%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd
11fdf7f2 1396%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
7c673cae
FG
1397
1398%post base
1399/sbin/ldconfig
1400%if 0%{?suse_version}
1401%fillup_only
1402if [ $1 -eq 1 ] ; then
11fdf7f2 1403/usr/bin/systemctl preset ceph.target ceph-crash.service >/dev/null 2>&1 || :
7c673cae
FG
1404fi
1405%endif
1406%if 0%{?fedora} || 0%{?rhel}
11fdf7f2 1407%systemd_post ceph.target ceph-crash.service
7c673cae
FG
1408%endif
1409if [ $1 -eq 1 ] ; then
11fdf7f2 1410/usr/bin/systemctl start ceph.target ceph-crash.service >/dev/null 2>&1 || :
7c673cae
FG
1411fi
1412
1413%preun base
1414%if 0%{?suse_version}
11fdf7f2 1415%service_del_preun ceph.target ceph-crash.service
7c673cae
FG
1416%endif
1417%if 0%{?fedora} || 0%{?rhel}
11fdf7f2 1418%systemd_preun ceph.target ceph-crash.service
7c673cae
FG
1419%endif
1420
1421%postun base
1422/sbin/ldconfig
1423%if 0%{?suse_version}
1424DISABLE_RESTART_ON_UPDATE="yes"
11fdf7f2 1425%service_del_postun ceph.target
7c673cae
FG
1426%endif
1427%if 0%{?fedora} || 0%{?rhel}
11fdf7f2 1428%systemd_postun ceph.target
7c673cae 1429%endif
11fdf7f2 1430if [ $1 -ge 1 ] ; then
31f18b77
FG
1431 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1432 # "yes". In any case: if units are not running, do not touch them.
1433 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1434 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1435 source $SYSCONF_CEPH
1436 fi
31f18b77 1437fi
7c673cae 1438
9f95a23c
TL
1439%pre -n cephadm
1440getent group cephadm >/dev/null || groupadd -r cephadm
1441getent passwd cephadm >/dev/null || useradd -r -g cephadm -s /bin/bash -c "cephadm user for mgr/cephadm" -d %{_sharedstatedir}/cephadm cephadm
1442exit 0
1443
1444%if ! 0%{?suse_version}
1445%postun -n cephadm
1446userdel -r cephadm || true
1447exit 0
1448%endif
1449
1450%files -n cephadm
1451%{_sbindir}/cephadm
1911f103 1452%{_mandir}/man8/cephadm.8*
9f95a23c
TL
1453%{_sysconfdir}/sudoers.d/cephadm
1454%attr(0700,cephadm,cephadm) %dir %{_sharedstatedir}/cephadm
1455%attr(0700,cephadm,cephadm) %dir %{_sharedstatedir}/cephadm/.ssh
1456%attr(0600,cephadm,cephadm) %{_sharedstatedir}/cephadm/.ssh/authorized_keys
1457
7c673cae 1458%files common
224ce89b 1459%dir %{_docdir}/ceph
31f18b77 1460%doc %{_docdir}/ceph/sample.ceph.conf
11fdf7f2 1461%license %{_docdir}/ceph/COPYING
7c673cae
FG
1462%{_bindir}/ceph
1463%{_bindir}/ceph-authtool
1464%{_bindir}/ceph-conf
1465%{_bindir}/ceph-dencoder
1466%{_bindir}/ceph-rbdnamer
1467%{_bindir}/ceph-syn
7c673cae
FG
1468%{_bindir}/cephfs-data-scan
1469%{_bindir}/cephfs-journal-tool
1470%{_bindir}/cephfs-table-tool
1471%{_bindir}/rados
1472%{_bindir}/radosgw-admin
1473%{_bindir}/rbd
1474%{_bindir}/rbd-replay
1475%{_bindir}/rbd-replay-many
1476%{_bindir}/rbdmap
1477%{_sbindir}/mount.ceph
1478%if 0%{?suse_version}
1479/sbin/mount.ceph
1480%endif
1481%if %{with lttng}
1482%{_bindir}/rbd-replay-prep
1483%endif
1484%{_bindir}/ceph-post-file
7c673cae
FG
1485%{_tmpfilesdir}/ceph-common.conf
1486%{_mandir}/man8/ceph-authtool.8*
1487%{_mandir}/man8/ceph-conf.8*
1488%{_mandir}/man8/ceph-dencoder.8*
1489%{_mandir}/man8/ceph-rbdnamer.8*
1490%{_mandir}/man8/ceph-syn.8*
1491%{_mandir}/man8/ceph-post-file.8*
1492%{_mandir}/man8/ceph.8*
1493%{_mandir}/man8/mount.ceph.8*
1494%{_mandir}/man8/rados.8*
1495%{_mandir}/man8/radosgw-admin.8*
1496%{_mandir}/man8/rbd.8*
1497%{_mandir}/man8/rbdmap.8*
1498%{_mandir}/man8/rbd-replay.8*
1499%{_mandir}/man8/rbd-replay-many.8*
1500%{_mandir}/man8/rbd-replay-prep.8*
1501%dir %{_datadir}/ceph/
1502%{_datadir}/ceph/known_hosts_drop.ceph.com
1503%{_datadir}/ceph/id_rsa_drop.ceph.com
1504%{_datadir}/ceph/id_rsa_drop.ceph.com.pub
1505%dir %{_sysconfdir}/ceph/
31f18b77 1506%config %{_sysconfdir}/bash_completion.d/ceph
7c673cae
FG
1507%config %{_sysconfdir}/bash_completion.d/rados
1508%config %{_sysconfdir}/bash_completion.d/rbd
1509%config %{_sysconfdir}/bash_completion.d/radosgw-admin
1510%config(noreplace) %{_sysconfdir}/ceph/rbdmap
1511%{_unitdir}/rbdmap.service
7c673cae
FG
1512%dir %{_udevrulesdir}
1513%{_udevrulesdir}/50-rbd.rules
1514%attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/
1515%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/
1516
1517%pre common
1518CEPH_GROUP_ID=167
1519CEPH_USER_ID=167
1520%if 0%{?rhel} || 0%{?fedora}
1521/usr/sbin/groupadd ceph -g $CEPH_GROUP_ID -o -r 2>/dev/null || :
1522/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 || :
1523%endif
1524%if 0%{?suse_version}
1525if ! getent group ceph >/dev/null ; then
1526 CEPH_GROUP_ID_OPTION=""
1527 getent group $CEPH_GROUP_ID >/dev/null || CEPH_GROUP_ID_OPTION="-g $CEPH_GROUP_ID"
1528 groupadd ceph $CEPH_GROUP_ID_OPTION -r 2>/dev/null || :
1529fi
1530if ! getent passwd ceph >/dev/null ; then
1531 CEPH_USER_ID_OPTION=""
1532 getent passwd $CEPH_USER_ID >/dev/null || CEPH_USER_ID_OPTION="-u $CEPH_USER_ID"
1533 useradd ceph $CEPH_USER_ID_OPTION -r -g ceph -s /sbin/nologin 2>/dev/null || :
1534fi
1535usermod -c "Ceph storage service" \
1536 -d %{_localstatedir}/lib/ceph \
1537 -g ceph \
1538 -s /sbin/nologin \
1539 ceph
1540%endif
1541exit 0
1542
1543%post common
1544%tmpfiles_create %{_tmpfilesdir}/ceph-common.conf
1545
1546%postun common
1547# Package removal cleanup
1548if [ "$1" -eq "0" ] ; then
1549 rm -rf %{_localstatedir}/log/ceph
1550 rm -rf %{_sysconfdir}/ceph
1551fi
1552
1553%files mds
1554%{_bindir}/ceph-mds
1555%{_mandir}/man8/ceph-mds.8*
1556%{_unitdir}/ceph-mds@.service
1557%{_unitdir}/ceph-mds.target
1558%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mds
1559
1560%post mds
1561%if 0%{?suse_version}
1562if [ $1 -eq 1 ] ; then
1563 /usr/bin/systemctl preset ceph-mds@\*.service ceph-mds.target >/dev/null 2>&1 || :
1564fi
1565%endif
1566%if 0%{?fedora} || 0%{?rhel}
1567%systemd_post ceph-mds@\*.service ceph-mds.target
1568%endif
1569if [ $1 -eq 1 ] ; then
1570/usr/bin/systemctl start ceph-mds.target >/dev/null 2>&1 || :
1571fi
1572
1573%preun mds
1574%if 0%{?suse_version}
1575%service_del_preun ceph-mds@\*.service ceph-mds.target
1576%endif
1577%if 0%{?fedora} || 0%{?rhel}
1578%systemd_preun ceph-mds@\*.service ceph-mds.target
1579%endif
1580
1581%postun mds
7c673cae
FG
1582%if 0%{?suse_version}
1583DISABLE_RESTART_ON_UPDATE="yes"
1584%service_del_postun ceph-mds@\*.service ceph-mds.target
1585%endif
1586%if 0%{?fedora} || 0%{?rhel}
1587%systemd_postun ceph-mds@\*.service ceph-mds.target
1588%endif
11fdf7f2 1589if [ $1 -ge 1 ] ; then
7c673cae
FG
1590 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1591 # "yes". In any case: if units are not running, do not touch them.
1592 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1593 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1594 source $SYSCONF_CEPH
1595 fi
1596 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1597 /usr/bin/systemctl try-restart ceph-mds@\*.service > /dev/null 2>&1 || :
1598 fi
1599fi
1600
1601%files mgr
1602%{_bindir}/ceph-mgr
11fdf7f2 1603%dir %{_datadir}/ceph/mgr
11fdf7f2
TL
1604%{_datadir}/ceph/mgr/mgr_module.*
1605%{_datadir}/ceph/mgr/mgr_util.*
9f95a23c
TL
1606%if 0%{?rhel} == 7
1607%{_datadir}/ceph/mgr/__pycache__
1608%endif
7c673cae
FG
1609%{_unitdir}/ceph-mgr@.service
1610%{_unitdir}/ceph-mgr.target
1611%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mgr
1612
1613%post mgr
1614%if 0%{?suse_version}
1615if [ $1 -eq 1 ] ; then
1616 /usr/bin/systemctl preset ceph-mgr@\*.service ceph-mgr.target >/dev/null 2>&1 || :
1617fi
1618%endif
1619%if 0%{?fedora} || 0%{?rhel}
1620%systemd_post ceph-mgr@\*.service ceph-mgr.target
1621%endif
1622if [ $1 -eq 1 ] ; then
1623/usr/bin/systemctl start ceph-mgr.target >/dev/null 2>&1 || :
1624fi
1625
1626%preun mgr
1627%if 0%{?suse_version}
1628%service_del_preun ceph-mgr@\*.service ceph-mgr.target
1629%endif
1630%if 0%{?fedora} || 0%{?rhel}
1631%systemd_preun ceph-mgr@\*.service ceph-mgr.target
1632%endif
1633
1634%postun mgr
7c673cae
FG
1635%if 0%{?suse_version}
1636DISABLE_RESTART_ON_UPDATE="yes"
1637%service_del_postun ceph-mgr@\*.service ceph-mgr.target
1638%endif
1639%if 0%{?fedora} || 0%{?rhel}
1640%systemd_postun ceph-mgr@\*.service ceph-mgr.target
1641%endif
11fdf7f2 1642if [ $1 -ge 1 ] ; then
7c673cae
FG
1643 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1644 # "yes". In any case: if units are not running, do not touch them.
1645 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1646 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1647 source $SYSCONF_CEPH
1648 fi
1649 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1650 /usr/bin/systemctl try-restart ceph-mgr@\*.service > /dev/null 2>&1 || :
1651 fi
1652fi
1653
11fdf7f2
TL
1654%files mgr-dashboard
1655%{_datadir}/ceph/mgr/dashboard
1656
1657%post mgr-dashboard
1658if [ $1 -eq 1 ] ; then
1659 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1660fi
1661
1662%postun mgr-dashboard
1663if [ $1 -eq 1 ] ; then
1664 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1665fi
1666
1667%files mgr-diskprediction-local
1668%{_datadir}/ceph/mgr/diskprediction_local
1669
1670%post mgr-diskprediction-local
1671if [ $1 -eq 1 ] ; then
1672 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1673fi
1674
1675%postun mgr-diskprediction-local
1676if [ $1 -eq 1 ] ; then
1677 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1678fi
1679
1680%files mgr-diskprediction-cloud
1681%{_datadir}/ceph/mgr/diskprediction_cloud
1682
1683%post mgr-diskprediction-cloud
1684if [ $1 -eq 1 ] ; then
1685 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1686fi
1687
1688%postun mgr-diskprediction-cloud
1689if [ $1 -eq 1 ] ; then
1690 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1691fi
1692
9f95a23c
TL
1693%files mgr-modules-core
1694%dir %{_datadir}/ceph/mgr
1695%{_datadir}/ceph/mgr/alerts
1696%{_datadir}/ceph/mgr/balancer
1697%{_datadir}/ceph/mgr/crash
1698%{_datadir}/ceph/mgr/devicehealth
1699%{_datadir}/ceph/mgr/influx
1700%{_datadir}/ceph/mgr/insights
1701%{_datadir}/ceph/mgr/iostat
1702%{_datadir}/ceph/mgr/localpool
1703%{_datadir}/ceph/mgr/orchestrator
1704%{_datadir}/ceph/mgr/osd_perf_query
1705%{_datadir}/ceph/mgr/osd_support
1706%{_datadir}/ceph/mgr/pg_autoscaler
1707%{_datadir}/ceph/mgr/progress
1708%{_datadir}/ceph/mgr/prometheus
1709%{_datadir}/ceph/mgr/rbd_support
1710%{_datadir}/ceph/mgr/restful
1711%{_datadir}/ceph/mgr/selftest
1712%{_datadir}/ceph/mgr/status
1713%{_datadir}/ceph/mgr/telegraf
1714%{_datadir}/ceph/mgr/telemetry
1715%{_datadir}/ceph/mgr/test_orchestrator
1716%{_datadir}/ceph/mgr/volumes
1717%{_datadir}/ceph/mgr/zabbix
1718
11fdf7f2
TL
1719%files mgr-rook
1720%{_datadir}/ceph/mgr/rook
1721
1722%post mgr-rook
1723if [ $1 -eq 1 ] ; then
1724 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1725fi
1726
1727%postun mgr-rook
1728if [ $1 -eq 1 ] ; then
1729 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1730fi
1731
eafe8130
TL
1732%files mgr-k8sevents
1733%{_datadir}/ceph/mgr/k8sevents
1734
1735%post mgr-k8sevents
1736if [ $1 -eq 1 ] ; then
1737 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1738fi
1739
1740%postun mgr-k8sevents
1741if [ $1 -eq 1 ] ; then
1742 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1743fi
1744
9f95a23c
TL
1745%files mgr-cephadm
1746%{_datadir}/ceph/mgr/cephadm
11fdf7f2 1747
9f95a23c 1748%post mgr-cephadm
11fdf7f2
TL
1749if [ $1 -eq 1 ] ; then
1750 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1751fi
1752
9f95a23c 1753%postun mgr-cephadm
11fdf7f2
TL
1754if [ $1 -eq 1 ] ; then
1755 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1756fi
1757
7c673cae
FG
1758%files mon
1759%{_bindir}/ceph-mon
b32b8144 1760%{_bindir}/ceph-monstore-tool
7c673cae 1761%{_mandir}/man8/ceph-mon.8*
7c673cae
FG
1762%{_unitdir}/ceph-mon@.service
1763%{_unitdir}/ceph-mon.target
1764%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon
1765
1766%post mon
1767%if 0%{?suse_version}
1768if [ $1 -eq 1 ] ; then
1769 /usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || :
1770fi
1771%endif
1772%if 0%{?fedora} || 0%{?rhel}
1773%systemd_post ceph-mon@\*.service ceph-mon.target
1774%endif
1775if [ $1 -eq 1 ] ; then
1776/usr/bin/systemctl start ceph-mon.target >/dev/null 2>&1 || :
1777fi
1778
1779%preun mon
1780%if 0%{?suse_version}
1781%service_del_preun ceph-mon@\*.service ceph-mon.target
1782%endif
1783%if 0%{?fedora} || 0%{?rhel}
1784%systemd_preun ceph-mon@\*.service ceph-mon.target
1785%endif
1786
1787%postun mon
7c673cae
FG
1788%if 0%{?suse_version}
1789DISABLE_RESTART_ON_UPDATE="yes"
1790%service_del_postun ceph-mon@\*.service ceph-mon.target
1791%endif
1792%if 0%{?fedora} || 0%{?rhel}
1793%systemd_postun ceph-mon@\*.service ceph-mon.target
1794%endif
11fdf7f2 1795if [ $1 -ge 1 ] ; then
7c673cae
FG
1796 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1797 # "yes". In any case: if units are not running, do not touch them.
1798 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1799 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1800 source $SYSCONF_CEPH
1801 fi
1802 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1803 /usr/bin/systemctl try-restart ceph-mon@\*.service > /dev/null 2>&1 || :
1804 fi
1805fi
1806
1807%files fuse
7c673cae
FG
1808%{_bindir}/ceph-fuse
1809%{_mandir}/man8/ceph-fuse.8*
1810%{_sbindir}/mount.fuse.ceph
1811%{_unitdir}/ceph-fuse@.service
1812%{_unitdir}/ceph-fuse.target
1813
1814%files -n rbd-fuse
7c673cae
FG
1815%{_bindir}/rbd-fuse
1816%{_mandir}/man8/rbd-fuse.8*
1817
1818%files -n rbd-mirror
7c673cae
FG
1819%{_bindir}/rbd-mirror
1820%{_mandir}/man8/rbd-mirror.8*
1821%{_unitdir}/ceph-rbd-mirror@.service
1822%{_unitdir}/ceph-rbd-mirror.target
1823
1824%post -n rbd-mirror
1825%if 0%{?suse_version}
1826if [ $1 -eq 1 ] ; then
1827 /usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || :
1828fi
1829%endif
1830%if 0%{?fedora} || 0%{?rhel}
1831%systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1832%endif
1833if [ $1 -eq 1 ] ; then
1834/usr/bin/systemctl start ceph-rbd-mirror.target >/dev/null 2>&1 || :
1835fi
1836
1837%preun -n rbd-mirror
1838%if 0%{?suse_version}
1839%service_del_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1840%endif
1841%if 0%{?fedora} || 0%{?rhel}
1842%systemd_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1843%endif
1844
1845%postun -n rbd-mirror
7c673cae
FG
1846%if 0%{?suse_version}
1847DISABLE_RESTART_ON_UPDATE="yes"
1848%service_del_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1849%endif
1850%if 0%{?fedora} || 0%{?rhel}
1851%systemd_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1852%endif
11fdf7f2 1853if [ $1 -ge 1 ] ; then
7c673cae
FG
1854 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1855 # "yes". In any case: if units are not running, do not touch them.
1856 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1857 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1858 source $SYSCONF_CEPH
1859 fi
1860 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1861 /usr/bin/systemctl try-restart ceph-rbd-mirror@\*.service > /dev/null 2>&1 || :
1862 fi
1863fi
1864
9f95a23c
TL
1865%files immutable-object-cache
1866%{_bindir}/ceph-immutable-object-cache
1867%{_mandir}/man8/ceph-immutable-object-cache.8*
1868%{_unitdir}/ceph-immutable-object-cache@.service
1869%{_unitdir}/ceph-immutable-object-cache.target
1870
1871%post immutable-object-cache
1872%if 0%{?suse_version}
1873if [ $1 -eq 1 ] ; then
1874 /usr/bin/systemctl preset ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target >/dev/null 2>&1 || :
1875fi
1876%endif
1877%if 0%{?fedora} || 0%{?rhel}
1878%systemd_post ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target
1879%endif
1880if [ $1 -eq 1 ] ; then
1881/usr/bin/systemctl start ceph-immutable-object-cache.target >/dev/null 2>&1 || :
1882fi
1883
1884%preun immutable-object-cache
1885%if 0%{?suse_version}
1886%service_del_preun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target
1887%endif
1888%if 0%{?fedora} || 0%{?rhel}
1889%systemd_preun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target
1890%endif
1891
1892%postun immutable-object-cache
1893test -n "$FIRST_ARG" || FIRST_ARG=$1
1894%if 0%{?suse_version}
1895DISABLE_RESTART_ON_UPDATE="yes"
1896%service_del_postun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target
1897%endif
1898%if 0%{?fedora} || 0%{?rhel}
1899%systemd_postun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target
1900%endif
1901if [ $FIRST_ARG -ge 1 ] ; then
1902 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1903 # "yes". In any case: if units are not running, do not touch them.
1904 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1905 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1906 source $SYSCONF_CEPH
1907 fi
1908 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1909 /usr/bin/systemctl try-restart ceph-immutable-object-cache@\*.service > /dev/null 2>&1 || :
1910 fi
1911fi
1912
7c673cae 1913%files -n rbd-nbd
7c673cae
FG
1914%{_bindir}/rbd-nbd
1915%{_mandir}/man8/rbd-nbd.8*
1916
1917%files radosgw
7c673cae
FG
1918%{_bindir}/radosgw
1919%{_bindir}/radosgw-token
31f18b77 1920%{_bindir}/radosgw-es
7c673cae 1921%{_bindir}/radosgw-object-expirer
9f95a23c 1922%{_libdir}/libradosgw.so*
7c673cae
FG
1923%{_mandir}/man8/radosgw.8*
1924%dir %{_localstatedir}/lib/ceph/radosgw
1925%{_unitdir}/ceph-radosgw@.service
1926%{_unitdir}/ceph-radosgw.target
1927
1928%post radosgw
9f95a23c 1929/sbin/ldconfig
7c673cae
FG
1930%if 0%{?suse_version}
1931if [ $1 -eq 1 ] ; then
1932 /usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || :
1933fi
1934%endif
1935%if 0%{?fedora} || 0%{?rhel}
1936%systemd_post ceph-radosgw@\*.service ceph-radosgw.target
1937%endif
1938if [ $1 -eq 1 ] ; then
1939/usr/bin/systemctl start ceph-radosgw.target >/dev/null 2>&1 || :
1940fi
1941
1942%preun radosgw
1943%if 0%{?suse_version}
1944%service_del_preun ceph-radosgw@\*.service ceph-radosgw.target
1945%endif
1946%if 0%{?fedora} || 0%{?rhel}
1947%systemd_preun ceph-radosgw@\*.service ceph-radosgw.target
1948%endif
1949
1950%postun radosgw
9f95a23c 1951/sbin/ldconfig
7c673cae
FG
1952%if 0%{?suse_version}
1953DISABLE_RESTART_ON_UPDATE="yes"
1954%service_del_postun ceph-radosgw@\*.service ceph-radosgw.target
1955%endif
1956%if 0%{?fedora} || 0%{?rhel}
1957%systemd_postun ceph-radosgw@\*.service ceph-radosgw.target
1958%endif
11fdf7f2 1959if [ $1 -ge 1 ] ; then
7c673cae
FG
1960 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1961 # "yes". In any case: if units are not running, do not touch them.
1962 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1963 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1964 source $SYSCONF_CEPH
1965 fi
1966 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1967 /usr/bin/systemctl try-restart ceph-radosgw@\*.service > /dev/null 2>&1 || :
1968 fi
1969fi
1970
1971%files osd
1972%{_bindir}/ceph-clsinfo
1973%{_bindir}/ceph-bluestore-tool
1974%{_bindir}/ceph-objectstore-tool
b32b8144 1975%{_bindir}/ceph-osdomap-tool
7c673cae 1976%{_bindir}/ceph-osd
7c673cae 1977%{_libexecdir}/ceph/ceph-osd-prestart.sh
b32b8144
FG
1978%{_sbindir}/ceph-volume
1979%{_sbindir}/ceph-volume-systemd
7c673cae 1980%{_mandir}/man8/ceph-clsinfo.8*
7c673cae 1981%{_mandir}/man8/ceph-osd.8*
3efd9988 1982%{_mandir}/man8/ceph-bluestore-tool.8*
b32b8144
FG
1983%{_mandir}/man8/ceph-volume.8*
1984%{_mandir}/man8/ceph-volume-systemd.8*
7c673cae
FG
1985%{_unitdir}/ceph-osd@.service
1986%{_unitdir}/ceph-osd.target
b32b8144 1987%{_unitdir}/ceph-volume@.service
7c673cae 1988%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
3efd9988 1989%config(noreplace) %{_sysctldir}/90-ceph-osd.conf
11fdf7f2 1990%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
7c673cae
FG
1991
1992%post osd
1993%if 0%{?suse_version}
1994if [ $1 -eq 1 ] ; then
b32b8144 1995 /usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || :
7c673cae
FG
1996fi
1997%endif
1998%if 0%{?fedora} || 0%{?rhel}
b32b8144 1999%systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
2000%endif
2001if [ $1 -eq 1 ] ; then
2002/usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || :
2003fi
3efd9988
FG
2004%if 0%{?sysctl_apply}
2005 %sysctl_apply 90-ceph-osd.conf
2006%else
2007 /usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || :
2008%endif
7c673cae
FG
2009
2010%preun osd
2011%if 0%{?suse_version}
b32b8144 2012%service_del_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
2013%endif
2014%if 0%{?fedora} || 0%{?rhel}
b32b8144 2015%systemd_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
2016%endif
2017
2018%postun osd
7c673cae
FG
2019%if 0%{?suse_version}
2020DISABLE_RESTART_ON_UPDATE="yes"
b32b8144 2021%service_del_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
2022%endif
2023%if 0%{?fedora} || 0%{?rhel}
b32b8144 2024%systemd_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae 2025%endif
11fdf7f2 2026if [ $1 -ge 1 ] ; then
7c673cae
FG
2027 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
2028 # "yes". In any case: if units are not running, do not touch them.
2029 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
2030 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
2031 source $SYSCONF_CEPH
2032 fi
2033 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
b32b8144 2034 /usr/bin/systemctl try-restart ceph-osd@\*.service ceph-volume@\*.service > /dev/null 2>&1 || :
7c673cae
FG
2035 fi
2036fi
2037
9f95a23c
TL
2038%if 0%{with seastar}
2039%files crimson-osd
2040%{_bindir}/crimson-osd
2041%endif
2042
7c673cae
FG
2043%if %{with ocf}
2044
2045%files resource-agents
7c673cae
FG
2046%dir %{_prefix}/lib/ocf
2047%dir %{_prefix}/lib/ocf/resource.d
2048%dir %{_prefix}/lib/ocf/resource.d/ceph
b32b8144 2049%attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/ceph/rbd
7c673cae
FG
2050
2051%endif
2052
2053%files -n librados2
7c673cae
FG
2054%{_libdir}/librados.so.*
2055%dir %{_libdir}/ceph
11fdf7f2 2056%{_libdir}/ceph/libceph-common.so.*
7c673cae
FG
2057%if %{with lttng}
2058%{_libdir}/librados_tp.so.*
2059%endif
eafe8130 2060%dir %{_sysconfdir}/ceph
7c673cae
FG
2061
2062%post -n librados2 -p /sbin/ldconfig
2063
2064%postun -n librados2 -p /sbin/ldconfig
2065
2066%files -n librados-devel
7c673cae
FG
2067%dir %{_includedir}/rados
2068%{_includedir}/rados/librados.h
7c673cae 2069%{_includedir}/rados/rados_types.h
7c673cae
FG
2070%{_libdir}/librados.so
2071%if %{with lttng}
2072%{_libdir}/librados_tp.so
2073%endif
2074%{_bindir}/librados-config
2075%{_mandir}/man8/librados-config.8*
2076
11fdf7f2
TL
2077%files -n libradospp-devel
2078%dir %{_includedir}/rados
2079%{_includedir}/rados/buffer.h
2080%{_includedir}/rados/buffer_fwd.h
2081%{_includedir}/rados/crc32c.h
2082%{_includedir}/rados/inline_memory.h
2083%{_includedir}/rados/librados.hpp
2084%{_includedir}/rados/librados_fwd.hpp
2085%{_includedir}/rados/page.h
2086%{_includedir}/rados/rados_types.hpp
2087
7c673cae 2088%files -n python%{python3_pkgversion}-rados
7c673cae
FG
2089%{python3_sitearch}/rados.cpython*.so
2090%{python3_sitearch}/rados-*.egg-info
2091
11fdf7f2 2092%if 0%{with libradosstriper}
7c673cae 2093%files -n libradosstriper1
7c673cae
FG
2094%{_libdir}/libradosstriper.so.*
2095
2096%post -n libradosstriper1 -p /sbin/ldconfig
2097
2098%postun -n libradosstriper1 -p /sbin/ldconfig
2099
2100%files -n libradosstriper-devel
7c673cae
FG
2101%dir %{_includedir}/radosstriper
2102%{_includedir}/radosstriper/libradosstriper.h
2103%{_includedir}/radosstriper/libradosstriper.hpp
2104%{_libdir}/libradosstriper.so
11fdf7f2 2105%endif
7c673cae
FG
2106
2107%files -n librbd1
7c673cae
FG
2108%{_libdir}/librbd.so.*
2109%if %{with lttng}
2110%{_libdir}/librbd_tp.so.*
2111%endif
2112
181888fb 2113%post -n librbd1 -p /sbin/ldconfig
7c673cae
FG
2114
2115%postun -n librbd1 -p /sbin/ldconfig
2116
2117%files -n librbd-devel
7c673cae
FG
2118%dir %{_includedir}/rbd
2119%{_includedir}/rbd/librbd.h
2120%{_includedir}/rbd/librbd.hpp
2121%{_includedir}/rbd/features.h
2122%{_libdir}/librbd.so
2123%if %{with lttng}
2124%{_libdir}/librbd_tp.so
2125%endif
2126
2127%files -n librgw2
7c673cae 2128%{_libdir}/librgw.so.*
11fdf7f2
TL
2129%{_libdir}/librgw_admin_user.so.*
2130%if %{with lttng}
eafe8130
TL
2131%{_libdir}/librgw_op_tp.so.*
2132%{_libdir}/librgw_rados_tp.so.*
11fdf7f2 2133%endif
7c673cae
FG
2134
2135%post -n librgw2 -p /sbin/ldconfig
2136
2137%postun -n librgw2 -p /sbin/ldconfig
2138
2139%files -n librgw-devel
7c673cae
FG
2140%dir %{_includedir}/rados
2141%{_includedir}/rados/librgw.h
11fdf7f2 2142%{_includedir}/rados/librgw_admin_user.h
7c673cae
FG
2143%{_includedir}/rados/rgw_file.h
2144%{_libdir}/librgw.so
11fdf7f2 2145%{_libdir}/librgw_admin_user.so
eafe8130
TL
2146%if %{with lttng}
2147%{_libdir}/librgw_op_tp.so
2148%{_libdir}/librgw_rados_tp.so
2149%endif
7c673cae 2150
7c673cae 2151%files -n python%{python3_pkgversion}-rgw
7c673cae
FG
2152%{python3_sitearch}/rgw.cpython*.so
2153%{python3_sitearch}/rgw-*.egg-info
2154
7c673cae 2155%files -n python%{python3_pkgversion}-rbd
7c673cae
FG
2156%{python3_sitearch}/rbd.cpython*.so
2157%{python3_sitearch}/rbd-*.egg-info
2158
2159%files -n libcephfs2
7c673cae 2160%{_libdir}/libcephfs.so.*
eafe8130 2161%dir %{_sysconfdir}/ceph
7c673cae
FG
2162
2163%post -n libcephfs2 -p /sbin/ldconfig
2164
2165%postun -n libcephfs2 -p /sbin/ldconfig
2166
2167%files -n libcephfs-devel
7c673cae
FG
2168%dir %{_includedir}/cephfs
2169%{_includedir}/cephfs/libcephfs.h
2170%{_includedir}/cephfs/ceph_statx.h
2171%{_libdir}/libcephfs.so
2172
7c673cae 2173%files -n python%{python3_pkgversion}-cephfs
7c673cae
FG
2174%{python3_sitearch}/cephfs.cpython*.so
2175%{python3_sitearch}/cephfs-*.egg-info
2176%{python3_sitelib}/ceph_volume_client.py
2177%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py*
2178
2179%files -n python%{python3_pkgversion}-ceph-argparse
7c673cae
FG
2180%{python3_sitelib}/ceph_argparse.py
2181%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py*
2182%{python3_sitelib}/ceph_daemon.py
2183%{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py*
2184
9f95a23c
TL
2185%files -n python%{python3_pkgversion}-ceph-common
2186%{python3_sitelib}/ceph
2187%{python3_sitelib}/ceph-*.egg-info
2188
11fdf7f2
TL
2189%if 0%{with cephfs_shell}
2190%files -n cephfs-shell
2191%{python3_sitelib}/cephfs_shell-*.egg-info
2192%{_bindir}/cephfs-shell
2193%endif
2194
7c673cae
FG
2195%if 0%{with ceph_test_package}
2196%files -n ceph-test
7c673cae
FG
2197%{_bindir}/ceph-client-debug
2198%{_bindir}/ceph_bench_log
2199%{_bindir}/ceph_kvstorebench
2200%{_bindir}/ceph_multi_stress_watch
2201%{_bindir}/ceph_erasure_code
2202%{_bindir}/ceph_erasure_code_benchmark
2203%{_bindir}/ceph_omapbench
2204%{_bindir}/ceph_objectstore_bench
2205%{_bindir}/ceph_perf_objectstore
2206%{_bindir}/ceph_perf_local
2207%{_bindir}/ceph_perf_msgr_client
2208%{_bindir}/ceph_perf_msgr_server
2209%{_bindir}/ceph_psim
2210%{_bindir}/ceph_radosacl
2211%{_bindir}/ceph_rgw_jsonparser
2212%{_bindir}/ceph_rgw_multiparser
2213%{_bindir}/ceph_scratchtool
2214%{_bindir}/ceph_scratchtoolpp
7c673cae 2215%{_bindir}/ceph_test_*
7c673cae 2216%{_bindir}/ceph-coverage
7c673cae 2217%{_bindir}/ceph-debugpack
9f95a23c 2218%{_bindir}/ceph-dedup-tool
7c673cae
FG
2219%{_mandir}/man8/ceph-debugpack.8*
2220%dir %{_libdir}/ceph
2221%{_libdir}/ceph/ceph-monstore-update-crush.sh
2222%endif
2223
2224%if 0%{with cephfs_java}
2225%files -n libcephfs_jni1
7c673cae
FG
2226%{_libdir}/libcephfs_jni.so.*
2227
2228%post -n libcephfs_jni1 -p /sbin/ldconfig
2229
2230%postun -n libcephfs_jni1 -p /sbin/ldconfig
2231
2232%files -n libcephfs_jni-devel
7c673cae
FG
2233%{_libdir}/libcephfs_jni.so
2234
2235%files -n cephfs-java
7c673cae
FG
2236%{_javadir}/libcephfs.jar
2237%{_javadir}/libcephfs-test.jar
2238%endif
2239
2240%files -n rados-objclass-devel
7c673cae
FG
2241%dir %{_includedir}/rados
2242%{_includedir}/rados/objclass.h
2243
2244%if 0%{with selinux}
2245%files selinux
7c673cae
FG
2246%attr(0600,root,root) %{_datadir}/selinux/packages/ceph.pp
2247%{_datadir}/selinux/devel/include/contrib/ceph.if
2248%{_mandir}/man8/ceph_selinux.8*
2249
2250%post selinux
2251# backup file_contexts before update
2252. /etc/selinux/config
2253FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
2254cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
2255
2256# Install the policy
2257/usr/sbin/semodule -i %{_datadir}/selinux/packages/ceph.pp
2258
2259# Load the policy if SELinux is enabled
2260if ! /usr/sbin/selinuxenabled; then
2261 # Do not relabel if selinux is not enabled
2262 exit 0
2263fi
2264
2265if diff ${FILE_CONTEXT} ${FILE_CONTEXT}.pre > /dev/null 2>&1; then
2266 # Do not relabel if file contexts did not change
2267 exit 0
2268fi
2269
2270# Check whether the daemons are running
2271/usr/bin/systemctl status ceph.target > /dev/null 2>&1
2272STATUS=$?
2273
2274# Stop the daemons if they were running
2275if test $STATUS -eq 0; then
2276 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
2277fi
2278
11fdf7f2
TL
2279# Relabel the files fix for first package install
2280/usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
31f18b77 2281
7c673cae
FG
2282rm -f ${FILE_CONTEXT}.pre
2283# The fixfiles command won't fix label for /var/run/ceph
2284/usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
2285
2286# Start the daemons iff they were running before
2287if test $STATUS -eq 0; then
2288 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
2289fi
2290exit 0
2291
2292%postun selinux
2293if [ $1 -eq 0 ]; then
2294 # backup file_contexts before update
2295 . /etc/selinux/config
2296 FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
2297 cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
2298
2299 # Remove the module
2300 /usr/sbin/semodule -n -r ceph > /dev/null 2>&1
2301
2302 # Reload the policy if SELinux is enabled
2303 if ! /usr/sbin/selinuxenabled ; then
2304 # Do not relabel if SELinux is not enabled
2305 exit 0
2306 fi
2307
2308 # Check whether the daemons are running
2309 /usr/bin/systemctl status ceph.target > /dev/null 2>&1
2310 STATUS=$?
2311
2312 # Stop the daemons if they were running
2313 if test $STATUS -eq 0; then
2314 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
2315 fi
2316
2317 /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
2318 rm -f ${FILE_CONTEXT}.pre
2319 # The fixfiles command won't fix label for /var/run/ceph
2320 /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
2321
2322 # Start the daemons if they were running before
2323 if test $STATUS -eq 0; then
2324 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
2325 fi
2326fi
2327exit 0
1911f103 2328%endif
7c673cae 2329
11fdf7f2
TL
2330%files grafana-dashboards
2331%if 0%{?suse_version}
81eedcae
TL
2332%attr(0755,root,root) %dir %{_sysconfdir}/grafana
2333%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards
11fdf7f2 2334%endif
801d1391 2335%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard
11fdf7f2
TL
2336%config %{_sysconfdir}/grafana/dashboards/ceph-dashboard/*
2337%doc monitoring/grafana/dashboards/README
2338%doc monitoring/grafana/README.md
7c673cae 2339
81eedcae 2340%files prometheus-alerts
801d1391
TL
2341%if 0%{?suse_version}
2342%attr(0755,root,root) %dir %{_sysconfdir}/prometheus
81eedcae 2343%endif
801d1391
TL
2344%attr(0755,root,root) %dir %{_sysconfdir}/prometheus/ceph
2345%config %{_sysconfdir}/prometheus/ceph/ceph_default_alerts.yml
7c673cae
FG
2346
2347%changelog