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