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.
This commit is contained in:
Marius Bakke 2018-09-27 18:41:50 +02:00
parent e2568df74e
commit 1badc85068
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA
6 changed files with 82 additions and 93 deletions

View file

@ -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 \

View file

@ -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}")

View file

@ -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);

View file

@ -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

View file

@ -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)

View file

@ -26,6 +26,7 @@ (define-module (gnu packages storage)
#: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 @@ (define-module (gnu packages storage)
#: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-module (gnu packages storage)
(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 @@ (define-public ceph
;"src/zstd"
;"src/civetweb"
"src/test/downloads"
"src/dpdk"
"src/rapidjson"
"src/spdk"
"src/rocksdb"
"src/boost"))
@ -100,13 +103,14 @@ (define-public ceph
(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 @@ (define-public ceph
;; /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 @@ (define-public ceph
(("^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 @@ (define-public ceph
(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 @@ (define-public ceph
("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)