summaryrefslogtreecommitdiff
path: root/community/mongodb
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-04-13 11:58:27 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-04-13 11:58:27 -0300
commit8e5c27c1b5d01d353df2542166d50f9f456b2597 (patch)
tree227eed66652cffc0e872b75e7fe601cb23214cdb /community/mongodb
parent394988e4c3a3ab21e5d79481ac3f3295045af987 (diff)
parent7ff5465d0386f06bea97ef956397c305d6f7e07f (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/smalltalk/PKGBUILD extra/crypto++/PKGBUILD extra/libpciaccess/PKGBUILD extra/postfix/PKGBUILD extra/samba/PKGBUILD extra/xorg-server/PKGBUILD libre/gstreamer0.10-bad-libre/PKGBUILD multilib/gcc-multilib/PKGBUILD multilib/lib32-libpciaccess/PKGBUILD
Diffstat (limited to 'community/mongodb')
-rw-r--r--community/mongodb/0001-Backport-for-mongodb-2.0.4-Ignore-fork-and-logpath-w.patch38
-rw-r--r--community/mongodb/0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch43
-rw-r--r--community/mongodb/PKGBUILD18
3 files changed, 95 insertions, 4 deletions
diff --git a/community/mongodb/0001-Backport-for-mongodb-2.0.4-Ignore-fork-and-logpath-w.patch b/community/mongodb/0001-Backport-for-mongodb-2.0.4-Ignore-fork-and-logpath-w.patch
new file mode 100644
index 000000000..40dd48b42
--- /dev/null
+++ b/community/mongodb/0001-Backport-for-mongodb-2.0.4-Ignore-fork-and-logpath-w.patch
@@ -0,0 +1,38 @@
+From 3f6b2390102ea9d808c7075b5aaeec743b7d104e Mon Sep 17 00:00:00 2001
+From: Thomas Dziedzic <gostrc@gmail.com>
+Date: Tue, 10 Apr 2012 19:30:35 -0500
+Subject: [PATCH 1/2] Backport for mongodb 2.0.4 "Ignore --fork and --logpath
+ when using --shutdown SERVER-5186 SERVER-5187"
+
+https://github.com/mongodb/mongo/commit/fa2e2ef95c5c934eef63fff4b98d5eb060c5653923
+
+Backported in preparation for backporting the fix for https://jira.mongodb.org/browse/SERVER-5358
+---
+ db/cmdline.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/db/cmdline.cpp b/db/cmdline.cpp
+index fd759a7..346a9ae 100644
+--- a/db/cmdline.cpp
++++ b/db/cmdline.cpp
+@@ -239,7 +239,7 @@ namespace mongo {
+ cmdLine.noUnixSocket = true;
+ }
+
+- if (params.count("fork")) {
++ if (params.count("fork") && !params.count("shutdown")) {
+ if ( ! params.count( "logpath" ) ) {
+ cout << "--fork has to be used with --logpath" << endl;
+ ::exit(-1);
+@@ -304,7 +304,7 @@ namespace mongo {
+ }
+
+ #endif
+- if (params.count("logpath")) {
++ if (params.count("logpath") && !params.count("shutdown")) {
+ if ( logpath.size() == 0 )
+ logpath = params["logpath"].as<string>();
+ uassert( 10033 , "logpath has to be non-zero" , logpath.size() );
+--
+1.7.10
+
diff --git a/community/mongodb/0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch b/community/mongodb/0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch
new file mode 100644
index 000000000..aff066450
--- /dev/null
+++ b/community/mongodb/0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch
@@ -0,0 +1,43 @@
+From 77f78f64c192572e6eb956b0fe28ecd975ff6461 Mon Sep 17 00:00:00 2001
+From: Thomas Dziedzic <gostrc@gmail.com>
+Date: Tue, 10 Apr 2012 19:38:58 -0500
+Subject: [PATCH 2/2] Backport for mongodb 2.0.4 "Don't check /proc/pid/exe in
+ --shutdown SERVER-5358"
+
+Backported to fix https://jira.mongodb.org/browse/SERVER-5358
+
+https://github.com/mongodb/mongo/commit/c28d97d1a14a36ffc056bfd9ba7262b0a1509b5b
+---
+ db/db.cpp | 16 ----------------
+ 1 file changed, 16 deletions(-)
+
+diff --git a/db/db.cpp b/db/db.cpp
+index b1d1db8..0a21f4d 100644
+--- a/db/db.cpp
++++ b/db/db.cpp
+@@ -989,22 +989,6 @@ int main(int argc, char* argv[]) {
+ procPath = (str::stream() << "/proc/" << pid);
+ if (!boost::filesystem::exists(procPath))
+ failed = true;
+-
+- string exePath = procPath + "/exe";
+- if (boost::filesystem::exists(exePath)){
+- char buf[256];
+- int ret = readlink(exePath.c_str(), buf, sizeof(buf)-1);
+- buf[ret] = '\0'; // readlink doesn't terminate string
+- if (ret == -1) {
+- int e = errno;
+- cerr << "Error resolving " << exePath << ": " << errnoWithDescription(e);
+- failed = true;
+- }
+- else if (!endsWith(buf, "mongod")){
+- cerr << "Process " << pid << " is running " << buf << " not mongod" << endl;
+- ::exit(-1);
+- }
+- }
+ }
+ catch (const std::exception& e){
+ cerr << "Error reading pid from lock file [" << name << "]: " << e.what() << endl;
+--
+1.7.10
+
diff --git a/community/mongodb/PKGBUILD b/community/mongodb/PKGBUILD
index 5b374bf03..7a50d2c83 100644
--- a/community/mongodb/PKGBUILD
+++ b/community/mongodb/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 68267 2012-03-21 01:53:53Z tdziedzic $
+# $Id: PKGBUILD 69242 2012-04-11 01:32:02Z tdziedzic $
# Maintainer: Thomas Dziedzic < gostrc at gmail >
# Contributor: Mathias Stearn <mathias@10gen.com>
# Contributor: Alec Thomas
pkgname=mongodb
pkgver=2.0.4
-pkgrel=1
+pkgrel=3
pkgdesc='A high-performance, open source, schema-free document-oriented database.'
arch=('i686' 'x86_64' 'mips64el')
url='http://www.mongodb.org'
@@ -18,16 +18,26 @@ backup=('etc/mongodb.conf')
install="mongodb.install"
source=("http://downloads.mongodb.org/src/mongodb-src-r${pkgver}.tar.gz"
'mongodb.rc'
- 'mongodb.conf')
+ 'mongodb.conf'
+ '0001-Backport-for-mongodb-2.0.4-Ignore-fork-and-logpath-w.patch'
+ '0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch')
md5sums=('099bc701a3d190a040123c58958e8f67'
'9c67e00f4626ad761a8f7d4e037a54d7'
- '4839fe1d638187ca3226e8267b947318')
+ '4839fe1d638187ca3226e8267b947318'
+ 'fdbf06b005b3a73a2b6caca257ec8f64'
+ '659f6538f1ee3292809f638a4a37cbad')
build() {
export SCONSFLAGS="$MAKEFLAGS"
cd mongodb-src-r${pkgver}
+ # 0001 suggested to backport along with 0002
+ # 0002 backported for https://jira.mongodb.org/browse/SERVER-5358
+ # also fixes https://bugs.archlinux.org/task/29050
+ patch -Np1 -i ${srcdir}/0001-Backport-for-mongodb-2.0.4-Ignore-fork-and-logpath-w.patch
+ patch -Np1 -i ${srcdir}/0002-Backport-for-mongodb-2.0.4-Don-t-check-proc-pid-exe-.patch
+
# fix python name for smoke tests
#sed \
# -e 's/python/&2/' \