~alpine/aports

[alpine-aports] [PATCH] testing/mongodb: upgrade to version 3.4.3

Marc Vertes <mvertes@free.fr>
Details
Message ID
<20170416165826.15927-1-mvertes@free.fr>
Sender timestamp
1492361906
DKIM signature
missing
Download raw message
Patch: +53 -74
---
 testing/mongodb/20-fix-libc-version.patch   | 41 -----------------------------
 testing/mongodb/APKBUILD                    | 40 +++++-----------------------
 testing/mongodb/fix-log.patch               | 13 +++++++++
 testing/mongodb/fix-processinfo_linux.patch | 33 +++++++++++++++++++++++
 4 files changed, 53 insertions(+), 74 deletions(-)
 delete mode 100644 testing/mongodb/20-fix-libc-version.patch
 create mode 100644 testing/mongodb/fix-log.patch
 create mode 100644 testing/mongodb/fix-processinfo_linux.patch

diff --git a/testing/mongodb/20-fix-libc-version.patch b/testing/mongodb/20-fix-libc-version.patch
deleted file mode 100644
index 1f7b517c94..0000000000
--- a/testing/mongodb/20-fix-libc-version.patch
@@ -1,41 +0,0 @@
diff --git a/src/mongo/util/processinfo_linux2.cpp b/src/mongo/util/processinfo_linux2.cpp
index d1ed23a..0c1011e 100644
--- a/src/mongo/util/processinfo_linux.cpp
+++ b/src/mongo/util/processinfo_linux.cpp
@@ -335,6 +335,7 @@ public:
         paths.push_back("/etc/debian_release");
         paths.push_back("/etc/slackware-version");
         paths.push_back("/etc/centos-release");
