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