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