summaryrefslogtreecommitdiff
path: root/build/httpd_roll_release
blob: ec4be2d379bcd8e0aad4484bdf6ed3738fc3a714 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/bin/sh

export CVSROOT=cvs.apache.org:/home/cvs

if [ "x$1" = "xhelp" -o "x$2" = "x" ]; then
    echo "Usage:  ./httpd_roll_release tag log_name [user]"
    echo "tag        the tag to use when checking out the repository"
    echo "log_name   the name of a file to log the results to."
    echo "user       An optional user name to use when siging the release"
    exit
else
    TAG=$1
fi

LOG_NAME=`pwd`/$2

USER=$3

REPO="httpd-2.0"
WORKING_DIR=`echo "$REPO" | sed -e 's/[\-\.]/./g'`
WORKING_TAG=`echo "$TAG" | sed -e 's/APACHE_2_0_/./'`
WORKING_DIR="$WORKING_DIR$WORKING_TAG"

START_DIR=`echo "$PWD"`

# Check out the correct repositories.
echo "Checking out repository $REPO into $WORKING_DIR using tag $TAG"

umask 022
echo Checking out httpd-2.0 > $LOG_NAME
cvs checkout -r $TAG -d $WORKING_DIR $REPO >> $LOG_NAME
cd $WORKING_DIR/srclib
echo "Checking out apr, and apr-util" >> $LOG_NAME
cvs checkout -r $TAG apr apr-util >> $LOG_NAME
cd $START_DIR/$WORKING_DIR

# Make sure the master site's FAQ is up-to-date.  It doesn't hurt to do this
# all the time.  :-)
echo "REMEMBER TO UPDATE THE SITE'S FAQ!!"
#(cd /www/httpd.apache.org/docs-2.0/faq/; cvs update)

# Now update the FAQ in the tarball via a download from the master site.
# The FAQ contains SSI tags too complex for the expand.pl script to handle.
rm -f docs/manual/faq/*.html
links -source http://httpd.apache.org/docs-2.0/faq/index.html?ONEPAGE \
              > docs/manual/faq/index.html

# Create the configure scripts
echo "Creating the configure script"
cd $START_DIR/$WORKING_DIR

echo >> $LOG_NAME
echo "Running ./buildconf" >> $LOG_NAME
./buildconf >> $LOG_NAME

echo >> $LOG_NAME
echo "Fixup the timestamp on modules/ssl/ssl_expr_parse.c" >> $LOG_NAME
touch modules/ssl/ssl_expr_parse.c >> $LOG_NAME

# Remove any files we don't distribute with our code
rm -f STATUS

echo >> $LOG_NAME
echo "Removing files that we don't distribute"
echo "Removing files that we don't distribute" >> $LOG_NAME
find . -name ".cvsignore" -exec rm {} \; >> $LOG_NAME 
find . -type d -name "CVS" | xargs rm -rf >> $LOG_NAME
find . -type d -name "autom4te.cache" | xargs rm -rf >> $LOG_NAME

# expand SSI directives in the manual
echo "Making sure people can read the manual (expanding SSI's)"

echo >> $LOG_NAME
echo "Making sure people can read the manual (expanding SSI's)" >> $LOG_NAME
( cd docs/manual ; chmod +x expand.pl ; ./expand.pl ; rm ./expand.pl ) >> $LOG_NAME

# Time to roll the tarball
echo "Rolling the tarballs"

cd $START_DIR
echo >> $LOG_NAME
echo "Rolling the tarball" >> $LOG_NAME
tar cvf $WORKING_DIR-alpha.tar $WORKING_DIR >> $LOG_NAME
cp -p $WORKING_DIR-alpha.tar x$WORKING_DIR-alpha.tar
gzip -9 $WORKING_DIR-alpha.tar
mv x$WORKING_DIR-alpha.tar httpd.tar
compress httpd.tar
mv httpd.tar.Z $WORKING_DIR-alpha.tar.Z

# Test the tarballs
echo "Testing the tarball"

echo >> $LOG_NAME
echo "Testing the tarball $WORKING_DIR-alpha.tar.gz" >> $LOG_NAME
gunzip -c $WORKING_DIR-alpha.tar.gz | tar tvf - >> $LOG_NAME
zcat $WORKING_DIR-alpha.tar.Z | tar tvf - >> $LOG_NAME

# remember the CHANGES file
echo "Copying the CHANGES file to this directory"
cp $WORKING_DIR/CHANGES .

# cleanup
echo "Cleaning up my workspace"
rm -fr $WORKING_DIR

if [ "x$USER" != "x" ]; then
    USER="-u $USER"
fi

echo Signing the tarballs

echo "Signing the tarballs" >> $LOG_NAME
pgp -sba $WORKING_DIR-alpha.tar.gz $USER
pgp -sba $WORKING_DIR-alpha.tar.Z $USER

pgp $WORKING_DIR-alpha.tar.gz.asc $WORKING_DIR-alpha.tar.gz >> $LOG_NAME
pgp $WORKING_DIR-alpha.tar.Z.asc $WORKING_DIR-alpha.tar.Z >> $LOG_NAME

echo "Don't forget to make the tarballs available by copying them to the"
echo "/www/httpd.apache.org/dev/dist directory."