]> git.proxmox.com Git - ceph.git/blame - ceph/ceph.spec.in
bump version to 12.2.2-pve1
[ceph.git] / ceph / ceph.spec.in
CommitLineData
7c673cae
FG
1# vim: set noexpandtab ts=8 sw=8 :
2#
3# spec file for package ceph
4#
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
8#
9# All modifications and additions to the file contributed by third parties
10# remain the property of their copyright owners, unless otherwise agreed
11# upon.
12#
13# This file is under the GNU Lesser General Public License, version 2.1
14#
15# Please submit bugfixes or comments via http://tracker.ceph.com/
d2e6a577 16#
7c673cae
FG
17%bcond_without ocf
18%bcond_without cephfs_java
19%if 0%{?suse_version}
20%bcond_with ceph_test_package
21%else
22%bcond_without ceph_test_package
23%endif
24%bcond_with make_check
31f18b77 25%ifarch s390 s390x
7c673cae 26%bcond_with tcmalloc
31f18b77
FG
27%else
28%bcond_without tcmalloc
7c673cae
FG
29%endif
30%bcond_with lowmem_builder
31%if 0%{?fedora} || 0%{?rhel}
32%bcond_without selinux
33%endif
34%if 0%{?suse_version}
35%bcond_with selinux
36%endif
37
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}
41%bcond_without lttng
42%endif
43%endif
44
45%if %{with selinux}
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)}
48%endif
49
50%{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d}
51%{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create}
52%{!?python3_pkgversion: %global python3_pkgversion 3}
53
54# unify libexec for all targets
55%global _libexecdir %{_exec_prefix}/lib
56
57# disable dwz which compresses the debuginfo
58%global _find_debuginfo_dwz_opts %{nil}
31f18b77 59
7c673cae
FG
60#################################################################################
61# main package definition
62#################################################################################
63Name: ceph
64Version: @VERSION@
65Release: @RPM_RELEASE@%{?dist}
31f18b77 66%if 0%{?fedora} || 0%{?rhel}
224ce89b 67Epoch: 2
31f18b77
FG
68%endif
69
3efd9988
FG
70# define _epoch_prefix macro which will expand to the empty string if epoch is
71# undefined
31f18b77
FG
72%global _epoch_prefix %{?epoch:%{epoch}:}
73
7c673cae 74Summary: User space components of the Ceph file system
31f18b77 75License: LGPL-2.1 and CC-BY-SA-1.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and MIT
7c673cae
FG
76%if 0%{?suse_version}
77Group: System/Filesystems
78%endif
79URL: http://ceph.com/
80Source0: http://ceph.com/download/@TARBALL_BASENAME@.tar.bz2
81%if 0%{?suse_version}
82%if 0%{?is_opensuse}
83ExclusiveArch: x86_64 aarch64 ppc64 ppc64le
84%else
31f18b77 85ExclusiveArch: x86_64 aarch64 ppc64le s390x
7c673cae
FG
86%endif
87%endif
88#################################################################################
89# dependencies that apply across all distro families
90#################################################################################
31f18b77
FG
91Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release}
92Requires: ceph-mds = %{_epoch_prefix}%{version}-%{release}
93Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
94Requires: ceph-mon = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
95Requires(post): binutils
96%if 0%{with cephfs_java}
97BuildRequires: java-devel
98BuildRequires: sharutils
99%endif
100%if 0%{with selinux}
101BuildRequires: checkpolicy
102BuildRequires: selinux-policy-devel
103BuildRequires: /usr/share/selinux/devel/policyhelp
104%endif
c07f9fc5
FG
105%if 0%{with make_check}
106%if 0%{?fedora} || 0%{?rhel}
107BuildRequires: python-cherrypy
108BuildRequires: python-werkzeug
109%endif
110%if 0%{?suse_version}
111BuildRequires: python-CherryPy
112BuildRequires: python-Werkzeug
3efd9988 113BuildRequires: python-numpy-devel
c07f9fc5
FG
114%endif
115BuildRequires: python-pecan
116BuildRequires: socat
117%endif
7c673cae 118BuildRequires: bc
31f18b77 119BuildRequires: gperf
7c673cae
FG
120BuildRequires: cmake
121BuildRequires: cryptsetup
122BuildRequires: fuse-devel
123BuildRequires: gcc-c++
124BuildRequires: gdbm
125%if 0%{with tcmalloc}
126BuildRequires: gperftools-devel >= 2.4
127%endif
128BuildRequires: jq
129BuildRequires: leveldb-devel > 1.2
130BuildRequires: libaio-devel
7c673cae
FG
131BuildRequires: libblkid-devel >= 2.17
132BuildRequires: libcurl-devel
133BuildRequires: libudev-devel
134BuildRequires: libtool
135BuildRequires: libxml2-devel
136BuildRequires: make
137BuildRequires: parted
138BuildRequires: perl
139BuildRequires: pkgconfig
140BuildRequires: python
141BuildRequires: python-devel
142BuildRequires: python-nose
7c673cae
FG
143BuildRequires: python-requests
144BuildRequires: python-virtualenv
145BuildRequires: snappy-devel
146BuildRequires: udev
147BuildRequires: util-linux
148BuildRequires: valgrind-devel
31f18b77 149BuildRequires: which
7c673cae
FG
150BuildRequires: xfsprogs
151BuildRequires: xfsprogs-devel
152BuildRequires: xmlstarlet
153BuildRequires: yasm
7c673cae
FG
154
155#################################################################################
156# distro-conditional dependencies
157#################################################################################
158%if 0%{?suse_version}
159BuildRequires: pkgconfig(systemd)
160BuildRequires: systemd-rpm-macros
161BuildRequires: systemd
162%{?systemd_requires}
163PreReq: %fillup_prereq
164BuildRequires: net-tools
165BuildRequires: libbz2-devel
166BuildRequires: btrfsprogs
167BuildRequires: mozilla-nss-devel
168BuildRequires: keyutils-devel
169BuildRequires: libopenssl-devel
170BuildRequires: lsb-release
171BuildRequires: openldap2-devel
172BuildRequires: python-Cython
31f18b77 173BuildRequires: python-PrettyTable
7c673cae 174BuildRequires: python-Sphinx
31f18b77 175BuildRequires: rdma-core-devel
7c673cae 176%endif
d2e6a577 177%if 0%{?fedora} || 0%{?rhel}
7c673cae
FG
178Requires: systemd
179BuildRequires: boost-random
180BuildRequires: btrfs-progs
181BuildRequires: nss-devel
182BuildRequires: keyutils-libs-devel
31f18b77 183BuildRequires: libibverbs-devel
7c673cae
FG
184BuildRequires: openldap-devel
185BuildRequires: openssl-devel
186BuildRequires: redhat-lsb-core
187BuildRequires: Cython
31f18b77 188BuildRequires: python-prettytable
7c673cae
FG
189BuildRequires: python-sphinx
190%endif
191# python34-... for RHEL, python3-... for all other supported distros
192%if 0%{?rhel}
193BuildRequires: python34-devel
194BuildRequires: python34-setuptools
195BuildRequires: python34-Cython
196%else
197BuildRequires: python3-devel
198BuildRequires: python3-setuptools
199BuildRequires: python3-Cython
200%endif
201# lttng and babeltrace for rbd-replay-prep
202%if %{with lttng}
203%if 0%{?fedora} || 0%{?rhel}
204BuildRequires: lttng-ust-devel
205BuildRequires: libbabeltrace-devel
206%endif
207%if 0%{?suse_version}
208BuildRequires: lttng-ust-devel
209BuildRequires: babeltrace-devel
210%endif
211%endif
7c673cae
FG
212%if 0%{?suse_version}
213BuildRequires: libexpat-devel
7c673cae
FG
214%endif
215%if 0%{?rhel} || 0%{?fedora}
216BuildRequires: expat-devel
7c673cae
FG
217%endif
218#hardened-cc1
219%if 0%{?fedora} || 0%{?rhel}
220BuildRequires: redhat-rpm-config
221%endif
7c673cae
FG
222
223%description
224Ceph is a massively scalable, open-source, distributed storage system that runs
225on commodity hardware and delivers object, block and file system storage.
226
227
228#################################################################################
229# subpackages
230#################################################################################
231%package base
232Summary: Ceph Base Package
233%if 0%{?suse_version}
234Group: System/Filesystems
235%endif
31f18b77
FG
236Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
237Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
238Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
239Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
240Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
7c673cae 241%if 0%{with selinux}
31f18b77 242Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
243%endif
244Requires: python
245Requires: python-requests
246Requires: python-setuptools
247Requires: grep
248Requires: xfsprogs
249Requires: logrotate
250Requires: util-linux
251Requires: cryptsetup
252Requires: findutils
253Requires: psmisc
254Requires: which
255%if 0%{?suse_version}
256Recommends: ntp-daemon
257%endif
7c673cae
FG
258%description base
259Base is the package that includes all the files shared amongst ceph servers
260
261%package -n ceph-common
262Summary: Ceph Common
263%if 0%{?suse_version}
264Group: System/Filesystems
265%endif
31f18b77
FG
266Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
267Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
268Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
269Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
270Requires: python-rbd = %{_epoch_prefix}%{version}-%{release}
271Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release}
272Requires: python-rgw = %{_epoch_prefix}%{version}-%{release}
273%if 0%{?fedora} || 0%{?rhel}
7c673cae 274Requires: python-prettytable
31f18b77
FG
275%endif
276%if 0%{?suse_version}
277Requires: python-PrettyTable
278%endif
7c673cae
FG
279Requires: python-requests
280%{?systemd_requires}
281%if 0%{?suse_version}
282Requires(pre): pwdutils
283%endif
7c673cae
FG
284%description -n ceph-common
285Common utilities to mount and interact with a ceph storage cluster.
286Comprised of files that are common to Ceph clients and servers.
287
288%package mds
289Summary: Ceph Metadata Server Daemon
290%if 0%{?suse_version}
291Group: System/Filesystems
292%endif
31f18b77 293Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
294%description mds
295ceph-mds is the metadata server daemon for the Ceph distributed file system.
296One or more instances of ceph-mds collectively manage the file system
297namespace, coordinating access to the shared OSD cluster.
298
299%package mon
300Summary: Ceph Monitor Daemon
301%if 0%{?suse_version}
302Group: System/Filesystems
303%endif
31f18b77 304Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
305# For ceph-rest-api
306%if 0%{?fedora} || 0%{?rhel}
307Requires: python-flask
308%endif
309%if 0%{?suse_version}
310Requires: python-Flask
311%endif
312%description mon
313ceph-mon is the cluster monitor daemon for the Ceph distributed file
314system. One or more instances of ceph-mon form a Paxos part-time
315parliament cluster that provides extremely reliable and durable storage
316of cluster membership, configuration, and state.
317
318%package mgr
319Summary: Ceph Manager Daemon
7c673cae
FG
320%if 0%{?suse_version}
321Group: System/Filesystems
322%endif
31f18b77
FG
323Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
324%if 0%{?fedora} || 0%{?rhel}
325Requires: python-cherrypy
326Requires: python-werkzeug
327Requires: pyOpenSSL
328%endif
329%if 0%{?suse_version}
330Requires: python-CherryPy
331Requires: python-Werkzeug
332Requires: python-pyOpenSSL
333%endif
334Requires: python-pecan
7c673cae
FG
335%description mgr
336ceph-mgr enables python modules that provide services (such as the REST
337module derived from Calamari) and expose CLI hooks. ceph-mgr gathers
338the cluster maps, the daemon metadata, and performance counters, and
339exposes all these to the python modules.
340
341%package fuse
342Summary: Ceph fuse-based client
343%if 0%{?suse_version}
344Group: System/Filesystems
345%endif
181888fb 346Requires: fuse
7c673cae
FG
347%description fuse
348FUSE based client for Ceph distributed network file system
349
350%package -n rbd-fuse
351Summary: Ceph fuse-based client
352%if 0%{?suse_version}
353Group: System/Filesystems
354%endif
31f18b77
FG
355Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
356Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
357%description -n rbd-fuse
358FUSE based client to map Ceph rbd images to files
359
360%package -n rbd-mirror
361Summary: Ceph daemon for mirroring RBD images
362%if 0%{?suse_version}
363Group: System/Filesystems
364%endif
31f18b77
FG
365Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
366Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
367%description -n rbd-mirror
368Daemon for mirroring RBD images between Ceph clusters, streaming
369changes asynchronously.
370
371%package -n rbd-nbd
372Summary: Ceph RBD client base on NBD
373%if 0%{?suse_version}
374Group: System/Filesystems
375%endif
31f18b77
FG
376Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
377Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
378%description -n rbd-nbd
379NBD based client to map Ceph rbd images to local device
380
381%package radosgw
382Summary: Rados REST gateway
383%if 0%{?suse_version}
384Group: System/Filesystems
385%endif
31f18b77 386Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
7c673cae 387%if 0%{with selinux}
31f18b77 388Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
7c673cae 389%endif
31f18b77
FG
390Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
391Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
392%if 0%{?rhel} || 0%{?fedora}
393Requires: mailcap
394%endif
395%description radosgw
396RADOS is a distributed object store used by the Ceph distributed
397storage system. This package provides a REST gateway to the
398object store that aims to implement a superset of Amazon's S3
399service as well as the OpenStack Object Storage ("Swift") API.
400
401%if %{with ocf}
402%package resource-agents
403Summary: OCF-compliant resource agents for Ceph daemons
404%if 0%{?suse_version}
405Group: System/Filesystems
406%endif
31f18b77 407Requires: ceph-base = %{_epoch_prefix}%{version}
7c673cae
FG
408Requires: resource-agents
409%description resource-agents
410Resource agents for monitoring and managing Ceph daemons
411under Open Cluster Framework (OCF) compliant resource
412managers such as Pacemaker.
413%endif
414
415%package osd
416Summary: Ceph Object Storage Daemon
417%if 0%{?suse_version}
418Group: System/Filesystems
419%endif
31f18b77 420Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
421# for sgdisk, used by ceph-disk
422%if 0%{?fedora} || 0%{?rhel}
423Requires: gdisk
424%endif
425%if 0%{?suse_version}
426Requires: gptfdisk
427%endif
428Requires: parted
429%description osd
430ceph-osd is the object storage daemon for the Ceph distributed file
431system. It is responsible for storing objects on a local file system
432and providing access to them over the network.
433
434%package -n librados2
435Summary: RADOS distributed object store client library
436%if 0%{?suse_version}
437Group: System/Libraries
438%endif
7c673cae 439%if 0%{?rhel} || 0%{?fedora}
31f18b77 440Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
441%endif
442%description -n librados2
443RADOS is a reliable, autonomic distributed object storage cluster
444developed as part of the Ceph distributed storage system. This is a
445shared library allowing applications to access the distributed object
446store using a simple file-like interface.
447
448%package -n librados-devel
449Summary: RADOS headers
450%if 0%{?suse_version}
451Group: Development/Libraries/C and C++
452%endif
31f18b77
FG
453Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
454Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
455Provides: librados2-devel = %{_epoch_prefix}%{version}-%{release}
456Obsoletes: librados2-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
457%description -n librados-devel
458This package contains libraries and headers needed to develop programs
459that use RADOS object store.
460
461%package -n librgw2
462Summary: RADOS gateway client library
463%if 0%{?suse_version}
464Group: System/Libraries
465%endif
31f18b77 466Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
467%description -n librgw2
468This package provides a library implementation of the RADOS gateway
469(distributed object store with S3 and Swift personalities).
470
471%package -n librgw-devel
472Summary: RADOS gateway client library
473%if 0%{?suse_version}
474Group: Development/Libraries/C and C++
475%endif
31f18b77
FG
476Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
477Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
478Provides: librgw2-devel = %{_epoch_prefix}%{version}-%{release}
479Obsoletes: librgw2-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
480%description -n librgw-devel
481This package contains libraries and headers needed to develop programs
482that use RADOS gateway client library.
483
484%package -n python-rgw
485Summary: Python 2 libraries for the RADOS gateway
486%if 0%{?suse_version}
487Group: Development/Languages/Python
488%endif
31f18b77
FG
489Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
490Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
491Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
492%description -n python-rgw
493This package contains Python 2 libraries for interacting with Cephs RADOS
494gateway.
495
496%package -n python%{python3_pkgversion}-rgw
497Summary: Python 3 libraries for the RADOS gateway
498%if 0%{?suse_version}
499Group: Development/Languages/Python
500%endif
31f18b77
FG
501Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
502Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
503%description -n python%{python3_pkgversion}-rgw
504This package contains Python 3 libraries for interacting with Cephs RADOS
505gateway.
506
507%package -n python-rados
508Summary: Python 2 libraries for the RADOS object store
509%if 0%{?suse_version}
510Group: Development/Languages/Python
511%endif
31f18b77
FG
512Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
513Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
514%description -n python-rados
515This package contains Python 2 libraries for interacting with Cephs RADOS
516object store.
517
518%package -n python%{python3_pkgversion}-rados
519Summary: Python 3 libraries for the RADOS object store
520%if 0%{?suse_version}
521Group: Development/Languages/Python
522%endif
7c673cae 523Requires: python%{python3_pkgversion}
31f18b77 524Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
525%description -n python%{python3_pkgversion}-rados
526This package contains Python 3 libraries for interacting with Cephs RADOS
527object store.
528
529%package -n libradosstriper1
530Summary: RADOS striping interface
531%if 0%{?suse_version}
532Group: System/Libraries
533%endif
31f18b77 534Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
535%description -n libradosstriper1
536Striping interface built on top of the rados library, allowing
537to stripe bigger objects onto several standard rados objects using
538an interface very similar to the rados one.
539
540%package -n libradosstriper-devel
541Summary: RADOS striping interface headers
542%if 0%{?suse_version}
543Group: Development/Libraries/C and C++
544%endif
31f18b77
FG
545Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release}
546Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
547Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
548Provides: libradosstriper1-devel = %{_epoch_prefix}%{version}-%{release}
549Obsoletes: libradosstriper1-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
550%description -n libradosstriper-devel
551This package contains libraries and headers needed to develop programs
552that use RADOS striping interface.
553
554%package -n librbd1
555Summary: RADOS block device client library
556%if 0%{?suse_version}
557Group: System/Libraries
558%endif
31f18b77
FG
559Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
560%if 0%{?suse_version}
561Requires(post): coreutils
562%endif
7c673cae 563%if 0%{?rhel} || 0%{?fedora}
31f18b77 564Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
565%endif
566%description -n librbd1
567RBD is a block device striped across multiple distributed objects in
568RADOS, a reliable, autonomic distributed object storage cluster
569developed as part of the Ceph distributed storage system. This is a
570shared library allowing applications to manage these block devices.
571
572%package -n librbd-devel
573Summary: RADOS block device headers
574%if 0%{?suse_version}
575Group: Development/Libraries/C and C++
576%endif
31f18b77
FG
577Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
578Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
579Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
580Provides: librbd1-devel = %{_epoch_prefix}%{version}-%{release}
581Obsoletes: librbd1-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
582%description -n librbd-devel
583This package contains libraries and headers needed to develop programs
584that use RADOS block device.
585
586%package -n python-rbd
587Summary: Python 2 libraries for the RADOS block device
588%if 0%{?suse_version}
589Group: Development/Languages/Python
590%endif
31f18b77
FG
591Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
592Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
593Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
594%description -n python-rbd
595This package contains Python 2 libraries for interacting with Cephs RADOS
596block device.
597
598%package -n python%{python3_pkgversion}-rbd
599Summary: Python 3 libraries for the RADOS block device
600%if 0%{?suse_version}
601Group: Development/Languages/Python
602%endif
31f18b77
FG
603Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
604Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
605%description -n python%{python3_pkgversion}-rbd
606This package contains Python 3 libraries for interacting with Cephs RADOS
607block device.
608
609%package -n libcephfs2
610Summary: Ceph distributed file system client library
611%if 0%{?suse_version}
612Group: System/Libraries
613%endif
224ce89b 614Obsoletes: libcephfs1
7c673cae 615%if 0%{?rhel} || 0%{?fedora}
31f18b77 616Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
617Obsoletes: ceph-libcephfs
618%endif
619%description -n libcephfs2
620Ceph is a distributed network file system designed to provide excellent
621performance, reliability, and scalability. This is a shared library
622allowing applications to access a Ceph distributed file system via a
623POSIX-like interface.
624
625%package -n libcephfs-devel
626Summary: Ceph distributed file system headers
627%if 0%{?suse_version}
628Group: Development/Libraries/C and C++
629%endif
31f18b77
FG
630Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
631Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
632Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
633Provides: libcephfs2-devel = %{_epoch_prefix}%{version}-%{release}
634Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
635%description -n libcephfs-devel
636This package contains libraries and headers needed to develop programs
637that use Cephs distributed file system.
638
639%package -n python-cephfs
640Summary: Python 2 libraries for Ceph distributed file system
641%if 0%{?suse_version}
642Group: Development/Languages/Python
643%endif
31f18b77 644Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
7c673cae 645%if 0%{?suse_version}
31f18b77 646Recommends: python-rados = %{_epoch_prefix}%{version}-%{release}
7c673cae 647%endif
31f18b77 648Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
649%description -n python-cephfs
650This package contains Python 2 libraries for interacting with Cephs distributed
651file system.
652
653%package -n python%{python3_pkgversion}-cephfs
654Summary: Python 3 libraries for Ceph distributed file system
655%if 0%{?suse_version}
656Group: Development/Languages/Python
657%endif
31f18b77
FG
658Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
659Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
660%description -n python%{python3_pkgversion}-cephfs
661This package contains Python 3 libraries for interacting with Cephs distributed
662file system.
663
664%package -n python%{python3_pkgversion}-ceph-argparse
665Summary: Python 3 utility libraries for Ceph CLI
666%if 0%{?suse_version}
667Group: Development/Languages/Python
668%endif
7c673cae
FG
669%description -n python%{python3_pkgversion}-ceph-argparse
670This package contains types and routines for Python 3 used by the Ceph CLI as
671well as the RESTful interface. These have to do with querying the daemons for
672command-description information, validating user command input against those
673descriptions, and submitting the command to the appropriate daemon.
674
675%if 0%{with ceph_test_package}
676%package -n ceph-test
677Summary: Ceph benchmarks and test tools
678%if 0%{?suse_version}
679Group: System/Benchmark
680%endif
7c673cae
FG
681Requires: ceph-common
682Requires: xmlstarlet
31f18b77 683Requires: jq
c07f9fc5 684Requires: socat
7c673cae
FG
685%description -n ceph-test
686This package contains Ceph benchmarks and test tools.
687%endif
688
689%if 0%{with cephfs_java}
690
691%package -n libcephfs_jni1
692Summary: Java Native Interface library for CephFS Java bindings
693%if 0%{?suse_version}
694Group: System/Libraries
695%endif
7c673cae 696Requires: java
31f18b77 697Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
698%description -n libcephfs_jni1
699This package contains the Java Native Interface library for CephFS Java
700bindings.
701
702%package -n libcephfs_jni-devel
703Summary: Development files for CephFS Java Native Interface library
704%if 0%{?suse_version}
705Group: Development/Libraries/Java
706%endif
7c673cae 707Requires: java
31f18b77
FG
708Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
709Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
710Provides: libcephfs_jni1-devel = %{_epoch_prefix}%{version}-%{release}
711Obsoletes: libcephfs_jni1-devel < %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
712%description -n libcephfs_jni-devel
713This package contains the development files for CephFS Java Native Interface
714library.
715
716%package -n cephfs-java
717Summary: Java libraries for the Ceph File System
718%if 0%{?suse_version}
719Group: System/Libraries
720%endif
7c673cae 721Requires: java
31f18b77 722Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
723Requires: junit
724BuildRequires: junit
725%description -n cephfs-java
726This package contains the Java libraries for the Ceph File System.
727
728%endif
729
730%package -n rados-objclass-devel
731Summary: RADOS object class development kit
732Group: Development/Libraries
31f18b77 733Requires: librados2-devel = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
734%description -n rados-objclass-devel
735This package contains libraries and headers needed to develop RADOS object
736class plugins.
737
738%if 0%{with selinux}
739
740%package selinux
741Summary: SELinux support for Ceph MON, OSD and MDS
742%if 0%{?suse_version}
743Group: System/Filesystems
744%endif
31f18b77 745Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae 746Requires: policycoreutils, libselinux-utils
31f18b77 747Requires(post): ceph-base = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
748Requires(post): selinux-policy-base >= %{_selinux_policy_version}, policycoreutils, gawk
749Requires(postun): policycoreutils
750%description selinux
751This package contains SELinux support for Ceph MON, OSD and MDS. The package
752also performs file-system relabelling which can take a long time on heavily
753populated file-systems.
754
755%endif
756
757%package -n python-ceph-compat
758Summary: Compatibility package for Cephs python libraries
759%if 0%{?suse_version}
760Group: Development/Languages/Python
761%endif
7c673cae 762Obsoletes: python-ceph
31f18b77
FG
763Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
764Requires: python-rbd = %{_epoch_prefix}%{version}-%{release}
765Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release}
766Requires: python-rgw = %{_epoch_prefix}%{version}-%{release}
7c673cae
FG
767Provides: python-ceph
768%description -n python-ceph-compat
769This is a compatibility package to accommodate python-ceph split into
770python-rados, python-rbd, python-rgw and python-cephfs. Packages still
771depending on python-ceph should be fixed to depend on python-rados,
772python-rbd, python-rgw or python-cephfs instead.
773
774#################################################################################
775# common
776#################################################################################
777%prep
778%autosetup -p1 -n @TARBALL_BASENAME@
779
780%build
781%if 0%{with cephfs_java}
782# Find jni.h
783for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do
784 [ -d $i ] && java_inc="$java_inc -I$i"
785done
786%endif
787
788%if %{with lowmem_builder}
789RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768"
790%endif
791export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
792
793export CPPFLAGS="$java_inc"
794export CFLAGS="$RPM_OPT_FLAGS"
795export CXXFLAGS="$RPM_OPT_FLAGS"
796
797env | sort
798
799%if %{with lowmem_builder}
800%if 0%{?jobs} > 8
801%define _smp_mflags -j8
802%endif
803%endif
804
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//')
809
810mkdir build
811cd build
812cmake .. \
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 \
c07f9fc5 820 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
7c673cae
FG
821 -DWITH_EMBEDDED=OFF \
822 -DWITH_MANPAGE=ON \
823 -DWITH_PYTHON3=ON \
824 -DWITH_SYSTEMD=ON \
825%if 0%{?rhel} && ! 0%{?centos}
826 -DWITH_SUBMAN=ON \
827%endif
7c673cae
FG
828%if 0%{without ceph_test_package}
829 -DWITH_TESTS=OFF \
830%endif
831%if 0%{with cephfs_java}
832 -DWITH_CEPHFS_JAVA=ON \
833%endif
834%if 0%{with selinux}
835 -DWITH_SELINUX=ON \
836%endif
837%if %{with lttng}
838 -DWITH_LTTNG=ON \
c07f9fc5 839 -DWITH_BABELTRACE=ON \
7c673cae
FG
840%else
841 -DWITH_LTTNG=OFF \
c07f9fc5 842 -DWITH_BABELTRACE=OFF \
7c673cae
FG
843%endif
844 $CEPH_EXTRA_CMAKE_ARGS \
845%if 0%{with ocf}
846 -DWITH_OCF=ON \
31f18b77
FG
847%endif
848%ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64
849 -DWITH_RADOSGW_BEAST_FRONTEND=ON \
850%else
851 -DWITH_RADOSGW_BEAST_FRONTEND=OFF \
7c673cae
FG
852%endif
853 -DBOOST_J=%{_smp_ncpus}
854
855make %{?_smp_mflags}
856
857
858%if 0%{with make_check}
859%check
860# run in-tree unittests
861cd build
862ctest %{?_smp_mflags}
863
864%endif
865
866
867
868%install
869pushd build
870make DESTDIR=%{buildroot} install
871# we have dropped sysvinit bits
872rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph
873popd
874install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
875%if 0%{?fedora} || 0%{?rhel}
876install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph
877%endif
878%if 0%{?suse_version}
879install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
880%endif
881install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf
882install -m 0755 -D systemd/ceph %{buildroot}%{_sbindir}/rcceph
883install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset
884mkdir -p %{buildroot}%{_sbindir}
885install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
886chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf
31f18b77 887install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
3efd9988 888install -m 0644 -D src/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
7c673cae
FG
889
890# firewall templates and /sbin/mount.ceph symlink
891%if 0%{?suse_version}
892install -m 0644 -D etc/sysconfig/SuSEfirewall2.d/services/ceph-mon %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon
893install -m 0644 -D etc/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds
894mkdir -p %{buildroot}/sbin
895ln -sf %{_sbindir}/mount.ceph %{buildroot}/sbin/mount.ceph
896%endif
897
898# udev rules
899install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules
900install -m 0644 -D udev/60-ceph-by-parttypeuuid.rules %{buildroot}%{_udevrulesdir}/60-ceph-by-parttypeuuid.rules
901install -m 0644 -D udev/95-ceph-osd.rules %{buildroot}%{_udevrulesdir}/95-ceph-osd.rules
902
903#set up placeholder directories
904mkdir -p %{buildroot}%{_sysconfdir}/ceph
905mkdir -p %{buildroot}%{_localstatedir}/run/ceph
906mkdir -p %{buildroot}%{_localstatedir}/log/ceph
907mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp
908mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon
909mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/osd
910mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mds
911mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mgr
912mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/radosgw
913mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-osd
914mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds
915mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw
916mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mgr
d2e6a577 917mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd
7c673cae
FG
918
919%if 0%{?suse_version}
920# create __pycache__ directories and their contents
921%py3_compile %{buildroot}%{python3_sitelib}
922%endif
923
924%clean
925rm -rf %{buildroot}
926
927#################################################################################
928# files and systemd scriptlets
929#################################################################################
930%files
931
932%files base
7c673cae
FG
933%{_bindir}/crushtool
934%{_bindir}/monmaptool
935%{_bindir}/osdmaptool
936%{_bindir}/ceph-run
937%{_bindir}/ceph-detect-init
938%{_libexecdir}/systemd/system-preset/50-ceph.preset
939%{_sbindir}/ceph-create-keys
31f18b77 940%{_sbindir}/ceph-disk
d2e6a577
FG
941%{_sbindir}/ceph-volume
942%{_sbindir}/ceph-volume-systemd
7c673cae
FG
943%{_sbindir}/rcceph
944%dir %{_libexecdir}/ceph
945%{_libexecdir}/ceph/ceph_common.sh
946%dir %{_libdir}/rados-classes
947%{_libdir}/rados-classes/*
948%dir %{_libdir}/ceph
949%dir %{_libdir}/ceph/erasure-code
950%{_libdir}/ceph/erasure-code/libec_*.so*
951%dir %{_libdir}/ceph/compressor
952%{_libdir}/ceph/compressor/libceph_*.so*
953%ifarch x86_64
954%dir %{_libdir}/ceph/crypto
955%{_libdir}/ceph/crypto/libceph_*.so*
956%endif
957%if %{with lttng}
958%{_libdir}/libos_tp.so*
959%{_libdir}/libosd_tp.so*
960%endif
7c673cae
FG
961%config(noreplace) %{_sysconfdir}/logrotate.d/ceph
962%if 0%{?fedora} || 0%{?rhel}
963%config(noreplace) %{_sysconfdir}/sysconfig/ceph
964%endif
965%if 0%{?suse_version}
966%{_localstatedir}/adm/fillup-templates/sysconfig.*
967%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon
968%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds
969%endif
31f18b77 970%{_unitdir}/ceph-disk@.service
d2e6a577 971%{_unitdir}/ceph-volume@.service
7c673cae
FG
972%{_unitdir}/ceph.target
973%{python_sitelib}/ceph_detect_init*
974%{python_sitelib}/ceph_disk*
d2e6a577
FG
975%dir %{python_sitelib}/ceph_volume
976%{python_sitelib}/ceph_volume/*
977%{python_sitelib}/ceph_volume-*
7c673cae
FG
978%{_mandir}/man8/ceph-deploy.8*
979%{_mandir}/man8/ceph-detect-init.8*
980%{_mandir}/man8/ceph-create-keys.8*
31f18b77 981%{_mandir}/man8/ceph-disk.8*
b5b8bbf5
FG
982%{_mandir}/man8/ceph-volume.8*
983%{_mandir}/man8/ceph-volume-systemd.8*
7c673cae
FG
984%{_mandir}/man8/ceph-run.8*
985%{_mandir}/man8/crushtool.8*
986%{_mandir}/man8/osdmaptool.8*
987%{_mandir}/man8/monmaptool.8*
988#set up placeholder directories
989%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/tmp
990%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd
991%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mds
992%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rgw
993%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mgr
d2e6a577 994%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd
7c673cae
FG
995
996%post base
997/sbin/ldconfig
998%if 0%{?suse_version}
999%fillup_only
1000if [ $1 -eq 1 ] ; then
31f18b77 1001 /usr/bin/systemctl preset ceph-disk@\*.service ceph.target >/dev/null 2>&1 || :
7c673cae
FG
1002fi
1003%endif
1004%if 0%{?fedora} || 0%{?rhel}
31f18b77 1005%systemd_post ceph-disk@\*.service ceph.target
d2e6a577 1006%systemd_post ceph-volume@\*.service ceph.target
7c673cae
FG
1007%endif
1008if [ $1 -eq 1 ] ; then
1009/usr/bin/systemctl start ceph.target >/dev/null 2>&1 || :
1010fi
1011
1012%preun base
1013%if 0%{?suse_version}
31f18b77 1014%service_del_preun ceph-disk@\*.service ceph.target
7c673cae
FG
1015%endif
1016%if 0%{?fedora} || 0%{?rhel}
31f18b77 1017%systemd_preun ceph-disk@\*.service ceph.target
d2e6a577 1018%systemd_preun ceph-volume@\*.service ceph.target
7c673cae
FG
1019%endif
1020
1021%postun base
1022/sbin/ldconfig
224ce89b 1023test -n "$FIRST_ARG" || FIRST_ARG=$1
7c673cae
FG
1024%if 0%{?suse_version}
1025DISABLE_RESTART_ON_UPDATE="yes"
31f18b77 1026%service_del_postun ceph-disk@\*.service ceph.target
7c673cae
FG
1027%endif
1028%if 0%{?fedora} || 0%{?rhel}
31f18b77 1029%systemd_postun ceph-disk@\*.service ceph.target
7c673cae 1030%endif
31f18b77
FG
1031if [ $FIRST_ARG -ge 1 ] ; then
1032 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1033 # "yes". In any case: if units are not running, do not touch them.
1034 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1035 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1036 source $SYSCONF_CEPH
1037 fi
1038 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
d2e6a577 1039 /usr/bin/systemctl try-restart ceph-disk@\*.service ceph-volume@\*.service > /dev/null 2>&1 || :
31f18b77
FG
1040 fi
1041fi
7c673cae
FG
1042
1043%files common
224ce89b 1044%dir %{_docdir}/ceph
31f18b77
FG
1045%doc %{_docdir}/ceph/sample.ceph.conf
1046%doc %{_docdir}/ceph/COPYING
7c673cae
FG
1047%{_bindir}/ceph
1048%{_bindir}/ceph-authtool
1049%{_bindir}/ceph-conf
1050%{_bindir}/ceph-dencoder
1051%{_bindir}/ceph-rbdnamer
1052%{_bindir}/ceph-syn
1053%{_bindir}/ceph-crush-location
1054%{_bindir}/cephfs-data-scan
1055%{_bindir}/cephfs-journal-tool
1056%{_bindir}/cephfs-table-tool
1057%{_bindir}/rados
1058%{_bindir}/radosgw-admin
1059%{_bindir}/rbd
1060%{_bindir}/rbd-replay
1061%{_bindir}/rbd-replay-many
1062%{_bindir}/rbdmap
1063%{_sbindir}/mount.ceph
1064%if 0%{?suse_version}
1065/sbin/mount.ceph
1066%endif
1067%if %{with lttng}
1068%{_bindir}/rbd-replay-prep
1069%endif
1070%{_bindir}/ceph-post-file
1071%{_bindir}/ceph-brag
1072%{_tmpfilesdir}/ceph-common.conf
1073%{_mandir}/man8/ceph-authtool.8*
1074%{_mandir}/man8/ceph-conf.8*
1075%{_mandir}/man8/ceph-dencoder.8*
1076%{_mandir}/man8/ceph-rbdnamer.8*
1077%{_mandir}/man8/ceph-syn.8*
1078%{_mandir}/man8/ceph-post-file.8*
1079%{_mandir}/man8/ceph.8*
1080%{_mandir}/man8/mount.ceph.8*
1081%{_mandir}/man8/rados.8*
1082%{_mandir}/man8/radosgw-admin.8*
1083%{_mandir}/man8/rbd.8*
1084%{_mandir}/man8/rbdmap.8*
1085%{_mandir}/man8/rbd-replay.8*
1086%{_mandir}/man8/rbd-replay-many.8*
1087%{_mandir}/man8/rbd-replay-prep.8*
1088%dir %{_datadir}/ceph/
1089%{_datadir}/ceph/known_hosts_drop.ceph.com
1090%{_datadir}/ceph/id_rsa_drop.ceph.com
1091%{_datadir}/ceph/id_rsa_drop.ceph.com.pub
1092%dir %{_sysconfdir}/ceph/
31f18b77 1093%config %{_sysconfdir}/bash_completion.d/ceph
7c673cae
FG
1094%config %{_sysconfdir}/bash_completion.d/rados
1095%config %{_sysconfdir}/bash_completion.d/rbd
1096%config %{_sysconfdir}/bash_completion.d/radosgw-admin
1097%config(noreplace) %{_sysconfdir}/ceph/rbdmap
1098%{_unitdir}/rbdmap.service
1099%{python_sitelib}/ceph_argparse.py*
1100%{python_sitelib}/ceph_daemon.py*
1101%dir %{_udevrulesdir}
1102%{_udevrulesdir}/50-rbd.rules
1103%attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/
1104%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/
1105
1106%pre common
1107CEPH_GROUP_ID=167
1108CEPH_USER_ID=167
1109%if 0%{?rhel} || 0%{?fedora}
1110/usr/sbin/groupadd ceph -g $CEPH_GROUP_ID -o -r 2>/dev/null || :
1111/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 || :
1112%endif
1113%if 0%{?suse_version}
1114if ! getent group ceph >/dev/null ; then
1115 CEPH_GROUP_ID_OPTION=""
1116 getent group $CEPH_GROUP_ID >/dev/null || CEPH_GROUP_ID_OPTION="-g $CEPH_GROUP_ID"
1117 groupadd ceph $CEPH_GROUP_ID_OPTION -r 2>/dev/null || :
1118fi
1119if ! getent passwd ceph >/dev/null ; then
1120 CEPH_USER_ID_OPTION=""
1121 getent passwd $CEPH_USER_ID >/dev/null || CEPH_USER_ID_OPTION="-u $CEPH_USER_ID"
1122 useradd ceph $CEPH_USER_ID_OPTION -r -g ceph -s /sbin/nologin 2>/dev/null || :
1123fi
1124usermod -c "Ceph storage service" \
1125 -d %{_localstatedir}/lib/ceph \
1126 -g ceph \
1127 -s /sbin/nologin \
1128 ceph
1129%endif
1130exit 0
1131
1132%post common
1133%tmpfiles_create %{_tmpfilesdir}/ceph-common.conf
1134
1135%postun common
1136# Package removal cleanup
1137if [ "$1" -eq "0" ] ; then
1138 rm -rf %{_localstatedir}/log/ceph
1139 rm -rf %{_sysconfdir}/ceph
1140fi
1141
1142%files mds
1143%{_bindir}/ceph-mds
1144%{_mandir}/man8/ceph-mds.8*
1145%{_unitdir}/ceph-mds@.service
1146%{_unitdir}/ceph-mds.target
1147%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mds
1148
1149%post mds
1150%if 0%{?suse_version}
1151if [ $1 -eq 1 ] ; then
1152 /usr/bin/systemctl preset ceph-mds@\*.service ceph-mds.target >/dev/null 2>&1 || :
1153fi
1154%endif
1155%if 0%{?fedora} || 0%{?rhel}
1156%systemd_post ceph-mds@\*.service ceph-mds.target
1157%endif
1158if [ $1 -eq 1 ] ; then
1159/usr/bin/systemctl start ceph-mds.target >/dev/null 2>&1 || :
1160fi
1161
1162%preun mds
1163%if 0%{?suse_version}
1164%service_del_preun ceph-mds@\*.service ceph-mds.target
1165%endif
1166%if 0%{?fedora} || 0%{?rhel}
1167%systemd_preun ceph-mds@\*.service ceph-mds.target
1168%endif
1169
1170%postun mds
1171test -n "$FIRST_ARG" || FIRST_ARG=$1
1172%if 0%{?suse_version}
1173DISABLE_RESTART_ON_UPDATE="yes"
1174%service_del_postun ceph-mds@\*.service ceph-mds.target
1175%endif
1176%if 0%{?fedora} || 0%{?rhel}
1177%systemd_postun ceph-mds@\*.service ceph-mds.target
1178%endif
1179if [ $FIRST_ARG -ge 1 ] ; then
1180 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1181 # "yes". In any case: if units are not running, do not touch them.
1182 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1183 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1184 source $SYSCONF_CEPH
1185 fi
1186 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1187 /usr/bin/systemctl try-restart ceph-mds@\*.service > /dev/null 2>&1 || :
1188 fi
1189fi
1190
1191%files mgr
1192%{_bindir}/ceph-mgr
1193%{_libdir}/ceph/mgr
1194%{_unitdir}/ceph-mgr@.service
1195%{_unitdir}/ceph-mgr.target
1196%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mgr
1197
1198%post mgr
1199%if 0%{?suse_version}
1200if [ $1 -eq 1 ] ; then
1201 /usr/bin/systemctl preset ceph-mgr@\*.service ceph-mgr.target >/dev/null 2>&1 || :
1202fi
1203%endif
1204%if 0%{?fedora} || 0%{?rhel}
1205%systemd_post ceph-mgr@\*.service ceph-mgr.target
1206%endif
1207if [ $1 -eq 1 ] ; then
1208/usr/bin/systemctl start ceph-mgr.target >/dev/null 2>&1 || :
1209fi
1210
1211%preun mgr
1212%if 0%{?suse_version}
1213%service_del_preun ceph-mgr@\*.service ceph-mgr.target
1214%endif
1215%if 0%{?fedora} || 0%{?rhel}
1216%systemd_preun ceph-mgr@\*.service ceph-mgr.target
1217%endif
1218
1219%postun mgr
1220test -n "$FIRST_ARG" || FIRST_ARG=$1
1221%if 0%{?suse_version}
1222DISABLE_RESTART_ON_UPDATE="yes"
1223%service_del_postun ceph-mgr@\*.service ceph-mgr.target
1224%endif
1225%if 0%{?fedora} || 0%{?rhel}
1226%systemd_postun ceph-mgr@\*.service ceph-mgr.target
1227%endif
1228if [ $FIRST_ARG -ge 1 ] ; then
1229 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1230 # "yes". In any case: if units are not running, do not touch them.
1231 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1232 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1233 source $SYSCONF_CEPH
1234 fi
1235 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1236 /usr/bin/systemctl try-restart ceph-mgr@\*.service > /dev/null 2>&1 || :
1237 fi
1238fi
1239
1240%files mon
1241%{_bindir}/ceph-mon
1242%{_bindir}/ceph-rest-api
1243%{_mandir}/man8/ceph-mon.8*
1244%{_mandir}/man8/ceph-rest-api.8*
1245%{python_sitelib}/ceph_rest_api.py*
1246%{_unitdir}/ceph-mon@.service
1247%{_unitdir}/ceph-mon.target
1248%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon
1249
1250%post mon
1251%if 0%{?suse_version}
1252if [ $1 -eq 1 ] ; then
1253 /usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || :
1254fi
1255%endif
1256%if 0%{?fedora} || 0%{?rhel}
1257%systemd_post ceph-mon@\*.service ceph-mon.target
1258%endif
1259if [ $1 -eq 1 ] ; then
1260/usr/bin/systemctl start ceph-mon.target >/dev/null 2>&1 || :
1261fi
1262
1263%preun mon
1264%if 0%{?suse_version}
1265%service_del_preun ceph-mon@\*.service ceph-mon.target
1266%endif
1267%if 0%{?fedora} || 0%{?rhel}
1268%systemd_preun ceph-mon@\*.service ceph-mon.target
1269%endif
1270
1271%postun mon
1272test -n "$FIRST_ARG" || FIRST_ARG=$1
1273%if 0%{?suse_version}
1274DISABLE_RESTART_ON_UPDATE="yes"
1275%service_del_postun ceph-mon@\*.service ceph-mon.target
1276%endif
1277%if 0%{?fedora} || 0%{?rhel}
1278%systemd_postun ceph-mon@\*.service ceph-mon.target
1279%endif
1280if [ $FIRST_ARG -ge 1 ] ; then
1281 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1282 # "yes". In any case: if units are not running, do not touch them.
1283 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1284 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1285 source $SYSCONF_CEPH
1286 fi
1287 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1288 /usr/bin/systemctl try-restart ceph-mon@\*.service > /dev/null 2>&1 || :
1289 fi
1290fi
1291
1292%files fuse
7c673cae
FG
1293%{_bindir}/ceph-fuse
1294%{_mandir}/man8/ceph-fuse.8*
1295%{_sbindir}/mount.fuse.ceph
1296%{_unitdir}/ceph-fuse@.service
1297%{_unitdir}/ceph-fuse.target
1298
1299%files -n rbd-fuse
7c673cae
FG
1300%{_bindir}/rbd-fuse
1301%{_mandir}/man8/rbd-fuse.8*
1302
1303%files -n rbd-mirror
7c673cae
FG
1304%{_bindir}/rbd-mirror
1305%{_mandir}/man8/rbd-mirror.8*
1306%{_unitdir}/ceph-rbd-mirror@.service
1307%{_unitdir}/ceph-rbd-mirror.target
1308
1309%post -n rbd-mirror
1310%if 0%{?suse_version}
1311if [ $1 -eq 1 ] ; then
1312 /usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || :
1313fi
1314%endif
1315%if 0%{?fedora} || 0%{?rhel}
1316%systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1317%endif
1318if [ $1 -eq 1 ] ; then
1319/usr/bin/systemctl start ceph-rbd-mirror.target >/dev/null 2>&1 || :
1320fi
1321
1322%preun -n rbd-mirror
1323%if 0%{?suse_version}
1324%service_del_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1325%endif
1326%if 0%{?fedora} || 0%{?rhel}
1327%systemd_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1328%endif
1329
1330%postun -n rbd-mirror
1331test -n "$FIRST_ARG" || FIRST_ARG=$1
1332%if 0%{?suse_version}
1333DISABLE_RESTART_ON_UPDATE="yes"
1334%service_del_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1335%endif
1336%if 0%{?fedora} || 0%{?rhel}
1337%systemd_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1338%endif
1339if [ $FIRST_ARG -ge 1 ] ; then
1340 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1341 # "yes". In any case: if units are not running, do not touch them.
1342 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1343 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1344 source $SYSCONF_CEPH
1345 fi
1346 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1347 /usr/bin/systemctl try-restart ceph-rbd-mirror@\*.service > /dev/null 2>&1 || :
1348 fi
1349fi
1350
1351%files -n rbd-nbd
7c673cae
FG
1352%{_bindir}/rbd-nbd
1353%{_mandir}/man8/rbd-nbd.8*
1354
1355%files radosgw
7c673cae
FG
1356%{_bindir}/radosgw
1357%{_bindir}/radosgw-token
31f18b77 1358%{_bindir}/radosgw-es
7c673cae
FG
1359%{_bindir}/radosgw-object-expirer
1360%{_mandir}/man8/radosgw.8*
1361%dir %{_localstatedir}/lib/ceph/radosgw
1362%{_unitdir}/ceph-radosgw@.service
1363%{_unitdir}/ceph-radosgw.target
1364
1365%post radosgw
1366%if 0%{?suse_version}
1367if [ $1 -eq 1 ] ; then
1368 /usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || :
1369fi
1370%endif
1371%if 0%{?fedora} || 0%{?rhel}
1372%systemd_post ceph-radosgw@\*.service ceph-radosgw.target
1373%endif
1374if [ $1 -eq 1 ] ; then
1375/usr/bin/systemctl start ceph-radosgw.target >/dev/null 2>&1 || :
1376fi
1377
1378%preun radosgw
1379%if 0%{?suse_version}
1380%service_del_preun ceph-radosgw@\*.service ceph-radosgw.target
1381%endif
1382%if 0%{?fedora} || 0%{?rhel}
1383%systemd_preun ceph-radosgw@\*.service ceph-radosgw.target
1384%endif
1385
1386%postun radosgw
1387test -n "$FIRST_ARG" || FIRST_ARG=$1
1388%if 0%{?suse_version}
1389DISABLE_RESTART_ON_UPDATE="yes"
1390%service_del_postun ceph-radosgw@\*.service ceph-radosgw.target
1391%endif
1392%if 0%{?fedora} || 0%{?rhel}
1393%systemd_postun ceph-radosgw@\*.service ceph-radosgw.target
1394%endif
1395if [ $FIRST_ARG -ge 1 ] ; then
1396 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1397 # "yes". In any case: if units are not running, do not touch them.
1398 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1399 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1400 source $SYSCONF_CEPH
1401 fi
1402 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
1403 /usr/bin/systemctl try-restart ceph-radosgw@\*.service > /dev/null 2>&1 || :
1404 fi
1405fi
1406
1407%files osd
1408%{_bindir}/ceph-clsinfo
1409%{_bindir}/ceph-bluestore-tool
1410%{_bindir}/ceph-objectstore-tool
1411%{_bindir}/ceph-osd
7c673cae
FG
1412%{_libexecdir}/ceph/ceph-osd-prestart.sh
1413%dir %{_udevrulesdir}
1414%{_udevrulesdir}/60-ceph-by-parttypeuuid.rules
1415%{_udevrulesdir}/95-ceph-osd.rules
1416%{_mandir}/man8/ceph-clsinfo.8*
7c673cae 1417%{_mandir}/man8/ceph-osd.8*
3efd9988 1418%{_mandir}/man8/ceph-bluestore-tool.8*
7c673cae 1419%if 0%{?rhel} && ! 0%{?centos}
31f18b77 1420%attr(0755,-,-) %{_sysconfdir}/cron.hourly/subman
7c673cae
FG
1421%endif
1422%{_unitdir}/ceph-osd@.service
1423%{_unitdir}/ceph-osd.target
7c673cae 1424%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
3efd9988 1425%config(noreplace) %{_sysctldir}/90-ceph-osd.conf
7c673cae
FG
1426
1427%post osd
1428%if 0%{?suse_version}
1429if [ $1 -eq 1 ] ; then
31f18b77 1430 /usr/bin/systemctl preset ceph-osd@\*.service ceph-osd.target >/dev/null 2>&1 || :
7c673cae
FG
1431fi
1432%endif
1433%if 0%{?fedora} || 0%{?rhel}
31f18b77 1434%systemd_post ceph-osd@\*.service ceph-osd.target
7c673cae
FG
1435%endif
1436if [ $1 -eq 1 ] ; then
1437/usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || :
1438fi
3efd9988
FG
1439%if 0%{?sysctl_apply}
1440 %sysctl_apply 90-ceph-osd.conf
1441%else
1442 /usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || :
1443%endif
7c673cae
FG
1444
1445%preun osd
1446%if 0%{?suse_version}
31f18b77 1447%service_del_preun ceph-osd@\*.service ceph-osd.target
7c673cae
FG
1448%endif
1449%if 0%{?fedora} || 0%{?rhel}
31f18b77 1450%systemd_preun ceph-osd@\*.service ceph-osd.target
7c673cae
FG
1451%endif
1452
1453%postun osd
1454test -n "$FIRST_ARG" || FIRST_ARG=$1
1455%if 0%{?suse_version}
1456DISABLE_RESTART_ON_UPDATE="yes"
31f18b77 1457%service_del_postun ceph-osd@\*.service ceph-osd.target
7c673cae
FG
1458%endif
1459%if 0%{?fedora} || 0%{?rhel}
31f18b77 1460%systemd_postun ceph-osd@\*.service ceph-osd.target
7c673cae
FG
1461%endif
1462if [ $FIRST_ARG -ge 1 ] ; then
1463 # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
1464 # "yes". In any case: if units are not running, do not touch them.
1465 SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
1466 if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
1467 source $SYSCONF_CEPH
1468 fi
1469 if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
31f18b77 1470 /usr/bin/systemctl try-restart ceph-osd@\*.service > /dev/null 2>&1 || :
7c673cae
FG
1471 fi
1472fi
1473
1474%if %{with ocf}
1475
1476%files resource-agents
7c673cae
FG
1477%dir %{_prefix}/lib/ocf
1478%dir %{_prefix}/lib/ocf/resource.d
1479%dir %{_prefix}/lib/ocf/resource.d/ceph
1480%{_prefix}/lib/ocf/resource.d/ceph/rbd
1481
1482%endif
1483
1484%files -n librados2
7c673cae
FG
1485%{_libdir}/librados.so.*
1486%dir %{_libdir}/ceph
1487%{_libdir}/ceph/libceph-common.so*
1488%if %{with lttng}
1489%{_libdir}/librados_tp.so.*
1490%endif
1491
1492%post -n librados2 -p /sbin/ldconfig
1493
1494%postun -n librados2 -p /sbin/ldconfig
1495
1496%files -n librados-devel
7c673cae
FG
1497%dir %{_includedir}/rados
1498%{_includedir}/rados/librados.h
1499%{_includedir}/rados/librados.hpp
1500%{_includedir}/rados/buffer.h
1501%{_includedir}/rados/buffer_fwd.h
1502%{_includedir}/rados/inline_memory.h
1503%{_includedir}/rados/page.h
1504%{_includedir}/rados/crc32c.h
1505%{_includedir}/rados/rados_types.h
1506%{_includedir}/rados/rados_types.hpp
1507%{_includedir}/rados/memory.h
1508%{_libdir}/librados.so
1509%if %{with lttng}
1510%{_libdir}/librados_tp.so
1511%endif
1512%{_bindir}/librados-config
1513%{_mandir}/man8/librados-config.8*
1514
1515%files -n python-rados
7c673cae
FG
1516%{python_sitearch}/rados.so
1517%{python_sitearch}/rados-*.egg-info
1518
1519%files -n python%{python3_pkgversion}-rados
7c673cae
FG
1520%{python3_sitearch}/rados.cpython*.so
1521%{python3_sitearch}/rados-*.egg-info
1522
1523%files -n libradosstriper1
7c673cae
FG
1524%{_libdir}/libradosstriper.so.*
1525
1526%post -n libradosstriper1 -p /sbin/ldconfig
1527
1528%postun -n libradosstriper1 -p /sbin/ldconfig
1529
1530%files -n libradosstriper-devel
7c673cae
FG
1531%dir %{_includedir}/radosstriper
1532%{_includedir}/radosstriper/libradosstriper.h
1533%{_includedir}/radosstriper/libradosstriper.hpp
1534%{_libdir}/libradosstriper.so
1535
1536%files -n librbd1
7c673cae
FG
1537%{_libdir}/librbd.so.*
1538%if %{with lttng}
1539%{_libdir}/librbd_tp.so.*
1540%endif
1541
181888fb 1542%post -n librbd1 -p /sbin/ldconfig
7c673cae
FG
1543
1544%postun -n librbd1 -p /sbin/ldconfig
1545
1546%files -n librbd-devel
7c673cae
FG
1547%dir %{_includedir}/rbd
1548%{_includedir}/rbd/librbd.h
1549%{_includedir}/rbd/librbd.hpp
1550%{_includedir}/rbd/features.h
1551%{_libdir}/librbd.so
1552%if %{with lttng}
1553%{_libdir}/librbd_tp.so
1554%endif
1555
1556%files -n librgw2
7c673cae
FG
1557%{_libdir}/librgw.so.*
1558
1559%post -n librgw2 -p /sbin/ldconfig
1560
1561%postun -n librgw2 -p /sbin/ldconfig
1562
1563%files -n librgw-devel
7c673cae
FG
1564%dir %{_includedir}/rados
1565%{_includedir}/rados/librgw.h
1566%{_includedir}/rados/rgw_file.h
1567%{_libdir}/librgw.so
1568
1569%files -n python-rgw
7c673cae
FG
1570%{python_sitearch}/rgw.so
1571%{python_sitearch}/rgw-*.egg-info
1572
1573%files -n python%{python3_pkgversion}-rgw
7c673cae
FG
1574%{python3_sitearch}/rgw.cpython*.so
1575%{python3_sitearch}/rgw-*.egg-info
1576
1577%files -n python-rbd
7c673cae
FG
1578%{python_sitearch}/rbd.so
1579%{python_sitearch}/rbd-*.egg-info
1580
1581%files -n python%{python3_pkgversion}-rbd
7c673cae
FG
1582%{python3_sitearch}/rbd.cpython*.so
1583%{python3_sitearch}/rbd-*.egg-info
1584
1585%files -n libcephfs2
7c673cae
FG
1586%{_libdir}/libcephfs.so.*
1587
1588%post -n libcephfs2 -p /sbin/ldconfig
1589
1590%postun -n libcephfs2 -p /sbin/ldconfig
1591
1592%files -n libcephfs-devel
7c673cae
FG
1593%dir %{_includedir}/cephfs
1594%{_includedir}/cephfs/libcephfs.h
1595%{_includedir}/cephfs/ceph_statx.h
1596%{_libdir}/libcephfs.so
1597
1598%files -n python-cephfs
7c673cae
FG
1599%{python_sitearch}/cephfs.so
1600%{python_sitearch}/cephfs-*.egg-info
1601%{python_sitelib}/ceph_volume_client.py*
1602
1603%files -n python%{python3_pkgversion}-cephfs
7c673cae
FG
1604%{python3_sitearch}/cephfs.cpython*.so
1605%{python3_sitearch}/cephfs-*.egg-info
1606%{python3_sitelib}/ceph_volume_client.py
1607%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py*
1608
1609%files -n python%{python3_pkgversion}-ceph-argparse
7c673cae
FG
1610%{python3_sitelib}/ceph_argparse.py
1611%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py*
1612%{python3_sitelib}/ceph_daemon.py
1613%{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py*
1614
1615%if 0%{with ceph_test_package}
1616%files -n ceph-test
7c673cae
FG
1617%{_bindir}/ceph-client-debug
1618%{_bindir}/ceph_bench_log
1619%{_bindir}/ceph_kvstorebench
1620%{_bindir}/ceph_multi_stress_watch
1621%{_bindir}/ceph_erasure_code
1622%{_bindir}/ceph_erasure_code_benchmark
1623%{_bindir}/ceph_omapbench
1624%{_bindir}/ceph_objectstore_bench
1625%{_bindir}/ceph_perf_objectstore
1626%{_bindir}/ceph_perf_local
1627%{_bindir}/ceph_perf_msgr_client
1628%{_bindir}/ceph_perf_msgr_server
1629%{_bindir}/ceph_psim
1630%{_bindir}/ceph_radosacl
1631%{_bindir}/ceph_rgw_jsonparser
1632%{_bindir}/ceph_rgw_multiparser
1633%{_bindir}/ceph_scratchtool
1634%{_bindir}/ceph_scratchtoolpp
1635%{_bindir}/ceph_smalliobench
1636%{_bindir}/ceph_smalliobenchdumb
1637%{_bindir}/ceph_smalliobenchfs
1638%{_bindir}/ceph_smalliobenchrbd
1639%{_bindir}/ceph_test_*
1640%{_bindir}/ceph_tpbench
1641%{_bindir}/ceph_xattr_bench
1642%{_bindir}/ceph-coverage
1643%{_bindir}/ceph-monstore-tool
1644%{_bindir}/ceph-osdomap-tool
1645%{_bindir}/ceph-kvstore-tool
1646%{_bindir}/ceph-debugpack
7c673cae
FG
1647%{_mandir}/man8/ceph-debugpack.8*
1648%dir %{_libdir}/ceph
1649%{_libdir}/ceph/ceph-monstore-update-crush.sh
1650%endif
1651
1652%if 0%{with cephfs_java}
1653%files -n libcephfs_jni1
7c673cae
FG
1654%{_libdir}/libcephfs_jni.so.*
1655
1656%post -n libcephfs_jni1 -p /sbin/ldconfig
1657
1658%postun -n libcephfs_jni1 -p /sbin/ldconfig
1659
1660%files -n libcephfs_jni-devel
7c673cae
FG
1661%{_libdir}/libcephfs_jni.so
1662
1663%files -n cephfs-java
7c673cae
FG
1664%{_javadir}/libcephfs.jar
1665%{_javadir}/libcephfs-test.jar
1666%endif
1667
1668%files -n rados-objclass-devel
7c673cae
FG
1669%dir %{_includedir}/rados
1670%{_includedir}/rados/objclass.h
1671
1672%if 0%{with selinux}
1673%files selinux
7c673cae
FG
1674%attr(0600,root,root) %{_datadir}/selinux/packages/ceph.pp
1675%{_datadir}/selinux/devel/include/contrib/ceph.if
1676%{_mandir}/man8/ceph_selinux.8*
1677
1678%post selinux
1679# backup file_contexts before update
1680. /etc/selinux/config
1681FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
1682cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
1683
1684# Install the policy
1685/usr/sbin/semodule -i %{_datadir}/selinux/packages/ceph.pp
1686
1687# Load the policy if SELinux is enabled
1688if ! /usr/sbin/selinuxenabled; then
1689 # Do not relabel if selinux is not enabled
1690 exit 0
1691fi
1692
1693if diff ${FILE_CONTEXT} ${FILE_CONTEXT}.pre > /dev/null 2>&1; then
1694 # Do not relabel if file contexts did not change
1695 exit 0
1696fi
1697
1698# Check whether the daemons are running
1699/usr/bin/systemctl status ceph.target > /dev/null 2>&1
1700STATUS=$?
1701
1702# Stop the daemons if they were running
1703if test $STATUS -eq 0; then
1704 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
1705fi
1706
31f18b77
FG
1707# Relabel the files
1708# Use ceph-disk fix for first package install and fixfiles otherwise
1709if [ "$1" = "1" ]; then
1710 /usr/sbin/ceph-disk fix --selinux
1711else
1712 /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
1713fi
1714
7c673cae
FG
1715rm -f ${FILE_CONTEXT}.pre
1716# The fixfiles command won't fix label for /var/run/ceph
1717/usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
1718
1719# Start the daemons iff they were running before
1720if test $STATUS -eq 0; then
1721 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
1722fi
1723exit 0
1724
1725%postun selinux
1726if [ $1 -eq 0 ]; then
1727 # backup file_contexts before update
1728 . /etc/selinux/config
1729 FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
1730 cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
1731
1732 # Remove the module
1733 /usr/sbin/semodule -n -r ceph > /dev/null 2>&1
1734
1735 # Reload the policy if SELinux is enabled
1736 if ! /usr/sbin/selinuxenabled ; then
1737 # Do not relabel if SELinux is not enabled
1738 exit 0
1739 fi
1740
1741 # Check whether the daemons are running
1742 /usr/bin/systemctl status ceph.target > /dev/null 2>&1
1743 STATUS=$?
1744
1745 # Stop the daemons if they were running
1746 if test $STATUS -eq 0; then
1747 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
1748 fi
1749
1750 /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
1751 rm -f ${FILE_CONTEXT}.pre
1752 # The fixfiles command won't fix label for /var/run/ceph
1753 /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
1754
1755 # Start the daemons if they were running before
1756 if test $STATUS -eq 0; then
1757 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
1758 fi
1759fi
1760exit 0
1761
1762%endif # with selinux
1763
1764%files -n python-ceph-compat
1765# We need an empty %%files list for python-ceph-compat, to tell rpmbuild to
1766# actually build this meta package.
1767
1768
1769%changelog