1 # vim: set noexpandtab ts=8 sw=8 :
3 # spec file for package ceph
5 # Copyright (C) 2004-2017 The Ceph Project Developers. See COPYING file
6 # at the top-level directory of this distribution and at
7 # https://github.com/ceph/ceph/blob/master/COPYING
9 # All modifications and additions to the file contributed by third parties
10 # remain the property of their copyright owners, unless otherwise agreed
13 # This file is under the GNU Lesser General Public License, version 2.1
15 # Please submit bugfixes or comments via http://tracker.ceph.com/
18 %bcond_without cephfs_java
20 %bcond_with ceph_test_package
22 %bcond_without ceph_test_package
24 %bcond_with make_check
28 %bcond_without tcmalloc
30 %bcond_with lowmem_builder
31 %if 0%{?fedora} || 0%{?rhel}
32 %bcond_without selinux
38 # LTTng-UST enabled on Fedora, RHEL 6+, and SLE (not openSUSE)
39 %if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version}
40 %if ! 0%{?is_opensuse}
46 # get selinux policy version
47 %{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0}
50 %{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d}
51 %{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create}
52 %{!?python3_pkgversion: %global python3_pkgversion 3}
54 # unify libexec for all targets
55 %global _libexecdir
%{_exec_prefix}/lib
57 # disable dwz which compresses the debuginfo
58 %global _find_debuginfo_dwz_opts
%{nil}
60 #################################################################################
61 # main package definition
62 #################################################################################
65 Release: @RPM_RELEASE@
%{?dist}
66 %if 0%{?fedora} || 0%{?rhel}
70 # define _epoch_prefix macro which will expand to the empty string if epoch is
72 %global _epoch_prefix
%{?epoch:%{epoch}:}
74 Summary: User space components of the Ceph file system
75 License: LGPL
-2.1 and CC
-BY
-SA
-3.0 and GPL
-2.0 and BSL
-1.0 and BSD
-3-Clause and MIT
77 Group: System
/Filesystems
80 Source0: http
://ceph.com
/download
/@TARBALL_BASENAME@.tar.bz2
83 ExclusiveArch: x86_64 aarch64 ppc64 ppc64le
85 ExclusiveArch: x86_64 aarch64 ppc64le s390x
88 #################################################################################
89 # dependencies that apply across all distro families
90 #################################################################################
91 Requires: ceph
-osd
= %{_epoch_prefix}%{version}-%{release}
92 Requires: ceph
-mds
= %{_epoch_prefix}%{version}-%{release}
93 Requires: ceph
-mgr
= %{_epoch_prefix}%{version}-%{release}
94 Requires: ceph
-mon
= %{_epoch_prefix}%{version}-%{release}
95 Requires(post
): binutils
96 %if 0%{with cephfs_java}
97 BuildRequires
: java
-devel
98 BuildRequires
: sharutils
101 BuildRequires
: checkpolicy
102 BuildRequires
: selinux
-policy
-devel
104 %if 0%{with make_check}
105 %if 0%{?fedora} || 0%{?rhel}
106 BuildRequires
: python
-cherrypy
107 BuildRequires
: python
-werkzeug
109 %if 0%{?suse_version}
110 BuildRequires
: python
-CherryPy
111 BuildRequires
: python
-Werkzeug
112 BuildRequires
: python
-numpy
-devel
114 BuildRequires
: python
-coverage
115 BuildRequires
: python
-pecan
121 BuildRequires
: cryptsetup
122 BuildRequires
: fuse
-devel
123 BuildRequires
: gcc
-c
++
125 %if 0%{with tcmalloc}
126 %if 0%{?fedora} || 0%{?rhel}
127 BuildRequires
: gperftools
-devel
>= 2.6.1
129 %if 0%{?suse_version}
130 BuildRequires
: gperftools
-devel
>= 2.4
134 BuildRequires
: leveldb
-devel
> 1.2
135 BuildRequires
: libaio
-devel
136 BuildRequires
: libblkid
-devel
>= 2.17
137 BuildRequires
: libcurl
-devel
138 BuildRequires
: libudev
-devel
139 BuildRequires
: libtool
140 BuildRequires
: libxml2
-devel
142 BuildRequires
: parted
144 BuildRequires
: pkgconfig
145 BuildRequires
: python
146 BuildRequires
: python
-devel
147 BuildRequires
: python
-nose
148 BuildRequires
: python
-requests
149 BuildRequires
: python
-six
150 BuildRequires
: python
-virtualenv
151 BuildRequires
: snappy
-devel
153 BuildRequires
: util
-linux
154 BuildRequires
: valgrind
-devel
156 BuildRequires
: xfsprogs
157 BuildRequires
: xfsprogs
-devel
158 BuildRequires
: xmlstarlet
161 #################################################################################
162 # distro-conditional dependencies
163 #################################################################################
164 %if 0%{?suse_version}
165 BuildRequires
: pkgconfig
(systemd
)
166 BuildRequires
: systemd
-rpm
-macros
167 BuildRequires
: systemd
169 PreReq
: %fillup_prereq
170 BuildRequires
: net
-tools
171 BuildRequires
: libbz2
-devel
172 BuildRequires
: btrfsprogs
173 BuildRequires
: mozilla
-nss
-devel
174 BuildRequires
: keyutils
-devel
175 BuildRequires
: libopenssl
-devel
176 BuildRequires
: lsb
-release
177 BuildRequires
: openldap2
-devel
178 BuildRequires
: python
-Cython
179 BuildRequires
: python
-PrettyTable
180 BuildRequires
: python
-Sphinx
181 BuildRequires
: rdma
-core
-devel
183 %if 0%{?fedora} || 0%{?rhel}
185 BuildRequires
: boost
-random
186 BuildRequires
: btrfs
-progs
187 BuildRequires
: nss
-devel
188 BuildRequires
: keyutils
-libs
-devel
189 BuildRequires
: libibverbs
-devel
190 BuildRequires
: openldap
-devel
191 BuildRequires
: openssl
-devel
192 BuildRequires
: redhat
-lsb
-core
193 BuildRequires
: Cython
194 BuildRequires
: python
-prettytable
195 BuildRequires
: python
-sphinx
197 # python34-... for RHEL, python3-... for all other supported distros
199 BuildRequires
: python34
-devel
200 BuildRequires
: python34
-setuptools
201 BuildRequires
: python34
-Cython
203 BuildRequires
: python3
-devel
204 BuildRequires
: python3
-setuptools
205 BuildRequires
: python3
-Cython
207 # lttng and babeltrace for rbd-replay-prep
209 %if 0%{?fedora} || 0%{?rhel}
210 BuildRequires
: lttng
-ust
-devel
211 BuildRequires
: libbabeltrace
-devel
213 %if 0%{?suse_version}
214 BuildRequires
: lttng
-ust
-devel
215 BuildRequires
: babeltrace
-devel
218 %if 0%{?suse_version}
219 BuildRequires
: libexpat
-devel
221 %if 0%{?rhel} || 0%{?fedora}
222 BuildRequires
: expat
-devel
225 %if 0%{?fedora} || 0%{?rhel}
226 BuildRequires
: redhat
-rpm
-config
230 Ceph is a massively scalable
, open
-source, distributed storage system that runs
231 on commodity hardware and delivers object
, block and file system storage.
234 #################################################################################
236 #################################################################################
238 Summary: Ceph Base Package
239 %if 0%{?suse_version}
240 Group: System
/Filesystems
242 Requires: ceph
-common
= %{_epoch_prefix}%{version}-%{release}
243 Requires: librbd1
= %{_epoch_prefix}%{version}-%{release}
244 Requires: librados2
= %{_epoch_prefix}%{version}-%{release}
245 Requires: libcephfs2
= %{_epoch_prefix}%{version}-%{release}
246 Requires: librgw2
= %{_epoch_prefix}%{version}-%{release}
248 Requires: ceph
-selinux
= %{_epoch_prefix}%{version}-%{release}
251 Requires: python
-requests
252 Requires: python
-setuptools
263 %if 0%{?fedora} || 0%{?rhel}
265 # The following is necessary due to tracker 36508 and can be removed once the
266 # associated upstream bugs are resolved.
267 %if 0%{with tcmalloc}
268 Requires: gperftools
-libs
>= 2.6.1
271 %if 0%{?suse_version}
272 Recommends
: ntp
-daemon
276 Base is the package that includes all the files shared amongst ceph servers
278 %package -n ceph
-common
280 %if 0%{?suse_version}
281 Group: System
/Filesystems
283 Requires: librbd1
= %{_epoch_prefix}%{version}-%{release}
284 Requires: librados2
= %{_epoch_prefix}%{version}-%{release}
285 Requires: libcephfs2
= %{_epoch_prefix}%{version}-%{release}
286 Requires: python
-rados
= %{_epoch_prefix}%{version}-%{release}
287 Requires: python
-rbd
= %{_epoch_prefix}%{version}-%{release}
288 Requires: python
-cephfs
= %{_epoch_prefix}%{version}-%{release}
289 Requires: python
-rgw
= %{_epoch_prefix}%{version}-%{release}
290 %if 0%{?fedora} || 0%{?rhel}
291 Requires: python
-prettytable
293 %if 0%{?suse_version}
294 Requires: python
-PrettyTable
296 Requires: python
-requests
298 %if 0%{?suse_version}
299 Requires(pre
): pwdutils
301 %description -n ceph
-common
302 Common utilities to mount and interact with a ceph storage cluster.
303 Comprised of files that are common to Ceph clients and servers.
306 Summary: Ceph Metadata Server Daemon
307 %if 0%{?suse_version}
308 Group: System
/Filesystems
310 Requires: ceph
-base
= %{_epoch_prefix}%{version}-%{release}
312 ceph
-mds is the metadata server daemon
for the Ceph distributed file system.
313 One or more instances of ceph
-mds collectively manage the file system
314 namespace
, coordinating access to the shared OSD cluster.
317 Summary: Ceph Monitor Daemon
318 %if 0%{?suse_version}
319 Group: System
/Filesystems
321 Requires: ceph
-base
= %{_epoch_prefix}%{version}-%{release}
323 %if 0%{?fedora} || 0%{?rhel}
324 Requires: python
-flask
326 %if 0%{?suse_version}
327 Requires: python
-Flask
330 ceph
-mon is the cluster monitor daemon
for the Ceph distributed file
331 system. One or more instances of ceph
-mon form a Paxos part
-time
332 parliament cluster that provides extremely reliable and durable storage
333 of cluster membership
, configuration
, and state.
336 Summary: Ceph Manager Daemon
337 %if 0%{?suse_version}
338 Group: System
/Filesystems
340 Requires: ceph
-base
= %{_epoch_prefix}%{version}-%{release}
342 %if 0%{?fedora} || 0%{?rhel}
343 Requires: python
-cherrypy
344 Requires: python
-jinja2
345 Requires: python
-werkzeug
348 %if 0%{?suse_version}
349 Requires: python
-CherryPy
350 Requires: python
-Jinja2
351 Requires: python
-Werkzeug
352 Requires: python
-pyOpenSSL
354 Requires: python
-pecan
356 ceph
-mgr enables python modules that provide services
(such as the REST
357 module derived from Calamari
) and expose CLI hooks. ceph
-mgr gathers
358 the cluster maps
, the daemon metadata
, and performance counters
, and
359 exposes all these to the python modules.
362 Summary: Ceph fuse
-based client
363 %if 0%{?suse_version}
364 Group: System
/Filesystems
368 FUSE based client
for Ceph distributed network file system
371 Summary: Ceph fuse
-based client
372 %if 0%{?suse_version}
373 Group: System
/Filesystems
375 Requires: librados2
= %{_epoch_prefix}%{version}-%{release}
376 Requires: librbd1
= %{_epoch_prefix}%{version}-%{release}
377 %description -n rbd
-fuse
378 FUSE based client to map Ceph rbd images to files
380 %package -n rbd
-mirror
381 Summary: Ceph daemon
for mirroring RBD images
382 %if 0%{?suse_version}
383 Group: System
/Filesystems
385 Requires: ceph
-common
= %{_epoch_prefix}%{version}-%{release}
386 Requires: librados2
= %{_epoch_prefix}%{version}-%{release}
387 %description -n rbd
-mirror
388 Daemon
for mirroring RBD images between Ceph clusters
, streaming
389 changes asynchronously.
392 Summary: Ceph RBD client base on NBD
393 %if 0%{?suse_version}
394 Group: System
/Filesystems
396 Requires: librados2
= %{_epoch_prefix}%{version}-%{release}
397 Requires: librbd1
= %{_epoch_prefix}%{version}-%{release}
398 %description -n rbd
-nbd
399 NBD based client to map Ceph rbd images to
local device
402 Summary: Rados REST gateway
403 %if 0%{?suse_version}
404 Group: System
/Filesystems
406 Requires: ceph
-common
= %{_epoch_prefix}%{version}-%{release}
408 Requires: ceph
-selinux
= %{_epoch_prefix}%{version}-%{release}
410 Requires: librados2
= %{_epoch_prefix}%{version}-%{release}
411 Requires: librgw2
= %{_epoch_prefix}%{version}-%{release}
412 %if 0%{?rhel} || 0%{?fedora}
416 RADOS is a distributed object store used by the Ceph distributed
417 storage system. This package provides a REST gateway to the
418 object store that aims to implement a superset of Amazon's S3
419 service as well as the OpenStack Object Storage
("Swift"
) API.
422 %package resource
-agents
423 Summary: OCF
-compliant resource agents
for Ceph daemons
424 %if 0%{?suse_version}
425 Group: System
/Filesystems
427 Requires: ceph
-base
= %{_epoch_prefix}%{version}
428 Requires: resource
-agents
429 %description resource
-agents
430 Resource agents
for monitoring and managing Ceph daemons
431 under Open Cluster Framework
(OCF
) compliant resource
432 managers such as Pacemaker.
436 Summary: Ceph Object Storage Daemon
437 %if 0%{?suse_version}
438 Group: System
/Filesystems
440 Requires: ceph
-base
= %{_epoch_prefix}%{version}-%{release}
443 ceph
-osd is the object storage daemon
for the Ceph distributed file
444 system. It is responsible
for storing objects on a
local file system
445 and providing access to them over the network.
447 %package -n librados2
448 Summary: RADOS distributed object store client library
449 %if 0%{?suse_version}
450 Group: System
/Libraries
452 %if 0%{?rhel} || 0%{?fedora}
453 Obsoletes
: ceph
-libs
< %{_epoch_prefix}%{version}-%{release}
455 %description -n librados2
456 RADOS is a reliable
, autonomic distributed object storage cluster
457 developed as part of the Ceph distributed storage system. This is a
458 shared library allowing applications to access the distributed object
459 store using a simple file
-like interface.
461 %package -n librados
-devel
462 Summary: RADOS headers
463 %if 0%{?suse_version}
464 Group: Development
/Libraries
/C and C
++
466 Requires: librados2
= %{_epoch_prefix}%{version}-%{release}
467 Obsoletes
: ceph
-devel
< %{_epoch_prefix}%{version}-%{release}
468 Provides: librados2
-devel
= %{_epoch_prefix}%{version}-%{release}
469 Obsoletes
: librados2
-devel
< %{_epoch_prefix}%{version}-%{release}
470 %description -n librados
-devel
471 This package contains libraries and headers needed to develop programs
472 that use RADOS object store.
475 Summary: RADOS gateway client library
476 %if 0%{?suse_version}
477 Group: System
/Libraries
479 Requires: librados2
= %{_epoch_prefix}%{version}-%{release}
480 %description -n librgw2
481 This package provides a library implementation of the RADOS gateway
482 (distributed object store with S3 and Swift personalities
).
484 %package -n librgw
-devel
485 Summary: RADOS gateway client library
486 %if 0%{?suse_version}
487 Group: Development
/Libraries
/C and C
++
489 Requires: librados
-devel
= %{_epoch_prefix}%{version}-%{release}
490 Requires: librgw2
= %{_epoch_prefix}%{version}-%{release}
491 Provides: librgw2
-devel
= %{_epoch_prefix}%{version}-%{release}
492 Obsoletes
: librgw2
-devel
< %{_epoch_prefix}%{version}-%{release}
493 %description -n librgw
-devel
494 This package contains libraries and headers needed to develop programs
495 that use RADOS gateway client library.
497 %package -n python
-rgw
498 Summary: Python
2 libraries
for the RADOS gateway
499 %if 0%{?suse_version}
500 Group: Development
/Languages
/Python
502 Requires: librgw2
= %{_epoch_prefix}%{version}-%{release}
503 Requires: python
-rados
= %{_epoch_prefix}%{version}-%{release}
504 Obsoletes
: python
-ceph
< %{_epoch_prefix}%{version}-%{release}
505 %description -n python
-rgw
506 This package contains Python
2 libraries
for interacting with Cephs RADOS
509 %package -n python
%{python3_pkgversion}-rgw
510 Summary: Python
3 libraries
for the RADOS gateway
511 %if 0%{?suse_version}
512 Group: Development
/Languages
/Python
514 Requires: librgw2
= %{_epoch_prefix}%{version}-%{release}
515 Requires: python
%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
516 %description -n python
%{python3_pkgversion}-rgw
517 This package contains Python
3 libraries
for interacting with Cephs RADOS
520 %package -n python
-rados
521 Summary: Python
2 libraries
for the RADOS object store
522 %if 0%{?suse_version}
523 Group: Development
/Languages
/Python
525 Requires: librados2
= %{_epoch_prefix}%{version}-%{release}
526 Obsoletes
: python
-ceph
< %{_epoch_prefix}%{version}-%{release}
527 %description -n python
-rados
528 This package contains Python
2 libraries
for interacting with Cephs RADOS
531 %package -n python
%{python3_pkgversion}-rados
532 Summary: Python
3 libraries
for the RADOS object store
533 %if 0%{?suse_version}
534 Group: Development
/Languages
/Python
536 Requires: python
%{python3_pkgversion}
537 Requires: librados2
= %{_epoch_prefix}%{version}-%{release}
538 %description -n python
%{python3_pkgversion}-rados
539 This package contains Python
3 libraries
for interacting with Cephs RADOS
542 %package -n libradosstriper1
543 Summary: RADOS striping interface
544 %if 0%{?suse_version}
545 Group: System
/Libraries
547 Requires: librados2
= %{_epoch_prefix}%{version}-%{release}
548 %description -n libradosstriper1
549 Striping interface built on top of the rados library
, allowing
550 to stripe bigger objects onto several standard rados objects using
551 an interface very similar to the rados one.
553 %package -n libradosstriper
-devel
554 Summary: RADOS striping interface headers
555 %if 0%{?suse_version}
556 Group: Development
/Libraries
/C and C
++
558 Requires: libradosstriper1
= %{_epoch_prefix}%{version}-%{release}
559 Requires: librados
-devel
= %{_epoch_prefix}%{version}-%{release}
560 Obsoletes
: ceph
-devel
< %{_epoch_prefix}%{version}-%{release}
561 Provides: libradosstriper1
-devel
= %{_epoch_prefix}%{version}-%{release}
562 Obsoletes
: libradosstriper1
-devel
< %{_epoch_prefix}%{version}-%{release}
563 %description -n libradosstriper
-devel
564 This package contains libraries and headers needed to develop programs
565 that use RADOS striping interface.
568 Summary: RADOS block device client library
569 %if 0%{?suse_version}
570 Group: System
/Libraries
572 Requires: librados2
= %{_epoch_prefix}%{version}-%{release}
573 %if 0%{?suse_version}
574 Requires(post
): coreutils
576 %if 0%{?rhel} || 0%{?fedora}
577 Obsoletes
: ceph
-libs
< %{_epoch_prefix}%{version}-%{release}
579 %description -n librbd1
580 RBD is a block device striped across multiple distributed objects
in
581 RADOS
, a reliable
, autonomic distributed object storage cluster
582 developed as part of the Ceph distributed storage system. This is a
583 shared library allowing applications to manage these block devices.
585 %package -n librbd
-devel
586 Summary: RADOS block device headers
587 %if 0%{?suse_version}
588 Group: Development
/Libraries
/C and C
++
590 Requires: librbd1
= %{_epoch_prefix}%{version}-%{release}
591 Requires: librados
-devel
= %{_epoch_prefix}%{version}-%{release}
592 Obsoletes
: ceph
-devel
< %{_epoch_prefix}%{version}-%{release}
593 Provides: librbd1
-devel
= %{_epoch_prefix}%{version}-%{release}
594 Obsoletes
: librbd1
-devel
< %{_epoch_prefix}%{version}-%{release}
595 %description -n librbd
-devel
596 This package contains libraries and headers needed to develop programs
597 that use RADOS block device.
599 %package -n python
-rbd
600 Summary: Python
2 libraries
for the RADOS block device
601 %if 0%{?suse_version}
602 Group: Development
/Languages
/Python
604 Requires: librbd1
= %{_epoch_prefix}%{version}-%{release}
605 Requires: python
-rados
= %{_epoch_prefix}%{version}-%{release}
606 Obsoletes
: python
-ceph
< %{_epoch_prefix}%{version}-%{release}
607 %description -n python
-rbd
608 This package contains Python
2 libraries
for interacting with Cephs RADOS
611 %package -n python
%{python3_pkgversion}-rbd
612 Summary: Python
3 libraries
for the RADOS block device
613 %if 0%{?suse_version}
614 Group: Development
/Languages
/Python
616 Requires: librbd1
= %{_epoch_prefix}%{version}-%{release}
617 Requires: python
%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
618 %description -n python
%{python3_pkgversion}-rbd
619 This package contains Python
3 libraries
for interacting with Cephs RADOS
622 %package -n libcephfs2
623 Summary: Ceph distributed file system client library
624 %if 0%{?suse_version}
625 Group: System
/Libraries
627 Obsoletes
: libcephfs1
628 %if 0%{?rhel} || 0%{?fedora}
629 Obsoletes
: ceph
-libs
< %{_epoch_prefix}%{version}-%{release}
630 Obsoletes
: ceph
-libcephfs
632 %description -n libcephfs2
633 Ceph is a distributed network file system designed to provide excellent
634 performance
, reliability
, and scalability. This is a shared library
635 allowing applications to access a Ceph distributed file system via a
636 POSIX
-like interface.
638 %package -n libcephfs
-devel
639 Summary: Ceph distributed file system headers
640 %if 0%{?suse_version}
641 Group: Development
/Libraries
/C and C
++
643 Requires: libcephfs2
= %{_epoch_prefix}%{version}-%{release}
644 Requires: librados
-devel
= %{_epoch_prefix}%{version}-%{release}
645 Obsoletes
: ceph
-devel
< %{_epoch_prefix}%{version}-%{release}
646 Provides: libcephfs2
-devel
= %{_epoch_prefix}%{version}-%{release}
647 Obsoletes
: libcephfs2
-devel
< %{_epoch_prefix}%{version}-%{release}
648 %description -n libcephfs
-devel
649 This package contains libraries and headers needed to develop programs
650 that use Cephs distributed file system.
652 %package -n python
-cephfs
653 Summary: Python
2 libraries
for Ceph distributed file system
654 %if 0%{?suse_version}
655 Group: Development
/Languages
/Python
657 Requires: libcephfs2
= %{_epoch_prefix}%{version}-%{release}
658 %if 0%{?suse_version}
659 Recommends
: python
-rados
= %{_epoch_prefix}%{version}-%{release}
661 Obsoletes
: python
-ceph
< %{_epoch_prefix}%{version}-%{release}
662 %description -n python
-cephfs
663 This package contains Python
2 libraries
for interacting with Cephs distributed
666 %package -n python
%{python3_pkgversion}-cephfs
667 Summary: Python
3 libraries
for Ceph distributed file system
668 %if 0%{?suse_version}
669 Group: Development
/Languages
/Python
671 Requires: libcephfs2
= %{_epoch_prefix}%{version}-%{release}
672 Requires: python
%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
673 %description -n python
%{python3_pkgversion}-cephfs
674 This package contains Python
3 libraries
for interacting with Cephs distributed
677 %package -n python
%{python3_pkgversion}-ceph
-argparse
678 Summary: Python
3 utility libraries
for Ceph CLI
679 %if 0%{?suse_version}
680 Group: Development
/Languages
/Python
682 %description -n python
%{python3_pkgversion}-ceph
-argparse
683 This package contains types and routines
for Python
3 used by the Ceph CLI as
684 well as the RESTful interface. These have to
do with querying the daemons
for
685 command-description information
, validating user
command input against those
686 descriptions
, and submitting the
command to the appropriate daemon.
688 %if 0%{with ceph_test_package}
689 %package -n ceph
-test
690 Summary: Ceph benchmarks and
test tools
691 %if 0%{?suse_version}
692 Group: System
/Benchmark
694 Requires: ceph
-common
= %{_epoch_prefix}%{version}-%{release}
698 %description -n ceph
-test
699 This package contains Ceph benchmarks and
test tools.
702 %if 0%{with cephfs_java}
704 %package -n libcephfs_jni1
705 Summary: Java Native Interface library
for CephFS Java bindings
706 %if 0%{?suse_version}
707 Group: System
/Libraries
710 Requires: libcephfs2
= %{_epoch_prefix}%{version}-%{release}
711 %description -n libcephfs_jni1
712 This package contains the Java Native Interface library
for CephFS Java
715 %package -n libcephfs_jni
-devel
716 Summary: Development files
for CephFS Java Native Interface library
717 %if 0%{?suse_version}
718 Group: Development
/Libraries
/Java
721 Requires: libcephfs_jni1
= %{_epoch_prefix}%{version}-%{release}
722 Obsoletes
: ceph
-devel
< %{_epoch_prefix}%{version}-%{release}
723 Provides: libcephfs_jni1
-devel
= %{_epoch_prefix}%{version}-%{release}
724 Obsoletes
: libcephfs_jni1
-devel
< %{_epoch_prefix}%{version}-%{release}
725 %description -n libcephfs_jni
-devel
726 This package contains the development files
for CephFS Java Native Interface
729 %package -n cephfs
-java
730 Summary: Java libraries
for the Ceph File System
731 %if 0%{?suse_version}
732 Group: System
/Libraries
735 Requires: libcephfs_jni1
= %{_epoch_prefix}%{version}-%{release}
738 %description -n cephfs
-java
739 This package contains the Java libraries
for the Ceph File System.
743 %package -n rados
-objclass
-devel
744 Summary: RADOS object class development kit
745 Group: Development
/Libraries
746 Requires: librados2
-devel
= %{_epoch_prefix}%{version}-%{release}
747 %description -n rados
-objclass
-devel
748 This package contains libraries and headers needed to develop RADOS object
754 Summary: SELinux support
for Ceph MON
, OSD and MDS
755 %if 0%{?suse_version}
756 Group: System
/Filesystems
758 Requires: ceph
-base
= %{_epoch_prefix}%{version}-%{release}
759 Requires: policycoreutils
, libselinux
-utils
760 Requires(post
): ceph
-base
= %{_epoch_prefix}%{version}-%{release}
761 Requires(post
): selinux
-policy
-base
>= %{_selinux_policy_version}, policycoreutils
, gawk
762 Requires(postun
): policycoreutils
764 This package contains SELinux support
for Ceph MON
, OSD and MDS. The package
765 also performs file
-system relabelling which can take a long
time on heavily
766 populated file
-systems.
770 %package -n python
-ceph
-compat
771 Summary: Compatibility package
for Cephs python libraries
772 %if 0%{?suse_version}
773 Group: Development
/Languages
/Python
775 Obsoletes
: python
-ceph
776 Requires: python
-rados
= %{_epoch_prefix}%{version}-%{release}
777 Requires: python
-rbd
= %{_epoch_prefix}%{version}-%{release}
778 Requires: python
-cephfs
= %{_epoch_prefix}%{version}-%{release}
779 Requires: python
-rgw
= %{_epoch_prefix}%{version}-%{release}
780 Provides: python
-ceph
781 %description -n python
-ceph
-compat
782 This is a compatibility package to accommodate python
-ceph split into
783 python
-rados
, python
-rbd
, python
-rgw and python
-cephfs. Packages still
784 depending on python
-ceph should be fixed to depend on python
-rados
,
785 python
-rbd
, python
-rgw or python
-cephfs instead.
787 #################################################################################
789 #################################################################################
791 %autosetup -p1
-n @TARBALL_BASENAME@
794 %if 0%{with cephfs_java}
796 for i
in /usr
/{lib64
,lib
}/jvm
/java
/include
{,/linux
}; do
797 [ -d $i
] && java_inc
="$java_inc
-I$i"
801 %if %{with lowmem_builder}
802 RPM_OPT_FLAGS
="$RPM_OPT_FLAGS
--param ggc
-min
-expand
=20 --param ggc
-min
-heapsize
=32768"
804 export RPM_OPT_FLAGS
=`
echo $RPM_OPT_FLAGS | sed
-e 's
/i386
/i486
/'`
806 export CPPFLAGS
="$java_inc"
807 export CFLAGS
="$RPM_OPT_FLAGS"
808 export CXXFLAGS
="$RPM_OPT_FLAGS"
809 export LDFLAGS
="$RPM_LD_FLAGS"
813 %if %{with lowmem_builder}
815 %define _smp_mflags
-j8
819 # unlimit _smp_mflags in system macro if not set above
820 %define _smp_ncpus_max
0
821 # extract the number of processors for use with cmake
822 %define _smp_ncpus %
(echo %{_smp_mflags} | sed 's
/-j
//'
)
827 -DCMAKE_INSTALL_PREFIX
=%{_prefix} \
828 -DCMAKE_INSTALL_LIBDIR
=%{_libdir} \
829 -DCMAKE_INSTALL_LIBEXECDIR
=%{_libexecdir} \
830 -DCMAKE_INSTALL_LOCALSTATEDIR
=%{_localstatedir} \
831 -DCMAKE_INSTALL_SYSCONFDIR
=%{_sysconfdir} \
832 -DCMAKE_INSTALL_MANDIR
=%{_mandir} \
833 -DCMAKE_INSTALL_DOCDIR
=%{_docdir}/ceph \
834 -DCMAKE_INSTALL_INCLUDEDIR
=%{_includedir} \
838 %if 0%{?rhel} && ! 0%{?centos}
841 %if 0%{without ceph_test_package}
844 %if 0%{with cephfs_java}
845 -DWITH_CEPHFS_JAVA
=ON \
852 -DWITH_BABELTRACE
=ON \
855 -DWITH_BABELTRACE
=OFF \
857 $CEPH_EXTRA_CMAKE_ARGS \
861 %ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le
%{ix86} x86_64
862 -DWITH_BOOST_CONTEXT
=ON \
864 -DWITH_BOOST_CONTEXT
=OFF \
866 -DBOOST_J
=%{_smp_ncpus}
871 %if 0%{with make_check}
873 # run in-tree unittests
875 ctest
%{?_smp_mflags}
883 make DESTDIR
=%{buildroot} install
884 # we have dropped sysvinit bits
885 rm -f
%{buildroot}/%{_sysconfdir}/init.d
/ceph
887 install -m
0644 -D src
/etc
-rbdmap
%{buildroot}%{_sysconfdir}/ceph
/rbdmap
888 %if 0%{?fedora} || 0%{?rhel}
889 install -m
0644 -D etc
/sysconfig
/ceph
%{buildroot}%{_sysconfdir}/sysconfig
/ceph
891 %if 0%{?suse_version}
892 install -m
0644 -D etc
/sysconfig
/ceph
%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
894 install -m
0644 -D systemd
/ceph.tmpfiles.d
%{buildroot}%{_tmpfilesdir}/ceph
-common.conf
895 install -m
0755 -D systemd
/ceph
%{buildroot}%{_sbindir}/rcceph
896 install -m
0644 -D systemd
/50-ceph.preset
%{buildroot}%{_libexecdir}/systemd
/system
-preset
/50-ceph.preset
897 mkdir -p
%{buildroot}%{_sbindir}
898 install -m
0644 -D src
/logrotate.conf
%{buildroot}%{_sysconfdir}/logrotate.d
/ceph
899 chmod
0644 %{buildroot}%{_docdir}/ceph
/sample.ceph.conf
900 install -m
0644 -D COPYING
%{buildroot}%{_docdir}/ceph
/COPYING
901 install -m
0644 -D etc
/sysctl
/90-ceph
-osd.conf
%{buildroot}%{_sysctldir}/90-ceph
-osd.conf
903 # firewall templates and /sbin/mount.ceph symlink
904 %if 0%{?suse_version}
905 install -m
0644 -D etc
/sysconfig
/SuSEfirewall2.d
/services
/ceph
-mon
%{buildroot}%{_sysconfdir}/sysconfig
/SuSEfirewall2.d
/services
/ceph
-mon
906 install -m
0644 -D etc
/sysconfig
/SuSEfirewall2.d
/services
/ceph
-osd
-mds
%{buildroot}%{_sysconfdir}/sysconfig
/SuSEfirewall2.d
/services
/ceph
-osd
-mds
907 mkdir -p
%{buildroot}/sbin
908 ln
-sf
%{_sbindir}/mount.ceph %{buildroot}/sbin
/mount.ceph
912 install -m
0644 -D udev
/50-rbd.rules
%{buildroot}%{_udevrulesdir}/50-rbd.rules
913 install -m
0644 -D udev
/60-ceph
-by
-parttypeuuid.rules
%{buildroot}%{_udevrulesdir}/60-ceph
-by
-parttypeuuid.rules
914 install -m
0644 -D udev
/95-ceph
-osd.rules
%{buildroot}%{_udevrulesdir}/95-ceph
-osd.rules
916 #set up placeholder directories
917 mkdir -p
%{buildroot}%{_sysconfdir}/ceph
918 mkdir -p
%{buildroot}%{_localstatedir}/run
/ceph
919 mkdir -p
%{buildroot}%{_localstatedir}/log
/ceph
920 mkdir -p
%{buildroot}%{_localstatedir}/lib
/ceph
/tmp
921 mkdir -p
%{buildroot}%{_localstatedir}/lib
/ceph
/mon
922 mkdir -p
%{buildroot}%{_localstatedir}/lib
/ceph
/osd
923 mkdir -p
%{buildroot}%{_localstatedir}/lib
/ceph
/mds
924 mkdir -p
%{buildroot}%{_localstatedir}/lib
/ceph
/mgr
925 mkdir -p
%{buildroot}%{_localstatedir}/lib
/ceph
/radosgw
926 mkdir -p
%{buildroot}%{_localstatedir}/lib
/ceph
/bootstrap
-osd
927 mkdir -p
%{buildroot}%{_localstatedir}/lib
/ceph
/bootstrap
-mds
928 mkdir -p
%{buildroot}%{_localstatedir}/lib
/ceph
/bootstrap
-rgw
929 mkdir -p
%{buildroot}%{_localstatedir}/lib
/ceph
/bootstrap
-mgr
930 mkdir -p
%{buildroot}%{_localstatedir}/lib
/ceph
/bootstrap
-rbd
932 %if 0%{?suse_version}
933 # create __pycache__ directories and their contents
934 %py3_compile %{buildroot}%{python3_sitelib}
940 #################################################################################
941 # files and systemd scriptlets
942 #################################################################################
947 %{_bindir}/monmaptool
948 %{_bindir}/osdmaptool
949 %{_bindir}/ceph
-kvstore
-tool
951 %{_bindir}/ceph
-detect
-init
952 %{_libexecdir}/systemd
/system
-preset
/50-ceph.preset
953 %{_sbindir}/ceph
-create
-keys
954 %{_sbindir}/ceph
-disk
956 %dir %{_libexecdir}/ceph
957 %{_libexecdir}/ceph
/ceph_common.sh
958 %dir %{_libdir}/rados
-classes
959 %{_libdir}/rados
-classes
/*
961 %dir %{_libdir}/ceph
/erasure
-code
962 %{_libdir}/ceph
/erasure
-code
/libec_
*.so
*
963 %dir %{_libdir}/ceph
/compressor
964 %{_libdir}/ceph
/compressor
/libceph_
*.so
*
966 %dir %{_libdir}/ceph
/crypto
967 %{_libdir}/ceph
/crypto
/libceph_
*.so
*
970 %{_libdir}/libos_tp.so
*
971 %{_libdir}/libosd_tp.so
*
973 %config(noreplace
) %{_sysconfdir}/logrotate.d
/ceph
974 %if 0%{?fedora} || 0%{?rhel}
975 %config(noreplace
) %{_sysconfdir}/sysconfig
/ceph
977 %if 0%{?suse_version}
978 %{_localstatedir}/adm
/fillup
-templates
/sysconfig.
*
979 %config %{_sysconfdir}/sysconfig
/SuSEfirewall2.d
/services
/ceph
-mon
980 %config %{_sysconfdir}/sysconfig
/SuSEfirewall2.d
/services
/ceph
-osd
-mds
982 %{_unitdir}/ceph
-disk@.service
983 %{_unitdir}/ceph.target
984 %{python_sitelib}/ceph_detect_init
*
985 %{python_sitelib}/ceph_disk
*
986 %dir %{python_sitelib}/ceph_volume
987 %{python_sitelib}/ceph_volume
/*
988 %{python_sitelib}/ceph_volume
-*
989 %{_mandir}/man8
/ceph
-deploy
.8*
990 %{_mandir}/man8
/ceph
-detect
-init
.8*
991 %{_mandir}/man8
/ceph
-create
-keys
.8*
992 %{_mandir}/man8
/ceph
-disk
.8*
993 %{_mandir}/man8
/ceph
-run
.8*
994 %{_mandir}/man8
/crushtool
.8*
995 %{_mandir}/man8
/osdmaptool
.8*
996 %{_mandir}/man8
/monmaptool
.8*
997 %{_mandir}/man8
/ceph
-kvstore
-tool
.8*
998 #set up placeholder directories
999 %attr(750,ceph
,ceph
) %dir %{_localstatedir}/lib
/ceph
/tmp
1000 %attr(750,ceph
,ceph
) %dir %{_localstatedir}/lib
/ceph
/bootstrap
-osd
1001 %attr(750,ceph
,ceph
) %dir %{_localstatedir}/lib
/ceph
/bootstrap
-mds
1002 %attr(750,ceph
,ceph
) %dir %{_localstatedir}/lib
/ceph
/bootstrap
-rgw
1003 %attr(750,ceph
,ceph
) %dir %{_localstatedir}/lib
/ceph
/bootstrap
-mgr
1004 %attr(750,ceph
,ceph
) %dir %{_localstatedir}/lib
/ceph
/bootstrap
-rbd
1008 %if 0%{?suse_version}
1010 if [ $
1 -eq
1 ] ; then
1011 /usr
/bin
/systemctl preset ceph
-disk@\
*.service ceph.target
>/dev
/null
2>&1 ||
:
1014 %if 0%{?fedora} || 0%{?rhel}
1015 %systemd_post ceph
-disk@\
*.service ceph.target
1017 if [ $
1 -eq
1 ] ; then
1018 /usr
/bin
/systemctl start ceph.target
>/dev
/null
2>&1 ||
:
1022 %if 0%{?suse_version}
1023 %service_del_preun ceph
-disk@\
*.service ceph.target
1025 %if 0%{?fedora} || 0%{?rhel}
1026 %systemd_preun ceph
-disk@\
*.service ceph.target
1031 test -n "$FIRST_ARG" || FIRST_ARG
=$
1
1032 %if 0%{?suse_version}
1033 DISABLE_RESTART_ON_UPDATE
="yes"
1034 %service_del_postun ceph
-disk@\
*.service ceph.target
1036 %if 0%{?fedora} || 0%{?rhel}
1037 %systemd_postun ceph
-disk@\
*.service ceph.target
1039 if [ $FIRST_ARG
-ge
1 ] ; then
1040 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1041 # "yes". In any case: if units are not running, do not touch them.
1042 SYSCONF_CEPH
=%{_sysconfdir}/sysconfig
/ceph
1043 if [ -f $SYSCONF_CEPH
-a
-r $SYSCONF_CEPH
] ; then
1044 source $SYSCONF_CEPH
1046 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE"
= "Xyes"
] ; then
1047 /usr
/bin
/systemctl try
-restart ceph
-disk@\
*.service
> /dev
/null
2>&1 ||
:
1052 %dir %{_docdir}/ceph
1053 %doc %{_docdir}/ceph
/sample.ceph.conf
1054 %doc %{_docdir}/ceph
/COPYING
1056 %{_bindir}/ceph
-authtool
1057 %{_bindir}/ceph
-conf
1058 %{_bindir}/ceph
-dencoder
1059 %{_bindir}/ceph
-rbdnamer
1061 %{_bindir}/ceph
-crush
-location
1062 %{_bindir}/cephfs
-data
-scan
1063 %{_bindir}/cephfs
-journal
-tool
1064 %{_bindir}/cephfs
-table
-tool
1066 %{_bindir}/radosgw
-admin
1068 %{_bindir}/rbd
-replay
1069 %{_bindir}/rbd
-replay
-many
1071 %{_sbindir}/mount.ceph
1072 %if 0%{?suse_version}
1076 %{_bindir}/rbd
-replay
-prep
1078 %{_bindir}/ceph
-post
-file
1079 %{_bindir}/ceph
-brag
1080 %{_tmpfilesdir}/ceph
-common.conf
1081 %{_mandir}/man8
/ceph
-authtool
.8*
1082 %{_mandir}/man8
/ceph
-conf
.8*
1083 %{_mandir}/man8
/ceph
-dencoder
.8*
1084 %{_mandir}/man8
/ceph
-rbdnamer
.8*
1085 %{_mandir}/man8
/ceph
-syn
.8*
1086 %{_mandir}/man8
/ceph
-post
-file
.8*
1087 %{_mandir}/man8
/ceph
.8*
1088 %{_mandir}/man8
/mount.ceph
.8*
1089 %{_mandir}/man8
/rados
.8*
1090 %{_mandir}/man8
/radosgw
-admin
.8*
1091 %{_mandir}/man8
/rbd
.8*
1092 %{_mandir}/man8
/rbdmap
.8*
1093 %{_mandir}/man8
/rbd
-replay
.8*
1094 %{_mandir}/man8
/rbd
-replay
-many
.8*
1095 %{_mandir}/man8
/rbd
-replay
-prep
.8*
1096 %dir %{_datadir}/ceph
/
1097 %{_datadir}/ceph
/known_hosts_drop.ceph.com
1098 %{_datadir}/ceph
/id_rsa_drop.ceph.com
1099 %{_datadir}/ceph
/id_rsa_drop.ceph.com.pub
1100 %dir %{_sysconfdir}/ceph
/
1101 %config %{_sysconfdir}/bash_completion.d
/ceph
1102 %config %{_sysconfdir}/bash_completion.d
/rados
1103 %config %{_sysconfdir}/bash_completion.d
/rbd
1104 %config %{_sysconfdir}/bash_completion.d
/radosgw
-admin
1105 %config(noreplace
) %{_sysconfdir}/ceph
/rbdmap
1106 %{_unitdir}/rbdmap.service
1107 %{python_sitelib}/ceph_argparse.py
*
1108 %{python_sitelib}/ceph_daemon.py
*
1109 %dir %{_udevrulesdir}
1110 %{_udevrulesdir}/50-rbd.rules
1111 %attr(3770,ceph
,ceph
) %dir %{_localstatedir}/log
/ceph
/
1112 %attr(750,ceph
,ceph
) %dir %{_localstatedir}/lib
/ceph
/
1117 %if 0%{?rhel} || 0%{?fedora}
1118 /usr
/sbin
/groupadd ceph
-g $CEPH_GROUP_ID
-o
-r
2>/dev
/null ||
:
1119 /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 ||
:
1121 %if 0%{?suse_version}
1122 if ! getent group ceph
>/dev
/null
; then
1123 CEPH_GROUP_ID_OPTION
=""
1124 getent group $CEPH_GROUP_ID
>/dev
/null || CEPH_GROUP_ID_OPTION
="
-g $CEPH_GROUP_ID"
1125 groupadd ceph $CEPH_GROUP_ID_OPTION
-r
2>/dev
/null ||
:
1127 if ! getent passwd ceph
>/dev
/null
; then
1128 CEPH_USER_ID_OPTION
=""
1129 getent passwd $CEPH_USER_ID
>/dev
/null || CEPH_USER_ID_OPTION
="
-u $CEPH_USER_ID"
1130 useradd ceph $CEPH_USER_ID_OPTION
-r
-g ceph
-s
/sbin
/nologin
2>/dev
/null ||
:
1132 usermod
-c "Ceph storage service" \
1133 -d
%{_localstatedir}/lib
/ceph \
1141 %tmpfiles_create %{_tmpfilesdir}/ceph
-common.conf
1144 # Package removal cleanup
1145 if [ "$
1"
-eq "
0"
] ; then
1146 rm -rf
%{_localstatedir}/log
/ceph
1147 rm -rf
%{_sysconfdir}/ceph
1152 %{_mandir}/man8
/ceph
-mds
.8*
1153 %{_unitdir}/ceph
-mds@.service
1154 %{_unitdir}/ceph
-mds.target
1155 %attr(750,ceph
,ceph
) %dir %{_localstatedir}/lib
/ceph
/mds
1158 %if 0%{?suse_version}
1159 if [ $
1 -eq
1 ] ; then
1160 /usr
/bin
/systemctl preset ceph
-mds@\
*.service ceph
-mds.target
>/dev
/null
2>&1 ||
:
1163 %if 0%{?fedora} || 0%{?rhel}
1164 %systemd_post ceph
-mds@\
*.service ceph
-mds.target
1166 if [ $
1 -eq
1 ] ; then
1167 /usr
/bin
/systemctl start ceph
-mds.target
>/dev
/null
2>&1 ||
:
1171 %if 0%{?suse_version}
1172 %service_del_preun ceph
-mds@\
*.service ceph
-mds.target
1174 %if 0%{?fedora} || 0%{?rhel}
1175 %systemd_preun ceph
-mds@\
*.service ceph
-mds.target
1179 test -n "$FIRST_ARG" || FIRST_ARG
=$
1
1180 %if 0%{?suse_version}
1181 DISABLE_RESTART_ON_UPDATE
="yes"
1182 %service_del_postun ceph
-mds@\
*.service ceph
-mds.target
1184 %if 0%{?fedora} || 0%{?rhel}
1185 %systemd_postun ceph
-mds@\
*.service ceph
-mds.target
1187 if [ $FIRST_ARG
-ge
1 ] ; then
1188 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1189 # "yes". In any case: if units are not running, do not touch them.
1190 SYSCONF_CEPH
=%{_sysconfdir}/sysconfig
/ceph
1191 if [ -f $SYSCONF_CEPH
-a
-r $SYSCONF_CEPH
] ; then
1192 source $SYSCONF_CEPH
1194 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE"
= "Xyes"
] ; then
1195 /usr
/bin
/systemctl try
-restart ceph
-mds@\
*.service
> /dev
/null
2>&1 ||
:
1202 %{_unitdir}/ceph
-mgr@.service
1203 %{_unitdir}/ceph
-mgr.target
1204 %attr(750,ceph
,ceph
) %dir %{_localstatedir}/lib
/ceph
/mgr
1207 %if 0%{?suse_version}
1208 if [ $
1 -eq
1 ] ; then
1209 /usr
/bin
/systemctl preset ceph
-mgr@\
*.service ceph
-mgr.target
>/dev
/null
2>&1 ||
:
1212 %if 0%{?fedora} || 0%{?rhel}
1213 %systemd_post ceph
-mgr@\
*.service ceph
-mgr.target
1215 if [ $
1 -eq
1 ] ; then
1216 /usr
/bin
/systemctl start ceph
-mgr.target
>/dev
/null
2>&1 ||
:
1220 %if 0%{?suse_version}
1221 %service_del_preun ceph
-mgr@\
*.service ceph
-mgr.target
1223 %if 0%{?fedora} || 0%{?rhel}
1224 %systemd_preun ceph
-mgr@\
*.service ceph
-mgr.target
1228 test -n "$FIRST_ARG" || FIRST_ARG
=$
1
1229 %if 0%{?suse_version}
1230 DISABLE_RESTART_ON_UPDATE
="yes"
1231 %service_del_postun ceph
-mgr@\
*.service ceph
-mgr.target
1233 %if 0%{?fedora} || 0%{?rhel}
1234 %systemd_postun ceph
-mgr@\
*.service ceph
-mgr.target
1236 if [ $FIRST_ARG
-ge
1 ] ; then
1237 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1238 # "yes". In any case: if units are not running, do not touch them.
1239 SYSCONF_CEPH
=%{_sysconfdir}/sysconfig
/ceph
1240 if [ -f $SYSCONF_CEPH
-a
-r $SYSCONF_CEPH
] ; then
1241 source $SYSCONF_CEPH
1243 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE"
= "Xyes"
] ; then
1244 /usr
/bin
/systemctl try
-restart ceph
-mgr@\
*.service
> /dev
/null
2>&1 ||
:
1250 %{_bindir}/ceph
-rest
-api
1251 %{_bindir}/ceph
-monstore
-tool
1252 %{_mandir}/man8
/ceph
-mon
.8*
1253 %{_mandir}/man8
/ceph
-rest
-api
.8*
1254 %{python_sitelib}/ceph_rest_api.py
*
1255 %{_unitdir}/ceph
-mon@.service
1256 %{_unitdir}/ceph
-mon.target
1257 %attr(750,ceph
,ceph
) %dir %{_localstatedir}/lib
/ceph
/mon
1260 %if 0%{?suse_version}
1261 if [ $
1 -eq
1 ] ; then
1262 /usr
/bin
/systemctl preset ceph
-mon@\
*.service ceph
-mon.target
>/dev
/null
2>&1 ||
:
1265 %if 0%{?fedora} || 0%{?rhel}
1266 %systemd_post ceph
-mon@\
*.service ceph
-mon.target
1268 if [ $
1 -eq
1 ] ; then
1269 /usr
/bin
/systemctl start ceph
-mon.target
>/dev
/null
2>&1 ||
:
1273 %if 0%{?suse_version}
1274 %service_del_preun ceph
-mon@\
*.service ceph
-mon.target
1276 %if 0%{?fedora} || 0%{?rhel}
1277 %systemd_preun ceph
-mon@\
*.service ceph
-mon.target
1281 test -n "$FIRST_ARG" || FIRST_ARG
=$
1
1282 %if 0%{?suse_version}
1283 DISABLE_RESTART_ON_UPDATE
="yes"
1284 %service_del_postun ceph
-mon@\
*.service ceph
-mon.target
1286 %if 0%{?fedora} || 0%{?rhel}
1287 %systemd_postun ceph
-mon@\
*.service ceph
-mon.target
1289 if [ $FIRST_ARG
-ge
1 ] ; then
1290 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1291 # "yes". In any case: if units are not running, do not touch them.
1292 SYSCONF_CEPH
=%{_sysconfdir}/sysconfig
/ceph
1293 if [ -f $SYSCONF_CEPH
-a
-r $SYSCONF_CEPH
] ; then
1294 source $SYSCONF_CEPH
1296 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE"
= "Xyes"
] ; then
1297 /usr
/bin
/systemctl try
-restart ceph
-mon@\
*.service
> /dev
/null
2>&1 ||
:
1302 %{_bindir}/ceph
-fuse
1303 %{_mandir}/man8
/ceph
-fuse
.8*
1304 %{_sbindir}/mount.fuse.ceph
1305 %{_unitdir}/ceph
-fuse@.service
1306 %{_unitdir}/ceph
-fuse.target
1310 %{_mandir}/man8
/rbd
-fuse
.8*
1312 %files -n rbd
-mirror
1313 %{_bindir}/rbd
-mirror
1314 %{_mandir}/man8
/rbd
-mirror
.8*
1315 %{_unitdir}/ceph
-rbd
-mirror@.service
1316 %{_unitdir}/ceph
-rbd
-mirror.target
1319 %if 0%{?suse_version}
1320 if [ $
1 -eq
1 ] ; then
1321 /usr
/bin
/systemctl preset ceph
-rbd
-mirror@\
*.service ceph
-rbd
-mirror.target
>/dev
/null
2>&1 ||
:
1324 %if 0%{?fedora} || 0%{?rhel}
1325 %systemd_post ceph
-rbd
-mirror@\
*.service ceph
-rbd
-mirror.target
1327 if [ $
1 -eq
1 ] ; then
1328 /usr
/bin
/systemctl start ceph
-rbd
-mirror.target
>/dev
/null
2>&1 ||
:
1331 %preun -n rbd
-mirror
1332 %if 0%{?suse_version}
1333 %service_del_preun ceph
-rbd
-mirror@\
*.service ceph
-rbd
-mirror.target
1335 %if 0%{?fedora} || 0%{?rhel}
1336 %systemd_preun ceph
-rbd
-mirror@\
*.service ceph
-rbd
-mirror.target
1339 %postun -n rbd
-mirror
1340 test -n "$FIRST_ARG" || FIRST_ARG
=$
1
1341 %if 0%{?suse_version}
1342 DISABLE_RESTART_ON_UPDATE
="yes"
1343 %service_del_postun ceph
-rbd
-mirror@\
*.service ceph
-rbd
-mirror.target
1345 %if 0%{?fedora} || 0%{?rhel}
1346 %systemd_postun ceph
-rbd
-mirror@\
*.service ceph
-rbd
-mirror.target
1348 if [ $FIRST_ARG
-ge
1 ] ; then
1349 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1350 # "yes". In any case: if units are not running, do not touch them.
1351 SYSCONF_CEPH
=%{_sysconfdir}/sysconfig
/ceph
1352 if [ -f $SYSCONF_CEPH
-a
-r $SYSCONF_CEPH
] ; then
1353 source $SYSCONF_CEPH
1355 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE"
= "Xyes"
] ; then
1356 /usr
/bin
/systemctl try
-restart ceph
-rbd
-mirror@\
*.service
> /dev
/null
2>&1 ||
:
1362 %{_mandir}/man8
/rbd
-nbd
.8*
1366 %{_bindir}/radosgw
-token
1367 %{_bindir}/radosgw
-es
1368 %{_bindir}/radosgw
-object
-expirer
1369 %{_mandir}/man8
/radosgw
.8*
1370 %dir %{_localstatedir}/lib
/ceph
/radosgw
1371 %{_unitdir}/ceph
-radosgw@.service
1372 %{_unitdir}/ceph
-radosgw.target
1375 %if 0%{?suse_version}
1376 if [ $
1 -eq
1 ] ; then
1377 /usr
/bin
/systemctl preset ceph
-radosgw@\
*.service ceph
-radosgw.target
>/dev
/null
2>&1 ||
:
1380 %if 0%{?fedora} || 0%{?rhel}
1381 %systemd_post ceph
-radosgw@\
*.service ceph
-radosgw.target
1383 if [ $
1 -eq
1 ] ; then
1384 /usr
/bin
/systemctl start ceph
-radosgw.target
>/dev
/null
2>&1 ||
:
1388 %if 0%{?suse_version}
1389 %service_del_preun ceph
-radosgw@\
*.service ceph
-radosgw.target
1391 %if 0%{?fedora} || 0%{?rhel}
1392 %systemd_preun ceph
-radosgw@\
*.service ceph
-radosgw.target
1396 test -n "$FIRST_ARG" || FIRST_ARG
=$
1
1397 %if 0%{?suse_version}
1398 DISABLE_RESTART_ON_UPDATE
="yes"
1399 %service_del_postun ceph
-radosgw@\
*.service ceph
-radosgw.target
1401 %if 0%{?fedora} || 0%{?rhel}
1402 %systemd_postun ceph
-radosgw@\
*.service ceph
-radosgw.target
1404 if [ $FIRST_ARG
-ge
1 ] ; then
1405 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1406 # "yes". In any case: if units are not running, do not touch them.
1407 SYSCONF_CEPH
=%{_sysconfdir}/sysconfig
/ceph
1408 if [ -f $SYSCONF_CEPH
-a
-r $SYSCONF_CEPH
] ; then
1409 source $SYSCONF_CEPH
1411 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE"
= "Xyes"
] ; then
1412 /usr
/bin
/systemctl try
-restart ceph
-radosgw@\
*.service
> /dev
/null
2>&1 ||
:
1417 %{_bindir}/ceph
-clsinfo
1418 %{_bindir}/ceph
-bluestore
-tool
1419 %{_bindir}/ceph
-objectstore
-tool
1420 %{_bindir}/ceph
-osdomap
-tool
1422 %{_libexecdir}/ceph
/ceph
-osd
-prestart.sh
1423 %{_sbindir}/ceph
-volume
1424 %{_sbindir}/ceph
-volume
-systemd
1425 %dir %{_udevrulesdir}
1426 %{_udevrulesdir}/60-ceph
-by
-parttypeuuid.rules
1427 %{_udevrulesdir}/95-ceph
-osd.rules
1428 %{_mandir}/man8
/ceph
-clsinfo
.8*
1429 %{_mandir}/man8
/ceph
-osd
.8*
1430 %{_mandir}/man8
/ceph
-bluestore
-tool
.8*
1431 %{_mandir}/man8
/ceph
-volume
.8*
1432 %{_mandir}/man8
/ceph
-volume
-systemd
.8*
1433 %if 0%{?rhel} && ! 0%{?centos}
1434 %attr(0755,-,-) %{_sysconfdir}/cron.hourly
/subman
1436 %{_unitdir}/ceph
-osd@.service
1437 %{_unitdir}/ceph
-osd.target
1438 %{_unitdir}/ceph
-volume@.service
1439 %attr(750,ceph
,ceph
) %dir %{_localstatedir}/lib
/ceph
/osd
1440 %config(noreplace
) %{_sysctldir}/90-ceph
-osd.conf
1443 %if 0%{?suse_version}
1444 if [ $
1 -eq
1 ] ; then
1445 /usr
/bin
/systemctl preset ceph
-osd@\
*.service ceph
-volume@\
*.service ceph
-osd.target
>/dev
/null
2>&1 ||
:
1448 %if 0%{?fedora} || 0%{?rhel}
1449 %systemd_post ceph
-osd@\
*.service ceph
-volume@\
*.service ceph
-osd.target
1451 if [ $
1 -eq
1 ] ; then
1452 /usr
/bin
/systemctl start ceph
-osd.target
>/dev
/null
2>&1 ||
:
1454 %if 0%{?sysctl_apply}
1455 %sysctl_apply 90-ceph
-osd.conf
1457 /usr
/lib
/systemd
/systemd
-sysctl
%{_sysctldir}/90-ceph
-osd.conf
> /dev
/null
2>&1 ||
:
1459 # work around https://tracker.ceph.com/issues/24903
1460 chown
-f
-h ceph
:ceph
/var
/lib
/ceph
/osd
/*/block
* 2>&1 > /dev
/null ||
:
1463 %if 0%{?suse_version}
1464 %service_del_preun ceph
-osd@\
*.service ceph
-volume@\
*.service ceph
-osd.target
1466 %if 0%{?fedora} || 0%{?rhel}
1467 %systemd_preun ceph
-osd@\
*.service ceph
-volume@\
*.service ceph
-osd.target
1471 test -n "$FIRST_ARG" || FIRST_ARG
=$
1
1472 %if 0%{?suse_version}
1473 DISABLE_RESTART_ON_UPDATE
="yes"
1474 %service_del_postun ceph
-osd@\
*.service ceph
-volume@\
*.service ceph
-osd.target
1476 %if 0%{?fedora} || 0%{?rhel}
1477 %systemd_postun ceph
-osd@\
*.service ceph
-volume@\
*.service ceph
-osd.target
1479 if [ $FIRST_ARG
-ge
1 ] ; then
1480 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1481 # "yes". In any case: if units are not running, do not touch them.
1482 SYSCONF_CEPH
=%{_sysconfdir}/sysconfig
/ceph
1483 if [ -f $SYSCONF_CEPH
-a
-r $SYSCONF_CEPH
] ; then
1484 source $SYSCONF_CEPH
1486 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE"
= "Xyes"
] ; then
1487 /usr
/bin
/systemctl try
-restart ceph
-osd@\
*.service ceph
-volume@\
*.service
> /dev
/null
2>&1 ||
:
1493 %files resource
-agents
1494 %dir %{_prefix}/lib
/ocf
1495 %dir %{_prefix}/lib
/ocf
/resource.d
1496 %dir %{_prefix}/lib
/ocf
/resource.d
/ceph
1497 %attr(0755,-,-) %{_prefix}/lib
/ocf
/resource.d
/ceph
/rbd
1502 %{_libdir}/librados.so.
*
1503 %dir %{_libdir}/ceph
1504 %{_libdir}/ceph
/libceph
-common.so
*
1506 %{_libdir}/librados_tp.so.
*
1509 %post -n librados2
-p
/sbin
/ldconfig
1511 %postun -n librados2
-p
/sbin
/ldconfig
1513 %files -n librados
-devel
1514 %dir %{_includedir}/rados
1515 %{_includedir}/rados
/librados.h
1516 %{_includedir}/rados
/librados.hpp
1517 %{_includedir}/rados
/buffer.h
1518 %{_includedir}/rados
/buffer_fwd.h
1519 %{_includedir}/rados
/inline_memory.h
1520 %{_includedir}/rados
/page.h
1521 %{_includedir}/rados
/crc32c.h
1522 %{_includedir}/rados
/rados_types.h
1523 %{_includedir}/rados
/rados_types.hpp
1524 %{_includedir}/rados
/memory.h
1525 %{_libdir}/librados.so
1527 %{_libdir}/librados_tp.so
1529 %{_bindir}/librados
-config
1530 %{_mandir}/man8
/librados
-config
.8*
1532 %files -n python
-rados
1533 %{python_sitearch}/rados.so
1534 %{python_sitearch}/rados
-*.egg
-info
1536 %files -n python
%{python3_pkgversion}-rados
1537 %{python3_sitearch}/rados.cpython
*.so
1538 %{python3_sitearch}/rados
-*.egg
-info
1540 %files -n libradosstriper1
1541 %{_libdir}/libradosstriper.so.
*
1543 %post -n libradosstriper1
-p
/sbin
/ldconfig
1545 %postun -n libradosstriper1
-p
/sbin
/ldconfig
1547 %files -n libradosstriper
-devel
1548 %dir %{_includedir}/radosstriper
1549 %{_includedir}/radosstriper
/libradosstriper.h
1550 %{_includedir}/radosstriper
/libradosstriper.hpp
1551 %{_libdir}/libradosstriper.so
1554 %{_libdir}/librbd.so.
*
1556 %{_libdir}/librbd_tp.so.
*
1559 %post -n librbd1
-p
/sbin
/ldconfig
1561 %postun -n librbd1
-p
/sbin
/ldconfig
1563 %files -n librbd
-devel
1564 %dir %{_includedir}/rbd
1565 %{_includedir}/rbd
/librbd.h
1566 %{_includedir}/rbd
/librbd.hpp
1567 %{_includedir}/rbd
/features.h
1568 %{_libdir}/librbd.so
1570 %{_libdir}/librbd_tp.so
1574 %{_libdir}/librgw.so.
*
1576 %post -n librgw2
-p
/sbin
/ldconfig
1578 %postun -n librgw2
-p
/sbin
/ldconfig
1580 %files -n librgw
-devel
1581 %dir %{_includedir}/rados
1582 %{_includedir}/rados
/librgw.h
1583 %{_includedir}/rados
/rgw_file.h
1584 %{_libdir}/librgw.so
1586 %files -n python
-rgw
1587 %{python_sitearch}/rgw.so
1588 %{python_sitearch}/rgw
-*.egg
-info
1590 %files -n python
%{python3_pkgversion}-rgw
1591 %{python3_sitearch}/rgw.cpython
*.so
1592 %{python3_sitearch}/rgw
-*.egg
-info
1594 %files -n python
-rbd
1595 %{python_sitearch}/rbd.so
1596 %{python_sitearch}/rbd
-*.egg
-info
1598 %files -n python
%{python3_pkgversion}-rbd
1599 %{python3_sitearch}/rbd.cpython
*.so
1600 %{python3_sitearch}/rbd
-*.egg
-info
1602 %files -n libcephfs2
1603 %{_libdir}/libcephfs.so.
*
1605 %post -n libcephfs2
-p
/sbin
/ldconfig
1607 %postun -n libcephfs2
-p
/sbin
/ldconfig
1609 %files -n libcephfs
-devel
1610 %dir %{_includedir}/cephfs
1611 %{_includedir}/cephfs
/libcephfs.h
1612 %{_includedir}/cephfs
/ceph_statx.h
1613 %{_libdir}/libcephfs.so
1615 %files -n python
-cephfs
1616 %{python_sitearch}/cephfs.so
1617 %{python_sitearch}/cephfs
-*.egg
-info
1618 %{python_sitelib}/ceph_volume_client.py
*
1620 %files -n python
%{python3_pkgversion}-cephfs
1621 %{python3_sitearch}/cephfs.cpython
*.so
1622 %{python3_sitearch}/cephfs
-*.egg
-info
1623 %{python3_sitelib}/ceph_volume_client.py
1624 %{python3_sitelib}/__pycache__
/ceph_volume_client.cpython
*.py
*
1626 %files -n python
%{python3_pkgversion}-ceph
-argparse
1627 %{python3_sitelib}/ceph_argparse.py
1628 %{python3_sitelib}/__pycache__
/ceph_argparse.cpython
*.py
*
1629 %{python3_sitelib}/ceph_daemon.py
1630 %{python3_sitelib}/__pycache__
/ceph_daemon.cpython
*.py
*
1632 %if 0%{with ceph_test_package}
1634 %{_bindir}/ceph
-client
-debug
1635 %{_bindir}/ceph_bench_log
1636 %{_bindir}/ceph_kvstorebench
1637 %{_bindir}/ceph_multi_stress_watch
1638 %{_bindir}/ceph_erasure_code
1639 %{_bindir}/ceph_erasure_code_benchmark
1640 %{_bindir}/ceph_omapbench
1641 %{_bindir}/ceph_objectstore_bench
1642 %{_bindir}/ceph_perf_objectstore
1643 %{_bindir}/ceph_perf_local
1644 %{_bindir}/ceph_perf_msgr_client
1645 %{_bindir}/ceph_perf_msgr_server
1646 %{_bindir}/ceph_psim
1647 %{_bindir}/ceph_radosacl
1648 %{_bindir}/ceph_rgw_jsonparser
1649 %{_bindir}/ceph_rgw_multiparser
1650 %{_bindir}/ceph_scratchtool
1651 %{_bindir}/ceph_scratchtoolpp
1652 %{_bindir}/ceph_smalliobench
1653 %{_bindir}/ceph_smalliobenchdumb
1654 %{_bindir}/ceph_smalliobenchfs
1655 %{_bindir}/ceph_smalliobenchrbd
1656 %{_bindir}/ceph_test_
*
1657 %{_bindir}/ceph_tpbench
1658 %{_bindir}/ceph_xattr_bench
1659 %{_bindir}/ceph
-coverage
1660 %{_bindir}/ceph
-debugpack
1661 %{_mandir}/man8
/ceph
-debugpack
.8*
1662 %dir %{_libdir}/ceph
1663 %{_libdir}/ceph
/ceph
-monstore
-update
-crush.sh
1666 %if 0%{with cephfs_java}
1667 %files -n libcephfs_jni1
1668 %{_libdir}/libcephfs_jni.so.
*
1670 %post -n libcephfs_jni1
-p
/sbin
/ldconfig
1672 %postun -n libcephfs_jni1
-p
/sbin
/ldconfig
1674 %files -n libcephfs_jni
-devel
1675 %{_libdir}/libcephfs_jni.so
1677 %files -n cephfs
-java
1678 %{_javadir}/libcephfs.jar
1679 %{_javadir}/libcephfs
-test.jar
1682 %files -n rados
-objclass
-devel
1683 %dir %{_includedir}/rados
1684 %{_includedir}/rados
/objclass.h
1686 %if 0%{with selinux}
1688 %attr(0600,root
,root
) %{_datadir}/selinux
/packages
/ceph.pp
1689 %{_datadir}/selinux
/devel
/include
/contrib
/ceph.
if
1690 %{_mandir}/man8
/ceph_selinux
.8*
1693 # backup file_contexts before update
1694 .
/etc
/selinux
/config
1695 FILE_CONTEXT
=/etc
/selinux
/$
{SELINUXTYPE
}/contexts
/files
/file_contexts
1696 cp $
{FILE_CONTEXT
} $
{FILE_CONTEXT
}.pre
1698 # Install the policy
1699 /usr
/sbin
/semodule
-i
%{_datadir}/selinux
/packages
/ceph.pp
1701 # Load the policy if SELinux is enabled
1702 if ! /usr
/sbin
/selinuxenabled
; then
1703 # Do not relabel if selinux is not enabled
1707 if diff $
{FILE_CONTEXT
} $
{FILE_CONTEXT
}.pre
> /dev
/null
2>&1; then
1708 # Do not relabel if file contexts did not change
1712 # Check whether the daemons are running
1713 /usr
/bin
/systemctl status ceph.target
> /dev
/null
2>&1
1716 # Stop the daemons if they were running
1717 if test $STATUS
-eq
0; then
1718 /usr
/bin
/systemctl stop ceph.target
> /dev
/null
2>&1
1722 # Use ceph-disk fix for first package install and fixfiles otherwise
1723 if [ "$
1"
= "
1"
]; then
1724 /usr
/sbin
/ceph
-disk fix
--selinux
1726 /usr
/sbin
/fixfiles
-C $
{FILE_CONTEXT
}.pre restore
2> /dev
/null
1729 rm -f $
{FILE_CONTEXT
}.pre
1730 # The fixfiles command won't fix label for /var/run/ceph
1731 /usr
/sbin
/restorecon
-R
/var
/run
/ceph
> /dev
/null
2>&1
1733 # Start the daemons iff they were running before
1734 if test $STATUS
-eq
0; then
1735 /usr
/bin
/systemctl start ceph.target
> /dev
/null
2>&1 ||
:
1740 if [ $
1 -eq
0 ]; then
1741 # backup file_contexts before update
1742 .
/etc
/selinux
/config
1743 FILE_CONTEXT
=/etc
/selinux
/$
{SELINUXTYPE
}/contexts
/files
/file_contexts
1744 cp $
{FILE_CONTEXT
} $
{FILE_CONTEXT
}.pre
1747 /usr
/sbin
/semodule
-n
-r ceph
> /dev
/null
2>&1
1749 # Reload the policy if SELinux is enabled
1750 if ! /usr
/sbin
/selinuxenabled
; then
1751 # Do not relabel if SELinux is not enabled
1755 # Check whether the daemons are running
1756 /usr
/bin
/systemctl status ceph.target
> /dev
/null
2>&1
1759 # Stop the daemons if they were running
1760 if test $STATUS
-eq
0; then
1761 /usr
/bin
/systemctl stop ceph.target
> /dev
/null
2>&1
1764 /usr
/sbin
/fixfiles
-C $
{FILE_CONTEXT
}.pre restore
2> /dev
/null
1765 rm -f $
{FILE_CONTEXT
}.pre
1766 # The fixfiles command won't fix label for /var/run/ceph
1767 /usr
/sbin
/restorecon
-R
/var
/run
/ceph
> /dev
/null
2>&1
1769 # Start the daemons if they were running before
1770 if test $STATUS
-eq
0; then
1771 /usr
/bin
/systemctl start ceph.target
> /dev
/null
2>&1 ||
:
1776 %endif # with selinux
1778 %files -n python
-ceph
-compat
1779 # We need an empty %%files list for python-ceph-compat, to tell rpmbuild to
1780 # actually build this meta package.