diff --git a/c_src/build_deps.sh b/c_src/build_deps.sh index 6690421..4efb0e4 100755 --- a/c_src/build_deps.sh +++ b/c_src/build_deps.sh @@ -18,9 +18,6 @@ WT_DIR=wiredtiger-$WT_BRANCH SNAPPY_VSN="1.0.4" SNAPPY_DIR=snappy-$SNAPPY_VSN -BZIP2_VSN="1.0.6" -BZIP2_DIR=bzip2-$BZIP2_VSN - [ `basename $PWD` != "c_src" ] && cd c_src export BASEDIR="$PWD" @@ -56,7 +53,6 @@ get_wt () [ -e Makefile ] && $MAKE distclean ../configure --with-pic \ --enable-snappy \ - --enable-bzip2 \ --prefix=${BASEDIR}/system || exit 1 ) } @@ -72,20 +68,10 @@ get_snappy () ./configure --with-pic --prefix=$BASEDIR/system || exit 1) } -get_bzip2 () -{ - [ -e bzip2-$BZIP2_VSN.tar.gz ] || (echo "Missing bzip2 ($BZIP2_VSN) source package" && exit 1) - [ -d $BASEDIR/$BZIP2_DIR ] || tar -xzf bzip2-$BZIP2_VSN.tar.gz - [ -e $BASEDIR/bzip2-build.patch ] && \ - (cd $BASEDIR/$BZIP2_DIR - patch -p1 --forward < $BASEDIR/bzip2-build.patch || exit 1) -} - get_deps () { get_wt; get_snappy; - get_bzip2; } update_deps () @@ -115,26 +101,14 @@ build_snappy () ) } -build_bzip2 () -{ - (cd $BASEDIR/$BZIP2_DIR && \ - $MAKE -j -f Makefile-libbz2_so && \ - mkdir -p $BASEDIR/system/lib && \ - cp -f bzlib.h $BASEDIR/system/include && \ - cp -f libbz2.so.1.0.6 $BASEDIR/system/lib && \ - ln -s $BASEDIR/system/lib/libbz2.so.1.0.6 $BASEDIR/system/lib/libbz2.so && \ - ln -s $BASEDIR/system/lib/libbz2.so.1.0.6 $BASEDIR/system/lib/libbz2-1.so && \ - ln -s $BASEDIR/system/lib/libbz2.so.1.0.6 $BASEDIR/system/lib/libbz2-1.0.so - ) -} - case "$1" in clean) - rm -rf system $WT_DIR $SNAPPY_DIR $BZIP2_DIR + [ -d $WT_DIR/build_posix ] && \ + rm -rf $WT_DIR/build_posix && mkdir $WT_DIR/build_posix + rm -rf system $WT_DIR $SNAPPY_DIR rm -f ${BASEDIR}/../priv/wt rm -f ${BASEDIR}/../priv/libwiredtiger-*.so rm -f ${BASEDIR}/../priv/libwiredtiger_*.so - rm -f ${BASEDIR}/../priv/libbz2.so.* rm -f ${BASEDIR}/../priv/libsnappy.so.* ;; @@ -153,32 +127,20 @@ case "$1" in *) [ -d $WT_DIR ] || get_wt; [ -d $SNAPPY_DIR ] || get_snappy; - [ -d $BZIP2_DIR ] || get_bzip2; # Build Snappy [ -d $BASEDIR/$SNAPPY_DIR ] || (echo "Missing Snappy source directory" && exit 1) test -f $BASEDIR/system/lib/libsnappy.so.[0-9].[0-9].[0-9] || build_snappy; - # Build BZIP2 - [ -d $BASEDIR/$BZIP2_DIR ] || (echo "Missing BZip2 source directory" && exit 1) - test -f $BASEDIR/system/lib/libbz2.so.[0-9].[0-9].[0-9] || build_bzip2; - # Build WiredTiger [ -d $BASEDIR/$WT_DIR ] || (echo "Missing WiredTiger source directory" && exit 1) test -f $BASEDIR/system/lib/libwiredtiger-[0-9].[0-9].[0-9].so \ - -a -f $BASEDIR/system/lib/libwiredtiger_snappy.so \ - -a -f $BASEDIR/system/lib/libwiredtiger_bzip2.so.[0-9].[0-9].[0-9] || build_wt; + -a -f $BASEDIR/system/lib/libwiredtiger_snappy.so.[0-9].[0-9].[0-9] || build_wt; [ -d $BASEDIR/../priv ] || mkdir ${BASEDIR}/../priv cp -p -P $BASEDIR/system/bin/wt ${BASEDIR}/../priv cp -p -P $BASEDIR/system/lib/libwiredtiger-[0-9].[0-9].[0-9].so ${BASEDIR}/../priv - cp -p -P $BASEDIR/system/lib/libwiredtiger_snappy.so ${BASEDIR}/../priv - cp -p -P $BASEDIR/system/lib/libwiredtiger_bzip2.so* ${BASEDIR}/../priv - cp -p -P $BASEDIR/system/lib/libbz2.so.[0-9].[0-9].[0-9] ${BASEDIR}/../priv - (cd ${BASEDIR}/../priv - [ -L libbz2.so ] || ln -s libbz2.so.1.0.6 libbz2.so - [ -L libbz2.so.1 ] || ln -s libbz2.so.1.0.6 libbz2.so.1 - [ -L libbz2.so.1.0 ] || ln -s libbz2.so.1.0.6 libbz2.so.1.0) + cp -p -P $BASEDIR/system/lib/libwiredtiger_snappy.so* ${BASEDIR}/../priv cp -p -P $BASEDIR/system/lib/libsnappy.so* ${BASEDIR}/../priv ;; esac diff --git a/c_src/bzip2-1.0.6.tar.gz b/c_src/bzip2-1.0.6.tar.gz deleted file mode 100644 index e47e903..0000000 Binary files a/c_src/bzip2-1.0.6.tar.gz and /dev/null differ diff --git a/c_src/wiredtiger-build.patch b/c_src/wiredtiger-build.patch index 54ab0ea..1d216ce 100644 --- a/c_src/wiredtiger-build.patch +++ b/c_src/wiredtiger-build.patch @@ -1,21 +1,9 @@ -diff --git a/ext/compressors/bzip2/Makefile.am b/ext/compressors/bzip2/Makefile.am -index 0aedc2e..a70ae2e 100644 ---- a/ext/compressors/bzip2/Makefile.am -+++ b/ext/compressors/bzip2/Makefile.am -@@ -2,5 +2,6 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - - lib_LTLIBRARIES = libwiredtiger_bzip2.la - libwiredtiger_bzip2_la_SOURCES = bzip2_compress.c --libwiredtiger_bzip2_la_LDFLAGS = -avoid-version -module -+libwiredtiger_snappy_la_CFLAGS = -I$(src_builddir)/../../system/include -+libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module -L$(src_builddir)/../../system/lib -Wl,-rpath,lib/wterl-0.9.0/priv:lib/wterl/priv:priv - libwiredtiger_bzip2_la_LIBADD = -lbz2 diff --git a/ext/compressors/snappy/Makefile.am b/ext/compressors/snappy/Makefile.am index 6d78823..2122cf8 100644 --- a/ext/compressors/snappy/Makefile.am +++ b/ext/compressors/snappy/Makefile.am @@ -2,5 +2,6 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - + lib_LTLIBRARIES = libwiredtiger_snappy.la libwiredtiger_snappy_la_SOURCES = snappy_compress.c -libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module diff --git a/src/riak_kv_wterl_backend.erl b/src/riak_kv_wterl_backend.erl index dc6e3b1..5898d82 100644 --- a/src/riak_kv_wterl_backend.erl +++ b/src/riak_kv_wterl_backend.erl @@ -111,7 +111,6 @@ start(Partition, Config) -> Compressor = case wterl:config_value(block_compressor, Config, "snappy") of {block_compressor, "snappy"}=C -> [C]; - {block_compressor, "bzip2"}=C -> [C]; {block_compressor, "none"} -> []; {block_compressor, none} -> []; {block_compressor, _} -> [{block_compressor, "snappy"}]; diff --git a/src/wterl.erl b/src/wterl.erl index 1e8c8bf..45afae5 100644 --- a/src/wterl.erl +++ b/src/wterl.erl @@ -571,12 +571,6 @@ conn_test_() -> ConnRef = open_test_table(ConnRef, "table", [{block_compressor, "snappy"}]), ?assertMatch(ok, verify(ConnRef, "table:test")), ?assertMatch(ok, drop(ConnRef, "table:test")) - end}, - {"create, verify, drop a table(btree, bzip2)", - fun() -> - ConnRef = open_test_table(ConnRef, "table", [{block_compressor, "bzip2"}]), - ?assertMatch(ok, verify(ConnRef, "table:test")), - ?assertMatch(ok, drop(ConnRef, "table:test")) end} ]} end}.