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 %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null || echo 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-1.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
103 BuildRequires: /usr/share/selinux/devel/policyhelp
105 %if 0%{with make_check}
106 %if 0%{?fedora} || 0%{?rhel}
107 BuildRequires: python-cherrypy
108 BuildRequires: python-werkzeug
110 %if 0%{?suse_version}
111 BuildRequires: python-CherryPy
112 BuildRequires: python-Werkzeug
113 BuildRequires: python-numpy-devel
115 BuildRequires: python-pecan
121 BuildRequires: cryptsetup
122 BuildRequires: fuse-devel
123 BuildRequires: gcc-c++
125 %if 0%{with tcmalloc}
126 BuildRequires: gperftools-devel >= 2.4
129 BuildRequires: leveldb-devel > 1.2
130 BuildRequires: libaio-devel
131 BuildRequires: libblkid-devel >= 2.17
132 BuildRequires: libcurl-devel
133 BuildRequires: libudev-devel
134 BuildRequires: libtool
135 BuildRequires: libxml2-devel
137 BuildRequires: parted
139 BuildRequires: pkgconfig
140 BuildRequires: python
141 BuildRequires: python-devel
142 BuildRequires: python-nose
143 BuildRequires: python-requests
144 BuildRequires: python-virtualenv
145 BuildRequires: snappy-devel
147 BuildRequires: util-linux
148 BuildRequires: valgrind-devel
150 BuildRequires: xfsprogs
151 BuildRequires: xfsprogs-devel
152 BuildRequires: xmlstarlet
155 #################################################################################
156 # distro-conditional dependencies
157 #################################################################################
158 %if 0%{?suse_version}
159 BuildRequires: pkgconfig(systemd)
160 BuildRequires: systemd-rpm-macros
161 BuildRequires: systemd
163 PreReq: %fillup_prereq
164 BuildRequires: net-tools
165 BuildRequires: libbz2-devel
166 BuildRequires: btrfsprogs
167 BuildRequires: mozilla-nss-devel
168 BuildRequires: keyutils-devel
169 BuildRequires: libopenssl-devel
170 BuildRequires: lsb-release
171 BuildRequires: openldap2-devel
172 BuildRequires: python-Cython
173 BuildRequires: python-PrettyTable
174 BuildRequires: python-Sphinx
175 BuildRequires: rdma-core-devel
177 %if 0%{?fedora} || 0%{?rhel}
179 BuildRequires: boost-random
180 BuildRequires: btrfs-progs
181 BuildRequires: nss-devel
182 BuildRequires: keyutils-libs-devel
183 BuildRequires: libibverbs-devel
184 BuildRequires: openldap-devel
185 BuildRequires: openssl-devel
186 BuildRequires: redhat-lsb-core
187 BuildRequires: Cython
188 BuildRequires: python-prettytable
189 BuildRequires: python-sphinx
191 # python34-... for RHEL, python3-... for all other supported distros
193 BuildRequires: python34-devel
194 BuildRequires: python34-setuptools
195 BuildRequires: python34-Cython
197 BuildRequires: python3-devel
198 BuildRequires: python3-setuptools
199 BuildRequires: python3-Cython
201 # lttng and babeltrace for rbd-replay-prep
203 %if 0%{?fedora} || 0%{?rhel}
204 BuildRequires: lttng-ust-devel
205 BuildRequires: libbabeltrace-devel
207 %if 0%{?suse_version}
208 BuildRequires: lttng-ust-devel
209 BuildRequires: babeltrace-devel
212 %if 0%{?suse_version}
213 BuildRequires: libexpat-devel
215 %if 0%{?rhel} || 0%{?fedora}
216 BuildRequires: expat-devel
219 %if 0%{?fedora} || 0%{?rhel}
220 BuildRequires: redhat-rpm-config
224 Ceph is a massively scalable, open-source, distributed storage system that runs
225 on commodity hardware and delivers object, block and file system storage.
228 #################################################################################
230 #################################################################################
232 Summary: Ceph Base Package
233 %if 0%{?suse_version}
234 Group: System/Filesystems
236 Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
237 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
238 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
239 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
240 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
242 Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
245 Requires: python-requests
246 Requires: python-setuptools
255 %if 0%{?suse_version}
256 Recommends: ntp-daemon
259 Base is the package that includes all the files shared amongst ceph servers
261 %package -n ceph-common
263 %if 0%{?suse_version}
264 Group: System/Filesystems
266 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
267 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
268 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
269 Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
270 Requires: python-rbd = %{_epoch_prefix}%{version}-%{release}
271 Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release}
272 Requires: python-rgw = %{_epoch_prefix}%{version}-%{release}
273 %if 0%{?fedora} || 0%{?rhel}
274 Requires: python-prettytable
276 %if 0%{?suse_version}
277 Requires: python-PrettyTable
279 Requires: python-requests
281 %if 0%{?suse_version}
282 Requires(pre): pwdutils
284 %description -n ceph-common
285 Common utilities to mount and interact with a ceph storage cluster.
286 Comprised of files that are common to Ceph clients and servers.
289 Summary: Ceph Metadata Server Daemon
290 %if 0%{?suse_version}
291 Group: System/Filesystems
293 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
295 ceph-mds is the metadata server daemon for the Ceph distributed file system.
296 One or more instances of ceph-mds collectively manage the file system
297 namespace, coordinating access to the shared OSD cluster.
300 Summary: Ceph Monitor Daemon
301 %if 0%{?suse_version}
302 Group: System/Filesystems
304 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
306 %if 0%{?fedora} || 0%{?rhel}
307 Requires: python-flask
309 %if 0%{?suse_version}
310 Requires: python-Flask
313 ceph-mon is the cluster monitor daemon for the Ceph distributed file
314 system. One or more instances of ceph-mon form a Paxos part-time
315 parliament cluster that provides extremely reliable and durable storage
316 of cluster membership, configuration, and state.
319 Summary: Ceph Manager Daemon
320 %if 0%{?suse_version}
321 Group: System/Filesystems
323 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
324 %if 0%{?fedora} || 0%{?rhel}
325 Requires: python-cherrypy
326 Requires: python-werkzeug
329 %if 0%{?suse_version}
330 Requires: python-CherryPy
331 Requires: python-Werkzeug
332 Requires: python-pyOpenSSL
334 Requires: python-pecan
336 ceph-mgr enables python modules that provide services (such as the REST
337 module derived from Calamari) and expose CLI hooks. ceph-mgr gathers
338 the cluster maps, the daemon metadata, and performance counters, and
339 exposes all these to the python modules.
342 Summary: Ceph fuse-based client
343 %if 0%{?suse_version}
344 Group: System/Filesystems
348 FUSE based client for Ceph distributed network file system
351 Summary: Ceph fuse-based client
352 %if 0%{?suse_version}
353 Group: System/Filesystems
355 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
356 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
357 %description -n rbd-fuse
358 FUSE based client to map Ceph rbd images to files
360 %package -n rbd-mirror
361 Summary: Ceph daemon for mirroring RBD images
362 %if 0%{?suse_version}
363 Group: System/Filesystems
365 Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
366 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
367 %description -n rbd-mirror
368 Daemon for mirroring RBD images between Ceph clusters, streaming
369 changes asynchronously.
372 Summary: Ceph RBD client base on NBD
373 %if 0%{?suse_version}
374 Group: System/Filesystems
376 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
377 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
378 %description -n rbd-nbd
379 NBD based client to map Ceph rbd images to local device
382 Summary: Rados REST gateway
383 %if 0%{?suse_version}
384 Group: System/Filesystems
386 Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
388 Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
390 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
391 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
392 %if 0%{?rhel} || 0%{?fedora}
396 RADOS is a distributed object store used by the Ceph distributed
397 storage system. This package provides a REST gateway to the
398 object store that aims to implement a superset of Amazon's S3
399 service as well as the OpenStack Object Storage ("Swift") API.
402 %package resource-agents
403 Summary: OCF-compliant resource agents for Ceph daemons
404 %if 0%{?suse_version}
405 Group: System/Filesystems
407 Requires: ceph-base = %{_epoch_prefix}%{version}
408 Requires: resource-agents
409 %description resource-agents
410 Resource agents for monitoring and managing Ceph daemons
411 under Open Cluster Framework (OCF) compliant resource
412 managers such as Pacemaker.
416 Summary: Ceph Object Storage Daemon
417 %if 0%{?suse_version}
418 Group: System/Filesystems
420 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
421 # for sgdisk, used by ceph-disk
422 %if 0%{?fedora} || 0%{?rhel}
425 %if 0%{?suse_version}
430 ceph-osd is the object storage daemon for the Ceph distributed file
431 system. It is responsible for storing objects on a local file system
432 and providing access to them over the network.
434 %package -n librados2
435 Summary: RADOS distributed object store client library
436 %if 0%{?suse_version}
437 Group: System/Libraries
439 %if 0%{?rhel} || 0%{?fedora}
440 Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
442 %description -n librados2
443 RADOS is a reliable, autonomic distributed object storage cluster
444 developed as part of the Ceph distributed storage system. This is a
445 shared library allowing applications to access the distributed object
446 store using a simple file-like interface.
448 %package -n librados-devel
449 Summary: RADOS headers
450 %if 0%{?suse_version}
451 Group: Development/Libraries/C and C++
453 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
454 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
455 Provides: librados2-devel = %{_epoch_prefix}%{version}-%{release}
456 Obsoletes: librados2-devel < %{_epoch_prefix}%{version}-%{release}
457 %description -n librados-devel
458 This package contains libraries and headers needed to develop programs
459 that use RADOS object store.
462 Summary: RADOS gateway client library
463 %if 0%{?suse_version}
464 Group: System/Libraries
466 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
467 %description -n librgw2
468 This package provides a library implementation of the RADOS gateway
469 (distributed object store with S3 and Swift personalities).
471 %package -n librgw-devel
472 Summary: RADOS gateway client library
473 %if 0%{?suse_version}
474 Group: Development/Libraries/C and C++
476 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
477 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
478 Provides: librgw2-devel = %{_epoch_prefix}%{version}-%{release}
479 Obsoletes: librgw2-devel < %{_epoch_prefix}%{version}-%{release}
480 %description -n librgw-devel
481 This package contains libraries and headers needed to develop programs
482 that use RADOS gateway client library.
484 %package -n python-rgw
485 Summary: Python 2 libraries for the RADOS gateway
486 %if 0%{?suse_version}
487 Group: Development/Languages/Python
489 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
490 Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
491 Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
492 %description -n python-rgw
493 This package contains Python 2 libraries for interacting with Cephs RADOS
496 %package -n python%{python3_pkgversion}-rgw
497 Summary: Python 3 libraries for the RADOS gateway
498 %if 0%{?suse_version}
499 Group: Development/Languages/Python
501 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
502 Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
503 %description -n python%{python3_pkgversion}-rgw
504 This package contains Python 3 libraries for interacting with Cephs RADOS
507 %package -n python-rados
508 Summary: Python 2 libraries for the RADOS object store
509 %if 0%{?suse_version}
510 Group: Development/Languages/Python
512 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
513 Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
514 %description -n python-rados
515 This package contains Python 2 libraries for interacting with Cephs RADOS
518 %package -n python%{python3_pkgversion}-rados
519 Summary: Python 3 libraries for the RADOS object store
520 %if 0%{?suse_version}
521 Group: Development/Languages/Python
523 Requires: python%{python3_pkgversion}
524 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
525 %description -n python%{python3_pkgversion}-rados
526 This package contains Python 3 libraries for interacting with Cephs RADOS
529 %package -n libradosstriper1
530 Summary: RADOS striping interface
531 %if 0%{?suse_version}
532 Group: System/Libraries
534 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
535 %description -n libradosstriper1
536 Striping interface built on top of the rados library, allowing
537 to stripe bigger objects onto several standard rados objects using
538 an interface very similar to the rados one.
540 %package -n libradosstriper-devel
541 Summary: RADOS striping interface headers
542 %if 0%{?suse_version}
543 Group: Development/Libraries/C and C++
545 Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release}
546 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
547 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
548 Provides: libradosstriper1-devel = %{_epoch_prefix}%{version}-%{release}
549 Obsoletes: libradosstriper1-devel < %{_epoch_prefix}%{version}-%{release}
550 %description -n libradosstriper-devel
551 This package contains libraries and headers needed to develop programs
552 that use RADOS striping interface.
555 Summary: RADOS block device client library
556 %if 0%{?suse_version}
557 Group: System/Libraries
559 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
560 %if 0%{?suse_version}
561 Requires(post): coreutils
563 %if 0%{?rhel} || 0%{?fedora}
564 Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
566 %description -n librbd1
567 RBD is a block device striped across multiple distributed objects in
568 RADOS, a reliable, autonomic distributed object storage cluster
569 developed as part of the Ceph distributed storage system. This is a
570 shared library allowing applications to manage these block devices.
572 %package -n librbd-devel
573 Summary: RADOS block device headers
574 %if 0%{?suse_version}
575 Group: Development/Libraries/C and C++
577 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
578 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
579 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
580 Provides: librbd1-devel = %{_epoch_prefix}%{version}-%{release}
581 Obsoletes: librbd1-devel < %{_epoch_prefix}%{version}-%{release}
582 %description -n librbd-devel
583 This package contains libraries and headers needed to develop programs
584 that use RADOS block device.
586 %package -n python-rbd
587 Summary: Python 2 libraries for the RADOS block device
588 %if 0%{?suse_version}
589 Group: Development/Languages/Python
591 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
592 Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
593 Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
594 %description -n python-rbd
595 This package contains Python 2 libraries for interacting with Cephs RADOS
598 %package -n python%{python3_pkgversion}-rbd
599 Summary: Python 3 libraries for the RADOS block device
600 %if 0%{?suse_version}
601 Group: Development/Languages/Python
603 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
604 Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
605 %description -n python%{python3_pkgversion}-rbd
606 This package contains Python 3 libraries for interacting with Cephs RADOS
609 %package -n libcephfs2
610 Summary: Ceph distributed file system client library
611 %if 0%{?suse_version}
612 Group: System/Libraries
614 Obsoletes: libcephfs1
615 %if 0%{?rhel} || 0%{?fedora}
616 Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
617 Obsoletes: ceph-libcephfs
619 %description -n libcephfs2
620 Ceph is a distributed network file system designed to provide excellent
621 performance, reliability, and scalability. This is a shared library
622 allowing applications to access a Ceph distributed file system via a
623 POSIX-like interface.
625 %package -n libcephfs-devel
626 Summary: Ceph distributed file system headers
627 %if 0%{?suse_version}
628 Group: Development/Libraries/C and C++
630 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
631 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
632 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
633 Provides: libcephfs2-devel = %{_epoch_prefix}%{version}-%{release}
634 Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release}
635 %description -n libcephfs-devel
636 This package contains libraries and headers needed to develop programs
637 that use Cephs distributed file system.
639 %package -n python-cephfs
640 Summary: Python 2 libraries for Ceph distributed file system
641 %if 0%{?suse_version}
642 Group: Development/Languages/Python
644 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
645 %if 0%{?suse_version}
646 Recommends: python-rados = %{_epoch_prefix}%{version}-%{release}
648 Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
649 %description -n python-cephfs
650 This package contains Python 2 libraries for interacting with Cephs distributed
653 %package -n python%{python3_pkgversion}-cephfs
654 Summary: Python 3 libraries for Ceph distributed file system
655 %if 0%{?suse_version}
656 Group: Development/Languages/Python
658 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
659 Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
660 %description -n python%{python3_pkgversion}-cephfs
661 This package contains Python 3 libraries for interacting with Cephs distributed
664 %package -n python%{python3_pkgversion}-ceph-argparse
665 Summary: Python 3 utility libraries for Ceph CLI
666 %if 0%{?suse_version}
667 Group: Development/Languages/Python
669 %description -n python%{python3_pkgversion}-ceph-argparse
670 This package contains types and routines for Python 3 used by the Ceph CLI as
671 well as the RESTful interface. These have to do with querying the daemons for
672 command-description information, validating user command input against those
673 descriptions, and submitting the command to the appropriate daemon.
675 %if 0%{with ceph_test_package}
676 %package -n ceph-test
677 Summary: Ceph benchmarks and test tools
678 %if 0%{?suse_version}
679 Group: System/Benchmark
681 Requires: ceph-common
685 %description -n ceph-test
686 This package contains Ceph benchmarks and test tools.
689 %if 0%{with cephfs_java}
691 %package -n libcephfs_jni1
692 Summary: Java Native Interface library for CephFS Java bindings
693 %if 0%{?suse_version}
694 Group: System/Libraries
697 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
698 %description -n libcephfs_jni1
699 This package contains the Java Native Interface library for CephFS Java
702 %package -n libcephfs_jni-devel
703 Summary: Development files for CephFS Java Native Interface library
704 %if 0%{?suse_version}
705 Group: Development/Libraries/Java
708 Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
709 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
710 Provides: libcephfs_jni1-devel = %{_epoch_prefix}%{version}-%{release}
711 Obsoletes: libcephfs_jni1-devel < %{_epoch_prefix}%{version}-%{release}
712 %description -n libcephfs_jni-devel
713 This package contains the development files for CephFS Java Native Interface
716 %package -n cephfs-java
717 Summary: Java libraries for the Ceph File System
718 %if 0%{?suse_version}
719 Group: System/Libraries
722 Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
725 %description -n cephfs-java
726 This package contains the Java libraries for the Ceph File System.
730 %package -n rados-objclass-devel
731 Summary: RADOS object class development kit
732 Group: Development/Libraries
733 Requires: librados2-devel = %{_epoch_prefix}%{version}-%{release}
734 %description -n rados-objclass-devel
735 This package contains libraries and headers needed to develop RADOS object
741 Summary: SELinux support for Ceph MON, OSD and MDS
742 %if 0%{?suse_version}
743 Group: System/Filesystems
745 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
746 Requires: policycoreutils, libselinux-utils
747 Requires(post): ceph-base = %{_epoch_prefix}%{version}-%{release}
748 Requires(post): selinux-policy-base >= %{_selinux_policy_version}, policycoreutils, gawk
749 Requires(postun): policycoreutils
751 This package contains SELinux support for Ceph MON, OSD and MDS. The package
752 also performs file-system relabelling which can take a long time on heavily
753 populated file-systems.
757 %package -n python-ceph-compat
758 Summary: Compatibility package for Cephs python libraries
759 %if 0%{?suse_version}
760 Group: Development/Languages/Python
762 Obsoletes: python-ceph
763 Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
764 Requires: python-rbd = %{_epoch_prefix}%{version}-%{release}
765 Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release}
766 Requires: python-rgw = %{_epoch_prefix}%{version}-%{release}
767 Provides: python-ceph
768 %description -n python-ceph-compat
769 This is a compatibility package to accommodate python-ceph split into
770 python-rados, python-rbd, python-rgw and python-cephfs. Packages still
771 depending on python-ceph should be fixed to depend on python-rados,
772 python-rbd, python-rgw or python-cephfs instead.
774 #################################################################################
776 #################################################################################
778 %autosetup -p1 -n @TARBALL_BASENAME@
781 %if 0%{with cephfs_java}
783 for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do
784 [ -d $i ] && java_inc="$java_inc -I$i"
788 %if %{with lowmem_builder}
789 RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768"
791 export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
793 export CPPFLAGS="$java_inc"
794 export CFLAGS="$RPM_OPT_FLAGS"
795 export CXXFLAGS="$RPM_OPT_FLAGS"
799 %if %{with lowmem_builder}
801 %define _smp_mflags -j8
805 # unlimit _smp_mflags in system macro if not set above
806 %define _smp_ncpus_max 0
807 # extract the number of processors for use with cmake
808 %define _smp_ncpus %(echo %{_smp_mflags} | sed 's/-j//')
813 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
814 -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
815 -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
816 -DCMAKE_INSTALL_LOCALSTATEDIR=%{_localstatedir} \
817 -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
818 -DCMAKE_INSTALL_MANDIR=%{_mandir} \
819 -DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \
820 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
821 -DWITH_EMBEDDED=OFF \
825 %if 0%{?rhel} && ! 0%{?centos}
828 %if 0%{without ceph_test_package}
831 %if 0%{with cephfs_java}
832 -DWITH_CEPHFS_JAVA=ON \
839 -DWITH_BABELTRACE=ON \
842 -DWITH_BABELTRACE=OFF \
844 $CEPH_EXTRA_CMAKE_ARGS \
848 %ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64
849 -DWITH_RADOSGW_BEAST_FRONTEND=ON \
851 -DWITH_RADOSGW_BEAST_FRONTEND=OFF \
853 -DBOOST_J=%{_smp_ncpus}
858 %if 0%{with make_check}
860 # run in-tree unittests
862 ctest %{?_smp_mflags}
870 make DESTDIR=%{buildroot} install
871 # we have dropped sysvinit bits
872 rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph
874 install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
875 %if 0%{?fedora} || 0%{?rhel}
876 install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph
878 %if 0%{?suse_version}
879 install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
881 install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf
882 install -m 0755 -D systemd/ceph %{buildroot}%{_sbindir}/rcceph
883 install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset
884 mkdir -p %{buildroot}%{_sbindir}
885 install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
886 chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf
887 install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
888 install -m 0644 -D src/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
890 # firewall templates and /sbin/mount.ceph symlink
891 %if 0%{?suse_version}
892 install -m 0644 -D etc/sysconfig/SuSEfirewall2.d/services/ceph-mon %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon
893 install -m 0644 -D etc/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds
894 mkdir -p %{buildroot}/sbin
895 ln -sf %{_sbindir}/mount.ceph %{buildroot}/sbin/mount.ceph
899 install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules
900 install -m 0644 -D udev/60-ceph-by-parttypeuuid.rules %{buildroot}%{_udevrulesdir}/60-ceph-by-parttypeuuid.rules
901 install -m 0644 -D udev/95-ceph-osd.rules %{buildroot}%{_udevrulesdir}/95-ceph-osd.rules
903 #set up placeholder directories
904 mkdir -p %{buildroot}%{_sysconfdir}/ceph
905 mkdir -p %{buildroot}%{_localstatedir}/run/ceph
906 mkdir -p %{buildroot}%{_localstatedir}/log/ceph
907 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp
908 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon
909 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/osd
910 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mds
911 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mgr
912 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/radosgw
913 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-osd
914 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds
915 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw
916 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mgr
917 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd
919 %if 0%{?suse_version}
920 # create __pycache__ directories and their contents
921 %py3_compile %{buildroot}%{python3_sitelib}
927 #################################################################################
928 # files and systemd scriptlets
929 #################################################################################
934 %{_bindir}/monmaptool
935 %{_bindir}/osdmaptool
936 %{_bindir}/ceph-kvstore-tool
938 %{_bindir}/ceph-detect-init
939 %{_libexecdir}/systemd/system-preset/50-ceph.preset
940 %{_sbindir}/ceph-create-keys
941 %{_sbindir}/ceph-disk
942 %{_sbindir}/ceph-volume
943 %{_sbindir}/ceph-volume-systemd
945 %dir %{_libexecdir}/ceph
946 %{_libexecdir}/ceph/ceph_common.sh
947 %dir %{_libdir}/rados-classes
948 %{_libdir}/rados-classes/*
950 %dir %{_libdir}/ceph/erasure-code
951 %{_libdir}/ceph/erasure-code/libec_*.so*
952 %dir %{_libdir}/ceph/compressor
953 %{_libdir}/ceph/compressor/libceph_*.so*
955 %dir %{_libdir}/ceph/crypto
956 %{_libdir}/ceph/crypto/libceph_*.so*
959 %{_libdir}/libos_tp.so*
960 %{_libdir}/libosd_tp.so*
962 %config(noreplace) %{_sysconfdir}/logrotate.d/ceph
963 %if 0%{?fedora} || 0%{?rhel}
964 %config(noreplace) %{_sysconfdir}/sysconfig/ceph
966 %if 0%{?suse_version}
967 %{_localstatedir}/adm/fillup-templates/sysconfig.*
968 %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon
969 %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds
971 %{_unitdir}/ceph-disk@.service
972 %{_unitdir}/ceph-volume@.service
973 %{_unitdir}/ceph.target
974 %{python_sitelib}/ceph_detect_init*
975 %{python_sitelib}/ceph_disk*
976 %dir %{python_sitelib}/ceph_volume
977 %{python_sitelib}/ceph_volume/*
978 %{python_sitelib}/ceph_volume-*
979 %{_mandir}/man8/ceph-deploy.8*
980 %{_mandir}/man8/ceph-detect-init.8*
981 %{_mandir}/man8/ceph-create-keys.8*
982 %{_mandir}/man8/ceph-disk.8*
983 %{_mandir}/man8/ceph-volume.8*
984 %{_mandir}/man8/ceph-volume-systemd.8*
985 %{_mandir}/man8/ceph-run.8*
986 %{_mandir}/man8/crushtool.8*
987 %{_mandir}/man8/osdmaptool.8*
988 %{_mandir}/man8/monmaptool.8*
989 %{_mandir}/man8/ceph-kvstore-tool.8*
990 #set up placeholder directories
991 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/tmp
992 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd
993 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mds
994 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rgw
995 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mgr
996 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd
1000 %if 0%{?suse_version}
1002 if [ $1 -eq 1 ] ; then
1003 /usr/bin/systemctl preset ceph-disk@\*.service ceph.target >/dev/null 2>&1 || :
1006 %if 0%{?fedora} || 0%{?rhel}
1007 %systemd_post ceph-disk@\*.service ceph.target
1008 %systemd_post ceph-volume@\*.service ceph.target
1010 if [ $1 -eq 1 ] ; then
1011 /usr/bin/systemctl start ceph.target >/dev/null 2>&1 || :
1015 %if 0%{?suse_version}
1016 %service_del_preun ceph-disk@\*.service ceph.target
1018 %if 0%{?fedora} || 0%{?rhel}
1019 %systemd_preun ceph-disk@\*.service ceph.target
1020 %systemd_preun ceph-volume@\*.service ceph.target
1025 test -n "$FIRST_ARG" || FIRST_ARG=$1
1026 %if 0%{?suse_version}
1027 DISABLE_RESTART_ON_UPDATE="yes"
1028 %service_del_postun ceph-disk@\*.service ceph.target
1030 %if 0%{?fedora} || 0%{?rhel}
1031 %systemd_postun ceph-disk@\*.service ceph.target
1033 if [ $FIRST_ARG -ge 1 ] ; then
1034 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1035 # "yes". In any case: if units are not running, do not touch them.
1036 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1037 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1038 source $SYSCONF_CEPH
1040 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1041 /usr/bin/systemctl try-restart ceph-disk@\*.service ceph-volume@\*.service > /dev/null 2>&1 || :
1046 %dir %{_docdir}/ceph
1047 %doc %{_docdir}/ceph/sample.ceph.conf
1048 %doc %{_docdir}/ceph/COPYING
1050 %{_bindir}/ceph-authtool
1051 %{_bindir}/ceph-conf
1052 %{_bindir}/ceph-dencoder
1053 %{_bindir}/ceph-rbdnamer
1055 %{_bindir}/ceph-crush-location
1056 %{_bindir}/cephfs-data-scan
1057 %{_bindir}/cephfs-journal-tool
1058 %{_bindir}/cephfs-table-tool
1060 %{_bindir}/radosgw-admin
1062 %{_bindir}/rbd-replay
1063 %{_bindir}/rbd-replay-many
1065 %{_sbindir}/mount.ceph
1066 %if 0%{?suse_version}
1070 %{_bindir}/rbd-replay-prep
1072 %{_bindir}/ceph-post-file
1073 %{_bindir}/ceph-brag
1074 %{_tmpfilesdir}/ceph-common.conf
1075 %{_mandir}/man8/ceph-authtool.8*
1076 %{_mandir}/man8/ceph-conf.8*
1077 %{_mandir}/man8/ceph-dencoder.8*
1078 %{_mandir}/man8/ceph-rbdnamer.8*
1079 %{_mandir}/man8/ceph-syn.8*
1080 %{_mandir}/man8/ceph-post-file.8*
1081 %{_mandir}/man8/ceph.8*
1082 %{_mandir}/man8/mount.ceph.8*
1083 %{_mandir}/man8/rados.8*
1084 %{_mandir}/man8/radosgw-admin.8*
1085 %{_mandir}/man8/rbd.8*
1086 %{_mandir}/man8/rbdmap.8*
1087 %{_mandir}/man8/rbd-replay.8*
1088 %{_mandir}/man8/rbd-replay-many.8*
1089 %{_mandir}/man8/rbd-replay-prep.8*
1090 %dir %{_datadir}/ceph/
1091 %{_datadir}/ceph/known_hosts_drop.ceph.com
1092 %{_datadir}/ceph/id_rsa_drop.ceph.com
1093 %{_datadir}/ceph/id_rsa_drop.ceph.com.pub
1094 %dir %{_sysconfdir}/ceph/
1095 %config %{_sysconfdir}/bash_completion.d/ceph
1096 %config %{_sysconfdir}/bash_completion.d/rados
1097 %config %{_sysconfdir}/bash_completion.d/rbd
1098 %config %{_sysconfdir}/bash_completion.d/radosgw-admin
1099 %config(noreplace) %{_sysconfdir}/ceph/rbdmap
1100 %{_unitdir}/rbdmap.service
1101 %{python_sitelib}/ceph_argparse.py*
1102 %{python_sitelib}/ceph_daemon.py*
1103 %dir %{_udevrulesdir}
1104 %{_udevrulesdir}/50-rbd.rules
1105 %attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/
1106 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/
1111 %if 0%{?rhel} || 0%{?fedora}
1112 /usr/sbin/groupadd ceph -g $CEPH_GROUP_ID -o -r 2>/dev/null || :
1113 /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 || :
1115 %if 0%{?suse_version}
1116 if ! getent group ceph >/dev/null ; then
1117 CEPH_GROUP_ID_OPTION=""
1118 getent group $CEPH_GROUP_ID >/dev/null || CEPH_GROUP_ID_OPTION="-g $CEPH_GROUP_ID"
1119 groupadd ceph $CEPH_GROUP_ID_OPTION -r 2>/dev/null || :
1121 if ! getent passwd ceph >/dev/null ; then
1122 CEPH_USER_ID_OPTION=""
1123 getent passwd $CEPH_USER_ID >/dev/null || CEPH_USER_ID_OPTION="-u $CEPH_USER_ID"
1124 useradd ceph $CEPH_USER_ID_OPTION -r -g ceph -s /sbin/nologin 2>/dev/null || :
1126 usermod -c "Ceph storage service" \
1127 -d %{_localstatedir}/lib/ceph \
1135 %tmpfiles_create %{_tmpfilesdir}/ceph-common.conf
1138 # Package removal cleanup
1139 if [ "$1" -eq "0" ] ; then
1140 rm -rf %{_localstatedir}/log/ceph
1141 rm -rf %{_sysconfdir}/ceph
1146 %{_mandir}/man8/ceph-mds.8*
1147 %{_unitdir}/ceph-mds@.service
1148 %{_unitdir}/ceph-mds.target
1149 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mds
1152 %if 0%{?suse_version}
1153 if [ $1 -eq 1 ] ; then
1154 /usr/bin/systemctl preset ceph-mds@\*.service ceph-mds.target >/dev/null 2>&1 || :
1157 %if 0%{?fedora} || 0%{?rhel}
1158 %systemd_post ceph-mds@\*.service ceph-mds.target
1160 if [ $1 -eq 1 ] ; then
1161 /usr/bin/systemctl start ceph-mds.target >/dev/null 2>&1 || :
1165 %if 0%{?suse_version}
1166 %service_del_preun ceph-mds@\*.service ceph-mds.target
1168 %if 0%{?fedora} || 0%{?rhel}
1169 %systemd_preun ceph-mds@\*.service ceph-mds.target
1173 test -n "$FIRST_ARG" || FIRST_ARG=$1
1174 %if 0%{?suse_version}
1175 DISABLE_RESTART_ON_UPDATE="yes"
1176 %service_del_postun ceph-mds@\*.service ceph-mds.target
1178 %if 0%{?fedora} || 0%{?rhel}
1179 %systemd_postun ceph-mds@\*.service ceph-mds.target
1181 if [ $FIRST_ARG -ge 1 ] ; then
1182 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1183 # "yes". In any case: if units are not running, do not touch them.
1184 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1185 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1186 source $SYSCONF_CEPH
1188 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1189 /usr/bin/systemctl try-restart ceph-mds@\*.service > /dev/null 2>&1 || :
1196 %{_unitdir}/ceph-mgr@.service
1197 %{_unitdir}/ceph-mgr.target
1198 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mgr
1201 %if 0%{?suse_version}
1202 if [ $1 -eq 1 ] ; then
1203 /usr/bin/systemctl preset ceph-mgr@\*.service ceph-mgr.target >/dev/null 2>&1 || :
1206 %if 0%{?fedora} || 0%{?rhel}
1207 %systemd_post ceph-mgr@\*.service ceph-mgr.target
1209 if [ $1 -eq 1 ] ; then
1210 /usr/bin/systemctl start ceph-mgr.target >/dev/null 2>&1 || :
1214 %if 0%{?suse_version}
1215 %service_del_preun ceph-mgr@\*.service ceph-mgr.target
1217 %if 0%{?fedora} || 0%{?rhel}
1218 %systemd_preun ceph-mgr@\*.service ceph-mgr.target
1222 test -n "$FIRST_ARG" || FIRST_ARG=$1
1223 %if 0%{?suse_version}
1224 DISABLE_RESTART_ON_UPDATE="yes"
1225 %service_del_postun ceph-mgr@\*.service ceph-mgr.target
1227 %if 0%{?fedora} || 0%{?rhel}
1228 %systemd_postun ceph-mgr@\*.service ceph-mgr.target
1230 if [ $FIRST_ARG -ge 1 ] ; then
1231 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1232 # "yes". In any case: if units are not running, do not touch them.
1233 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1234 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1235 source $SYSCONF_CEPH
1237 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1238 /usr/bin/systemctl try-restart ceph-mgr@\*.service > /dev/null 2>&1 || :
1244 %{_bindir}/ceph-rest-api
1245 %{_bindir}/ceph-monstore-tool
1246 %{_mandir}/man8/ceph-mon.8*
1247 %{_mandir}/man8/ceph-rest-api.8*
1248 %{python_sitelib}/ceph_rest_api.py*
1249 %{_unitdir}/ceph-mon@.service
1250 %{_unitdir}/ceph-mon.target
1251 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon
1254 %if 0%{?suse_version}
1255 if [ $1 -eq 1 ] ; then
1256 /usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || :
1259 %if 0%{?fedora} || 0%{?rhel}
1260 %systemd_post ceph-mon@\*.service ceph-mon.target
1262 if [ $1 -eq 1 ] ; then
1263 /usr/bin/systemctl start ceph-mon.target >/dev/null 2>&1 || :
1267 %if 0%{?suse_version}
1268 %service_del_preun ceph-mon@\*.service ceph-mon.target
1270 %if 0%{?fedora} || 0%{?rhel}
1271 %systemd_preun ceph-mon@\*.service ceph-mon.target
1275 test -n "$FIRST_ARG" || FIRST_ARG=$1
1276 %if 0%{?suse_version}
1277 DISABLE_RESTART_ON_UPDATE="yes"
1278 %service_del_postun ceph-mon@\*.service ceph-mon.target
1280 %if 0%{?fedora} || 0%{?rhel}
1281 %systemd_postun ceph-mon@\*.service ceph-mon.target
1283 if [ $FIRST_ARG -ge 1 ] ; then
1284 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1285 # "yes". In any case: if units are not running, do not touch them.
1286 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1287 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1288 source $SYSCONF_CEPH
1290 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1291 /usr/bin/systemctl try-restart ceph-mon@\*.service > /dev/null 2>&1 || :
1296 %{_bindir}/ceph-fuse
1297 %{_mandir}/man8/ceph-fuse.8*
1298 %{_sbindir}/mount.fuse.ceph
1299 %{_unitdir}/ceph-fuse@.service
1300 %{_unitdir}/ceph-fuse.target
1304 %{_mandir}/man8/rbd-fuse.8*
1306 %files -n rbd-mirror
1307 %{_bindir}/rbd-mirror
1308 %{_mandir}/man8/rbd-mirror.8*
1309 %{_unitdir}/ceph-rbd-mirror@.service
1310 %{_unitdir}/ceph-rbd-mirror.target
1313 %if 0%{?suse_version}
1314 if [ $1 -eq 1 ] ; then
1315 /usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || :
1318 %if 0%{?fedora} || 0%{?rhel}
1319 %systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1321 if [ $1 -eq 1 ] ; then
1322 /usr/bin/systemctl start ceph-rbd-mirror.target >/dev/null 2>&1 || :
1325 %preun -n rbd-mirror
1326 %if 0%{?suse_version}
1327 %service_del_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1329 %if 0%{?fedora} || 0%{?rhel}
1330 %systemd_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1333 %postun -n rbd-mirror
1334 test -n "$FIRST_ARG" || FIRST_ARG=$1
1335 %if 0%{?suse_version}
1336 DISABLE_RESTART_ON_UPDATE="yes"
1337 %service_del_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1339 %if 0%{?fedora} || 0%{?rhel}
1340 %systemd_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1342 if [ $FIRST_ARG -ge 1 ] ; then
1343 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1344 # "yes". In any case: if units are not running, do not touch them.
1345 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1346 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1347 source $SYSCONF_CEPH
1349 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1350 /usr/bin/systemctl try-restart ceph-rbd-mirror@\*.service > /dev/null 2>&1 || :
1356 %{_mandir}/man8/rbd-nbd.8*
1360 %{_bindir}/radosgw-token
1361 %{_bindir}/radosgw-es
1362 %{_bindir}/radosgw-object-expirer
1363 %{_mandir}/man8/radosgw.8*
1364 %dir %{_localstatedir}/lib/ceph/radosgw
1365 %{_unitdir}/ceph-radosgw@.service
1366 %{_unitdir}/ceph-radosgw.target
1369 %if 0%{?suse_version}
1370 if [ $1 -eq 1 ] ; then
1371 /usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || :
1374 %if 0%{?fedora} || 0%{?rhel}
1375 %systemd_post ceph-radosgw@\*.service ceph-radosgw.target
1377 if [ $1 -eq 1 ] ; then
1378 /usr/bin/systemctl start ceph-radosgw.target >/dev/null 2>&1 || :
1382 %if 0%{?suse_version}
1383 %service_del_preun ceph-radosgw@\*.service ceph-radosgw.target
1385 %if 0%{?fedora} || 0%{?rhel}
1386 %systemd_preun ceph-radosgw@\*.service ceph-radosgw.target
1390 test -n "$FIRST_ARG" || FIRST_ARG=$1
1391 %if 0%{?suse_version}
1392 DISABLE_RESTART_ON_UPDATE="yes"
1393 %service_del_postun ceph-radosgw@\*.service ceph-radosgw.target
1395 %if 0%{?fedora} || 0%{?rhel}
1396 %systemd_postun ceph-radosgw@\*.service ceph-radosgw.target
1398 if [ $FIRST_ARG -ge 1 ] ; then
1399 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1400 # "yes". In any case: if units are not running, do not touch them.
1401 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1402 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1403 source $SYSCONF_CEPH
1405 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1406 /usr/bin/systemctl try-restart ceph-radosgw@\*.service > /dev/null 2>&1 || :
1411 %{_bindir}/ceph-clsinfo
1412 %{_bindir}/ceph-bluestore-tool
1413 %{_bindir}/ceph-objectstore-tool
1414 %{_bindir}/ceph-osdomap-tool
1416 %{_libexecdir}/ceph/ceph-osd-prestart.sh
1417 %dir %{_udevrulesdir}
1418 %{_udevrulesdir}/60-ceph-by-parttypeuuid.rules
1419 %{_udevrulesdir}/95-ceph-osd.rules
1420 %{_mandir}/man8/ceph-clsinfo.8*
1421 %{_mandir}/man8/ceph-osd.8*
1422 %{_mandir}/man8/ceph-bluestore-tool.8*
1423 %if 0%{?rhel} && ! 0%{?centos}
1424 %attr(0755,-,-) %{_sysconfdir}/cron.hourly/subman
1426 %{_unitdir}/ceph-osd@.service
1427 %{_unitdir}/ceph-osd.target
1428 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
1429 %config(noreplace) %{_sysctldir}/90-ceph-osd.conf
1432 %if 0%{?suse_version}
1433 if [ $1 -eq 1 ] ; then
1434 /usr/bin/systemctl preset ceph-osd@\*.service ceph-osd.target >/dev/null 2>&1 || :
1437 %if 0%{?fedora} || 0%{?rhel}
1438 %systemd_post ceph-osd@\*.service ceph-osd.target
1440 if [ $1 -eq 1 ] ; then
1441 /usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || :
1443 %if 0%{?sysctl_apply}
1444 %sysctl_apply 90-ceph-osd.conf
1446 /usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || :
1450 %if 0%{?suse_version}
1451 %service_del_preun ceph-osd@\*.service ceph-osd.target
1453 %if 0%{?fedora} || 0%{?rhel}
1454 %systemd_preun ceph-osd@\*.service ceph-osd.target
1458 test -n "$FIRST_ARG" || FIRST_ARG=$1
1459 %if 0%{?suse_version}
1460 DISABLE_RESTART_ON_UPDATE="yes"
1461 %service_del_postun ceph-osd@\*.service ceph-osd.target
1463 %if 0%{?fedora} || 0%{?rhel}
1464 %systemd_postun ceph-osd@\*.service ceph-osd.target
1466 if [ $FIRST_ARG -ge 1 ] ; then
1467 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1468 # "yes". In any case: if units are not running, do not touch them.
1469 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1470 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1471 source $SYSCONF_CEPH
1473 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1474 /usr/bin/systemctl try-restart ceph-osd@\*.service > /dev/null 2>&1 || :
1480 %files resource-agents
1481 %dir %{_prefix}/lib/ocf
1482 %dir %{_prefix}/lib/ocf/resource.d
1483 %dir %{_prefix}/lib/ocf/resource.d/ceph
1484 %{_prefix}/lib/ocf/resource.d/ceph/rbd
1489 %{_libdir}/librados.so.*
1490 %dir %{_libdir}/ceph
1491 %{_libdir}/ceph/libceph-common.so*
1493 %{_libdir}/librados_tp.so.*
1496 %post -n librados2 -p /sbin/ldconfig
1498 %postun -n librados2 -p /sbin/ldconfig
1500 %files -n librados-devel
1501 %dir %{_includedir}/rados
1502 %{_includedir}/rados/librados.h
1503 %{_includedir}/rados/librados.hpp
1504 %{_includedir}/rados/buffer.h
1505 %{_includedir}/rados/buffer_fwd.h
1506 %{_includedir}/rados/inline_memory.h
1507 %{_includedir}/rados/page.h
1508 %{_includedir}/rados/crc32c.h
1509 %{_includedir}/rados/rados_types.h
1510 %{_includedir}/rados/rados_types.hpp
1511 %{_includedir}/rados/memory.h
1512 %{_libdir}/librados.so
1514 %{_libdir}/librados_tp.so
1516 %{_bindir}/librados-config
1517 %{_mandir}/man8/librados-config.8*
1519 %files -n python-rados
1520 %{python_sitearch}/rados.so
1521 %{python_sitearch}/rados-*.egg-info
1523 %files -n python%{python3_pkgversion}-rados
1524 %{python3_sitearch}/rados.cpython*.so
1525 %{python3_sitearch}/rados-*.egg-info
1527 %files -n libradosstriper1
1528 %{_libdir}/libradosstriper.so.*
1530 %post -n libradosstriper1 -p /sbin/ldconfig
1532 %postun -n libradosstriper1 -p /sbin/ldconfig
1534 %files -n libradosstriper-devel
1535 %dir %{_includedir}/radosstriper
1536 %{_includedir}/radosstriper/libradosstriper.h
1537 %{_includedir}/radosstriper/libradosstriper.hpp
1538 %{_libdir}/libradosstriper.so
1541 %{_libdir}/librbd.so.*
1543 %{_libdir}/librbd_tp.so.*
1546 %post -n librbd1 -p /sbin/ldconfig
1548 %postun -n librbd1 -p /sbin/ldconfig
1550 %files -n librbd-devel
1551 %dir %{_includedir}/rbd
1552 %{_includedir}/rbd/librbd.h
1553 %{_includedir}/rbd/librbd.hpp
1554 %{_includedir}/rbd/features.h
1555 %{_libdir}/librbd.so
1557 %{_libdir}/librbd_tp.so
1561 %{_libdir}/librgw.so.*
1563 %post -n librgw2 -p /sbin/ldconfig
1565 %postun -n librgw2 -p /sbin/ldconfig
1567 %files -n librgw-devel
1568 %dir %{_includedir}/rados
1569 %{_includedir}/rados/librgw.h
1570 %{_includedir}/rados/rgw_file.h
1571 %{_libdir}/librgw.so
1573 %files -n python-rgw
1574 %{python_sitearch}/rgw.so
1575 %{python_sitearch}/rgw-*.egg-info
1577 %files -n python%{python3_pkgversion}-rgw
1578 %{python3_sitearch}/rgw.cpython*.so
1579 %{python3_sitearch}/rgw-*.egg-info
1581 %files -n python-rbd
1582 %{python_sitearch}/rbd.so
1583 %{python_sitearch}/rbd-*.egg-info
1585 %files -n python%{python3_pkgversion}-rbd
1586 %{python3_sitearch}/rbd.cpython*.so
1587 %{python3_sitearch}/rbd-*.egg-info
1589 %files -n libcephfs2
1590 %{_libdir}/libcephfs.so.*
1592 %post -n libcephfs2 -p /sbin/ldconfig
1594 %postun -n libcephfs2 -p /sbin/ldconfig
1596 %files -n libcephfs-devel
1597 %dir %{_includedir}/cephfs
1598 %{_includedir}/cephfs/libcephfs.h
1599 %{_includedir}/cephfs/ceph_statx.h
1600 %{_libdir}/libcephfs.so
1602 %files -n python-cephfs
1603 %{python_sitearch}/cephfs.so
1604 %{python_sitearch}/cephfs-*.egg-info
1605 %{python_sitelib}/ceph_volume_client.py*
1607 %files -n python%{python3_pkgversion}-cephfs
1608 %{python3_sitearch}/cephfs.cpython*.so
1609 %{python3_sitearch}/cephfs-*.egg-info
1610 %{python3_sitelib}/ceph_volume_client.py
1611 %{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py*
1613 %files -n python%{python3_pkgversion}-ceph-argparse
1614 %{python3_sitelib}/ceph_argparse.py
1615 %{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py*
1616 %{python3_sitelib}/ceph_daemon.py
1617 %{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py*
1619 %if 0%{with ceph_test_package}
1621 %{_bindir}/ceph-client-debug
1622 %{_bindir}/ceph_bench_log
1623 %{_bindir}/ceph_kvstorebench
1624 %{_bindir}/ceph_multi_stress_watch
1625 %{_bindir}/ceph_erasure_code
1626 %{_bindir}/ceph_erasure_code_benchmark
1627 %{_bindir}/ceph_omapbench
1628 %{_bindir}/ceph_objectstore_bench
1629 %{_bindir}/ceph_perf_objectstore
1630 %{_bindir}/ceph_perf_local
1631 %{_bindir}/ceph_perf_msgr_client
1632 %{_bindir}/ceph_perf_msgr_server
1633 %{_bindir}/ceph_psim
1634 %{_bindir}/ceph_radosacl
1635 %{_bindir}/ceph_rgw_jsonparser
1636 %{_bindir}/ceph_rgw_multiparser
1637 %{_bindir}/ceph_scratchtool
1638 %{_bindir}/ceph_scratchtoolpp
1639 %{_bindir}/ceph_smalliobench
1640 %{_bindir}/ceph_smalliobenchdumb
1641 %{_bindir}/ceph_smalliobenchfs
1642 %{_bindir}/ceph_smalliobenchrbd
1643 %{_bindir}/ceph_test_*
1644 %{_bindir}/ceph_tpbench
1645 %{_bindir}/ceph_xattr_bench
1646 %{_bindir}/ceph-coverage
1647 %{_bindir}/ceph-debugpack
1648 %{_mandir}/man8/ceph-debugpack.8*
1649 %dir %{_libdir}/ceph
1650 %{_libdir}/ceph/ceph-monstore-update-crush.sh
1653 %if 0%{with cephfs_java}
1654 %files -n libcephfs_jni1
1655 %{_libdir}/libcephfs_jni.so.*
1657 %post -n libcephfs_jni1 -p /sbin/ldconfig
1659 %postun -n libcephfs_jni1 -p /sbin/ldconfig
1661 %files -n libcephfs_jni-devel
1662 %{_libdir}/libcephfs_jni.so
1664 %files -n cephfs-java
1665 %{_javadir}/libcephfs.jar
1666 %{_javadir}/libcephfs-test.jar
1669 %files -n rados-objclass-devel
1670 %dir %{_includedir}/rados
1671 %{_includedir}/rados/objclass.h
1673 %if 0%{with selinux}
1675 %attr(0600,root,root) %{_datadir}/selinux/packages/ceph.pp
1676 %{_datadir}/selinux/devel/include/contrib/ceph.if
1677 %{_mandir}/man8/ceph_selinux.8*
1680 # backup file_contexts before update
1681 . /etc/selinux/config
1682 FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
1683 cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
1685 # Install the policy
1686 /usr/sbin/semodule -i %{_datadir}/selinux/packages/ceph.pp
1688 # Load the policy if SELinux is enabled
1689 if ! /usr/sbin/selinuxenabled; then
1690 # Do not relabel if selinux is not enabled
1694 if diff ${FILE_CONTEXT} ${FILE_CONTEXT}.pre > /dev/null 2>&1; then
1695 # Do not relabel if file contexts did not change
1699 # Check whether the daemons are running
1700 /usr/bin/systemctl status ceph.target > /dev/null 2>&1
1703 # Stop the daemons if they were running
1704 if test $STATUS -eq 0; then
1705 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
1709 # Use ceph-disk fix for first package install and fixfiles otherwise
1710 if [ "$1" = "1" ]; then
1711 /usr/sbin/ceph-disk fix --selinux
1713 /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
1716 rm -f ${FILE_CONTEXT}.pre
1717 # The fixfiles command won't fix label for /var/run/ceph
1718 /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
1720 # Start the daemons iff they were running before
1721 if test $STATUS -eq 0; then
1722 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
1727 if [ $1 -eq 0 ]; then
1728 # backup file_contexts before update
1729 . /etc/selinux/config
1730 FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
1731 cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
1734 /usr/sbin/semodule -n -r ceph > /dev/null 2>&1
1736 # Reload the policy if SELinux is enabled
1737 if ! /usr/sbin/selinuxenabled ; then
1738 # Do not relabel if SELinux is not enabled
1742 # Check whether the daemons are running
1743 /usr/bin/systemctl status ceph.target > /dev/null 2>&1
1746 # Stop the daemons if they were running
1747 if test $STATUS -eq 0; then
1748 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
1751 /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
1752 rm -f ${FILE_CONTEXT}.pre
1753 # The fixfiles command won't fix label for /var/run/ceph
1754 /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
1756 # Start the daemons if they were running before
1757 if test $STATUS -eq 0; then
1758 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
1763 %endif # with selinux
1765 %files -n python-ceph-compat
1766 # We need an empty %%files list for python-ceph-compat, to tell rpmbuild to
1767 # actually build this meta package.