Blame SPECS/cephadm.spec

e9d8bb
# Upstream ceph commit upon which this package is based:
782bbf
# patches_base=353d6970361a26381539b74a94bba8ac32666dc1
e9d8bb
e9d8bb
Name:    cephadm
e9d8bb
Epoch:   2
782bbf
Version: 15.2.9
782bbf
Release: 46%{?dist}
e9d8bb
Summary: Utility to bootstrap Ceph clusters
e9d8bb
License: LGPL-2.1
e9d8bb
URL:     https://ceph.io
782bbf
Source0: https://github.com/ceph/ceph/raw/353d6970361a26381539b74a94bba8ac32666dc1/src/cephadm/cephadm
e9d8bb
Source1: COPYING-LGPL2.1
e9d8bb
e9d8bb
BuildArch: noarch
e9d8bb
e9d8bb
Requires:       lvm2
e9d8bb
Requires:       python3
e9d8bb
Recommends:     podman
e9d8bb
%description
e9d8bb
Utility to bootstrap a Ceph cluster and manage Ceph daemons deployed
e9d8bb
with systemd and podman.
e9d8bb
e9d8bb
%prep
e9d8bb
cp %{SOURCE0} .
e9d8bb
cp %{SOURCE1} .
e9d8bb
e9d8bb
%build
e9d8bb
e9d8bb
%install
e9d8bb
mkdir -p %{buildroot}%{_sbindir}
e9d8bb
install -m 0755 cephadm %{buildroot}%{_sbindir}/cephadm
e9d8bb
mkdir -p %{buildroot}%{_sharedstatedir}/cephadm
e9d8bb
chmod 0700 %{buildroot}%{_sharedstatedir}/cephadm
e9d8bb
mkdir -p %{buildroot}%{_sharedstatedir}/cephadm/.ssh
e9d8bb
chmod 0700 %{buildroot}%{_sharedstatedir}/cephadm/.ssh
e9d8bb
touch %{buildroot}%{_sharedstatedir}/cephadm/.ssh/authorized_keys
e9d8bb
chmod 0600 %{buildroot}%{_sharedstatedir}/cephadm/.ssh/authorized_keys
e9d8bb
e9d8bb
%pre
e9d8bb
getent group cephadm >/dev/null || groupadd -r cephadm
e9d8bb
getent passwd cephadm >/dev/null || useradd -r -g cephadm -s /bin/bash -c "cephadm user for mgr/cephadm" -d %{_sharedstatedir}/cephadm cephadm
e9d8bb
exit 0
e9d8bb
e9d8bb
%postun
e9d8bb
userdel -r cephadm || true
e9d8bb
exit 0
e9d8bb
e9d8bb
%files
e9d8bb
%license COPYING-LGPL2.1
e9d8bb
%{_sbindir}/cephadm
e9d8bb
%attr(0700,cephadm,cephadm) %dir %{_sharedstatedir}/cephadm
e9d8bb
%attr(0700,cephadm,cephadm) %dir %{_sharedstatedir}/cephadm/.ssh
e9d8bb
%attr(0600,cephadm,cephadm) %{_sharedstatedir}/cephadm/.ssh/authorized_keys
e9d8bb
e9d8bb
%changelog
782bbf
* Tue Mar 02 2021 Ken Dreyer <kdreyer@redhat.com> - 2:15.2.9-46
782bbf
- initial octopus package