From 11de19231cd990e2700f20635f3413f8d2be3016 Mon Sep 17 00:00:00 2001 From: Filipp Andronov Date: Sat, 16 May 2015 21:43:04 +0700 Subject: 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 --- testing/mongodb/20-fix-libc-version.patch | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 testing/mongodb/20-fix-libc-version.patch (limited to 'testing/mongodb/20-fix-libc-version.patch') 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 + #include + #include +-#include ++#ifdef __GLIBC__ ++# include ++#else ++# define gnu_get_libc_version(x) "unknown" ++#endif + #include + + #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); -- cgit v1.2.3