summary refs log tree commit diff
path: root/gnu/packages/storage.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/storage.scm')
-rw-r--r--gnu/packages/storage.scm72
1 files changed, 34 insertions, 38 deletions
diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm
index 4dfae1e80e..094d7ade74 100644
--- a/gnu/packages/storage.scm
+++ b/gnu/packages/storage.scm
@@ -39,6 +39,7 @@
   #:use-module (gnu packages disk)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages jemalloc)
+  #:use-module (gnu packages icu4c)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages ncurses)
@@ -46,9 +47,11 @@
   #:use-module (gnu packages nss)
   #:use-module (gnu packages openldap)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))
@@ -56,18 +59,19 @@
 (define-public ceph
   (package
     (name "ceph")
-    (version "14.2.16")
+    (version "16.2.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.ceph.com/tarballs/ceph-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0lmdri415hqczc9565s5m5568pnj97ipqxgnw6085kps0flwq5zh"))
+                "104xmc84d4ycdn7f4z09kvzwl1vlywxp3hbfxhgq0kcmgikb4wad"))
               (patches
                (search-patches
                 "ceph-disable-cpu-optimizations.patch"
-                "ceph-fix-snappy-breaking-change.patch"))
+                "ceph-boost-compat.patch"
+                "ceph-rocksdb-compat.patch"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -78,9 +82,8 @@
                               ;"src/xxHash"
                               ;"src/zstd"
                               ;"src/civetweb"
-                              ;"src/seastar/fmt"
-                              "src/test/downloads"
                               "src/c-ares"
+                              "src/fmt"
                               "src/googletest"
                               "src/rapidjson"
                               "src/spdk"
@@ -113,7 +116,7 @@
                "-DBUILD_SHARED_LIBS=ON"
                "-DWITH_SYSTEM_ROCKSDB=ON"
                "-DWITH_SYSTEM_BOOST=ON"
-               "-DWITH_PYTHON3=ON"
+
                ;; TODO: Enable these when available in Guix.
                "-DWITH_MGR_DASHBOARD_FRONTEND=OFF"       ;requires node + nodeenv
                "-DWITH_BABELTRACE=OFF"
@@ -124,6 +127,9 @@
                ;; Use jemalloc instead of tcmalloc.
                "-DALLOCATOR=jemalloc"
 
+               ;; Don't install systemd unit files.
+               "-DWITH_SYSTEMD=OFF"
+
                ;; Do not bother building the tests; we are not currently running
                ;; them, and they do not build with system googletest as of 14.2.5.
                "-DWITH_TESTS=OFF"))
@@ -141,15 +147,12 @@
                (substitute* "cmake/modules/Distutils.cmake"
                  ;; Prevent creation of Python eggs.
                  (("setup.py install")
-                  "setup.py install --single-version-externally-managed --root=/"))
-
-               (substitute* (find-files "src/pybind" "^setup\\.py$")
-                 ;; Here we inject an extra line to the `setup.py' of the
+                  "setup.py install --single-version-externally-managed --root=/")
+                 ;; Inject the -rpath linker argument when linking
                  ;; Python C libraries so RUNPATH gets set up correctly.
-                 (("^([[:blank:]]+)extra_compile_args=(.*)$" _ indent args)
-                  (string-append indent "extra_compile_args=" args
-                                 indent "extra_link_args=['-Wl,-rpath="
-                                 lib "/lib'],\n")))
+                 (("LDFLAGS=(.*)\n" _ flags)
+                  (string-append "LDFLAGS=\\\"" flags
+                                 " -Wl,-rpath=" lib "/lib\\\"\n")))
 
                ;; Statically link libcrc32 because it does not get installed,
                ;; yet several libraries end up referring to it.
@@ -159,8 +162,7 @@
 
                (substitute* "udev/50-rbd.rules"
                  (("/usr/bin/ceph-rbdnamer")
-                  (string-append out "/bin/ceph-rbdnamer")))
-               #t)))
+                  (string-append out "/bin/ceph-rbdnamer"))))))
          (add-before 'install 'set-install-environment
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -171,46 +173,39 @@
                                     "/site-packages")))
                ;; The Python install scripts refuses to function if
                ;; the install directory is not on PYTHONPATH.
-               (setenv "PYTHONPATH"
-                       (string-append py3sitedir ":"
-                                      (getenv "PYTHONPATH")))
-               #t)))
+               (setenv "PYTHONPATH" py3sitedir))))
          (add-after 'install 'wrap-python-scripts
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (scripts '("ceph" "ceph-mgr" "ceph-volume"))
-                    (prettytable (assoc-ref inputs "python-prettytable"))
-                    (six (assoc-ref inputs "python-six"))
+                    (scripts '("bin/ceph" "bin/cephfs-top" "sbin/ceph-volume"))
+                    (dependencies (map (lambda (input)
+                                         (assoc-ref inputs input))
+                                       '("python-prettytable" "python-pyyaml")))
                     (sitedir (lambda (package)
                                (string-append package
                                               "/lib/python"
                                               ,(version-major+minor
                                                 (package-version python))
                                               "/site-packages")))
-                    (PYTHONPATH (string-append
-                                 (sitedir out) ":"
-                                 (sitedir six) ":"
-                                 (sitedir prettytable))))
+                    (PYTHONPATH (string-join (map sitedir (cons out dependencies))
+                                             ":")))
                (for-each (lambda (executable)
-                           (wrap-program (string-append out "/bin/" executable)
-                             `("PYTHONPATH" ":" prefix (,PYTHONPATH))))
-                         scripts)
-               #t))))))
+                           (wrap-program (string-append out "/" executable)
+                             `("GUIX_PYTHONPATH" ":" prefix (,PYTHONPATH))))
+                         scripts)))))))
     (outputs
      '("out" "lib"))
     (native-inputs
-     `(("gperf" ,gperf)
-       ("pkg-config" ,pkg-config)
-       ("python-cython" ,python-cython)
-       ("python-sphinx" ,python-sphinx)
-       ("yasm" ,yasm)))
+     (list gperf pkg-config python-cython python-sphinx yasm))
     (inputs
      `(("boost" ,boost)
        ("curl" ,curl)
        ("cryptsetup" ,cryptsetup)
        ("expat" ,expat)
        ("fcgi" ,fcgi)
+       ("fmt" ,fmt)
        ("fuse" ,fuse)
+       ("icu4c" ,icu4c)
        ("jemalloc" ,jemalloc)
        ("keyutils" ,keyutils)
        ("leveldb" ,leveldb)
@@ -227,12 +222,13 @@
        ("ncurses" ,ncurses)
        ("nss" ,nss)
        ("python-prettytable" ,python-prettytable) ;used by ceph_daemon.py
-       ("python-six" ,python-six)                 ;for ceph-mgr + plugins
-       ("python" ,python-wrapper)
+       ("python-pyyaml" ,python-pyyaml)           ;from python-common/setup.py
+       ("python" ,python)
        ("rapidjson" ,rapidjson)
        ("rdma-core" ,rdma-core)
        ("rocksdb" ,rocksdb)
        ("snappy" ,snappy)
+       ("sqlite" ,sqlite)
        ("udev" ,eudev)
        ("util-linux" ,util-linux)
        ("util-linux:lib" ,util-linux "lib")