1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-939 Moved columnstore version information to columnstoreversion.h for 1.1.X

This commit is contained in:
Roman Nozdrin
2017-12-12 22:53:33 +03:00
parent 2ed4bc2e72
commit bea47cc657
34 changed files with 53 additions and 2125 deletions

View File

@ -1,18 +0,0 @@
for /f "delims= skip=1" %%x in (releasenum) do (set "%%x")
set packager="%USERNAME% <%USERNAME%@calpont.com>"
echo %packager%
set builddate="%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2% %TIME:~0,2%:%TIME:~3,2%:%TIME:~6,2%"
set buildmachine=%computername%
copy /Y .\CalpontVersion.txt.in ..\utils\winport\CalpontVersion.txt
sed -i -e s/@@PACKAGER@@/%packager%/ ..\utils\winport\CalpontVersion.txt
sed -i -e s/@@BUILDDATE@@/%builddate%/ ..\utils\winport\CalpontVersion.txt
sed -i -e s/@@VERSION@@/%version%/ ..\utils\winport\CalpontVersion.txt
sed -i -e s/@@RELEASE@@/%release%/ ..\utils\winport\CalpontVersion.txt
sed -i -e s/@@BUILDMACHINE@@/%buildmachine%/ ..\utils\winport\CalpontVersion.txt
:: For some unknown reason, sed removes permissions. Put them back.
icacls ..\utils\winport\CalpontVersion.txt /grant SYSTEM:F administrators:F
cd ..
git status | grep "On branch" >> utils\winport\CalpontVersion.txt
git log -1 | head -3 | egrep "^(commit|Date)" >> utils\winport\CalpontVersion.txt
cd build

View File

@ -1,60 +0,0 @@
#!/bin/bash
#
# $Id: bootstrap 1333 2011-01-18 17:25:26Z rdempsey $
#
# This script is responsible for setting up a fresh development tree
# following a git checkout. It copies static files and shared include
# files to the export tree prior to building the software.
set -e
mkdir -p export/mysql
#FIXME rename this
cp dbcon/mysql/install_calpont_mysql.sh export/mysql/
#TODO: see if this my.cnf is necessary
cp dbcon/mysql/my.cnf export/mysql/.
#TODO: the init.d service file should not be mixed case
#TODO: the init.d service file should not contain calpont
cp dbcon/mysql/mysql-Columnstore export/mysql/ && \
cp build/files.lst export/mysql/ && \
cp dbcon/mysql/install_calpont_mysql.sh export/mysql/ && \
cp dbcon/mysql/my.cnf export/mysql/ && \
cp dbcon/mysql/mysql-Columnstore export/mysql/
#FIXME:
#This is not going to update the version in configure.ac
echo Generating version header
./build/genVersion.sh
if [ $? -ne 0 ]; then
echo Could not generate version header
exit $?
fi
echo Running GNU autotools to generate build environment
aclocal && \
autoconf && \
autoheader && \
libtoolize && \
automake --add-missing && \
autoreconf
if [ $? -ne 0 ]; then
echo GNU autotools generation failed
exit $?
fi
echo GNU autotools environment generation completed successfully
#cd net-snmp/net-snmp
# ./configure --prefix=$PREFIX --with-mib-modules=disman/event-mib --with-cc=gcc \
# --with-logfile=$PREFIX/log/snmpd.log \
# --with-sys-location=Unknown \
# --with-sys-contact=root@localhost.localdomain \
# --with-default-snmp-version=3 \
# --with-persistent-directory=$PREFIX/var/net-snmp \
# --without-openssl \
# --with-ldflags="-Wl,-rpath -Wl,$PREFIX/lib"

View File

