Before this patch, the command 'logrotate -f /etc/logrotate.d/ceph'
was generating an error "Failed to reload ceph.target: Job type reload is not
applicable for unit ceph.target".
Before we issue systemctl reload, check that there is at least
one active ceph-* service. (The hyphen is significant.)
Since we use grep, make the grep package a dependency.
http://tracker.ceph.com/issues/12173Fixes: #12173
Signed-off-by: Tim Serong <tserong@suse.com>
Signed-off-by: Lars Marowsky-Bree <lmb@suse.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
argparse is a widely-used Python module for parsing command-line arguments.
Ceph makes heavy use of Python scripts, both in the build environment and on
cluster nodes and clients.
Until Python 2.6, argparse was distributed separately from Python proper.
As of 2.7 it is part of the Python standard library.
Although the python package in a given distro may or may not Provide:
python-argparse, this cannot be relied upon.
Therefore, this commit puts appropriate conditionals around Requires:
python-argparse and BuildRequires: python-argparse. It does so for Red
Hat/CentOS and SUSE only, because the last Fedora version with Python 2.6
was Fedora 13, which is EOL.
argparse is required by both the ceph and ceph-common packages, but since ceph
requires ceph-common, the argparse Requires and BuildRequires need only appear
once, under ceph-common.
http://tracker.ceph.com/issues/12034Fixes: #12034
Signed-off-by: Nathan Cutler <ncutler@suse.com>
First, the terms "common" and "specific" are vague. Second,
"common" can easily be confused with the ceph-common subpackage.
Fix this by rephrasing to "distro-unconditional dependencies" and
"distro-conditional dependencies", respectively.
Third, move the "distro-unconditional dependencies" header so it
is above the part where these dependencies are actually defined.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
The uudecode binary is used to build Java-related components, and
uudecode is provided by the sharutils package on all supported
RPM platforms. When building with "--without=cephfs_java",
sharutils is not needed.
Thanks to Nathan Cutler <ncutler@suse.cz> for going into the
details with me.
On OBS without this patch we get the error message:
[ 170s] -----------------------------------------------------------------
[ 170s] ----- building ceph.spec (user abuild)
[ 170s] -----------------------------------------------------------------
[ 170s] -----------------------------------------------------------------
[ 170s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define 'disturl obs://build.opensuse.org/home:osynge:ceph:wip:wip_obs_fedora/Fedora_20/c0bbbc1e62228ca956ac3d367edc4fba-master' /home/abuild/rpmbuild/SOURCES/ceph.spec
[ 170s] error: Failed build dependencies:
[ 170s] sharutils is needed by ceph-1:2+git.1435043747.c1bd02c-1.1.x86_64
With this patch we can build fedora 22 and fedora 20 rpms fine.
Signed-off-by: Owen Synge <osynge@suse.com>
SUSE builds on OBS are failing with the missing dir entries:
/usr/share/ceph
/usr/lib/ceph
On suse these correspond to:
%dir %{_datarootdir}/ceph/
%dir %{_libexecdir}/ceph/
Signed-off-by: Owen Synge <osynge@suse.com>
Fedora, suse as well as centos >= 7 and rhel >= 7
use the same name for python-sphinx so add these
conditionals.
Note: Until OBS supports EPEL I cant test builds on
centos and rhel so this extention of build deps is
untested by Owen Synge.
Signed-off-by: Owen Synge <osynge@suse.com>
explicitly included man pages.
Original fix used %{_mandir}/*/* but this could potentially lead to ambiguity
as ceph rpm spec file contains many man pages for different packages.
Signed-off-by: Owen Synge <osynge@suse.com>
ceph.spec.in: move specific BuildRequires to where they belong
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Move distro-specific BuildRequires out of "common" section and
into the appropriate %if statement in the "specific" section.
Also remove a duplicated "Requires: gdisk".
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
The %endif removed by f94f23297c is restored.
The %else removed by 75e87a20da is restored.
The stray %endif added by d8abde3338 is removed.
May 29th, in d8abde3338 Owen added a stray
%endif after
BuildRequires: gperftools-devel
around line 133. June 3rd, in f94f23297c
Ken correctly attributed the error
"error: /srv/autobuild-ceph/gitbuilder.git/build/ceph.spec:140: Got a
%endif with no %if"
to a stray %endif but did not remove the one causing problem and in
doing so created another problem. June 4th, in
75e87a20da Owen incorrectly fixed
this new problem by removing the %else that is near
BuildRequires: gperftools-devel
around line 116, instead of reverting
f94f23297c. As a consequence the
ceph.spec.in became syntactically correct but implemented an if/else
logic different from what was intended originally and a number of
BuildRequires became exclusive to SUSE and were not installed for CentOS
7 etc.
http://tracker.ceph.com/issues/11901Fixes: #11901
Signed-off-by: Loic Dachary <ldachary@redhat.com>
This reverts commit 6f495974a8.
This needs more discussion, since "make install" does not currently
create /usr/lib/ceph (and maybe /usr/share/ceph?)
This fixes the rpmbuild failure,
error: File not found:
/srv/autobuild-ceph/gitbuilder.git/build/rpmbuild/BUILDROOT/ceph-9.0.0-1225.ga16afdd.el6.x86_64/usr/lib/ceph
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Commit d8abde3338 introduced a stray
%endif. Remove it.
This fixes the build error:
"error: /srv/autobuild-ceph/gitbuilder.git/build/ceph.spec:140: Got a
%endif with no %if"
Reported-by: Greg Farnum <gfarnum@redhat.com>
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>
Signed-off-by: Owen Synge <osynge@suse.com>
Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>
Signed-off-by: Owen Synge <osynge@suse.com>
Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>
Signed-off-by: Owen Synge <osynge@suse.com>
Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>
Signed-off-by: Owen Synge <osynge@suse.com>
RPM spec files summary should not end with a dot.
This was inconsistent across the ceph rpm packages
and creates errors with rpm lint.
Signed-off-by: Owen Synge <osynge@suse.com>
The semantic and interface of get_pg are the same, that avoids
duplication and the ceph-helpers.sh version is tested and documented.
Make the ceph-test package dependent on xmlstarlet because it is
needed by ceph-helpers.sh.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
rpm lint says the following directories
/usr/share/ceph
/usr/lib/ceph
are un owned by any package and this causes
OBS to emit errors.
Signed-off-by: Owen Synge <osynge@suse.com>
SUSE spec file got very out of sync with upstream master. This patch
helps resolve the build dependencies from suse ceph.
Signed-off-by: Owen Synge <osynge@suse.com>
The libexec path is different for different distributions.
systemd. This path is defined by a new variable on the
configure path.
This variable can be set with enviroment SYSTEMD_LIBEXEC_DIR.
The parameter --with-systemd-libexec-dir overrides the enviroment
variable.
Appropriate conditionals are set for SUSE and RHEL derivatives.
This is then used to template out systemd/ceph-osd@.service
Signed-off-by: Owen Synge <osynge@suse.com>
ceph-common needs python-argparse in SUSE/openSUSE and
needs redhat-lsb-core only in RHEL/CentOS/Fedora.
http://tracker.ceph.com/issues/11638Fixes: #11638
Signed-off-by: Nathan Cutler <ncutler@suse.cz>
0%{?rhel} || 0%{?centos} can be simplified to just 0%{?rhel}, since
CentOS defines that macro for compatibility with RHEL.
Signed-off-by: Nathan Cutler <ncutler@suse.cz>