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

Collapse All | Expand All

(-)databases/mongodb36/Makefile (+72 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
PORTNAME=	mongodb
4
DISTVERSIONPREFIX=	r
5
DISTVERSION=	3.6.0
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
DISTNAME=	mongodb-src-${DISTVERSIONPREFIX}${DISTVERSION}
12
13
MAINTAINER=	galu@packetdam.com
14
COMMENT=	Distributed document-oriented "NoSQL" database
15
16
# mongodb is AGPLv3, C++ driver is APACHE20
17
LICENSE=	AGPLv3 APACHE20
18
LICENSE_COMB=	multi
19
20
ONLY_FOR_ARCHS=	amd64
21
ONLY_FOR_ARCHS_REASON=	"Only supported on amd64 (i386 deprecated in v3)"
22
23
BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}typing>=3.6.2:devel/py-typing@${PY_FLAVOR} \
24
		${PYTHON_PKGNAMEPREFIX}cheetah>=2.4.4:devel/py-cheetah@${PY_FLAVOR} \
25
		${PYTHON_PKGNAMEPREFIX}yaml>=3.11:devel/py-yaml@${PY_FLAVOR}
26
LIB_DEPENDS=	libpcre.so:devel/pcre \
27
		libsnappy.so:archivers/snappy \
28
		libboost_system.so:devel/boost-libs
29
30
CONFLICTS_BUILD=	mongo-cxx-driver
31
CONFLICTS_INSTALL=	mongodb[32-4]*	
32
33
CHOSEN_COMPILER_TYPE=	clang
34
35
USES=		compiler:c++14-lang cpe python:build scons
36
USE_RC_SUBR=	mongod
37
38
MAKE_ARGS=	--prefix=${STAGEDIR}${PREFIX} \
39
		--use-system-pcre --use-system-snappy \
40
		--use-system-boost --use-system-zlib \
41
		--cxx-std=14 --libc++ \
42
		--runtime-hardening=on \
43
		--disable-warnings-as-errors \
44
		VERBOSE=on
45
46
WITH_DEBUG=	yes
47
48
USERS=		mongodb
49
GROUPS=		mongodb
50
51
OPTIONS_DEFINE=		SASL SSL
52
OPTIONS_DEFAULT=	SASL SSL
53
54
SASL_LIB_DEPENDS=	libsasl2.so:security/cyrus-sasl2
55
SASL_MAKE_ARGS=		--use-sasl-client
56
57
SSL_USES=	ssl
58
SSL_MAKE_ARGS=	--ssl
59
60
ALL_TARGET=	core
61
62
PORTSCOUT=	limitw:1,even
63
64
CPE_PRODUCT=	mongodb
65
66
post-install:
67
.for f in mongo mongod mongoperf mongos
68
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f}
69
.endfor
70
	${CP} ${WRKSRC}/rpm/mongod.conf ${STAGEDIR}${PREFIX}/etc/mongodb.conf.sample
71
72
.include <bsd.port.mk>
(-)databases/mongodb36/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1513015173
2
SHA256 (mongodb-src-r3.6.0.tar.gz) = 1573e6e172a6a1e559e1156b0f059f3639774a9f3db33790cb826c56e1398efd
3
SIZE (mongodb-src-r3.6.0.tar.gz) = 39994543
(-)databases/mongodb36/files/mongod.in (+61 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
mongod_prestart()
50
{
51
        if [ ! -d ${mongod_dbpath} ]; then
52
                mongod_create_dbpath || return 1
53
        fi
54
        if checkyesno mongod_limits; then
55
                eval `/usr/bin/limits -e -U ${mongod_user}` 2>/dev/null
56
        else
57
                return 0
58
        fi
59
}
60
61
run_rc_command "$1"
(-)databases/mongodb36/files/patch-SConstruct (+48 lines)
Line 0 Link Here
1
--- SConstruct.orig	2017-12-01 17:04:06 UTC
2
+++ SConstruct
3
@@ -922,9 +922,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
@@ -1612,7 +1612,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
             )
24
 
25
@@ -1626,7 +1626,7 @@ if env.TargetOSIs('posix'):
26
                          "-Wno-unknown-pragmas",
27
                          "-Winvalid-pch"] )
28
     # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
29
-    if env.TargetOSIs('linux', 'darwin', 'solaris'):
30
+    if env.TargetOSIs('linux', 'darwin', 'solaris', 'freebsd'):
31
         if not has_option("disable-warnings-as-errors"):
32
             env.Append( CCFLAGS=["-Werror"] )
33
 
34
@@ -1661,10 +1661,10 @@ if env.TargetOSIs('posix'):
35
         env.Append( CCFLAGS=["-fprofile-arcs", "-ftest-coverage"] )
36
         env.Append( LINKFLAGS=["-fprofile-arcs", "-ftest-coverage"] )
37
 
38
-    if optBuild:
39
-        env.Append( CCFLAGS=["-O2"] )
40
-    else:
41
-        env.Append( CCFLAGS=["-O0"] )
42
+    #if optBuild:
43
+    #    env.Append( CCFLAGS=["-O2"] )
44
+    #else:
45
+    #    env.Append( CCFLAGS=["-O0"] )
46
 
47
     # Promote linker warnings into errors. We can't yet do this on OS X because its linker considers
48
     # noall_load obsolete and warns about it.
(-)databases/mongodb36/files/patch-rpm_mongod.conf (+25 lines)
Line 0 Link Here
1
--- rpm/mongod.conf.orig	2017-12-01 17:04:06 UTC
2
+++ rpm/mongod.conf
3
@@ -7,11 +7,11 @@
4
 systemLog:
5
   destination: file
6
   logAppend: true
7
-  path: /var/log/mongodb/mongod.log
8
+  path: /var/db/mongodb/mongod.log 
9
 
10
 # Where and how to store data.
11
 storage:
12
-  dbPath: /var/lib/mongo
13
+  dbPath: /var/db/mongodb 
14
   journal:
15
     enabled: true
16
 #  engine:
17
@@ -21,7 +21,7 @@ storage:
18
 # how the process runs
19
 processManagement:
20
   fork: true  # fork and run in background
21
-  pidFilePath: /var/run/mongodb/mongod.pid  # location of pidfile
22
+  pidFilePath: /var/db/mongodb/mongod.lock  # location of pidfile
23
   timeZoneInfo: /usr/share/zoneinfo
24
 
25
 # network interfaces
(-)databases/mongodb36/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/mongodb36/pkg-plist (+6 lines)
Line 0 Link Here
1
bin/install_compass
2
bin/mongo
3
bin/mongod
4
bin/mongoperf
5
bin/mongos
6
@sample etc/mongodb.conf.sample

Return to bug 224303