From owner-svn-ports-all@freebsd.org Mon Jan 1 16:45:02 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C42EEB1F0A; Mon, 1 Jan 2018 16:45:02 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65BF0732CE; Mon, 1 Jan 2018 16:45:02 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01Gj1Q1037983; Mon, 1 Jan 2018 16:45:01 GMT (envelope-from lifanov@FreeBSD.org) Received: (from lifanov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01Gj08k037975; Mon, 1 Jan 2018 16:45:00 GMT (envelope-from lifanov@FreeBSD.org) Message-Id: <201801011645.w01Gj08k037975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lifanov set sender to lifanov@FreeBSD.org using -f From: Nikolai Lifanov Date: Mon, 1 Jan 2018 16:45:00 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r457783 - in head/databases: . mongodb36 mongodb36/files X-SVN-Group: ports-head X-SVN-Commit-Author: lifanov X-SVN-Commit-Paths: in head/databases: . mongodb36 mongodb36/files X-SVN-Commit-Revision: 457783 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 16:45:02 -0000 Author: lifanov Date: Mon Jan 1 16:45:00 2018 New Revision: 457783 URL: https://svnweb.freebsd.org/changeset/ports/457783 Log: add new port: MongoDB 3.6.0 PR: 224303 Submitted by: dev@dudu.ro Differential Revision: https://reviews.freebsd.org/D13594 Added: head/databases/mongodb36/ head/databases/mongodb36/Makefile (contents, props changed) head/databases/mongodb36/distinfo (contents, props changed) head/databases/mongodb36/files/ head/databases/mongodb36/files/mongod.in (contents, props changed) head/databases/mongodb36/files/patch-SConstruct (contents, props changed) head/databases/mongodb36/files/patch-rpm_mongod.conf (contents, props changed) head/databases/mongodb36/pkg-descr (contents, props changed) head/databases/mongodb36/pkg-plist (contents, props changed) Modified: head/databases/Makefile Modified: head/databases/Makefile ============================================================================== --- head/databases/Makefile Mon Jan 1 16:20:42 2018 (r457782) +++ head/databases/Makefile Mon Jan 1 16:45:00 2018 (r457783) @@ -196,6 +196,7 @@ SUBDIR += mongodb34 SUBDIR += mongodb34-rocks SUBDIR += mongodb34-tools + SUBDIR += mongodb36 SUBDIR += mroonga SUBDIR += mrtg-mysql-load SUBDIR += mtools-mongodb Added: head/databases/mongodb36/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mongodb36/Makefile Mon Jan 1 16:45:00 2018 (r457783) @@ -0,0 +1,72 @@ +# $FreeBSD$ + +PORTNAME= mongodb +DISTVERSIONPREFIX= r +DISTVERSION= 3.6.0 +CATEGORIES= databases net +MASTER_SITES= https://fastdl.mongodb.org/src/ \ + http://fastdl.mongodb.org/src/ \ + http://download.mongodb.org/src/ +PKGNAMESUFFIX= ${PORTVERSION:R:S/.//} +DISTNAME= mongodb-src-${DISTVERSIONPREFIX}${DISTVERSION} + +MAINTAINER= galu@packetdam.com +COMMENT= Distributed document-oriented "NoSQL" database + +# mongodb is AGPLv3, C++ driver is APACHE20 +LICENSE= AGPLv3 APACHE20 +LICENSE_COMB= multi + +ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS_REASON= "Only supported on amd64 (i386 deprecated in v3)" + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}typing>=3.6.2:devel/py-typing@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cheetah>=2.4.4:devel/py-cheetah@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}yaml>=3.11:devel/py-yaml@${PY_FLAVOR} +LIB_DEPENDS= libpcre.so:devel/pcre \ + libsnappy.so:archivers/snappy \ + libboost_system.so:devel/boost-libs + +CONFLICTS_BUILD= mongo-cxx-driver +CONFLICTS_INSTALL= mongodb[32-4]* + +USES= compiler:c++14-lang cpe python:build scons shebangfix +USE_RC_SUBR= mongod + +SHEBANG_FILES= src/mongo/installer/compass/install_compass.in + +MAKE_ARGS= --prefix=${STAGEDIR}${PREFIX} \ + --use-system-pcre --use-system-snappy \ + --use-system-boost --use-system-zlib \ + --cxx-std=14 --libc++ \ + --runtime-hardening=on \ + --disable-warnings-as-errors \ + VERBOSE=on + +WITH_DEBUG= yes + +USERS= mongodb +GROUPS= mongodb + +OPTIONS_DEFINE= SASL SSL +OPTIONS_DEFAULT= SASL SSL + +SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 +SASL_MAKE_ARGS= --use-sasl-client + +SSL_USES= ssl +SSL_MAKE_ARGS= --ssl + +ALL_TARGET= core + +PORTSCOUT= limitw:1,even + +CPE_PRODUCT= mongodb + +post-install: +.for f in mongo mongod mongoperf mongos + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f} +.endfor + ${CP} ${WRKSRC}/rpm/mongod.conf ${STAGEDIR}${PREFIX}/etc/mongodb.conf.sample + +.include Added: head/databases/mongodb36/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mongodb36/distinfo Mon Jan 1 16:45:00 2018 (r457783) @@ -0,0 +1,3 @@ +TIMESTAMP = 1513015173 +SHA256 (mongodb-src-r3.6.0.tar.gz) = 1573e6e172a6a1e559e1156b0f059f3639774a9f3db33790cb826c56e1398efd +SIZE (mongodb-src-r3.6.0.tar.gz) = 39994543 Added: head/databases/mongodb36/files/mongod.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mongodb36/files/mongod.in Mon Jan 1 16:45:00 2018 (r457783) @@ -0,0 +1,61 @@ +#!/bin/sh + +# PROVIDE: mongod +# REQUIRE: NETWORK ldconfig +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# mongod_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable mongod. +# mongod_limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U mongodb` +# just before mongod starts. +# mongod_dbpath (str): Default to "/var/db/mongodb" +# Base database directory. +# mongod_flags (str): Custom additional arguments to be passed to mongod. +# Default to "--logpath ${mongod_dbpath}/mongod.log --logappend". +# mongod_config (str): Default to "%%PREFIX%%/etc/mongodb.conf" +# Path to config file +# + +. /etc/rc.subr + +name="mongod" +rcvar=mongod_enable + +load_rc_config $name + +: ${mongod_enable="NO"} +: ${mongod_limits="NO"} +: ${mongod_dbpath="/var/db/mongodb"} +: ${mongod_flags="--logpath ${mongod_dbpath}/mongod.log --logappend"} +: ${mongod_user="mongodb"} +: ${mongod_group="mongodb"} +: ${mongod_config="%%PREFIX%%/etc/mongodb.conf"} + +pidfile="${mongod_dbpath}/mongod.lock" +command=%%PREFIX%%/bin/${name} +command_args="--config $mongod_config --dbpath $mongod_dbpath --fork >/dev/null 2>/dev/null" +start_precmd="${name}_prestart" + +mongod_create_dbpath() +{ + mkdir ${mongod_dbpath} >/dev/null 2>/dev/null + [ $? -eq 0 ] && chown -R ${mongod_user}:${mongod_group} ${mongod_dbpath} +} + +mongod_prestart() +{ + if [ ! -d ${mongod_dbpath} ]; then + mongod_create_dbpath || return 1 + fi + if checkyesno mongod_limits; then + eval `/usr/bin/limits -e -U ${mongod_user}` 2>/dev/null + else + return 0 + fi +} + +run_rc_command "$1" Added: head/databases/mongodb36/files/patch-SConstruct ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mongodb36/files/patch-SConstruct Mon Jan 1 16:45:00 2018 (r457783) @@ -0,0 +1,48 @@ +--- SConstruct.orig 2017-12-01 17:04:06 UTC ++++ SConstruct +@@ -922,9 +922,9 @@ if has_option('variables-help'): + print(env_vars.GenerateHelpText(env)) + Exit(0) + +-unknown_vars = env_vars.UnknownVariables() +-if unknown_vars: +- env.FatalError("Unknown variables specified: {0}", ", ".join(unknown_vars.keys())) ++#unknown_vars = env_vars.UnknownVariables() ++#if unknown_vars: ++# env.FatalError("Unknown variables specified: {0}", ", ".join(unknown_vars.keys())) + + def set_config_header_define(env, varname, varval = 1): + env['CONFIG_HEADER_DEFINES'][varname] = varval +@@ -1612,7 +1612,7 @@ if env.TargetOSIs('posix'): + # If runtime hardening is requested, then build anything + # destined for an executable with the necessary flags for PIE. + env.AppendUnique( +- PROGCCFLAGS=['-fPIE'], ++ PROGCCFLAGS=['-fpic'], + PROGLINKFLAGS=['-pie'], + ) + +@@ -1626,7 +1626,7 @@ if env.TargetOSIs('posix'): + "-Wno-unknown-pragmas", + "-Winvalid-pch"] ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet +- if env.TargetOSIs('linux', 'darwin', 'solaris'): ++ if env.TargetOSIs('linux', 'darwin', 'solaris', 'freebsd'): + if not has_option("disable-warnings-as-errors"): + env.Append( CCFLAGS=["-Werror"] ) + +@@ -1661,10 +1661,10 @@ if env.TargetOSIs('posix'): + env.Append( CCFLAGS=["-fprofile-arcs", "-ftest-coverage"] ) + env.Append( LINKFLAGS=["-fprofile-arcs", "-ftest-coverage"] ) + +- if optBuild: +- env.Append( CCFLAGS=["-O2"] ) +- else: +- env.Append( CCFLAGS=["-O0"] ) ++ #if optBuild: ++ # env.Append( CCFLAGS=["-O2"] ) ++ #else: ++ # env.Append( CCFLAGS=["-O0"] ) + + # Promote linker warnings into errors. We can't yet do this on OS X because its linker considers + # noall_load obsolete and warns about it. Added: head/databases/mongodb36/files/patch-rpm_mongod.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mongodb36/files/patch-rpm_mongod.conf Mon Jan 1 16:45:00 2018 (r457783) @@ -0,0 +1,25 @@ +--- rpm/mongod.conf.orig 2017-12-01 17:04:06 UTC ++++ rpm/mongod.conf +@@ -7,11 +7,11 @@ + systemLog: + destination: file + logAppend: true +- path: /var/log/mongodb/mongod.log ++ path: /var/db/mongodb/mongod.log + + # Where and how to store data. + storage: +- dbPath: /var/lib/mongo ++ dbPath: /var/db/mongodb + journal: + enabled: true + # engine: +@@ -21,7 +21,7 @@ storage: + # how the process runs + processManagement: + fork: true # fork and run in background +- pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile ++ pidFilePath: /var/db/mongodb/mongod.lock # location of pidfile + timeZoneInfo: /usr/share/zoneinfo + + # network interfaces Added: head/databases/mongodb36/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mongodb36/pkg-descr Mon Jan 1 16:45:00 2018 (r457783) @@ -0,0 +1,5 @@ +Mongo (from "humongous") is a high-performance, open source, +schema-free, document-oriented database. A common name in the +"NOSQL" community. + +WWW: https://www.mongodb.com/ Added: head/databases/mongodb36/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mongodb36/pkg-plist Mon Jan 1 16:45:00 2018 (r457783) @@ -0,0 +1,6 @@ +bin/install_compass +bin/mongo +bin/mongod +bin/mongoperf +bin/mongos +@sample etc/mongodb.conf.sample