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