Commit f595f707 authored by Amadeu Andrade Barbosa Junior's avatar Amadeu Andrade Barbosa Junior
Browse files

Como tarefa do issue OPENBUS-31:

* Adicionando a linha de build necessária para compilar a OpenLDAP
na Solaris 10, conforme bug indicado em:  
http://www.openldap.org/its/index.cgi/Build?id=4607. 
* Outras instruções de compilação na SunOS510

Como tarefa do issue OPENBUS-64:
* Criando um conjunto de testes para garantir que os scripts que rodam
os testes unitários bem como a recompilação em todas plataformas 
(via ssh), possam ser executados consistentemente. É interessante
reaproveitar essas verificações para os scripts de lançamento do 
openbus.
* Removendo a necessidade de definição da variável LUA51, agora o
packages.desc informa direto ao tecmake onde está o Lua
* BUGFIX: em algumas plataformas (solaris e alguns linux) o tar
reclama se não houver o parâmetro "-f -"

git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/trunk@85947 ae0415b3-e90b-0410-900d-d0be9363c56b
parent ac058a91
......@@ -20,8 +20,10 @@ basesoft = {
" --enable-bsd-shlibs && cd lib/uuid && make && make install",
Linux = "gmake clean; ./configure --prefix=".. TMPDIR ..
" --enable-elf-shlibs && cd lib/uuid && gmake && gmake install",
SunOS = "gmake clean; ./configure --with-cc=gcc --prefix=".. TMPDIR ..
SunOS = "gmake clean; env CC=gcc ./configure --prefix=".. TMPDIR ..
" --enable-elf-shlibs && cd lib/uuid && gmake && gmake install",
SunOS510 = "make clean; env CC=gcc CFLAGS=-UTLS ./configure --prefix=".. TMPDIR ..
" --enable-elf-shlibs && cd lib/uuid && make && make install",
IRIX = "gmake clean; ./configure --prefix=".. TMPDIR ..
" --enable-elf-shlibs && cd lib/uuid && gmake && gmake install",
},
......@@ -94,6 +96,8 @@ basesoft = {
" && gmake && gmake install",
SunOS = "cd build_unix; gmake clean; ../dist/configure --prefix=".. TMPDIR ..
" && gmake && gmake install",
SunOS510 = "cd build_unix; make clean; ../dist/configure CC=gcc --prefix=".. TMPDIR ..
" && make && make install",
SunOS510x86 = "cd build_unix; gmake clean; ../dist/configure CC=gcc --prefix=".. TMPDIR ..
" && gmake && gmake install",
IRIX = "cd build_unix; gmake clean; ../dist/configure --prefix=".. TMPDIR ..
......@@ -129,6 +133,9 @@ basesoft = {
SunOS = "./configure --prefix=".. TMPDIR .." --disable-ldap --enable-static=yes"..
" && cd include/ && make && make install "..
" && cd ../lib/ && make && make install ",
SunOS510 = "env CC=gcc ./configure --prefix=".. TMPDIR .." --disable-ldap --enable-static=yes"..
" && cd include/ && make && make install "..
" && cd ../lib/ && make && make install ",
SunOS510x86 = "env CC=gcc ./configure --prefix=".. TMPDIR .." --disable-ldap --enable-static=yes"..
" && cd include/ && make && make install "..
" && cd ../lib/ && make && make install ",
......@@ -162,6 +169,9 @@ basesoft = {
" && make depend && make && make install",
SunOS = "./configure --prefix=".. TMPDIR .." --disable-slapd --disable-slurpd"..
" && make depend && make && make install",
-- problem on sunos510 openldap compile: http://www.openldap.org/its/index.cgi/Build?id=4607
SunOS510 = "env CC=gcc CFLAGS='-D_AVL_H' ./configure --prefix=".. TMPDIR .." --disable-slapd --disable-slurpd"..
" && make depend && make && make install",
SunOS510x86 = "env CC=gcc ./configure --prefix=".. TMPDIR .." --disable-slapd --disable-slurpd"..
" && make depend && make && make install",
IRIX = "./configure --prefix=".. TMPDIR .." --disable-slapd --disable-slurpd"..
......
......@@ -61,7 +61,7 @@ function pack(arch,profile)
-- Creates a metadata.tar.gz and include it in tarball_files
assert(os.execute(myplat.cmd.mkdir .. TMPDIR .."/metadata") == 0)
assert(os.execute(myplat.cmd.install .. metadata_files .." "..TMPDIR.."/metadata") == 0)
assert(os.execute("cd ".. TMPDIR .."; tar -c metadata |gzip > metadata.tar.gz") == 0)
assert(os.execute("cd ".. TMPDIR .."; tar -cf - metadata |gzip > metadata.tar.gz") == 0)
assert(os.execute("mv ".. TMPDIR .."/metadata.tar.gz ".. INSTALL.TOP) == 0)
assert(os.execute(myplat.cmd.rm .. TMPDIR) == 0)
tarball_files = tarball_files .. " metadata.tar.gz "
......@@ -69,7 +69,7 @@ function pack(arch,profile)
-- Call the 'tar' command
local tar_cmd = "cd ".. INSTALL.TOP ..";"
tar_cmd = tar_cmd .. "tar --exclude '.svn'"
tar_cmd = tar_cmd .. " -c "
tar_cmd = tar_cmd .. " -cf - "
tar_cmd = tar_cmd .. tarball_files
tar_cmd = tar_cmd .. "|gzip > ../openbus-".. name .."_".. arch .. ".tar.gz "
assert(os.execute(tar_cmd) == 0, "Cannot execute the command \n"..tar_cmd..
......
......@@ -32,7 +32,7 @@ packages = {
build = {
type = "tecmake",
src = PRODAPP .."/lib/tolua5.1/src",
mf = { "tolua5lib", "tolua5" },
mf = { "tolua5lib LUA51=../../lua5.1", "tolua5 LUA51=../../lua5.1" },
},
dev_files = {
["../bin/${TEC_UNAME}/tolua5.1"] = "bin/${TEC_UNAME}",
......
#!/bin/ksh
# helpers
function is_dir {
dir=$1
if [ ! -d "$dir" ]; then
echo "ERROR: Missing directory $dir"
return 1
fi
return 0
}
function die {
echo $@
exit 1
}
TOOLSDIR=$OPENBUS_HOME/../trunk/tools
LOGDIR=$OPENBUS_HOME/../
# all checks before execute
if [ "$OPENBUS_HOME" == "" ]
then
die "ERROR: Missing OPENBUS_HOME system variable"
else
echo "INFO: Using OPENBUS_HOME as $OPENBUS_HOME"
# we don't test core/bin/$TEC_UNAME because this script could be run from any host
is_dir "$OPENBUS_HOME/core/bin" || die "ERROR: $OPENBUS_HOME seems an invalid OPENBUS_HOME"
fi
if [ ! -f $TOOLSDIR/compile.lua ]
then
echo "INFO: We assume by default compile.lua on: $TOOLSDIR/compile.lua"
echo "INFO: and the log file on: $LOGDIR"
echo "INFO: But the compile.lua was not found!"
echo "INFO: Where is the compile.lua? Please inform us or CTRL+C to abort."
read NEWDIR
[ -f "$NEWDIR/compile.lua" ] || die "ERROR: Invalid directory $NEWDIR!"
echo "INFO: Thanks! Proceeding..."
TOOLSDIR=$NEWDIR
fi
timestamp=$(date +%Y%m%d)
logfile="work/arch-built.$timestamp"
compile_cmd="lua5.1 tools/compile.lua $@"
logfile="$LOGDIR/arch-built.$timestamp"
compile_cmd="cd $TOOLSDIR; ./compile.lua $@"
rm -f $logfile
touch $logfile
......
#!/bin/ksh
## it'll be used just on launching of unit tests
export OPENBUS_HOME_WITH_LATT=$HOME/work/install
# helpers
function is_dir {
dir=$1
if [ ! -d "$dir" ]; then
echo "ERROR: Missing directory $dir"
return 1
fi
return 0
}
function die {
echo $@
exit 1
}
# all checks before execute
[ "$TEC_UNAME" == "" ] && die "ERROR: Missing TEC_UNAME system variable, aborting."
if [ "$1" != "" ] && [ "$2" != "" ]
then
export OPENBUS_HOME=$1
## it'll be used just on launching of unit tests
export OPENBUS_HOME_DEVEL=$2
echo "INFO: We will run basic services from $OPENBUS_HOME"
echo "INFO: and the test suite will run from $OPENBUS_HOME_DEVEL \n"
else
if [ "$OPENBUS_HOME" == "" ] || [ "$OPENBUS_HOME_DEVEL" == "" ]
then
die "ERROR: Missing arguments: you should provide OPENBUS_HOME and OPENBUS_HOME_DEVEL paths\n" \
"Usage: `basename $0` <openbus_home> <openbus_path with test suites>\n" \
" You could define OPENBUS_HOME and OPENBUS_HOME_DEVEL as system variables also"
fi
fi
is_dir "$OPENBUS_HOME/core/bin/$TEC_UNAME" || die "ERROR: $OPENBUS_HOME seems an invalid OPENBUS_HOME"
is_dir "$OPENBUS_HOME_DEVEL/core/test/lua" &&
is_dir "${OPENBUS_HOME_DEVEL}/libpath/lua/5.1/latt" || exit 1
## loading basic variable definitions
. $OPENBUS_HOME/core/conf/config
......@@ -31,7 +65,7 @@ echo PIDS: $ACS_PID $RS_PID $SS_PID
cd -
## now starting the tests
cd $HOME/work/trunk/core/test/lua
cd $OPENBUS_HOME_DEVEL/core/test/lua
TESTS_TORUN="
testAccessControlService.lua
......@@ -47,7 +81,7 @@ reinitSession.lua"
## redefining OPENBUS_HOME to get right LUA_PATH with latt
## the present configuration on core/conf/config redefines
## whole LUA_PATH pointing to OPENBUS_HOME/libpath/lua/5.1
export OPENBUS_HOME=${OPENBUS_HOME_WITH_LATT}
export OPENBUS_HOME=${OPENBUS_HOME_DEVEL}
for test in $TESTS_TORUN;
do
......
#!/bin/ksh
## it'll be used just on launching of unit tests
export OPENBUS_HOME_WITH_LATT=$HOME/work/install
# helpers
function is_dir {
dir=$1
if [ ! -d "$dir" ]; then
echo "ERROR: Missing directory $dir"
return 1
fi
return 0
}
function die {
echo $@
exit 1
}
# all checks before execute
[ "$TEC_UNAME" == "" ] && die "ERROR: Missing TEC_UNAME system variable, aborting."
if [ "$1" != "" ] && [ "$2" != "" ]
then
export OPENBUS_HOME=$1
## it'll be used just on launching of unit tests
export OPENBUS_HOME_DEVEL=$2
echo "INFO: We will run basic services from $OPENBUS_HOME"
echo "INFO: and the test suite will run from $OPENBUS_HOME_DEVEL \n"
else
if [ "$OPENBUS_HOME" == "" ] || [ "$OPENBUS_HOME_DEVEL" == "" ]
then
die "ERROR: Missing arguments: you should provide OPENBUS_HOME and OPENBUS_HOME_DEVEL paths\n" \
"Usage: `basename $0` <openbus_home> <openbus_path with test suites>\n" \
" You could define OPENBUS_HOME and OPENBUS_HOME_DEVEL as system variables also"
fi
fi
is_dir "$OPENBUS_HOME/core/bin/$TEC_UNAME" || die "ERROR: $OPENBUS_HOME seems an invalid OPENBUS_HOME"
is_dir "$OPENBUS_HOME_DEVEL/core/test/cppoil" &&
is_dir "${OPENBUS_HOME_DEVEL}/incpath/cxxtest" &&
is_dir "${OPENBUS_HOME_DEVEL}/incpath/tolua5.1" || exit 1
## loading basic variable definitions
. $OPENBUS_HOME/core/conf/config
......@@ -31,18 +66,17 @@ echo PIDS: $ACS_PID $RS_PID $SS_PID
cd -
## now starting the tests
cd $HOME/work/trunk/core/test/cppoil
cd $OPENBUS_HOME_DEVEL/core/test/cppoil
TESTS_TORUN="
acs
rgs
ses
das"
ses"
#das
## redefining OPENBUS_HOME to get right LUA_PATH with latt
## the present configuration on core/conf/config redefines
## whole LUA_PATH pointing to OPENBUS_HOME/libpath/lua/5.1
export OPENBUS_HOME=${OPENBUS_HOME_WITH_LATT}
## redefining OPENBUS_HOME to get right cxxtest, tolua5.1
## the present configuration on core/conf/config
export OPENBUS_HOME=${OPENBUS_HOME_DEVEL}
for test in $TESTS_TORUN;
do
......
# my settings
alias ll='ls -l'
# personal settings
export PATH="$HOME/bin:$PATH"
export OPENBUS_HOME="${HOME}/work/install"
export OPENSSL_HOME="${OPENBUS_HOME}/openssl"
# openbus settings
# common path
#export OPENBUS_HOME="${HOME}/work/install"
export LUA51="${HOME}/prodapp/lib/lua5.1"
export OPENSSL_HOME="${OPENBUS_HOME}/openssl"
export PATH="${OPENBUS_HOME}/bin/${TEC_UNAME}:${OPENBUS_HOME}/bin:${PATH}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment