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