]> git.proxmox.com Git - ceph.git/blob - ceph/ceph.spec
import ceph nautilus 14.2.2
[ceph.git] / ceph / ceph.spec
1 # vim: set noexpandtab ts=8 sw=8 :
2 #
3 # spec file for package ceph
4 #
5 # Copyright (C) 2004-2019 The Ceph Project Developers. See COPYING file
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/
16 #
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 #################################################################################
24 %bcond_with make_check
25 %ifarch s390 s390x
26 %bcond_with tcmalloc
27 %else
28 %bcond_without tcmalloc
29 %endif
30 %if 0%{?fedora} || 0%{?rhel}
31 %bcond_without selinux
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/
39 %endif
40 %if 0%{?suse_version}
41 %bcond_with selinux
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
48 %endif
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
57 %bcond_without lttng
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
69 %endif
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
79 %endif
80
81 %if %{with selinux}
82 # get selinux policy version
83 %{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0}
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}
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}}
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}
99
100 #################################################################################
101 # main package definition
102 #################################################################################
103 Name: ceph
104 Version: 14.2.2
105 Release: 0%{?dist}
106 %if 0%{?fedora} || 0%{?rhel}
107 Epoch: 2
108 %endif
109
110 # define _epoch_prefix macro which will expand to the empty string if epoch is
111 # undefined
112 %global _epoch_prefix %{?epoch:%{epoch}:}
113
114 Summary: User space components of the Ceph file system
115 License: LGPL-2.1 and CC-BY-SA-3.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and MIT
116 %if 0%{?suse_version}
117 Group: System/Filesystems
118 %endif
119 URL: http://ceph.com/
120 Source0: %{?_remote_tarball_prefix}ceph-14.2.2.tar.bz2
121 %if 0%{?suse_version}
122 # _insert_obs_source_lines_here
123 ExclusiveArch: x86_64 aarch64 ppc64le s390x
124 %endif
125 #################################################################################
126 # dependencies that apply across all distro families
127 #################################################################################
128 Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release}
129 Requires: ceph-mds = %{_epoch_prefix}%{version}-%{release}
130 Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
131 Requires: ceph-mon = %{_epoch_prefix}%{version}-%{release}
132 Requires(post): binutils
133 %if 0%{with cephfs_java}
134 BuildRequires: java-devel
135 BuildRequires: sharutils
136 %endif
137 %if 0%{with selinux}
138 BuildRequires: checkpolicy
139 BuildRequires: selinux-policy-devel
140 %endif
141 BuildRequires: gperf
142 %if 0%{?rhel} == 7
143 BuildRequires: cmake3 > 3.5
144 %else
145 BuildRequires: cmake > 3.5
146 %endif
147 BuildRequires: cryptsetup
148 BuildRequires: fuse-devel
149 %if 0%{?rhel} == 7
150 # devtoolset offers newer make and valgrind-devel, but the old ones are good
151 # enough.
152 BuildRequires: devtoolset-7-gcc-c++ >= 7.3.1-5.13
153 %else
154 BuildRequires: gcc-c++
155 %endif
156 BuildRequires: gdbm
157 %if 0%{with tcmalloc}
158 %if 0%{?fedora} || 0%{?rhel}
159 BuildRequires: gperftools-devel >= 2.6.1
160 %endif
161 %if 0%{?suse_version}
162 BuildRequires: gperftools-devel >= 2.4
163 %endif
164 %endif
165 BuildRequires: leveldb-devel > 1.2
166 BuildRequires: libaio-devel
167 BuildRequires: libblkid-devel >= 2.17
168 BuildRequires: libcurl-devel
169 BuildRequires: libudev-devel
170 BuildRequires: liboath-devel
171 BuildRequires: libtool
172 BuildRequires: libxml2-devel
173 BuildRequires: libuuid-devel
174 BuildRequires: make
175 BuildRequires: ncurses-devel
176 BuildRequires: parted
177 BuildRequires: perl
178 BuildRequires: pkgconfig
179 BuildRequires: procps
180 BuildRequires: python%{_python_buildid}
181 BuildRequires: python%{_python_buildid}-devel
182 BuildRequires: snappy-devel
183 BuildRequires: sudo
184 BuildRequires: udev
185 BuildRequires: util-linux
186 BuildRequires: valgrind-devel
187 BuildRequires: which
188 BuildRequires: xfsprogs
189 BuildRequires: xfsprogs-devel
190 BuildRequires: xmlstarlet
191 BuildRequires: yasm
192 %if 0%{with amqp_endpoint}
193 BuildRequires: librabbitmq-devel
194 %endif
195 %if 0%{with make_check}
196 BuildRequires: jq
197 BuildRequires: python%{_python_buildid}-bcrypt
198 BuildRequires: python%{_python_buildid}-coverage
199 BuildRequires: python%{_python_buildid}-nose
200 BuildRequires: python%{_python_buildid}-pecan
201 BuildRequires: python%{_python_buildid}-requests
202 BuildRequires: python%{_python_buildid}-six
203 BuildRequires: python%{_python_buildid}-tox
204 BuildRequires: python%{_python_buildid}-virtualenv
205 %if 0%{?rhel} == 7
206 BuildRequires: pyOpenSSL%{_python_buildid}
207 %else
208 BuildRequires: python%{_python_buildid}-pyOpenSSL
209 %endif
210 BuildRequires: socat
211 %endif
212 %if 0%{with seastar}
213 BuildRequires: c-ares-devel
214 BuildRequires: gnutls-devel
215 BuildRequires: hwloc-devel
216 BuildRequires: libpciaccess-devel
217 BuildRequires: lksctp-tools-devel
218 BuildRequires: protobuf-devel
219 BuildRequires: ragel
220 BuildRequires: systemtap-sdt-devel
221 BuildRequires: yaml-cpp-devel
222 %endif
223 #################################################################################
224 # distro-conditional dependencies
225 #################################################################################
226 %if 0%{?suse_version}
227 BuildRequires: pkgconfig(systemd)
228 BuildRequires: systemd-rpm-macros
229 BuildRequires: systemd
230 %{?systemd_requires}
231 PreReq: %fillup_prereq
232 BuildRequires: net-tools
233 BuildRequires: libbz2-devel
234 BuildRequires: mozilla-nss-devel
235 BuildRequires: keyutils-devel
236 BuildRequires: libopenssl-devel
237 BuildRequires: lsb-release
238 BuildRequires: openldap2-devel
239 #BuildRequires: krb5
240 #BuildRequires: krb5-devel
241 BuildRequires: cunit-devel
242 BuildRequires: python%{_python_buildid}-setuptools
243 BuildRequires: python%{_python_buildid}-Cython
244 BuildRequires: python%{_python_buildid}-PrettyTable
245 BuildRequires: python%{_python_buildid}-Sphinx
246 BuildRequires: rdma-core-devel
247 BuildRequires: liblz4-devel >= 1.7
248 # for prometheus-alerts
249 BuildRequires: golang-github-prometheus-prometheus
250 %endif
251 %if 0%{?fedora} || 0%{?rhel}
252 Requires: systemd
253 BuildRequires: boost-random
254 BuildRequires: nss-devel
255 BuildRequires: keyutils-libs-devel
256 BuildRequires: libibverbs-devel
257 BuildRequires: librdmacm-devel
258 BuildRequires: openldap-devel
259 #BuildRequires: krb5-devel
260 BuildRequires: openssl-devel
261 BuildRequires: CUnit-devel
262 BuildRequires: redhat-lsb-core
263 %if 0%{with python2}
264 BuildRequires: python2-Cython
265 %endif
266 BuildRequires: python%{python3_pkgversion}-devel
267 BuildRequires: python%{python3_pkgversion}-setuptools
268 BuildRequires: python%{python3_pkgversion}-Cython
269 BuildRequires: python%{_python_buildid}-prettytable
270 BuildRequires: python%{_python_buildid}-sphinx
271 BuildRequires: lz4-devel >= 1.7
272 %endif
273 # distro-conditional make check dependencies
274 %if 0%{with make_check}
275 %if 0%{?fedora} || 0%{?rhel}
276 BuildRequires: python%{_python_buildid}-cherrypy
277 BuildRequires: python%{_python_buildid}-jwt
278 BuildRequires: python%{_python_buildid}-routes
279 BuildRequires: python%{_python_buildid}-werkzeug
280 BuildRequires: xmlsec1
281 %endif
282 %if 0%{?suse_version}
283 BuildRequires: python%{_python_buildid}-CherryPy
284 BuildRequires: python%{_python_buildid}-PyJWT
285 BuildRequires: python%{_python_buildid}-Routes
286 BuildRequires: python%{_python_buildid}-Werkzeug
287 BuildRequires: python%{_python_buildid}-numpy-devel
288 BuildRequires: xmlsec1-devel
289 %endif
290 %endif
291 # lttng and babeltrace for rbd-replay-prep
292 %if %{with lttng}
293 %if 0%{?fedora} || 0%{?rhel}
294 BuildRequires: lttng-ust-devel
295 BuildRequires: libbabeltrace-devel
296 %endif
297 %if 0%{?suse_version}
298 BuildRequires: lttng-ust-devel
299 BuildRequires: babeltrace-devel
300 %endif
301 %endif
302 %if 0%{?suse_version}
303 BuildRequires: libexpat-devel
304 %endif
305 %if 0%{?rhel} || 0%{?fedora}
306 BuildRequires: expat-devel
307 %endif
308 #hardened-cc1
309 %if 0%{?fedora} || 0%{?rhel}
310 BuildRequires: redhat-rpm-config
311 %endif
312 %if 0%{with seastar}
313 %if 0%{?fedora} || 0%{?rhel}
314 BuildRequires: cryptopp-devel
315 BuildRequires: numactl-devel
316 BuildRequires: protobuf-compiler
317 %endif
318 %if 0%{?suse_version}
319 BuildRequires: libcryptopp-devel
320 BuildRequires: libnuma-devel
321 %endif
322 %endif
323
324 %description
325 Ceph is a massively scalable, open-source, distributed storage system that runs
326 on commodity hardware and delivers object, block and file system storage.
327
328
329 #################################################################################
330 # subpackages
331 #################################################################################
332 %package base
333 Summary: Ceph Base Package
334 %if 0%{?suse_version}
335 Group: System/Filesystems
336 %endif
337 Provides: ceph-test:/usr/bin/ceph-kvstore-tool
338 Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
339 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
340 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
341 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
342 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
343 %if 0%{with selinux}
344 Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
345 %endif
346 Requires: cryptsetup
347 Requires: e2fsprogs
348 Requires: findutils
349 Requires: grep
350 Requires: logrotate
351 Requires: parted
352 Requires: psmisc
353 Requires: python%{_python_buildid}-requests
354 Requires: python%{_python_buildid}-setuptools
355 Requires: util-linux
356 Requires: xfsprogs
357 Requires: which
358 %if 0%{?fedora} || 0%{?rhel}
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}
362 Requires: gperftools-libs >= 2.6.1
363 %endif
364 %endif
365 %if 0%{?suse_version}
366 Recommends: chrony
367 %endif
368 %description base
369 Base is the package that includes all the files shared amongst ceph servers
370
371 %package -n ceph-common
372 Summary: Ceph Common
373 %if 0%{?suse_version}
374 Group: System/Filesystems
375 %endif
376 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
377 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
378 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
379 Requires: python%{_python_buildid}-rados = %{_epoch_prefix}%{version}-%{release}
380 Requires: python%{_python_buildid}-rbd = %{_epoch_prefix}%{version}-%{release}
381 Requires: python%{_python_buildid}-cephfs = %{_epoch_prefix}%{version}-%{release}
382 Requires: python%{_python_buildid}-rgw = %{_epoch_prefix}%{version}-%{release}
383 Requires: python%{_python_buildid}-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
384 Requires: python%{_python_buildid}-requests
385 %if 0%{?fedora} || 0%{?rhel}
386 Requires: python%{_python_buildid}-prettytable
387 %endif
388 %if 0%{?suse_version}
389 Requires: python%{_python_buildid}-PrettyTable
390 %endif
391 %if 0%{with libradosstriper}
392 Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release}
393 %endif
394 %{?systemd_requires}
395 %if 0%{?suse_version}
396 Requires(pre): pwdutils
397 %endif
398 %description -n ceph-common
399 Common utilities to mount and interact with a ceph storage cluster.
400 Comprised of files that are common to Ceph clients and servers.
401
402 %package mds
403 Summary: Ceph Metadata Server Daemon
404 %if 0%{?suse_version}
405 Group: System/Filesystems
406 %endif
407 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
408 %description mds
409 ceph-mds is the metadata server daemon for the Ceph distributed file system.
410 One or more instances of ceph-mds collectively manage the file system
411 namespace, coordinating access to the shared OSD cluster.
412
413 %package mon
414 Summary: Ceph Monitor Daemon
415 %if 0%{?suse_version}
416 Group: System/Filesystems
417 %endif
418 Provides: ceph-test:/usr/bin/ceph-monstore-tool
419 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
420 %description mon
421 ceph-mon is the cluster monitor daemon for the Ceph distributed file
422 system. One or more instances of ceph-mon form a Paxos part-time
423 parliament cluster that provides extremely reliable and durable storage
424 of cluster membership, configuration, and state.
425
426 %package mgr
427 Summary: Ceph Manager Daemon
428 %if 0%{?suse_version}
429 Group: System/Filesystems
430 %endif
431 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
432 Requires: python%{_python_buildid}-bcrypt
433 Requires: python%{_python_buildid}-pecan
434 Requires: python%{_python_buildid}-six
435 %if 0%{?fedora} || 0%{?rhel}
436 Requires: python%{_python_buildid}-cherrypy
437 Requires: python%{_python_buildid}-werkzeug
438 %endif
439 %if 0%{?suse_version}
440 Requires: python%{_python_buildid}-CherryPy
441 Requires: python%{_python_buildid}-Werkzeug
442 Recommends: python%{_python_buildid}-influxdb
443 Recommends: ceph-mgr-dashboard = %{_epoch_prefix}%{version}-%{release}
444 Recommends: ceph-mgr-diskprediction-local = %{_epoch_prefix}%{version}-%{release}
445 Recommends: ceph-mgr-diskprediction-cloud = %{_epoch_prefix}%{version}-%{release}
446 Recommends: ceph-mgr-rook = %{_epoch_prefix}%{version}-%{release}
447 Recommends: ceph-mgr-ssh = %{_epoch_prefix}%{version}-%{release}
448 %endif
449 %if 0%{?rhel} == 7
450 Requires: pyOpenSSL
451 %else
452 Requires: python%{_python_buildid}-pyOpenSSL
453 %endif
454 %description mgr
455 ceph-mgr enables python modules that provide services (such as the REST
456 module derived from Calamari) and expose CLI hooks. ceph-mgr gathers
457 the cluster maps, the daemon metadata, and performance counters, and
458 exposes all these to the python modules.
459
460 %package mgr-dashboard
461 Summary: Ceph Dashboard
462 BuildArch: noarch
463 %if 0%{?suse_version}
464 Group: System/Filesystems
465 %endif
466 Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
467 %if 0%{?fedora} || 0%{?rhel}
468 Requires: python%{_python_buildid}-cherrypy
469 Requires: python%{_python_buildid}-jwt
470 Requires: python%{_python_buildid}-routes
471 Requires: python%{_python_buildid}-werkzeug
472 %endif
473 %if 0%{?suse_version}
474 Requires: python%{_python_buildid}-CherryPy
475 Requires: python%{_python_buildid}-PyJWT
476 Requires: python%{_python_buildid}-Routes
477 Requires: python%{_python_buildid}-Werkzeug
478 %endif
479 %if 0%{?rhel} == 7
480 Requires: pyOpenSSL
481 %else
482 Requires: python%{_python_buildid}-pyOpenSSL
483 %endif
484 %description mgr-dashboard
485 ceph-mgr-dashboard is a manager plugin, providing a web-based application
486 to monitor and manage many aspects of a Ceph cluster and related components.
487 See the Dashboard documentation at http://docs.ceph.com/ for details and a
488 detailed feature overview.
489
490 %package mgr-diskprediction-local
491 Summary: ceph-mgr diskprediction_local plugin
492 BuildArch: noarch
493 %if 0%{?suse_version}
494 Group: System/Filesystems
495 %endif
496 Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
497 %if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?suse_version}
498 Requires: python%{_python_buildid}-numpy
499 %if 0%{without python2}
500 Requires: python3-scipy
501 %else
502 Requires: python2-scipy
503 %endif
504 %endif
505 %if 0%{?rhel} == 7
506 Requires: numpy
507 Requires: scipy
508 %endif
509 %description mgr-diskprediction-local
510 ceph-mgr-diskprediction-local is a ceph-mgr plugin that tries to predict
511 disk failures using local algorithms and machine-learning databases.
512
513 %package mgr-diskprediction-cloud
514 Summary: ceph-mgr diskprediction_cloud plugin
515 BuildArch: noarch
516 %if 0%{?suse_version}
517 Group: System/Filesystems
518 %endif
519 Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
520 %description mgr-diskprediction-cloud
521 ceph-mgr-diskprediction-cloud is a ceph-mgr plugin that tries to predict
522 disk failures using services in the Google cloud.
523
524 %package mgr-rook
525 BuildArch: noarch
526 Summary: ceph-mgr rook plugin
527 %if 0%{?suse_version}
528 Group: System/Filesystems
529 %endif
530 Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
531 Requires: python%{_python_buildid}-kubernetes
532 %description mgr-rook
533 ceph-mgr-rook is a ceph-mgr plugin for orchestration functions using
534 a Rook backend.
535
536 %package mgr-ssh
537 Summary: ceph-mgr ssh module
538 BuildArch: noarch
539 %if 0%{?suse_version}
540 Group: System/Filesystems
541 %endif
542 Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
543 Requires: python%{_python_buildid}-remoto
544 %description mgr-ssh
545 ceph-mgr-ssh is a ceph-mgr module for orchestration functions using
546 direct SSH connections for management operations.
547
548 %package fuse
549 Summary: Ceph fuse-based client
550 %if 0%{?suse_version}
551 Group: System/Filesystems
552 %endif
553 Requires: fuse
554 Requires: python%{python3_pkgversion}
555 %description fuse
556 FUSE based client for Ceph distributed network file system
557
558 %package -n rbd-fuse
559 Summary: Ceph fuse-based client
560 %if 0%{?suse_version}
561 Group: System/Filesystems
562 %endif
563 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
564 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
565 %description -n rbd-fuse
566 FUSE based client to map Ceph rbd images to files
567
568 %package -n rbd-mirror
569 Summary: Ceph daemon for mirroring RBD images
570 %if 0%{?suse_version}
571 Group: System/Filesystems
572 %endif
573 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
574 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
575 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
576 %description -n rbd-mirror
577 Daemon for mirroring RBD images between Ceph clusters, streaming
578 changes asynchronously.
579
580 %package -n rbd-nbd
581 Summary: Ceph RBD client base on NBD
582 %if 0%{?suse_version}
583 Group: System/Filesystems
584 %endif
585 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
586 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
587 %description -n rbd-nbd
588 NBD based client to map Ceph rbd images to local device
589
590 %package radosgw
591 Summary: Rados REST gateway
592 %if 0%{?suse_version}
593 Group: System/Filesystems
594 %endif
595 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
596 %if 0%{with selinux}
597 Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
598 %endif
599 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
600 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
601 %if 0%{?rhel} || 0%{?fedora}
602 Requires: mailcap
603 %endif
604 %description radosgw
605 RADOS is a distributed object store used by the Ceph distributed
606 storage system. This package provides a REST gateway to the
607 object store that aims to implement a superset of Amazon's S3
608 service as well as the OpenStack Object Storage ("Swift") API.
609
610 %if %{with ocf}
611 %package resource-agents
612 Summary: OCF-compliant resource agents for Ceph daemons
613 %if 0%{?suse_version}
614 Group: System/Filesystems
615 %endif
616 Requires: ceph-base = %{_epoch_prefix}%{version}
617 Requires: resource-agents
618 %description resource-agents
619 Resource agents for monitoring and managing Ceph daemons
620 under Open Cluster Framework (OCF) compliant resource
621 managers such as Pacemaker.
622 %endif
623
624 %package osd
625 Summary: Ceph Object Storage Daemon
626 %if 0%{?suse_version}
627 Group: System/Filesystems
628 %endif
629 Provides: ceph-test:/usr/bin/ceph-osdomap-tool
630 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
631 Requires: lvm2
632 Requires: sudo
633 Requires: libstoragemgmt
634 %description osd
635 ceph-osd is the object storage daemon for the Ceph distributed file
636 system. It is responsible for storing objects on a local file system
637 and providing access to them over the network.
638
639 %package -n librados2
640 Summary: RADOS distributed object store client library
641 %if 0%{?suse_version}
642 Group: System/Libraries
643 %endif
644 %if 0%{?rhel} || 0%{?fedora}
645 Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
646 %endif
647 %description -n librados2
648 RADOS is a reliable, autonomic distributed object storage cluster
649 developed as part of the Ceph distributed storage system. This is a
650 shared library allowing applications to access the distributed object
651 store using a simple file-like interface.
652
653 %package -n librados-devel
654 Summary: RADOS headers
655 %if 0%{?suse_version}
656 Group: Development/Libraries/C and C++
657 %endif
658 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
659 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
660 Provides: librados2-devel = %{_epoch_prefix}%{version}-%{release}
661 Obsoletes: librados2-devel < %{_epoch_prefix}%{version}-%{release}
662 %description -n librados-devel
663 This package contains C libraries and headers needed to develop programs
664 that use RADOS object store.
665
666 %package -n libradospp-devel
667 Summary: RADOS headers
668 %if 0%{?suse_version}
669 Group: Development/Libraries/C and C++
670 %endif
671 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
672 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
673 %description -n libradospp-devel
674 This package contains C++ libraries and headers needed to develop programs
675 that use RADOS object store.
676
677 %package -n librgw2
678 Summary: RADOS gateway client library
679 %if 0%{?suse_version}
680 Group: System/Libraries
681 %endif
682 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
683 %description -n librgw2
684 This package provides a library implementation of the RADOS gateway
685 (distributed object store with S3 and Swift personalities).
686
687 %package -n librgw-devel
688 Summary: RADOS gateway client library
689 %if 0%{?suse_version}
690 Group: Development/Libraries/C and C++
691 %endif
692 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
693 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
694 Provides: librgw2-devel = %{_epoch_prefix}%{version}-%{release}
695 Obsoletes: librgw2-devel < %{_epoch_prefix}%{version}-%{release}
696 %description -n librgw-devel
697 This package contains libraries and headers needed to develop programs
698 that use RADOS gateway client library.
699
700 %if 0%{with python2}
701 %package -n python-rgw
702 Summary: Python 2 libraries for the RADOS gateway
703 %if 0%{?suse_version}
704 Group: Development/Libraries/Python
705 %endif
706 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
707 Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
708 Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
709 %description -n python-rgw
710 This package contains Python 2 libraries for interacting with Cephs RADOS
711 gateway.
712 %endif
713
714 %package -n python%{python3_pkgversion}-rgw
715 Summary: Python 3 libraries for the RADOS gateway
716 %if 0%{?suse_version}
717 Group: Development/Libraries/Python
718 %endif
719 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
720 Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
721 Provides: python3-rgw = %{_epoch_prefix}%{version}-%{release}
722 %if 0%{without python2}
723 Provides: python-rgw = %{_epoch_prefix}%{version}-%{release}
724 Obsoletes: python-rgw < %{_epoch_prefix}%{version}-%{release}
725 %endif
726 %description -n python%{python3_pkgversion}-rgw
727 This package contains Python 3 libraries for interacting with Cephs RADOS
728 gateway.
729
730 %if 0%{with python2}
731 %package -n python-rados
732 Summary: Python 2 libraries for the RADOS object store
733 %if 0%{?suse_version}
734 Group: Development/Libraries/Python
735 %endif
736 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
737 Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
738 %description -n python-rados
739 This package contains Python 2 libraries for interacting with Cephs RADOS
740 object store.
741 %endif
742
743 %package -n python%{python3_pkgversion}-rados
744 Summary: Python 3 libraries for the RADOS object store
745 %if 0%{?suse_version}
746 Group: Development/Libraries/Python
747 %endif
748 Requires: python%{python3_pkgversion}
749 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
750 Provides: python3-rados = %{_epoch_prefix}%{version}-%{release}
751 %if 0%{without python2}
752 Provides: python-rados = %{_epoch_prefix}%{version}-%{release}
753 Obsoletes: python-rados < %{_epoch_prefix}%{version}-%{release}
754 %endif
755 %description -n python%{python3_pkgversion}-rados
756 This package contains Python 3 libraries for interacting with Cephs RADOS
757 object store.
758
759 %if 0%{with libradosstriper}
760 %package -n libradosstriper1
761 Summary: RADOS striping interface
762 %if 0%{?suse_version}
763 Group: System/Libraries
764 %endif
765 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
766 %description -n libradosstriper1
767 Striping interface built on top of the rados library, allowing
768 to stripe bigger objects onto several standard rados objects using
769 an interface very similar to the rados one.
770
771 %package -n libradosstriper-devel
772 Summary: RADOS striping interface headers
773 %if 0%{?suse_version}
774 Group: Development/Libraries/C and C++
775 %endif
776 Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release}
777 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
778 Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release}
779 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
780 Provides: libradosstriper1-devel = %{_epoch_prefix}%{version}-%{release}
781 Obsoletes: libradosstriper1-devel < %{_epoch_prefix}%{version}-%{release}
782 %description -n libradosstriper-devel
783 This package contains libraries and headers needed to develop programs
784 that use RADOS striping interface.
785 %endif
786
787 %package -n librbd1
788 Summary: RADOS block device client library
789 %if 0%{?suse_version}
790 Group: System/Libraries
791 %endif
792 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
793 %if 0%{?suse_version}
794 Requires(post): coreutils
795 %endif
796 %if 0%{?rhel} || 0%{?fedora}
797 Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
798 %endif
799 %description -n librbd1
800 RBD is a block device striped across multiple distributed objects in
801 RADOS, a reliable, autonomic distributed object storage cluster
802 developed as part of the Ceph distributed storage system. This is a
803 shared library allowing applications to manage these block devices.
804
805 %package -n librbd-devel
806 Summary: RADOS block device headers
807 %if 0%{?suse_version}
808 Group: Development/Libraries/C and C++
809 %endif
810 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
811 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
812 Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release}
813 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
814 Provides: librbd1-devel = %{_epoch_prefix}%{version}-%{release}
815 Obsoletes: librbd1-devel < %{_epoch_prefix}%{version}-%{release}
816 %description -n librbd-devel
817 This package contains libraries and headers needed to develop programs
818 that use RADOS block device.
819
820 %if 0%{with python2}
821 %package -n python-rbd
822 Summary: Python 2 libraries for the RADOS block device
823 %if 0%{?suse_version}
824 Group: Development/Libraries/Python
825 %endif
826 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
827 Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
828 Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
829 %description -n python-rbd
830 This package contains Python 2 libraries for interacting with Cephs RADOS
831 block device.
832 %endif
833
834 %package -n python%{python3_pkgversion}-rbd
835 Summary: Python 3 libraries for the RADOS block device
836 %if 0%{?suse_version}
837 Group: Development/Libraries/Python
838 %endif
839 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
840 Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
841 Provides: python3-rbd = %{_epoch_prefix}%{version}-%{release}
842 %if 0%{without python2}
843 Provides: python-rbd = %{_epoch_prefix}%{version}-%{release}
844 Obsoletes: python-rbd < %{_epoch_prefix}%{version}-%{release}
845 %endif
846 %description -n python%{python3_pkgversion}-rbd
847 This package contains Python 3 libraries for interacting with Cephs RADOS
848 block device.
849
850 %package -n libcephfs2
851 Summary: Ceph distributed file system client library
852 %if 0%{?suse_version}
853 Group: System/Libraries
854 %endif
855 Obsoletes: libcephfs1
856 %if 0%{?rhel} || 0%{?fedora}
857 Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
858 Obsoletes: ceph-libcephfs
859 %endif
860 %description -n libcephfs2
861 Ceph is a distributed network file system designed to provide excellent
862 performance, reliability, and scalability. This is a shared library
863 allowing applications to access a Ceph distributed file system via a
864 POSIX-like interface.
865
866 %package -n libcephfs-devel
867 Summary: Ceph distributed file system headers
868 %if 0%{?suse_version}
869 Group: Development/Libraries/C and C++
870 %endif
871 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
872 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
873 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
874 Provides: libcephfs2-devel = %{_epoch_prefix}%{version}-%{release}
875 Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release}
876 %description -n libcephfs-devel
877 This package contains libraries and headers needed to develop programs
878 that use Cephs distributed file system.
879
880 %if 0%{with python2}
881 %package -n python-cephfs
882 Summary: Python 2 libraries for Ceph distributed file system
883 %if 0%{?suse_version}
884 Group: Development/Libraries/Python
885 %endif
886 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
887 Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
888 Requires: python-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
889 Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
890 %description -n python-cephfs
891 This package contains Python 2 libraries for interacting with Cephs distributed
892 file system.
893 %endif
894
895 %package -n python%{python3_pkgversion}-cephfs
896 Summary: Python 3 libraries for Ceph distributed file system
897 %if 0%{?suse_version}
898 Group: Development/Libraries/Python
899 %endif
900 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
901 Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
902 Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
903 Provides: python3-cephfs = %{_epoch_prefix}%{version}-%{release}
904 %if 0%{without python2}
905 Provides: python-cephfs = %{_epoch_prefix}%{version}-%{release}
906 Obsoletes: python-cephfs < %{_epoch_prefix}%{version}-%{release}
907 %endif
908 %description -n python%{python3_pkgversion}-cephfs
909 This package contains Python 3 libraries for interacting with Cephs distributed
910 file system.
911
912 %if 0%{with python2}
913 %package -n python-ceph-argparse
914 Summary: Python 2 utility libraries for Ceph CLI
915 %if 0%{?suse_version}
916 Group: Development/Libraries/Python
917 %endif
918 %description -n python-ceph-argparse
919 This package contains types and routines for Python 2 used by the Ceph CLI as
920 well as the RESTful interface. These have to do with querying the daemons for
921 command-description information, validating user command input against those
922 descriptions, and submitting the command to the appropriate daemon.
923 %endif
924
925 %package -n python%{python3_pkgversion}-ceph-argparse
926 Summary: Python 3 utility libraries for Ceph CLI
927 %if 0%{?suse_version}
928 Group: Development/Libraries/Python
929 %endif
930 Provides: python3-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
931 %description -n python%{python3_pkgversion}-ceph-argparse
932 This package contains types and routines for Python 3 used by the Ceph CLI as
933 well as the RESTful interface. These have to do with querying the daemons for
934 command-description information, validating user command input against those
935 descriptions, and submitting the command to the appropriate daemon.
936
937 %if 0%{with cephfs_shell}
938 %package -n cephfs-shell
939 Summary: Interactive shell for Ceph file system
940 Requires: python%{python3_pkgversion}-cmd2
941 Requires: python%{python3_pkgversion}-colorama
942 Requires: python%{python3_pkgversion}-cephfs
943 %description -n cephfs-shell
944 This package contains an interactive tool that allows accessing a Ceph
945 file system without mounting it by providing a nice pseudo-shell which
946 works like an FTP client.
947 %endif
948
949 %if 0%{with ceph_test_package}
950 %package -n ceph-test
951 Summary: Ceph benchmarks and test tools
952 %if 0%{?suse_version}
953 Group: System/Benchmark
954 %endif
955 Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
956 Requires: xmlstarlet
957 Requires: jq
958 Requires: socat
959 %description -n ceph-test
960 This package contains Ceph benchmarks and test tools.
961 %endif
962
963 %if 0%{with cephfs_java}
964
965 %package -n libcephfs_jni1
966 Summary: Java Native Interface library for CephFS Java bindings
967 %if 0%{?suse_version}
968 Group: System/Libraries
969 %endif
970 Requires: java
971 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
972 %description -n libcephfs_jni1
973 This package contains the Java Native Interface library for CephFS Java
974 bindings.
975
976 %package -n libcephfs_jni-devel
977 Summary: Development files for CephFS Java Native Interface library
978 %if 0%{?suse_version}
979 Group: Development/Libraries/Java
980 %endif
981 Requires: java
982 Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
983 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
984 Provides: libcephfs_jni1-devel = %{_epoch_prefix}%{version}-%{release}
985 Obsoletes: libcephfs_jni1-devel < %{_epoch_prefix}%{version}-%{release}
986 %description -n libcephfs_jni-devel
987 This package contains the development files for CephFS Java Native Interface
988 library.
989
990 %package -n cephfs-java
991 Summary: Java libraries for the Ceph File System
992 %if 0%{?suse_version}
993 Group: System/Libraries
994 %endif
995 Requires: java
996 Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
997 Requires: junit
998 BuildRequires: junit
999 %description -n cephfs-java
1000 This package contains the Java libraries for the Ceph File System.
1001
1002 %endif
1003
1004 %package -n rados-objclass-devel
1005 Summary: RADOS object class development kit
1006 %if 0%{?suse_version}
1007 Group: Development/Libraries/C and C++
1008 %endif
1009 Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release}
1010 %description -n rados-objclass-devel
1011 This package contains libraries and headers needed to develop RADOS object
1012 class plugins.
1013
1014 %if 0%{with selinux}
1015
1016 %package selinux
1017 Summary: SELinux support for Ceph MON, OSD and MDS
1018 %if 0%{?suse_version}
1019 Group: System/Filesystems
1020 %endif
1021 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
1022 Requires: policycoreutils, libselinux-utils
1023 Requires(post): ceph-base = %{_epoch_prefix}%{version}-%{release}
1024 Requires(post): selinux-policy-base >= %{_selinux_policy_version}, policycoreutils, gawk
1025 Requires(postun): policycoreutils
1026 %description selinux
1027 This package contains SELinux support for Ceph MON, OSD and MDS. The package
1028 also performs file-system relabelling which can take a long time on heavily
1029 populated file-systems.
1030
1031 %endif
1032
1033 %if 0%{with python2}
1034 %package -n python-ceph-compat
1035 Summary: Compatibility package for Cephs python libraries
1036 %if 0%{?suse_version}
1037 Group: Development/Libraries/Python
1038 %endif
1039 Obsoletes: python-ceph
1040 Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
1041 Requires: python-rbd = %{_epoch_prefix}%{version}-%{release}
1042 Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release}
1043 Requires: python-rgw = %{_epoch_prefix}%{version}-%{release}
1044 Provides: python-ceph
1045 %description -n python-ceph-compat
1046 This is a compatibility package to accommodate python-ceph split into
1047 python-rados, python-rbd, python-rgw and python-cephfs. Packages still
1048 depending on python-ceph should be fixed to depend on python-rados,
1049 python-rbd, python-rgw or python-cephfs instead.
1050 %endif
1051
1052 %package grafana-dashboards
1053 Summary: The set of Grafana dashboards for monitoring purposes
1054 BuildArch: noarch
1055 %if 0%{?suse_version}
1056 Group: System/Filesystems
1057 %endif
1058 %description grafana-dashboards
1059 This package provides a set of Grafana dashboards for monitoring of
1060 Ceph clusters. The dashboards require a Prometheus server setup
1061 collecting data from Ceph Manager "prometheus" module and Prometheus
1062 project "node_exporter" module. The dashboards are designed to be
1063 integrated with the Ceph Manager Dashboard web UI.
1064
1065 %if 0%{?suse_version}
1066 %package prometheus-alerts
1067 Summary: Prometheus alerts for a Ceph deplyoment
1068 BuildArch: noarch
1069 Group: System/Monitoring
1070 %description prometheus-alerts
1071 This package provides Ceph’s default alerts for Prometheus.
1072 %endif
1073
1074 #################################################################################
1075 # common
1076 #################################################################################
1077 %prep
1078 %autosetup -p1 -n ceph-14.2.2
1079
1080 %build
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}
1084
1085 %if 0%{?rhel} == 7
1086 . /opt/rh/devtoolset-7/enable
1087 %endif
1088
1089 %if 0%{with cephfs_java}
1090 # Find jni.h
1091 for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do
1092 [ -d $i ] && java_inc="$java_inc -I$i"
1093 done
1094 %endif
1095
1096 %if 0%{?suse_version}
1097 # the following setting fixed an OOM condition we once encountered in the OBS
1098 RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768"
1099 %endif
1100
1101 export CPPFLAGS="$java_inc"
1102 export CFLAGS="$RPM_OPT_FLAGS"
1103 export CXXFLAGS="$RPM_OPT_FLAGS"
1104 export LDFLAGS="$RPM_LD_FLAGS"
1105
1106 # Parallel build settings ...
1107 CEPH_MFLAGS_JOBS="%{?_smp_mflags}"
1108 CEPH_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
1111 CEPH_SMP_NCPUS="1"
1112 %endif
1113 # do not eat all memory
1114 echo "Available memory:"
1115 free -h
1116 echo "System limits:"
1117 ulimit -a
1118 if 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"
1124 fi
1125 export CEPH_SMP_NCPUS
1126 export CEPH_MFLAGS_JOBS="-j$CEPH_SMP_NCPUS"
1127
1128 env | sort
1129
1130 mkdir build
1131 cd build
1132 %if 0%{?rhel} == 7
1133 CMAKE=cmake3
1134 %else
1135 CMAKE=cmake
1136 %endif
1137 ${CMAKE} .. \
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 \
1145 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
1146 -DWITH_MANPAGE=ON \
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 \
1154 %endif
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 \
1166 -DWITH_BABELTRACE=ON \
1167 %else
1168 -DWITH_LTTNG=OFF \
1169 -DWITH_BABELTRACE=OFF \
1170 %endif
1171 $CEPH_EXTRA_CMAKE_ARGS \
1172 %if 0%{with ocf}
1173 -DWITH_OCF=ON \
1174 %endif
1175 %ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64
1176 -DWITH_BOOST_CONTEXT=ON \
1177 %else
1178 -DWITH_BOOST_CONTEXT=OFF \
1179 %endif
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
1195
1196 make "$CEPH_MFLAGS_JOBS"
1197
1198
1199 %if 0%{with make_check}
1200 %check
1201 # run in-tree unittests
1202 cd build
1203 ctest "$CEPH_MFLAGS_JOBS"
1204 %endif
1205
1206
1207 %install
1208 pushd build
1209 make DESTDIR=%{buildroot} install
1210 # we have dropped sysvinit bits
1211 rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph
1212 popd
1213 install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
1214 %if 0%{?fedora} || 0%{?rhel}
1215 install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph
1216 %endif
1217 %if 0%{?suse_version}
1218 install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_fillupdir}/sysconfig.%{name}
1219 %endif
1220 install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf
1221 install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset
1222 mkdir -p %{buildroot}%{_sbindir}
1223 install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
1224 chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf
1225 install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
1226 install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
1227
1228 # firewall templates and /sbin/mount.ceph symlink
1229 %if 0%{?suse_version}
1230 install -m 0644 -D etc/sysconfig/SuSEfirewall2.d/services/ceph-mon %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon
1231 install -m 0644 -D etc/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds
1232 mkdir -p %{buildroot}/sbin
1233 ln -sf %{_sbindir}/mount.ceph %{buildroot}/sbin/mount.ceph
1234 %endif
1235
1236 # udev rules
1237 install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules
1238
1239 # sudoers.d
1240 install -m 0600 -D sudoers.d/ceph-osd-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
1241
1242 #set up placeholder directories
1243 mkdir -p %{buildroot}%{_sysconfdir}/ceph
1244 mkdir -p %{buildroot}%{_localstatedir}/run/ceph
1245 mkdir -p %{buildroot}%{_localstatedir}/log/ceph
1246 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp
1247 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon
1248 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/osd
1249 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mds
1250 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mgr
1251 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash
1252 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash/posted
1253 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/radosgw
1254 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-osd
1255 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds
1256 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw
1257 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mgr
1258 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd
1259 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
1260
1261 %if 0%{?suse_version}
1262 # create __pycache__ directories and their contents
1263 %py3_compile %{buildroot}%{python3_sitelib}
1264 # prometheus alerts
1265 install -m 644 -D monitoring/prometheus/alerts/ceph_default_alerts.yml %{buildroot}/etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml
1266 %endif
1267 %if 0%{?rhel} == 8
1268 %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}
1269 %endif
1270
1271 %clean
1272 rm -rf %{buildroot}
1273
1274 #################################################################################
1275 # files and systemd scriptlets
1276 #################################################################################
1277 %files
1278
1279 %files base
1280 %{_bindir}/ceph-crash
1281 %{_bindir}/crushtool
1282 %{_bindir}/monmaptool
1283 %{_bindir}/osdmaptool
1284 %{_bindir}/ceph-kvstore-tool
1285 %{_bindir}/ceph-run
1286 %{_libexecdir}/systemd/system-preset/50-ceph.preset
1287 %{_sbindir}/ceph-create-keys
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*
1297 %{_unitdir}/ceph-crash.service
1298 %dir %{_libdir}/ceph/crypto
1299 %{_libdir}/ceph/crypto/libceph_*.so*
1300 %if %{with lttng}
1301 %{_libdir}/libos_tp.so*
1302 %{_libdir}/libosd_tp.so*
1303 %endif
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}
1309 %{_fillupdir}/sysconfig.*
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
1314 %if 0%{with python2}
1315 %dir %{python_sitelib}/ceph_volume
1316 %{python_sitelib}/ceph_volume/*
1317 %{python_sitelib}/ceph_volume-*
1318 %else
1319 %dir %{python3_sitelib}/ceph_volume
1320 %{python3_sitelib}/ceph_volume/*
1321 %{python3_sitelib}/ceph_volume-*
1322 %endif
1323 %{_mandir}/man8/ceph-deploy.8*
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*
1329 %{_mandir}/man8/ceph-kvstore-tool.8*
1330 #set up placeholder directories
1331 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash
1332 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash/posted
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
1338 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd
1339 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
1340
1341 %post base
1342 /sbin/ldconfig
1343 %if 0%{?suse_version}
1344 %fillup_only
1345 if [ $1 -eq 1 ] ; then
1346 /usr/bin/systemctl preset ceph.target ceph-crash.service >/dev/null 2>&1 || :
1347 fi
1348 %endif
1349 %if 0%{?fedora} || 0%{?rhel}
1350 %systemd_post ceph.target ceph-crash.service
1351 %endif
1352 if [ $1 -eq 1 ] ; then
1353 /usr/bin/systemctl start ceph.target ceph-crash.service >/dev/null 2>&1 || :
1354 fi
1355
1356 %preun base
1357 %if 0%{?suse_version}
1358 %service_del_preun ceph.target ceph-crash.service
1359 %endif
1360 %if 0%{?fedora} || 0%{?rhel}
1361 %systemd_preun ceph.target ceph-crash.service
1362 %endif
1363
1364 %postun base
1365 /sbin/ldconfig
1366 %if 0%{?suse_version}
1367 DISABLE_RESTART_ON_UPDATE="yes"
1368 %service_del_postun ceph.target
1369 %endif
1370 %if 0%{?fedora} || 0%{?rhel}
1371 %systemd_postun ceph.target
1372 %endif
1373 if [ $1 -ge 1 ] ; then
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
1380 fi
1381
1382 %files common
1383 %dir %{_docdir}/ceph
1384 %doc %{_docdir}/ceph/sample.ceph.conf
1385 %license %{_docdir}/ceph/COPYING
1386 %{_bindir}/ceph
1387 %{_bindir}/ceph-authtool
1388 %{_bindir}/ceph-conf
1389 %{_bindir}/ceph-dencoder
1390 %{_bindir}/ceph-rbdnamer
1391 %{_bindir}/ceph-syn
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
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/
1430 %config %{_sysconfdir}/bash_completion.d/ceph
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
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
1442 CEPH_GROUP_ID=167
1443 CEPH_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}
1449 if ! 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 || :
1453 fi
1454 if ! 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 || :
1458 fi
1459 usermod -c "Ceph storage service" \
1460 -d %{_localstatedir}/lib/ceph \
1461 -g ceph \
1462 -s /sbin/nologin \
1463 ceph
1464 %endif
1465 exit 0
1466
1467 %post common
1468 %tmpfiles_create %{_tmpfilesdir}/ceph-common.conf
1469
1470 %postun common
1471 # Package removal cleanup
1472 if [ "$1" -eq "0" ] ; then
1473 rm -rf %{_localstatedir}/log/ceph
1474 rm -rf %{_sysconfdir}/ceph
1475 fi
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}
1486 if [ $1 -eq 1 ] ; then
1487 /usr/bin/systemctl preset ceph-mds@\*.service ceph-mds.target >/dev/null 2>&1 || :
1488 fi
1489 %endif
1490 %if 0%{?fedora} || 0%{?rhel}
1491 %systemd_post ceph-mds@\*.service ceph-mds.target
1492 %endif
1493 if [ $1 -eq 1 ] ; then
1494 /usr/bin/systemctl start ceph-mds.target >/dev/null 2>&1 || :
1495 fi
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
1506 %if 0%{?suse_version}
1507 DISABLE_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
1513 if [ $1 -ge 1 ] ; then
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
1523 fi
1524
1525 %files mgr
1526 %{_bindir}/ceph-mgr
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
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}
1560 if [ $1 -eq 1 ] ; then
1561 /usr/bin/systemctl preset ceph-mgr@\*.service ceph-mgr.target >/dev/null 2>&1 || :
1562 fi
1563 %endif
1564 %if 0%{?fedora} || 0%{?rhel}
1565 %systemd_post ceph-mgr@\*.service ceph-mgr.target
1566 %endif
1567 if [ $1 -eq 1 ] ; then
1568 /usr/bin/systemctl start ceph-mgr.target >/dev/null 2>&1 || :
1569 fi
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
1580 %if 0%{?suse_version}
1581 DISABLE_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
1587 if [ $1 -ge 1 ] ; then
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
1597 fi
1598
1599 %files mgr-dashboard
1600 %{_datadir}/ceph/mgr/dashboard
1601
1602 %post mgr-dashboard
1603 if [ $1 -eq 1 ] ; then
1604 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1605 fi
1606
1607 %postun mgr-dashboard
1608 if [ $1 -eq 1 ] ; then
1609 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1610 fi
1611
1612 %files mgr-diskprediction-local
1613 %{_datadir}/ceph/mgr/diskprediction_local
1614
1615 %post mgr-diskprediction-local
1616 if [ $1 -eq 1 ] ; then
1617 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1618 fi
1619
1620 %postun mgr-diskprediction-local
1621 if [ $1 -eq 1 ] ; then
1622 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1623 fi
1624
1625 %files mgr-diskprediction-cloud
1626 %{_datadir}/ceph/mgr/diskprediction_cloud
1627
1628 %post mgr-diskprediction-cloud
1629 if [ $1 -eq 1 ] ; then
1630 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1631 fi
1632
1633 %postun mgr-diskprediction-cloud
1634 if [ $1 -eq 1 ] ; then
1635 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1636 fi
1637
1638 %files mgr-rook
1639 %{_datadir}/ceph/mgr/rook
1640
1641 %post mgr-rook
1642 if [ $1 -eq 1 ] ; then
1643 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1644 fi
1645
1646 %postun mgr-rook
1647 if [ $1 -eq 1 ] ; then
1648 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1649 fi
1650
1651 %files mgr-ssh
1652 %{_datadir}/ceph/mgr/ssh
1653
1654 %post mgr-ssh
1655 if [ $1 -eq 1 ] ; then
1656 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1657 fi
1658
1659 %postun mgr-ssh
1660 if [ $1 -eq 1 ] ; then
1661 /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
1662 fi
1663
1664 %files mon
1665 %{_bindir}/ceph-mon
1666 %{_bindir}/ceph-monstore-tool
1667 %{_mandir}/man8/ceph-mon.8*
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}
1674 if [ $1 -eq 1 ] ; then
1675 /usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || :
1676 fi
1677 %endif
1678 %if 0%{?fedora} || 0%{?rhel}
1679 %systemd_post ceph-mon@\*.service ceph-mon.target
1680 %endif
1681 if [ $1 -eq 1 ] ; then
1682 /usr/bin/systemctl start ceph-mon.target >/dev/null 2>&1 || :
1683 fi
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
1694 %if 0%{?suse_version}
1695 DISABLE_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
1701 if [ $1 -ge 1 ] ; then
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
1711 fi
1712
1713 %files fuse
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
1721 %{_bindir}/rbd-fuse
1722 %{_mandir}/man8/rbd-fuse.8*
1723
1724 %files -n rbd-mirror
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}
1732 if [ $1 -eq 1 ] ; then
1733 /usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || :
1734 fi
1735 %endif
1736 %if 0%{?fedora} || 0%{?rhel}
1737 %systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1738 %endif
1739 if [ $1 -eq 1 ] ; then
1740 /usr/bin/systemctl start ceph-rbd-mirror.target >/dev/null 2>&1 || :
1741 fi
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
1752 %if 0%{?suse_version}
1753 DISABLE_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
1759 if [ $1 -ge 1 ] ; then
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
1769 fi
1770
1771 %files -n rbd-nbd
1772 %{_bindir}/rbd-nbd
1773 %{_mandir}/man8/rbd-nbd.8*
1774
1775 %files radosgw
1776 %{_bindir}/radosgw
1777 %{_bindir}/radosgw-token
1778 %{_bindir}/radosgw-es
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}
1787 if [ $1 -eq 1 ] ; then
1788 /usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || :
1789 fi
1790 %endif
1791 %if 0%{?fedora} || 0%{?rhel}
1792 %systemd_post ceph-radosgw@\*.service ceph-radosgw.target
1793 %endif
1794 if [ $1 -eq 1 ] ; then
1795 /usr/bin/systemctl start ceph-radosgw.target >/dev/null 2>&1 || :
1796 fi
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
1807 %if 0%{?suse_version}
1808 DISABLE_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
1814 if [ $1 -ge 1 ] ; then
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
1824 fi
1825
1826 %files osd
1827 %{_bindir}/ceph-clsinfo
1828 %{_bindir}/ceph-bluestore-tool
1829 %{_bindir}/ceph-objectstore-tool
1830 %{_bindir}/ceph-osdomap-tool
1831 %{_bindir}/ceph-osd
1832 %{_libexecdir}/ceph/ceph-osd-prestart.sh
1833 %{_sbindir}/ceph-volume
1834 %{_sbindir}/ceph-volume-systemd
1835 %{_mandir}/man8/ceph-clsinfo.8*
1836 %{_mandir}/man8/ceph-osd.8*
1837 %{_mandir}/man8/ceph-bluestore-tool.8*
1838 %{_mandir}/man8/ceph-volume.8*
1839 %{_mandir}/man8/ceph-volume-systemd.8*
1840 %{_unitdir}/ceph-osd@.service
1841 %{_unitdir}/ceph-osd.target
1842 %{_unitdir}/ceph-volume@.service
1843 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
1844 %config(noreplace) %{_sysctldir}/90-ceph-osd.conf
1845 %{_sysconfdir}/sudoers.d/ceph-osd-smartctl
1846
1847 %post osd
1848 %if 0%{?suse_version}
1849 if [ $1 -eq 1 ] ; then
1850 /usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || :
1851 fi
1852 %endif
1853 %if 0%{?fedora} || 0%{?rhel}
1854 %systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
1855 %endif
1856 if [ $1 -eq 1 ] ; then
1857 /usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || :
1858 fi
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
1864
1865 %preun osd
1866 %if 0%{?suse_version}
1867 %service_del_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
1868 %endif
1869 %if 0%{?fedora} || 0%{?rhel}
1870 %systemd_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
1871 %endif
1872
1873 %postun osd
1874 %if 0%{?suse_version}
1875 DISABLE_RESTART_ON_UPDATE="yes"
1876 %service_del_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
1877 %endif
1878 %if 0%{?fedora} || 0%{?rhel}
1879 %systemd_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
1880 %endif
1881 if [ $1 -ge 1 ] ; then
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
1889 /usr/bin/systemctl try-restart ceph-osd@\*.service ceph-volume@\*.service > /dev/null 2>&1 || :
1890 fi
1891 fi
1892
1893 %if %{with ocf}
1894
1895 %files resource-agents
1896 %dir %{_prefix}/lib/ocf
1897 %dir %{_prefix}/lib/ocf/resource.d
1898 %dir %{_prefix}/lib/ocf/resource.d/ceph
1899 %attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/ceph/rbd
1900
1901 %endif
1902
1903 %files -n librados2
1904 %{_libdir}/librados.so.*
1905 %dir %{_libdir}/ceph
1906 %{_libdir}/ceph/libceph-common.so.*
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
1916 %dir %{_includedir}/rados
1917 %{_includedir}/rados/librados.h
1918 %{_includedir}/rados/rados_types.h
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
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}
1938 %files -n python-rados
1939 %{python_sitearch}/rados.so
1940 %{python_sitearch}/rados-*.egg-info
1941 %endif
1942
1943 %files -n python%{python3_pkgversion}-rados
1944 %{python3_sitearch}/rados.cpython*.so
1945 %{python3_sitearch}/rados-*.egg-info
1946
1947 %if 0%{with libradosstriper}
1948 %files -n libradosstriper1
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
1956 %dir %{_includedir}/radosstriper
1957 %{_includedir}/radosstriper/libradosstriper.h
1958 %{_includedir}/radosstriper/libradosstriper.hpp
1959 %{_libdir}/libradosstriper.so
1960 %endif
1961
1962 %files -n librbd1
1963 %{_libdir}/librbd.so.*
1964 %if %{with lttng}
1965 %{_libdir}/librbd_tp.so.*
1966 %endif
1967
1968 %post -n librbd1 -p /sbin/ldconfig
1969
1970 %postun -n librbd1 -p /sbin/ldconfig
1971
1972 %files -n librbd-devel
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
1983 %{_libdir}/librgw.so.*
1984 %{_libdir}/librgw_admin_user.so.*
1985 %if %{with lttng}
1986 %{_libdir}/librgw_op_tp.so*
1987 %{_libdir}/librgw_rados_tp.so*
1988 %endif
1989
1990 %post -n librgw2 -p /sbin/ldconfig
1991
1992 %postun -n librgw2 -p /sbin/ldconfig
1993
1994 %files -n librgw-devel
1995 %dir %{_includedir}/rados
1996 %{_includedir}/rados/librgw.h
1997 %{_includedir}/rados/librgw_admin_user.h
1998 %{_includedir}/rados/rgw_file.h
1999 %{_libdir}/librgw.so
2000 %{_libdir}/librgw_admin_user.so
2001
2002 %if 0%{with python2}
2003 %files -n python-rgw
2004 %{python_sitearch}/rgw.so
2005 %{python_sitearch}/rgw-*.egg-info
2006 %endif
2007
2008 %files -n python%{python3_pkgversion}-rgw
2009 %{python3_sitearch}/rgw.cpython*.so
2010 %{python3_sitearch}/rgw-*.egg-info
2011
2012 %if 0%{with python2}
2013 %files -n python-rbd
2014 %{python_sitearch}/rbd.so
2015 %{python_sitearch}/rbd-*.egg-info
2016 %endif
2017
2018 %files -n python%{python3_pkgversion}-rbd
2019 %{python3_sitearch}/rbd.cpython*.so
2020 %{python3_sitearch}/rbd-*.egg-info
2021
2022 %files -n libcephfs2
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
2030 %dir %{_includedir}/cephfs
2031 %{_includedir}/cephfs/libcephfs.h
2032 %{_includedir}/cephfs/ceph_statx.h
2033 %{_libdir}/libcephfs.so
2034
2035 %if 0%{with python2}
2036 %files -n python-cephfs
2037 %{python_sitearch}/cephfs.so
2038 %{python_sitearch}/cephfs-*.egg-info
2039 %{python_sitelib}/ceph_volume_client.py*
2040 %endif
2041
2042 %files -n python%{python3_pkgversion}-cephfs
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
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
2054 %files -n python%{python3_pkgversion}-ceph-argparse
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
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
2066 %if 0%{with ceph_test_package}
2067 %files -n ceph-test
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
2086 %{_bindir}/ceph_test_*
2087 %{_bindir}/ceph-coverage
2088 %{_bindir}/ceph-debugpack
2089 %{_bindir}/cephdeduptool
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
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
2104 %{_libdir}/libcephfs_jni.so
2105
2106 %files -n cephfs-java
2107 %{_javadir}/libcephfs.jar
2108 %{_javadir}/libcephfs-test.jar
2109 %endif
2110
2111 %files -n rados-objclass-devel
2112 %dir %{_includedir}/rados
2113 %{_includedir}/rados/objclass.h
2114
2115 %if 0%{with selinux}
2116 %files selinux
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
2124 FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
2125 cp ${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
2131 if ! /usr/sbin/selinuxenabled; then
2132 # Do not relabel if selinux is not enabled
2133 exit 0
2134 fi
2135
2136 if diff ${FILE_CONTEXT} ${FILE_CONTEXT}.pre > /dev/null 2>&1; then
2137 # Do not relabel if file contexts did not change
2138 exit 0
2139 fi
2140
2141 # Check whether the daemons are running
2142 /usr/bin/systemctl status ceph.target > /dev/null 2>&1
2143 STATUS=$?
2144
2145 # Stop the daemons if they were running
2146 if test $STATUS -eq 0; then
2147 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
2148 fi
2149
2150 # Relabel the files fix for first package install
2151 /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
2152
2153 rm -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
2158 if test $STATUS -eq 0; then
2159 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
2160 fi
2161 exit 0
2162
2163 %postun selinux
2164 if [ $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
2197 fi
2198 exit 0
2199
2200 %endif # with selinux
2201
2202 %if 0%{with python2}
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.
2206 %endif
2207
2208 %files grafana-dashboards
2209 %if 0%{?suse_version}
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
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
2219
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
2227
2228 %changelog