View | Details | Raw Unified | Return to bug 213220 | Differences between
and this patch

Collapse All | Expand All

(-)databases/Makefile (+1 lines)
Lines 200-205 Link Here
200
    SUBDIR += mongodb
200
    SUBDIR += mongodb
201
    SUBDIR += mongodb32
201
    SUBDIR += mongodb32
202
    SUBDIR += mongodb32-tools
202
    SUBDIR += mongodb32-tools
203
    SUBDIR += mongodb34
203
    SUBDIR += mrtg-mysql-load
204
    SUBDIR += mrtg-mysql-load
204
    SUBDIR += mtools-mongodb
205
    SUBDIR += mtools-mongodb
205
    SUBDIR += mtop
206
    SUBDIR += mtop
(-)databases/mongodb34/Makefile (+94 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
PORTNAME=	mongodb
4
PORTVERSION=	${DISTVERSION:S/-//g}
5
DISTVERSIONPREFIX=	r
6
CATEGORIES=	databases net
7
MASTER_SITES=	https://fastdl.mongodb.org/src/ \
8
		http://fastdl.mongodb.org/src/ \
9
		http://download.mongodb.org/src/
10
PKGNAMESUFFIX=	${PORTVERSION:R:S/.//}
11
DISTVERSION=	3.4.1
12
DISTNAME=	mongodb-src-${DISTVERSIONPREFIX}${DISTVERSION}
13
14
MAINTAINER=	brendan+freebsd@bbqsrc.net
15
COMMENT=	Distributed document-oriented "NoSQL" database
16
17
# mongodb is AGPLv3, C++ driver is APACHE20
18
LICENSE=	AGPLv3 APACHE20
19
LICENSE_COMB=	multi
20
21
LIB_DEPENDS=	libpcre.so:devel/pcre \
22
		libsnappy.so:archivers/snappy
23
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}yaml>=3.11:devel/py-yaml \
24
		${PYTHON_PKGNAMEPREFIX}pymongo>=3.0:databases/pymongo
25
26
CHOSEN_COMPILER_TYPE=	clang
27
28
ONLY_FOR_ARCHS=	amd64
29
ONLY_FOR_ARCHS_REASON=	"Only supported on amd64 (i386 deprecated in v3)"
30
31
CONFLICTS_BUILD=	mongo-cxx-driver
32
OPTIONS_DEFINE=		SASL SSL
33
OPTIONS_DEFAULT=	SASL SSL
34
35
SASL_LIB_DEPENDS=	libsasl2.so:security/cyrus-sasl2
36
SASL_MAKE_ARGS=		--use-sasl-client
37
38
SSL_USE=	yes
39
SSL_MAKE_ARGS=	--ssl
40
41
USES=		compiler:c++14-lang cpe execinfo python:build scons
42
43
MAKE_ARGS=	--prefix=${STAGEDIR}${PREFIX} \
44
		--use-system-pcre --use-system-snappy \
45
		--cxx-std=14 --runtime-hardening=on \
46
		--release VERBOSE=on
47
48
USERS=	mongodb
49
GROUPS=	mongodb
50
51
USE_RC_SUBR=	mongod
52
53
ALL_TARGET=	core
54
TEST_TARGET=	unittests
55
56
.include <bsd.port.options.mk>
57
58
.if ${PORT_OPTIONS:MSSL}
59
USES+=	ssl
60
.endif
61
62
.include <bsd.port.pre.mk>
63
64
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1002000
65
# Cannot be built
66
IGNORE=	unsupported on FreeBSD 10.1 or older
67
.endif
68
# Bugs when compiled with < Clang 3.7
69
#  - https://jira.mongodb.org/browse/SERVER-21217
70
#  - https://jira.mongodb.org/browse/SERVER-22740
71
.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 37
72
BUILD_DEPENDS+=	${LOCALBASE}/bin/clang37:lang/clang37
73
CPP=	${LOCALBASE}/bin/clang-cpp37
74
CC=	${LOCALBASE}/bin/clang37
75
CXX=	${LOCALBASE}/bin/clang++37
76
.endif
77
78
post-install:
79
.for f in mongo mongod mongoperf mongos
80
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f}
81
.endfor
82
	${CP} ${WRKSRC}/rpm/mongod.conf ${STAGEDIR}${PREFIX}/etc/mongodb.conf.sample
83
84
do-test:
85
	@cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} \
