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