rpms/couchdb/devel couchdb0.11.1-0001-Force-init-script-installation.patch, NONE, 1.1 couchdb0.11.1-0002-Install-into-erllibdir-by-default.patch, NONE, 1.1 couchdb0.11.1-0003-Remove-bundled-erlang-oauth-library.patch, NONE, 1.1 couchdb0.11.1-0004-Remove-bundled-erlang-etap-library.patch, NONE, 1.1 couchdb0.11.1-0005-Remove-bundled-mochiweb-library.patch, NONE, 1.1 couchdb0.11.1-0006-Remove-bundled-ibrowse-library.patch, NONE, 1.1 couchdb0.11.1-0007-Workaround-for-system-wide-ibrowse.patch, NONE, 1.1 couchdb0.11.1-0008-Remove-pid-file-after-stop.patch, NONE, 1.1 couchdb0.11.1-0009-deleting-a-DB-while-it-was-being-opened-would-crash-.patch, NONE, 1.1 .cvsignore, 1.7, 1.8 couchdb.spec, 1.24, 1.25 import.log, 1.20, 1.21 sources, 1.7, 1.8 couchdb0.11.0-0001-Force-init-script-installation.patch, 1.2, NONE couchdb0.11.0-0002-Install-into-erllibdir-by-default.patch, 1.2, NONE couchdb0.11.0-0003-Remove-bundled-erlang-oauth-library.patch, 1.2, NONE couchdb0.11.0-0004-Remove-bundled-erlang-etap-library.patch, 1.2, NONE couchdb0.11.0-0005-Remove-bundled-mochiweb-library.patch, 1.2, NONE couchdb0.11.0-0006-Remove-pid-file-after-stop.patch, 1.2, NONE couchdb0.11.0-0007-Remove-bundled-ibrowse-library.patch, 1.2, NONE couchdb0.11.0-0008-Workaround-for-system-wide-ibrowse.patch, 1.2, NONE couchdb0.11.0-0009-fix-issue-COUCHDB-805.-tested-on-R13B-04-and-R14A.-a.patch, 1.1, NONE

Peter Lemenkov peter at fedoraproject.org
Wed Jul 14 14:41:37 UTC 2010


Author: peter

Update of /cvs/pkgs/rpms/couchdb/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv14023/devel

Modified Files:
	.cvsignore couchdb.spec import.log sources 
Added Files:
	couchdb0.11.1-0001-Force-init-script-installation.patch 
	couchdb0.11.1-0002-Install-into-erllibdir-by-default.patch 
	couchdb0.11.1-0003-Remove-bundled-erlang-oauth-library.patch 
	couchdb0.11.1-0004-Remove-bundled-erlang-etap-library.patch 
	couchdb0.11.1-0005-Remove-bundled-mochiweb-library.patch 
	couchdb0.11.1-0006-Remove-bundled-ibrowse-library.patch 
	couchdb0.11.1-0007-Workaround-for-system-wide-ibrowse.patch 
	couchdb0.11.1-0008-Remove-pid-file-after-stop.patch 
	couchdb0.11.1-0009-deleting-a-DB-while-it-was-being-opened-would-crash-.patch 
Removed Files:
	couchdb0.11.0-0001-Force-init-script-installation.patch 
	couchdb0.11.0-0002-Install-into-erllibdir-by-default.patch 
	couchdb0.11.0-0003-Remove-bundled-erlang-oauth-library.patch 
	couchdb0.11.0-0004-Remove-bundled-erlang-etap-library.patch 
	couchdb0.11.0-0005-Remove-bundled-mochiweb-library.patch 
	couchdb0.11.0-0006-Remove-pid-file-after-stop.patch 
	couchdb0.11.0-0007-Remove-bundled-ibrowse-library.patch 
	couchdb0.11.0-0008-Workaround-for-system-wide-ibrowse.patch 
	couchdb0.11.0-0009-fix-issue-COUCHDB-805.-tested-on-R13B-04-and-R14A.-a.patch 
Log Message:
Ver. 0.11.1

couchdb0.11.1-0001-Force-init-script-installation.patch:
 configure.ac |   17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

--- NEW FILE couchdb0.11.1-0001-Force-init-script-installation.patch ---
>From 3965421f5754d6b73bf2f04e135e5b732af354fb Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov at gmail.com>
Date: Thu, 27 May 2010 15:17:20 +0400
Subject: [PATCH 1/9] Force init script installation

---
 configure.ac |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0c08952..08a1c1c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -294,19 +294,9 @@ launchd_enabled=false
 
 if test "$use_init" = "yes"; then
    AC_MSG_CHECKING(location of init directory)
-   if test -d /etc/rc.d; then
-       init_enabled=true
-       AC_SUBST([initdir], ['${sysconfdir}/rc.d'])
-       AC_MSG_RESULT(${initdir})
-   else
-       if test -d /etc/init.d; then
-           init_enabled=true
-           AC_SUBST([initdir], ['${sysconfdir}/init.d'])
-           AC_MSG_RESULT(${initdir})
-       else
-           AC_MSG_RESULT(not found)
-       fi
-    fi
+   init_enabled=true
+   AC_SUBST([initdir], ['${sysconfdir}/rc.d'])
+   AC_MSG_RESULT(${initdir})
 fi
 
 if test "$use_launchd" = "yes"; then
-- 
1.7.1.1


couchdb0.11.1-0002-Install-into-erllibdir-by-default.patch:
 configure |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- NEW FILE couchdb0.11.1-0002-Install-into-erllibdir-by-default.patch ---
>From 028e72d7b46b69eb8d9b95aaf4e90e4175bbb588 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov at gmail.com>
Date: Thu, 27 May 2010 15:18:29 +0400
Subject: [PATCH 2/9] Install into erllibdir by default

---
 configure |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 42a7489..4eca719 100755
--- a/configure
+++ b/configure
@@ -12193,7 +12193,7 @@ localdatadir=${datadir}/${package_identifier}
 
 localdocdir=${datadir}/doc/${package_identifier}
 
-locallibdir=${libdir}/${package_identifier}
+locallibdir=${libdir}
 
 localstatelibdir=${localstatedir}/lib/${package_identifier}
 
@@ -12209,7 +12209,7 @@ if test x${IS_WINDOWS} = xTRUE; then
     localerlanglibdir=${libdir}
 
 else
-    locallibbindir=${locallibdir}/bin
+    locallibbindir=${locallibdir}/erlang/lib/couch-${version}/priv
 
     localerlanglibdir=${locallibdir}/erlang/lib
 
-- 
1.7.1.1


couchdb0.11.1-0003-Remove-bundled-erlang-oauth-library.patch:
 b/configure                          |    3 
 b/configure.ac                       |    1 
 b/src/Makefile.am                    |    2 
 b/src/Makefile.in                    |    2 
 b/test/etap/test_util.erl.in         |    3 
 src/erlang-oauth/Makefile.am         |   49 ---
 src/erlang-oauth/Makefile.in         |  484 -----------------------------------
 src/erlang-oauth/oauth.app.in        |   20 -
 src/erlang-oauth/oauth.erl           |  107 -------
 src/erlang-oauth/oauth_hmac_sha1.erl |   11 
 src/erlang-oauth/oauth_http.erl      |   22 -
 src/erlang-oauth/oauth_plaintext.erl |   10 
 src/erlang-oauth/oauth_unix.erl      |   16 -
 src/erlang-oauth/oauth_uri.erl       |   88 ------
 14 files changed, 3 insertions(+), 815 deletions(-)

--- NEW FILE couchdb0.11.1-0003-Remove-bundled-erlang-oauth-library.patch ---
>From f04d36e140eaecf2695a541a1b3f7f9fe761df21 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov at gmail.com>
Date: Wed, 14 Jul 2010 17:57:54 +0400
Subject: [PATCH 3/9] Remove bundled erlang-oauth library

---
 configure                            |    3 -
 configure.ac                         |    1 -
 src/Makefile.am                      |    2 +-
 src/Makefile.in                      |    2 +-
 src/erlang-oauth/Makefile.am         |   49 ----
 src/erlang-oauth/Makefile.in         |  484 ----------------------------------
 src/erlang-oauth/oauth.app.in        |   20 --
 src/erlang-oauth/oauth.erl           |  107 --------
 src/erlang-oauth/oauth_hmac_sha1.erl |   11 -
 src/erlang-oauth/oauth_http.erl      |   22 --
 src/erlang-oauth/oauth_plaintext.erl |   10 -
 src/erlang-oauth/oauth_unix.erl      |   16 --
 src/erlang-oauth/oauth_uri.erl       |   88 ------
 test/etap/test_util.erl.in           |    2 +-
 14 files changed, 3 insertions(+), 814 deletions(-)
 delete mode 100644 src/erlang-oauth/Makefile.am
 delete mode 100644 src/erlang-oauth/Makefile.in
 delete mode 100644 src/erlang-oauth/oauth.app.in
 delete mode 100644 src/erlang-oauth/oauth.erl
 delete mode 100644 src/erlang-oauth/oauth_hmac_sha1.erl
 delete mode 100644 src/erlang-oauth/oauth_http.erl
 delete mode 100644 src/erlang-oauth/oauth_plaintext.erl
 delete mode 100644 src/erlang-oauth/oauth_unix.erl
 delete mode 100644 src/erlang-oauth/oauth_uri.erl

diff --git a/configure b/configure
index 4eca719..316b8c3 100755
--- a/configure
+++ b/configure
@@ -12261,8 +12261,6 @@ ac_config_files="$ac_config_files src/couchdb/Makefile"
 
 ac_config_files="$ac_config_files src/couchdb/priv/Makefile"
 
-ac_config_files="$ac_config_files src/erlang-oauth/Makefile"
-
 ac_config_files="$ac_config_files src/etap/Makefile"
 
 ac_config_files="$ac_config_files src/ibrowse/Makefile"
@@ -13290,7 +13288,6 @@ do
     "src/couchdb/couch.app.tpl") CONFIG_FILES="$CONFIG_FILES src/couchdb/couch.app.tpl" ;;
     "src/couchdb/Makefile") CONFIG_FILES="$CONFIG_FILES src/couchdb/Makefile" ;;
     "src/couchdb/priv/Makefile") CONFIG_FILES="$CONFIG_FILES src/couchdb/priv/Makefile" ;;
-    "src/erlang-oauth/Makefile") CONFIG_FILES="$CONFIG_FILES src/erlang-oauth/Makefile" ;;
     "src/etap/Makefile") CONFIG_FILES="$CONFIG_FILES src/etap/Makefile" ;;
     "src/ibrowse/Makefile") CONFIG_FILES="$CONFIG_FILES src/ibrowse/Makefile" ;;
     "src/mochiweb/Makefile") CONFIG_FILES="$CONFIG_FILES src/mochiweb/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 08a1c1c..84a38d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -387,7 +387,6 @@ AC_CONFIG_FILES([src/Makefile])
 AC_CONFIG_FILES([src/couchdb/couch.app.tpl])
 AC_CONFIG_FILES([src/couchdb/Makefile])
 AC_CONFIG_FILES([src/couchdb/priv/Makefile])
-AC_CONFIG_FILES([src/erlang-oauth/Makefile])
 AC_CONFIG_FILES([src/etap/Makefile])
 AC_CONFIG_FILES([src/ibrowse/Makefile])
 AC_CONFIG_FILES([src/mochiweb/Makefile])
diff --git a/src/Makefile.am b/src/Makefile.am
index b9529f9..e577138 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,4 +10,4 @@
 ## License for the specific language governing permissions and limitations under
 ## the License.
 
-SUBDIRS = couchdb erlang-oauth etap ibrowse mochiweb
+SUBDIRS = couchdb etap ibrowse mochiweb
diff --git a/src/Makefile.in b/src/Makefile.in
index daff9c3..3fec89c 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -248,7 +248,7 @@ version_minor = @version_minor@
 version_release = @version_release@
 version_revision = @version_revision@
 version_stage = @version_stage@
-SUBDIRS = couchdb erlang-oauth etap ibrowse mochiweb
+SUBDIRS = couchdb etap ibrowse mochiweb
 all: all-recursive
 
 .SUFFIXES:
