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