pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Add: rocksdb
Module Name: pkgsrc-wip
Committed By: Daniel Ziltener <dziltener%lyrion.ch@localhost>
Pushed By: zilti
Date: Tue Jan 16 13:17:45 2018 +0100
Changeset: 70b92dbda9e5fc7613ae4c55a9a6473574c4176d
Added Files:
rocksdb/DESCR
rocksdb/Makefile
rocksdb/PLIST
rocksdb/distinfo
rocksdb/options.mk
rocksdb/patches/patch-Makefile
rocksdb/patches/patch-env_env__test.cc
rocksdb/patches/patch-port_stack__trace.cc
rocksdb/patches/patch-util_arena.h
Log Message:
Add: rocksdb
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=70b92dbda9e5fc7613ae4c55a9a6473574c4176d
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
rocksdb/DESCR | 1 +
rocksdb/Makefile | 39 ++++++++++++
rocksdb/PLIST | 96 ++++++++++++++++++++++++++++++
rocksdb/distinfo | 10 ++++
rocksdb/options.mk | 73 +++++++++++++++++++++++
rocksdb/patches/patch-Makefile | 22 +++++++
rocksdb/patches/patch-env_env__test.cc | 22 +++++++
rocksdb/patches/patch-port_stack__trace.cc | 22 +++++++
rocksdb/patches/patch-util_arena.h | 35 +++++++++++
9 files changed, 320 insertions(+)
diffs:
diff --git a/rocksdb/DESCR b/rocksdb/DESCR
new file mode 100644
index 0000000000..41ded972a5
--- /dev/null
+++ b/rocksdb/DESCR
@@ -0,0 +1 @@
+RocksDB is an embeddable persistent key-value store for fast storage.
diff --git a/rocksdb/Makefile b/rocksdb/Makefile
new file mode 100644
index 0000000000..2aaaeeceac
--- /dev/null
+++ b/rocksdb/Makefile
@@ -0,0 +1,39 @@
+# $NetBSD$
+
+GITHUB_PROJECT= rocksdb
+DISTNAME= ${GITHUB_PROJECT}-5.9.2
+MASTER_SITES= ${MASTER_SITE_GITHUB:=facebook/}
+DIST_SUBDIR= ${GITHUB_PROJECT}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+CATEGORIES= database
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= http://www.rocksdb.org/
+COMMENT= RocksDB is an embeddable persistent key-value store for fast storage.
+LICENSE= apache-2.0
+
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake perl
+BUILD_TARGET= shared_lib static_lib tools tools_lib install-shared install-static install-headers
+#INSTALL_TARGET= install-shared install-static install-headers
+PKG_DESTDIR_SUPPORT= destdir
+
+MAKE_ENV+= PORTABLE=1 DEBUG_LEVEL=0
+MAKE_ENV+= INSTALL_PATH=${DESTDIR}${PREFIX}
+
+PB_FROM= ${WRKDIR}/rocksdb-${PKGVERSION_NOREV}/
+post-build:
+ mkdir -p ${DESTDIR}${PREFIX}/bin
+ cp ${PB_FROM}/sst_dump ${DESTDIR}${PREFIX}/bin/sst_dump
+ cp ${PB_FROM}/db_sanity_test ${DESTDIR}${PREFIX}/bin/db_sanity_test
+ cp ${PB_FROM}/db_stress ${DESTDIR}${PREFIX}/bin/db_stress
+ cp ${PB_FROM}/write_stress ${DESTDIR}${PREFIX}/bin/write_stress
+ cp ${PB_FROM}/ldb ${DESTDIR}${PREFIX}/bin/ldb
+ cp ${PB_FROM}/db_repl_stress ${DESTDIR}${PREFIX}/bin/db_repl_stress
+ cp ${PB_FROM}/rocksdb_dump ${DESTDIR}${PREFIX}/bin/rocksdb_dump
+ cp ${PB_FROM}/rocksdb_undump ${DESTDIR}${PREFIX}/bin/rocksdb_undump
+ cp ${PB_FROM}/blob_dump ${DESTDIR}${PREFIX}/bin/blob_dump
+ cp ${PB_FROM}/librocksdb_tools.a ${DESTDIR}${PREFIX}/lib/librocksdb_tools.a
+
+.include "options.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/rocksdb/PLIST b/rocksdb/PLIST
new file mode 100644
index 0000000000..6406adc7ac
--- /dev/null
+++ b/rocksdb/PLIST
@@ -0,0 +1,96 @@
+@comment $NetBSD$
+bin/blob_dump
+bin/db_repl_stress
+bin/db_sanity_test
+bin/db_stress
+bin/ldb
+bin/rocksdb_dump
+bin/rocksdb_undump
+bin/sst_dump
+bin/write_stress
+include/rocksdb/advanced_options.h
+include/rocksdb/c.h
+include/rocksdb/cache.h
+include/rocksdb/cleanable.h
+include/rocksdb/compaction_filter.h
+include/rocksdb/compaction_job_stats.h
+include/rocksdb/comparator.h
+include/rocksdb/convenience.h
+include/rocksdb/db.h
+include/rocksdb/db_bench_tool.h
+include/rocksdb/db_dump_tool.h
+include/rocksdb/env.h
+include/rocksdb/env_encryption.h
+include/rocksdb/experimental.h
+include/rocksdb/filter_policy.h
+include/rocksdb/flush_block_policy.h
+include/rocksdb/iostats_context.h
+include/rocksdb/iterator.h
+include/rocksdb/ldb_tool.h
+include/rocksdb/listener.h
+include/rocksdb/memtablerep.h
+include/rocksdb/merge_operator.h
+include/rocksdb/metadata.h
+include/rocksdb/options.h
+include/rocksdb/perf_context.h
+include/rocksdb/perf_level.h
+include/rocksdb/persistent_cache.h
+include/rocksdb/rate_limiter.h
+include/rocksdb/slice.h
+include/rocksdb/slice_transform.h
+include/rocksdb/snapshot.h
+include/rocksdb/sst_dump_tool.h
+include/rocksdb/sst_file_manager.h
+include/rocksdb/sst_file_writer.h
+include/rocksdb/statistics.h
+include/rocksdb/status.h
+include/rocksdb/table.h
+include/rocksdb/table_properties.h
+include/rocksdb/thread_status.h
+include/rocksdb/threadpool.h
+include/rocksdb/transaction_log.h
+include/rocksdb/types.h
+include/rocksdb/universal_compaction.h
+include/rocksdb/utilities/backupable_db.h
+include/rocksdb/utilities/checkpoint.h
+include/rocksdb/utilities/convenience.h
+include/rocksdb/utilities/date_tiered_db.h
+include/rocksdb/utilities/db_ttl.h
+include/rocksdb/utilities/debug.h
+include/rocksdb/utilities/document_db.h
+include/rocksdb/utilities/env_librados.h
+include/rocksdb/utilities/env_mirror.h
+include/rocksdb/utilities/geo_db.h
+include/rocksdb/utilities/info_log_finder.h
+include/rocksdb/utilities/json_document.h
+include/rocksdb/utilities/ldb_cmd.h
+include/rocksdb/utilities/ldb_cmd_execute_result.h
+include/rocksdb/utilities/leveldb_options.h
+include/rocksdb/utilities/lua/rocks_lua_compaction_filter.h
+include/rocksdb/utilities/lua/rocks_lua_custom_library.h
+include/rocksdb/utilities/lua/rocks_lua_util.h
+include/rocksdb/utilities/memory_util.h
+include/rocksdb/utilities/object_registry.h
+include/rocksdb/utilities/optimistic_transaction_db.h
+include/rocksdb/utilities/option_change_migration.h
+include/rocksdb/utilities/options_util.h
+include/rocksdb/utilities/sim_cache.h
+include/rocksdb/utilities/spatial_db.h
+include/rocksdb/utilities/stackable_db.h
+include/rocksdb/utilities/table_properties_collectors.h
+include/rocksdb/utilities/transaction.h
+include/rocksdb/utilities/transaction_db.h
+include/rocksdb/utilities/transaction_db_mutex.h
+include/rocksdb/utilities/utility_db.h
+include/rocksdb/utilities/write_batch_with_index.h
+include/rocksdb/version.h
+include/rocksdb/wal_filter.h
+include/rocksdb/write_batch.h
+include/rocksdb/write_batch_base.h
+include/rocksdb/write_buffer_manager.h
+lib/librocksdb.a
+lib/librocksdb.so
+lib/librocksdb.so.5
+lib/librocksdb.so.5.9
+lib/librocksdb.so.${PKGVERSION}
+lib/librocksdb_tools.a
diff --git a/rocksdb/distinfo b/rocksdb/distinfo
new file mode 100644
index 0000000000..010ef3497d
--- /dev/null
+++ b/rocksdb/distinfo
@@ -0,0 +1,10 @@
+$NetBSD$
+
+SHA1 (rocksdb/rocksdb-5.9.2.tar.gz) = 4712488b661bf6836e1d4a2d2004fdb992ef3f44
+RMD160 (rocksdb/rocksdb-5.9.2.tar.gz) = ad9e2c70f68641cab967cfd68a05c682d4d9a4b4
+SHA512 (rocksdb/rocksdb-5.9.2.tar.gz) = 8382360fa4cdfb71b5090d58cef3aa0476818f4f8a373e5a20b9eee5baec222946d198af67683933d15152ad749a6b641ef86447a6bba40fdbd1b509fdcf510c
+Size (rocksdb/rocksdb-5.9.2.tar.gz) = 3935555 bytes
+SHA1 (patch-Makefile) = 526337399c574a1711928e44801e25f2bc3395eb
+SHA1 (patch-env_env__test.cc) = 7f7f15ed2f65538f1c0f5d328adbb39c72bf22f0
+SHA1 (patch-port_stack__trace.cc) = 3e10d977628488c50fdbde304a5a97da13fd459c
+SHA1 (patch-util_arena.h) = 2623f8c1dd0bbe04871803fdd683bea4d87e0184
diff --git a/rocksdb/options.mk b/rocksdb/options.mk
new file mode 100644
index 0000000000..d855182685
--- /dev/null
+++ b/rocksdb/options.mk
@@ -0,0 +1,73 @@
+PKG_OPTIONS_VAR= PKG_OPTIONS.rocksdb
+PKG_SUPPORTED_OPTIONS= jemalloc gflags snappy jni zlib bz2 lz4 zstd rados tests sse42
+PKG_OPTIONS_OPTIONAL_GROUPS= sanitize
+PKG_OPTIONS_GROUP.sanitize= asan tsan ubsan
+PKG_SUGGESTED_OPTIONS= jemalloc gflags tests
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mjemalloc)
+MAKE_ENV+= JEMALLOC=1 WITH_JEMALLOC_FLAG=1
+.include "../../devel/jemalloc/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mgflags)
+MAKE_ENV+= GFLAGS=1
+.include "../../devel/gflags/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Msnappy)
+MAKE_ENV+= SNAPPY=1
+.include "../../devel/snappy/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mjni)
+MAKE_ENV+= JNI=1
+PKG_JVM_DEFAULT=openjdk8
+.include "../../mk/java-vm.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mzlib)
+MAKE_ENV+= ZLIB=1
+.include "../../devel/zlib/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mbz2)
+MAKE_ENV+= BZ2=1
+.endif
+
+.if !empty(PKG_OPTIONS:Mlz4)
+MAKE_ENV+= LZ4=1
+.include "../../archivers/lz4/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mzstd)
+MAKE_ENV+= ZSTD=1
+.include "../../archivers/zstd/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mrados)
+MAKE_ENV+= LIBRADOS=1
+.endif
+
+.if empty(PKG_OPTIONS:Mtests)
+MAKE_ENV+= TESTS=0
+.endif
+
+.if !empty(PKG_OPTIONS:Msse42)
+MAKE_ENV+= FORCE_SSE42=1
+.endif
+
+.if !empty(PKG_OPTIONS:Masan)
+MAKE_ENV+= ASAN=1
+.endif
+
+.if !empty(PKG_OPTIONS:Mtsan)
+MAKE_ENV+= TSAN=1
+.endif
+
+.if !empty(PKG_OPTIONS:Mubsan)
+MAKE_ENV+= UBSAN=1
+.endif
+
diff --git a/rocksdb/patches/patch-Makefile b/rocksdb/patches/patch-Makefile
new file mode 100644
index 0000000000..d162e8065f
--- /dev/null
+++ b/rocksdb/patches/patch-Makefile
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- Makefile.orig 2018-01-03 02:55:49.000000000 +0000
++++ Makefile
+@@ -1495,14 +1495,14 @@ install-headers:
+ install -d $(INSTALL_PATH)/$$header_dir; \
+ done
+ for header in `find "include/rocksdb" -type f -name *.h`; do \
+- install -C -m 644 $$header $(INSTALL_PATH)/$$header; \
++ install -m 644 $$header $(INSTALL_PATH)/$$header; \
+ done
+
+ install-static: install-headers $(LIBRARY)
+- install -C -m 755 $(LIBRARY) $(INSTALL_PATH)/lib
++ install -m 755 $(LIBRARY) $(INSTALL_PATH)/lib
+
+ install-shared: install-headers $(SHARED4)
+- install -C -m 755 $(SHARED4) $(INSTALL_PATH)/lib && \
++ install -m 755 $(SHARED4) $(INSTALL_PATH)/lib && \
+ ln -fs $(SHARED4) $(INSTALL_PATH)/lib/$(SHARED3) && \
+ ln -fs $(SHARED4) $(INSTALL_PATH)/lib/$(SHARED2) && \
+ ln -fs $(SHARED4) $(INSTALL_PATH)/lib/$(SHARED1)
diff --git a/rocksdb/patches/patch-env_env__test.cc b/rocksdb/patches/patch-env_env__test.cc
new file mode 100644
index 0000000000..f0cd6a8506
--- /dev/null
+++ b/rocksdb/patches/patch-env_env__test.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- env/env_test.cc.orig 2018-01-03 02:56:50.000000000 +0000
++++ env/env_test.cc
+@@ -1137,7 +1137,7 @@ TEST_P(EnvPosixTestWithParam, Preallocat
+ unique_ptr<WritableFile> srcfile;
+ EnvOptions soptions;
+ soptions.use_direct_reads = soptions.use_direct_writes = direct_io_;
+-#if !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(OS_SOLARIS) && !defined(OS_AIX) && !defined(OS_OPENBSD)
++#if !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(OS_SOLARIS) && !defined(OS_AIX) && !defined(OS_OPENBSD) && !defined(OS_NETBSD)
+ if (soptions.use_direct_writes) {
+ rocksdb::SyncPoint::GetInstance()->SetCallBack(
+ "NewWritableFile:O_DIRECT", [&](void* arg) {
+@@ -1199,7 +1199,7 @@ TEST_P(EnvPosixTestWithParam, Consistent
+ oss << test::TmpDir(env_) << "/testfile_" << i;
+ const std::string path = oss.str();
+ unique_ptr<WritableFile> file;
+-#if !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(OS_SOLARIS) && !defined(OS_AIX) && !defined(OS_OPENBSD)
++#if !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(OS_SOLARIS) && !defined(OS_AIX) && !defined(OS_OPENBSD) && !defined(OS_NETBSD)
+ if (soptions.use_direct_writes) {
+ rocksdb::SyncPoint::GetInstance()->SetCallBack(
+ "NewWritableFile:O_DIRECT", [&](void* arg) {
diff --git a/rocksdb/patches/patch-port_stack__trace.cc b/rocksdb/patches/patch-port_stack__trace.cc
new file mode 100644
index 0000000000..bd81fc018f
--- /dev/null
+++ b/rocksdb/patches/patch-port_stack__trace.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- port/stack_trace.cc.orig 2018-01-03 02:58:03.000000000 +0000
++++ port/stack_trace.cc
+@@ -72,7 +72,7 @@ void PrintStackTraceLine(const char* sym
+
+ fprintf(stderr, "\n");
+ }
+-#elif defined(OS_MACOSX)
++#elif defined(OS_MACOSX) || defined(OS_NETBSD)
+
+ void PrintStackTraceLine(const char* symbol, void* frame) {
+ static int pid = getpid();
+@@ -106,7 +106,7 @@ void PrintStack(int first_frames_to_skip
+ auto num_frames = backtrace(frames, kMaxFrames);
+ auto symbols = backtrace_symbols(frames, num_frames);
+
+- for (int i = first_frames_to_skip; i < num_frames; ++i) {
++ for (unsigned int i = first_frames_to_skip; i < num_frames; ++i) {
+ fprintf(stderr, "#%-2d ", i - first_frames_to_skip);
+ PrintStackTraceLine((symbols != nullptr) ? symbols[i] : nullptr, frames[i]);
+ }
diff --git a/rocksdb/patches/patch-util_arena.h b/rocksdb/patches/patch-util_arena.h
new file mode 100644
index 0000000000..9d9bbdfb21
--- /dev/null
+++ b/rocksdb/patches/patch-util_arena.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+--- util/arena.h.orig 2018-01-03 03:02:00.000000000 +0000
++++ util/arena.h
+@@ -23,6 +23,30 @@
+ #include "util/allocator.h"
+ #include "util/mutexlock.h"
+
++/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is
++ * a hack in case the configure-time test was done with g++ even though
++ * we are currently compiling with gcc. */
++#if ! (0 || defined _GCC_MAX_ALIGN_T)
++/* On the x86, the maximum storage alignment of double, long, etc. is 4,
++ * but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
++ * and the C11 standard allows this. Work around this problem by
++ * using __alignof__ (which returns 8 for double) rather than _Alignof
++ * (which returns 4), and align each union member accordingly. */
++# ifdef __GNUC__
++# define _GL_STDDEF_ALIGNAS(type) \
++ __attribute__ ((__aligned__ (__alignof__ (type))))
++# else
++# define _GL_STDDEF_ALIGNAS(type) /* */
++# endif
++typedef union
++{
++ char *__p _GL_STDDEF_ALIGNAS (char *);
++ double __d _GL_STDDEF_ALIGNAS (double);
++ long double __ld _GL_STDDEF_ALIGNAS (long double);
++ long int __i _GL_STDDEF_ALIGNAS (long int);
++} max_align_t;
++#endif
++
+ namespace rocksdb {
+
+ class Arena : public Allocator {
Home |
Main Index |
Thread Index |
Old Index