pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/databases/lmdb
Module Name: pkgsrc
Committed By: fhajny
Date: Fri Nov 25 15:50:13 UTC 2016
Modified Files:
pkgsrc/databases/lmdb: Makefile distinfo
pkgsrc/databases/lmdb/patches: patch-libraries_liblmdb_Makefile
Added Files:
pkgsrc/databases/lmdb/patches: patch-libraries_liblmdb_mdb.c
Log Message:
Backport a SunOS mutex fix from upstream trunk. Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/databases/lmdb/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/databases/lmdb/distinfo
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/databases/lmdb/patches/patch-libraries_liblmdb_Makefile
cvs rdiff -u -r0 -r1.1 \
pkgsrc/databases/lmdb/patches/patch-libraries_liblmdb_mdb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/databases/lmdb/Makefile
diff -u pkgsrc/databases/lmdb/Makefile:1.5 pkgsrc/databases/lmdb/Makefile:1.6
--- pkgsrc/databases/lmdb/Makefile:1.5 Tue Feb 16 12:16:28 2016
+++ pkgsrc/databases/lmdb/Makefile Fri Nov 25 15:50:13 2016
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2016/02/16 12:16:28 mef Exp $
+# $NetBSD: Makefile,v 1.6 2016/11/25 15:50:13 fhajny Exp $
DISTNAME= LMDB-0.9.18
PKGNAME= ${DISTNAME:tl}
+PKGREVISION= 1
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_GITHUB:=LMDB/}
Index: pkgsrc/databases/lmdb/distinfo
diff -u pkgsrc/databases/lmdb/distinfo:1.4 pkgsrc/databases/lmdb/distinfo:1.5
--- pkgsrc/databases/lmdb/distinfo:1.4 Tue Feb 16 12:16:28 2016
+++ pkgsrc/databases/lmdb/distinfo Fri Nov 25 15:50:13 2016
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.4 2016/02/16 12:16:28 mef Exp $
+$NetBSD: distinfo,v 1.5 2016/11/25 15:50:13 fhajny Exp $
SHA1 (LMDB-0.9.18.tar.gz) = 375e31bd0a4d8426e5fc4bfdb00d532c206d4f2b
RMD160 (LMDB-0.9.18.tar.gz) = 498e2076e9c3e1145d14d83880a54430f20875d8
SHA512 (LMDB-0.9.18.tar.gz) = 394e88d99d446eb30771d7cf7a661584683a0d6d8e976cc561b5eecbb2a5d0817bbd59994002afa4eae6c86a39f05f50ebc2eff77cd70dd8c67225df4611f5e6
Size (LMDB-0.9.18.tar.gz) = 139156 bytes
-SHA1 (patch-libraries_liblmdb_Makefile) = a21055b6ec53dae8c52a9bc325b8f84bf4282e9f
+SHA1 (patch-libraries_liblmdb_Makefile) = da5288510ae26b498e1cf8ed453bb1c74f25e54a
+SHA1 (patch-libraries_liblmdb_mdb.c) = 26d1dd1e59b30f8e814bcc3a5d2ff9fd449f83ab
Index: pkgsrc/databases/lmdb/patches/patch-libraries_liblmdb_Makefile
diff -u pkgsrc/databases/lmdb/patches/patch-libraries_liblmdb_Makefile:1.2 pkgsrc/databases/lmdb/patches/patch-libraries_liblmdb_Makefile:1.3
--- pkgsrc/databases/lmdb/patches/patch-libraries_liblmdb_Makefile:1.2 Tue Feb 16 12:16:28 2016
+++ pkgsrc/databases/lmdb/patches/patch-libraries_liblmdb_Makefile Fri Nov 25 15:50:13 2016
@@ -1,9 +1,7 @@
-$NetBSD: patch-libraries_liblmdb_Makefile,v 1.2 2016/02/16 12:16:28 mef Exp $
+$NetBSD: patch-libraries_liblmdb_Makefile,v 1.3 2016/11/25 15:50:13 fhajny Exp $
Use proper install commands.
- clean:
- rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb
--- libraries/liblmdb/Makefile.orig 2016-02-06 06:22:15.000000000 +0900
+++ libraries/liblmdb/Makefile 2016-02-16 21:08:37.000000000 +0900
@@ -48,10 +48,10 @@ install: $(ILIBS) $(IPROGS) $(IHDRS)
Added files:
Index: pkgsrc/databases/lmdb/patches/patch-libraries_liblmdb_mdb.c
diff -u /dev/null pkgsrc/databases/lmdb/patches/patch-libraries_liblmdb_mdb.c:1.1
--- /dev/null Fri Nov 25 15:50:13 2016
+++ pkgsrc/databases/lmdb/patches/patch-libraries_liblmdb_mdb.c Fri Nov 25 15:50:13 2016
@@ -0,0 +1,36 @@
+$NetBSD: patch-libraries_liblmdb_mdb.c,v 1.1 2016/11/25 15:50:13 fhajny Exp $
+
+Backport upstream fix for SunOS.
+
+https://github.com/LMDB/lmdb/commit/c367c1f69685a4d307acb8cea6945c1d67e1cc7e.patch
+
+Check for PTHREAD_MUTEX_ROBUST_NP definition (this doesn't work
+on Linux/glibc because they used an enum). Zero out mutex before
+initing.
+
+--- libraries/liblmdb/mdb.c.orig 2016-02-05 21:22:15.000000000 +0000
++++ libraries/liblmdb/mdb.c
+@@ -257,7 +257,8 @@ typedef SSIZE_T ssize_t;
+ # else
+ # define MDB_USE_ROBUST 1
+ /* glibc < 2.12 only provided _np API */
+-# if defined(__GLIBC__) && GLIBC_VER < 0x02000c
++# if (defined(__GLIBC__) && GLIBC_VER < 0x02000c) || \
++ (defined(PTHREAD_MUTEX_ROBUST_NP) && !defined(PTHREAD_MUTEX_ROBUST))
+ # define PTHREAD_MUTEX_ROBUST PTHREAD_MUTEX_ROBUST_NP
+ # define pthread_mutexattr_setrobust(attr, flag) pthread_mutexattr_setrobust_np(attr, flag)
+ # define pthread_mutex_consistent(mutex) pthread_mutex_consistent_np(mutex)
+@@ -4619,6 +4620,13 @@ mdb_env_setup_locks(MDB_env *env, char *
+ #else /* MDB_USE_POSIX_MUTEX: */
+ pthread_mutexattr_t mattr;
+
++ /* Solaris needs this before initing a robust mutex. Otherwise
++ * it may skip the init and return EBUSY "seems someone already
++ * inited" or EINVAL "it was inited differently".
++ */
++ memset(env->me_txns->mti_rmutex, 0, sizeof(*env->me_txns->mti_rmutex));
++ memset(env->me_txns->mti_wmutex, 0, sizeof(*env->me_txns->mti_wmutex));
++
+ if ((rc = pthread_mutexattr_init(&mattr))
+ || (rc = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED))
+ #ifdef MDB_ROBUST_SUPPORTED
Home |
Main Index |
Thread Index |
Old Index