summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-09-27 18:41:50 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-11-07 21:01:12 +0100
commit1badc85068ee0be2a028c1b94a3dd285901bc391 (patch)
treeeeae4be76875527afb24f2a3f41d331f23c74403
parente2568df74e46b6ab5b9d63a78dd805f8018848ab (diff)
downloadguix-1badc85068ee0be2a028c1b94a3dd285901bc391.tar.gz
gnu: ceph: Update to 13.2.2.
* gnu/packages/patches/ceph-skip-unittest_blockdev.patch: Adjust for 13.2.2.
* gnu/packages/patches/ceph-rocksdb-compat.patch: Delete file.
* gnu/packages/patches/ceph-detect-rocksdb.patch,
gnu/packages/patches/ceph-volume-respect-PATH.patch: New files.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/storage.scm (ceph): Update to 13.2.2.
[source]: Don't remove src/dpdk, which has been moved to src/spdk/dpdk and
is purged elsewhere.  Drop bundled rapidjson.  Adjust patch list.
[arguments]: Add "-DWITH_MGR_DASHBOARD_FRONTEND=OFF" and "-DWITH_SPDK=OFF" to
 #:configure-flags.   Drop obsolete "-DWITH_EMBEDDED".  Add workaround for
<https://bugs.gnu.org/30756>.  Remove obsolete test substitution.  Rework
'wrap-python-script' to be less verbose and wrap more scripts.
[native-inputs]: Add GCC-7.
[inputs]: Add OATH-TOOLKIT, RAPIDJSON and PYTHON2-SIX.
-rw-r--r--gnu/local.mk3
-rw-r--r--gnu/packages/patches/ceph-detect-rocksdb.patch24
-rw-r--r--gnu/packages/patches/ceph-rocksdb-compat.patch63
-rw-r--r--gnu/packages/patches/ceph-skip-unittest_blockdev.patch20
-rw-r--r--gnu/packages/patches/ceph-volume-respect-PATH.patch22
-rw-r--r--gnu/packages/storage.scm43
6 files changed, 82 insertions, 93 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 93bf44ac9b..86f081f7cf 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -608,10 +608,11 @@ dist_patch_DATA =						\
   %D%/packages/patches/catdoc-CVE-2017-11110.patch		\
   %D%/packages/patches/cdparanoia-fpic.patch			\
   %D%/packages/patches/cdrtools-3.01-mkisofs-isoinfo.patch 	\
+  %D%/packages/patches/ceph-detect-rocksdb.patch		\
   %D%/packages/patches/ceph-disable-cpu-optimizations.patch	\
-  %D%/packages/patches/ceph-rocksdb-compat.patch		\
   %D%/packages/patches/ceph-skip-collect-sys-info-test.patch	\
   %D%/packages/patches/ceph-skip-unittest_blockdev.patch	\
+  %D%/packages/patches/ceph-volume-respect-PATH.patch		\
   %D%/packages/patches/chmlib-inttypes.patch			\
   %D%/packages/patches/clang-3.5-libc-search-path.patch		\
   %D%/packages/patches/clang-3.5-libsanitizer-ustat-fix.patch	\
