aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mongodb/20-fix-libc-version.patch
diff options
context:
space:
mode:
authorFilipp Andronov <filipp.andronov@gmail.com>2015-05-16 21:43:04 +0700
committerBartłomiej Piotrowski <b@bpiotrowski.pl>2015-06-27 20:36:57 +0200
commit11de19231cd990e2700f20635f3413f8d2be3016 (patch)
treefe20a325ab539873980542185d8233ada2b192a9 /testing/mongodb/20-fix-libc-version.patch
parentfe594b5019dc0a4d2abd0e30a61d4f695e9737c8 (diff)
downloadaports-11de19231cd990e2700f20635f3413f8d2be3016.tar.bz2
aports-11de19231cd990e2700f20635f3413f8d2be3016.tar.xz
testing/mongodb: new aport
Things to be complete: 1. Build is only for x86_64, because I have to made a few hacks in code. Most critical one is __ELF_NATIVE_CLASS 2. No tc-malloc. It doesnt build, so system allocator instead. Im working on gpreftools package... 3. No heap usage statistics: always returns 0. It is broken in mongodb for 64bit architecture and also musl mallocinfo is not compatible with glibc. So I just comment out heap reporting code, see comments in APKBUILD 4. Use more system libs, yaml & boost are from the top of my mind. Boost make compilation fails, but should be easy to fix 5. Enable mongodb tests during build. Im just not sure how that should be done in Alpine, i.e _where_ in build lifecycle tests should run
Diffstat (limited to 'testing/mongodb/20-fix-libc-version.patch')
-rw-r--r--testing/mongodb/20-fix-libc-version.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/testing/mongodb/20-fix-libc-version.patch b/testing/mongodb/20-fix-libc-version.patch
new file mode 100644
index 0000000000..bf1aba081a
--- /dev/null
+++ b/testing/mongodb/20-fix-libc-version.patch
@@ -0,0 +1,37 @@
+--- orig/mongodb-src-r3.0.2/src/mongo/util/processinfo_linux2.cpp
++++ mongodb-src-r3.0.2/src/mongo/util/processinfo_linux2.cpp
+@@ -34,7 +34,11 @@
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/mman.h>
+-#include <gnu/libc-version.h>
++#ifdef __GLIBC__
++# include <gnu/libc-version.h>
++#else
++# define gnu_get_libc_version(x) "unknown"
++#endif
+ #include <sys/utsname.h>
+
+ #include "processinfo.h"
+@@ -314,6 +318,7 @@
+ paths.push_back( "/etc/slackware-version" );
+ paths.push_back( "/etc/centos-release" );
+ paths.push_back( "/etc/os-release" );
++ paths.push_back( "/etc/alpine-release" );
+
+ for ( i = paths.begin(); i != paths.end(); ++i ) {
+ // for each path
+@@ -398,8 +403,11 @@
+
+ void ProcessInfo::getExtraInfo( BSONObjBuilder& info ) {
+ // [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*/);
++ //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*/);
++
++ // TODO: Fix for TC_malloc instance().getStats()
++ info.append("heap_usage_bytes", 0);
+ //docs claim hblkhd is included in uordblks but it isn't
+
+ LinuxProc p(_pid);