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