summaryrefslogtreecommitdiffstats
path: root/contrib/release
blob: b0e6a55f37ea16ab491be13116dd35646264e37b (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
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
#! /bin/sh  -x
#
# GCC release generation script.
#
# Originally written by Jeff Law <law@redhat.com>.

# We need separate variables for the tag in the CVS sources and the
# name of the release directory.  Consider if we have a packaging problem
# and need to respin the release.  The sources do not change, but the release
# name changes.
#
# [[ Not clear.  You  can purge the old tag and make a new one, too.
#    That way they continue to match.  Maximize consistency. ]]
#
# We used to use a tag to get the previous release, but it is more reliable to
# actually unpack the previous release from the ftp directory.  Consider files
# like .brik which are in the release, but not in the repository.
#
if test $# != 6 ; then
  echo "usage: release release-tag release-name release_branch last-release-name prerelease dotag"
  exit 1
fi

release_tag=$1
release_name=$2
release_suffix=`echo $release_name | sed -e s#gcc-##`
release_branch=$3
last_release_name=$4
last_release_suffix=`echo $last_release_name | sed -e s#gcc-##`
prerelease=$5
dotag=$6

case $last_release_name in
  egcs-1.0*)
    echo "unprotoize.c and README.gcc need special handling"
    exit 1;
    ;;
  egcs-1.1*)
    echo "No java or chill in egcs-1.1*"
    ;;
  
  gcc-2.95*)
    echo "No testsuites in gcc-2.95*"
    ;;
esac

STATEDIR=${STATEDIR-/home/law}
GCCBASE=${GCCBASE-${STATEDIR}/gcc}
TMPDIR=${TMPDIR-/var/tmp}
export TMPDIR STATEDIR GCCBASE

PATH=${GCCBASE}:$PATH

[ -f ${GCCBASE}/gcc.pot ] || {
  echo "'${GCCBASE}/gcc.pot' is missing"
  exit 1
}

[ -f ${STATEDIR}/bin/brik ] || {
  echo "'${STATEDIR}/bin/brik' is missing"
  exit 1
}

# We run this on the cvs server itself so we can get at the cvs
# files quickly.  It also assumes access to my home dir for some
# programs.
CVSROOT=/cvs/gcc
export CVSROOT

# Get somewhere useful with a lot of disk space.
cd $TMPDIR

# Get into a temporary directory so as not to be confused by
# any existing CVS administration files.
rm -rf $$
mkdir $$
cd $$

if test $prerelease = no -a $dotag = yes; then
  update_changelogs $release_name $release_branch
fi

# If requested, tag the branch.   Three steps, first remove the old tag from
# the repository, then check out the release branch, then retag the release
# branch.
if test $dotag = yes; then
  rm -rf gcc
  cvs -Q rtag -d $release_tag gcc
  cvs -Q co -r $release_branch gcc
  cvs -Q tag -f $release_tag
  rm -rf gcc
fi

# Get a copy of the previous release.  Get it from the ftp dir to avoid minor
# issues with files like .brik not being in the repository.
if test $prerelease = yes; then
  echo "Yow!"
  exit 1;
  zcat ~ftp/pub/gcc/snapshots/egcs-1.1.2-prerelease/$last_release_name.tar.gz | tar xf -
else
  zcat ~ftp/pub/gcc/releases/$last_release_name/$last_release_name.tar.gz | tar xf -
fi

# Files/directories which are not part of the gcc-core module.
noncore_files="gcc/cp libio libstdc++ gcc/f libf2c gcc/objc libobjc gcc/ch libchill gcc/java libjava gcc/testsuite"

# Get the gcc core.  Note that the gcc-core module doesn't work yet, so
# we get the whole directory, then prune the things we do not want.
#
# Also, get the latest copy of the installation instructions and the
# faq in html, build plaintext versions of those documents.
cvs -Q export -ko -r$release_tag gcc
cd gcc
contrib/gcc_update --touch
cp ${GCCBASE}/gcc.pot gcc/po
cd ..
cvs -Q export -ko -Dnow wwwdocs/htdocs/install
cvs -Q export -ko -Dnow wwwdocs/htdocs/faq.html
#cvs -Q export -ko -Dnow wwwdocs/htdocs/bugs.html
mv gcc $release_name
release_docs $release_name $$

# Build a list of files in this release.
cd $release_name
find . -type f -print | sort > ../files_$release_name
${STATEDIR}/bin/brik -Gb -f ../files_$release_name > ../.brik_$release_name
cp ../.brik_$release_name ./.brik

# Get back to the directory with the two releases in it.
cd ..

# Remove anything that is not part of the core
for file in $noncore_files; do
  rm -rf $last_release_name/$file
  rm -rf $release_name/$file
done

# Make the core tarball
tar cf - $release_name | gzip --best > gcc-core-$release_suffix.tar.gz

# make empty directories for directories that disappeared so that
# patch will delete any files in those directories when patching up to
# this release
case $last_release_name in
  gcc-2.95*)
    mkdir $release_name/xiberty
    mkdir $release_name/contrib/fixinc
    ;;
esac
	
# Diff the core modules
diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name $release_name > gcc-core-$last_release_suffix-$release_suffix.diff

