[thrift] highly concurrent Erlang goodness

Summary:
 * shim to use object-oriented code as gen_servers
 * high(er) performance Erlang-style server and transport
 * sane packaging based on otp-base, i.e. Makefiles and real structure

Test Plan: tutorial server offers the same (subset of) functionality as previous version

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665164 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/erl/release_DISABLED/Makefile b/lib/erl/release_DISABLED/Makefile
new file mode 100644
index 0000000..c3274cd
--- /dev/null
+++ b/lib/erl/release_DISABLED/Makefile
@@ -0,0 +1,10 @@
+include ../build/colors.mk
+
+MODULES=$(shell ls . | grep "[^(Makefile)]")
+
+all clean:
+	@for dir in $(MODULES); do \
+		(cd $$dir; if [ -e "SKIP" ]; then  echo $${MY_LRED:-$(LRED)}"skipping \"make $@\" for $$dir"; else ${MAKE} $@; fi); \
+		if [ "$$?" -ne "0" ]; then ERROR=$$?; echo "Error Code $$ERROR"; exit $$ERROR; fi; \
+		echo -n $(OFF)$(NO_COLOR); \
+	done
diff --git a/lib/erl/release_DISABLED/thrift_rel/Makefile b/lib/erl/release_DISABLED/thrift_rel/Makefile
new file mode 100755
index 0000000..5d35956
--- /dev/null
+++ b/lib/erl/release_DISABLED/thrift_rel/Makefile
@@ -0,0 +1,298 @@
+# ----------------------------------------------------
+# Make file for creating an otp release. 
+# ----------------------------------------------------
+
+##
+# Basename of this release.
+##
+RELS=$(shell basename `pwd`)
+APP_NAME=$(shell echo $(RELS) | sed s/_rel$$//)
+
+include ../../build/otp.mk
+
+include ./vsn.mk
+
+#include $(ERL_TOP)/make/target.mk
+#include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+USR_LIBPATH=../../lib
+INSTALL_DIR=/usr/local/lib
+ABS_USER_LIBPATH=$(shell cd ../../lib;pwd)
+
+# ----------------------------------------------------
+# CREATE DIR STRUCTURE HERE
+# ----------------------------------------------------
+
+HTDOCS=$(wildcard $(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs/*.html) \
+	$(wildcard $(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs/*.htm) \
+	$(wildcard $(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs/*.yaws)
+BUILD_FILES=fs_boot_smithe.beam fs_lists.beam fs_lib.beam
+
+LOCAL_DIR=local
+#LOCAL_DIR=$(shell cat $(RELS).rel.src |grep -m 1 '$(APP_NAME)' |awk -F '"' '{printf "%s-%s", $$2,$$4}')
+
+DIR_STRUCTURE= \
+	$(LOCAL_DIR) \
+	$(LOCAL_DIR)/log/$(REL_VSN) \
+	$(LOCAL_DIR)/var/$(REL_VSN) \
+	$(LOCAL_DIR)/var/$(REL_VSN)/www/conf \
+	$(LOCAL_DIR)/var/$(REL_VSN)/www/htdocs 
+
+PRODUCTION_DIR_STRUCTURE= \
+	$(RELS) \
+	$(RELS)/release/$(REL_VSN) \
+	$(RELS)/stage \
+	$(RELS)/log/$(REL_VSN) \
+	$(RELS)/var/$(REL_VSN) \
+	$(RELS)/var/$(REL_VSN)/www \
+	$(RELS)/var/$(REL_VSN)/www/htdocs \
+	$(RELS)/var/$(REL_VSN)/www/conf
+
+# ----------------------------------------------------
+SCRIPT_AND_BOOT_FILES= \
+	$(RELS).script \
+	$(RELS).boot
+
+LOCAL_SCRIPT_AND_BOOT_FILES= \
+	$(LOCAL_DIR)/$(RELS).script \
+	$(LOCAL_DIR)/$(RELS).boot
+
+LOCAL_HTTP_CONF= \
+	$(LOCAL_DIR)/var/$(REL_VSN)/www/conf/yaws.conf \
+	$(LOCAL_DIR)/var/$(REL_VSN)/www/conf/mime.types  
+
+PRODUCTION_HTTP_CONF= \
+	$(LOCAL_DIR)/var/$(REL_VSN)/www/conf/yaws.conf \
+	$(LOCAL_DIR)/var/$(REL_VSN)/www/conf/mime.types  
+
+LOCAL_TARGET_FILES=$(LOCAL_HTTP_CONF) $(LOCAL_DIR)/$(RELS).config $(LOCAL_SCRIPT_AND_BOOT_FILES)
+
+LOCAL_TARGETS=$(LOCAL_DIR)/$(RELS).sh vsnit $(LOCAL_TARGET_FILES) 
+
+PRODUCTION_TARGETS=$(RELS)/build/$(REL_VSN) \
+	           $(RELS)/lib \
+                   $(RELS)/stage/$(RELS).rel.src \
+	           $(RELS)/stage/$(RELS).config.src \
+	           $(RELS)/stage/yaws.conf.src \
+		   $(RELS)/stage/$(RELS).sh.src  \
+		   $(RELS)/var/$(REL_VSN)/www/htdocs \
+		   $(RELS)/install.sh \
+		   $(RELS)/release/$(REL_VSN)/clean_release 
+
+# ----------------------------------------------------
+# TARGETS
+# ----------------------------------------------------
+
+all debug opt instr script:  $(DIR_STRUCTURE) $(LOCAL_TARGETS) $(PRODUCTION_DIR_STRUCTURE) $(PRODUCTION_TARGETS)
+	@echo $(HTDOCS)
+
+install:  stage
+
+tar: $(RELS)-$(LOCATION)-$(REL_VSN).tgz
+
+$(DIR_STRUCTURE):
+	mkdir -p $@
+
+$(PRODUCTION_DIR_STRUCTURE):
+	mkdir -p $@
+	
+clean:
+	$(RM) $(REL_SCRIPTS) $(TARGET_FILES)
+	$(RM) -r $(LOCAL_DIR) $(PRODN_DIR)
+	$(RM) $(RELS).rel
+	$(RM) -r $(RELS)
+	$(RM) $(RELS)*.tgz
+	$(RM) $(RELS).rel.src.tmp
+	$(RM) $(SCRIPT_AND_BOOT_FILES)
+
+docs:
+	
+# ----------------------------------------------------
+# TARGETS FOR LOCAL MODE
+# ----------------------------------------------------
+
+# startup script for local mode
+$(LOCAL_DIR)/$(RELS).sh: 
+	@echo '#!/bin/sh' > $@
+	@echo "cd $(CURDIR)/$(LOCAL_DIR)" >> $@
+	@echo "erl -name $${USER}_$(RELS) -boot $(RELS) -config $(RELS).config \$$@" >> $@
+	chmod +x $@
+	@echo
+	@echo "==== Start local node with \"sh $@\" ===="
+	@echo
+
+# Create the config file for local mode.
+$(LOCAL_DIR)/$(RELS).config: $(RELS).config.src
+	sed -e 's;%LOG_OTP%;$(CURDIR)/$(LOCAL_DIR)/log/$(REL_VSN);' \
+	    -e 's;%VAR_OTP%;$(CURDIR)/$(LOCAL_DIR)/var/$(REL_VSN);' \
+            -e 's;%RELS%;$(RELS);g' \
+            -e 's;%HOME%;$(HOME);g' \
+            -e 's;%BROADCAST_ADDRESS%;$(BROADCAST_ADDRESS);g' \
+            -e 's;%CONTACT_NODE%;$(CONTACT_NODE);g' \
+	    -e "s;%HOSTNAME%;`hostname --long`;" \
+            -e 's;%APP_NAME%;$(APP_NAME);' \
+	    -e 's;%APP_VERSION%;$(APP_VERSION);g' \
+             $< > $@
+
+# Create the httpd conf file for local mode.
+$(LOCAL_DIR)/var/$(REL_VSN)/www/conf/yaws.conf: yaws.conf.src
+	sed -e 's;%VAR_OTP%;$(CURDIR)/$(LOCAL_DIR)/var/$(REL_VSN);' \
+	    -e 's;%LOG_OTP%;$(CURDIR)/$(LOCAL_DIR)/log/$(REL_VSN);' \
+	    -e 's;%HTDOC_ROOT%;$(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs;' \
+            -e 's;%APP_NAME%;$(APP_NAME);' \
+            -e 's;%RELS%;$(RELS);' \
+            -e 's;%USER%;$(USER);' \
+	    -e 's;%HTDOC_ROOT%;$(ABS_USER_LIBPATH);' \
+            -e 's;%MHOST%;$(MHOST);' \
+            $< > $@
+
+# Create the config file for local mode.
+vsnit: $(RELS).rel.src 
+	sed -e 's;%REL_VSN%;$(REL_VSN);' \
+	       $< > $<.tmp
+
+# Create and position script and boot files for local mode.
+$(LOCAL_SCRIPT_AND_BOOT_FILES): 
+	@ erl -pz $(USR_LIBPATH)/fslib/ebin \
+	      -noshell \
+	      -s fs_lib s_apply fs_boot_smithe make_script_and_boot "[\"$(ERL_RUN_TOP)/*\",  \"$(USR_LIBPATH)\"]. " \
+                                                                     \"$$(basename `pwd`)".rel.src.tmp\". " \
+                                                                     "[local]. " \
+	      -s init stop
+	cp $(SCRIPT_AND_BOOT_FILES) $(LOCAL_DIR)/ 
+
+$(LOCAL_DIR)/var/$(REL_VSN)/www/conf/mime.types: ../../build/mime.types
+	cp $< $@
+
+# ----------------------------------------------------
+# TARGETS FOR PRODUCTION MODE
+# ----------------------------------------------------
+$(RELS)/lib: 
+	# For some reason this will not happen if added to PRODUCTION_DIR_STRUCTURE
+	mkdir $@
+	@ erl -pz $(RELS)/build/$(REL_VSN) \
+	      -noshell \
+	      -s fs_lib s_apply fs_boot_smithe stage_from_relsrc "[\"$(USR_LIBPATH)\"]. " \
+                                                                 \"$$(basename `pwd`)".rel.src\". " \
+                                                                 \"$@\"". " \
+	      -s init stop
+
+# Move the htdocs from the local apps to the production htdoc root directory.
+$(RELS)/var/$(REL_VSN)/www/htdocs/: $(HTDOCS)
+	@mkdir -p $(RELS)/var/$(REL_VSN)/www/htdocs; \
+	for x in $(HTDOCS);do \
+ 		cp  $$x $@; \
+	done
+
+# startup script for production mode
+$(RELS)/stage/$(RELS).sh.src: 
+	@echo '#!/bin/sh' > $@
+	@echo "cd %INSTALL_DIR%/$(RELS)/release/$(REL_VSN)" >> $@
+	@echo "erl -name $(RELS) -boot $(RELS) -config $(RELS).config -detached \$$@" >> $@
+	chmod +x $@
+
+$(RELS)/build/$(REL_VSN):  $(USR_LIBPATH)/fslib/ebin
+	mkdir -p $(RELS)/build/$(REL_VSN) 
+	cp $</fs_boot_smithe.beam $@
+	cp $</fs_lib.beam $@
+	cp $</fs_lists.beam $@
+
+$(RELS)/stage/$(RELS).rel.src: $(RELS).rel.src.tmp
+	cp $< $@
+
+$(RELS)/stage/$(RELS).config.src: $(RELS).config.src
+	cp $< $@
+
+$(RELS)/stage/yaws.conf.src: yaws.conf.src
+	cp $< $@
+
+$(RELS)/install.sh: 
+	@echo '#!/bin/sh' > $@
+	@echo "" >> $@
+	@echo "if [ \$$# -eq 1 ];then" >> $@
+	@echo "    INSTALL_DIR=\$$1;" >> $@
+	@echo "else" >> $@
+	@echo "    INSTALL_DIR=$(INSTALL_DIR);" >> $@
+	@echo "fi" >> $@
+	@echo "" >> $@
+	@echo "function munge() {" >> $@
+	@echo "    sed -e \"s;%LOG_OTP%;\$$INSTALL_DIR/$(RELS)/log/$(REL_VSN);g\" \\" >> $@
+	@echo "        -e \"s;%VAR_OTP%;\$$INSTALL_DIR/$(RELS)/var/$(REL_VSN);g\" \\" >> $@
+	@echo "        -e \"s;%RELS%;$(RELS);g\" \\" >> $@
+	@echo "        -e \"s;%REL_VSN%;$(REL_VSN);g\" \\" >> $@
+	@echo "        -e \"s;%USER%;$$USER;g\" \\" >> $@
+	@echo "        -e \"s;%HTDOC_ROOT%;\$$INSTALL_DIR/$(RELS)/var/$(REL_VSN)/www/htdocs;g\" \\" >> $@
+	@echo "        -e \"s;%MHOST%;\`hostname\`;g\" \\" >> $@
+	@echo "        -e \"s;%BROADCAST_ADDRESS%;$(BROADCAST_ADDRESS);g\" \\" >> $@
+	@echo "        -e \"s;%INSTALL_DIR%;\$$INSTALL_DIR;g\" \\" >> $@
+	@echo "        -e \"s;%CONTACT_NODE%;$(CONTACT_NODE);g\" \\" >> $@
+	@echo "        -e \"s;%HOSTNAME%;\`hostname --long\`;g\" \\" >> $@
+	@echo "        -e \"s;%APP_NAME%;$(APP_NAME);g\" \\" >> $@
+	@echo "        -e \"s;%APP_VERSION%;$(APP_VERSION);g\" \\" >> $@
+	@echo '        $$1 > $$2' >> $@
+	@echo "}" >> $@
+	@echo "" >> $@
+	@echo "munge stage/yaws.conf.src var/$(REL_VSN)/www/conf/yaws.conf;" >> $@
+	@echo "munge stage/$(RELS).config.src release/$(REL_VSN)/$(RELS).config;" >> $@
+	@echo "munge stage/$(RELS).sh.src release/$(REL_VSN)/$(RELS).sh;" >> $@
+	@echo "munge stage/$(RELS).rel.src release/$(REL_VSN)/$(RELS).rel;" >> $@
+	@echo "chmod +x release/$(REL_VSN)/$(RELS).sh;" >> $@
+	@echo "" >> $@
+	@echo "cd ..;" >> $@
+	@echo "find $(RELS) | cpio -o > \$$INSTALL_DIR/$(RELS).cpio;" >> $@
+	@echo "cd -;" >> $@
+	@echo "cd \$$INSTALL_DIR; " >> $@
+	@echo "echo -n \"Unpacked: \"" >> $@
+	@echo "cpio -uid < $(RELS).cpio;" >> $@
+	@echo "rm $(RELS).cpio;" >> $@
+	@echo "" >> $@
+	@echo "echo \"pwd is \`pwd\`\";" >> $@
+	@echo "cd $(RELS);" >> $@
+	@echo " erl -pz build/$(REL_VSN) \\" >> $@
+	@echo "      -noshell \\" >> $@
+	@echo -n "      -s fs_lib s_apply fs_boot_smithe make_script_and_boot \"[\\\"$(ERL_RUN_TOP)/*\\\",  \\\"lib/\\\"]. \" " >> $@
+	@echo -n        "\"\\\"stage/$$(basename `pwd`).rel.src\\\". \" " >> $@
+	@echo -n        "\"[local]. \" " >> $@
+	@echo           "-s init stop | egrep '*terminate*|ERROR'" >> $@
+	@echo "if [ \$$? -eq 0 ]; then" >> $@
+	@echo "echo \"============================================\";" >> $@
+	@echo "echo \"STAGE FAILURE \$$?  - Silence the discord.\";" >> $@
+	@echo "echo \"============================================\";" >> $@
+	@echo "exit 1;" >> $@
+	@echo "fi" >> $@
+	@echo "" >> $@
+	@echo "mv $(RELS).rel $(RELS).script $(RELS).boot release/$(REL_VSN);" >> $@
+	@echo "" >> $@
+	@echo "rm -r stage;" >> $@
+	@echo "rm -r build;" >> $@
+	@echo "cd -;" >> $@
+	@echo "" >> $@
+	@echo "chgrp -R erts $(RELS); " >> $@
+	@echo "chmod -R 775 $(RELS); " >> $@
+	@echo "cd -" >> $@
+	@echo "" >> $@
+	@echo "rm -f /usr/local/bin/$(APP_NAME);" >> $@
+	@echo "ln -s \$$INSTALL_DIR/$(RELS)/release/$(REL_VSN)/$(RELS).sh /usr/local/bin/$(APP_NAME);" >> $@
+	@echo "chgrp -R erts /usr/local/bin/$(APP_NAME); " >> $@
+	@echo "chmod -R 775 /usr/local/bin/$(APP_NAME); " >> $@
+	@echo "rm \$$INSTALL_DIR/$(RELS)/install.sh;" >> $@
+	@echo "echo -n $$'\e[0;32m'" >> $@
+	@echo "echo \"$(APP_NAME) installation to \$$INSTALL_DIR complete.\"" >> $@
+	@echo "echo -n $$'\e[0m'" >> $@
+	chmod +x $@
+		
+
+stage: $(RELS)
+	cd $(RELS); \
+	./install.sh; \
+	cd -
+
+$(RELS)/var/$(REL_VSN)/www/conf/mime.types: ../../build/mime.types
+	cp $< $@
+
+$(RELS)-$(LOCATION)-$(REL_VSN).tgz: $(RELS)
+	tar -zcvf $@ $<
+
+$(RELS)/release/$(REL_VSN)/clean_release: ../../tools/utilities/clean_release
+	cp $< $@
+
diff --git a/lib/erl/release_DISABLED/thrift_rel/local/thrift_rel.config b/lib/erl/release_DISABLED/thrift_rel/local/thrift_rel.config
new file mode 100644
index 0000000..39091ef
--- /dev/null
+++ b/lib/erl/release_DISABLED/thrift_rel/local/thrift_rel.config
@@ -0,0 +1,26 @@
+%%% -*- mode:erlang -*-
+%%% Parameter settings for apps on thrift
+%%% Warning - this config file *must* end with <dot><whitespace>
+
+%% write log files to sasl_dir
+[
+ {sasl,
+  [
+   {sasl_error_logger, {file, "/data/users/cpiro/thrift/trunk/lib/erl/release/thrift_rel/local/log/1.0/sasl_log"}}
+  ]},
+
+
+ {gas,
+  [
+   {mod_specs, [{elwrap, {fs_elwrap_h, start_link}}]},
+
+   % elwrap config.
+   {err_log, "/data/users/cpiro/thrift/trunk/lib/erl/release/thrift_rel/local/log/1.0/err_log"},
+   {err_log_wrap_info, {{err,5000000,10},{sasl,5000000,10}}}, 
+   {err_log_tty, true} % Log to the screen
+   ]},
+
+ {thrift,
+  [
+  ]}
+]. 
diff --git a/lib/erl/release_DISABLED/thrift_rel/local/thrift_rel.sh b/lib/erl/release_DISABLED/thrift_rel/local/thrift_rel.sh
new file mode 100755
index 0000000..d30a43c
--- /dev/null
+++ b/lib/erl/release_DISABLED/thrift_rel/local/thrift_rel.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /data/users/cpiro/thrift/trunk/lib/erl/release/thrift_rel/local
+erl -name cpiro_thrift_rel -boot thrift_rel -config thrift_rel.config $@
diff --git a/lib/erl/release_DISABLED/thrift_rel/local/var/1.0/www/conf/mime.types b/lib/erl/release_DISABLED/thrift_rel/local/var/1.0/www/conf/mime.types
new file mode 100644
index 0000000..d6e3c0d
--- /dev/null
+++ b/lib/erl/release_DISABLED/thrift_rel/local/var/1.0/www/conf/mime.types
@@ -0,0 +1,98 @@
+
+application/activemessage
+application/andrew-inset
+application/applefile
+application/atomicmail
+application/dca-rft
+application/dec-dx
+application/mac-binhex40	hqx
+application/mac-compactpro	cpt
+application/macwriteii
+application/msword		doc
+application/news-message-id
+application/news-transmission
+application/octet-stream	bin dms lha lzh exe class
+application/oda			oda
+application/pdf			pdf
+application/postscript		ai eps ps
+application/powerpoint		ppt
+application/remote-printing
+application/rtf			rtf
+application/slate
+application/wita
+application/wordperfect5.1
+application/x-bcpio		bcpio
+application/x-cdlink		vcd
+application/x-compress		Z
+application/x-cpio		cpio
+application/x-csh		csh
+application/x-director		dcr dir dxr
+application/x-dvi		dvi
+application/x-gtar		gtar
+application/x-gzip		gz
+application/x-hdf		hdf
+application/x-httpd-cgi		cgi
+application/x-koan		skp skd skt skm
+application/x-latex		latex
+application/x-mif		mif
+application/x-netcdf		nc cdf
+application/x-sh		sh
+application/x-shar		shar
+application/x-stuffit		sit
+application/x-sv4cpio		sv4cpio
+application/x-sv4crc		sv4crc
+application/x-tar		tar
+application/x-tcl		tcl
+application/x-tex		tex
+application/x-texinfo		texinfo texi
+application/x-troff		t tr roff
+application/x-troff-man		man
+application/x-troff-me		me
+application/x-troff-ms		ms
+application/x-ustar		ustar
+application/x-wais-source	src
+application/zip			zip
+audio/basic			au snd
+audio/mpeg			mpga mp2
+audio/x-aiff			aif aiff aifc
+audio/x-pn-realaudio		ram
+audio/x-pn-realaudio-plugin	rpm
+audio/x-realaudio		ra
+audio/x-wav			wav
+chemical/x-pdb			pdb xyz
+image/gif			gif
+image/ief			ief
+image/jpeg			jpeg jpg jpe
+image/png			png
+image/tiff			tiff tif
+image/x-cmu-raster		ras
+image/x-portable-anymap		pnm
+image/x-portable-bitmap		pbm
+image/x-portable-graymap	pgm
+image/x-portable-pixmap		ppm
+image/x-rgb			rgb
+image/x-xbitmap			xbm
+image/x-xpixmap			xpm
+image/x-xwindowdump		xwd
+message/external-body
+message/news
+message/partial
+message/rfc822
+multipart/alternative
+multipart/appledouble
+multipart/digest
+multipart/mixed
+multipart/parallel
+text/html			html htm
+text/x-server-parsed-html	shtml
+text/plain			txt
+text/richtext			rtx
+text/tab-separated-values	tsv
+text/x-setext			etx
+text/x-sgml			sgml sgm
+video/mpeg			mpeg mpg mpe
+video/quicktime			qt mov
+video/x-msvideo			avi
+video/x-sgi-movie		movie
+x-conference/x-cooltalk		ice
+x-world/x-vrml			wrl vrml
diff --git a/lib/erl/release_DISABLED/thrift_rel/local/var/1.0/www/conf/yaws.conf b/lib/erl/release_DISABLED/thrift_rel/local/var/1.0/www/conf/yaws.conf
new file mode 100644
index 0000000..8857aac
--- /dev/null
+++ b/lib/erl/release_DISABLED/thrift_rel/local/var/1.0/www/conf/yaws.conf
@@ -0,0 +1,166 @@
+
+# conf for yaws
+
+
+# first we have a set of globals
+# That apply to all virtual servers
+
+
+# This is the directory where all logfiles for
+# all virtual servers will be written
+
+logdir = /var/log/yaws
+
+# This the path to a directory where additional
+# beam code can be placed. The daemon will add this
+# directory to its search path
+
+ebin_dir = /var/yaws/ebin
+
+
+# This is a directory where application specific .hrl
+# files can be placed. application specifig .yaws code can
+# then include these .hrl files
+
+include_dir = /var/yaws/include
+
+
+
+
+
+# This is a debug variable, possible values are http | traffic | false
+# It is also possible to set the trace (possibly to the tty) while
+# invoking yaws from the shell as in
+# yaws -i -T -x (see man yaws)
+
+trace = false
+
+
+
+
+
+# it is possible to have yaws start additional 
+# application specific code at startup
+# 
+# runmod = mymodule
+
+
+# By default yaws will copy the erlang error_log and
+# end write it to a wrap log called report.log (in the logdir)
+# this feature can be turned off. This would typically
+# be the case when yaws runs within another larger app
+
+copy_error_log = true
+
+
+# Logs are wrap logs
+
+log_wrap_size = 1000000
+
+
+# Possibly resolve all hostnames in logfiles so webalizer
+# can produce the nice geography piechart
+
+log_resolve_hostname = false
+
+
+
+# fail completely or not if yaws fails 
+# to bind a listen socket
+fail_on_bind_err = true
+
+
+
+# If yaws is started as root, it can, once it has opened
+# all relevant sockets for listening, change the uid to a 
+# user with lower accessrights than root 
+
+# username = nobody
+
+
+# If HTTP auth is used, it is possible to have a specific
+# auth log.
+
+auth_log = true
+
+
+# When we're running multiple yaws systems on the same 
+# host, we need to give each yaws system an individual
+# name. Yaws will write a number of runtime files under
+# /tmp/yaws/${id}
+# The default value is "default"
+
+
+# id = myname
+
+
+# earlier versions of Yaws picked the first virtual host
+# in a list of hosts with the same IP/PORT when the Host:
+# header doesn't match any name on any Host
+# This is often nice in testing environments but not
+# acceptable in real live hosting scenarios
+
+pick_first_virthost_on_nomatch = true
+
+
+# All unices are broken since it's not possible to bind to
+# a privileged port (< 1024) unless uid==0
+# There is a contrib in jungerl which makes it possible by means 
+# of an external setuid root programm called fdsrv to listen to
+# to privileged port.
+# If we use this feature, it requires fdsrv to be properly installed.
+# Doesn't yet work with SSL.
+
+use_fdsrv = false
+
+
+
+
+# end then a set of virtual servers
+# First two virthosted servers on the same IP (0.0.0.0)
+# in this case, but an explicit IP can be given as well
+
+<server core.martinjlogan.com>
+	port = 80
+	listen = 0.0.0.0
+	docroot = /var/yaws/www
+	arg_rewrite_mod = pwr_arg_rewrite_mod
+	appmods = <pwr, pwr_main_controller_appmod>
+</server>
+
+<server localhost>
+	port = 80
+	listen = 0.0.0.0
+	docroot = /tmp
+	dir_listings = true
+	dav = true
+	<auth>
+		realm = foobar
+		dir = /
+		user = foo:bar
+		user = baz:bar
+	</auth>
+</server>
+
+
+
+# And then an ssl server
+
+<server core.martinjlogan.com>
+	port = 443
+	docroot = /tmp
+	listen = 0.0.0.0
+	dir_listings = true
+	<ssl>  
+	        keyfile = /usr/local/yaws/etc/yaws-key.pem
+	        certfile = /usr/local/yaws/etc/yaws-cert.pem
+	</ssl>
+</server>
+				
+	
+
+
+
+
+
+
diff --git a/lib/erl/release_DISABLED/thrift_rel/thrift_rel.config.src b/lib/erl/release_DISABLED/thrift_rel/thrift_rel.config.src
new file mode 100755
index 0000000..c701c5a
--- /dev/null
+++ b/lib/erl/release_DISABLED/thrift_rel/thrift_rel.config.src
@@ -0,0 +1,26 @@
+%%% -*- mode:erlang -*-
+%%% Parameter settings for apps on %APP_NAME%
+%%% Warning - this config file *must* end with <dot><whitespace>
+
+%% write log files to sasl_dir
+[
+ {sasl,
+  [
+   {sasl_error_logger, {file, "%LOG_OTP%/sasl_log"}}
+  ]},
+
+
+ {gas,
+  [
+   {mod_specs, [{elwrap, {fs_elwrap_h, start_link}}]},
+
+   % elwrap config.
+   {err_log, "%LOG_OTP%/err_log"},
+   {err_log_wrap_info, {{err,5000000,10},{sasl,5000000,10}}}, 
+   {err_log_tty, true} % Log to the screen
+   ]},
+
+ {%APP_NAME%,
+  [
+  ]}
+]. 
diff --git a/lib/erl/release_DISABLED/thrift_rel/thrift_rel.rel.src b/lib/erl/release_DISABLED/thrift_rel/thrift_rel.rel.src
new file mode 100644
index 0000000..a11d240
--- /dev/null
+++ b/lib/erl/release_DISABLED/thrift_rel/thrift_rel.rel.src
@@ -0,0 +1,14 @@
+%%% -*- mode:erlang -*-
+{release, 
+ {"thrift_rel", "%REL_VSN%"},
+ erts,
+ [
+  kernel,
+  stdlib,
+  sasl,
+  fslib,
+  gas,
+  thrift
+ ]
+}. 
+
diff --git a/lib/erl/release_DISABLED/thrift_rel/thrift_rel.rel.src.tmp b/lib/erl/release_DISABLED/thrift_rel/thrift_rel.rel.src.tmp
new file mode 100644
index 0000000..b334f70
--- /dev/null
+++ b/lib/erl/release_DISABLED/thrift_rel/thrift_rel.rel.src.tmp
@@ -0,0 +1,14 @@
+%%% -*- mode:erlang -*-
+{release, 
+ {"thrift_rel", "1.0"},
+ erts,
+ [
+  kernel,
+  stdlib,
+  sasl,
+  fslib,
+  gas,
+  thrift
+ ]
+}. 
+
diff --git a/lib/erl/release_DISABLED/thrift_rel/vsn.mk b/lib/erl/release_DISABLED/thrift_rel/vsn.mk
new file mode 100755
index 0000000..0ac8e07
--- /dev/null
+++ b/lib/erl/release_DISABLED/thrift_rel/vsn.mk
@@ -0,0 +1 @@
+REL_VSN=1.0
diff --git a/lib/erl/release_DISABLED/thrift_rel/yaws.conf.src b/lib/erl/release_DISABLED/thrift_rel/yaws.conf.src
new file mode 100644
index 0000000..8857aac
--- /dev/null
+++ b/lib/erl/release_DISABLED/thrift_rel/yaws.conf.src
@@ -0,0 +1,166 @@
+
+# conf for yaws
+
+
+# first we have a set of globals
+# That apply to all virtual servers
+
+
+# This is the directory where all logfiles for
+# all virtual servers will be written
+
+logdir = /var/log/yaws
+
+# This the path to a directory where additional
+# beam code can be placed. The daemon will add this
+# directory to its search path
+
+ebin_dir = /var/yaws/ebin
+
+
+# This is a directory where application specific .hrl
+# files can be placed. application specifig .yaws code can
+# then include these .hrl files
+
+include_dir = /var/yaws/include
+
+
+
+
+
+# This is a debug variable, possible values are http | traffic | false
+# It is also possible to set the trace (possibly to the tty) while
+# invoking yaws from the shell as in
+# yaws -i -T -x (see man yaws)
+
+trace = false
+
+
+
+
+
+# it is possible to have yaws start additional 
+# application specific code at startup
+# 
+# runmod = mymodule
+
+
+# By default yaws will copy the erlang error_log and
+# end write it to a wrap log called report.log (in the logdir)
+# this feature can be turned off. This would typically
+# be the case when yaws runs within another larger app
+
+copy_error_log = true
+
+
+# Logs are wrap logs
+
+log_wrap_size = 1000000
+
+
+# Possibly resolve all hostnames in logfiles so webalizer
+# can produce the nice geography piechart
+
+log_resolve_hostname = false
+
+
+
+# fail completely or not if yaws fails 
+# to bind a listen socket
+fail_on_bind_err = true
+
+
+
+# If yaws is started as root, it can, once it has opened
+# all relevant sockets for listening, change the uid to a 
+# user with lower accessrights than root 
+
+# username = nobody
+
+
+# If HTTP auth is used, it is possible to have a specific
+# auth log.
+
+auth_log = true
+
+
+# When we're running multiple yaws systems on the same 
+# host, we need to give each yaws system an individual
+# name. Yaws will write a number of runtime files under
+# /tmp/yaws/${id}
+# The default value is "default"
+
+
+# id = myname
+
+
+# earlier versions of Yaws picked the first virtual host
+# in a list of hosts with the same IP/PORT when the Host:
+# header doesn't match any name on any Host
+# This is often nice in testing environments but not
+# acceptable in real live hosting scenarios
+
+pick_first_virthost_on_nomatch = true
+
+
+# All unices are broken since it's not possible to bind to
+# a privileged port (< 1024) unless uid==0
+# There is a contrib in jungerl which makes it possible by means 
+# of an external setuid root programm called fdsrv to listen to
+# to privileged port.
+# If we use this feature, it requires fdsrv to be properly installed.
+# Doesn't yet work with SSL.
+
+use_fdsrv = false
+
+
+
+
+# end then a set of virtual servers
+# First two virthosted servers on the same IP (0.0.0.0)
+# in this case, but an explicit IP can be given as well
+
+<server core.martinjlogan.com>
+	port = 80
+	listen = 0.0.0.0
+	docroot = /var/yaws/www
+	arg_rewrite_mod = pwr_arg_rewrite_mod
+	appmods = <pwr, pwr_main_controller_appmod>
+</server>
+
+<server localhost>
+	port = 80
+	listen = 0.0.0.0
+	docroot = /tmp
+	dir_listings = true
+	dav = true
+	<auth>
+		realm = foobar
+		dir = /
+		user = foo:bar
+		user = baz:bar
+	</auth>
+</server>
+
+
+
+# And then an ssl server
+
+<server core.martinjlogan.com>
+	port = 443
+	docroot = /tmp
+	listen = 0.0.0.0
+	dir_listings = true
+	<ssl>  
+	        keyfile = /usr/local/yaws/etc/yaws-key.pem
+	        certfile = /usr/local/yaws/etc/yaws-cert.pem
+	</ssl>
+</server>
+				
+	
+
+
+
+
+
+