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