The package ceph-common uses ceph user and group but they are both created in
ceph package %pre phase. We need to move the script to ceph-common %pre phase.
Signed-off-by: Boris Ranto <branto@redhat.com>
We need to set the variables in the %pre phase, otherwise they are not properly
evaluated. Also use /sbin/nolongin instead of /bin/false and set the default
uid/gid pair for fedora and rhel (these were already allocated). We can also
use them for older fedora releases as they are guaranteed to be free.
Signed-off-by: Boris Ranto <branto@redhat.com>
limits.d expect the file to end with *.conf. Add the
installed file to package list of the ceph package.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Specify the nofile ulimit in one standard place, where everyone expects it
to be. Drop it from the ceph-osd unit file.
Leave upstart and sysvinit untouched for the time being to avoid compat
issues.
Signed-off-by: Sage Weil <sage@redhat.com>
The boost mt code uses uninitialized memory for extra randomness,
which is a bad idea in general but more importantly makes valgrind
unhappy. Use /dev/urandom instead.
Unfortunately this introduces a link time dependency.. meh!
Fixes: #12736
Signed-off-by: Sage Weil <sage@redhat.com>
Currently, the ceph files are being relabelled every time the package is
rebuilt. Fix this by checking the policy versions and relabel the files
only if the policy actually changed (different policy version was
detected).
Signed-off-by: Boris Ranto <branto@redhat.com>
If we are using systemd, ceph target should be used.
Also fail to restart service should not stop policy to load.
Signed-off-by: Milan Broz <mbroz@redhat.com>
The %preun section now contains logic for disabling and stopping all the
Ceph systemd units when the ceph package is removed. However, there is no
conditional around it, so the units are disabled and stopped on RPM upgrade
as well as removal.
http://tracker.ceph.com/issues/12685Fixes: #12685
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Tim Serong <tserong@suse.com>
We should enable SELinux support by default on rpm-based systems that
build with SELinux support to get better QE coverage in future runs.
Signed-off-by: Boris Ranto <branto@redhat.com>
This patch modifies the build system and spec file to provide a support
for SELinux enforcing in an opt-in matter via ceph-selinux package.
Signed-off-by: Boris Ranto <branto@redhat.com>
To simplify the spec file we should install as much using autotools
and as little as possible in the spec file.
Signed-off-by: Owen Synge <osynge@suse.com>
tmpfiles.d are part of system.d and define how temporary directories are setup.
rgw needs a socket directory. To do this we template tmpfiles.d user and group
for rgw and fill in the values using autotools.
Note1: Added to spec file.
Note2: Name changed to rgw from radosgw as is preferred name by Sage.
Note3: Adds configure options
--with-rgw-user=UserName
--with-rgw-group=GroupName
Note4: Defaults set for debian
Note5: spec file overrides defaults for redhat and suse
Signed-off-by: Owen Synge <osynge@suse.com>
%py_requires expands to
BuildRequires: /usr/bin/python
PreReq: python = 2.7
The BuildRequires: is already provided, and the PreReq is wrong because
e.g. SLE11-SP3 (a platform we are trying to support) has Python 2.6.
http://tracker.ceph.com/issues/12351Fixes: #12351
Signed-off-by: Nathan Cutler <ncutler@suse.com>
If the mimecap RPM or mime-support DEB is not installed, then the
/etc/mime.types file is not present on the system. RGW attempts to read
this file during startup, and if the file is not present, RGW logs an
error:
ext_mime_map_init(): failed to open file=/etc/mime.types ret=-2
Make the radosgw package depend on the mailcap/mime-support packages so
that /etc/mime.types is always available on RGW systems.
http://tracker.ceph.com/issues/11864Fixes: #11864
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
In openSUSE there is a policy to use %fdupes in the spec file if RPMLINT
complains about duplicate files wasting space in the filesystem.
However, RPMLINT is not so complaining, so drop fdupes.
http://tracker.ceph.com/issues/12301Fixes: #12301
Signed-off-by: Nathan Cutler <ncutler@suse.com>