From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jul 3 12:00:31 2011 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 E967D10656F3 for ; Sun, 3 Jul 2011 12:00:31 +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 05BEF8FC23 for ; Sun, 3 Jul 2011 12:00:25 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p63C0O4D062789 for ; Sun, 3 Jul 2011 12:00:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p63C0Oho062788; Sun, 3 Jul 2011 12:00:24 GMT (envelope-from gnats) Resent-Date: Sun, 3 Jul 2011 12:00:24 GMT Resent-Message-Id: <201107031200.p63C0Oho062788@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, Charlie & Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0B391065673 for ; Sun, 3 Jul 2011 11:52:18 +0000 (UTC) (envelope-from root@build02.osl2.modirum.com) Received: from build02.osl2.modirum.com (ext.unicore.no [213.225.74.100]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5328FC1F for ; Sun, 3 Jul 2011 11:52:18 +0000 (UTC) Received: from build02.osl2.modirum.com (build02.osl2.modirum.com [10.1.5.217]) by build02.osl2.modirum.com (8.14.4/8.14.4) with ESMTP id p63BR2t9078272 for ; Sun, 3 Jul 2011 11:27:02 GMT (envelope-from root@build02.osl2.modirum.com) Received: (from root@localhost) by build02.osl2.modirum.com (8.14.4/8.14.4/Submit) id p63BR1eU078255; Sun, 3 Jul 2011 11:27:01 GMT (envelope-from root) Message-Id: <201107031127.p63BR1eU078255@build02.osl2.modirum.com> Date: Sun, 3 Jul 2011 11:27:01 GMT From: Charlie & To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/158605: New port: databases/rubygem-rubyrep Multi-master replication for MySQL and PostgreSQL X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Charlie & List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2011 12:00:32 -0000 >Number: 158605 >Category: ports >Synopsis: New port: databases/rubygem-rubyrep Multi-master replication for MySQL and PostgreSQL >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jul 03 12:00:24 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Eirik Oeverby >Release: FreeBSD 8.2-RELEASE amd64 >Organization: >Environment: System: FreeBSD build02.osl2.modirum.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Multi-master replication and sync for MySQL and PostgreSQL. >How-To-Repeat: >Fix: # 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: # # rubygem-rubyrep # rubygem-rubyrep/Makefile # rubygem-rubyrep/distinfo # rubygem-rubyrep/files # rubygem-rubyrep/files/rubyrep.in # rubygem-rubyrep/pkg-descr # echo c - rubygem-rubyrep mkdir -p rubygem-rubyrep > /dev/null 2>&1 echo x - rubygem-rubyrep/Makefile sed 's/^X//' >rubygem-rubyrep/Makefile << '46ecf18c564e445d214043f5bead61e7' X# New ports collection makefile for: pg X# Date created: 28 Jan 2009 X# Whom: Wen Heping X# X# $FreeBSD: ports/databases/rubygem-pg/Makefile,v 1.9 2011/06/19 02:30:14 swills Exp $ X# X XPORTNAME= rubyrep XPORTVERSION= 1.2.0 XCATEGORIES= databases rubygems XMASTER_SITES= RG X XMAINTAINER= ltning@anduin.net XCOMMENT= Multi-master replication and sync for MySQL and PostgreSQL X XUSE_RUBY= yes XUSE_RUBYGEMS= yes XRUBYGEM_AUTOPLIST= yes X XUSE_RC_SUBR= rubyrep X XRUN_DEPENDS+= flog>=0:${PORTSDIR}/sysutils/flog X XOPTIONS = MYSQL "Enable MySQL support" off \ X PGSQL "Enable PostgreSQL support" on X X.include X X.if defined(WITH_PGSQL) XRUN_DEPENDS+= rubygem-pg>=0:${PORTSDIR}/databases/rubygem-pg X.endif X X.if defined(WITH_MYSQL) XRUN_DEPENDS+= ruby-mysql>=0:${PORTSDIR}/databases/ruby-mysql X.endif X X.include 46ecf18c564e445d214043f5bead61e7 echo x - rubygem-rubyrep/distinfo sed 's/^X//' >rubygem-rubyrep/distinfo << '3d55eea23ef1fbf902369e1d453c30d0' XSHA256 (rubygem/rubyrep-1.2.0.gem) = 35348b04b3bc5babac1f8350caa9458ccfe33a16ec4bdbaa9eb9f94fee0c04d4 XSIZE (rubygem/rubyrep-1.2.0.gem) = 142848 3d55eea23ef1fbf902369e1d453c30d0 echo c - rubygem-rubyrep/files mkdir -p rubygem-rubyrep/files > /dev/null 2>&1 echo x - rubygem-rubyrep/files/rubyrep.in sed 's/^X//' >rubygem-rubyrep/files/rubyrep.in << '110723b6d54837e8284ff6db1d1cee9e' X#!/bin/sh X X# PROVIDE: rubyrep X# REQUIRE: NETWORKING SERVERS X# KEYWORD: shutdown X X# Add the following line to /etc/rc.conf to enable `rubyrep': X#rubyrep_enable="YES" X# and be sure to configure (at least) X# %%PREFIX%%/etc/rubyrep/rubyrep.conf X# X# To replicate more than one database, change X#rubyrep_multi="NO" X# to "YES". A rubyrep process will be started for each file with X# .conf suffix in $rubyrep_config_dir. X# X# Additional options: X# X#rubyrep_stdout_log="/var/log/rubyrep.fifo" X#rubyrep_stderr_log="/var/log/rubyrep_err.fifo" X#rubyrep_fifo_logs="YES" X# Specify log files for stdout and stderr. Defaults to using fifos; X# actual log file will have the extension .log. Additional PID files X# will be created for each of the processes used to tap the fifos; X# these can be used in newsyslog.conf(5) to automate log rotation. X# X#rubyrep_config="%%PREFIX%%/etc/rubyrep.conf" X# Specify full path to default rubyrep configuration file. X# NOTE: Ignored if $rubyrep_multi is set to "YES"! X# X#rubyrep_config_dir="%%PREFIX%%/etc/rubyrep" X# Specify directory containing config files for rubyrep. Used X# by $rubyrep_multi, ignored if $rubyrep_multi="NO" (the default). X# X#rubyrep_command="replicate" X# Specify the command to pass to rubyrep. Usually you'll want to X# replicate (the default), but it is also possible to specify "proxy", X# "scan" or "sync". Note: This option applies to all databases if X# $rubyrep_multi="YES"! X# X#rubyrep_command_flags="" X# Specify options to pass to the $rubyrep_command above. For other X# operating modes than "replicate" this may be necessary, especially X# if you want useful log output! Run X# %%prefix%%/bin/rubyrep --help X# for further information. X Xrubyrep_enable="${rubyrep_enable:-"NO"}" Xrubyrep_multi="${rubyrep_multi:-"NO"}" Xrubyrep_command="${rubyrep_command:-"replicate"}" Xrubyrep_command_flags="${rubyrep_command_flags:-""}" Xrubyrep_config="${rubyrep_config:-"%%PREFIX%%/etc/rubyrep.conf"}" Xrubyrep_config_dir="${rubyrep_config_dir:-"%%PREFIX%%/etc/rubyrep"}" Xrubyrep_user="${rubyrep_user:-"daemon"}" Xrubyrep_stdout_log="${rubyrep_stdout_log:-"/var/log/rubyrep.fifo"}" Xrubyrep_stderr_log="${rubyrep_stderr_log:-"/var/log/rubyrep_err.fifo"}" Xrubyrep_fifo_logs="YES" X X. /etc/rc.subr X Xcheckfifo() { X # Check and create if necessary fifo special files for logging X for f in $stdout_log $stderr_log ; do X flog_fifo=$f X if [ ! -p "$flog_fifo" ] ; then X mkfifo $flog_fifo ; chown ${rubyrep_user} $flog_fifo X fi X done X} X Xpid_touch () { X touch $pidfile X chown $rubyrep_user $pidfile X} X Xrubyrep_prestart() { X pid_touch X if [ "$rubyrep_fifo_logs"="YES" ] ; then X umask 027 X checkfifo X for f in $stdout_log $stderr_log ; do X flog_fifo=$f X flog_args=" -t " X if [ "$cfgname" ] ; then X local out_log="`dirname $f`/`basename -s .fifo.$cfgname $flog_fifo`.$cfgname.log" X local out_pid="/var/run/`basename -s .fifo.$cfgname $flog_fifo`.$cfgname.flog.pid" X else X local out_log="`dirname $f`/`basename -s .fifo $flog_fifo`.log" X local out_pid="/var/run/`basename -s .fifo $flog_fifo`.flog.pid" X fi X X echo "Enabling logging for $flog_fifo ($out_log, $out_pid)..." X echo "%%PREFIX%%/bin/flog $flog_args $out_log < $flog_fifo &" X %%PREFIX%%/bin/flog $flog_args $out_log < $flog_fifo & X echo $! > $out_pid X done X fi X} X Xrubyrep_stop() { X if [ -f "$pidfile" ] ; then X kill -9 `cat $pidfile` X rm $pidfile X else X echo "PID file not found ($pidfile)" X fi X} X Xrubyrep_poststop() { X if [ "$rubyrep_fifo_logs"="YES" ] ; then X for f in $stdout_log $stderr_log ; do X flog_fifo=$f X if [ "$cfgname" ] ; then X local out_pid="/var/run/`basename -s .fifo.$cfgname $flog_fifo`.$cfgname.flog.pid" X else X local out_pid="/var/run/`basename -s .fifo $flog_fifo`.flog.pid" X fi X kill $out_pid >/dev/null 2>/dev/null X rm $out_pid >/dev/null 2>/dev/null X done X fi X} X Xrubyrep_init() { X if [ "$rubyrep_multi" = "NO" ] ; then X cmdline="%%PREFIX%%/bin/rubyrep generate $rubyrep_config" X if [ "$1" = "init" -a -f "$rubyrep_config" ] ; then X echo "Skipping file $rubyrep_config (already exists)." X else X echo "Generating template file $rubyrep_config" X $cmdline X fi X else X echo 'Command not available when $rubyrep_multi="YES"'. X exit X fi X} X Xname="rubyrep" Xrcvar=`set_rcvar` X X# read configuration and set defaults Xload_rc_config $name X Xextra_commands="init" Xinit_cmd="${name}_init" X Xcommand="/usr/sbin/daemon" Xstart_precmd="${name}_prestart" Xstop_cmd="${name}_stop" Xstop_postcmd="${name}_poststop" Xrubyrep_command_flags="$rubyrep_command_flags" X Xif [ "$rubyrep_multi" = "NO" ] ; then X stdout_log=${rubyrep_stdout_log} X stderr_log=${rubyrep_stderr_log} X log_args=">> ${stdout_log} 2>> ${stderr_log} " X cmdline="%%PREFIX%%/bin/rubyrep $rubyrep_command $rubyrep_command_flags -c $rubyrep_config" X pidfile="/var/run/$name.pid" X flags="-p ${pidfile} ${cmdline} ${log_args}" X run_rc_command "$1" Xelif [ "$rubyrep_multi" = "YES" ] ; then X [ ! -d "$rubyrep_config_dir" ] && mkdir -p "$rubyrep_config_dir" X for i in `ls $rubyrep_config_dir/*.conf` ; do X rubyrep_config=$i X cfgname=$(basename -s .conf $i) X stdout_log=${rubyrep_stdout_log}.$cfgname X stderr_log=${rubyrep_stderr_log}.$cfgname X log_args=">> ${stdout_log} 2>> ${stderr_log} " X cmdline="%%PREFIX%%/bin/rubyrep $rubyrep_command $rubyrep_command_flags -c $rubyrep_config" X pidfile="/var/run/${name}_${cfgname}.pid" X flags="-p ${pidfile} ${cmdline} ${log_args}" X run_rc_command "$1" X done Xfi 110723b6d54837e8284ff6db1d1cee9e echo x - rubygem-rubyrep/pkg-descr sed 's/^X//' >rubygem-rubyrep/pkg-descr << '86a2eb1fc929445e37be1c2eda5a248c' XMission: XDevelopment of an open-source solution for asynchronous, master-master Xreplication of relational databases that is X X- ridiculously easy to use X- database independent X XCurrently supports PostgreSQL and MySQL. X XWWW: http://www.rubyrep.org/ 86a2eb1fc929445e37be1c2eda5a248c exit >Release-Note: >Audit-Trail: >Unformatted: