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