From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Nov 3 21:40:02 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1152C106568B for ; Tue, 3 Nov 2009 21:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C83CF8FC12 for ; Tue, 3 Nov 2009 21:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nA3Le1QB067885 for ; Tue, 3 Nov 2009 21:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nA3Le1qm067884; Tue, 3 Nov 2009 21:40:01 GMT (envelope-from gnats) Resent-Date: Tue, 3 Nov 2009 21:40:01 GMT Resent-Message-Id: <200911032140.nA3Le1qm067884@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ivan Voras Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A85D61065670 for ; Tue, 3 Nov 2009 21:31:33 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 976448FC14 for ; Tue, 3 Nov 2009 21:31:33 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nA3LVXIx026084 for ; Tue, 3 Nov 2009 21:31:33 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id nA3LVXPR026083; Tue, 3 Nov 2009 21:31:33 GMT (envelope-from nobody) Message-Id: <200911032131.nA3LVXPR026083@www.freebsd.org> Date: Tue, 3 Nov 2009 21:31:33 GMT From: Ivan Voras To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/140257: New port: databases/mongodb X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2009 21:40:02 -0000 >Number: 140257 >Category: ports >Synopsis: New port: databases/mongodb >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Nov 03 21:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Ivan Voras >Release: 8 >Organization: NA >Environment: FreeBSD betelgeuse.cosmos 8.0-RC2 FreeBSD 8.0-RC2 #7: Sat Oct 31 15:58:27 CET 2009 ivoras@betelgeuse.cosmos:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Mongo (from "humongous") is a high-performance, open source, schema-free, document-oriented database. A common name in the "NOSQL" community. WWW: http://www.mongodb.org/ The distribution mechanism of github is somewhat strange - it looks like there is a git infrastructure that needs to be "tickled" to autogenerate a tgz of the source, thus also an alternative site on freefall. This port is for the development version of mongodb, which is the only one that can currently be used on FreeBSD without additional patches. I will post an update when a new release gets available which will incorporate fixes for FreeBSD. >How-To-Repeat: >Fix: Also needs patches to UIDs and GIDs: --- /usr/ports/UIDs 2009-11-01 17:02:27.000000000 +0100 +++ UIDs 2009-11-03 22:22:20.000000000 +0100 @@ -159,3 +159,4 @@ couchdb:*:919:919:daemon:0:0:CouchDB Account:/var/empty:/usr/sbin/nologin vboxusers:*:920:920::0:0:Virtualbox user:/nonexistent:/usr/sbin/nologin transmission:*:921:921::0:0:Transmission Daemon User:/usr/local/etc/transmission/home:/usr/sbin/nologin +mongodb:*:922:922:daemon:0:0:MongoDB Account:/var/empty:/usr/sbin/nologin --- /usr/ports/GIDs 2009-11-01 17:02:27.000000000 +0100 +++ GIDs 2009-11-03 22:22:31.000000000 +0100 @@ -149,3 +149,4 @@ couchdb:*:919: vboxusers:*:920: transmission:*:921: +mongodb:*:922: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # mongodb # mongodb/Makefile # mongodb/pkg-descr # mongodb/distinfo # mongodb/files # mongodb/files/mongod.in # mongodb/pkg-install # mongodb/pkg-deinstall # echo c - mongodb mkdir -p mongodb > /dev/null 2>&1 echo x - mongodb/Makefile sed 's/^X//' >mongodb/Makefile << 'dd2c11c48ebdc2482dee8e08c2321c72' X# New ports collection makefile for: mongodb X# Date created: 3 November 2009 X# Whom: ivoras X# X# $FreeBSD$ X# X XPORTNAME= mongodb XPORTVERSION= 1.2.0.d20090223 XCATEGORIES= databases net XMASTER_SITES= http://download.github.com/ http://people.freebsd.org/~ivoras/distfiles/ XDISTFILES= mongodb-mongo-6e4852e.tar.gz X XMAINTAINER= ivoras@FreeBSD.org XCOMMENT= A NOSQL distributed document-oriented database X XLIB_DEPENDS= boost_system:${PORTSDIR}/devel/boost-libs \ X js:${PORTSDIR}/lang/spidermonkey \ X pcre:${PORTSDIR}/devel/pcre \ X nspr4:${PORTSDIR}/devel/nspr \ X execinfo.1:${PORTSDIR}/devel/libexecinfo X XUSE_SCONS= yes XSCONS_TARGET= all X XUSE_RC_SUBR= mongod X XWRKSRC= ${WRKDIR}/mongodb-mongo-6e4852e X XPLIST_FILES= bin/mongo bin/mongod bin/mongodump bin/mongoexport \ X bin/mongofiles bin/mongoimport bin/mongorestore \ X bin/mongos bin/mongosniff X Xpost-patch: X @${REINPLACE_CMD} -E -e 's|elif "freebsd7" == os.sys.platform|elif os.sys.platform.startswith("freebsd")|' \ X ${WRKSRC}/SConstruct X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/mongo ${PREFIX}/bin X ${INSTALL_PROGRAM} ${WRKSRC}/mongod ${PREFIX}/bin X ${INSTALL_PROGRAM} ${WRKSRC}/mongodump ${PREFIX}/bin X ${INSTALL_PROGRAM} ${WRKSRC}/mongoexport ${PREFIX}/bin X ${INSTALL_PROGRAM} ${WRKSRC}/mongofiles ${PREFIX}/bin X ${INSTALL_PROGRAM} ${WRKSRC}/mongoimport ${PREFIX}/bin X ${INSTALL_PROGRAM} ${WRKSRC}/mongorestore ${PREFIX}/bin X ${INSTALL_PROGRAM} ${WRKSRC}/mongos ${PREFIX}/bin X ${INSTALL_PROGRAM} ${WRKSRC}/mongosniff ${PREFIX}/bin X ${INSTALL_DATA} ${WRKSRC}/libmongoclient.a ${PREFIX}/lib X Xpost-install: X PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL X X.include dd2c11c48ebdc2482dee8e08c2321c72 echo x - mongodb/pkg-descr sed 's/^X//' >mongodb/pkg-descr << 'fb5d34b6aebfe547c6f52d50781a849f' XMongo (from "humongous") is a high-performance, open source, Xschema-free, document-oriented database. X XWWW: http://www.mongodb.org/ fb5d34b6aebfe547c6f52d50781a849f echo x - mongodb/distinfo sed 's/^X//' >mongodb/distinfo << '355bdc19f6866e27d873baf33e60d3d2' XMD5 (mongodb-mongo-6e4852e.tar.gz) = e3181ebb0ce63070adf07562e5af38ea XSHA256 (mongodb-mongo-6e4852e.tar.gz) = e5a514ee00c4df9fa8cd6f78b449b779a4d247e244f5215ecb6d5d90406758ed XSIZE (mongodb-mongo-6e4852e.tar.gz) = 3846877 355bdc19f6866e27d873baf33e60d3d2 echo c - mongodb/files mkdir -p mongodb/files > /dev/null 2>&1 echo x - mongodb/files/mongod.in sed 's/^X//' >mongodb/files/mongod.in << 'b4db75822665ca63be37b594be6fe594' X#!/bin/sh X X# PROVIDE: mongod X# REQUIRE: NETWORK X# X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf X# to enable this service: X# X# mongod_enable (bool): Set to NO by default. X# Set it to YES to enable mongod. X# X# Additional configurable variables: X# mongod_config (path): Set to %%PREFIX%%/etc/mongod.conf X# by default. Additional configuration. You X# can also use mongod_flags for additional X# command line arguments. X# mongod_dbpath (path): Set to /var/db/mongod by default X# mongod_user (username): Set to "mongod" by default X X. %%RC_SUBR%% X Xname="mongod" Xrcvar=${name}_enable X Xcommand=%%PREFIX%%/bin/${name} X Xload_rc_config $name X X: ${mongod_enable="NO"} X: ${mongod_config="%%PREFIX%%/etc/mongodb.conf"} X: ${mongod_dbpath="/var/db/mongodb"} X: ${mongod_user="mongodb"} X Xcommand_args="-f $mongod_config --dbpath $mongod_dbpath --logappend --logpath $mongod_dbpath/mongod.log --fork" X Xrequired_dirs=${mongod_dbpath} X Xrun_rc_command "$1" X b4db75822665ca63be37b594be6fe594 echo x - mongodb/pkg-install sed 's/^X//' >mongodb/pkg-install << '9ff61aca429120c2368b63a853dfd1c4' X#!/bin/sh X# $FreeBSD$ X# X Xif [ "$2" != "PRE-INSTALL" ]; then X exit 0 Xfi X XUSER=mongodb XGROUP=${USER} XUID=922 XGID=${UID} XDBDIR=/var/db/mongodb X Xtouch ${PREFIX}/etc/mongodb.conf X Xif ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then X if pw groupadd ${GROUP} -g ${GID}; then X echo "Added group \"${GROUP}\"." X else X echo "Adding group \"${GROUP}\" failed..." X exit 1 X fi Xfi X Xif ! pw usershow "${USER}" 2>/dev/null 1>&2; then X if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ X -s "/bin/sh" -d "/var/db/mongodb" \ X -c "mongodb pseudo-user"; \ X then X echo "Added user \"${USER}\"." X if [ ! -d ${DBDIR} ] X then X echo "Creating \"${DBDIR}\"." X mkdir ${DBDIR} X chown ${USER}:${GROUP} ${DBDIR} X fi X else X echo "Adding user \"${USER}\" failed..." X exit 1 X fi Xfi Xexit 0 9ff61aca429120c2368b63a853dfd1c4 echo x - mongodb/pkg-deinstall sed 's/^X//' >mongodb/pkg-deinstall << 'f398691c4f377ad8a505be47024ffaf6' X#!/bin/sh X# $FreeBSD$ X# X Xif [ "$2" != "POST-DEINSTALL" ]; then X exit 0 Xfi X XUSER=mongodb X Xif pw usershow "${USER}" 2>/dev/null 1>&2; then X echo "To delete mongodb user permanently, use 'pw userdel ${USER}'" Xfi X Xexit 0 f398691c4f377ad8a505be47024ffaf6 exit >Release-Note: >Audit-Trail: >Unformatted: