Remove support for bzip2. Change build_deps.sh to only remove the
build files from wiredtiger when cleaning rather than all the files.
This commit is contained in:
parent
eafee02865
commit
f1cb6f8c61
5 changed files with 6 additions and 63 deletions
|
@ -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
|
||||
|
|
Binary file not shown.
|
@ -1,15 +1,3 @@
|
|||
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
|
||||
|
|
|
@ -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"}];
|
||||
|
|
|
@ -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}.
|
||||
|
|
Loading…
Reference in a new issue