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