+        paths.push_back("/etc/alpine-release");
         paths.push_back("/etc/os-release");
 
         for (i = paths.begin(); i != paths.end(); ++i) {
@@ -421,10 +422,10 @@ double ProcessInfo::getSystemMemoryPressurePercentage() {
 
 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)
+    // 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);
--- ./src/mongo/util/processinfo_linux.cpp.orig
+++ ./src/mongo/util/processinfo_linux.cpp
@@ -37,8 +37,10 @@
 #include <sys/utsname.h>
 #ifdef __UCLIBC__
 #include <features.h>
-#else
+#elif defined(__GLIBC__)
 #include <gnu/libc-version.h>
+#else
+#define gnu_get_libc_version(x) "unknown"
 #endif
 
 #include "processinfo.h"
diff --git a/testing/mongodb/APKBUILD b/testing/mongodb/APKBUILD
index 1d2301ee2f..0282d5f389 100644
--- a/testing/mongodb/APKBUILD
+++ b/testing/mongodb/APKBUILD
@@ -1,8 +1,8 @@
# Maintainer: Filipp Andronov <filipp.andronov@gmail.com>
# Contributor: Marc Vertes <marc.vertes@ugrid.net>
pkgname=mongodb
pkgver=3.2.10
pkgrel=1
pkgver=3.4.3
pkgrel=0
pkgdesc='A high-performance, open source, schema-free document-oriented database'
url='http://www.mongodb.org'
arch='x86_64'
@@ -13,10 +13,11 @@ makedepends="scons paxmark libressl-dev pcre-dev snappy-dev boost-dev asio-dev
	libpcap-dev wiredtiger-dev zlib-dev cyrus-sasl-dev yaml-cpp-dev"
install="$pkgname.pre-install"
source="http://downloads.mongodb.org/src/mongodb-src-r${pkgver}.tar.gz
	20-fix-libc-version.patch
	40-fix-elf-native-class.patch
	backtrace.patch
	fix-asio-strerror_r.patch
	fix-log.patch
	fix-processinfo_linux.patch
	set-default-stacksize.patch
	wiredtiger-strtouq.patch
	boost160.patch
@@ -98,39 +99,12 @@ package() {
	install -Dm644 "$srcdir/mongos.confd" "$pkgdir/etc/conf.d/mongos"
}

md5sums="a7ade13ff46add5544d285a04be24c22  mongodb-src-r3.2.10.tar.gz
7806ba5e8af9b6f99e8d88edd31e4b49  20-fix-libc-version.patch
04a348397be8ca7471d404056d8a1490  40-fix-elf-native-class.patch
86a988b5d4402227d177b8a1167008e8  backtrace.patch
cd0833592e3a23e729ebd71eb756318c  fix-asio-strerror_r.patch
2d4de6cff2918ad610efead9f7c85f4f  set-default-stacksize.patch
e6016216b02afd44164e17ae31e3ce7d  wiredtiger-strtouq.patch
1df24dc2aa6b8f4c6da22f097a921ebb  boost160.patch
79cfc7e792d1e8e30cc203a8c63ac65b  boost162.patch
7d2f94bed7bfacd32fcd52dfd931f077  mongodb.confd
792a0b53b3e843cf14176c5beb8cdfe1  mongodb.initd
49df78833de4cb6e2b9b1ab9da52c3ac  mongodb.logrotate
33b23ee722f6e5d15eb6d9c2723a346f  mongos.confd
28611e6796d71c21661dd3d7ee8f23b8  mongos.initd"
sha256sums="3bef44f50f302159c26194bcac9d51c81d98d57ea728f55400774850a70f5120  mongodb-src-r3.2.10.tar.gz
74bf7d84584e038076581d2a7f7c1aedcd80bcdf25247ce905e9c36907272b62  20-fix-libc-version.patch
3a863660113d29728d7a852b3fba73926697b496848f8ccc4d8e73e6614cfdfc  40-fix-elf-native-class.patch
300d9f6b819730de54018d4b418eb7f921ba9c83fad4958a040544b076160848  backtrace.patch
ec6d404221f02706ef2e52e00e414e98666dcc3606e78c9b3d33dfbd42a1eae7  fix-asio-strerror_r.patch
85f2e5c5de90e43446ad3a13d661c211deb64cfce9e639ba1c2fa2a4573414ae  set-default-stacksize.patch
20c465ae169e5e3642ca0c8486b2165a412dabe171e8e249c134e0a4688342a4  wiredtiger-strtouq.patch
0e9da35f4303e53daf51e78961c517895f2d12f4fa49298f01e1665e15246d73  boost160.patch
bf373d1514b7947dc4747e11babf87a4bd8e7d581781c6771a844e69c1c4d273  boost162.patch
a4ca29c577428c02cd0b0a8b46756df5f53a05519c9d13c270533cf99b9b819d  mongodb.confd
7e39fbd4dc18dba21c8767931683f4795e58e0e91b9f9a5842539923ded453c9  mongodb.initd
76994c32d999def5c925bd7be3f96687b3406f1d67b89aa6a4df8053025b1e01  mongodb.logrotate
2afd582564623da0e928ca667d37bef467334c82d08b49301f1f6c16ba177767  mongos.confd
1c48327b02bb9e1aaacaa39a4c0e9976a765a0ab0992d4e27cc4c36a33fefe2d  mongos.initd"
sha512sums="b9592c7cb0184ae10e1e7092b3fa0fc52b10acef1d7beffb2c2409867e237042d7765cc7191972ded10c278756cde1ff7b23b57fb7efd8363e18f2ce994985e9  mongodb-src-r3.2.10.tar.gz
b9fdacb273d5a4e1e60735846b262287f84ca6cbded9393d182f69158d3162a50cae5d834f76860dcb7e965a04f5fb510d32f0757d5343168eb15f6610f05e59  20-fix-libc-version.patch
sha512sums="e2fb5fc2f02e9dbca6c30d2e2aaf1569180ca15198226cdad46f47f44905293afe77763fe2e5c9add0b5bcbd62b7ce7905fb183068c0738cdeeae8d39f848cef  mongodb-src-r3.4.3.tar.gz
56db8f43afc94713ac65b174189e2dd903b5e1eff0b65f1bdac159e52ad4de6606c449865d73bd47bffad6a8fc339777e2b11395596e9a476867d94a219c7925  40-fix-elf-native-class.patch
7d097f497cb910c9cb81086cd8c222e43456d1a6de4adfe3e97a4d99add454279350fdeb7305dab84b3deca04afd824036d4065ee0fb8cdd8c03e96d98ee86af  backtrace.patch
f829b1ad542db3ee776d444243b8b47ab4e48a7386d9b199d7b1adafd31556cf173a5683b78ee735d6a69999ad9af5ad152fde955bbe8865f7910718991ce97c  fix-asio-strerror_r.patch
9e109a9131e8466496e94f7046e13fd40ec750c8de703e31d65cf3f6e80830e67e1438debaefc0e1150fe2bb08dbb42cf95890c51e9d98f354cfbb396500b5d4  fix-log.patch
026d20fa1a0f1e27150b833664300250386d7e0d73c0778f81f70242e93e8a16e5607716693bbcdd1efb328fa84c7284e2c6c7e1ac92259b97a9d402975cf709  fix-processinfo_linux.patch
1492137b0e3456d90a79617c1cd5ead5c71b1cfaae9ee41c75d56cd25f404ec73a690f95ce0d8c064c0a14206daca8070aa769b7cdfa904a338a425b52c293fa  set-default-stacksize.patch
bbb323d428d59584703e8692bf4df7fe0d37c0324c23822bade2edd1ca78759191f778230b7107502a9d2f7f22afc84d4ea350139fc1d751ceb2fff219b9ddf8  wiredtiger-strtouq.patch
385c82875174caae433a3b381eb10f98a6fed0c8943788ddefff1de80a898e480bdbbf094a7783285cf2ae11ce3fc6878e57d58183d05be2f0837b206aaa4da6  boost160.patch
diff --git a/testing/mongodb/fix-log.patch b/testing/mongodb/fix-log.patch
new file mode 100644
index 0000000000..e7bc8bef5d
--- /dev/null
+++ b/testing/mongodb/fix-log.patch
@@ -0,0 +1,13 @@
--- a/src/mongo/util/log.cpp
+++ b/src/mongo/util/log.cpp
@@ -101,9 +101,7 @@
     char buf[kBuflen];
     char* msg{nullptr};
 
-#if defined(__GNUC__) && defined(_GNU_SOURCE)
-    msg = strerror_r(errNumber, buf, kBuflen);
-#elif defined(_WIN32)
+#if defined(_WIN32)
 
     LPWSTR errorText = nullptr;
     FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER |
diff --git a/testing/mongodb/fix-processinfo_linux.patch b/testing/mongodb/fix-processinfo_linux.patch
new file mode 100644
index 0000000000..0c07fa4c81
--- /dev/null
+++ b/testing/mongodb/fix-processinfo_linux.patch
@@ -0,0 +1,33 @@
--- a/src/mongo/util/processinfo_linux.cpp
+++ b/src/mongo/util/processinfo_linux.cpp
@@ -40,11 +40,11 @@
 #include <sys/mman.h>
 #include <sys/utsname.h>
 #include <unistd.h>
-#ifdef __UCLIBC__
+//#ifdef __UCLIBC__
 #include <features.h>
-#else
-#include <gnu/libc-version.h>
-#endif
+//#else
+//#include <gnu/libc-version.h>
+//#endif
 
 #include <boost/filesystem.hpp>
 #include <boost/none.hpp>
@@ -487,13 +487,9 @@
 
     BSONObjBuilder bExtra;
     bExtra.append("versionString", LinuxSysHelper::readLineFromFile("/proc/version"));
-#ifdef __UCLIBC__
     stringstream ss;
-    ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__;
+    ss << "musl-1.1.16";
     bExtra.append("libcVersion", ss.str());
-#else
-    bExtra.append("libcVersion", gnu_get_libc_version());
-#endif
     if (!verSig.empty())
         // optional
         bExtra.append("versionSignature", verSig);
-- 
2.12.2



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)