diff --git a/src/erlang-oauth/Makefile.am b/src/erlang-oauth/Makefile.am
deleted file mode 100644
index 1d12339..0000000
--- a/src/erlang-oauth/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-## Licensed under the Apache License, Version 2.0 (the "License"); you may not
-## use this file except in compliance with the License.  You may obtain a copy
-## of the License at
-##
-##   http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
-## License for the specific language governing permissions and limitations under
-## the License.
-
-oauthebindir = $(localerlanglibdir)/erlang-oauth/ebin
-
-# Removed oauth_rsa_sha1.erl until we require R12B5 or
-# we add a ./configure option to enable it.
-
-oauth_file_collection = \
-	oauth.app.in \
-    oauth.erl \
-    oauth_hmac_sha1.erl \
-    oauth_http.erl \
-    oauth_plaintext.erl \
-    oauth_unix.erl \
-    oauth_uri.erl
-
-oauthebin_make_generated_file_list = \
-	oauth.app \
-    oauth.beam \
-    oauth_hmac_sha1.beam \
-    oauth_http.beam \
-    oauth_plaintext.beam \
-    oauth_unix.beam \
-    oauth_uri.beam
-
-oauthebin_DATA = \
-	$(oauthebin_make_generated_file_list)
-
-EXTRA_DIST = \
-	$(oauth_file_collection)
-
-CLEANFILES = \
-    $(oauthebin_make_generated_file_list)
-
-%.app: %.app.in
-	cp $< $@
-
-%.beam: %.erl
-	$(ERLC) $(ERLC_FLAGS) $<
diff --git a/src/erlang-oauth/Makefile.in b/src/erlang-oauth/Makefile.in
deleted file mode 100644
index 282883b..0000000
--- a/src/erlang-oauth/Makefile.in
+++ /dev/null
@@ -1,484 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = src/erlang-oauth
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_curl.m4 \
-	$(top_srcdir)/m4/ac_check_icu.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(oauthebindir)"
-DATA = $(oauthebin_DATA)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CURL_CFLAGS = @CURL_CFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
-CURL_LDFLAGS = @CURL_LDFLAGS@
-CURL_LIBS = @CURL_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ERL = @ERL@
-ERLC = @ERLC@
-ERLC_FLAGS = @ERLC_FLAGS@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FLAGS = @FLAGS@
-GREP = @GREP@
-HELP2MAN_EXECUTABLE = @HELP2MAN_EXECUTABLE@
-ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
-ICU_CXXFLAGS = @ICU_CXXFLAGS@
-ICU_LIBS = @ICU_LIBS@
-ICU_LOCAL_BIN = @ICU_LOCAL_BIN@
-ICU_LOCAL_CFLAGS = @ICU_LOCAL_CFLAGS@
-ICU_LOCAL_LDFLAGS = @ICU_LOCAL_LDFLAGS@
-INNO_COMPILER_EXECUTABLE = @INNO_COMPILER_EXECUTABLE@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-JSLIB = @JSLIB@
-JS_LIB_BASE = @JS_LIB_BASE@
-JS_LIB_BINARY = @JS_LIB_BINARY@
-JS_LIB_DIR = @JS_LIB_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-bug_uri = @bug_uri@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-initdir = @initdir@
-install_sh = @install_sh@
-launchddir = @launchddir@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localconfdir = @localconfdir@
-localdatadir = @localdatadir@
-localdocdir = @localdocdir@
-localedir = @localedir@
-localerlanglibdir = @localerlanglibdir@
-locallibbindir = @locallibbindir@
-locallibdir = @locallibdir@
-localstatedir = @localstatedir@
-localstatelibdir = @localstatelibdir@
-localstatelogdir = @localstatelogdir@
-localstaterundir = @localstaterundir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-msvc_redist_dir = @msvc_redist_dir@
-msvc_redist_name = @msvc_redist_name@
-oldincludedir = @oldincludedir@
-openssl_bin_dir = @openssl_bin_dir@
-package_author_address = @package_author_address@
-package_author_name = @package_author_name@
-package_identifier = @package_identifier@
-package_name = @package_name@
-package_tarname = @package_tarname@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-version = @version@
-version_major = @version_major@
-version_minor = @version_minor@
-version_release = @version_release@
-version_revision = @version_revision@
-version_stage = @version_stage@
-oauthebindir = $(localerlanglibdir)/erlang-oauth/ebin
-
-# Removed oauth_rsa_sha1.erl until we require R12B5 or
-# we add a ./configure option to enable it.
-oauth_file_collection = \
-	oauth.app.in \
-    oauth.erl \
-    oauth_hmac_sha1.erl \
-    oauth_http.erl \
-    oauth_plaintext.erl \
-    oauth_unix.erl \
-    oauth_uri.erl
-
-oauthebin_make_generated_file_list = \
-	oauth.app \
-    oauth.beam \
-    oauth_hmac_sha1.beam \
-    oauth_http.beam \
-    oauth_plaintext.beam \
-    oauth_unix.beam \
-    oauth_uri.beam
-
-oauthebin_DATA = \
-	$(oauthebin_make_generated_file_list)
-
-EXTRA_DIST = \
-	$(oauth_file_collection)
-
-CLEANFILES = \
-    $(oauthebin_make_generated_file_list)
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/erlang-oauth/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign src/erlang-oauth/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-install-oauthebinDATA: $(oauthebin_DATA)
-	@$(NORMAL_INSTALL)
-	test -z "$(oauthebindir)" || $(MKDIR_P) "$(DESTDIR)$(oauthebindir)"
-	@list='$(oauthebin_DATA)'; test -n "$(oauthebindir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(oauthebindir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(oauthebindir)" || exit $$?; \
-	done
-
-uninstall-oauthebinDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(oauthebin_DATA)'; test -n "$(oauthebindir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(oauthebindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(oauthebindir)" && rm -f $$files
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
-installdirs:
-	for dir in "$(DESTDIR)$(oauthebindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-oauthebinDATA
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-oauthebinDATA
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-oauthebinDATA \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-oauthebinDATA
-
-
-%.app: %.app.in
-	cp $< $@
-
-%.beam: %.erl
-	$(ERLC) $(ERLC_FLAGS) $<
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/erlang-oauth/oauth.app.in b/src/erlang-oauth/oauth.app.in
deleted file mode 100644
index 6357b9b..0000000
--- a/src/erlang-oauth/oauth.app.in
+++ /dev/null
@@ -1,20 +0,0 @@
-{application, oauth, [
-  {description, "Erlang OAuth implementation"},
-  {vsn, "dev"},
-  {modules, [
-    oauth,
-    oauth_hmac_sha1,
-    oauth_http,
-    oauth_plaintext,
-    oauth_rsa_sha1,
-    oauth_unix,
-    oauth_uri
-  ]},
-  {registered, []},
-  {applications, [
-    kernel,
-    stdlib,
-    crypto,
-    inets
-  ]}
-]}.
diff --git a/src/erlang-oauth/oauth.erl b/src/erlang-oauth/oauth.erl
deleted file mode 100644
index 866655c..0000000
--- a/src/erlang-oauth/oauth.erl
+++ /dev/null
@@ -1,107 +0,0 @@
--module(oauth).
-
--export(
-  [ get/5
-  , header/1
-  , post/5
-  , signature/5
-  , signature_base_string/3
-  , signed_params/6
-  , token/1
-  , token_secret/1
-  , uri/2
-  , verify/6
-  ]).
-
-
-get(URL, ExtraParams, Consumer, Token, TokenSecret) ->
-  SignedParams = signed_params("GET", URL, ExtraParams, Consumer, Token, TokenSecret),
-  oauth_http:get(uri(URL, SignedParams)).
-
-post(URL, ExtraParams, Consumer, Token, TokenSecret) ->
-  SignedParams = signed_params("POST", URL, ExtraParams, Consumer, Token, TokenSecret),
-  oauth_http:post(URL, oauth_uri:params_to_string(SignedParams)).
-
-uri(Base, []) ->
-  Base;
-uri(Base, Params) ->
-  lists:concat([Base, "?", oauth_uri:params_to_string(Params)]).
-
-header(Params) ->
-  {"Authorization", "OAuth " ++ oauth_uri:params_to_header_string(Params)}.
-
-token(Params) ->
-  proplists:get_value("oauth_token", Params).
-
-token_secret(Params) ->
-  proplists:get_value("oauth_token_secret", Params).
-
-verify(Signature, HttpMethod, URL, Params, Consumer, TokenSecret) ->
-  case signature_method(Consumer) of
-    plaintext ->
-      oauth_plaintext:verify(Signature, consumer_secret(Consumer), TokenSecret);
-    hmac_sha1 ->
-      BaseString = signature_base_string(HttpMethod, URL, Params),
-      oauth_hmac_sha1:verify(Signature, BaseString, consumer_secret(Consumer), TokenSecret);
-    rsa_sha1 ->
-      BaseString = signature_base_string(HttpMethod, URL, Params),
-      oauth_rsa_sha1:verify(Signature, BaseString, consumer_secret(Consumer))
-  end.
-
-signed_params(HttpMethod, URL, ExtraParams, Consumer, Token, TokenSecret) ->
-  Params = token_param(Token, params(Consumer, ExtraParams)),
-  [{"oauth_signature", signature(HttpMethod, URL, Params, Consumer, TokenSecret)}|Params].
-
-signature(HttpMethod, URL, Params, Consumer, TokenSecret) ->
-  case signature_method(Consumer) of
-    plaintext ->
-      oauth_plaintext:signature(consumer_secret(Consumer), TokenSecret);
-    hmac_sha1 ->
-      BaseString = signature_base_string(HttpMethod, URL, Params),
-      oauth_hmac_sha1:signature(BaseString, consumer_secret(Consumer), TokenSecret);
-    rsa_sha1 ->
-      BaseString = signature_base_string(HttpMethod, URL, Params),
-      oauth_rsa_sha1:signature(BaseString, consumer_secret(Consumer))
-  end.
-
-signature_base_string(HttpMethod, URL, Params) ->
-  NormalizedURL = oauth_uri:normalize(URL),
-  NormalizedParams = oauth_uri:params_to_string(lists:sort(Params)),
-  oauth_uri:calate("&", [HttpMethod, NormalizedURL, NormalizedParams]).
-
-token_param("", Params) ->
-  Params;
-token_param(Token, Params) ->
-  [{"oauth_token", Token}|Params].
-
-params(Consumer, Params) ->
-  Nonce = base64:encode_to_string(crypto:rand_bytes(32)), % cf. ruby-oauth
-  params(Consumer, oauth_unix:timestamp(), Nonce, Params).
-
-params(Consumer, Timestamp, Nonce, Params) ->
-  [ {"oauth_version", "1.0"}
-  , {"oauth_nonce", Nonce}
-  , {"oauth_timestamp", integer_to_list(Timestamp)}
-  , {"oauth_signature_method", signature_method_string(Consumer)}
-  , {"oauth_consumer_key", consumer_key(Consumer)}
-  | Params
-  ].
-
-signature_method_string(Consumer) ->
-  case signature_method(Consumer) of
-    plaintext ->
-      "PLAINTEXT";
-    hmac_sha1 ->
-      "HMAC-SHA1";
-    rsa_sha1 ->
-      "RSA-SHA1"
-  end.
-
-signature_method(_Consumer={_, _, Method}) ->
-  Method.
-
-consumer_secret(_Consumer={_, Secret, _}) ->
-  Secret.
-
-consumer_key(_Consumer={Key, _, _}) ->
-  Key.
diff --git a/src/erlang-oauth/oauth_hmac_sha1.erl b/src/erlang-oauth/oauth_hmac_sha1.erl
deleted file mode 100644
index 79d59f3..0000000
--- a/src/erlang-oauth/oauth_hmac_sha1.erl
+++ /dev/null
@@ -1,11 +0,0 @@
--module(oauth_hmac_sha1).
-
--export([signature/3, verify/4]).
-
-
-signature(BaseString, CS, TS) ->
-  Key = oauth_uri:calate("&", [CS, TS]),
-  base64:encode_to_string(crypto:sha_mac(Key, BaseString)).
-
-verify(Signature, BaseString, CS, TS) ->
-  couch_util:verify(signature(BaseString, CS, TS), Signature).
diff --git a/src/erlang-oauth/oauth_http.erl b/src/erlang-oauth/oauth_http.erl
deleted file mode 100644
index bf5a4ba..0000000
--- a/src/erlang-oauth/oauth_http.erl
+++ /dev/null
@@ -1,22 +0,0 @@
--module(oauth_http).
-
--export([get/1, post/2, response_params/1, response_body/1, response_code/1]).
-
-
-get(URL) ->
-  request(get, {URL, []}).
-
-post(URL, Data) ->
-  request(post, {URL, [], "application/x-www-form-urlencoded", Data}).
-
-request(Method, Request) ->
-  http:request(Method, Request, [{autoredirect, false}], []).
-
-response_params(Response) ->
-  oauth_uri:params_from_string(response_body(Response)).
-
-response_body({{_, _, _}, _, Body}) ->
-  Body.
-
-response_code({{_, Code, _}, _, _}) ->
-  Code.
diff --git a/src/erlang-oauth/oauth_plaintext.erl b/src/erlang-oauth/oauth_plaintext.erl
deleted file mode 100644
index 41a1e9b..0000000
--- a/src/erlang-oauth/oauth_plaintext.erl
+++ /dev/null
@@ -1,10 +0,0 @@
--module(oauth_plaintext).
-
--export([signature/2, verify/3]).
-
-
-signature(CS, TS) ->
-  oauth_uri:calate("&", [CS, TS]).
-
-verify(Signature, CS, TS) ->
-  couch_util:verify(signature(CS, TS), Signature).
diff --git a/src/erlang-oauth/oauth_unix.erl b/src/erlang-oauth/oauth_unix.erl
deleted file mode 100644
index 73ca314..0000000
--- a/src/erlang-oauth/oauth_unix.erl
+++ /dev/null
@@ -1,16 +0,0 @@
--module(oauth_unix).
-
--export([timestamp/0]).
-
-
-timestamp() ->
-  timestamp(calendar:universal_time()).
-
-timestamp(DateTime) ->
-  seconds(DateTime) - epoch().
-
-epoch() ->
-  seconds({{1970,1,1},{00,00,00}}).
-
-seconds(DateTime) ->
-  calendar:datetime_to_gregorian_seconds(DateTime).
diff --git a/src/erlang-oauth/oauth_uri.erl b/src/erlang-oauth/oauth_uri.erl
deleted file mode 100644
index fb27ae7..0000000
--- a/src/erlang-oauth/oauth_uri.erl
+++ /dev/null
@@ -1,88 +0,0 @@
--module(oauth_uri).
-
--export([normalize/1, calate/2, encode/1]).
--export([params_from_string/1, params_to_string/1,
-  params_from_header_string/1, params_to_header_string/1]).
-
--import(lists, [concat/1]).
-
--define(is_uppercase_alpha(C), C >= $A, C =< $Z).
--define(is_lowercase_alpha(C), C >= $a, C =< $z).
--define(is_alpha(C), ?is_uppercase_alpha(C); ?is_lowercase_alpha(C)).
--define(is_digit(C), C >= $0, C =< $9).
--define(is_alphanumeric(C), ?is_alpha(C); ?is_digit(C)).
--define(is_unreserved(C), ?is_alphanumeric(C); C =:= $-; C =:= $_; C =:= $.; C =:= $~).
--define(is_hex(C), ?is_digit(C); C >= $A, C =< $F).
-
-
-normalize(URI) ->
-  case http_uri:parse(URI) of
-    {Scheme, UserInfo, Host, Port, Path, _Query} ->
-      normalize(Scheme, UserInfo, string:to_lower(Host), Port, [Path]);
-    Else ->
-      Else
-  end.
-
-normalize(http, UserInfo, Host, 80, Acc) ->
-  normalize(http, UserInfo, [Host|Acc]);
-normalize(https, UserInfo, Host, 443, Acc) ->
-  normalize(https, UserInfo, [Host|Acc]);
-normalize(Scheme, UserInfo, Host, Port, Acc) ->
-  normalize(Scheme, UserInfo, [Host, ":", Port|Acc]).
-
-normalize(Scheme, [], Acc) ->
-  concat([Scheme, "://"|Acc]);
-normalize(Scheme, UserInfo, Acc) ->
-  concat([Scheme, "://", UserInfo, "@"|Acc]).
-
-params_to_header_string(Params) ->
-  intercalate(", ", [concat([encode(K), "=\"", encode(V), "\""]) || {K, V} <- Params]).
-
-params_from_header_string(String) ->
-  [param_from_header_string(Param) || Param <- re:split(String, ",\\s*", [{return, list}]), Param =/= ""].
-
-param_from_header_string(Param) ->
-  [Key, QuotedValue] = string:tokens(Param, "="),
-  Value = string:substr(QuotedValue, 2, length(QuotedValue) - 2),
-  {decode(Key), decode(Value)}.
-
-params_from_string(Params) ->
-  [param_from_string(Param) || Param <- string:tokens(Params, "&")].
-
-param_from_string(Param) ->
-  list_to_tuple([decode(Value) || Value <- string:tokens(Param, "=")]).
-
-params_to_string(Params) ->
-  intercalate("&", [calate("=", [K, V]) || {K, V} <- Params]).
-
-calate(Sep, Xs) ->
-  intercalate(Sep, [encode(X) || X <- Xs]).
-
-intercalate(Sep, Xs) ->
-  concat(intersperse(Sep, Xs)).
-
-intersperse(_, []) -> [];
-intersperse(_, [X]) -> [X];
-intersperse(Sep, [X|Xs]) ->
-  [X, Sep|intersperse(Sep, Xs)].
-
-decode(Chars) ->
-  decode(Chars, []).
-
-decode([], Decoded) ->
-  lists:reverse(Decoded);
-decode([$%,A,B|Etc], Decoded) when ?is_hex(A), ?is_hex(B) ->
-  decode(Etc, [erlang:list_to_integer([A,B], 16)|Decoded]);
-decode([C|Etc], Decoded) when ?is_unreserved(C) ->
-  decode(Etc, [C|Decoded]).
-
-encode(Chars) ->
-  encode(Chars, []).
-
-encode([], Encoded) ->
-  lists:flatten(lists:reverse(Encoded));
-encode([C|Etc], Encoded) when ?is_unreserved(C) ->
-  encode(Etc, [C|Encoded]);
-encode([C|Etc], Encoded) ->
-  Value = io_lib:format("%~2.1.0s", [erlang:integer_to_list(C, 16)]),
-  encode(Etc, [Value|Encoded]).
diff --git a/test/etap/test_util.erl.in b/test/etap/test_util.erl.in
index 4c42edb..79b0417 100644
--- a/test/etap/test_util.erl.in
+++ b/test/etap/test_util.erl.in
@@ -22,7 +22,7 @@ builddir() ->
     "@abs_top_builddir@".
 
 init_code_path() ->
-    Paths = ["etap", "couchdb", "erlang-oauth", "ibrowse", "mochiweb"],
+    Paths = ["etap", "couchdb", "ibrowse", "mochiweb"],
     lists:foreach(fun(Name) ->
         code:add_pathz(filename:join([builddir(), "src", Name]))
     end, Paths).
-- 
1.7.1.1


couchdb0.11.1-0004-Remove-bundled-erlang-etap-library.patch:
 b/configure                   |    3 
 b/configure.ac                |    1 
 b/src/Makefile.am             |    2 
 b/src/Makefile.in             |    2 
 b/test/etap/test_util.erl.in  |    3 
 src/etap/Makefile.am          |   44 ---
 src/etap/Makefile.in          |  476 ------------------------------------------
 src/etap/etap.erl             |  416 ------------------------------------
 src/etap/etap_application.erl |   72 ------
 src/etap/etap_can.erl         |   79 ------
 src/etap/etap_exception.erl   |   66 -----
 src/etap/etap_process.erl     |   42 ---
 src/etap/etap_report.erl      |  343 ------------------------------
 src/etap/etap_request.erl     |   89 -------
 src/etap/etap_string.erl      |   47 ----
 src/etap/etap_web.erl         |   65 -----
 16 files changed, 3 insertions(+), 1747 deletions(-)

--- NEW FILE couchdb0.11.1-0004-Remove-bundled-erlang-etap-library.patch ---
>From 24cd0159c5221340fe511ca146ce62ceb62f7a1c Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov at gmail.com>
Date: Wed, 14 Jul 2010 18:00:03 +0400
Subject: [PATCH 4/9] Remove bundled erlang-etap library

---
 configure                     |    3 -
 configure.ac                  |    1 -
 src/Makefile.am               |    2 +-
 src/Makefile.in               |    2 +-
 src/etap/Makefile.am          |   44 ----
 src/etap/Makefile.in          |  476 -----------------------------------------
 src/etap/etap.erl             |  416 -----------------------------------
 src/etap/etap_application.erl |   72 ------
 src/etap/etap_can.erl         |   79 -------
 src/etap/etap_exception.erl   |   66 ------
 src/etap/etap_process.erl     |   42 ----
 src/etap/etap_report.erl      |  343 -----------------------------
 src/etap/etap_request.erl     |   89 --------
 src/etap/etap_string.erl      |   47 ----
 src/etap/etap_web.erl         |   65 ------
 test/etap/test_util.erl.in    |    2 +-
 16 files changed, 3 insertions(+), 1746 deletions(-)
 delete mode 100644 src/etap/Makefile.am
 delete mode 100644 src/etap/Makefile.in
 delete mode 100644 src/etap/etap.erl
 delete mode 100644 src/etap/etap_application.erl
 delete mode 100644 src/etap/etap_can.erl
 delete mode 100644 src/etap/etap_exception.erl
 delete mode 100644 src/etap/etap_process.erl
 delete mode 100644 src/etap/etap_report.erl
 delete mode 100644 src/etap/etap_request.erl
 delete mode 100644 src/etap/etap_string.erl
 delete mode 100644 src/etap/etap_web.erl

diff --git a/configure b/configure
index 316b8c3..68c8db9 100755
--- a/configure
+++ b/configure
@@ -12261,8 +12261,6 @@ ac_config_files="$ac_config_files src/couchdb/Makefile"
 
 ac_config_files="$ac_config_files src/couchdb/priv/Makefile"
 
-ac_config_files="$ac_config_files src/etap/Makefile"
-
 ac_config_files="$ac_config_files src/ibrowse/Makefile"
 
 ac_config_files="$ac_config_files src/mochiweb/Makefile"
@@ -13288,7 +13286,6 @@ do
     "src/couchdb/couch.app.tpl") CONFIG_FILES="$CONFIG_FILES src/couchdb/couch.app.tpl" ;;
     "src/couchdb/Makefile") CONFIG_FILES="$CONFIG_FILES src/couchdb/Makefile" ;;
     "src/couchdb/priv/Makefile") CONFIG_FILES="$CONFIG_FILES src/couchdb/priv/Makefile" ;;
-    "src/etap/Makefile") CONFIG_FILES="$CONFIG_FILES src/etap/Makefile" ;;
     "src/ibrowse/Makefile") CONFIG_FILES="$CONFIG_FILES src/ibrowse/Makefile" ;;
     "src/mochiweb/Makefile") CONFIG_FILES="$CONFIG_FILES src/mochiweb/Makefile" ;;
     "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 84a38d3..e9375be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -387,7 +387,6 @@ AC_CONFIG_FILES([src/Makefile])
 AC_CONFIG_FILES([src/couchdb/couch.app.tpl])
 AC_CONFIG_FILES([src/couchdb/Makefile])
 AC_CONFIG_FILES([src/couchdb/priv/Makefile])
-AC_CONFIG_FILES([src/etap/Makefile])
 AC_CONFIG_FILES([src/ibrowse/Makefile])
 AC_CONFIG_FILES([src/mochiweb/Makefile])
 AC_CONFIG_FILES([test/Makefile])
diff --git a/src/Makefile.am b/src/Makefile.am
index e577138..19a5d20 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,4 +10,4 @@
 ## License for the specific language governing permissions and limitations under
 ## the License.
 
-SUBDIRS = couchdb etap ibrowse mochiweb
+SUBDIRS = couchdb ibrowse mochiweb
diff --git a/src/Makefile.in b/src/Makefile.in
index 3fec89c..ae1b828 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -248,7 +248,7 @@ version_minor = @version_minor@
 version_release = @version_release@
 version_revision = @version_revision@
 version_stage = @version_stage@
-SUBDIRS = couchdb etap ibrowse mochiweb
+SUBDIRS = couchdb ibrowse mochiweb
 all: all-recursive
 
 .SUFFIXES:
