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