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

Collapse All | Expand All

(-)b/databases/Makefile (+1 lines)
Lines 201-206 Link Here
201
    SUBDIR += mongodb
201
    SUBDIR += mongodb
202
    SUBDIR += mongodb32
202
    SUBDIR += mongodb32
203
    SUBDIR += mongodb32-tools
203
    SUBDIR += mongodb32-tools
204
    SUBDIR += mongodb34
204
    SUBDIR += mrtg-mysql-load
205
    SUBDIR += mrtg-mysql-load
205
    SUBDIR += mtools-mongodb
206
    SUBDIR += mtools-mongodb
206
    SUBDIR += mtop
207
    SUBDIR += mtop
(-)b/databases/mongodb34/Makefile (+88 lines)
Added 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.0-rc0
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
USE_BINUTILS=	yes
42
USES=		compiler cpe execinfo python:build scons
43
44
MAKE_ARGS=	--prefix=${STAGEDIR}${PREFIX} \
45
		--use-system-pcre --use-system-snappy \
46
		--release
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.pre.mk>
57
58
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1002000
59
# Cannot be built
60
IGNORE=	unsupported on FreeBSD 10.1 or older
61
.endif
62
# Bugs when compiled with < Clang 3.7
63
#  - https://jira.mongodb.org/browse/SERVER-21217
64
#  - https://jira.mongodb.org/browse/SERVER-22740
65
.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 37
66
BUILD_DEPENDS+=	${LOCALBASE}/bin/clang37:lang/clang37
67
CPP=	${LOCALBASE}/bin/clang-cpp37
68
CC=	${LOCALBASE}/bin/clang37
69
CXX=	${LOCALBASE}/bin/clang++37
70
.endif
71
72
post-install:
73
.for f in mongo mongod mongoperf mongos
74
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f}
75
.endfor
76
	${CP} ${WRKSRC}/rpm/mongod.conf ${STAGEDIR}${PREFIX}/etc/mongodb.conf.sample
77
78
do-test:
79
	@cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} \
80
		${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${TEST_TARGET} &&\
81
		${PYTHON_CMD} ${BUILD_WRKSRC}/buildscripts/resmoke.py\
82
		--suites=unittests --jobs=${MAKE_JOBS_NUMBER}
83
84
PORTSCOUT=	limitw:1,even
85
86
CPE_PRODUCT=	mongodb
87
88
.include <bsd.port.post.mk>
(-)b/databases/mongodb34/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1475628116
2
SHA256 (mongodb-src-r3.4.0-rc0.tar.gz) = 7677a223007d6fb0ff6e40142cee725498b48dbc3d1b14135ab9061703fbdd7e
3
SIZE (mongodb-src-r3.4.0-rc0.tar.gz) = 39898224
(-)b/databases/mongodb34/files/mongod.in (+62 lines)
Added 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"
(-)b/databases/mongodb34/files/patch-SConstruct (+24 lines)
Added Link Here
1
--- SConstruct.orig	2016-10-03 11:32:42.000000000 -0700
2
+++ SConstruct	2016-10-04 18:41:21.832711000 -0700
3
@@ -916,9 +916,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
@@ -1574,7 +1574,7 @@ if env.TargetOSIs('posix'):
17
 
18
     # Promote linker warnings into errors. We can't yet do this on OS X because its linker considers
19
     # noall_load obsolete and warns about it.
20
-    if not env.TargetOSIs('osx'):
21
+    if not env.TargetOSIs('osx', 'freebsd'):
22
         env.Append(
23
             LINKFLAGS=[
24
                 "-Wl,--fatal-warnings",
(-)b/databases/mongodb34/files/patch-rpm_mongod.conf (+31 lines)
Added 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:
(-)b/databases/mongodb34/pkg-descr (+5 lines)
Added 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/
(-)b/databases/mongodb34/pkg-plist (+5 lines)
Added Link Here
1
@sample etc/mongodb.conf.sample
2
bin/mongo
3
bin/mongod
4
bin/mongoperf
5
bin/mongos

Return to bug 213220