summaryrefslogtreecommitdiff
path: root/build/httpd_roll_release
blob: 5303a6a87492f28bf3ed74ee3421553f3484cf0b (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
#!/bin/sh

if [ "x$1" = "xhelp" ]; 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 "Updating the site's FAQ"
(cd /www/www.apache.org/docs-2.0/misc ; cvs update)

# Now update the FAQ in the tarball
rm -f docs/manual/misc/FAQ*.html
links -source http://www.apache.org/docs-2.0/misc/FAQ.html > docs/manual/misc/FAQ.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

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

echo >> $LOG_NAME
echo "Removing files that we don't distribute" >> $LOG_NAME
find . -name ".cvsignore" -exec rm {} \; >> $LOG_NAME 
find . -type d -name "test" | xargs rm -rf >> $LOG_NAME
find . -type d -name "CVS" | 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 $WORKING_DIR-alpha.tar
compress $WORKING_DIR-alpha.tar

# 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 Tagging the tarballs

echo "Tagging 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/dev.apache.org/dist directory."