This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
PATCH: Correct diff-generation in release scripts
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 21 Feb 2002 17:54:37 -0800
- Subject: PATCH: Correct diff-generation in release scripts
- Reply-to: mark at codesourcery dot com
The reason that were no diffs was that the diff-generation logic
in the release script was broken.
Tested on i686-pc-linux-gnu, committed to mainline and branch
(with minor variations on the mainline due to drift).
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
2002-02-21 Mark Mitchell <mark@codesourcery.com>
* gcc_release: Correct handling of diff-generation. Add
"diffs" major mode.
Index: gcc_release
===================================================================
RCS file: /cvs/gcc/gcc/contrib/Attic/gcc_release,v
retrieving revision 1.1.2.16
retrieving revision 1.1.2.18
diff -c -p -r1.1.2.16 -r1.1.2.18
*** gcc_release 2001/08/24 20:16:05 1.1.2.16
--- gcc_release 2002/02/22 01:54:44 1.1.2.18
***************
*** 9,15 ****
# Contents:
# Script to create a GCC release.
#
! # Copyright (c) 2001 Free Software Foundation.
#
# This file is part of GNU CC.
#
--- 9,15 ----
# Contents:
# Script to create a GCC release.
#
! # Copyright (c) 2001, 2002 Free Software Foundation.
#
# This file is part of GNU CC.
#
*************** build_tarfiles() {
*** 282,294 ****
build_tarfile gcc-core-${RELEASE} ${EXCLUDES} \
`basename ${SOURCE_DIRECTORY}`
- # Possibly build diffs.
- if [ -n "$OLD_TARS" ]; then
- for old_tar in $OLD_TARS; do
- build_diffs $old_tar
- done
- fi
-
# Build .bz2 files.
for f in ${FILE_LIST}; do
bzfile=${f%.gz}.bz2
--- 282,287 ----
*************** build_tarfiles() {
*** 299,305 ****
# Build diffs against an old release.
build_diffs() {
! old_dir=${1%/*}
old_file=${1##*/}
old_vers=${old_file%.tar.gz}
old_vers=${old_vers#gcc-}
--- 292,298 ----
# Build diffs against an old release.
build_diffs() {
! old_dir=${1%/}
old_file=${1##*/}
old_vers=${old_file%.tar.gz}
old_vers=${old_vers#gcc-}
*************** upload_files() {
*** 338,350 ****
changedir "${WORKING_DIRECTORY}"
# Copy the tar files to the FTP server.
for x in gcc*.gz gcc*.bz2; do
if [ -e ${x} ]; then
# Make sure the file will be readable on the server.
chmod a+r ${x}
# Copy it.
! ${SCP} -p ${x} ${FTP_PATH} || \
error "Could not upload ${x}"
fi
done
--- 331,345 ----
changedir "${WORKING_DIRECTORY}"
+ # Make sure the directory exists on the server.
+ ${SSH} -l ${GCC_USERNAME} ${GCC_HOSTNAME} mkdir ${FTP_PATH}
# Copy the tar files to the FTP server.
for x in gcc*.gz gcc*.bz2; do
if [ -e ${x} ]; then
# Make sure the file will be readable on the server.
chmod a+r ${x}
# Copy it.
! ${SCP} -p ${x} "${GCC_USERNAME}@${GCC_HOSTNAME}:${FTP_PATH}" || \
error "Could not upload ${x}"
fi
done
*************** CVS_PROTOCOL="ext"
*** 366,373 ****
# The username to use when connecting to the server.
CVS_USERNAME="${USER}"
! # The path to the directory where the files are uploaded for FTP.
! FTP_PATH="gccadmin@gcc.gnu.org:~ftp/pub/gcc"
# The major number for the release. For release `3.0.2' this would be
# `3'
--- 361,372 ----
# The username to use when connecting to the server.
CVS_USERNAME="${USER}"
! # The machine to which files will be uploaded.
! GCC_HOSTNAME="gcc.gnu.org"
! # The name of the account on the machine to which files are uploaded.
! GCC_USERNAME="gccadmin"
! # The directory in which the files will be placed.
! FTP_PATH="~ftp/pub/gcc"
# The major number for the release. For release `3.0.2' this would be
# `3'
*************** FINAL=0
*** 414,419 ****
--- 413,419 ----
SNAPSHOT=0
# Major operation modes.
+ MODE_DIFFS=0
MODE_SOURCES=0
MODE_TARFILES=0
MODE_UPLOAD=0
*************** DIFF="${DIFF:-diff -Nrc3pad}"
*** 429,434 ****
--- 429,435 ----
ENV="${ENV:-env}"
GZIP="${GZIP:-gzip --best}"
SCP="${SCP:-scp}"
+ SSH="${SSH:-ssh}"
TAR="${TAR:-tar}"
########################################################################
*************** BRANCH="gcc-${RELEASE_MAJOR}_${RELEASE_M
*** 486,494 ****
# If this is not a final release, set various parameters acordingly.
if [ ${FINAL} -ne 1 ]; then
RELEASE="${RELEASE}-${DATE}"
! FTP_PATH="${FTP_PATH}/snapshots"
else
! FTP_PATH="${FTP_PATH}/releases/gcc-${RELEASE}"
fi
# Compute the name of the WORKING_DIRECTORY and the SOURCE_DIRECTORY.
--- 487,495 ----
# If this is not a final release, set various parameters acordingly.
if [ ${FINAL} -ne 1 ]; then
RELEASE="${RELEASE}-${DATE}"
! FTP_PATH="${FTP_PATH}/snapshots/"
else
! FTP_PATH="${FTP_PATH}/releases/gcc-${RELEASE}/"
fi
# Compute the name of the WORKING_DIRECTORY and the SOURCE_DIRECTORY.
*************** export CVSROOT
*** 515,524 ****
# Handle the major modes.
while [ $# -ne 0 ]; do
case $1 in
sources) MODE_SOURCES=1;;
tarfiles) MODE_TARFILES=1;;
upload) MODE_UPLOAD=1;;
! all) MODE_SOURCES=1; MODE_TARFILES=1; MODE_UPLOAD=1;;
*) error "Unknown mode $1";;
esac
shift
--- 516,526 ----
# Handle the major modes.
while [ $# -ne 0 ]; do
case $1 in
+ diffs) MODE_DIFFS=1;;
sources) MODE_SOURCES=1;;
tarfiles) MODE_TARFILES=1;;
upload) MODE_UPLOAD=1;;
! all) MODE_SOURCES=1; MODE_TARFILES=1; MODE_DIFFS=1; MODE_UPLOAD=1;;
*) error "Unknown mode $1";;
esac
shift
*************** fi
*** 534,539 ****
--- 536,552 ----
if [ $MODE_TARFILES -ne 0 ]; then
build_tarfiles
+ fi
+
+ # Build diffs
+
+ if [ $MODE_DIFFS -ne 0 ]; then
+ # Possibly build diffs.
+ if [ -n "$OLD_TARS" ]; then
+ for old_tar in $OLD_TARS; do
+ build_diffs $old_tar
+ done
+ fi
fi
# Upload them to the FTP server.