fefe1d
# vim: set noexpandtab ts=8 sw=8 :
6d8727
#
6d8727
# spec file for package ceph
6d8727
#
6d8727
# Copyright (C) 2004-2019 The Ceph Project Developers. See COPYING file
6d8727
# at the top-level directory of this distribution and at
6d8727
# https://github.com/ceph/ceph/blob/master/COPYING
6d8727
#
6d8727
# All modifications and additions to the file contributed by third parties
6d8727
# remain the property of their copyright owners, unless otherwise agreed
6d8727
# upon.
6d8727
#
6d8727
# This file is under the GNU Lesser General Public License, version 2.1
6d8727
#
6d8727
# Please submit bugfixes or comments via http://tracker.ceph.com/
6d8727
#
6d8727
6d8727
#################################################################################
6d8727
# conditional build section
6d8727
#
6d8727
# please read http://rpm.org/user_doc/conditional_builds.html for explanation of
6d8727
# bcond syntax!
6d8727
#################################################################################
6d8727
# This package depends on automagic byte compilation
6d8727
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
6d8727
%global _python_bytecompile_extra 1
6d8727
%global _hardened_build 1
6d8727
6d8727
%bcond_with make_check
6d8727
%bcond_without ceph_test_package
6d8727
%ifarch s390 s390x
6d8727
%bcond_with tcmalloc
6d8727
%else
6d8727
%bcond_without tcmalloc
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%bcond_without selinux
6d8727
%bcond_without cephfs_java
a133f6
%bcond_without amqp_endpoint
6d8727
%bcond_without lttng
6d8727
%bcond_without libradosstriper
6d8727
%bcond_without ocf
a133f6
%bcond_without kafka_endpoint
6d8727
%global _remote_tarball_prefix https://download.ceph.com/tarballs/
6d8727
%endif
6d8727
%if 0%{?suse_version}
fefe1d
%bcond_with selinux
a7ada8
%bcond_with cephfs_java
fefe1d
%bcond_with amqp_endpoint
a133f6
%bcond_with kafka_endpoint
fefe1d
#Compat macro for new _fillupdir macro introduced in Nov 2017
fefe1d
%if ! %{defined _fillupdir}
fefe1d
%global _fillupdir /var/adm/fillup-templates
fefe1d
%endif
fefe1d
%if 0%{?is_opensuse}
fefe1d
%bcond_without libradosstriper
fefe1d
%bcond_without ocf
fefe1d
%else
fefe1d
%bcond_with libradosstriper
fefe1d
%bcond_with ocf
fefe1d
%endif
6d8727
%ifarch x86_64 aarch64 ppc64le
6d8727
%bcond_without lttng
6d8727
%else
a7ada8
%bcond_with lttng
a7ada8
%endif
6d8727
%endif
6d8727
%bcond_with seastar
fefe1d
%if 0%{?fedora} >= 29 || 0%{?suse_version} >= 1500 || 0%{?rhel} >= 8
fefe1d
# distros that need a py3 Ceph build
fefe1d
%bcond_with python2
fefe1d
%else
fefe1d
# distros that need a py2 Ceph build
fefe1d
%bcond_without python2
fefe1d
%endif
6d8727
%if 0%{?fedora} || 0%{?suse_version} >= 1500
6d8727
# distros that ship cmd2 and/or colorama
6d8727
%bcond_without cephfs_shell
6d8727
%else
6d8727
# distros that do _not_ ship cmd2/colorama
6d8727
%bcond_with cephfs_shell
6d8727
%endif
fefe1d
%if 0%{without python2}
fefe1d
%global _defined_if_python2_absent 1
6d8727
%endif
a133f6
%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} >= 8
a133f6
%global weak_deps 1
a133f6
%endif
6d8727
%if %{with selinux}
6d8727
# get selinux policy version
6d8727
%{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0}
6d8727
%endif
6d8727
6d8727
%{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d}
6d8727
%{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create}
6d8727
%{!?python3_pkgversion: %global python3_pkgversion 3}
6d8727
%{!?python3_version_nodots: %global python3_version_nodots 3}
6d8727
%{!?python3_version: %global python3_version 3}
fefe1d
# define _python_buildid macro which will expand to the empty string when
fefe1d
# building with python2
fefe1d
%global _python_buildid %{?_defined_if_python2_absent:%{python3_pkgversion}}
fefe1d
6d8727
# unify libexec for all targets
6d8727
%global _libexecdir %{_exec_prefix}/lib
6d8727
6d8727
# disable dwz which compresses the debuginfo
6d8727
%global _find_debuginfo_dwz_opts %{nil}
6d8727
6d8727
#################################################################################
6d8727
# main package definition
6d8727
#################################################################################
6d8727
Name:		ceph
dce1ea
Version:	14.2.11
a7ada8
Release:	1%{?dist}
6d8727
%if 0%{?fedora} || 0%{?rhel}
fefe1d
Epoch:		2
6d8727
%endif
6d8727
6d8727
# define _epoch_prefix macro which will expand to the empty string if epoch is
6d8727
# undefined
6d8727
%global _epoch_prefix %{?epoch:%{epoch}:}
6d8727
6d8727
Summary:	User space components of the Ceph file system
fefe1d
License:	LGPL-2.1 and CC-BY-SA-3.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and MIT
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
6d8727
URL:		http://ceph.com/
6d8727
Source0:	%{?_remote_tarball_prefix}ceph-%{version}.tar.gz
6d8727
%if 0%{?suse_version}
6d8727
# _insert_obs_source_lines_here
fefe1d
ExclusiveArch:  x86_64 aarch64 ppc64le s390x
6d8727
%endif
6d8727
#################################################################################
6d8727
# dependencies that apply across all distro families
6d8727
#################################################################################
fefe1d
Requires:       ceph-osd = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:       ceph-mds = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:       ceph-mgr = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:       ceph-mon = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires(post):	binutils
6d8727
%if 0%{with cephfs_java}
6d8727
BuildRequires:	java-devel
6d8727
BuildRequires:	sharutils
6d8727
%endif
6d8727
%if 0%{with selinux}
6d8727
BuildRequires:	checkpolicy
6d8727
BuildRequires:	selinux-policy-devel
6d8727
%endif
6d8727
BuildRequires:	gperf
6d8727
%if 0%{?rhel} == 7
fefe1d
BuildRequires:  cmake3 > 3.5
6d8727
%else
fefe1d
BuildRequires:  cmake > 3.5
6d8727
%endif
6d8727
BuildRequires:	cryptsetup
6d8727
BuildRequires:	fuse-devel
6d8727
%if 0%{?rhel} == 7
6d8727
# devtoolset offers newer make and valgrind-devel, but the old ones are good
6d8727
# enough.
fefe1d
BuildRequires:	devtoolset-8-gcc-c++ >= 8.2.1
6d8727
%else
6d8727
BuildRequires:	gcc-c++
6d8727
%endif
6d8727
BuildRequires:	gdbm
6d8727
%if 0%{with tcmalloc}
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
BuildRequires:	gperftools-devel >= 2.6.1
6d8727
%endif
6d8727
%if 0%{?suse_version}
6d8727
BuildRequires:	gperftools-devel >= 2.4
6d8727
%endif
6d8727
%endif
6d8727
BuildRequires:	leveldb-devel > 1.2
6d8727
BuildRequires:	libaio-devel
6d8727
BuildRequires:	libblkid-devel >= 2.17
6d8727
BuildRequires:	libcurl-devel
6d8727
BuildRequires:	libcap-ng-devel
fefe1d
BuildRequires:	libudev-devel
6d8727
BuildRequires:	libnl3-devel
6d8727
BuildRequires:	liboath-devel
6d8727
BuildRequires:	libtool
6d8727
BuildRequires:	libxml2-devel
6d8727
BuildRequires:	make
6d8727
BuildRequires:	ncurses-devel
6d8727
BuildRequires:	parted
6d8727
BuildRequires:	patch
6d8727
BuildRequires:	perl
6d8727
BuildRequires:	pkgconfig
fefe1d
BuildRequires:  procps
fefe1d
BuildRequires:	python%{_python_buildid}
fefe1d
BuildRequires:	python%{_python_buildid}-devel
6d8727
BuildRequires:	snappy-devel
6d8727
BuildRequires:	sudo
fefe1d
BuildRequires:	udev
6d8727
BuildRequires:	util-linux
6d8727
BuildRequires:	valgrind-devel
6d8727
BuildRequires:	which
6d8727
BuildRequires:	xfsprogs
6d8727
BuildRequires:	xfsprogs-devel
6d8727
BuildRequires:	xmlstarlet
6d8727
BuildRequires:	yasm
6d8727
%if 0%{with amqp_endpoint}
fefe1d
BuildRequires:  librabbitmq-devel
6d8727
%endif
a133f6
%if 0%{with kafka_endpoint}
a133f6
BuildRequires:  librdkafka-devel
a133f6
%endif
6d8727
%if 0%{with make_check}
fefe1d
BuildRequires:  jq
6d8727
BuildRequires:	libuuid-devel
fefe1d
BuildRequires:	python%{_python_buildid}-bcrypt
fefe1d
BuildRequires:	python%{_python_buildid}-coverage
fefe1d
BuildRequires:	python%{_python_buildid}-nose
fefe1d
BuildRequires:	python%{_python_buildid}-pecan
fefe1d
BuildRequires:	python%{_python_buildid}-requests
fefe1d
BuildRequires:	python%{_python_buildid}-six
fefe1d
BuildRequires:	python%{_python_buildid}-virtualenv
6d8727
BuildRequires:	socat
6d8727
%endif
6d8727
%if 0%{with seastar}
fefe1d
BuildRequires:  c-ares-devel
fefe1d
BuildRequires:  gnutls-devel
fefe1d
BuildRequires:  hwloc-devel
fefe1d
BuildRequires:  libpciaccess-devel
fefe1d
BuildRequires:  lksctp-tools-devel
fefe1d
BuildRequires:  protobuf-devel
fefe1d
BuildRequires:  ragel
fefe1d
BuildRequires:  systemtap-sdt-devel
fefe1d
BuildRequires:  yaml-cpp-devel
6d8727
%endif
6d8727
#################################################################################
6d8727
# distro-conditional dependencies
6d8727
#################################################################################
6d8727
%if 0%{?suse_version}
fefe1d
BuildRequires:  pkgconfig(systemd)
6d8727
BuildRequires:	systemd-rpm-macros
6d8727
%{?systemd_requires}
6d8727
PreReq:		%fillup_prereq
6d8727
BuildRequires:	fdupes
6d8727
BuildRequires:	net-tools
6d8727
BuildRequires:	libbz2-devel
6d8727
BuildRequires:	mozilla-nss-devel
6d8727
BuildRequires:	keyutils-devel
fefe1d
BuildRequires:  libopenssl-devel
fefe1d
BuildRequires:  lsb-release
fefe1d
BuildRequires:  openldap2-devel
fefe1d
#BuildRequires:  krb5
fefe1d
#BuildRequires:  krb5-devel
fefe1d
BuildRequires:  cunit-devel
fefe1d
BuildRequires:	python%{_python_buildid}-setuptools
fefe1d
BuildRequires:	python%{_python_buildid}-Cython
fefe1d
BuildRequires:	python%{_python_buildid}-PrettyTable
fefe1d
BuildRequires:	python%{_python_buildid}-Sphinx
fefe1d
BuildRequires:  rdma-core-devel
6d8727
BuildRequires:	liblz4-devel >= 1.7
6d8727
# for prometheus-alerts
fefe1d
BuildRequires:  golang-github-prometheus-prometheus
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
Requires:	systemd
fefe1d
BuildRequires:  boost-random
6d8727
BuildRequires:	nss-devel
6d8727
BuildRequires:	keyutils-libs-devel
6d8727
BuildRequires:	libibverbs-devel
fefe1d
BuildRequires:  librdmacm-devel
fefe1d
BuildRequires:  openldap-devel
fefe1d
#BuildRequires:  krb5-devel
fefe1d
BuildRequires:  openssl-devel
fefe1d
BuildRequires:  CUnit-devel
fefe1d
BuildRequires:  redhat-lsb-core
fefe1d
%if 0%{with python2}
fefe1d
BuildRequires:	python2-Cython
fefe1d
%endif
6d8727
BuildRequires:	python%{python3_pkgversion}-devel
6d8727
BuildRequires:	python%{python3_pkgversion}-setuptools
6d8727
BuildRequires:	python%{python3_pkgversion}-Cython
fefe1d
BuildRequires:	python%{_python_buildid}-prettytable
fefe1d
BuildRequires:	python%{_python_buildid}-sphinx
6d8727
BuildRequires:	lz4-devel >= 1.7
6d8727
%endif
6d8727
# distro-conditional make check dependencies
6d8727
%if 0%{with make_check}
6d8727
%if 0%{?fedora} || 0%{?rhel}
a133f6
BuildRequires: python%{_python_buildid}-coverage
a133f6
BuildRequires: python%{_python_buildid}-pecan
a133f6
BuildRequires: python%{_python_buildid}-tox
a133f6
BuildRequires:  xmlsec1
a133f6
%if 0%{?rhel} == 7
a133f6
BuildRequires:  pyOpenSSL%{_python_buildid}
a133f6
%else
a133f6
BuildRequires:  python%{_python_buildid}-pyOpenSSL
a133f6
%endif
fefe1d
BuildRequires:	python%{_python_buildid}-cherrypy
fefe1d
BuildRequires:	python%{_python_buildid}-jwt
fefe1d
BuildRequires:	python%{_python_buildid}-routes
a133f6
BuildRequires:	python%{_python_buildid}-scipy
fefe1d
BuildRequires:	python%{_python_buildid}-werkzeug
fefe1d
BuildRequires:  xmlsec1
6d8727
%endif
6d8727
%if 0%{?suse_version}
fefe1d
BuildRequires:	python%{_python_buildid}-CherryPy
fefe1d
BuildRequires:	python%{_python_buildid}-PyJWT
fefe1d
BuildRequires:	python%{_python_buildid}-Routes
fefe1d
BuildRequires:	python%{_python_buildid}-Werkzeug
a133f6
BuildRequires:	python%{_python_buildid}-coverage
fefe1d
BuildRequires:	python%{_python_buildid}-numpy-devel
a133f6
BuildRequires:	python%{_python_buildid}-pecan
a133f6
BuildRequires:	python%{_python_buildid}-pyOpenSSL
a133f6
BuildRequires:	python%{_python_buildid}-tox
fefe1d
BuildRequires:	rpm-build
fefe1d
BuildRequires:  xmlsec1-devel
6d8727
%endif
6d8727
%endif
6d8727
# lttng and babeltrace for rbd-replay-prep
6d8727
%if %{with lttng}
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
BuildRequires:	lttng-ust-devel
6d8727
BuildRequires:	libbabeltrace-devel
6d8727
%endif
6d8727
%if 0%{?suse_version}
6d8727
BuildRequires:	lttng-ust-devel
fefe1d
BuildRequires:  babeltrace-devel
6d8727
%endif
6d8727
%endif
6d8727
%if 0%{?suse_version}
6d8727
BuildRequires:	libexpat-devel
6d8727
%endif
6d8727
%if 0%{?rhel} || 0%{?fedora}
6d8727
BuildRequires:	expat-devel
6d8727
%endif
6d8727
#hardened-cc1
6d8727
%if 0%{?fedora} || 0%{?rhel}
fefe1d
BuildRequires:  redhat-rpm-config
6d8727
%endif
6d8727
%if 0%{with seastar}
6d8727
%if 0%{?fedora} || 0%{?rhel}
fefe1d
BuildRequires:  cryptopp-devel
fefe1d
BuildRequires:  numactl-devel
fefe1d
BuildRequires:  protobuf-compiler
6d8727
%endif
6d8727
%if 0%{?suse_version}
fefe1d
BuildRequires:  libcryptopp-devel
fefe1d
BuildRequires:  libnuma-devel
6d8727
%endif
6d8727
%endif
a133f6
%if 0%{?rhel} >= 8
a133f6
BuildRequires:  /usr/bin/pathfix.py
a133f6
%endif
6d8727
6d8727
%description
6d8727
Ceph is a massively scalable, open-source, distributed storage system that runs
6d8727
on commodity hardware and delivers object, block and file system storage.
6d8727
6d8727
6d8727
#################################################################################
6d8727
# subpackages
6d8727
#################################################################################
6d8727
%package base
fefe1d
Summary:       Ceph Base Package
6d8727
%if 0%{?suse_version}
fefe1d
Group:         System/Filesystems
6d8727
%endif
fefe1d
Provides:      ceph-test:/usr/bin/ceph-kvstore-tool
fefe1d
Requires:      ceph-common = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:      librbd1 = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:      librados2 = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:      libcephfs2 = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:      librgw2 = %{_epoch_prefix}%{version}-%{release}
6d8727
%if 0%{with selinux}
fefe1d
Requires:      ceph-selinux = %{_epoch_prefix}%{version}-%{release}
fefe1d
%endif
fefe1d
Requires:      cryptsetup
fefe1d
Requires:      e2fsprogs
fefe1d
Requires:      findutils
fefe1d
Requires:      grep
fefe1d
Requires:      logrotate
fefe1d
Requires:      parted
fefe1d
Requires:      psmisc
fefe1d
Requires:      python%{_python_buildid}-setuptools
fefe1d
Requires:      util-linux
fefe1d
Requires:      xfsprogs
fefe1d
Requires:      which
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
# The following is necessary due to tracker 36508 and can be removed once the
6d8727
# associated upstream bugs are resolved.
6d8727
%if 0%{with tcmalloc}
fefe1d
Requires:      gperftools-libs >= 2.6.1
6d8727
%endif
6d8727
%endif
a133f6
%if 0%{?weak_deps}
fefe1d
Recommends:    chrony
6d8727
%endif
6d8727
%description base
6d8727
Base is the package that includes all the files shared amongst ceph servers
6d8727
6d8727
%package -n ceph-common
6d8727
Summary:	Ceph Common
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
6d8727
Requires:	librbd1 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	librados2 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	libcephfs2 = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:	python%{_python_buildid}-rados = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:	python%{_python_buildid}-rbd = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:	python%{_python_buildid}-cephfs = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:	python%{_python_buildid}-rgw = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:	python%{_python_buildid}-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
6d8727
%if 0%{?fedora} || 0%{?rhel}
fefe1d
Requires:	python%{_python_buildid}-prettytable
6d8727
%endif
6d8727
%if 0%{?suse_version}
fefe1d
Requires:	python%{_python_buildid}-PrettyTable
6d8727
%endif
6d8727
%if 0%{with libradosstriper}
6d8727
Requires:	libradosstriper1 = %{_epoch_prefix}%{version}-%{release}
6d8727
%endif
6d8727
%{?systemd_requires}
6d8727
%if 0%{?suse_version}
6d8727
Requires(pre):	pwdutils
6d8727
%endif
6d8727
%description -n ceph-common
6d8727
Common utilities to mount and interact with a ceph storage cluster.
6d8727
Comprised of files that are common to Ceph clients and servers.
6d8727
6d8727
%package mds
6d8727
Summary:	Ceph Metadata Server Daemon
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
6d8727
Requires:	ceph-base = %{_epoch_prefix}%{version}-%{release}
6d8727
%description mds
6d8727
ceph-mds is the metadata server daemon for the Ceph distributed file system.
6d8727
One or more instances of ceph-mds collectively manage the file system
6d8727
namespace, coordinating access to the shared OSD cluster.
6d8727
6d8727
%package mon
6d8727
Summary:	Ceph Monitor Daemon
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
6d8727
Provides:	ceph-test:/usr/bin/ceph-monstore-tool
6d8727
Requires:	ceph-base = %{_epoch_prefix}%{version}-%{release}
6d8727
%description mon
6d8727
ceph-mon is the cluster monitor daemon for the Ceph distributed file
6d8727
system. One or more instances of ceph-mon form a Paxos part-time
6d8727
parliament cluster that provides extremely reliable and durable storage
6d8727
of cluster membership, configuration, and state.
6d8727
6d8727
%package mgr
fefe1d
Summary:        Ceph Manager Daemon
6d8727
%if 0%{?suse_version}
fefe1d
Group:          System/Filesystems
6d8727
%endif
fefe1d
Requires:       ceph-base = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:       python%{_python_buildid}-bcrypt
fefe1d
Requires:       python%{_python_buildid}-pecan
a133f6
Requires:       python%{_python_buildid}-requests
fefe1d
Requires:       python%{_python_buildid}-six
fefe1d
%if 0%{?fedora} || 0%{?rhel}
fefe1d
Requires:       python%{_python_buildid}-cherrypy
fefe1d
Requires:       python%{_python_buildid}-werkzeug
6d8727
%endif
fefe1d
%if 0%{?suse_version}
fefe1d
Requires:       python%{_python_buildid}-CherryPy
fefe1d
Requires:       python%{_python_buildid}-Werkzeug
a133f6
%endif
a133f6
%if 0%{?weak_deps}
6d8727
Recommends:	ceph-mgr-dashboard = %{_epoch_prefix}%{version}-%{release}
6d8727
Recommends:	ceph-mgr-diskprediction-local = %{_epoch_prefix}%{version}-%{release}
6d8727
Recommends:	ceph-mgr-diskprediction-cloud = %{_epoch_prefix}%{version}-%{release}
fefe1d
Recommends:	ceph-mgr-rook = %{_epoch_prefix}%{version}-%{release}
6d8727
Recommends:	ceph-mgr-k8sevents = %{_epoch_prefix}%{version}-%{release}
fefe1d
Recommends:	ceph-mgr-ssh = %{_epoch_prefix}%{version}-%{release}
a133f6
Recommends:	python%{_python_buildid}-influxdb
fefe1d
%endif
fefe1d
%if 0%{?rhel} == 7
fefe1d
Requires:       pyOpenSSL
fefe1d
%else
fefe1d
Requires:       python%{_python_buildid}-pyOpenSSL
6d8727
%endif
6d8727
%description mgr
6d8727
ceph-mgr enables python modules that provide services (such as the REST
6d8727
module derived from Calamari) and expose CLI hooks.  ceph-mgr gathers
6d8727
the cluster maps, the daemon metadata, and performance counters, and
6d8727
exposes all these to the python modules.
6d8727
6d8727
%package mgr-dashboard
fefe1d
Summary:        Ceph Dashboard
fefe1d
BuildArch:      noarch
6d8727
%if 0%{?suse_version}
fefe1d
Group:          System/Filesystems
6d8727
%endif
fefe1d
Requires:       ceph-mgr = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:       ceph-grafana-dashboards = %{_epoch_prefix}%{version}-%{release}
6d8727
%if 0%{?fedora} || 0%{?rhel}
fefe1d
Requires:       python%{_python_buildid}-cherrypy
fefe1d
Requires:       python%{_python_buildid}-jwt
fefe1d
Requires:       python%{_python_buildid}-routes
fefe1d
Requires:       python%{_python_buildid}-werkzeug
a133f6
%if 0%{?weak_deps}
a133f6
Recommends:     python%{_python_buildid}-saml
a133f6
%endif
6d8727
%endif
6d8727
%if 0%{?suse_version}
fefe1d
Requires:       python%{_python_buildid}-CherryPy
fefe1d
Requires:       python%{_python_buildid}-PyJWT
fefe1d
Requires:       python%{_python_buildid}-Routes
fefe1d
Requires:       python%{_python_buildid}-Werkzeug
fefe1d
%endif
fefe1d
%if 0%{?rhel} == 7
fefe1d
Requires:       pyOpenSSL
fefe1d
%else
fefe1d
Requires:       python%{_python_buildid}-pyOpenSSL
6d8727
%endif
6d8727
%description mgr-dashboard
fefe1d
ceph-mgr-dashboard is a manager plugin, providing a web-based application
6d8727
to monitor and manage many aspects of a Ceph cluster and related components.
6d8727
See the Dashboard documentation at http://docs.ceph.com/ for details and a
6d8727
detailed feature overview.
6d8727
6d8727
%package mgr-diskprediction-local
fefe1d
Summary:        ceph-mgr diskprediction_local plugin
fefe1d
BuildArch:      noarch
6d8727
%if 0%{?suse_version}
fefe1d
Group:          System/Filesystems
fefe1d
%endif
fefe1d
Requires:       ceph-mgr = %{_epoch_prefix}%{version}-%{release}
fefe1d
%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?suse_version}
fefe1d
Requires:       python%{_python_buildid}-numpy
fefe1d
%if 0%{without python2}
fefe1d
Requires:       python3-scipy
fefe1d
%else
fefe1d
Requires:       python2-scipy
fefe1d
%endif
6d8727
%endif
6d8727
%if 0%{?rhel} == 7
fefe1d
Requires:       numpy
fefe1d
Requires:       scipy
6d8727
%endif
6d8727
%description mgr-diskprediction-local
fefe1d
ceph-mgr-diskprediction-local is a ceph-mgr plugin that tries to predict
6d8727
disk failures using local algorithms and machine-learning databases.
6d8727
6d8727
%package mgr-diskprediction-cloud
fefe1d
Summary:        ceph-mgr diskprediction_cloud plugin
fefe1d
BuildArch:      noarch
6d8727
%if 0%{?suse_version}
fefe1d
Group:          System/Filesystems
6d8727
%endif
fefe1d
Requires:       ceph-mgr = %{_epoch_prefix}%{version}-%{release}
6d8727
%description mgr-diskprediction-cloud
fefe1d
ceph-mgr-diskprediction-cloud is a ceph-mgr plugin that tries to predict
6d8727
disk failures using services in the Google cloud.
6d8727
6d8727
%package mgr-rook
fefe1d
BuildArch:      noarch
fefe1d
Summary:        ceph-mgr rook plugin
6d8727
%if 0%{?suse_version}
fefe1d
Group:          System/Filesystems
6d8727
%endif
fefe1d
Requires:       ceph-mgr = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:       python%{_python_buildid}-kubernetes
6d8727
%description mgr-rook
fefe1d
ceph-mgr-rook is a ceph-mgr plugin for orchestration functions using
6d8727
a Rook backend.
6d8727
6d8727
%package mgr-k8sevents
fefe1d
BuildArch:      noarch
fefe1d
Summary:        Ceph Manager plugin to orchestrate ceph-events to kubernetes' events API
6d8727
%if 0%{?suse_version}
fefe1d
Group:          System/Filesystems
6d8727
%endif
fefe1d
Requires:       ceph-mgr = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:       python%{_python_buildid}-kubernetes
6d8727
%description mgr-k8sevents
fefe1d
ceph-mgr-k8sevents is a ceph-mgr plugin that sends every ceph-events
6d8727
to kubernetes' events API
6d8727
fefe1d
%package mgr-ssh
fefe1d
Summary:        ceph-mgr ssh module
6d8727
BuildArch:	noarch
6d8727
%if 0%{?suse_version}
fefe1d
Group:          System/Filesystems
6d8727
%endif
fefe1d
Requires:       ceph-mgr = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:       python%{_python_buildid}-remoto
fefe1d
%description mgr-ssh
fefe1d
ceph-mgr-ssh is a ceph-mgr module for orchestration functions using
fefe1d
direct SSH connections for management operations.
6d8727
6d8727
%package fuse
6d8727
Summary:	Ceph fuse-based client
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
fefe1d
Requires:       fuse
6d8727
Requires:	python%{python3_pkgversion}
6d8727
%description fuse
6d8727
FUSE based client for Ceph distributed network file system
6d8727
6d8727
%package -n rbd-fuse
6d8727
Summary:	Ceph fuse-based client
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
6d8727
Requires:	librados2 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	librbd1 = %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n rbd-fuse
6d8727
FUSE based client to map Ceph rbd images to files
6d8727
6d8727
%package -n rbd-mirror
6d8727
Summary:	Ceph daemon for mirroring RBD images
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
6d8727
Requires:	ceph-base = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	librados2 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	librbd1 = %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n rbd-mirror
6d8727
Daemon for mirroring RBD images between Ceph clusters, streaming
6d8727
changes asynchronously.
6d8727
6d8727
%package -n rbd-nbd
6d8727
Summary:	Ceph RBD client base on NBD
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
6d8727
Requires:	librados2 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	librbd1 = %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n rbd-nbd
6d8727
NBD based client to map Ceph rbd images to local device
6d8727
6d8727
%package radosgw
6d8727
Summary:	Rados REST gateway
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
6d8727
Requires:	ceph-base = %{_epoch_prefix}%{version}-%{release}
6d8727
%if 0%{with selinux}
6d8727
Requires:	ceph-selinux = %{_epoch_prefix}%{version}-%{release}
6d8727
%endif
6d8727
Requires:	librados2 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	librgw2 = %{_epoch_prefix}%{version}-%{release}
6d8727
%if 0%{?rhel} || 0%{?fedora}
6d8727
Requires:	mailcap
6d8727
%endif
6d8727
%description radosgw
6d8727
RADOS is a distributed object store used by the Ceph distributed
6d8727
storage system.  This package provides a REST gateway to the
6d8727
object store that aims to implement a superset of Amazon's S3
6d8727
service as well as the OpenStack Object Storage ("Swift") API.
6d8727
6d8727
%if %{with ocf}
6d8727
%package resource-agents
6d8727
Summary:	OCF-compliant resource agents for Ceph daemons
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
6d8727
Requires:	ceph-base = %{_epoch_prefix}%{version}
6d8727
Requires:	resource-agents
6d8727
%description resource-agents
6d8727
Resource agents for monitoring and managing Ceph daemons
6d8727
under Open Cluster Framework (OCF) compliant resource
6d8727
managers such as Pacemaker.
6d8727
%endif
6d8727
6d8727
%package osd
6d8727
Summary:	Ceph Object Storage Daemon
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
6d8727
Provides:	ceph-test:/usr/bin/ceph-osdomap-tool
6d8727
Requires:	ceph-base = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	lvm2
6d8727
Requires:	sudo
fefe1d
Requires: libstoragemgmt
6d8727
%description osd
6d8727
ceph-osd is the object storage daemon for the Ceph distributed file
6d8727
system.  It is responsible for storing objects on a local file system
6d8727
and providing access to them over the network.
6d8727
6d8727
%package -n librados2
6d8727
Summary:	RADOS distributed object store client library
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Libraries
6d8727
%endif
6d8727
%if 0%{?rhel} || 0%{?fedora}
6d8727
Obsoletes:	ceph-libs < %{_epoch_prefix}%{version}-%{release}
6d8727
%endif
6d8727
%description -n librados2
6d8727
RADOS is a reliable, autonomic distributed object storage cluster
6d8727
developed as part of the Ceph distributed storage system. This is a
6d8727
shared library allowing applications to access the distributed object
6d8727
store using a simple file-like interface.
6d8727
6d8727
%package -n librados-devel
6d8727
Summary:	RADOS headers
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/C and C++
6d8727
%endif
6d8727
Requires:	librados2 = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	ceph-devel < %{_epoch_prefix}%{version}-%{release}
6d8727
Provides:	librados2-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	librados2-devel < %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n librados-devel
6d8727
This package contains C libraries and headers needed to develop programs
6d8727
that use RADOS object store.
6d8727
6d8727
%package -n libradospp-devel
6d8727
Summary:	RADOS headers
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/C and C++
6d8727
%endif
6d8727
Requires:	librados2 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	librados-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n libradospp-devel
6d8727
This package contains C++ libraries and headers needed to develop programs
6d8727
that use RADOS object store.
6d8727
6d8727
%package -n librgw2
6d8727
Summary:	RADOS gateway client library
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Libraries
6d8727
%endif
6d8727
Requires:	librados2 = %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n librgw2
6d8727
This package provides a library implementation of the RADOS gateway
6d8727
(distributed object store with S3 and Swift personalities).
6d8727
6d8727
%package -n librgw-devel
6d8727
Summary:	RADOS gateway client library
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/C and C++
6d8727
%endif
6d8727
Requires:	librados-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	librgw2 = %{_epoch_prefix}%{version}-%{release}
6d8727
Provides:	librgw2-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	librgw2-devel < %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n librgw-devel
6d8727
This package contains libraries and headers needed to develop programs
6d8727
that use RADOS gateway client library.
6d8727
fefe1d
%if 0%{with python2}
fefe1d
%package -n python-rgw
fefe1d
Summary:	Python 2 libraries for the RADOS gateway
fefe1d
%if 0%{?suse_version}
fefe1d
Group:		Development/Libraries/Python
fefe1d
%endif
fefe1d
Requires:	librgw2 = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:	python-rados = %{_epoch_prefix}%{version}-%{release}
fefe1d
%{?python_provide:%python_provide python-rgw}
fefe1d
Obsoletes:	python-ceph < %{_epoch_prefix}%{version}-%{release}
fefe1d
%description -n python-rgw
fefe1d
This package contains Python 2 libraries for interacting with Cephs RADOS
fefe1d
gateway.
fefe1d
%endif
fefe1d
6d8727
%package -n python%{python3_pkgversion}-rgw
6d8727
Summary:	Python 3 libraries for the RADOS gateway
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/Python
6d8727
%endif
6d8727
Requires:	librgw2 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
6d8727
%{?python_provide:%python_provide python%{python3_pkgversion}-rgw}
fefe1d
%if 0%{without python2}
6d8727
Provides:	python-rgw = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	python-rgw < %{_epoch_prefix}%{version}-%{release}
fefe1d
%endif
6d8727
%description -n python%{python3_pkgversion}-rgw
6d8727
This package contains Python 3 libraries for interacting with Cephs RADOS
6d8727
gateway.
6d8727
fefe1d
%if 0%{with python2}
fefe1d
%package -n python-rados
fefe1d
Summary:	Python 2 libraries for the RADOS object store
fefe1d
%if 0%{?suse_version}
fefe1d
Group:		Development/Libraries/Python
fefe1d
%endif
fefe1d
Requires:	librados2 = %{_epoch_prefix}%{version}-%{release}
fefe1d
%{?python_provide:%python_provide python-rados}
fefe1d
Obsoletes:	python-ceph < %{_epoch_prefix}%{version}-%{release}
fefe1d
%description -n python-rados
fefe1d
This package contains Python 2 libraries for interacting with Cephs RADOS
fefe1d
object store.
fefe1d
%endif
fefe1d
6d8727
%package -n python%{python3_pkgversion}-rados
6d8727
Summary:	Python 3 libraries for the RADOS object store
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/Python
6d8727
%endif
6d8727
Requires:	python%{python3_pkgversion}
6d8727
Requires:	librados2 = %{_epoch_prefix}%{version}-%{release}
6d8727
%{?python_provide:%python_provide python%{python3_pkgversion}-rados}
fefe1d
%if 0%{without python2}
6d8727
Provides:	python-rados = %{_epoch_prefix}%{version}-%{release}
fefe1d
Obsoletes:      python-rados < %{_epoch_prefix}%{version}-%{release}
fefe1d
%endif
6d8727
%description -n python%{python3_pkgversion}-rados
6d8727
This package contains Python 3 libraries for interacting with Cephs RADOS
6d8727
object store.
6d8727
6d8727
%if 0%{with libradosstriper}
6d8727
%package -n libradosstriper1
6d8727
Summary:	RADOS striping interface
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Libraries
6d8727
%endif
6d8727
Requires:	librados2 = %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n libradosstriper1
6d8727
Striping interface built on top of the rados library, allowing
6d8727
to stripe bigger objects onto several standard rados objects using
6d8727
an interface very similar to the rados one.
6d8727
6d8727
%package -n libradosstriper-devel
6d8727
Summary:	RADOS striping interface headers
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/C and C++
6d8727
%endif
6d8727
Requires:	libradosstriper1 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	librados-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	libradospp-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	ceph-devel < %{_epoch_prefix}%{version}-%{release}
6d8727
Provides:	libradosstriper1-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	libradosstriper1-devel < %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n libradosstriper-devel
6d8727
This package contains libraries and headers needed to develop programs
6d8727
that use RADOS striping interface.
6d8727
%endif
6d8727
6d8727
%package -n librbd1
6d8727
Summary:	RADOS block device client library
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Libraries
6d8727
%endif
6d8727
Requires:	librados2 = %{_epoch_prefix}%{version}-%{release}
6d8727
%if 0%{?suse_version}
6d8727
Requires(post): coreutils
6d8727
%endif
6d8727
%if 0%{?rhel} || 0%{?fedora}
6d8727
Obsoletes:	ceph-libs < %{_epoch_prefix}%{version}-%{release}
6d8727
%endif
6d8727
%description -n librbd1
6d8727
RBD is a block device striped across multiple distributed objects in
6d8727
RADOS, a reliable, autonomic distributed object storage cluster
6d8727
developed as part of the Ceph distributed storage system. This is a
6d8727
shared library allowing applications to manage these block devices.
6d8727
6d8727
%package -n librbd-devel
6d8727
Summary:	RADOS block device headers
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/C and C++
6d8727
%endif
6d8727
Requires:	librbd1 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	librados-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	libradospp-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	ceph-devel < %{_epoch_prefix}%{version}-%{release}
6d8727
Provides:	librbd1-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	librbd1-devel < %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n librbd-devel
6d8727
This package contains libraries and headers needed to develop programs
6d8727
that use RADOS block device.
6d8727
fefe1d
%if 0%{with python2}
fefe1d
%package -n python-rbd
fefe1d
Summary:	Python 2 libraries for the RADOS block device
fefe1d
%if 0%{?suse_version}
fefe1d
Group:		Development/Libraries/Python
fefe1d
%endif
fefe1d
Requires:	librbd1 = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:	python-rados = %{_epoch_prefix}%{version}-%{release}
fefe1d
%{?python_provide:%python_provide python-rbd}
fefe1d
Obsoletes:	python-ceph < %{_epoch_prefix}%{version}-%{release}
fefe1d
%description -n python-rbd
fefe1d
This package contains Python 2 libraries for interacting with Cephs RADOS
fefe1d
block device.
fefe1d
%endif
fefe1d
6d8727
%package -n python%{python3_pkgversion}-rbd
6d8727
Summary:	Python 3 libraries for the RADOS block device
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/Python
6d8727
%endif
6d8727
Requires:	librbd1 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
6d8727
%{?python_provide:%python_provide python%{python3_pkgversion}-rbd}
fefe1d
Provides:	python3-rbd = %{_epoch_prefix}%{version}-%{release}
fefe1d
%if 0%{without python2}
6d8727
Provides:	python-rbd = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	python-rbd < %{_epoch_prefix}%{version}-%{release}
fefe1d
%endif
6d8727
%description -n python%{python3_pkgversion}-rbd
6d8727
This package contains Python 3 libraries for interacting with Cephs RADOS
6d8727
block device.
6d8727
6d8727
%package -n libcephfs2
6d8727
Summary:	Ceph distributed file system client library
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Libraries
6d8727
%endif
6d8727
Obsoletes:	libcephfs1 < %{_epoch_prefix}%{version}-%{release}
6d8727
%if 0%{?rhel} || 0%{?fedora}
6d8727
Obsoletes:	ceph-libs < %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	ceph-libcephfs < %{_epoch_prefix}%{version}-%{release}
6d8727
%endif
6d8727
%description -n libcephfs2
6d8727
Ceph is a distributed network file system designed to provide excellent
6d8727
performance, reliability, and scalability. This is a shared library
6d8727
allowing applications to access a Ceph distributed file system via a
6d8727
POSIX-like interface.
6d8727
6d8727
%package -n libcephfs-devel
6d8727
Summary:	Ceph distributed file system headers
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/C and C++
6d8727
%endif
6d8727
Requires:	libcephfs2 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	librados-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	ceph-devel < %{_epoch_prefix}%{version}-%{release}
6d8727
Provides:	libcephfs2-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	libcephfs2-devel < %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n libcephfs-devel
6d8727
This package contains libraries and headers needed to develop programs
6d8727
that use Cephs distributed file system.
6d8727
fefe1d
%if 0%{with python2}
fefe1d
%package -n python-cephfs
fefe1d
Summary:	Python 2 libraries for Ceph distributed file system
fefe1d
%if 0%{?suse_version}
fefe1d
Group:		Development/Libraries/Python
fefe1d
%endif
fefe1d
Requires:	libcephfs2 = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:	python-rados = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:	python-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
fefe1d
%{?python_provide:%python_provide python-cephfs}
fefe1d
Obsoletes:	python-ceph < %{_epoch_prefix}%{version}-%{release}
fefe1d
%description -n python-cephfs
fefe1d
This package contains Python 2 libraries for interacting with Cephs distributed
fefe1d
file system.
fefe1d
%endif
fefe1d
6d8727
%package -n python%{python3_pkgversion}-cephfs
6d8727
Summary:	Python 3 libraries for Ceph distributed file system
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/Python
6d8727
%endif
6d8727
Requires:	libcephfs2 = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release}
6d8727
%{?python_provide:%python_provide python%{python3_pkgversion}-cephfs}
fefe1d
%if 0%{without python2}
6d8727
Provides:	python-cephfs = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	python-cephfs < %{_epoch_prefix}%{version}-%{release}
fefe1d
%endif
6d8727
%description -n python%{python3_pkgversion}-cephfs
6d8727
This package contains Python 3 libraries for interacting with Cephs distributed
6d8727
file system.
6d8727
fefe1d
%if 0%{with python2}
fefe1d
%package -n python-ceph-argparse
fefe1d
Summary:	Python 2 utility libraries for Ceph CLI
fefe1d
%if 0%{?suse_version}
fefe1d
Group:		Development/Libraries/Python
fefe1d
%endif
fefe1d
%description -n python-ceph-argparse
fefe1d
This package contains types and routines for Python 2 used by the Ceph CLI as
fefe1d
well as the RESTful interface. These have to do with querying the daemons for
fefe1d
command-description information, validating user command input against those
fefe1d
descriptions, and submitting the command to the appropriate daemon.
fefe1d
%endif
fefe1d
6d8727
%package -n python%{python3_pkgversion}-ceph-argparse
6d8727
Summary:	Python 3 utility libraries for Ceph CLI
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/Python
6d8727
%endif
6d8727
%{?python_provide:%python_provide python%{python3_pkgversion}-ceph-argparse}
6d8727
%description -n python%{python3_pkgversion}-ceph-argparse
6d8727
This package contains types and routines for Python 3 used by the Ceph CLI as
6d8727
well as the RESTful interface. These have to do with querying the daemons for
6d8727
command-description information, validating user command input against those
6d8727
descriptions, and submitting the command to the appropriate daemon.
6d8727
6d8727
%if 0%{with cephfs_shell}
6d8727
%package -n cephfs-shell
fefe1d
Summary:    Interactive shell for Ceph file system
fefe1d
Requires:   python%{python3_pkgversion}-cmd2
fefe1d
Requires:   python%{python3_pkgversion}-colorama
fefe1d
Requires:   python%{python3_pkgversion}-cephfs
6d8727
%description -n cephfs-shell
6d8727
This package contains an interactive tool that allows accessing a Ceph
6d8727
file system without mounting it  by providing a nice pseudo-shell which
6d8727
works like an FTP client.
6d8727
%endif
6d8727
6d8727
%if 0%{with ceph_test_package}
6d8727
%package -n ceph-test
6d8727
Summary:	Ceph benchmarks and test tools
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Benchmark
6d8727
%endif
6d8727
Requires:	ceph-common = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	xmlstarlet
6d8727
Requires:	jq
6d8727
Requires:	socat
fefe1d
BuildRequires:	gtest-devel
fefe1d
BuildRequires:	gmock-devel
6d8727
%description -n ceph-test
6d8727
This package contains Ceph benchmarks and test tools.
6d8727
%endif
6d8727
6d8727
%if 0%{with cephfs_java}
6d8727
6d8727
%package -n libcephfs_jni1
6d8727
Summary:	Java Native Interface library for CephFS Java bindings
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Libraries
6d8727
%endif
6d8727
Requires:	java
6d8727
Requires:	libcephfs2 = %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n libcephfs_jni1
6d8727
This package contains the Java Native Interface library for CephFS Java
6d8727
bindings.
6d8727
6d8727
%package -n libcephfs_jni-devel
6d8727
Summary:	Development files for CephFS Java Native Interface library
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/Java
6d8727
%endif
6d8727
Requires:	java
6d8727
Requires:	libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	ceph-devel < %{_epoch_prefix}%{version}-%{release}
6d8727
Provides:	libcephfs_jni1-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
Obsoletes:	libcephfs_jni1-devel < %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n libcephfs_jni-devel
6d8727
This package contains the development files for CephFS Java Native Interface
6d8727
library.
6d8727
6d8727
%package -n cephfs-java
6d8727
Summary:	Java libraries for the Ceph File System
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Libraries
6d8727
%endif
6d8727
Requires:	java
6d8727
Requires:	libcephfs_jni1 = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:       junit
fefe1d
BuildRequires:  junit
6d8727
%description -n cephfs-java
6d8727
This package contains the Java libraries for the Ceph File System.
6d8727
6d8727
%endif
6d8727
6d8727
%package -n rados-objclass-devel
fefe1d
Summary:        RADOS object class development kit
6d8727
%if 0%{?suse_version}
6d8727
Group:		Development/Libraries/C and C++
6d8727
%endif
fefe1d
Requires:       libradospp-devel = %{_epoch_prefix}%{version}-%{release}
6d8727
%description -n rados-objclass-devel
6d8727
This package contains libraries and headers needed to develop RADOS object
6d8727
class plugins.
6d8727
6d8727
%if 0%{with selinux}
6d8727
6d8727
%package selinux
6d8727
Summary:	SELinux support for Ceph MON, OSD and MDS
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
6d8727
Requires:	ceph-base = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires:	policycoreutils, libselinux-utils
6d8727
Requires(post):	ceph-base = %{_epoch_prefix}%{version}-%{release}
6d8727
Requires(post): selinux-policy-base >= %{_selinux_policy_version}, policycoreutils, gawk
6d8727
Requires(postun): policycoreutils
6d8727
%description selinux
6d8727
This package contains SELinux support for Ceph MON, OSD and MDS. The package
6d8727
also performs file-system relabelling which can take a long time on heavily
6d8727
populated file-systems.
6d8727
6d8727
%endif
6d8727
fefe1d
%if 0%{with python2}
fefe1d
%package -n python-ceph-compat
fefe1d
Summary:	Compatibility package for Cephs python libraries
fefe1d
%if 0%{?suse_version}
fefe1d
Group:		Development/Libraries/Python
fefe1d
%endif
fefe1d
Obsoletes:	python-ceph
fefe1d
Requires:	python-rados = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:	python-rbd = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:	python-cephfs = %{_epoch_prefix}%{version}-%{release}
fefe1d
Requires:	python-rgw = %{_epoch_prefix}%{version}-%{release}
fefe1d
Provides:	python-ceph
fefe1d
%description -n python-ceph-compat
fefe1d
This is a compatibility package to accommodate python-ceph split into
fefe1d
python-rados, python-rbd, python-rgw and python-cephfs. Packages still
fefe1d
depending on python-ceph should be fixed to depend on python-rados,
fefe1d
python-rbd, python-rgw or python-cephfs instead.
fefe1d
%endif
fefe1d
6d8727
%package grafana-dashboards
6d8727
Summary:	The set of Grafana dashboards for monitoring purposes
6d8727
BuildArch:	noarch
6d8727
%if 0%{?suse_version}
6d8727
Group:		System/Filesystems
6d8727
%endif
6d8727
%description grafana-dashboards
6d8727
This package provides a set of Grafana dashboards for monitoring of
6d8727
Ceph clusters. The dashboards require a Prometheus server setup
6d8727
collecting data from Ceph Manager "prometheus" module and Prometheus
6d8727
project "node_exporter" module. The dashboards are designed to be
6d8727
integrated with the Ceph Manager Dashboard web UI.
6d8727
fefe1d
%if 0%{?suse_version}
6d8727
%package prometheus-alerts
fefe1d
Summary:        Prometheus alerts for a Ceph deplyoment
fefe1d
BuildArch:      noarch
fefe1d
Group:          System/Monitoring
6d8727
%description prometheus-alerts
6d8727
This package provides Ceph’s default alerts for Prometheus.
fefe1d
%endif
6d8727
6d8727
#################################################################################
6d8727
# common
6d8727
#################################################################################
6d8727
%prep
6d8727
%autosetup -p1
6d8727
6d8727
%build
6d8727
# LTO can be enabled as soon as the following GCC bug is fixed:
6d8727
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200
6d8727
%define _lto_cflags %{nil}
6d8727
6d8727
%if 0%{?rhel} == 7
6d8727
. /opt/rh/devtoolset-8/enable
6d8727
%endif
6d8727
6d8727
%if 0%{with cephfs_java}
6d8727
# Find jni.h
6d8727
for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do
6d8727
    [ -d $i ] && java_inc="$java_inc -I$i"
