]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | # vim: set noexpandtab ts=8 sw=8 : |
2 | # | |
3 | # spec file for package ceph | |
4 | # | |
5 | # Copyright (C) 2004-2017 The Ceph Project Developers. See COPYING file | |
6 | # at the top-level directory of this distribution and at | |
7 | # https://github.com/ceph/ceph/blob/master/COPYING | |
8 | # | |
9 | # All modifications and additions to the file contributed by third parties | |
10 | # remain the property of their copyright owners, unless otherwise agreed | |
11 | # upon. | |
12 | # | |
13 | # This file is under the GNU Lesser General Public License, version 2.1 | |
14 | # | |
15 | # Please submit bugfixes or comments via http://tracker.ceph.com/ | |
d2e6a577 | 16 | # |
7c673cae FG |
17 | %bcond_without ocf |
18 | %bcond_without cephfs_java | |
19 | %if 0%{?suse_version} | |
20 | %bcond_with ceph_test_package | |
21 | %else | |
22 | %bcond_without ceph_test_package | |
23 | %endif | |
24 | %bcond_with make_check | |
31f18b77 | 25 | %ifarch s390 s390x |
7c673cae | 26 | %bcond_with tcmalloc |
31f18b77 FG |
27 | %else |
28 | %bcond_without tcmalloc | |
7c673cae FG |
29 | %endif |
30 | %bcond_with lowmem_builder | |
31 | %if 0%{?fedora} || 0%{?rhel} | |
32 | %bcond_without selinux | |
33 | %endif | |
34 | %if 0%{?suse_version} | |
35 | %bcond_with selinux | |
36 | %endif | |
37 | ||
38 | # LTTng-UST enabled on Fedora, RHEL 6+, and SLE (not openSUSE) | |
39 | %if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version} | |
40 | %if ! 0%{?is_opensuse} | |
41 | %bcond_without lttng | |
42 | %endif | |
43 | %endif | |
44 | ||
45 | %if %{with selinux} | |
46 | # get selinux policy version | |
47 | %{!?_selinux_policy_version: %global _selinux_policy_version %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null || echo 0.0.0)} | |
48 | %endif | |
49 | ||
50 | %{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d} | |
51 | %{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create} | |
52 | %{!?python3_pkgversion: %global python3_pkgversion 3} | |
53 | ||
54 | # unify libexec for all targets | |
55 | %global _libexecdir %{_exec_prefix}/lib | |
56 | ||
57 | # disable dwz which compresses the debuginfo | |
58 | %global _find_debuginfo_dwz_opts %{nil} | |
31f18b77 | 59 | |
7c673cae FG |
60 | ################################################################################# |
61 | # main package definition | |
62 | ################################################################################# | |
63 | Name: ceph | |
94b18763 | 64 | Version: 12.2.5 |
7c673cae | 65 | Release: 0%{?dist} |
31f18b77 | 66 | %if 0%{?fedora} || 0%{?rhel} |
224ce89b | 67 | Epoch: 2 |
31f18b77 FG |
68 | %endif |
69 | ||
3efd9988 FG |
70 | # define _epoch_prefix macro which will expand to the empty string if epoch is |
71 | # undefined | |
31f18b77 FG |
72 | %global _epoch_prefix %{?epoch:%{epoch}:} |
73 | ||
7c673cae | 74 | Summary: User space components of the Ceph file system |
94b18763 | 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 |
7c673cae FG |
76 | %if 0%{?suse_version} |
77 | Group: System/Filesystems | |
78 | %endif | |
79 | URL: http://ceph.com/ | |
94b18763 | 80 | Source0: http://ceph.com/download/ceph-12.2.5.tar.bz2 |
7c673cae FG |
81 | %if 0%{?suse_version} |
82 | %if 0%{?is_opensuse} | |
83 | ExclusiveArch: x86_64 aarch64 ppc64 ppc64le | |
84 | %else | |
31f18b77 | 85 | ExclusiveArch: x86_64 aarch64 ppc64le s390x |
7c673cae FG |
86 | %endif |
87 | %endif | |
88 | ################################################################################# | |
89 | # dependencies that apply across all distro families | |
90 | ################################################################################# | |
31f18b77 FG |
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} | |
7c673cae FG |
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 | |
c07f9fc5 FG |
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 | |
3efd9988 | 113 | BuildRequires: python-numpy-devel |
c07f9fc5 | 114 | %endif |
94b18763 | 115 | BuildRequires: python-coverage |
c07f9fc5 FG |
116 | BuildRequires: python-pecan |
117 | BuildRequires: socat | |
118 | %endif | |
7c673cae | 119 | BuildRequires: bc |
31f18b77 | 120 | BuildRequires: gperf |
7c673cae FG |
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 | |
7c673cae FG |
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 | |
7c673cae FG |
144 | BuildRequires: python-requests |
145 | BuildRequires: python-virtualenv | |
146 | BuildRequires: snappy-devel | |
147 | BuildRequires: udev | |
148 | BuildRequires: util-linux | |
149 | BuildRequires: valgrind-devel | |
31f18b77 | 150 | BuildRequires: which |
7c673cae FG |
151 | BuildRequires: xfsprogs |
152 | BuildRequires: xfsprogs-devel | |
153 | BuildRequires: xmlstarlet | |
154 | BuildRequires: yasm | |
7c673cae FG |
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 | |
31f18b77 | 174 | BuildRequires: python-PrettyTable |
7c673cae | 175 | BuildRequires: python-Sphinx |
31f18b77 | 176 | BuildRequires: rdma-core-devel |
7c673cae | 177 | %endif |
d2e6a577 | 178 | %if 0%{?fedora} || 0%{?rhel} |
7c673cae FG |
179 | Requires: systemd |
180 | BuildRequires: boost-random | |
181 | BuildRequires: btrfs-progs | |
182 | BuildRequires: nss-devel | |
183 | BuildRequires: keyutils-libs-devel | |
31f18b77 | 184 | BuildRequires: libibverbs-devel |
7c673cae FG |
185 | BuildRequires: openldap-devel |
186 | BuildRequires: openssl-devel | |
187 | BuildRequires: redhat-lsb-core | |
188 | BuildRequires: Cython | |
31f18b77 | 189 | BuildRequires: python-prettytable |
7c673cae FG |
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 | |
7c673cae FG |
213 | %if 0%{?suse_version} |
214 | BuildRequires: libexpat-devel | |
7c673cae FG |
215 | %endif |
216 | %if 0%{?rhel} || 0%{?fedora} | |
217 | BuildRequires: expat-devel | |
7c673cae FG |
218 | %endif |
219 | #hardened-cc1 | |
220 | %if 0%{?fedora} || 0%{?rhel} | |
221 | BuildRequires: redhat-rpm-config | |
222 | %endif | |
7c673cae FG |
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 | |
31f18b77 FG |
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} | |
7c673cae | 242 | %if 0%{with selinux} |
31f18b77 | 243 | Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
7c673cae FG |
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 | |
31f18b77 FG |
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} | |
7c673cae | 275 | Requires: python-prettytable |
31f18b77 FG |
276 | %endif |
277 | %if 0%{?suse_version} | |
278 | Requires: python-PrettyTable | |
279 | %endif | |
7c673cae FG |
280 | Requires: python-requests |
281 | %{?systemd_requires} | |
282 | %if 0%{?suse_version} | |
283 | Requires(pre): pwdutils | |
284 | %endif | |
7c673cae FG |
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 | |
31f18b77 | 294 | Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
31f18b77 | 305 | Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
7c673cae FG |
321 | %if 0%{?suse_version} |
322 | Group: System/Filesystems | |
323 | %endif | |
31f18b77 FG |
324 | Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} |
325 | %if 0%{?fedora} || 0%{?rhel} | |
326 | Requires: python-cherrypy | |
b32b8144 | 327 | Requires: python-jinja2 |
31f18b77 FG |
328 | Requires: python-werkzeug |
329 | Requires: pyOpenSSL | |
330 | %endif | |
331 | %if 0%{?suse_version} | |
332 | Requires: python-CherryPy | |
b32b8144 | 333 | Requires: python-Jinja2 |
31f18b77 FG |
334 | Requires: python-Werkzeug |
335 | Requires: python-pyOpenSSL | |
336 | %endif | |
337 | Requires: python-pecan | |
7c673cae FG |
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 | |
181888fb | 349 | Requires: fuse |
7c673cae FG |
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 | |
31f18b77 FG |
358 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
359 | Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
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 | |
31f18b77 FG |
368 | Requires: ceph-common = %{_epoch_prefix}%{version}-%{release} |
369 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
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 | |
31f18b77 FG |
379 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
380 | Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
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 | |
31f18b77 | 389 | Requires: ceph-common = %{_epoch_prefix}%{version}-%{release} |
7c673cae | 390 | %if 0%{with selinux} |
31f18b77 | 391 | Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release} |
7c673cae | 392 | %endif |
31f18b77 FG |
393 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
394 | Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
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 | |
31f18b77 | 410 | Requires: ceph-base = %{_epoch_prefix}%{version} |
7c673cae FG |
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 | |
31f18b77 | 423 | Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
b32b8144 FG |
431 | Requires: parted |
432 | Requires: lvm2 | |
7c673cae FG |
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 | |
7c673cae | 443 | %if 0%{?rhel} || 0%{?fedora} |
31f18b77 | 444 | Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
31f18b77 FG |
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} | |
7c673cae FG |
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 | |
31f18b77 | 470 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
31f18b77 FG |
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} | |
7c673cae FG |
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 | |
31f18b77 FG |
493 | Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} |
494 | Requires: python-rados = %{_epoch_prefix}%{version}-%{release} | |
495 | Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
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 | |
31f18b77 FG |
505 | Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} |
506 | Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
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 | |
31f18b77 FG |
516 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
517 | Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
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 | |
7c673cae | 527 | Requires: python%{python3_pkgversion} |
31f18b77 | 528 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
31f18b77 | 538 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
31f18b77 FG |
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} | |
7c673cae FG |
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 | |
31f18b77 FG |
563 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
564 | %if 0%{?suse_version} | |
565 | Requires(post): coreutils | |
566 | %endif | |
7c673cae | 567 | %if 0%{?rhel} || 0%{?fedora} |
31f18b77 | 568 | Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
31f18b77 FG |
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} | |
7c673cae FG |
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 | |
31f18b77 FG |
595 | Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} |
596 | Requires: python-rados = %{_epoch_prefix}%{version}-%{release} | |
597 | Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
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 | |
31f18b77 FG |
607 | Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} |
608 | Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
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 | |
224ce89b | 618 | Obsoletes: libcephfs1 |
7c673cae | 619 | %if 0%{?rhel} || 0%{?fedora} |
31f18b77 | 620 | Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
31f18b77 FG |
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} | |
7c673cae FG |
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 | |
31f18b77 | 648 | Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} |
7c673cae | 649 | %if 0%{?suse_version} |
31f18b77 | 650 | Recommends: python-rados = %{_epoch_prefix}%{version}-%{release} |
7c673cae | 651 | %endif |
31f18b77 | 652 | Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
31f18b77 FG |
662 | Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} |
663 | Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
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 | |
7c673cae FG |
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 | |
b32b8144 | 685 | Requires: ceph-common = %{_epoch_prefix}%{version}-%{release} |
7c673cae | 686 | Requires: xmlstarlet |
31f18b77 | 687 | Requires: jq |
c07f9fc5 | 688 | Requires: socat |
7c673cae FG |
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 | |
7c673cae | 700 | Requires: java |
31f18b77 | 701 | Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
7c673cae | 711 | Requires: java |
31f18b77 FG |
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} | |
7c673cae FG |
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 | |
7c673cae | 725 | Requires: java |
31f18b77 | 726 | Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
31f18b77 | 737 | Requires: librados2-devel = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
31f18b77 | 749 | Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} |
7c673cae | 750 | Requires: policycoreutils, libselinux-utils |
31f18b77 | 751 | Requires(post): ceph-base = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
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 | |
7c673cae | 766 | Obsoletes: python-ceph |
31f18b77 FG |
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} | |
7c673cae FG |
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 | |
94b18763 | 782 | %autosetup -p1 -n ceph-12.2.5 |
7c673cae FG |
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 \ | |
c07f9fc5 | 824 | -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \ |
7c673cae FG |
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 | |
7c673cae FG |
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 \ | |
c07f9fc5 | 843 | -DWITH_BABELTRACE=ON \ |
7c673cae FG |
844 | %else |
845 | -DWITH_LTTNG=OFF \ | |
c07f9fc5 | 846 | -DWITH_BABELTRACE=OFF \ |
7c673cae FG |
847 | %endif |
848 | $CEPH_EXTRA_CMAKE_ARGS \ | |
849 | %if 0%{with ocf} | |
850 | -DWITH_OCF=ON \ | |
31f18b77 FG |
851 | %endif |
852 | %ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64 | |
b32b8144 | 853 | -DWITH_BOOST_CONTEXT=ON \ |
31f18b77 | 854 | %else |
b32b8144 | 855 | -DWITH_BOOST_CONTEXT=OFF \ |
7c673cae FG |
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 | |
31f18b77 | 891 | install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING |
b32b8144 | 892 | install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf |
7c673cae FG |
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 | |
d2e6a577 | 921 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd |
7c673cae FG |
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 | |
7c673cae FG |
937 | %{_bindir}/crushtool |
938 | %{_bindir}/monmaptool | |
939 | %{_bindir}/osdmaptool | |
b32b8144 | 940 | %{_bindir}/ceph-kvstore-tool |
7c673cae FG |
941 | %{_bindir}/ceph-run |
942 | %{_bindir}/ceph-detect-init | |
943 | %{_libexecdir}/systemd/system-preset/50-ceph.preset | |
944 | %{_sbindir}/ceph-create-keys | |
31f18b77 | 945 | %{_sbindir}/ceph-disk |
7c673cae FG |
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 | |
7c673cae FG |
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 | |
31f18b77 | 973 | %{_unitdir}/ceph-disk@.service |
7c673cae FG |
974 | %{_unitdir}/ceph.target |
975 | %{python_sitelib}/ceph_detect_init* | |
976 | %{python_sitelib}/ceph_disk* | |
d2e6a577 FG |
977 | %dir %{python_sitelib}/ceph_volume |
978 | %{python_sitelib}/ceph_volume/* | |
979 | %{python_sitelib}/ceph_volume-* | |
7c673cae FG |
980 | %{_mandir}/man8/ceph-deploy.8* |
981 | %{_mandir}/man8/ceph-detect-init.8* | |
982 | %{_mandir}/man8/ceph-create-keys.8* | |
31f18b77 | 983 | %{_mandir}/man8/ceph-disk.8* |
7c673cae FG |
984 | %{_mandir}/man8/ceph-run.8* |
985 | %{_mandir}/man8/crushtool.8* | |
986 | %{_mandir}/man8/osdmaptool.8* | |
987 | %{_mandir}/man8/monmaptool.8* | |
b32b8144 | 988 | %{_mandir}/man8/ceph-kvstore-tool.8* |
7c673cae FG |
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 | |
d2e6a577 | 995 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd |
7c673cae FG |
996 | |
997 | %post base | |
998 | /sbin/ldconfig | |
999 | %if 0%{?suse_version} | |
1000 | %fillup_only | |
1001 | if [ $1 -eq 1 ] ; then | |
b32b8144 | 1002 | /usr/bin/systemctl preset ceph-disk@\*.service ceph.target >/dev/null 2>&1 || : |
7c673cae FG |
1003 | fi |
1004 | %endif | |
1005 | %if 0%{?fedora} || 0%{?rhel} | |
31f18b77 | 1006 | %systemd_post ceph-disk@\*.service ceph.target |
7c673cae FG |
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} | |
31f18b77 | 1014 | %service_del_preun ceph-disk@\*.service ceph.target |
7c673cae FG |
1015 | %endif |
1016 | %if 0%{?fedora} || 0%{?rhel} | |
31f18b77 | 1017 | %systemd_preun ceph-disk@\*.service ceph.target |
7c673cae FG |
1018 | %endif |
1019 | ||
1020 | %postun base | |
1021 | /sbin/ldconfig | |
224ce89b | 1022 | test -n "$FIRST_ARG" || FIRST_ARG=$1 |
7c673cae FG |
1023 | %if 0%{?suse_version} |
1024 | DISABLE_RESTART_ON_UPDATE="yes" | |
31f18b77 | 1025 | %service_del_postun ceph-disk@\*.service ceph.target |
7c673cae FG |
1026 | %endif |
1027 | %if 0%{?fedora} || 0%{?rhel} | |
31f18b77 | 1028 | %systemd_postun ceph-disk@\*.service ceph.target |
7c673cae | 1029 | %endif |
31f18b77 FG |
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 | |
b32b8144 | 1038 | /usr/bin/systemctl try-restart ceph-disk@\*.service > /dev/null 2>&1 || : |
31f18b77 FG |
1039 | fi |
1040 | fi | |
7c673cae FG |
1041 | |
1042 | %files common | |
224ce89b | 1043 | %dir %{_docdir}/ceph |
31f18b77 FG |
1044 | %doc %{_docdir}/ceph/sample.ceph.conf |
1045 | %doc %{_docdir}/ceph/COPYING | |
7c673cae FG |
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/ | |
31f18b77 | 1092 | %config %{_sysconfdir}/bash_completion.d/ceph |
7c673cae FG |
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 | |
b32b8144 | 1242 | %{_bindir}/ceph-monstore-tool |
7c673cae FG |
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 | |
7c673cae FG |
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 | |
7c673cae FG |
1300 | %{_bindir}/rbd-fuse |
1301 | %{_mandir}/man8/rbd-fuse.8* | |
1302 | ||
1303 | %files -n rbd-mirror | |
7c673cae FG |
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 | |
7c673cae FG |
1352 | %{_bindir}/rbd-nbd |
1353 | %{_mandir}/man8/rbd-nbd.8* | |
1354 | ||
1355 | %files radosgw | |
7c673cae FG |
1356 | %{_bindir}/radosgw |
1357 | %{_bindir}/radosgw-token | |
31f18b77 | 1358 | %{_bindir}/radosgw-es |
7c673cae FG |
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 | |
b32b8144 | 1411 | %{_bindir}/ceph-osdomap-tool |
7c673cae | 1412 | %{_bindir}/ceph-osd |
7c673cae | 1413 | %{_libexecdir}/ceph/ceph-osd-prestart.sh |
b32b8144 FG |
1414 | %{_sbindir}/ceph-volume |
1415 | %{_sbindir}/ceph-volume-systemd | |
7c673cae FG |
1416 | %dir %{_udevrulesdir} |
1417 | %{_udevrulesdir}/60-ceph-by-parttypeuuid.rules | |
1418 | %{_udevrulesdir}/95-ceph-osd.rules | |
1419 | %{_mandir}/man8/ceph-clsinfo.8* | |
7c673cae | 1420 | %{_mandir}/man8/ceph-osd.8* |
3efd9988 | 1421 | %{_mandir}/man8/ceph-bluestore-tool.8* |
b32b8144 FG |
1422 | %{_mandir}/man8/ceph-volume.8* |
1423 | %{_mandir}/man8/ceph-volume-systemd.8* | |
7c673cae | 1424 | %if 0%{?rhel} && ! 0%{?centos} |
31f18b77 | 1425 | %attr(0755,-,-) %{_sysconfdir}/cron.hourly/subman |
7c673cae FG |
1426 | %endif |
1427 | %{_unitdir}/ceph-osd@.service | |
1428 | %{_unitdir}/ceph-osd.target | |
b32b8144 | 1429 | %{_unitdir}/ceph-volume@.service |
7c673cae | 1430 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd |
3efd9988 | 1431 | %config(noreplace) %{_sysctldir}/90-ceph-osd.conf |
7c673cae FG |
1432 | |
1433 | %post osd | |
1434 | %if 0%{?suse_version} | |
1435 | if [ $1 -eq 1 ] ; then | |
b32b8144 | 1436 | /usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || : |
7c673cae FG |
1437 | fi |
1438 | %endif | |
1439 | %if 0%{?fedora} || 0%{?rhel} | |
b32b8144 | 1440 | %systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target |
7c673cae FG |
1441 | %endif |
1442 | if [ $1 -eq 1 ] ; then | |
1443 | /usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || : | |
1444 | fi | |
3efd9988 FG |
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 | |
7c673cae FG |
1450 | |
1451 | %preun osd | |
1452 | %if 0%{?suse_version} | |
b32b8144 | 1453 | %service_del_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target |
7c673cae FG |
1454 | %endif |
1455 | %if 0%{?fedora} || 0%{?rhel} | |
b32b8144 | 1456 | %systemd_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target |
7c673cae FG |
1457 | %endif |
1458 | ||
1459 | %postun osd | |
1460 | test -n "$FIRST_ARG" || FIRST_ARG=$1 | |
1461 | %if 0%{?suse_version} | |
1462 | DISABLE_RESTART_ON_UPDATE="yes" | |
b32b8144 | 1463 | %service_del_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target |
7c673cae FG |
1464 | %endif |
1465 | %if 0%{?fedora} || 0%{?rhel} | |
b32b8144 | 1466 | %systemd_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target |
7c673cae FG |
1467 | %endif |
1468 | if [ $FIRST_ARG -ge 1 ] ; then | |
1469 | # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to | |
1470 | # "yes". In any case: if units are not running, do not touch them. | |
1471 | SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph | |
1472 | if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then | |
1473 | source $SYSCONF_CEPH | |
1474 | fi | |
1475 | if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then | |
b32b8144 | 1476 | /usr/bin/systemctl try-restart ceph-osd@\*.service ceph-volume@\*.service > /dev/null 2>&1 || : |
7c673cae FG |
1477 | fi |
1478 | fi | |
1479 | ||
1480 | %if %{with ocf} | |
1481 | ||
1482 | %files resource-agents | |
7c673cae FG |
1483 | %dir %{_prefix}/lib/ocf |
1484 | %dir %{_prefix}/lib/ocf/resource.d | |
1485 | %dir %{_prefix}/lib/ocf/resource.d/ceph | |
b32b8144 | 1486 | %attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/ceph/rbd |
7c673cae FG |
1487 | |
1488 | %endif | |
1489 | ||
1490 | %files -n librados2 | |
7c673cae FG |
1491 | %{_libdir}/librados.so.* |
1492 | %dir %{_libdir}/ceph | |
1493 | %{_libdir}/ceph/libceph-common.so* | |
1494 | %if %{with lttng} | |
1495 | %{_libdir}/librados_tp.so.* | |
1496 | %endif | |
1497 | ||
1498 | %post -n librados2 -p /sbin/ldconfig | |
1499 | ||
1500 | %postun -n librados2 -p /sbin/ldconfig | |
1501 | ||
1502 | %files -n librados-devel | |
7c673cae FG |
1503 | %dir %{_includedir}/rados |
1504 | %{_includedir}/rados/librados.h | |
1505 | %{_includedir}/rados/librados.hpp | |
1506 | %{_includedir}/rados/buffer.h | |
1507 | %{_includedir}/rados/buffer_fwd.h | |
1508 | %{_includedir}/rados/inline_memory.h | |
1509 | %{_includedir}/rados/page.h | |
1510 | %{_includedir}/rados/crc32c.h | |
1511 | %{_includedir}/rados/rados_types.h | |
1512 | %{_includedir}/rados/rados_types.hpp | |
1513 | %{_includedir}/rados/memory.h | |
1514 | %{_libdir}/librados.so | |
1515 | %if %{with lttng} | |
1516 | %{_libdir}/librados_tp.so | |
1517 | %endif | |
1518 | %{_bindir}/librados-config | |
1519 | %{_mandir}/man8/librados-config.8* | |
1520 | ||
1521 | %files -n python-rados | |
7c673cae FG |
1522 | %{python_sitearch}/rados.so |
1523 | %{python_sitearch}/rados-*.egg-info | |
1524 | ||
1525 | %files -n python%{python3_pkgversion}-rados | |
7c673cae FG |
1526 | %{python3_sitearch}/rados.cpython*.so |
1527 | %{python3_sitearch}/rados-*.egg-info | |
1528 | ||
1529 | %files -n libradosstriper1 | |
7c673cae FG |
1530 | %{_libdir}/libradosstriper.so.* |
1531 | ||
1532 | %post -n libradosstriper1 -p /sbin/ldconfig | |
1533 | ||
1534 | %postun -n libradosstriper1 -p /sbin/ldconfig | |
1535 | ||
1536 | %files -n libradosstriper-devel | |
7c673cae FG |
1537 | %dir %{_includedir}/radosstriper |
1538 | %{_includedir}/radosstriper/libradosstriper.h | |
1539 | %{_includedir}/radosstriper/libradosstriper.hpp | |
1540 | %{_libdir}/libradosstriper.so | |
1541 | ||
1542 | %files -n librbd1 | |
7c673cae FG |
1543 | %{_libdir}/librbd.so.* |
1544 | %if %{with lttng} | |
1545 | %{_libdir}/librbd_tp.so.* | |
1546 | %endif | |
1547 | ||
181888fb | 1548 | %post -n librbd1 -p /sbin/ldconfig |
7c673cae FG |
1549 | |
1550 | %postun -n librbd1 -p /sbin/ldconfig | |
1551 | ||
1552 | %files -n librbd-devel | |
7c673cae FG |
1553 | %dir %{_includedir}/rbd |
1554 | %{_includedir}/rbd/librbd.h | |
1555 | %{_includedir}/rbd/librbd.hpp | |
1556 | %{_includedir}/rbd/features.h | |
1557 | %{_libdir}/librbd.so | |
1558 | %if %{with lttng} | |
1559 | %{_libdir}/librbd_tp.so | |
1560 | %endif | |
1561 | ||
1562 | %files -n librgw2 | |
7c673cae FG |
1563 | %{_libdir}/librgw.so.* |
1564 | ||
1565 | %post -n librgw2 -p /sbin/ldconfig | |
1566 | ||
1567 | %postun -n librgw2 -p /sbin/ldconfig | |
1568 | ||
1569 | %files -n librgw-devel | |
7c673cae FG |
1570 | %dir %{_includedir}/rados |
1571 | %{_includedir}/rados/librgw.h | |
1572 | %{_includedir}/rados/rgw_file.h | |
1573 | %{_libdir}/librgw.so | |
1574 | ||
1575 | %files -n python-rgw | |
7c673cae FG |
1576 | %{python_sitearch}/rgw.so |
1577 | %{python_sitearch}/rgw-*.egg-info | |
1578 | ||
1579 | %files -n python%{python3_pkgversion}-rgw | |
7c673cae FG |
1580 | %{python3_sitearch}/rgw.cpython*.so |
1581 | %{python3_sitearch}/rgw-*.egg-info | |
1582 | ||
1583 | %files -n python-rbd | |
7c673cae FG |
1584 | %{python_sitearch}/rbd.so |
1585 | %{python_sitearch}/rbd-*.egg-info | |
1586 | ||
1587 | %files -n python%{python3_pkgversion}-rbd | |
7c673cae FG |
1588 | %{python3_sitearch}/rbd.cpython*.so |
1589 | %{python3_sitearch}/rbd-*.egg-info | |
1590 | ||
1591 | %files -n libcephfs2 | |
7c673cae FG |
1592 | %{_libdir}/libcephfs.so.* |
1593 | ||
1594 | %post -n libcephfs2 -p /sbin/ldconfig | |
1595 | ||
1596 | %postun -n libcephfs2 -p /sbin/ldconfig | |
1597 | ||
1598 | %files -n libcephfs-devel | |
7c673cae FG |
1599 | %dir %{_includedir}/cephfs |
1600 | %{_includedir}/cephfs/libcephfs.h | |
1601 | %{_includedir}/cephfs/ceph_statx.h | |
1602 | %{_libdir}/libcephfs.so | |
1603 | ||
1604 | %files -n python-cephfs | |
7c673cae FG |
1605 | %{python_sitearch}/cephfs.so |
1606 | %{python_sitearch}/cephfs-*.egg-info | |
1607 | %{python_sitelib}/ceph_volume_client.py* | |
1608 | ||
1609 | %files -n python%{python3_pkgversion}-cephfs | |
7c673cae FG |
1610 | %{python3_sitearch}/cephfs.cpython*.so |
1611 | %{python3_sitearch}/cephfs-*.egg-info | |
1612 | %{python3_sitelib}/ceph_volume_client.py | |
1613 | %{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py* | |
1614 | ||
1615 | %files -n python%{python3_pkgversion}-ceph-argparse | |
7c673cae FG |
1616 | %{python3_sitelib}/ceph_argparse.py |
1617 | %{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py* | |
1618 | %{python3_sitelib}/ceph_daemon.py | |
1619 | %{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py* | |
1620 | ||
1621 | %if 0%{with ceph_test_package} | |
1622 | %files -n ceph-test | |
7c673cae FG |
1623 | %{_bindir}/ceph-client-debug |
1624 | %{_bindir}/ceph_bench_log | |
1625 | %{_bindir}/ceph_kvstorebench | |
1626 | %{_bindir}/ceph_multi_stress_watch | |
1627 | %{_bindir}/ceph_erasure_code | |
1628 | %{_bindir}/ceph_erasure_code_benchmark | |
1629 | %{_bindir}/ceph_omapbench | |
1630 | %{_bindir}/ceph_objectstore_bench | |
1631 | %{_bindir}/ceph_perf_objectstore | |
1632 | %{_bindir}/ceph_perf_local | |
1633 | %{_bindir}/ceph_perf_msgr_client | |
1634 | %{_bindir}/ceph_perf_msgr_server | |
1635 | %{_bindir}/ceph_psim | |
1636 | %{_bindir}/ceph_radosacl | |
1637 | %{_bindir}/ceph_rgw_jsonparser | |
1638 | %{_bindir}/ceph_rgw_multiparser | |
1639 | %{_bindir}/ceph_scratchtool | |
1640 | %{_bindir}/ceph_scratchtoolpp | |
1641 | %{_bindir}/ceph_smalliobench | |
1642 | %{_bindir}/ceph_smalliobenchdumb | |
1643 | %{_bindir}/ceph_smalliobenchfs | |
1644 | %{_bindir}/ceph_smalliobenchrbd | |
1645 | %{_bindir}/ceph_test_* | |
1646 | %{_bindir}/ceph_tpbench | |
1647 | %{_bindir}/ceph_xattr_bench | |
1648 | %{_bindir}/ceph-coverage | |
7c673cae | 1649 | %{_bindir}/ceph-debugpack |
7c673cae FG |
1650 | %{_mandir}/man8/ceph-debugpack.8* |
1651 | %dir %{_libdir}/ceph | |
1652 | %{_libdir}/ceph/ceph-monstore-update-crush.sh | |
1653 | %endif | |
1654 | ||
1655 | %if 0%{with cephfs_java} | |
1656 | %files -n libcephfs_jni1 | |
7c673cae FG |
1657 | %{_libdir}/libcephfs_jni.so.* |
1658 | ||
1659 | %post -n libcephfs_jni1 -p /sbin/ldconfig | |
1660 | ||
1661 | %postun -n libcephfs_jni1 -p /sbin/ldconfig | |
1662 | ||
1663 | %files -n libcephfs_jni-devel | |
7c673cae FG |
1664 | %{_libdir}/libcephfs_jni.so |
1665 | ||
1666 | %files -n cephfs-java | |
7c673cae FG |
1667 | %{_javadir}/libcephfs.jar |
1668 | %{_javadir}/libcephfs-test.jar | |
1669 | %endif | |
1670 | ||
1671 | %files -n rados-objclass-devel | |
7c673cae FG |
1672 | %dir %{_includedir}/rados |
1673 | %{_includedir}/rados/objclass.h | |
1674 | ||
1675 | %if 0%{with selinux} | |
1676 | %files selinux | |
7c673cae FG |
1677 | %attr(0600,root,root) %{_datadir}/selinux/packages/ceph.pp |
1678 | %{_datadir}/selinux/devel/include/contrib/ceph.if | |
1679 | %{_mandir}/man8/ceph_selinux.8* | |
1680 | ||
1681 | %post selinux | |
1682 | # backup file_contexts before update | |
1683 | . /etc/selinux/config | |
1684 | FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts | |
1685 | cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre | |
1686 | ||
1687 | # Install the policy | |
1688 | /usr/sbin/semodule -i %{_datadir}/selinux/packages/ceph.pp | |
1689 | ||
1690 | # Load the policy if SELinux is enabled | |
1691 | if ! /usr/sbin/selinuxenabled; then | |
1692 | # Do not relabel if selinux is not enabled | |
1693 | exit 0 | |
1694 | fi | |
1695 | ||
1696 | if diff ${FILE_CONTEXT} ${FILE_CONTEXT}.pre > /dev/null 2>&1; then | |
1697 | # Do not relabel if file contexts did not change | |
1698 | exit 0 | |
1699 | fi | |
1700 | ||
1701 | # Check whether the daemons are running | |
1702 | /usr/bin/systemctl status ceph.target > /dev/null 2>&1 | |
1703 | STATUS=$? | |
1704 | ||
1705 | # Stop the daemons if they were running | |
1706 | if test $STATUS -eq 0; then | |
1707 | /usr/bin/systemctl stop ceph.target > /dev/null 2>&1 | |
1708 | fi | |
1709 | ||
31f18b77 FG |
1710 | # Relabel the files |
1711 | # Use ceph-disk fix for first package install and fixfiles otherwise | |
1712 | if [ "$1" = "1" ]; then | |
1713 | /usr/sbin/ceph-disk fix --selinux | |
1714 | else | |
1715 | /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null | |
1716 | fi | |
1717 | ||
7c673cae FG |
1718 | rm -f ${FILE_CONTEXT}.pre |
1719 | # The fixfiles command won't fix label for /var/run/ceph | |
1720 | /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1 | |
1721 | ||
1722 | # Start the daemons iff they were running before | |
1723 | if test $STATUS -eq 0; then | |
1724 | /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || : | |
1725 | fi | |
1726 | exit 0 | |
1727 | ||
1728 | %postun selinux | |
1729 | if [ $1 -eq 0 ]; then | |
1730 | # backup file_contexts before update | |
1731 | . /etc/selinux/config | |
1732 | FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts | |
1733 | cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre | |
1734 | ||
1735 | # Remove the module | |
1736 | /usr/sbin/semodule -n -r ceph > /dev/null 2>&1 | |
1737 | ||
1738 | # Reload the policy if SELinux is enabled | |
1739 | if ! /usr/sbin/selinuxenabled ; then | |
1740 | # Do not relabel if SELinux is not enabled | |
1741 | exit 0 | |
1742 | fi | |
1743 | ||
1744 | # Check whether the daemons are running | |
1745 | /usr/bin/systemctl status ceph.target > /dev/null 2>&1 | |
1746 | STATUS=$? | |
1747 | ||
1748 | # Stop the daemons if they were running | |
1749 | if test $STATUS -eq 0; then | |
1750 | /usr/bin/systemctl stop ceph.target > /dev/null 2>&1 | |
1751 | fi | |
1752 | ||
1753 | /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null | |
1754 | rm -f ${FILE_CONTEXT}.pre | |
1755 | # The fixfiles command won't fix label for /var/run/ceph | |
1756 | /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1 | |
1757 | ||
1758 | # Start the daemons if they were running before | |
1759 | if test $STATUS -eq 0; then | |
1760 | /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || : | |
1761 | fi | |
1762 | fi | |
1763 | exit 0 | |
1764 | ||
1765 | %endif # with selinux | |
1766 | ||
1767 | %files -n python-ceph-compat | |
1768 | # We need an empty %%files list for python-ceph-compat, to tell rpmbuild to | |
1769 | # actually build this meta package. | |
1770 | ||
1771 | ||
1772 | %changelog |