Author: jfrederic.clere(a)jboss.com
Date: 2008-01-03 12:17:20 -0500 (Thu, 03 Jan 2008)
New Revision: 1270
Added:
trunk/build/unix/buildtest.rhel-httpd.solaris.sh
trunk/build/unix/util/buildroot.solaris.sh
Modified:
trunk/build/unix/build.sh
trunk/build/unix/buildbin.rhel-httpd.sh
trunk/build/unix/package.list
Log:
Get the solaris test working without gcc dependencies.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2007-12-21 16:34:44 UTC (rev 1269)
+++ trunk/build/unix/build.sh 2008-01-03 17:17:20 UTC (rev 1270)
@@ -49,11 +49,14 @@
has_zlib=true
has_jk=true
has_iconv=true
+has_expat=true
build_api=false
build_zlib=false
build_iconv=false
+build_expat=false
export build_iconv
+export build_expat
has_cache=false
has_version=false
@@ -160,6 +163,7 @@
zlib_version=`echo "${parg}" | ${awk} -F'|' '{print $8}'`
jk_version=`echo "${parg}" | ${awk} -F'|' '{print $9}'`
iconv_version=`echo "${parg}" | ${awk} -F'|' '{print $10}'`
+expat_version=`echo "${parg}" | ${awk} -F'|' '{print $11}'`
if [ "x" = "x${zlib_version}" ]; then
has_zlib=false
@@ -182,6 +186,9 @@
if [ "x" = "x${iconv_version}" ]; then
has_iconv=false
fi
+if [ "x" = "x${expat_version}" ]; then
+ has_expat=false
+fi
# Get plaform information
so_extension=so
@@ -235,6 +242,9 @@
if $has_iconv; then
build_iconv=true
fi
+ if $has_expat; then
+ build_expat=true
+ fi
;;
HP-UX*)
BUILD_SYS="hpux"
@@ -283,6 +293,9 @@
if $has_iconv; then
echo "using iconv: ${iconv_version}"
fi
+if $has_expat; then
+echo "using expat: ${expat_version}"
+fi
export so_extension
export NATIVEEOL
@@ -308,6 +321,7 @@
mkdir -p ${build_output_dir}
build_common_dir=${build_cache_dir}/common/${BUILD_TAG}
+export build_common_dir
if $has_cache ; then
mkdir -p ${build_common_dir}
else
@@ -688,7 +702,7 @@
(cd ${any_srcdir}
echo "Building in ${any_srcdir} ..."
if $any_static ; then
- add_static=--enable-static
+ add_static="--enable-static --disable-shared"
else
add_static=""
fi
@@ -761,6 +775,11 @@
buildany srclib/libiconv-${iconv_version} true || return 1
fi
+ # build a static expat.
+ if $build_expat; then
+ buildany srclib/expat-${expat_version} true || return 1
+ fi
+
if $has_apr; then
buildapr srclib/apr-${apr_version} false || return 1
if $has_static ; then
@@ -863,6 +882,7 @@
SSLURL=http://www.openssl.org/source/openssl-${ssl_version}.tar.gz
ZLIBURL=http://www.zlib.net/zlib-${zlib_version}.tar.gz
ICONVURL=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${iconv_version}.ta...
+EXPATURL=http://belnet.dl.sourceforge.net/sourceforge/expat/expat-${expat_version}.tar.gz
rm -rf ${package_src_dir}
mkdir -p ${package_src_dir}/srclib
@@ -885,6 +905,9 @@
if $has_iconv; then
ckeckdownload libiconv-${iconv_version} $ICONVURL ""
fi
+if $has_expat; then
+ ckeckdownload expat-${expat_version} $EXPATURL ""
+fi
#
# Get the repository of what we build.
@@ -944,6 +967,7 @@
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:
Modified: trunk/build/unix/buildbin.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildbin.rhel-httpd.sh 2007-12-21 16:34:44 UTC (rev 1269)
+++ trunk/build/unix/buildbin.rhel-httpd.sh 2008-01-03 17:17:20 UTC (rev 1270)
@@ -75,7 +75,7 @@
--with-suexec-logfile=${_localstatedir}/log/httpd/suexec.log \
--with-suexec-bin=${_sbindir}/suexec \
--with-suexec-uidmin=500 --with-suexec-gidmin=100 \
- --with-pcre \
+ --with-pcre=builtin \
$* || exit 1
make || exit 1
) || return 1
@@ -104,9 +104,17 @@
fi
if $build_iconv; then
# Use the static iconv we built before.
- LDFLAGS="$LDFLAGS -L${build_common_dir}/lib -liconv"
+ LDFLAGS="$LDFLAGS -L${build_common_dir}-static/lib -liconv"
export LDFLAGS
+ # Add the LD_LIBRARY_PATH if we want to use dynamic library.
+ #LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${build_common_dir}-static/lib"
+ #export LD_LIBRARY_PATH
fi
+if $build_expat; then
+ add_conf="$add_conf --with-expat=${build_common_dir}-static/"
+else
+ add_conf="$add_conf --with-expat=builtin"
+fi
case ${BUILD_SYS} in
linux*)
add_conf="$add_conf --enable-pie"
Added: trunk/build/unix/buildtest.rhel-httpd.solaris.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.solaris.sh (rev 0)
+++ trunk/build/unix/buildtest.rhel-httpd.solaris.sh 2008-01-03 17:17:20 UTC (rev 1270)
@@ -0,0 +1,52 @@
+#!/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.
+#
+root=/tmp/$1
+
+# copy the installation in /tmp (mknod doesn't work on all file system)
+cp -rp $1/opt $root
+
+# mount proc
+mkdir -p $root/proc
+sudo /usr/sbin/mount -F proc proc $root/proc
+
+# start the test.
+sudo /usr/sbin/chroot $root /opt/jboss/httpd/sbin/apachectl start
+sleep 5
+curl -v
http://localhost | grep "It works\!"
+if [ $? -ne 0 ]; then
+ sudo /usr/sbin/umount $root/proc
+ echo "Test FAILED cant start?"
+ exit 1
+fi
+sudo /usr/sbin/chroot $root /opt/jboss/httpd/sbin/apachectl stop
+sleep 5
+curl -v
http://localhost
+if [ $? -eq 0 ]; then
+ sudo /usr/sbin/umount $root/proc
+ echo "Test FAILED can't stop"
+ exit 1
+fi
+sudo /usr/sbin/umount $root/proc
Property changes on: trunk/build/unix/buildtest.rhel-httpd.solaris.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/build/unix/package.list
===================================================================
--- trunk/build/unix/package.list 2007-12-21 16:34:44 UTC (rev 1269)
+++ trunk/build/unix/package.list 2008-01-03 17:17:20 UTC (rev 1270)
@@ -10,4 +10,4 @@
jboss-sight|1.0.2|trunk|1.2.8|1.2.8|1.2.1
# httpd
jboss-httpd|0.0.1|2.2.6
-rhel-httpd|0.0.1|httpd-2_2_3-11_el5||||||1.2.25
+rhel-httpd|0.0.1|httpd-2_2_3-11_el5||||||1.2.25|1.11|1.95.8
Added: trunk/build/unix/util/buildroot.solaris.sh
===================================================================
--- trunk/build/unix/util/buildroot.solaris.sh (rev 0)
+++ trunk/build/unix/util/buildroot.solaris.sh 2008-01-03 17:17:20 UTC (rev 1270)
@@ -0,0 +1,112 @@
+#!/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
+#
+# Build a chrootable environment.
+# $1 : Directory where the chroot will takes place.
+tools="/bin/bash /etc/passwd /etc/group /etc/hosts /etc/netconfig /etc/resolv.conf
/etc/inet/ipnodes /usr/lib/ld.so.1"
+depfiles="/bin/sh /usr/bin/test"
+# tools are the tools we need for the tests.
+# depfiles are files the packages needed (to be generated).
+files="$tools $depfiles"
+
+# Those are dependencies (to be generated).
+toolpackages=""
+deppackages="SUNWlibms SUNWcsl SUNWzlib"
+#deppackages="SUNWlibms SMCpcre SMCexpat SMCliconv SUNWcsl"
+packages="$toolpackages $deppackages"
+
+# Copy library need by one file
+# $1 : Directory where to put the libraries.
+# $2 : The executable file to process.
+Processlibs()
+{
+ for lib in `ldd $2 | awk 'NF==3 { print $3 } ' | sort -u`
+ do
+ Processfile $1 $lib
+ done
+}
+
+#
+# Copy one file
+# $1 : Directory where to put the libraries.
+# $2 : The executable file to process.
+Processfile()
+{
+ dir=`dirname $2`
+ mkdir -p $1/$dir
+ cp $2 $1/$dir
+}
+
+#
+# Copy all the files of a package.
+# $1 : Directory where to put the libraries.
+# $2 : name of the package
+Processpackage()
+{
+ for file in `pkgchk -l $2 | grep Pathname: | awk ' { print $2 } '`
+ do
+ Processfile $1 $file
+ done
+}
+
+#
+# Create a device in the chrootable directory
+# $1 : Directory where to create the node
+# $2 : The node name in /dev
+Createdev()
+{
+ major=`ls -lL /dev/$2 | awk ' { print $5 } ' | sed 's:,::'`:w
+ minor=`ls -lL /dev/$2 | awk ' { print $6 } '`
+ sudo mknod $1/$2 c $major $minor
+}
+
+# Use tmp for mknod
+root=/tmp/$1
+
+for file in `echo $files`
+do
+ Processlibs $root $file
+ Processfile $root $file
+done
+
+for package in `echo $packages`
+do
+ Processpackage $root $package
+done
+
+# create proc
+mkdir -p $root/proc
+
+# Create needed devices
+devices="ip kmem null random rawip tcp tcp6 ticlts ticots ticotsord udp udp6"
+mkdir -p $root/dev
+sudo chown root $root/dev
+
+for dev in `echo $devices`
+do
+ Createdev $root/dev $dev
+done
+
+# create /tmp
+mkdir $root/tmp
+chmod a+rwx $root/tmp