# Remove the core gunk
rm -rf $last_release_name
rm -rf $release_name


# Go back and get the full distributions.
if test $prerelease = yes; then
  zcat ~ftp/pub/gcc/snapshots/egcs-1.1.2-prerelease/$last_release_name.tar.gz | tar xf -
else
  zcat ~ftp/pub/gcc/releases/$last_release_name/$last_release_name.tar.gz | tar xf -
fi

cvs -Q export -ko -r$release_tag gcc
cd gcc
contrib/gcc_update --touch
cp ${GCCBASE}/gcc.pot gcc/po
cd ..
cvs -Q export -ko -Dnow wwwdocs/htdocs/install
cvs -Q export -ko -Dnow wwwdocs/htdocs/faq.html
#cvs -Q export -ko -Dnow wwwdocs/htdocs/bugs.html
mv gcc $release_name
find $release_name/gcc/testsuite -type f -print | xargs rm -f
release_docs $release_name $$


# No need to regenerate the .brik file.  We didn't delete it.
cp .brik_$release_name $release_name/.brik

# We don't need this anymore.
rm .brik_$release_name
rm .brik_$last_release_name

# Make tarballs

tar cf - $release_name/.brik $release_name/gcc/f $release_name/libf2c | gzip --best > gcc-g77-$release_suffix.tar.gz
tar cf - $release_name/.brik $release_name/gcc/java | gzip --best > gcc-java-$release_suffix.tar.gz
tar cf - $release_name/.brik $release_name/gcc/ch $release_name/libchill | gzip --best > gcc-chill-$release_suffix.tar.gz
#tar cf - $release_name/.brik $release_name/gcc/testsuite/g77.f-torture | gzip --best > gcc-g77-testsuite-$release_suffix.tar.gz
tar cf - $release_name/.brik $release_name/gcc/objc $release_name/libobjc | gzip --best > gcc-objc-$release_suffix.tar.gz
tar cf - $release_name/.brik $release_name/gcc/cp $release_name/libio $release_name/libstdc++ | gzip --best > gcc-g++-$release_suffix.tar.gz
#tar cf - $release_name/.brik $release_name/gcc/testsuite/g++.old-deja | gzip --best > gcc-g++-tests-$release_suffix.tar.gz
#tar cf - $release_name/.brik $release_name/gcc/testsuite | gzip --best > gcc-tests-$release_suffix.tar.gz
tar cf - $release_name | gzip --best > $release_name.tar.gz
# make empty directories for directories that disappeared so that
# patch will delete any files in those directories when patching up to
# this release
# make empty directories for directories that disappeared so that
# patch will delete any files in those directories when patching up to
# this release
case $last_release_name in
  gcc-2.95*)
    mkdir $release_name/xiberty
    mkdir $release_name/contrib/fixinc
    ;;
esac
	
# Now make diffs for g77, g77-testsuite objc, g++, g++-testsuite, testsuite,
# then the whole bloody thing.  Add libobjc, java & chill for next major
#release.
diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/gcc/f $release_name/gcc/f > gcc-g77-$last_release_suffix-$release_suffix.diff
diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/libf2c $release_name/libf2c >> gcc-g77-$last_release_suffix-$release_suffix.diff

#diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/gcc/testsuite/g77.f-torture  $release_name/gcc/testsuite/g77.f-torture > gcc-g77-testsuite-$last_release_suffix-$release_suffix.diff

diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/gcc/ch $release_name/gcc/ch > gcc-chill-$last_release_suffix-$release_suffix.diff
diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/libchill $release_name/libchill >> gcc-chill-$last_release_suffix-$release_suffix.diff

diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/gcc/java $release_name/gcc/java > gcc-java-$last_release_suffix-$release_suffix.diff
#diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/libf2c $release_name/libf2c >> gcc-java-$last_release_suffix-$release_suffix.diff

diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/gcc/objc $release_name/gcc/objc > gcc-objc-$last_release_suffix-$release_suffix.diff
mkdir $last_release_name/libobjc
diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/libobjc $release_name/libobjc >> gcc-objc-$last_release_suffix-$release_suffix.diff

diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/gcc/cp $release_name/gcc/cp > gcc-g++-$last_release_suffix-$release_suffix.diff
diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/libio $release_name/libio >> gcc-g++-$last_release_suffix-$release_suffix.diff
diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/libstdc++ $release_name/libstdc++ >> gcc-g++-$last_release_suffix-$release_suffix.diff

#diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/gcc/testsuite/g++.old-deja $release_name/gcc/testsuite/g++.old-deja > gcc-g++-tests-$last_release_suffix-$release_suffix.diff

#diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name/gcc/testsuite $release_name/gcc/testsuite > gcc-tests-$last_release_suffix-$release_suffix.diff

diff -x de.gmo -x fr.gmo -Nrc3p $last_release_name $release_name > gcc-$last_release_suffix-$release_suffix.diff


# Remove the old snapshot, we're done with it.
rm -rf $last_release_name


# Compress the diff files.
gzip --best *.diff

# bzip everything too

# Copy them to the FTP server XXX

# Update links on the ftp server XXX

# Announce it XXX
OpenPOWER on IntegriCloud