Index: UIDs =================================================================== --- UIDs (revision 359698) +++ UIDs (working copy) @@ -109,6 +109,7 @@ tinydns:*:185:185::0:0:tinydns pseudo-user:/nonexi dnslog:*:186:186::0:0:dnslog pseudo-user:/nonexistent:/usr/sbin/nologin swift:*:187:187::0:0:Swift daemon pseudo-user:/nonexistent:/usr/sbin/nologin netxms:*:188:188::0:0:netxms pseudo-user:/nonexistent:/usr/sbin/nologin +leofs:*:189:189::0:0:LeoFS daemons pseudo-user:/var/db/leofs:/usr/sbin/nologin moinmoin:*:192:192::0:0:MoinMoin User:/nonexistent:/usr/sbin/nologin cups:*:193:193::0:0:Cups Owner:/nonexistent:/usr/sbin/nologin saned:*:194:194::0:0:SANE Scanner Daemon:/nonexistent:/bin/sh Index: GIDs =================================================================== --- GIDs (revision 359698) +++ GIDs (working copy) @@ -105,6 +105,7 @@ tinydns:*:185: dnslog:*:186: swift:*:187: netxms:*:188: +leofs:*:189: moinmoin:*:192: cups:*:193: saned:*:194: Index: databases/Makefile =================================================================== --- databases/Makefile (revision 359698) +++ databases/Makefile (working copy) @@ -133,6 +133,8 @@ SUBDIR += kyotocabinet SUBDIR += kyototycoon SUBDIR += ldb + SUBDIR += leo_center + SUBDIR += leofs SUBDIR += leveldb SUBDIR += libdbi SUBDIR += libdbi-drivers @@ -860,6 +862,7 @@ SUBDIR += rubygem-do_sqlite3 SUBDIR += rubygem-familia SUBDIR += rubygem-jdbc-mysql + SUBDIR += rubygem-leo_manager_client SUBDIR += rubygem-memcache SUBDIR += rubygem-memcache-client SUBDIR += rubygem-mysql Index: databases/leo_center/Makefile =================================================================== --- databases/leo_center/Makefile (revision 0) +++ databases/leo_center/Makefile (working copy) @@ -0,0 +1,80 @@ +# Created by: Mikolaj Golub +# $FreeBSD$ + +PORTNAME= leo_center +PORTVERSION= 0.4.10 +CATEGORIES= databases + +MAINTAINER= trociny@FreeBSD.org +COMMENT= LeoFS Web console + +LICENSE= APACHE20 + +USE_GITHUB= yes +GH_ACCOUNT= leo-project +GH_PROJECT= leo_center +GH_TAGNAME= f7b6570 +GH_COMMIT= f7b6570 + +DIST_SUBDIR= leofs + +RUN_DEPENDS= rubygem-haml>=0:${PORTSDIR}/www/rubygem-haml \ + rubygem-leo_manager_client>=0.4.10:${PORTSDIR}/databases/rubygem-leo_manager_client \ + rubygem-sinatra-contrib>=0:${PORTSDIR}/www/rubygem-sinatra-contrib \ + rubygem-sinatra>=1.4.3:${PORTSDIR}/www/rubygem-sinatra \ + rubygem-thin>=0:${PORTSDIR}/www/rubygem-thin + +USE_RC_SUBR= ${PORTNAME} + +LEOFS_USER= leofs +LEOFS_GROUP= leofs +USERS= ${LEOFS_USER} +GROUPS= ${LEOFS_GROUP} + +ETCDIR= ${PREFIX}/etc/leofs + +LEOFS_LOGDIR= /var/log/leofs +LEOFS_RUNDIR= /var/run/leofs + +PLIST_SUB+= LEOFS_USER=${LEOFS_USER} \ + LEOFS_GROUP=${LEOFS_GROUP} \ + LEOFS_LOGDIR=${LEOFS_LOGDIR} \ + LEOFS_RUNDIR=${LEOFS_RUNDIR} + +SUB_LIST+= LEOFS_USER=${LEOFS_USER} \ + LEOFS_GROUP=${LEOFS_GROUP} \ + LEOFS_LOGDIR=${LEOFS_LOGDIR} \ + LEOFS_RUNDIR=${LEOFS_RUNDIR} + +NO_BUILD= yes + +post-patch: + @${REINPLACE_CMD} \ + 's|config_file = .*|config_file = "${ETCDIR}/${PORTNAME}.conf"|' \ + ${WRKSRC}/lib/helpers.rb + @${REINPLACE_CMD} \ + 's|#{settings.root}/log/|${LEOFS_LOGDIR}/${PORTNAME}_|' \ + ${WRKSRC}/app.rb + +do-install: + ${MKDIR} ${STAGEDIR}${DATADIR} ${STAGEDIR}${ETCDIR} \ + ${STAGEDIR}${LEOFS_LOGDIR} ${STAGEDIR}${LEOFS_RUNDIR} + ${CP} -R ${WRKSRC}/* ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/config.yml \ + ${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample + ${FIND} ${STAGEDIR} -type f \( -name '*.bak' -or -name '*.orig' \) -delete + cd ${STAGEDIR}${PREFIX} ; \ + ${FIND} share/leo_center -type f -o -type l | ${SORT} \ + > ${WRKDIR}/PLIST.leo_center + cd ${STAGEDIR}${PREFIX} ; \ + ${FIND} share/leo_center -type d | ${SORT} -r | \ + ${SED} -e 's|^|@dirrmtry |' >> ${WRKDIR}/PLIST.leo_center + ${ECHO_CMD} "r ${TMPPLIST}" > ${WRKDIR}/ex.script + ${ECHO_CMD} "/Insert PLIST.leo_center" >> ${WRKDIR}/ex.script + ${ECHO_CMD} "d" >> ${WRKDIR}/ex.script + ${ECHO_CMD} "r ${WRKDIR}/PLIST.leo_center" >> ${WRKDIR}/ex.script + ${ECHO_CMD} "x!" >> ${WRKDIR}/ex.script + ${CP} -p ${TMPPLIST} ${TMPPLIST}.pre-leo_center + cd ${WRKDIR} ; ex < ex.script + +.include Property changes on: databases/leo_center/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: databases/leo_center/distinfo =================================================================== --- databases/leo_center/distinfo (revision 0) +++ databases/leo_center/distinfo (working copy) @@ -0,0 +1,2 @@ +SHA256 (leofs/leo_center-0.4.10.tar.gz) = c24148264fd8ee28b4feec84c5d0471ccf3c605ff7a75684cd28cd43f0ec5d4a +SIZE (leofs/leo_center-0.4.10.tar.gz) = 12872990 Property changes on: databases/leo_center/distinfo ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leo_center/files/leo_center.in =================================================================== --- databases/leo_center/files/leo_center.in (revision 0) +++ databases/leo_center/files/leo_center.in (working copy) @@ -0,0 +1,64 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: leo_center +# REQUIRE: LOGIN cleanvar +# KEYWORD: shutdown +# +# /etc/rc.conf variables: +# +# leo_center_enable: Set it to "YES" to enable leo_center. +# Default is "NO". +# leo_center_user User to run daemon as . +# Default is "%%LEOFS_USER%%". +# leo_center_group Group to run daemon as. +# Default is "%%LEOFS_GROUP%%". +# leo_center_address Address to bind. +# Default is "0.0.0.0". +# leo_center_port Port to use. +# Default is "8000". +# leo_center_log Log file. +# Default is "%%LEOFS_LOGDIR%%/leo_center.log". +# leo_center_pid Pid file. +# Default is "%%LEOFS_RUNDIR%%/leo_center.pid". +# leo_center_flags Additional thin(1) options. +# Default is "". +# + +. /etc/rc.subr + +name=leo_center +rcvar=leo_center_enable + +load_rc_config ${name} + +: ${leo_center_enable:="NO"} +: ${leo_center_user:=%%LEOFS_USER%%} +: ${leo_center_group:=%%LEOFS_GROUP%%} +: ${leo_center_address:="0.0.0.0"} +: ${leo_center_port:="8000"} +: ${leo_center_log:="%%LEOFS_LOGDIR%%/${name}.log"} +: ${leo_center_pid:="%%LEOFS_RUNDIR%%/${name}.pid"} +: ${leo_center_flags:=""} + +required_files=%%ETCDIR%%/${name}.conf +pidfile=${leo_center_pid} + +command="%%PREFIX%%/bin/thin" +command_args=" \ + --user ${leo_center_user} \ + --group ${leo_center_group} \ + --address ${leo_center_address} \ + --port ${leo_center_port} \ + --log ${leo_center_log} \ + --pid ${leo_center_pid} \ + --tag ${name} \ + --chdir %%DATADIR%% \ + --daemonize \ + ${leo_center_flags} \ + start \ +" +procname=$(basename $(head -1 ${command})) + +run_rc_command "$1" Property changes on: databases/leo_center/files/leo_center.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leo_center/pkg-descr =================================================================== --- databases/leo_center/pkg-descr (revision 0) +++ databases/leo_center/pkg-descr (working copy) @@ -0,0 +1,5 @@ +LeoFS is a highly scalable, fault-tolerant distributed file system for +the Web. LeoCenter is LeoFS Web console in your browser. You can use +it to easily operate LeoFS. + +WWW: http://leo-project.net/ Property changes on: databases/leo_center/pkg-descr ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leo_center/pkg-plist =================================================================== --- databases/leo_center/pkg-plist (revision 0) +++ databases/leo_center/pkg-plist (working copy) @@ -0,0 +1,15 @@ +@owner %%LEOFS_USER%% +@group %%LEOFS_GROUP%% +@exec mkdir -p %%LEOFS_LOGDIR%% +@exec mkdir -p %%LEOFS_RUNDIR%% +@dirrmtry %%LEOFS_RUNDIR%% +@dirrmtry %%LEOFS_LOGDIR%% +@owner root +@group wheel +@unexec if cmp -s %D/%%ETCDIR%%/leo_center.conf.sample %D/%%ETCDIR%%/leo_center.conf; then rm -f %D/%%ETCDIR%%/leo_center.conf; fi +%%ETCDIR%%/leo_center.conf.sample +@exec if [ ! -f %D/%%ETCDIR%%/leo_center.conf ] ; then cp -p %D/%F %B/leo_center.conf; fi +@dirrmtry %%ETCDIR%% +@comment Insert PLIST.leo_center here +@comment -=[ begin PLIST.leo_center ]=- +@comment -=[ end PLIST.leo_center ]=- Property changes on: databases/leo_center/pkg-plist ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/Makefile =================================================================== --- databases/leofs/Makefile (revision 0) +++ databases/leofs/Makefile (working copy) @@ -0,0 +1,235 @@ +# Created by: Mikolaj Golub +# $FreeBSD$ + +PORTNAME= leofs +PORTVERSION= 1.0.2 +CATEGORIES= databases + +MAINTAINER= trociny@FreeBSD.org +COMMENT= Highly scalable, fault-tolerant distributed file system + +LICENSE= APACHE20 + +DISTFILES= leofs-${PORTVERSION}.tar.gz +EXTRACT_ONLY= leofs-${PORTVERSION}.tar.gz + +DIST_SUBDIR= ${PORTNAME} + +BUILD_DEPENDS= ${LOCALBASE}/lib/erlang16/bin/erlc:${PORTSDIR}/lang/erlang-runtime16 \ + ${LOCALBASE}/bin/cmake:${PORTSDIR}/devel/cmake \ + ${LOCALBASE}/lib/libcheck.a:${PORTSDIR}/devel/libcheck + +USE_GITHUB= yes +GH_ACCOUNT= leo-project +GH_PROJECT= leofs +GH_TAGNAME= 26c99d1 +GH_COMMIT= 26c99d1 + +LEOFS_USER= leofs +LEOFS_GROUP= leofs +USERS= ${LEOFS_USER} +GROUPS= ${LEOFS_GROUP} + +LEOFS_ETCDIR= ${ETCDIR} +LEOFS_BASEDIR= ${PREFIX}/lib/${PORTNAME} +LEOFS_DBDIR= /var/db/${PORTNAME} +LEOFS_LOGDIR= /var/log/${PORTNAME} +LEOFS_RUNDIR= /var/run/${PORTNAME} + +LEOFS_SBIN_FILES= \ + leo_gateway \ + leo_manager \ + leo_manager_slave \ + leo_storage \ + leofs + +PLIST_SUB+= LEOFS_USER=${LEOFS_USER} \ + LEOFS_GROUP=${LEOFS_GROUP} \ + LEOFS_DBDIR=${LEOFS_DBDIR} \ + LEOFS_LOGDIR=${LEOFS_LOGDIR} \ + LEOFS_RUNDIR=${LEOFS_RUNDIR} + +SUB_LIST+= LEOFS_USER=${LEOFS_USER} \ + LEOFS_GROUP=${LEOFS_GROUP} \ + LEOFS_ETCDIR=${LEOFS_ETCDIR} \ + LEOFS_BASEDIR=${LEOFS_BASEDIR} \ + LEOFS_DBDIR=${LEOFS_DBDIR} \ + LEOFS_LOGDIR=${LEOFS_LOGDIR} \ + LEOFS_RUNDIR=${LEOFS_RUNDIR} + +SUB_FILES+= ${LEOFS_SBIN_FILES:S/^/sbin-/} + +USES= gmake pkgconfig dos2unix +USE_RC_SUBR= ${PORTNAME} + +DOS2UNIX_FILES= deps/leo_*/snmp/snmpa_*/leo_*_snmp.config + +ALL_TARGET= release +MAKE_JOBS_UNSAFE=yes +MAKE_ENV= PATH=${LOCALBASE}/lib/erlang16/bin:${PATH} + +LEOFS_DEPS= \ + leo-project/leo_gateway=${PORTVERSION}?498fa83:leo_gateway \ + leo-project/leo_manager=${PORTVERSION}?ec208bc:leo_manager \ + leo-project/leo_storage=${PORTVERSION}?b1e6112:leo_storage \ + basho/bitcask=1.6.7?807b473:bitcask \ + basho/eleveldb=1.4.7?98a465d:eleveldb \ + basho/leveldb=1.4.7?b1678e6:leveldb \ + boundary/bear=0.8.1?5f99806:bear \ + boundary/folsom=0.8.1?015c646:folsom \ + davisp/jiffy=0.8.5?d16a4fd:jiffy \ + eproxus/meck=0.6.2?2447206:meck \ + extend/cowboy=0.8.6?9eaee45:cowboy \ + extend/ranch=0.8.4?4f70a16:ranch \ + leo-project/erlang-lz4=0.2.1?74a475a:lz4 \ + leo-project/leo_backend_db=1.0.3?502a3b5:leo_backend_db \ + leo-project/leo_cache=0.4.20?501d8cd:leo_cache \ + leo-project/leo_commons=1.0.1?90b1b96:leo_commons \ + leo-project/leo_dcerl=0.2.8?2ca267d:leo_dcerl \ + leo-project/leo_logger=1.0.2?7b90fad:leo_logger \ + leo-project/leo_mcerl=0.2.10?1fb1ac8:leo_mcerl \ + leo-project/leo_mq=1.0.3?f425615:leo_mq \ + leo-project/leo_object_storage=1.0.4?54cf0f7:leo_object_storage \ + leo-project/leo_ordning_reda=0.10.3?be722bb:leo_ordning_reda \ + leo-project/leo_pod=0.6.0?9a7de8b:leo_pod \ + leo-project/leo_redundant_manager=1.8.1?abb473a:leo_redundant_manager \ + leo-project/leo_rpc=0.8.3?073ef14:leo_rpc \ + leo-project/leo_s3_libs=1.0.1?4ada19b:leo_s3_libs \ + leo-project/leo_statistics=1.0.2?7ba5f23:leo_statistics \ + leo-project/libcutil=0.4.3?36b02d9:libcutil \ + leo-project/savanna_agent=0.2.2?96f3420:savanna_agent \ + leo-project/savanna_commons=0.6.3?b4e7fea:savanna_commons \ + manopapad/proper=7d535ac?7d535ac:proper + +.for dep in ${LEOFS_DEPS} +.for account in ${dep:C,/.*$,,} +.for project in ${dep:C,^[^/]+/([^=]+)=.*$,\1,} +.for tagname in ${dep:C,^[^=]+=([^\?]+)\?.*$,\1,} +.for commit in ${dep:C,^[^\?]+\?([^:]+):.*$,\1,} +.for label in ${dep:C,^.*:,,} +MASTER_SITES+= https://codeload.github.com/${account}/${project}/legacy.tar.gz/${commit}?dummy=/:${label} +DISTFILES+= ${project}-${tagname}.tar.gz:${label} +.endfor +.endfor +.endfor +.endfor +.endfor +.endfor + +post-extract: +.for dep in ${LEOFS_DEPS} +.for account in ${dep:C,/.*$,,} +.for project in ${dep:C,^[^/]+/([^=]+)=.*$,\1,} +.for tagname in ${dep:C,^[^=]+=([^\?]+)\?.*$,\1,} +.for commit in ${dep:C,^[^\?]+\?([^:]+):.*$,\1,} +.for label in ${dep:C,^.*:,,} + @${MKDIR} ${WRKSRC}/deps/${label} + @${TAR} -C ${WRKSRC}/deps/${label} --strip-components 1 \ + -xzf ${DISTDIR}/${DIST_SUBDIR}/${project}-${tagname}.tar.gz + @if [ -f "${WRKSRC}/deps/${label}/src/${label}.app.src" ]; then \ + ${REINPLACE_CMD} -e "s/{vsn, *git}/{vsn, \"${tagname}\"}/" \ + "${WRKSRC}/deps/${label}/src/${label}.app.src"; \ + fi +.endfor +.endfor +.endfor +.endfor +.endfor +.endfor + @(cd ${WRKSRC}/deps/eleveldb/c_src && ${LN} -s ../../leveldb) + @(cd ${WRKSRC}/deps/leo_mcerl/c_src && ${LN} -s ../../libcutil) + @(cd ${WRKSRC}/deps/leo_dcerl/c_src && ${LN} -s ../../libcutil) + +post-patch: + @${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g; \ + s|%%LEOFS_DBDIR%%|${LEOFS_DBDIR}|g; \ + s|%%LEOFS_LOGDIR%%|${LEOFS_LOGDIR}|g;' \ + ${WRKSRC}/deps/leo_gateway/priv/leo_gateway.conf \ + ${WRKSRC}/deps/leo_gateway/priv/leo_gateway.schema \ + ${WRKSRC}/deps/leo_gateway/snmp/snmpa_gateway_0/leo_gateway_snmp.config \ + ${WRKSRC}/deps/leo_manager/priv/leo_manager_0.conf \ + ${WRKSRC}/deps/leo_manager/priv/leo_manager_0.schema \ + ${WRKSRC}/deps/leo_manager/priv/leo_manager_1.conf \ + ${WRKSRC}/deps/leo_manager/priv/leo_manager_1.schema \ + ${WRKSRC}/deps/leo_manager/snmp/snmpa_manager_0/leo_manager_snmp.config \ + ${WRKSRC}/deps/leo_manager/snmp/snmpa_manager_1/leo_manager_snmp.config \ + ${WRKSRC}/deps/leo_storage/priv/leo_storage.conf \ + ${WRKSRC}/deps/leo_storage/priv/leo_storage.schema \ + ${WRKSRC}/deps/leo_storage/snmp/snmpa_storage_0/leo_storage_snmp.config + +do-install: + ${MKDIR} \ + ${STAGEDIR}${LEOFS_BASEDIR}/bin \ + ${STAGEDIR}${LEOFS_BASEDIR}/snmp \ + ${STAGEDIR}${LEOFS_BASEDIR}/releases/1 \ + ${STAGEDIR}${LEOFS_ETCDIR} \ + ${STAGEDIR}${LEOFS_DBDIR} \ + ${STAGEDIR}${LEOFS_LOGDIR} \ + ${STAGEDIR}${LEOFS_RUNDIR} + ${CP} -R \ + ${WRKSRC}/package/leo_gateway/etc \ + ${WRKSRC}/package/leo_gateway/erts-* \ + ${WRKSRC}/package/leo_gateway/lib \ + ${WRKSRC}/package/leo_manager_0/etc \ + ${WRKSRC}/package/leo_manager_0/lib \ + ${WRKSRC}/package/leo_storage/etc \ + ${WRKSRC}/package/leo_storage/lib \ + ${STAGEDIR}${LEOFS_BASEDIR} + ${INSTALL_DATA} ${WRKSRC}/package/leo_manager_1/etc/leo_manager.schema \ + ${STAGEDIR}${LEOFS_BASEDIR}/etc/leo_manager_slave.schema + ${INSTALL_DATA} ${WRKSRC}/package/leo_manager_1/etc/leo_manager.conf \ + ${STAGEDIR}${LEOFS_BASEDIR}/etc/leo_manager_slave.conf + ${INSTALL_SCRIPT} ${WRKSRC}/package/leo_gateway/bin/cuttlefish \ + ${STAGEDIR}${LEOFS_BASEDIR}/bin + ${INSTALL_DATA} ${WRKSRC}/package/leo_gateway/releases/start_erl.data \ + ${STAGEDIR}${LEOFS_BASEDIR}/releases + ${INSTALL_DATA} ${WRKSRC}/package/leo_gateway/releases/1/start_clean.* \ + ${STAGEDIR}${LEOFS_BASEDIR}/releases/1 + ${CP} -R ${WRKSRC}/package/leo_gateway/releases \ + ${STAGEDIR}${LEOFS_BASEDIR}/releases/leo_gateway + ${CP} -R ${WRKSRC}/package/leo_manager_0/releases \ + ${STAGEDIR}${LEOFS_BASEDIR}/releases/leo_manager + ${CP} -R ${WRKSRC}/package/leo_storage/releases \ + ${STAGEDIR}${LEOFS_BASEDIR}/releases/leo_storage + ${CP} -R ${WRKSRC}/package/leo_gateway/snmp/snmpa_gateway_0 \ + ${STAGEDIR}${LEOFS_BASEDIR}/snmp/snmpa_gateway + ${CP} -R ${WRKSRC}/package/leo_manager_0/snmp/snmpa_manager_0 \ + ${STAGEDIR}${LEOFS_BASEDIR}/snmp/snmpa_manager + ${CP} -R ${WRKSRC}/package/leo_manager_1/snmp/snmpa_manager_1 \ + ${STAGEDIR}${LEOFS_BASEDIR}/snmp/snmpa_manager_slave + ${CP} -R ${WRKSRC}/package/leo_storage/snmp/snmpa_storage_0 \ + ${STAGEDIR}${LEOFS_BASEDIR}/snmp/snmpa_storage + ${INSTALL_DATA} ${WRKSRC}/package/leo_gateway/etc/leo_gateway.conf \ + ${STAGEDIR}${LEOFS_ETCDIR}/leo_gateway.conf.sample + ${INSTALL_DATA} ${WRKSRC}/package/leo_gateway/etc/server_cert.pem \ + ${STAGEDIR}${LEOFS_ETCDIR}/server_cert.pem.sample + ${INSTALL_DATA} ${WRKSRC}/package/leo_gateway/etc/server_key.pem \ + ${STAGEDIR}${LEOFS_ETCDIR}/server_key.pem.sample + ${INSTALL_DATA} ${WRKSRC}/package/leo_manager_0/etc/leo_manager.conf \ + ${STAGEDIR}${LEOFS_ETCDIR}/leo_manager.conf.sample + ${INSTALL_DATA} ${WRKSRC}/package/leo_manager_1/etc/leo_manager.conf \ + ${STAGEDIR}${LEOFS_ETCDIR}/leo_manager_slave.conf.sample + ${INSTALL_DATA} ${WRKSRC}/package/leo_storage/etc/leo_storage.conf \ + ${STAGEDIR}${LEOFS_ETCDIR}/leo_storage.conf.sample +.for f in ${LEOFS_SBIN_FILES} + ${INSTALL_SCRIPT} ${WRKDIR}/sbin-${f} ${STAGEDIR}${PREFIX}/sbin/${f} +.endfor + ${FIND} ${STAGEDIR} -type f \( -name '*.bak' -or -name '*.orig' \) -delete + cd ${STAGEDIR}${PREFIX} ; \ + ${FIND} ${LEOFS_BASEDIR:S/${PREFIX}\///} \ + ${LEOFS_LIBXDIR:S/${PREFIX}\///} -type f -o -type l \ + | ${SORT} > ${WRKDIR}/PLIST.leofs + cd ${STAGEDIR}${PREFIX} ; \ + ${FIND} ${LEOFS_BASEDIR:S/${PREFIX}\///} \ + ${LEOFS_LIBXDIR:S/${PREFIX}\///} -type d \ + | ${SORT} -r | ${SED} -e 's/^/@dirrmtry /' \ + >> ${WRKDIR}/PLIST.leofs + ${ECHO_CMD} "r ${TMPPLIST}" > ${WRKDIR}/ex.script + ${ECHO_CMD} "/Insert PLIST.leofs" >> ${WRKDIR}/ex.script + ${ECHO_CMD} "d" >> ${WRKDIR}/ex.script + ${ECHO_CMD} "r ${WRKDIR}/PLIST.leofs" >> ${WRKDIR}/ex.script + ${ECHO_CMD} "x!" >> ${WRKDIR}/ex.script + ${CP} -p ${TMPPLIST} ${TMPPLIST}.pre-leofs + cd ${WRKDIR} ; ex < ex.script + +.include Property changes on: databases/leofs/Makefile ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/distinfo =================================================================== --- databases/leofs/distinfo (revision 0) +++ databases/leofs/distinfo (working copy) @@ -0,0 +1,64 @@ +SHA256 (leofs/leofs-1.0.2.tar.gz) = 8df9b9ffdf163b8f47457923d9150310592ff0daa6a39081ae06bb054168ecab +SIZE (leofs/leofs-1.0.2.tar.gz) = 251433 +SHA256 (leofs/leo_gateway-1.0.2.tar.gz) = 29e92e8a99be16f8967900c157769addbede16299e0d4ed176cc6b65b3af8482 +SIZE (leofs/leo_gateway-1.0.2.tar.gz) = 558142 +SHA256 (leofs/leo_manager-1.0.2.tar.gz) = 956e2b15a9369c93690749742dae383a69e0890df3555541dfd4873b72109d17 +SIZE (leofs/leo_manager-1.0.2.tar.gz) = 567859 +SHA256 (leofs/leo_storage-1.0.2.tar.gz) = 383a43b6b31cea21151a9d9b58f3e19c5015ba4ef5206301258808f0b263f2eb +SIZE (leofs/leo_storage-1.0.2.tar.gz) = 548681 +SHA256 (leofs/bitcask-1.6.7.tar.gz) = 54e3eedfdb1564085bce5740b49f6bcfe1eca24262b55758eb2e12911d32d4e6 +SIZE (leofs/bitcask-1.6.7.tar.gz) = 900099 +SHA256 (leofs/eleveldb-1.4.7.tar.gz) = 33e4918059d455fd79486d947dbecd29631d83326f332dbe5dc24d424b3beebe +SIZE (leofs/eleveldb-1.4.7.tar.gz) = 1711226 +SHA256 (leofs/leveldb-1.4.7.tar.gz) = 9bd6fc8b0e539a2db0c1622f5a28a5f5b7a2fdfe64768c2fc22ceb677624baad +SIZE (leofs/leveldb-1.4.7.tar.gz) = 262962 +SHA256 (leofs/bear-0.8.1.tar.gz) = 434c4db014b0ba13d6ea2edb2baa5be68d6026ad18a3400be49c0cb8d908305f +SIZE (leofs/bear-0.8.1.tar.gz) = 110475 +SHA256 (leofs/folsom-0.8.1.tar.gz) = 6df47c946d7275cdbc314c84aec231c0929bbf280d3901ea087ed9f56106a69f +SIZE (leofs/folsom-0.8.1.tar.gz) = 174107 +SHA256 (leofs/jiffy-0.8.5.tar.gz) = 7247d52e19a69a8ec7efba62f94b4f198a9828d20a31d4137abc34c2f22a122c +SIZE (leofs/jiffy-0.8.5.tar.gz) = 1851819 +SHA256 (leofs/meck-0.6.2.tar.gz) = 6b4a9890f2b48158d95f5f848e0c541f847e67142238ebad9fed7da9c75ef0a0 +SIZE (leofs/meck-0.6.2.tar.gz) = 23459 +SHA256 (leofs/cowboy-0.8.6.tar.gz) = bc89daa585f370b85a4c5ada7d8ea457fe2dca03469b10004f82fb9d802137be +SIZE (leofs/cowboy-0.8.6.tar.gz) = 3931343 +SHA256 (leofs/ranch-0.8.4.tar.gz) = a71388499066eb0b52bb257e5b82736e5f4a55333ddf4d3a9d5ad4ccbc0d2b65 +SIZE (leofs/ranch-0.8.4.tar.gz) = 29111 +SHA256 (leofs/erlang-lz4-0.2.1.tar.gz) = 01a699d9e4de14bee5b61be60bb05ceaeee873715d2096b48892b2ffcbf3dd2f +SIZE (leofs/erlang-lz4-0.2.1.tar.gz) = 133890 +SHA256 (leofs/leo_backend_db-1.0.3.tar.gz) = 508b2e2d17e158ecea65a415549f887d29630634910f5471d6658d59401e0fdc +SIZE (leofs/leo_backend_db-1.0.3.tar.gz) = 176701 +SHA256 (leofs/leo_cache-0.4.20.tar.gz) = cdb9c1f30eb154d02986971905ee307414a3098b925090375635428f1c673954 +SIZE (leofs/leo_cache-0.4.20.tar.gz) = 175178 +SHA256 (leofs/leo_commons-1.0.1.tar.gz) = 93ddd6884650b67972f26d07587c4f36c20a7a53f5d33abd8abef5895da5e9dd +SIZE (leofs/leo_commons-1.0.1.tar.gz) = 185383 +SHA256 (leofs/leo_dcerl-0.2.8.tar.gz) = 82206d7ee0bf98348dae9e7f3262e5137d9e93f9fd54abff2f58288cd077de6d +SIZE (leofs/leo_dcerl-0.2.8.tar.gz) = 175268 +SHA256 (leofs/leo_logger-1.0.2.tar.gz) = 8fe33fc89b1d653f09c4ca4ec59a0f13f92a00f4c5ffdb89cecb9a427c6cd852 +SIZE (leofs/leo_logger-1.0.2.tar.gz) = 199247 +SHA256 (leofs/leo_mcerl-0.2.10.tar.gz) = db105288622e3cf212654f489df9e0bc0d894fb4dbf827b907ce5aebe023a2fe +SIZE (leofs/leo_mcerl-0.2.10.tar.gz) = 169284 +SHA256 (leofs/leo_mq-1.0.3.tar.gz) = 192bb8f8b7cd1eb193e2915f6419f3f8626d38c1458c097472d999a6534ef77c +SIZE (leofs/leo_mq-1.0.3.tar.gz) = 171364 +SHA256 (leofs/leo_object_storage-1.0.4.tar.gz) = 6102348c54aa47cb81f88fe6a36df31d27d96961d44d5a99998caa80b37838e2 +SIZE (leofs/leo_object_storage-1.0.4.tar.gz) = 193800 +SHA256 (leofs/leo_ordning_reda-0.10.3.tar.gz) = f83d03d7507ceeed23a43e042d5813171257599755f739e196392eedc61ed333 +SIZE (leofs/leo_ordning_reda-0.10.3.tar.gz) = 175888 +SHA256 (leofs/leo_pod-0.6.0.tar.gz) = 2d48de44bd0c965f4808be5b9ed00534aeb3f0560a4ca6f59ad5dc56ebfae67b +SIZE (leofs/leo_pod-0.6.0.tar.gz) = 169107 +SHA256 (leofs/leo_redundant_manager-1.8.1.tar.gz) = 129023505e14f9770692b59052302016405f445bfd2fcb56e197f13ed5e5e6b7 +SIZE (leofs/leo_redundant_manager-1.8.1.tar.gz) = 218134 +SHA256 (leofs/leo_rpc-0.8.3.tar.gz) = 01159910cb291a5c3fe46d76c5e96920e53ea97348c6bc06bb7aecf519e6f3ae +SIZE (leofs/leo_rpc-0.8.3.tar.gz) = 185315 +SHA256 (leofs/leo_s3_libs-1.0.1.tar.gz) = 842eceabbbefc6028a96b330b3ef9071a3b4a290aef760b44634de47bffe23ab +SIZE (leofs/leo_s3_libs-1.0.1.tar.gz) = 190614 +SHA256 (leofs/leo_statistics-1.0.2.tar.gz) = 16b9bdfbf77ff56131dd6a2b06b5c894c84e3dbe79b3caa5674d0333820c4703 +SIZE (leofs/leo_statistics-1.0.2.tar.gz) = 177829 +SHA256 (leofs/libcutil-0.4.3.tar.gz) = 3dc660d3d506b5e39cfa366977ba8719ae6bc86aca78e84c901548c574b090b2 +SIZE (leofs/libcutil-0.4.3.tar.gz) = 23101 +SHA256 (leofs/savanna_agent-0.2.2.tar.gz) = b7c86e258d568ef1b140e521f12f0e157f4c2b0c78324a825c4f6500107a35a6 +SIZE (leofs/savanna_agent-0.2.2.tar.gz) = 175567 +SHA256 (leofs/savanna_commons-0.6.3.tar.gz) = 986ed56f82c20ca6575887f8dea11f7667764309ecfb0473230c4087fea5e50e +SIZE (leofs/savanna_commons-0.6.3.tar.gz) = 185979 +SHA256 (leofs/proper-7d535ac.tar.gz) = 169a8a535c65ac66af73312dfee7daa4ac222bfd5bf66ec9334311ab49132f77 +SIZE (leofs/proper-7d535ac.tar.gz) = 283344 Property changes on: databases/leofs/distinfo ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/files/leofs.in =================================================================== --- databases/leofs/files/leofs.in (revision 0) +++ databases/leofs/files/leofs.in (working copy) @@ -0,0 +1,127 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: leofs +# REQUIRE: LOGIN cleanvar +# KEYWORD: shutdown +# +# /etc/rc.conf variables: +# +# leofs_enable (bool): Set it to "YES" to enable swift. +# Default is "NO". +# leofs_servers (list): Specify servers to run as a space separated +# list of possible values: +# gateway, +# manager_master, +# manager_slave, +# storage. +# The aliase ALL may be used to run all servers. +# Also the list can be overriden in command line: +# any arguments but the first (if there are) are +# treated as the server list. +# Default is "ALL". +# leofs_user (string): Set it to a user name the servers are run as. +# Default is "%%LEOFS_USER%%". + +. /etc/rc.subr + +name=leofs +rcvar=leofs_enable + +load_rc_config $name + +: ${leofs_enable:="NO"} +: ${leofs_servers:="ALL"} +: ${leofs_user=%%LEOFS_USER%%} + +extra_commands="status" +restart_cdm=leofs_restart +start_cmd=leofs_start +status_cmd=leofs_status +stop_cmd=leofs_stop + +leofs_restart() +{ + leofs_stop + leofs_start +} + +leofs_start() +{ + local status=0 + local s + + for s in ${leofs_servers}; do + echo -n "Starting ${s}... " + %%PREFIX%%/sbin/leofs ${s} start + if [ $? = 0 ]; then + echo "done." + else + status=1 + fi + done + + return $status +} + +leofs_stop() +{ + local status=0 + + for s in ${leofs_servers}; do + echo -n "Stopping ${s}... " + %%PREFIX%%/sbin/leofs ${s} stop + if [ $? = 0 ]; then + echo "done." + else + status=1 + fi + done + + return $status +} + +leofs_status() +{ + local status=0 + + for s in ${leofs_servers}; do + %%PREFIX%%/sbin/leofs ${s} ping > /dev/null 2>&1 + if [ $? != 0 ]; then + echo "${s} is not running." + status=1 + else + echo "${s} is running." + fi + done + + return $status +} + +cmd=$1 ; shift + +if [ $# -gt 0 ]; then + leofs_servers="$@" +fi + +for s in ${leofs_servers}; do + case "${s}" in + ALL) + leofs_servers="gateway manager manager_slave storage" + break + ;; + gateway|manager|manager_slave|storage) + ;; + *) + warn "unknown leo server: ${s}" + exit 1 + ;; + esac +done + +for s in ${leofs_servers}; do + required_files=%%LEOFS_ETCDIR%%/leo_${s}.conf +done + +run_rc_command "$cmd" Property changes on: databases/leofs/files/leofs.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/files/patch-deps-leo_gateway-priv-leo_gateway.conf =================================================================== --- databases/leofs/files/patch-deps-leo_gateway-priv-leo_gateway.conf (revision 0) +++ databases/leofs/files/patch-deps-leo_gateway-priv-leo_gateway.conf (working copy) @@ -0,0 +1,111 @@ +--- deps/leo_gateway/priv/leo_gateway.conf.orig 2014-06-15 19:56:26.000000000 +0300 ++++ deps/leo_gateway/priv/leo_gateway.conf 2014-06-15 19:59:10.000000000 +0300 +@@ -13,7 +13,7 @@ + ## about configuration parameters + + ## SASL error log path +-## sasl.sasl_error_log = ./log/sasl/sasl-error.log ++## sasl.sasl_error_log = %%LEOFS_LOGDIR%%/leo_gateway/sasl/sasl-error.log + + ## Restricts the error logging performed by the specified sasl_error_logger + ## to error reports, progress reports, or both. +@@ -22,7 +22,7 @@ + + ## Specifies in which directory the files are stored. + ## If this parameter is undefined or false, the error_logger_mf_h is not installed. +-# sasl.error_logger_mf_dir = ./log/sasl ++# sasl.error_logger_mf_dir = %%LEOFS_LOGDIR%%/leo_gateway/sasl + + ## Specifies how large each individual file can be. + ## If this parameter is undefined, the error_logger_mf_h is not installed. +@@ -36,7 +36,7 @@ + ## Manager's Node(s) + ## -------------------------------------------------------------------- + ## Name of Manager node(s) +-managers = [manager_0@127.0.0.1, manager_1@127.0.0.1] ++managers = [manager@127.0.0.1, manager_slave@127.0.0.1] + + ## -------------------------------------------------------------------- + ## GATEWAY +@@ -60,10 +60,10 @@ + ## http.ssl_port = 8443 + + ## SSL Certificate file +-## http.ssl_certfile = ./etc/server_cert.pem ++## http.ssl_certfile = %%PREFIX%%/etc/leofs/server_cert.pem + + ## SSL key +-## http.ssl_keyfile = ./etc/server_key.pem ++## http.ssl_keyfile = %%PREFIX%%/etc/leofs/server_key.pem + + ## Synchronized time of a bucket property (second) + bucket_prop_sync_interval = 300 +@@ -108,10 +108,10 @@ + cache.cache_disc_threshold_len = 1048576 + + ## Directory for the disk cache data +-cache.cache_disc_dir_data = ./cache/data ++cache.cache_disc_dir_data = %%LEOFS_DBDIR%%/leo_gateway/cache/data + + ## Directory for the disk cache journal +-cache.cache_disc_dir_journal = ./cache/journal ++cache.cache_disc_dir_journal = %%LEOFS_DBDIR%%/leo_gateway/cache/journal + + ## Cache Expire in seconds + cache.cache_expire = 300 +@@ -159,25 +159,25 @@ + ## log.is_enable_access_log = false + + ## Output log file(s) - Erlang's log +-## log.erlang = ./log/erlang ++## log.erlang = %%LEOFS_LOGDIR%%/leo_gateway/erlang + + ## Output log file(s) - app +-## log.app = ./log/app ++## log.app = %%LEOFS_LOGDIR%%/leo_gateway/app + + ## Output log file(s) - members of storage-cluster +-## log.member_dir = ./log/ring ++## log.member_dir = %%LEOFS_LOGDIR%%/leo_gateway/ring + + ## Output log file(s) - ring +-## log.ring_dir = ./log/ring ++## log.ring_dir = %%LEOFS_LOGDIR%%/leo_gateway/ring + + ## -------------------------------------------------------------------- + ## GATEWAY - Other Directories + ## -------------------------------------------------------------------- + ## Directory of queue for monitoring "RING" +-## queue_dir = ./work/queue ++## queue_dir = %%LEOFS_DBDIR%%/leo_gateway/queue + + ## Directory of SNMP agent configuration +-## snmp_agent = ./snmp/snmpa_gateway_0/LEO-GATEWAY ++## snmp_agent = %%PREFIX%%/lib/leofs/snmp/snmpa_gateway/LEO-GATEWAY + + + ## -------------------------------------------------------------------- +@@ -216,7 +216,7 @@ + # For vm.args + #====================================================================== + ## Name of the leofs-gateway node +-nodename = gateway_0@127.0.0.1 ++nodename = gateway@127.0.0.1 + + ## Cookie for distributed node communication. All nodes in the same cluster + ## should use the same cookie or they will not be able to communicate. +@@ -232,7 +232,7 @@ + erlang.max_ports = 64000 + + ## Set the location of crash dumps +-erlang.crash_dump = ./log/erl_crash.dump ++erlang.crash_dump = %%LEOFS_LOGDIR%%/leo_gateway/erl_crash.dump + + ## Raise the ETS table limit + erlang.max_ets_tables = 256000 +@@ -241,4 +241,4 @@ + process_limit = 1048576 + + ## Path of SNMP-agent configuration +-##snmp_conf = ./snmp/snmpa_gateway_0/leo_gateway_snmp ++##snmp_conf = %%PREFIX%%/lib/leofs/snmp/snmpa_gateway/leo_gateway_snmp Property changes on: databases/leofs/files/patch-deps-leo_gateway-priv-leo_gateway.conf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/files/patch-deps-leo_gateway-priv-leo_gateway.schema =================================================================== --- databases/leofs/files/patch-deps-leo_gateway-priv-leo_gateway.schema (revision 0) +++ databases/leofs/files/patch-deps-leo_gateway-priv-leo_gateway.schema (working copy) @@ -0,0 +1,144 @@ +--- deps/leo_gateway/priv/leo_gateway.schema.orig 2014-06-15 19:56:36.000000000 +0300 ++++ deps/leo_gateway/priv/leo_gateway.schema 2014-06-15 19:56:54.000000000 +0300 +@@ -37,7 +37,7 @@ + "sasl.sasl_error_logger", + [ + {datatype, string}, +- {default, "./log/sasl/sasl-error.log"} ++ {default, "%%LEOFS_LOGDIR%%/leo_gateway/sasl/sasl-error.log"} + ]}. + + {translation, "sasl.sasl_error_logger", +@@ -63,7 +63,7 @@ + "sasl.error_logger_mf_dir", + "sasl.error_logger_mf_dir", + [ +- {default, "./log/sasl"} ++ {default, "%%LEOFS_LOGDIR%%/leo_gateway/sasl"} + ]}. + + %% @doc Specifies how large each individual file can be. +@@ -104,7 +104,7 @@ + Managers = cuttlefish_util:conf_get_value("managers", Conf), + case string:tokens(Managers, "[ , ]") of + [] -> +- ['manager_0@127.0.0.1', 'manager_1@127.0.0.1']; ++ ['manager@127.0.0.1', 'manager_slave@127.0.0.1']; + Tokens -> + lists:map(fun(X) -> + list_to_atom(X) +@@ -191,7 +191,7 @@ + "http.ssl_certfile", + "leo_gateway.http.ssl_certfile", + [ +- {default, "./etc/server_cert.pem"} ++ {default, "%%PREFIX%%/etc/leofs/server_cert.pem"} + ]}. + + %% @doc SSL key +@@ -199,7 +199,7 @@ + "http.ssl_keyfile", + "leo_gateway.http.ssl_keyfile", + [ +- {default, "./etc/server_key.pem"} ++ {default, "%%PREFIX%%/etc/leofs/server_key.pem"} + ]}. + + %% @doc Synchronized time of a bucket property (second) +@@ -306,7 +306,7 @@ + "cache.cache_disc_dir_data", + "leo_gateway.cache.cache_disc_dir_data", + [ +- {default, "./cache/data"} ++ {default, "%%LEOFS_DBDIR%%/leo_gateway/cache/data"} + ]}. + + %% @doc Directory for the disk cache journal +@@ -314,7 +314,7 @@ + "cache.cache_disc_dir_journal", + "leo_gateway.cache.cache_disc_dir_journal", + [ +- {default, "./cache/journal"} ++ {default, "%%LEOFS_DBDIR%%/leo_gateway/cache/journal"} + ]}. + + %% @doc Cache Expire in seconds +@@ -444,7 +444,7 @@ + "leo_gateway.log_dir", + [ + {datatype, string}, +- {default, "./log/erlang"} ++ {default, "%%LEOFS_LOGDIR%%/leo_gateway/erlang"} + ]}. + + %% @doc Output log file(s) - app +@@ -453,7 +453,7 @@ + "leo_gateway.log_appender", + [ + {datatype, string}, +- {default, "./log/app"} ++ {default, "%%LEOFS_LOGDIR%%/leo_gateway/app"} + ]}. + + {translation, "leo_gateway.log_appender", +@@ -468,7 +468,7 @@ + "leo_redundant_manager.log_dir_member", + [ + {datatype, string}, +- {default, "./log/ring"} ++ {default, "%%LEOFS_LOGDIR%%/leo_gateway/ring"} + ]}. + + %% @doc Output log file(s) - ring +@@ -477,7 +477,7 @@ + "leo_redundant_manager.log_dir_ring", + [ + {datatype, string}, +- {default, "./log/ring"} ++ {default, "%%LEOFS_LOGDIR%%/leo_gateway/ring"} + ]}. + + +@@ -489,7 +489,7 @@ + "queue_dir", + "leo_gateway.queue_dir", + [ +- {default, "./work/queue"} ++ {default, "%%LEOFS_DBDIR%%/leo_gateway/queue"} + ]}. + + %% @doc Directory of SNMP agent configuration +@@ -497,7 +497,7 @@ + "snmp_agent", + "leo_gateway.snmp_agent", + [ +- {default, "./snmp/snmpa_gateway_0/LEO-GATEWAY"} ++ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_gateway/LEO-GATEWAY"} + ]}. + + +@@ -648,7 +648,7 @@ + "nodename", + "vm_args.-name", + [ +- {default, "gateway_0@127.0.0.1"} ++ {default, "gateway@127.0.0.1"} + ]}. + + %% @doc Cookie for distributed node communication. All nodes in the same cluster +@@ -696,7 +696,7 @@ + "erlang.crash_dump", + "vm_args.-env ERL_CRASH_DUMP", + [ +- {default, "./log/erl_crash.dump"} ++ {default, "%%LEOFS_LOGDIR%%/leo_gateway/erl_crash.dump"} + ]}. + + %% @doc Raise the ETS table limit +@@ -735,5 +735,5 @@ + "snmp_conf", + "vm_args.-config", + [ +- {default, "./snmp/snmpa_gateway_0/leo_gateway_snmp"} ++ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_gateway/leo_gateway_snmp"} + ]}. Property changes on: databases/leofs/files/patch-deps-leo_gateway-priv-leo_gateway.schema ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/files/patch-deps-leo_gateway-snmp-snmpa_gateway_0-leo_gateway_snmp.config =================================================================== --- databases/leofs/files/patch-deps-leo_gateway-snmp-snmpa_gateway_0-leo_gateway_snmp.config (revision 0) +++ databases/leofs/files/patch-deps-leo_gateway-snmp-snmpa_gateway_0-leo_gateway_snmp.config (working copy) @@ -0,0 +1,11 @@ +--- deps/leo_gateway/snmp/snmpa_gateway_0/leo_gateway_snmp.config.orig 2014-06-15 22:05:33.000000000 +0300 ++++ deps/leo_gateway/snmp/snmpa_gateway_0/leo_gateway_snmp.config 2014-06-15 22:06:17.000000000 +0300 +@@ -1,6 +1,6 @@ + [{snmp, [{agent, [{versions, [v1, v2]}, +- {db_dir, "snmp/snmpa_gateway_0/db"}, +- {config, [{dir, "snmp/snmpa_gateway_0/agent/conf"}, ++ {db_dir, "%%LEOFS_DBDIR%%/snmp/snmpa_gateway"}, ++ {config, [{dir, "%%PREFIX%%/lib/leofs/snmp/snmpa_gateway/agent/conf"}, + {verbosity, silence}]}, + {net_if, [{verbosity, silence}]} + ]}, Property changes on: databases/leofs/files/patch-deps-leo_gateway-snmp-snmpa_gateway_0-leo_gateway_snmp.config ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_0.conf =================================================================== --- databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_0.conf (revision 0) +++ databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_0.conf (working copy) @@ -0,0 +1,95 @@ +--- deps/leo_manager/priv/leo_manager_0.conf.orig 2014-06-15 20:05:06.000000000 +0300 ++++ deps/leo_manager/priv/leo_manager_0.conf 2014-06-15 20:10:27.000000000 +0300 +@@ -14,7 +14,7 @@ + ## about configuration parameters + + ## SASL error log path +-## sasl.sasl_error_log = ./log/sasl/sasl-error.log ++## sasl.sasl_error_log = %%LEOFS_LOGDIR%%/leo_manager/sasl/sasl-error.log + + ## Restricts the error logging performed by the specified sasl_error_logger + ## to error reports, progress reports, or both. +@@ -23,7 +23,7 @@ + + ## Specifies in which directory the files are stored. + ## If this parameter is undefined or false, the error_logger_mf_h is not installed. +-## sasl.error_logger_mf_dir = ./log/sasl ++## sasl.error_logger_mf_dir = %%LEOFS_LOGDIR%%/leo_manager/sasl + + ## Specifies how large each individual file can be. + ## If this parameter is undefined, the error_logger_mf_h is not installed. +@@ -37,7 +37,7 @@ + ## MANAGER + ## -------------------------------------------------------------------- + ## Partner of manager's alias +-manager.partner = manager_1@127.0.0.1 ++manager.partner = manager_slave@127.0.0.1 + + ## Manager-console accepatable port number + console.port.cui = 10010 +@@ -95,7 +95,7 @@ + ## * Store the RING and the command histories + ## -------------------------------------------------------------------- + ## Mnesia dir +-mnesia.dir = ./work/mnesia/127.0.0.1 ++mnesia.dir = %%LEOFS_DBDIR%%/leo_manager/mnesia/127.0.0.1 + + ## The write threshold for transaction log dumps + ## as the number of writes to the transaction log +@@ -112,26 +112,26 @@ + ## log.log_level = 1 + + ## Output log file(s) - Erlang's log +-## log.erlang = ./log/erlang ++## log.erlang = %%LEOFS_LOGDIR%%/leo_manager/erlang + + ## Output log file(s) - app +-## log.app = ./log/app ++## log.app = %%LEOFS_LOGDIR%%/leo_manager/app + + ## Output log file(s) - members of storage-cluster +-## log.member_dir = ./log/ring ++## log.member_dir = %%LEOFS_LOGDIR%%/leo_manager/ring + + ## Output log file(s) - ring +-## log.ring_dir = ./log/ring ++## log.ring_dir = %%LEOFS_LOGDIR%%/leo_manager/ring + + + ## -------------------------------------------------------------------- + ## MANAGER - Other Directories + ## -------------------------------------------------------------------- + ## Directory of queue for monitoring "RING" +-## queue_dir = ./work/queue ++## queue_dir = %%LEOFS_DBDIR%%/leo_manager/queue + + ## Directory of SNMP agent configuration +-## snmp_agent = ./snmp/snmpa_manager_0/LEO-MANAGER ++## snmp_agent = %%PREFIX%%/lib/leofs/snmp/snmpa_manager/LEO-MANAGER + + + ## -------------------------------------------------------------------- +@@ -176,7 +176,7 @@ + # For vm.args + #====================================================================== + ## Name of the leofs-gateway node +-nodename = manager_0@127.0.0.1 ++nodename = manager@127.0.0.1 + + ## Cookie for distributed node communication. All nodes in the same cluster + ## should use the same cookie or they will not be able to communicate. +@@ -192,7 +192,7 @@ + erlang.max_ports = 64000 + + ## Set the location of crash dumps +-erlang.crash_dump = ./log/erl_crash.dump ++erlang.crash_dump = %%LEOFS_LOGDIR%%/leo_manager/erl_crash.dump + + ## Raise the ETS table limit + erlang.max_ets_tables = 256000 +@@ -201,4 +201,4 @@ + process_limit = 1048576 + + ## Path of SNMP-agent configuration +-##snmp_conf = ./snmp/snmpa_manager_0/leo_manager_snmp ++##snmp_conf = %%PREFIX%%/lib/leofs/snmp/snmpa_manager/leo_manager_snmp Property changes on: databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_0.conf ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_0.schema =================================================================== --- databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_0.schema (revision 0) +++ databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_0.schema (working copy) @@ -0,0 +1,99 @@ +--- deps/leo_manager/priv/leo_manager_0.schema.orig 2014-06-15 20:05:19.000000000 +0300 ++++ deps/leo_manager/priv/leo_manager_0.schema 2014-06-15 20:06:20.000000000 +0300 +@@ -37,7 +37,7 @@ + "sasl.sasl_error_logger", + [ + {datatype, string}, +- {default, "./log/sasl/sasl-error.log"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager/sasl/sasl-error.log"} + ]}. + + {translation, "sasl.sasl_error_logger", +@@ -63,7 +63,7 @@ + "sasl.error_logger_mf_dir", + "sasl.error_logger_mf_dir", + [ +- {default, "./log/sasl"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager/sasl"} + ]}. + + %% @doc Specifies how large each individual file can be. +@@ -286,7 +286,7 @@ + "mnesia.dir", + [ + {datatype, string}, +- {default, "./work/mnesia/127.0.0.1"} ++ {default, "%%LEOFS_DBDIR%%/leo_manager/mnesia/127.0.0.1"} + ]}. + + %% @doc The write threshold for transaction log dumps +@@ -328,7 +328,7 @@ + "leo_manager.log_dir", + [ + {datatype, string}, +- {default, "./log/erlang"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager/erlang"} + ]}. + + %% @doc Output log file(s) - app +@@ -337,7 +337,7 @@ + "leo_manager.log_appender", + [ + {datatype, string}, +- {default, "./log/app"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager/app"} + ]}. + + {translation, "leo_manager.log_appender", +@@ -352,7 +352,7 @@ + "leo_redundant_manager.log_dir_member", + [ + {datatype, string}, +- {default, "./log/ring"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager/ring"} + ]}. + + %% @doc Output log file(s) - ring +@@ -361,7 +361,7 @@ + "leo_redundant_manager.log_dir_ring", + [ + {datatype, string}, +- {default, "./log/ring"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager/ring"} + ]}. + + +@@ -373,7 +373,7 @@ + "queue_dir", + "leo_manager.queue_dir", + [ +- {default, "./work/queue"} ++ {default, "%%LEOFS_DBDIR%%/leo_manager/queue"} + ]}. + + %% @doc Directory of SNMP agent configuration +@@ -381,7 +381,7 @@ + "snmp_agent", + "leo_manager.snmp_agent", + [ +- {default, "./snmp/snmpa_manager_0/LEO-MANAGER"} ++ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_manager/LEO-MANAGER"} + ]}. + + +@@ -592,7 +592,7 @@ + "erlang.crash_dump", + "vm_args.-env ERL_CRASH_DUMP", + [ +- {default, "./log/erl_crash.dump"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager/erl_crash.dump"} + ]}. + + %% @doc Raise the ETS table limit +@@ -631,5 +631,5 @@ + "snmp_conf", + "vm_args.-config", + [ +- {default, "./snmp/snmpa_manager_0/leo_manager_snmp"} ++ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_manager/leo_manager_snmp"} + ]}. Property changes on: databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_0.schema ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_1.conf =================================================================== --- databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_1.conf (revision 0) +++ databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_1.conf (working copy) @@ -0,0 +1,95 @@ +--- deps/leo_manager/priv/leo_manager_1.conf.orig 2014-06-15 20:05:35.000000000 +0300 ++++ deps/leo_manager/priv/leo_manager_1.conf 2014-06-15 20:09:59.000000000 +0300 +@@ -14,7 +14,7 @@ + ## about configuration parameters + + ## SASL error log path +-## sasl.sasl_error_log = ./log/sasl/sasl-error.log ++## sasl.sasl_error_log = %%LEOFS_LOGDIR%%/leo_manager_slave/sasl/sasl-error.log + + ## Restricts the error logging performed by the specified sasl_error_logger + ## to error reports, progress reports, or both. +@@ -23,7 +23,7 @@ + + ## Specifies in which directory the files are stored. + ## If this parameter is undefined or false, the error_logger_mf_h is not installed. +-# sasl.error_logger_mf_dir = ./log/sasl ++# sasl.error_logger_mf_dir = %%LEOFS_LOGDIR%%/leo_manager_slave/sasl + + ## Specifies how large each individual file can be. + ## If this parameter is undefined, the error_logger_mf_h is not installed. +@@ -37,7 +37,7 @@ + ## MANAGER + ## -------------------------------------------------------------------- + ## Partner of manager's alias +-manager.partner = manager_0@127.0.0.1 ++manager.partner = manager@127.0.0.1 + + ## Manager-console accepatable port number + console.port.cui = 10011 +@@ -54,7 +54,7 @@ + ## * Store the RING and the command histories + ## -------------------------------------------------------------------- + ## Mnesia dir +-mnesia.dir = ./work/mnesia/127.0.0.1 ++mnesia.dir = %%LEOFS_DBDIR%%/leo_manager_slave/mnesia/127.0.0.1 + + ## The write threshold for transaction log dumps + ## as the number of writes to the transaction log +@@ -71,26 +71,26 @@ + ## log.log_level = 1 + + ## Output log file(s) - Erlang's log +-## log.erlang = ./log/erlang ++log.erlang = %%LEOFS_LOGDIR%%/leo_manager_slave/erlang + + ## Output log file(s) - app +-## log.app = ./log/app ++log.app = %%LEOFS_LOGDIR%%/leo_manager_slave/app + + ## Output log file(s) - members of storage-cluster +-## log.member_dir = ./log/ring ++log.member_dir = %%LEOFS_LOGDIR%%/leo_manager_slave/ring + + ## Output log file(s) - ring +-## log.ring_dir = ./log/ring ++log.ring_dir = %%LEOFS_LOGDIR%%/leo_manager_slave/ring + + + ## -------------------------------------------------------------------- + ## MANAGER - Other Directories + ## -------------------------------------------------------------------- + ## Directory of queue for monitoring "RING" +-## queue_dir = ./work/queue ++## queue_dir = %%LEOFS_DBDIR%%/leo_manager_slave/queue + + ## Directory of SNMP agent configuration +-snmp_agent = ./snmp/snmpa_manager_1/LEO-MANAGER ++snmp_agent = %%PREFIX%%/lib/leofs/snmp/snmpa_manager_slave/LEO-MANAGER + + + ## -------------------------------------------------------------------- +@@ -135,7 +135,7 @@ + # For vm.args + #====================================================================== + ## Name of the leofs-gateway node +-nodename = manager_1@127.0.0.1 ++nodename = manager_slave@127.0.0.1 + + ## Cookie for distributed node communication. All nodes in the same cluster + ## should use the same cookie or they will not be able to communicate. +@@ -151,7 +151,7 @@ + erlang.max_ports = 64000 + + ## Set the location of crash dumps +-erlang.crash_dump = ./log/erl_crash.dump ++erlang.crash_dump = %%LEOFS_LOGDIR%%/leo_manager_slave/erl_crash.dump + + ## Raise the ETS table limit + erlang.max_ets_tables = 256000 +@@ -160,4 +160,4 @@ + process_limit = 1048576 + + ## Path of SNMP-agent configuration +-snmp_conf = ./snmp/snmpa_manager_1/leo_manager_snmp ++snmp_conf = %%PREFIX%%/lib/leofs/snmp/snmpa_manager_slave/leo_manager_snmp Property changes on: databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_1.conf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_1.schema =================================================================== --- databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_1.schema (revision 0) +++ databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_1.schema (working copy) @@ -0,0 +1,108 @@ +--- deps/leo_manager/priv/leo_manager_1.schema.orig 2014-06-15 20:05:45.000000000 +0300 ++++ deps/leo_manager/priv/leo_manager_1.schema 2014-06-15 20:06:47.000000000 +0300 +@@ -37,7 +37,7 @@ + "sasl.sasl_error_logger", + [ + {datatype, string}, +- {default, "./log/sasl/sasl-error.log"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/sasl/sasl-error.log"} + ]}. + + {translation, "sasl.sasl_error_logger", +@@ -63,7 +63,7 @@ + "sasl.error_logger_mf_dir", + "sasl.error_logger_mf_dir", + [ +- {default, "./log/sasl"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/sasl"} + ]}. + + %% @doc Specifies how large each individual file can be. +@@ -167,7 +167,7 @@ + "mnesia.dir", + [ + {datatype, string}, +- {default, "./work/mnesia/127.0.0.1"} ++ {default, "%%LEOFS_DBDIR%%/leo_manager_slave/mnesia/127.0.0.1"} + ]}. + + %% @doc The write threshold for transaction log dumps +@@ -209,7 +209,7 @@ + "leo_manager.log_dir", + [ + {datatype, string}, +- {default, "./log/erlang"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/erlang"} + ]}. + + %% @doc Output log file(s) - app +@@ -218,7 +218,7 @@ + "leo_manager.log_appender", + [ + {datatype, string}, +- {default, "./log/app"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/app"} + ]}. + + {translation, "leo_manager.log_appender", +@@ -233,7 +233,7 @@ + "leo_redundant_manager.log_dir_member", + [ + {datatype, string}, +- {default, "./log/ring"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/ring"} + ]}. + + %% @doc Output log file(s) - ring +@@ -242,7 +242,7 @@ + "leo_redundant_manager.log_dir_ring", + [ + {datatype, string}, +- {default, "./log/ring"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/ring"} + ]}. + + +@@ -254,7 +254,7 @@ + "queue_dir", + "leo_manager.queue_dir", + [ +- {default, "./work/queue"} ++ {default, "%%LEOFS_DBDIR%%/leo_manager_slave/queue"} + ]}. + + %% @doc Directory of SNMP agent configuration +@@ -262,7 +262,7 @@ + "snmp_agent", + "leo_manager.snmp_agent", + [ +- {default, "./snmp/snmpa_manager_0/LEO-MANAGER"} ++ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_manager/LEO-MANAGER"} + ]}. + + +@@ -426,7 +426,7 @@ + "nodename", + "vm_args.-name", + [ +- {default, "manager_0@127.0.0.1"} ++ {default, "manager_slave@127.0.0.1"} + ]}. + + %% @doc Cookie for distributed node communication. All nodes in the same cluster +@@ -474,7 +474,7 @@ + "erlang.crash_dump", + "vm_args.-env ERL_CRASH_DUMP", + [ +- {default, "./log/erl_crash.dump"} ++ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/erl_crash.dump"} + ]}. + + %% @doc Raise the ETS table limit +@@ -513,5 +513,5 @@ + "snmp_conf", + "vm_args.-config", + [ +- {default, "./snmp/snmpa_manager_0/leo_manager_snmp"} ++ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_manager_slave/leo_manager_snmp"} + ]}. Property changes on: databases/leofs/files/patch-deps-leo_manager-priv-leo_manager_1.schema ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/leofs/files/patch-deps-leo_manager-snmp-snmpa_manager_0-leo_manager_snmp.config =================================================================== --- databases/leofs/files/patch-deps-leo_manager-snmp-snmpa_manager_0-leo_manager_snmp.config (revision 0) +++ databases/leofs/files/patch-deps-leo_manager-snmp-snmpa_manager_0-leo_manager_snmp.config (working copy) @@ -0,0 +1,11 @@ +--- deps/leo_manager/snmp/snmpa_manager_0/leo_manager_snmp.config.orig 2014-06-15 21:57:21.000000000 +0300 ++++ deps/leo_manager/snmp/snmpa_manager_0/leo_manager_snmp.config 2014-06-15 21:59:33.000000000 +0300 +@@ -1,6 +1,6 @@ + [{snmp, [{agent, [{versions, [v1, v2]}, +- {db_dir, "snmp/snmpa_manager_0/db"}, +- {config, [{dir, "snmp/snmpa_manager_0/agent/conf"}, ++ {db_dir, "%%LEOFS_DBDIR%%/snmp/snmpa_manager"}, ++ {config, [{dir, "%%PREFIX%%/lib/leofs/snmp/snmpa_manager/agent/conf"}, + {verbosity, silence}]}, + {net_if, [{verbosity, silence}]} + ]}, Property changes on: databases/leofs/files/patch-deps-leo_manager-snmp-snmpa_manager_0-leo_manager_snmp.config ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/leofs/files/patch-deps-leo_manager-snmp-snmpa_manager_1-leo_manager_snmp.config =================================================================== --- databases/leofs/files/patch-deps-leo_manager-snmp-snmpa_manager_1-leo_manager_snmp.config (revision 0) +++ databases/leofs/files/patch-deps-leo_manager-snmp-snmpa_manager_1-leo_manager_snmp.config (working copy) @@ -0,0 +1,11 @@ +--- deps/leo_manager/snmp/snmpa_manager_1/leo_manager_snmp.config.orig 2014-06-15 21:57:21.000000000 +0300 ++++ deps/leo_manager/snmp/snmpa_manager_1/leo_manager_snmp.config 2014-06-15 21:59:33.000000000 +0300 +@@ -1,6 +1,6 @@ + [{snmp, [{agent, [{versions, [v1, v2]}, +- {db_dir, "snmp/snmpa_manager_1/db"}, +- {config, [{dir, "snmp/snmpa_manager_1/agent/conf"}, ++ {db_dir, "%%LEOFS_DBDIR%%/snmp/snmpa_manager_slave"}, ++ {config, [{dir, "%%PREFIX%%/lib/leofs/snmp/snmpa_manager_slave/agent/conf"}, + {verbosity, silence}]}, + {net_if, [{verbosity, silence}]} + ]}, Property changes on: databases/leofs/files/patch-deps-leo_manager-snmp-snmpa_manager_1-leo_manager_snmp.config ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/leofs/files/patch-deps-leo_storage-priv-leo_storage.conf =================================================================== --- databases/leofs/files/patch-deps-leo_storage-priv-leo_storage.conf (revision 0) +++ databases/leofs/files/patch-deps-leo_storage-priv-leo_storage.conf (working copy) @@ -0,0 +1,102 @@ +--- deps/leo_storage/priv/leo_storage.conf.orig 2014-06-15 20:34:58.000000000 +0300 ++++ deps/leo_storage/priv/leo_storage.conf 2014-06-15 20:58:50.000000000 +0300 +@@ -13,7 +13,7 @@ + ## about configuration parameters + + ## SASL error log path +-## sasl.sasl_error_log = ./log/sasl/sasl-error.log ++## sasl.sasl_error_log = %%LEOFS_LOGDIR%%/leo_storage/sasl/sasl-error.log + + ## Restricts the error logging performed by the specified sasl_error_logger + ## to error reports, progress reports, or both. +@@ -22,7 +22,7 @@ + + ## Specifies in which directory the files are stored. + ## If this parameter is undefined or false, the error_logger_mf_h is not installed. +-# sasl.error_logger_mf_dir = ./log/sasl ++# sasl.error_logger_mf_dir = %%LEOFS_LOGDIR%%/leo_storage/sasl + + ## Specifies how large each individual file can be. + ## If this parameter is undefined, the error_logger_mf_h is not installed. +@@ -36,13 +36,13 @@ + ## Manager's Node(s) + ## -------------------------------------------------------------------- + ## Name of Manager node(s) +-managers = [manager_0@127.0.0.1, manager_1@127.0.0.1] ++managers = [manager@127.0.0.1, manager_slave@127.0.0.1] + + ## -------------------------------------------------------------------- + ## STORAGE + ## -------------------------------------------------------------------- + ## Object container +-obj_containers.path = [./avs] ++obj_containers.path = [%%LEOFS_DBDIR%%/leo_storage/avs] + obj_containers.num_of_containers = [8] + + ## e.g. Case of plural pathes +@@ -122,26 +122,26 @@ + ## log.log_level = 1 + + ## Output log file(s) - Erlang's log +-## log.erlang = ./log/erlang ++## log.erlang = %%LEOFS_LOGDIR%%/leo_storage/erlang + + ## Output log file(s) - app +-## log.app = ./log/app ++## log.app = %%LEOFS_LOGDIR%%/leo_storage/app + + ## Output log file(s) - members of storage-cluster +-## log.member_dir = ./log/ring ++## log.member_dir = %%LEOFS_LOGDIR%%/leo_storage/ring + + ## Output log file(s) - ring +-## log.ring_dir = ./log/ring ++## log.ring_dir = %%LEOFS_LOGDIR%%/leo_storage/ring + + + ## -------------------------------------------------------------------- + ## STORAGE - Other Directories + ## -------------------------------------------------------------------- + ## Directory of queue for monitoring "RING" +-## queue_dir = ./work/queue ++## queue_dir = %%LEOFS_DBDIR%%/leo_storage/queue + + ## Directory of SNMP agent configuration +-## snmp_agent = ./snmp/snmpa_storage_0/LEO-STORAGE ++## snmp_agent = %%PREFIX%%/lib/leofs/snmp/snmpa_storage/LEO-STORAGE + + + ## -------------------------------------------------------------------- +@@ -160,7 +160,7 @@ + ## leo_ordning_reda.send_after_interval = 100 + + ## Temporary directory of stacked objects +-## leo_ordning_reda.temp_stacked_dir = "work/ord_reda/" ++## leo_ordning_reda.temp_stacked_dir = %%LEOFS_DBDIR%%/leo_storage/ord_reda/ + + + ## -------------------------------------------------------------------- +@@ -218,7 +218,7 @@ + # For vm.args + #====================================================================== + ## Name of the leofs-storage node +-nodename = storage_0@127.0.0.1 ++nodename = storage@127.0.0.1 + + ## Cookie for distributed node communication. All nodes in the same cluster + ## should use the same cookie or they will not be able to communicate. +@@ -234,7 +234,7 @@ + erlang.max_ports = 64000 + + ## Set the location of crash dumps +-erlang.crash_dump = ./log/erl_crash.dump ++erlang.crash_dump = %%LEOFS_LOGDIR%%/leo_storage/erl_crash.dump + + ## Raise the ETS table limit + erlang.max_ets_tables = 256000 +@@ -243,4 +243,4 @@ + process_limit = 1048576 + + ## Path of SNMP-agent configuration +-##snmp_conf = ./snmp/snmpa_storage_0/leo_storage_snmp ++##snmp_conf = %%PREFIX%%/lib/leofs/snmp/snmpa_storage/leo_gateway_snmp Property changes on: databases/leofs/files/patch-deps-leo_storage-priv-leo_storage.conf ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: databases/leofs/files/patch-deps-leo_storage-priv-leo_storage.schema =================================================================== --- databases/leofs/files/patch-deps-leo_storage-priv-leo_storage.schema (revision 0) +++ databases/leofs/files/patch-deps-leo_storage-priv-leo_storage.schema (working copy) @@ -0,0 +1,117 @@ +--- deps/leo_storage/priv/leo_storage.schema.orig 2014-06-15 20:35:05.000000000 +0300 ++++ deps/leo_storage/priv/leo_storage.schema 2014-06-15 20:35:22.000000000 +0300 +@@ -37,7 +37,7 @@ + "sasl.sasl_error_logger", + [ + {datatype, string}, +- {default, "./log/sasl/sasl-error.log"} ++ {default, "%%LEOFS_LOGDIR%%/leo_storage/sasl/sasl-error.log"} + ]}. + + {translation, "sasl.sasl_error_logger", +@@ -63,7 +63,7 @@ + "sasl.error_logger_mf_dir", + "sasl.error_logger_mf_dir", + [ +- {default, "./log/sasl"} ++ {default, "%%LEOFS_LOGDIR%%/leo_storage/sasl"} + ]}. + + %% @doc Specifies how large each individual file can be. +@@ -104,7 +104,7 @@ + Managers = cuttlefish_util:conf_get_value("managers", Conf), + case string:tokens(Managers, "[ , ]") of + [] -> +- ['manager_0@127.0.0.1', 'manager_1@127.0.0.1']; ++ ['manager@127.0.0.1', 'manager_slave@127.0.0.1']; + Tokens -> + lists:map(fun(X) -> + list_to_atom(X) +@@ -146,7 +146,7 @@ + Pathes = cuttlefish_util:conf_get_value("obj_containers.path", Conf), + Pathes_1 = case string:tokens(Pathes, "[ , ]") of + [] -> +- ["./avs"]; ++ ["%%LEOFS_DBDIR%%/leo_storage/avs"]; + Tokens_1 -> + Tokens_1 + end, +@@ -482,7 +482,7 @@ + "leo_storage.log_dir", + [ + {datatype, string}, +- {default, "./log/erlang"} ++ {default, "%%LEOFS_LOGDIR%%/leo_storage/erlang"} + ]}. + + %% @doc Output log file(s) - app +@@ -491,7 +491,7 @@ + "leo_storage.log_appender", + [ + {datatype, string}, +- {default, "./log/app"} ++ {default, "%%LEOFS_LOGDIR%%/leo_storage/app"} + ]}. + + {translation, "leo_storage.log_appender", +@@ -506,7 +506,7 @@ + "leo_redundant_manager.log_dir_member", + [ + {datatype, string}, +- {default, "./log/ring"} ++ {default, "%%LEOFS_LOGDIR%%/leo_storage/ring"} + ]}. + + %% @doc Output log file(s) - ring +@@ -515,7 +515,7 @@ + "leo_redundant_manager.log_dir_ring", + [ + {datatype, string}, +- {default, "./log/ring"} ++ {default, "%%LEOFS_LOGDIR%%/leo_storage/ring"} + ]}. + + +@@ -527,7 +527,7 @@ + "queue_dir", + "leo_storage.queue_dir", + [ +- {default, "./work/queue"} ++ {default, "%%LEOFS_DBDIR%%/leo_storage/queue"} + ]}. + + %% @doc Directory of SNMP agent configuration +@@ -535,7 +535,7 @@ + "snmp_agent", + "leo_storage.snmp_agent", + [ +- {default, "./snmp/snmpa_storage_0/LEO-STORAGE"} ++ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_storage/LEO-STORAGE"} + ]}. + + +@@ -769,7 +769,7 @@ + "nodename", + "vm_args.-name", + [ +- {default, "storage_0@127.0.0.1"} ++ {default, "storage@127.0.0.1"} + ]}. + + %% @doc Cookie for distributed node communication. All nodes in the same cluster +@@ -817,7 +817,7 @@ + "erlang.crash_dump", + "vm_args.-env ERL_CRASH_DUMP", + [ +- {default, "./log/erl_crash.dump"} ++ {default, "%%LEOFS_LOGDIR%%/leo_storage/erl_crash.dump"} + ]}. + + %% @doc Raise the ETS table limit +@@ -856,5 +856,5 @@ + "snmp_conf", + "vm_args.-config", + [ +- {default, "./snmp/snmpa_storage_0/leo_storage_snmp"} ++ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_storage/leo_storage_snmp"} + ]}. Property changes on: databases/leofs/files/patch-deps-leo_storage-priv-leo_storage.schema ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/files/patch-deps-leo_storage-snmp-snmpa_storage_0-leo_storage_snmp.config =================================================================== --- databases/leofs/files/patch-deps-leo_storage-snmp-snmpa_storage_0-leo_storage_snmp.config (revision 0) +++ databases/leofs/files/patch-deps-leo_storage-snmp-snmpa_storage_0-leo_storage_snmp.config (working copy) @@ -0,0 +1,11 @@ +--- deps/leo_storage/snmp/snmpa_storage_0/leo_storage_snmp.config.orig 2014-06-15 22:07:24.000000000 +0300 ++++ deps/leo_storage/snmp/snmpa_storage_0/leo_storage_snmp.config 2014-06-15 22:08:18.000000000 +0300 +@@ -1,6 +1,6 @@ + [{snmp, [{agent, [{versions, [v1, v2]}, +- {db_dir, "snmp/snmpa_storage_0/db"}, +- {config, [{dir, "snmp/snmpa_storage_0/agent/conf"}, ++ {db_dir, "%%LEOFS_DBDIR%%/snmp/snmpa_storage"}, ++ {config, [{dir, "%%PREFIX%%/lib/leofs/snmp/snmpa_storage/agent/conf"}, + {verbosity, silence}]}, + {net_if, [{verbosity, silence}]} + ]}, Property changes on: databases/leofs/files/patch-deps-leo_storage-snmp-snmpa_storage_0-leo_storage_snmp.config ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/files/patch-deps-proper-rebar.config =================================================================== --- databases/leofs/files/patch-deps-proper-rebar.config (revision 0) +++ databases/leofs/files/patch-deps-proper-rebar.config (working copy) @@ -0,0 +1,10 @@ +--- deps/proper/rebar.config.orig 2014-06-29 11:06:28.000000000 +0300 ++++ deps/proper/rebar.config 2014-06-29 11:12:09.000000000 +0300 +@@ -34,6 +34,6 @@ + warn_missing_spec, warn_untyped_record]}. + {dialyzer_opts, [{warnings, [unmatched_returns]}]}. + +-{pre_hooks, [{"(linux|bsd|darwin|solaris)", compile, "make include/compile_flags.hrl"}, ++{pre_hooks, [{"(linux|bsd|darwin|solaris)", compile, "gmake include/compile_flags.hrl"}, + {"win32", compile, "escript.exe write_compile_flags include/compile_flags.hrl"}]}. + {post_hooks, [{clean, "./clean_doc.sh"}]}. Property changes on: databases/leofs/files/patch-deps-proper-rebar.config ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/leofs/files/sbin-leo_gateway.in =================================================================== --- databases/leofs/files/sbin-leo_gateway.in (revision 0) +++ databases/leofs/files/sbin-leo_gateway.in (working copy) @@ -0,0 +1,3 @@ +#!/bin/sh + +%%PREFIX%%/sbin/leofs gateway "$@" Property changes on: databases/leofs/files/sbin-leo_gateway.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/files/sbin-leo_manager.in =================================================================== --- databases/leofs/files/sbin-leo_manager.in (revision 0) +++ databases/leofs/files/sbin-leo_manager.in (working copy) @@ -0,0 +1,3 @@ +#!/bin/sh + +%%PREFIX%%/sbin/leofs manager "$@" Property changes on: databases/leofs/files/sbin-leo_manager.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/files/sbin-leo_manager_slave.in =================================================================== --- databases/leofs/files/sbin-leo_manager_slave.in (revision 0) +++ databases/leofs/files/sbin-leo_manager_slave.in (working copy) @@ -0,0 +1,3 @@ +#!/bin/sh + +%%PREFIX%%/sbin/leofs manager_slave "$@" Property changes on: databases/leofs/files/sbin-leo_manager_slave.in ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: databases/leofs/files/sbin-leo_storage.in =================================================================== --- databases/leofs/files/sbin-leo_storage.in (revision 0) +++ databases/leofs/files/sbin-leo_storage.in (working copy) @@ -0,0 +1,3 @@ +#!/bin/sh + +%%PREFIX%%/sbin/leofs storage "$@" Property changes on: databases/leofs/files/sbin-leo_storage.in ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/leofs/files/sbin-leofs.in =================================================================== --- databases/leofs/files/sbin-leofs.in (revision 0) +++ databases/leofs/files/sbin-leofs.in (working copy) @@ -0,0 +1,647 @@ +#!/bin/sh +# +# Manage LeoFS servers. +# + +#------------------------------------------------------------------------------- +# GLOBALS +#------------------------------------------------------------------------------- +LEOFS_SERVERS=" + gateway + manager + manager_slave + storage +" + +LEOFS_COMMANDS= +LEOFS_COMMANDS_MINIHELP= + +PROGNAME=$(basename $0) +PROGPATH=$(realpath $0) + +#------------------------------------------------------------------------------- +# Functions +#------------------------------------------------------------------------------- +in_list() +{ + local needle=$1 + local i + + shift + + for i + do + test "$i" = "$needle" && return 0 + done + + return 1 +} + +#------------------------------------------------------------------------------- +usage() +{ + local servers + + servers=$(echo $LEOFS_SERVERS | sed -e 's/ /|/g') + + echo "usage: ${PROGNAME} [help | -h | --help]" + echo " ${PROGNAME} ${servers} []" + echo + echo "Commands:" + echo "$LEOFS_COMMANDS_MINIHELP" + echo + echo "See '${PROGNAME} help ' for more information on a specific command." +} + +#------------------------------------------------------------------------------- +# cmd utils +#------------------------------------------------------------------------------- +register_cmd() +{ + local cmd=$1 + + LEOFS_COMMANDS="${LEOFS_COMMANDS} ${cmd}" + LEOFS_COMMANDS_MINIHELP=$(printf "%s\n %-16s%s" \ + "${LEOFS_COMMANDS_MINIHELP}" "${cmd}" "$(cmd_${cmd} help_summary)") +} + +#------------------------------------------------------------------------------- +check_cmd() +{ + local cmd=$1 + + if ! in_list "$cmd" $LEOFS_COMMANDS + then + echo "unknown command: $1" >&2 + echo >&2 + usage >&2 + exit 1 + fi +} + +#------------------------------------------------------------------------------- +run_cmd() +{ + local cmd=$1 + + check_cmd "${cmd}" + + shift + + "cmd_${cmd}" "$@" +} + +#------------------------------------------------------------------------------- +print_cmd_help() +{ + local cmd=$1 + local desc + + check_cmd "${cmd}" + + echo "NAME" + echo " ${cmd} - $(cmd_${cmd} help_summary)" + echo + echo "SYNOPSIS" + echo " $(cmd_${cmd} help_synopsis)" + + desc="$(cmd_${cmd} help_desc)" + + if [ -n "${desc}" ] + then + echo + echo "DESCRIPTION" + echo -n "${desc}" | sed -e 's/^/ /' + fi + + opts="$(cmd_${cmd} help_opts)" + + if [ -n "${opts}" ] + then + echo + echo "OPTIONS" + echo -n "${opts}" | sed -e 's/^/ /' + fi + + echo +} + +#------------------------------------------------------------------------------- +# make ENV +#------------------------------------------------------------------------------- +check_app() +{ + local app=$1 + + if ! in_list "${app}" $LEOFS_SERVERS + then + echo "unknown server: $1" >&2 + echo >&2 + usage >&2 + exit 1 + fi +} + +#------------------------------------------------------------------------------- +setusercontext() +{ + local cmd + + : ${LEOFS_USER=%%LEOFS_USER%%} + + user=`whoami` + + if [ ${user} = ${LEOFS_USER} ] + then + return + fi + + if [ ${user} != root ] + then + echo "Must be run as ${LEOFS_USER} user or root (or set LEOFS_USER)" >&2 + exit 1 + fi + + # Restart as LEOFS_USER + + cmd="${PROGPATH} $@" + + exec /usr/bin/su -m ${LEOFS_USER} -c "${cmd}" +} + +#------------------------------------------------------------------------------- +gen_config() +{ + local args cfg_dir app_config vm_args res snmp_cfg dir + + cfg_dir=${LEOFS_DBDIR}/etc + + mkdir -p ${cfg_dir} + + if [ ${LEOFS_ETCDIR}/${LEOFS_SERVER}.conf -ot ${cfg_dir}/app.config ] + then + return + fi + + rm -f ${cfg_dir}/app.*.config ${cfg_dir}/vm.*.args + + args=`PATH=${ERTS_PATH}:${PATH} \ + ${LEOFS_BASEDIR}/bin/cuttlefish \ + -i ${LEOFS_BASEDIR}/etc/${LEOFS_SERVER}.schema \ + -c ${LEOFS_ETCDIR}/${LEOFS_SERVER}.conf \ + -d ${cfg_dir}` + + app_config=`echo ${args} | sed -nEe 's/^.*(app\.[0-9.]*\.config).*$/\1/p'` + vm_args=`echo ${args} | sed -nEe 's/^.*(vm\.[0-9.]*\.args).*$/\1/p'` + + if [ -z "${app_config}" -o -z "${vm_args}" ] + then + echo "Failed to parse ${LEOFS_SERVER}.conf" >&2 + exit 1 + fi + + # Sanity check the app.config file + res=`${ERTS_PATH}/escript \ + ${ERTS_PATH}/nodetool chkconfig ${cfg_dir}/${app_config}` + if [ "${res}" != "ok" ] + then + echo "Error reading ${app_config}: ${res}" >&2 + exit 1 + fi + + mv ${cfg_dir}/$app_config ${cfg_dir}/app.config + mv ${cfg_dir}/$vm_args ${cfg_dir}/vm.args +} + + +#------------------------------------------------------------------------------- +make_env() +{ + local app=${1#leo_} # Remove 'leo_' prefix in server name if present. + local user + + check_app "${app}" + + LEOFS_SERVER=leo_${app} + + LEOFS_ETCDIR=%%LEOFS_ETCDIR%% + LEOFS_BASEDIR=%%LEOFS_BASEDIR%% + LEOFS_DBDIR=%%LEOFS_DBDIR%%/${LEOFS_SERVER} + LEOFS_RUNDIR=%%LEOFS_RUNDIR%% + LEOFS_PIPE=${LEOFS_RUNDIR}/${LEOFS_SERVER}.pipe + LEOFS_LOGDIR=%%LEOFS_LOGDIR%%/${LEOFS_SERVER} + + START_ERL=`cat ${LEOFS_BASEDIR}/releases/${LEOFS_SERVER%_slave}/start_erl.data` + ERTS_VSN=${START_ERL% *} + APP_VSN=${START_ERL#* } + ERTS_PATH=${LEOFS_BASEDIR}/erts-${ERTS_VSN}/bin + + LEOFS_BOOT=${LEOFS_BASEDIR}/releases/${LEOFS_SERVER%_slave}/${APP_VSN}/${LEOFS_SERVER%_slave} + + HOME=%%LEOFS_DBDIR%% + cd ${HOME} + + setusercontext "$@" + + gen_config + + snmp_cfg=`sed -nEe 's/^-config *(.*)$/\1.config/p' ${LEOFS_DBDIR}/etc/vm.args` + + sed -nEe 's:^.*dir, *"((%%LEOFS_DBDIR%%|%%LEOFS_LOGDIR%%)[^"]*)".*$:\1:p' \ + ${LEOFS_DBDIR}/etc/app.config ${snmp_cfg} | sort -u | + while read dir + do + mkdir -p "${dir}" + done +} + +#------------------------------------------------------------------------------- +# Erlang tools +#------------------------------------------------------------------------------- +nodetool() +{ + local cmd=$1 ; shift + local vmargs_path name_arg cookie_arg + + vmargs_path=${LEOFS_DBDIR}/etc/vm.args + + name_arg=`egrep '^-s?name' ${vmargs_path}` + if [ -z "${name_arg}" ] + then + echo "vm.args needs either -name or -sname parameter" >&2 + exit 1 + fi + + cookie_arg=`grep '^-setcookie' ${vmargs_path}` + if [ -z "${cookie_arg}" ] + then + echo "vm.args needs a -setcookie parameter" 2>&2 + exit 1 + fi + + ${ERTS_PATH}/escript ${ERTS_PATH}/nodetool ${name_arg} ${cookie_arg} ${cmd} +} + +#------------------------------------------------------------------------------- +check_node() +{ + local expected_state=$1 + local status + + nodetool ping >/dev/null 2>&1 + status=$? + + if [ "${expected_state}" = DOWN ] + then + if [ ${status} -eq 0 ] + then + echo "Node is already running" >&2 + exit 1 + fi + else + if [ ${status} -ne 0 ] + then + echo "Node is not running" >&2 + exit 1 + fi + fi +} + +#------------------------------------------------------------------------------- +remsh() +{ + local vmargs_path name_arg cookie_arg + local remsh_type remsh_name remsh_name_arg remsh_remsh_arg + + vmargs_path=${LEOFS_DBDIR}/etc/vm.args + + name_arg=`egrep '^-s?name' ${vmargs_path}` + if [ -z "${name_arg}" ] + then + echo "vm.args needs either -name or -sname parameter" >&2 + exit 1 + fi + + cookie_arg=`grep '^-setcookie' ${vmargs_path}` + if [ -z "${cookie_arg}" ] + then + echo "vm.args needs a -setcookie parameter" 2>&2 + exit 1 + fi + + # Extract the name type and name from the name_arg for remsh + remsh_type=${name_arg% *} + remsh_name=${name_arg#* } + + # `date +%s` is used to allow multiple remsh to the same node transparently + remsh_name_arg="${remsh_type} remsh$(date +%s)@${remsh_name#*@}" + remsh_remsh_arg="-remsh ${remsh_name}" + + ${ERTS_PATH}/erl ${remsh_name_arg} ${remsh_remsh_arg} ${cookie_arg} +} + +#------------------------------------------------------------------------------- +# Commands +#------------------------------------------------------------------------------- +cmd_help() +{ + case "$1" in + help_summary) + echo "Display help information about ${PROGNAME}" + exit + ;; + help_synopsis) + echo "${PROGNAME} help []" + exit + ;; + help_desc) + echo "With no command given, the synopsis of the ${PROGNAME} command" + echo "and a list of possible ${PROGNAME} commands are printed on the" + echo "standard output." + echo + echo "If a ${PROGNAME} command is named, a mini help for that command is" + echo "brought up." + exit + ;; + help_*) + exit + ;; + esac + + if [ -n "$1" ] + then + print_cmd_help "$1" + else + usage + fi +} + +register_cmd help + +#------------------------------------------------------------------------------- +cmd_attach() +{ + case "$1" in + help_summary) + echo "Attach to the running node" + exit + ;; + help_synopsis) + echo "${PROGNAME} attach" + exit + ;; + help_*) + exit + ;; + esac + + check_node UP + + ${ERTS_PATH}/to_erl ${LEOFS_PIPE} +} + +register_cmd attach + +#------------------------------------------------------------------------------- +cmd_console() +{ + local config_path vmargs_path cmd + + case "$1" in + help_summary) + echo "Start the server in console" + exit + ;; + help_synopsis) + echo "${PROGNAME} console" + exit + ;; + help_*) + exit + ;; + esac + + export ROOTDIR=${LEOFS_BASEDIR} + export BINDIR=${ERTS_PATH} + export EMU=beam + export PROGNAME=${PROGNAME} + + config_path=${LEOFS_DBDIR}/etc/app.config + vmargs_path=${LEOFS_DBDIR}/etc/vm.args + + cmd="${BINDIR}/erlexec -boot ${LEOFS_BOOT} -mode embedded \ + -config ${config_path} -args_file ${vmargs_path} -- $@" + + # Dump environment info for logging purposes + echo Exec: ${cmd} + echo Root: ${ROOTDIR} + + ${cmd} +} + +register_cmd console + +#------------------------------------------------------------------------------- +cmd_console_clean() +{ + case "$1" in + help_summary) + echo "Start the VM in console using start_clean.boot" + exit + ;; + help_synopsis) + echo "${PROGNAME} cosole_clean" + exit + ;; + help_*) + exit + ;; + esac + + LEOFS_BOOT=$(dirname ${LEOFS_BOOT})/start_clean + + cmd_console +} + +register_cmd console_clean + +#------------------------------------------------------------------------------- +cmd_ping() +{ + case "$1" in + help_summary) + echo "See if the VM is alive" + exit + ;; + help_synopsis) + echo "${PROGNAME} ping" + exit + ;; + help_*) + exit + ;; + esac + + nodetool ping +} + +register_cmd ping + +#------------------------------------------------------------------------------- +cmd_reboot() +{ + case "$1" in + help_summary) + echo "Restart the VM completely (uses heart to restart it)" + exit + ;; + help_synopsis) + echo "${PROGNAME} reboot" + exit + ;; + help_*) + exit + ;; + esac + + nodetool reboot +} + +register_cmd reboot + +#------------------------------------------------------------------------------- +cmd_remote_console() +{ + case "$1" in + help_summary) + echo "Run remote shell command to control node" + exit + ;; + help_synopsis) + echo "${PROGNAME} remote_console" + exit + ;; + help_*) + exit + ;; + esac + + check_node UP + + remsh "$@" +} + +register_cmd remote_console + +#------------------------------------------------------------------------------- +cmd_restart() +{ + case "$1" in + help_summary) + echo "Restart the VM without exiting the process" + exit + ;; + help_synopsis) + echo "${PROGNAME} restart" + exit + ;; + help_*) + exit + ;; + esac + + nodetool restart +} + +register_cmd restart + +#------------------------------------------------------------------------------- +cmd_start() +{ + case "$1" in + help_summary) + echo "Launch the application" + exit + ;; + help_synopsis) + echo "${PROGNAME} start" + exit + ;; + help_*) + exit + ;; + esac + + check_node DOWN + + export HEART_COMMAND="${PROGPATH} ${LEOFS_SERVER} start" + + ${ERTS_PATH}/run_erl -daemon ${LEOFS_PIPE} ${LEOFS_LOGDIR} \ + "exec ${PROGPATH} ${LEOFS_SERVER} console $@" 2>&1 +} + +register_cmd start + +#------------------------------------------------------------------------------- +cmd_stop() +{ + local pid res i + + case "$1" in + help_summary) + echo "Stop the application" + exit + ;; + help_synopsis) + echo "${PROGNAME} stop" + exit + ;; + help_*) + exit + ;; + esac + + pid=`ps xww -o pid= -o command= | + grep "${LEOFS_BASEDIR}.*/[b]eam.*${LEOFS_SERVER}" | + awk '{print $1}'` + + nodetool stop > /dev/null + res=$? + + if [ "${res}" -ne 0 ] + then + if [ -z "${pid}" ] + then + echo "${LEOFS_SERVER} is not running" + else + echo "Failed to stop ${LEOFS_SERVER}" + fi + exit ${res} + fi + + # Wait up to 1 minute for the process to terminate. + for i in `jot 60` + do + kill -0 ${pid} 2>/dev/null || exit 0 + sleep 1 + done + echo "Failed to terminate the ${LEOFS_SERVER} process (pid ${pid})" + exit 1 +} + +register_cmd stop + +#------------------------------------------------------------------------------- +# Main +#------------------------------------------------------------------------------- +if in_list "$1" "" "help" "-h" "--help" || test -z "$2" +then + cmd=help ; shift +else + make_env "$@" + + app="$1" ; shift + cmd="$1" ; shift +fi + +run_cmd "${cmd}" "$@" Property changes on: databases/leofs/files/sbin-leofs.in ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/pkg-descr =================================================================== --- databases/leofs/pkg-descr (revision 0) +++ databases/leofs/pkg-descr (working copy) @@ -0,0 +1,18 @@ +LeoFS is a highly scalable, fault-tolerant distributed file system +for the Web. + +LeoFS provides High Cost Performance Ratio. It allows you to build +LeoFS clusters using commodity hardware. LeoFS will require a smaller +cluster than other storage to achieve the same performance. LeoFS is +also very easy to setup and to operate. + +LeoFS provides High Reliability thanks to its great design on top of +the Erlang/OTP capabilities. LeoFS system will stay up regardless of +software errors or hardware failures happening inside the cluster. + +LeoFS provides High Scalability. Adding and removing nodes is simple +and quick, allowing you to react swiftly when your needs change. A +LeoFS cluster can be thought as elastic storage that you can stretch +as much and as often as you need. + +WWW: http://leo-project.net/ Property changes on: databases/leofs/pkg-descr ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/leofs/pkg-plist =================================================================== --- databases/leofs/pkg-plist (revision 0) +++ databases/leofs/pkg-plist (working copy) @@ -0,0 +1,37 @@ +@owner %%LEOFS_USER%% +@group %%LEOFS_GROUP%% +@exec mkdir -p %%LEOFS_DBDIR%% +@exec mkdir -p %%LEOFS_LOGDIR%% +@exec mkdir -p %%LEOFS_RUNDIR%% +@dirrmtry %%LEOFS_RUNDIR%% +@dirrmtry %%LEOFS_LOGDIR%% +@dirrmtry %%LEOFS_DBDIR%% +@owner root +@group wheel +sbin/leo_gateway +sbin/leo_manager +sbin/leo_manager_slave +sbin/leo_storage +sbin/leofs +@unexec if cmp -s %D/%%ETCDIR%%/leo_gateway.conf.sample %D/%%ETCDIR%%/leo_gateway.conf; then rm -f %D/%%ETCDIR%%/leo_gateway.conf; fi +%%ETCDIR%%/leo_gateway.conf.sample +@exec if [ ! -f %D/%%ETCDIR%%/leo_gateway.conf ] ; then cp -p %D/%F %B/leo_gateway.conf; fi +@unexec if cmp -s %D/%%ETCDIR%%/leo_manager.conf.sample %D/%%ETCDIR%%/leo_manager.conf; then rm -f %D/%%ETCDIR%%/leo_manager.conf; fi +%%ETCDIR%%/leo_manager.conf.sample +@exec if [ ! -f %D/%%ETCDIR%%/leo_manager.conf ] ; then cp -p %D/%F %B/leo_manager.conf; fi +@unexec if cmp -s %D/%%ETCDIR%%/leo_manager_slave.conf.sample %D/%%ETCDIR%%/leo_manager_slave.conf; then rm -f %D/%%ETCDIR%%/leo_manager_slave.conf; fi +%%ETCDIR%%/leo_manager_slave.conf.sample +@exec if [ ! -f %D/%%ETCDIR%%/leo_manager_slave.conf ] ; then cp -p %D/%F %B/leo_manager_slave.conf; fi +@unexec if cmp -s %D/%%ETCDIR%%/leo_storage.conf.sample %D/%%ETCDIR%%/leo_storage.conf; then rm -f %D/%%ETCDIR%%/leo_storage.conf; fi +%%ETCDIR%%/leo_storage.conf.sample +@exec if [ ! -f %D/%%ETCDIR%%/leo_storage.conf ] ; then cp -p %D/%F %B/leo_storage.conf; fi +@unexec if cmp -s %D/%%ETCDIR%%/server_cert.pem.sample %D/%%ETCDIR%%/server_cert.pem; then rm -f %D/%%ETCDIR%%/server_cert.pem; fi +%%ETCDIR%%/server_cert.pem.sample +@exec if [ ! -f %D/%%ETCDIR%%/server_cert.pem ] ; then cp -p %D/%F %B/server_cert.pem; fi +@unexec if cmp -s %D/%%ETCDIR%%/server_key.pem.sample %D/%%ETCDIR%%/server_key.pem; then rm -f %D/%%ETCDIR%%/server_key.pem; fi +%%ETCDIR%%/server_key.pem.sample +@exec if [ ! -f %D/%%ETCDIR%%/server_key.pem ] ; then cp -p %D/%F %B/server_key.pem; fi +@dirrmtry %%ETCDIR%% +@comment Insert PLIST.leofs here +@comment -=[ begin PLIST.leofs ]=- +@comment -=[ end PLIST.leofs ]=- Property changes on: databases/leofs/pkg-plist ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/rubygem-leo_manager_client/Makefile =================================================================== --- databases/rubygem-leo_manager_client/Makefile (revision 0) +++ databases/rubygem-leo_manager_client/Makefile (working copy) @@ -0,0 +1,18 @@ +# Created by: Mikolaj Golub +# $FreeBSD$ + +PORTNAME= leo_manager_client +PORTVERSION= 0.4.10 +CATEGORIES= databases +MASTER_SITES= RG + +MAINTAINER= trociny@FreeBSD.org +COMMENT= LeoFS-Manager client library for Ruby + +LICENSE= APACHE20 + +USE_RUBY= yes +USE_RUBYGEMS= yes +RUBYGEM_AUTOPLIST= yes + +.include Property changes on: databases/rubygem-leo_manager_client/Makefile ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: databases/rubygem-leo_manager_client/distinfo =================================================================== --- databases/rubygem-leo_manager_client/distinfo (revision 0) +++ databases/rubygem-leo_manager_client/distinfo (working copy) @@ -0,0 +1,2 @@ +SHA256 (rubygem/leo_manager_client-0.4.10.gem) = 2411d00b384ad5ee2a04280822026f86d5d1fa57c25dc70de05f2f0341604085 +SIZE (rubygem/leo_manager_client-0.4.10.gem) = 16384 Property changes on: databases/rubygem-leo_manager_client/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: databases/rubygem-leo_manager_client/pkg-descr =================================================================== --- databases/rubygem-leo_manager_client/pkg-descr (revision 0) +++ databases/rubygem-leo_manager_client/pkg-descr (working copy) @@ -0,0 +1,5 @@ +LeoFS is a highly scalable, fault-tolerant distributed file system +for the Web. This library allows any Ruby application to communicate +with LeoFS manager. + +WWW: http://leo-project.net/ Property changes on: databases/rubygem-leo_manager_client/pkg-descr ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property