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