update to MongoDB 3.2.6, from Andrew Aldridge, minor tweaks from me
This commit is contained in:
parent
eeddf985f6
commit
9210c90d8d
@ -1,59 +1,76 @@
|
||||
# $OpenBSD: Makefile,v 1.18 2015/05/18 11:29:37 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.19 2016/05/06 15:33:37 sthen Exp $
|
||||
|
||||
PORTROACH = limitw:1,even
|
||||
|
||||
#atomic_int.h: error "unsupported compiler or platform" on other archs
|
||||
ONLY_FOR_ARCHS = i386 amd64
|
||||
# The default storage engine (WiredTiger) only works on amd64.
|
||||
ONLY_FOR_ARCHS = amd64
|
||||
DPB_PROPERTIES = parallel
|
||||
|
||||
COMMENT = scalable, high-performance document-oriented database
|
||||
|
||||
DISTNAME = mongodb-src-r2.6.4
|
||||
DISTNAME = mongodb-src-r3.2.6
|
||||
PKGNAME = ${DISTNAME:S/src-r//}
|
||||
REVISION = 0
|
||||
CATEGORIES = databases
|
||||
|
||||
HOMEPAGE = http://www.mongodb.org/
|
||||
|
||||
# Apache 2.0 + AGPLv3
|
||||
# mongodb itself: AGPLv3
|
||||
# client/utils: Apache 2.0
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
||||
WANTLIB = boost_filesystem-mt boost_program_options-mt boost_system-mt \
|
||||
boost_thread-mt c execinfo m pcap pcre pcrecpp pthread \
|
||||
stdc++ v8 yaml-cpp
|
||||
WANTLIB += boost_chrono-mt boost_filesystem-mt boost_program_options-mt
|
||||
WANTLIB += boost_regex-mt boost_system-mt boost_thread-mt c execinfo
|
||||
WANTLIB += kvm m pcap pcre pcrecpp pthread yaml-cpp z
|
||||
|
||||
MASTER_SITES = http://downloads.mongodb.org/src/
|
||||
|
||||
MODULES = devel/scons
|
||||
MODSCONS_FLAGS = --prefix="${PREFIX}" \
|
||||
--cpppath="${LOCALBASE}/include/nspr" \
|
||||
--extralib="pcrecpp" \
|
||||
--usev8 \
|
||||
--sharedclient \
|
||||
--full \
|
||||
--use-system-pcre \
|
||||
--use-system-boost \
|
||||
--use-system-v8 \
|
||||
--use-system-yaml
|
||||
MODULES = gcc4 \
|
||||
devel/scons \
|
||||
lang/python
|
||||
|
||||
MAKE_ENV += HOME="${HOME}" \
|
||||
TERM="${TERM}" \
|
||||
CXXFLAGS="$(CXXFLAGS)" \
|
||||
LIBmongoclient_VERSION="${LIBmongoclient_VERSION}"
|
||||
LIB_DEPENDS = devel/boost \
|
||||
devel/libexecinfo \
|
||||
# XXX should come from scons module, but broken when gcc module also used:
|
||||
NO_CCACHE = Yes
|
||||
|
||||
MODGCC4_ARCHS = *
|
||||
MODGCC4_LANGS = c c++
|
||||
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2}
|
||||
ALL_TARGET = core tools
|
||||
MODSCONS_ENV = CC="${CC}" \
|
||||
CXX="${CXX}" \
|
||||
CCFLAGS="${CFLAGS} -DBOOST_NO_USER_CONFIG" \
|
||||
CXXFLAGS="${CXXFLAGS}" \
|
||||
LINKFLAGS="${LDFLAGS}" \
|
||||
CPPPATH="${LOCALBASE}/include" \
|
||||
LIBPATH="${LOCALBASE}/lib"
|
||||
MODSCONS_FLAGS += --prefix="${PREFIX}" \
|
||||
--opt=on \
|
||||
--allocator=system \
|
||||
--use-system-boost \
|
||||
--use-system-pcre \
|
||||
--use-system-yaml \
|
||||
--use-system-zlib \
|
||||
-j${MAKE_JOBS}
|
||||
|
||||
ALL_TARGET = core tools
|
||||
LIB_DEPENDS = devel/libexecinfo \
|
||||
devel/boost \
|
||||
devel/pcre \
|
||||
devel/yaml-cpp \
|
||||
lang/libv8
|
||||
devel/yaml-cpp
|
||||
TEST_DEPENDS = textproc/py-yaml \
|
||||
databases/py-mongo
|
||||
|
||||
do-install:
|
||||
${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKSRC} \
|
||||
${MODSCONS_ENV} ${MODSCONS_FLAGS} ${INSTALL_TARGET}
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mongodb
|
||||
${INSTALL_DATA} ${FILESDIR}/mongodb.conf \
|
||||
${PREFIX}/share/examples/mongodb
|
||||
|
||||
# Regression tests require at least 256 file descriptors and ~700MB
|
||||
do-test:
|
||||
@${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKSRC} \
|
||||
${MODSCONS_ENV} ${MODSCONS_FLAGS} test && \
|
||||
${WRKSRC}/test --dbpath ${WRKSRC}/unittest
|
||||
${MODSCONS_ENV} ${MODSCONS_FLAGS} unittests
|
||||
cd ${WRKSRC} && ${MODPY_BIN} buildscripts/resmoke.py --suites=unittests
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (mongodb-src-r2.6.4.tar.gz) = B1QRpWD123QHAyuWLrtdoWoMypNuqCp9JkOUtNjLmcA=
|
||||
SIZE (mongodb-src-r2.6.4.tar.gz) = 14491215
|
||||
SHA256 (mongodb-src-r3.2.6.tar.gz) = BBWptQP2LkDSuof1VbVTdXoU+sKB0dalg9jYgLhyCSE=
|
||||
SIZE (mongodb-src-r3.2.6.tar.gz) = 29750170
|
||||
|
@ -1,23 +1,20 @@
|
||||
# $OpenBSD: mongodb.conf,v 1.1.1.1 2011/06/02 00:26:32 fgsch Exp $
|
||||
# $OpenBSD: mongodb.conf,v 1.2 2016/05/06 15:33:37 sthen Exp $
|
||||
|
||||
# Sample configuration. See mongod --help for more information.
|
||||
#
|
||||
# Note: To disable flag parameters comment them out or remove the line.
|
||||
# Sample configuration. See
|
||||
# https://docs.mongodb.org/manual/administration/configuration/
|
||||
# for details.
|
||||
|
||||
# Location of the database files.
|
||||
dbpath = /var/mongodb/data
|
||||
|
||||
# Specific IP address that mongod will listen on.
|
||||
bind_ip = 127.0.0.1
|
||||
|
||||
# Full filename path to where log messages will be written.
|
||||
logpath = /var/log/mongodb/mongodb.log
|
||||
|
||||
# Append to the existing log file
|
||||
logappend =
|
||||
|
||||
# Run in the background. Output will be redirected to logpath.
|
||||
fork =
|
||||
|
||||
# Enable simple read-only REST interface
|
||||
rest =
|
||||
processManagement:
|
||||
fork: true
|
||||
net:
|
||||
# Only listen on the local network interface. Change this only if you
|
||||
# need a public-facing instance and have turned on authorization.
|
||||
bindIp: 127.0.0.1
|
||||
storage:
|
||||
dbPath: /var/mongodb/data
|
||||
journal:
|
||||
enabled: true
|
||||
systemLog:
|
||||
destination: file
|
||||
path: /var/log/mongodb/mongodb.log
|
||||
logAppend: true
|
||||
|
@ -1,48 +1,11 @@
|
||||
$OpenBSD: patch-SConstruct,v 1.5 2014/12/10 19:59:29 dcoppa Exp $
|
||||
|
||||
Fixup detection of yaml-cpp system library
|
||||
https://github.com/mongodb/mongo/commit/44b0e3591839525a0c951319540488814e5c25fd
|
||||
|
||||
--- SConstruct.orig Fri Aug 8 15:13:51 2014
|
||||
+++ SConstruct Wed Dec 10 09:28:50 2014
|
||||
@@ -814,7 +814,6 @@ if nix:
|
||||
# -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
|
||||
env.Append( CCFLAGS=["-fPIC",
|
||||
"-fno-strict-aliasing",
|
||||
- "-ggdb",
|
||||
"-pthread",
|
||||
"-Wall",
|
||||
"-Wsign-compare",
|
||||
@@ -828,6 +827,7 @@ if nix:
|
||||
$OpenBSD: patch-SConstruct,v 1.6 2016/05/06 15:33:37 sthen Exp $
|
||||
--- SConstruct.orig Sat Apr 30 18:18:21 2016
|
||||
+++ SConstruct Sat Apr 30 18:20:28 2016
|
||||
@@ -831,6 +831,7 @@ envDict = dict(BUILD_ROOT=buildDir,
|
||||
INSTALL_DIR=installDir,
|
||||
CONFIG_HEADER_DEFINES={},
|
||||
LIBDEPS_TAG_EXPANSIONS=[],
|
||||
+ ENV = {'PATH': os.environ['PATH']},
|
||||
)
|
||||
|
||||
env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
|
||||
env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
|
||||
+ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
|
||||
env.Append( LINKFLAGS=["-fPIC", "-pthread"] )
|
||||
|
||||
# SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
|
||||
@@ -859,14 +859,9 @@ if nix:
|
||||
env.Append( CPPDEFINES=["MONGO_GCOV"] )
|
||||
env.Append( LINKFLAGS=" -fprofile-arcs -ftest-coverage " )
|
||||
|
||||
- if optBuild:
|
||||
- env.Append( CCFLAGS=["-O3"] )
|
||||
- else:
|
||||
- env.Append( CCFLAGS=["-O0"] )
|
||||
-
|
||||
if debugBuild:
|
||||
if not optBuild:
|
||||
- env.Append( CCFLAGS=["-fstack-protector"] )
|
||||
+ env.Append( CCFLAGS=["-fstack-protector", "-ggdb"] )
|
||||
env.Append( LINKFLAGS=["-fstack-protector"] )
|
||||
env.Append( SHLINKFLAGS=["-fstack-protector"] )
|
||||
env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
|
||||
@@ -1352,7 +1347,7 @@ def doConfigure(myenv):
|
||||
conf.FindSysLibDep("stemmer", ["stemmer"])
|
||||
|
||||
if use_system_version_of_library("yaml"):
|
||||
- conf.FindSysLibDep("yaml", ["yaml"])
|
||||
+ conf.FindSysLibDep("yaml", ["yaml-cpp"])
|
||||
|
||||
if use_system_version_of_library("boost"):
|
||||
if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ):
|
||||
env = Environment(variables=env_vars, **envDict)
|
||||
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-src_mongo_SConscript,v 1.2 2014/09/16 17:28:07 jasper Exp $
|
||||
--- src/mongo/SConscript.orig Fri Aug 8 22:13:51 2014
|
||||
+++ src/mongo/SConscript Tue Sep 16 16:08:02 2014
|
||||
@@ -1163,7 +1163,7 @@ def installBinary( e, name ):
|
||||
if enforce_glibc:
|
||||
e.AddPostAction( name, checkGlibc )
|
||||
|
||||
- if (solaris or linux) and (not has_option("nostrip")):
|
||||
+ if not has_option("nostrip"):
|
||||
name = e.Command('stripped/%s' % name, name, Copy('$TARGET', '$SOURCE'))[0]
|
||||
e.AddPostAction(name, 'strip $TARGET')
|
||||
|
@ -1,25 +0,0 @@
|
||||
$OpenBSD: patch-src_mongo_platform_random_cpp,v 1.1 2013/12/10 17:30:41 joshe Exp $
|
||||
--- src/mongo/platform/random.cpp.orig Thu Oct 17 11:37:56 2013
|
||||
+++ src/mongo/platform/random.cpp Mon Oct 28 20:21:29 2013
|
||||
@@ -138,6 +138,21 @@ namespace mongo {
|
||||
return new InputStreamSecureRandom( "/dev/urandom" );
|
||||
}
|
||||
|
||||
+#elif defined(__OpenBSD__)
|
||||
+
|
||||
+ class ARC4SecureRandom : public SecureRandom {
|
||||
+ public:
|
||||
+ int64_t nextInt64() {
|
||||
+ int64_t n;
|
||||
+ arc4random_buf(&n, sizeof(n));
|
||||
+ return n;
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
+ SecureRandom* SecureRandom::create() {
|
||||
+ return new ARC4SecureRandom();
|
||||
+ }
|
||||
+
|
||||
#else
|
||||
class SRandSecureRandom : public SecureRandom {
|
||||
public:
|
@ -1,17 +0,0 @@
|
||||
$OpenBSD: patch-src_mongo_shell_linenoise_utf8_h,v 1.1 2015/06/29 08:13:50 jasper Exp $
|
||||
|
||||
From 2d5d662a834fab72ee1431e3bb0a5ed5a0826177 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Benvenuto <mark.benvenuto@mongodb.com>
|
||||
Date: Tue, 19 Aug 2014 15:07:11 -0400
|
||||
Subject: [PATCH] SERVER-8994: Boost 1.56 build fixes
|
||||
|
||||
--- src/mongo/shell/linenoise_utf8.h.orig Sun Jun 28 22:15:05 2015
|
||||
+++ src/mongo/shell/linenoise_utf8.h Sun Jun 28 22:15:18 2015
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include <boost/smart_ptr/scoped_array.hpp>
|
||||
+#include <algorithm>
|
||||
#include <string.h>
|
||||
|
||||
namespace linenoise_utf8 {
|
11
databases/mongodb/patches/patch-src_mongo_util_net_sock_h
Normal file
11
databases/mongodb/patches/patch-src_mongo_util_net_sock_h
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-src_mongo_util_net_sock_h,v 1.1 2016/05/06 15:33:37 sthen Exp $
|
||||
--- src/mongo/util/net/sock.h.orig Mon May 2 00:00:19 2016
|
||||
+++ src/mongo/util/net/sock.h Mon May 2 00:00:34 2016
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#include <errno.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
#include <sys/uio.h>
|
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-src_mongo_util_signal_handlers_synchronous_cpp,v 1.1 2016/05/06 15:33:37 sthen Exp $
|
||||
--- src/mongo/util/signal_handlers_synchronous.cpp.orig Thu Apr 21 16:21:39 2016
|
||||
+++ src/mongo/util/signal_handlers_synchronous.cpp Sun May 1 23:59:28 2016
|
||||
@@ -266,7 +266,7 @@ void abruptQuitWithAddrSignal(int signalNum, siginfo_t
|
||||
MallocFreeOStreamGuard lk{};
|
||||
|
||||
const char* action = (signalNum == SIGSEGV || signalNum == SIGBUS) ? "access" : "operation";
|
||||
- mallocFreeOStream << "Invalid " << action << " at address: " << siginfo->si_addr;
|
||||
+ mallocFreeOStream << "Invalid " << action << " at address: " << reinterpret_cast<void*>(siginfo->si_addr);
|
||||
|
||||
// Writing out message to log separate from the stack trace so at least that much gets
|
||||
// logged. This is important because we may get here by jumping to an invalid address which
|
@ -1,30 +0,0 @@
|
||||
$OpenBSD: patch-src_third_party_s2_base_port_h,v 1.2 2015/05/01 16:51:24 ajacoutot Exp $
|
||||
--- src/third_party/s2/base/port.h.orig Thu Oct 17 11:37:56 2013
|
||||
+++ src/third_party/s2/base/port.h Mon Oct 28 20:57:58 2013
|
||||
@@ -100,6 +100,14 @@ typedef uint16_t u_int16_t;
|
||||
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
#define __BIG_ENDIAN BIG_ENDIAN
|
||||
|
||||
+#elif defined __OpenBSD__
|
||||
+
|
||||
+#include <endian.h>
|
||||
+/* Let's try and follow the Linux convention */
|
||||
+#define __BYTE_ORDER BYTE_ORDER
|
||||
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
+#define __BIG_ENDIAN BIG_ENDIAN
|
||||
+
|
||||
#endif
|
||||
|
||||
#if defined __sunos__ || defined __freebsd__
|
||||
@@ -134,6 +142,11 @@ typedef uint16_t u_int16_t;
|
||||
#define bswap_16(x) bswap16(x)
|
||||
#define bswap_32(x) bswap32(x)
|
||||
#define bswap_64(x) bswap64(x)
|
||||
+#elif defined __OpenBSD__
|
||||
+#include <endian.h>
|
||||
+#define bswap_16(x) swap16(x)
|
||||
+#define bswap_32(x) swap32(x)
|
||||
+#define bswap_64(x) swap64(x)
|
||||
#else
|
||||
#include <byteswap.h>
|
||||
#endif
|
@ -1,20 +1,11 @@
|
||||
@comment $OpenBSD: PLIST,v 1.5 2014/09/16 17:28:07 jasper Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.6 2016/05/06 15:33:37 sthen Exp $
|
||||
@newgroup _mongodb:670
|
||||
@newuser _mongodb:670:670:daemon:MongoDB Account:/nonexistent:/sbin/nologin
|
||||
@bin bin/bsondump
|
||||
@bin bin/mongo
|
||||
@bin bin/mongod
|
||||
@bin bin/mongodump
|
||||
@bin bin/mongoexport
|
||||
@bin bin/mongofiles
|
||||
@bin bin/mongoimport
|
||||
@bin bin/mongooplog
|
||||
@bin bin/mongoperf
|
||||
@bin bin/mongorestore
|
||||
@bin bin/mongos
|
||||
@bin bin/mongosniff
|
||||
@bin bin/mongostat
|
||||
@bin bin/mongotop
|
||||
share/examples/mongodb/
|
||||
share/examples/mongodb/mongodb.conf
|
||||
@sample ${SYSCONFDIR}/mongodb.conf
|
||||
|
Loading…
x
Reference in New Issue
Block a user