community/mongodb to 3.4.1-1

This commit is contained in:
Kevin Mihelich 2017-01-16 00:40:49 +00:00
parent 089ba690c8
commit 71874a574c
7 changed files with 15 additions and 2275 deletions

File diff suppressed because it is too large Load diff

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 a/src/third_party/gperftools-2.2/src/base/linux_syscall_support.h b/src/third_party/gperftools-2.2/src/base/linux_syscall_support.h
index 9b6c35d..c8f8f59 100644
--- a/src/third_party/gperftools-2.2/src/base/linux_syscall_support.h
+++ b/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 a/src/third_party/gperftools-2.2/src/base/linux_syscall_support.h b/src/third_party/gperftools-2.2/src/base/linux_syscall_support.h
index c8f8f59..56b8fac 100644
--- a/src/third_party/gperftools-2.2/src/base/linux_syscall_support.h
+++ b/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 a/src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h b/src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h
index 86d4d04..aadf62a 100644
--- a/src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h
+++ b/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

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 a/src/third_party/gperftools-2.2/SConscript b/src/third_party/gperftools-2.2/SConscript
index 2948eaa..f6d5c9e 100644
--- a/src/third_party/gperftools-2.2/SConscript
+++ b/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,25 +0,0 @@
From b552e3b3fa87e3f374d603e065785734c5b36e55 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Mon, 28 Dec 2015 13:39:06 -0700
Subject: [PATCH 5/5] fix options_parser segfault
---
src/mongo/util/options_parser/option_section.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mongo/util/options_parser/option_section.cpp b/src/mongo/util/options_parser/option_section.cpp
index b499025..d9f5046 100644
--- a/src/mongo/util/options_parser/option_section.cpp
+++ b/src/mongo/util/options_parser/option_section.cpp
@@ -484,7 +484,7 @@ Status OptionSection::getDefaults(std::map<Key, Value>* values) const {
std::list<OptionDescription>::const_iterator oditerator;
for (oditerator = _options.begin(); oditerator != _options.end(); oditerator++) {
if (!oditerator->_default.isEmpty()) {
- (*values)[oditerator->_dottedName] = oditerator->_default;
+ (*((values->insert(make_pair(oditerator->_dottedName, std::map<Key, Value>::mapped_type()))).first)).second = oditerator->_default;
}
}
--
2.6.4

View file

@ -6,24 +6,20 @@
# Contributor: Alec Thomas
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - build -j2 (RAM constraints)
# - patches
# - specify mmapv1 as the default storage engine in mongodb.conf
# - x86_64 import, no changes
# - only build for AArch64; 32-bit is unsupported
# ALARM: Thomas P. <tpxp@live.fr>
# - force mmapv1 to be compiled in the build
buildarch=28
buildarch=8
highmem=1
pkgname=mongodb
pkgver=3.2.10
pkgrel=2
pkgver=3.4.1
pkgrel=1
pkgdesc='A high-performance, open source, schema-free document-oriented database'
arch=('i686' 'x86_64')
arch=('x86_64')
url='http://www.mongodb.org'
license=('AGPL3')
depends=('pcre' 'snappy' 'openssl' 'libsasl' 'boost-libs' 'yaml-cpp')
[[ "$CARCH" == "x86_64" ]] && depends+=('wiredtiger')
depends=('pcre' 'snappy' 'openssl' 'libsasl' 'boost-libs' 'yaml-cpp' 'lsb-release' 'wiredtiger')
makedepends=('scons' 'readline' 'ncurses' 'libpcap' 'boost')
checkdepends=('python2-pymongo' 'python2-yaml')
optdepends=('libpcap: needed for mongosniff'
@ -31,28 +27,11 @@ optdepends=('libpcap: needed for mongosniff'
backup=('etc/mongodb.conf')
install=mongodb.install
source=("http://downloads.mongodb.org/src/mongodb-src-r${pkgver}.tar.gz"
'boost160.patch'
'mongodb.conf' 'mongodb.service'
'mongodb-3.2.10-boost-1.62.0.patch'
'mongodb-3.2.10-network_interface_asio_integration_test.patch'
'0001-mozjs-platform-support-for-ARM.patch'
'0002-issue-693-convert-sys_futex-to-it-s-6-arg-form.patch'
'0003-issue-693-enable-futex-usage-on-arm.patch'
'0004-use-gnu-11-instead-of-c-11.patch'
'0005-fix-options_parser-segfault.patch')
sha512sums=('b9592c7cb0184ae10e1e7092b3fa0fc52b10acef1d7beffb2c2409867e237042d7765cc7191972ded10c278756cde1ff7b23b57fb7efd8363e18f2ce994985e9'
'385c82875174caae433a3b381eb10f98a6fed0c8943788ddefff1de80a898e480bdbbf094a7783285cf2ae11ce3fc6878e57d58183d05be2f0837b206aaa4da6'
'631d10baac9367e24d064c6ca05f1872dbf211c9d06ce2622d911da3a4f6416c521c649da686e0e283c10dba2802de74d952a45249461d0ca90ed1b316aed1ee'
'mongodb.conf' 'mongodb.service' 'mongodb-3.2.10-boost-1.62.0.patch')
sha512sums=('48400f00ed84922b1e734ad915c376a567af2cd32e9cdcc40819fdfbc0a5c2444e4f325b1a541fc21cf87f4d95f9bdcc64bd59eab9d25e75b28732978feda031'
'05dead727d3ea5fe8af1a3c3888693f6b3e2b8cb7f197a5d793352e10d2c524e96c9a5c55ad2e88c1114643a9612ec0b26a2574b48a5260a9b51ec8941461f1c'
'177251404b2e818ae2b546fe8b13cb76e348c99e85c7bef22a04b0f07b600fd515a309ede50214f4198594388a6d2b31f46e945b9dae84aabb4dfa13b1123bb9'
'd6f014d2778decde268b9e856d812bc61f7c45986aad751e44fdece39aa8a96505b77e0b917ea38880501497e01d4b051a6f3205c82af653425b5247cd813417'
'4d044d5bae420c14cc4530728236486a2ea9abe0224ed4f114d5f9e23637bfdbdd0bdfe14ecc6c1f9d6e6a13f278c6f212034077d88aaac60d8220e6c738e209'
'9877ef788fd1170337ef6da267d8fb624f74c59eb98533753d4db9ff841f562e81cbb3ee36431ea11cee4f9354876426bc24edaa68dd43ef2b1f5e5111395696'
'12c56405bed46f8d607ea46dfce07d567dfb4cfc16c06b8a3fc07c41d72d377aeba16a5bbc6a53962b24cc5524500b28ff736b59fe7e558ca638ffa2c0fd4a71'
'c6e50c4b1e59614309ef989bbff102394fd9d424c0f4af16917194662b744fc7a5a05e6b04dcdc56632dc6260d46d286bad7ed0b360cad79ee4c15f4d0e61035'
'787729236ab1dba3c302211a5220995f413fed220eb05e327d2f41612a9ae3f460ea0c141deeb2e887a022b4ddfc8fe1ac5ccbd1cee82fd68a6fb608b1a727f8'
'4a16659dae5154aad09df16bc18f0b103231d402c99d01d67069f7e4b497814241d0891f96f123448d0a60f49c6cbbb7156f38621cf4797ba0c52ab978ca154c')
MAKEFLAGS="-j2"
'd6f014d2778decde268b9e856d812bc61f7c45986aad751e44fdece39aa8a96505b77e0b917ea38880501497e01d4b051a6f3205c82af653425b5247cd813417')
_scons_args=(
--use-system-boost
@ -60,36 +39,20 @@ _scons_args=(
--use-system-snappy
--use-system-yaml
--use-system-zlib
--use-system-wiredtiger
--use-sasl-client
--ssl
--disable-warnings-as-errors
--mmapv1=on
# Force mmapv1 to be compiled in - By default mmapv1 is disabled due to this commit : https://github.com/mongodb/mongo/commit/ff8061cd1d97e99f141b02a7fe36e83f302b909c
# --use-system-asio # https://jira.mongodb.org/browse/SERVER-21839
# --use-system-v8 # Doesn't compile
# --use-system-tcmalloc # Disabled as upstream suggests in https://jira.mongodb.org/browse/SERVER-17447?focusedCommentId=841890&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-841890
)
if [ "$CARCH" == "x86_64" ]; then
_scons_args+=(--use-system-wiredtiger)
else
# WiredTiger must be disabled manually when building for i686
_scons_args+=(--wiredtiger=off)
fi
prepare() {
cd mongodb-src-r${pkgver}
patch -Np1 -i ../boost160.patch
patch -Np1 -i ../mongodb-3.2.10-boost-1.62.0.patch
patch -Np1 -i ../mongodb-3.2.10-network_interface_asio_integration_test.patch
sed -e 's|-std=c++11|-std=gnu++11|g' -i SConstruct # tests use hex floats, not supported in plain C++
patch -p1 -i ../0001-mozjs-platform-support-for-ARM.patch
patch -p1 -i ../0002-issue-693-convert-sys_futex-to-it-s-6-arg-form.patch
patch -p1 -i ../0003-issue-693-enable-futex-usage-on-arm.patch
patch -p1 -i ../0004-use-gnu-11-instead-of-c-11.patch
patch -p1 -i ../0005-fix-options_parser-segfault.patch
}
build() {
@ -108,18 +71,11 @@ check() {
scons unittests "${_scons_args[@]}"
LANG=en_US.UTF-8 python2 buildscripts/resmoke.py --suites=unittests
# Specifying --storageEngine is needed for i686
if [ "$CARCH" == "i686" ]; then
_storageEngine="--storageEngine=mmapv1"
else
_storageEngine=""
fi
scons dbtest "${_scons_args[@]}"
python2 buildscripts/resmoke.py --suites=dbtest $_storageEngine
python2 buildscripts/resmoke.py --suites=dbtest
scons integration_tests "${_scons_args[@]}"
python2 buildscripts/resmoke.py --suites=integration_tests_replset,integration_tests_standalone --dbpathPrefix="$srcdir" $_storageEngine
python2 buildscripts/resmoke.py --suites=integration_tests_replset,integration_tests_standalone --dbpathPrefix="$srcdir"
}
package() {

View file

@ -6,4 +6,3 @@ quiet = true
dbpath = /var/lib/mongodb
logpath = /var/log/mongodb/mongod.log
logappend = true
storageEngine = mmapv1