86
		${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${TEST_TARGET} &&\
87
		${PYTHON_CMD} ${BUILD_WRKSRC}/buildscripts/resmoke.py\
88
		--suites=unittests --jobs=${MAKE_JOBS_NUMBER}
89
90
PORTSCOUT=	limitw:1,even
91
92
CPE_PRODUCT=	mongodb
93
94
.include <bsd.port.post.mk>
(-)databases/mongodb34/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1482270342
2
SHA256 (mongodb-src-r3.4.1.tar.gz) = 54f475e553827733fb351ee4b03b470297f0d08e0434fbf7e6661705124da97b
3
SIZE (mongodb-src-r3.4.1.tar.gz) = 40161375
(-)databases/mongodb34/files/mongod.in (+62 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# PROVIDE: mongod
4
# REQUIRE: NETWORK ldconfig
5
# KEYWORD: shutdown
6
#
7
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
8
# to enable this service:
9
#
10
# mongod_enable (bool):  Set to "NO" by default.                                                                                                                                                                                             
11
#                        Set it to "YES" to enable mongod.
12
# mongod_limits (bool):  Set to "NO" by default.
13
#                        Set it to yes to run `limits -e -U mongodb`
14
#                        just before mongod starts.
15
# mongod_dbpath (str):   Default to "/var/db/mongodb"
16
#                        Base database directory.
17
# mongod_flags (str):    Custom additional arguments to be passed to mongod.
18
#                        Default to "--logpath ${mongod_dbpath}/mongod.log --logappend".
19
# mongod_config (str):	 Default to "%%PREFIX%%/etc/mongodb.conf"
20
#                        Path to config file
21
#
22
23
. /etc/rc.subr
24
25
name="mongod"
26
rcvar=mongod_enable
27
28
load_rc_config $name
29
30
: ${mongod_enable="NO"}
31
: ${mongod_limits="NO"}
32
: ${mongod_dbpath="/var/db/mongodb"}
33
: ${mongod_flags="--logpath ${mongod_dbpath}/mongod.log --logappend"}
34
: ${mongod_user="mongodb"}
35
: ${mongod_group="mongodb"}
36
: ${mongod_config="%%PREFIX%%/etc/mongodb.conf"}
37
38
pidfile="${mongod_dbpath}/mongod.lock"
39
command=%%PREFIX%%/bin/${name}
40
command_args="--config $mongod_config --dbpath $mongod_dbpath --fork >/dev/null 2>/dev/null"
41
start_precmd="${name}_prestart"
42
43
mongod_create_dbpath()
44
{
45
        mkdir ${mongod_dbpath} >/dev/null 2>/dev/null
46
        [ $? -eq 0 ] && chown -R ${mongod_user}:${mongod_group} ${mongod_dbpath}
47
}
48
49
50
mongod_prestart()
51
{
52
        if [ ! -d ${mongod_dbpath} ]; then
53
                mongod_create_dbpath || return 1
54
        fi
55
        if checkyesno mongod_limits; then
56
                eval `/usr/bin/limits -e -U ${mongod_user}` 2>/dev/null
57
        else
58
                return 0
59
        fi
60
}
61
62
run_rc_command "$1"
(-)databases/mongodb34/files/patch-SConstruct (+49 lines)
Line 0 Link Here
1
--- SConstruct.orig	2016-12-13 13:09:47.000000000 -0800
2
+++ SConstruct	2017-01-11 17:23:55.917750000 -0800
3
@@ -929,9 +929,9 @@ if has_option('variables-help'):
4
     print env_vars.GenerateHelpText(env)
5
     Exit(0)
6
7
-unknown_vars = env_vars.UnknownVariables()
8
-if unknown_vars:
9
-    env.FatalError("Unknown variables specified: {0}", ", ".join(unknown_vars.keys()))
10
+#unknown_vars = env_vars.UnknownVariables()
11
+#if unknown_vars:
12
+#    env.FatalError("Unknown variables specified: {0}", ", ".join(unknown_vars.keys()))
13
14
 def set_config_header_define(env, varname, varval = 1):
15
     env['CONFIG_HEADER_DEFINES'][varname] = varval
16
@@ -1550,7 +1550,7 @@ if env.TargetOSIs('posix'):
17
             # If runtime hardening is requested, then build anything
18
             # destined for an executable with the necessary flags for PIE.
19
             env.AppendUnique(
20
-                PROGCCFLAGS=['-fPIE'],
21
+                PROGCCFLAGS=['-fPIC'],
22
-                PROGLINKFLAGS=['-pie'],
23
+                PROGLINKFLAGS=['-pie','-v'],
24
             )
25
26
@@ -1592,10 +1592,10 @@ if env.TargetOSIs('posix'):
27
         env.Append( CCFLAGS=["-fprofile-arcs", "-ftest-coverage"] )
28
         env.Append( LINKFLAGS=["-fprofile-arcs", "-ftest-coverage"] )
29
30
-    if optBuild:
31
-        env.Append( CCFLAGS=["-O2"] )
32
-    else:
33
-        env.Append( CCFLAGS=["-O0"] )
34
+    #if optBuild:
35
+    #    env.Append( CCFLAGS=["-O2"] )
36
+    #else:
37
+    #    env.Append( CCFLAGS=["-O0"] )
38
39
     # Promote linker warnings into errors. We can't yet do this on OS X because its linker considers
40
     # noall_load obsolete and warns about it.
41
@@ -2461,7 +2461,7 @@ def doConfigure(myenv):
42
         }}
