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