all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: 30596@debbugs.gnu.org
Subject: [bug#30596] [PATCH 6/6] gnu: ceph: Update to 12.2.3.
Date: Sat, 24 Feb 2018 20:03:49 +0100	[thread overview]
Message-ID: <20180224190349.8155-6-mbakke@fastmail.com> (raw)
In-Reply-To: <20180224190349.8155-1-mbakke@fastmail.com>

* gnu/packages/patches/ceph-disable-cpu-optimizations.patch: Adjust to
upstream changes.
* gnu/packages/patches/ceph-disable-unittest-throttle.patch: Delete file.
* gnu/packages/patches/ceph-rocksdb-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/storage.scm (ceph): Update to 12.2.3.
[source](patches): Adjust.
[arguments]: Add "-DWITH_BABELTRACE=OFF" in #:configure-flags.  Build with
CMAKE-3.11.  Adjust file substitutions.  Wrap 'ceph' executable.
[inputs]: Add GPERF.  Replace BOOST with BOOST-1.66.  Add PYTHON2-PRETTYTABLE.
---
 gnu/local.mk                                       |  2 +-
 .../patches/ceph-disable-cpu-optimizations.patch   | 64 +++++++++-------------
 .../patches/ceph-disable-unittest-throttle.patch   | 52 ------------------
 gnu/packages/patches/ceph-rocksdb-compat.patch     | 63 +++++++++++++++++++++
 gnu/packages/storage.scm                           | 33 ++++++-----
 5 files changed, 111 insertions(+), 103 deletions(-)
 delete mode 100644 gnu/packages/patches/ceph-disable-unittest-throttle.patch
 create mode 100644 gnu/packages/patches/ceph-rocksdb-compat.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 75f275928..c80b2ac29 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -576,7 +576,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/cdparanoia-fpic.patch			\
   %D%/packages/patches/cdrtools-3.01-mkisofs-isoinfo.patch 	\
   %D%/packages/patches/ceph-disable-cpu-optimizations.patch	\
-  %D%/packages/patches/ceph-disable-unittest-throttle.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/chmlib-inttypes.patch			\
diff --git a/gnu/packages/patches/ceph-disable-cpu-optimizations.patch b/gnu/packages/patches/ceph-disable-cpu-optimizations.patch
index f33eb629d..421b1d4fe 100644
--- a/gnu/packages/patches/ceph-disable-cpu-optimizations.patch
+++ b/gnu/packages/patches/ceph-disable-cpu-optimizations.patch
@@ -1,5 +1,4 @@
-Disable CPU optimizations not supported by all x86_64 systems. Also
-don't add anything for i686.
+Disable CPU optimizations not supported by all x86_64 systems.
 
 --- a/cmake/modules/SIMDExt.cmake	2017-03-23 22:22:58.254071694 +0100
 +++ b/cmake/modules/SIMDExt.cmake	2017-03-23 22:23:22.446848845 +0100
@@ -15,39 +14,30 @@ don't add anything for i686.
  #
  # SIMD_COMPILE_FLAGS
  #
-@@ -73,7 +68,7 @@
-     set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mfpu=neon")
-   endif()
- 
--elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64")
-+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64")
-   set(HAVE_INTEL 1)
-   CHECK_C_COMPILER_FLAG(-msse HAVE_INTEL_SSE)
-   if(HAVE_INTEL_SSE)
-@@ -83,26 +78,6 @@
-   if(HAVE_INTEL_SSE2)
-     set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse2")
-   endif()
--  CHECK_C_COMPILER_FLAG(-msse3 HAVE_INTEL_SSE3)
--  if(HAVE_INTEL_SSE3)
--    set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse3")
--  endif()
--  CHECK_C_COMPILER_FLAG(-mssse3 HAVE_INTEL_SSSE3)
--  if(HAVE_INTEL_SSSE3)
--    set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mssse3")
--  endif()
--  CHECK_C_COMPILER_FLAG(-mpclmul HAVE_INTEL_PCLMUL)
--  if(HAVE_INTEL_PCLMUL)
--    set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mpclmul")
--  endif()
--  CHECK_C_COMPILER_FLAG(-msse4.1 HAVE_INTEL_SSE4_1)
--  if(HAVE_INTEL_SSE4_1)
--    set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse4.1")
--  endif()
--  CHECK_C_COMPILER_FLAG(-msse4.2 HAVE_INTEL_SSE4_2)
--  if(HAVE_INTEL_SSE4_2)
--    set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse4.2")
--  endif()
+@@ -85,26 +80,6 @@
+       if(HAVE_INTEL_SSE2)
+         set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse2")
+       endif()
+-      CHECK_C_COMPILER_FLAG(-msse3 HAVE_INTEL_SSE3)
+-      if(HAVE_INTEL_SSE3)
+-        set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse3")
+-      endif()
+-      CHECK_C_COMPILER_FLAG(-mssse3 HAVE_INTEL_SSSE3)
+-      if(HAVE_INTEL_SSSE3)
+-        set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mssse3")
+-      endif()
+-      CHECK_C_COMPILER_FLAG(-mpclmul HAVE_INTEL_PCLMUL)
+-      if(HAVE_INTEL_PCLMUL)
+-        set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mpclmul")
+-      endif()
+-      CHECK_C_COMPILER_FLAG(-msse4.1 HAVE_INTEL_SSE4_1)
+-      if(HAVE_INTEL_SSE4_1)
+-        set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse4.1")
+-      endif()
+-      CHECK_C_COMPILER_FLAG(-msse4.2 HAVE_INTEL_SSE4_2)
+-      if(HAVE_INTEL_SSE4_2)
+-        set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse4.2")
+-      endif()
+     endif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64")
+   endif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64")
  elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(powerpc|ppc)64le")
-   set(HAVE_PPC64LE 1)
-   message(STATUS " we are ppc64le")
diff --git a/gnu/packages/patches/ceph-disable-unittest-throttle.patch b/gnu/packages/patches/ceph-disable-unittest-throttle.patch
deleted file mode 100644
index 08ae5f9e2..000000000
--- a/gnu/packages/patches/ceph-disable-unittest-throttle.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-FIXME: This test broke after the gcc-5/glibc-2.25 core-updates merge.
-Not sure what's going on here, it hangs after spawning the first thread.
-
-diff --git a/src/test/common/Throttle.cc b/src/test/common/Throttle.cc
-index 5b6d73217d..40a477b2a3 100644
---- a/src/test/common/Throttle.cc
-+++ b/src/test/common/Throttle.cc
-@@ -216,44 +216,6 @@ TEST_F(ThrottleTest, wait) {
-   } while(!waited);
- }
- 
--TEST_F(ThrottleTest, destructor) {
--  Thread_get *t;
--  {
--    int64_t throttle_max = 10;
--    Throttle *throttle = new Throttle(g_ceph_context, "throttle", throttle_max);
--
--    ASSERT_FALSE(throttle->get(5));
--
--    t = new Thread_get(*throttle, 7);
--    t->create("t_throttle");
--    bool blocked;
--    useconds_t delay = 1;
--    do {
--      usleep(delay);
--      if (throttle->get_or_fail(1)) {
--	throttle->put(1);
--	blocked = false;
--      } else {
--	blocked = true;
--      }
--      delay *= 2;
--    } while(!blocked);
--    delete throttle;
--  }
--
--  { //
--    // The thread is left hanging, otherwise it will abort().
--    // Deleting the Throttle on which it is waiting creates a
--    // inconsistency that will be detected: the Throttle object that
--    // it references no longer exists.
--    //
--    pthread_t id = t->get_thread_id();
--    ASSERT_EQ(pthread_kill(id, 0), 0);
--    delete t;
--    ASSERT_EQ(pthread_kill(id, 0), 0);
--  }
--}
--
- std::pair<double, std::chrono::duration<double> > test_backoff(
-   double low_threshhold,
-   double high_threshhold,
diff --git a/gnu/packages/patches/ceph-rocksdb-compat.patch b/gnu/packages/patches/ceph-rocksdb-compat.patch
new file mode 100644
index 000000000..1a3c6b0b2
--- /dev/null
+++ b/gnu/packages/patches/ceph-rocksdb-compat.patch
@@ -0,0 +1,63 @@
+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/storage.scm b/gnu/packages/storage.scm
index bee349f6f..e6d566853 100644
--- a/gnu/packages/storage.scm
+++ b/gnu/packages/storage.scm
@@ -29,6 +29,7 @@
   #:use-module (gnu packages bdw-gc)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages cryptsetup)
@@ -36,6 +37,7 @@
   #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages gnuzilla)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lua)
@@ -50,18 +52,18 @@
 (define-public ceph
   (package
     (name "ceph")
-    (version "12.0.2")
+    (version "12.2.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.ceph.com/tarballs/ceph-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0l9v072ba28i984y5rwny9i11nmpyx5bl7awxg48plyadm2l3g14"))
+                "0ysfiicbmdgqd2ni7r7yviql0dvkwbadh4n7nl297wpk5bgjrk5y"))
               (patches
                (search-patches "ceph-skip-unittest_blockdev.patch"
                                "ceph-skip-collect-sys-info-test.patch"
-                               "ceph-disable-unittest-throttle.patch"
+                               "ceph-rocksdb-compat.patch"
                                "ceph-disable-cpu-optimizations.patch"))
               (modules '((guix build utils)))
               (snippet
@@ -74,7 +76,6 @@
                               ;"src/xxHash"
                               ;"src/zstd"
                               ;"src/civetweb"
-                              ;"src/Beast"
                               "src/test/downloads"
                               "src/dpdk"
                               "src/spdk"
@@ -105,6 +106,7 @@
                "-DWITH_SYSTEM_BOOST=ON"
                "-DWITH_PYTHON3=ON"
                ;; TODO: Enable these when available in Guix.
+               "-DWITH_BABELTRACE=OFF"
                "-DWITH_LTTNG=OFF"
                "-DWITH_XFS=OFF"
                "-DWITH_XIO=OFF"
@@ -114,6 +116,7 @@
        ;; <https://bugs.gnu.org/29674> for details. Disable tests until
        ;; resolved.
        #:tests? #f
+       #:cmake ,cmake-3.11
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-source
@@ -152,21 +155,17 @@
 
                (substitute* "src/test/test_subprocess.cc"
                  (("/bin/sh") (which "sh")))
-               (substitute* "src/test/ceph_objectstore_tool.py"
+               (substitute* "qa/standalone/special/ceph_objectstore_tool.py"
                  (("/bin/rm") (which "rm")))
                (substitute* "src/ceph-disk/ceph_disk/main.py"
                  (("/bin/mount") "mount")
                  (("/bin/umount") "umount")
                  (("/sbin/blkid") (which "blkid"))
+                 (("'cryptsetup'") (string-append "'" (which "cryptsetup") "'"))
                  (("'sgdisk'") (string-append "'" (which "sgdisk") "'"))
                  (("'parted'") (string-append "'" (which "parted") "'"))
                  (("'udevadm'") (string-append "'" (which "udevadm") "'")))
 
-               (substitute* "src/ceph-disk-udev"
-                 (("/sbin/cryptsetup") (which "cryptsetup"))
-                 (("/usr/sbin/sgdisk") (which "sgdisk"))
-                 (("/usr/sbin/ceph-disk")
-                  (string-append out "/bin/ceph-disk")))
                (substitute* "udev/50-rbd.rules"
                  (("/usr/bin/ceph-rbdnamer")
                   (string-append out "/bin/ceph-rbdnamer")))
@@ -265,16 +264,22 @@
          (add-after 'install 'wrap-python-scripts
            (lambda* (#:key 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"))
+                    (sitedir (package)
+                             (string-append package
+                                            "/lib/python2.7/site-packages"))
+                    (prettytable (assoc-ref inputs "python2-prettytable"))
                     (PYTHONPATH (string-append
-                                 out "/lib/python2.7/site-packages")))
+                                 (sitedir out) ":"
+                                 (sitedir prettytable))))
 
                (for-each (lambda (executable)
                            (wrap-program executable
                              `("PYTHONPATH" ":" prefix (,PYTHONPATH))))
-                         (list ceph-disk ceph-detect-init))
+                         (list ceph ceph-disk ceph-detect-init))
                #t))))))
     (outputs
      '("out" "lib"))
@@ -310,12 +315,13 @@
        ("python2-testtools" ,python2-testtools)
        ("python2-tox" ,python2-tox)))
     (inputs
-     `(("boost" ,boost)
+     `(("boost" ,boost-1.66)
        ("curl" ,curl)
        ("cryptsetup" ,cryptsetup)
        ("expat" ,expat)
        ("fcgi" ,fcgi)
        ("fuse" ,fuse)
+       ("gperf" ,gperf)
        ("gptfdisk" ,gptfdisk)
        ("jemalloc" ,jemalloc)
        ("keyutils" ,keyutils)
@@ -329,6 +335,7 @@
        ("nss" ,nss)
        ("parted" ,parted)
        ("python@2" ,python-2)
+       ("python2-prettytable" ,python2-prettytable)      ;used by ceph_daemon.py
        ("python@3" ,python-3)
        ("rocksdb" ,rocksdb)
        ("snappy" ,snappy)
-- 
2.16.2

  parent reply	other threads:[~2018-02-24 19:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-24 19:01 [bug#30596] [PATCH 0/6] Update Ceph and dependencies Marius Bakke
2018-02-24 19:03 ` [bug#30596] [PATCH 1/6] gnu: rocksdb: Update to 5.10.3 Marius Bakke
2018-02-24 19:03   ` [bug#30596] [PATCH 2/6] gnu: snappy: Update to 1.1.7 Marius Bakke
2018-03-03 21:32     ` Ludovic Courtès
2018-02-24 19:03   ` [bug#30596] [PATCH 3/6] gnu: java-snappy: " Marius Bakke
2018-03-03 21:32     ` Ludovic Courtès
2018-02-24 19:03   ` [bug#30596] [PATCH 4/6] gnu: Add boost@1.66.0 Marius Bakke
2018-03-03 21:33     ` Ludovic Courtès
2018-02-24 19:03   ` [bug#30596] [PATCH 5/6] gnu: Add cmake@3.11 Marius Bakke
2018-03-03 21:35     ` Ludovic Courtès
2018-03-04 16:58       ` Marius Bakke
2018-02-24 19:03   ` Marius Bakke [this message]
2018-03-03 21:37     ` [bug#30596] [PATCH 6/6] gnu: ceph: Update to 12.2.3 Ludovic Courtès
2018-03-04 16:59       ` bug#30596: " Marius Bakke
2018-03-03 21:31   ` [bug#30596] [PATCH 1/6] gnu: rocksdb: Update to 5.10.3 Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180224190349.8155-6-mbakke@fastmail.com \
    --to=mbakke@fastmail.com \
    --cc=30596@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.