Author: jfrederic.clere(a)jboss.com
Date: 2008-02-06 04:01:59 -0500 (Wed, 06 Feb 2008)
New Revision: 1373
Modified:
trunk/build/unix/build.sh
Log:
Add a patch logic for rhel sources.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2008-02-06 08:40:40 UTC (rev 1372)
+++ trunk/build/unix/build.sh 2008-02-06 09:01:59 UTC (rev 1373)
@@ -885,15 +885,26 @@
# Apply patch for the component
# $1 directory of the component like apr-1.2.8
+# $2 also apply the rhel patches.
applypatch()
{
DIR=$1
- if [ -f $build_top/../patch/$DIR.patch ];
- then
+ isrhel=$2
+ basefilename=`basename $DIR`
+ if [ -f $build_top/../patch/$basefilename.patch ]; then
(cd $DIR
- $patch -tfs -p0 -i $build_top/../patch/$DIR.patch
- )
+ echo "Applying patch $build_top/../patch/$basefilename.patch"
+ $patch -tfs -p0 -i $build_top/../patch/$basefilename.patch
+ ) || return 1
fi
+ if $isrhel; then
+ if [ -f $build_top/../patch/$basefilename.rhel.patch ]; then
+ (cd $DIR
+ echo "Applying patch $build_top/../patch/$basefilename.rhel.patch"
+ $patch -tfs -p0 -i $build_top/../patch/$basefilename.rhel.patch
+ ) || return 1
+ fi
+ fi
}
# Check and download
@@ -908,7 +919,7 @@
cd $build_cache_dir
if [ ! -d ${src_dir} ]; then
downloadtaredsrc $src_url $src_url_back
- applypatch $src_dir
+ applypatch $src_dir false
fi
cp -rp ${src_dir} ${package_src_dir}/srclib
cd $build_top
@@ -955,6 +966,8 @@
tag=${ssl_version}
fi
util/buildrhelsrc.sh
http://cvs.devel.redhat.com/repo/dist/openssl openssl/RHEL-5
${tag} ${package_src_dir} openssl rhel-httpd ${build_version}
+ openssl_dir=${package_src_dir}/srclib/`ls ${package_src_dir}/srclib | grep openssl-`
+ applypatch ${openssl_dir} true
else
echo "${ssl_type} not support for openssl"
exit 1