summary refs log tree commit diff
path: root/gnu/packages/storage.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-11-05 22:49:43 +0100
committerMarius Bakke <marius@gnu.org>2021-11-06 17:41:41 +0100
commit1525443e02f5462934d32904973692541b7057d7 (patch)
treea250ff22e86bbc3d70c6a6fb991cb069f56e7e84 /gnu/packages/storage.scm
parent075df3d3e2f86ad2548075969b34402a3c40ec42 (diff)
downloadguix-1525443e02f5462934d32904973692541b7057d7.tar.gz
gnu: ceph: Update to 16.2.6.
* gnu/packages/storage.scm (ceph): Update to 16.2.6.
[source](patches): Add two new patches.  Remove one obsolete.
[source](snippet): Unbundle fmt.
[arguments]: Remove -DWITH_PYTHON3 from #:configure-flags. Add
-DWITH_SYSTEMD.  Adjust RUNPATH substitution, and the wrap-python-scripts
phase, for upstream changes.  Remove trailing #t's.
[inputs]: Remove PYTHON-SIX and PYTHON-WRAPPER.  Add FMT, ICU4C,
PYTHON-PYYAML, PYTHON, and SQLITE.
* gnu/packages/patches/ceph-fix-snappy-breaking-change.patch: Delete file.
* gnu/packages/patches/ceph-boost-compat.patch,
gnu/packages/patches/ceph-rocksdb-compat.patch: New files.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
Diffstat (limited to 'gnu/packages/storage.scm')
-rw-r--r--gnu/packages/storage.scm59
1 files changed, 31 insertions, 28 deletions
diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm
index 276bce3cfd..a36d29eb33 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"))
@@ -175,24 +177,22 @@
          (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)
+                           (wrap-program (string-append out "/" executable)
                              `("GUIX_PYTHONPATH" ":" prefix (,PYTHONPATH))))
-                         scripts)
-               #t))))))
+                         scripts)))))))
     (outputs
      '("out" "lib"))
     (native-inputs
@@ -207,7 +207,9 @@
        ("cryptsetup" ,cryptsetup)
        ("expat" ,expat)
        ("fcgi" ,fcgi)
+       ("fmt" ,fmt)
        ("fuse" ,fuse)
+       ("icu4c" ,icu4c)
        ("jemalloc" ,jemalloc)
        ("keyutils" ,keyutils)
        ("leveldb" ,leveldb)
@@ -224,12 +226,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")