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