]> git.proxmox.com Git - ceph.git/blame - ceph/ceph.spec
build: use dgit for download target
[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
81eedcae 104Version: 14.2.2
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/
81eedcae 120Source0: %{?_remote_tarball_prefix}ceph-14.2.2.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
229BuildRequires: systemd
230%{?systemd_requires}
231PreReq: %fillup_prereq
232BuildRequires: net-tools
233BuildRequires: libbz2-devel
7c673cae
FG
234BuildRequires: mozilla-nss-devel
235BuildRequires: keyutils-devel
236BuildRequires: libopenssl-devel
237BuildRequires: lsb-release
238BuildRequires: openldap2-devel
11fdf7f2
TL
239#BuildRequires: krb5
240#BuildRequires: krb5-devel
241BuildRequires: cunit-devel
242BuildRequires: python%{_python_buildid}-setuptools
243BuildRequires: python%{_python_buildid}-Cython
244BuildRequires: python%{_python_buildid}-PrettyTable
245BuildRequires: python%{_python_buildid}-Sphinx
31f18b77 246BuildRequires: rdma-core-devel
11fdf7f2 247BuildRequires: liblz4-devel >= 1.7
81eedcae
TL
248# for prometheus-alerts
249BuildRequires: golang-github-prometheus-prometheus
7c673cae 250%endif
d2e6a577 251%if 0%{?fedora} || 0%{?rhel}
7c673cae
FG
252Requires: systemd
253BuildRequires: boost-random
7c673cae
FG
254BuildRequires: nss-devel
255BuildRequires: keyutils-libs-devel
31f18b77 256BuildRequires: libibverbs-devel
11fdf7f2 257BuildRequires: librdmacm-devel
7c673cae 258BuildRequires: openldap-devel
11fdf7f2 259#BuildRequires: krb5-devel
7c673cae 260BuildRequires: openssl-devel
11fdf7f2 261BuildRequires: CUnit-devel
7c673cae 262BuildRequires: redhat-lsb-core
11fdf7f2
TL
263%if 0%{with python2}
264BuildRequires: python2-Cython
265%endif
266BuildRequires: python%{python3_pkgversion}-devel
267BuildRequires: python%{python3_pkgversion}-setuptools
268BuildRequires: python%{python3_pkgversion}-Cython
269BuildRequires: python%{_python_buildid}-prettytable
270BuildRequires: python%{_python_buildid}-sphinx
271BuildRequires: lz4-devel >= 1.7
272%endif
273# distro-conditional make check dependencies
274%if 0%{with make_check}
275%if 0%{?fedora} || 0%{?rhel}
276BuildRequires: python%{_python_buildid}-cherrypy
277BuildRequires: python%{_python_buildid}-jwt
278BuildRequires: python%{_python_buildid}-routes
279BuildRequires: python%{_python_buildid}-werkzeug
280BuildRequires: xmlsec1
281%endif
282%if 0%{?suse_version}
283BuildRequires: python%{_python_buildid}-CherryPy
284BuildRequires: python%{_python_buildid}-PyJWT
285BuildRequires: python%{_python_buildid}-Routes
286BuildRequires: python%{_python_buildid}-Werkzeug
287BuildRequires: python%{_python_buildid}-numpy-devel
288BuildRequires: xmlsec1-devel
289%endif
7c673cae
FG
290%endif
291# lttng and babeltrace for rbd-replay-prep
292%if %{with lttng}
293%if 0%{?fedora} || 0%{?rhel}
294BuildRequires: lttng-ust-devel
295BuildRequires: libbabeltrace-devel
296%endif
297%if 0%{?suse_version}
298BuildRequires: lttng-ust-devel
299BuildRequires: babeltrace-devel
300%endif
301%endif
7c673cae
FG
302%if 0%{?suse_version}
303BuildRequires: libexpat-devel
7c673cae
FG
304%endif
305%if 0%{?rhel} || 0%{?fedora}
306BuildRequires: expat-devel
7c673cae
FG
307%endif
308#hardened-cc1
309%if 0%{?fedora} || 0%{?rhel}
310BuildRequires: redhat-rpm-config
311%endif
11fdf7f2
TL
312%if 0%{with seastar}
313%if 0%{?fedora} || 0%{?rhel}
314BuildRequires: cryptopp-devel
315BuildRequires: numactl-devel
316BuildRequires: protobuf-compiler
317%endif
318%if 0%{?suse_version}
319BuildRequires: libcryptopp-devel
320BuildRequires: libnuma-devel
321%endif
322%endif
7c673cae
FG
323
324%description
325Ceph is a massively scalable, open-source, distributed storage system that runs
326on commodity hardware and delivers object, block and file system storage.
327
328
329#################################################################################
330# subpackages
331#################################################################################
332%package base
333Summary: Ceph Base Package
334%if 0%{?suse_version}
335Group: System/Filesystems
336%endif
11fdf7f2 337Provides: ceph-test:/usr/bin/ceph-kvstore-tool
31f18b77
FG
338Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
339Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
340Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
341Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
342Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
7c673cae 343%if 0%{with selinux}
31f18b77 344Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
7c673cae 345%endif
11fdf7f2 346Requires: cryptsetup
91327a77 347Requires: e2fsprogs
11fdf7f2
TL
348Requires: findutils
349Requires: grep
7c673cae 350Requires: logrotate
91327a77 351Requires: parted
7c673cae 352Requires: psmisc
11fdf7f2
TL
353Requires: python%{_python_buildid}-requests
354Requires: python%{_python_buildid}-setuptools
355Requires: util-linux
356Requires: xfsprogs
7c673cae 357Requires: which
91327a77 358%if 0%{?fedora} || 0%{?rhel}
91327a77
AA
359# The following is necessary due to tracker 36508 and can be removed once the
360# associated upstream bugs are resolved.
361%if 0%{with tcmalloc}
362Requires: gperftools-libs >= 2.6.1
363%endif
364%endif
7c673cae 365%if 0%{?suse_version}
11fdf7f2 366Recommends: chrony
7c673cae 367%endif
7c673cae
FG
368%description base
369Base is the package that includes all the files shared amongst ceph servers
370
371%package -n ceph-common
372Summary: Ceph Common
373%if 0%{?suse_version}
374Group: System/Filesystems
375%endif
31f18b77
FG
376Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
377Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
378Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
11fdf7f2
TL
379Requires: python%{_python_buildid}-rados = %{_epoch_prefix}%{version}-%{release}
380Requires: python%{_python_buildid}-rbd = %{_epoch_prefix}%{version}-%{release}
381Requires: python%{_python_buildid}-cephfs = %{_epoch_prefix}%{version}-%{release}
382Requires: python%{_python_buildid}-rgw = %{_epoch_prefix}%{version}-%{release}
383Requires: python%{_python_buildid}-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
384Requires: python%{_python_buildid}-requests
31f18b77 385%if 0%{?fedora} || 0%{?rhel}
11fdf7f2 386Requires: python%{_python_buildid}-prettytable
31f18b77
FG
387%endif
388%if 0%{?suse_version}
11fdf7f2
TL
389Requires: python%{_python_buildid}-PrettyTable
390%endif
391%if 0%{with libradosstriper}
392Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release}
31f18b77 393%endif
7c673cae
FG
394%{?systemd_requires}
395%if 0%{?suse_version}
396Requires(pre): pwdutils
397%endif
7c673cae
FG
398%description -n ceph-common
399Common utilities to mount and interact with a ceph storage cluster.
400Comprised of files that are common to Ceph clients and servers.
401
402%package mds
403Summary: Ceph Metadata Server Daemon
404%if 0%{?suse_version}
405Group: System/Filesystems
406%endif
31f18b77 407Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
408%description mds
409ceph-mds is the metadata server daemon for the Ceph distributed file system.
410One or more instances of ceph-mds collectively manage the file system
411namespace, coordinating access to the shared OSD cluster.
412
413%package mon
414Summary: Ceph Monitor Daemon
415%if 0%{?suse_version}
416Group: System/Filesystems
417%endif
11fdf7f2 418Provides: ceph-test:/usr/bin/ceph-monstore-tool
31f18b77 419Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
420%description mon
421ceph-mon is the cluster monitor daemon for the Ceph distributed file
422system. One or more instances of ceph-mon form a Paxos part-time
423parliament cluster that provides extremely reliable and durable storage
424of cluster membership, configuration, and state.
425
426%package mgr
427Summary: Ceph Manager Daemon
7c673cae
FG
428%if 0%{?suse_version}
429Group: System/Filesystems
430%endif
31f18b77 431Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
11fdf7f2
TL
432Requires: python%{_python_buildid}-bcrypt
433Requires: python%{_python_buildid}-pecan
434Requires: python%{_python_buildid}-six
31f18b77 435%if 0%{?fedora} || 0%{?rhel}
11fdf7f2
TL
436Requires: python%{_python_buildid}-cherrypy
437Requires: python%{_python_buildid}-werkzeug
31f18b77
FG
438%endif
439%if 0%{?suse_version}
11fdf7f2
TL
440Requires: python%{_python_buildid}-CherryPy
441Requires: python%{_python_buildid}-Werkzeug
442Recommends: python%{_python_buildid}-influxdb
443Recommends: ceph-mgr-dashboard = %{_epoch_prefix}%{version}-%{release}
444Recommends: ceph-mgr-diskprediction-local = %{_epoch_prefix}%{version}-%{release}
445Recommends: ceph-mgr-diskprediction-cloud = %{_epoch_prefix}%{version}-%{release}
446Recommends: ceph-mgr-rook = %{_epoch_prefix}%{version}-%{release}
447Recommends: ceph-mgr-ssh = %{_epoch_prefix}%{version}-%{release}
448%endif
449%if 0%{?rhel} == 7
450Requires: pyOpenSSL
451%else
452Requires: python%{_python_buildid}-pyOpenSSL
31f18b77 453%endif
7c673cae
FG
454%description mgr
455ceph-mgr enables python modules that provide services (such as the REST
456module derived from Calamari) and expose CLI hooks. ceph-mgr gathers
457the cluster maps, the daemon metadata, and performance counters, and
458exposes all these to the python modules.
459
11fdf7f2
TL
460%package mgr-dashboard
461Summary: Ceph Dashboard
462BuildArch: noarch
463%if 0%{?suse_version}
464Group: System/Filesystems
465%endif
466Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
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
81eedcae 1078%autosetup -p1 -n ceph-14.2.2
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}
1230install -m 0644 -D etc/sysconfig/SuSEfirewall2.d/services/ceph-mon %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon
1231install -m 0644 -D etc/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds
1232mkdir -p %{buildroot}/sbin
1233ln -sf %{_sbindir}/mount.ceph %{buildroot}/sbin/mount.ceph
1234%endif
1235
1236# udev rules
1237install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules
11fdf7f2
TL
1238
1239# sudoers.d
1240install -m 0600 -D sudoers.d/ceph-osd-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
7c673cae
FG
1241
1242#set up placeholder directories
1243mkdir -p %{buildroot}%{_sysconfdir}/ceph
1244mkdir -p %{buildroot}%{_localstatedir}/run/ceph
1245mkdir -p %{buildroot}%{_localstatedir}/log/ceph
1246mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp
1247mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon
1248mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/osd
1249mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mds
1250mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mgr
11fdf7f2
TL
1251mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash
1252mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash/posted
7c673cae
FG
1253mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/radosgw
1254mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-osd
1255mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds
1256mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw
1257mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mgr
d2e6a577 1258mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd
11fdf7f2 1259mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
7c673cae
FG
1260
1261%if 0%{?suse_version}
1262# create __pycache__ directories and their contents
1263%py3_compile %{buildroot}%{python3_sitelib}
81eedcae
TL
1264# prometheus alerts
1265install -m 644 -D monitoring/prometheus/alerts/ceph_default_alerts.yml %{buildroot}/etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml
7c673cae 1266%endif
11fdf7f2
TL
1267%if 0%{?rhel} == 8
1268%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}
1269%endif
7c673cae
FG
1270
1271%clean
1272rm -rf %{buildroot}
1273
1274#################################################################################
1275# files and systemd scriptlets
1276#################################################################################
1277%files
1278
1279%files base
11fdf7f2 1280%{_bindir}/ceph-crash
7c673cae
FG
1281%{_bindir}/crushtool
1282%{_bindir}/monmaptool
1283%{_bindir}/osdmaptool
b32b8144 1284%{_bindir}/ceph-kvstore-tool
7c673cae 1285%{_bindir}/ceph-run
7c673cae
FG
1286%{_libexecdir}/systemd/system-preset/50-ceph.preset
1287%{_sbindir}/ceph-create-keys
7c673cae
FG
1288%dir %{_libexecdir}/ceph
1289%{_libexecdir}/ceph/ceph_common.sh
1290%dir %{_libdir}/rados-classes
1291%{_libdir}/rados-classes/*
1292%dir %{_libdir}/ceph
1293%dir %{_libdir}/ceph/erasure-code
1294%{_libdir}/ceph/erasure-code/libec_*.so*
1295%dir %{_libdir}/ceph/compressor
1296%{_libdir}/ceph/compressor/libceph_*.so*
11fdf7f2 1297%{_unitdir}/ceph-crash.service
7c673cae
FG
1298%dir %{_libdir}/ceph/crypto
1299%{_libdir}/ceph/crypto/libceph_*.so*
7c673cae
FG
1300%if %{with lttng}
1301%{_libdir}/libos_tp.so*
1302%{_libdir}/libosd_tp.so*
1303%endif
7c673cae
FG
1304%config(noreplace) %{_sysconfdir}/logrotate.d/ceph
1305%if 0%{?fedora} || 0%{?rhel}
1306%config(noreplace) %{_sysconfdir}/sysconfig/ceph
1307%endif
1308%if 0%{?suse_version}
11fdf7f2 1309%{_fillupdir}/sysconfig.*
7c673cae
FG
1310%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon
1311%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds
1312%endif
1313%{_unitdir}/ceph.target
11fdf7f2 1314%if 0%{with python2}
d2e6a577
FG
1315%dir %{python_sitelib}/ceph_volume
1316%{python_sitelib}/ceph_volume/*
1317%{python_sitelib}/ceph_volume-*
11fdf7f2
TL
1318%else
1319%dir %{python3_sitelib}/ceph_volume
1320%{python3_sitelib}/ceph_volume/*
1321%{python3_sitelib}/ceph_volume-*
1322%endif
7c673cae 1323%{_mandir}/man8/ceph-deploy.8*
7c673cae
FG
1324%{_mandir}/man8/ceph-create-keys.8*
1325%{_mandir}/man8/ceph-run.8*
1326%{_mandir}/man8/crushtool.8*
1327%{_mandir}/man8/osdmaptool.8*
1328%{_mandir}/man8/monmaptool.8*
b32b8144 1329%{_mandir}/man8/ceph-kvstore-tool.8*
7c673cae 1330#set up placeholder directories
11fdf7f2
TL
1331%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash
1332%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash/posted
7c673cae
FG
1333%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/tmp
1334%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd
1335%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mds
1336%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rgw
1337%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mgr
d2e6a577 1338%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd
11fdf7f2 1339%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
7c673cae
FG
1340
1341%post base
1342/sbin/ldconfig
1343%if 0%{?suse_version}
1344%fillup_only
1345if [ $1 -eq 1 ] ; then
11fdf7f2 1346/usr/bin/systemctl preset ceph.target ceph-crash.service >/dev/null 2>&1 || :
7c673cae
FG
1347fi
1348%endif
1349%if 0%{?fedora} || 0%{?rhel}
11fdf7f2 1350%systemd_post ceph.target ceph-crash.service
7c673cae
FG
1351%endif
1352if [ $1 -eq 1 ] ; then
11fdf7f2 1353/usr/bin/systemctl start ceph.target ceph-crash.service >/dev/null 2>&1 || :
7c673cae
FG
1354fi
1355
1356%preun base
1357%if 0%{?suse_version}
11fdf7f2 1358%service_del_preun ceph.target ceph-crash.service
7c673cae
FG
1359%endif
1360%if 0%{?fedora} || 0%{?rhel}
11fdf7f2 1361%systemd_preun ceph.target ceph-crash.service
7c673cae
FG
1362%endif
1363
1364%postun base
1365/sbin/ldconfig
1366%if 0%{?suse_version}
1367DISABLE_RESTART_ON_UPDATE="yes"
11fdf7f2 1368%service_del_postun ceph.target
7c673cae
FG
1369%endif
1370%if 0%{?fedora} || 0%{?rhel}
11fdf7f2 1371%systemd_postun ceph.target
7c673cae 1372%endif
11fdf7f2 1373if [ $1 -ge 1 ] ; then
31f18b77
FG
1374 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1375 # "yes". In any case: if units are not running, do not touch them.
1376 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1377 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1378 source $SYSCONF_CEPH
1379 fi
31f18b77 1380fi
7c673cae
FG
1381
1382%files common
224ce89b 1383%dir %{_docdir}/ceph
31f18b77 1384%doc %{_docdir}/ceph/sample.ceph.conf
11fdf7f2 1385%license %{_docdir}/ceph/COPYING
7c673cae
FG
1386%{_bindir}/ceph
1387%{_bindir}/ceph-authtool
1388%{_bindir}/ceph-conf
1389%{_bindir}/ceph-dencoder
1390%{_bindir}/ceph-rbdnamer
1391%{_bindir}/ceph-syn
7c673cae
FG
1392%{_bindir}/cephfs-data-scan
1393%{_bindir}/cephfs-journal-tool
1394%{_bindir}/cephfs-table-tool
1395%{_bindir}/rados
1396%{_bindir}/radosgw-admin
1397%{_bindir}/rbd
1398%{_bindir}/rbd-replay
1399%{_bindir}/rbd-replay-many
1400%{_bindir}/rbdmap
1401%{_sbindir}/mount.ceph
1402%if 0%{?suse_version}
1403/sbin/mount.ceph
1404%endif
1405%if %{with lttng}
1406%{_bindir}/rbd-replay-prep
1407%endif
1408%{_bindir}/ceph-post-file
7c673cae
FG
1409%{_tmpfilesdir}/ceph-common.conf
1410%{_mandir}/man8/ceph-authtool.8*
1411%{_mandir}/man8/ceph-conf.8*
1412%{_mandir}/man8/ceph-dencoder.8*
1413%{_mandir}/man8/ceph-rbdnamer.8*
1414%{_mandir}/man8/ceph-syn.8*
1415%{_mandir}/man8/ceph-post-file.8*
1416%{_mandir}/man8/ceph.8*
1417%{_mandir}/man8/mount.ceph.8*
1418%{_mandir}/man8/rados.8*
1419%{_mandir}/man8/radosgw-admin.8*
1420%{_mandir}/man8/rbd.8*
1421%{_mandir}/man8/rbdmap.8*
1422%{_mandir}/man8/rbd-replay.8*
1423%{_mandir}/man8/rbd-replay-many.8*
1424%{_mandir}/man8/rbd-replay-prep.8*
1425%dir %{_datadir}/ceph/
1426%{_datadir}/ceph/known_hosts_drop.ceph.com
1427%{_datadir}/ceph/id_rsa_drop.ceph.com
1428%{_datadir}/ceph/id_rsa_drop.ceph.com.pub
1429%dir %{_sysconfdir}/ceph/
31f18b77 1430%config %{_sysconfdir}/bash_completion.d/ceph
7c673cae
FG
1431%config %{_sysconfdir}/bash_completion.d/rados
1432%config %{_sysconfdir}/bash_completion.d/rbd
1433%config %{_sysconfdir}/bash_completion.d/radosgw-admin
1434%config(noreplace) %{_sysconfdir}/ceph/rbdmap
1435%{_unitdir}/rbdmap.service
7c673cae
FG
1436%dir %{_udevrulesdir}
1437%{_udevrulesdir}/50-rbd.rules
1438%attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/
1439%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/
1440
1441%pre common
1442CEPH_GROUP_ID=167
1443CEPH_USER_ID=167
1444%if 0%{?rhel} || 0%{?fedora}
1445/usr/sbin/groupadd ceph -g $CEPH_GROUP_ID -o -r 2>/dev/null || :
1446/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 || :
1447%endif
1448%if 0%{?suse_version}
1449if ! getent group ceph >/dev/null ; then
1450 CEPH_GROUP_ID_OPTION=""
1451 getent group $CEPH_GROUP_ID >/dev/null || CEPH_GROUP_ID_OPTION="-g $CEPH_GROUP_ID"
1452 groupadd ceph $CEPH_GROUP_ID_OPTION -r 2>/dev/null || :
1453fi
1454if ! getent passwd ceph >/dev/null ; then
1455 CEPH_USER_ID_OPTION=""
1456 getent passwd $CEPH_USER_ID >/dev/null || CEPH_USER_ID_OPTION="-u $CEPH_USER_ID"
1457 useradd ceph $CEPH_USER_ID_OPTION -r -g ceph -s /sbin/nologin 2>/dev/null || :
1458fi
1459usermod -c "Ceph storage service" \
1460 -d %{_localstatedir}/lib/ceph \
1461 -g ceph \
1462 -s /sbin/nologin \
1463 ceph
1464%endif
1465exit 0
1466
1467%post common
1468%tmpfiles_create %{_tmpfilesdir}/ceph-common.conf
1469
1470%postun common
1471# Package removal cleanup
1472if [ "$1" -eq "0" ] ; then
1473 rm -rf %{_localstatedir}/log/ceph
1474 rm -rf %{_sysconfdir}/ceph
1475fi
1476
1477%files mds
1478%{_bindir}/ceph-mds
1479%{_mandir}/man8/ceph-mds.8*
1480%{_unitdir}/ceph-mds@.service
1481%{_unitdir}/ceph-mds.target
1482%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mds
1483
1484%post mds
1485%if 0%{?suse_version}
1486if [ $1 -eq 1 ] ; then
1487 /usr/bin/systemctl preset ceph-mds@\*.service ceph-mds.target >/dev/null 2>&1 || :
1488fi
1489%endif
1490%if 0%{?fedora} || 0%{?rhel}
1491%systemd_post ceph-mds@\*.service ceph-mds.target
1492%endif
1493if [ $1 -eq 1 ] ; then
1494/usr/bin/systemctl start ceph-mds.target >/dev/null 2>&1 || :
1495fi
1496
1497%preun mds
1498%if 0%{?suse_version}
1499%service_del_preun ceph-mds@\*.service ceph-mds.target
1500%endif
1501%if 0%{?fedora} || 0%{?rhel}
1502%systemd_preun ceph-mds@\*.service ceph-mds.target
1503%endif
1504
1505%postun mds
7c673cae
FG
1506%if 0%{?suse_version}
1507DISABLE_RESTART_ON_UPDATE="yes"
1508%service_del_postun ceph-mds@\*.service ceph-mds.target
1509%endif
1510%if 0%{?fedora} || 0%{?rhel}
1511%systemd_postun ceph-mds@\*.service ceph-mds.target
1512%endif
11fdf7f2 1513if [ $1 -ge 1 ] ; then
7c673cae
FG
1514 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1515 # "yes". In any case: if units are not running, do not touch them.
1516 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1517 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1518 source $SYSCONF_CEPH
1519 fi
1520 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1521 /usr/bin/systemctl try-restart ceph-mds@\*.service > /dev/null 2>&1 || :
1522 fi
1523fi
1524
1525%files mgr
1526%{_bindir}/ceph-mgr
11fdf7f2
TL
1527%dir %{_datadir}/ceph/mgr
1528%{_datadir}/ceph/mgr/ansible
1529%{_datadir}/ceph/mgr/balancer
1530%{_datadir}/ceph/mgr/crash
1531%{_datadir}/ceph/mgr/deepsea
1532%{_datadir}/ceph/mgr/devicehealth
1533%{_datadir}/ceph/mgr/influx
1534%{_datadir}/ceph/mgr/insights
1535%{_datadir}/ceph/mgr/iostat
1536%{_datadir}/ceph/mgr/localpool
1537%{_datadir}/ceph/mgr/mgr_module.*
1538%{_datadir}/ceph/mgr/mgr_util.*
1539%{_datadir}/ceph/mgr/orchestrator_cli
1540%{_datadir}/ceph/mgr/orchestrator.*
1541%{_datadir}/ceph/mgr/osd_perf_query
1542%{_datadir}/ceph/mgr/pg_autoscaler
1543%{_datadir}/ceph/mgr/progress
1544%{_datadir}/ceph/mgr/prometheus
1545%{_datadir}/ceph/mgr/rbd_support
1546%{_datadir}/ceph/mgr/restful
1547%{_datadir}/ceph/mgr/selftest
1548%{_datadir}/ceph/mgr/status
1549%{_datadir}/ceph/mgr/telegraf
1550%{_datadir}/ceph/mgr/telemetry
1551%{_datadir}/ceph/mgr/test_orchestrator
1552%{_datadir}/ceph/mgr/volumes
1553%{_datadir}/ceph/mgr/zabbix
7c673cae
FG
1554%{_unitdir}/ceph-mgr@.service
1555%{_unitdir}/ceph-mgr.target
1556%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mgr
1557
1558%post mgr
1559%if 0%{?suse_version}
1560if [ $1 -eq 1 ] ; then
1561 /usr/bin/systemctl preset ceph-mgr@\*.service ceph-mgr.target >/dev/null 2>&1 || :
1562fi
1563%endif
1564%if 0%{?fedora} || 0%{?rhel}
1565%systemd_post ceph-mgr@\*.service ceph-mgr.target
1566%endif
1567if [ $1 -eq 1 ] ; then
1568/usr/bin/systemctl start ceph-mgr.target >/dev/null 2>&1 || :
1569fi
1570
1571%preun mgr
1572%if 0%{?suse_version}
1573%service_del_preun ceph-mgr@\*.service ceph-mgr.target
1574%endif
1575%if 0%{?fedora} || 0%{?rhel}
1576%systemd_preun ceph-mgr@\*.service ceph-mgr.target
1577%endif
1578
1579%postun mgr
7c673cae
FG
1580%if 0%{?suse_version}
1581DISABLE_RESTART_ON_UPDATE="yes"
1582%service_del_postun ceph-mgr@\*.service ceph-mgr.target
1583%endif
1584%if 0%{?fedora} || 0%{?rhel}
1585%systemd_postun ceph-mgr@\*.service ceph-mgr.target
1586%endif
11fdf7f2 1587if [ $1 -ge 1 ] ; then
7c673cae
FG
1588 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1589 # "yes". In any case: if units are not running, do not touch them.
1590 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1591 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1592 source $SYSCONF_CEPH
1593 fi
1594 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1595 /usr/bin/systemctl try-restart ceph-mgr@\*.service > /dev/null 2>&1 || :
1596 fi
1597fi
1598
11fdf7f2
TL
1599%files mgr-dashboard
1600%{_datadir}/ceph/mgr/dashboard
1601
1602%post mgr-dashboard
1603if [ $1 -eq 1 ] ; then
1604 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1605fi
1606
1607%postun mgr-dashboard
1608if [ $1 -eq 1 ] ; then
1609 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1610fi
1611
1612%files mgr-diskprediction-local
1613%{_datadir}/ceph/mgr/diskprediction_local
1614
1615%post mgr-diskprediction-local
1616if [ $1 -eq 1 ] ; then
1617 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1618fi
1619
1620%postun mgr-diskprediction-local
1621if [ $1 -eq 1 ] ; then
1622 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1623fi
1624
1625%files mgr-diskprediction-cloud
1626%{_datadir}/ceph/mgr/diskprediction_cloud
1627
1628%post mgr-diskprediction-cloud
1629if [ $1 -eq 1 ] ; then
1630 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1631fi
1632
1633%postun mgr-diskprediction-cloud
1634if [ $1 -eq 1 ] ; then
1635 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1636fi
1637
1638%files mgr-rook
1639%{_datadir}/ceph/mgr/rook
1640
1641%post mgr-rook
1642if [ $1 -eq 1 ] ; then
1643 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1644fi
1645
1646%postun mgr-rook
1647if [ $1 -eq 1 ] ; then
1648 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1649fi
1650
1651%files mgr-ssh
1652%{_datadir}/ceph/mgr/ssh
1653
1654%post mgr-ssh
1655if [ $1 -eq 1 ] ; then
1656 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1657fi
1658
1659%postun mgr-ssh
1660if [ $1 -eq 1 ] ; then
1661 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1662fi
1663
7c673cae
FG
1664%files mon
1665%{_bindir}/ceph-mon
b32b8144 1666%{_bindir}/ceph-monstore-tool
7c673cae 1667%{_mandir}/man8/ceph-mon.8*
7c673cae
FG
1668%{_unitdir}/ceph-mon@.service
1669%{_unitdir}/ceph-mon.target
1670%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon
1671
1672%post mon
1673%if 0%{?suse_version}
1674if [ $1 -eq 1 ] ; then
1675 /usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || :
1676fi
1677%endif
1678%if 0%{?fedora} || 0%{?rhel}
1679%systemd_post ceph-mon@\*.service ceph-mon.target
1680%endif
1681if [ $1 -eq 1 ] ; then
1682/usr/bin/systemctl start ceph-mon.target >/dev/null 2>&1 || :
1683fi
1684
1685%preun mon
1686%if 0%{?suse_version}
1687%service_del_preun ceph-mon@\*.service ceph-mon.target
1688%endif
1689%if 0%{?fedora} || 0%{?rhel}
1690%systemd_preun ceph-mon@\*.service ceph-mon.target
1691%endif
1692
1693%postun mon
7c673cae
FG
1694%if 0%{?suse_version}
1695DISABLE_RESTART_ON_UPDATE="yes"
1696%service_del_postun ceph-mon@\*.service ceph-mon.target
1697%endif
1698%if 0%{?fedora} || 0%{?rhel}
1699%systemd_postun ceph-mon@\*.service ceph-mon.target
1700%endif
11fdf7f2 1701if [ $1 -ge 1 ] ; then
7c673cae
FG
1702 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1703 # "yes". In any case: if units are not running, do not touch them.
1704 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1705 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1706 source $SYSCONF_CEPH
1707 fi
1708 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1709 /usr/bin/systemctl try-restart ceph-mon@\*.service > /dev/null 2>&1 || :
1710 fi
1711fi
1712
1713%files fuse
7c673cae
FG
1714%{_bindir}/ceph-fuse
1715%{_mandir}/man8/ceph-fuse.8*
1716%{_sbindir}/mount.fuse.ceph
1717%{_unitdir}/ceph-fuse@.service
1718%{_unitdir}/ceph-fuse.target
1719
1720%files -n rbd-fuse
7c673cae
FG
1721%{_bindir}/rbd-fuse
1722%{_mandir}/man8/rbd-fuse.8*
1723
1724%files -n rbd-mirror
7c673cae
FG
1725%{_bindir}/rbd-mirror
1726%{_mandir}/man8/rbd-mirror.8*
1727%{_unitdir}/ceph-rbd-mirror@.service
1728%{_unitdir}/ceph-rbd-mirror.target
1729
1730%post -n rbd-mirror
1731%if 0%{?suse_version}
1732if [ $1 -eq 1 ] ; then
1733 /usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || :
1734fi
1735%endif
1736%if 0%{?fedora} || 0%{?rhel}
1737%systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1738%endif
1739if [ $1 -eq 1 ] ; then
1740/usr/bin/systemctl start ceph-rbd-mirror.target >/dev/null 2>&1 || :
1741fi
1742
1743%preun -n rbd-mirror
1744%if 0%{?suse_version}
1745%service_del_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1746%endif
1747%if 0%{?fedora} || 0%{?rhel}
1748%systemd_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1749%endif
1750
1751%postun -n rbd-mirror
7c673cae
FG
1752%if 0%{?suse_version}
1753DISABLE_RESTART_ON_UPDATE="yes"
1754%service_del_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1755%endif
1756%if 0%{?fedora} || 0%{?rhel}
1757%systemd_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1758%endif
11fdf7f2 1759if [ $1 -ge 1 ] ; then
7c673cae
FG
1760 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1761 # "yes". In any case: if units are not running, do not touch them.
1762 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1763 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1764 source $SYSCONF_CEPH
1765 fi
1766 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1767 /usr/bin/systemctl try-restart ceph-rbd-mirror@\*.service > /dev/null 2>&1 || :
1768 fi
1769fi
1770
1771%files -n rbd-nbd
7c673cae
FG
1772%{_bindir}/rbd-nbd
1773%{_mandir}/man8/rbd-nbd.8*
1774
1775%files radosgw
7c673cae
FG
1776%{_bindir}/radosgw
1777%{_bindir}/radosgw-token
31f18b77 1778%{_bindir}/radosgw-es
7c673cae
FG
1779%{_bindir}/radosgw-object-expirer
1780%{_mandir}/man8/radosgw.8*
1781%dir %{_localstatedir}/lib/ceph/radosgw
1782%{_unitdir}/ceph-radosgw@.service
1783%{_unitdir}/ceph-radosgw.target
1784
1785%post radosgw
1786%if 0%{?suse_version}
1787if [ $1 -eq 1 ] ; then
1788 /usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || :
1789fi
1790%endif
1791%if 0%{?fedora} || 0%{?rhel}
1792%systemd_post ceph-radosgw@\*.service ceph-radosgw.target
1793%endif
1794if [ $1 -eq 1 ] ; then
1795/usr/bin/systemctl start ceph-radosgw.target >/dev/null 2>&1 || :
1796fi
1797
1798%preun radosgw
1799%if 0%{?suse_version}
1800%service_del_preun ceph-radosgw@\*.service ceph-radosgw.target
1801%endif
1802%if 0%{?fedora} || 0%{?rhel}
1803%systemd_preun ceph-radosgw@\*.service ceph-radosgw.target
1804%endif
1805
1806%postun radosgw
7c673cae
FG
1807%if 0%{?suse_version}
1808DISABLE_RESTART_ON_UPDATE="yes"
1809%service_del_postun ceph-radosgw@\*.service ceph-radosgw.target
1810%endif
1811%if 0%{?fedora} || 0%{?rhel}
1812%systemd_postun ceph-radosgw@\*.service ceph-radosgw.target
1813%endif
11fdf7f2 1814if [ $1 -ge 1 ] ; then
7c673cae
FG
1815 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1816 # "yes". In any case: if units are not running, do not touch them.
1817 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1818 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1819 source $SYSCONF_CEPH
1820 fi
1821 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1822 /usr/bin/systemctl try-restart ceph-radosgw@\*.service > /dev/null 2>&1 || :
1823 fi
1824fi
1825
1826%files osd
1827%{_bindir}/ceph-clsinfo
1828%{_bindir}/ceph-bluestore-tool
1829%{_bindir}/ceph-objectstore-tool
b32b8144 1830%{_bindir}/ceph-osdomap-tool
7c673cae 1831%{_bindir}/ceph-osd
7c673cae 1832%{_libexecdir}/ceph/ceph-osd-prestart.sh
b32b8144
FG
1833%{_sbindir}/ceph-volume
1834%{_sbindir}/ceph-volume-systemd
7c673cae 1835%{_mandir}/man8/ceph-clsinfo.8*
7c673cae 1836%{_mandir}/man8/ceph-osd.8*
3efd9988 1837%{_mandir}/man8/ceph-bluestore-tool.8*
b32b8144
FG
1838%{_mandir}/man8/ceph-volume.8*
1839%{_mandir}/man8/ceph-volume-systemd.8*
7c673cae
FG
1840%{_unitdir}/ceph-osd@.service
1841%{_unitdir}/ceph-osd.target
b32b8144 1842%{_unitdir}/ceph-volume@.service
7c673cae 1843%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
3efd9988 1844%config(noreplace) %{_sysctldir}/90-ceph-osd.conf
11fdf7f2 1845%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
7c673cae
FG
1846
1847%post osd
1848%if 0%{?suse_version}
1849if [ $1 -eq 1 ] ; then
b32b8144 1850 /usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || :
7c673cae
FG
1851fi
1852%endif
1853%if 0%{?fedora} || 0%{?rhel}
b32b8144 1854%systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
1855%endif
1856if [ $1 -eq 1 ] ; then
1857/usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || :
1858fi
3efd9988
FG
1859%if 0%{?sysctl_apply}
1860 %sysctl_apply 90-ceph-osd.conf
1861%else
1862 /usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || :
1863%endif
7c673cae
FG
1864
1865%preun osd
1866%if 0%{?suse_version}
b32b8144 1867%service_del_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
1868%endif
1869%if 0%{?fedora} || 0%{?rhel}
b32b8144 1870%systemd_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
1871%endif
1872
1873%postun osd
7c673cae
FG
1874%if 0%{?suse_version}
1875DISABLE_RESTART_ON_UPDATE="yes"
b32b8144 1876%service_del_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae
FG
1877%endif
1878%if 0%{?fedora} || 0%{?rhel}
b32b8144 1879%systemd_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
7c673cae 1880%endif
11fdf7f2 1881if [ $1 -ge 1 ] ; then
7c673cae
FG
1882 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1883 # "yes". In any case: if units are not running, do not touch them.
1884 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1885 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1886 source $SYSCONF_CEPH
1887 fi
1888 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
b32b8144 1889 /usr/bin/systemctl try-restart ceph-osd@\*.service ceph-volume@\*.service > /dev/null 2>&1 || :
7c673cae
FG
1890 fi
1891fi
1892
1893%if %{with ocf}
1894
1895%files resource-agents
7c673cae
FG
1896%dir %{_prefix}/lib/ocf
1897%dir %{_prefix}/lib/ocf/resource.d
1898%dir %{_prefix}/lib/ocf/resource.d/ceph
b32b8144 1899%attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/ceph/rbd
7c673cae
FG
1900
1901%endif
1902
1903%files -n librados2
7c673cae
FG
1904%{_libdir}/librados.so.*
1905%dir %{_libdir}/ceph
11fdf7f2 1906%{_libdir}/ceph/libceph-common.so.*
7c673cae
FG
1907%if %{with lttng}
1908%{_libdir}/librados_tp.so.*
1909%endif
1910
1911%post -n librados2 -p /sbin/ldconfig
1912
1913%postun -n librados2 -p /sbin/ldconfig
1914
1915%files -n librados-devel
7c673cae
FG
1916%dir %{_includedir}/rados
1917%{_includedir}/rados/librados.h
7c673cae 1918%{_includedir}/rados/rados_types.h
7c673cae
FG
1919%{_libdir}/librados.so
1920%if %{with lttng}
1921%{_libdir}/librados_tp.so
1922%endif
1923%{_bindir}/librados-config
1924%{_mandir}/man8/librados-config.8*
1925
11fdf7f2
TL
1926%files -n libradospp-devel
1927%dir %{_includedir}/rados
1928%{_includedir}/rados/buffer.h
1929%{_includedir}/rados/buffer_fwd.h
1930%{_includedir}/rados/crc32c.h
1931%{_includedir}/rados/inline_memory.h
1932%{_includedir}/rados/librados.hpp
1933%{_includedir}/rados/librados_fwd.hpp
1934%{_includedir}/rados/page.h
1935%{_includedir}/rados/rados_types.hpp
1936
1937%if 0%{with python2}
7c673cae 1938%files -n python-rados
7c673cae
FG
1939%{python_sitearch}/rados.so
1940%{python_sitearch}/rados-*.egg-info
11fdf7f2 1941%endif
7c673cae
FG
1942
1943%files -n python%{python3_pkgversion}-rados
7c673cae
FG
1944%{python3_sitearch}/rados.cpython*.so
1945%{python3_sitearch}/rados-*.egg-info
1946
11fdf7f2 1947%if 0%{with libradosstriper}
7c673cae 1948%files -n libradosstriper1
7c673cae
FG
1949%{_libdir}/libradosstriper.so.*
1950
1951%post -n libradosstriper1 -p /sbin/ldconfig
1952
1953%postun -n libradosstriper1 -p /sbin/ldconfig
1954
1955%files -n libradosstriper-devel
7c673cae
FG
1956%dir %{_includedir}/radosstriper
1957%{_includedir}/radosstriper/libradosstriper.h
1958%{_includedir}/radosstriper/libradosstriper.hpp
1959%{_libdir}/libradosstriper.so
11fdf7f2 1960%endif
7c673cae
FG
1961
1962%files -n librbd1
7c673cae
FG
1963%{_libdir}/librbd.so.*
1964%if %{with lttng}
1965%{_libdir}/librbd_tp.so.*
1966%endif
1967
181888fb 1968%post -n librbd1 -p /sbin/ldconfig
7c673cae
FG
1969
1970%postun -n librbd1 -p /sbin/ldconfig
1971
1972%files -n librbd-devel
7c673cae
FG
1973%dir %{_includedir}/rbd
1974%{_includedir}/rbd/librbd.h
1975%{_includedir}/rbd/librbd.hpp
1976%{_includedir}/rbd/features.h
1977%{_libdir}/librbd.so
1978%if %{with lttng}
1979%{_libdir}/librbd_tp.so
1980%endif
1981
1982%files -n librgw2
7c673cae 1983%{_libdir}/librgw.so.*
11fdf7f2
TL
1984%{_libdir}/librgw_admin_user.so.*
1985%if %{with lttng}
1986%{_libdir}/librgw_op_tp.so*
1987%{_libdir}/librgw_rados_tp.so*
1988%endif
7c673cae
FG
1989
1990%post -n librgw2 -p /sbin/ldconfig
1991
1992%postun -n librgw2 -p /sbin/ldconfig
1993
1994%files -n librgw-devel
7c673cae
FG
1995%dir %{_includedir}/rados
1996%{_includedir}/rados/librgw.h
11fdf7f2 1997%{_includedir}/rados/librgw_admin_user.h
7c673cae
FG
1998%{_includedir}/rados/rgw_file.h
1999%{_libdir}/librgw.so
11fdf7f2 2000%{_libdir}/librgw_admin_user.so
7c673cae 2001
11fdf7f2 2002%if 0%{with python2}
7c673cae 2003%files -n python-rgw
7c673cae
FG
2004%{python_sitearch}/rgw.so
2005%{python_sitearch}/rgw-*.egg-info
11fdf7f2 2006%endif
7c673cae
FG
2007
2008%files -n python%{python3_pkgversion}-rgw
7c673cae
FG
2009%{python3_sitearch}/rgw.cpython*.so
2010%{python3_sitearch}/rgw-*.egg-info
2011
11fdf7f2 2012%if 0%{with python2}
7c673cae 2013%files -n python-rbd
7c673cae
FG
2014%{python_sitearch}/rbd.so
2015%{python_sitearch}/rbd-*.egg-info
11fdf7f2 2016%endif
7c673cae
FG
2017
2018%files -n python%{python3_pkgversion}-rbd
7c673cae
FG
2019%{python3_sitearch}/rbd.cpython*.so
2020%{python3_sitearch}/rbd-*.egg-info
2021
2022%files -n libcephfs2
7c673cae
FG
2023%{_libdir}/libcephfs.so.*
2024
2025%post -n libcephfs2 -p /sbin/ldconfig
2026
2027%postun -n libcephfs2 -p /sbin/ldconfig
2028
2029%files -n libcephfs-devel
7c673cae
FG
2030%dir %{_includedir}/cephfs
2031%{_includedir}/cephfs/libcephfs.h
2032%{_includedir}/cephfs/ceph_statx.h
2033%{_libdir}/libcephfs.so
2034
11fdf7f2 2035%if 0%{with python2}
7c673cae 2036%files -n python-cephfs
7c673cae
FG
2037%{python_sitearch}/cephfs.so
2038%{python_sitearch}/cephfs-*.egg-info
2039%{python_sitelib}/ceph_volume_client.py*
11fdf7f2 2040%endif
7c673cae
FG
2041
2042%files -n python%{python3_pkgversion}-cephfs
7c673cae
FG
2043%{python3_sitearch}/cephfs.cpython*.so
2044%{python3_sitearch}/cephfs-*.egg-info
2045%{python3_sitelib}/ceph_volume_client.py
2046%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py*
2047
11fdf7f2
TL
2048%if 0%{with python2}
2049%files -n python-ceph-argparse
2050%{python_sitelib}/ceph_argparse.py*
2051%{python_sitelib}/ceph_daemon.py*
2052%endif
2053
7c673cae 2054%files -n python%{python3_pkgversion}-ceph-argparse
7c673cae
FG
2055%{python3_sitelib}/ceph_argparse.py
2056%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py*
2057%{python3_sitelib}/ceph_daemon.py
2058%{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py*
2059
11fdf7f2
TL
2060%if 0%{with cephfs_shell}
2061%files -n cephfs-shell
2062%{python3_sitelib}/cephfs_shell-*.egg-info
2063%{_bindir}/cephfs-shell
2064%endif
2065
7c673cae
FG
2066%if 0%{with ceph_test_package}
2067%files -n ceph-test
7c673cae
FG
2068%{_bindir}/ceph-client-debug
2069%{_bindir}/ceph_bench_log
2070%{_bindir}/ceph_kvstorebench
2071%{_bindir}/ceph_multi_stress_watch
2072%{_bindir}/ceph_erasure_code
2073%{_bindir}/ceph_erasure_code_benchmark
2074%{_bindir}/ceph_omapbench
2075%{_bindir}/ceph_objectstore_bench
2076%{_bindir}/ceph_perf_objectstore
2077%{_bindir}/ceph_perf_local
2078%{_bindir}/ceph_perf_msgr_client
2079%{_bindir}/ceph_perf_msgr_server
2080%{_bindir}/ceph_psim
2081%{_bindir}/ceph_radosacl
2082%{_bindir}/ceph_rgw_jsonparser
2083%{_bindir}/ceph_rgw_multiparser
2084%{_bindir}/ceph_scratchtool
2085%{_bindir}/ceph_scratchtoolpp
7c673cae 2086%{_bindir}/ceph_test_*
7c673cae 2087%{_bindir}/ceph-coverage
7c673cae 2088%{_bindir}/ceph-debugpack
11fdf7f2 2089%{_bindir}/cephdeduptool
7c673cae
FG
2090%{_mandir}/man8/ceph-debugpack.8*
2091%dir %{_libdir}/ceph
2092%{_libdir}/ceph/ceph-monstore-update-crush.sh
2093%endif
2094
2095%if 0%{with cephfs_java}
2096%files -n libcephfs_jni1
7c673cae
FG
2097%{_libdir}/libcephfs_jni.so.*
2098
2099%post -n libcephfs_jni1 -p /sbin/ldconfig
2100
2101%postun -n libcephfs_jni1 -p /sbin/ldconfig
2102
2103%files -n libcephfs_jni-devel
7c673cae
FG
2104%{_libdir}/libcephfs_jni.so
2105
2106%files -n cephfs-java
7c673cae
FG
2107%{_javadir}/libcephfs.jar
2108%{_javadir}/libcephfs-test.jar
2109%endif
2110
2111%files -n rados-objclass-devel
7c673cae
FG
2112%dir %{_includedir}/rados
2113%{_includedir}/rados/objclass.h
2114
2115%if 0%{with selinux}
2116%files selinux
7c673cae
FG
2117%attr(0600,root,root) %{_datadir}/selinux/packages/ceph.pp
2118%{_datadir}/selinux/devel/include/contrib/ceph.if
2119%{_mandir}/man8/ceph_selinux.8*
2120
2121%post selinux
2122# backup file_contexts before update
2123. /etc/selinux/config
2124FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
2125cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
2126
2127# Install the policy
2128/usr/sbin/semodule -i %{_datadir}/selinux/packages/ceph.pp
2129
2130# Load the policy if SELinux is enabled
2131if ! /usr/sbin/selinuxenabled; then
2132 # Do not relabel if selinux is not enabled
2133 exit 0
2134fi
2135
2136if diff ${FILE_CONTEXT} ${FILE_CONTEXT}.pre > /dev/null 2>&1; then
2137 # Do not relabel if file contexts did not change
2138 exit 0
2139fi
2140
2141# Check whether the daemons are running
2142/usr/bin/systemctl status ceph.target > /dev/null 2>&1
2143STATUS=$?
2144
2145# Stop the daemons if they were running
2146if test $STATUS -eq 0; then
2147 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
2148fi
2149
11fdf7f2
TL
2150# Relabel the files fix for first package install
2151/usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
31f18b77 2152
7c673cae
FG
2153rm -f ${FILE_CONTEXT}.pre
2154# The fixfiles command won't fix label for /var/run/ceph
2155/usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
2156
2157# Start the daemons iff they were running before
2158if test $STATUS -eq 0; then
2159 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
2160fi
2161exit 0
2162
2163%postun selinux
2164if [ $1 -eq 0 ]; then
2165 # backup file_contexts before update
2166 . /etc/selinux/config
2167 FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
2168 cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
2169
2170 # Remove the module
2171 /usr/sbin/semodule -n -r ceph > /dev/null 2>&1
2172
2173 # Reload the policy if SELinux is enabled
2174 if ! /usr/sbin/selinuxenabled ; then
2175 # Do not relabel if SELinux is not enabled
2176 exit 0
2177 fi
2178
2179 # Check whether the daemons are running
2180 /usr/bin/systemctl status ceph.target > /dev/null 2>&1
2181 STATUS=$?
2182
2183 # Stop the daemons if they were running
2184 if test $STATUS -eq 0; then
2185 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
2186 fi
2187
2188 /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
2189 rm -f ${FILE_CONTEXT}.pre
2190 # The fixfiles command won't fix label for /var/run/ceph
2191 /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
2192
2193 # Start the daemons if they were running before
2194 if test $STATUS -eq 0; then
2195 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
2196 fi
2197fi
2198exit 0
2199
2200%endif # with selinux
2201
11fdf7f2 2202%if 0%{with python2}
7c673cae
FG
2203%files -n python-ceph-compat
2204# We need an empty %%files list for python-ceph-compat, to tell rpmbuild to
2205# actually build this meta package.
11fdf7f2
TL
2206%endif
2207
2208%files grafana-dashboards
2209%if 0%{?suse_version}
81eedcae
TL
2210%attr(0755,root,root) %dir %{_sysconfdir}/grafana
2211%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards
2212%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard
11fdf7f2
TL
2213%else
2214%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard
2215%endif
2216%config %{_sysconfdir}/grafana/dashboards/ceph-dashboard/*
2217%doc monitoring/grafana/dashboards/README
2218%doc monitoring/grafana/README.md
7c673cae 2219
81eedcae
TL
2220%if 0%{?suse_version}
2221%files prometheus-alerts
2222%dir /etc/prometheus/SUSE/
2223%dir /etc/prometheus/SUSE/default_rules/
2224%config /etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml
2225%endif
2226
7c673cae
FG
2227
2228%changelog