mongodb: update to 3.4.0.

This commit is contained in:
Enno Boland 2016-12-09 14:19:45 +01:00
parent f346a8a288
commit 839c15bbc7
6 changed files with 3 additions and 2233 deletions

View file

@ -1,34 +0,0 @@
From b54faf431153535ddfa047f3ed45780b7cac5781 Mon Sep 17 00:00:00 2001
From: Aliaksey Kandratsenka <alk@tut.by>
Date: Sat, 13 Jun 2015 21:28:28 -0700
Subject: [PATCH 2/5] issue-693: convert sys_futex to it's 6-arg form
Because sys_futex actually takes 6 args in more recent kernels (even
though last two args are unused for FUTEX_{WAKE,WAIT}.
This is patch contributed by user spotrh.
---
src/third_party/gperftools-2.2/src/base/linux_syscall_support.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git src/third_party/gperftools-2.2/src/base/linux_syscall_support.h src/third_party/gperftools-2.2/src/base/linux_syscall_support.h
index 9b6c35d..c8f8f59 100644
--- src/third_party/gperftools-2.2/src/base/linux_syscall_support.h
+++ src/third_party/gperftools-2.2/src/base/linux_syscall_support.h
@@ -2094,9 +2094,11 @@ struct kernel_stat {
int, c, long, a)
LSS_INLINE _syscall2(int, fstat, int, f,
struct kernel_stat*, b)
- LSS_INLINE _syscall4(int, futex, int*, a,
+ LSS_INLINE _syscall6(int, futex, int*, a,
int, o, int, v,
- struct kernel_timespec*, t)
+ struct kernel_timespec*, t,
+ int*, a2,
+ int, v3)
#ifdef __NR_getdents64
LSS_INLINE _syscall3(int, getdents64, int, f,
struct kernel_dirent64*, d, int, c)
--
2.6.4

View file

@ -1,68 +0,0 @@
From 00c5a75b1dd59f27c18fa04ad911b56b9c6ac17e Mon Sep 17 00:00:00 2001
From: Aliaksey Kandratsenka <alk@tut.by>
Date: Sat, 13 Jun 2015 21:35:06 -0700
Subject: [PATCH 3/5] issue-693: enable futex usage on arm
This patch was contributed by user spotrh.
---
.../gperftools-2.2/src/base/linux_syscall_support.h | 1 -
.../gperftools-2.2/src/base/spinlock_linux-inl.h | 15 ++++++---------
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git src/third_party/gperftools-2.2/src/base/linux_syscall_support.h src/third_party/gperftools-2.2/src/base/linux_syscall_support.h
index c8f8f59..56b8fac 100644
--- src/third_party/gperftools-2.2/src/base/linux_syscall_support.h
+++ src/third_party/gperftools-2.2/src/base/linux_syscall_support.h
@@ -83,7 +83,6 @@
* sys_fcntl(
* sys_fstat(
* sys_futex(
- * sys_futex1(
* sys_getcpu(
* sys_getdents64(
* sys_getppid(
diff --git src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h
index 86d4d04..aadf62a 100644
--- src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h
+++ src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h
@@ -51,15 +51,10 @@ static struct InitModule {
int x = 0;
// futexes are ints, so we can use them only when
// that's the same size as the lockword_ in SpinLock.
-#ifdef __arm__
- // ARM linux doesn't support sys_futex1(void*, int, int, struct timespec*);
- have_futex = 0;
-#else
have_futex = (sizeof (Atomic32) == sizeof (int) &&
- sys_futex(&x, FUTEX_WAKE, 1, 0) >= 0);
-#endif
+ sys_futex(&x, FUTEX_WAKE, 1, NULL, NULL, 0) >= 0);
if (have_futex &&
- sys_futex(&x, FUTEX_WAKE | futex_private_flag, 1, 0) < 0) {
+ sys_futex(&x, FUTEX_WAKE | futex_private_flag, 1, NULL, NULL, 0) < 0) {
futex_private_flag = 0;
}
}
@@ -85,7 +80,8 @@ void SpinLockDelay(volatile Atomic32 *w, int32 value, int loop) {
tm.tv_nsec *= 16; // increase the delay; we expect explicit wakeups
sys_futex(reinterpret_cast<int *>(const_cast<Atomic32 *>(w)),
FUTEX_WAIT | futex_private_flag,
- value, reinterpret_cast<struct kernel_timespec *>(&tm));
+ value, reinterpret_cast<struct kernel_timespec *>(&tm),
+ NULL, 0);
} else {
nanosleep(&tm, NULL);
}
@@ -96,7 +92,8 @@ void SpinLockDelay(volatile Atomic32 *w, int32 value, int loop) {
void SpinLockWake(volatile Atomic32 *w, bool all) {
if (have_futex) {
sys_futex(reinterpret_cast<int *>(const_cast<Atomic32 *>(w)),
- FUTEX_WAKE | futex_private_flag, all? INT_MAX : 1, 0);
+ FUTEX_WAKE | futex_private_flag, all? INT_MAX : 1,
+ NULL, NULL, 0);
}
}
--
2.6.4

File diff suppressed because it is too large Load diff

View file

@ -1,40 +0,0 @@
--- src/mongo/util/processinfo_linux.cpp.orig 2015-12-14 14:47:03.364085899 +0100
+++ src/mongo/util/processinfo_linux.cpp 2015-12-14 14:49:57.772093896 +0100
@@ -35,7 +35,7 @@
#include <unistd.h>
#include <sys/mman.h>
#include <sys/utsname.h>
-#ifdef __UCLIBC__
+#ifndef __GLIBC__
#include <features.h>
#else
#include <gnu/libc-version.h>
@@ -424,12 +424,14 @@ double ProcessInfo::getSystemMemoryPress
}
void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {
+#if defined(__GLIBC__)
// [dm] i don't think mallinfo works. (64 bit.) ??
struct mallinfo malloc_info =
mallinfo(); // structure has same name as function that returns it. (see malloc.h)
info.append("heap_usage_bytes",
malloc_info.uordblks /*main arena*/ + malloc_info.hblkhd /*mmap blocks*/);
// docs claim hblkhd is included in uordblks but it isn't
+#endif
LinuxProc p(_pid);
if (p._maj_flt <= std::numeric_limits<long long>::max())
@@ -467,11 +469,11 @@ void ProcessInfo::SystemInfo::collectSys
BSONObjBuilder bExtra;
bExtra.append("versionString", LinuxSysHelper::readLineFromFile("/proc/version"));
-#ifdef __UCLIBC__
+#if defined(__UCLIBC__)
stringstream ss;
ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__;
bExtra.append("libcVersion", ss.str());
-#else
+#elif defined(__GLIBC__)
bExtra.append("libcVersion", gnu_get_libc_version());
#endif
if (!verSig.empty())

View file

@ -1,26 +0,0 @@
From 4ed0f5103bd25f5bdaca5b11bb69e87cd9746f9f Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sun, 27 Dec 2015 09:13:09 -0700
Subject: [PATCH 4/5] use gnu++11 instead of c++11
---
src/third_party/gperftools-2.2/SConscript | 3 +++
1 file changed, 3 insertions(+)
diff --git src/third_party/gperftools-2.2/SConscript src/third_party/gperftools-2.2/SConscript
index 2948eaa..f6d5c9e 100644
--- src/third_party/gperftools-2.2/SConscript
+++ src/third_party/gperftools-2.2/SConscript
@@ -102,6 +102,9 @@ def removeIfPresent(lst, item):
for to_remove in ['-Werror', "-Wsign-compare","-Wall"]:
removeIfPresent(env['CCFLAGS'], to_remove)
+removeIfPresent(env['CXXFLAGS'], "-std=c++11")
+env.Append( CXXFLAGS=["-std=gnu++11"] )
+
env.Library(
target='tcmalloc_minimal',
source=files,
--
2.6.4

View file

@ -1,6 +1,6 @@
# Template file for 'mongodb'
pkgname=mongodb
version=3.2.11
version=3.4.0
revision=1
wrksrc="mongodb-src-r${version}"
hostmakedepends="scons"
@ -15,7 +15,7 @@ maintainer="Enno Boland <gottox@voidlinux.eu>"
homepage="http://www.mongodb.org"
license="AGPL-3"
distfiles="http://downloads.mongodb.org/src/mongodb-src-r${version}.tar.gz"
checksum=625eb28fd47b2af63b30343a064de7f42e5265f4c642874ec766ba3643fd80d7
checksum=5a904b66d09e4d15f3ed35028a004640afcba5d8ecb5644165bd08cd7eb79df6
# build flags broken.
nopie=yes
@ -58,13 +58,13 @@ do_build() {
--use-system-snappy \
--use-system-zlib \
--use-system-yaml \
--use-system-intel_decimal128 \
--use-sasl-client \
--ssl \
--nostrip \
--disable-warnings-as-errors \
--allocator=system \
${_scons_args}
# --use-system-intel_decimal128 \
}
do_install() {
for b in mongos mongod mongosniff mongo mongoperf; do