]> git.proxmox.com Git - ceph.git/blob - ceph/ceph.spec
update sources to v12.2.4
[ceph.git] / ceph / ceph.spec
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/
16 #
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
25 %ifarch s390 s390x
26 %bcond_with tcmalloc
27 %else
28 %bcond_without tcmalloc
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}
59
60 #################################################################################
61 # main package definition
62 #################################################################################
63 Name: ceph
64 Version: 12.2.4
65 Release: 0%{?dist}
66 %if 0%{?fedora} || 0%{?rhel}
67 Epoch: 2
68 %endif
69
70 # define _epoch_prefix macro which will expand to the empty string if epoch is
71 # undefined
72 %global _epoch_prefix %{?epoch:%{epoch}:}
73
74 Summary: User space components of the Ceph file system
75 License: LGPL-2.1 and CC-BY-SA-1.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and MIT
76 %if 0%{?suse_version}
77 Group: System/Filesystems
78 %endif
79 URL: http://ceph.com/
80 Source0: http://ceph.com/download/ceph-12.2.4.tar.bz2
81 %if 0%{?suse_version}
82 %if 0%{?is_opensuse}
83 ExclusiveArch: x86_64 aarch64 ppc64 ppc64le
84 %else
85 ExclusiveArch: x86_64 aarch64 ppc64le s390x
86 %endif
87 %endif
88 #################################################################################
89 # dependencies that apply across all distro families
90 #################################################################################
91 Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release}
92 Requires: ceph-mds = %{_epoch_prefix}%{version}-%{release}
93 Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
94 Requires: ceph-mon = %{_epoch_prefix}%{version}-%{release}
95 Requires(post): binutils
96 %if 0%{with cephfs_java}
97 BuildRequires: java-devel
98 BuildRequires: sharutils
99 %endif
100 %if 0%{with selinux}
101 BuildRequires: checkpolicy
102 BuildRequires: selinux-policy-devel
103 BuildRequires: /usr/share/selinux/devel/policyhelp
104 %endif
105 %if 0%{with make_check}
106 %if 0%{?fedora} || 0%{?rhel}
107 BuildRequires: python-cherrypy
108 BuildRequires: python-werkzeug
109 %endif
110 %if 0%{?suse_version}
111 BuildRequires: python-CherryPy
112 BuildRequires: python-Werkzeug
113 BuildRequires: python-numpy-devel
114 %endif
115 BuildRequires: python-pecan
116 BuildRequires: socat
117 %endif
118 BuildRequires: bc
119 BuildRequires: gperf
120 BuildRequires: cmake
121 BuildRequires: cryptsetup
122 BuildRequires: fuse-devel
123 BuildRequires: gcc-c++
124 BuildRequires: gdbm
125 %if 0%{with tcmalloc}
126 BuildRequires: gperftools-devel >= 2.4
127 %endif
128 BuildRequires: jq
129 BuildRequires: leveldb-devel > 1.2
130 BuildRequires: libaio-devel
131 BuildRequires: libblkid-devel >= 2.17
132 BuildRequires: libcurl-devel
133 BuildRequires: libudev-devel
134 BuildRequires: libtool
135 BuildRequires: libxml2-devel
136 BuildRequires: make
137 BuildRequires: parted
138 BuildRequires: perl
139 BuildRequires: pkgconfig
140 BuildRequires: python
141 BuildRequires: python-devel
142 BuildRequires: python-nose
143 BuildRequires: python-requests
144 BuildRequires: python-virtualenv
145 BuildRequires: snappy-devel
146 BuildRequires: udev
147 BuildRequires: util-linux
148 BuildRequires: valgrind-devel
149 BuildRequires: which
150 BuildRequires: xfsprogs
151 BuildRequires: xfsprogs-devel
152 BuildRequires: xmlstarlet
153 BuildRequires: yasm
154
155 #################################################################################
156 # distro-conditional dependencies
157 #################################################################################
158 %if 0%{?suse_version}
159 BuildRequires: pkgconfig(systemd)
160 BuildRequires: systemd-rpm-macros
161 BuildRequires: systemd
162 %{?systemd_requires}
163 PreReq: %fillup_prereq
164 BuildRequires: net-tools
165 BuildRequires: libbz2-devel
166 BuildRequires: btrfsprogs
167 BuildRequires: mozilla-nss-devel
168 BuildRequires: keyutils-devel
169 BuildRequires: libopenssl-devel
170 BuildRequires: lsb-release
171 BuildRequires: openldap2-devel
172 BuildRequires: python-Cython
173 BuildRequires: python-PrettyTable
174 BuildRequires: python-Sphinx
175 BuildRequires: rdma-core-devel
176 %endif
177 %if 0%{?fedora} || 0%{?rhel}
178 Requires: systemd
179 BuildRequires: boost-random
180 BuildRequires: btrfs-progs
181 BuildRequires: nss-devel
182 BuildRequires: keyutils-libs-devel
183 BuildRequires: libibverbs-devel
184 BuildRequires: openldap-devel
185 BuildRequires: openssl-devel
186 BuildRequires: redhat-lsb-core
187 BuildRequires: Cython
188 BuildRequires: python-prettytable
189 BuildRequires: python-sphinx
190 %endif
191 # python34-... for RHEL, python3-... for all other supported distros
192 %if 0%{?rhel}
193 BuildRequires: python34-devel
194 BuildRequires: python34-setuptools
195 BuildRequires: python34-Cython
196 %else
197 BuildRequires: python3-devel
198 BuildRequires: python3-setuptools
199 BuildRequires: python3-Cython
200 %endif
201 # lttng and babeltrace for rbd-replay-prep
202 %if %{with lttng}
203 %if 0%{?fedora} || 0%{?rhel}
204 BuildRequires: lttng-ust-devel
205 BuildRequires: libbabeltrace-devel
206 %endif
207 %if 0%{?suse_version}
208 BuildRequires: lttng-ust-devel
209 BuildRequires: babeltrace-devel
210 %endif
211 %endif
212 %if 0%{?suse_version}
213 BuildRequires: libexpat-devel
214 %endif
215 %if 0%{?rhel} || 0%{?fedora}
216 BuildRequires: expat-devel
217 %endif
218 #hardened-cc1
219 %if 0%{?fedora} || 0%{?rhel}
220 BuildRequires: redhat-rpm-config
221 %endif
222
223 %description
224 Ceph is a massively scalable, open-source, distributed storage system that runs
225 on commodity hardware and delivers object, block and file system storage.
226
227
228 #################################################################################
229 # subpackages
230 #################################################################################
231 %package base
232 Summary: Ceph Base Package
233 %if 0%{?suse_version}
234 Group: System/Filesystems
235 %endif
236 Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
237 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
238 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
239 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
240 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
241 %if 0%{with selinux}
242 Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
243 %endif
244 Requires: python
245 Requires: python-requests
246 Requires: python-setuptools
247 Requires: grep
248 Requires: xfsprogs
249 Requires: logrotate
250 Requires: util-linux
251 Requires: cryptsetup
252 Requires: findutils
253 Requires: psmisc
254 Requires: which
255 %if 0%{?suse_version}
256 Recommends: ntp-daemon
257 %endif
258 %description base
259 Base is the package that includes all the files shared amongst ceph servers
260
261 %package -n ceph-common
262 Summary: Ceph Common
263 %if 0%{?suse_version}
264 Group: System/Filesystems
265 %endif
266 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
267 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
268 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
269 Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
270 Requires: python-rbd = %{_epoch_prefix}%{version}-%{release}
271 Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release}
272 Requires: python-rgw = %{_epoch_prefix}%{version}-%{release}
273 %if 0%{?fedora} || 0%{?rhel}
274 Requires: python-prettytable
275 %endif
276 %if 0%{?suse_version}
277 Requires: python-PrettyTable
278 %endif
279 Requires: python-requests
280 %{?systemd_requires}
281 %if 0%{?suse_version}
282 Requires(pre): pwdutils
283 %endif
284 %description -n ceph-common
285 Common utilities to mount and interact with a ceph storage cluster.
286 Comprised of files that are common to Ceph clients and servers.
287
288 %package mds
289 Summary: Ceph Metadata Server Daemon
290 %if 0%{?suse_version}
291 Group: System/Filesystems
292 %endif
293 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
294 %description mds
295 ceph-mds is the metadata server daemon for the Ceph distributed file system.
296 One or more instances of ceph-mds collectively manage the file system
297 namespace, coordinating access to the shared OSD cluster.
298
299 %package mon
300 Summary: Ceph Monitor Daemon
301 %if 0%{?suse_version}
302 Group: System/Filesystems
303 %endif
304 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
305 # For ceph-rest-api
306 %if 0%{?fedora} || 0%{?rhel}
307 Requires: python-flask
308 %endif
309 %if 0%{?suse_version}
310 Requires: python-Flask
311 %endif
312 %description mon
313 ceph-mon is the cluster monitor daemon for the Ceph distributed file
314 system. One or more instances of ceph-mon form a Paxos part-time
315 parliament cluster that provides extremely reliable and durable storage
316 of cluster membership, configuration, and state.
317
318 %package mgr
319 Summary: Ceph Manager Daemon
320 %if 0%{?suse_version}
321 Group: System/Filesystems
322 %endif
323 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
324 %if 0%{?fedora} || 0%{?rhel}
325 Requires: python-cherrypy
326 Requires: python-jinja2
327 Requires: python-werkzeug
328 Requires: pyOpenSSL
329 %endif
330 %if 0%{?suse_version}
331 Requires: python-CherryPy
332 Requires: python-Jinja2
333 Requires: python-Werkzeug
334 Requires: python-pyOpenSSL
335 %endif
336 Requires: python-pecan
337 %description mgr
338 ceph-mgr enables python modules that provide services (such as the REST
339 module derived from Calamari) and expose CLI hooks. ceph-mgr gathers
340 the cluster maps, the daemon metadata, and performance counters, and
341 exposes all these to the python modules.
342
343 %package fuse
344 Summary: Ceph fuse-based client
345 %if 0%{?suse_version}
346 Group: System/Filesystems
347 %endif
348 Requires: fuse
349 %description fuse
350 FUSE based client for Ceph distributed network file system
351
352 %package -n rbd-fuse
353 Summary: Ceph fuse-based client
354 %if 0%{?suse_version}
355 Group: System/Filesystems
356 %endif
357 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
358 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
359 %description -n rbd-fuse
360 FUSE based client to map Ceph rbd images to files
361
362 %package -n rbd-mirror
363 Summary: Ceph daemon for mirroring RBD images
364 %if 0%{?suse_version}
365 Group: System/Filesystems
366 %endif
367 Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
368 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
369 %description -n rbd-mirror
370 Daemon for mirroring RBD images between Ceph clusters, streaming
371 changes asynchronously.
372
373 %package -n rbd-nbd
374 Summary: Ceph RBD client base on NBD
375 %if 0%{?suse_version}
376 Group: System/Filesystems
377 %endif
378 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
379 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
380 %description -n rbd-nbd
381 NBD based client to map Ceph rbd images to local device
382
383 %package radosgw
384 Summary: Rados REST gateway
385 %if 0%{?suse_version}
386 Group: System/Filesystems
387 %endif
388 Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
389 %if 0%{with selinux}
390 Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
391 %endif
392 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
393 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
394 %if 0%{?rhel} || 0%{?fedora}
395 Requires: mailcap
396 %endif
397 %description radosgw
398 RADOS is a distributed object store used by the Ceph distributed
399 storage system. This package provides a REST gateway to the
400 object store that aims to implement a superset of Amazon's S3
401 service as well as the OpenStack Object Storage ("Swift") API.
402
403 %if %{with ocf}
404 %package resource-agents
405 Summary: OCF-compliant resource agents for Ceph daemons
406 %if 0%{?suse_version}
407 Group: System/Filesystems
408 %endif
409 Requires: ceph-base = %{_epoch_prefix}%{version}
410 Requires: resource-agents
411 %description resource-agents
412 Resource agents for monitoring and managing Ceph daemons
413 under Open Cluster Framework (OCF) compliant resource
414 managers such as Pacemaker.
415 %endif
416
417 %package osd
418 Summary: Ceph Object Storage Daemon
419 %if 0%{?suse_version}
420 Group: System/Filesystems
421 %endif
422 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
423 # for sgdisk, used by ceph-disk
424 %if 0%{?fedora} || 0%{?rhel}
425 Requires: gdisk
426 %endif
427 %if 0%{?suse_version}
428 Requires: gptfdisk
429 %endif
430 Requires: parted
431 Requires: lvm2
432 %description osd
433 ceph-osd is the object storage daemon for the Ceph distributed file
434 system. It is responsible for storing objects on a local file system
435 and providing access to them over the network.
436
437 %package -n librados2
438 Summary: RADOS distributed object store client library
439 %if 0%{?suse_version}
440 Group: System/Libraries
441 %endif
442 %if 0%{?rhel} || 0%{?fedora}
443 Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
444 %endif
445 %description -n librados2
446 RADOS is a reliable, autonomic distributed object storage cluster
447 developed as part of the Ceph distributed storage system. This is a
448 shared library allowing applications to access the distributed object
449 store using a simple file-like interface.
450
451 %package -n librados-devel
452 Summary: RADOS headers
453 %if 0%{?suse_version}
454 Group: Development/Libraries/C and C++
455 %endif
456 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
457 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
458 Provides: librados2-devel = %{_epoch_prefix}%{version}-%{release}
459 Obsoletes: librados2-devel < %{_epoch_prefix}%{version}-%{release}
460 %description -n librados-devel
461 This package contains libraries and headers needed to develop programs
462 that use RADOS object store.
463
464 %package -n librgw2
465 Summary: RADOS gateway client library
466 %if 0%{?suse_version}
467 Group: System/Libraries
468 %endif
469 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
470 %description -n librgw2
471 This package provides a library implementation of the RADOS gateway
472 (distributed object store with S3 and Swift personalities).
473
474 %package -n librgw-devel
475 Summary: RADOS gateway client library
476 %if 0%{?suse_version}
477 Group: Development/Libraries/C and C++
478 %endif
479 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
480 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
481 Provides: librgw2-devel = %{_epoch_prefix}%{version}-%{release}
482 Obsoletes: librgw2-devel < %{_epoch_prefix}%{version}-%{release}
483 %description -n librgw-devel
484 This package contains libraries and headers needed to develop programs
485 that use RADOS gateway client library.
486
487 %package -n python-rgw
488 Summary: Python 2 libraries for the RADOS gateway
489 %if 0%{?suse_version}
490 Group: Development/Languages/Python
491 %endif
492 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
493 Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
494 Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
495 %description -n python-rgw
496 This package contains Python 2 libraries for interacting with Cephs RADOS
497 gateway.
498
499 %package -n python%{python3_pkgversion}-rgw
500 Summary: Python 3 libraries for the RADOS gateway
501 %if 0%{?suse_version}
502 Group: Development/Languages/Python
503 %endif
504 Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
505 Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
506 %description -n python%{python3_pkgversion}-rgw
507 This package contains Python 3 libraries for interacting with Cephs RADOS
508 gateway.
509
510 %package -n python-rados
511 Summary: Python 2 libraries for the RADOS object store
512 %if 0%{?suse_version}
513 Group: Development/Languages/Python
514 %endif
515 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
516 Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
517 %description -n python-rados
518 This package contains Python 2 libraries for interacting with Cephs RADOS
519 object store.
520
521 %package -n python%{python3_pkgversion}-rados
522 Summary: Python 3 libraries for the RADOS object store
523 %if 0%{?suse_version}
524 Group: Development/Languages/Python
525 %endif
526 Requires: python%{python3_pkgversion}
527 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
528 %description -n python%{python3_pkgversion}-rados
529 This package contains Python 3 libraries for interacting with Cephs RADOS
530 object store.
531
532 %package -n libradosstriper1
533 Summary: RADOS striping interface
534 %if 0%{?suse_version}
535 Group: System/Libraries
536 %endif
537 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
538 %description -n libradosstriper1
539 Striping interface built on top of the rados library, allowing
540 to stripe bigger objects onto several standard rados objects using
541 an interface very similar to the rados one.
542
543 %package -n libradosstriper-devel
544 Summary: RADOS striping interface headers
545 %if 0%{?suse_version}
546 Group: Development/Libraries/C and C++
547 %endif
548 Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release}
549 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
550 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
551 Provides: libradosstriper1-devel = %{_epoch_prefix}%{version}-%{release}
552 Obsoletes: libradosstriper1-devel < %{_epoch_prefix}%{version}-%{release}
553 %description -n libradosstriper-devel
554 This package contains libraries and headers needed to develop programs
555 that use RADOS striping interface.
556
557 %package -n librbd1
558 Summary: RADOS block device client library
559 %if 0%{?suse_version}
560 Group: System/Libraries
561 %endif
562 Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
563 %if 0%{?suse_version}
564 Requires(post): coreutils
565 %endif
566 %if 0%{?rhel} || 0%{?fedora}
567 Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
568 %endif
569 %description -n librbd1
570 RBD is a block device striped across multiple distributed objects in
571 RADOS, a reliable, autonomic distributed object storage cluster
572 developed as part of the Ceph distributed storage system. This is a
573 shared library allowing applications to manage these block devices.
574
575 %package -n librbd-devel
576 Summary: RADOS block device headers
577 %if 0%{?suse_version}
578 Group: Development/Libraries/C and C++
579 %endif
580 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
581 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
582 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
583 Provides: librbd1-devel = %{_epoch_prefix}%{version}-%{release}
584 Obsoletes: librbd1-devel < %{_epoch_prefix}%{version}-%{release}
585 %description -n librbd-devel
586 This package contains libraries and headers needed to develop programs
587 that use RADOS block device.
588
589 %package -n python-rbd
590 Summary: Python 2 libraries for the RADOS block device
591 %if 0%{?suse_version}
592 Group: Development/Languages/Python
593 %endif
594 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
595 Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
596 Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
597 %description -n python-rbd
598 This package contains Python 2 libraries for interacting with Cephs RADOS
599 block device.
600
601 %package -n python%{python3_pkgversion}-rbd
602 Summary: Python 3 libraries for the RADOS block device
603 %if 0%{?suse_version}
604 Group: Development/Languages/Python
605 %endif
606 Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
607 Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
608 %description -n python%{python3_pkgversion}-rbd
609 This package contains Python 3 libraries for interacting with Cephs RADOS
610 block device.
611
612 %package -n libcephfs2
613 Summary: Ceph distributed file system client library
614 %if 0%{?suse_version}
615 Group: System/Libraries
616 %endif
617 Obsoletes: libcephfs1
618 %if 0%{?rhel} || 0%{?fedora}
619 Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
620 Obsoletes: ceph-libcephfs
621 %endif
622 %description -n libcephfs2
623 Ceph is a distributed network file system designed to provide excellent
624 performance, reliability, and scalability. This is a shared library
625 allowing applications to access a Ceph distributed file system via a
626 POSIX-like interface.
627
628 %package -n libcephfs-devel
629 Summary: Ceph distributed file system headers
630 %if 0%{?suse_version}
631 Group: Development/Libraries/C and C++
632 %endif
633 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
634 Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
635 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
636 Provides: libcephfs2-devel = %{_epoch_prefix}%{version}-%{release}
637 Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release}
638 %description -n libcephfs-devel
639 This package contains libraries and headers needed to develop programs
640 that use Cephs distributed file system.
641
642 %package -n python-cephfs
643 Summary: Python 2 libraries for Ceph distributed file system
644 %if 0%{?suse_version}
645 Group: Development/Languages/Python
646 %endif
647 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
648 %if 0%{?suse_version}
649 Recommends: python-rados = %{_epoch_prefix}%{version}-%{release}
650 %endif
651 Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
652 %description -n python-cephfs
653 This package contains Python 2 libraries for interacting with Cephs distributed
654 file system.
655
656 %package -n python%{python3_pkgversion}-cephfs
657 Summary: Python 3 libraries for Ceph distributed file system
658 %if 0%{?suse_version}
659 Group: Development/Languages/Python
660 %endif
661 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
662 Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
663 %description -n python%{python3_pkgversion}-cephfs
664 This package contains Python 3 libraries for interacting with Cephs distributed
665 file system.
666
667 %package -n python%{python3_pkgversion}-ceph-argparse
668 Summary: Python 3 utility libraries for Ceph CLI
669 %if 0%{?suse_version}
670 Group: Development/Languages/Python
671 %endif
672 %description -n python%{python3_pkgversion}-ceph-argparse
673 This package contains types and routines for Python 3 used by the Ceph CLI as
674 well as the RESTful interface. These have to do with querying the daemons for
675 command-description information, validating user command input against those
676 descriptions, and submitting the command to the appropriate daemon.
677
678 %if 0%{with ceph_test_package}
679 %package -n ceph-test
680 Summary: Ceph benchmarks and test tools
681 %if 0%{?suse_version}
682 Group: System/Benchmark
683 %endif
684 Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
685 Requires: xmlstarlet
686 Requires: jq
687 Requires: socat
688 %description -n ceph-test
689 This package contains Ceph benchmarks and test tools.
690 %endif
691
692 %if 0%{with cephfs_java}
693
694 %package -n libcephfs_jni1
695 Summary: Java Native Interface library for CephFS Java bindings
696 %if 0%{?suse_version}
697 Group: System/Libraries
698 %endif
699 Requires: java
700 Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
701 %description -n libcephfs_jni1
702 This package contains the Java Native Interface library for CephFS Java
703 bindings.
704
705 %package -n libcephfs_jni-devel
706 Summary: Development files for CephFS Java Native Interface library
707 %if 0%{?suse_version}
708 Group: Development/Libraries/Java
709 %endif
710 Requires: java
711 Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
712 Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
713 Provides: libcephfs_jni1-devel = %{_epoch_prefix}%{version}-%{release}
714 Obsoletes: libcephfs_jni1-devel < %{_epoch_prefix}%{version}-%{release}
715 %description -n libcephfs_jni-devel
716 This package contains the development files for CephFS Java Native Interface
717 library.
718
719 %package -n cephfs-java
720 Summary: Java libraries for the Ceph File System
721 %if 0%{?suse_version}
722 Group: System/Libraries
723 %endif
724 Requires: java
725 Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
726 Requires: junit
727 BuildRequires: junit
728 %description -n cephfs-java
729 This package contains the Java libraries for the Ceph File System.
730
731 %endif
732
733 %package -n rados-objclass-devel
734 Summary: RADOS object class development kit
735 Group: Development/Libraries
736 Requires: librados2-devel = %{_epoch_prefix}%{version}-%{release}
737 %description -n rados-objclass-devel
738 This package contains libraries and headers needed to develop RADOS object
739 class plugins.
740
741 %if 0%{with selinux}
742
743 %package selinux
744 Summary: SELinux support for Ceph MON, OSD and MDS
745 %if 0%{?suse_version}
746 Group: System/Filesystems
747 %endif
748 Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
749 Requires: policycoreutils, libselinux-utils
750 Requires(post): ceph-base = %{_epoch_prefix}%{version}-%{release}
751 Requires(post): selinux-policy-base >= %{_selinux_policy_version}, policycoreutils, gawk
752 Requires(postun): policycoreutils
753 %description selinux
754 This package contains SELinux support for Ceph MON, OSD and MDS. The package
755 also performs file-system relabelling which can take a long time on heavily
756 populated file-systems.
757
758 %endif
759
760 %package -n python-ceph-compat
761 Summary: Compatibility package for Cephs python libraries
762 %if 0%{?suse_version}
763 Group: Development/Languages/Python
764 %endif
765 Obsoletes: python-ceph
766 Requires: python-rados = %{_epoch_prefix}%{version}-%{release}
767 Requires: python-rbd = %{_epoch_prefix}%{version}-%{release}
768 Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release}
769 Requires: python-rgw = %{_epoch_prefix}%{version}-%{release}
770 Provides: python-ceph
771 %description -n python-ceph-compat
772 This is a compatibility package to accommodate python-ceph split into
773 python-rados, python-rbd, python-rgw and python-cephfs. Packages still
774 depending on python-ceph should be fixed to depend on python-rados,
775 python-rbd, python-rgw or python-cephfs instead.
776
777 #################################################################################
778 # common
779 #################################################################################
780 %prep
781 %autosetup -p1 -n ceph-12.2.4
782
783 %build
784 %if 0%{with cephfs_java}
785 # Find jni.h
786 for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do
787 [ -d $i ] && java_inc="$java_inc -I$i"
788 done
789 %endif
790
791 %if %{with lowmem_builder}
792 RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768"
793 %endif
794 export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
795
796 export CPPFLAGS="$java_inc"
797 export CFLAGS="$RPM_OPT_FLAGS"
798 export CXXFLAGS="$RPM_OPT_FLAGS"
799
800 env | 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
813 mkdir build
814 cd build
815 cmake .. \
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 \
823 -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
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
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 \
842 -DWITH_BABELTRACE=ON \
843 %else
844 -DWITH_LTTNG=OFF \
845 -DWITH_BABELTRACE=OFF \
846 %endif
847 $CEPH_EXTRA_CMAKE_ARGS \
848 %if 0%{with ocf}
849 -DWITH_OCF=ON \
850 %endif
851 %ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64
852 -DWITH_BOOST_CONTEXT=ON \
853 %else
854 -DWITH_BOOST_CONTEXT=OFF \
855 %endif
856 -DBOOST_J=%{_smp_ncpus}
857
858 make %{?_smp_mflags}
859
860
861 %if 0%{with make_check}
862 %check
863 # run in-tree unittests
864 cd build
865 ctest %{?_smp_mflags}
866
867 %endif
868
869
870
871 %install
872 pushd build
873 make DESTDIR=%{buildroot} install
874 # we have dropped sysvinit bits
875 rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph
876 popd
877 install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
878 %if 0%{?fedora} || 0%{?rhel}
879 install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph
880 %endif
881 %if 0%{?suse_version}
882 install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
883 %endif
884 install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf
885 install -m 0755 -D systemd/ceph %{buildroot}%{_sbindir}/rcceph
886 install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset
887 mkdir -p %{buildroot}%{_sbindir}
888 install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
889 chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf
890 install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
891 install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
892
893 # firewall templates and /sbin/mount.ceph symlink
894 %if 0%{?suse_version}
895 install -m 0644 -D etc/sysconfig/SuSEfirewall2.d/services/ceph-mon %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon
896 install -m 0644 -D etc/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds
897 mkdir -p %{buildroot}/sbin
898 ln -sf %{_sbindir}/mount.ceph %{buildroot}/sbin/mount.ceph
899 %endif
900
901 # udev rules
902 install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules
903 install -m 0644 -D udev/60-ceph-by-parttypeuuid.rules %{buildroot}%{_udevrulesdir}/60-ceph-by-parttypeuuid.rules
904 install -m 0644 -D udev/95-ceph-osd.rules %{buildroot}%{_udevrulesdir}/95-ceph-osd.rules
905
906 #set up placeholder directories
907 mkdir -p %{buildroot}%{_sysconfdir}/ceph
908 mkdir -p %{buildroot}%{_localstatedir}/run/ceph
909 mkdir -p %{buildroot}%{_localstatedir}/log/ceph
910 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp
911 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon
912 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/osd
913 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mds
914 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mgr
915 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/radosgw
916 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-osd
917 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds
918 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw
919 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mgr
920 mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd
921
922 %if 0%{?suse_version}
923 # create __pycache__ directories and their contents
924 %py3_compile %{buildroot}%{python3_sitelib}
925 %endif
926
927 %clean
928 rm -rf %{buildroot}
929
930 #################################################################################
931 # files and systemd scriptlets
932 #################################################################################
933 %files
934
935 %files base
936 %{_bindir}/crushtool
937 %{_bindir}/monmaptool
938 %{_bindir}/osdmaptool
939 %{_bindir}/ceph-kvstore-tool
940 %{_bindir}/ceph-run
941 %{_bindir}/ceph-detect-init
942 %{_libexecdir}/systemd/system-preset/50-ceph.preset
943 %{_sbindir}/ceph-create-keys
944 %{_sbindir}/ceph-disk
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
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
972 %{_unitdir}/ceph-disk@.service
973 %{_unitdir}/ceph.target
974 %{python_sitelib}/ceph_detect_init*
975 %{python_sitelib}/ceph_disk*
976 %dir %{python_sitelib}/ceph_volume
977 %{python_sitelib}/ceph_volume/*
978 %{python_sitelib}/ceph_volume-*
979 %{_mandir}/man8/ceph-deploy.8*
980 %{_mandir}/man8/ceph-detect-init.8*
981 %{_mandir}/man8/ceph-create-keys.8*
982 %{_mandir}/man8/ceph-disk.8*
983 %{_mandir}/man8/ceph-run.8*
984 %{_mandir}/man8/crushtool.8*
985 %{_mandir}/man8/osdmaptool.8*
986 %{_mandir}/man8/monmaptool.8*
987 %{_mandir}/man8/ceph-kvstore-tool.8*
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
994 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd
995
996 %post base
997 /sbin/ldconfig
998 %if 0%{?suse_version}
999 %fillup_only
1000 if [ $1 -eq 1 ] ; then
1001 /usr/bin/systemctl preset ceph-disk@\*.service ceph.target >/dev/null 2>&1 || :
1002 fi
1003 %endif
1004 %if 0%{?fedora} || 0%{?rhel}
1005 %systemd_post ceph-disk@\*.service ceph.target
1006 %endif
1007 if [ $1 -eq 1 ] ; then
1008 /usr/bin/systemctl start ceph.target >/dev/null 2>&1 || :
1009 fi
1010
1011 %preun base
1012 %if 0%{?suse_version}
1013 %service_del_preun ceph-disk@\*.service ceph.target
1014 %endif
1015 %if 0%{?fedora} || 0%{?rhel}
1016 %systemd_preun ceph-disk@\*.service ceph.target
1017 %endif
1018
1019 %postun base
1020 /sbin/ldconfig
1021 test -n "$FIRST_ARG" || FIRST_ARG=$1
1022 %if 0%{?suse_version}
1023 DISABLE_RESTART_ON_UPDATE="yes"
1024 %service_del_postun ceph-disk@\*.service ceph.target
1025 %endif
1026 %if 0%{?fedora} || 0%{?rhel}
1027 %systemd_postun ceph-disk@\*.service ceph.target
1028 %endif
1029 if [ $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
1037 /usr/bin/systemctl try-restart ceph-disk@\*.service > /dev/null 2>&1 || :
1038 fi
1039 fi
1040
1041 %files common
1042 %dir %{_docdir}/ceph
1043 %doc %{_docdir}/ceph/sample.ceph.conf
1044 %doc %{_docdir}/ceph/COPYING
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/
1091 %config %{_sysconfdir}/bash_completion.d/ceph
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
1105 CEPH_GROUP_ID=167
1106 CEPH_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}
1112 if ! 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 || :
1116 fi
1117 if ! 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 || :
1121 fi
1122 usermod -c "Ceph storage service" \
1123 -d %{_localstatedir}/lib/ceph \
1124 -g ceph \
1125 -s /sbin/nologin \
1126 ceph
1127 %endif
1128 exit 0
1129
1130 %post common
1131 %tmpfiles_create %{_tmpfilesdir}/ceph-common.conf
1132
1133 %postun common
1134 # Package removal cleanup
1135 if [ "$1" -eq "0" ] ; then
1136 rm -rf %{_localstatedir}/log/ceph
1137 rm -rf %{_sysconfdir}/ceph
1138 fi
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}
1149 if [ $1 -eq 1 ] ; then
1150 /usr/bin/systemctl preset ceph-mds@\*.service ceph-mds.target >/dev/null 2>&1 || :
1151 fi
1152 %endif
1153 %if 0%{?fedora} || 0%{?rhel}
1154 %systemd_post ceph-mds@\*.service ceph-mds.target
1155 %endif
1156 if [ $1 -eq 1 ] ; then
1157 /usr/bin/systemctl start ceph-mds.target >/dev/null 2>&1 || :
1158 fi
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
1169 test -n "$FIRST_ARG" || FIRST_ARG=$1
1170 %if 0%{?suse_version}
1171 DISABLE_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
1177 if [ $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
1187 fi
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}
1198 if [ $1 -eq 1 ] ; then
1199 /usr/bin/systemctl preset ceph-mgr@\*.service ceph-mgr.target >/dev/null 2>&1 || :
1200 fi
1201 %endif
1202 %if 0%{?fedora} || 0%{?rhel}
1203 %systemd_post ceph-mgr@\*.service ceph-mgr.target
1204 %endif
1205 if [ $1 -eq 1 ] ; then
1206 /usr/bin/systemctl start ceph-mgr.target >/dev/null 2>&1 || :
1207 fi
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
1218 test -n "$FIRST_ARG" || FIRST_ARG=$1
1219 %if 0%{?suse_version}
1220 DISABLE_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
1226 if [ $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
1236 fi
1237
1238 %files mon
1239 %{_bindir}/ceph-mon
1240 %{_bindir}/ceph-rest-api
1241 %{_bindir}/ceph-monstore-tool
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}
1251 if [ $1 -eq 1 ] ; then
1252 /usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || :
1253 fi
1254 %endif
1255 %if 0%{?fedora} || 0%{?rhel}
1256 %systemd_post ceph-mon@\*.service ceph-mon.target
1257 %endif
1258 if [ $1 -eq 1 ] ; then
1259 /usr/bin/systemctl start ceph-mon.target >/dev/null 2>&1 || :
1260 fi
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
1271 test -n "$FIRST_ARG" || FIRST_ARG=$1
1272 %if 0%{?suse_version}
1273 DISABLE_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
1279 if [ $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
1289 fi
1290
1291 %files fuse
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
1299 %{_bindir}/rbd-fuse
1300 %{_mandir}/man8/rbd-fuse.8*
1301
1302 %files -n rbd-mirror
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}
1310 if [ $1 -eq 1 ] ; then
1311 /usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || :
1312 fi
1313 %endif
1314 %if 0%{?fedora} || 0%{?rhel}
1315 %systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
1316 %endif
1317 if [ $1 -eq 1 ] ; then
1318 /usr/bin/systemctl start ceph-rbd-mirror.target >/dev/null 2>&1 || :
1319 fi
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
1330 test -n "$FIRST_ARG" || FIRST_ARG=$1
1331 %if 0%{?suse_version}
1332 DISABLE_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
1338 if [ $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
1348 fi
1349
1350 %files -n rbd-nbd
1351 %{_bindir}/rbd-nbd
1352 %{_mandir}/man8/rbd-nbd.8*
1353
1354 %files radosgw
1355 %{_bindir}/radosgw
1356 %{_bindir}/radosgw-token
1357 %{_bindir}/radosgw-es
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}
1366 if [ $1 -eq 1 ] ; then
1367 /usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || :
1368 fi
1369 %endif
1370 %if 0%{?fedora} || 0%{?rhel}
1371 %systemd_post ceph-radosgw@\*.service ceph-radosgw.target
1372 %endif
1373 if [ $1 -eq 1 ] ; then
1374 /usr/bin/systemctl start ceph-radosgw.target >/dev/null 2>&1 || :
1375 fi
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
1386 test -n "$FIRST_ARG" || FIRST_ARG=$1
1387 %if 0%{?suse_version}
1388 DISABLE_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
1394 if [ $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
1404 fi
1405
1406 %files osd
1407 %{_bindir}/ceph-clsinfo
1408 %{_bindir}/ceph-bluestore-tool
1409 %{_bindir}/ceph-objectstore-tool
1410 %{_bindir}/ceph-osdomap-tool
1411 %{_bindir}/ceph-osd
1412 %{_libexecdir}/ceph/ceph-osd-prestart.sh
1413 %{_sbindir}/ceph-volume
1414 %{_sbindir}/ceph-volume-systemd
1415 %dir %{_udevrulesdir}
1416 %{_udevrulesdir}/60-ceph-by-parttypeuuid.rules
1417 %{_udevrulesdir}/95-ceph-osd.rules
1418 %{_mandir}/man8/ceph-clsinfo.8*
1419 %{_mandir}/man8/ceph-osd.8*
1420 %{_mandir}/man8/ceph-bluestore-tool.8*
1421 %{_mandir}/man8/ceph-volume.8*
1422 %{_mandir}/man8/ceph-volume-systemd.8*
1423 %if 0%{?rhel} && ! 0%{?centos}
1424 %attr(0755,-,-) %{_sysconfdir}/cron.hourly/subman
1425 %endif
1426 %{_unitdir}/ceph-osd@.service
1427 %{_unitdir}/ceph-osd.target
1428 %{_unitdir}/ceph-volume@.service
1429 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
1430 %config(noreplace) %{_sysctldir}/90-ceph-osd.conf
1431
1432 %post osd
1433 %if 0%{?suse_version}
1434 if [ $1 -eq 1 ] ; then
1435 /usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || :
1436 fi
1437 %endif
1438 %if 0%{?fedora} || 0%{?rhel}
1439 %systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
1440 %endif
1441 if [ $1 -eq 1 ] ; then
1442 /usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || :
1443 fi
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
1449
1450 %preun osd
1451 %if 0%{?suse_version}
1452 %service_del_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
1453 %endif
1454 %if 0%{?fedora} || 0%{?rhel}
1455 %systemd_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
1456 %endif
1457
1458 %postun osd
1459 test -n "$FIRST_ARG" || FIRST_ARG=$1
1460 %if 0%{?suse_version}
1461 DISABLE_RESTART_ON_UPDATE="yes"
1462 %service_del_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
1463 %endif
1464 %if 0%{?fedora} || 0%{?rhel}
1465 %systemd_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
1466 %endif
1467 if [ $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
1475 /usr/bin/systemctl try-restart ceph-osd@\*.service ceph-volume@\*.service > /dev/null 2>&1 || :
1476 fi
1477 fi
1478
1479 %if %{with ocf}
1480
1481 %files resource-agents
1482 %dir %{_prefix}/lib/ocf
1483 %dir %{_prefix}/lib/ocf/resource.d
1484 %dir %{_prefix}/lib/ocf/resource.d/ceph
1485 %attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/ceph/rbd
1486
1487 %endif
1488
1489 %files -n librados2
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
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
1521 %{python_sitearch}/rados.so
1522 %{python_sitearch}/rados-*.egg-info
1523
1524 %files -n python%{python3_pkgversion}-rados
1525 %{python3_sitearch}/rados.cpython*.so
1526 %{python3_sitearch}/rados-*.egg-info
1527
1528 %files -n libradosstriper1
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
1536 %dir %{_includedir}/radosstriper
1537 %{_includedir}/radosstriper/libradosstriper.h
1538 %{_includedir}/radosstriper/libradosstriper.hpp
1539 %{_libdir}/libradosstriper.so
1540
1541 %files -n librbd1
1542 %{_libdir}/librbd.so.*
1543 %if %{with lttng}
1544 %{_libdir}/librbd_tp.so.*
1545 %endif
1546
1547 %post -n librbd1 -p /sbin/ldconfig
1548
1549 %postun -n librbd1 -p /sbin/ldconfig
1550
1551 %files -n librbd-devel
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
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
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
1575 %{python_sitearch}/rgw.so
1576 %{python_sitearch}/rgw-*.egg-info
1577
1578 %files -n python%{python3_pkgversion}-rgw
1579 %{python3_sitearch}/rgw.cpython*.so
1580 %{python3_sitearch}/rgw-*.egg-info
1581
1582 %files -n python-rbd
1583 %{python_sitearch}/rbd.so
1584 %{python_sitearch}/rbd-*.egg-info
1585
1586 %files -n python%{python3_pkgversion}-rbd
1587 %{python3_sitearch}/rbd.cpython*.so
1588 %{python3_sitearch}/rbd-*.egg-info
1589
1590 %files -n libcephfs2
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
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
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
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
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
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
1648 %{_bindir}/ceph-debugpack
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
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
1663 %{_libdir}/libcephfs_jni.so
1664
1665 %files -n cephfs-java
1666 %{_javadir}/libcephfs.jar
1667 %{_javadir}/libcephfs-test.jar
1668 %endif
1669
1670 %files -n rados-objclass-devel
1671 %dir %{_includedir}/rados
1672 %{_includedir}/rados/objclass.h
1673
1674 %if 0%{with selinux}
1675 %files selinux
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
1683 FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
1684 cp ${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
1690 if ! /usr/sbin/selinuxenabled; then
1691 # Do not relabel if selinux is not enabled
1692 exit 0
1693 fi
1694
1695 if diff ${FILE_CONTEXT} ${FILE_CONTEXT}.pre > /dev/null 2>&1; then
1696 # Do not relabel if file contexts did not change
1697 exit 0
1698 fi
1699
1700 # Check whether the daemons are running
1701 /usr/bin/systemctl status ceph.target > /dev/null 2>&1
1702 STATUS=$?
1703
1704 # Stop the daemons if they were running
1705 if test $STATUS -eq 0; then
1706 /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
1707 fi
1708
1709 # Relabel the files
1710 # Use ceph-disk fix for first package install and fixfiles otherwise
1711 if [ "$1" = "1" ]; then
1712 /usr/sbin/ceph-disk fix --selinux
1713 else
1714 /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
1715 fi
1716
1717 rm -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
1722 if test $STATUS -eq 0; then
1723 /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
1724 fi
1725 exit 0
1726
1727 %postun selinux
1728 if [ $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
1761 fi
1762 exit 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