diff --git a/gnu/packages/patches/ceph-detect-rocksdb.patch b/gnu/packages/patches/ceph-detect-rocksdb.patch
new file mode 100644
index 0000000000..badad6d1b9
--- /dev/null
+++ b/gnu/packages/patches/ceph-detect-rocksdb.patch
@@ -0,0 +1,24 @@
+Help the build system find system RocksDB.
+
+Taken from this upstream commit:
+https://github.com/ceph/ceph/commit/2ac26bd0e01fd6c82bd59936cf25c25173f7775a
+
+diff --git a/cmake/modules/Findrocksdb.cmake b/cmake/modules/Findrocksdb.cmake
+index f8369f73fc..5926647348 100644
+--- a/cmake/modules/Findrocksdb.cmake
++++ b/cmake/modules/Findrocksdb.cmake
+@@ -15,11 +15,11 @@ find_library(ROCKSDB_LIBRARIES rocksdb)
+ 
+ if(ROCKSDB_INCLUDE_DIR AND EXISTS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h")
+   foreach(ver "MAJOR" "MINOR" "PATCH")
+-    file(STRINGS "${ROCKSDB_INCLUDE_DIR}/version.h" ROCKSDB_VER_${ver}_LINE
++    file(STRINGS "${ROCKSDB_INCLUDE_DIR}/rocksdb/version.h" ROCKSDB_VER_${ver}_LINE
+       REGEX "^#define[ \t]+ROCKSDB_${ver}[ \t]+[0-9]+$")
+     string(REGEX REPLACE "^#define[ \t]+ROCKSDB_${ver}[ \t]+([0-9]+)$"
+-      "\\1" ROCKSDB_VERSION_${ver} "${ROCKDB_VER_${ver}_LINE}")
+-    unset(${ROCKDB_VER_${ver}_LINE})
++      "\\1" ROCKSDB_VERSION_${ver} "${ROCKSDB_VER_${ver}_LINE}")
++    unset(${ROCKSDB_VER_${ver}_LINE})
+   endforeach()
+   set(ROCKSDB_VERSION_STRING
+     "${ROCKSDB_VERSION_MAJOR}.${ROCKSDB_VERSION_MINOR}.${ROCKSDB_VERSION_PATCH}")
diff --git a/gnu/packages/patches/ceph-rocksdb-compat.patch b/gnu/packages/patches/ceph-rocksdb-compat.patch
deleted file mode 100644
index 1a3c6b0b23..0000000000
--- a/gnu/packages/patches/ceph-rocksdb-compat.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Fix compatibility with newer versions of RocksDB.
-
-Adapted from this upstream patch, with some additional changes for 12.2:
-https://github.com/ceph/ceph/commit/9d73a7121fdb1ae87cb1aa6f7d9d7a13f329ae68
-
-diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc
-index 8660afe1886d..bc0de79e23cb 100644
---- a/src/kv/RocksDBStore.cc
-+++ b/src/kv/RocksDBStore.cc
-@@ -505,7 +505,7 @@
-   // considering performance overhead, default is disabled
-   if (g_conf->rocksdb_perf) {
-     rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex);
--    rocksdb::perf_context.Reset();
-+    rocksdb::get_perf_context()->Reset();
-   }
- 
-   RocksDBTransactionImpl * _t =
-@@ -532,13 +532,13 @@
-     utime_t write_wal_time;
-     utime_t write_pre_and_post_process_time;
-     write_wal_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_wal_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_wal_time)/1000000000);
-     write_memtable_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_memtable_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_memtable_time)/1000000000);
-     write_delay_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_delay_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_delay_time)/1000000000);
-     write_pre_and_post_process_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000);
-     logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time);
-     logger->tinc(l_rocksdb_write_delay_time, write_delay_time);
-     logger->tinc(l_rocksdb_write_wal_time, write_wal_time);
-@@ -558,7 +558,7 @@
-   // considering performance overhead, default is disabled
-   if (g_conf->rocksdb_perf) {
-     rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex);
--    rocksdb::perf_context.Reset();
-+    rocksdb::get_perf_context()->Reset();
-   }
- 
-   RocksDBTransactionImpl * _t =
-@@ -586,13 +586,13 @@
-     utime_t write_wal_time;
-     utime_t write_pre_and_post_process_time;
-     write_wal_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_wal_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_wal_time)/1000000000);
-     write_memtable_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_memtable_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_memtable_time)/1000000000);
-     write_delay_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_delay_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_delay_time)/1000000000);
-     write_pre_and_post_process_time.set_from_double(
--	static_cast<double>(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000);
-+	static_cast<double>(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000);
-     logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time);
-     logger->tinc(l_rocksdb_write_delay_time, write_delay_time);
-     logger->tinc(l_rocksdb_write_wal_time, write_wal_time);
diff --git a/gnu/packages/patches/ceph-skip-unittest_blockdev.patch b/gnu/packages/patches/ceph-skip-unittest_blockdev.patch
index 43b9984862..407bd93278 100644
--- a/gnu/packages/patches/ceph-skip-unittest_blockdev.patch
+++ b/gnu/packages/patches/ceph-skip-unittest_blockdev.patch
@@ -4,25 +4,21 @@ This test tries to walk a sysfs path and hits a null pointer exception.
 Expected: (dir) != (nullptr), actual: NULL vs 8-byte object <00-00 00-00 00-00 00-00>
 
 diff --git a/src/test/common/CMakeLists.txt b/src/test/common/CMakeLists.txt
