From 0dea5dff3639a4729fce9ec453c4f69cb59d31a1 Mon Sep 17 00:00:00 2001 From: Johan Thomsen Date: Tue, 7 Jul 2020 10:56:04 +0200 Subject: [PATCH] ceph: 14.2.10 -> 15.2.4 --- .../ceph/0000-fix-SPDK-build-env.patch | 12 ++--- pkgs/tools/filesystems/ceph/default.nix | 53 +++++++++++-------- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/pkgs/tools/filesystems/ceph/0000-fix-SPDK-build-env.patch b/pkgs/tools/filesystems/ceph/0000-fix-SPDK-build-env.patch index b04082537b53..a117408b000f 100644 --- a/pkgs/tools/filesystems/ceph/0000-fix-SPDK-build-env.patch +++ b/pkgs/tools/filesystems/ceph/0000-fix-SPDK-build-env.patch @@ -1,11 +1,11 @@ ---- a/cmake/modules/BuildSPDK.cmake 2018-08-09 09:22:34.950684960 +0200 -+++ b/cmake/modules/BuildSPDK.cmake 2018-08-09 09:21:59.986964224 +0200 -@@ -16,7 +16,7 @@ +--- a/cmake/modules/BuildSPDK.cmake ++++ b/cmake/modules/BuildSPDK.cmake +@@ -35,7 +35,7 @@ macro(build_spdk) # unset $CFLAGS, otherwise it will interfere with how SPDK sets # its include directory. # unset $LDFLAGS, otherwise SPDK will fail to mock some functions. -- BUILD_COMMAND env -i PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} $(MAKE) EXTRA_CFLAGS="-fPIC" -+ BUILD_COMMAND env PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} $(MAKE) EXTRA_CFLAGS="-fPIC" C_OPT="-mssse3" +- BUILD_COMMAND env -i PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} ${make_cmd} EXTRA_CFLAGS="${spdk_CFLAGS}" ++ BUILD_COMMAND env -i PATH=$ENV{PATH} CC=${CMAKE_C_COMPILER} ${make_cmd} EXTRA_CFLAGS="${spdk_CFLAGS}" C_OPT="-mssse3" BUILD_IN_SOURCE 1 INSTALL_COMMAND "true") - ExternalProject_Get_Property(spdk-ext source_dir) + unset(make_cmd) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index fc8ac971da72..cd0e18eb748c 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -75,6 +75,26 @@ let none = [ ]; }; + getMeta = description: { + homepage = "https://ceph.com/"; + inherit description; + license = with licenses; [ lgpl21 gpl2 bsd3 mit publicDomain ]; + maintainers = with maintainers; [ adev ak johanot krav ]; + platforms = [ "x86_64-linux" ]; + }; + + ceph-common = python3Packages.buildPythonPackage rec{ + pname = "ceph-common"; + inherit src version; + + sourceRoot = "ceph-${version}/src/python-common"; + + checkInputs = [ python3Packages.pytest ]; + propagatedBuildInputs = with python3Packages; [ pyyaml six ]; + + meta = getMeta "Ceph common module for code shared by manager modules"; + }; + ceph-python-env = python3Packages.python.withPackages (ps: [ ps.sphinx ps.flask @@ -83,27 +103,30 @@ let ps.virtualenv # Libraries needed by the python tools ps.Mako + ceph-common ps.cherrypy + ps.dateutil + ps.jsonpatch ps.pecan ps.prettytable ps.pyjwt ps.webob ps.bcrypt + ps.scipy ps.six ps.pyyaml ]); sitePackages = ceph-python-env.python.sitePackages; - version = "14.2.10"; + version = "15.2.4"; + src = fetchurl { + url = "http://download.ceph.com/tarballs/ceph-${version}.tar.gz"; + sha256 = "0jy5dp4r1bqk1l7nrv8l8zpl984k61p3vkvf73ygcn03bxyjjlax"; + }; in rec { ceph = stdenv.mkDerivation { pname = "ceph"; - inherit version; - - src = fetchurl { - url = "http://download.ceph.com/tarballs/ceph-${version}.tar.gz"; - sha256 = "0bbs3ag8zav283qpxrrndhvh2z01ykm6126fmwrbc1c5f9jfjq39"; - }; + inherit src version; patches = [ ./0000-fix-SPDK-build-env.patch @@ -173,25 +196,13 @@ in rec { doCheck = false; # uses pip to install things from the internet - meta = { - homepage = "https://ceph.com/"; - description = "Distributed storage system"; - license = with licenses; [ lgpl21 gpl2 bsd3 mit publicDomain ]; - maintainers = with maintainers; [ adev ak krav johanot srhb ]; - platforms = [ "x86_64-linux" ]; - }; + meta = getMeta "Distributed storage system"; passthru.version = version; }; ceph-client = runCommand "ceph-client-${version}" { - meta = { - homepage = "https://ceph.com/"; - description = "Tools needed to mount Ceph's RADOS Block Devices"; - license = with licenses; [ lgpl21 gpl2 bsd3 mit publicDomain ]; - maintainers = with maintainers; [ adev ak johanot krav ]; - platforms = [ "x86_64-linux" ]; - }; + meta = getMeta "Tools needed to mount Ceph's RADOS Block Devices"; } '' mkdir -p $out/{bin,etc,${sitePackages}} cp -r ${ceph}/bin/{ceph,.ceph-wrapped,rados,rbd,rbdmap} $out/bin