Auto-merge 5.0-build -> 5.0-bugteam
This commit is contained in:
commit
67bd15a554
@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc)
|
|||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
# The Docs Makefile.am parses this line!
|
# The Docs Makefile.am parses this line!
|
||||||
# remember to also change ndb version below and update version.c in ndb
|
# remember to also change ndb version below and update version.c in ndb
|
||||||
AM_INIT_AUTOMAKE(mysql, 5.0.78)
|
AM_INIT_AUTOMAKE(mysql, 5.0.79)
|
||||||
AM_CONFIG_HEADER([include/config.h:config.h.in])
|
AM_CONFIG_HEADER([include/config.h:config.h.in])
|
||||||
|
|
||||||
PROTOCOL_VERSION=10
|
PROTOCOL_VERSION=10
|
||||||
@ -23,7 +23,7 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0
|
|||||||
# ndb version
|
# ndb version
|
||||||
NDB_VERSION_MAJOR=5
|
NDB_VERSION_MAJOR=5
|
||||||
NDB_VERSION_MINOR=0
|
NDB_VERSION_MINOR=0
|
||||||
NDB_VERSION_BUILD=78
|
NDB_VERSION_BUILD=79
|
||||||
NDB_VERSION_STATUS=""
|
NDB_VERSION_STATUS=""
|
||||||
|
|
||||||
# Set all version vars based on $VERSION. How do we do this more elegant ?
|
# Set all version vars based on $VERSION. How do we do this more elegant ?
|
||||||
|
@ -1,191 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
|
|
||||||
# debug
|
|
||||||
#set -x
|
|
||||||
|
|
||||||
# stop on errors
|
|
||||||
set -e
|
|
||||||
|
|
||||||
path=`dirname $0`
|
|
||||||
|
|
||||||
# repository direcotry
|
|
||||||
repo_dir=`pwd`
|
|
||||||
|
|
||||||
# build directory
|
|
||||||
build_dir="$HOME/mydev"
|
|
||||||
wine_build_dir="F:/mydev"
|
|
||||||
|
|
||||||
# doc directory
|
|
||||||
doc_dir="$repo_dir/../mysqldoc"
|
|
||||||
|
|
||||||
# init
|
|
||||||
target_dir=""
|
|
||||||
temp_dir=""
|
|
||||||
revision=""
|
|
||||||
rev=""
|
|
||||||
build=""
|
|
||||||
suffix=""
|
|
||||||
#obsolete mwenv=""
|
|
||||||
|
|
||||||
# show usage
|
|
||||||
show_usage()
|
|
||||||
{
|
|
||||||
cat << EOF
|
|
||||||
|
|
||||||
usage: nwbootstrap [options]
|
|
||||||
|
|
||||||
Exports a revision of the BitKeeper tree (nwbootstrap must be run inside a
|
|
||||||
directory of the BitKeeper tree to be used). Creates the ChangeLog file.
|
|
||||||
Adds the latest manual.texi from the mysqldoc BitKeeper tree. Builds the
|
|
||||||
Linux tools required for cross-platform builds. Optionally, builds the
|
|
||||||
binary distributions for NetWare.
|
|
||||||
|
|
||||||
options:
|
|
||||||
|
|
||||||
--build=<opt> Build the binary distributions for NetWare,
|
|
||||||
where <opt> is "standard", "debug", or "all"
|
|
||||||
(default is to not build a binary distribution)
|
|
||||||
|
|
||||||
--build-dir=<dir> Export the BitKeeper tree to the <dir> directroy
|
|
||||||
(default is "$build_dir")
|
|
||||||
|
|
||||||
--doc-dir=<dir> Use the mysqldoc BitKeeper tree located in the
|
|
||||||
<dir> directory
|
|
||||||
(default is parallel to current BitKeeper tree)
|
|
||||||
|
|
||||||
--help Show this help information
|
|
||||||
|
|
||||||
--revision=<rev> Export the BitKeeper tree as of revision <rev>
|
|
||||||
(default is the latest revision)
|
|
||||||
|
|
||||||
--wine-build-dir=<dir> Use the WINE directory <dir>, which should
|
|
||||||
correspond to the --build-dir directory
|
|
||||||
(default is "$wine_build_dir")
|
|
||||||
|
|
||||||
examples:
|
|
||||||
|
|
||||||
nwbootstrap
|
|
||||||
|
|
||||||
nwbootstrap --revision=1.1594 --build=all
|
|
||||||
|
|
||||||
nwbootstrap --build-dir=/home/jdoe/dev --wine-build-dir=F:/dev
|
|
||||||
|
|
||||||
|
|
||||||
EOF
|
|
||||||
exit 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
# parse arguments
|
|
||||||
for arg do
|
|
||||||
case "$arg" in
|
|
||||||
--build-dir=*) build_dir=`echo "$arg" | sed -e "s;--build-dir=;;"` ;;
|
|
||||||
--wine-build-dir=*) wine_build_dir=`echo "$arg" | sed -e "s;--wine-build-dir=;;"` ;;
|
|
||||||
--revision=*) revision=`echo "$arg" | sed -e "s;--revision=;;"` ;;
|
|
||||||
--build=*) build=`echo "$arg" | sed -e "s;--build=;;"` ;;
|
|
||||||
--suffix=*) suffix=`echo "$arg" | sed -e "s;--suffix=;;"` ;;
|
|
||||||
--doc-dir=*) doc_dir=`echo "$arg" | sed -e "s;--doc-dir=;;"` ;;
|
|
||||||
*) show_usage ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "starting build..."
|
|
||||||
|
|
||||||
# check for bk and repo_dir
|
|
||||||
bzr help > /dev/null
|
|
||||||
repo_dir=`bzr root $repo_dir`
|
|
||||||
cd $repo_dir
|
|
||||||
doc_dir="$repo_dir/../mysqldoc"
|
|
||||||
|
|
||||||
# build temporary directory
|
|
||||||
temp_dir="$build_dir/mysql-$$.tmp"
|
|
||||||
|
|
||||||
# export the bk tree
|
|
||||||
command="bzr export";
|
|
||||||
if test $revision; then command="$command -r$revision"; fi
|
|
||||||
command="$command $temp_dir"
|
|
||||||
echo "exporting $repo_dir..."
|
|
||||||
$command
|
|
||||||
|
|
||||||
# determine version
|
|
||||||
version=`grep -e "AM_INIT_AUTOMAKE(mysql, .*)" < $temp_dir/configure.in | sed -e "s/AM_INIT_AUTOMAKE(mysql, \(.*\))/\1/"`
|
|
||||||
echo "version: $version"
|
|
||||||
|
|
||||||
# build target directory
|
|
||||||
target_dir="$build_dir/mysql-$version"
|
|
||||||
|
|
||||||
# add suffix
|
|
||||||
if test $suffix
|
|
||||||
then
|
|
||||||
target_dir="$target_dir-$suffix"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# delete any old target
|
|
||||||
if test -d $target_dir.old; then rm -rf $target_dir.old; fi
|
|
||||||
|
|
||||||
# rename old target
|
|
||||||
if test -d $target_dir; then mv -f $target_dir $target_dir.old; fi
|
|
||||||
|
|
||||||
# rename directory to use version
|
|
||||||
mv $temp_dir $target_dir
|
|
||||||
|
|
||||||
# create ChangeLog
|
|
||||||
if test $revision
|
|
||||||
then
|
|
||||||
rev=`bk changes -r..$revision -t -d':REV:' -n | head -2 | tail -1`
|
|
||||||
else
|
|
||||||
rev=`bk changes -t -d':REV:' -n | head -1`
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "creating ChangeLog..."
|
|
||||||
bk changes -v -r$rev..$revision > $target_dir/ChangeLog
|
|
||||||
|
|
||||||
# add the latest manual
|
|
||||||
if test -d $doc_dir
|
|
||||||
then
|
|
||||||
echo "adding the latest manual..."
|
|
||||||
install -m 644 $doc_dir/Docs/{manual,reservedwords}.texi $target_dir/Docs/
|
|
||||||
fi
|
|
||||||
|
|
||||||
# make files writeable
|
|
||||||
echo "making files writable..."
|
|
||||||
cd $target_dir
|
|
||||||
chmod -R u+rw,g+rw .
|
|
||||||
|
|
||||||
#obsolete # edit the mvenv file
|
|
||||||
#obsolete echo "updating the mwenv environment file..."
|
|
||||||
#obsolete mwenv="./netware/BUILD/mwenv"
|
|
||||||
#obsolete mv -f $mwenv $mwenv.org
|
|
||||||
#obsolete sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \
|
|
||||||
#obsolete -e "s;BUILD_DIR;$build_dir;g" \
|
|
||||||
#obsolete -e "s;VERSION;$version;g" $mwenv.org > $mwenv
|
|
||||||
#obsolete chmod +rwx $mwenv
|
|
||||||
|
|
||||||
# edit the def file versions
|
|
||||||
echo "updating *.def file versions..."
|
|
||||||
nlm_version=`echo "$version" | sed -e "s;\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*;\1, \2, \3;"`
|
|
||||||
|
|
||||||
for file in ./netware/*.def
|
|
||||||
do
|
|
||||||
mv -f $file $file.org
|
|
||||||
sed -e "s;VERSION.*;VERSION $nlm_version;g" $file.org > $file
|
|
||||||
rm $file.org
|
|
||||||
done
|
|
||||||
|
|
||||||
# create the libmysql.imp file in netware folder from libmysql/libmysql.def
|
|
||||||
# file
|
|
||||||
echo "generating llibmysql.imp file..."
|
|
||||||
awk 'BEGIN{x=0;} END{printf("\n");} x==1 {printf(" %s",$1); x++; next} x>1 {printf(",\n %s", $1);next} /EXPORTS/{x=1}' libmysql/libmysql.def > netware/libmysql.imp
|
|
||||||
# build linux tools
|
|
||||||
echo "compiling linux tools..."
|
|
||||||
./netware/BUILD/compile-linux-tools
|
|
||||||
test -f ./netware/init_db.sql # this must exist
|
|
||||||
test -f ./netware/test_db.sql # this must exist
|
|
||||||
|
|
||||||
# compile
|
|
||||||
if test $build
|
|
||||||
then
|
|
||||||
echo "compiling $build..."
|
|
||||||
./netware/BUILD/compile-netware-$build
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "done"
|
|
86
netware/BUILD/nwbuild
Executable file
86
netware/BUILD/nwbuild
Executable file
@ -0,0 +1,86 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# This script builds a Netware binary from a MySQL source tarball
|
||||||
|
|
||||||
|
# debug
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
# stop on errors
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# init
|
||||||
|
build=""
|
||||||
|
|
||||||
|
# show usage
|
||||||
|
show_usage()
|
||||||
|
{
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
usage: nwbuild [options]
|
||||||
|
|
||||||
|
Build Netware binary from source .tar.gz
|
||||||
|
|
||||||
|
options:
|
||||||
|
|
||||||
|
--build=<opt> Build the binary distributions for NetWare,
|
||||||
|
where <opt> is "standard", "debug", or "all"
|
||||||
|
(default is to not build a binary distribution)
|
||||||
|
|
||||||
|
--help Show this help information
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
./netware/BUILD/nwbuild --build=debug
|
||||||
|
./netware/BUILD/nwbuild --build=standard
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
# parse arguments
|
||||||
|
for arg do
|
||||||
|
case "$arg" in
|
||||||
|
--build=*) build=`echo "$arg" | sed -e "s;--build=;;"` ;;
|
||||||
|
--help) show_usage; exit 0 ;;
|
||||||
|
*) show_usage >&2; exit 1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# determine version
|
||||||
|
version=`grep -e "AM_INIT_AUTOMAKE(mysql, .*)" < configure.in | sed -e "s/AM_INIT_AUTOMAKE(mysql, \(.*\))/\1/"`
|
||||||
|
echo "version: $version"
|
||||||
|
|
||||||
|
# make files writeable
|
||||||
|
echo "making files writable..."
|
||||||
|
chmod -R u+rw,g+rw .
|
||||||
|
|
||||||
|
# edit the def file versions
|
||||||
|
nlm_version=`echo "$version" | sed -e "s;\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*;\1, \2, \3;"`
|
||||||
|
echo "updating *.def file versions to $nlm_version..."
|
||||||
|
|
||||||
|
for file in ./netware/*.def
|
||||||
|
do
|
||||||
|
mv -f $file $file.org
|
||||||
|
sed -e "s;VERSION.*;VERSION $nlm_version;g" $file.org > $file
|
||||||
|
rm $file.org
|
||||||
|
done
|
||||||
|
|
||||||
|
# create the libmysql.imp file in netware folder from libmysql/libmysql.def
|
||||||
|
# file
|
||||||
|
echo "generating libmysql.imp file..."
|
||||||
|
awk 'BEGIN{x=0;} END{printf("\n");} x==1 {printf(" %s",$1); x++; next} x>1 {printf(",\n %s", $1);next} /EXPORTS/{x=1}' libmysql/libmysql.def > netware/libmysql.imp
|
||||||
|
# build linux tools
|
||||||
|
echo "compiling linux tools..."
|
||||||
|
./netware/BUILD/compile-linux-tools
|
||||||
|
test -f ./netware/init_db.sql # this must exist
|
||||||
|
test -f ./netware/test_db.sql # this must exist
|
||||||
|
|
||||||
|
# compile
|
||||||
|
if test $build
|
||||||
|
then
|
||||||
|
echo "compiling $build..."
|
||||||
|
./netware/BUILD/compile-netware-$build
|
||||||
|
else
|
||||||
|
echo "Preparation complete. Use ./netware/BUILD/compile-netware-* to build MySQL."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "done"
|
@ -90,7 +90,7 @@ EXTRA_DIST= $(BUILT_SOURCES) comp_err.def install_test_db.ncf \
|
|||||||
BUILD/compile-netware-standard BUILD/create-patch \
|
BUILD/compile-netware-standard BUILD/create-patch \
|
||||||
BUILD/cron-build BUILD/crontab BUILD/knetware.imp \
|
BUILD/cron-build BUILD/crontab BUILD/knetware.imp \
|
||||||
BUILD/mwasmnlm BUILD/mwccnlm BUILD/mwenv BUILD/mwldnlm \
|
BUILD/mwasmnlm BUILD/mwccnlm BUILD/mwenv BUILD/mwldnlm \
|
||||||
BUILD/nwbootstrap BUILD/openssl.imp BUILD/save-patch
|
BUILD/nwbuild BUILD/openssl.imp BUILD/save-patch
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user