-index 5172663898..ac84085eaa 100644
 --- a/src/test/common/CMakeLists.txt
 +++ b/src/test/common/CMakeLists.txt
-@@ -12,15 +12,6 @@ target_link_libraries(get_command_descriptions
+@@ -12,15 +12,6 @@
    ${CMAKE_DL_LIBS}
    )
  
 -if(HAVE_BLKID)
--# unittest_blkdev
--add_executable(unittest_blkdev
--  test_blkdev.cc
--  )
--add_ceph_unittest(unittest_blkdev ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_blkdev)
--target_link_libraries(unittest_blkdev global ${BLKID_LIBRARIES})
--endif(HAVE_BLKID)
+-  # unittest_blkdev
+-  add_executable(unittest_blkdev
+-    test_blkdev.cc
+-    )
+-  add_ceph_unittest(unittest_blkdev)
+-  target_link_libraries(unittest_blkdev ceph-common ${BLKID_LIBRARIES})
+-endif()
 -
  # unittest_bloom_filter
  add_executable(unittest_bloom_filter
    test_bloom_filter.cc
--- 
-2.11.1
-
diff --git a/gnu/packages/patches/ceph-volume-respect-PATH.patch b/gnu/packages/patches/ceph-volume-respect-PATH.patch
new file mode 100644
index 0000000000..08a9a15ddd
--- /dev/null
+++ b/gnu/packages/patches/ceph-volume-respect-PATH.patch
@@ -0,0 +1,22 @@
+Look for required tools in $PATH instead of just a handful locations.
+
+diff --git a/src/ceph-volume/ceph_volume/util/system.py b/src/ceph-volume/ceph_volume/util/system.py
+index b637f023a4..14516e1c65 100644
+--- a/src/ceph-volume/ceph_volume/util/system.py
++++ b/src/ceph-volume/ceph_volume/util/system.py
+@@ -33,14 +33,7 @@ def generate_uuid():
+ 
+ def which(executable):
+     """find the location of an executable"""
+-    locations = (
+-        '/usr/local/bin',
+-        '/bin',
+-        '/usr/bin',
+-        '/usr/local/sbin',
+-        '/usr/sbin',
+-        '/sbin',
+-    )
++    locations = os.getenv('PATH').split(':')
+ 
+     for location in locations:
+         executable_path = os.path.join(location, executable)
diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm
index 11f6f9d7e8..5051ccd986 100644
--- a/gnu/packages/storage.scm
+++ b/gnu/packages/storage.scm
@@ -26,6 +26,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages assembly)
+  #:use-module (gnu packages authentication)
   #:use-module (gnu packages bdw-gc)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
@@ -35,6 +36,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages jemalloc)
@@ -51,18 +53,19 @@
 (define-public ceph
   (package
     (name "ceph")
-    (version "12.2.5")
+    (version "13.2.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.ceph.com/tarballs/ceph-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1ydc3mfvc0vpnpfnfmissvsrsj4jyxgzc2pcl1a4vdr3bwkcglp3"))
+                "0h483n9iy0fkbqrhf7k0dzspwdpcaswkjwmc5n5c600fr6s1v9pk"))
               (patches
                (search-patches "ceph-skip-unittest_blockdev.patch"
                                "ceph-skip-collect-sys-info-test.patch"
-                               "ceph-rocksdb-compat.patch"
+                               "ceph-detect-rocksdb.patch"
+                               "ceph-volume-respect-PATH.patch"
                                "ceph-disable-cpu-optimizations.patch"))
               (modules '((guix build utils)))
               (snippet
@@ -76,7 +79,7 @@
                               ;"src/zstd"
                               ;"src/civetweb"
                               "src/test/downloads"
-                              "src/dpdk"
+                              "src/rapidjson"
                               "src/spdk"
                               "src/rocksdb"
                               "src/boost"))
