Commit Graph

1012 Commits

Author SHA1 Message Date
Nathan Cutler
8ea39207bf build/ops: rpm: add link to doc explaining bcond syntax
The %bcond_with and %bcond_without macros are confusing to folks who
don't do a lot of RPM packaging work. Let's try to help these folks out!

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-11-20 15:01:44 +01:00
Nathan Cutler
7d4916618c build/ops: rpm: stop install-deps.sh clobbering spec file Python build setting
Fedora 29 still ships a Python 2 binary, but some of Ceph's build
dependencies are only available in py3 versions there. In other
words, from F29 on, it is no longer possible to do a py2 Ceph build
on Fedora, even if a python2 binary exists on the system.

If that were not enough, the Python 2 that ships with Fedora 29 is
linked against a non-compatible version of OpenSSL.

Before this commit, install-deps.sh was overriding the spec file's
Python build setting based on the presence or absence of a python2
binary. As the bug cited below indicates, this was not a good idea.

It's better for the spec file to be explicit about which OS versions
are py2 and which are py3, and just stick to that.

Fixes: http://tracker.ceph.com/issues/37301
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-11-20 15:00:48 +01:00
Kefu Chai
cac0f5802a rpm,deb: libradospp1-dev should depend on librados-dev
because librados.hpp `#include`s librados.h

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-11-08 07:00:24 -08:00
Jason Dillaman
bbb0fc0f17
Merge pull request #24856 from leseb/spec-rbd-mirror
spec: add missing rbd mirror bootstrap directory

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-11-05 07:23:42 -05:00
Sébastien Han
8c8d60d3c7 spec: add missing rbd mirror bootstrap directory
Currently /var/lib/ceph/bootstrap-rbd-mirror is absent, which means we
need to create it manually in order to pool the
client.bootstrap-rbd-mirror key.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-11-05 11:06:07 +01:00
Kefu Chai
38db3ee6c5 rpm,deb: package libceph-common.so.* not libceph-common.so*
be more explicit on what we are packaging. because only
libceph-common.so.${soversion} will be packaged, since libceph-common.so
won't be installed by cmake anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-11-02 00:15:31 +08:00
Kefu Chai
842a57eb16 rpm: s/librados2/librados3/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-11-02 00:15:31 +08:00
Kefu Chai
dd0f43db7c rpm: add libradospp* packages
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-11-02 00:15:31 +08:00
Kefu Chai
f386db6433
Merge pull request #24735 from b-ranto/wip-rpm-dashboards
build/ops: rpm: Package grafana dashboards

Reviewed-by: Lenz Grimmer <lgrimmer@suse.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-10-30 18:57:12 +08:00
Lenz Grimmer
88719afc73
Merge pull request #22833 from rjfd/wip-dashboard-jwt
mgr/dashboard: JWT authentication

Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2018-10-30 10:50:20 +01:00
Ricardo Dias
2f5e7c3392
mgr/dashboard: backend: JWT based authentication
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-10-29 15:47:14 +00:00
Kefu Chai
fd80d4b476 rpm: use %license macro for packaging license file
see https://rpm-guide.readthedocs.io/en/latest/rpm-guide.html#rpm-macros

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-10-26 22:04:38 +08:00
Boris Ranto
5debf36b37 rpm: Create ceph-grafana-dashboards package
Signed-off-by: Boris Ranto <branto@redhat.com>
2018-10-25 19:55:16 +02:00
Nathan Cutler
7349218acb build/ops: drop sgdisk build/runtime dependencies
sgdisk was a dependency of ceph-disk, which has been ripped out.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-10-23 07:56:13 +02:00
Brad Hubbard
24636267f9 rpm: Use updated gperftools-libs at runtime
Due to ABI breakage in libtcmalloc.so.4 we need to specify the minimum
version to be used at runtime to be greater than or equal to the version
used at build time.

Fixes: http://tracker.ceph.com/issues/36508

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2018-10-18 11:22:25 +10:00
Boris Ranto
ea6d7d2c98 rpm: Use hardened LDFLAGS
Currently, we do pass the hardened CFLAGS and CPPFLAGS when building the
code. However, we do not pass the hardened flags to the linker. This
means that the binaries are linked without the options like -Wl,-z,now.
As a result, we do not fully harden the binaries that we build.

This commit fixes this by passing the RPM_LD_FLAGS to the linker so the
builds are linked with the properly hardened flags.

Fixes: http://tracker.ceph.com/issues/36316

Signed-off-by: Boris Ranto <branto@redhat.com>
2018-10-04 14:52:08 +02:00
Kefu Chai
a778cc701f
Merge pull request #24130 from tchaikov/wip-gcc-7.3
rpm: bump up required GCC version to 7.3.1

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2018-09-20 12:25:57 +08:00
Kefu Chai
5bcc179bc4 rpm: bump up required GCC version to 7.3.1
so we can include the fix of
https://gcc.gnu.org/ml/libstdc++/2017-07/msg00077.html and the fix at
7c78f2e672
. otherwise, if a class offers implicit conversion operator to
std::string and std::string_view, seastar will fail to compile. like

/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:3946:7:
note: candidate: std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits, _Alloc>::operator+=(const
std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char;
_Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       operator+=(const basic_string& __str)
       ^~~~~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:3988:7:
note: candidate: std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits,
_Alloc>::operator+=(std::basic_string<_CharT, _Traits,
_Alloc>::__sv_type) [with _CharT = char; _Traits =
std::char_traits<char>; _Alloc = std::allocator<char>;
std::basic_string<_CharT, _Traits, _Alloc>::__sv_type =
std::basic_string_view<char>]
       operator+=(__sv_type __sv)
       ^~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-17 22:51:26 +08:00
Kefu Chai
e69e50a859 rpm: use updated gperftools
make sure we only build with the higher version of gperftools on
distros where both 2.4 and 2.6.1 are packaged. see
https://git.centos.org/summary/rpms!gperftools.git . at the time of
writing, gperftools 2.6.1 is packaged for CentOS/RHEL 7, if gperftools
(>= 2.4) is required by Ceph, and user already has this version
installed, when new Ceph packages are installed, the updated gperftools
2.6.1 version won't be installed as a dependency. when launching
Ceph compiled with tcmalloc enabled, we will have

symbol lookup error: ceph-osd: undefined symbol: _ZdaPvm

so, by bumping up the required version of gperftools, the updated
gperftools will be installed.

see https://software.opensuse.org/package/gperftools, openSUSE/SLE offer
2.5. so they are safe at this moment.

Fixes: http://tracker.ceph.com/issues/35969
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-17 14:20:51 +08:00
Brad Hubbard
fb101163fc rpm: Fix Fedora error "No matching package to install: 'Cython3'"
Fixes: http://tracker.ceph.com/issues/35831

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2018-09-07 13:32:08 +10:00
Patrick Donnelly
4699cec388
Merge PR #23656 into master
* refs/pull/23656/head:
	build/ops: rpm: package cephfs-shell for SUSE as well as Fedora

Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-08-25 12:52:09 -07:00
Kefu Chai
b2733c0426
Merge pull request #23648 from sakhinov/sakhinov-fix-bcrypt
change ceph-mgr package depency from py-bcrypt to python2-bcrypt

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-08-23 19:25:32 +08:00
Kefu Chai
2532fb6b2a
Merge pull request #21983 from chardan/jfw-wip-libradosstriper_ultimate-final-battle
libradosstriper: conditional compile

Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-08-23 19:20:16 +08:00
Nathan Cutler
e0f79368a4 build/ops: rpm: package cephfs-shell for SUSE as well as Fedora
6dd06b0c34 introduced RPM packaging of cephfs-shell

This initial packaging was Fedora-only, but colorama and cmd2 *are* packaged
for both openSUSE and SLE.

Note: there is no py2-compatible version of cephfs-shell.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-08-21 17:11:52 +02:00
Konstantin Sakhinov
6af10cae66 rpm: change ceph-mgr package depency from py-bcrypt to python2-bcrypt
Signed-off-by: Konstantin Sakhinov <sakhinov@gmail.com>
2018-08-20 16:08:33 +03:00
Jesse Williamson
1a44357f5c package: modify ceph.spec.in to support libradosstriper conditional compilation
Signed-off-by: Jesse Williamson <jwilliamson@suse.de>
2018-08-16 08:21:42 -07:00
Sage Weil
b0b616df7b Merge PR #23240 into master
* refs/pull/23240/head:
	qa/suites/rados, qa/workunits/rados: Add suite/workunit for ceph-crash
	add ceph-crash service
	common/options: enable mgr 'crash' module by default
	global/signal_handler: add 'done' file to signal crashdump is ready

Reviewed-by: Sage Weil <sage@redhat.com>
2018-08-14 20:31:29 -05:00
Kefu Chai
6dd06b0c34 rpm: package cephfs-shell for fedora
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-09 20:19:34 +08:00
Dan Mick
da20184a16 add ceph-crash service
ceph-crash runs from systemd and watches /var/lib/ceph/crash
for crashdumps, posting them to the mgrs using the mgr's
crash plugin

Signed-off-by: Dan Mick <dan.mick@redhat.com>
2018-08-08 18:37:43 -07:00
Kefu Chai
f18ffecca3 rpm: remove fmt-devel from BuildRequires
because RHEL/CentOS 7 only offers fmt-devel 3.0.2, while seastar
requires >= 4.0.0, < 5.0.0, and on openSUSE Leap 15, we have
libfmt-devel 5.x.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-02 23:16:11 +08:00
Nathan Cutler
f0eed6d00e build/ops: rpm: fix seastar build dependencies
1. cryptopp-devel was moved to the distro-specific section by
aeb974b913, then
96196e9d77 reintroduced it in the
non-distro-specific section, breaking install-deps.sh for SUSE

2. fmt-devel is called libfmt-devel on SUSE

Fixes: install-deps.sh on SUSE
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-08-02 12:19:34 +02:00
Kefu Chai
d76fbf67a6
Merge pull request #23043 from tchaikov/wip-python-cephfs-dependencies
deb,rpm: fix python-cephfs dependencies

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2018-07-28 09:53:32 +08:00
Kefu Chai
03c7bee4ee deb,rpm: python-cephfs should depend on python-ceph-argparse
python-ceph-argparse is required by ceph_volume_client.py. hence we do
need list it as a dependency of python-cephfs.

Fixes: http://tracker.ceph.com/issues/24919
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-25 20:53:50 +08:00
Kefu Chai
8d8099b73e rpm: Revert "build/ops: rpm: python3-ceph-argparse only if Python 2 available"
This reverts commit c0b7aab381.

python3-ceph-argparse is required by ceph_volume_client.py. hence we do
need it as a dependency of python3-cephfs.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-25 15:22:16 +08:00
Kefu Chai
b35823cbbc deb,rpm: python-cephfs should depend on python-rados
in `cephfs.pyx` we `cimport rados`, and in
LibCephFs.create_with_rados(), Rados.cluster is accesssed without GIL,
so we need to import the rados module for cephfs to ensure that it's
safe to access this attribute without GIL.

dh_python2 and dh_python3 cannot fill ${python:Depends} and
${python3:Depends} with this dependency, so we need to set it
explicitly.

Fixes: http://tracker.ceph.com/issues/24918
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-25 15:22:16 +08:00
Kefu Chai
96196e9d77 rpm,install-deps,cmake: install {c-ares,fmt}-devel
* ceph.spec.in: c-ares-devel and fmt-devel are installed as
  dependencies fo seastar.
* install-deps.sh: libfmt-dev is missing in xenial, so we only
  install libc-ares-dev for ubuntu in install-deps.sh .
* cmake: build libfmt if it's not found.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-25 13:13:45 +08:00
Nathan Cutler
341d985673 build/ops: rpm: provide files moved from ceph-test
d7b493a710 moved three binaries from the
ceph-test package to other packages, causing trouble with upgrades in
test lab environments (users typically do not install the ceph-test
package).

While the original upgrade troubles have already been addressed, RPM
has a "Provides" mechanism for easing the pain, so it makes sense to
use it.

Fixes: http://tracker.ceph.com/issues/22558
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-21 10:14:02 +02:00
Nathan Cutler
9b53c0d4fc
Merge pull request #23077 from smithfarm/wip-etc-sudoers
build/ops: rpm: make sudo a build dependency

Reviewed-by: Tim Serong <tserong@suse.com>
2018-07-19 16:26:20 +02:00
Nathan Cutler
9f54233104 build/ops: rpm: make sudo a build dependency
ede36df325 added sudo as a runtime dependency,
but that commit also causes OBS builds to fail with:

[10666s] ... checking filelist
[10667s] ceph-osd-14.0.0-lp150.1332.1.x86_64.rpm: directories not owned by a package:
[10667s]  - /etc/sudoers.d

Since the "sudo" package is a runtime dependency of ceph-osd, it is guaranteed
to be installed on the target system and there is no reason for ceph-osd to own
this directory.

Having sudo as a build dependency makes OBS happy, and does no harm.

Follow-on fix for https://github.com/ceph/ceph/pull/22745

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-19 14:15:05 +02:00
Nathan Cutler
aeb974b913 build/ops: rpm: fix seastar build dependencies for SUSE
cryptopp-devel is called libcryptopp-devel on SUSE.

/usr/bin/protoc is included in protobuf-devel on SUSE.

numactl-devel is called libnuma-devel on SUSE

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-19 10:08:41 +02:00
Kefu Chai
25d5122b55 rpm,install-deps.sh: add --with-seastar option
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-12 17:49:34 +08:00
Nathan Cutler
12ef59fdb0 rpm: move make check-specific build deps to appropriate conditional block
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-11 13:56:49 +02:00
Nathan Cutler
3a30dd13a3 rpm: remove universal requires from distro-specific conditional blocks
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-11 13:51:04 +02:00
Sage Weil
884a0d24ab Merge PR #22745 into master
* refs/pull/22745/head:
	debian/control: require sudo
	ceph.spec: require sudo
	ceph.spec: install etc/sudoers.d/ceph-osd-smartctl
	debian: install etc/sudoers.d/ceph-osd-smartctl
	sudoers.d/ceph-osd-smartctl: allow user ceph to run smartctl as root

Reviewed-by: Erwan Velu <erwan@redhat.com>
2018-07-06 13:43:15 -05:00
Sage Weil
15732cdfc1 Merge PR #22871 into master
* refs/pull/22871/head:
	deb/rpm: add python-six as build-time and run-time dependency

Reviewed-by: Lenz Grimmer <lgrimmer@suse.com>
Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
2018-07-06 13:42:38 -05:00
Kefu Chai
af2c91ace6 deb,rpm,do_cmake: switch to cmake3
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-06 13:29:21 +08:00
Sage Weil
72fcace746 ceph.spec: require sudo
Signed-off-by: Sage Weil <sage@redhat.com>
2018-07-05 16:27:55 -05:00
Kefu Chai
e53bb2c5a3 deb/rpm: add python-six as build-time and run-time dependency
python-six is used by dashboard's controllers. please note,
${python:Depends} is able to fill the installation dependencies for
debian package. so python-six is not added to Requires of ceph-mgr.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-05 18:42:57 +08:00
Sage Weil
ede36df325 ceph.spec: install etc/sudoers.d/ceph-osd-smartctl
Signed-off-by: Sage Weil <sage@redhat.com>
2018-06-27 15:17:42 -05:00
Kefu Chai
572a740a03
Merge pull request #20297 from tanghaodong25/rdma-cm
msg/async/rdma: add iWARP RDMA protocol support

Reviewed-by: Haomai Wang <haomai@xsky.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-06-27 20:37:48 +08:00