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