RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 08-Apr-2011 18:14:16 Branch: HEAD Handle: 2011040816141501 Added files: rpm/scripts mgo Modified files: rpm CHANGES Log: - mongo: stub-in a /usr/lib/rpm/bin mongo shell wrapper. Summary: Revision Changes Path 1.3606 +1 -0 rpm/CHANGES 1.2 +53 -0 rpm/scripts/mgo ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.3605 -r1.3606 CHANGES --- rpm/CHANGES 7 Apr 2011 22:02:09 -0000 1.3605 +++ rpm/CHANGES 8 Apr 2011 16:14:15 -0000 1.3606 @@ -1,4 +1,5 @@ 5.4.0 -> 5.4.1: + - jbj: mongo: stub-in a /usr/lib/rpm/bin mongo shell wrapper. - jbj: spewage: fix: rework sql/json markup to use the EVRD parser. - jbj: build: fix: resurrect %description -l XY yet again. - jbj: build: fix: attempt arbitrary '%foo' tag iff '%' is seen. @@ . patch -p0 <<'@@ .' Index: rpm/scripts/mgo ============================================================================ $ cvs diff -u -r0 -r1.2 mgo --- /dev/null 2011-04-08 18:12:36.000000000 +0200 +++ mgo 2011-04-08 18:14:16.485953907 +0200 @@ -0,0 +1,53 @@ +#!/bin/sh + +mongo=/usr/bin/mongo +nick=${1:-localhost} + +# -- Common defaults: +H=localhost +P=27017 +DB=cooker + +# The "cooker" database has these collections: +# packages -- full header metadata +# primary/filellsts/other -- the mongodb analogue of repo-md + +# -- Load U=user and PW=password envvar's. +eval `cat ~/.mongohq` +UPW="" +[ ."$U" != . ] && UPW="$UPW -u ${U}" +[ ."$PW" != . ] && UPW="$UPW -p ${PW}" + +# --- Set per-database variables across multiple hosts. +case $nick in +flame) + # --- mongohq "free" instance (w 16Mb limit). AWS hosted. mongo-1.6.x. + # mongodb://${U}:${PW}>@flame.mongohq.com:27048/client-test + H=flame.mongohq.com + P=27048 + DB=client-test + ;; +tempest) + # --- mongohq "large" instance (w 5Gb limit). AWS hosted. mongo-1.8.0. + # mongodb://${U}:${PW}@tempest.mongohq.com:10017/cooker + H=tempest.mongohq.com + P=10017 + ;; +harwich|hw) + # --- CentOS5/x86_64. @pmmman.com hosted VM. mongo-1.6.x. + H=harwich.rpm5.org + ;; +wareham|wh) + # --- Cooker/i586 (w 2Gb limit). IPv6 only. mongo-1.6.x. + H=wareham.jbj.org + ;; +wellfleet|wf) + # --- CentOS5/i686 (w 2Gb limit). @pmmman.com hosted VM. + H=wellfleet.rpm5.org + ;; +localhost|*) + ;; +esac + +# --- Invoke the mongo shell. +$mongo ${H}:${P}/${DB} ${UPW} @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org