httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject script for building binary releases
Date Wed, 13 Aug 1997 04:09:12 GMT
Included below is my first go at a script for making binary releases.  The
release and gzcat lines are the two things that are most likely to need
configuring.  You start with the source tarball, and end up with a .tar.gz
and a .tar.Z binary release.

I am currently using the output from GuessOS to name the binary release.
That isn't the greatest, both beacuse it is ugly and some platforms
include a / in it; / don't work in filenames.  eg.

	9000/777-hp-hpux10.

That particular output would also be ugly because there would be two .s.
Not sure the best solution.  Make people who run the script give a
platform name?  Try to figure it out ourself?  Enchance GuessOS so it has
an option to give better-for-binary-release names?

The script also isn't particularily nice about partial completions; either
you run the whole thing or you go it by hand.  A better approach would
probably be to add a flag you could set to have it pause after each step
and wait for you to hit a key, that way you could fiddle with anything
necessary.

I have attached a Configuration file that is close to what I would
suggest.  More interesting is probably the diff:

165c165
< # Module status_module       mod_status.o
---
> Module status_module       mod_status.o
170c170
< # Module info_module         mod_info.o
---
> Module info_module         mod_info.o
230c230
< # Module db_auth_module      mod_auth_db.o
---
> Module db_auth_module      mod_auth_db.o
259c259
< # Module expires_module      mod_expires.o
---
> Module expires_module      mod_expires.o
264c264
< # Module headers_module      mod_headers.o
---
> Module headers_module      mod_headers.o

I think status and info should be there.

Either db or dbm (depending on the platform) should be there.

I'm not particular about the rest.  If a Configuration file is made
available at the time of release, all you should have to do is put the
tarball and Configuration file in a directory and run the script.  That
is, of course, assuming it works right.

I don't know about everyone else, but this makes it a lot more likely that
I will build binary releases.

Comments appreciated, of course.  No, I don't claim to be a sh guru.  

#!/bin/sh 
#
# $Id: binbuild.sh,v 1.2 1997/08/13 03:57:03 marcs Exp marcs $
# Marc Slemko (marcs@znep.com)
#
# Script to make Apache binary releases.  The below variables must be
# set correctly, and both the tarball and the Configuration file that
# you wish to use must be present in the cwd before running the script
#

# setup to give them a warning that things didn't finish correctly
# since I am too lazy to put proper error messages everywhere
trap 'echo ERROR: abnormal exit, binary release not properly built; exit 1' 0 1 2 3 15

# release is the release of the Apache version that is being built.
# It must also be the base name of the tarball and the name of the
# directory that it is untarred into
release=apache_1.2.3-dev
dir=$release
# conf is the Configuration file that you wish to use to build httpd
conf=Configuration
# gzcat should be set to something that will take a .tar.gz as an 
# argument and send the uncompressed .tar to stdout.  On some systems,
# it will be zcat
gzcat=gzcat

# ensure proper permissions
umask 022

echo untarring release tarball
$gzcat $release.tar.gz | tar xf -
if [ ! -d $release ] ; then
    echo ERROR: $release directory does not exist after untarring
    exit 1
fi
# system is the name of the system used to name both the binary and
# the generated tarballs.  GuessOS is not used because it gives 
# particularily nice names but because it is easy
system=`./$release/src/helpers/GuessOS` || exit 1

cp $conf $dir/src/Configuration || exit 1
cd $dir/src || exit 1
echo running Configure
./Configure || exit 1
echo attempting to make httpd
make 2>&1 | tee ../../make.out-$system
if [ ! -f httpd ] ; then
    echo error: httpd binary not made
    exit 1
fi
echo make succeeded, saving the binary and doing a make clean
mv httpd httpd-$system
make clean || exit 1
cd ../.. || exit 1

echo creating tar file
tar cf - $release > $release-$system.tar || exit 1
echo creating tar.gz file
gzip -c $release-$system.tar > $release-$system.tar.gz || exit 1
echo creating tar.Z file
compress -c $release-$system.tar > $release-$system.tar.Z || exit 1

echo Binary build complete.  Remember to create the proper README
echo file for the build and sign it if appropriate.
trap 0 1 2 3 15

Mime
View raw message