diff options
3 files changed, 118 insertions, 5 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-CMake-has-stock-FindZLIB-in-upper-case.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-CMake-has-stock-FindZLIB-in-upper-case.patch new file mode 100644 index 0000000000..9682f8ad40 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-CMake-has-stock-FindZLIB-in-upper-case.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 38146a5d803a1fb9b10f011aa857872b6f20cd02 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tongliang Liao <xkszltl@gmail.com> | ||
3 | Date: Mon, 29 Apr 2019 03:51:51 -0700 | ||
4 | Subject: [PATCH] CMake has stock FindZLIB in upper case. More details in | ||
5 | https://cmake.org/cmake/help/v3.14/module/FindZLIB.html | ||
6 | |||
7 | |||
8 | Upstream-Status: Backport https://github.com/facebook/rocksdb/pull/5261 | ||
9 | |||
10 | --- | ||
11 | CMakeLists.txt | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
15 | index 40cdd26bb..355686566 100644 | ||
16 | --- a/CMakeLists.txt | ||
17 | +++ b/CMakeLists.txt | ||
18 | @@ -92,7 +92,7 @@ else() | ||
19 | endif() | ||
20 | |||
21 | if(WITH_ZLIB) | ||
22 | - find_package(zlib REQUIRED) | ||
23 | + find_package(ZLIB REQUIRED) | ||
24 | add_definitions(-DZLIB) | ||
25 | if(ZLIB_INCLUDE_DIRS) | ||
26 | # CMake 3 | ||
27 | -- | ||
28 | 2.11.0 | ||
29 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-fix-Issue-5303.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-fix-Issue-5303.patch new file mode 100644 index 0000000000..ba9834dfef --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-fix-Issue-5303.patch | |||
@@ -0,0 +1,80 @@ | |||
1 | From 512aaf3d833973f6146c6f1235b590901876175e Mon Sep 17 00:00:00 2001 | ||
2 | From: biocodz <biocodz@protonmail.com> | ||
3 | Date: Fri, 7 Jun 2019 09:49:37 -0400 | ||
4 | Subject: [PATCH] fix Issue 5303 | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/5426] | ||
7 | |||
8 | --- | ||
9 | db/internal_stats.h | 21 +++++++++++++++++++++ | ||
10 | db/version_edit.h | 8 ++++++++ | ||
11 | utilities/persistent_cache/persistent_cache_util.h | 2 +- | ||
12 | 3 files changed, 30 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/db/internal_stats.h b/db/internal_stats.h | ||
15 | index 6fa8727a4..09447644d 100644 | ||
16 | --- a/db/internal_stats.h | ||
17 | +++ b/db/internal_stats.h | ||
18 | @@ -236,6 +236,27 @@ class InternalStats { | ||
19 | } | ||
20 | } | ||
21 | |||
22 | + CompactionStats & operator=(const CompactionStats& c) { | ||
23 | + count = c.count; | ||
24 | + micros = c.micros; | ||
25 | + cpu_micros = c.cpu_micros; | ||
26 | + bytes_read_non_output_levels = c.bytes_read_non_output_levels; | ||
27 | + bytes_read_output_level = c.bytes_read_output_level; | ||
28 | + bytes_written = c.bytes_written; | ||
29 | + bytes_moved = c.bytes_moved; | ||
30 | + num_input_files_in_non_output_levels = | ||
31 | + c.num_input_files_in_non_output_levels; | ||
32 | + num_input_files_in_output_level = c.num_input_files_in_output_level; | ||
33 | + num_output_files = c.num_output_files; | ||
34 | + num_input_records = c.num_input_records; | ||
35 | + num_dropped_records = c.num_dropped_records; | ||
36 | + int num_of_reasons = static_cast<int>(CompactionReason::kNumOfReasons); | ||
37 | + for (int i = 0; i < num_of_reasons; i++) { | ||
38 | + counts[i] = c.counts[i]; | ||
39 | + } | ||
40 | + return *this; | ||
41 | + } | ||
42 | + | ||
43 | void Clear() { | ||
44 | this->micros = 0; | ||
45 | this->cpu_micros = 0; | ||
46 | diff --git a/db/version_edit.h b/db/version_edit.h | ||
47 | index 229531792..5c50ef552 100644 | ||
48 | --- a/db/version_edit.h | ||
49 | +++ b/db/version_edit.h | ||
50 | @@ -52,6 +52,14 @@ struct FileDescriptor { | ||
51 | smallest_seqno(_smallest_seqno), | ||
52 | largest_seqno(_largest_seqno) {} | ||
53 | |||
54 | + FileDescriptor(const FileDescriptor& fd) { | ||
55 | + table_reader = fd.table_reader; | ||
56 | + packed_number_and_path_id = fd.packed_number_and_path_id; | ||
57 | + file_size = fd.file_size; | ||
58 | + smallest_seqno = fd.smallest_seqno; | ||
59 | + largest_seqno = fd.largest_seqno; | ||
60 | + } | ||
61 | + | ||
62 | FileDescriptor& operator=(const FileDescriptor& fd) { | ||
63 | table_reader = fd.table_reader; | ||
64 | packed_number_and_path_id = fd.packed_number_and_path_id; | ||
65 | diff --git a/utilities/persistent_cache/persistent_cache_util.h b/utilities/persistent_cache/persistent_cache_util.h | ||
66 | index 214bb5875..254c038f9 100644 | ||
67 | --- a/utilities/persistent_cache/persistent_cache_util.h | ||
68 | +++ b/utilities/persistent_cache/persistent_cache_util.h | ||
69 | @@ -48,7 +48,7 @@ class BoundedQueue { | ||
70 | T t = std::move(q_.front()); | ||
71 | size_ -= t.Size(); | ||
72 | q_.pop_front(); | ||
73 | - return std::move(t); | ||
74 | + return t; | ||
75 | } | ||
76 | |||
77 | size_t Size() const { | ||
78 | -- | ||
79 | 2.11.0 | ||
80 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb index 8d846197a9..9fd5ee15be 100644 --- a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | |||
@@ -6,24 +6,28 @@ LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | |||
6 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 6 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
7 | file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837" | 7 | file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837" |
8 | 8 | ||
9 | SRCREV = "641fae60f63619ed5d0c9d9e4c4ea5a0ffa3e253" | 9 | SRCREV = "628a7fd74b5611657106c57f724f1682b114684c" |
10 | SRCBRANCH = "5.18.fb" | 10 | SRCBRANCH = "6.0.fb" |
11 | PV = "5.18.3" | 11 | PV = "6.0.2" |
12 | 12 | ||
13 | SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ | 13 | SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ |
14 | file://0001-CMake-has-stock-FindZLIB-in-upper-case.patch \ | ||
14 | file://0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch \ | 15 | file://0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch \ |
15 | file://0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch \ | 16 | file://0001-utilities-Fix-build-failure-with-Werror-maybe-uninit.patch \ |
17 | file://0001-fix-Issue-5303.patch \ | ||
16 | " | 18 | " |
17 | 19 | ||
18 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
19 | 21 | ||
20 | inherit cmake | 22 | inherit cmake |
21 | 23 | ||
22 | PACKAGECONFIG ??= "bzip2 zlib lz4" | 24 | PACKAGECONFIG ??= "bzip2 zlib lz4 gflags" |
23 | PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON -DBZIP2_LIBRARIES:STRING=bz2,-DWITH_BZ2=OFF,bzip2" | 25 | PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON -DBZIP2_LIBRARIES:STRING=bz2,-DWITH_BZ2=OFF,bzip2" |
24 | PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON -DLZ4_LIBRARIES:STRING=lz4,-DWITH_LZ4=OFF,lz4" | 26 | PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON -DLZ4_LIBRARIES:STRING=lz4,-DWITH_LZ4=OFF,lz4" |
25 | PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON -DZLIB_LIBRARIES:STRING=z,-DWITH_ZLIB=OFF,zlib" | 27 | PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON -DZLIB_LIBRARY:STRING=z,-DWITH_ZLIB=OFF,zlib" |
28 | PACKAGECONFIG[zstd] = "-DWITH_ZSTD=ON,-DWITH_ZSTD=OFF,zstd" | ||
26 | PACKAGECONFIG[lite] = "-DROCKSDB_LITE=ON,-DROCKSDB_LITE=OFF" | 29 | PACKAGECONFIG[lite] = "-DROCKSDB_LITE=ON,-DROCKSDB_LITE=OFF" |
30 | PACKAGECONFIG[gflags] = "-DWITH_GFLAGS=ON,-DWITH_GFLAGS=OFF,gflags" | ||
27 | 31 | ||
28 | # Tools and tests currently don't compile on armv5 so we disable them | 32 | # Tools and tests currently don't compile on armv5 so we disable them |
29 | EXTRA_OECMAKE = "\ | 33 | EXTRA_OECMAKE = "\ |