httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From field...@hyperreal.org
Subject cvs commit: apache-1.3/src/helpers binbuild.sh findprg.sh
Date Tue, 05 Jan 1999 05:14:53 GMT
fielding    99/01/04 21:14:52

  Modified:    .        STATUS config.layout
               src      CHANGES
  Added:       src/helpers binbuild.sh findprg.sh
  Log:
  Added binbuild.sh and findprg.sh helpers to make it easier for us
  to build binary distributions.  This is Lars' "take 2" version of 12/26.
  
  Submitted by:	Lars Eilebrecht
  Reviewed by:	Roy Fielding, Randy Terbush
  
  Revision  Changes    Path
  1.589     +17 -56    apache-1.3/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.588
  retrieving revision 1.589
  diff -u -r1.588 -r1.589
  --- STATUS	1999/01/05 01:03:03	1.588
  +++ STATUS	1999/01/05 05:14:49	1.589
  @@ -1,5 +1,5 @@
     1.3 STATUS:
  -  Last modified at [$Date: 1999/01/05 01:03:03 $]
  +  Last modified at [$Date: 1999/01/05 05:14:49 $]
   
   Release:
   
  @@ -33,59 +33,24 @@
   
   RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP:
   
  -    * How should an Apache binary release tarball look?
  +    * Randy's proposed changes for binbuild:
       
  -      - A proposed solution is available.
  -        See: <XFMail.981213175013.sfx@unix-ag.org>
  -             <XFMail.981226052910.sfx@unix-ag.org>
  -
  -      1. The "old" way where it is just a source release tarball
  -         plus a pre-compiled src/httpd-<gnutriple>. It is created
  -         via the apache-devsite/binbuild.sh script which
  -         - creates the build tree
  -         - creates the src/Configuration file with standard modules
  -         - runs "make"
  -         - renames src/httpd to src/httpd-<gnutriple>
  -         - runs "make clean"
  -         - packs the build tree stuff together
  -         Already known discussion points:
  -         - should src/httpd be renamed or not because a lot
  -           of PRs say they cannot find the httpd :-(
  -         Status: Ralf -0, Ken +0, Randy -1
  -
  -      2. The way some other projects release binary tarballs, i.e.
  -         a package containing the installed (binary) files.
  -         It can be created by a script which
  -         - creates the build tree
  -         - runs "./configure --prefix=/usr/local/apache \
  -                             --enable-shared=remain \
  -                             --disable-module=auth_db \
  -                             --enable-suexec ..."
  -         - runs "make install root=apache-root"
  -         - packs the stuff together from ./apache-root only!!
  -         Already known discussion points:
  -         - should there be a prefix usr/local/apache in 
  -           the tarball or not?  Some people think
  -           it's useful while others dislike it a lot.
  -	 - it doesn't include the source.
  -	 - the paths don't match the original Apache style, nor the Win32
  -	   paths
  -	 - should suexec be prebuilt in a binary tarball?
  -         Status: Randy, +1, Ralf +1, Martin +1, Roy -1,
  -                 Ken +1 (IFF source is included,
  -		 there's no usr/local/apache prefix in the tarball, AND the
  -		 old-style [common with Win32] paths are used)
  -
  -      3. A source release tarball with three extra directories:
  -            lib: for the shared library object files
  -            bin: for the httpd and support executables
  -            man: for the man files (if desired)
  -         as if the server was installed in those directories.
  -         Status: Roy +1, Jim +1 (still need to define which modules
  -	 	 are built)
  -                 Ralf -0 (I dislike mixed source+binary tarballs)
  -                 Randy -1 (those wanting binary dists don't want source)
  +      1. Change to build binary only distribution
   
  +      2. Use standard Apache layout
  +         [It is currently using the BinaryDistribution layout that mimics
  +          the standard Apache layout _without_ any absolute paths in it
  +          (apart from HTTPD_ROOT /usr/local/apache). This makes it possible
  +          for a user to install it in _any_ directory.]
  +         [Roy: I don't understand what Randy wants to change here.]
  +
  +      3. Add 'make dist' target to call binbuild.sh
  +         [Roy: That would require a Makefile, which is what binbuild creates.
  +               I don't see any point in that.]
  +
  +      4. Create toplevel 'setup' script for install to mirror win32 name
  +         [It is currently creating "install-bindist.sh"]
  +
   Documentation that needs writing:
   
       * Need a document explaining mod_rewrite/"UseCanonicalName off" based
  @@ -95,10 +60,6 @@
            vhost-xxx.html document out of it. -- rse
   
   Available Patches:
  -
  -    * Lars' 'binbuild' patch
  -        Message-ID: <XFMail.981226052910.sfx@unix-ag.org>
  -        Status: Lars +1
   
       * Jim Patterson's patch to make mod_info work on Win32
           Message-ID: PR#1442
  
  
  
  1.3       +16 -0     apache-1.3/config.layout
  
  Index: config.layout
  ===================================================================
  RCS file: /home/cvs/apache-1.3/config.layout,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- config.layout	1998/12/16 15:57:28	1.2
  +++ config.layout	1999/01/05 05:14:49	1.3
  @@ -44,3 +44,19 @@
       proxycachedir: $localstatedir/proxy
   </Layout>
   
  +#   Apache binary distribution path layout
  +<Layout BinaryDistribution>
  +    prefix:        /usr/local/apache
  +    exec_prefix:
  +    bindir:        bin
  +    sbindir:       bin
  +    libexecdir:    libexec
  +    mandir:        man
  +    sysconfdir:    conf
  +    datadir:
  +    includedir:    include
  +    localstatedir:
  +    runtimedir:    logs
  +    logfiledir:    logs
  +    proxycachedir: proxy
  +</Layout>
  
  
  
  1.1202    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1201
  retrieving revision 1.1202
  diff -u -r1.1201 -r1.1202
  --- CHANGES	1999/01/04 19:49:36	1.1201
  +++ CHANGES	1999/01/05 05:14:50	1.1202
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.4
   
  +  *) Added binbuild.sh and findprg.sh helpers to make it easier for us
  +     to build binary distributions. [Lars Eilebrecht]
  +
     *) IndexOptions SuppressColumnSorting only turned off making
        the column headers anchors; you could still change the display
        order by manually adding a '?N=A' or similar query string to the
  
  
  
  1.1                  apache-1.3/src/helpers/binbuild.sh
  
  Index: binbuild.sh
  ===================================================================
  #!/bin/sh
  #
  # binbuild.sh - Builds an Apache binary distribution.
  # Initially written by Lars Eilebrecht <lars@apache.org>.
  #
  # This script falls under the Apache License.
  # See http://www.apache.org/docs/LICENSE
  
  
  APDIR=$(basename $(pwd))
  VER=$(echo $APDIR |sed s/apache-//)
  OS=$(src/helpers/GuessOS)
  USER="$(src/helpers/buildinfo.sh -n %u@%h%d)"
  TAR="$(src/helpers/findprg.sh tar)"
  GTAR="$(src/helpers/findprg.sh gtar)"
  GZIP="$(src/helpers/findprg.sh gzip)"
  CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most --enable-shared=max"
  
  if [ ! -f ./ABOUT_APACHE ]
  then
    echo "ERROR: The current directory contains no valid Apache distribution."
    echo "Please change the directory to the top level directory of a freshly"
    echo "unpacked Apache 1.3 source distribution and re-execute the script"
    echo "'./src/helpers/bindbuild.sh'." 
    exit 1;
  fi
  
  if [ -d ./CVS ]
  then
    echo "ERROR: The current directory is a CVS checkout of Apache."
    echo "Only a standard Apache 1.3 source distribution should be used to"
    echo "create a binary distribution."
    exit 1;
  fi
  
  echo "Building Apache $VER binary distribution..."
  echo "Platform is \"$OS\"..."
  
  ( echo "Build log for Apache binary distribution" && \
    echo "----------------------------------------------------------------------" &&
\
    ./configure $CONFIGPARAM && \
    echo "----------------------------------------------------------------------" &&
\
    make clean && \
    rm -rf bindist install-bindist.sh *.bindist
    echo "----------------------------------------------------------------------" &&
\
    make && \
    echo "----------------------------------------------------------------------" &&
\
    make install-quiet root="bindist/" && \
    echo "----------------------------------------------------------------------" &&
\
    make clean && \
    echo "----------------------------------------------------------------------" &&
\
    echo "[EOF]" \
  ) > build.log 2>&1
  
  if [ ! -f ./bindist/bin/httpd ]
  then
    echo "ERROR: Failed to build Apache. See \"build.log\" for details."
    exit 1;
  fi
  
  echo "Binary images successfully created..."
  echo "Creating supplementary files..."
  
  ( echo " " && \
    echo "Apache $VER binary distribution" && \
    echo "================================" && \
    echo " " && \
    echo "This binary distribution is usable on a \"$OS\"" && \
    echo "system and was built by \"$USER\"." && \
    echo "" && \
    echo "The distribution contains all standard Apache modules as shared" && \
    echo "objects. This allows you to enable or disable particular modules" && \
    echo "with the LoadModule/AddModule directives in the configuration file" && \
    echo "without the need to re-compile Apache." && \
    echo "" && \
    echo "See \"INSTALL.bindist\" on how to install the distribution." && \
    echo " " && \
    echo "NOTE: Please do not send support-related mails to the address mentioned" &&
\
    echo "      above or to any member of the Apache Group! Support questions" &&
\
    echo "      should be directed to the \"comp.infosystems.www.servers.unix\"" &&
\
    echo "      or \"comp.infosystems.www.servers.ms-windows\" newsgroup" && \
    echo "      (as appropriate for the platform you use), where some of the" && \
    echo "      Apache team lurk, in the company of many other Apache gurus" && \
    echo "      who should be able to help." && \
    echo "      If you think you found a bug in Apache or have a suggestion please" &&
\
    echo "      visit the bug report page at http://www.apache.org/bug_report.html" &&
\
    echo " " && \
    echo "----------------------------------------------------------------------" &&
\
    ./bindist/bin/httpd -V && \
    echo "----------------------------------------------------------------------" \
  ) > README.bindist
  cp README.bindist ../apache-$VER-$OS.README
  
  ( echo " " && \
    echo "Apache $VER binary installation" && \
    echo "================================" && \
    echo " " && \
    echo "To install this binary distribution you have to execute the installation" &&
\
    echo "script \"install-bindist.sh\" in the top-level directory of the distribution." &&
\
    echo " " && \
    echo "The script takes the ServerRoot directory into which you want to install" &&
\
    echo "Apache as an option. If you ommit the option the default path" && \
    echo "\"/usr/local/apache\" is used." && \
    echo "Make sure you have write permissions in the target directory, e.g. switch" &&
\
    echo "to user \"root\" before you execute the script." && \
    echo " " && \
    echo "See \"README.bindist\" for further details about this distribution." &&
\
    echo " " && \
    echo "Please note that this distribution includes the complete Apache source code." &&
\
    echo "Therefore you may compile Apache yourself at any time if you have a compiler" &&
\
    echo "installation on your system." && \
    echo "See \"INSTALL\" for details on how to accomplish this." && \
    echo " " \
  ) > INSTALL.bindist
  
  ( echo "#!/bin/sh" && \
    echo "#" && \
    echo "# Usage: install-bindist.sh [ServerRoot]" && \
    echo "# This script installs the Apache binary distribution and" && \
    echo "# was automatically created by binbuild.sh." && \
    echo " " && \
    echo "if [ .\$1 = . ]" && \
    echo "then" && \
    echo "  SR=/usr/local/apache" && \
    echo "else" && \
    echo "  SR=\$1" && \
    echo "fi" && \
    echo "echo \"Installing binary distribution for platform $OS\"" && \
    echo "echo \"into directory \$SR ...\"" && \
    echo "./src/helpers/mkdir.sh \$SR" && \
    echo "cp -r bindist/proxy \$SR/proxy" && \
    echo "cp -r bindist/man \$SR/man" && \
    echo "cp -r bindist/logs \$SR/logs" && \
    echo "cp -r bindist/libexec \$SR/libexec" && \
    echo "cp -r bindist/include \$SR/include" && \
    echo "cp -r bindist/icons \$SR/icons" && \
    echo "cp -r bindist/cgi-bin \$SR/cgi-bin" && \
    echo "cp -r bindist/bin \$SR/bin" && \
    echo "if [ -d \$SR/conf ]" && \
    echo "then" && \
    echo "  echo \"[Preserving existing configuration files.]\"" && \
    echo "  cp -r bindist/conf/*.default \$SR/conf/" && \
    echo "else" && \
    echo "  cp -r bindist/conf \$SR/conf" && \
    echo "fi" && \
    echo "if [ -d \$SR/htdocs ]" && \
    echo "then" && \
    echo "  echo \"[Preserving existing htdocs directory.]\"" && \
    echo "else" && \
    echo "  cp -r bindist/htdocs \$SR/htdocs" && \
    echo "fi" && \
    echo "sed -e s%/usr/local/apache%\$SR/% \$SR/conf/httpd.conf.default > \$SR/conf/httpd.conf"
&& \
    echo "sed -e s%PIDFILE=%PIDFILE=\$SR/% -e s%HTTPD=%HTTPD=\\\"\$SR/% -e \"s%/httpd$%/httpd
-d \$SR\\\"%\" bindist/bin/apachectl > \$SR/bin/apachectl" && \
    echo " " && \
    echo "echo \"Ready.\"" && \
    echo "echo \" +--------------------------------------------------------+\"" &&
\
    echo "echo \" | You now have successfully installed the Apache $VER   |\"" &&
\
    echo "echo \" | HTTP server. To verify that Apache actually works      |\"" &&
\
    echo "echo \" | correctly you now should first check the (initially    |\"" &&
\
    echo "echo \" | created or preserved) configuration files              |\"" &&
\
    echo "echo \" |                                                        |\"" &&
\
    echo "echo \" |   \$SR/conf/httpd.conf\"" && \
    echo "echo \" |                                                        |\"" &&
\
    echo "echo \" | and then you should be able to immediately fire up     |\"" &&
\
    echo "echo \" | Apache the first time by running:                      |\"" &&
\
    echo "echo \" |                                                        |\"" &&
\
    echo "echo \" |   \$SR/bin/apachectl start \"" &&\
    echo "echo \" |                                                        |\"" &&
\
    echo "echo \" | Thanks for using Apache.       The Apache Group        |\"" &&
\
    echo "echo \" |                                http://www.apache.org/  |\"" &&
\
    echo "echo \" +--------------------------------------------------------+\"" &&
\
    echo "echo \" \"" \
  ) > install-bindist.sh
  chmod 755 install-bindist.sh
  
  sed -e "s%\"/htdocs%\"/usr/local/apache/htdocs%" \
      -e "s%\"/icons%\"/usr/local/apache/icons%" \
      -e "s%\"/cgi-bin%\"/usr/local/apache/cgi-bin%" \
      -e "s%^ServerAdmin.*%ServerAdmin you@your.address%" \
      -e "s%#ServerName.*%#ServerName localhost%" \
      -e "s%Port 8080%Port 80%" \
      bindist/conf/httpd.conf.default > bindist/conf/httpd.conf
  cp bindist/conf/httpd.conf bindist/conf/httpd.conf.default
  
  echo "Creating distribution archive and readme file..."
   
  if [ ".`grep -i error build.log > /dev/null`" != . ]
  then
    echo "ERROR: Failed to build Apache. See \"build.log\" for details."
    exit 1;
  else
    if [ ".$GTAR" != . ]
    then
      $GTAR -zcf ../apache-$VER-$OS.tar.gz -C .. --owner=root --group=root apache-$VER
    else
      if [ ".$TAR" != . ]
      then
        $TAR -cf ../apache-$VER-$OS.tar -C .. apache-$VER
        if [ ".$GZIP" != . ]
        then
          $GZIP ../apache-$VER-$OS.tar
        fi
      else
        echo "ERROR: Could not find a 'tar' program!"
        echo "       Please execute the following commands manually:"
        echo "         tar -cf ../apache-$VER-$OS.tar ."
        echo "         gzip ../apache-$VER-$OS.tar"
      fi
    fi
  
    if [ -f ../apache-$VER-$OS.tar.gz ] && [ -f ../apache-$VER-$OS.README ]
    then
      echo "Ready."
      echo "You can find the binary archive (apache-$VER-$OS.tar.gz)"
      echo "and the readme file (apache-$VER-$OS.README) in the"
      echo "parent directory."
      exit 0;
    else
      exit 1;
    fi
  fi
  
  
  
  1.4       +19 -61    apache-1.3/src/helpers/findprg.sh
  
  
  
  

Mime
View raw message