6d8727
done
6d8727
%endif
6d8727
6d8727
%if 0%{?suse_version}
6d8727
# the following setting fixed an OOM condition we once encountered in the OBS
6d8727
RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768"
6d8727
%endif
6d8727
6d8727
export CPPFLAGS="$java_inc"
6d8727
export CFLAGS="$RPM_OPT_FLAGS"
6d8727
export CXXFLAGS="$RPM_OPT_FLAGS"
6d8727
export LDFLAGS="$RPM_LD_FLAGS"
6d8727
6d8727
# Parallel build settings ...
6d8727
CEPH_MFLAGS_JOBS="%{?_smp_mflags}"
6d8727
CEPH_SMP_NCPUS=$(echo "$CEPH_MFLAGS_JOBS" | sed 's/-j//')
6d8727
%if 0%{?__isa_bits} == 32
6d8727
# 32-bit builds can use 3G memory max, which is not enough even for -j2
6d8727
CEPH_SMP_NCPUS="1"
6d8727
%endif
6d8727
# do not eat all memory
6d8727
echo "Available memory:"
6d8727
free -h
6d8727
echo "System limits:"
6d8727
ulimit -a
6d8727
if test -n "$CEPH_SMP_NCPUS" -a "$CEPH_SMP_NCPUS" -gt 1 ; then
fefe1d
    mem_per_process=2500
