]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | # vim: set noexpandtab ts=8 sw=8 : |
2 | # | |
3 | # spec file for package ceph | |
4 | # | |
11fdf7f2 | 5 | # Copyright (C) 2004-2019 The Ceph Project Developers. See COPYING file |
7c673cae FG |
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 | # |
11fdf7f2 TL |
17 | |
18 | ################################################################################# | |
19 | # conditional build section | |
20 | # | |
21 | # please read http://rpm.org/user_doc/conditional_builds.html for explanation of | |
22 | # bcond syntax! | |
23 | ################################################################################# | |
7c673cae | 24 | %bcond_with make_check |
eafe8130 | 25 | %bcond_without ceph_test_package |
31f18b77 | 26 | %ifarch s390 s390x |
7c673cae | 27 | %bcond_with tcmalloc |
31f18b77 FG |
28 | %else |
29 | %bcond_without tcmalloc | |
7c673cae | 30 | %endif |
7c673cae FG |
31 | %if 0%{?fedora} || 0%{?rhel} |
32 | %bcond_without selinux | |
11fdf7f2 TL |
33 | %bcond_without cephfs_java |
34 | %bcond_without lttng | |
35 | %bcond_without libradosstriper | |
36 | %bcond_without ocf | |
37 | %bcond_without amqp_endpoint | |
38 | %global _remote_tarball_prefix https://download.ceph.com/tarballs/ | |
7c673cae FG |
39 | %endif |
40 | %if 0%{?suse_version} | |
41 | %bcond_with selinux | |
11fdf7f2 TL |
42 | %bcond_with cephfs_java |
43 | %bcond_with amqp_endpoint | |
44 | #Compat macro for new _fillupdir macro introduced in Nov 2017 | |
45 | %if ! %{defined _fillupdir} | |
46 | %global _fillupdir /var/adm/fillup-templates | |
7c673cae | 47 | %endif |
11fdf7f2 TL |
48 | %if 0%{?is_opensuse} |
49 | %bcond_without libradosstriper | |
50 | %bcond_without ocf | |
51 | %else | |
52 | %bcond_with libradosstriper | |
53 | %bcond_with ocf | |
54 | %endif | |
55 | %ifarch x86_64 aarch64 ppc64le | |
7c673cae | 56 | %bcond_without lttng |
11fdf7f2 TL |
57 | %else |
58 | %bcond_with lttng | |
59 | %endif | |
60 | %endif | |
61 | %bcond_with seastar | |
62 | %if 0%{?fedora} >= 29 || 0%{?suse_version} >= 1500 || 0%{?rhel} >= 8 | |
63 | # distros that need a py3 Ceph build | |
64 | %bcond_with python2 | |
65 | %else | |
66 | # distros that need a py2 Ceph build | |
67 | %bcond_without python2 | |
7c673cae | 68 | %endif |
11fdf7f2 TL |
69 | %if 0%{?fedora} || 0%{?suse_version} >= 1500 |
70 | # distros that ship cmd2 and/or colorama | |
71 | %bcond_without cephfs_shell | |
72 | %else | |
73 | # distros that do _not_ ship cmd2/colorama | |
74 | %bcond_with cephfs_shell | |
75 | %endif | |
76 | %if 0%{without python2} | |
77 | %global _defined_if_python2_absent 1 | |
7c673cae FG |
78 | %endif |
79 | ||
80 | %if %{with selinux} | |
81 | # get selinux policy version | |
91327a77 | 82 | %{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0} |
7c673cae FG |
83 | %endif |
84 | ||
85 | %{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d} | |
86 | %{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create} | |
87 | %{!?python3_pkgversion: %global python3_pkgversion 3} | |
eafe8130 | 88 | %{!?python3_version_nodots: %global python3_version_nodots 3} |
11fdf7f2 TL |
89 | %{!?python3_version: %global python3_version 3} |
90 | # define _python_buildid macro which will expand to the empty string when | |
91 | # building with python2 | |
92 | %global _python_buildid %{?_defined_if_python2_absent:%{python3_pkgversion}} | |
7c673cae FG |
93 | |
94 | # unify libexec for all targets | |
95 | %global _libexecdir %{_exec_prefix}/lib | |
96 | ||
97 | # disable dwz which compresses the debuginfo | |
98 | %global _find_debuginfo_dwz_opts %{nil} | |
31f18b77 | 99 | |
7c673cae FG |
100 | ################################################################################# |
101 | # main package definition | |
102 | ################################################################################# | |
103 | Name: ceph | |
eafe8130 | 104 | Version: 14.2.5 |
7c673cae | 105 | Release: 0%{?dist} |
31f18b77 | 106 | %if 0%{?fedora} || 0%{?rhel} |
224ce89b | 107 | Epoch: 2 |
31f18b77 FG |
108 | %endif |
109 | ||
3efd9988 FG |
110 | # define _epoch_prefix macro which will expand to the empty string if epoch is |
111 | # undefined | |
31f18b77 FG |
112 | %global _epoch_prefix %{?epoch:%{epoch}:} |
113 | ||
7c673cae | 114 | Summary: User space components of the Ceph file system |
94b18763 | 115 | 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 |
116 | %if 0%{?suse_version} |
117 | Group: System/Filesystems | |
118 | %endif | |
119 | URL: http://ceph.com/ | |
eafe8130 | 120 | Source0: %{?_remote_tarball_prefix}ceph-14.2.5.tar.bz2 |
7c673cae | 121 | %if 0%{?suse_version} |
11fdf7f2 | 122 | # _insert_obs_source_lines_here |
31f18b77 | 123 | ExclusiveArch: x86_64 aarch64 ppc64le s390x |
7c673cae | 124 | %endif |
7c673cae FG |
125 | ################################################################################# |
126 | # dependencies that apply across all distro families | |
127 | ################################################################################# | |
31f18b77 FG |
128 | Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release} |
129 | Requires: ceph-mds = %{_epoch_prefix}%{version}-%{release} | |
130 | Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} | |
131 | Requires: ceph-mon = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
132 | Requires(post): binutils |
133 | %if 0%{with cephfs_java} | |
134 | BuildRequires: java-devel | |
135 | BuildRequires: sharutils | |
136 | %endif | |
137 | %if 0%{with selinux} | |
138 | BuildRequires: checkpolicy | |
139 | BuildRequires: selinux-policy-devel | |
7c673cae | 140 | %endif |
31f18b77 | 141 | BuildRequires: gperf |
11fdf7f2 TL |
142 | %if 0%{?rhel} == 7 |
143 | BuildRequires: cmake3 > 3.5 | |
144 | %else | |
145 | BuildRequires: cmake > 3.5 | |
146 | %endif | |
7c673cae FG |
147 | BuildRequires: cryptsetup |
148 | BuildRequires: fuse-devel | |
11fdf7f2 TL |
149 | %if 0%{?rhel} == 7 |
150 | # devtoolset offers newer make and valgrind-devel, but the old ones are good | |
151 | # enough. | |
eafe8130 TL |
152 | %ifarch x86_64 |
153 | BuildRequires: devtoolset-8-gcc-c++ >= 8.2.1 | |
154 | %else | |
11fdf7f2 | 155 | BuildRequires: devtoolset-7-gcc-c++ >= 7.3.1-5.13 |
eafe8130 | 156 | %endif |
11fdf7f2 | 157 | %else |
7c673cae | 158 | BuildRequires: gcc-c++ |
11fdf7f2 | 159 | %endif |
7c673cae FG |
160 | BuildRequires: gdbm |
161 | %if 0%{with tcmalloc} | |
91327a77 AA |
162 | %if 0%{?fedora} || 0%{?rhel} |
163 | BuildRequires: gperftools-devel >= 2.6.1 | |
164 | %endif | |
165 | %if 0%{?suse_version} | |
7c673cae FG |
166 | BuildRequires: gperftools-devel >= 2.4 |
167 | %endif | |
91327a77 | 168 | %endif |
7c673cae FG |
169 | BuildRequires: leveldb-devel > 1.2 |
170 | BuildRequires: libaio-devel | |
7c673cae FG |
171 | BuildRequires: libblkid-devel >= 2.17 |
172 | BuildRequires: libcurl-devel | |
eafe8130 | 173 | BuildRequires: libcap-ng-devel |
7c673cae | 174 | BuildRequires: libudev-devel |
eafe8130 | 175 | BuildRequires: libnl3-devel |
11fdf7f2 | 176 | BuildRequires: liboath-devel |
7c673cae FG |
177 | BuildRequires: libtool |
178 | BuildRequires: libxml2-devel | |
179 | BuildRequires: make | |
11fdf7f2 | 180 | BuildRequires: ncurses-devel |
7c673cae | 181 | BuildRequires: parted |
eafe8130 | 182 | BuildRequires: patch |
7c673cae FG |
183 | BuildRequires: perl |
184 | BuildRequires: pkgconfig | |
11fdf7f2 TL |
185 | BuildRequires: procps |
186 | BuildRequires: python%{_python_buildid} | |
187 | BuildRequires: python%{_python_buildid}-devel | |
7c673cae | 188 | BuildRequires: snappy-devel |
11fdf7f2 | 189 | BuildRequires: sudo |
7c673cae FG |
190 | BuildRequires: udev |
191 | BuildRequires: util-linux | |
192 | BuildRequires: valgrind-devel | |
31f18b77 | 193 | BuildRequires: which |
7c673cae FG |
194 | BuildRequires: xfsprogs |
195 | BuildRequires: xfsprogs-devel | |
196 | BuildRequires: xmlstarlet | |
197 | BuildRequires: yasm | |
11fdf7f2 TL |
198 | %if 0%{with amqp_endpoint} |
199 | BuildRequires: librabbitmq-devel | |
200 | %endif | |
201 | %if 0%{with make_check} | |
202 | BuildRequires: jq | |
eafe8130 | 203 | BuildRequires: libuuid-devel |
11fdf7f2 TL |
204 | BuildRequires: python%{_python_buildid}-bcrypt |
205 | BuildRequires: python%{_python_buildid}-coverage | |
206 | BuildRequires: python%{_python_buildid}-nose | |
207 | BuildRequires: python%{_python_buildid}-pecan | |
208 | BuildRequires: python%{_python_buildid}-requests | |
209 | BuildRequires: python%{_python_buildid}-six | |
210 | BuildRequires: python%{_python_buildid}-tox | |
211 | BuildRequires: python%{_python_buildid}-virtualenv | |
212 | %if 0%{?rhel} == 7 | |
213 | BuildRequires: pyOpenSSL%{_python_buildid} | |
214 | %else | |
215 | BuildRequires: python%{_python_buildid}-pyOpenSSL | |
216 | %endif | |
217 | BuildRequires: socat | |
218 | %endif | |
219 | %if 0%{with seastar} | |
220 | BuildRequires: c-ares-devel | |
221 | BuildRequires: gnutls-devel | |
222 | BuildRequires: hwloc-devel | |
223 | BuildRequires: libpciaccess-devel | |
224 | BuildRequires: lksctp-tools-devel | |
225 | BuildRequires: protobuf-devel | |
226 | BuildRequires: ragel | |
227 | BuildRequires: systemtap-sdt-devel | |
228 | BuildRequires: yaml-cpp-devel | |
229 | %endif | |
7c673cae FG |
230 | ################################################################################# |
231 | # distro-conditional dependencies | |
232 | ################################################################################# | |
233 | %if 0%{?suse_version} | |
234 | BuildRequires: pkgconfig(systemd) | |
235 | BuildRequires: systemd-rpm-macros | |
7c673cae FG |
236 | %{?systemd_requires} |
237 | PreReq: %fillup_prereq | |
eafe8130 | 238 | BuildRequires: fdupes |
7c673cae FG |
239 | BuildRequires: net-tools |
240 | BuildRequires: libbz2-devel | |
7c673cae FG |
241 | BuildRequires: mozilla-nss-devel |
242 | BuildRequires: keyutils-devel | |
243 | BuildRequires: libopenssl-devel | |
244 | BuildRequires: lsb-release | |
245 | BuildRequires: openldap2-devel | |
11fdf7f2 TL |
246 | #BuildRequires: krb5 |
247 | #BuildRequires: krb5-devel | |
248 | BuildRequires: cunit-devel | |
249 | BuildRequires: python%{_python_buildid}-setuptools | |
250 | BuildRequires: python%{_python_buildid}-Cython | |
251 | BuildRequires: python%{_python_buildid}-PrettyTable | |
252 | BuildRequires: python%{_python_buildid}-Sphinx | |
31f18b77 | 253 | BuildRequires: rdma-core-devel |
11fdf7f2 | 254 | BuildRequires: liblz4-devel >= 1.7 |
81eedcae TL |
255 | # for prometheus-alerts |
256 | BuildRequires: golang-github-prometheus-prometheus | |
7c673cae | 257 | %endif |
d2e6a577 | 258 | %if 0%{?fedora} || 0%{?rhel} |
7c673cae FG |
259 | Requires: systemd |
260 | BuildRequires: boost-random | |
7c673cae FG |
261 | BuildRequires: nss-devel |
262 | BuildRequires: keyutils-libs-devel | |
31f18b77 | 263 | BuildRequires: libibverbs-devel |
11fdf7f2 | 264 | BuildRequires: librdmacm-devel |
7c673cae | 265 | BuildRequires: openldap-devel |
11fdf7f2 | 266 | #BuildRequires: krb5-devel |
7c673cae | 267 | BuildRequires: openssl-devel |
11fdf7f2 | 268 | BuildRequires: CUnit-devel |
7c673cae | 269 | BuildRequires: redhat-lsb-core |
11fdf7f2 TL |
270 | %if 0%{with python2} |
271 | BuildRequires: python2-Cython | |
272 | %endif | |
273 | BuildRequires: python%{python3_pkgversion}-devel | |
274 | BuildRequires: python%{python3_pkgversion}-setuptools | |
eafe8130 TL |
275 | %if 0%{?rhel} |
276 | BuildRequires: python%{python3_version_nodots}-Cython | |
277 | %else | |
11fdf7f2 | 278 | BuildRequires: python%{python3_pkgversion}-Cython |
eafe8130 | 279 | %endif |
11fdf7f2 TL |
280 | BuildRequires: python%{_python_buildid}-prettytable |
281 | BuildRequires: python%{_python_buildid}-sphinx | |
282 | BuildRequires: lz4-devel >= 1.7 | |
283 | %endif | |
284 | # distro-conditional make check dependencies | |
285 | %if 0%{with make_check} | |
286 | %if 0%{?fedora} || 0%{?rhel} | |
287 | BuildRequires: python%{_python_buildid}-cherrypy | |
288 | BuildRequires: python%{_python_buildid}-jwt | |
289 | BuildRequires: python%{_python_buildid}-routes | |
290 | BuildRequires: python%{_python_buildid}-werkzeug | |
291 | BuildRequires: xmlsec1 | |
292 | %endif | |
293 | %if 0%{?suse_version} | |
294 | BuildRequires: python%{_python_buildid}-CherryPy | |
295 | BuildRequires: python%{_python_buildid}-PyJWT | |
296 | BuildRequires: python%{_python_buildid}-Routes | |
297 | BuildRequires: python%{_python_buildid}-Werkzeug | |
298 | BuildRequires: python%{_python_buildid}-numpy-devel | |
299 | BuildRequires: xmlsec1-devel | |
300 | %endif | |
7c673cae FG |
301 | %endif |
302 | # lttng and babeltrace for rbd-replay-prep | |
303 | %if %{with lttng} | |
304 | %if 0%{?fedora} || 0%{?rhel} | |
305 | BuildRequires: lttng-ust-devel | |
306 | BuildRequires: libbabeltrace-devel | |
307 | %endif | |
308 | %if 0%{?suse_version} | |
309 | BuildRequires: lttng-ust-devel | |
310 | BuildRequires: babeltrace-devel | |
311 | %endif | |
312 | %endif | |
7c673cae FG |
313 | %if 0%{?suse_version} |
314 | BuildRequires: libexpat-devel | |
7c673cae FG |
315 | %endif |
316 | %if 0%{?rhel} || 0%{?fedora} | |
317 | BuildRequires: expat-devel | |
7c673cae FG |
318 | %endif |
319 | #hardened-cc1 | |
320 | %if 0%{?fedora} || 0%{?rhel} | |
321 | BuildRequires: redhat-rpm-config | |
322 | %endif | |
11fdf7f2 TL |
323 | %if 0%{with seastar} |
324 | %if 0%{?fedora} || 0%{?rhel} | |
325 | BuildRequires: cryptopp-devel | |
326 | BuildRequires: numactl-devel | |
327 | BuildRequires: protobuf-compiler | |
328 | %endif | |
329 | %if 0%{?suse_version} | |
330 | BuildRequires: libcryptopp-devel | |
331 | BuildRequires: libnuma-devel | |
332 | %endif | |
333 | %endif | |
7c673cae FG |
334 | |
335 | %description | |
336 | Ceph is a massively scalable, open-source, distributed storage system that runs | |
337 | on commodity hardware and delivers object, block and file system storage. | |
338 | ||
339 | ||
340 | ################################################################################# | |
341 | # subpackages | |
342 | ################################################################################# | |
343 | %package base | |
344 | Summary: Ceph Base Package | |
345 | %if 0%{?suse_version} | |
346 | Group: System/Filesystems | |
347 | %endif | |
11fdf7f2 | 348 | Provides: ceph-test:/usr/bin/ceph-kvstore-tool |
31f18b77 FG |
349 | Requires: ceph-common = %{_epoch_prefix}%{version}-%{release} |
350 | Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} | |
351 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} | |
352 | Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} | |
353 | Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} | |
7c673cae | 354 | %if 0%{with selinux} |
31f18b77 | 355 | Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release} |
7c673cae | 356 | %endif |
11fdf7f2 | 357 | Requires: cryptsetup |
91327a77 | 358 | Requires: e2fsprogs |
11fdf7f2 TL |
359 | Requires: findutils |
360 | Requires: grep | |
7c673cae | 361 | Requires: logrotate |
91327a77 | 362 | Requires: parted |
7c673cae | 363 | Requires: psmisc |
11fdf7f2 TL |
364 | Requires: python%{_python_buildid}-requests |
365 | Requires: python%{_python_buildid}-setuptools | |
366 | Requires: util-linux | |
367 | Requires: xfsprogs | |
7c673cae | 368 | Requires: which |
91327a77 | 369 | %if 0%{?fedora} || 0%{?rhel} |
91327a77 AA |
370 | # The following is necessary due to tracker 36508 and can be removed once the |
371 | # associated upstream bugs are resolved. | |
372 | %if 0%{with tcmalloc} | |
373 | Requires: gperftools-libs >= 2.6.1 | |
374 | %endif | |
375 | %endif | |
7c673cae | 376 | %if 0%{?suse_version} |
11fdf7f2 | 377 | Recommends: chrony |
7c673cae | 378 | %endif |
7c673cae FG |
379 | %description base |
380 | Base is the package that includes all the files shared amongst ceph servers | |
381 | ||
382 | %package -n ceph-common | |
383 | Summary: Ceph Common | |
384 | %if 0%{?suse_version} | |
385 | Group: System/Filesystems | |
386 | %endif | |
31f18b77 FG |
387 | Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} |
388 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} | |
389 | Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} | |
11fdf7f2 TL |
390 | Requires: python%{_python_buildid}-rados = %{_epoch_prefix}%{version}-%{release} |
391 | Requires: python%{_python_buildid}-rbd = %{_epoch_prefix}%{version}-%{release} | |
392 | Requires: python%{_python_buildid}-cephfs = %{_epoch_prefix}%{version}-%{release} | |
393 | Requires: python%{_python_buildid}-rgw = %{_epoch_prefix}%{version}-%{release} | |
394 | Requires: python%{_python_buildid}-ceph-argparse = %{_epoch_prefix}%{version}-%{release} | |
395 | Requires: python%{_python_buildid}-requests | |
31f18b77 | 396 | %if 0%{?fedora} || 0%{?rhel} |
11fdf7f2 | 397 | Requires: python%{_python_buildid}-prettytable |
31f18b77 FG |
398 | %endif |
399 | %if 0%{?suse_version} | |
11fdf7f2 TL |
400 | Requires: python%{_python_buildid}-PrettyTable |
401 | %endif | |
402 | %if 0%{with libradosstriper} | |
403 | Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release} | |
31f18b77 | 404 | %endif |
7c673cae FG |
405 | %{?systemd_requires} |
406 | %if 0%{?suse_version} | |
407 | Requires(pre): pwdutils | |
408 | %endif | |
7c673cae FG |
409 | %description -n ceph-common |
410 | Common utilities to mount and interact with a ceph storage cluster. | |
411 | Comprised of files that are common to Ceph clients and servers. | |
412 | ||
413 | %package mds | |
414 | Summary: Ceph Metadata Server Daemon | |
415 | %if 0%{?suse_version} | |
416 | Group: System/Filesystems | |
417 | %endif | |
31f18b77 | 418 | Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
419 | %description mds |
420 | ceph-mds is the metadata server daemon for the Ceph distributed file system. | |
421 | One or more instances of ceph-mds collectively manage the file system | |
422 | namespace, coordinating access to the shared OSD cluster. | |
423 | ||
424 | %package mon | |
425 | Summary: Ceph Monitor Daemon | |
426 | %if 0%{?suse_version} | |
427 | Group: System/Filesystems | |
428 | %endif | |
11fdf7f2 | 429 | Provides: ceph-test:/usr/bin/ceph-monstore-tool |
31f18b77 | 430 | Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
431 | %description mon |
432 | ceph-mon is the cluster monitor daemon for the Ceph distributed file | |
433 | system. One or more instances of ceph-mon form a Paxos part-time | |
434 | parliament cluster that provides extremely reliable and durable storage | |
435 | of cluster membership, configuration, and state. | |
436 | ||
437 | %package mgr | |
438 | Summary: Ceph Manager Daemon | |
7c673cae FG |
439 | %if 0%{?suse_version} |
440 | Group: System/Filesystems | |
441 | %endif | |
31f18b77 | 442 | Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} |
11fdf7f2 TL |
443 | Requires: python%{_python_buildid}-bcrypt |
444 | Requires: python%{_python_buildid}-pecan | |
445 | Requires: python%{_python_buildid}-six | |
31f18b77 | 446 | %if 0%{?fedora} || 0%{?rhel} |
11fdf7f2 TL |
447 | Requires: python%{_python_buildid}-cherrypy |
448 | Requires: python%{_python_buildid}-werkzeug | |
31f18b77 FG |
449 | %endif |
450 | %if 0%{?suse_version} | |
11fdf7f2 TL |
451 | Requires: python%{_python_buildid}-CherryPy |
452 | Requires: python%{_python_buildid}-Werkzeug | |
453 | Recommends: python%{_python_buildid}-influxdb | |
454 | Recommends: ceph-mgr-dashboard = %{_epoch_prefix}%{version}-%{release} | |
455 | Recommends: ceph-mgr-diskprediction-local = %{_epoch_prefix}%{version}-%{release} | |
456 | Recommends: ceph-mgr-diskprediction-cloud = %{_epoch_prefix}%{version}-%{release} | |
457 | Recommends: ceph-mgr-rook = %{_epoch_prefix}%{version}-%{release} | |
eafe8130 | 458 | Recommends: ceph-mgr-k8sevents = %{_epoch_prefix}%{version}-%{release} |
11fdf7f2 TL |
459 | Recommends: ceph-mgr-ssh = %{_epoch_prefix}%{version}-%{release} |
460 | %endif | |
461 | %if 0%{?rhel} == 7 | |
462 | Requires: pyOpenSSL | |
463 | %else | |
464 | Requires: python%{_python_buildid}-pyOpenSSL | |
31f18b77 | 465 | %endif |
7c673cae FG |
466 | %description mgr |
467 | ceph-mgr enables python modules that provide services (such as the REST | |
468 | module derived from Calamari) and expose CLI hooks. ceph-mgr gathers | |
469 | the cluster maps, the daemon metadata, and performance counters, and | |
470 | exposes all these to the python modules. | |
471 | ||
11fdf7f2 TL |
472 | %package mgr-dashboard |
473 | Summary: Ceph Dashboard | |
474 | BuildArch: noarch | |
475 | %if 0%{?suse_version} | |
476 | Group: System/Filesystems | |
477 | %endif | |
478 | Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} | |
494da23a | 479 | Requires: ceph-grafana-dashboards = %{_epoch_prefix}%{version}-%{release} |
11fdf7f2 TL |
480 | %if 0%{?fedora} || 0%{?rhel} |
481 | Requires: python%{_python_buildid}-cherrypy | |
482 | Requires: python%{_python_buildid}-jwt | |
483 | Requires: python%{_python_buildid}-routes | |
484 | Requires: python%{_python_buildid}-werkzeug | |
485 | %endif | |
486 | %if 0%{?suse_version} | |
487 | Requires: python%{_python_buildid}-CherryPy | |
488 | Requires: python%{_python_buildid}-PyJWT | |
489 | Requires: python%{_python_buildid}-Routes | |
490 | Requires: python%{_python_buildid}-Werkzeug | |
491 | %endif | |
492 | %if 0%{?rhel} == 7 | |
493 | Requires: pyOpenSSL | |
494 | %else | |
495 | Requires: python%{_python_buildid}-pyOpenSSL | |
496 | %endif | |
497 | %description mgr-dashboard | |
498 | ceph-mgr-dashboard is a manager plugin, providing a web-based application | |
499 | to monitor and manage many aspects of a Ceph cluster and related components. | |
500 | See the Dashboard documentation at http://docs.ceph.com/ for details and a | |
501 | detailed feature overview. | |
502 | ||
503 | %package mgr-diskprediction-local | |
504 | Summary: ceph-mgr diskprediction_local plugin | |
505 | BuildArch: noarch | |
506 | %if 0%{?suse_version} | |
507 | Group: System/Filesystems | |
508 | %endif | |
509 | Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} | |
510 | %if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?suse_version} | |
511 | Requires: python%{_python_buildid}-numpy | |
512 | %if 0%{without python2} | |
513 | Requires: python3-scipy | |
514 | %else | |
515 | Requires: python2-scipy | |
516 | %endif | |
517 | %endif | |
518 | %if 0%{?rhel} == 7 | |
519 | Requires: numpy | |
520 | Requires: scipy | |
521 | %endif | |
522 | %description mgr-diskprediction-local | |
523 | ceph-mgr-diskprediction-local is a ceph-mgr plugin that tries to predict | |
524 | disk failures using local algorithms and machine-learning databases. | |
525 | ||
526 | %package mgr-diskprediction-cloud | |
527 | Summary: ceph-mgr diskprediction_cloud plugin | |
528 | BuildArch: noarch | |
529 | %if 0%{?suse_version} | |
530 | Group: System/Filesystems | |
531 | %endif | |
532 | Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} | |
533 | %description mgr-diskprediction-cloud | |
534 | ceph-mgr-diskprediction-cloud is a ceph-mgr plugin that tries to predict | |
535 | disk failures using services in the Google cloud. | |
536 | ||
537 | %package mgr-rook | |
538 | BuildArch: noarch | |
539 | Summary: ceph-mgr rook plugin | |
540 | %if 0%{?suse_version} | |
541 | Group: System/Filesystems | |
542 | %endif | |
543 | Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} | |
544 | Requires: python%{_python_buildid}-kubernetes | |
545 | %description mgr-rook | |
546 | ceph-mgr-rook is a ceph-mgr plugin for orchestration functions using | |
547 | a Rook backend. | |
548 | ||
eafe8130 TL |
549 | %package mgr-k8sevents |
550 | BuildArch: noarch | |
551 | Summary: Ceph Manager plugin to orchestrate ceph-events to kubernetes' events API | |
552 | %if 0%{?suse_version} | |
553 | Group: System/Filesystems | |
554 | %endif | |
555 | Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} | |
556 | Requires: python%{_python_buildid}-kubernetes | |
557 | %description mgr-k8sevents | |
558 | ceph-mgr-k8sevents is a ceph-mgr plugin that sends every ceph-events | |
559 | to kubernetes' events API | |
560 | ||
11fdf7f2 TL |
561 | %package mgr-ssh |
562 | Summary: ceph-mgr ssh module | |
563 | BuildArch: noarch | |
564 | %if 0%{?suse_version} | |
565 | Group: System/Filesystems | |
566 | %endif | |
567 | Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} | |
568 | Requires: python%{_python_buildid}-remoto | |
569 | %description mgr-ssh | |
570 | ceph-mgr-ssh is a ceph-mgr module for orchestration functions using | |
571 | direct SSH connections for management operations. | |
572 | ||
7c673cae FG |
573 | %package fuse |
574 | Summary: Ceph fuse-based client | |
575 | %if 0%{?suse_version} | |
576 | Group: System/Filesystems | |
577 | %endif | |
181888fb | 578 | Requires: fuse |
11fdf7f2 | 579 | Requires: python%{python3_pkgversion} |
7c673cae FG |
580 | %description fuse |
581 | FUSE based client for Ceph distributed network file system | |
582 | ||
583 | %package -n rbd-fuse | |
584 | Summary: Ceph fuse-based client | |
585 | %if 0%{?suse_version} | |
586 | Group: System/Filesystems | |
587 | %endif | |
31f18b77 FG |
588 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
589 | Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
590 | %description -n rbd-fuse |
591 | FUSE based client to map Ceph rbd images to files | |
592 | ||
593 | %package -n rbd-mirror | |
594 | Summary: Ceph daemon for mirroring RBD images | |
595 | %if 0%{?suse_version} | |
596 | Group: System/Filesystems | |
597 | %endif | |
a8e16298 | 598 | Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} |
31f18b77 | 599 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
11fdf7f2 | 600 | Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
601 | %description -n rbd-mirror |
602 | Daemon for mirroring RBD images between Ceph clusters, streaming | |
603 | changes asynchronously. | |
604 | ||
605 | %package -n rbd-nbd | |
606 | Summary: Ceph RBD client base on NBD | |
607 | %if 0%{?suse_version} | |
608 | Group: System/Filesystems | |
609 | %endif | |
31f18b77 FG |
610 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
611 | Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
612 | %description -n rbd-nbd |
613 | NBD based client to map Ceph rbd images to local device | |
614 | ||
615 | %package radosgw | |
616 | Summary: Rados REST gateway | |
617 | %if 0%{?suse_version} | |
618 | Group: System/Filesystems | |
619 | %endif | |
a8e16298 | 620 | Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} |
7c673cae | 621 | %if 0%{with selinux} |
31f18b77 | 622 | Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release} |
7c673cae | 623 | %endif |
31f18b77 FG |
624 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
625 | Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
626 | %if 0%{?rhel} || 0%{?fedora} |
627 | Requires: mailcap | |
628 | %endif | |
629 | %description radosgw | |
630 | RADOS is a distributed object store used by the Ceph distributed | |
631 | storage system. This package provides a REST gateway to the | |
632 | object store that aims to implement a superset of Amazon's S3 | |
633 | service as well as the OpenStack Object Storage ("Swift") API. | |
634 | ||
635 | %if %{with ocf} | |
636 | %package resource-agents | |
637 | Summary: OCF-compliant resource agents for Ceph daemons | |
638 | %if 0%{?suse_version} | |
639 | Group: System/Filesystems | |
640 | %endif | |
31f18b77 | 641 | Requires: ceph-base = %{_epoch_prefix}%{version} |
7c673cae FG |
642 | Requires: resource-agents |
643 | %description resource-agents | |
644 | Resource agents for monitoring and managing Ceph daemons | |
645 | under Open Cluster Framework (OCF) compliant resource | |
646 | managers such as Pacemaker. | |
647 | %endif | |
648 | ||
649 | %package osd | |
650 | Summary: Ceph Object Storage Daemon | |
651 | %if 0%{?suse_version} | |
652 | Group: System/Filesystems | |
653 | %endif | |
11fdf7f2 | 654 | Provides: ceph-test:/usr/bin/ceph-osdomap-tool |
31f18b77 | 655 | Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} |
b32b8144 | 656 | Requires: lvm2 |
11fdf7f2 TL |
657 | Requires: sudo |
658 | Requires: libstoragemgmt | |
7c673cae FG |
659 | %description osd |
660 | ceph-osd is the object storage daemon for the Ceph distributed file | |
661 | system. It is responsible for storing objects on a local file system | |
662 | and providing access to them over the network. | |
663 | ||
664 | %package -n librados2 | |
665 | Summary: RADOS distributed object store client library | |
666 | %if 0%{?suse_version} | |
667 | Group: System/Libraries | |
668 | %endif | |
7c673cae | 669 | %if 0%{?rhel} || 0%{?fedora} |
31f18b77 | 670 | Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
671 | %endif |
672 | %description -n librados2 | |
673 | RADOS is a reliable, autonomic distributed object storage cluster | |
674 | developed as part of the Ceph distributed storage system. This is a | |
675 | shared library allowing applications to access the distributed object | |
676 | store using a simple file-like interface. | |
677 | ||
678 | %package -n librados-devel | |
679 | Summary: RADOS headers | |
680 | %if 0%{?suse_version} | |
681 | Group: Development/Libraries/C and C++ | |
682 | %endif | |
31f18b77 FG |
683 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
684 | Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} | |
685 | Provides: librados2-devel = %{_epoch_prefix}%{version}-%{release} | |
686 | Obsoletes: librados2-devel < %{_epoch_prefix}%{version}-%{release} | |
7c673cae | 687 | %description -n librados-devel |
11fdf7f2 TL |
688 | This package contains C libraries and headers needed to develop programs |
689 | that use RADOS object store. | |
690 | ||
691 | %package -n libradospp-devel | |
692 | Summary: RADOS headers | |
693 | %if 0%{?suse_version} | |
694 | Group: Development/Libraries/C and C++ | |
695 | %endif | |
696 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} | |
697 | Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} | |
698 | %description -n libradospp-devel | |
699 | This package contains C++ libraries and headers needed to develop programs | |
7c673cae FG |
700 | that use RADOS object store. |
701 | ||
702 | %package -n librgw2 | |
703 | Summary: RADOS gateway client library | |
704 | %if 0%{?suse_version} | |
705 | Group: System/Libraries | |
706 | %endif | |
31f18b77 | 707 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
708 | %description -n librgw2 |
709 | This package provides a library implementation of the RADOS gateway | |
710 | (distributed object store with S3 and Swift personalities). | |
711 | ||
712 | %package -n librgw-devel | |
713 | Summary: RADOS gateway client library | |
714 | %if 0%{?suse_version} | |
715 | Group: Development/Libraries/C and C++ | |
716 | %endif | |
31f18b77 FG |
717 | Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} |
718 | Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} | |
719 | Provides: librgw2-devel = %{_epoch_prefix}%{version}-%{release} | |
720 | Obsoletes: librgw2-devel < %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
721 | %description -n librgw-devel |
722 | This package contains libraries and headers needed to develop programs | |
723 | that use RADOS gateway client library. | |
724 | ||
11fdf7f2 | 725 | %if 0%{with python2} |
7c673cae FG |
726 | %package -n python-rgw |
727 | Summary: Python 2 libraries for the RADOS gateway | |
728 | %if 0%{?suse_version} | |
11fdf7f2 | 729 | Group: Development/Libraries/Python |
7c673cae | 730 | %endif |
31f18b77 FG |
731 | Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} |
732 | Requires: python-rados = %{_epoch_prefix}%{version}-%{release} | |
eafe8130 | 733 | %{?python_provide:%python_provide python-rgw} |
31f18b77 | 734 | Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
735 | %description -n python-rgw |
736 | This package contains Python 2 libraries for interacting with Cephs RADOS | |
737 | gateway. | |
11fdf7f2 | 738 | %endif |
7c673cae FG |
739 | |
740 | %package -n python%{python3_pkgversion}-rgw | |
741 | Summary: Python 3 libraries for the RADOS gateway | |
742 | %if 0%{?suse_version} | |
11fdf7f2 | 743 | Group: Development/Libraries/Python |
7c673cae | 744 | %endif |
31f18b77 FG |
745 | Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} |
746 | Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} | |
eafe8130 | 747 | %{?python_provide:%python_provide python%{python3_pkgversion}-rgw} |
81eedcae TL |
748 | %if 0%{without python2} |
749 | Provides: python-rgw = %{_epoch_prefix}%{version}-%{release} | |
750 | Obsoletes: python-rgw < %{_epoch_prefix}%{version}-%{release} | |
751 | %endif | |
7c673cae FG |
752 | %description -n python%{python3_pkgversion}-rgw |
753 | This package contains Python 3 libraries for interacting with Cephs RADOS | |
754 | gateway. | |
755 | ||
11fdf7f2 | 756 | %if 0%{with python2} |
7c673cae FG |
757 | %package -n python-rados |
758 | Summary: Python 2 libraries for the RADOS object store | |
759 | %if 0%{?suse_version} | |
11fdf7f2 | 760 | Group: Development/Libraries/Python |
7c673cae | 761 | %endif |
31f18b77 | 762 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
eafe8130 | 763 | %{?python_provide:%python_provide python-rados} |
31f18b77 | 764 | Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
765 | %description -n python-rados |
766 | This package contains Python 2 libraries for interacting with Cephs RADOS | |
767 | object store. | |
11fdf7f2 | 768 | %endif |
7c673cae FG |
769 | |
770 | %package -n python%{python3_pkgversion}-rados | |
771 | Summary: Python 3 libraries for the RADOS object store | |
772 | %if 0%{?suse_version} | |
11fdf7f2 | 773 | Group: Development/Libraries/Python |
7c673cae | 774 | %endif |
7c673cae | 775 | Requires: python%{python3_pkgversion} |
31f18b77 | 776 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
eafe8130 | 777 | %{?python_provide:%python_provide python%{python3_pkgversion}-rados} |
81eedcae TL |
778 | %if 0%{without python2} |
779 | Provides: python-rados = %{_epoch_prefix}%{version}-%{release} | |
780 | Obsoletes: python-rados < %{_epoch_prefix}%{version}-%{release} | |
781 | %endif | |
7c673cae FG |
782 | %description -n python%{python3_pkgversion}-rados |
783 | This package contains Python 3 libraries for interacting with Cephs RADOS | |
784 | object store. | |
785 | ||
11fdf7f2 | 786 | %if 0%{with libradosstriper} |
7c673cae FG |
787 | %package -n libradosstriper1 |
788 | Summary: RADOS striping interface | |
789 | %if 0%{?suse_version} | |
790 | Group: System/Libraries | |
791 | %endif | |
31f18b77 | 792 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
793 | %description -n libradosstriper1 |
794 | Striping interface built on top of the rados library, allowing | |
795 | to stripe bigger objects onto several standard rados objects using | |
796 | an interface very similar to the rados one. | |
797 | ||
798 | %package -n libradosstriper-devel | |
799 | Summary: RADOS striping interface headers | |
800 | %if 0%{?suse_version} | |
801 | Group: Development/Libraries/C and C++ | |
802 | %endif | |
31f18b77 FG |
803 | Requires: libradosstriper1 = %{_epoch_prefix}%{version}-%{release} |
804 | Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} | |
11fdf7f2 | 805 | Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release} |
31f18b77 FG |
806 | Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} |
807 | Provides: libradosstriper1-devel = %{_epoch_prefix}%{version}-%{release} | |
808 | Obsoletes: libradosstriper1-devel < %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
809 | %description -n libradosstriper-devel |
810 | This package contains libraries and headers needed to develop programs | |
811 | that use RADOS striping interface. | |
11fdf7f2 | 812 | %endif |
7c673cae FG |
813 | |
814 | %package -n librbd1 | |
815 | Summary: RADOS block device client library | |
816 | %if 0%{?suse_version} | |
817 | Group: System/Libraries | |
818 | %endif | |
31f18b77 FG |
819 | Requires: librados2 = %{_epoch_prefix}%{version}-%{release} |
820 | %if 0%{?suse_version} | |
821 | Requires(post): coreutils | |
822 | %endif | |
7c673cae | 823 | %if 0%{?rhel} || 0%{?fedora} |
31f18b77 | 824 | Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
825 | %endif |
826 | %description -n librbd1 | |
827 | RBD is a block device striped across multiple distributed objects in | |
828 | RADOS, a reliable, autonomic distributed object storage cluster | |
829 | developed as part of the Ceph distributed storage system. This is a | |
830 | shared library allowing applications to manage these block devices. | |
831 | ||
832 | %package -n librbd-devel | |
833 | Summary: RADOS block device headers | |
834 | %if 0%{?suse_version} | |
835 | Group: Development/Libraries/C and C++ | |
836 | %endif | |
31f18b77 FG |
837 | Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} |
838 | Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} | |
11fdf7f2 | 839 | Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release} |
31f18b77 FG |
840 | Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} |
841 | Provides: librbd1-devel = %{_epoch_prefix}%{version}-%{release} | |
842 | Obsoletes: librbd1-devel < %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
843 | %description -n librbd-devel |
844 | This package contains libraries and headers needed to develop programs | |
845 | that use RADOS block device. | |
846 | ||
11fdf7f2 | 847 | %if 0%{with python2} |
7c673cae FG |
848 | %package -n python-rbd |
849 | Summary: Python 2 libraries for the RADOS block device | |
850 | %if 0%{?suse_version} | |
11fdf7f2 | 851 | Group: Development/Libraries/Python |
7c673cae | 852 | %endif |
31f18b77 FG |
853 | Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} |
854 | Requires: python-rados = %{_epoch_prefix}%{version}-%{release} | |
eafe8130 | 855 | %{?python_provide:%python_provide python-rbd} |
31f18b77 | 856 | Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
857 | %description -n python-rbd |
858 | This package contains Python 2 libraries for interacting with Cephs RADOS | |
859 | block device. | |
11fdf7f2 | 860 | %endif |
7c673cae FG |
861 | |
862 | %package -n python%{python3_pkgversion}-rbd | |
863 | Summary: Python 3 libraries for the RADOS block device | |
864 | %if 0%{?suse_version} | |
11fdf7f2 | 865 | Group: Development/Libraries/Python |
7c673cae | 866 | %endif |
31f18b77 FG |
867 | Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} |
868 | Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} | |
eafe8130 | 869 | %{?python_provide:%python_provide python%{python3_pkgversion}-rbd} |
11fdf7f2 | 870 | Provides: python3-rbd = %{_epoch_prefix}%{version}-%{release} |
81eedcae TL |
871 | %if 0%{without python2} |
872 | Provides: python-rbd = %{_epoch_prefix}%{version}-%{release} | |
873 | Obsoletes: python-rbd < %{_epoch_prefix}%{version}-%{release} | |
874 | %endif | |
7c673cae FG |
875 | %description -n python%{python3_pkgversion}-rbd |
876 | This package contains Python 3 libraries for interacting with Cephs RADOS | |
877 | block device. | |
878 | ||
879 | %package -n libcephfs2 | |
880 | Summary: Ceph distributed file system client library | |
881 | %if 0%{?suse_version} | |
882 | Group: System/Libraries | |
883 | %endif | |
224ce89b | 884 | Obsoletes: libcephfs1 |
7c673cae | 885 | %if 0%{?rhel} || 0%{?fedora} |
31f18b77 | 886 | Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
887 | Obsoletes: ceph-libcephfs |
888 | %endif | |
889 | %description -n libcephfs2 | |
890 | Ceph is a distributed network file system designed to provide excellent | |
891 | performance, reliability, and scalability. This is a shared library | |
892 | allowing applications to access a Ceph distributed file system via a | |
893 | POSIX-like interface. | |
894 | ||
895 | %package -n libcephfs-devel | |
896 | Summary: Ceph distributed file system headers | |
897 | %if 0%{?suse_version} | |
898 | Group: Development/Libraries/C and C++ | |
899 | %endif | |
31f18b77 FG |
900 | Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} |
901 | Requires: librados-devel = %{_epoch_prefix}%{version}-%{release} | |
902 | Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} | |
903 | Provides: libcephfs2-devel = %{_epoch_prefix}%{version}-%{release} | |
904 | Obsoletes: libcephfs2-devel < %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
905 | %description -n libcephfs-devel |
906 | This package contains libraries and headers needed to develop programs | |
907 | that use Cephs distributed file system. | |
908 | ||
11fdf7f2 | 909 | %if 0%{with python2} |
7c673cae FG |
910 | %package -n python-cephfs |
911 | Summary: Python 2 libraries for Ceph distributed file system | |
912 | %if 0%{?suse_version} | |
11fdf7f2 | 913 | Group: Development/Libraries/Python |
7c673cae | 914 | %endif |
31f18b77 | 915 | Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} |
11fdf7f2 TL |
916 | Requires: python-rados = %{_epoch_prefix}%{version}-%{release} |
917 | Requires: python-ceph-argparse = %{_epoch_prefix}%{version}-%{release} | |
eafe8130 | 918 | %{?python_provide:%python_provide python-cephfs} |
31f18b77 | 919 | Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
920 | %description -n python-cephfs |
921 | This package contains Python 2 libraries for interacting with Cephs distributed | |
922 | file system. | |
11fdf7f2 | 923 | %endif |
7c673cae FG |
924 | |
925 | %package -n python%{python3_pkgversion}-cephfs | |
926 | Summary: Python 3 libraries for Ceph distributed file system | |
927 | %if 0%{?suse_version} | |
11fdf7f2 | 928 | Group: Development/Libraries/Python |
7c673cae | 929 | %endif |
31f18b77 FG |
930 | Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} |
931 | Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} | |
11fdf7f2 | 932 | Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release} |
eafe8130 | 933 | %{?python_provide:%python_provide python%{python3_pkgversion}-cephfs} |
81eedcae TL |
934 | %if 0%{without python2} |
935 | Provides: python-cephfs = %{_epoch_prefix}%{version}-%{release} | |
936 | Obsoletes: python-cephfs < %{_epoch_prefix}%{version}-%{release} | |
937 | %endif | |
7c673cae FG |
938 | %description -n python%{python3_pkgversion}-cephfs |
939 | This package contains Python 3 libraries for interacting with Cephs distributed | |
940 | file system. | |
941 | ||
11fdf7f2 TL |
942 | %if 0%{with python2} |
943 | %package -n python-ceph-argparse | |
944 | Summary: Python 2 utility libraries for Ceph CLI | |
945 | %if 0%{?suse_version} | |
946 | Group: Development/Libraries/Python | |
947 | %endif | |
948 | %description -n python-ceph-argparse | |
949 | This package contains types and routines for Python 2 used by the Ceph CLI as | |
950 | well as the RESTful interface. These have to do with querying the daemons for | |
951 | command-description information, validating user command input against those | |
952 | descriptions, and submitting the command to the appropriate daemon. | |
953 | %endif | |
954 | ||
7c673cae FG |
955 | %package -n python%{python3_pkgversion}-ceph-argparse |
956 | Summary: Python 3 utility libraries for Ceph CLI | |
957 | %if 0%{?suse_version} | |
11fdf7f2 | 958 | Group: Development/Libraries/Python |
7c673cae | 959 | %endif |
eafe8130 | 960 | %{?python_provide:%python_provide python%{python3_pkgversion}-ceph-argparse} |
7c673cae FG |
961 | %description -n python%{python3_pkgversion}-ceph-argparse |
962 | This package contains types and routines for Python 3 used by the Ceph CLI as | |
963 | well as the RESTful interface. These have to do with querying the daemons for | |
964 | command-description information, validating user command input against those | |
965 | descriptions, and submitting the command to the appropriate daemon. | |
966 | ||
11fdf7f2 TL |
967 | %if 0%{with cephfs_shell} |
968 | %package -n cephfs-shell | |
969 | Summary: Interactive shell for Ceph file system | |
970 | Requires: python%{python3_pkgversion}-cmd2 | |
971 | Requires: python%{python3_pkgversion}-colorama | |
972 | Requires: python%{python3_pkgversion}-cephfs | |
973 | %description -n cephfs-shell | |
974 | This package contains an interactive tool that allows accessing a Ceph | |
975 | file system without mounting it by providing a nice pseudo-shell which | |
976 | works like an FTP client. | |
977 | %endif | |
978 | ||
7c673cae FG |
979 | %if 0%{with ceph_test_package} |
980 | %package -n ceph-test | |
981 | Summary: Ceph benchmarks and test tools | |
982 | %if 0%{?suse_version} | |
983 | Group: System/Benchmark | |
984 | %endif | |
b32b8144 | 985 | Requires: ceph-common = %{_epoch_prefix}%{version}-%{release} |
7c673cae | 986 | Requires: xmlstarlet |
31f18b77 | 987 | Requires: jq |
c07f9fc5 | 988 | Requires: socat |
7c673cae FG |
989 | %description -n ceph-test |
990 | This package contains Ceph benchmarks and test tools. | |
991 | %endif | |
992 | ||
993 | %if 0%{with cephfs_java} | |
994 | ||
995 | %package -n libcephfs_jni1 | |
996 | Summary: Java Native Interface library for CephFS Java bindings | |
997 | %if 0%{?suse_version} | |
998 | Group: System/Libraries | |
999 | %endif | |
7c673cae | 1000 | Requires: java |
31f18b77 | 1001 | Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
1002 | %description -n libcephfs_jni1 |
1003 | This package contains the Java Native Interface library for CephFS Java | |
1004 | bindings. | |
1005 | ||
1006 | %package -n libcephfs_jni-devel | |
1007 | Summary: Development files for CephFS Java Native Interface library | |
1008 | %if 0%{?suse_version} | |
1009 | Group: Development/Libraries/Java | |
1010 | %endif | |
7c673cae | 1011 | Requires: java |
31f18b77 FG |
1012 | Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release} |
1013 | Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release} | |
1014 | Provides: libcephfs_jni1-devel = %{_epoch_prefix}%{version}-%{release} | |
1015 | Obsoletes: libcephfs_jni1-devel < %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
1016 | %description -n libcephfs_jni-devel |
1017 | This package contains the development files for CephFS Java Native Interface | |
1018 | library. | |
1019 | ||
1020 | %package -n cephfs-java | |
1021 | Summary: Java libraries for the Ceph File System | |
1022 | %if 0%{?suse_version} | |
1023 | Group: System/Libraries | |
1024 | %endif | |
7c673cae | 1025 | Requires: java |
31f18b77 | 1026 | Requires: libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
1027 | Requires: junit |
1028 | BuildRequires: junit | |
1029 | %description -n cephfs-java | |
1030 | This package contains the Java libraries for the Ceph File System. | |
1031 | ||
1032 | %endif | |
1033 | ||
1034 | %package -n rados-objclass-devel | |
1035 | Summary: RADOS object class development kit | |
11fdf7f2 TL |
1036 | %if 0%{?suse_version} |
1037 | Group: Development/Libraries/C and C++ | |
1038 | %endif | |
1039 | Requires: libradospp-devel = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
1040 | %description -n rados-objclass-devel |
1041 | This package contains libraries and headers needed to develop RADOS object | |
1042 | class plugins. | |
1043 | ||
1044 | %if 0%{with selinux} | |
1045 | ||
1046 | %package selinux | |
1047 | Summary: SELinux support for Ceph MON, OSD and MDS | |
1048 | %if 0%{?suse_version} | |
1049 | Group: System/Filesystems | |
1050 | %endif | |
31f18b77 | 1051 | Requires: ceph-base = %{_epoch_prefix}%{version}-%{release} |
7c673cae | 1052 | Requires: policycoreutils, libselinux-utils |
31f18b77 | 1053 | Requires(post): ceph-base = %{_epoch_prefix}%{version}-%{release} |
7c673cae FG |
1054 | Requires(post): selinux-policy-base >= %{_selinux_policy_version}, policycoreutils, gawk |
1055 | Requires(postun): policycoreutils | |
1056 | %description selinux | |
1057 | This package contains SELinux support for Ceph MON, OSD and MDS. The package | |
1058 | also performs file-system relabelling which can take a long time on heavily | |
1059 | populated file-systems. | |
1060 | ||
1061 | %endif | |
1062 | ||
11fdf7f2 | 1063 | %if 0%{with python2} |
7c673cae FG |
1064 | %package -n python-ceph-compat |
1065 | Summary: Compatibility package for Cephs python libraries | |
1066 | %if 0%{?suse_version} | |
11fdf7f2 | 1067 | Group: Development/Libraries/Python |
7c673cae | 1068 | %endif |
7c673cae | 1069 | Obsoletes: python-ceph |
31f18b77 FG |
1070 | Requires: python-rados = %{_epoch_prefix}%{version}-%{release} |
1071 | Requires: python-rbd = %{_epoch_prefix}%{version}-%{release} | |
1072 | Requires: python-cephfs = %{_epoch_prefix}%{version}-%{release} | |
1073 | Requires: python-rgw = %{_epoch_prefix}%{version}-%{release} | |
7c673cae FG |
1074 | Provides: python-ceph |
1075 | %description -n python-ceph-compat | |
1076 | This is a compatibility package to accommodate python-ceph split into | |
1077 | python-rados, python-rbd, python-rgw and python-cephfs. Packages still | |
1078 | depending on python-ceph should be fixed to depend on python-rados, | |
1079 | python-rbd, python-rgw or python-cephfs instead. | |
11fdf7f2 TL |
1080 | %endif |
1081 | ||
1082 | %package grafana-dashboards | |
1083 | Summary: The set of Grafana dashboards for monitoring purposes | |
1084 | BuildArch: noarch | |
1085 | %if 0%{?suse_version} | |
1086 | Group: System/Filesystems | |
1087 | %endif | |
1088 | %description grafana-dashboards | |
1089 | This package provides a set of Grafana dashboards for monitoring of | |
1090 | Ceph clusters. The dashboards require a Prometheus server setup | |
1091 | collecting data from Ceph Manager "prometheus" module and Prometheus | |
1092 | project "node_exporter" module. The dashboards are designed to be | |
1093 | integrated with the Ceph Manager Dashboard web UI. | |
7c673cae | 1094 | |
81eedcae TL |
1095 | %if 0%{?suse_version} |
1096 | %package prometheus-alerts | |
1097 | Summary: Prometheus alerts for a Ceph deplyoment | |
1098 | BuildArch: noarch | |
1099 | Group: System/Monitoring | |
1100 | %description prometheus-alerts | |
1101 | This package provides Ceph’s default alerts for Prometheus. | |
1102 | %endif | |
1103 | ||
7c673cae FG |
1104 | ################################################################################# |
1105 | # common | |
1106 | ################################################################################# | |
1107 | %prep | |
eafe8130 | 1108 | %autosetup -p1 -n ceph-14.2.5 |
7c673cae FG |
1109 | |
1110 | %build | |
81eedcae TL |
1111 | # LTO can be enabled as soon as the following GCC bug is fixed: |
1112 | # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200 | |
1113 | %define _lto_cflags %{nil} | |
11fdf7f2 TL |
1114 | |
1115 | %if 0%{?rhel} == 7 | |
eafe8130 | 1116 | . /opt/rh/devtoolset-8/enable |
11fdf7f2 TL |
1117 | %endif |
1118 | ||
7c673cae FG |
1119 | %if 0%{with cephfs_java} |
1120 | # Find jni.h | |
1121 | for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do | |
1122 | [ -d $i ] && java_inc="$java_inc -I$i" | |
1123 | done | |
1124 | %endif | |
1125 | ||
11fdf7f2 TL |
1126 | %if 0%{?suse_version} |
1127 | # the following setting fixed an OOM condition we once encountered in the OBS | |
7c673cae FG |
1128 | RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768" |
1129 | %endif | |
7c673cae FG |
1130 | |
1131 | export CPPFLAGS="$java_inc" | |
1132 | export CFLAGS="$RPM_OPT_FLAGS" | |
1133 | export CXXFLAGS="$RPM_OPT_FLAGS" | |
f64942e4 | 1134 | export LDFLAGS="$RPM_LD_FLAGS" |
7c673cae | 1135 | |
11fdf7f2 TL |
1136 | # Parallel build settings ... |
1137 | CEPH_MFLAGS_JOBS="%{?_smp_mflags}" | |
1138 | CEPH_SMP_NCPUS=$(echo "$CEPH_MFLAGS_JOBS" | sed 's/-j//') | |
1139 | %if 0%{?__isa_bits} == 32 | |
1140 | # 32-bit builds can use 3G memory max, which is not enough even for -j2 | |
1141 | CEPH_SMP_NCPUS="1" | |
1142 | %endif | |
1143 | # do not eat all memory | |
1144 | echo "Available memory:" | |
1145 | free -h | |
1146 | echo "System limits:" | |
1147 | ulimit -a | |
1148 | if test -n "$CEPH_SMP_NCPUS" -a "$CEPH_SMP_NCPUS" -gt 1 ; then | |
eafe8130 | 1149 | mem_per_process=2500 |
11fdf7f2 TL |
1150 | max_mem=$(LANG=C free -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p") |
1151 | max_jobs="$(($max_mem / $mem_per_process))" | |
1152 | test "$CEPH_SMP_NCPUS" -gt "$max_jobs" && CEPH_SMP_NCPUS="$max_jobs" && echo "Warning: Reducing build parallelism to -j$max_jobs because of memory limits" | |
1153 | test "$CEPH_SMP_NCPUS" -le 0 && CEPH_SMP_NCPUS="1" && echo "Warning: Not using parallel build at all because of memory limits" | |
1154 | fi | |
1155 | export CEPH_SMP_NCPUS | |
1156 | export CEPH_MFLAGS_JOBS="-j$CEPH_SMP_NCPUS" | |
7c673cae | 1157 | |
11fdf7f2 | 1158 | env | sort |
7c673cae FG |
1159 | |
1160 | mkdir build | |
1161 | cd build | |
11fdf7f2 TL |
1162 | %if 0%{?rhel} == 7 |
1163 | CMAKE=cmake3 | |
1164 | %else | |
1165 | CMAKE=cmake | |
1166 | %endif | |
1167 | ${CMAKE} .. \ | |
7c673cae FG |
1168 | -DCMAKE_INSTALL_PREFIX=%{_prefix} \ |
1169 | -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ | |
1170 | -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \ | |
1171 | -DCMAKE_INSTALL_LOCALSTATEDIR=%{_localstatedir} \ | |
1172 | -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \ | |
1173 | -DCMAKE_INSTALL_MANDIR=%{_mandir} \ | |
1174 | -DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \ | |
c07f9fc5 | 1175 | -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \ |
7c673cae | 1176 | -DWITH_MANPAGE=ON \ |
11fdf7f2 TL |
1177 | -DWITH_PYTHON3=%{python3_version} \ |
1178 | -DWITH_MGR_DASHBOARD_FRONTEND=OFF \ | |
1179 | %if %{with python2} | |
1180 | -DWITH_PYTHON2=ON \ | |
1181 | %else | |
1182 | -DWITH_PYTHON2=OFF \ | |
1183 | -DMGR_PYTHON_VERSION=3 \ | |
7c673cae | 1184 | %endif |
7c673cae FG |
1185 | %if 0%{without ceph_test_package} |
1186 | -DWITH_TESTS=OFF \ | |
1187 | %endif | |
1188 | %if 0%{with cephfs_java} | |
1189 | -DWITH_CEPHFS_JAVA=ON \ | |
1190 | %endif | |
1191 | %if 0%{with selinux} | |
1192 | -DWITH_SELINUX=ON \ | |
1193 | %endif | |
1194 | %if %{with lttng} | |
1195 | -DWITH_LTTNG=ON \ | |
c07f9fc5 | 1196 | -DWITH_BABELTRACE=ON \ |
7c673cae FG |
1197 | %else |
1198 | -DWITH_LTTNG=OFF \ | |
c07f9fc5 | 1199 | -DWITH_BABELTRACE=OFF \ |
7c673cae FG |
1200 | %endif |
1201 | $CEPH_EXTRA_CMAKE_ARGS \ | |
1202 | %if 0%{with ocf} | |
1203 | -DWITH_OCF=ON \ | |
31f18b77 FG |
1204 | %endif |
1205 | %ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64 | |
b32b8144 | 1206 | -DWITH_BOOST_CONTEXT=ON \ |
31f18b77 | 1207 | %else |
b32b8144 | 1208 | -DWITH_BOOST_CONTEXT=OFF \ |
7c673cae | 1209 | %endif |
11fdf7f2 TL |
1210 | %if 0%{with cephfs_shell} |
1211 | -DWITH_CEPHFS_SHELL=ON \ | |
1212 | %endif | |
1213 | %if 0%{with libradosstriper} | |
1214 | -DWITH_LIBRADOSSTRIPER=ON \ | |
1215 | %else | |
1216 | -DWITH_LIBRADOSSTRIPER=OFF \ | |
1217 | %endif | |
1218 | %if 0%{with amqp_endpoint} | |
1219 | -DWITH_RADOSGW_AMQP_ENDPOINT=ON \ | |
1220 | %else | |
1221 | -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \ | |
1222 | %endif | |
1223 | -DBOOST_J=$CEPH_SMP_NCPUS \ | |
1224 | -DWITH_GRAFANA=ON | |
7c673cae | 1225 | |
11fdf7f2 | 1226 | make "$CEPH_MFLAGS_JOBS" |
7c673cae FG |
1227 | |
1228 | ||
1229 | %if 0%{with make_check} | |
1230 | %check | |
1231 | # run in-tree unittests | |
1232 | cd build | |
11fdf7f2 | 1233 | ctest "$CEPH_MFLAGS_JOBS" |
7c673cae FG |
1234 | %endif |
1235 | ||
1236 | ||
7c673cae FG |
1237 | %install |
1238 | pushd build | |
1239 | make DESTDIR=%{buildroot} install | |
1240 | # we have dropped sysvinit bits | |
1241 | rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph | |
1242 | popd | |
1243 | install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap | |
1244 | %if 0%{?fedora} || 0%{?rhel} | |
1245 | install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph | |
1246 | %endif | |
1247 | %if 0%{?suse_version} | |
11fdf7f2 | 1248 | install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_fillupdir}/sysconfig.%{name} |
7c673cae FG |
1249 | %endif |
1250 | install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf | |
7c673cae FG |
1251 | install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset |
1252 | mkdir -p %{buildroot}%{_sbindir} | |
1253 | install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph | |
1254 | chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf | |
31f18b77 | 1255 | install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING |
b32b8144 | 1256 | install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf |
7c673cae FG |
1257 | |
1258 | # firewall templates and /sbin/mount.ceph symlink | |
1259 | %if 0%{?suse_version} | |
7c673cae FG |
1260 | mkdir -p %{buildroot}/sbin |
1261 | ln -sf %{_sbindir}/mount.ceph %{buildroot}/sbin/mount.ceph | |
1262 | %endif | |
1263 | ||
1264 | # udev rules | |
1265 | install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules | |
11fdf7f2 TL |
1266 | |
1267 | # sudoers.d | |
1268 | install -m 0600 -D sudoers.d/ceph-osd-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-osd-smartctl | |
7c673cae FG |
1269 | |
1270 | #set up placeholder directories | |
1271 | mkdir -p %{buildroot}%{_sysconfdir}/ceph | |
1272 | mkdir -p %{buildroot}%{_localstatedir}/run/ceph | |
1273 | mkdir -p %{buildroot}%{_localstatedir}/log/ceph | |
1274 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp | |
1275 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon | |
1276 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/osd | |
1277 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mds | |
1278 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mgr | |
11fdf7f2 TL |
1279 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash |
1280 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash/posted | |
7c673cae FG |
1281 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/radosgw |
1282 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-osd | |
1283 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds | |
1284 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw | |
1285 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mgr | |
d2e6a577 | 1286 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd |
11fdf7f2 | 1287 | mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror |
7c673cae FG |
1288 | |
1289 | %if 0%{?suse_version} | |
1290 | # create __pycache__ directories and their contents | |
1291 | %py3_compile %{buildroot}%{python3_sitelib} | |
81eedcae TL |
1292 | # prometheus alerts |
1293 | install -m 644 -D monitoring/prometheus/alerts/ceph_default_alerts.yml %{buildroot}/etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml | |
eafe8130 TL |
1294 | # hardlink duplicate files under /usr to save space |
1295 | %fdupes %{buildroot}%{_prefix} | |
7c673cae | 1296 | %endif |
eafe8130 | 1297 | |
11fdf7f2 TL |
1298 | %if 0%{?rhel} == 8 |
1299 | %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib} | |
1300 | %endif | |
7c673cae FG |
1301 | |
1302 | %clean | |
1303 | rm -rf %{buildroot} | |
1304 | ||
1305 | ################################################################################# | |
1306 | # files and systemd scriptlets | |
1307 | ################################################################################# | |
1308 | %files | |
1309 | ||
1310 | %files base | |
11fdf7f2 | 1311 | %{_bindir}/ceph-crash |
7c673cae FG |
1312 | %{_bindir}/crushtool |
1313 | %{_bindir}/monmaptool | |
1314 | %{_bindir}/osdmaptool | |
b32b8144 | 1315 | %{_bindir}/ceph-kvstore-tool |
7c673cae | 1316 | %{_bindir}/ceph-run |
7c673cae FG |
1317 | %{_libexecdir}/systemd/system-preset/50-ceph.preset |
1318 | %{_sbindir}/ceph-create-keys | |
7c673cae FG |
1319 | %dir %{_libexecdir}/ceph |
1320 | %{_libexecdir}/ceph/ceph_common.sh | |
1321 | %dir %{_libdir}/rados-classes | |
1322 | %{_libdir}/rados-classes/* | |
1323 | %dir %{_libdir}/ceph | |
1324 | %dir %{_libdir}/ceph/erasure-code | |
1325 | %{_libdir}/ceph/erasure-code/libec_*.so* | |
1326 | %dir %{_libdir}/ceph/compressor | |
1327 | %{_libdir}/ceph/compressor/libceph_*.so* | |
11fdf7f2 | 1328 | %{_unitdir}/ceph-crash.service |
7c673cae FG |
1329 | %dir %{_libdir}/ceph/crypto |
1330 | %{_libdir}/ceph/crypto/libceph_*.so* | |
7c673cae FG |
1331 | %if %{with lttng} |
1332 | %{_libdir}/libos_tp.so* | |
1333 | %{_libdir}/libosd_tp.so* | |
1334 | %endif | |
7c673cae FG |
1335 | %config(noreplace) %{_sysconfdir}/logrotate.d/ceph |
1336 | %if 0%{?fedora} || 0%{?rhel} | |
1337 | %config(noreplace) %{_sysconfdir}/sysconfig/ceph | |
1338 | %endif | |
1339 | %if 0%{?suse_version} | |
11fdf7f2 | 1340 | %{_fillupdir}/sysconfig.* |
7c673cae FG |
1341 | %endif |
1342 | %{_unitdir}/ceph.target | |
11fdf7f2 | 1343 | %if 0%{with python2} |
d2e6a577 FG |
1344 | %dir %{python_sitelib}/ceph_volume |
1345 | %{python_sitelib}/ceph_volume/* | |
1346 | %{python_sitelib}/ceph_volume-* | |
11fdf7f2 TL |
1347 | %else |
1348 | %dir %{python3_sitelib}/ceph_volume | |
1349 | %{python3_sitelib}/ceph_volume/* | |
1350 | %{python3_sitelib}/ceph_volume-* | |
1351 | %endif | |
7c673cae | 1352 | %{_mandir}/man8/ceph-deploy.8* |
7c673cae FG |
1353 | %{_mandir}/man8/ceph-create-keys.8* |
1354 | %{_mandir}/man8/ceph-run.8* | |
1355 | %{_mandir}/man8/crushtool.8* | |
1356 | %{_mandir}/man8/osdmaptool.8* | |
1357 | %{_mandir}/man8/monmaptool.8* | |
b32b8144 | 1358 | %{_mandir}/man8/ceph-kvstore-tool.8* |
7c673cae | 1359 | #set up placeholder directories |
11fdf7f2 TL |
1360 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash |
1361 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash/posted | |
7c673cae FG |
1362 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/tmp |
1363 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd | |
1364 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mds | |
1365 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rgw | |
1366 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mgr | |
d2e6a577 | 1367 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd |
11fdf7f2 | 1368 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd-mirror |
7c673cae FG |
1369 | |
1370 | %post base | |
1371 | /sbin/ldconfig | |
1372 | %if 0%{?suse_version} | |
1373 | %fillup_only | |
1374 | if [ $1 -eq 1 ] ; then | |
11fdf7f2 | 1375 | /usr/bin/systemctl preset ceph.target ceph-crash.service >/dev/null 2>&1 || : |
7c673cae FG |
1376 | fi |
1377 | %endif | |
1378 | %if 0%{?fedora} || 0%{?rhel} | |
11fdf7f2 | 1379 | %systemd_post ceph.target ceph-crash.service |
7c673cae FG |
1380 | %endif |
1381 | if [ $1 -eq 1 ] ; then | |
11fdf7f2 | 1382 | /usr/bin/systemctl start ceph.target ceph-crash.service >/dev/null 2>&1 || : |
7c673cae FG |
1383 | fi |
1384 | ||
1385 | %preun base | |
1386 | %if 0%{?suse_version} | |
11fdf7f2 | 1387 | %service_del_preun ceph.target ceph-crash.service |
7c673cae FG |
1388 | %endif |
1389 | %if 0%{?fedora} || 0%{?rhel} | |
11fdf7f2 | 1390 | %systemd_preun ceph.target ceph-crash.service |
7c673cae FG |
1391 | %endif |
1392 | ||
1393 | %postun base | |
1394 | /sbin/ldconfig | |
1395 | %if 0%{?suse_version} | |
1396 | DISABLE_RESTART_ON_UPDATE="yes" | |
11fdf7f2 | 1397 | %service_del_postun ceph.target |
7c673cae FG |
1398 | %endif |
1399 | %if 0%{?fedora} || 0%{?rhel} | |
11fdf7f2 | 1400 | %systemd_postun ceph.target |
7c673cae | 1401 | %endif |
11fdf7f2 | 1402 | if [ $1 -ge 1 ] ; then |
31f18b77 FG |
1403 | # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to |
1404 | # "yes". In any case: if units are not running, do not touch them. | |
1405 | SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph | |
1406 | if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then | |
1407 | source $SYSCONF_CEPH | |
1408 | fi | |
31f18b77 | 1409 | fi |
7c673cae FG |
1410 | |
1411 | %files common | |
224ce89b | 1412 | %dir %{_docdir}/ceph |
31f18b77 | 1413 | %doc %{_docdir}/ceph/sample.ceph.conf |
11fdf7f2 | 1414 | %license %{_docdir}/ceph/COPYING |
7c673cae FG |
1415 | %{_bindir}/ceph |
1416 | %{_bindir}/ceph-authtool | |
1417 | %{_bindir}/ceph-conf | |
1418 | %{_bindir}/ceph-dencoder | |
1419 | %{_bindir}/ceph-rbdnamer | |
1420 | %{_bindir}/ceph-syn | |
7c673cae FG |
1421 | %{_bindir}/cephfs-data-scan |
1422 | %{_bindir}/cephfs-journal-tool | |
1423 | %{_bindir}/cephfs-table-tool | |
1424 | %{_bindir}/rados | |
1425 | %{_bindir}/radosgw-admin | |
1426 | %{_bindir}/rbd | |
1427 | %{_bindir}/rbd-replay | |
1428 | %{_bindir}/rbd-replay-many | |
1429 | %{_bindir}/rbdmap | |
1430 | %{_sbindir}/mount.ceph | |
1431 | %if 0%{?suse_version} | |
1432 | /sbin/mount.ceph | |
1433 | %endif | |
1434 | %if %{with lttng} | |
1435 | %{_bindir}/rbd-replay-prep | |
1436 | %endif | |
1437 | %{_bindir}/ceph-post-file | |
7c673cae FG |
1438 | %{_tmpfilesdir}/ceph-common.conf |
1439 | %{_mandir}/man8/ceph-authtool.8* | |
1440 | %{_mandir}/man8/ceph-conf.8* | |
1441 | %{_mandir}/man8/ceph-dencoder.8* | |
1442 | %{_mandir}/man8/ceph-rbdnamer.8* | |
1443 | %{_mandir}/man8/ceph-syn.8* | |
1444 | %{_mandir}/man8/ceph-post-file.8* | |
1445 | %{_mandir}/man8/ceph.8* | |
1446 | %{_mandir}/man8/mount.ceph.8* | |
1447 | %{_mandir}/man8/rados.8* | |
1448 | %{_mandir}/man8/radosgw-admin.8* | |
1449 | %{_mandir}/man8/rbd.8* | |
1450 | %{_mandir}/man8/rbdmap.8* | |
1451 | %{_mandir}/man8/rbd-replay.8* | |
1452 | %{_mandir}/man8/rbd-replay-many.8* | |
1453 | %{_mandir}/man8/rbd-replay-prep.8* | |
1454 | %dir %{_datadir}/ceph/ | |
1455 | %{_datadir}/ceph/known_hosts_drop.ceph.com | |
1456 | %{_datadir}/ceph/id_rsa_drop.ceph.com | |
1457 | %{_datadir}/ceph/id_rsa_drop.ceph.com.pub | |
1458 | %dir %{_sysconfdir}/ceph/ | |
31f18b77 | 1459 | %config %{_sysconfdir}/bash_completion.d/ceph |
7c673cae FG |
1460 | %config %{_sysconfdir}/bash_completion.d/rados |
1461 | %config %{_sysconfdir}/bash_completion.d/rbd | |
1462 | %config %{_sysconfdir}/bash_completion.d/radosgw-admin | |
1463 | %config(noreplace) %{_sysconfdir}/ceph/rbdmap | |
1464 | %{_unitdir}/rbdmap.service | |
7c673cae FG |
1465 | %dir %{_udevrulesdir} |
1466 | %{_udevrulesdir}/50-rbd.rules | |
1467 | %attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/ | |
1468 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/ | |
1469 | ||
1470 | %pre common | |
1471 | CEPH_GROUP_ID=167 | |
1472 | CEPH_USER_ID=167 | |
1473 | %if 0%{?rhel} || 0%{?fedora} | |
1474 | /usr/sbin/groupadd ceph -g $CEPH_GROUP_ID -o -r 2>/dev/null || : | |
1475 | /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 || : | |
1476 | %endif | |
1477 | %if 0%{?suse_version} | |
1478 | if ! getent group ceph >/dev/null ; then | |
1479 | CEPH_GROUP_ID_OPTION="" | |
1480 | getent group $CEPH_GROUP_ID >/dev/null || CEPH_GROUP_ID_OPTION="-g $CEPH_GROUP_ID" | |
1481 | groupadd ceph $CEPH_GROUP_ID_OPTION -r 2>/dev/null || : | |
1482 | fi | |
1483 | if ! getent passwd ceph >/dev/null ; then | |
1484 | CEPH_USER_ID_OPTION="" | |
1485 | getent passwd $CEPH_USER_ID >/dev/null || CEPH_USER_ID_OPTION="-u $CEPH_USER_ID" | |
1486 | useradd ceph $CEPH_USER_ID_OPTION -r -g ceph -s /sbin/nologin 2>/dev/null || : | |
1487 | fi | |
1488 | usermod -c "Ceph storage service" \ | |
1489 | -d %{_localstatedir}/lib/ceph \ | |
1490 | -g ceph \ | |
1491 | -s /sbin/nologin \ | |
1492 | ceph | |
1493 | %endif | |
1494 | exit 0 | |
1495 | ||
1496 | %post common | |
1497 | %tmpfiles_create %{_tmpfilesdir}/ceph-common.conf | |
1498 | ||
1499 | %postun common | |
1500 | # Package removal cleanup | |
1501 | if [ "$1" -eq "0" ] ; then | |
1502 | rm -rf %{_localstatedir}/log/ceph | |
1503 | rm -rf %{_sysconfdir}/ceph | |
1504 | fi | |
1505 | ||
1506 | %files mds | |
1507 | %{_bindir}/ceph-mds | |
1508 | %{_mandir}/man8/ceph-mds.8* | |
1509 | %{_unitdir}/ceph-mds@.service | |
1510 | %{_unitdir}/ceph-mds.target | |
1511 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mds | |
1512 | ||
1513 | %post mds | |
1514 | %if 0%{?suse_version} | |
1515 | if [ $1 -eq 1 ] ; then | |
1516 | /usr/bin/systemctl preset ceph-mds@\*.service ceph-mds.target >/dev/null 2>&1 || : | |
1517 | fi | |
1518 | %endif | |
1519 | %if 0%{?fedora} || 0%{?rhel} | |
1520 | %systemd_post ceph-mds@\*.service ceph-mds.target | |
1521 | %endif | |
1522 | if [ $1 -eq 1 ] ; then | |
1523 | /usr/bin/systemctl start ceph-mds.target >/dev/null 2>&1 || : | |
1524 | fi | |
1525 | ||
1526 | %preun mds | |
1527 | %if 0%{?suse_version} | |
1528 | %service_del_preun ceph-mds@\*.service ceph-mds.target | |
1529 | %endif | |
1530 | %if 0%{?fedora} || 0%{?rhel} | |
1531 | %systemd_preun ceph-mds@\*.service ceph-mds.target | |
1532 | %endif | |
1533 | ||
1534 | %postun mds | |
7c673cae FG |
1535 | %if 0%{?suse_version} |
1536 | DISABLE_RESTART_ON_UPDATE="yes" | |
1537 | %service_del_postun ceph-mds@\*.service ceph-mds.target | |
1538 | %endif | |
1539 | %if 0%{?fedora} || 0%{?rhel} | |
1540 | %systemd_postun ceph-mds@\*.service ceph-mds.target | |
1541 | %endif | |
11fdf7f2 | 1542 | if [ $1 -ge 1 ] ; then |
7c673cae FG |
1543 | # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to |
1544 | # "yes". In any case: if units are not running, do not touch them. | |
1545 | SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph | |
1546 | if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then | |
1547 | source $SYSCONF_CEPH | |
1548 | fi | |
1549 | if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then | |
1550 | /usr/bin/systemctl try-restart ceph-mds@\*.service > /dev/null 2>&1 || : | |
1551 | fi | |
1552 | fi | |
1553 | ||
1554 | %files mgr | |
1555 | %{_bindir}/ceph-mgr | |
11fdf7f2 TL |
1556 | %dir %{_datadir}/ceph/mgr |
1557 | %{_datadir}/ceph/mgr/ansible | |
1558 | %{_datadir}/ceph/mgr/balancer | |
1559 | %{_datadir}/ceph/mgr/crash | |
1560 | %{_datadir}/ceph/mgr/deepsea | |
1561 | %{_datadir}/ceph/mgr/devicehealth | |
1562 | %{_datadir}/ceph/mgr/influx | |
1563 | %{_datadir}/ceph/mgr/insights | |
1564 | %{_datadir}/ceph/mgr/iostat | |
1565 | %{_datadir}/ceph/mgr/localpool | |
1566 | %{_datadir}/ceph/mgr/mgr_module.* | |
1567 | %{_datadir}/ceph/mgr/mgr_util.* | |
1568 | %{_datadir}/ceph/mgr/orchestrator_cli | |
1569 | %{_datadir}/ceph/mgr/orchestrator.* | |
1570 | %{_datadir}/ceph/mgr/osd_perf_query | |
1571 | %{_datadir}/ceph/mgr/pg_autoscaler | |
1572 | %{_datadir}/ceph/mgr/progress | |
1573 | %{_datadir}/ceph/mgr/prometheus | |
1574 | %{_datadir}/ceph/mgr/rbd_support | |
1575 | %{_datadir}/ceph/mgr/restful | |
1576 | %{_datadir}/ceph/mgr/selftest | |
1577 | %{_datadir}/ceph/mgr/status | |
1578 | %{_datadir}/ceph/mgr/telegraf | |
1579 | %{_datadir}/ceph/mgr/telemetry | |
1580 | %{_datadir}/ceph/mgr/test_orchestrator | |
1581 | %{_datadir}/ceph/mgr/volumes | |
1582 | %{_datadir}/ceph/mgr/zabbix | |
7c673cae FG |
1583 | %{_unitdir}/ceph-mgr@.service |
1584 | %{_unitdir}/ceph-mgr.target | |
1585 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mgr | |
1586 | ||
1587 | %post mgr | |
1588 | %if 0%{?suse_version} | |
1589 | if [ $1 -eq 1 ] ; then | |
1590 | /usr/bin/systemctl preset ceph-mgr@\*.service ceph-mgr.target >/dev/null 2>&1 || : | |
1591 | fi | |
1592 | %endif | |
1593 | %if 0%{?fedora} || 0%{?rhel} | |
1594 | %systemd_post ceph-mgr@\*.service ceph-mgr.target | |
1595 | %endif | |
1596 | if [ $1 -eq 1 ] ; then | |
1597 | /usr/bin/systemctl start ceph-mgr.target >/dev/null 2>&1 || : | |
1598 | fi | |
1599 | ||
1600 | %preun mgr | |
1601 | %if 0%{?suse_version} | |
1602 | %service_del_preun ceph-mgr@\*.service ceph-mgr.target | |
1603 | %endif | |
1604 | %if 0%{?fedora} || 0%{?rhel} | |
1605 | %systemd_preun ceph-mgr@\*.service ceph-mgr.target | |
1606 | %endif | |
1607 | ||
1608 | %postun mgr | |
7c673cae FG |
1609 | %if 0%{?suse_version} |
1610 | DISABLE_RESTART_ON_UPDATE="yes" | |
1611 | %service_del_postun ceph-mgr@\*.service ceph-mgr.target | |
1612 | %endif | |
1613 | %if 0%{?fedora} || 0%{?rhel} | |
1614 | %systemd_postun ceph-mgr@\*.service ceph-mgr.target | |
1615 | %endif | |
11fdf7f2 | 1616 | if [ $1 -ge 1 ] ; then |
7c673cae FG |
1617 | # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to |
1618 | # "yes". In any case: if units are not running, do not touch them. | |
1619 | SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph | |
1620 | if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then | |
1621 | source $SYSCONF_CEPH | |
1622 | fi | |
1623 | if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then | |
1624 | /usr/bin/systemctl try-restart ceph-mgr@\*.service > /dev/null 2>&1 || : | |
1625 | fi | |
1626 | fi | |
1627 | ||
11fdf7f2 TL |
1628 | %files mgr-dashboard |
1629 | %{_datadir}/ceph/mgr/dashboard | |
1630 | ||
1631 | %post mgr-dashboard | |
1632 | if [ $1 -eq 1 ] ; then | |
1633 | /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : | |
1634 | fi | |
1635 | ||
1636 | %postun mgr-dashboard | |
1637 | if [ $1 -eq 1 ] ; then | |
1638 | /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : | |
1639 | fi | |
1640 | ||
1641 | %files mgr-diskprediction-local | |
1642 | %{_datadir}/ceph/mgr/diskprediction_local | |
1643 | ||
1644 | %post mgr-diskprediction-local | |
1645 | if [ $1 -eq 1 ] ; then | |
1646 | /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : | |
1647 | fi | |
1648 | ||
1649 | %postun mgr-diskprediction-local | |
1650 | if [ $1 -eq 1 ] ; then | |
1651 | /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : | |
1652 | fi | |
1653 | ||
1654 | %files mgr-diskprediction-cloud | |
1655 | %{_datadir}/ceph/mgr/diskprediction_cloud | |
1656 | ||
1657 | %post mgr-diskprediction-cloud | |
1658 | if [ $1 -eq 1 ] ; then | |
1659 | /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : | |
1660 | fi | |
1661 | ||
1662 | %postun mgr-diskprediction-cloud | |
1663 | if [ $1 -eq 1 ] ; then | |
1664 | /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : | |
1665 | fi | |
1666 | ||
1667 | %files mgr-rook | |
1668 | %{_datadir}/ceph/mgr/rook | |
1669 | ||
1670 | %post mgr-rook | |
1671 | if [ $1 -eq 1 ] ; then | |
1672 | /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : | |
1673 | fi | |
1674 | ||
1675 | %postun mgr-rook | |
1676 | if [ $1 -eq 1 ] ; then | |
1677 | /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : | |
1678 | fi | |
1679 | ||
eafe8130 TL |
1680 | %files mgr-k8sevents |
1681 | %{_datadir}/ceph/mgr/k8sevents | |
1682 | ||
1683 | %post mgr-k8sevents | |
1684 | if [ $1 -eq 1 ] ; then | |
1685 | /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : | |
1686 | fi | |
1687 | ||
1688 | %postun mgr-k8sevents | |
1689 | if [ $1 -eq 1 ] ; then | |
1690 | /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : | |
1691 | fi | |
1692 | ||
11fdf7f2 TL |
1693 | %files mgr-ssh |
1694 | %{_datadir}/ceph/mgr/ssh | |
1695 | ||
1696 | %post mgr-ssh | |
1697 | if [ $1 -eq 1 ] ; then | |
1698 | /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : | |
1699 | fi | |
1700 | ||
1701 | %postun mgr-ssh | |
1702 | if [ $1 -eq 1 ] ; then | |
1703 | /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : | |
1704 | fi | |
1705 | ||
7c673cae FG |
1706 | %files mon |
1707 | %{_bindir}/ceph-mon | |
b32b8144 | 1708 | %{_bindir}/ceph-monstore-tool |
7c673cae | 1709 | %{_mandir}/man8/ceph-mon.8* |
7c673cae FG |
1710 | %{_unitdir}/ceph-mon@.service |
1711 | %{_unitdir}/ceph-mon.target | |
1712 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon | |
1713 | ||
1714 | %post mon | |
1715 | %if 0%{?suse_version} | |
1716 | if [ $1 -eq 1 ] ; then | |
1717 | /usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || : | |
1718 | fi | |
1719 | %endif | |
1720 | %if 0%{?fedora} || 0%{?rhel} | |
1721 | %systemd_post ceph-mon@\*.service ceph-mon.target | |
1722 | %endif | |
1723 | if [ $1 -eq 1 ] ; then | |
1724 | /usr/bin/systemctl start ceph-mon.target >/dev/null 2>&1 || : | |
1725 | fi | |
1726 | ||
1727 | %preun mon | |
1728 | %if 0%{?suse_version} | |
1729 | %service_del_preun ceph-mon@\*.service ceph-mon.target | |
1730 | %endif | |
1731 | %if 0%{?fedora} || 0%{?rhel} | |
1732 | %systemd_preun ceph-mon@\*.service ceph-mon.target | |
1733 | %endif | |
1734 | ||
1735 | %postun mon | |
7c673cae FG |
1736 | %if 0%{?suse_version} |
1737 | DISABLE_RESTART_ON_UPDATE="yes" | |
1738 | %service_del_postun ceph-mon@\*.service ceph-mon.target | |
1739 | %endif | |
1740 | %if 0%{?fedora} || 0%{?rhel} | |
1741 | %systemd_postun ceph-mon@\*.service ceph-mon.target | |
1742 | %endif | |
11fdf7f2 | 1743 | if [ $1 -ge 1 ] ; then |
7c673cae FG |
1744 | # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to |
1745 | # "yes". In any case: if units are not running, do not touch them. | |
1746 | SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph | |
1747 | if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then | |
1748 | source $SYSCONF_CEPH | |
1749 | fi | |
1750 | if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then | |
1751 | /usr/bin/systemctl try-restart ceph-mon@\*.service > /dev/null 2>&1 || : | |
1752 | fi | |
1753 | fi | |
1754 | ||
1755 | %files fuse | |
7c673cae FG |
1756 | %{_bindir}/ceph-fuse |
1757 | %{_mandir}/man8/ceph-fuse.8* | |
1758 | %{_sbindir}/mount.fuse.ceph | |
1759 | %{_unitdir}/ceph-fuse@.service | |
1760 | %{_unitdir}/ceph-fuse.target | |
1761 | ||
1762 | %files -n rbd-fuse | |
7c673cae FG |
1763 | %{_bindir}/rbd-fuse |
1764 | %{_mandir}/man8/rbd-fuse.8* | |
1765 | ||
1766 | %files -n rbd-mirror | |
7c673cae FG |
1767 | %{_bindir}/rbd-mirror |
1768 | %{_mandir}/man8/rbd-mirror.8* | |
1769 | %{_unitdir}/ceph-rbd-mirror@.service | |
1770 | %{_unitdir}/ceph-rbd-mirror.target | |
1771 | ||
1772 | %post -n rbd-mirror | |
1773 | %if 0%{?suse_version} | |
1774 | if [ $1 -eq 1 ] ; then | |
1775 | /usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || : | |
1776 | fi | |
1777 | %endif | |
1778 | %if 0%{?fedora} || 0%{?rhel} | |
1779 | %systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target | |
1780 | %endif | |
1781 | if [ $1 -eq 1 ] ; then | |
1782 | /usr/bin/systemctl start ceph-rbd-mirror.target >/dev/null 2>&1 || : | |
1783 | fi | |
1784 | ||
1785 | %preun -n rbd-mirror | |
1786 | %if 0%{?suse_version} | |
1787 | %service_del_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target | |
1788 | %endif | |
1789 | %if 0%{?fedora} || 0%{?rhel} | |
1790 | %systemd_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target | |
1791 | %endif | |
1792 | ||
1793 | %postun -n rbd-mirror | |
7c673cae FG |
1794 | %if 0%{?suse_version} |
1795 | DISABLE_RESTART_ON_UPDATE="yes" | |
1796 | %service_del_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target | |
1797 | %endif | |
1798 | %if 0%{?fedora} || 0%{?rhel} | |
1799 | %systemd_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target | |
1800 | %endif | |
11fdf7f2 | 1801 | if [ $1 -ge 1 ] ; then |
7c673cae FG |
1802 | # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to |
1803 | # "yes". In any case: if units are not running, do not touch them. | |
1804 | SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph | |
1805 | if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then | |
1806 | source $SYSCONF_CEPH | |
1807 | fi | |
1808 | if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then | |
1809 | /usr/bin/systemctl try-restart ceph-rbd-mirror@\*.service > /dev/null 2>&1 || : | |
1810 | fi | |
1811 | fi | |
1812 | ||
1813 | %files -n rbd-nbd | |
7c673cae FG |
1814 | %{_bindir}/rbd-nbd |
1815 | %{_mandir}/man8/rbd-nbd.8* | |
1816 | ||
1817 | %files radosgw | |
7c673cae FG |
1818 | %{_bindir}/radosgw |
1819 | %{_bindir}/radosgw-token | |
31f18b77 | 1820 | %{_bindir}/radosgw-es |
7c673cae FG |
1821 | %{_bindir}/radosgw-object-expirer |
1822 | %{_mandir}/man8/radosgw.8* | |
1823 | %dir %{_localstatedir}/lib/ceph/radosgw | |
1824 | %{_unitdir}/ceph-radosgw@.service | |
1825 | %{_unitdir}/ceph-radosgw.target | |
1826 | ||
1827 | %post radosgw | |
1828 | %if 0%{?suse_version} | |
1829 | if [ $1 -eq 1 ] ; then | |
1830 | /usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || : | |
1831 | fi | |
1832 | %endif | |
1833 | %if 0%{?fedora} || 0%{?rhel} | |
1834 | %systemd_post ceph-radosgw@\*.service ceph-radosgw.target | |
1835 | %endif | |
1836 | if [ $1 -eq 1 ] ; then | |
1837 | /usr/bin/systemctl start ceph-radosgw.target >/dev/null 2>&1 || : | |
1838 | fi | |
1839 | ||
1840 | %preun radosgw | |
1841 | %if 0%{?suse_version} | |
1842 | %service_del_preun ceph-radosgw@\*.service ceph-radosgw.target | |
1843 | %endif | |
1844 | %if 0%{?fedora} || 0%{?rhel} | |
1845 | %systemd_preun ceph-radosgw@\*.service ceph-radosgw.target | |
1846 | %endif | |
1847 | ||
1848 | %postun radosgw | |
7c673cae FG |
1849 | %if 0%{?suse_version} |
1850 | DISABLE_RESTART_ON_UPDATE="yes" | |
1851 | %service_del_postun ceph-radosgw@\*.service ceph-radosgw.target | |
1852 | %endif | |
1853 | %if 0%{?fedora} || 0%{?rhel} | |
1854 | %systemd_postun ceph-radosgw@\*.service ceph-radosgw.target | |
1855 | %endif | |
11fdf7f2 | 1856 | if [ $1 -ge 1 ] ; then |
7c673cae FG |
1857 | # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to |
1858 | # "yes". In any case: if units are not running, do not touch them. | |
1859 | SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph | |
1860 | if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then | |
1861 | source $SYSCONF_CEPH | |
1862 | fi | |
1863 | if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then | |
1864 | /usr/bin/systemctl try-restart ceph-radosgw@\*.service > /dev/null 2>&1 || : | |
1865 | fi | |
1866 | fi | |
1867 | ||
1868 | %files osd | |
1869 | %{_bindir}/ceph-clsinfo | |
1870 | %{_bindir}/ceph-bluestore-tool | |
1871 | %{_bindir}/ceph-objectstore-tool | |
b32b8144 | 1872 | %{_bindir}/ceph-osdomap-tool |
7c673cae | 1873 | %{_bindir}/ceph-osd |
7c673cae | 1874 | %{_libexecdir}/ceph/ceph-osd-prestart.sh |
b32b8144 FG |
1875 | %{_sbindir}/ceph-volume |
1876 | %{_sbindir}/ceph-volume-systemd | |
7c673cae | 1877 | %{_mandir}/man8/ceph-clsinfo.8* |
7c673cae | 1878 | %{_mandir}/man8/ceph-osd.8* |
3efd9988 | 1879 | %{_mandir}/man8/ceph-bluestore-tool.8* |
b32b8144 FG |
1880 | %{_mandir}/man8/ceph-volume.8* |
1881 | %{_mandir}/man8/ceph-volume-systemd.8* | |
7c673cae FG |
1882 | %{_unitdir}/ceph-osd@.service |
1883 | %{_unitdir}/ceph-osd.target | |
b32b8144 | 1884 | %{_unitdir}/ceph-volume@.service |
7c673cae | 1885 | %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd |
3efd9988 | 1886 | %config(noreplace) %{_sysctldir}/90-ceph-osd.conf |
11fdf7f2 | 1887 | %{_sysconfdir}/sudoers.d/ceph-osd-smartctl |
7c673cae FG |
1888 | |
1889 | %post osd | |
1890 | %if 0%{?suse_version} | |
1891 | if [ $1 -eq 1 ] ; then | |
b32b8144 | 1892 | /usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || : |
7c673cae FG |
1893 | fi |
1894 | %endif | |
1895 | %if 0%{?fedora} || 0%{?rhel} | |
b32b8144 | 1896 | %systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target |
7c673cae FG |
1897 | %endif |
1898 | if [ $1 -eq 1 ] ; then | |
1899 | /usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || : | |
1900 | fi | |
3efd9988 FG |
1901 | %if 0%{?sysctl_apply} |
1902 | %sysctl_apply 90-ceph-osd.conf | |
1903 | %else | |
1904 | /usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || : | |
1905 | %endif | |
7c673cae FG |
1906 | |
1907 | %preun osd | |
1908 | %if 0%{?suse_version} | |
b32b8144 | 1909 | %service_del_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target |
7c673cae FG |
1910 | %endif |
1911 | %if 0%{?fedora} || 0%{?rhel} | |
b32b8144 | 1912 | %systemd_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target |
7c673cae FG |
1913 | %endif |
1914 | ||
1915 | %postun osd | |
7c673cae FG |
1916 | %if 0%{?suse_version} |
1917 | DISABLE_RESTART_ON_UPDATE="yes" | |
b32b8144 | 1918 | %service_del_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target |
7c673cae FG |
1919 | %endif |
1920 | %if 0%{?fedora} || 0%{?rhel} | |
b32b8144 | 1921 | %systemd_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target |
7c673cae | 1922 | %endif |
11fdf7f2 | 1923 | if [ $1 -ge 1 ] ; then |
7c673cae FG |
1924 | # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to |
1925 | # "yes". In any case: if units are not running, do not touch them. | |
1926 | SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph | |
1927 | if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then | |
1928 | source $SYSCONF_CEPH | |
1929 | fi | |
1930 | if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then | |
b32b8144 | 1931 | /usr/bin/systemctl try-restart ceph-osd@\*.service ceph-volume@\*.service > /dev/null 2>&1 || : |
7c673cae FG |
1932 | fi |
1933 | fi | |
1934 | ||
1935 | %if %{with ocf} | |
1936 | ||
1937 | %files resource-agents | |
7c673cae FG |
1938 | %dir %{_prefix}/lib/ocf |
1939 | %dir %{_prefix}/lib/ocf/resource.d | |
1940 | %dir %{_prefix}/lib/ocf/resource.d/ceph | |
b32b8144 | 1941 | %attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/ceph/rbd |
7c673cae FG |
1942 | |
1943 | %endif | |
1944 | ||
1945 | %files -n librados2 | |
7c673cae FG |
1946 | %{_libdir}/librados.so.* |
1947 | %dir %{_libdir}/ceph | |
11fdf7f2 | 1948 | %{_libdir}/ceph/libceph-common.so.* |
7c673cae FG |
1949 | %if %{with lttng} |
1950 | %{_libdir}/librados_tp.so.* | |
1951 | %endif | |
eafe8130 | 1952 | %dir %{_sysconfdir}/ceph |
7c673cae FG |
1953 | |
1954 | %post -n librados2 -p /sbin/ldconfig | |
1955 | ||
1956 | %postun -n librados2 -p /sbin/ldconfig | |
1957 | ||
1958 | %files -n librados-devel | |
7c673cae FG |
1959 | %dir %{_includedir}/rados |
1960 | %{_includedir}/rados/librados.h | |
7c673cae | 1961 | %{_includedir}/rados/rados_types.h |
7c673cae FG |
1962 | %{_libdir}/librados.so |
1963 | %if %{with lttng} | |
1964 | %{_libdir}/librados_tp.so | |
1965 | %endif | |
1966 | %{_bindir}/librados-config | |
1967 | %{_mandir}/man8/librados-config.8* | |
1968 | ||
11fdf7f2 TL |
1969 | %files -n libradospp-devel |
1970 | %dir %{_includedir}/rados | |
1971 | %{_includedir}/rados/buffer.h | |
1972 | %{_includedir}/rados/buffer_fwd.h | |
1973 | %{_includedir}/rados/crc32c.h | |
1974 | %{_includedir}/rados/inline_memory.h | |
1975 | %{_includedir}/rados/librados.hpp | |
1976 | %{_includedir}/rados/librados_fwd.hpp | |
1977 | %{_includedir}/rados/page.h | |
1978 | %{_includedir}/rados/rados_types.hpp | |
1979 | ||
1980 | %if 0%{with python2} | |
7c673cae | 1981 | %files -n python-rados |
7c673cae FG |
1982 | %{python_sitearch}/rados.so |
1983 | %{python_sitearch}/rados-*.egg-info | |
11fdf7f2 | 1984 | %endif |
7c673cae FG |
1985 | |
1986 | %files -n python%{python3_pkgversion}-rados | |
7c673cae FG |
1987 | %{python3_sitearch}/rados.cpython*.so |
1988 | %{python3_sitearch}/rados-*.egg-info | |
1989 | ||
11fdf7f2 | 1990 | %if 0%{with libradosstriper} |
7c673cae | 1991 | %files -n libradosstriper1 |
7c673cae FG |
1992 | %{_libdir}/libradosstriper.so.* |
1993 | ||
1994 | %post -n libradosstriper1 -p /sbin/ldconfig | |
1995 | ||
1996 | %postun -n libradosstriper1 -p /sbin/ldconfig | |
1997 | ||
1998 | %files -n libradosstriper-devel | |
7c673cae FG |
1999 | %dir %{_includedir}/radosstriper |
2000 | %{_includedir}/radosstriper/libradosstriper.h | |
2001 | %{_includedir}/radosstriper/libradosstriper.hpp | |
2002 | %{_libdir}/libradosstriper.so | |
11fdf7f2 | 2003 | %endif |
7c673cae FG |
2004 | |
2005 | %files -n librbd1 | |
7c673cae FG |
2006 | %{_libdir}/librbd.so.* |
2007 | %if %{with lttng} | |
2008 | %{_libdir}/librbd_tp.so.* | |
2009 | %endif | |
2010 | ||
181888fb | 2011 | %post -n librbd1 -p /sbin/ldconfig |
7c673cae FG |
2012 | |
2013 | %postun -n librbd1 -p /sbin/ldconfig | |
2014 | ||
2015 | %files -n librbd-devel | |
7c673cae FG |
2016 | %dir %{_includedir}/rbd |
2017 | %{_includedir}/rbd/librbd.h | |
2018 | %{_includedir}/rbd/librbd.hpp | |
2019 | %{_includedir}/rbd/features.h | |
2020 | %{_libdir}/librbd.so | |
2021 | %if %{with lttng} | |
2022 | %{_libdir}/librbd_tp.so | |
2023 | %endif | |
2024 | ||
2025 | %files -n librgw2 | |
7c673cae | 2026 | %{_libdir}/librgw.so.* |
11fdf7f2 TL |
2027 | %{_libdir}/librgw_admin_user.so.* |
2028 | %if %{with lttng} | |
eafe8130 TL |
2029 | %{_libdir}/librgw_op_tp.so.* |
2030 | %{_libdir}/librgw_rados_tp.so.* | |
11fdf7f2 | 2031 | %endif |
7c673cae FG |
2032 | |
2033 | %post -n librgw2 -p /sbin/ldconfig | |
2034 | ||
2035 | %postun -n librgw2 -p /sbin/ldconfig | |
2036 | ||
2037 | %files -n librgw-devel | |
7c673cae FG |
2038 | %dir %{_includedir}/rados |
2039 | %{_includedir}/rados/librgw.h | |
11fdf7f2 | 2040 | %{_includedir}/rados/librgw_admin_user.h |
7c673cae FG |
2041 | %{_includedir}/rados/rgw_file.h |
2042 | %{_libdir}/librgw.so | |
11fdf7f2 | 2043 | %{_libdir}/librgw_admin_user.so |
eafe8130 TL |
2044 | %if %{with lttng} |
2045 | %{_libdir}/librgw_op_tp.so | |
2046 | %{_libdir}/librgw_rados_tp.so | |
2047 | %endif | |
7c673cae | 2048 | |
11fdf7f2 | 2049 | %if 0%{with python2} |
7c673cae | 2050 | %files -n python-rgw |
7c673cae FG |
2051 | %{python_sitearch}/rgw.so |
2052 | %{python_sitearch}/rgw-*.egg-info | |
11fdf7f2 | 2053 | %endif |
7c673cae FG |
2054 | |
2055 | %files -n python%{python3_pkgversion}-rgw | |
7c673cae FG |
2056 | %{python3_sitearch}/rgw.cpython*.so |
2057 | %{python3_sitearch}/rgw-*.egg-info | |
2058 | ||
11fdf7f2 | 2059 | %if 0%{with python2} |
7c673cae | 2060 | %files -n python-rbd |
7c673cae FG |
2061 | %{python_sitearch}/rbd.so |
2062 | %{python_sitearch}/rbd-*.egg-info | |
11fdf7f2 | 2063 | %endif |
7c673cae FG |
2064 | |
2065 | %files -n python%{python3_pkgversion}-rbd | |
7c673cae FG |
2066 | %{python3_sitearch}/rbd.cpython*.so |
2067 | %{python3_sitearch}/rbd-*.egg-info | |
2068 | ||
2069 | %files -n libcephfs2 | |
7c673cae | 2070 | %{_libdir}/libcephfs.so.* |
eafe8130 | 2071 | %dir %{_sysconfdir}/ceph |
7c673cae FG |
2072 | |
2073 | %post -n libcephfs2 -p /sbin/ldconfig | |
2074 | ||
2075 | %postun -n libcephfs2 -p /sbin/ldconfig | |
2076 | ||
2077 | %files -n libcephfs-devel | |
7c673cae FG |
2078 | %dir %{_includedir}/cephfs |
2079 | %{_includedir}/cephfs/libcephfs.h | |
2080 | %{_includedir}/cephfs/ceph_statx.h | |
2081 | %{_libdir}/libcephfs.so | |
2082 | ||
11fdf7f2 | 2083 | %if 0%{with python2} |
7c673cae | 2084 | %files -n python-cephfs |
7c673cae FG |
2085 | %{python_sitearch}/cephfs.so |
2086 | %{python_sitearch}/cephfs-*.egg-info | |
2087 | %{python_sitelib}/ceph_volume_client.py* | |
11fdf7f2 | 2088 | %endif |
7c673cae FG |
2089 | |
2090 | %files -n python%{python3_pkgversion}-cephfs | |
7c673cae FG |
2091 | %{python3_sitearch}/cephfs.cpython*.so |
2092 | %{python3_sitearch}/cephfs-*.egg-info | |
2093 | %{python3_sitelib}/ceph_volume_client.py | |
2094 | %{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py* | |
2095 | ||
11fdf7f2 TL |
2096 | %if 0%{with python2} |
2097 | %files -n python-ceph-argparse | |
2098 | %{python_sitelib}/ceph_argparse.py* | |
2099 | %{python_sitelib}/ceph_daemon.py* | |
2100 | %endif | |
2101 | ||
7c673cae | 2102 | %files -n python%{python3_pkgversion}-ceph-argparse |
7c673cae FG |
2103 | %{python3_sitelib}/ceph_argparse.py |
2104 | %{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py* | |
2105 | %{python3_sitelib}/ceph_daemon.py | |
2106 | %{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py* | |
2107 | ||
11fdf7f2 TL |
2108 | %if 0%{with cephfs_shell} |
2109 | %files -n cephfs-shell | |
2110 | %{python3_sitelib}/cephfs_shell-*.egg-info | |
2111 | %{_bindir}/cephfs-shell | |
2112 | %endif | |
2113 | ||
7c673cae FG |
2114 | %if 0%{with ceph_test_package} |
2115 | %files -n ceph-test | |
7c673cae FG |
2116 | %{_bindir}/ceph-client-debug |
2117 | %{_bindir}/ceph_bench_log | |
2118 | %{_bindir}/ceph_kvstorebench | |
2119 | %{_bindir}/ceph_multi_stress_watch | |
2120 | %{_bindir}/ceph_erasure_code | |
2121 | %{_bindir}/ceph_erasure_code_benchmark | |
2122 | %{_bindir}/ceph_omapbench | |
2123 | %{_bindir}/ceph_objectstore_bench | |
2124 | %{_bindir}/ceph_perf_objectstore | |
2125 | %{_bindir}/ceph_perf_local | |
2126 | %{_bindir}/ceph_perf_msgr_client | |
2127 | %{_bindir}/ceph_perf_msgr_server | |
2128 | %{_bindir}/ceph_psim | |
2129 | %{_bindir}/ceph_radosacl | |
2130 | %{_bindir}/ceph_rgw_jsonparser | |
2131 | %{_bindir}/ceph_rgw_multiparser | |
2132 | %{_bindir}/ceph_scratchtool | |
2133 | %{_bindir}/ceph_scratchtoolpp | |
7c673cae | 2134 | %{_bindir}/ceph_test_* |
7c673cae | 2135 | %{_bindir}/ceph-coverage |
7c673cae | 2136 | %{_bindir}/ceph-debugpack |
11fdf7f2 | 2137 | %{_bindir}/cephdeduptool |
7c673cae FG |
2138 | %{_mandir}/man8/ceph-debugpack.8* |
2139 | %dir %{_libdir}/ceph | |
2140 | %{_libdir}/ceph/ceph-monstore-update-crush.sh | |
2141 | %endif | |
2142 | ||
2143 | %if 0%{with cephfs_java} | |
2144 | %files -n libcephfs_jni1 | |
7c673cae FG |
2145 | %{_libdir}/libcephfs_jni.so.* |
2146 | ||
2147 | %post -n libcephfs_jni1 -p /sbin/ldconfig | |
2148 | ||
2149 | %postun -n libcephfs_jni1 -p /sbin/ldconfig | |
2150 | ||
2151 | %files -n libcephfs_jni-devel | |
7c673cae FG |
2152 | %{_libdir}/libcephfs_jni.so |
2153 | ||
2154 | %files -n cephfs-java | |
7c673cae FG |
2155 | %{_javadir}/libcephfs.jar |
2156 | %{_javadir}/libcephfs-test.jar | |
2157 | %endif | |
2158 | ||
2159 | %files -n rados-objclass-devel | |
7c673cae FG |
2160 | %dir %{_includedir}/rados |
2161 | %{_includedir}/rados/objclass.h | |
2162 | ||
2163 | %if 0%{with selinux} | |
2164 | %files selinux | |
7c673cae FG |
2165 | %attr(0600,root,root) %{_datadir}/selinux/packages/ceph.pp |
2166 | %{_datadir}/selinux/devel/include/contrib/ceph.if | |
2167 | %{_mandir}/man8/ceph_selinux.8* | |
2168 | ||
2169 | %post selinux | |
2170 | # backup file_contexts before update | |
2171 | . /etc/selinux/config | |
2172 | FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts | |
2173 | cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre | |
2174 | ||
2175 | # Install the policy | |
2176 | /usr/sbin/semodule -i %{_datadir}/selinux/packages/ceph.pp | |
2177 | ||
2178 | # Load the policy if SELinux is enabled | |
2179 | if ! /usr/sbin/selinuxenabled; then | |
2180 | # Do not relabel if selinux is not enabled | |
2181 | exit 0 | |
2182 | fi | |
2183 | ||
2184 | if diff ${FILE_CONTEXT} ${FILE_CONTEXT}.pre > /dev/null 2>&1; then | |
2185 | # Do not relabel if file contexts did not change | |
2186 | exit 0 | |
2187 | fi | |
2188 | ||
2189 | # Check whether the daemons are running | |
2190 | /usr/bin/systemctl status ceph.target > /dev/null 2>&1 | |
2191 | STATUS=$? | |
2192 | ||
2193 | # Stop the daemons if they were running | |
2194 | if test $STATUS -eq 0; then | |
2195 | /usr/bin/systemctl stop ceph.target > /dev/null 2>&1 | |
2196 | fi | |
2197 | ||
11fdf7f2 TL |
2198 | # Relabel the files fix for first package install |
2199 | /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null | |
31f18b77 | 2200 | |
7c673cae FG |
2201 | rm -f ${FILE_CONTEXT}.pre |
2202 | # The fixfiles command won't fix label for /var/run/ceph | |
2203 | /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1 | |
2204 | ||
2205 | # Start the daemons iff they were running before | |
2206 | if test $STATUS -eq 0; then | |
2207 | /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || : | |
2208 | fi | |
2209 | exit 0 | |
2210 | ||
2211 | %postun selinux | |
2212 | if [ $1 -eq 0 ]; then | |
2213 | # backup file_contexts before update | |
2214 | . /etc/selinux/config | |
2215 | FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts | |
2216 | cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre | |
2217 | ||
2218 | # Remove the module | |
2219 | /usr/sbin/semodule -n -r ceph > /dev/null 2>&1 | |
2220 | ||
2221 | # Reload the policy if SELinux is enabled | |
2222 | if ! /usr/sbin/selinuxenabled ; then | |
2223 | # Do not relabel if SELinux is not enabled | |
2224 | exit 0 | |
2225 | fi | |
2226 | ||
2227 | # Check whether the daemons are running | |
2228 | /usr/bin/systemctl status ceph.target > /dev/null 2>&1 | |
2229 | STATUS=$? | |
2230 | ||
2231 | # Stop the daemons if they were running | |
2232 | if test $STATUS -eq 0; then | |
2233 | /usr/bin/systemctl stop ceph.target > /dev/null 2>&1 | |
2234 | fi | |
2235 | ||
2236 | /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null | |
2237 | rm -f ${FILE_CONTEXT}.pre | |
2238 | # The fixfiles command won't fix label for /var/run/ceph | |
2239 | /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1 | |
2240 | ||
2241 | # Start the daemons if they were running before | |
2242 | if test $STATUS -eq 0; then | |
2243 | /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || : | |
2244 | fi | |
2245 | fi | |
2246 | exit 0 | |
2247 | ||
2248 | %endif # with selinux | |
2249 | ||
11fdf7f2 | 2250 | %if 0%{with python2} |
7c673cae FG |
2251 | %files -n python-ceph-compat |
2252 | # We need an empty %%files list for python-ceph-compat, to tell rpmbuild to | |
2253 | # actually build this meta package. | |
11fdf7f2 TL |
2254 | %endif |
2255 | ||
2256 | %files grafana-dashboards | |
2257 | %if 0%{?suse_version} | |
81eedcae TL |
2258 | %attr(0755,root,root) %dir %{_sysconfdir}/grafana |
2259 | %attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards | |
2260 | %attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard | |
11fdf7f2 TL |
2261 | %else |
2262 | %attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard | |
2263 | %endif | |
2264 | %config %{_sysconfdir}/grafana/dashboards/ceph-dashboard/* | |
2265 | %doc monitoring/grafana/dashboards/README | |
2266 | %doc monitoring/grafana/README.md | |
7c673cae | 2267 | |
81eedcae TL |
2268 | %if 0%{?suse_version} |
2269 | %files prometheus-alerts | |
2270 | %dir /etc/prometheus/SUSE/ | |
2271 | %dir /etc/prometheus/SUSE/default_rules/ | |
2272 | %config /etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml | |
2273 | %endif | |
2274 | ||
7c673cae FG |
2275 | |
2276 | %changelog |