43
         """.format(storage_class)
44
         context.Message('Checking for storage class {0} '.format(storage_class))
45
-        ret = context.TryLink(textwrap.dedent(test_body), ".cpp")
46
+        ret = context.TryCompile(textwrap.dedent(test_body), ".cpp")
47
         context.Result(ret)
48
         return ret
49
(-)databases/mongodb34/files/patch-rpm_mongod.conf (+31 lines)
Line 0 Link Here
1
--- rpm/mongod.conf.orig	2016-10-03 11:32:42.000000000 -0700
2
+++ rpm/mongod.conf	2016-10-04 17:46:16.568923000 -0700
3
@@ -1,4 +1,4 @@
4
-# mongod.conf
5
+# mongodb.conf
6
 
7
 # for documentation of all options, see:
8
 #   http://docs.mongodb.org/manual/reference/configuration-options/
9
@@ -7,11 +7,11 @@
10
 systemLog:
11
   destination: file
12
   logAppend: true
13
-  path: /var/log/mongodb/mongod.log
14
+  path: /var/log/mongodb/log
15
 
16
 # Where and how to store data.
17
 storage:
18
-  dbPath: /var/lib/mongo
19
+  dbPath: /var/db/mongo
20
   journal:
21
     enabled: true
22
 #  engine:
23
@@ -21,7 +21,7 @@ storage:
24
 # how the process runs
25
 processManagement:
26
   fork: true  # fork and run in background
27
-  pidFilePath: /var/run/mongodb/mongod.pid  # location of pidfile
28
+  pidFilePath: /var/run/mongodb/pid  # location of pidfile
29
 
30
 # network interfaces
31
 net:
(-)databases/mongodb34/pkg-descr (+5 lines)
Line 0 Link Here
1
Mongo (from "humongous") is a high-performance, open source,
2
schema-free, document-oriented database. A common name in the
3
"NOSQL" community.
4
5
WWW: http://www.mongodb.org/
(-)databases/mongodb34/pkg-plist (+5 lines)
Line 0 Link Here
1
@sample etc/mongodb.conf.sample
2
bin/mongo
3
bin/mongod
4
bin/mongoperf
5
bin/mongos

Return to bug 213220