mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
community/mongodb fixes
This commit is contained in:
parent
de0aacc006
commit
d3ced80b6e
6 changed files with 2234 additions and 4 deletions
2062
community/mongodb/0001-mozjs-platform-support-for-ARM.patch
Normal file
2062
community/mongodb/0001-mozjs-platform-support-for-ARM.patch
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,34 @@
|
||||||
|
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
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
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
|
||||||
|
|
26
community/mongodb/0004-use-gnu-11-instead-of-c-11.patch
Normal file
26
community/mongodb/0004-use-gnu-11-instead-of-c-11.patch
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
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
|
||||||
|
|
25
community/mongodb/0005-fix-options_parser-segfault.patch
Normal file
25
community/mongodb/0005-fix-options_parser-segfault.patch
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
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
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
# - build -j2 (RAM constraints)
|
# - build -j2 (RAM constraints)
|
||||||
# - use system v8 (older 3.16 package)
|
# - patches
|
||||||
|
|
||||||
pkgname=mongodb
|
pkgname=mongodb
|
||||||
pkgver=3.2.0
|
pkgver=3.2.0
|
||||||
|
@ -16,7 +16,7 @@ pkgdesc='A high-performance, open source, schema-free document-oriented database
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url='http://www.mongodb.org'
|
url='http://www.mongodb.org'
|
||||||
license=('AGPL3')
|
license=('AGPL3')
|
||||||
depends=('pcre' 'snappy' 'openssl' 'libsasl' 'boost-libs' 'yaml-cpp' 'v8-3.16')
|
depends=('pcre' 'snappy' 'openssl' 'libsasl' 'boost-libs' 'yaml-cpp')
|
||||||
[[ "$CARCH" == "x86_64" ]] && depends+=('wiredtiger')
|
[[ "$CARCH" == "x86_64" ]] && depends+=('wiredtiger')
|
||||||
makedepends=('scons' 'readline' 'ncurses' 'libpcap' 'boost')
|
makedepends=('scons' 'readline' 'ncurses' 'libpcap' 'boost')
|
||||||
checkdepends=('python2-pymongo' 'python2-yaml')
|
checkdepends=('python2-pymongo' 'python2-yaml')
|
||||||
|
@ -26,11 +26,21 @@ backup=('etc/mongodb.conf')
|
||||||
install=mongodb.install
|
install=mongodb.install
|
||||||
source=("http://downloads.mongodb.org/src/mongodb-src-r${pkgver}.tar.gz"
|
source=("http://downloads.mongodb.org/src/mongodb-src-r${pkgver}.tar.gz"
|
||||||
'boost160.patch'
|
'boost160.patch'
|
||||||
'mongodb.conf' 'mongodb.service')
|
'mongodb.conf' 'mongodb.service'
|
||||||
|
'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=('4b321b582f5ec2613b869b003a02494c8a9e3b772b1f13898417b1e831c204468309a0e1785acd3b85c8a663cae91e55e44f53f8b74bd3a516b1e1471f606882'
|
sha512sums=('4b321b582f5ec2613b869b003a02494c8a9e3b772b1f13898417b1e831c204468309a0e1785acd3b85c8a663cae91e55e44f53f8b74bd3a516b1e1471f606882'
|
||||||
'385c82875174caae433a3b381eb10f98a6fed0c8943788ddefff1de80a898e480bdbbf094a7783285cf2ae11ce3fc6878e57d58183d05be2f0837b206aaa4da6'
|
'385c82875174caae433a3b381eb10f98a6fed0c8943788ddefff1de80a898e480bdbbf094a7783285cf2ae11ce3fc6878e57d58183d05be2f0837b206aaa4da6'
|
||||||
'05dead727d3ea5fe8af1a3c3888693f6b3e2b8cb7f197a5d793352e10d2c524e96c9a5c55ad2e88c1114643a9612ec0b26a2574b48a5260a9b51ec8941461f1c'
|
'05dead727d3ea5fe8af1a3c3888693f6b3e2b8cb7f197a5d793352e10d2c524e96c9a5c55ad2e88c1114643a9612ec0b26a2574b48a5260a9b51ec8941461f1c'
|
||||||
'177251404b2e818ae2b546fe8b13cb76e348c99e85c7bef22a04b0f07b600fd515a309ede50214f4198594388a6d2b31f46e945b9dae84aabb4dfa13b1123bb9')
|
'177251404b2e818ae2b546fe8b13cb76e348c99e85c7bef22a04b0f07b600fd515a309ede50214f4198594388a6d2b31f46e945b9dae84aabb4dfa13b1123bb9'
|
||||||
|
'9877ef788fd1170337ef6da267d8fb624f74c59eb98533753d4db9ff841f562e81cbb3ee36431ea11cee4f9354876426bc24edaa68dd43ef2b1f5e5111395696'
|
||||||
|
'12c56405bed46f8d607ea46dfce07d567dfb4cfc16c06b8a3fc07c41d72d377aeba16a5bbc6a53962b24cc5524500b28ff736b59fe7e558ca638ffa2c0fd4a71'
|
||||||
|
'c6e50c4b1e59614309ef989bbff102394fd9d424c0f4af16917194662b744fc7a5a05e6b04dcdc56632dc6260d46d286bad7ed0b360cad79ee4c15f4d0e61035'
|
||||||
|
'787729236ab1dba3c302211a5220995f413fed220eb05e327d2f41612a9ae3f460ea0c141deeb2e887a022b4ddfc8fe1ac5ccbd1cee82fd68a6fb608b1a727f8'
|
||||||
|
'4a16659dae5154aad09df16bc18f0b103231d402c99d01d67069f7e4b497814241d0891f96f123448d0a60f49c6cbbb7156f38621cf4797ba0c52ab978ca154c')
|
||||||
|
|
||||||
MAKEFLAGS="-j2"
|
MAKEFLAGS="-j2"
|
||||||
|
|
||||||
|
@ -58,6 +68,11 @@ fi
|
||||||
prepare() {
|
prepare() {
|
||||||
cd mongodb-src-r${pkgver}
|
cd mongodb-src-r${pkgver}
|
||||||
patch -Np1 -i ../boost160.patch
|
patch -Np1 -i ../boost160.patch
|
||||||
|
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() {
|
build() {
|
||||||
|
|
Loading…
Reference in a new issue