]> granicus.if.org Git - apache/blob - build/httpd_roll_release
6eaaf51223fc20b099b3616d0b360a0d925b046d
[apache] / build / httpd_roll_release
1 #!/bin/sh
2
3 if [ "x$1" = "xhelp" ]; then
4     echo "Usage:  ./httpd_roll_release tag log_name [user]"
5     echo "tag        the tag to use when checking out the repository"
6     echo "log_name   the name of a file to log the results to."
7     echo "user       An optional user name to use when siging the release"
8     exit
9 else
10     TAG=$1
11 fi
12
13 LOG_NAME=`pwd`/$2
14
15 USER=$3
16
17 REPO="httpd-2.0"
18 WORKING_DIR=`echo "$REPO" | sed -e 's/[\-\.]/_/g'`
19 WORKING_TAG=`echo "$TAG" | sed -e 's/APACHE_2_0_/_/'`
20 WORKING_DIR="$WORKING_DIR$WORKING_TAG"
21
22 START_DIR=`echo "$PWD"`
23
24 # Check out the correct repositories.
25 echo "Checking out repository $REPO into $WORKING_DIR using tag $TAG"
26
27 umask 022
28 echo Checking out httpd-2.0 > $LOG_NAME
29 cvs checkout -r $TAG -d $WORKING_DIR $REPO >> $LOG_NAME
30 cd $WORKING_DIR/srclib
31 echo "Checking out apr and apr-util" >> $LOG_NAME
32 cvs checkout -r $TAG apr apr-util >> $LOG_NAME
33 cd $START_DIR/$WORKING_DIR
34
35 # Make sure the master site's FAQ is up-to-date.  It doesn't hurt to do this
36 # all the time.  :-)
37 echo "Updating the site's FAQ"
38 (cd /www/www.apache.org/docs-2.0/misc ; cvs update)
39
40 # Now update the FAQ in the tarball
41 rm -f docs/manual/misc/FAQ*.html
42 links -source http://www.apache.org/docs-2.0/misc/FAQ.html > docs/manual/misc/FAQ.html
43
44 # Create the configure scripts
45 echo "Creating the configure script"
46 cd $START_DIR/$WORKING_DIR
47
48 echo >> $LOG_NAME
49 echo "Running ./buildconf" >> $LOG_NAME
50 ./buildconf >> $LOG_NAME
51
52 # Remove any files we don't distribute with our code
53 rm -f STATUS
54
55 echo >> $LOG_NAME
56 echo "Removing files that we don't distribute" >> $LOG_NAME
57 find . -name ".cvsignore" -exec rm {} \; >> $LOG_NAME 
58 find . -type d -name "test" | xargs rm -rf >> $LOG_NAME
59 find . -type d -name "CVS" | xargs rm -rf >> $LOG_NAME
60
61 # expand SSI directives in the manual
62 echo "Making sure people can read the manual (expanding SSI's)"
63
64 echo >> $LOG_NAME
65 echo "Making sure people can read the manual (expanding SSI's)" >> $LOG_NAME
66 ( cd docs/manual ; chmod +x expand.pl ; ./expand.pl ; rm ./expand.pl ) >> $LOG_NAME
67
68 # Time to roll the tarball
69 echo "Rolling the tarballs"
70
71 cd $START_DIR
72 echo >> $LOG_NAME
73 echo "Rolling the tarball" >> $LOG_NAME
74 tar cvf $WORKING_DIR-alpha.tar $WORKING_DIR >> $LOG_NAME
75 cp -p $WORKING_DIR-alpha.tar x$WORKING_DIR-alpha.tar
76 gzip -9 $WORKING_DIR-alpha.tar
77 mv x$WORKING_DIR-alpha.tar $WORKING_DIR-alpha.tar
78 compress $WORKING_DIR-alpha.tar
79
80 # Test the tarballs
81 echo "Testing the tarball"
82
83 echo >> $LOG_NAME
84 echo "Testing the tarball $WORKING_DIR-alpha.tar.gz" >> $LOG_NAME
85 gunzip -c $WORKING_DIR-alpha.tar.gz | tar tvf - >> $LOG_NAME
86 zcat $WORKING_DIR-alpha.tar.Z | tar tvf - >> $LOG_NAME
87
88 # remember the CHANGES file
89 echo "Copying the CHANGES file to this directory"
90 cp $WORKING_DIR/CHANGES .
91
92 # cleanup
93 echo "Cleaning up my workspace"
94 rm -fr $WORKING_DIR
95
96 if [ "x$USER" != "x" ]; then
97     USER="-u $USER"
98 fi
99
100 echo Tagging the tarballs
101
102 echo "Taggig the tarballs" >> $LOG_NAME
103 pgp -sba $WORKING_DIR-alpha.tar.gz $USER
104 pgp -sba $WORKING_DIR-alpha.tar.Z $USER
105
106 pgp $WORKING_DIR-alpha.tar.gz.asc $WORKING_DIR-alpha.tar.gz >> $LOG_NAME
107 pgp $WORKING_DIR-alpha.tar.Z.asc $WORKING_DIR-alpha.tar.Z >> $LOG_NAME
108
109 echo "Don't forget to make the tarballs available by copying them to the"
110 echo "/www/dev.apache.org/dist directory."