forked from pool/lmdb
Compare commits
41 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 1287678211 | |||
|
|
56d7f69321 | ||
| e745840b46 | |||
|
|
5b47b60be5 | ||
| 6c926dfc2f | |||
|
|
93a32646c0 | ||
| 10ac46e8a8 | |||
|
|
cdff433e33 | ||
| db0d0e4426 | |||
|
|
0661298361 | ||
| 8252ffc4db | |||
|
|
b4c27e95f8 | ||
|
|
f7d5ebbcca | ||
| e614b802ba | |||
|
|
f9a5b7cdfb | ||
| 1e3526f79f | |||
|
|
3e15d2383b | ||
| 26e129a594 | |||
|
|
fbee085833 | ||
|
|
178deb39ef | ||
| 5ff4f5c9dd | |||
|
|
e7e1e9035a | ||
| ae8eefad1c | |||
|
|
24b99dabaa | ||
| ab7331506c | |||
|
|
f85c7e053c | ||
|
|
50e9bbacb5 | ||
|
|
b86b130388 | ||
| e285243df5 | |||
|
|
78ba7b81e3 | ||
|
|
8f83cc98fc | ||
|
|
019cb65ff9 | ||
| 546608cc3c | |||
|
|
5d7692be2a | ||
|
|
621825b625 | ||
|
|
3732d3787c | ||
|
|
1b4bba1122 | ||
|
|
fb89d7b078 | ||
|
|
c38e1a6366 | ||
|
|
4dbd3fba8d | ||
|
|
509216eece |
354
0001-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
Normal file
354
0001-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
Normal file
@@ -0,0 +1,354 @@
|
||||
From 1701892d066c626bbd82c9340d6b442f733c33a1 Mon Sep 17 00:00:00 2001
|
||||
From: Kristian Amlie <kristian.amlie@cfengine.com>
|
||||
Date: Mon, 28 Jul 2014 11:28:38 +0200
|
||||
Subject: [PATCH 1/4] Add extra tools and CFEngine modifications for LMDB.
|
||||
|
||||
---
|
||||
libraries/liblmdb/lmdump.c | 128 +++++++++++++++++++++++++++
|
||||
libraries/liblmdb/lmmgr.c | 201 +++++++++++++++++++++++++++++++++++++++++++
|
||||
libraries/liblmdb/mdb_copy.c | 2 +-
|
||||
3 files changed, 330 insertions(+), 1 deletion(-)
|
||||
create mode 100644 libraries/liblmdb/lmdump.c
|
||||
create mode 100644 libraries/liblmdb/lmmgr.c
|
||||
|
||||
diff --git a/libraries/liblmdb/lmdump.c b/libraries/liblmdb/lmdump.c
|
||||
new file mode 100644
|
||||
index 000000000000..0e3ee4bb61c2
|
||||
--- /dev/null
|
||||
+++ b/libraries/liblmdb/lmdump.c
|
||||
@@ -0,0 +1,128 @@
|
||||
+/* lmdump.c - Lmdb database dumper
|
||||
+ Has three modes :
|
||||
+ -a : print keys in ascii form
|
||||
+ -A : print keys and values in ascii form
|
||||
+ -x : print keys and values in hexadecimal form
|
||||
+ -d : print only the size of keys and values
|
||||
+ */
|
||||
+
|
||||
+#define _XOPEN_SOURCE 500 /* srandom(), random() */
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <time.h>
|
||||
+#include <string.h>
|
||||
+#include "lmdb.h"
|
||||
+
|
||||
+static void print_hex(char *s, int len)
|
||||
+{
|
||||
+ int i = 0;
|
||||
+ for (i=0; i<len; i++)
|
||||
+ {
|
||||
+ printf("%02x", s[i]);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void print_usage(void)
|
||||
+{
|
||||
+ printf("Lmdb database dumper\n");
|
||||
+ printf("Usage: dump -d|-x|-a|-A filename\n\n");
|
||||
+ printf("Has three modes :\n");
|
||||
+ printf(" -a : print keys in ascii form\n");
|
||||
+ printf(" -A : print keys and values in ascii form\n");
|
||||
+ printf(" -x : print keys and values in hexadecimal form\n");
|
||||
+ printf(" -d : print only the size of keys and values\n");
|
||||
+}
|
||||
+
|
||||
+static int report_error(int rc)
|
||||
+{
|
||||
+ printf("err(%d): %s\n", rc, mdb_strerror(rc));
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+int main(int argc, char * argv[])
|
||||
+{
|
||||
+ int rc;
|
||||
+ MDB_env *env;
|
||||
+ MDB_dbi dbi;
|
||||
+ MDB_val key, data;
|
||||
+ MDB_txn *txn;
|
||||
+ MDB_cursor *cursor;
|
||||
+
|
||||
+ if (argc<3)
|
||||
+ {
|
||||
+ print_usage();
|
||||
+ return 1;
|
||||
+ }
|
||||
+ int mode = -1;
|
||||
+ if (strcmp(argv[1],"-a") == 0)
|
||||
+ {
|
||||
+ mode = 'a';
|
||||
+ }
|
||||
+ else if (strcmp(argv[1],"-A") == 0)
|
||||
+ {
|
||||
+ mode = 'A';
|
||||
+ }
|
||||
+ else if(strcmp(argv[1],"-x") == 0)
|
||||
+ {
|
||||
+ mode = 'x';
|
||||
+ }
|
||||
+ else if(strcmp(argv[1],"-d") == 0)
|
||||
+ {
|
||||
+ mode = 'd';
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ print_usage();
|
||||
+ return 1;
|
||||
+ }
|
||||
+ rc = mdb_env_create(&env);
|
||||
+ if(rc) return report_error(rc);
|
||||
+
|
||||
+ rc = mdb_env_open(env, argv[2], MDB_NOSUBDIR | MDB_NOLOCK, 0644);
|
||||
+ if(rc) return report_error(rc);
|
||||
+
|
||||
+ rc = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
|
||||
+ if(rc) return report_error(rc);
|
||||
+
|
||||
+ rc = mdb_open(txn, NULL, 0, &dbi);
|
||||
+ if(rc) return report_error(rc);
|
||||
+
|
||||
+ rc = mdb_cursor_open(txn, dbi, &cursor);
|
||||
+ if(rc) return report_error(rc);
|
||||
+
|
||||
+ while( (rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) ==0)
|
||||
+ {
|
||||
+ if (mode == 'A')
|
||||
+ {
|
||||
+ printf("key: %p[%d] %.*s\n",
|
||||
+ key.mv_data, (int) key.mv_size, (int) key.mv_size, (char *) key.mv_data);
|
||||
+ }
|
||||
+ else if (mode == 'a')
|
||||
+ {
|
||||
+ printf("key: %p[%d] %.*s, data: %p[%d] %.*s\n",
|
||||
+ key.mv_data, (int) key.mv_size, (int) key.mv_size, (char *) key.mv_data,
|
||||
+ data.mv_data, (int) data.mv_size, (int) data.mv_size, (char *) data.mv_data);
|
||||
+ }
|
||||
+ else if (mode == 'd')
|
||||
+ {
|
||||
+ printf("key: %p[%d] ,data: %p[%d]\n",
|
||||
+ key.mv_data, (int) key.mv_size,
|
||||
+ data.mv_data, (int) data.mv_size);
|
||||
+ }
|
||||
+ else if (mode == 'x')
|
||||
+ {
|
||||
+ printf("key: %p[%d] ", key.mv_data, (int) key.mv_size);
|
||||
+ print_hex(key.mv_data, (int) key.mv_size);
|
||||
+ printf(" ,data: %p[%d] ", data.mv_data, (int) data.mv_size);
|
||||
+ print_hex(data.mv_data, (int) data.mv_size);
|
||||
+ printf("\n");
|
||||
+ }
|
||||
+ }
|
||||
+ mdb_cursor_close(cursor);
|
||||
+ mdb_close(env, dbi);
|
||||
+
|
||||
+ mdb_txn_abort(txn);
|
||||
+ mdb_env_close(env);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/libraries/liblmdb/lmmgr.c b/libraries/liblmdb/lmmgr.c
|
||||
new file mode 100644
|
||||
index 000000000000..1137d8dc388a
|
||||
--- /dev/null
|
||||
+++ b/libraries/liblmdb/lmmgr.c
|
||||
@@ -0,0 +1,201 @@
|
||||
+/*
|
||||
+lmmgr.c : Add, remove or manage the maxreaders value of a given database file
|
||||
+*/
|
||||
+#include <stdio.h>
|
||||
+#include <string.h>
|
||||
+#include "lmdb.h"
|
||||
+
|
||||
+static int report_error(int rc)
|
||||
+{
|
||||
+ printf("err(%d): %s\n", rc, mdb_strerror(rc));
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+int openconn(const char *dbfile, MDB_env **env, long int maxreaders)
|
||||
+{
|
||||
+/*init*/
|
||||
+ int rc;
|
||||
+ rc = mdb_env_create(env);
|
||||
+ if(rc) return report_error(rc);
|
||||
+
|
||||
+ rc = mdb_env_open(*env, dbfile, MDB_NOSUBDIR, 0644);
|
||||
+ if(rc) return report_error(rc);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int gettxn(MDB_env *env, MDB_txn **txn, MDB_dbi *dbi)
|
||||
+{
|
||||
+ int rc;
|
||||
+/*setup txn*/
|
||||
+ rc = mdb_txn_begin(env, NULL, 0, txn);
|
||||
+ if(rc) return report_error(rc);
|
||||
+ rc = mdb_open(*txn, NULL, 0, dbi);
|
||||
+ if(rc) return report_error(rc);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int committxn(MDB_txn *txn)
|
||||
+{
|
||||
+/*commit*/
|
||||
+ int rc;
|
||||
+ rc = mdb_txn_commit(txn);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int aborttxn(MDB_txn *txn)
|
||||
+{
|
||||
+/*abort*/
|
||||
+ int rc;
|
||||
+ mdb_txn_abort(txn);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int closeall(MDB_env *env, MDB_txn *txn, MDB_dbi dbi)
|
||||
+{
|
||||
+/*end*/
|
||||
+ mdb_close(env, dbi);
|
||||
+ mdb_env_close(env);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int do_put(char *dbfile, char *mykey, char *myval)
|
||||
+{
|
||||
+ MDB_env *env;
|
||||
+ openconn(dbfile, &env, 0);
|
||||
+
|
||||
+ MDB_txn *txn;
|
||||
+ MDB_dbi dbi;
|
||||
+ gettxn(env, &txn, &dbi);
|
||||
+
|
||||
+ int rc;
|
||||
+ MDB_val key, data;
|
||||
+ key.mv_data = mykey;
|
||||
+ data.mv_data = myval;
|
||||
+ key.mv_size = strlen(mykey) + 1;
|
||||
+ data.mv_size = strlen(myval) + 1;
|
||||
+
|
||||
+ rc = mdb_put(txn, dbi, &key, &data, MDB_NOOVERWRITE);
|
||||
+ if (rc == MDB_SUCCESS)
|
||||
+ {
|
||||
+ rc = mdb_txn_commit(txn);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ mdb_txn_abort(txn);
|
||||
+ }
|
||||
+
|
||||
+ mdb_env_close(env);
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+int do_del(char *dbfile, char *mykey)
|
||||
+{
|
||||
+ MDB_env *env;
|
||||
+ openconn(dbfile, &env, 0);
|
||||
+
|
||||
+ MDB_txn *txn;
|
||||
+ MDB_dbi dbi;
|
||||
+ gettxn(env, &txn, &dbi);
|
||||
+
|
||||
+ int rc;
|
||||
+ MDB_val key;
|
||||
+ key.mv_data = mykey;
|
||||
+ key.mv_size = strlen(mykey) + 1;
|
||||
+
|
||||
+ rc = mdb_del(txn, dbi, &key, NULL);
|
||||
+ if (rc == MDB_SUCCESS)
|
||||
+ {
|
||||
+ rc = mdb_txn_commit(txn);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ mdb_txn_abort(txn);
|
||||
+ }
|
||||
+
|
||||
+ mdb_env_close(env);
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+int do_init(char *dbfile, unsigned long maxr)
|
||||
+{
|
||||
+ MDB_env *env;
|
||||
+ openconn(dbfile, &env, maxr);
|
||||
+ mdb_env_close(env);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int do_stat(char *dbfile)
|
||||
+{
|
||||
+ int rc;
|
||||
+ MDB_env *env;
|
||||
+ openconn(dbfile, &env, 0);
|
||||
+
|
||||
+ MDB_stat stat;
|
||||
+ MDB_envinfo info;
|
||||
+
|
||||
+ rc = mdb_env_stat(env, &stat);
|
||||
+ rc = mdb_env_info(env, &info);
|
||||
+ printf("me_maxreaders=%ld\n", info.me_maxreaders);
|
||||
+ mdb_env_close(env);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int main(int argc, char *argv[])
|
||||
+{
|
||||
+ if (argc < 3)
|
||||
+ {
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ if (!strcmp(argv[1], "put"))
|
||||
+ {
|
||||
+ if (argc == 5)
|
||||
+ {
|
||||
+ int rc = do_put(argv[2], argv[3], argv[4]);
|
||||
+ return rc;
|
||||
+ }
|
||||
+ }
|
||||
+ else if (!strcmp(argv[1], "del"))
|
||||
+ {
|
||||
+ if (argc == 4)
|
||||
+ {
|
||||
+ int rc = do_del(argv[2], argv[3]);
|
||||
+ return rc;
|
||||
+ }
|
||||
+ }
|
||||
+ else if (!strcmp(argv[1], "init"))
|
||||
+ {
|
||||
+ if (argc == 3)
|
||||
+ {
|
||||
+ int rc = do_init(argv[2], 0L);
|
||||
+ return rc;
|
||||
+ }
|
||||
+ else if (argc == 5 && !strcmp(argv[3], "-m"))
|
||||
+ {
|
||||
+ int rc = do_init(argv[2], atol(argv[4]));
|
||||
+ do_stat(argv[2]);
|
||||
+ return rc;
|
||||
+ }
|
||||
+ }
|
||||
+ else if (!strcmp(argv[1], "maxr"))
|
||||
+ {
|
||||
+ if (argc == 3)
|
||||
+ {
|
||||
+ int rc = do_stat(argv[2]);
|
||||
+ return rc;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+fail:
|
||||
+ printf("Usage :\n");
|
||||
+ printf("Add a key and value to a DB file :\n");
|
||||
+ printf("\tlmmgr put dbfile key value\n");
|
||||
+ printf("Remove a key from a DB file :\n");
|
||||
+ printf("\tlmmgr del dbfile key\n");
|
||||
+ printf("Set a new maxreaders value of a DB file :\n");
|
||||
+ printf("\tlmmgr init dbfile [-m maxreaders]\n");
|
||||
+ printf("Give maxreaders value of a DB file :\n");
|
||||
+ printf("\tlmmgr maxr dbfile\n");
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
289
CMakeLists.txt
289
CMakeLists.txt
@@ -1,289 +0,0 @@
|
||||
#
|
||||
# CMakeLists.txt for lmdb
|
||||
#
|
||||
|
||||
PROJECT(lmdb)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4)
|
||||
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
#
|
||||
# cmake2.6: backward compatibility to cmake 2.4
|
||||
#
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 OLD)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0005 OLD)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
INCLUDE (CheckIncludeFiles)
|
||||
INCLUDE (CheckFunctionExists)
|
||||
|
||||
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
|
||||
|
||||
INCLUDE( ${CMAKE_SOURCE_DIR}/VERSION.cmake )
|
||||
SET(VERSION "${LMDB_MAJOR}.${LMDB_MINOR}.${LMDB_PATCH}")
|
||||
MESSAGE(STATUS "Version ${VERSION}")
|
||||
SET(PACKAGE_VERSION \"${LMDB_MAJOR}.${LMDB_MINOR}\")
|
||||
MESSAGE(STATUS "Package Version ${PACKAGE_VERSION}")
|
||||
# build timestamp
|
||||
EXECUTE_PROCESS(COMMAND "/bin/date" "+%Y%m%d%H%M" OUTPUT_VARIABLE BUILD_DATE)
|
||||
STRING(REPLACE "\n" "" PACKAGE_BUILDTS "${BUILD_DATE}")
|
||||
MESSAGE(STATUS "Package build timestamp ${PACKAGE_BUILDTS}")
|
||||
|
||||
# Package architecture
|
||||
IF ( NOT DEFINED PACKAGE_ARCHITECTURE )
|
||||
EXECUTE_PROCESS(COMMAND "/bin/uname" "-m" OUTPUT_VARIABLE UNAME_M)
|
||||
# strip trailing newline
|
||||
STRING(REPLACE "\n" "" PACKAGE_ARCHITECTURE ${UNAME_M})
|
||||
ENDIF ( NOT DEFINED PACKAGE_ARCHITECTURE )
|
||||
MESSAGE(STATUS "Building for ${PACKAGE_ARCHITECTURE}" )
|
||||
|
||||
|
||||
# Library path (lib / lib64 )
|
||||
|
||||
IF ( DEFINED LIB )
|
||||
SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB}" )
|
||||
ELSE ( DEFINED LIB )
|
||||
IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
SET( LIB_SUFFIX "64" )
|
||||
ENDIF(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
|
||||
ENDIF ( DEFINED LIB )
|
||||
MESSAGE(STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}" )
|
||||
SET( BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" )
|
||||
SET( INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" )
|
||||
IF( "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr")
|
||||
SET( SYSCONFDIR "/etc" )
|
||||
ELSE( "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr")
|
||||
SET( SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc" )
|
||||
ENDIF( "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr")
|
||||
|
||||
|
||||
#/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
CHECK_INCLUDE_FILES( "sys/time.h" TIME_WITH_SYS_TIME )
|
||||
IF(NOT TIME_WITH_SYS_TIME)
|
||||
SET(TIME_WITH_SYS_TIME 0)
|
||||
ENDIF(NOT TIME_WITH_SYS_TIME)
|
||||
|
||||
#/* Define ssize_t to int' if <sys/types.h> does not define. */
|
||||
SET(SSIZE_T_MISSING 0)
|
||||
|
||||
CHECK_FUNCTION_EXISTS( "alloca" HAVE_ALLOCA )
|
||||
IF (NOT HAVE_ALLOCA)
|
||||
SET(HAVE_ALLOCA 0)
|
||||
SET(C_ALLOCA 0)
|
||||
CHECK_INCLUDE_FILES( "alloca.h" HAVE_ALLOCA_H )
|
||||
ENDIF (NOT HAVE_ALLOCA)
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
|
||||
SET (FUNCS_TO_TEST "bcopy" "crypt" "daemon" "fnmatch" "getaddrinfo" "getnameinfo" "getpid" "gettimeofday" "gmtime_r" "inet_aton" "inet_ntop" "inet_pton" "sleep" "srandom" "strsep" "strtok_r" "syslog" "timegm" "memmove" "unlink" "va_copy" )
|
||||
FOREACH( FUNC ${FUNCS_TO_TEST})
|
||||
STRING(TOUPPER ${FUNC} UPNAME)
|
||||
SET(HAVENAME "HAVE_${UPNAME}")
|
||||
CHECK_FUNCTION_EXISTS( "${FUNC}" HAVE_FUNC )
|
||||
IF(HAVE_FUNC)
|
||||
SET(${HAVENAME} 1)
|
||||
ELSE(HAVE_FUNC)
|
||||
SET(${HAVENAME} 0)
|
||||
ENDIF(HAVE_FUNC)
|
||||
ENDFOREACH( FUNC ${FUNCS_TO_TEST})
|
||||
|
||||
|
||||
# types
|
||||
|
||||
INCLUDE(CheckTypeSize)
|
||||
|
||||
#
|
||||
#/* Define to 1 if you have the ANSI C header files. */
|
||||
# STDC_HEADERS
|
||||
SET(STDC_HEADERS 1)
|
||||
|
||||
####################################################################
|
||||
# CONFIGURATION #
|
||||
####################################################################
|
||||
|
||||
ADD_DEFINITIONS( -DHAVE_CONFIG_H )
|
||||
|
||||
SET(PACKAGE "lmdb")
|
||||
SET(PACKAGE_BUGREPORT "\"http://symas.com/mdb\"")
|
||||
SET(PACKAGE_NAME "\"${PACKAGE}\"")
|
||||
SET(PACKAGE_STRING "\"LMDB is a tiny database with some great capabilities\"")
|
||||
SET(PACKAGE_TARNAME "\"${PACKAGE}-${VERSION}.tar.bz2\"")
|
||||
|
||||
SET("prefix" ${CMAKE_INSTALL_PREFIX})
|
||||
SET("includedir" ${CMAKE_INSTALL_PREFIX}/include)
|
||||
SET("libdir" ${LIB_INSTALL_DIR})
|
||||
|
||||
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wunused -Werror" )
|
||||
SET( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3" )
|
||||
|
||||
####################################################################
|
||||
# PACKAGING #
|
||||
####################################################################
|
||||
SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 1)
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LMDB is a tiny database with some great capabilities")
|
||||
SET(CPACK_PACKAGE_VENDOR "http://symas.com")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR ${LMDB_MAJOR})
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR ${LMDB_MINOR})
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH ${LMDB_PATCH})
|
||||
SET(CPACK_GENERATOR "TBZ2")
|
||||
SET(CPACK_SOURCE_GENERATOR "TBZ2")
|
||||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PACKAGE}-${VERSION}" )
|
||||
MESSAGE(STATUS "Package file ${CPACK_SOURCE_PACKAGE_FILE_NAME}")
|
||||
|
||||
# The following components are regex's to match anywhere (unless anchored)
|
||||
# in absolute path + filename to find files or directories to be excluded
|
||||
# from source tarball.
|
||||
SET (CPACK_SOURCE_IGNORE_FILES
|
||||
#git files
|
||||
"/.git"
|
||||
"\\\\.gitignore$"
|
||||
#svn files
|
||||
"\\\\.svn/"
|
||||
"\\\\.cvsignore$"
|
||||
# temporary files
|
||||
"\\\\.swp$"
|
||||
# backup files
|
||||
"~$"
|
||||
# eclipse files
|
||||
"\\\\.cdtproject$"
|
||||
"\\\\.cproject$"
|
||||
"\\\\.project$"
|
||||
"\\\\.settings/"
|
||||
# others
|
||||
"\\\\.#"
|
||||
"/#"
|
||||
"/build/"
|
||||
"/_build/"
|
||||
"/\\\\.git/"
|
||||
# used before
|
||||
"/CVS/"
|
||||
"/\\\\.libs/"
|
||||
"/\\\\.deps/"
|
||||
"\\\\.o$"
|
||||
"\\\\.lo$"
|
||||
"\\\\.la$"
|
||||
"Makefile\\\\.in$"
|
||||
"Makefile$"
|
||||
# autotool
|
||||
"/m4/"
|
||||
"autom4te.cache"
|
||||
"config.log"
|
||||
"config.h$"
|
||||
"configure$"
|
||||
"config.status"
|
||||
"depcomp"
|
||||
"config.guess"
|
||||
"install.sh"
|
||||
"libtool"
|
||||
# generated
|
||||
"\\\\.bz2$"
|
||||
"\\\\.class$"
|
||||
"/bindings/ruby/rdoc/"
|
||||
)
|
||||
|
||||
INCLUDE(CPack)
|
||||
|
||||
####################################################################
|
||||
|
||||
SET( DOC_INSTALL_DIR
|
||||
"${CMAKE_INSTALL_PREFIX}/share/doc/packages/${PACKAGE}"
|
||||
CACHE PATH "The install dir for documentation (default prefix/share/doc/packages/${PACKAGE})"
|
||||
FORCE
|
||||
)
|
||||
|
||||
IF(HAVE_WARNINGS)
|
||||
MESSAGE(STATUS " ************ NOTE: ************")
|
||||
MESSAGE(STATUS " Warnings occurred during cmake configuration... Please see output")
|
||||
MESSAGE(STATUS " *******************************")
|
||||
ENDIF(HAVE_WARNINGS)
|
||||
|
||||
####################################################################
|
||||
# RPM SPEC #
|
||||
####################################################################
|
||||
|
||||
SET( AUTOBUILD_COMMAND
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/package/*.tar.bz2
|
||||
COMMAND mkdir -p _CPack_Packages/${CPACK_TOPLEVEL_TAG}
|
||||
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/package
|
||||
COMMAND ${CMAKE_MAKE_PROGRAM} package_source
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.bz2 ${CMAKE_BINARY_DIR}/package
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.bz2
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET( srcpackage_local
|
||||
${AUTOBUILD_COMMAND}
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET( srcpackage
|
||||
${AUTOBUILD_COMMAND}
|
||||
)
|
||||
|
||||
####################################################################
|
||||
# Library build #
|
||||
####################################################################
|
||||
|
||||
SET( LMDB_HEADERS lmdb.h )
|
||||
INSTALL(FILES ${LMDB_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include")
|
||||
|
||||
SET( LMDB_SOURCES mdb.c midl.c )
|
||||
ADD_LIBRARY( lmdb SHARED ${LMDB_SOURCES} )
|
||||
TARGET_LINK_LIBRARIES( lmdb ${CMAKE_THREAD_LIBS_INIT} )
|
||||
|
||||
SET_TARGET_PROPERTIES(lmdb PROPERTIES VERSION 0.0.0 SOVERSION ${LMDB_MAJOR})
|
||||
INSTALL(TARGETS lmdb DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
####################################################################
|
||||
# Executables build #
|
||||
####################################################################
|
||||
|
||||
ADD_EXECUTABLE(mdb_stat mdb_stat.c)
|
||||
TARGET_LINK_LIBRARIES(mdb_stat lmdb)
|
||||
|
||||
ADD_EXECUTABLE(mdb_copy mdb_copy.c)
|
||||
TARGET_LINK_LIBRARIES(mdb_copy lmdb)
|
||||
|
||||
install(TARGETS
|
||||
mdb_stat
|
||||
mdb_copy
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
|
||||
####################################################################
|
||||
# Man pages #
|
||||
####################################################################
|
||||
|
||||
SET( LMDB_MAN mdb_stat.1 mdb_copy.1 )
|
||||
INSTALL(FILES ${LMDB_MAN} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1")
|
||||
|
||||
####################################################################
|
||||
# Tests build #
|
||||
# leave out mtest6, only compiles with DEBUG enabled lib #
|
||||
####################################################################
|
||||
|
||||
SET( mtest_SOURCES mtest.c )
|
||||
SET( mtest2_SOURCES mtest2.c )
|
||||
SET( mtest3_SOURCES mtest3.c )
|
||||
SET( mtest4_SOURCES mtest4.c )
|
||||
SET( mtest5_SOURCES mtest5.c )
|
||||
ADD_EXECUTABLE( mtest ${mtest_SOURCES} )
|
||||
ADD_EXECUTABLE( mtest2 ${mtest2_SOURCES} )
|
||||
ADD_EXECUTABLE( mtest3 ${mtest3_SOURCES} )
|
||||
ADD_EXECUTABLE( mtest4 ${mtest4_SOURCES} )
|
||||
ADD_EXECUTABLE( mtest5 ${mtest5_SOURCES} )
|
||||
TARGET_LINK_LIBRARIES( mtest lmdb )
|
||||
TARGET_LINK_LIBRARIES( mtest2 lmdb )
|
||||
TARGET_LINK_LIBRARIES( mtest3 lmdb )
|
||||
TARGET_LINK_LIBRARIES( mtest4 lmdb )
|
||||
TARGET_LINK_LIBRARIES( mtest5 lmdb )
|
||||
ADD_TEST( test_mtest mtest )
|
||||
ADD_TEST( test_mtest2 mtest2 )
|
||||
ADD_TEST( test_mtest3 mtest3 )
|
||||
ADD_TEST( test_mtest4 mtest4 )
|
||||
ADD_TEST( test_mtest5 mtest5 )
|
||||
124
Makefile-build-use-shared-lib.patch
Normal file
124
Makefile-build-use-shared-lib.patch
Normal file
@@ -0,0 +1,124 @@
|
||||
From 3e19339d0d22c76ac0fd17f1a59ca2ae1c03f93a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||
Date: Sun, 3 Jun 2018 23:49:29 +0200
|
||||
Subject: [PATCH 1/3] Set SONAME in shared lib
|
||||
|
||||
---
|
||||
libraries/liblmdb/Makefile | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile
|
||||
index f254511f1..489a08976 100644
|
||||
--- a/libraries/liblmdb/Makefile
|
||||
+++ b/libraries/liblmdb/Makefile
|
||||
@@ -38,7 +38,7 @@ mandir = $(datarootdir)/man
|
||||
########################################################################
|
||||
|
||||
IHDRS = lmdb.h
|
||||
-ILIBS = liblmdb.a liblmdb$(SOEXT)
|
||||
+ILIBS = liblmdb-$(SOVERSION)$(SOEXT)
|
||||
IPROGS = mdb_stat mdb_copy mdb_dump mdb_load
|
||||
IDOCS = mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1
|
||||
PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5
|
||||
@@ -64,9 +64,9 @@ test: all
|
||||
liblmdb.a: mdb.o midl.o
|
||||
$(AR) rs $@ mdb.o midl.o
|
||||
|
||||
-liblmdb$(SOEXT): mdb.lo midl.lo
|
||||
+liblmdb-$(SOVERSION)$(SOEXT): mdb.lo midl.lo
|
||||
# $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
|
||||
- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)
|
||||
+ $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) -Wl,-soname -Wl,liblmdb-$(SOVERSION).so
|
||||
|
||||
mdb_stat: mdb_stat.o liblmdb.a
|
||||
mdb_copy: mdb_copy.o liblmdb.a
|
||||
--
|
||||
2.17.0
|
||||
|
||||
From e4e77f24f0b45c308e4f774c67281d38dee0b060 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||
Date: Sun, 3 Jun 2018 23:52:16 +0200
|
||||
Subject: [PATCH 2/3] Use shared library
|
||||
|
||||
---
|
||||
libraries/liblmdb/Makefile | 24 ++++++++++++------------
|
||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile
|
||||
index 489a08976..d926df798 100644
|
||||
--- a/libraries/liblmdb/Makefile
|
||||
+++ b/libraries/liblmdb/Makefile
|
||||
@@ -68,16 +68,16 @@ liblmdb-$(SOVERSION)$(SOEXT): mdb.lo midl.lo
|
||||
# $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
|
||||
$(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) -Wl,-soname -Wl,liblmdb-$(SOVERSION).so
|
||||
|
||||
-mdb_stat: mdb_stat.o liblmdb.a
|
||||
-mdb_copy: mdb_copy.o liblmdb.a
|
||||
-mdb_dump: mdb_dump.o liblmdb.a
|
||||
-mdb_load: mdb_load.o liblmdb.a
|
||||
-mtest: mtest.o liblmdb.a
|
||||
-mtest2: mtest2.o liblmdb.a
|
||||
-mtest3: mtest3.o liblmdb.a
|
||||
-mtest4: mtest4.o liblmdb.a
|
||||
-mtest5: mtest5.o liblmdb.a
|
||||
-mtest6: mtest6.o liblmdb.a
|
||||
+mdb_stat: mdb_stat.o
|
||||
+mdb_copy: mdb_copy.o
|
||||
+mdb_dump: mdb_dump.o
|
||||
+mdb_load: mdb_load.o
|
||||
+mtest: mtest.o
|
||||
+mtest2: mtest2.o
|
||||
+mtest3: mtest3.o
|
||||
+mtest4: mtest4.o
|
||||
+mtest5: mtest5.o
|
||||
+mtest6: mtest6.o
|
||||
|
||||
mdb.o: mdb.c lmdb.h midl.h
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
|
||||
@@ -91,8 +91,8 @@ mdb.lo: mdb.c lmdb.h midl.h
|
||||
midl.lo: midl.c midl.h
|
||||
$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c midl.c -o $@
|
||||
|
||||
-%: %.o
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
||||
+%: %.o | liblmdb-$(SOVERSION)$(SOEXT)
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -L. -llmdb-$(SOVERSION) -o $@
|
||||
|
||||
%.o: %.c lmdb.h
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
--
|
||||
2.17.0
|
||||
|
||||
From 85810167f7db0091e0937e5fb464f7f7868d36a8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||
Date: Sun, 3 Jun 2018 23:52:43 +0200
|
||||
Subject: [PATCH 3/3] Build/install CFEngine extra tools
|
||||
|
||||
---
|
||||
libraries/liblmdb/Makefile | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile
|
||||
index d926df798..b2e95a642 100644
|
||||
--- a/libraries/liblmdb/Makefile
|
||||
+++ b/libraries/liblmdb/Makefile
|
||||
@@ -40,6 +40,7 @@ mandir = $(datarootdir)/man
|
||||
IHDRS = lmdb.h
|
||||
ILIBS = liblmdb-$(SOVERSION)$(SOEXT)
|
||||
IPROGS = mdb_stat mdb_copy mdb_dump mdb_load
|
||||
+IPROGS += lmdump lmmgr
|
||||
IDOCS = mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1
|
||||
PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5
|
||||
all: $(ILIBS) $(PROGS)
|
||||
@@ -78,6 +79,8 @@ mtest3: mtest3.o
|
||||
mtest4: mtest4.o
|
||||
mtest5: mtest5.o
|
||||
mtest6: mtest6.o
|
||||
+lmmgr: lmmgr.o
|
||||
+lmdump: lmdump.o
|
||||
|
||||
mdb.o: mdb.c lmdb.h midl.h
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
|
||||
--
|
||||
2.17.0
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
## ==================================================
|
||||
# Versioning
|
||||
# ==========
|
||||
#
|
||||
# MAJOR Major number for this branch.
|
||||
#
|
||||
# MINOR The most recent interface number this
|
||||
# library implements.
|
||||
#
|
||||
# COMPATMINOR The latest binary compatible minor number
|
||||
# this library implements.
|
||||
#
|
||||
# PATCH The implementation number of the current interface.
|
||||
#
|
||||
#
|
||||
# - The package VERSION will be MAJOR.MINOR.PATCH.
|
||||
#
|
||||
# - Libtool's -version-info will be derived from MAJOR, MINOR, PATCH
|
||||
# and COMPATMINOR (see configure.ac).
|
||||
#
|
||||
# - Changing MAJOR always breaks binary compatibility.
|
||||
#
|
||||
# - Changing MINOR doesn't break binary compatibility by default.
|
||||
# Only if COMPATMINOR is changed as well.
|
||||
#
|
||||
#
|
||||
# 1) After branching from TRUNK increment TRUNKs MAJOR and
|
||||
# start with version `MAJOR.0.0' and also set COMPATMINOR to 0.
|
||||
#
|
||||
# 2) Update the version information only immediately before a public release
|
||||
# of your software. More frequent updates are unnecessary, and only guarantee
|
||||
# that the current interface number gets larger faster.
|
||||
#
|
||||
# 3) If the library source code has changed at all since the last update,
|
||||
# then increment PATCH.
|
||||
#
|
||||
# 4) If any interfaces have been added, removed, or changed since the last
|
||||
# update, increment MINOR, and set PATCH to 0.
|
||||
#
|
||||
# 5) If any interfaces have been added since the last public release, then
|
||||
# leave COMPATMINOR unchanged. (binary compatible change)
|
||||
#
|
||||
# 6) If any interfaces have been removed since the last public release, then
|
||||
# set COMPATMINOR to MINOR. (binary incompatible change)
|
||||
#
|
||||
|
||||
# Package version 0.9.11
|
||||
SET(LMDB_MAJOR "0")
|
||||
SET(LMDB_MINOR "9")
|
||||
SET(LMDB_PATCH "11")
|
||||
|
||||
1
baselibs.conf
Normal file
1
baselibs.conf
Normal file
@@ -0,0 +1 @@
|
||||
liblmdb-0_9_30
|
||||
10
liblmdb-implicit-decl.patch
Normal file
10
liblmdb-implicit-decl.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/libraries/liblmdb.orig/lmmgr.c
|
||||
+++ b/libraries/liblmdb/lmmgr.c
|
||||
@@ -3,6 +3,7 @@ lmmgr.c : Add, remove or manage the maxr
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
+#include <stdlib.h>
|
||||
#include "lmdb.h"
|
||||
|
||||
static int report_error(int rc)
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:72d1a53bdd407ad7fdcb6e557737f6a4e49ba2002af801a4f46b016435107d2f
|
||||
size 93971
|
||||
317
lmdb.changes
317
lmdb.changes
@@ -1,7 +1,322 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 1 10:59:58 UTC 2024 - pgajdos@suse.com
|
||||
|
||||
- Use %autosetup macro. Allows to eliminate the usage of deprecated
|
||||
%patchN
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 19 09:00:43 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.9.30:
|
||||
* LMDB page_split: key threshold depends on page
|
||||
size
|
||||
* avoid gcc optimization bug on sparc64 linux
|
||||
* - Mark infrequently used functions as cold
|
||||
* clear C_EOF on cursor with MDB_FIRST_DUP
|
||||
* Use sys/cachectl.h rather than asm/cachectl.h on
|
||||
mips
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 23 08:02:00 UTC 2023 - Alexander Kuznetsov <alx.kuzza@gmail.com>
|
||||
- update to 0.9.29:
|
||||
* lmdump is not creating lock files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 19 21:04:06 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.9.29:
|
||||
* ITS#9461 refix ITS#9376
|
||||
* ITS#9500 fix regression from ITS#8662
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 03 01:34:52 UTC 2021 - Wang Jun <jgwang@suse.com>
|
||||
|
||||
- LMDB 0.9.28 Release (2021/02/04)
|
||||
* ITS#8662 add -a append option to mdb_load
|
||||
- LMDB 0.9.27 Release (2020/10/26)
|
||||
* ITS#9376 fix repeated DUPSORT cursor deletes
|
||||
- LMDB 0.9.26 Release (2020/08/11)
|
||||
* ITS#9278 fix robust mutex cleanup for FreeBSD
|
||||
- LMDB 0.9.25 Release (2020/01/30)
|
||||
* ITS#9068 fix mdb_dump/load backslashes in printable content
|
||||
* ITS#9118 add MAP_NOSYNC for FreeBSD
|
||||
* ITS#9155 free mt_spill_pgs in non-nested txn on end
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 21 23:12:06 UTC 2020 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- copy the pkg config support from the fedora package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 21 23:05:48 UTC 2020 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- LMDB 0.9.24 Release (2019/07/24)
|
||||
* ITS#8969 Tweak mdb_page_split
|
||||
* ITS#8975 WIN32 fix writemap set_mapsize crash
|
||||
* ITS#9007 Fix loose pages in WRITEMAP
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 25 21:10:07 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- LMDB 0.9.23 Release (2018/12/19)
|
||||
* ITS#8756 Fix loose pages in dirty list
|
||||
* ITS#8831 Fix mdb_load flag init
|
||||
* ITS#8844 Fix mdb_env_close in forked process
|
||||
* Documentation
|
||||
+ ITS#8857 mdb_cursor_del doesn't invalidate cursor
|
||||
+ ITS#8908 GET_MULTIPLE etc don't change passed in key
|
||||
- Drop upstream 0001-ITS-8756-remove-loose-pg-from-dirty-list-in-freelist.patch
|
||||
- Cleanup:
|
||||
* Use %license, drop %defattr
|
||||
* Use https for Url tag
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 6 14:18:37 UTC 2018 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- Fix occasional crash when freed pages landed on the dirty list twice
|
||||
* Add 0001-ITS-8756-remove-loose-pg-from-dirty-list-in-freelist.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 3 19:23:50 UTC 2018 - stefan.bruens@rwth-aachen.de
|
||||
|
||||
- LMDB 0.9.22 Release (2018-03-22)
|
||||
* Fix MDB_DUPSORT alignment bug (ITS#8819)
|
||||
* Fix regression with new db from 0.9.19 (ITS#8760)
|
||||
* Fix liblmdb to build on Solaris (ITS#8612)
|
||||
* Fix delete behavior with DUPSORT DB (ITS#8622)
|
||||
* Fix mdb_cursor_get/mdb_cursor_del behavior (ITS#8722)
|
||||
- LMDB 0.9.21 Release (2017/06/01)
|
||||
* Fix xcursor after cursor_del (ITS#8622)
|
||||
- LMDB 0.9.20 (Withdrawn)
|
||||
* Fix mdb_load with escaped plaintext (ITS#8558)
|
||||
* Fix mdb_cursor_last / mdb_put interaction (ITS#8557)
|
||||
- LMDB 0.9.19 Release (2016/12/28)
|
||||
* Fix mdb_env_cwalk cursor init (ITS#8424)
|
||||
* Fix robust mutexes on Solaris 10/11 (ITS#8339)
|
||||
* Tweak Win32 error message buffer
|
||||
* Fix MDB_GET_BOTH on non-dup record (ITS#8393)
|
||||
* Optimize mdb_drop
|
||||
* Fix xcursors after mdb_cursor_del (ITS#8406)
|
||||
* Fix MDB_NEXT_DUP after mdb_cursor_del (ITS#8412)
|
||||
* Fix mdb_cursor_put resetting C_EOF (ITS#8489)
|
||||
* Fix mdb_env_copyfd2 to return EPIPE on SIGPIPE (ITS#8504)
|
||||
* Fix mdb_env_copy with empty DB (ITS#8209)
|
||||
* Fix behaviors with fork (ITS#8505)
|
||||
* Fix mdb_dbi_open with mainDB cursors (ITS#8542)
|
||||
* Fix robust mutexes on kFreeBSD (ITS#8554)
|
||||
* Fix utf8_to_utf16 error checks (ITS#7992)
|
||||
* Fix F_NOCACHE on MacOS, error is non-fatal (ITS#7682)
|
||||
* Build
|
||||
Make shared lib suffix overridable (ITS#8481)
|
||||
* Documentation
|
||||
+ Cleanup doxygen nits
|
||||
+ Note reserved vs actual mem/disk usage
|
||||
- LMDB 0.9.18 Release (2016/02/05)
|
||||
* Fix robust mutex detection on glibc 2.10-11 (ITS#8330)
|
||||
* Fix page_search_root assert on FreeDB (ITS#8336)
|
||||
* Fix MDB_APPENDDUP vs. rewrite(single item) (ITS#8334)
|
||||
* Fix mdb_copy of large files on Windows
|
||||
* Fix subcursor move after delete (ITS#8355)
|
||||
* Fix mdb_midl_shirnk off-by-one (ITS#8363)
|
||||
* Check for utf8_to_utf16 failures (ITS#7992)
|
||||
* Catch strdup failure in mdb_dbi_open
|
||||
* Build
|
||||
+ Additional makefile var tweaks (ITS#8169)
|
||||
* Documentation
|
||||
+ Add Getting Started page
|
||||
+ Update WRITEMAP description
|
||||
- Drop 0002-Autoconf-files.patch, soname-configurable.patch and
|
||||
add Makefile-build-use-shared-lib.patch instead. Instead of
|
||||
replacing the Makefile with a libtool/automake based one, just
|
||||
patch the relevant parts of the upstream Makefile.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 13 13:45:42 UTC 2017 - dmueller@suse.com
|
||||
|
||||
- add soname-configurable.patch: Actually set the soname in the
|
||||
shared library rather than just renaming the files on disk post
|
||||
install (which does not actually do anything)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 19 01:07:37 UTC 2016 - stefan.bruens@rwth-aachen.de
|
||||
|
||||
- Update 0001-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
|
||||
* do not force enable NOSUBDIR option in mdb_copy
|
||||
- Update 0002-Autoconf-files.patch
|
||||
* build mdb_dump, mdb_load
|
||||
* distribute manpages
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 1 13:01:34 UTC 2016 - kkaempf@suse.com
|
||||
|
||||
- Renamed patches
|
||||
0002-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
|
||||
-> 0001-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
|
||||
automake.diff
|
||||
-> 0002-Autoconf-files.patch
|
||||
|
||||
0003-Optimization-Define-correct-cacheline-size-on-HPUX.patch
|
||||
|
||||
- Dropped patch (upstream)
|
||||
0001-Patch-for-LMDB-to-use-robust-mutexes.patch
|
||||
|
||||
- Update to 0.9.17
|
||||
Fix ITS#7377 catch calloc failure
|
||||
Fix ITS#8237 regression from ITS#7589
|
||||
Fix ITS#8238 page_split for DUPFIXED pages
|
||||
Fix ITS#8221 MDB_PAGE_FULL on delete/rebalance
|
||||
Fix ITS#8258 rebalance/split assert
|
||||
Fix ITS#8263 cursor_put cursor tracking
|
||||
Fix ITS#8264 cursor_del cursor tracking
|
||||
Fix ITS#8310 cursor_del cursor tracking
|
||||
Fix ITS#8299 mdb_del cursor tracking
|
||||
Fix ITS#8300 mdb_del cursor tracking
|
||||
Fix ITS#8304 mdb_del cursor tracking
|
||||
Fix ITS#7771 fakepage cursor tracking
|
||||
Fix ITS#7789 ensure mapsize >= pages in use
|
||||
Fix ITS#7971 mdb_txn_renew0() new reader slots
|
||||
Fix ITS#7969 use __sync_synchronize on non-x86
|
||||
Fix ITS#8311 page_split from update_key
|
||||
Fix ITS#8312 loose pages in nested txn
|
||||
Fix ITS#8313 mdb_rebalance dummy cursor
|
||||
Fix ITS#8315 dirty_room in nested txn
|
||||
Fix ITS#8323 dirty_list in nested txn
|
||||
Fix ITS#8316 page_merge cursor tracking
|
||||
Fix ITS#8321 cursor tracking
|
||||
Fix ITS#8319 mdb_load error messages
|
||||
Fix ITS#8320 mdb_load plaintext input
|
||||
Added mdb_txn_id() (ITS#7994)
|
||||
Added robust mutex support
|
||||
Miscellaneous cleanup/simplification
|
||||
Build
|
||||
Create install dirs if needed (ITS#8256)
|
||||
Fix ThreadProc decl on Win32/MSVC (ITS#8270)
|
||||
Added ssize_t typedef for MSVC (ITS#8067)
|
||||
Use ANSI apis on Windows (ITS#8069)
|
||||
Use O_SYNC if O_DSYNC,MDB_DSYNC are not defined (ITS#7209)
|
||||
Allow passing AR to make (ITS#8168)
|
||||
Allow passing mandir to make install (ITS#8169)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 15 10:04:11 UTC 2015 - jengelh@inai.de
|
||||
|
||||
- Use a source URL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 24 18:20:27 UTC 2015 - hrvoje.senjan@gmail.com
|
||||
|
||||
- Update to 0.9.16:
|
||||
* Fix cursor EOF bug (ITS#8190)
|
||||
* Fix handling of subDB records (ITS#8181)
|
||||
* Fix mdb_midl_shrink() usage (ITS#8200)
|
||||
- Changes since 0.9.15:
|
||||
* Fix txn init (ITS#7961,#7987)
|
||||
* Fix MDB_PREV_DUP (ITS#7955,#7671)
|
||||
* Fix compact of empty env (ITS#7956)
|
||||
* Fix mdb_copy file mode
|
||||
* Fix mdb_env_close() after failed mdb_env_open()
|
||||
* Fix mdb_rebalance collapsing root (ITS#8062)
|
||||
* Fix mdb_load with large values (ITS#8066)
|
||||
* Fix to retry writes on EINTR (ITS#8106)
|
||||
* Fix mdb_cursor_del on empty DB (ITS#8109)
|
||||
* Fix MDB_INTEGERDUP key compare (ITS#8117)
|
||||
* Fix error handling (ITS#7959,#8157,etc.)
|
||||
* Fix race conditions (ITS#7969,7970)
|
||||
* Added workaround for fdatasync bug in ext3fs
|
||||
* Build:
|
||||
* Don't use -fPIC for static lib
|
||||
* Update .gitignore (ITS#7952,#7953)
|
||||
* Cleanup for "make test" (ITS#7841), "make clean", mtest*.c
|
||||
* Misc. Android/Windows cleanup
|
||||
* Documentation
|
||||
* Fix MDB_APPEND doc
|
||||
* Fix MDB_MAXKEYSIZE doc (ITS#8156)
|
||||
* Fix mdb_cursor_put,mdb_cursor_del EACCES description
|
||||
* Fix mdb_env_sync(MDB_RDONLY env) doc (ITS#8021)
|
||||
* Clarify MDB_WRITEMAP doc (ITS#8021)
|
||||
* Clarify mdb_env_open doc
|
||||
* Clarify mdb_dbi_open doc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 18 07:45:59 UTC 2015 - dimstar@opensuse.org
|
||||
|
||||
- Add baselibs.conf: liblmdb*-32bit is required by
|
||||
libKF5Baloo5-32bit.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 31 15:42:55 UTC 2015 - hrvoje.senjan@gmail.com
|
||||
|
||||
- Update to 0.9.14:
|
||||
* Fix to support 64K page size (ITS#7713)
|
||||
* Fix to persist decreased as well as increased mapsizes (ITS#7789)
|
||||
* Fix cursor bug when deleting last node of a DUPSORT key
|
||||
* Fix mdb_env_info to return FIXEDMAP address
|
||||
* Fix ambiguous error code from writing to closed DBI (ITS#7825)
|
||||
* Fix mdb_copy copying past end of file (ITS#7886)
|
||||
* Fix cursor bugs from page_merge/rebalance
|
||||
* Fix to dirty fewer pages in deletes (mdb_page_loose())
|
||||
* Fix mdb_dbi_open creating subDBs (ITS#7917)
|
||||
* Fix mdb_cursor_get(_DUP) with single value (ITS#7913)
|
||||
* Fix Windows compat issues in mtests (ITS#7879)
|
||||
* Add compacting variant of mdb_copy
|
||||
* Add BigEndian integer key compare code
|
||||
* Add mdb_dump/mdb_load utilities
|
||||
- Changes since 0.9.13:
|
||||
* Fix mdb_page_alloc unlimited overflow page search
|
||||
* Documentation:
|
||||
Re-fix MDB_CURRENT doc (ITS#7793)
|
||||
Fix MDB_GET_MULTIPLE/MDB_NEXT_MULTIPLE doc
|
||||
- Changes since 0.9.12:
|
||||
* Fix MDB_GET_BOTH regression (ITS#7875,#7681)
|
||||
* Fix MDB_MULTIPLE writing multiple keys (ITS#7834)
|
||||
* Fix mdb_rebalance (ITS#7829)
|
||||
* Fix mdb_page_split (ITS#7815)
|
||||
* Fix md_entries count (ITS#7861,#7828,#7793)
|
||||
* Fix MDB_CURRENT (ITS#7793)
|
||||
* Fix possible crash on Windows DLL detach
|
||||
* Misc code cleanup
|
||||
* Documentation:
|
||||
mdb_cursor_put: cursor moves on error (ITS#7771)
|
||||
- Rebase automake.diff and 0001-Patch-for-LMDB-to-use-robust-mutexes.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 10 20:34:09 UTC 2014 - crrodriguez@opensuse.org
|
||||
|
||||
- automake.diff changes:
|
||||
* for autoconf tests to have effect, (like those in
|
||||
0001-Patch-for-LMDB-to-use-robust-mutexes.patch) config.h must be
|
||||
included as first file in all C code.
|
||||
* in 32 bit systems, ensure we support large databases.
|
||||
* Switch the compiler to the current C standard, currently -std=gnu99
|
||||
in upcoming autoconf versions it is C11 though.
|
||||
- liblmdb-implicit-decl.patch atol() requires stdlib.h
|
||||
- Enable verbose build, rpmlint depends on that to work.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 28 15:55:31 UTC 2014 - kkaempf@suse.com
|
||||
|
||||
- Prevent deadlock when process holding the db lock dies
|
||||
0001-Patch-for-LMDB-to-use-robust-mutexes.patch
|
||||
|
||||
- command line tools for debugging
|
||||
0002-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 16 20:00:29 UTC 2014 - jengelh@inai.de
|
||||
|
||||
- Replace verbose cmake script (remove CMakeLists.txt).
|
||||
- Instead, use a simpler automake patch (add automake.diff).
|
||||
- There is a change in shared library versioning scheme to line up
|
||||
with our packaging guidelines. This is embodied within
|
||||
automake.diff.
|
||||
- Shorten the description by 2/3, focus on the important points.
|
||||
- Do not unnecessarily pull in a C++ compiler for the build.
|
||||
- Invoke ldconfig directly as %post rather than sh+ldconfig.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 12 13:53:21 UTC 2014 - kkaempf@suse.com
|
||||
|
||||
- Switch to cmake build
|
||||
- Switch to cmake, fix dynamic lib build and versioning.
|
||||
Drop liblmdb.patch
|
||||
Add VERSION.cmake and CMakeLists.txt
|
||||
|
||||
|
||||
11
lmdb.pc.in
Normal file
11
lmdb.pc.in
Normal file
@@ -0,0 +1,11 @@
|
||||
prefix=@PREFIX@
|
||||
exec_prefix=@EXEC_PREFIX@
|
||||
libdir=@LIBDIR@
|
||||
includedir=@INCLUDEDIR@
|
||||
|
||||
Name: liblmdb
|
||||
Description: Lightning Memory-mapped key-value database
|
||||
URL: http://symas.com/mdb/
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -llmdb
|
||||
Cflags: -I${includedir}
|
||||
155
lmdb.spec
155
lmdb.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package lmdb
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -12,108 +12,117 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: lmdb
|
||||
%define libname liblmdb
|
||||
%define libsoname %{libname}0
|
||||
|
||||
Summary: Lightning Memory-Mapped Database Manager
|
||||
License: OLDAP-2.8
|
||||
Group: Productivity/Databases/Tools
|
||||
Summary: LMDB is a tiny database with some great capabilities
|
||||
Version: 0.9.11
|
||||
%define lname liblmdb-0_9_30
|
||||
Version: 0.9.30
|
||||
Release: 0
|
||||
Url: http://symas.com/mdb
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source1: VERSION.cmake
|
||||
Source2: CMakeLists.txt
|
||||
URL: https://symas.com/mdb/
|
||||
Source: https://git.openldap.org/openldap/openldap/-/archive/LMDB_%{version}/openldap-LMDB_%{version}.tar.gz
|
||||
Source1: lmdb.pc.in
|
||||
Source99: baselibs.conf
|
||||
|
||||
# PATCH-FIX-UPSTREAM - debugging tools (https://github.com/kacfengine/lmdb)
|
||||
Patch1: 0001-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
|
||||
# PATCH-FIX-OPENSUSE - Implicit declaration of atol()
|
||||
Patch2: liblmdb-implicit-decl.patch
|
||||
# PATCH-FIX-OPENSUSE - Build and link to shared library
|
||||
Patch3: Makefile-build-use-shared-lib.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
|
||||
%description
|
||||
LMDB is a tiny database with some great capabilities:
|
||||
|
||||
Ordered-map interface (keys are always sorted, supports range lookups)
|
||||
Fully transactional, full ACID semantics with MVCC.
|
||||
Reader/writer transactions: readers don't block writers and writers
|
||||
don't block readers. Writers are fully serialized, so writes are
|
||||
always deadlock-free.
|
||||
Read transactions are extremely cheap, and can be performed using no
|
||||
mallocs or any other blocking calls.
|
||||
Supports multi-thread and multi-process concurrency, environments may
|
||||
be opened by multiple processes on the same host.
|
||||
Multiple sub-databases may be created with transactions covering all
|
||||
sub-databases.
|
||||
Memory-mapped, allowing for zero-copy lookup and iteration.
|
||||
Maintenance-free, no external process or background cleanup/compaction
|
||||
required.
|
||||
No application-level caching. LMDB fully exploits the operating
|
||||
system's buffer cache.
|
||||
32KB of object code and 6KLOC of C.
|
||||
Licensed under the OpenLDAP Public License
|
||||
It is a read-optimized design and performs reads several times faster
|
||||
than other DB engines, several orders of magnitude faster in many
|
||||
cases. It is not a write-optimized design; for heavy random write
|
||||
workloads other DB designs may be more suitable.
|
||||
|
||||
|
||||
%package -n %{libsoname}
|
||||
Summary: Shared library of Lightning MDB (LMDB)
|
||||
Group: System/Libraries
|
||||
%if 0%{?suse_version} == 1010
|
||||
Requires: glibc
|
||||
%if 0%{?rhel_version} == 700
|
||||
BuildRequires: perl-Exporter
|
||||
%endif
|
||||
|
||||
%description -n %{libsoname}
|
||||
This package contains the shared lightning memory data base (lmdb)
|
||||
%description
|
||||
LMDB is a Btree-based database management library with an API similar
|
||||
to BerkeleyDB. The library is thread-aware and supports concurrent
|
||||
read/write access from multiple processes and threads. The DB
|
||||
structure is multi-versioned, and data pages use a copy-on-write
|
||||
strategy, which also provides resistance to corruption and eliminates
|
||||
the need for any recovery procedures. The database is exposed in a
|
||||
memory map, requiring no page cache layer of its own.
|
||||
|
||||
%package -n %lname
|
||||
Summary: Shared library for Lightning Memory-Mapped Database (LMDB)
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %lname
|
||||
LMDB is a Btree-based database management library with an API similar
|
||||
to BerkeleyDB. The library is thread-aware and supports concurrent
|
||||
read/write access from multiple processes and threads. The DB
|
||||
structure is multi-versioned, and data pages use a copy-on-write
|
||||
strategy, which also provides resistance to corruption and eliminates
|
||||
the need for any recovery procedures. The database is exposed in a
|
||||
memory map, requiring no page cache layer of its own.
|
||||
|
||||
This package contains the shared library.
|
||||
|
||||
%package devel
|
||||
Summary: Development package for lmdb
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{libsoname} = %{version}
|
||||
Requires: %lname = %version
|
||||
|
||||
%description devel
|
||||
A high-speed in-memory database.
|
||||
|
||||
This package contains the files needed to compile programs that use the
|
||||
liblmdb library.
|
||||
LMDB is a Btree-based database management library with an API similar
|
||||
to BerkeleyDB. The library is thread-aware and supports concurrent
|
||||
read/write access from multiple processes and threads. The DB
|
||||
structure is multi-versioned, and data pages use a copy-on-write
|
||||
strategy, which also provides resistance to corruption and eliminates
|
||||
the need for any recovery procedures. The database is exposed in a
|
||||
memory map, requiring no page cache layer of its own.
|
||||
|
||||
This package contains the files needed to compile programs that use
|
||||
the liblmdb library.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{libname}
|
||||
%autosetup -p1 -n openldap-LMDB_%version
|
||||
|
||||
%build
|
||||
cp %{S:1} .
|
||||
cp %{S:2} .
|
||||
%{cmake}
|
||||
cd libraries/liblmdb
|
||||
make %{?_smp_mflags} V=1 SOVERSION=%{version} CFLAGS="%{optflags}"
|
||||
|
||||
%install
|
||||
(cd build; %{__make} install DESTDIR=%{buildroot})
|
||||
cd libraries/liblmdb
|
||||
make install DESTDIR="%buildroot" SOVERSION=%{version} \
|
||||
bindir=%{_bindir} \
|
||||
libdir=%{_libdir} \
|
||||
mandir=%{_mandir} \
|
||||
includedir=%{_includedir} \
|
||||
datarootdir=%{_datadir}
|
||||
ln -s %{_libdir}/liblmdb-%{version}.so %{buildroot}%{_libdir}/liblmdb.so
|
||||
|
||||
%post -n %{libsoname}
|
||||
/sbin/ldconfig
|
||||
# Install pkgconfig file
|
||||
sed -e 's:@PREFIX@:%{_prefix}:g' \
|
||||
-e 's:@EXEC_PREFIX@:%{_exec_prefix}:g' \
|
||||
-e 's:@LIBDIR@:%{_libdir}:g' \
|
||||
-e 's:@INCLUDEDIR@:%{_includedir}:g' \
|
||||
-e 's:@PACKAGE_VERSION@:%{version}:g' \
|
||||
%{SOURCE1} >lmdb.pc
|
||||
install -Dpm 0644 -t %{buildroot}%{_libdir}/pkgconfig lmdb.pc
|
||||
|
||||
%postun -n %{libsoname}
|
||||
/sbin/ldconfig
|
||||
%post -n %lname -p /sbin/ldconfig
|
||||
%postun -n %lname -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc CHANGES
|
||||
%doc COPYRIGHT
|
||||
%doc LICENSE
|
||||
%doc libraries/liblmdb/CHANGES
|
||||
%doc libraries/liblmdb/COPYRIGHT
|
||||
%license libraries/liblmdb/LICENSE
|
||||
%{_bindir}/*
|
||||
%doc %{_mandir}/man1/*
|
||||
%doc %{_mandir}/man1/*.1.gz
|
||||
|
||||
%files -n %{libsoname}
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/*.so.*
|
||||
%files -n %lname
|
||||
%_libdir/liblmdb-%version.so
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_prefix}/include/*
|
||||
%{_libdir}/*.so
|
||||
%_includedir/*
|
||||
%_libdir/liblmdb.so
|
||||
%_libdir/pkgconfig/lmdb.pc
|
||||
|
||||
%changelog
|
||||
|
||||
BIN
openldap-LMDB_0.9.30.tar.gz
LFS
Normal file
BIN
openldap-LMDB_0.9.30.tar.gz
LFS
Normal file
Binary file not shown.
Reference in New Issue
Block a user