6d8727
    max_mem=$(LANG=C free -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p")
6d8727
    max_jobs="$(($max_mem / $mem_per_process))"
6d8727
    test "$CEPH_SMP_NCPUS" -gt "$max_jobs" && CEPH_SMP_NCPUS="$max_jobs" && echo "Warning: Reducing build parallelism to -j$max_jobs because of memory limits"
6d8727
    test "$CEPH_SMP_NCPUS" -le 0 && CEPH_SMP_NCPUS="1" && echo "Warning: Not using parallel build at all because of memory limits"
6d8727
fi
6d8727
export CEPH_SMP_NCPUS
6d8727
export CEPH_MFLAGS_JOBS="-j$CEPH_SMP_NCPUS"
6d8727
6d8727
env | sort
6d8727
6d8727
mkdir build
6d8727
cd build
6d8727
%if 0%{?rhel} == 7
fefe1d
CMAKE=cmake3
fefe1d
%else
fefe1d
CMAKE=cmake
6d8727
%endif
fefe1d
${CMAKE} .. \
6d8727
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
6d8727
    -DBUILD_CONFIG=rpmbuild \
6d8727
    -DCMAKE_INSTALL_PREFIX=%{_prefix} \
6d8727
    -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
6d8727
    -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
6d8727
    -DCMAKE_INSTALL_LOCALSTATEDIR=%{_localstatedir} \
6d8727
    -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
6d8727
    -DCMAKE_INSTALL_MANDIR=%{_mandir} \
6d8727
    -DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \
6d8727
    -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
6d8727
    -DWITH_MANPAGE=ON \
6d8727
    -DWITH_PYTHON3=%{python3_version} \
6d8727
    -DWITH_MGR_DASHBOARD_FRONTEND=OFF \
fefe1d
%if %{with python2}
fefe1d
    -DWITH_PYTHON2=ON \
fefe1d
%else
fefe1d
    -DWITH_PYTHON2=OFF \
fefe1d
    -DMGR_PYTHON_VERSION=3 \
fefe1d
%endif
6d8727
%if 0%{without ceph_test_package}
6d8727
    -DWITH_TESTS=OFF \
6d8727
%endif
6d8727
%if 0%{with cephfs_java}
6d8727
    -DWITH_CEPHFS_JAVA=ON \
6d8727
%endif
6d8727
%if 0%{with selinux}
6d8727
    -DWITH_SELINUX=ON \
6d8727
%endif
6d8727
%if %{with lttng}
6d8727
    -DWITH_LTTNG=ON \
6d8727
    -DWITH_BABELTRACE=ON \
6d8727
%else
6d8727
    -DWITH_LTTNG=OFF \
6d8727
    -DWITH_BABELTRACE=OFF \
6d8727
%endif
6d8727
    $CEPH_EXTRA_CMAKE_ARGS \
6d8727
%if 0%{with ocf}
6d8727
    -DWITH_OCF=ON \
6d8727
%endif
6d8727
%ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64
6d8727
    -DWITH_BOOST_CONTEXT=ON \
6d8727
%else
6d8727
    -DWITH_BOOST_CONTEXT=OFF \
6d8727
%endif
6d8727
%if 0%{with cephfs_shell}
6d8727
    -DWITH_CEPHFS_SHELL=ON \
6d8727
%endif
6d8727
%if 0%{with libradosstriper}
6d8727
    -DWITH_LIBRADOSSTRIPER=ON \
6d8727
%else
6d8727
    -DWITH_LIBRADOSSTRIPER=OFF \
6d8727
%endif
6d8727
%if 0%{with amqp_endpoint}
6d8727
    -DWITH_RADOSGW_AMQP_ENDPOINT=ON \
6d8727
%else
6d8727
    -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \
6d8727
%endif
a133f6
%if 0%{with kafka_endpoint}
a133f6
    -DWITH_RADOSGW_KAFKA_ENDPOINT=ON \
a133f6
%else
a133f6
    -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \
a133f6
%endif
6d8727
    -DBOOST_J=$CEPH_SMP_NCPUS \
fefe1d
%if 0%{with ceph_test_package}
fefe1d
    -DWITH_SYSTEM_GTEST=ON \
6d8727
%endif
fefe1d
    -DWITH_GRAFANA=ON
6d8727
6d8727
export VERBOSE=1
6d8727
export V=1
6d8727
make "$CEPH_MFLAGS_JOBS"
6d8727
6d8727
6d8727
%if 0%{with make_check}
6d8727
%check
6d8727
# run in-tree unittests
fefe1d
cd build
fefe1d
ctest "$CEPH_MFLAGS_JOBS"
6d8727
%endif
6d8727
6d8727
6d8727
%install
6d8727
pushd build
6d8727
make DESTDIR=%{buildroot} install
6d8727
# we have dropped sysvinit bits
6d8727
rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph
6d8727
popd
6d8727
install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph
6d8727
%endif
6d8727
%if 0%{?suse_version}
6d8727
install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_fillupdir}/sysconfig.%{name}
6d8727
%endif
6d8727
install -m 0644 -D systemd/ceph.tmpfiles.d %{buildroot}%{_tmpfilesdir}/ceph-common.conf
6d8727
install -m 0644 -D systemd/50-ceph.preset %{buildroot}%{_libexecdir}/systemd/system-preset/50-ceph.preset
6d8727
mkdir -p %{buildroot}%{_sbindir}
6d8727
install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
6d8727
chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf
6d8727
install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
6d8727
install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
6d8727
6d8727
# firewall templates and /sbin/mount.ceph symlink
6d8727
%if 0%{?suse_version}
6d8727
mkdir -p %{buildroot}/sbin
6d8727
ln -sf %{_sbindir}/mount.ceph %{buildroot}/sbin/mount.ceph
6d8727
%endif
6d8727
6d8727
# udev rules
6d8727
install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules
6d8727
6d8727
# sudoers.d
6d8727
install -m 0600 -D sudoers.d/ceph-osd-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
6d8727
a133f6
%if 0%{?rhel} >= 8
a133f6
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/*
a133f6
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_sbindir}/*
a133f6
%endif
a133f6
6d8727
#set up placeholder directories
6d8727
mkdir -p %{buildroot}%{_sysconfdir}/ceph
6d8727
mkdir -p %{buildroot}%{_localstatedir}/run/ceph
6d8727
mkdir -p %{buildroot}%{_localstatedir}/log/ceph
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/tmp
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mon
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/osd
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mds
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/mgr
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/crash/posted
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/radosgw
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-osd
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mds
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rgw
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-mgr
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd
6d8727
mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
6d8727
6d8727
%if 0%{?suse_version}
6d8727
# create __pycache__ directories and their contents
6d8727
%py3_compile %{buildroot}%{python3_sitelib}
fefe1d
# prometheus alerts
fefe1d
install -m 644 -D monitoring/prometheus/alerts/ceph_default_alerts.yml %{buildroot}/etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml
6d8727
# hardlink duplicate files under /usr to save space
6d8727
%fdupes %{buildroot}%{_prefix}
6d8727
%endif
6d8727
6d8727
%if 0%{?rhel} == 8
6d8727
%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}
6d8727
%endif
6d8727
6d8727
#################################################################################
6d8727
# files and systemd scriptlets
6d8727
#################################################################################
6d8727
%files
6d8727
6d8727
%files base
6d8727
%{_bindir}/ceph-crash
6d8727
%{_bindir}/crushtool
6d8727
%{_bindir}/monmaptool
6d8727
%{_bindir}/osdmaptool
6d8727
%{_bindir}/ceph-kvstore-tool
6d8727
%{_bindir}/ceph-run
6d8727
%{_libexecdir}/systemd/system-preset/50-ceph.preset
6d8727
%{_sbindir}/ceph-create-keys
6d8727
%dir %{_libexecdir}/ceph
6d8727
%{_libexecdir}/ceph/ceph_common.sh
6d8727
%dir %{_libdir}/rados-classes
6d8727
%{_libdir}/rados-classes/*
6d8727
%dir %{_libdir}/ceph
6d8727
%dir %{_libdir}/ceph/erasure-code
6d8727
%{_libdir}/ceph/erasure-code/libec_*.so*
6d8727
%dir %{_libdir}/ceph/compressor
6d8727
%{_libdir}/ceph/compressor/libceph_*.so*
6d8727
%{_unitdir}/ceph-crash.service
6d8727
%dir %{_libdir}/ceph/crypto
6d8727
%{_libdir}/ceph/crypto/libceph_*.so*
6d8727
%if %{with lttng}
6d8727
%{_libdir}/libos_tp.so*
6d8727
%{_libdir}/libosd_tp.so*
6d8727
%endif
6d8727
%config(noreplace) %{_sysconfdir}/logrotate.d/ceph
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%config(noreplace) %{_sysconfdir}/sysconfig/ceph
6d8727
%endif
6d8727
%if 0%{?suse_version}
6d8727
%{_fillupdir}/sysconfig.*
6d8727
%endif
6d8727
%{_unitdir}/ceph.target
fefe1d
%if 0%{with python2}
fefe1d
%dir %{python_sitelib}/ceph_volume
fefe1d
%{python_sitelib}/ceph_volume/*
fefe1d
%{python_sitelib}/ceph_volume-*
fefe1d
%else
6d8727
%dir %{python3_sitelib}/ceph_volume
6d8727
%{python3_sitelib}/ceph_volume/*
6d8727
%{python3_sitelib}/ceph_volume-*
fefe1d
%endif
6d8727
%{_mandir}/man8/ceph-deploy.8*
6d8727
%{_mandir}/man8/ceph-create-keys.8*
6d8727
%{_mandir}/man8/ceph-run.8*
6d8727
%{_mandir}/man8/crushtool.8*
6d8727
%{_mandir}/man8/osdmaptool.8*
6d8727
%{_mandir}/man8/monmaptool.8*
6d8727
%{_mandir}/man8/ceph-kvstore-tool.8*
6d8727
#set up placeholder directories
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/crash/posted
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/tmp
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mds
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rgw
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mgr
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rbd-mirror
6d8727
6d8727
%post base
6d8727
/sbin/ldconfig
6d8727
%if 0%{?suse_version}
6d8727
%fillup_only
6d8727
if [ $1 -eq 1 ] ; then
6d8727
/usr/bin/systemctl preset ceph.target ceph-crash.service >/dev/null 2>&1 || :
6d8727
fi
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_post ceph.target ceph-crash.service
6d8727
%endif
6d8727
if [ $1 -eq 1 ] ; then
6d8727
/usr/bin/systemctl start ceph.target ceph-crash.service >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%preun base
6d8727
%if 0%{?suse_version}
6d8727
%service_del_preun ceph.target ceph-crash.service
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_preun ceph.target ceph-crash.service
6d8727
%endif
6d8727
6d8727
%postun base
6d8727
/sbin/ldconfig
6d8727
%if 0%{?suse_version}
6d8727
DISABLE_RESTART_ON_UPDATE="yes"
6d8727
%service_del_postun ceph.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_postun ceph.target
6d8727
%endif
6d8727
if [ $1 -ge 1 ] ; then
6d8727
  # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
6d8727
  # "yes". In any case: if units are not running, do not touch them.
6d8727
  SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
6d8727
  if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
6d8727
    source $SYSCONF_CEPH
6d8727
  fi
6d8727
fi
6d8727
6d8727
%files common
6d8727
%dir %{_docdir}/ceph
6d8727
%doc %{_docdir}/ceph/sample.ceph.conf
6d8727
%license %{_docdir}/ceph/COPYING
6d8727
%{_bindir}/ceph
6d8727
%{_bindir}/ceph-authtool
6d8727
%{_bindir}/ceph-conf
6d8727
%{_bindir}/ceph-dencoder
6d8727
%{_bindir}/ceph-rbdnamer
6d8727
%{_bindir}/ceph-syn
6d8727
%{_bindir}/cephfs-data-scan
6d8727
%{_bindir}/cephfs-journal-tool
6d8727
%{_bindir}/cephfs-table-tool
6d8727
%{_bindir}/rados
6d8727
%{_bindir}/radosgw-admin
6d8727
%{_bindir}/rbd
6d8727
%{_bindir}/rbd-replay
6d8727
%{_bindir}/rbd-replay-many
6d8727
%{_bindir}/rbdmap
6d8727
%{_sbindir}/mount.ceph
6d8727
%if 0%{?suse_version}
6d8727
/sbin/mount.ceph
6d8727
%endif
6d8727
%if %{with lttng}
6d8727
%{_bindir}/rbd-replay-prep
6d8727
%endif
6d8727
%{_bindir}/ceph-post-file
6d8727
%{_tmpfilesdir}/ceph-common.conf
6d8727
%{_mandir}/man8/ceph-authtool.8*
6d8727
%{_mandir}/man8/ceph-conf.8*
6d8727
%{_mandir}/man8/ceph-dencoder.8*
dce1ea
%{_mandir}/man8/ceph-diff-sorted.8*
6d8727
%{_mandir}/man8/ceph-rbdnamer.8*
6d8727
%{_mandir}/man8/ceph-syn.8*
6d8727
%{_mandir}/man8/ceph-post-file.8*
6d8727
%{_mandir}/man8/ceph.8*
6d8727
%{_mandir}/man8/mount.ceph.8*
6d8727
%{_mandir}/man8/rados.8*
6d8727
%{_mandir}/man8/radosgw-admin.8*
6d8727
%{_mandir}/man8/rbd.8*
6d8727
%{_mandir}/man8/rbdmap.8*
6d8727
%{_mandir}/man8/rbd-replay.8*
6d8727
%{_mandir}/man8/rbd-replay-many.8*
6d8727
%{_mandir}/man8/rbd-replay-prep.8*
dce1ea
%{_mandir}/man8/rgw-orphan-list.8*
6d8727
%dir %{_datadir}/ceph/
6d8727
%{_datadir}/ceph/known_hosts_drop.ceph.com
6d8727
%{_datadir}/ceph/id_rsa_drop.ceph.com
6d8727
%{_datadir}/ceph/id_rsa_drop.ceph.com.pub
6d8727
%dir %{_sysconfdir}/ceph/
6d8727
%config %{_sysconfdir}/bash_completion.d/ceph
6d8727
%config %{_sysconfdir}/bash_completion.d/rados
6d8727
%config %{_sysconfdir}/bash_completion.d/rbd
6d8727
%config %{_sysconfdir}/bash_completion.d/radosgw-admin
6d8727
%config(noreplace) %{_sysconfdir}/ceph/rbdmap
6d8727
%{_unitdir}/rbdmap.service
6d8727
%dir %{_udevrulesdir}
6d8727
%{_udevrulesdir}/50-rbd.rules
6d8727
%attr(3770,ceph,ceph) %dir %{_localstatedir}/log/ceph/
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/
6d8727
6d8727
%pre common
6d8727
CEPH_GROUP_ID=167
6d8727
CEPH_USER_ID=167
6d8727
%if 0%{?rhel} || 0%{?fedora}
6d8727
/usr/sbin/groupadd ceph -g $CEPH_GROUP_ID -o -r 2>/dev/null || :
6d8727
/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 || :
6d8727
%endif
6d8727
%if 0%{?suse_version}
6d8727
if ! getent group ceph >/dev/null ; then
6d8727
    CEPH_GROUP_ID_OPTION=""
6d8727
    getent group $CEPH_GROUP_ID >/dev/null || CEPH_GROUP_ID_OPTION="-g $CEPH_GROUP_ID"
6d8727
    groupadd ceph $CEPH_GROUP_ID_OPTION -r 2>/dev/null || :
6d8727
fi
6d8727
if ! getent passwd ceph >/dev/null ; then
6d8727
    CEPH_USER_ID_OPTION=""
6d8727
    getent passwd $CEPH_USER_ID >/dev/null || CEPH_USER_ID_OPTION="-u $CEPH_USER_ID"
6d8727
    useradd ceph $CEPH_USER_ID_OPTION -r -g ceph -s /sbin/nologin 2>/dev/null || :
6d8727
fi
6d8727
usermod -c "Ceph storage service" \
6d8727
        -d %{_localstatedir}/lib/ceph \
6d8727
        -g ceph \
6d8727
        -s /sbin/nologin \
6d8727
        ceph
6d8727
%endif
6d8727
exit 0
6d8727
6d8727
%post common
6d8727
%tmpfiles_create %{_tmpfilesdir}/ceph-common.conf
6d8727
6d8727
%postun common
6d8727
# Package removal cleanup
6d8727
if [ "$1" -eq "0" ] ; then
6d8727
    rm -rf %{_localstatedir}/log/ceph
6d8727
    rm -rf %{_sysconfdir}/ceph
6d8727
fi
6d8727
6d8727
%files mds
6d8727
%{_bindir}/ceph-mds
6d8727
%{_mandir}/man8/ceph-mds.8*
6d8727
%{_unitdir}/ceph-mds@.service
6d8727
%{_unitdir}/ceph-mds.target
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mds
6d8727
6d8727
%post mds
6d8727
%if 0%{?suse_version}
6d8727
if [ $1 -eq 1 ] ; then
6d8727
  /usr/bin/systemctl preset ceph-mds@\*.service ceph-mds.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_post ceph-mds@\*.service ceph-mds.target
6d8727
%endif
6d8727
if [ $1 -eq 1 ] ; then
6d8727
/usr/bin/systemctl start ceph-mds.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%preun mds
6d8727
%if 0%{?suse_version}
6d8727
%service_del_preun ceph-mds@\*.service ceph-mds.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_preun ceph-mds@\*.service ceph-mds.target
6d8727
%endif
6d8727
6d8727
%postun mds
6d8727
%if 0%{?suse_version}
6d8727
DISABLE_RESTART_ON_UPDATE="yes"
6d8727
%service_del_postun ceph-mds@\*.service ceph-mds.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_postun ceph-mds@\*.service ceph-mds.target
6d8727
%endif
6d8727
if [ $1 -ge 1 ] ; then
6d8727
  # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
6d8727
  # "yes". In any case: if units are not running, do not touch them.
6d8727
  SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
6d8727
  if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
6d8727
    source $SYSCONF_CEPH
6d8727
  fi
6d8727
  if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mds@\*.service > /dev/null 2>&1 || :
6d8727
  fi
6d8727
fi
6d8727
6d8727
%files mgr
6d8727
%{_bindir}/ceph-mgr
6d8727
%dir %{_datadir}/ceph/mgr
fefe1d
%{_datadir}/ceph/mgr/alerts
fefe1d
%{_datadir}/ceph/mgr/ansible
fefe1d
%{_datadir}/ceph/mgr/balancer
fefe1d
%{_datadir}/ceph/mgr/crash
fefe1d
%{_datadir}/ceph/mgr/deepsea
fefe1d
%{_datadir}/ceph/mgr/devicehealth
fefe1d
%{_datadir}/ceph/mgr/influx
fefe1d
%{_datadir}/ceph/mgr/insights
fefe1d
%{_datadir}/ceph/mgr/iostat
fefe1d
%{_datadir}/ceph/mgr/localpool
6d8727
%{_datadir}/ceph/mgr/mgr_module.*
6d8727
%{_datadir}/ceph/mgr/mgr_util.*
fefe1d
%{_datadir}/ceph/mgr/orchestrator_cli
fefe1d
%{_datadir}/ceph/mgr/orchestrator.*
fefe1d
%{_datadir}/ceph/mgr/osd_perf_query
fefe1d
%{_datadir}/ceph/mgr/pg_autoscaler
fefe1d
%{_datadir}/ceph/mgr/progress
fefe1d
%{_datadir}/ceph/mgr/prometheus
fefe1d
%{_datadir}/ceph/mgr/rbd_support
fefe1d
%{_datadir}/ceph/mgr/restful
fefe1d
%{_datadir}/ceph/mgr/selftest
fefe1d
%{_datadir}/ceph/mgr/status
fefe1d
%{_datadir}/ceph/mgr/telegraf
fefe1d
%{_datadir}/ceph/mgr/telemetry
fefe1d
%{_datadir}/ceph/mgr/test_orchestrator
fefe1d
%{_datadir}/ceph/mgr/volumes
fefe1d
%{_datadir}/ceph/mgr/zabbix
6d8727
%{_unitdir}/ceph-mgr@.service
6d8727
%{_unitdir}/ceph-mgr.target
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mgr
6d8727
6d8727
%post mgr
6d8727
%if 0%{?suse_version}
6d8727
if [ $1 -eq 1 ] ; then
6d8727
  /usr/bin/systemctl preset ceph-mgr@\*.service ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_post ceph-mgr@\*.service ceph-mgr.target
6d8727
%endif
6d8727
if [ $1 -eq 1 ] ; then
6d8727
/usr/bin/systemctl start ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%preun mgr
6d8727
%if 0%{?suse_version}
6d8727
%service_del_preun ceph-mgr@\*.service ceph-mgr.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_preun ceph-mgr@\*.service ceph-mgr.target
6d8727
%endif
6d8727
6d8727
%postun mgr
6d8727
%if 0%{?suse_version}
6d8727
DISABLE_RESTART_ON_UPDATE="yes"
6d8727
%service_del_postun ceph-mgr@\*.service ceph-mgr.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_postun ceph-mgr@\*.service ceph-mgr.target
6d8727
%endif
6d8727
if [ $1 -ge 1 ] ; then
6d8727
  # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
6d8727
  # "yes". In any case: if units are not running, do not touch them.
6d8727
  SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
6d8727
  if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
6d8727
    source $SYSCONF_CEPH
6d8727
  fi
6d8727
  if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr@\*.service > /dev/null 2>&1 || :
6d8727
  fi
6d8727
fi
6d8727
6d8727
%files mgr-dashboard
6d8727
%{_datadir}/ceph/mgr/dashboard
6d8727
6d8727
%post mgr-dashboard
6d8727
if [ $1 -eq 1 ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%postun mgr-dashboard
6d8727
if [ $1 -eq 1 ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%files mgr-diskprediction-local
6d8727
%{_datadir}/ceph/mgr/diskprediction_local
6d8727
6d8727
%post mgr-diskprediction-local
6d8727
if [ $1 -eq 1 ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%postun mgr-diskprediction-local
6d8727
if [ $1 -eq 1 ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%files mgr-diskprediction-cloud
6d8727
%{_datadir}/ceph/mgr/diskprediction_cloud
6d8727
6d8727
%post mgr-diskprediction-cloud
6d8727
if [ $1 -eq 1 ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%postun mgr-diskprediction-cloud
6d8727
if [ $1 -eq 1 ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%files mgr-rook
6d8727
%{_datadir}/ceph/mgr/rook
6d8727
6d8727
%post mgr-rook
6d8727
if [ $1 -eq 1 ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%postun mgr-rook
6d8727
if [ $1 -eq 1 ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%files mgr-k8sevents
6d8727
%{_datadir}/ceph/mgr/k8sevents
6d8727
6d8727
%post mgr-k8sevents
6d8727
if [ $1 -eq 1 ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%postun mgr-k8sevents
6d8727
if [ $1 -eq 1 ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
fefe1d
%files mgr-ssh
fefe1d
%{_datadir}/ceph/mgr/ssh
6d8727
fefe1d
%post mgr-ssh
6d8727
if [ $1 -eq 1 ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
fefe1d
%postun mgr-ssh
6d8727
if [ $1 -eq 1 ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%files mon
6d8727
%{_bindir}/ceph-mon
6d8727
%{_bindir}/ceph-monstore-tool
6d8727
%{_mandir}/man8/ceph-mon.8*
6d8727
%{_unitdir}/ceph-mon@.service
6d8727
%{_unitdir}/ceph-mon.target
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon
6d8727
6d8727
%post mon
6d8727
%if 0%{?suse_version}
6d8727
if [ $1 -eq 1 ] ; then
6d8727
  /usr/bin/systemctl preset ceph-mon@\*.service ceph-mon.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_post ceph-mon@\*.service ceph-mon.target
6d8727
%endif
6d8727
if [ $1 -eq 1 ] ; then
6d8727
/usr/bin/systemctl start ceph-mon.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%preun mon
6d8727
%if 0%{?suse_version}
6d8727
%service_del_preun ceph-mon@\*.service ceph-mon.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_preun ceph-mon@\*.service ceph-mon.target
6d8727
%endif
6d8727
6d8727
%postun mon
6d8727
%if 0%{?suse_version}
6d8727
DISABLE_RESTART_ON_UPDATE="yes"
6d8727
%service_del_postun ceph-mon@\*.service ceph-mon.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_postun ceph-mon@\*.service ceph-mon.target
6d8727
%endif
6d8727
if [ $1 -ge 1 ] ; then
6d8727
  # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
6d8727
  # "yes". In any case: if units are not running, do not touch them.
6d8727
  SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
6d8727
  if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
6d8727
    source $SYSCONF_CEPH
6d8727
  fi
6d8727
  if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-mon@\*.service > /dev/null 2>&1 || :
6d8727
  fi
6d8727
fi
6d8727
6d8727
%files fuse
6d8727
%{_bindir}/ceph-fuse
6d8727
%{_mandir}/man8/ceph-fuse.8*
6d8727
%{_sbindir}/mount.fuse.ceph
6d8727
%{_unitdir}/ceph-fuse@.service
6d8727
%{_unitdir}/ceph-fuse.target
6d8727
6d8727
%files -n rbd-fuse
6d8727
%{_bindir}/rbd-fuse
6d8727
%{_mandir}/man8/rbd-fuse.8*
6d8727
6d8727
%files -n rbd-mirror
6d8727
%{_bindir}/rbd-mirror
6d8727
%{_mandir}/man8/rbd-mirror.8*
6d8727
%{_unitdir}/ceph-rbd-mirror@.service
6d8727
%{_unitdir}/ceph-rbd-mirror.target
6d8727
6d8727
%post -n rbd-mirror
6d8727
%if 0%{?suse_version}
6d8727
if [ $1 -eq 1 ] ; then
6d8727
  /usr/bin/systemctl preset ceph-rbd-mirror@\*.service ceph-rbd-mirror.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_post ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
6d8727
%endif
6d8727
if [ $1 -eq 1 ] ; then
6d8727
/usr/bin/systemctl start ceph-rbd-mirror.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%preun -n rbd-mirror
6d8727
%if 0%{?suse_version}
6d8727
%service_del_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_preun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
6d8727
%endif
6d8727
6d8727
%postun -n rbd-mirror
6d8727
%if 0%{?suse_version}
6d8727
DISABLE_RESTART_ON_UPDATE="yes"
6d8727
%service_del_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target
6d8727
%endif
6d8727
if [ $1 -ge 1 ] ; then
6d8727
  # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
6d8727
  # "yes". In any case: if units are not running, do not touch them.
6d8727
  SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
6d8727
  if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
6d8727
    source $SYSCONF_CEPH
6d8727
  fi
6d8727
  if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-rbd-mirror@\*.service > /dev/null 2>&1 || :
6d8727
  fi
6d8727
fi
6d8727
6d8727
%files -n rbd-nbd
6d8727
%{_bindir}/rbd-nbd
6d8727
%{_mandir}/man8/rbd-nbd.8*
6d8727
6d8727
%files radosgw
dce1ea
%{_bindir}/ceph-diff-sorted
6d8727
%{_bindir}/radosgw
6d8727
%{_bindir}/radosgw-token
6d8727
%{_bindir}/radosgw-es
6d8727
%{_bindir}/radosgw-object-expirer
dce1ea
%{_bindir}/rgw-orphan-list
6d8727
%{_mandir}/man8/radosgw.8*
6d8727
%dir %{_localstatedir}/lib/ceph/radosgw
6d8727
%{_unitdir}/ceph-radosgw@.service
6d8727
%{_unitdir}/ceph-radosgw.target
6d8727
6d8727
%post radosgw
6d8727
%if 0%{?suse_version}
6d8727
if [ $1 -eq 1 ] ; then
6d8727
  /usr/bin/systemctl preset ceph-radosgw@\*.service ceph-radosgw.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_post ceph-radosgw@\*.service ceph-radosgw.target
6d8727
%endif
6d8727
if [ $1 -eq 1 ] ; then
6d8727
/usr/bin/systemctl start ceph-radosgw.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
6d8727
%preun radosgw
6d8727
%if 0%{?suse_version}
6d8727
%service_del_preun ceph-radosgw@\*.service ceph-radosgw.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_preun ceph-radosgw@\*.service ceph-radosgw.target
6d8727
%endif
6d8727
6d8727
%postun radosgw
6d8727
%if 0%{?suse_version}
6d8727
DISABLE_RESTART_ON_UPDATE="yes"
6d8727
%service_del_postun ceph-radosgw@\*.service ceph-radosgw.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_postun ceph-radosgw@\*.service ceph-radosgw.target
6d8727
%endif
6d8727
if [ $1 -ge 1 ] ; then
6d8727
  # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
6d8727
  # "yes". In any case: if units are not running, do not touch them.
6d8727
  SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
6d8727
  if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
6d8727
    source $SYSCONF_CEPH
6d8727
  fi
6d8727
  if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-radosgw@\*.service > /dev/null 2>&1 || :
6d8727
  fi
6d8727
fi
6d8727
6d8727
%files osd
6d8727
%{_bindir}/ceph-clsinfo
6d8727
%{_bindir}/ceph-bluestore-tool
6d8727
%{_bindir}/ceph-objectstore-tool
6d8727
%{_bindir}/ceph-osdomap-tool
6d8727
%{_bindir}/ceph-osd
6d8727
%{_libexecdir}/ceph/ceph-osd-prestart.sh
6d8727
%{_sbindir}/ceph-volume
6d8727
%{_sbindir}/ceph-volume-systemd
6d8727
%{_mandir}/man8/ceph-clsinfo.8*
6d8727
%{_mandir}/man8/ceph-osd.8*
6d8727
%{_mandir}/man8/ceph-bluestore-tool.8*
6d8727
%{_mandir}/man8/ceph-volume.8*
6d8727
%{_mandir}/man8/ceph-volume-systemd.8*
6d8727
%{_unitdir}/ceph-osd@.service
6d8727
%{_unitdir}/ceph-osd.target
6d8727
%{_unitdir}/ceph-volume@.service
6d8727
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
6d8727
%config(noreplace) %{_sysctldir}/90-ceph-osd.conf
6d8727
%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
6d8727
6d8727
%post osd
6d8727
%if 0%{?suse_version}
6d8727
if [ $1 -eq 1 ] ; then
6d8727
  /usr/bin/systemctl preset ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_post ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
6d8727
%endif
6d8727
if [ $1 -eq 1 ] ; then
6d8727
/usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || :
6d8727
fi
6d8727
%if 0%{?sysctl_apply}
6d8727
    %sysctl_apply 90-ceph-osd.conf
6d8727
%else
6d8727
    /usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || :
6d8727
%endif
6d8727
6d8727
%preun osd
6d8727
%if 0%{?suse_version}
6d8727
%service_del_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_preun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
6d8727
%endif
6d8727
6d8727
%postun osd
6d8727
%if 0%{?suse_version}
6d8727
DISABLE_RESTART_ON_UPDATE="yes"
6d8727
%service_del_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
6d8727
%endif
6d8727
%if 0%{?fedora} || 0%{?rhel}
6d8727
%systemd_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target
6d8727
%endif
6d8727
if [ $1 -ge 1 ] ; then
6d8727
  # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to
6d8727
  # "yes". In any case: if units are not running, do not touch them.
6d8727
  SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph
6d8727
  if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then
6d8727
    source $SYSCONF_CEPH
6d8727
  fi
6d8727
  if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then
6d8727
    /usr/bin/systemctl try-restart ceph-osd@\*.service ceph-volume@\*.service > /dev/null 2>&1 || :
6d8727
  fi
6d8727
fi
6d8727
6d8727
%if %{with ocf}
6d8727
6d8727
%files resource-agents
6d8727
%dir %{_prefix}/lib/ocf
6d8727
%dir %{_prefix}/lib/ocf/resource.d
6d8727
%dir %{_prefix}/lib/ocf/resource.d/ceph
6d8727
%attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/ceph/rbd
6d8727
6d8727
%endif
6d8727
6d8727
%files -n librados2
6d8727
%{_libdir}/librados.so.*
6d8727
%dir %{_libdir}/ceph
6d8727
%{_libdir}/ceph/libceph-common.so.*
6d8727
%if %{with lttng}
6d8727
%{_libdir}/librados_tp.so.*
6d8727
%endif
6d8727
%dir %{_sysconfdir}/ceph
6d8727
6d8727
%post -n librados2 -p /sbin/ldconfig
6d8727
6d8727
%postun -n librados2 -p /sbin/ldconfig
6d8727
6d8727
%files -n librados-devel
6d8727
%dir %{_includedir}/rados
6d8727
%{_includedir}/rados/librados.h
6d8727
%{_includedir}/rados/rados_types.h
6d8727
%{_libdir}/librados.so
6d8727
%if %{with lttng}
6d8727
%{_libdir}/librados_tp.so
6d8727
%endif
6d8727
%{_bindir}/librados-config
6d8727
%{_mandir}/man8/librados-config.8*
6d8727
6d8727
%files -n libradospp-devel
6d8727
%dir %{_includedir}/rados
6d8727
%{_includedir}/rados/buffer.h
6d8727
%{_includedir}/rados/buffer_fwd.h
6d8727
%{_includedir}/rados/crc32c.h
6d8727
%{_includedir}/rados/inline_memory.h
6d8727
%{_includedir}/rados/librados.hpp
6d8727
%{_includedir}/rados/librados_fwd.hpp
6d8727
%{_includedir}/rados/page.h
6d8727
%{_includedir}/rados/rados_types.hpp
6d8727
fefe1d
%if 0%{with python2}
fefe1d
%files -n python-rados
fefe1d
%{python_sitearch}/rados.so
fefe1d
%{python_sitearch}/rados-*.egg-info
fefe1d
%endif
fefe1d
6d8727
%files -n python%{python3_pkgversion}-rados
6d8727
%{python3_sitearch}/rados.cpython*.so
6d8727
%{python3_sitearch}/rados-*.egg-info
6d8727
6d8727
%if 0%{with libradosstriper}
6d8727
%files -n libradosstriper1
6d8727
%{_libdir}/libradosstriper.so.*
6d8727
6d8727
%post -n libradosstriper1 -p /sbin/ldconfig
6d8727
6d8727
%postun -n libradosstriper1 -p /sbin/ldconfig
6d8727
6d8727
%files -n libradosstriper-devel
6d8727
%dir %{_includedir}/radosstriper
6d8727
%{_includedir}/radosstriper/libradosstriper.h
6d8727
%{_includedir}/radosstriper/libradosstriper.hpp
6d8727
%{_libdir}/libradosstriper.so
6d8727
%endif
6d8727
6d8727
%files -n librbd1
6d8727
%{_libdir}/librbd.so.*
6d8727
%if %{with lttng}
6d8727
%{_libdir}/librbd_tp.so.*
6d8727
%endif
6d8727
6d8727
%post -n librbd1 -p /sbin/ldconfig
6d8727
6d8727
%postun -n librbd1 -p /sbin/ldconfig
6d8727
6d8727
%files -n librbd-devel
6d8727
%dir %{_includedir}/rbd
6d8727
%{_includedir}/rbd/librbd.h
6d8727
%{_includedir}/rbd/librbd.hpp
6d8727
%{_includedir}/rbd/features.h
6d8727
%{_libdir}/librbd.so
6d8727
%if %{with lttng}
6d8727
%{_libdir}/librbd_tp.so
6d8727
%endif
6d8727
6d8727
%files -n librgw2
6d8727
%{_libdir}/librgw.so.*
6d8727
%{_libdir}/librgw_admin_user.so.*
6d8727
%if %{with lttng}
6d8727
%{_libdir}/librgw_op_tp.so.*
6d8727
%{_libdir}/librgw_rados_tp.so.*
6d8727
%endif
6d8727
6d8727
%post -n librgw2 -p /sbin/ldconfig
6d8727
6d8727
%postun -n librgw2 -p /sbin/ldconfig
6d8727
6d8727
%files -n librgw-devel
6d8727
%dir %{_includedir}/rados
6d8727
%{_includedir}/rados/librgw.h
6d8727
%{_includedir}/rados/librgw_admin_user.h
6d8727
%{_includedir}/rados/rgw_file.h
6d8727
%{_libdir}/librgw.so
6d8727
%{_libdir}/librgw_admin_user.so
6d8727
%if %{with lttng}
6d8727
%{_libdir}/librgw_op_tp.so
6d8727
%{_libdir}/librgw_rados_tp.so
6d8727
%endif
6d8727
fefe1d
%if 0%{with python2}
fefe1d
%files -n python-rgw
fefe1d
%{python_sitearch}/rgw.so
fefe1d
%{python_sitearch}/rgw-*.egg-info
fefe1d
%endif
fefe1d
6d8727
%files -n python%{python3_pkgversion}-rgw
6d8727
%{python3_sitearch}/rgw.cpython*.so
6d8727
%{python3_sitearch}/rgw-*.egg-info
6d8727
fefe1d
%if 0%{with python2}
fefe1d
%files -n python-rbd
fefe1d
%{python_sitearch}/rbd.so
fefe1d
%{python_sitearch}/rbd-*.egg-info
fefe1d
%endif
fefe1d
6d8727
%files -n python%{python3_pkgversion}-rbd
6d8727
%{python3_sitearch}/rbd.cpython*.so
6d8727
%{python3_sitearch}/rbd-*.egg-info
6d8727
6d8727
%files -n libcephfs2
6d8727
%{_libdir}/libcephfs.so.*
6d8727
%dir %{_sysconfdir}/ceph
6d8727
6d8727
%post -n libcephfs2 -p /sbin/ldconfig
6d8727
6d8727
%postun -n libcephfs2 -p /sbin/ldconfig
6d8727
6d8727
%files -n libcephfs-devel
6d8727
%dir %{_includedir}/cephfs
6d8727
%{_includedir}/cephfs/libcephfs.h
a133f6
%{_includedir}/cephfs/ceph_ll_client.h
6d8727
%{_libdir}/libcephfs.so
6d8727
fefe1d
%if 0%{with python2}
fefe1d
%files -n python-cephfs
fefe1d
%{python_sitearch}/cephfs.so
fefe1d
%{python_sitearch}/cephfs-*.egg-info
fefe1d
%{python_sitelib}/ceph_volume_client.py*
fefe1d
%endif
fefe1d
6d8727
%files -n python%{python3_pkgversion}-cephfs
6d8727
%{python3_sitearch}/cephfs.cpython*.so
6d8727
%{python3_sitearch}/cephfs-*.egg-info
6d8727
%{python3_sitelib}/ceph_volume_client.py
6d8727
%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py*
6d8727
fefe1d
%if 0%{with python2}
fefe1d
%files -n python-ceph-argparse
fefe1d
%{python_sitelib}/ceph_argparse.py*
fefe1d
%{python_sitelib}/ceph_daemon.py*
fefe1d
%endif
fefe1d
6d8727
%files -n python%{python3_pkgversion}-ceph-argparse
6d8727
%{python3_sitelib}/ceph_argparse.py
6d8727
%{python3_sitelib}/__pycache__/ceph_argparse.cpython*.py*
6d8727
%{python3_sitelib}/ceph_daemon.py
6d8727
%{python3_sitelib}/__pycache__/ceph_daemon.cpython*.py*
6d8727
6d8727
%if 0%{with cephfs_shell}
6d8727
%files -n cephfs-shell
6d8727
%{python3_sitelib}/cephfs_shell-*.egg-info
6d8727
%{_bindir}/cephfs-shell
6d8727
%endif
6d8727
6d8727
%if 0%{with ceph_test_package}
6d8727
%files -n ceph-test
6d8727
%{_bindir}/ceph-client-debug
6d8727
%{_bindir}/ceph_bench_log
6d8727
%{_bindir}/ceph_kvstorebench
6d8727
%{_bindir}/ceph_multi_stress_watch
6d8727
%{_bindir}/ceph_erasure_code
6d8727
%{_bindir}/ceph_erasure_code_benchmark
6d8727
%{_bindir}/ceph_omapbench
6d8727
%{_bindir}/ceph_objectstore_bench
6d8727
%{_bindir}/ceph_perf_objectstore
6d8727
%{_bindir}/ceph_perf_local
6d8727
%{_bindir}/ceph_perf_msgr_client
6d8727
%{_bindir}/ceph_perf_msgr_server
6d8727
%{_bindir}/ceph_psim
6d8727
%{_bindir}/ceph_radosacl
6d8727
%{_bindir}/ceph_rgw_jsonparser
6d8727
%{_bindir}/ceph_rgw_multiparser
6d8727
%{_bindir}/ceph_scratchtool
6d8727
%{_bindir}/ceph_scratchtoolpp
6d8727
%{_bindir}/ceph_test_*
6d8727
%{_bindir}/ceph-coverage
6d8727
%{_bindir}/ceph-debugpack
fefe1d
%{_bindir}/cephdeduptool
6d8727
%{_mandir}/man8/ceph-debugpack.8*
6d8727
%dir %{_libdir}/ceph
6d8727
%{_libdir}/ceph/ceph-monstore-update-crush.sh
6d8727
%endif
6d8727
6d8727
%if 0%{with cephfs_java}
6d8727
%files -n libcephfs_jni1
6d8727
%{_libdir}/libcephfs_jni.so.*
6d8727
6d8727
%post -n libcephfs_jni1 -p /sbin/ldconfig
6d8727
6d8727
%postun -n libcephfs_jni1 -p /sbin/ldconfig
6d8727
6d8727
%files -n libcephfs_jni-devel
6d8727
%{_libdir}/libcephfs_jni.so
6d8727
6d8727
%files -n cephfs-java
6d8727
%{_javadir}/libcephfs.jar
6d8727
%{_javadir}/libcephfs-test.jar
6d8727
%endif
6d8727
6d8727
%files -n rados-objclass-devel
6d8727
%dir %{_includedir}/rados
6d8727
%{_includedir}/rados/objclass.h
6d8727
6d8727
%if 0%{with selinux}
6d8727
%files selinux
6d8727
%attr(0600,root,root) %{_datadir}/selinux/packages/ceph.pp
6d8727
%{_datadir}/selinux/devel/include/contrib/ceph.if
6d8727
%{_mandir}/man8/ceph_selinux.8*
6d8727
6d8727
%post selinux
6d8727
# backup file_contexts before update
6d8727
. /etc/selinux/config
6d8727
FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
6d8727
cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
6d8727
6d8727
# Install the policy
6d8727
/usr/sbin/semodule -i %{_datadir}/selinux/packages/ceph.pp
6d8727
6d8727
# Load the policy if SELinux is enabled
6d8727
if ! /usr/sbin/selinuxenabled; then
6d8727
    # Do not relabel if selinux is not enabled
6d8727
    exit 0
6d8727
fi
6d8727
6d8727
if diff ${FILE_CONTEXT} ${FILE_CONTEXT}.pre > /dev/null 2>&1; then
6d8727
   # Do not relabel if file contexts did not change
6d8727
   exit 0
6d8727
fi
6d8727
6d8727
# Check whether the daemons are running
6d8727
/usr/bin/systemctl status ceph.target > /dev/null 2>&1
6d8727
STATUS=$?
6d8727
6d8727
# Stop the daemons if they were running
6d8727
if test $STATUS -eq 0; then
6d8727
    /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
6d8727
fi
6d8727
6d8727
# Relabel the files fix for first package install
6d8727
/usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
6d8727
6d8727
rm -f ${FILE_CONTEXT}.pre
6d8727
# The fixfiles command won't fix label for /var/run/ceph
6d8727
/usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
6d8727
6d8727
# Start the daemons iff they were running before
6d8727
if test $STATUS -eq 0; then
6d8727
    /usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
6d8727
fi
6d8727
exit 0
6d8727
6d8727
%postun selinux
6d8727
if [ $1 -eq 0 ]; then
6d8727
    # backup file_contexts before update
6d8727
    . /etc/selinux/config
6d8727
    FILE_CONTEXT=/etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts
6d8727
    cp ${FILE_CONTEXT} ${FILE_CONTEXT}.pre
6d8727
6d8727
    # Remove the module
6d8727
    /usr/sbin/semodule -n -r ceph > /dev/null 2>&1
6d8727
6d8727
    # Reload the policy if SELinux is enabled
6d8727
    if ! /usr/sbin/selinuxenabled ; then
6d8727
        # Do not relabel if SELinux is not enabled
6d8727
        exit 0
6d8727
    fi
6d8727
6d8727
    # Check whether the daemons are running
6d8727
    /usr/bin/systemctl status ceph.target > /dev/null 2>&1
6d8727
    STATUS=$?
6d8727
6d8727
    # Stop the daemons if they were running
6d8727
    if test $STATUS -eq 0; then
6d8727
        /usr/bin/systemctl stop ceph.target > /dev/null 2>&1
6d8727
    fi
6d8727
6d8727
    /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
6d8727
    rm -f ${FILE_CONTEXT}.pre
6d8727
    # The fixfiles command won't fix label for /var/run/ceph
6d8727
    /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
6d8727
6d8727
    # Start the daemons if they were running before
6d8727
    if test $STATUS -eq 0; then
6d8727
	/usr/bin/systemctl start ceph.target > /dev/null 2>&1 || :
6d8727
    fi
6d8727
fi
6d8727
exit 0
6d8727
fefe1d
%endif # with selinux
fefe1d
fefe1d
%if 0%{with python2}
fefe1d
%files -n python-ceph-compat
fefe1d
# We need an empty %%files list for python-ceph-compat, to tell rpmbuild to
fefe1d
# actually build this meta package.
6d8727
%endif
6d8727
6d8727
%files grafana-dashboards
6d8727
%if 0%{?suse_version}
6d8727
%attr(0755,root,root) %dir %{_sysconfdir}/grafana
6d8727
%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards
6d8727
%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard
fefe1d
%else
fefe1d
%attr(0755,root,root) %dir %{_sysconfdir}/grafana/dashboards/ceph-dashboard
fefe1d
%endif
6d8727
%config %{_sysconfdir}/grafana/dashboards/ceph-dashboard/*
6d8727
%doc monitoring/grafana/dashboards/README
6d8727
%doc monitoring/grafana/README.md
6d8727
6d8727
%if 0%{?suse_version}
fefe1d
%files prometheus-alerts
fefe1d
%dir /etc/prometheus/SUSE/
fefe1d
%dir /etc/prometheus/SUSE/default_rules/
fefe1d
%config /etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml
6d8727
%endif
6d8727
6d8727
fefe1d
%changelog
dce1ea
* Tue Aug 11 2020 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 2:14.2.11-1
dce1ea
- ceph 14.2.11 GA
dce1ea
dce1ea
 * Fri Jun 26 2020 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 2:14.2.10-1
dce1ea
 - ceph 14.2.10 GA
dce1ea