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