@@ -100,13 +103,14 @@
                               (assoc-ref %build-inputs "keyutils") "/include")
                "-DCMAKE_INSTALL_LOCALSTATEDIR=/var"
                "-DENABLE_SHARED=ON"
-               "-DWITH_EMBEDDED=OFF"
                "-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"
                "-DWITH_LTTNG=OFF"
+               "-DWITH_SPDK=OFF"
                "-DWITH_XFS=OFF"
                "-DWITH_XIO=OFF"
                ;; Use jemalloc instead of tcmalloc.
@@ -184,9 +188,6 @@
                ;; /tmp/ceph-disk-virtualenv/bin/ceph-disk, but somehow
                ;; src/ceph-disk/CMakeLists.txt fails to create it.
                (substitute* "src/test/CMakeLists.txt"
-                 ;; FIXME: "create cannot load compressor of type zlib"
-                 ;; "libceph_zlib.so: undefined symbol: isal_deflate"
-                 (("^add_subdirectory\\(compressor\\)") "")
                  ;; FIXME: These tests fails because `ceph-disk'
                  ;; is not available.
                  (("^add_ceph_test\\(test-ceph-helpers\\.sh.*$") "\n")
@@ -235,6 +236,11 @@
                  (("^add_ceph_test\\(osd-copy-from\\.sh.*$") "\n")
                  (("^add_ceph_test\\(osd-fast-mark-down\\.sh.*$") "\n"))
                #t)))
+         (add-before 'configure 'gcc-workaround
+           (lambda _
+             (unsetenv "C_INCLUDE_PATH")
+             (unsetenv "CPLUS_INCLUDE_PATH")
+             #t))
          (add-before 'check 'set-check-environment
            (lambda _
              ;; Run tests in parallel.
@@ -262,28 +268,28 @@
          (add-after 'install 'wrap-python-scripts
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (ceph (string-append out "/bin/ceph"))
-                    (ceph-disk (string-append out "/bin/ceph-disk"))
-                    (ceph-detect-init (string-append
-                                       out "/bin/ceph-detect-init"))
-
+                    (scripts '("ceph" "ceph-mgr" "ceph-volume"
+                               "ceph-detect-init"
+                               "ceph-disk")) ;deprecated
                     (prettytable (assoc-ref inputs "python2-prettytable"))
-
+                    (six (assoc-ref inputs "python2-six"))
                     (sitedir (lambda (package)
                                (string-append package
                                               "/lib/python2.7/site-packages")))
                     (PYTHONPATH (string-append
                                  (sitedir out) ":"
+                                 (sitedir six) ":"
                                  (sitedir prettytable))))
                (for-each (lambda (executable)
-                           (wrap-program executable
+                           (wrap-program (string-append out "/bin/" executable)
                              `("PYTHONPATH" ":" prefix (,PYTHONPATH))))
-                         (list ceph ceph-disk ceph-detect-init))
+                         scripts)
                #t))))))
     (outputs
      '("out" "lib"))
     (native-inputs
-     `(("gperf" ,gperf)
+     `(("gcc" ,gcc-7)                      ;7 or later is required
+       ("gperf" ,gperf)
        ("pkg-config" ,pkg-config)
        ("python-cython" ,python-cython)
        ("python-sphinx" ,python-sphinx)
@@ -329,13 +335,16 @@
        ("libatomic-ops" ,libatomic-ops)
        ("lua" ,lua)
        ("lz4" ,lz4)
+       ("oath-toolkit" ,oath-toolkit)
        ("openldap" ,openldap)
        ("openssl" ,openssl)
        ("nss" ,nss)
        ("parted" ,parted)
        ("python@2" ,python-2)
        ("python2-prettytable" ,python2-prettytable)      ;used by ceph_daemon.py
+       ("python2-six" ,python2-six)                      ;for ceph-mgr + plugins
        ("python@3" ,python-3)
+       ("rapidjson" ,rapidjson)
        ("rocksdb" ,rocksdb)
        ("snappy" ,snappy)
        ("udev" ,eudev)