@ -49,7 +49,7 @@ for lib in libnetsnmpagent.so libnetsnmphelpers.so libnetsnmpmibs.so libnetsnmp.
done
popd >/dev/null
./build/genVersion.sh
#./build/genVersion.sh
for x in \
$(find . -name '[mM]akefile' \

View File

@ -1,143 +0,0 @@
#!/bin/bash
#
# $Id: build_rpms 1734 2012-10-25 18:07:16Z dlhill $
#
verbose=0
prefix=/usr/local/mariadb/columnstore
#mysqldir=$prefix/mariadb-columnstore/mysql
columnstoredir=$prefix
# set default as community
community=true
usage()
{
cat <<EOD
usage: build_rpms [--community] [--verbose] [--local-mysql] [--help]
--local-mysql use local (relative) mysql binary tree
EOD
}
for arg in "$@"; do
if [ `expr -- "$arg" : '--verbose'` -eq 9 ]; then
((verbose++))
elif [ `expr -- "$arg" : '--local-mysql'` -eq 13 ]; then
mysqldir=../mariadb/columnstore/mysql
elif [ `expr -- "$arg" : '--help'` -eq 6 ]; then
usage
exit 0
elif [ `expr -- "$arg" : '--community'` -eq 11 ]; then
community=true
else
echo "ignoring unknown argument: $arg" 1>&2
fi
done
#try to find project root
while [ ! -d dbcon ]; do
cd ..
curdir=$(pwd)
if [ $curdir = / -o $curdir = $HOME ]; then
echo "I could not find the project root directory: I can't continue!"
exit 1
fi
done
if [ ! -f ./build/releasenum ]; then
echo "I could not find the file 'releasesum' in the build directory: I can't continue!"
exit 1
fi
. ./build/releasenum
# make the install package
buildroot=$HOME/rpm/BUILD/mariadb-columnstore-$version.$release
sudo rm -rf $buildroot
mkdir -p $buildroot
mkdir -p $buildroot/mariadb/columnstore
echo -n "Writing binary files to $buildroot..."
sudo chown -R builder:builder $columnstoredir
/bin/cp -f -r $columnstoredir/* $buildroot/mariadb/columnstore/.
/bin/cp -r build/releasenum $buildroot/mariadb/columnstore/.
#get mysql server files
#pushd $mysqldir > /dev/null
#mkdir -p $buildroot/mariadb/columnstore/mysql
#cpio -pdmu --quiet $buildroot/mariadb/columnstore/mysql < files.lst
#popd >/dev/null
#clean up some files from buildroot
rm -f $buildroot/mariadb/columnstore/etc/Doxyfile
for file in $buildroot/mariadb/columnstore/lib/*; do
if [ -h $file ]; then
rm -f $file
fi
done
#temporarily clean up these BRM thingies
for file in dbrm script-fcns; do
rm -f $buildroot/mariadb/columnstore/bin/$file
done
#clean up these bulkload scripts
for file in bulkload.sh cleanup.sh dbbuilder.sh dbload.sh cpimport.sh bulkloadp.sh; do
rm -f $buildroot/mariadb/columnstore/bin/$file
done
rm -f $buildroot/mariadb/columnstore/lib/libidbboot.a
rm -f $buildroot/mariadb/columnstore/lib/libiberty.a
mkdir -p $HOME/rpm/BUILD $HOME/rpm/RPMS $HOME/rpm/SRPMS $HOME/rpm/SPECS $HOME/rpm/tmp
if [ ! -f $HOME/.rpmmacros ]; then
cat > $HOME/.rpmmacros <<EOD
%_topdir $HOME/rpm
%_tmppath $HOME/rpm/tmp
# Change to 1 if you want to abort on unpackaged files
%_unpackaged_files_terminate_build 0
EOD
fi
#twiddle with the spec file
packager="support@mariadb.com"
tag=poc
buildinfo=`./build/docBuild $tag | (
read l
b="$l"
while read l; do
b="$b\\n$l"
done
echo $b )`
if [ ! $community ]; then
cp ./build/columnstore.spec.in $HOME/rpm/SPECS/columnstore.spec
else
cp ./build/columnstore.community.spec.in $HOME/rpm/SPECS/columnstore.spec
fi
sed -i -e "s/@@PACKAGER@@/Packager: $packager/" \
-e "s/@@VERSION@@/Version: $version/" \
-e "s/@@RELEASE@@/Release: $release/" \
-e "s?@@BUILDINFO@@?$buildinfo?" $HOME/rpm/SPECS/columnstore.spec
echo done.
echo -n "Building rpms..."
rpmbuild -ba $HOME/rpm/SPECS/columnstore.spec > /tmp/rpmbuild.out.$$ 2>&1
rc=$?
echo done.
if [ $verbose -gt 0 -o $rc -ne 0 ]; then
cat /tmp/rpmbuild.out.$$
fi
rm -f /tmp/*.$$
exit $rc

View File

@ -1,49 +0,0 @@
#!/bin/bash
#
# $Id: genVersion.sh 1019 2009-12-18 14:42:35Z rdempsey $
#
#prefix=export
#for arg in "$@"; do
# if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
# prefix="`echo $arg | awk -F= '{print $2}'`"
# else
# echo "ignoring unknown argument: $arg" 1>&2
# fi
#done
#
##try to find project root
#while [ ! -d dbcon ]; do
# cd ..
# curdir=$(pwd)
# if [ $curdir = / -o $curdir = $HOME ]; then
# echo "I could not find the project root directory: I can't continue!"
# exit 1
# fi
#done
#
#if [ ! -f ./build/releasenum ]; then
# echo "I could not find the file 'releasesum' in the build directory: I can't continue!"
# exit 1
#fi
. ./build/releasenum
#mkdir -p ${prefix}/include
echo "
#ifndef VERSIONNUMBER_H_
#define VERSIONNUMBER_H_
#include <string>
const std::string idb_version(\"$version\");
const std::string idb_release(\"$release\");
#endif
" > dbcon/mysql/versionnumber.h.tmp
diff -bBq dbcon/mysql/versionnumber.h.tmp dbcon/mysql/versionnumber.h >/dev/null 2>&1
if [ $? -ne 0 ]; then
cp dbcon/mysql/versionnumber.h.tmp dbcon/mysql/versionnumber.h
fi
rm -f dbcon/mysql/versionnumber.h.tmp

View File

@ -1,135 +0,0 @@
#!/bin/bash
#
# $Id: make_src_tar 1932 2013-06-20 18:26:27Z dhill $
#
# basedir is the working dir for all the activity
basedir=$HOME
# vname is the name of the top-level dir in the tar file
vname=
# ofile is the output tar file name and is relative to a hidden dir, so it should be absolute
ofile=
# branch is the branch to checkout (develop by default)
branch=
for arg in "$@"; do
if [ $(expr -- "$arg" : '--basedir=') -eq 10 ]; then
basedir="$(echo $arg | awk -F= '{print $2}')"
elif [ $(expr -- "$arg" : '--vname=') -eq 8 ]; then
vname="$(echo $arg | awk -F= '{print $2}')"
elif [ $(expr -- "$arg" : '--ofile=') -eq 8 ]; then
ofile="$(echo $arg | awk -F= '{print $2}')"
elif [ $(expr -- "$arg" : '--branch=') -eq 9 ]; then
branch="$(echo $arg | awk -F= '{print $2}')"
else
echo "ignoring unknown argument: $arg" 1>&2
fi
done
if [ -f releasenum ]; then
. releasenum
elif [ -f build/releasenum ]; then
. build/releasenum
else
echo "Couldn't locate 'releasenum' file in the build dir, make sure running in top-level dir"
fi
if [ -z "$version" ]; then
echo "Version defaulting to 4.0-develop"
version=4.0
release=develop
fi
if [ -z "$release" ]; then
release=0
fi
blddir=bld.$$
if [ -z "$vname" ]; then
vname=infinidb-${version}
fi
if [ -z "$ofile" ]; then
ofile=${basedir}/${vname}-${release}.src.tar.gz
fi
co_dir=$blddir/$vname
trap "{ echo; cd ${basedir}; rm -rf $blddir; exit 1; }" TERM INT ERR
cd ${basedir}
rm -rf $blddir
mkdir -p $co_dir
cd $co_dir
branch_arg=
if [ ! -z "$branch" ]; then
branch_arg="-b $branch"
else
branch=develop
fi
echo -n "getting git source from $branch..."
git clone http://srvengcm1.calpont.com/repos/infinidb.git infinidb
cd infinidb
git checkout $branch
echo "done."
test -d build || exit 1
echo -n "cleaning git source for "
echo -n "release..."
rm -rf .git .gitignore
rm -rf qa export
rm -f rules.mak
find . -name Makefile | xargs rm -f
find . -name \*.xmi | xargs rm -f
rm -f dbcon/joblist/bandeddl.h.set dbcon/joblist/bandeddl.h.vector primitives/blockcache/iomanager.cpp.single-read \
primitives/udf/Makefile.sdk
rm -rf utils/scenarios
cd mysql
rm -rf scripts queries storage/maria
cd ..
rm -rf writeengine/test/*
rm -rf utils/net-snmp-built-libs
rm -rf utils/multicast
rm -rf utils/openpgm
rm -rf tools/reserveStacks
rm -rf dbcon/doc dbcon/ingres dbcon/plsql
cd tools
rm -rf brmtest dataPump evalidx fixdate nettest pgm pingproc rebuildEM snconvert updateGenii valprint
rm -rf cfread dbgen dbgen-ssb ddldriver dmldriver idb_comp sendPlan vbgen
cd ..
rm -rf utils/libstatgrab utils/libxml utils/testbc utils/configcpp/md5
echo "done."
cd ..
echo -n "getting MySQL..."
git clone https://github.com/infinidb/mysql mysql
cd mysql
git checkout $branch
echo "done."
cd ..
echo -n "building tarball..."
cd infinidb
cp -r utils/autoconf/* .
cp INSTALL INSTALL.keep
cp install-sh install-sh.keep
rm -rf utils/autoconf
autoreconf --force --install
rm -f INSTALL install-sh
mv INSTALL.keep INSTALL
mv install-sh.keep install-sh
cd ..
ln -s infinidb/INSTALL
ln -s infinidb/README
cd ..
tar -zcf $ofile $vname
echo "done."
echo "tarball left in $ofile"
cd ${basedir}
rm -rf $blddir

View File

@ -1,2 +1,2 @@
version=@PACKAGE_VERSION@
release=@PACKAGE_RELEASE@
version=${PACKAGE_VERSION}
release=${PACKAGE_RELEASE}