You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ch...@apache.org on 2001/10/05 11:00:03 UTC

cvs commit: httpd-proxy/build build1 build12 build2 nightly2

chuck       01/10/05 02:00:03

  Added:       build    build1 build12 build2 nightly2
  Log:
  misc scripts, can be improved
  
  Revision  Changes    Path
  1.1                  httpd-proxy/build/build1
  
  Index: build1
  ===================================================================
  #!/bin/sh
  
  date=`date +%C%y%m%d%H%M%S`
  origdir=`pwd`
  indir=$origdir/src
  outdir=apache-1.3+mod_proxy
  pkgs="apache-1.3 httpd-docs-1.3 httpd-proxy"
  psvr=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
  tarname=$outdir"_"$date
  compressext=".tar.Z"
  gzipext=".tar.gz"
  zipext=".zip"
  
  echo checking out $pkgs
  mkdir $indir
  cd $indir
  cvs -Q -d $psvr co $pkgs
  cd $origdir
  
  echo building $outdir
  cp -R $indir/apache-1.3 .
  mv apache-1.3 $outdir
  cp -R $indir/httpd-docs-1.3/htdocs $outdir
  cp -R $indir/httpd-docs-1.3/apidocs $outdir
  
  cp -R $indir/httpd-proxy/module-1.0/* $outdir/src/modules/proxy
  cp -R $indir/httpd-proxy/module-1.0/.[a-z]* $outdir/src/modules/proxy
  cd $outdir
  patch -s -p0 < src/modules/proxy/http_protocol.c.patch
  cd $origdir
  
  echo building $tarname$gzipext
  tar czf $tarname$gzipext $outdir
  
  echo cleaning up
  rm -rf $outdir
  rm -rf $indir
  find $origdir -name "${tarname}*" -mtime 2 -exec rm -f {} \;
  
  echo done
  exit 0
  
  
  
  1.1                  httpd-proxy/build/build12
  
  Index: build12
  ===================================================================
  #!/bin/sh
  #
  # This script will build (in the current directory, for testing, or in
  # $destdir, ultimately) CVS snapshots of apache-1.3-current and
  # httpd-2.0-current, plus the mod_proxy changes for each. 
  #
  
  date=`date +%C%y%m%d%H%M%S`
  origdir=`pwd`
  indir=$origdir/src
  outdir1=apache-1.3+mod_proxy
  outdir2=httpd-2.0
  destdir=/www/cvs.apache.org/builds/httpd-proxy
  #pkgs="apache-1.3 apr apr-util httpd-2.0 httpd-docs-1.3 httpd-proxy"
  pkgs="apache-1.3 apr apr-util httpd-2.0 httpd-docs-1.3"
  psvr=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
  tarname1=$outdir1"_"$date
  tarname2=$outdir2"_"$date
  compressext=".tar.Z"
  gzipext=".tar.gz"
  zipext=".zip"
  
  echo checking out $pkgs
  mkdir $indir
  cd $indir
  cvs -Q -d $psvr co $pkgs
  cd $origdir
  
  echo building $outdir1
  cp -R $indir/apache-1.3 .
  mv apache-1.3 $outdir1
  cp -R $indir/httpd-docs-1.3/htdocs $outdir1
  cp -R $indir/httpd-docs-1.3/apidoc $outdir1
  
  cp -R $indir/httpd-proxy/module-1.0/* $outdir1/src/modules/proxy
  cp -R $indir/httpd-proxy/module-1.0/.[a-z]* $outdir1/src/modules/proxy
  cd $outdir1
  patch -s -p0 < src/modules/proxy/http_protocol.c.patch
  cd $origdir
  
  echo building $outdir2
  cp -R $indir/httpd-2.0 .
  #mv httpd-2.0 $outdir2
  cp -R $indir/apr ./$outdir2/srclib
  cp -R $indir/apr-util ./$outdir2/srclib
  
  #cp -R $indir/httpd-proxy/module-2.0/* $outdir2/modules/proxy
  #cp -R $indir/httpd-proxy/module-2.0/.[a-z]* $outdir2/modules/proxy
  #cp $indir/httpd-proxy/docs/mod_proxy.html $outdir2/docs/manual/mod
  
  cd $outdir2
  ./buildconf
  cd $origdir
  
  echo building $tarname1$gzipext
  tar czf $tarname1$gzipext $outdir1
  mv $tarname1$gzipext $destdir
  
  echo building $tarname2$gzipext
  tar czf $tarname2$gzipext $outdir2
  mv $tarname2$gzipext $destdir
  
  echo cleaning up
  rm -rf $indir
  rm -rf $outdir1
  rm -rf $outdir2
  rm -f /tmp/acin*	# autoconf crud
  find $destdir -name "${outdir1}*" -mtime 2 -exec rm -f {} \;
  find $destdir -name "${outdir2}*" -mtime 2 -exec rm -f {} \;
  
  echo done
  exit 0
  
  
  
  1.1                  httpd-proxy/build/build2
  
  Index: build2
  ===================================================================
  #!/bin/sh
  #
  # This script will build (in the current directory, for testing, or in
  # $destdir, ultimately) a CVS snapshot of
  # httpd-2.0-current, plus the mod_proxy changes. 
  #
  
  date=`date +%C%y%m%d%H%M%S`
  origdir=`pwd`
  indir=$origdir/src
  outdir2=httpd-2.0+mod_proxy
  destdir=.	# /www/cvs.apache.org/builds/httpd-proxy
  pkgs="apr apr-util httpd-2.0 httpd-proxy"
  psvr=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
  tarname2=$outdir2"_"$date
  compressext=".tar.Z"
  gzipext=".tar.gz"
  zipext=".zip"
  
  echo checking out $pkgs
  mkdir $indir
  cd $indir
  cvs -Q -d $psvr co $pkgs
  cd $origdir
  
  echo building $outdir2
  cp -R $indir/httpd-2.0 .
  mv httpd-2.0 $outdir2
  cp -R $indir/apr ./$outdir2/srclib
  cp -R $indir/apr-util ./$outdir2/srclib
  
  cp -R $indir/httpd-proxy/module-2.0/* $outdir2/modules/proxy
  cp -R $indir/httpd-proxy/module-2.0/.[a-z]* $outdir2/modules/proxy
  cp $indir/httpd-proxy/docs/mod_proxy.html $outdir2/docs/manual/mod
  
  cd $outdir2
  ./buildconf
  cd $origdir
  
  echo building $tarname2$gzipext
  tar czf $tarname2$gzipext $outdir2
  #mv $tarname2$gzipext $destdir
  
  echo cleaning up
  rm -rf $indir
  rm -rf $outdir2
  rm -f /tmp/acin*	# autoconf crud
  # these become "find $destdir..." when the mvs above are uncommented
  #find $destdir -name "${outdir2}*" -mtime 2 -exec rm -f {} \;
  
  echo done
  exit 0
  
  
  
  1.1                  httpd-proxy/build/nightly2
  
  Index: nightly2
  ===================================================================
  #!/bin/sh
  #
  # nightly2 - build httpd-2.0 complete and log everything
  #
  # uses pwd for everything
  # mails errorlog iff errors occur
  # can be extended to read script fragments to add modules for
  #   rollup builds
  #
  
  # canonical date for naming things
  date=`date +%C%y%m%d%H%M%S`
  # OS for logging
  opsys=`uname -sr`
  # where were we now? everything builds here
  origdir=`pwd`
  # CVS checkout dir
  indir=$origdir/src
  # build dir
  outdir=httpd-2.0-nightly
  # logs go here
  destdir=/www/cvs.apache.org/builds/httpd-proxy/logs
  # error log
  errfile=$origdir/$date.errlog
  # output log
  outfile=$origdir/$date.outlog
  # base packages
  basepkgs="httpd-2.0"
  # additional packages to check out and merge
  #addpkgs="apr apr-util httpd-proxy"
  addpkgs="apr apr-util"
  # packages to check out
  pkgs="$basepkgs $addpkgs"
  # where to get them
  psvr=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
  # server config
  cfgopts="--enable-maintainer-mode --enable-auth-anon --enable-auth-dbm --enable-auth-db --enable-auth-digest --enable-file-cache --enable-echo --enable-cache --enable-example --enable-ext-filter --enable-case-filter --enable-case-filter-in --enable-optional-hook-export --enable-optional-hook-import --enable-optional-fn-import --enable-optional-fn-export --enable-mime-magic --enable-cern-meta --enable-expires --enable-headers --enable-usertrack --enable-unique-id --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-dav --enable-info --enable-suexec --enable-cgi --enable-cgid --enable-dav-fs --enable-vhost-alias --enable-speling --enable-rewrite --enable-ssl --with-ssl=/usr --enable-rule=SSL_EXPERIMENTAL"
  # what we don't turn on
  nocfgopts="--enable-charset-lite --enable-disk-cache --enable-tls --with-tls=/usr"
  # who to bother (CHANGE FOR TESTING)
  mailto="modproxy-dev@apache.org"
  #mailto="chuck@topsail.org"
  # link to logs
  thelink="http://cvs.apache.org/builds/httpd-proxy/logs/"
  # number of lines of fixed output
  fixlines=10
  # number of additional (merged) modules
  addlines=`echo $addpkgs | wc -w`
  # number of lines in errorless output
  msglines=`expr $fixlines + $addlines`
  # vars for building releases later
  tarname=$outdir"_"$date
  compressext=".tar.Z"
  gzipext=".tar.gz"
  zipext=".zip"
  
  emitmsg () {
      local msg; local errfile; local outfile
  
      echo $msg; echo $msg >> $errfile; echo $msg >> $outfile
  
      return $?
  }
  
  build2main () {
      local indir; local outdir
  
      cp -R $indir/httpd-2.0 .
      mv httpd-2.0 $outdir
  
      return $?
  }
  
  build_apr () {
      local indir; local outdir; local repdir
  
      cp -R $indir/$repdir $outdir/srclib/
  
      return $?
  }
  
  build_apr-util () {
      local indir; local outdir; local repdir
  
      cp -R $indir/$repdir $outdir/srclib/
  
      return $?
  }
  
  build_httpd-proxy () {
      local indir; local outdir; local repdir
  
      cp -R $indir/$repdir/module-2.0/* $outdir/modules/proxy
      cp -R $indir/$repdir/module-2.0/.[a-z]* $outdir/modules/proxy
      cp $indir/$repdir/docs/mod_proxy.html $outdir/docs/manual/mod
  
      return $?
  }
  
  datenow=`date`
  msg="Build started $datenow on $opsys"; emitmsg
  
  msg="Checking out $pkgs"; emitmsg
  mkdir $indir
  cd $indir
  cvs -q -d $psvr co $pkgs 2>> $errfile >> $outfile
  cd $origdir
  
  msg="Building $outdir"; emitmsg
  build2main 2>> $errfile >> $outfile
  
  # this loop should eventually execute a script fragment in each additional
  # module's repository merging it into the big build automagically
  for repdir in $addpkgs; do
      msg="Merging package $repdir"; emitmsg
      build_$repdir 2>> $errfile >> $outfile
  done
  
  cd $outdir
  msg="Building config in $outdir"; emitmsg
  ./buildconf 2>> $errfile >> $outfile
  
  msg="Configuring in $outdir w/options $cfgopts"; emitmsg
  msg="Not configured: $nocfgopts"; emitmsg
  ./configure $cfgopts 2>> $errfile >> $outfile
  
  msg="Making in $outdir"; emitmsg
  make -k 2>> $errfile >> $outfile
  
  datenow=`date`
  msg="Build finished $datenow"; emitmsg
  
  cd $origdir
  echo >> $errfile
  echo $thelink >> $errfile
  # any number of lines other than an empty run is an error
  errlines=`wc -l $errfile | tr -s " " | cut -d " " -f 2`
  if [ "${errlines}" != "${msglines}" ]; then
      mail -s"httpd-2.0 nightly build log" $mailto < $errfile
  fi
  # COMMENT OUT FOR TESTING - leaves logs in $origdir
  mv $date* $destdir
  
  echo cleaning up
  rm -rf $outdir
  rm -rf $indir
  rm -f /tmp/acin*	# leftover autoconf crud
  find $destdir -name "*" -mtime 29 -exec rm -f {} \;
  
  echo done
  exit 0