httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stri...@apache.org
Subject cvs commit: httpd-dist/tools release.sh
Date Wed, 28 May 2003 09:16:54 GMT
striker     2003/05/28 02:16:54

  Modified:    tools    release.sh
  Log:
  Remove placeholder for 1.3 releases.  Jim seems to be using a different
  script and I haven't figured out which one yet.
  
  Stop fetching FAQ from the main site.  All documentation under manual
  doesn't require SSI anymore, so we should be fine rolling as-is.
  
  Remove the disabled expand block.  As above, we don't need it anymore.
  
  Fetch the sources from the private repository (over ssh), ensuring
  that the correct stuff goes into the tarball (talk about paranoid)...
  
  Add a --security switch that allows rolling of arbitrary tags, and
  automatic application of security patches from httpd-security.  It's
  a bit crude, but it does the job.
  
  Revision  Changes    Path
  1.5       +49 -40    httpd-dist/tools/release.sh
  
  Index: release.sh
  ===================================================================
  RCS file: /home/cvs/httpd-dist/tools/release.sh,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- release.sh	28 May 2003 05:11:31 -0000	1.4
  +++ release.sh	28 May 2003 09:16:53 -0000	1.5
  @@ -2,7 +2,7 @@
   #
   # release.sh : build a release tarball
   #
  -# USAGE: release.sh PROJECT VERSION [SIGNING-USER]
  +# USAGE: release.sh [--security TAG] PROJECT VERSION [SIGNING-USER]
   #
   #   The project is either 'httpd-2.0' or 'httpd-2.1'
   #
  @@ -21,23 +21,20 @@
   
   RELEASECHECK="`echo $0 | sed 's/release.sh$/releasecheck.sh/'`"
   ${RELEASECHECK} || exit 1
  -	
  +
  +if test "$1" == "--security"; then
  +  tag="$2"
  +  security_release=1
  +  shift 2
  +fi
  +
   if test "$#" != 2 && test "$#" != 3; then
  -  echo "USAGE: $0 PROJECT VERSION [SIGNING-USER]" >&2
  +  echo "USAGE: $0 [--security TAG] PROJECT VERSION [SIGNING-USER]" >&2
     echo "  see the comments in this script for more info." >&2
     exit 1
   fi
   
   case "$1" in
  -#  httpd-1.3)
  -#    repos_name="apache-1.3"
  -#    tag_prefix="APACHE"
  -#    ver_path="src/include/httpd.h"
  -#    ver_define="SERVER_BASEREVISION"
  -#
  -#    expected_major="1"
  -#    expected_minor="3"
  -#    ;;
     httpd-2.0)
       repos_name="httpd-2.0"
       tag_prefix="APACHE"
  @@ -71,7 +68,11 @@
   minor="`echo $vsn | sed 's/^[0-9]*\.\([0-9]*\)\..*$/\1/'`"
   patch="`echo $vsn | sed 's/^.*\.//'`"
   
  -tagname="${tag_prefix}_${major}_${minor}_${patch}"
  +if test "${tag}" != ""; then
  +  tagname="${tag}"
  +else
  +  tagname="${tag_prefix}_${major}_${minor}_${patch}"
  +fi
   
   dirname="`echo $repos_name | sed 's/-[0-9]*\.[0-9]*$//'`"
   dirname="${dirname}-$vsn"
  @@ -80,6 +81,10 @@
   
   echo $split
   echo ""
  +
  +if test ${security_release}; then
  +  echo "  SECURITY RELEASE"
  +fi
   echo "  Version: $vsn"
   echo " Tag name: $tagname"
   echo "Directory: $dirname"
  @@ -104,20 +109,44 @@
   echo "Starting CVS export of ${repos_name} to $dirname ..."
   echo ""
   
  -cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic export -r ${tagname} -d ${dirname}
${repos_name} > /dev/null || exit 1
  +cvs -d cvs.apache.org:/home/cvs export -r ${tagname} -d ${dirname} ${repos_name} > /dev/null
|| exit 1
   
  -if test $apr_xxx_in_srclib
  -then
  -  ( cd $dirname/srclib &&
  -    cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic export -r ${tagname} apr >/dev/null
&&
  -    cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic export -r ${tagname} apr-util
>/dev/null
  +### Add a check to see if what was checked out matches $vsn
  +
  +if test $apr_xxx_in_srclib; then
  +  ( cd ${dirname}/srclib &&
  +    cvs -d cvs.apache.org:/home/cvs export -r ${tagname} apr >/dev/null &&
  +    cvs -d cvs.apache.org:/home/cvs export -r ${tagname} apr-util >/dev/null
     ) || exit 1
   fi
   
   echo $split
   echo ""
   
  -if grep "#define.*${ver_define}.*-dev" ${dirname}/${ver_path} > /dev/null; then
  +if test $security_release; then
  +  echo "Fixing up version define (stripping -dev)"
  +  mv ${dirname}/${ver_path} ${dirname}/${ver_path}~
  +  cat ${dirname}/${ver_path}~ | sed -e "s/\(${ver_define}.*\)-dev/\1/" > ${dirname}/${ver_path}
  +  rm ${dirname}/${ver_path}~
  +  echo ""
  +
  +  echo "Starting CVS checkout of httpd-security/patches/${vsn}-dev to ${dirname}-patches"
  +  echo ""
  +  cvs -d cvs.apache.org:/home/cvs co -d ${dirname}-patches httpd-security/patches/${vsn}-dev
> /dev/null || exit 1
  +  echo ""
  +  
  +  echo "Applying patches..."
  +  for p in `find ${dirname}-patches -type f -name '*.patch'`
  +  do
  +    ( cd $dirname &&
  +      cat ../$p | patch -p0
  +    ) || exit 1
  +  done
  +  
  +  echo $split
  +  echo ""
  +
  +elif grep "#define.*${ver_define}.*-dev" ${dirname}/${ver_path} > /dev/null; then
     echo "ERROR: ${ver_path} still defines a development version." >&2
     echo "       This script can only produce formal releases." >&2
     exit 1
  @@ -130,16 +159,6 @@
   
   echo $split
   echo ""
  -echo "Getting FAQ from master site ..."
  -echo ""
  -
  -# The FAQ contains SSI tags too complex for the expand.pl script to handle.
  -rm -f ${dirname}/docs/manual/faq/*.html
  -links -source http://httpd.apache.org/docs-2.0/faq/index.html?ONEPAGE \
  -              > ${dirname}/docs/manual/faq/index.html || exit 1
  -
  -echo $split
  -echo ""
   echo "Eliminating unwanted files (e.g. .cvsignore) and generating initial"
   echo "files via buildconf ..."
   echo ""
  @@ -158,16 +177,6 @@
   touch $dirname/modules/ssl/ssl_expr_parse.h
   touch $dirname/modules/ssl/ssl_expr_scan.c
   echo ""
  -
  -echo $split
  -echo ""
  -echo "Making sure people can read the manual (expanding SSI's)"
  -if [ -f ${dirname}/docs/manual/expand.pl ]; then
  -( cd ${dirname}/docs/manual &&
  -  chmod +x expand.pl &&
  -  ./expand.pl &&
  -  rm ./expand.pl ) || exit 1
  -fi
   
   echo $split
   echo ""
  
  
  

Mime
View raw message