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