Author: jfrederic.clere(a)jboss.com
Date: 2008-01-31 12:43:32 -0500 (Thu, 31 Jan 2008)
New Revision: 1317
Modified:
trunk/build/unix/buildsrc.rhel-httpd.sh
trunk/build/unix/util/buildrhelsrc.sh
Log:
Use apr and apr-util from rhel repositories
Modified: trunk/build/unix/buildsrc.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildsrc.rhel-httpd.sh 2008-01-31 13:45:28 UTC (rev 1316)
+++ trunk/build/unix/buildsrc.rhel-httpd.sh 2008-01-31 17:43:32 UTC (rev 1317)
@@ -40,7 +40,7 @@
# Build the sources from the rhel repo according to the information in data.
util/buildrhelsrc.sh
http://cvs.devel.redhat.com/repo/dist/httpd httpd/RHEL-5
${native_tag} ${native_dist} httpd rhel-httpd ${build_version}
if [ $? -ne 0 ]; then
- echo "util/buildrhelsrc.sh failed"
+ echo "util/buildrhelsrc.sh httpd failed"
exit 1
fi
@@ -48,6 +48,38 @@
dirsources=${native_dist}/srclib/${dirsources}
#
+# Build the sources from the rhel repo according to the information in data.
+#
http://cvs.devel.redhat.com/cgi-bin/cvsweb.cgi/rpms/apr/RHEL-5/
+util/buildrhelsrc.sh
http://cvs.devel.redhat.com/repo/dist/apr apr/RHEL-5 trunk
${native_dist} apr rhel-httpd ${build_version}
+if [ $? -ne 0 ]; then
+ echo "util/buildrhelsrc.sh apr failed"
+ exit 1
+fi
+
+#
http://cvs.devel.redhat.com/cgi-bin/cvsweb.cgi/rpms/apr-util/RHEL-5/
+util/buildrhelsrc.sh
http://cvs.devel.redhat.com/repo/dist/apr-util apr-util/RHEL-5 trunk
${native_dist} apr-util rhel-httpd ${build_version}
+if [ $? -ne 0 ]; then
+ echo "util/buildrhelsrc.sh apr-util failed"
+ exit 1
+fi
+
+# Copy apr and apr-util to the build location.
+if [ -d ${dirsources}/srclib/apr ]
+then
+ rm -rf ${dirsources}/srclib/apr
+ aprdirsources=`ls ${native_dist}/srclib/ | grep apr- | grep -v apr-util`
+ echo "Replacing ${dirsources}/srclib/apr by
${native_dist}/srclib/${aprdirsources}"
+ mv ${native_dist}/srclib/${aprdirsources} ${dirsources}/srclib/apr
+fi
+if [ -d ${dirsources}/srclib/apr-util ]
+then
+ rm -rf ${dirsources}/srclib/apr-util
+ aprdirsources=`ls ${native_dist}/srclib/ | grep apr-util-`
+ echo "Replacing ${dirsources}/srclib/apr-util by
${native_dist}/srclib/${aprdirsources}"
+ mv ${native_dist}/srclib/${aprdirsources} ${dirsources}/srclib/apr-util
+fi
+
+#
# Add mod_jk sources.
if $has_jk; then
${build_top}/util/override.sh ${build_top}/buildsrc.asf-jk.sh ${jk_version}
${package_src_dir} ${dirsources}
Modified: trunk/build/unix/util/buildrhelsrc.sh
===================================================================
--- trunk/build/unix/util/buildrhelsrc.sh 2008-01-31 13:45:28 UTC (rev 1316)
+++ trunk/build/unix/util/buildrhelsrc.sh 2008-01-31 17:43:32 UTC (rev 1317)
@@ -31,7 +31,7 @@
echo "dir : $4"
echo "compo : $5"
echo "package : $6"
-echo "version : $6"
+echo "version : $7"
echo ""
# parameters
@@ -45,30 +45,33 @@
URL=$1
repo=$2
-native_tag=$3
+tag=$3
destdir=$4
compo=$5
package=$6
-packageversion=$7
+version=$7
# we need something like:
#cvs -d :pserver:anonymous@cvs.devel.redhat.com:/cvs/dist export \
# -r httpd-2_2_3-11_el5 httpd/RHEL-5
cvsloc=:pserver:anonymous@cvs.devel.redhat.com:/cvs/dist
-native_tag_opt="-r $native_tag"
-native_ext="$tag"
+if [ "$tag" == "trunk" ];then
+ native_tag_opt="-r HEAD"
+else
+ native_tag_opt="-r $tag"
+fi
rhel_loc=${destdir}/srclib
-mkdir -p ${rhel_loc}/httpd
+mkdir -p ${rhel_loc}/${compo}
echo "Doing cvs -d ${cvsloc} export ${native_tag_opt} ${repo}"
cvs -d ${cvsloc} export ${native_tag_opt} ${repo}
if [ $? -ne 0 ];then
echo "cvs failed"
exit 1
fi
-mv ${repo} ${rhel_loc}/httpd
-rhel_loc=${destdir}/srclib/httpd/`basename ${repo}`
+mv ${repo} ${rhel_loc}/${compo}
+rhel_loc=${destdir}/srclib/${compo}/`basename ${repo}`
# download something like:
@@ -101,14 +104,15 @@
# Read the patches list and apply them
WHERE=${destdir}/tools
mkdir -p ${WHERE}
-grep "^%patch" ${rhel_loc}/httpd.spec | sed 's:%:@:' | sed 's: :@
:' | awk ' { print $1 " " $2 } ' > ${WHERE}/patch.cmd
-grep "^Patch" ${rhel_loc}/httpd.spec | sed 's:^Patch:@patch:' | sed
's/:/@/' | awk ' { print "s:" $1 ": @PATCH@ -i @DIR@" $2
":" } ' > ${WHERE}/patch.files
+grep "^%patch" ${rhel_loc}/${compo}.spec | sed 's:%:@:' | sed 's:
:@ :' | awk ' { print $1 " " $2 } ' > ${WHERE}/patch.cmd
+grep "^Patch" ${rhel_loc}/${compo}.spec | sed 's:^Patch:@patch:' | sed
's/:/@/' | awk ' { print "s:" $1 ": @PATCH@ -i @DIR@" $2
":" } ' > ${WHERE}/patch.files
sed -f ${WHERE}/patch.files ${WHERE}/patch.cmd | sed "s:@DIR@:${rhel_loc}/:" |
sed "s:@PATCH@:${patch}:" > ${WHERE}/patch.sh
#
# Remove linux specific patches.
# The file containing the patch that shouldn't be applied are build the following
way.
# ${package}.${version}.${compo}.${tag}.${BUILD_SYS}.${BUILD_CPU}
+echo "Don't apply patch search in
${build_top}/data/${package}.${version}.${compo}.${tag}.${BUILD_SYS}.${BUILD_CPU}"
if [ -f ${build_top}/data/${package}.${version}.${compo}.${tag}.${BUILD_SYS}.${BUILD_CPU}
]; then
remove_list=`cat
${build_top}/data/${package}.${version}.${compo}.${tag}.${BUILD_SYS}.${BUILD_CPU}`
elif [ -f ${build_top}/data/${package}.${compo}.${tag}.${BUILD_SYS}.${BUILD_CPU} ]; then
@@ -125,6 +129,7 @@
if [ -z "${remove_list}" ]; then
echo "applying all the rhel patches"
else
+ echo "applying only some of the rhel patches"
for patch in `echo "$remove_list"`
do
cat ${WHERE}/patch.sh | grep -v ${patch} > ${WHERE}/patch.sh