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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
#! /bin/csh
#
# GCC snapshot generation script.
#
# Originally written by Jeff Law <law@redhat.com>. Most minor modifications
# by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>.
# TODO: Include the FAQ and installation instructions in the snapshot
set SCRIPTDIR=/home/law/gcc
set STATEDIR=/home/law
set TMPDIR=/var/tmp
set path = (/usr/local/bin $path)
# Get somewhere useful with a lot of disk space.
cd $TMPDIR
# Get date of current and previous snapshot.
set date=`date +%Y%m%d`
set last_date=`cat $STATEDIR/.snapshot_date`
set snapdir=`date +%Y-%m-%d`
# Update and uncomment the following lines to run a particular snapshot pair.
#set date=971215
#set last_date=19990920
# We run this on the cvs server itself so we can get at
# the cvs files quickly.
setenv CVSROOT /cvs/gcc
# Get into a temporary directory so as not to be confused by
# any existing CVS administration files.
rm -rf $$
mkdir $$
cd $$
# Tag the current sources for the snapshot
cvs -z 9 -Q rtag -F gcc_ss_$date gcc
# Get an exported copy of the last gcc-core module snapshot
# arggh gcc-core doesn't work right now, so check out the whole
# thing and remove bits we don't need.
#zcat ~ftp/pub/gcc/snapshots/1998-05-31/gcc-$last_date.tar.gz | tar xf -
cvs -z 9 -Q export -rgcc_ss_$last_date gcc
cd gcc
find . -type f -print | sort > ../files_$last_date
~law/bin/brik -Gb -f ../files_$last_date > ../.brik_$last_date
cp ../.brik_$last_date ./.brik
cd ..
rm -rf gcc/{libio,libstdc++,libstdc++-v3,libf2c,libchill,libobjc}
rm -rf gcc/{boehm-gc,fastjar,libffi,libjava,zlib}
rm -rf gcc/gcc/{testsuite,f,objc,cp,java,ch}
mv gcc gcc-$last_date
# Similarly for today's gcc-core module snapshot
cvs -z 9 -Q export -rgcc_ss_$date gcc
cd gcc
contrib/gcc_update --touch
find . -type f -print | sort > ../files_$date
~law/bin/brik -Gb -f ../files_$date > ../.brik_$date
cp ../.brik_$date ./.brik
cd ..
rm -rf gcc/{libio,libstdc++,libstdc++-v3,libf2c,libchill,libobjc}
rm -rf gcc/{boehm-gc,fastjar,libffi,libjava,zlib}
rm -rf gcc/gcc/{testsuite,f,objc,cp,java,ch}
mv gcc gcc-$date
rm -rf files_$date
rm -rf files_$last_date
# Diff them
diff -Nrc3p gcc-$last_date gcc-$date > gcc-core-$last_date-$date.diff
# Make the tarball for the core
tar cf - gcc-$date | gzip --best > gcc-core-$date.tar.gz
# Remove the core gunk and get the whole thing back.
rm -rf gcc-$last_date
rm -rf gcc-$date
#zcat ~ftp/pub/gcc/snapshots/1998-05-31/gcc-$last_date.tar.gz | tar xf -
cvs -z 9 -Q export -rgcc_ss_$last_date gcc
mv gcc gcc-$last_date
cp .brik_$last_date gcc-$last_date/.brik
cvs -z 9 -Q export -rgcc_ss_$date gcc
cd gcc
contrib/gcc_update --touch
cd ..
mv gcc gcc-$date
cp .brik_$date gcc-$date/.brik
# We don't need this anymore.
rm -rf .brik_$date
rm -rf .brik_$last_date
# Now make diffs for g77, g77-testsuite chill, java objc, g++, g++-testsuite,
# testsuite, then the whole bloody thing.
diff -Nrc3p gcc-$last_date/gcc/f gcc-$date/gcc/f > gcc-g77-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/libf2c gcc-$date/libf2c >> gcc-g77-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/gcc/testsuite/g77.f-torture gcc-$date/gcc/testsuite/g77.f-torture > gcc-g77-testsuite-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/gcc/objc gcc-$date/gcc/objc > gcc-objc-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/libobjc gcc-$date/libobjc >> gcc-objc-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/gcc/java gcc-$date/gcc/java > gcc-java-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/boehm-gc gcc-$date/boehm-gc >> gcc-java-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/fastjar gcc-$date/fastjar >> gcc-java-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/libffi gcc-$date/libffi >> gcc-java-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/libjava gcc-$date/libjava >> gcc-java-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/zlib gcc-$date/zlib >> gcc-java-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/gcc/ch gcc-$date/gcc/ch > gcc-chill-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/libchill gcc-$date/libchill >> gcc-chill-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/gcc/cp gcc-$date/gcc/cp > gcc-g++-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/libio gcc-$date/libio >> gcc-g++-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/libstdc++ gcc-$date/libstdc++ >> gcc-g++-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/libstdc++-v3 gcc-$date/libstdc++-v3 >> gcc-g++-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/gcc/testsuite/g++.old-deja gcc-$date/gcc/testsuite/g++.old-deja > gcc-g++-tests-$last_date-$date.diff
diff -Nrc3p gcc-$last_date/gcc/testsuite gcc-$date/gcc/testsuite > gcc-tests-$last_date-$date.diff
diff -Nrc3p gcc-$last_date gcc-$date > gcc-$last_date-$date.diff
# Apply the patches to the old snapshot and run another diff to see if anything
# bad happened.
cd gcc-$last_date
patch -p1 -E -s < ../gcc-$last_date-$date.diff
find . -name \*.orig -print | xargs rm -rf
rm -rf .brik.orig
find . -name \*.rej > $STATEDIR/CHECKME
~law/bin/brik -C .brik >> $STATEDIR/CHECKME
cd ..
diff -Nrc3p gcc-$last_date gcc-$date >> $STATEDIR/CHECKME
# Remove the old snapshot, we're done with it.
#rm -rf gcc-$last_date
# Make tarballs
# Touch all the machine generated files so people don't need gperf, bison and friends.
tar cf - gcc-$date/.brik gcc-$date/gcc/f gcc-$date/libf2c | gzip --best > gcc-g77-$date.tar.gz
tar cf - gcc-$date/.brik gcc-$date/gcc/testsuite/g77.f-torture | gzip --best > gcc-g77-testsuite-$date.tar.gz
tar cf - gcc-$date/.brik gcc-$date/gcc/objc gcc-$date/libobjc | gzip --best > gcc-objc-$date.tar.gz
tar cf - gcc-$date/.brik gcc-$date/gcc/java gcc-$date/{boehm-gc,fastjar,libffi,libjava,zlib} | gzip --best > gcc-java-$date.tar.gz
tar cf - gcc-$date/.brik gcc-$date/gcc/ch gcc-$date/libchill | gzip --best > gcc-chill-$date.tar.gz
tar cf - gcc-$date/.brik gcc-$date/gcc/cp gcc-$date/{libio,libstdc++,libstdc++-v3} | gzip --best > gcc-g++-$date.tar.gz
tar cf - gcc-$date/.brik gcc-$date/gcc/testsuite/g++.old-deja | gzip --best > gcc-g++-tests-$date.tar.gz
tar cf - gcc-$date/.brik gcc-$date/gcc/testsuite | gzip --best > gcc-tests-$date.tar.gz
tar cf - gcc-$date | gzip --best > gcc-$date.tar.gz
# Compress the diff files.
gzip --best *.diff
# Copy them to the FTP server XXX
mkdir ~ftp/pub/gcc/snapshots/$snapdir
chmod 775 ~ftp/pub/gcc/snapshots/$snapdir
cp *.gz ~ftp/pub/gcc/snapshots/$snapdir
foreach tst (*.gz)
echo $tst `sum $tst` >>~ftp/pub/gcc/snapshots/$snapdir/CHECKSUMS
end
# Update links on the ftp server
$SCRIPTDIR/update_links $date
# Get back to the toplevel directory before we update the date.
cd $STATEDIR
# Note that we made a snapshot today
mv .snapshot_date .prev_snapshot_date
echo $date > .snapshot_date
$SCRIPTDIR/update_tags
# Announce it XXX
mail -s "gcc-ss-$date is now available" gcc@gcc.gnu.org < ~ftp/pub/gcc/snapshots/README
mail -s "snapshot:CHECKME" law@cygnus.com < $STATEDIR/CHECKME
rm -rf $TMPDIR/$$
|