JBoss Native SVN: r1298 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-01-23 08:38:36 -0500 (Wed, 23 Jan 2008)
New Revision: 1298
Modified:
trunk/build/unix/build.sh
trunk/build/unix/buildsrc.rhel-httpd.sh
Log:
Abort when cvs fails.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2008-01-23 10:08:50 UTC (rev 1297)
+++ trunk/build/unix/build.sh 2008-01-23 13:38:36 UTC (rev 1298)
@@ -931,6 +931,10 @@
#
# Get the repository of what we build.
override ${build_top}/buildsrc.${PACKAGE}.sh ${svn_tagname} ${package_src_dir}
+if [ $? -ne 0 ]; then
+ echo "override ${build_top}/buildsrc.${PACKAGE}.sh ${svn_tagname} ${package_src_dir} failed"
+ exit 1
+fi
#
# Copy build files
Modified: trunk/build/unix/buildsrc.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildsrc.rhel-httpd.sh 2008-01-23 10:08:50 UTC (rev 1297)
+++ trunk/build/unix/buildsrc.rhel-httpd.sh 2008-01-23 13:38:36 UTC (rev 1298)
@@ -54,6 +54,10 @@
mkdir -p ${rhel_loc}/httpd
echo "Doing cvs -d ${cvsloc} export ${native_tag_opt} httpd/RHEL-5"
cvs -d ${cvsloc} export ${native_tag_opt} httpd/RHEL-5
+if [ $? -ne 0 ];then
+ echo "cvs failed"
+ exit 1
+fi
mv httpd/RHEL-5 ${rhel_loc}/httpd
rhel_loc=${native_dist}/srclib/httpd/RHEL-5
@@ -74,6 +78,10 @@
else
rm -f $fname
wget --tries=0 --retry-connrefused http://cvs.devel.redhat.com/repo/dist/httpd/${fname}/${dir}/${fname}
+ if [ $? -ne 0 ];then
+ echo "wget $fname failed"
+ exit 1
+ fi
fi
gunzip -c ${fname} | tar -xf -
dirsources=`gunzip -c ${fname} | tar -tf - | head -1 | awk '{ print $1 }'`
16 years, 11 months
JBoss Native SVN: r1297 - in trunk/build/unix: util and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-01-23 05:08:50 -0500 (Wed, 23 Jan 2008)
New Revision: 1297
Added:
trunk/build/unix/util/override.sh
Modified:
trunk/build/unix/build.sh
trunk/build/unix/buildbin.asf-jk.sh
trunk/build/unix/buildbin.rhel-httpd.sh
trunk/build/unix/buildsrc.rhel-httpd.sh
Log:
Remove the mod_jk logic from build.sh and move it in buildbin.rhel-httpd and buildsrc.rhel-httpd.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2008-01-22 13:36:55 UTC (rev 1296)
+++ trunk/build/unix/build.sh 2008-01-23 10:08:50 UTC (rev 1297)
@@ -198,6 +198,8 @@
fi
if [ "x" = "x${jk_version}" ]; then
has_jk=false
+else
+ export jk_version
fi
if [ "x" = "x${iconv_version}" ]; then
has_iconv=false
@@ -315,6 +317,7 @@
echo "using expat: ${expat_version}"
fi
+export has_jk
export so_extension
export NATIVEEOL
export BUILD_SYS
@@ -825,7 +828,7 @@
fi
# Do our specific part.
- override ${package_src_dir}/buildbin.${PACKAGE}.sh ${build_common_dir} ${package_dist_dir} ${package_output_dir} $has_openssl $has_static
+ override ${package_src_dir}/buildbin.${PACKAGE}.sh ${build_common_dir} ${package_dist_dir} ${package_output_dir} $has_openssl $has_static ${package_src_dir}
if [ $? -ne 0 ]; then
echo "${package_src_dir}/buildbin.${PACKAGE}.sh failed"
return 1
@@ -834,15 +837,6 @@
# General part
cp JBossORG-EULA.txt ${package_output_dir}
- # mod_jk
- if $has_jk; then
- override ${package_src_dir}/buildbin.asf-jk.sh ${build_common_dir} ${package_dist_dir} ${package_output_dir} $has_openssl $has_static
- if [ $? -ne 0 ]; then
- echo "${package_src_dir}/buildbin.asf-jk.sh failed"
- return 1
- fi
- fi
-
# Build the binary distribution tarball
buildtar ${package_output_dir} "*" ${dst_dir} ${package_build_name}
if [ $? -ne 0 ]; then
@@ -939,13 +933,6 @@
override ${build_top}/buildsrc.${PACKAGE}.sh ${svn_tagname} ${package_src_dir}
#
-# Add mod_jk if needed.
-if $has_jk; then
- override ${build_top}/buildsrc.asf-jk.sh ${jk_version} ${package_src_dir}
- cp ./buildbin.asf-jk*.sh ${package_src_dir}
-fi
-
-#
# Copy build files
cp ./build.sh ${package_src_dir}
cp ./buildbin.${PACKAGE}*.sh ${package_src_dir}
Modified: trunk/build/unix/buildbin.asf-jk.sh
===================================================================
--- trunk/build/unix/buildbin.asf-jk.sh 2008-01-22 13:36:55 UTC (rev 1296)
+++ trunk/build/unix/buildbin.asf-jk.sh 2008-01-23 10:08:50 UTC (rev 1297)
@@ -37,11 +37,13 @@
# $2: Destination location.
# $3: Location where to put the binaries.
# $4: Use OpenSSL.
+# $5: Location of the sources.
common_loc=$1
prefix_loc=$2
output_loc=$3
has_openssl=$4
+sources_loc=$5
current_loc=`pwd`
echo "Building mod_jk in $current_loc"
@@ -49,8 +51,12 @@
cd $native_sources
apxs=`find $output_loc -name apxs`
-config=`find $output_loc -name config_vars.mk`
+config=`find $output_loc -name config_vars.mk | grep -v jk/config_vars.mk`
configdir=`dirname $config`
+
+echo "Using: $apxs"
+echo "Using: $config"
+
#
# Arrange apxs/config_vars.mk so that we can use it with the httpd we are building.
echo "/^my \$installbuilddir = / c\\" > $$.sed
@@ -68,7 +74,7 @@
APR_INCLUDEDIR=`dirname $APR_INCLUDE`
APU_INCLUDE=`find $output_loc -type f -name apu.h`
APU_INCLUDEDIR=`dirname $APU_INCLUDE`
-exp_installbuild=`find $output_loc -type f -name config_vars.mk`
+exp_installbuild=`find $output_loc -type f -name config_vars.mk | grep -v jk/config_vars.mk`
exp_installbuilddir=`dirname $exp_installbuild`
modules_dir=`find $output_loc -type d -name modules`
Modified: trunk/build/unix/buildbin.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildbin.rhel-httpd.sh 2008-01-22 13:36:55 UTC (rev 1296)
+++ trunk/build/unix/buildbin.rhel-httpd.sh 2008-01-23 10:08:50 UTC (rev 1297)
@@ -30,6 +30,8 @@
echo "Prefix : $2"
echo "Output : $3"
echo "OpenSSL : $4"
+echo "Static : $5"
+echo "Sources : $6"
echo ""
@@ -38,11 +40,15 @@
# $2: Destination location.
# $3: Location where to put the binaries.
# $4: Use OpenSSL.
+# $5: Use static build.
+# $6: Location of the sources.
common_loc=$1
prefix_loc=$2
output_loc=$3
-has_openssl=$4
+has_openssl_loc=$4
+has_static_loc=$5
+sources_loc=$6
current_loc=`pwd`
#
@@ -96,7 +102,7 @@
suexec_caller=${PREFIX}/bin/suexec
_localstatedir=${PREFIX}/logs
-if $has_openssl ; then
+if $has_openssl_loc ; then
add_conf="--with-ssl=${common_loc} --enable-ssl --with-ssl --enable-distcache"
else
add_conf="--with-ssl=no"
@@ -163,5 +169,15 @@
# Install it
#install -m 755 worker/httpd ${RPM_BUILD_ROOT}/${_sbindir}/httpd.worker
install -m 755 httpd ${RPM_BUILD_ROOT}/${_sbindir}/httpd.worker
+
+# Process mod_jk if needed.
+if $has_jk; then
+ cd ${current_loc}
+ ${build_top}/util/override.sh ${sources_loc}/buildbin.asf-jk.sh ${common_loc} ${prefix_loc} ${output_loc} $has_openssl_loc $has_static_loc ${sources_loc}
+ if [ $? -ne 0 ]; then
+ echo "${sources_loc}/buildbin.asf-jk.sh failed"
+ exit 1
+ fi
+fi
echo "Done"
exit 0
Modified: trunk/build/unix/buildsrc.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildsrc.rhel-httpd.sh 2008-01-22 13:36:55 UTC (rev 1296)
+++ trunk/build/unix/buildsrc.rhel-httpd.sh 2008-01-23 10:08:50 UTC (rev 1297)
@@ -128,3 +128,12 @@
#(cd ${dirsources}
# autoheader && autoconf || exit 1
#)
+
+if $has_jk; then
+ ${build_top}/util/override.sh ${build_top}/buildsrc.asf-jk.sh ${jk_version} ${package_src_dir}
+ if [ $? -ne 0 ]; then
+ echo "buildsrc.asf-jk.sh failed"
+ exit 1
+ fi
+ cp ${build_top}/buildbin.asf-jk*.sh ${package_src_dir}
+fi
Added: trunk/build/unix/util/override.sh
===================================================================
--- trunk/build/unix/util/override.sh (rev 0)
+++ trunk/build/unix/util/override.sh 2008-01-23 10:08:50 UTC (rev 1297)
@@ -0,0 +1,46 @@
+#!/bin/sh
+# Copyright(c) 2008 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+
+# Override a command using the environment.
+# $1 script $2..n (parameters).
+
+basedir=`dirname $1`
+cmd=`basename $1 .sh`
+if [ -x ${basedir}/${cmd}.${BUILD_SYS}.${BUILD_CPU}.sh ]; then
+ run=${cmd}.${BUILD_SYS}.${BUILD_CPU}.sh
+elif [ -x ${basedir}/${cmd}.${BUILD_SYS}.sh ]; then
+ run=${cmd}.${BUILD_SYS}.sh
+else
+ run=${cmd}.sh
+fi
+shift
+echo "Running ${basedir}/$run $@"
+${basedir}/$run $@
+ret=$?
+if [ ${ret} -eq 2 ]; then
+ echo "$run not supported on this platform"
+ exit 0
+elif [ ${ret} -ne 0 ]; then
+ echo "$run returned ${ret}"
+ exit 1
+fi
Property changes on: trunk/build/unix/util/override.sh
___________________________________________________________________
Name: svn:executable
+ *
16 years, 11 months
JBoss Native SVN: r1296 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-01-22 08:36:55 -0500 (Tue, 22 Jan 2008)
New Revision: 1296
Modified:
trunk/build/unix/build.sh
Log:
Allow to install in a machine depend location.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2008-01-22 11:26:28 UTC (rev 1295)
+++ trunk/build/unix/build.sh 2008-01-22 13:36:55 UTC (rev 1296)
@@ -67,11 +67,13 @@
#
# Read local machine parameters.
TMPROOTBASE=/tmp
+TMPBUILDBASE=${build_top}
IPLOCAL=localhost
if [ -f $HOME/jbossnative.`uname -n` ]; then
. $HOME/jbossnative.`uname -n`
fi
export TMPROOTBASE
+export TMPBUILDBASE
export IPLOCAL
while [ "x" != "x$1" ]
@@ -358,12 +360,12 @@
package_src_dir=${build_top}
export package_src_dir
package_dist_dir=${build_top}/dist/${BUILD_TAG}
- package_output_dir=${build_top}/output/${BUILD_TAG}
+ package_output_dir=${TMPBUILDBASE}/output/${BUILD_TAG}
else
package_src_dir=${build_working_dir}/${package_src_name}
export package_src_dir
package_dist_dir=${build_working_dir}/${package_src_name}/dist/${BUILD_TAG}
- package_output_dir=${build_working_dir}/${package_src_name}/output/${BUILD_TAG}
+ package_output_dir=${TMPBUILDBASE}/${package_src_name}/output/${BUILD_TAG}
fi
# Override a shell command
@@ -849,7 +851,7 @@
fi
}
-# Only buid binaries?
+# Only build binaries?
if [ -d srclib ]; then
buildbin ${build_output_dir}
exit 0
@@ -990,7 +992,6 @@
fi
# generate a list of dependencies
-package_output_dir=${build_working_dir}/${package_src_name}/output/${BUILD_TAG}
override ${build_top}/util/builddep $build_output_dir ${PACKAGE}.${build_version}.${BUILD_SYS}.${BUILD_CPU}.depends ${package_output_dir}
# create a chrootable environment for testing:
16 years, 11 months
JBoss Native SVN: r1295 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-01-22 06:26:28 -0500 (Tue, 22 Jan 2008)
New Revision: 1295
Modified:
trunk/build/unix/buildbin.rhel-httpd.sh
Log:
Add test of code for make install...
Modified: trunk/build/unix/buildbin.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildbin.rhel-httpd.sh 2008-01-20 22:06:19 UTC (rev 1294)
+++ trunk/build/unix/buildbin.rhel-httpd.sh 2008-01-22 11:26:28 UTC (rev 1295)
@@ -144,9 +144,11 @@
# Install it
RPM_BUILD_ROOT=$output_loc
-#(cd prefork
make DESTDIR=$RPM_BUILD_ROOT install
-#)
+if [ $? -ne 0 ]; then
+ echo "mpmbuild prefork install failed"
+ exit 1
+fi
# Clean it before building worker.
make clean
16 years, 11 months
JBoss Native SVN: r1294 - trunk/build/unix/util.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-01-20 17:06:19 -0500 (Sun, 20 Jan 2008)
New Revision: 1294
Modified:
trunk/build/unix/util/buildroot.linux2.sh
Log:
Remove the version of the packages.
Modified: trunk/build/unix/util/buildroot.linux2.sh
===================================================================
--- trunk/build/unix/util/buildroot.linux2.sh 2008-01-20 22:05:43 UTC (rev 1293)
+++ trunk/build/unix/util/buildroot.linux2.sh 2008-01-20 22:06:19 UTC (rev 1294)
@@ -30,8 +30,8 @@
files="$tools $depfiles"
# Those are dependencies (to be generated).
-toolpackages="shadow-utils-4.0.18.1-18.fc8"
-deppackages="glibc-2.7-2 sqlite-3.4.2-3.fc8 expat-2.0.1-2 e2fsprogs-libs-1.40.2-11.fc8 zlib-1.2.3-14.fc8"
+toolpackages="shadow-utils"
+deppackages="glibc sqlite expat e2fsprogs-libs zlib"
packages="$toolpackages $deppackages"
# Copy library need by one file
16 years, 11 months
JBoss Native SVN: r1293 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-01-20 17:05:43 -0500 (Sun, 20 Jan 2008)
New Revision: 1293
Modified:
trunk/build/unix/buildtest.jboss-native.sh
Log:
Add LD_LIBRARY_PATH.
Modified: trunk/build/unix/buildtest.jboss-native.sh
===================================================================
--- trunk/build/unix/buildtest.jboss-native.sh 2008-01-18 16:28:24 UTC (rev 1292)
+++ trunk/build/unix/buildtest.jboss-native.sh 2008-01-20 22:05:43 UTC (rev 1293)
@@ -58,6 +58,11 @@
# Add the right JAVA_HOME
echo "JAVA_HOME=$JAVA_HOME" >> ${base}/${root}/jbossas/${JBOSSDIR}/bin/run.conf
echo "export JAVA_HOME" >> ${base}/${root}/jbossas/${JBOSSDIR}/bin/run.conf
+
+# Add LD_LIBRARY_PATH
+echo "LD_LIBRARY_PATH=/jbossas/${JBOSSDIR}/bin/native" >> ${base}/${root}/jbossas/${JBOSSDIR}/bin/run.conf
+echo "export LD_LIBRARY_PATH" >> ${base}/${root}/jbossas/${JBOSSDIR}/bin/run.conf
+
# Create our shutdown wrapper.
echo "#!/bin/sh" > ${base}/${root}/jbossas/${JBOSSDIR}/bin/jshutdown.sh
echo "DIRNAME=\`dirname \$0\`" >> ${base}/${root}/jbossas/${JBOSSDIR}/bin/jshutdown.sh
16 years, 11 months
JBoss Native SVN: r1292 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-01-18 11:28:24 -0500 (Fri, 18 Jan 2008)
New Revision: 1292
Modified:
trunk/build/unix/buildtest.rhel-httpd.sh
Log:
Give more time for shutdown.
Modified: trunk/build/unix/buildtest.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.sh 2008-01-18 14:29:29 UTC (rev 1291)
+++ trunk/build/unix/buildtest.rhel-httpd.sh 2008-01-18 16:28:24 UTC (rev 1292)
@@ -68,7 +68,7 @@
# Stop it.
sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl stop
${base}/${root}/jbossas/${JBOSSDIR}/bin/shutdown.sh -S -s ${IPLOCAL}
-sleep 5
+sleep 30
curl -v http://${IPLOCAL}
if [ $? -eq 0 ]; then
echo "Test FAILED can't stop"
16 years, 11 months
JBoss Native SVN: r1291 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-01-18 09:29:29 -0500 (Fri, 18 Jan 2008)
New Revision: 1291
Modified:
trunk/build/unix/buildtest.rhel-httpd.sh
Log:
Stop jboss and httpd if something fails.
Modified: trunk/build/unix/buildtest.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.sh 2008-01-18 14:27:22 UTC (rev 1290)
+++ trunk/build/unix/buildtest.rhel-httpd.sh 2008-01-18 14:29:29 UTC (rev 1291)
@@ -51,12 +51,16 @@
sleep 65
curl -v http://${IPLOCAL} | grep "It works\!"
if [ $? -ne 0 ]; then
+ sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl stop
+ ${base}/${root}/jbossas/${JBOSSDIR}/bin/shutdown.sh -S -s ${IPLOCAL}
echo "Test FAILED cant start?"
exit 1
fi
curl -v http://${IPLOCAL}/myapp/toto | grep "JBossWeb"
if [ $? -ne 0 ]; then
+ sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl stop
+ ${base}/${root}/jbossas/${JBOSSDIR}/bin/shutdown.sh -S -s ${IPLOCAL}
echo "Test FAILED cant connect to Jboss?"
exit 1
fi
16 years, 11 months
JBoss Native SVN: r1290 - trunk/build/unix/util.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-01-18 09:27:22 -0500 (Fri, 18 Jan 2008)
New Revision: 1290
Added:
trunk/build/unix/util/confjk.sh
Log:
Arrange the configuration to use IPLOCAL and configure mod_jk stuff.
Added: trunk/build/unix/util/confjk.sh
===================================================================
--- trunk/build/unix/util/confjk.sh (rev 0)
+++ trunk/build/unix/util/confjk.sh 2008-01-18 14:27:22 UTC (rev 1290)
@@ -0,0 +1,67 @@
+#!/bin/sh
+# Copyright(c) 2008 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+
+# Install jboss(as) in the chrootable environment for testing.
+#
+# $1 : Base directory for the test.
+# $2 : Directory where the package was built.
+# $3 : Directory where downloaded packages are stored.
+# $4 : Name or IP to use for the tests.
+
+base=$1
+root=$2
+build_cache_dir=$3
+IPLOCAL=$4
+
+echo "$0 : in ${base}/${root}"
+
+# Arrange listen
+mv ${base}/${root}/opt/jboss/httpd/httpd/conf/httpd.conf ${base}/${root}/opt/jboss/httpd/httpd/conf/httpd.conf.org
+
+sed "s/^Listen 80/Listen ${IPLOCAL}:80/" ${base}/${root}/opt/jboss/httpd/httpd/conf/httpd.conf.org > ${base}/${root}/opt/jboss/httpd/httpd/conf/httpd.conf
+
+
+# Add to httpd.conf
+cat <<EOF >> ${base}/${root}/opt/jboss/httpd/httpd/conf/httpd.conf
+LoadModule jk_module /opt/jboss/httpd/lib/httpd/modules/mod_jk.so
+JkWorkersFile conf/workers.properties
+JkLogFile logs/mod_jk.log
+JkLogLevel debug
+JkMount /myapp/* balancer
+JkMount /jkstatus jkstatus
+EOF
+
+# Create the workers file.
+cat <<EOF > ${base}/${root}//opt/jboss/httpd/httpd/conf/workers.properties
+worker.list=jkstatus,balancer
+worker.maintain=600
+
+worker.node1.type=ajp13
+worker.node1.host=${IPLOCAL}
+
+worker.balancer.type=lb
+worker.balancer.balance_workers=node1
+
+worker.jkstatus.type=status
+EOF
Property changes on: trunk/build/unix/util/confjk.sh
___________________________________________________________________
Name: svn:executable
+ *
16 years, 11 months
JBoss Native SVN: r1289 - in trunk/build/unix: util and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-01-18 08:30:58 -0500 (Fri, 18 Jan 2008)
New Revision: 1289
Added:
trunk/build/unix/buildtest.rhel-httpd.hpux.sh
trunk/build/unix/buildtest.rhel-httpd.windows.sh
trunk/build/unix/util/installjboss.sh
Removed:
trunk/build/unix/buildtest.rhel-httpd.linux2.sh
trunk/build/unix/buildtest.rhel-httpd.solaris.sh
Modified:
trunk/build/unix/buildtest.rhel-httpd.sh
Log:
Add mod_jk test.
Use only one shell for linux2 and solaris.
Added: trunk/build/unix/buildtest.rhel-httpd.hpux.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.hpux.sh (rev 0)
+++ trunk/build/unix/buildtest.rhel-httpd.hpux.sh 2008-01-18 13:30:58 UTC (rev 1289)
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Copyright(c) 2008 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+echo "Not yet supported platform"
Property changes on: trunk/build/unix/buildtest.rhel-httpd.hpux.sh
___________________________________________________________________
Name: svn:executable
+ *
Deleted: trunk/build/unix/buildtest.rhel-httpd.linux2.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.linux2.sh 2008-01-18 10:21:13 UTC (rev 1288)
+++ trunk/build/unix/buildtest.rhel-httpd.linux2.sh 2008-01-18 13:30:58 UTC (rev 1289)
@@ -1,53 +0,0 @@
-#!/bin/sh
-# Copyright(c) 2007 Red Hat Middleware, LLC,
-# and individual contributors as indicated by the @authors tag.
-# See the copyright.txt in the distribution for a
-# full listing of individual contributors.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library in the file COPYING.LIB;
-# if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-#
-# @author Jean-Frederic Clere
-#
-# Run a test of the httpd.
-#
-# $1 : Base directory for the test.
-# $2 : Directory where the package was built.
-# $3 : Directory where downloaded packages are stored.
-# $4 : Name or IP to use for the tests.
-
-base=$1
-root=$2
-build_cache_dir=$3
-IPLOCAL=$4
-
-# Copy the package to test.
-cp -rp $root/opt/ $base/$root
-
-# Test it.
-sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl start
-sleep 5
-curl -v http://${IPLOCAL} | grep "It works\!"
-if [ $? -ne 0 ]; then
- echo "Test FAILED cant start?"
- exit 1
-fi
-sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl stop
-sleep 5
-curl -v http://${IPLOCAL}
-if [ $? -eq 0 ]; then
- echo "Test FAILED can't stop"
- exit 1
-fi
Modified: trunk/build/unix/buildtest.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.sh 2008-01-18 10:21:13 UTC (rev 1288)
+++ trunk/build/unix/buildtest.rhel-httpd.sh 2008-01-18 13:30:58 UTC (rev 1289)
@@ -21,4 +21,52 @@
#
# @author Jean-Frederic Clere
#
-echo "Not yet supported platform"
+# Run a test of the httpd.
+#
+# $1 : Base directory for the test.
+# $2 : Directory where the package was built.
+# $3 : Directory where downloaded packages are stored.
+# $4 : Name or IP to use for the tests.
+
+base=$1
+root=$2
+build_cache_dir=$3
+IPLOCAL=$4
+
+# Install jboss (as)
+util/installjboss.sh $base $root $build_cache_dir
+
+# start it.
+JBOSSDIR=`ls ${base}/${root}/jbossas`
+${base}/${root}/jbossas/${JBOSSDIR}/bin/run.sh -b ${IPLOCAL} > ${base}/${root}/jboss.out.txt &
+
+# Copy the package to test.
+cp -rp $root/opt/ $base/$root
+
+# Add a minimal mod_jk conf to httpd.conf
+util/confjk.sh $base $root $build_cache_dir ${IPLOCAL}
+
+# Test it.
+sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl start
+sleep 65
+curl -v http://${IPLOCAL} | grep "It works\!"
+if [ $? -ne 0 ]; then
+ echo "Test FAILED cant start?"
+ exit 1
+fi
+
+curl -v http://${IPLOCAL}/myapp/toto | grep "JBossWeb"
+if [ $? -ne 0 ]; then
+ echo "Test FAILED cant connect to Jboss?"
+ exit 1
+fi
+
+# Stop it.
+sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl stop
+${base}/${root}/jbossas/${JBOSSDIR}/bin/shutdown.sh -S -s ${IPLOCAL}
+sleep 5
+curl -v http://${IPLOCAL}
+if [ $? -eq 0 ]; then
+ echo "Test FAILED can't stop"
+ exit 1
+fi
Deleted: trunk/build/unix/buildtest.rhel-httpd.solaris.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.solaris.sh 2008-01-18 10:21:13 UTC (rev 1288)
+++ trunk/build/unix/buildtest.rhel-httpd.solaris.sh 2008-01-18 13:30:58 UTC (rev 1289)
@@ -1,48 +0,0 @@
-#!/bin/sh
-# Copyright(c) 2007 Red Hat Middleware, LLC,
-# and individual contributors as indicated by the @authors tag.
-# See the copyright.txt in the distribution for a
-# full listing of individual contributors.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library in the file COPYING.LIB;
-# if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-#
-# @author Jean-Frederic Clere
-#
-# Run a test of the httpd.
-#
-base=$1
-root=$2
-build_cache_dir=$3
-IPLOCAL=$4
-
-# copy the installation in /tmp (mknod doesn't work on all file system)
-cp -rp $root/opt $base/$root
-
-# start the test.
-sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl start
-sleep 5
-curl -v http://${IPLOCAL} | grep "It works\!"
-if [ $? -ne 0 ]; then
- echo "Test FAILED cant start?"
- exit 1
-fi
-sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl stop
-sleep 5
-curl -v http://${IPLOCAL}
-if [ $? -eq 0 ]; then
- echo "Test FAILED can't stop"
- exit 1
-fi
Added: trunk/build/unix/buildtest.rhel-httpd.windows.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.windows.sh (rev 0)
+++ trunk/build/unix/buildtest.rhel-httpd.windows.sh 2008-01-18 13:30:58 UTC (rev 1289)
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Copyright(c) 2008 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+echo "Not yet supported platform"
Property changes on: trunk/build/unix/buildtest.rhel-httpd.windows.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/build/unix/util/installjboss.sh
===================================================================
--- trunk/build/unix/util/installjboss.sh (rev 0)
+++ trunk/build/unix/util/installjboss.sh 2008-01-18 13:30:58 UTC (rev 1289)
@@ -0,0 +1,49 @@
+#!/bin/sh
+# Copyright(c) 2008 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+
+# Install jboss(as) in the chrootable environment for testing.
+#
+# $1 : Base directory for the test.
+# $2 : Directory where the package was built.
+# $3 : Directory where downloaded packages are stored.
+
+base=$1
+root=$2
+build_cache_dir=$3
+
+# Install jbossas
+URL=http://surfnet.dl.sourceforge.net/sourceforge/jboss/jboss-4.2.0.GA.zip
+FILE=`basename $URL`
+mkdir -p $build_cache_dir
+if [ ! -f ${build_cache_dir}/$FILE ]; then
+ (cd ${build_cache_dir}
+ wget --tries=0 --retry-connrefused $URL
+ )
+fi
+mkdir ${base}/${root}/jbossas
+(cd ${base}/${root}/jbossas
+unzip ${build_cache_dir}/${FILE}
+)
+JBOSSDIR=`ls ${base}/${root}/jbossas`
+echo "Installed ${JBOSSDIR} for tests."
Property changes on: trunk/build/unix/util/installjboss.sh
___________________________________________________________________
Name: svn:executable
+ *
16 years, 11 months