ceph: 13.2.4 -> 14.2.1
* remove kinetic * release note * add johanot as maintainer nixos/ceph: create option for mgr_module_path - since the upstream default is no longer correct in v14 * fix module, default location for libexec has changed * ceph: fix test
This commit is contained in:
committed by
Sarah Brofeldt
parent
85baedaca3
commit
fb22d67fa7
@@ -2,18 +2,18 @@
|
||||
, ensureNewerSourcesHook
|
||||
, cmake, pkgconfig
|
||||
, which, git
|
||||
, boost, python2Packages
|
||||
, boost, python3Packages
|
||||
, libxml2, zlib, lz4
|
||||
, openldap, lttng-ust
|
||||
, babeltrace, gperf
|
||||
, cunit, snappy
|
||||
, rocksdb, makeWrapper
|
||||
, leveldb, oathToolkit
|
||||
, leveldb, oathToolkit, removeReferencesTo
|
||||
|
||||
# Optional Dependencies
|
||||
, yasm ? null, fcgi ? null, expat ? null
|
||||
, curl ? null, fuse ? null
|
||||
, libedit ? null, libatomic_ops ? null, kinetic-cpp-client ? null
|
||||
, libedit ? null, libatomic_ops ? null
|
||||
, libs3 ? null
|
||||
|
||||
# Mallocs
|
||||
@@ -24,7 +24,7 @@
|
||||
, nss ? null, nspr ? null
|
||||
|
||||
# Linux Only Dependencies
|
||||
, linuxHeaders, utillinux, libuuid, udev, keyutils
|
||||
, linuxHeaders, utillinux, libuuid, udev, keyutils, rdma-core, rabbitmq-c
|
||||
, libaio ? null, libxfs ? null, zfs ? null
|
||||
, ...
|
||||
}:
|
||||
@@ -43,7 +43,6 @@ let
|
||||
optFuse = shouldUsePkg fuse;
|
||||
optLibedit = shouldUsePkg libedit;
|
||||
optLibatomic_ops = shouldUsePkg libatomic_ops;
|
||||
optKinetic-cpp-client = shouldUsePkg kinetic-cpp-client;
|
||||
optLibs3 = shouldUsePkg libs3;
|
||||
|
||||
optJemalloc = shouldUsePkg jemalloc;
|
||||
@@ -73,7 +72,7 @@ let
|
||||
none = [ ];
|
||||
};
|
||||
|
||||
ceph-python-env = python2Packages.python.withPackages (ps: [
|
||||
ceph-python-env = python3Packages.python.withPackages (ps: [
|
||||
ps.sphinx
|
||||
ps.flask
|
||||
ps.cython
|
||||
@@ -84,30 +83,30 @@ let
|
||||
ps.cherrypy
|
||||
ps.pecan
|
||||
ps.prettytable
|
||||
ps.pyjwt
|
||||
ps.webob
|
||||
ps.bcrypt
|
||||
ps.six
|
||||
]);
|
||||
|
||||
version = "13.2.4";
|
||||
version = "14.2.1";
|
||||
in rec {
|
||||
ceph = stdenv.mkDerivation {
|
||||
name="ceph-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.ceph.com/tarballs/ceph-${version}.tar.gz";
|
||||
sha256 = "0g2mc6rp84ia44vz8kl449820m9hmfavzfmwn8fy6li14xr8a00w";
|
||||
sha256 = "0qa9p8xp26d45h3jfj1rbwhmqv44f9n1mvccmpzaf2i05v42kmzb";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0000-fix-SPDK-build-env.patch
|
||||
# TODO: remove when https://github.com/ceph/ceph/pull/21289 is merged
|
||||
./0000-ceph-volume-allow-loop.patch
|
||||
./0000-dont-check-cherrypy-version.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkgconfig which git python2Packages.wrapPython makeWrapper
|
||||
pkgconfig which git python3Packages.wrapPython makeWrapper
|
||||
(ensureNewerSourcesHook { year = "1980"; })
|
||||
];
|
||||
|
||||
@@ -115,9 +114,11 @@ in rec {
|
||||
boost ceph-python-env libxml2 optYasm optLibatomic_ops optLibs3
|
||||
malloc zlib openldap lttng-ust babeltrace gperf cunit
|
||||
snappy rocksdb lz4 oathToolkit leveldb
|
||||
optKinetic-cpp-client
|
||||
removeReferencesTo
|
||||
] ++ optionals stdenv.isLinux [
|
||||
linuxHeaders utillinux libuuid udev keyutils optLibaio optLibxfs optZfs
|
||||
# ceph 14
|
||||
rdma-core rabbitmq-c
|
||||
] ++ optionals hasRadosgw [
|
||||
optFcgi optExpat optCurl optFuse optLibedit
|
||||
];
|
||||
@@ -126,20 +127,21 @@ in rec {
|
||||
substituteInPlace src/common/module.c --replace "/sbin/modinfo" "modinfo"
|
||||
substituteInPlace src/common/module.c --replace "/sbin/modprobe" "modprobe"
|
||||
# Since Boost 1.67 this seems to have changed
|
||||
substituteInPlace CMakeLists.txt --replace "list(APPEND BOOST_COMPONENTS python)" "list(APPEND BOOST_COMPONENTS python27)"
|
||||
substituteInPlace src/CMakeLists.txt --replace "Boost::python " "Boost::python27 "
|
||||
substituteInPlace CMakeLists.txt --replace "list(APPEND BOOST_COMPONENTS python)" "list(APPEND BOOST_COMPONENTS python37)"
|
||||
substituteInPlace src/CMakeLists.txt --replace "Boost::python " "Boost::python37 "
|
||||
|
||||
# for pybind/rgw to find internal dep
|
||||
export LD_LIBRARY_PATH="$PWD/build/lib:$LD_LIBRARY_PATH"
|
||||
# install target needs to be in PYTHONPATH for "*.pth support" check to succeed
|
||||
export PYTHONPATH=$lib/lib/python2.7/site-packages/:$out/lib/python2.7/site-packages/
|
||||
export PYTHONPATH=${ceph-python-env}/lib/python3.7/site-packages:$lib/lib/python3.7/site-packages/:$out/lib/python3.7/site-packages/
|
||||
|
||||
patchShebangs src/spdk
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DWITH_SYSTEM_ROCKSDB=ON"
|
||||
"-DROCKSDB_INCLUDE_DIR=${rocksdb}/include/rocksdb"
|
||||
"-DWITH_PYTHON3=ON"
|
||||
"-DWITH_SYSTEM_ROCKSDB=OFF"
|
||||
|
||||
"-DWITH_SYSTEM_BOOST=ON"
|
||||
"-DWITH_SYSTEMD=OFF"
|
||||
"-DWITH_TESTS=OFF"
|
||||
@@ -147,9 +149,16 @@ in rec {
|
||||
"-DWITH_MGR_DASHBOARD_FRONTEND=OFF"
|
||||
];
|
||||
|
||||
preFixup = ''
|
||||
find $lib -type f -exec remove-references-to -t $out '{}' +
|
||||
mv $out/share/ceph/mgr $lib/lib/ceph/
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
export PYTHONPATH="${ceph-python-env}/lib/python3.7/site-packages:$lib/lib/ceph/mgr:$out/lib/python3.7/site-packages/"
|
||||
wrapPythonPrograms
|
||||
wrapProgram $out/bin/ceph-mgr --prefix PYTHONPATH ":" "$lib/lib/ceph/mgr:$out/lib/python2.7/site-packages/"
|
||||
wrapProgram $out/bin/ceph-mgr --prefix PYTHONPATH ":" "${ceph-python-env}/lib/python3.7/site-packages:$lib/lib/ceph/mgr:$out/lib/python3.7/site-packages/"
|
||||
wrapProgram $out/bin/ceph-volume --prefix PYTHONPATH ":" "${ceph-python-env}/lib/python3.7/site-packages:$lib/lib/ceph/mgr:$out/lib/python3.7/site-packages/"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@@ -160,7 +169,7 @@ in rec {
|
||||
homepage = https://ceph.com/;
|
||||
description = "Distributed storage system";
|
||||
license = with licenses; [ lgpl21 gpl2 bsd3 mit publicDomain ];
|
||||
maintainers = with maintainers; [ adev ak krav ];
|
||||
maintainers = with maintainers; [ adev ak krav johanot ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
@@ -176,11 +185,11 @@ in rec {
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
} ''
|
||||
mkdir -p $out/{bin,etc,lib/python2.7/site-packages}
|
||||
mkdir -p $out/{bin,etc,lib/python3.7/site-packages}
|
||||
cp -r ${ceph}/bin/{ceph,.ceph-wrapped,rados,rbd,rbdmap} $out/bin
|
||||
cp -r ${ceph}/bin/ceph-{authtool,conf,dencoder,rbdnamer,syn} $out/bin
|
||||
cp -r ${ceph}/bin/rbd-replay* $out/bin
|
||||
cp -r ${ceph}/lib/python2.7/site-packages $out/lib/python2.7/
|
||||
cp -r ${ceph}/lib/python3.7/site-packages $out/lib/python3.7/
|
||||
cp -r ${ceph}/etc/bash_completion.d $out/etc
|
||||
# wrapPythonPrograms modifies .ceph-wrapped, so lets just update its paths
|
||||
substituteInPlace $out/bin/ceph --replace ${ceph} $out
|
||||
|
||||
Reference in New Issue
Block a user