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