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