diff --git a/src/etap/Makefile.am b/src/etap/Makefile.am
deleted file mode 100644
index 732347b..0000000
--- a/src/etap/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-## Licensed under the Apache License, Version 2.0 (the "License"); you may not
-## use this file except in compliance with the License.  You may obtain a copy
-## of the License at
-##
-##   http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
-## License for the specific language governing permissions and limitations under
-## the License.
-
-etapebindir = $(localerlanglibdir)/etap/ebin
-
-etap_file_collection = \
-    etap.erl \
-   	etap_application.erl \
-    etap_can.erl \
-    etap_exception.erl \
-    etap_process.erl \
-	etap_report.erl \
-	etap_request.erl \
-	etap_string.erl \
-   	etap_web.erl
-
-etapebin_make_generated_file_list = \
-    etap.beam \
-   	etap_application.beam \
-    etap_can.beam \
-    etap_exception.beam \
-    etap_process.beam \
-	etap_report.beam \
-	etap_request.beam \
-	etap_string.beam \
-   	etap_web.beam
-
-etapebin_DATA = $(etapebin_make_generated_file_list)
-
-EXTRA_DIST =  $(etap_file_collection)
-
-CLEANFILES = $(etapebin_make_generated_file_list)
-
-%.beam: %.erl
-	$(ERLC) $(ERLC_FLAGS) $<
diff --git a/src/etap/Makefile.in b/src/etap/Makefile.in
deleted file mode 100644
index df91ff7..0000000
--- a/src/etap/Makefile.in
+++ /dev/null
@@ -1,476 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = src/etap
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_curl.m4 \
-	$(top_srcdir)/m4/ac_check_icu.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(etapebindir)"
-DATA = $(etapebin_DATA)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CURL_CFLAGS = @CURL_CFLAGS@
-CURL_CONFIG = @CURL_CONFIG@
-CURL_LDFLAGS = @CURL_LDFLAGS@
-CURL_LIBS = @CURL_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ERL = @ERL@
-ERLC = @ERLC@
-ERLC_FLAGS = @ERLC_FLAGS@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FLAGS = @FLAGS@
-GREP = @GREP@
-HELP2MAN_EXECUTABLE = @HELP2MAN_EXECUTABLE@
-ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
-ICU_CXXFLAGS = @ICU_CXXFLAGS@
-ICU_LIBS = @ICU_LIBS@
-ICU_LOCAL_BIN = @ICU_LOCAL_BIN@
-ICU_LOCAL_CFLAGS = @ICU_LOCAL_CFLAGS@
-ICU_LOCAL_LDFLAGS = @ICU_LOCAL_LDFLAGS@
-INNO_COMPILER_EXECUTABLE = @INNO_COMPILER_EXECUTABLE@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-JSLIB = @JSLIB@
-JS_LIB_BASE = @JS_LIB_BASE@
-JS_LIB_BINARY = @JS_LIB_BINARY@
-JS_LIB_DIR = @JS_LIB_DIR@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-bug_uri = @bug_uri@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-initdir = @initdir@
-install_sh = @install_sh@
-launchddir = @launchddir@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localconfdir = @localconfdir@
-localdatadir = @localdatadir@
-localdocdir = @localdocdir@
-localedir = @localedir@
-localerlanglibdir = @localerlanglibdir@
-locallibbindir = @locallibbindir@
-locallibdir = @locallibdir@
-localstatedir = @localstatedir@
-localstatelibdir = @localstatelibdir@
-localstatelogdir = @localstatelogdir@
-localstaterundir = @localstaterundir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-msvc_redist_dir = @msvc_redist_dir@
-msvc_redist_name = @msvc_redist_name@
-oldincludedir = @oldincludedir@
-openssl_bin_dir = @openssl_bin_dir@
-package_author_address = @package_author_address@
-package_author_name = @package_author_name@
-package_identifier = @package_identifier@
-package_name = @package_name@
-package_tarname = @package_tarname@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-version = @version@
-version_major = @version_major@
-version_minor = @version_minor@
-version_release = @version_release@
-version_revision = @version_revision@
-version_stage = @version_stage@
-etapebindir = $(localerlanglibdir)/etap/ebin
-etap_file_collection = \
-    etap.erl \
-   	etap_application.erl \
-    etap_can.erl \
-    etap_exception.erl \
-    etap_process.erl \
-	etap_report.erl \
-	etap_request.erl \
-	etap_string.erl \
-   	etap_web.erl
-
-etapebin_make_generated_file_list = \
-    etap.beam \
-   	etap_application.beam \
-    etap_can.beam \
-    etap_exception.beam \
-    etap_process.beam \
-	etap_report.beam \
-	etap_request.beam \
-	etap_string.beam \
-   	etap_web.beam
-
-etapebin_DATA = $(etapebin_make_generated_file_list)
-EXTRA_DIST = $(etap_file_collection)
-CLEANFILES = $(etapebin_make_generated_file_list)
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/etap/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign src/etap/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-install-etapebinDATA: $(etapebin_DATA)
-	@$(NORMAL_INSTALL)
-	test -z "$(etapebindir)" || $(MKDIR_P) "$(DESTDIR)$(etapebindir)"
-	@list='$(etapebin_DATA)'; test -n "$(etapebindir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(etapebindir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(etapebindir)" || exit $$?; \
-	done
-
-uninstall-etapebinDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(etapebin_DATA)'; test -n "$(etapebindir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(etapebindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(etapebindir)" && rm -f $$files
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
-installdirs:
-	for dir in "$(DESTDIR)$(etapebindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-etapebinDATA
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-etapebinDATA
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-etapebinDATA install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-etapebinDATA
-
-
-%.beam: %.erl
-	$(ERLC) $(ERLC_FLAGS) $<
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/etap/etap.erl b/src/etap/etap.erl
deleted file mode 100644
index 5ad5dba..0000000
--- a/src/etap/etap.erl
+++ /dev/null
@@ -1,416 +0,0 @@
-%% Copyright (c) 2008-2009 Nick Gerakines <nick at gerakines.net>
-%% 
-%% Permission is hereby granted, free of charge, to any person
-%% obtaining a copy of this software and associated documentation
-%% files (the "Software"), to deal in the Software without
-%% restriction, including without limitation the rights to use,
-%% copy, modify, merge, publish, distribute, sublicense, and/or sell
-%% copies of the Software, and to permit persons to whom the
-%% Software is furnished to do so, subject to the following
-%% conditions:
-%% 
-%% The above copyright notice and this permission notice shall be
-%% included in all copies or substantial portions of the Software.
-%% 
-%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-%% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-%% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-%% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-%% OTHER DEALINGS IN THE SOFTWARE.
-%% 
-%% @author Nick Gerakines <nick at gerakines.net> [http://socklabs.com/]
-%% @author Jeremy Wall <jeremy at marzhillstudios.com>
-%% @version 0.3.4
-%% @copyright 2007-2008 Jeremy Wall, 2008-2009 Nick Gerakines
-%% @reference http://testanything.org/wiki/index.php/Main_Page
-%% @reference http://en.wikipedia.org/wiki/Test_Anything_Protocol
-%% @todo Finish implementing the skip directive.
-%% @todo Document the messages handled by this receive loop.
-%% @todo Explain in documentation why we use a process to handle test input.
-%% @doc etap is a TAP testing module for Erlang components and applications.
-%% This module allows developers to test their software using the TAP method.
-%% 
-%% <blockquote cite="http://en.wikipedia.org/wiki/Test_Anything_Protocol"><p>
-%% TAP, the Test Anything Protocol, is a simple text-based interface between
-%% testing modules in a test harness. TAP started life as part of the test
-%% harness for Perl but now has implementations in C/C++, Python, PHP, Perl
-%% and probably others by the time you read this.
-%% </p></blockquote>
-%% 
-%% The testing process begins by defining a plan using etap:plan/1, running
-%% a number of etap tests and then calling eta:end_tests/0. Please refer to
-%% the Erlang modules in the t directory of this project for example tests.
--module(etap).
--export([
-    ensure_test_server/0, start_etap_server/0, test_server/1,
-    diag/1, diag/2, plan/1, end_tests/0, not_ok/2, ok/2, is/3, isnt/3,
-    any/3, none/3, fun_is/3, is_greater/3, skip/1, skip/2,
-    ensure_coverage_starts/0, ensure_coverage_ends/0, coverage_report/0,
-    datetime/1, skip/3, bail/0, bail/1
-]).
--record(test_state, {planned = 0, count = 0, pass = 0, fail = 0, skip = 0, skip_reason = ""}).
--vsn("0.3.4").
-
-%% @spec plan(N) -> Result
-%%       N = unknown | skip | {skip, string()} | integer()
-%%       Result = ok
-%% @doc Create a test plan and boot strap the test server.
-plan(unknown) ->
-    ensure_coverage_starts(),
-    ensure_test_server(),
-    etap_server ! {self(), plan, unknown},
-    ok;
-plan(skip) ->
-    io:format("1..0 # skip~n");
-plan({skip, Reason}) ->
-    io:format("1..0 # skip ~s~n", [Reason]);
-plan(N) when is_integer(N), N > 0 ->
-    ensure_coverage_starts(),
-    ensure_test_server(),
-    etap_server ! {self(), plan, N},
-    ok.
-
-%% @spec end_tests() -> ok
-%% @doc End the current test plan and output test results.
-%% @todo This should probably be done in the test_server process.
-end_tests() ->
-    ensure_coverage_ends(),
-    etap_server ! {self(), state},
-    State = receive X -> X end,
-    if
-        State#test_state.planned == -1 ->
-            io:format("1..~p~n", [State#test_state.count]);
-        true ->
-            ok
-    end,
-    case whereis(etap_server) of
-        undefined -> ok;
-        _ -> etap_server ! done, ok
-    end.
-
-%% @private
-ensure_coverage_starts() ->
-    case os:getenv("COVER") of
-        false -> ok;
-        _ ->
-            BeamDir = case os:getenv("COVER_BIN") of false -> "ebin"; X -> X end,
-            cover:compile_beam_directory(BeamDir)
-    end.
-
-%% @private
-%% @doc Attempts to write out any collected coverage data to the cover/
-%% directory. This function should not be called externally, but it could be.
-ensure_coverage_ends() ->
-    case os:getenv("COVER") of
-        false -> ok;
-        _ ->
-            filelib:ensure_dir("cover/"),
-            Name = lists:flatten([
-                io_lib:format("~.16b", [X]) || X <- binary_to_list(erlang:md5(
-                     term_to_binary({make_ref(), now()})
-                ))
-            ]),
-            cover:export("cover/" ++ Name ++ ".coverdata")
-    end.
-
-%% @spec coverage_report() -> ok
-%% @doc Use the cover module's covreage report builder to create code coverage
-%% reports from recently created coverdata files.
-coverage_report() ->
-    [cover:import(File) || File <- filelib:wildcard("cover/*.coverdata")],
-    lists:foreach(
-        fun(Mod) ->
-            cover:analyse_to_file(Mod, atom_to_list(Mod) ++ "_coverage.txt", [])
-        end,
-        cover:imported_modules()
-    ),
-    ok.
-
-bail() ->
-    bail("").
-
-bail(Reason) ->
-    etap_server ! {self(), diag, "Bail out! " ++ Reason},
-    ensure_coverage_ends(),
-    etap_server ! done, ok,
-    ok.
-
-
-%% @spec diag(S) -> ok
-%%       S = string()
-%% @doc Print a debug/status message related to the test suite.
-diag(S) -> etap_server ! {self(), diag, "# " ++ S}, ok.
-
-%% @spec diag(Format, Data) -> ok
-%%      Format = atom() | string() | binary()
-%%      Data = [term()]
-%%      UnicodeList = [Unicode]
-%%      Unicode = int()
-%% @doc Print a debug/status message related to the test suite.
-%% Function arguments are passed through io_lib:format/2.
-diag(Format, Data) -> diag(io_lib:format(Format, Data)).
-
-%% @spec ok(Expr, Desc) -> Result
-%%       Expr = true | false
-%%       Desc = string()
-%%       Result = true | false
-%% @doc Assert that a statement is true.
-ok(Expr, Desc) -> mk_tap(Expr == true, Desc).
-
-%% @spec not_ok(Expr, Desc) -> Result
-%%       Expr = true | false
-%%       Desc = string()
-%%       Result = true | false
-%% @doc Assert that a statement is false.
-not_ok(Expr, Desc) -> mk_tap(Expr == false, Desc).
-
-%% @spec is(Got, Expected, Desc) -> Result
-%%       Got = any()
-%%       Expected = any()
-%%       Desc = string()
-%%       Result = true | false
-%% @doc Assert that two values are the same.
-is(Got, Expected, Desc) ->
-    case mk_tap(Got == Expected, Desc) of
-        false ->
-            etap_server ! {self(), diag, "    ---"},
-            etap_server ! {self(), diag, io_lib:format("    description: ~p", [Desc])},
-            etap_server ! {self(), diag, io_lib:format("    found:       ~p", [Got])},
-            etap_server ! {self(), diag, io_lib:format("    wanted:      ~p", [Expected])},
-            etap_server ! {self(), diag, "    ..."},
-            false;
-        true -> true
-    end.
-
-%% @spec isnt(Got, Expected, Desc) -> Result
-%%       Got = any()
-%%       Expected = any()
-%%       Desc = string()
-%%       Result = true | false
-%% @doc Assert that two values are not the same.
-isnt(Got, Expected, Desc) -> mk_tap(Got /= Expected, Desc).
-
-%% @spec is_greater(ValueA, ValueB, Desc) -> Result
-%%       ValueA = number()
-%%       ValueB = number()
-%%       Desc = string()
-%%       Result = true | false
-%% @doc Assert that an integer is greater than another.
-is_greater(ValueA, ValueB, Desc) when is_integer(ValueA), is_integer(ValueB) ->
-    mk_tap(ValueA > ValueB, Desc).
-
-%% @spec any(Got, Items, Desc) -> Result
-%%       Got = any()
-%%       Items = [any()]
-%%       Desc = string()
-%%       Result = true | false
-%% @doc Assert that an item is in a list.
-any(Got, Items, Desc) ->
-    is(lists:member(Got, Items), true, Desc).
-
-%% @spec none(Got, Items, Desc) -> Result
-%%       Got = any()
-%%       Items = [any()]
-%%       Desc = string()
-%%       Result = true | false
-%% @doc Assert that an item is not in a list.
-none(Got, Items, Desc) ->
-    is(lists:member(Got, Items), false, Desc).
-
-%% @spec fun_is(Fun, Expected, Desc) -> Result
-%%       Fun = function()
-%%       Expected = any()
-%%       Desc = string()
-%%       Result = true | false
-%% @doc Use an anonymous function to assert a pattern match.
-fun_is(Fun, Expected, Desc) when is_function(Fun) ->
-    is(Fun(Expected), true, Desc).
-
-%% @equiv skip(TestFun, "")
-skip(TestFun) when is_function(TestFun) ->
-    skip(TestFun, "").
-
-%% @spec skip(TestFun, Reason) -> ok
-%%       TestFun = function()
-%%       Reason = string()
-%% @doc Skip a test.
-skip(TestFun, Reason) when is_function(TestFun), is_list(Reason) ->
-    begin_skip(Reason),
-    catch TestFun(),
-    end_skip(),
-    ok.
-
-%% @spec skip(Q, TestFun, Reason) -> ok
-%%       Q = true | false | function() 
-%%       TestFun = function()
-%%       Reason = string()
-%% @doc Skips a test conditionally. The first argument to this function can
-%% either be the 'true' or 'false' atoms or a function that returns 'true' or
-%% 'false'.
-skip(QFun, TestFun, Reason) when is_function(QFun), is_function(TestFun), is_list(Reason) ->
-    case QFun() of
-        true -> begin_skip(Reason), TestFun(), end_skip();
-        _ -> TestFun()
-    end,
-    ok;
-
-skip(Q, TestFun, Reason) when is_function(TestFun), is_list(Reason), Q == true ->
-    begin_skip(Reason),
-    TestFun(),
-    end_skip(),
-    ok;
-
-skip(_, TestFun, Reason) when is_function(TestFun), is_list(Reason) ->
-    TestFun(),
-    ok.
-
-%% @private
-begin_skip(Reason) ->
-    etap_server ! {self(), begin_skip, Reason}.
-
-%% @private
-end_skip() ->
-    etap_server ! {self(), end_skip}.
-
-% ---
-% Internal / Private functions
-
-%% @private
-%% @doc Start the etap_server process if it is not running already.
-ensure_test_server() ->
-    case whereis(etap_server) of
-        undefined ->
-            proc_lib:start(?MODULE, start_etap_server,[]);
-        _ ->
-            diag("The test server is already running.")
-    end.
-
-%% @private
-%% @doc Start the etap_server loop and register itself as the etap_server
-%% process.
-start_etap_server() ->
-    catch register(etap_server, self()),
-    proc_lib:init_ack(ok),
-    etap:test_server(#test_state{
-        planned = 0,
-        count = 0,
-        pass = 0,
-        fail = 0,
-        skip = 0,
-        skip_reason = ""
-    }).
-
-
-%% @private
-%% @doc The main etap_server receive/run loop. The etap_server receive loop
-%% responds to seven messages apperatining to failure or passing of tests.
-%% It is also used to initiate the testing process with the {_, plan, _}
-%% message that clears the current test state.
-test_server(State) ->
-    NewState = receive
-        {_From, plan, unknown} ->
-            io:format("# Current time local ~s~n", [datetime(erlang:localtime())]),
-            io:format("# Using etap version ~p~n", [ proplists:get_value(vsn, proplists:get_value(attributes, etap:module_info())) ]),
-            State#test_state{
-                planned = -1,
-                count = 0,
-                pass = 0,
-                fail = 0,
-                skip = 0,
-                skip_reason = ""
-            };
-        {_From, plan, N} ->
-            io:format("# Current time local ~s~n", [datetime(erlang:localtime())]),
-            io:format("# Using etap version ~p~n", [ proplists:get_value(vsn, proplists:get_value(attributes, etap:module_info())) ]),
-            io:format("1..~p~n", [N]),
-            State#test_state{
-                planned = N,
-                count = 0,
-                pass = 0,
-                fail = 0,
-                skip = 0,
-                skip_reason = ""
-            };
-        {_From, begin_skip, Reason} ->
-            State#test_state{
-                skip = 1,
-                skip_reason = Reason
-            };
-        {_From, end_skip} ->
-            State#test_state{
-                skip = 0,
-                skip_reason = ""
-            };
-        {_From, pass, Desc} ->
-            FullMessage = skip_diag(
-                " - " ++ Desc,
-                State#test_state.skip,
-                State#test_state.skip_reason
-            ),
-            io:format("ok ~p ~s~n", [State#test_state.count + 1, FullMessage]),
-            State#test_state{
-                count = State#test_state.count + 1,
-                pass = State#test_state.pass + 1
-            };
-            
-        {_From, fail, Desc} ->
-            FullMessage = skip_diag(
-                " - " ++ Desc,
-                State#test_state.skip,
-                State#test_state.skip_reason
-            ),
-            io:format("not ok ~p ~s~n", [State#test_state.count + 1, FullMessage]),
-            State#test_state{
-                count = State#test_state.count + 1,
-                fail = State#test_state.fail + 1
-            };
-        {From, state} ->
-            From ! State,
-            State;
-        {_From, diag, Message} ->
-            io:format("~s~n", [Message]),
-            State;
-        {From, count} ->
-            From ! State#test_state.count,
-            State;
-        {From, is_skip} ->
-            From ! State#test_state.skip,
-            State;
-        done ->
-            exit(normal)
-    end,
-    test_server(NewState).
-
-%% @private
-%% @doc Process the result of a test and send it to the etap_server process.
-mk_tap(Result, Desc) ->
-    IsSkip = lib:sendw(etap_server, is_skip),
-    case [IsSkip, Result] of
-        [_, true] ->
-            etap_server ! {self(), pass, Desc},
-            true;                        
-        [1, _] ->                        
-            etap_server ! {self(), pass, Desc},
-            true;                        
-        _ ->                             
-            etap_server ! {self(), fail, Desc},
-            false
-    end.
-
-%% @private
-%% @doc Format a date/time string.
-datetime(DateTime) ->
-    {{Year, Month, Day}, {Hour, Min, Sec}} = DateTime,
-    io_lib:format("~4.10.0B-~2.10.0B-~2.10.0B ~2.10.0B:~2.10.0B:~2.10.0B", [Year, Month, Day, Hour, Min, Sec]).
-
-%% @private
-%% @doc Craft an output message taking skip/todo into consideration.
-skip_diag(Message, 0, _) ->
-    Message;
-skip_diag(_Message, 1, "") ->
-    " # SKIP";
-skip_diag(_Message, 1, Reason) ->
-    " # SKIP : " ++ Reason.
diff --git a/src/etap/etap_application.erl b/src/etap/etap_application.erl
deleted file mode 100644
index 98b5275..0000000
--- a/src/etap/etap_application.erl
+++ /dev/null
@@ -1,72 +0,0 @@
-%% Copyright (c) 2008-2009 Nick Gerakines <nick at gerakines.net>
-%% 
-%% Permission is hereby granted, free of charge, to any person
-%% obtaining a copy of this software and associated documentation
-%% files (the "Software"), to deal in the Software without
-%% restriction, including without limitation the rights to use,
-%% copy, modify, merge, publish, distribute, sublicense, and/or sell
-%% copies of the Software, and to permit persons to whom the
-%% Software is furnished to do so, subject to the following
-%% conditions:
-%% 
-%% The above copyright notice and this permission notice shall be
-%% included in all copies or substantial portions of the Software.
-%% 
-%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-%% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-%% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-%% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-%% OTHER DEALINGS IN THE SOFTWARE.
-%%
-%% @author Nick Gerakines <nick at gerakines.net> [http://socklabs.com/]
-%% @copyright 2008 Nick Gerakines
-%% @reference http://testanything.org/wiki/index.php/Main_Page
-%% @reference http://en.wikipedia.org/wiki/Test_Anything_Protocol
-%% @todo Explain in documentation why we use a process to handle test input.
-%% @todo Add test to verify the number of members in a pg2 group.
-%% @doc Provide test functionality to the application and related behaviors.
--module(etap_application).
--export([
-    start_ok/2, ensure_loaded/3, load_ok/2,
-    pg2_group_exists/2, pg2_group_doesntexist/2
-]).
-
-%% @spec load_ok(string(), string()) -> true | false
-%% @doc Assert that an application can be loaded successfully.
-load_ok(AppName, Desc) ->
-    etap:ok(application:load(AppName) == ok, Desc).
-
-%% @spec start_ok(string(), string()) -> true | false
-%% @doc Assert that an application can be started successfully.
-start_ok(AppName, Desc) ->
-    etap:ok(application:start(AppName) == ok, Desc).
-
-%% @spec ensure_loaded(string(), string(), string()) -> true | false
-%% @doc Assert that an application has been loaded successfully.
-ensure_loaded(AppName, AppVsn, Desc) ->
-    etap:any(
-        fun(Match) -> case Match of {AppName, _, AppVsn} -> true; _ -> false end end,
-        application:loaded_applications(),
-        Desc
-    ).
-
-%% @spec pg2_group_exists(string(), string()) -> true | false
-%% @doc Assert that a pg2 group exists.
-pg2_group_exists(GroupName, Desc) ->
-    etap:any(
-        fun(Match) -> Match == GroupName end,
-        pg2:which_groups(),
-        Desc
-    ).
-
-%% @spec pg2_group_doesntexist(string(), string()) -> true | false
-%% @doc Assert that a pg2 group does not exists.
-pg2_group_doesntexist(GroupName, Desc) ->
-    etap:none(
-        fun(Match) -> Match == GroupName end,
-        pg2:which_groups(),
-        Desc
-    ).
diff --git a/src/etap/etap_can.erl b/src/etap/etap_can.erl
deleted file mode 100644
index 552b717..0000000
--- a/src/etap/etap_can.erl
+++ /dev/null
@@ -1,79 +0,0 @@
-%% Copyright (c) 2008-2009 Nick Gerakines <nick at gerakines.net>
-%% 
-%% Permission is hereby granted, free of charge, to any person
-%% obtaining a copy of this software and associated documentation
-%% files (the "Software"), to deal in the Software without
-%% restriction, including without limitation the rights to use,
-%% copy, modify, merge, publish, distribute, sublicense, and/or sell
-%% copies of the Software, and to permit persons to whom the
-%% Software is furnished to do so, subject to the following
-%% conditions:
-%% 
-%% The above copyright notice and this permission notice shall be
-%% included in all copies or substantial portions of the Software.
-%% 
-%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-%% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-%% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-%% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-%% OTHER DEALINGS IN THE SOFTWARE.
-%%
-%% @reference http://testanything.org/wiki/index.php/Main_Page
-%% @reference http://en.wikipedia.org/wiki/Test_Anything_Protocol
-%% @doc Provide test functionality modules
--module(etap_can).
-
--export([
-    loaded_ok/2, can_ok/2, can_ok/3,
-    has_attrib/2, is_attrib/3, is_behaviour/2
-]).
-
-%% @spec loaded_ok(atom(), string()) -> true | false
-%% @doc Assert that a module has been loaded successfully.
-loaded_ok(M, Desc) when is_atom(M) ->
-    etap:fun_is(fun({module, _}) -> true; (_) -> false end, code:load_file(M), Desc).
-
-%% @spec can_ok(atom(), atom()) -> true | false
-%% @doc Assert that a module exports a given function.
-can_ok(M, F) when is_atom(M), is_atom(F) ->
-    Matches = [X || {X, _} <- M:module_info(exports), X == F],
-    etap:ok(Matches > 0, lists:concat([M, " can ", F])).
-
-%% @spec can_ok(atom(), atom(), integer()) -> true | false
-%% @doc Assert that a module exports a given function with a given arity.
-can_ok(M, F, A) when is_atom(M); is_atom(F), is_number(A) ->
-    Matches = [X || X <- M:module_info(exports), X == {F, A}],
-    etap:ok(Matches > 0, lists:concat([M, " can ", F, "/", A])).
-
-%% @spec has_attrib(M, A) -> true | false
-%%       M = atom()
-%%       A = atom()
-%% @doc Asserts that a module has a given attribute.
-has_attrib(M, A) when is_atom(M), is_atom(A) ->
-    etap:isnt(
-        proplists:get_value(A, M:module_info(attributes), 'asdlkjasdlkads'),
-        'asdlkjasdlkads',
-        lists:concat([M, " has attribute ", A])
-    ).
-
-%% @spec has_attrib(M, A. V) -> true | false
-%%       M = atom()
-%%       A = atom()
-%%       V = any()
-%% @doc Asserts that a module has a given attribute with a given value.
-is_attrib(M, A, V) when is_atom(M) andalso is_atom(A) ->
-    etap:is(
-        proplists:get_value(A, M:module_info(attributes)),
-        [V],
-        lists:concat([M, "'s ", A, " is ", V])
-    ).
-
-%% @spec is_behavior(M, B) -> true | false
-%%       M = atom()
-%%       B = atom()
-%% @doc Asserts that a given module has a specific behavior.
-is_behaviour(M, B) when is_atom(M) andalso is_atom(B) ->
-    is_attrib(M, behaviour, B).
diff --git a/src/etap/etap_exception.erl b/src/etap/etap_exception.erl
deleted file mode 100644
index ba66072..0000000
--- a/src/etap/etap_exception.erl
+++ /dev/null
@@ -1,66 +0,0 @@
-%% Copyright (c) 2008-2009 Nick Gerakines <nick at gerakines.net>
-%% 
-%% Permission is hereby granted, free of charge, to any person
-%% obtaining a copy of this software and associated documentation
-%% files (the "Software"), to deal in the Software without
-%% restriction, including without limitation the rights to use,
-%% copy, modify, merge, publish, distribute, sublicense, and/or sell
-%% copies of the Software, and to permit persons to whom the
-%% Software is furnished to do so, subject to the following
-%% conditions:
-%% 
-%% The above copyright notice and this permission notice shall be
-%% included in all copies or substantial portions of the Software.
-%% 
-%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-%% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-%% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-%% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-%% OTHER DEALINGS IN THE SOFTWARE.
-%%
-%% @reference http://testanything.org/wiki/index.php/Main_Page
-%% @reference http://en.wikipedia.org/wiki/Test_Anything_Protocol
-%% @doc Adds exception based testing to the etap suite.
--module(etap_exception).
-
--export([dies_ok/2, lives_ok/2, throws_ok/3]).
-
-% ---
-% External / Public functions
-
-%% @doc Assert that an exception is raised when running a given function.
-dies_ok(F, Desc) ->
-    case (catch F()) of
-        {'EXIT', _} -> etap:ok(true, Desc);
-        _ -> etap:ok(false, Desc)
-    end.
-
-%% @doc Assert that an exception is not raised when running a given function.
-lives_ok(F, Desc) ->
-    etap:is(try_this(F), success, Desc).
-
-%% @doc Assert that the exception thrown by a function matches the given exception.
-throws_ok(F, Exception, Desc) ->
-    try F() of
-        _ -> etap:ok(nok, Desc)
-    catch
-        _:E ->
-            etap:is(E, Exception, Desc)
-    end.
-
-% ---
-% Internal / Private functions
-
-%% @private
-%% @doc Run a function and catch any exceptions.
-try_this(F) when is_function(F, 0) ->
-    try F() of
-        _ -> success
-    catch
-        throw:E -> {throw, E};
-        error:E -> {error, E};
-        exit:E -> {exit, E}
-    end.
diff --git a/src/etap/etap_process.erl b/src/etap/etap_process.erl
deleted file mode 100644
index 69f5ba0..0000000
--- a/src/etap/etap_process.erl
+++ /dev/null
@@ -1,42 +0,0 @@
-%% Copyright (c) 2008-2009 Nick Gerakines <nick at gerakines.net>
-%% 
-%% Permission is hereby granted, free of charge, to any person
-%% obtaining a copy of this software and associated documentation
-%% files (the "Software"), to deal in the Software without
-%% restriction, including without limitation the rights to use,
-%% copy, modify, merge, publish, distribute, sublicense, and/or sell
-%% copies of the Software, and to permit persons to whom the
-%% Software is furnished to do so, subject to the following
-%% conditions:
-%% 
-%% The above copyright notice and this permission notice shall be
-%% included in all copies or substantial portions of the Software.
-%% 
-%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-%% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-%% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-%% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-%% OTHER DEALINGS IN THE SOFTWARE.
-%%
-%% @doc Adds process/pid testing to the etap suite.
--module(etap_process).
-
--export([is_pid/2, is_alive/2, is_mfa/3]).
-
-% ---
-% External / Public functions
-
-%% @doc Assert that a given variable is a pid.
-is_pid(Pid, Desc) when is_pid(Pid) -> etap:ok(true, Desc);
-is_pid(_, Desc) -> etap:ok(false, Desc).
-
-%% @doc Assert that a given process/pid is alive.
-is_alive(Pid, Desc) ->
-    etap:ok(erlang:is_process_alive(Pid), Desc).
-
-%% @doc Assert that the current function of a pid is a given {M, F, A} tuple.
-is_mfa(Pid, MFA, Desc) ->
-    etap:is({current_function, MFA}, erlang:process_info(Pid, current_function), Desc).
diff --git a/src/etap/etap_report.erl b/src/etap/etap_report.erl
deleted file mode 100644
index 6d692fb..0000000
--- a/src/etap/etap_report.erl
+++ /dev/null
@@ -1,343 +0,0 @@
-%% Copyright (c) 2008-2009 Nick Gerakines <nick at gerakines.net>
-%% 
-%% Permission is hereby granted, free of charge, to any person
-%% obtaining a copy of this software and associated documentation
-%% files (the "Software"), to deal in the Software without
-%% restriction, including without limitation the rights to use,
-%% copy, modify, merge, publish, distribute, sublicense, and/or sell
-%% copies of the Software, and to permit persons to whom the
-%% Software is furnished to do so, subject to the following
-%% conditions:
-%% 
-%% The above copyright notice and this permission notice shall be
-%% included in all copies or substantial portions of the Software.
-%% 
-%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-%% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-%% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-%% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-%% OTHER DEALINGS IN THE SOFTWARE.
-%%
-%% @doc A module for creating nice looking code coverage reports.
--module(etap_report).
--export([create/0]).
-
-%% @spec create() -> ok
-%% @doc Create html code coverage reports for each module that code coverage
-%% data exists for.
-create() ->
-    [cover:import(File) || File <- filelib:wildcard("cover/*.coverdata")],
-    Modules = lists:foldl(
-        fun(Module, Acc) ->
-            [{Module, file_report(Module)} | Acc]
-        end,
-        [],
-        cover:imported_modules()
-    ),
-    index(Modules).
-
-%% @private
-index(Modules) ->
-    {ok, IndexFD} = file:open("cover/index.html", [write]),
-    io:format(IndexFD, "<html><head><style>
-    table.percent_graph { height: 12px; border:1px solid #E2E6EF; empty-cells: show; }
-    table.percent_graph td.covered { height: 10px; background: #00f000; }
-    table.percent_graph td.uncovered { height: 10px; background: #e00000; }
-    .odd { background-color: #ddd; }
-    .even { background-color: #fff; }
-    </style></head>", []),
-    io:format(IndexFD, "<body>", []),
-    lists:foldl(
-        fun({Module, {Good, Bad, Source}}, LastRow) ->
-            case {Good + Bad, Source} of
-                {0, _} -> LastRow;
-                {_, none} -> LastRow;
-                _ ->
-                    CovPer = round((Good / (Good + Bad)) * 100),
-                    UnCovPer = round((Bad / (Good + Bad)) * 100),
-                    RowClass = case LastRow of 1 -> "odd"; _ -> "even" end,
-                    io:format(IndexFD, "<div class=\"~s\">", [RowClass]),
-                    io:format(IndexFD, "<a href=\"~s\">~s</a>", [atom_to_list(Module) ++ "_report.html", atom_to_list(Module)]),
-                    io:format(IndexFD, "
-                    <table cellspacing='0' cellpadding='0' align='right'>
-                      <tr>
-                        <td><tt>~p%</tt>&nbsp;</td><td>
-                          <table cellspacing='0' class='percent_graph' cellpadding='0' width='100'>
-                          <tr><td class='covered' width='~p' /><td class='uncovered' width='~p' /></tr>
-                          </table>
-                        </td>
-                      </tr>
-                    </table>
-                    ", [CovPer, CovPer, UnCovPer]),
-                    io:format(IndexFD, "</div>", []),
-                    case LastRow of
-                        1 -> 0;
-                        0 -> 1
-                    end
-            end
-        end,
-        0,
-        lists:sort(Modules)
-    ),
-    {TotalGood, TotalBad} = lists:foldl(
-        fun({_, {Good, Bad, Source}}, {TGood, TBad}) ->
-            case Source of none -> {TGood, TBad}; _ -> {TGood + Good, TBad + Bad} end
-        end,
-        {0, 0},
-        Modules
-    ),
-    io:format(IndexFD, "<p>Generated on ~s.</p>~n", [etap:datetime({date(), time()})]),
-    case TotalGood + TotalBad of
-        0 -> ok;
-        _ ->
-            TotalCovPer = round((TotalGood / (TotalGood + TotalBad)) * 100),
-            TotalUnCovPer = round((TotalBad / (TotalGood + TotalBad)) * 100),
-            io:format(IndexFD, "<div>", []),
-            io:format(IndexFD, "Total 
-            <table cellspacing='0' cellpadding='0' align='right'>
-              <tr>
-                <td><tt>~p%</tt>&nbsp;</td><td>
-                  <table cellspacing='0' class='percent_graph' cellpadding='0' width='100'>
-                  <tr><td class='covered' width='~p' /><td class='uncovered' width='~p' /></tr>
-                  </table>
-                </td>
-              </tr>
-            </table>
-            ", [TotalCovPer, TotalCovPer, TotalUnCovPer]),
-            io:format(IndexFD, "</div>", [])
-    end,
-    io:format(IndexFD, "</body></html>", []),
-    file:close(IndexFD),
-    ok.
-
-%% @private
-file_report(Module) ->
-    {ok, Data} = cover:analyse(Module, calls, line),
-    Source = find_source(Module),
-    {Good, Bad} = collect_coverage(Data, {0, 0}),
-    case {Source, Good + Bad} of
-        {none, _} -> ok;
-        {_, 0} -> ok;
-        _ ->
-            {ok, SourceFD} = file:open(Source, [read]),
-            {ok, WriteFD} = file:open("cover/" ++ atom_to_list(Module) ++ "_report.html", [write]),
-            io:format(WriteFD, "~s", [header(Module, Good, Bad)]),
-            output_lines(Data, WriteFD, SourceFD, 1),
-            io:format(WriteFD, "~s", [footer()]),
-            file:close(WriteFD),
-            file:close(SourceFD),
-            ok
-    end,
-    {Good, Bad, Source}.
-
-%% @private
-collect_coverage([], Acc) -> Acc;
-collect_coverage([{{_, _}, 0} | Data], {Good, Bad}) ->
-    collect_coverage(Data, {Good, Bad + 1});
-collect_coverage([_ | Data], {Good, Bad}) ->
-    collect_coverage(Data, {Good + 1, Bad}).
-
-%% @private
-output_lines(Data, WriteFD, SourceFD, LineNumber) ->
-    {Match, NextData} = datas_match(Data, LineNumber),
-    case io:get_line(SourceFD, '') of
-        eof -> ok;
-        Line = "%% @todo" ++ _ ->
-            io:format(WriteFD, "~s", [out_line(LineNumber, highlight, Line)]),
-            output_lines(NextData, WriteFD, SourceFD, LineNumber + 1);
-        Line = "% " ++ _ ->
-            io:format(WriteFD, "~s", [out_line(LineNumber, none, Line)]),
-            output_lines(NextData, WriteFD, SourceFD, LineNumber + 1);
-        Line ->
-            case Match of
-                {true, CC} ->
-                    io:format(WriteFD, "~s", [out_line(LineNumber, CC, Line)]),
-                    output_lines(NextData, WriteFD, SourceFD, LineNumber + 1);
-                false ->
-                    io:format(WriteFD, "~s", [out_line(LineNumber, none, Line)]),
-                    output_lines(NextData, WriteFD, SourceFD, LineNumber + 1)
-            end
-    end.
-
-%% @private
-out_line(Number, none, Line) ->
-    PadNu = string:right(integer_to_list(Number), 5, $.),
-    io_lib:format("<span class=\"marked\"><a name=\"line~p\"></a>~s ~s</span>", [Number, PadNu, Line]);
-out_line(Number, highlight, Line) ->
-    PadNu = string:right(integer_to_list(Number), 5, $.),
-    io_lib:format("<span class=\"highlight\"><a name=\"line~p\"></a>~s ~s</span>", [Number, PadNu, Line]);
-out_line(Number, 0, Line) ->
-    PadNu = string:right(integer_to_list(Number), 5, $.),
-    io_lib:format("<span class=\"uncovered\"><a name=\"line~p\"></a>~s ~s</span>", [Number, PadNu, Line]);
-out_line(Number, _, Line) ->
-    PadNu = string:right(integer_to_list(Number), 5, $.),
-    io_lib:format("<span class=\"covered\"><a name=\"line~p\"></a>~s ~s</span>", [Number, PadNu, Line]).
-
-%% @private
-datas_match([], _) -> {false, []};
-datas_match([{{_, Line}, CC} | Datas], LineNumber) when Line == LineNumber -> {{true, CC}, Datas};
-datas_match(Data, _) -> {false, Data}.
-
-%% @private
-find_source(Module) when is_atom(Module) ->
-    Root = filename:rootname(Module),
-    Dir = filename:dirname(Root),
-    XDir = case os:getenv("SRC") of false -> "src"; X -> X end,
-    find_source([
-        filename:join([Dir, Root ++ ".erl"]),
-        filename:join([Dir, "..", "src", Root ++ ".erl"]),
-        filename:join([Dir, "src", Root ++ ".erl"]),
-        filename:join([Dir, "elibs", Root ++ ".erl"]),
-        filename:join([Dir, "..", "elibs", Root ++ ".erl"]),
-        filename:join([Dir, XDir, Root ++ ".erl"])
-    ]);
-find_source([]) -> none;
-find_source([Test | Tests]) ->
-    case filelib:is_file(Test) of
-        true -> Test;
-        false -> find_source(Tests)
-    end.
-
-%% @private
-header(Module, Good, Bad) ->
-    io:format("Good ~p~n", [Good]),
-    io:format("Bad ~p~n", [Bad]),
-    CovPer = round((Good / (Good + Bad)) * 100),
-    UnCovPer = round((Bad / (Good + Bad)) * 100),
-    io:format("CovPer ~p~n", [CovPer]),
-    io_lib:format("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
-        <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
-          <head>
-            <title>~s - C0 code coverage information</title>
-            <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style>
-            <style type='text/css'>span.marked0 {
-     background-color: rgb(185, 210, 200);
-     display: block;
-    }
-    span.marked { display: block; background-color: #ffffff; }
-    span.highlight { display: block; background-color: #fff9d7; }
-    span.covered { display: block; background-color: #f7f7f7 ; }
-    span.uncovered { display: block; background-color: #ffebe8 ; }
-    span.overview {
-     border-bottom: 1px solid #E2E6EF; 
-    }
-    div.overview {
-     border-bottom: 1px solid #E2E6EF; 
-    }
-    body {
-     font-family: verdana, arial, helvetica;
-    }
-    div.footer {
-     font-size: 68%;
-     margin-top: 1.5em;
-    }
-    h1, h2, h3, h4, h5, h6 {
-     margin-bottom: 0.5em;
-    }
-    h5 {
-     margin-top: 0.5em;
-    }
-    .hidden {
-     display: none;
-    }
-    div.separator {
-     height: 10px;
-    }
-    table.percent_graph {
-     height: 12px;
-     border: 1px solid #E2E6EF; 
-     empty-cells: show;
-    }
-    table.percent_graph td.covered {
-     height: 10px;
-     background: #00f000;
-    }
-    table.percent_graph td.uncovered {
-     height: 10px;
-     background: #e00000;
-    }
-    table.percent_graph td.NA {
-     height: 10px;
-     background: #eaeaea;
-    }
-    table.report {
-     border-collapse: collapse;
-     width: 100%;
-    }
-    table.report td.heading {
-     background: #dcecff;
-     border: 1px solid #E2E6EF; 
-     font-weight: bold;
-     text-align: center;
-    }
-    table.report td.heading:hover {
-     background: #c0ffc0;
-    }
-    table.report td.text {
-     border: 1px solid #E2E6EF; 
-    }
-    table.report td.value {
-     text-align: right;
-     border: 1px solid #E2E6EF; 
-    }
-    table.report tr.light {
-     background-color: rgb(240, 240, 245);
-    }
-    table.report tr.dark {
-     background-color: rgb(230, 230, 235);
-    }
-    </style>
-          </head>
-          <body>
-            <h3>C0 code coverage information</h3>
-            <p>Generated on ~s with <a href='http://github.com/ngerakines/etap'>etap 0.3.4</a>.
-            </p>            
-        <table class='report'>
-          <thead>
-            <tr>
-              <td class='heading'>Name</td>
-              <td class='heading'>Total lines</td>
-              <td class='heading'>Lines of code</td>
-              <td class='heading'>Total coverage</td>
-              <td class='heading'>Code coverage</td>
-            </tr>
-          </thead>
-          <tbody>
-            <tr class='light'>
-
-              <td>
-                <a href='~s'>~s</a>
-              </td>
-              <td class='value'>
-                <tt>??</tt>
-              </td>
-              <td class='value'>
-                <tt>??</tt>
-              </td>
-              <td class='value'>
-                <tt>??</tt>
-              </td>
-              <td>
-                <table cellspacing='0' cellpadding='0' align='right'>
-                  <tr>
-                    <td><tt>~p%</tt>&nbsp;</td><td>
-                      <table cellspacing='0' class='percent_graph' cellpadding='0' width='100'>
-                      <tr><td class='covered' width='~p' /><td class='uncovered' width='~p' /></tr>
-                      </table>
-                    </td>
-                  </tr>
-                </table>
-              </td>
-            </tr>
-          </tbody>
-        </table><pre>", [Module, etap:datetime({date(), time()}), atom_to_list(Module) ++ "_report.html", Module, CovPer, CovPer, UnCovPer]).
-
-%% @private
-footer() ->
-    "</pre><hr /><p>Generated using <a href='http://github.com/ngerakines/etap'>etap 0.3.4</a>.</p>
-          </body>
-        </html>
-    ".
diff --git a/src/etap/etap_request.erl b/src/etap/etap_request.erl
deleted file mode 100644
index 9fd23ac..0000000
--- a/src/etap/etap_request.erl
+++ /dev/null
@@ -1,89 +0,0 @@
-%% Copyright (c) 2008-2009 Nick Gerakines <nick at gerakines.net>
-%% 
-%% Permission is hereby granted, free of charge, to any person
-%% obtaining a copy of this software and associated documentation
-%% files (the "Software"), to deal in the Software without
-%% restriction, including without limitation the rights to use,
-%% copy, modify, merge, publish, distribute, sublicense, and/or sell
-%% copies of the Software, and to permit persons to whom the
-%% Software is furnished to do so, subject to the following
-%% conditions:
-%% 
-%% The above copyright notice and this permission notice shall be
-%% included in all copies or substantial portions of the Software.
-%% 
-%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-%% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-%% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-%% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-%% OTHER DEALINGS IN THE SOFTWARE.
-%%
-%% @doc Provides test functionality against a specific web request. Many of
-%% the exported methods can be used to build your own more complex tests.
--module(etap_request, [Method, Url, InHeaders, InBody, Status, OutHeaders, OutBody]).
-
--export([status_is/2]).
-
--export([
-    method/0, url/0, status/0, status_code/0, status_line/0, rheaders/0,
-    has_rheader/1, rheader/1, rbody/0, header_is/3, body_is/2,
-    body_has_string/2
-]).
-
-% ---
-% Tests
-
-%% @doc Assert that response status code is the given status code.
-status_is(Code, Desc) ->
-    etap:is(status_code(), Code, Desc).
-
-header_is(Name, Value, Desc) ->
-    etap:is(rheader(Name), Value, Desc).
-
-body_is(Value, Desc) ->
-    etap:is(rbody(), Value, Desc).
-
-body_has_string(String, Desc) when is_list(OutBody), is_list(String) ->
-    etap_string:contains_ok(OutBody, String, Desc).
-
-% ---
-% Accessor functions
-
-%% @doc Access a request's method.
-method() -> Method.
-
-%% @doc Access a request's URL.
-url() -> Url.
-
-%% @doc Access a request's status.
-status() -> Status.
-
-%% @doc Access a request's status code.
-status_code() ->
-    {_, Code, _} = Status,
-    Code.
-
-%% @doc Access a request's status line.
-status_line() ->
-    {_, _, Line} = Status,
-    Line.
-
-%% @doc Access a request's headers.
-rheaders() -> OutHeaders.
-
-%% @doc Dertermine if a specific request header exists.
-has_rheader(Key) ->
-    lists:keymember(Key, 1, OutHeaders).
-
-%% @doc Return a specific request header.
-rheader(Key) ->
-    case lists:keysearch(Key, 1, OutHeaders) of
-        false -> undefined;
-        {value, {Key, Value}} -> Value
-    end.
-
-%% @doc Access the request's body.
-rbody() -> OutBody.
diff --git a/src/etap/etap_string.erl b/src/etap/etap_string.erl
deleted file mode 100644
index 67aa3d5..0000000
--- a/src/etap/etap_string.erl
+++ /dev/null
@@ -1,47 +0,0 @@
-%% Copyright (c) 2008-2009 Nick Gerakines <nick at gerakines.net>
-%% 
-%% Permission is hereby granted, free of charge, to any person
-%% obtaining a copy of this software and associated documentation
-%% files (the "Software"), to deal in the Software without
-%% restriction, including without limitation the rights to use,
-%% copy, modify, merge, publish, distribute, sublicense, and/or sell
-%% copies of the Software, and to permit persons to whom the
-%% Software is furnished to do so, subject to the following
-%% conditions:
-%% 
-%% The above copyright notice and this permission notice shall be
-%% included in all copies or substantial portions of the Software.
-%% 
-%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-%% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-%% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-%% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-%% OTHER DEALINGS IN THE SOFTWARE.
-%%
-%% @author Nick Gerakines <nick at gerakines.net> [http://socklabs.com/]
-%% @copyright 2008 Nick Gerakines
-%% @doc Provide testing functionality for strings.
--module(etap_string).
-
--export([contains_ok/3, is_before/4]).
-
-%% @spec contains_ok(string(), string(), string()) -> true | false
-%% @doc Assert that a string is contained in another string.
-contains_ok(Source, String, Desc) ->
-    etap:isnt(
-        string:str(Source, String),
-        0,
-        Desc
-    ).
-
-%% @spec is_before(string(), string(), string(), string()) -> true | false
-%% @doc Assert that a string comes before another string within a larger body.
-is_before(Source, StringA, StringB, Desc) ->
-    etap:is_greater(
-        string:str(Source, StringB),
-        string:str(Source, StringA),
-        Desc
-    ).
diff --git a/src/etap/etap_web.erl b/src/etap/etap_web.erl
deleted file mode 100644
index fb7aee1..0000000
--- a/src/etap/etap_web.erl
+++ /dev/null
@@ -1,65 +0,0 @@
-%% Copyright (c) 2008-2009 Nick Gerakines <nick at gerakines.net>
-%% 
-%% Permission is hereby granted, free of charge, to any person
-%% obtaining a copy of this software and associated documentation
-%% files (the "Software"), to deal in the Software without
-%% restriction, including without limitation the rights to use,
-%% copy, modify, merge, publish, distribute, sublicense, and/or sell
-%% copies of the Software, and to permit persons to whom the
-%% Software is furnished to do so, subject to the following
-%% conditions:
-%% 
-%% The above copyright notice and this permission notice shall be
-%% included in all copies or substantial portions of the Software.
-%% 
-%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-%% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-%% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-%% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-%% OTHER DEALINGS IN THE SOFTWARE.
-%%
-%% @author Nick Gerakines <nick at gerakines.net> [http://socklabs.com/]
-%% @copyright 2008 Nick Gerakines
-%% @todo Support cookies.
-%% @doc Provide testing functionality for web requests.
--module(etap_web).
-
--export([simple_200/2, simple_404/2, build_request/4]).
-
-%% @doc Fetch a url and verify that it returned a 200 status.
-simple_200(Url, Desc) ->
-    Request = build_request(get, Url, [], []),
-    Request:status_is(200, Desc).
-
-%% @doc Fetch a url and verify that it returned a 404 status.
-simple_404(Url, Desc) ->
-    Request = build_request(get, Url, [], []),
-    Request:status_is(404, Desc).
-
-%% @doc Create and return a request structure.
-build_request(Method, Url, Headers, Body) 
- when Method==options;Method==get;Method==head;Method==delete;Method==trace ->
-     try http:request(Method, {Url, Headers}, [{autoredirect, false}], []) of
-        {ok, {OutStatus, OutHeaders, OutBody}} ->
-            etap_request:new(Method, Url, Headers, Body, OutStatus, OutHeaders, OutBody);
-        _ -> error
-    catch
-        _:_ -> error
-    end;
-
-%% @doc Create and return a request structure.
-build_request(Method, Url, Headers, Body) when Method == post; Method == put ->
-    ContentType = case lists:keysearch("Content-Type", 1, Headers) of
-        {value, {"Content-Type", X}} -> X;
-        _ -> []
-    end,
-    try http:request(Method, {Url, Headers, ContentType, Body}, [{autoredirect, false}], []) of
-        {ok, {OutStatus, OutHeaders, OutBody}} ->
-            etap_request:new(Method, Url, Headers, Body, OutStatus, OutHeaders, OutBody);
-        _ -> error
-    catch
-        _:_ -> error
-    end.
diff --git a/test/etap/test_util.erl.in b/test/etap/test_util.erl.in
index 79b0417..c57d7a8 100644
--- a/test/etap/test_util.erl.in
+++ b/test/etap/test_util.erl.in
@@ -22,7 +22,7 @@ builddir() ->
     "@abs_top_builddir@".
 
 init_code_path() ->
-    Paths = ["etap", "couchdb", "ibrowse", "mochiweb"],
+    Paths = ["couchdb", "ibrowse", "mochiweb"],
     lists:foreach(fun(Name) ->
         code:add_pathz(filename:join([builddir(), "src", Name]))
     end, Paths).
-- 
1.7.1.1


couchdb0.11.1-0005-Remove-bundled-mochiweb-library.patch:
 b/configure                             |    3 
 b/configure.ac                          |    1 
 b/src/Makefile.am                       |    2 
 b/src/Makefile.in                       |    2 
 b/test/etap/test_util.erl.in            |    3 
 src/mochiweb/Makefile.am                |   80 --
 src/mochiweb/Makefile.in                |  515 ------------------
 src/mochiweb/mochifmt.erl               |  426 ---------------
 src/mochiweb/mochifmt_records.erl       |   30 -
 src/mochiweb/mochifmt_std.erl           |   23 
 src/mochiweb/mochihex.erl               |   75 --
 src/mochiweb/mochijson.erl              |  528 ------------------
 src/mochiweb/mochijson2.erl             |  660 -----------------------
 src/mochiweb/mochinum.erl               |  289 ----------
 src/mochiweb/mochiweb.app.in            |   32 -
 src/mochiweb/mochiweb.erl               |  110 ---
 src/mochiweb/mochiweb_app.erl           |   20 
 src/mochiweb/mochiweb_charref.erl       |  295 ----------
 src/mochiweb/mochiweb_cookies.erl       |  257 ---------
 src/mochiweb/mochiweb_echo.erl          |   31 -
 src/mochiweb/mochiweb_headers.erl       |  251 --------
 src/mochiweb/mochiweb_html.erl          |  893 --------------------------------
 src/mochiweb/mochiweb_http.erl          |  152 -----
 src/mochiweb/mochiweb_multipart.erl     |  530 ------------------
 src/mochiweb/mochiweb_request.erl       |  867 -------------------------------
 src/mochiweb/mochiweb_response.erl      |   56 --
 src/mochiweb/mochiweb_skel.erl          |   73 --
 src/mochiweb/mochiweb_socket_server.erl |  248 --------
 src/mochiweb/mochiweb_sup.erl           |   34 -
 src/mochiweb/mochiweb_util.erl          |  859 ------------------------------
 src/mochiweb/reloader.erl               |  123 ----
 31 files changed, 3 insertions(+), 7465 deletions(-)

--- NEW FILE couchdb0.11.1-0005-Remove-bundled-mochiweb-library.patch ---
>From d50c76c16a6e1a2fa55cfdbaa4fc4211d3d8e495 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov at gmail.com>
Date: Wed, 14 Jul 2010 18:01:45 +0400
Subject: [PATCH 5/9] Remove bundled mochiweb library

---
 configure                               |    3 -
 configure.ac                            |    1 -
 src/Makefile.am                         |    2 +-
 src/Makefile.in                         |    2 +-
 src/mochiweb/Makefile.am                |   80 ---
 src/mochiweb/Makefile.in                |  515 ------------------
 src/mochiweb/mochifmt.erl               |  426 ---------------
 src/mochiweb/mochifmt_records.erl       |   30 -
 src/mochiweb/mochifmt_std.erl           |   23 -
 src/mochiweb/mochihex.erl               |   75 ---
 src/mochiweb/mochijson.erl              |  528 ------------------
 src/mochiweb/mochijson2.erl             |  660 -----------------------
 src/mochiweb/mochinum.erl               |  289 ----------
 src/mochiweb/mochiweb.app.in            |   32 --
 src/mochiweb/mochiweb.erl               |  110 ----
 src/mochiweb/mochiweb_app.erl           |   20 -
 src/mochiweb/mochiweb_charref.erl       |  295 ----------
 src/mochiweb/mochiweb_cookies.erl       |  257 ---------
 src/mochiweb/mochiweb_echo.erl          |   31 --
 src/mochiweb/mochiweb_headers.erl       |  251 ---------
 src/mochiweb/mochiweb_html.erl          |  893 -------------------------------
 src/mochiweb/mochiweb_http.erl          |  152 ------
 src/mochiweb/mochiweb_multipart.erl     |  530 ------------------
 src/mochiweb/mochiweb_request.erl       |  867 ------------------------------
 src/mochiweb/mochiweb_response.erl      |   56 --
 src/mochiweb/mochiweb_skel.erl          |   73 ---
 src/mochiweb/mochiweb_socket_server.erl |  248 ---------
 src/mochiweb/mochiweb_sup.erl           |   34 --
 src/mochiweb/mochiweb_util.erl          |  859 -----------------------------
 src/mochiweb/reloader.erl               |  123 -----
 test/etap/test_util.erl.in              |    2 +-
 31 files changed, 3 insertions(+), 7464 deletions(-)
 delete mode 100644 src/mochiweb/Makefile.am
 delete mode 100644 src/mochiweb/Makefile.in
 delete mode 100644 src/mochiweb/mochifmt.erl
 delete mode 100644 src/mochiweb/mochifmt_records.erl
 delete mode 100644 src/mochiweb/mochifmt_std.erl
 delete mode 100644 src/mochiweb/mochihex.erl
 delete mode 100644 src/mochiweb/mochijson.erl
 delete mode 100644 src/mochiweb/mochijson2.erl
 delete mode 100644 src/mochiweb/mochinum.erl
 delete mode 100644 src/mochiweb/mochiweb.app.in
 delete mode 100644 src/mochiweb/mochiweb.erl
 delete mode 100644 src/mochiweb/mochiweb_app.erl
 delete mode 100644 src/mochiweb/mochiweb_charref.erl
 delete mode 100644 src/mochiweb/mochiweb_cookies.erl
 delete mode 100644 src/mochiweb/mochiweb_echo.erl
 delete mode 100644 src/mochiweb/mochiweb_headers.erl
 delete mode 100644 src/mochiweb/mochiweb_html.erl
 delete mode 100644 src/mochiweb/mochiweb_http.erl
 delete mode 100644 src/mochiweb/mochiweb_multipart.erl
 delete mode 100644 src/mochiweb/mochiweb_request.erl
 delete mode 100644 src/mochiweb/mochiweb_response.erl
 delete mode 100644 src/mochiweb/mochiweb_skel.erl
 delete mode 100644 src/mochiweb/mochiweb_socket_server.erl
 delete mode 100644 src/mochiweb/mochiweb_sup.erl
 delete mode 100644 src/mochiweb/mochiweb_util.erl
 delete mode 100644 src/mochiweb/reloader.erl

diff --git a/configure b/configure
index 68c8db9..b71f364 100755
--- a/configure
+++ b/configure
@@ -12263,8 +12263,6 @@ ac_config_files="$ac_config_files src/couchdb/priv/Makefile"
 
 ac_config_files="$ac_config_files src/ibrowse/Makefile"
 
-ac_config_files="$ac_config_files src/mochiweb/Makefile"
-
 ac_config_files="$ac_config_files test/Makefile"
 
 ac_config_files="$ac_config_files test/bench/Makefile"
@@ -13287,7 +13285,6 @@ do
     "src/couchdb/Makefile") CONFIG_FILES="$CONFIG_FILES src/couchdb/Makefile" ;;
     "src/couchdb/priv/Makefile") CONFIG_FILES="$CONFIG_FILES src/couchdb/priv/Makefile" ;;
     "src/ibrowse/Makefile") CONFIG_FILES="$CONFIG_FILES src/ibrowse/Makefile" ;;
-    "src/mochiweb/Makefile") CONFIG_FILES="$CONFIG_FILES src/mochiweb/Makefile" ;;
     "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
     "test/bench/Makefile") CONFIG_FILES="$CONFIG_FILES test/bench/Makefile" ;;
     "test/etap/Makefile") CONFIG_FILES="$CONFIG_FILES test/etap/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index e9375be..b5a19ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -388,7 +388,6 @@ AC_CONFIG_FILES([src/couchdb/couch.app.tpl])
 AC_CONFIG_FILES([src/couchdb/Makefile])
 AC_CONFIG_FILES([src/couchdb/priv/Makefile])
 AC_CONFIG_FILES([src/ibrowse/Makefile])
-AC_CONFIG_FILES([src/mochiweb/Makefile])
 AC_CONFIG_FILES([test/Makefile])
 AC_CONFIG_FILES([test/bench/Makefile])
 AC_CONFIG_FILES([test/etap/Makefile])
diff --git a/src/Makefile.am b/src/Makefile.am
index 19a5d20..5a6646f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,4 +10,4 @@
 ## License for the specific language governing permissions and limitations under
 ## the License.
 
-SUBDIRS = couchdb ibrowse mochiweb
+SUBDIRS = couchdb ibrowse
diff --git a/src/Makefile.in b/src/Makefile.in
index ae1b828..2d11fc8 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -248,7 +248,7 @@ version_minor = @version_minor@
 version_release = @version_release@
 version_revision = @version_revision@
 version_stage = @version_stage@
-SUBDIRS = couchdb ibrowse mochiweb
+SUBDIRS = couchdb ibrowse
 all: all-recursive
 
 .SUFFIXES:
diff --git a/src/mochiweb/Makefile.am b/src/mochiweb/Makefile.am
deleted file mode 100644
index c191abf..0000000
--- a/src/mochiweb/Makefile.am
+++ /dev/null
@@ -1,80 +0,0 @@
-## Licensed under the Apache License, Version 2.0 (the "License"); you may not
-## use this file except in compliance with the License. You may obtain a copy of
-## the License at
-##
-##   http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-## License for the specific language governing permissions and limitations under
-## the License.
-
-mochiwebebindir = $(localerlanglibdir)/mochiweb-r113/ebin
-
-mochiweb_file_collection = \
-    mochifmt.erl \
-    mochifmt_records.erl \
-    mochifmt_std.erl \
-    mochihex.erl \
-    mochijson.erl \
-    mochijson2.erl \
-    mochinum.erl \
-	mochiweb.app.in \
-    mochiweb.erl \
-    mochiweb_app.erl \
-    mochiweb_charref.erl \
-    mochiweb_cookies.erl \
-    mochiweb_echo.erl \
-    mochiweb_headers.erl \
-    mochiweb_html.erl \
-    mochiweb_http.erl \
-    mochiweb_multipart.erl \
-    mochiweb_request.erl \
-    mochiweb_response.erl \
-    mochiweb_skel.erl \
-    mochiweb_socket_server.erl \
-    mochiweb_sup.erl \
-    mochiweb_util.erl \
-    reloader.erl
-
-mochiwebebin_make_generated_file_list = \
-    mochifmt.beam \
-    mochifmt_records.beam \
-    mochifmt_std.beam \
-    mochihex.beam \
-    mochijson.beam \
-    mochijson2.beam \
-    mochinum.beam \
-	mochiweb.app \
-    mochiweb.beam \
-    mochiweb_app.beam \
-    mochiweb_charref.beam \
-    mochiweb_cookies.beam \
-    mochiweb_echo.beam \
-    mochiweb_headers.beam \
-    mochiweb_html.beam \
-    mochiweb_http.beam \
-    mochiweb_multipart.beam \
-    mochiweb_request.beam \
-    mochiweb_response.beam \
-    mochiweb_skel.beam \
-    mochiweb_socket_server.beam \
-    mochiweb_sup.beam \
-    mochiweb_util.beam \
-    reloader.beam
-
-mochiwebebin_DATA = \
-    $(mochiwebebin_make_generated_file_list)
-
-EXTRA_DIST =  \
-    $(mochiweb_file_collection)
-
[...7351 lines suppressed...]
-        [{"gzip", 0.2}, {"deflate", 1.0}, {"deflate", 1.0}],
-        ["gzip", "deflate", "identity"],
-        "identity"
-    ),
-    ["deflate", "gzip", "gzip", "identity"] = pick_accepted_encodings(
-        [{"gzip", 0.2}, {"deflate", 1.0}, {"gzip", 1.0}],
-        ["gzip", "deflate", "identity"],
-        "identity"
-    ),
-    ["gzip", "deflate", "gzip", "identity"] = pick_accepted_encodings(
-        [{"gzip", 0.2}, {"deflate", 0.9}, {"gzip", 1.0}],
-        ["gzip", "deflate", "identity"],
-        "identity"
-    ),
-    [] = pick_accepted_encodings(
-        [{"*", 0.0}],
-        ["gzip", "deflate", "identity"],
-        "identity"
-    ),
-    ["gzip", "deflate", "identity"] = pick_accepted_encodings(
-        [{"*", 1.0}],
-        ["gzip", "deflate", "identity"],
-        "identity"
-    ),
-    ["gzip", "deflate", "identity"] = pick_accepted_encodings(
-        [{"*", 0.6}],
-        ["gzip", "deflate", "identity"],
-        "identity"
-    ),
-    ["gzip"] = pick_accepted_encodings(
-        [{"gzip", 1.0}, {"*", 0.0}],
-        ["gzip", "deflate", "identity"],
-        "identity"
-    ),
-    ["gzip", "deflate"] = pick_accepted_encodings(
-        [{"gzip", 1.0}, {"deflate", 0.6}, {"*", 0.0}],
-        ["gzip", "deflate", "identity"],
-        "identity"
-    ),
-    ["deflate", "gzip"] = pick_accepted_encodings(
-        [{"gzip", 0.5}, {"deflate", 1.0}, {"*", 0.0}],
-        ["gzip", "deflate", "identity"],
-        "identity"
-    ),
-    ["gzip", "identity"] = pick_accepted_encodings(
-        [{"deflate", 0.0}, {"*", 1.0}],
-        ["gzip", "deflate", "identity"],
-        "identity"
-    ),
-    ["gzip", "identity"] = pick_accepted_encodings(
-        [{"*", 1.0}, {"deflate", 0.0}],
-        ["gzip", "deflate", "identity"],
-        "identity"
-    ),
-    ok.
diff --git a/src/mochiweb/reloader.erl b/src/mochiweb/reloader.erl
deleted file mode 100644
index 6835f8f..0000000
--- a/src/mochiweb/reloader.erl
+++ /dev/null
@@ -1,123 +0,0 @@
-%% @copyright 2007 Mochi Media, Inc.
-%% @author Matthew Dempsky <matthew at mochimedia.com>
-%%
-%% @doc Erlang module for automatically reloading modified modules
-%% during development.
-
--module(reloader).
--author("Matthew Dempsky <matthew at mochimedia.com>").
-
--include_lib("kernel/include/file.hrl").
-
--behaviour(gen_server).
--export([start/0, start_link/0]).
--export([stop/0]).
--export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-
--record(state, {last, tref}).
-
-%% External API
-
-%% @spec start() -> ServerRet
-%% @doc Start the reloader.
-start() ->
-    gen_server:start({local, ?MODULE}, ?MODULE, [], []).
-
-%% @spec start_link() -> ServerRet
-%% @doc Start the reloader.
-start_link() ->
-    gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
-
-%% @spec stop() -> ok
-%% @doc Stop the reloader.
-stop() ->
-    gen_server:call(?MODULE, stop).
-
-%% gen_server callbacks
-
-%% @spec init([]) -> {ok, State}
-%% @doc gen_server init, opens the server in an initial state.
-init([]) ->
-    {ok, TRef} = timer:send_interval(timer:seconds(1), doit),
-    {ok, #state{last = stamp(), tref = TRef}}.
-
-%% @spec handle_call(Args, From, State) -> tuple()
-%% @doc gen_server callback.
-handle_call(stop, _From, State) ->
-    {stop, shutdown, stopped, State};
-handle_call(_Req, _From, State) ->
-    {reply, {error, badrequest}, State}.
-
-%% @spec handle_cast(Cast, State) -> tuple()
-%% @doc gen_server callback.
-handle_cast(_Req, State) ->
-    {noreply, State}.
-
-%% @spec handle_info(Info, State) -> tuple()
-%% @doc gen_server callback.
-handle_info(doit, State) ->
-    Now = stamp(),
-    doit(State#state.last, Now),
-    {noreply, State#state{last = Now}};
-handle_info(_Info, State) ->
-    {noreply, State}.
-
-%% @spec terminate(Reason, State) -> ok
-%% @doc gen_server termination callback.
-terminate(_Reason, State) ->
-    {ok, cancel} = timer:cancel(State#state.tref),
-    ok.
-
-
-%% @spec code_change(_OldVsn, State, _Extra) -> State
-%% @doc gen_server code_change callback (trivial).
-code_change(_Vsn, State, _Extra) ->
-    {ok, State}.
-
-%% Internal API
-
-doit(From, To) ->
-    [case file:read_file_info(Filename) of
-         {ok, #file_info{mtime = Mtime}} when Mtime >= From, Mtime < To ->
-             reload(Module);
-         {ok, _} ->
-             unmodified;
-         {error, enoent} ->
-             %% The Erlang compiler deletes existing .beam files if
-             %% recompiling fails.  Maybe it's worth spitting out a
-             %% warning here, but I'd want to limit it to just once.
-             gone;
-         {error, Reason} ->
-             io:format("Error reading ~s's file info: ~p~n",
-                       [Filename, Reason]),
-             error
-     end || {Module, Filename} <- code:all_loaded(), is_list(Filename)].
-
-reload(Module) ->
-    io:format("Reloading ~p ...", [Module]),
-    code:purge(Module),
-    case code:load_file(Module) of
-        {module, Module} ->
-            io:format(" ok.~n"),
-            case erlang:function_exported(Module, test, 0) of
-                true ->
-                    io:format(" - Calling ~p:test() ...", [Module]),
-                    case catch Module:test() of
-                        ok ->
-                            io:format(" ok.~n"),
-                            reload;
-                        Reason ->
-                            io:format(" fail: ~p.~n", [Reason]),
-                            reload_but_test_failed
-                    end;
-                false ->
-                    reload
-            end;
-        {error, Reason} ->
-            io:format(" fail: ~p.~n", [Reason]),
-            error
-    end.
-
-
-stamp() ->
-    erlang:localtime().
diff --git a/test/etap/test_util.erl.in b/test/etap/test_util.erl.in
index c57d7a8..948958c 100644
--- a/test/etap/test_util.erl.in
+++ b/test/etap/test_util.erl.in
@@ -22,7 +22,7 @@ builddir() ->
     "@abs_top_builddir@".
 
 init_code_path() ->
-    Paths = ["couchdb", "ibrowse", "mochiweb"],
+    Paths = ["couchdb", "ibrowse"],
     lists:foreach(fun(Name) ->
         code:add_pathz(filename:join([builddir(), "src", Name]))
     end, Paths).
-- 
1.7.1.1


couchdb0.11.1-0006-Remove-bundled-ibrowse-library.patch:
 b/configure                         |    3 
 b/configure.ac                      |    1 
 b/src/Makefile.am                   |    2 
 b/src/Makefile.in                   |    2 
 b/test/etap/test_util.erl.in        |    3 
 src/ibrowse/Makefile.am             |   49 -
 src/ibrowse/Makefile.in             |  484 -----------
 src/ibrowse/ibrowse.app.in          |   13 
 src/ibrowse/ibrowse.erl             |  760 ------------------
 src/ibrowse/ibrowse.hrl             |   12 
 src/ibrowse/ibrowse_app.erl         |   64 -
 src/ibrowse/ibrowse_http_client.erl | 1476 ------------------------------------
 src/ibrowse/ibrowse_lb.erl          |  216 -----
 src/ibrowse/ibrowse_lib.erl         |  399 ---------
 src/ibrowse/ibrowse_sup.erl         |   65 -
 src/ibrowse/ibrowse_test.erl        |  377 ---------
 16 files changed, 3 insertions(+), 3923 deletions(-)

--- NEW FILE couchdb0.11.1-0006-Remove-bundled-ibrowse-library.patch ---
>From 71f19d084c5656ed2267dcacb7b4904c92103398 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov at gmail.com>
Date: Wed, 14 Jul 2010 18:03:33 +0400
Subject: [PATCH 6/9] Remove bundled ibrowse library

---
 configure                           |    3 -
 configure.ac                        |    1 -
 src/Makefile.am                     |    2 +-
 src/Makefile.in                     |    2 +-
 src/ibrowse/Makefile.am             |   49 --
 src/ibrowse/Makefile.in             |  484 ------------
 src/ibrowse/ibrowse.app.in          |   13 -
 src/ibrowse/ibrowse.erl             |  760 ------------------
 src/ibrowse/ibrowse.hrl             |   12 -
 src/ibrowse/ibrowse_app.erl         |   64 --
 src/ibrowse/ibrowse_http_client.erl | 1476 -----------------------------------
 src/ibrowse/ibrowse_lb.erl          |  216 -----
 src/ibrowse/ibrowse_lib.erl         |  399 ----------
 src/ibrowse/ibrowse_sup.erl         |   65 --
 src/ibrowse/ibrowse_test.erl        |  377 ---------
 test/etap/test_util.erl.in          |    2 +-
 16 files changed, 3 insertions(+), 3922 deletions(-)
 delete mode 100644 src/ibrowse/Makefile.am
 delete mode 100644 src/ibrowse/Makefile.in
 delete mode 100644 src/ibrowse/ibrowse.app.in
 delete mode 100644 src/ibrowse/ibrowse.erl
 delete mode 100644 src/ibrowse/ibrowse.hrl
 delete mode 100644 src/ibrowse/ibrowse_app.erl
 delete mode 100644 src/ibrowse/ibrowse_http_client.erl
 delete mode 100644 src/ibrowse/ibrowse_lb.erl
 delete mode 100644 src/ibrowse/ibrowse_lib.erl
 delete mode 100644 src/ibrowse/ibrowse_sup.erl
 delete mode 100644 src/ibrowse/ibrowse_test.erl

diff --git a/configure b/configure
index b71f364..94303b9 100755
--- a/configure
+++ b/configure
@@ -12261,8 +12261,6 @@ ac_config_files="$ac_config_files src/couchdb/Makefile"
 
 ac_config_files="$ac_config_files src/couchdb/priv/Makefile"
 
-ac_config_files="$ac_config_files src/ibrowse/Makefile"
-
 ac_config_files="$ac_config_files test/Makefile"
 
 ac_config_files="$ac_config_files test/bench/Makefile"
@@ -13284,7 +13282,6 @@ do
     "src/couchdb/couch.app.tpl") CONFIG_FILES="$CONFIG_FILES src/couchdb/couch.app.tpl" ;;
     "src/couchdb/Makefile") CONFIG_FILES="$CONFIG_FILES src/couchdb/Makefile" ;;
     "src/couchdb/priv/Makefile") CONFIG_FILES="$CONFIG_FILES src/couchdb/priv/Makefile" ;;
-    "src/ibrowse/Makefile") CONFIG_FILES="$CONFIG_FILES src/ibrowse/Makefile" ;;
     "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
     "test/bench/Makefile") CONFIG_FILES="$CONFIG_FILES test/bench/Makefile" ;;
     "test/etap/Makefile") CONFIG_FILES="$CONFIG_FILES test/etap/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index b5a19ef..f867060 100644
--- a/configure.ac
+++ b/configure.ac
@@ -387,7 +387,6 @@ AC_CONFIG_FILES([src/Makefile])
 AC_CONFIG_FILES([src/couchdb/couch.app.tpl])
 AC_CONFIG_FILES([src/couchdb/Makefile])
 AC_CONFIG_FILES([src/couchdb/priv/Makefile])
-AC_CONFIG_FILES([src/ibrowse/Makefile])
 AC_CONFIG_FILES([test/Makefile])
 AC_CONFIG_FILES([test/bench/Makefile])
 AC_CONFIG_FILES([test/etap/Makefile])
diff --git a/src/Makefile.am b/src/Makefile.am
index 5a6646f..753b177 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,4 +10,4 @@
 ## License for the specific language governing permissions and limitations under
 ## the License.
 
-SUBDIRS = couchdb ibrowse
+SUBDIRS = couchdb
diff --git a/src/Makefile.in b/src/Makefile.in
index 2d11fc8..93c5f43 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -248,7 +248,7 @@ version_minor = @version_minor@
 version_release = @version_release@
 version_revision = @version_revision@
 version_stage = @version_stage@
-SUBDIRS = couchdb ibrowse
+SUBDIRS = couchdb
 all: all-recursive
 
 .SUFFIXES:
diff --git a/src/ibrowse/Makefile.am b/src/ibrowse/Makefile.am
deleted file mode 100644
index 510f36a..0000000
--- a/src/ibrowse/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-## Licensed under the Apache License, Version 2.0 (the "License"); you may not
-## use this file except in compliance with the License. You may obtain a copy of
-## the License at
-##
-##   http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-## License for the specific language governing permissions and limitations under
-## the License.
-
-ibrowseebindir = $(localerlanglibdir)/ibrowse-1.5.2/ebin
-
-ibrowse_file_collection = \
-	ibrowse.app.in \
-    ibrowse.erl \
-    ibrowse_app.erl \
-    ibrowse_http_client.erl \
-    ibrowse_lb.erl \
-    ibrowse_lib.erl \
-    ibrowse_sup.erl \
-    ibrowse_test.erl
-
-ibrowseebin_make_generated_file_list = \
-	ibrowse.app \
-    ibrowse.beam \
-    ibrowse_app.beam \
-    ibrowse_http_client.beam \
-    ibrowse_lb.beam \
-    ibrowse_lib.beam \
-    ibrowse_sup.beam \
-    ibrowse_test.beam
-
-ibrowseebin_DATA = \
-    $(ibrowseebin_make_generated_file_list)
-
-EXTRA_DIST =  \
-    $(ibrowse_file_collection) \
-    ibrowse.hrl
-
-CLEANFILES = \
-    $(ibrowseebin_make_generated_file_list)
-
-%.app: %.app.in
-	cp $< $@
-
-%.beam: %.erl
-	$(ERLC) $(ERLC_FLAGS) $<
diff --git a/src/ibrowse/Makefile.in b/src/ibrowse/Makefile.in
deleted file mode 100644
index 47581bc..0000000
--- a/src/ibrowse/Makefile.in
+++ /dev/null
@@ -1,484 +0,0 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = src/ibrowse
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_curl.m4 \
-	$(top_srcdir)/m4/ac_check_icu.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
[...3689 lines suppressed...]
-		    {"http://www.google.com", get},
-		    {"http://www.google.com", options},
-		    {"http://www.sun.com", get},
-		    {"http://www.oracle.com", get},
-		    {"http://www.bbc.co.uk", get},
-		    {"http://www.bbc.co.uk", trace},
-		    {"http://www.bbc.co.uk", options},
-		    {"http://yaws.hyber.org", get},
-		    {"http://jigsaw.w3.org/HTTP/ChunkedScript", get},
-		    {"http://jigsaw.w3.org/HTTP/TE/foo.txt", get},
-		    {"http://jigsaw.w3.org/HTTP/TE/bar.txt", get},
-		    {"http://jigsaw.w3.org/HTTP/connection.html", get},
-		    {"http://jigsaw.w3.org/HTTP/cc.html", get},
-		    {"http://jigsaw.w3.org/HTTP/cc-private.html", get},
-		    {"http://jigsaw.w3.org/HTTP/cc-proxy-revalidate.html", get},
-		    {"http://jigsaw.w3.org/HTTP/cc-nocache.html", get},
-		    {"http://jigsaw.w3.org/HTTP/h-content-md5.html", get},
-		    {"http://jigsaw.w3.org/HTTP/h-retry-after.html", get},
-		    {"http://jigsaw.w3.org/HTTP/h-retry-after-date.html", get},
-		    {"http://jigsaw.w3.org/HTTP/neg", get},
-		    {"http://jigsaw.w3.org/HTTP/negbad", get},
-		    {"http://jigsaw.w3.org/HTTP/400/toolong/", get},
-		    {"http://jigsaw.w3.org/HTTP/300/", get},
-		    {"http://jigsaw.w3.org/HTTP/Basic/", get, [{basic_auth, {"guest", "guest"}}]},
-		    {"http://jigsaw.w3.org/HTTP/CL/", get},
-		    {"http://www.httpwatch.com/httpgallery/chunked/", get}
-		   ]).
-
-unit_tests() ->
-    unit_tests([]).
-
-unit_tests(Options) ->
-    Options_1 = Options ++ [{connect_timeout, 5000}],
-    {Pid, Ref} = erlang:spawn_monitor(?MODULE, unit_tests_1, [self(), Options_1]),
-    receive
-	{done, Pid} ->
-	    ok;
-	{'DOWN', Ref, _, _, Info} ->
-	    io:format("Test process crashed: ~p~n", [Info])
-    after 60000 ->
-	    exit(Pid, kill),
-	    io:format("Timed out waiting for tests to complete~n", [])
-    end.
-
-unit_tests_1(Parent, Options) ->
-    lists:foreach(fun({Url, Method}) ->
-			  execute_req(Url, Method, Options);
-		     ({Url, Method, X_Opts}) ->
-			  execute_req(Url, Method, X_Opts ++ Options)
-		  end, ?TEST_LIST),
-    Parent ! {done, self()}.
-
-verify_chunked_streaming() ->
-    verify_chunked_streaming([]).
-
-verify_chunked_streaming(Options) ->
-    Url = "http://www.httpwatch.com/httpgallery/chunked/",
-    io:format("URL: ~s~n", [Url]),
-    io:format("Fetching data without streaming...~n", []),
-    Result_without_streaming = ibrowse:send_req(
-				 Url, [], get, [],
-				 [{response_format, binary} | Options]),
-    io:format("Fetching data with streaming as list...~n", []),
-    Async_response_list = do_async_req_list(
-			    Url, get, [{response_format, list} | Options]),
-    io:format("Fetching data with streaming as binary...~n", []),
-    Async_response_bin = do_async_req_list(
-			   Url, get, [{response_format, binary} | Options]),
-    compare_responses(Result_without_streaming, Async_response_list, Async_response_bin).
-
-compare_responses({ok, St_code, _, Body}, {ok, St_code, _, Body}, {ok, St_code, _, Body}) ->
-    success;
-compare_responses({ok, St_code, _, Body_1}, {ok, St_code, _, Body_2}, {ok, St_code, _, Body_3}) ->
-    case Body_1 of
-	Body_2 ->
-	    io:format("Body_1 and Body_2 match~n", []);
-	Body_3 ->
-	    io:format("Body_1 and Body_3 match~n", []);
-	_ when Body_2 == Body_3 ->
-	    io:format("Body_2 and Body_3 match~n", []);
-	_ ->
-	    io:format("All three bodies are different!~n", [])
-    end,
-    io:format("Body_1 -> ~p~n", [Body_1]),
-    io:format("Body_2 -> ~p~n", [Body_2]),
-    io:format("Body_3 -> ~p~n", [Body_3]),
-    fail_bodies_mismatch;
-compare_responses(R1, R2, R3) ->
-    io:format("R1 -> ~p~n", [R1]),
-    io:format("R2 -> ~p~n", [R2]),
-    io:format("R3 -> ~p~n", [R3]),
-    fail.
-
-%% do_async_req_list(Url) ->
-%%     do_async_req_list(Url, get).
-
-%% do_async_req_list(Url, Method) ->
-%%     do_async_req_list(Url, Method, [{stream_to, self()},
-%% 				    {stream_chunk_size, 1000}]).
-
-do_async_req_list(Url, Method, Options) ->
-    {Pid,_} = erlang:spawn_monitor(?MODULE, i_do_async_req_list,
-				   [self(), Url, Method,
-				    Options ++ [{stream_chunk_size, 1000}]]),
-    io:format("Spawned process ~p~n", [Pid]),
-    wait_for_resp(Pid).
-
-wait_for_resp(Pid) ->
-    receive
-	{async_result, Pid, Res} ->
-	    Res;
-	{async_result, Other_pid, _} ->
-	    io:format("~p: Waiting for result from ~p: got from ~p~n", [self(), Pid, Other_pid]),
-	    wait_for_resp(Pid);
-	{'DOWN', _, _, Pid, Reason} ->
-	    {'EXIT', Reason};
-	{'DOWN', _, _, _, _} ->
-	    wait_for_resp(Pid);
-	Msg ->
-	    io:format("Recvd unknown message: ~p~n", [Msg]),
-	    wait_for_resp(Pid)
-    after 10000 ->
-	  {error, timeout}
-    end.
-
-i_do_async_req_list(Parent, Url, Method, Options) ->
-    Res = ibrowse:send_req(Url, [], Method, [], [{stream_to, self()} | Options]),
-    case Res of
-	{ibrowse_req_id, Req_id} ->
-	    Result = wait_for_async_resp(Req_id, undefined, undefined, []),
-	    Parent ! {async_result, self(), Result};
-	Err ->
-	    Parent ! {async_result, self(), Err}
-    end.
-
-wait_for_async_resp(Req_id, Acc_Stat_code, Acc_Headers, Body) ->
-    receive
-	{ibrowse_async_headers, Req_id, StatCode, Headers} ->
-	    wait_for_async_resp(Req_id, StatCode, Headers, Body);
-	{ibrowse_async_response_end, Req_id} ->
-	    Body_1 = list_to_binary(lists:reverse(Body)),
-	    {ok, Acc_Stat_code, Acc_Headers, Body_1};
-	{ibrowse_async_response, Req_id, Data} ->
-	    wait_for_async_resp(Req_id, Acc_Stat_code, Acc_Headers, [Data | Body]);
-	Err ->
-	    {ok, Acc_Stat_code, Acc_Headers, Err}
-    end.
-
-execute_req(Url, Method, Options) ->
-    io:format("~7.7w, ~50.50s: ", [Method, Url]),
-    Result = (catch ibrowse:send_req(Url, [], Method, [], Options)),
-    case Result of
-	{ok, SCode, _H, _B} ->
-	    io:format("Status code: ~p~n", [SCode]);
-	Err ->
-	    io:format("Err -> ~p~n", [Err])
-    end.
-
-drv_ue_test() ->
-    drv_ue_test(lists:duplicate(1024, 127)).
-drv_ue_test(Data) ->
-    [{port, Port}| _] = ets:lookup(ibrowse_table, port),
-%     erl_ddll:unload_driver("ibrowse_drv"),
-%     timer:sleep(1000),
-%     erl_ddll:load_driver("../priv", "ibrowse_drv"),
-%     Port = open_port({spawn, "ibrowse_drv"}, []),
-    {Time, Res} = timer:tc(ibrowse_lib, drv_ue, [Data, Port]),
-    io:format("Time -> ~p~n", [Time]),
-    io:format("Data Length -> ~p~n", [length(Data)]),
-    io:format("Res Length -> ~p~n", [length(Res)]).
-%    io:format("Result -> ~s~n", [Res]).
-
-ue_test() ->
-    ue_test(lists:duplicate(1024, $?)).
-ue_test(Data) ->
-    {Time, Res} = timer:tc(ibrowse_lib, url_encode, [Data]),
-    io:format("Time -> ~p~n", [Time]),
-    io:format("Data Length -> ~p~n", [length(Data)]),
-    io:format("Res Length -> ~p~n", [length(Res)]).
-%    io:format("Result -> ~s~n", [Res]).
-
-log_msg(Fmt, Args) ->
-    io:format("~s -- " ++ Fmt,
-	      [ibrowse_lib:printable_date() | Args]).
diff --git a/test/etap/test_util.erl.in b/test/etap/test_util.erl.in
index 948958c..2650fbb 100644
--- a/test/etap/test_util.erl.in
+++ b/test/etap/test_util.erl.in
@@ -22,7 +22,7 @@ builddir() ->
     "@abs_top_builddir@".
 
 init_code_path() ->
-    Paths = ["couchdb", "ibrowse"],
+    Paths = ["couchdb"],
     lists:foreach(fun(Name) ->
         code:add_pathz(filename:join([builddir(), "src", Name]))
     end, Paths).
-- 
1.7.1.1


couchdb0.11.1-0007-Workaround-for-system-wide-ibrowse.patch:
 couch_rep_changes_feed.erl |    2 +-
 couch_rep_httpc.erl        |    6 +++---
 couch_rep_reader.erl       |    3 +--
 3 files changed, 5 insertions(+), 6 deletions(-)

--- NEW FILE couchdb0.11.1-0007-Workaround-for-system-wide-ibrowse.patch ---
>From a23fd694426eb38865dd262d775cabb905c85a2f Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov at gmail.com>
Date: Tue, 8 Jun 2010 17:30:49 +0400
Subject: [PATCH 7/9] Workaround for system-wide ibrowse

---
 src/couchdb/couch_rep_changes_feed.erl |    2 +-
 src/couchdb/couch_rep_httpc.erl        |    6 +++---
 src/couchdb/couch_rep_reader.erl       |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/couchdb/couch_rep_changes_feed.erl b/src/couchdb/couch_rep_changes_feed.erl
index 343b445..fc46925 100644
--- a/src/couchdb/couch_rep_changes_feed.erl
+++ b/src/couchdb/couch_rep_changes_feed.erl
@@ -20,7 +20,7 @@
 -define(BUFFER_SIZE, 1000).
 
 -include("couch_db.hrl").
--include("../ibrowse/ibrowse.hrl").
+-include_lib("ibrowse/include/ibrowse.hrl").
 
 -record (state, {
     changes_from = nil,
diff --git a/src/couchdb/couch_rep_httpc.erl b/src/couchdb/couch_rep_httpc.erl
index 4944f55..6608238 100644
--- a/src/couchdb/couch_rep_httpc.erl
+++ b/src/couchdb/couch_rep_httpc.erl
@@ -12,7 +12,7 @@
 
 -module(couch_rep_httpc).
 -include("couch_db.hrl").
--include("../ibrowse/ibrowse.hrl").
+-include_lib("ibrowse/include/ibrowse.hrl").
 
 -export([db_exists/1, db_exists/2, full_url/1, request/1, redirected_request/2,
     spawn_worker_process/1, spawn_link_worker_process/1]).
@@ -188,12 +188,12 @@ redirected_request(Req, RedirectUrl) ->
 
 spawn_worker_process(Req) ->
     Url = ibrowse_lib:parse_url(Req#http_db.url),
-    {ok, Pid} = ibrowse_http_client:start(Url),
+    {ok, Pid} = ibrowse_http_client:start({undefined, Url, {[{ssl_imp, new}], (Url#url.protocol == https)}}),
     Pid.
 
 spawn_link_worker_process(Req) ->
     Url = ibrowse_lib:parse_url(Req#http_db.url),
-    {ok, Pid} = ibrowse_http_client:start_link(Url),
+    {ok, Pid} = ibrowse_http_client:start_link({undefined, Url, {[{ssl_imp, new}], (Url#url.protocol == https)}}),
     Pid.
 
 maybe_decompress(Headers, Body) ->
diff --git a/src/couchdb/couch_rep_reader.erl b/src/couchdb/couch_rep_reader.erl
index 949739b..3225f56 100644
--- a/src/couchdb/couch_rep_reader.erl
+++ b/src/couchdb/couch_rep_reader.erl
@@ -25,7 +25,7 @@
 -define (MAX_PIPELINE_SIZE, 50).
 
 -include("couch_db.hrl").
--include("../ibrowse/ibrowse.hrl").
+-include_lib("ibrowse/include/ibrowse.hrl").
 
 -record (state, {
     parent,
-- 
1.7.1.1


couchdb0.11.1-0008-Remove-pid-file-after-stop.patch:
 couchdb.tpl.in |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- NEW FILE couchdb0.11.1-0008-Remove-pid-file-after-stop.patch ---
>From f7ce263dbc08c1127abe44c816a475f1238beae4 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov at gmail.com>
Date: Mon, 7 Jun 2010 15:08:42 +0400
Subject: [PATCH 8/9] Remove pid-file after stop

---
 bin/couchdb.tpl.in |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in
index ced524c..4e21c3f 100644
--- a/bin/couchdb.tpl.in
+++ b/bin/couchdb.tpl.in
@@ -253,10 +253,8 @@ EOF
 
 stop_couchdb () {
     PID=`_get_pid`
+    rm -f $PID_FILE
     if test -n "$PID"; then
-        if test "$1" = "false"; then
-            echo > $PID_FILE
-        fi
         if kill -0 $PID 2> /dev/null; then
             if kill -1 $PID 2> /dev/null; then
                 if test "$1" = "false"; then
-- 
1.7.1.1


couchdb0.11.1-0009-deleting-a-DB-while-it-was-being-opened-would-crash-.patch:
 couch_server.erl |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE couchdb0.11.1-0009-deleting-a-DB-while-it-was-being-opened-would-crash-.patch ---
>From b063843a8e0bb4eef4674e3d9396dc76323a4ddc Mon Sep 17 00:00:00 2001
From: Adam Kocoloski <kocolosk at apache.org>
Date: Sun, 11 Jul 2010 01:00:50 +0000
Subject: [PATCH 9/9] deleting a DB while it was being opened would crash couch_server

(Updated for 0.11.1)

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@962964 13f79535-47bb-0310-9956-ffa450edef68
---
 src/couchdb/couch_server.erl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/couchdb/couch_server.erl b/src/couchdb/couch_server.erl
index d339405..2bf115f 100644
--- a/src/couchdb/couch_server.erl
+++ b/src/couchdb/couch_server.erl
@@ -308,7 +308,7 @@ handle_call({delete, DbName, _Options}, _From, Server) ->
             couch_util:shutdown_sync(Pid),
             true = ets:delete(couch_dbs_by_name, DbName),
             true = ets:delete(couch_dbs_by_pid, Pid),
-            [gen_server:send_result(F, not_found) || F <- Froms],
+            [gen_server:reply(F, not_found) || F <- Froms],
             Server#server{dbs_open=Server#server.dbs_open - 1};
         [{_, {opened, Pid, LruTime}}] ->
             couch_util:shutdown_sync(Pid),
-- 
1.7.1.1



Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/couchdb/devel/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- .cvsignore	18 Jun 2010 07:41:45 -0000	1.7
+++ .cvsignore	14 Jul 2010 14:41:35 -0000	1.8
@@ -1 +1 @@
-apache-couchdb-0.11.0.tar.gz
+apache-couchdb-0.11.1.tar.gz


Index: couchdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/couchdb/devel/couchdb.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -p -r1.24 -r1.25
--- couchdb.spec	13 Jul 2010 08:23:54 -0000	1.24
+++ couchdb.spec	14 Jul 2010 14:41:35 -0000	1.25
@@ -3,8 +3,8 @@
 %define couchdb_home %{_localstatedir}/lib/couchdb
 
 Name:           couchdb
-Version:        0.11.0
-Release:        3%{?dist}
+Version:        0.11.1
+Release:        1%{?dist}
 Summary:        A document database server, accessible via a RESTful JSON API
 
 Group:          Applications/Databases
@@ -12,15 +12,15 @@ License:        ASL 2.0
 URL:            http://couchdb.apache.org/
 Source0:        http://www.apache.org/dist/%{name}/%{version}/apache-%{name}-%{version}.tar.gz
 Source1:        %{name}.init
-Patch1:		couchdb0.11.0-0001-Force-init-script-installation.patch
-Patch2:		couchdb0.11.0-0002-Install-into-erllibdir-by-default.patch
-Patch3:		couchdb0.11.0-0003-Remove-bundled-erlang-oauth-library.patch
-Patch4:		couchdb0.11.0-0004-Remove-bundled-erlang-etap-library.patch
-Patch5:		couchdb0.11.0-0005-Remove-bundled-mochiweb-library.patch
-Patch6:		couchdb0.11.0-0006-Remove-pid-file-after-stop.patch
-Patch7:		couchdb0.11.0-0007-Remove-bundled-ibrowse-library.patch
-Patch8:		couchdb0.11.0-0008-Workaround-for-system-wide-ibrowse.patch
-Patch9:		couchdb0.11.0-0009-fix-issue-COUCHDB-805.-tested-on-R13B-04-and-R14A.-a.patch
+Patch1:		couchdb0.11.1-0001-Force-init-script-installation.patch
+Patch2:		couchdb0.11.1-0002-Install-into-erllibdir-by-default.patch
+Patch3:		couchdb0.11.1-0003-Remove-bundled-erlang-oauth-library.patch
+Patch4:		couchdb0.11.1-0004-Remove-bundled-erlang-etap-library.patch
+Patch5:		couchdb0.11.1-0005-Remove-bundled-mochiweb-library.patch
+Patch6:		couchdb0.11.1-0006-Remove-bundled-ibrowse-library.patch
+Patch7:		couchdb0.11.1-0007-Workaround-for-system-wide-ibrowse.patch
+Patch8:		couchdb0.11.1-0008-Remove-pid-file-after-stop.patch
+Patch9:		couchdb0.11.1-0009-deleting-a-DB-while-it-was-being-opened-would-crash-.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	curl-devel
@@ -71,10 +71,10 @@ JavaScript acting as the default view de
 %patch3 -p1 -b .remove_bundled_oauth
 %patch4 -p1 -b .remove_bundled_etap
 %patch5 -p1 -b .remove_bundled_mochiweb
-%patch6 -p1 -b .remove_pid_file
-%patch7 -p1 -b .remove_bundled_ibrowse
-%patch8 -p1 -b .workaround_for_ssl
-%patch9 -p1 -b .R14A
+%patch6 -p1 -b .remove_bundled_ibrowse
+%patch7 -p1 -b .workaround_for_ssl
+%patch8 -p1 -b .remove_pid_file
+%patch9 -p1 -b .fix_crash
 # Restore original timestamps to avoid reconfiguring
 touch -r configure.ac.initenabled configure.ac
 touch -r configure.fix_lib_path configure
@@ -154,6 +154,10 @@ fi
 
 
 %changelog
+* Wed Jul 14 2010 Peter Lemenkov <lemenkov at gmail.com> 0.11.1-1
+- Ver. 0.11.1
+- Removed patch for compatibility with Erlang/OTP R14A (merged upstream)
+
 * Sun Jul 11 2010 Peter Lemenkov <lemenkov at gmail.com> 0.11.0-3
 - Compatibility with Erlang R14A (see patch9)
 


Index: import.log
===================================================================
RCS file: /cvs/pkgs/rpms/couchdb/devel/import.log,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -p -r1.20 -r1.21
--- import.log	13 Jul 2010 08:23:56 -0000	1.20
+++ import.log	14 Jul 2010 14:41:37 -0000	1.21
@@ -18,3 +18,4 @@ couchdb-0_10_2-11_fc12:HEAD:couchdb-0.10
 couchdb-0_10_2-12_fc12:HEAD:couchdb-0.10.2-12.fc12.src.rpm:1276624368
 couchdb-0_11_0-1_fc12:HEAD:couchdb-0.11.0-1.fc12.src.rpm:1276846826
 couchdb-0_11_0-3_fc12:HEAD:couchdb-0.11.0-3.fc12.src.rpm:1279009389
+couchdb-0_11_1-1_fc12:HEAD:couchdb-0.11.1-1.fc12.src.rpm:1279118433


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/couchdb/devel/sources,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- sources	18 Jun 2010 07:41:48 -0000	1.7
+++ sources	14 Jul 2010 14:41:37 -0000	1.8
@@ -1 +1 @@
-c1784e3850da01dc37dad20c5b1a85f8  apache-couchdb-0.11.0.tar.gz
+5100ef96f332ab4449ba891a98abde87  apache-couchdb-0.11.1.tar.gz


--- couchdb0.11.0-0001-Force-init-script-installation.patch DELETED ---


--- couchdb0.11.0-0002-Install-into-erllibdir-by-default.patch DELETED ---


--- couchdb0.11.0-0003-Remove-bundled-erlang-oauth-library.patch DELETED ---


--- couchdb0.11.0-0004-Remove-bundled-erlang-etap-library.patch DELETED ---


--- couchdb0.11.0-0005-Remove-bundled-mochiweb-library.patch DELETED ---


--- couchdb0.11.0-0006-Remove-pid-file-after-stop.patch DELETED ---


--- couchdb0.11.0-0007-Remove-bundled-ibrowse-library.patch DELETED ---


--- couchdb0.11.0-0008-Workaround-for-system-wide-ibrowse.patch DELETED ---


--- couchdb0.11.0-0009-fix-issue-COUCHDB-805.-tested-on-R13B-04-and-R14A.-a.patch DELETED ---



More information about the scm-commits mailing list