Author: jfrederic.clere(a)jboss.com
Date: 2008-01-31 08:27:19 -0500 (Thu, 31 Jan 2008)
New Revision: 1315
Added:
trunk/build/unix/data/
trunk/build/unix/data/rhel-httpd.httpd
trunk/build/unix/data/rhel-httpd.httpd.linux2
trunk/build/unix/util/buildrhelsrc.sh
Modified:
trunk/build/unix/build.sh
trunk/build/unix/buildbin.rhel-httpd.sh
trunk/build/unix/buildsrc.asf-jk.sh
trunk/build/unix/buildsrc.rhel-httpd.sh
Log:
Add buildrhelsrc and arrange mod_jk configure.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2008-01-31 08:25:16 UTC (rev 1314)
+++ trunk/build/unix/build.sh 2008-01-31 13:27:19 UTC (rev 1315)
@@ -160,6 +160,7 @@
has_version=true
echo "Using version ${build_version} from `basename ${package_list}`"
fi
+export build_version
# Check for some gnu mandadory tools.
patch=`util/find_gnu.sh patch`
Modified: trunk/build/unix/buildbin.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildbin.rhel-httpd.sh 2008-01-31 08:25:16 UTC (rev 1314)
+++ trunk/build/unix/buildbin.rhel-httpd.sh 2008-01-31 13:27:19 UTC (rev 1315)
@@ -83,7 +83,6 @@
--with-suexec-uidmin=500 --with-suexec-gidmin=100 \
--with-pcre=builtin \
$* || exit 1
-exit 1
make clean || exit 1
make || exit 1
) || return 1
@@ -123,9 +122,15 @@
add_conf="$add_conf --with-expat=builtin"
fi
# Process mod_jk if needed.
+native_sources=srclib/`ls srclib | grep httpd-`
+cd $native_sources
+
if $has_jk; then
add_conf="$add_conf --enable-jk"
+ (cd modules/jk; ./configure)
fi
+
+# Ajust some more platform dependent stuff.
case ${BUILD_SYS} in
linux*)
add_conf="$add_conf --enable-pie"
@@ -135,8 +140,7 @@
;;
esac
echo "Building prefork and mpm"
-native_sources=srclib/`ls srclib | grep httpd-`
-cd $native_sources
+
# Build everything and the kitchen sink with the prefork build
# removed because of ldap dependencies.
# --enable-ldap --enable-authnz-ldap \
Modified: trunk/build/unix/buildsrc.asf-jk.sh
===================================================================
--- trunk/build/unix/buildsrc.asf-jk.sh 2008-01-31 08:25:16 UTC (rev 1314)
+++ trunk/build/unix/buildsrc.asf-jk.sh 2008-01-31 13:27:19 UTC (rev 1315)
@@ -27,6 +27,7 @@
echo "Started : `date`"
echo "Tag : $1"
echo "Target : $2"
+echo "Destdir : $3"
echo ""
# parameters
@@ -35,6 +36,7 @@
native_tag=$1
native_dist=$2
+destdir=$3
# we need something like:
#
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2....
@@ -52,3 +54,13 @@
esac
util/ckeckdownload.sh $build_cache_dir $package_src_dir $build_top
tomcat-connectors-${native_tag}-src $URL $URLBACK
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+#
+# Copy the files to httpd src.
+mkdir -p ${destdir}/modules/jk
+cp -rp $package_src_dir/srclib/tomcat-connectors-${native_tag}-src/native/apache-2.0
${destdir}/modules/jk
+cp -rp $package_src_dir/srclib/tomcat-connectors-${native_tag}-src/native/common
${destdir}/modules/jk
+cp -rp $package_src_dir/srclib/tomcat-connectors-${native_tag}-src/native/scripts
${destdir}/modules/jk
Modified: trunk/build/unix/buildsrc.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildsrc.rhel-httpd.sh 2008-01-31 08:25:16 UTC (rev 1314)
+++ trunk/build/unix/buildsrc.rhel-httpd.sh 2008-01-31 13:27:19 UTC (rev 1315)
@@ -36,67 +36,26 @@
native_tag=$1
native_dist=$2
-# 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
-if [ $native_tag = "trunk" ]; then
- native_tag_opt="-r HEAD"
- native_ext=current
-else
- native_tag_opt="-r $native_tag"
- # XXX: fix it to get 2_2_3-11_el5 into 2.2.3-11_el5.
- native_ext="$tag"
-fi
-
-rhel_loc=${native_dist}/srclib
-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"
+#
+# 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"
exit 1
fi
-mv httpd/RHEL-5 ${rhel_loc}/httpd
-rhel_loc=${native_dist}/srclib/httpd/RHEL-5
-
-# download something like:
-#
http://cvs.devel.redhat.com/repo/dist/httpd/httpd-2.2.3.tar.gz/f72ffb176e...
-fname=`cat ${rhel_loc}/sources | awk '{ print $2 }'`
-dir=`cat ${rhel_loc}/sources | awk '{ print $1 }'`
-sum="NONE"
-if [ -f ${fname} ]; then
- sum=`openssl md5 ${fname} | awk ' { print $2 } '`
- if [ "x${sum}" = "x" ];then
- sum=`md5sum ${fname} | awk ' { print $1 } '`
- fi
-fi
-if [ ${dir} = ${sum} ]; then
- echo "$fname already available"
-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 }'`
-mv ${dirsources} ${native_dist}/srclib
+dirsources=`ls ${native_dist}/srclib/ | grep httpd-`
dirsources=${native_dist}/srclib/${dirsources}
#
# Add mod_jk sources.
if $has_jk; then
- ${build_top}/util/override.sh ${build_top}/buildsrc.asf-jk.sh ${jk_version}
${package_src_dir}
+ ${build_top}/util/override.sh ${build_top}/buildsrc.asf-jk.sh ${jk_version}
${package_src_dir} ${dirsources}
if [ $? -ne 0 ]; then
echo "buildsrc.asf-jk.sh failed"
exit 1
fi
- cp ${build_top}/buildbin.asf-jk*.sh ${package_src_dir}
+ cp ${build_top}/buildsrc.asf-jk.sh ${package_src_dir}
fi
#
@@ -114,42 +73,6 @@
exit 1
fi
-
-#
-# Read the patches list and apply them
-WHERE=${native_dist}/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
-sed -f ${WHERE}/patch.files ${WHERE}/patch.cmd | sed "s:@DIR@:${rhel_loc}/:" |
sed "s:@PATCH@:${patch}:" > ${WHERE}/patch.sh
-
-#
-# Remove linux specific patches.
-case ${BUILD_SYS} in
- linux*)
- # XXX: Somehow we can't apply the patches for the moment. (See configure).
- remove_list="httpd-2.0.45-deplibs.patch httpd-2.0.54-selinux.patch
httpd-2.2.2-ac260.patch httpd-2.1.10-apctl.patch httpd-2.1.10-apxs.patch
httpd-2.1.10-disablemods.patch"
- ;;
- *)
- remove_list="httpd-2.0.45-deplibs.patch httpd-2.0.54-selinux.patch
httpd-2.2.2-ac260.patch httpd-2.1.10-apctl.patch httpd-2.1.10-apxs.patch
httpd-2.1.10-disablemods.patch"
- # XXX: See above...
- # remove_list="httpd-2.0.54-selinux.patch httpd-2.1.10-apxs.patch
httpd-2.0.45-deplibs.patch"
- ;;
-esac
-if [ -z "${remove_list}" ]; then
- echo "applying all the rhel patches"
-else
- for patch in `echo "$remove_list"`
- do
- cat ${WHERE}/patch.sh | grep -v ${patch} > ${WHERE}/patch.sh
- done
-fi
-echo "Applying the rhel patches to ${dirsources}"
-chmod a+x ${WHERE}/patch.sh
-(cd ${dirsources}
- ${WHERE}/patch.sh
-)
-
# Replace libtool by our libtool
case ${BUILD_SYS} in
hpux*)
@@ -166,3 +89,9 @@
(cd ${dirsources}
bash buildconf
)
+
+if $has_jk; then
+(cd ${dirsources}/modules/jk
+ autoconf
+)
+fi
Added: trunk/build/unix/data/rhel-httpd.httpd
===================================================================
--- trunk/build/unix/data/rhel-httpd.httpd (rev 0)
+++ trunk/build/unix/data/rhel-httpd.httpd 2008-01-31 13:27:19 UTC (rev 1315)
@@ -0,0 +1 @@
+httpd-2.0.45-deplibs.patch httpd-2.0.54-selinux.patch httpd-2.2.2-ac260.patch
httpd-2.1.10-apctl.patch httpd-2.1.10-apxs.patch httpd-2.1.10-disablemods.patch
Added: trunk/build/unix/data/rhel-httpd.httpd.linux2
===================================================================
--- trunk/build/unix/data/rhel-httpd.httpd.linux2 (rev 0)
+++ trunk/build/unix/data/rhel-httpd.httpd.linux2 2008-01-31 13:27:19 UTC (rev 1315)
@@ -0,0 +1 @@
+httpd-2.0.45-deplibs.patch httpd-2.0.54-selinux.patch httpd-2.2.2-ac260.patch
httpd-2.1.10-apctl.patch httpd-2.1.10-apxs.patch httpd-2.1.10-disablemods.patch
Added: trunk/build/unix/util/buildrhelsrc.sh
===================================================================
--- trunk/build/unix/util/buildrhelsrc.sh (rev 0)
+++ trunk/build/unix/util/buildrhelsrc.sh 2008-01-31 13:27:19 UTC (rev 1315)
@@ -0,0 +1,137 @@
+#!/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 ""
+echo "Running : `basename $0` $LastChangedDate: 2007-06-01 18:00:27 +0200 (Fri, 01
Jun 2007) $"
+echo ""
+echo "Started : `date`"
+echo "URL : $1"
+echo "repo : $2"
+echo "tag : $3"
+echo "dir : $4"
+echo "compo : $5"
+echo "package : $6"
+echo "version : $6"
+echo ""
+
+# parameters
+# $1: URL where download sources and patches. something like
http://cvs.devel.redhat.com/repo/dist/httpd.
+# $2: repo (something like httpd/RHEL-5)
+# $3: tag for cvs repo.
+# $4: Directory where to put the sources.
+# $5: Component (in data for the list of patch that shouldn't be applied).
+# $6: package. (to find the patch that should be applied).
+# $7: package version. (to find the patch that should be applied).
+
+URL=$1
+repo=$2
+native_tag=$3
+destdir=$4
+compo=$5
+package=$6
+packageversion=$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"
+
+rhel_loc=${destdir}/srclib
+mkdir -p ${rhel_loc}/httpd
+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}`
+
+
+# download something like:
+#
http://cvs.devel.redhat.com/repo/dist/httpd/httpd-2.2.3.tar.gz/f72ffb176e...
+fname=`cat ${rhel_loc}/sources | awk '{ print $2 }'`
+dir=`cat ${rhel_loc}/sources | awk '{ print $1 }'`
+sum="NONE"
+if [ -f ${fname} ]; then
+ sum=`openssl md5 ${fname} | awk ' { print $2 } '`
+ if [ "x${sum}" = "x" ];then
+ sum=`md5sum ${fname} | awk ' { print $1 } '`
+ fi
+fi
+if [ ${dir} = ${sum} ]; then
+ echo "$fname already available"
+else
+ rm -f $fname
+ wget --tries=0 --retry-connrefused ${URL}/${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 }'`
+mv ${dirsources} ${destdir}/srclib
+dirsources=${destdir}/srclib/${dirsources}
+
+#
+# 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
+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}
+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
+ remove_list=`cat
${build_top}/data/${package}.${compo}.${tag}.${BUILD_SYS}.${BUILD_CPU}`
+elif [ -f ${build_top}/data/${package}.${compo}.${tag}.${BUILD_SYS} ]; then
+ remove_list=`cat ${build_top}/data/${package}.${compo}.${tag}.${BUILD_SYS}`
+elif [ -f ${build_top}/data/${package}.${compo}.${BUILD_SYS} ]; then
+ remove_list=`cat ${build_top}/data/${package}.${compo}.${BUILD_SYS}`
+elif [ -f ${build_top}/data/${package}.${compo} ]; then
+ remove_list=`cat ${build_top}/data/${package}.${compo}`
+else
+ remove_list=""
+fi
+if [ -z "${remove_list}" ]; then
+ echo "applying all the rhel patches"
+else
+ for patch in `echo "$remove_list"`
+ do
+ cat ${WHERE}/patch.sh | grep -v ${patch} > ${WHERE}/patch.sh
+ done
+fi
+echo "Applying the rhel patches to ${dirsources}"
+chmod a+x ${WHERE}/patch.sh
+(cd ${dirsources}
+ ${WHERE}/patch.sh
+)
Property changes on: trunk/build/unix/util/buildrhelsrc.sh
___________________________________________________________________
Name: svn:executable
+ *