Update gcc_release to mainline version.
Will be needed for building subsequent releases on this branch from git. Backport: 2020-01-13 Joseph Myers <joseph@codesourcery.com> * gcc_release: Use git instead of SVN. 2019-11-20 Janne Blomqvist <jb@gcc.gnu.org> * gcc_release: Use https for gcc.gnu.org.
This commit is contained in:
parent
45917f7d4d
commit
6abd781f44
|
@ -1,3 +1,15 @@
|
||||||
|
2020-01-13 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
Backport:
|
||||||
|
|
||||||
|
2020-01-13 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* gcc_release: Use git instead of SVN.
|
||||||
|
|
||||||
|
2019-11-20 Janne Blomqvist <jb@gcc.gnu.org>
|
||||||
|
|
||||||
|
* gcc_release: Use https for gcc.gnu.org.
|
||||||
|
|
||||||
2019-08-12 Release Manager
|
2019-08-12 Release Manager
|
||||||
|
|
||||||
* GCC 9.2.0 released.
|
* GCC 9.2.0 released.
|
||||||
|
|
|
@ -64,19 +64,19 @@ inform() {
|
||||||
usage() {
|
usage() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
gcc_release -r release [-f] [further options]
|
gcc_release -r release [-f] [further options]
|
||||||
gcc_release -s name:svnbranch [further options]
|
gcc_release -s name:gitbranch [further options]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
-r release Version of the form X.Y or X.Y.Z.
|
-r release Version of the form X.Y or X.Y.Z.
|
||||||
-s name:svnbranch Create a snapshot, not a real release.
|
-s name:gitbranch Create a snapshot, not a real release.
|
||||||
|
|
||||||
-d destination Local working directory where we will build the release
|
-d destination Local working directory where we will build the release
|
||||||
(default=${HOME}).
|
(default=${HOME}).
|
||||||
-f Create a final release (and update ChangeLogs,...).
|
-f Create a final release (and update ChangeLogs,...).
|
||||||
-l Indicate that we are running on gcc.gnu.org.
|
-l Indicate that we are running on gcc.gnu.org.
|
||||||
-p previous-tarball Location of a previous tarball (to generate diff files).
|
-p previous-tarball Location of a previous tarball (to generate diff files).
|
||||||
-t tag Tag to mark the release in SVN.
|
-t tag Tag to mark the release in git.
|
||||||
-u username Username for upload operations.
|
-u username Username for upload operations.
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -102,14 +102,15 @@ build_sources() {
|
||||||
|| error "Could not create \`${WORKING_DIRECTORY}'"
|
|| error "Could not create \`${WORKING_DIRECTORY}'"
|
||||||
changedir "${WORKING_DIRECTORY}"
|
changedir "${WORKING_DIRECTORY}"
|
||||||
|
|
||||||
|
# Check out the sources.
|
||||||
|
${GIT} clone -q -b "${GITBRANCH}" "${GITROOT}" "`basename ${SOURCE_DIRECTORY}`" || \
|
||||||
|
error "Could not check out release sources"
|
||||||
|
|
||||||
# If this is a final release, make sure that the ChangeLogs
|
# If this is a final release, make sure that the ChangeLogs
|
||||||
# and version strings are updated.
|
# and version strings are updated.
|
||||||
if [ ${FINAL} -ne 0 ]; then
|
if [ ${FINAL} -ne 0 ]; then
|
||||||
inform "Updating ChangeLogs and version files"
|
inform "Updating ChangeLogs and version files"
|
||||||
|
|
||||||
${SVN} -q co "${SVNROOT}/${SVNBRANCH}" "`basename ${SOURCE_DIRECTORY}`" ||\
|
|
||||||
error "Could not check out release sources"
|
|
||||||
|
|
||||||
grep -q "gcc-${RELEASE_MAJOR}/index.html gcc-${RELEASE_MAJOR}/changes.html" \
|
grep -q "gcc-${RELEASE_MAJOR}/index.html gcc-${RELEASE_MAJOR}/changes.html" \
|
||||||
${SOURCE_DIRECTORY}/contrib/gennews ||\
|
${SOURCE_DIRECTORY}/contrib/gennews ||\
|
||||||
error "New release not listed in contrib/gennews"
|
error "New release not listed in contrib/gennews"
|
||||||
|
@ -139,7 +140,7 @@ build_sources() {
|
||||||
|
|
||||||
rm -f NEWS
|
rm -f NEWS
|
||||||
|
|
||||||
svnciargs=""
|
commit_files=""
|
||||||
for x in `changedir ${SOURCE_DIRECTORY} && \
|
for x in `changedir ${SOURCE_DIRECTORY} && \
|
||||||
find . -name ChangeLog`; do
|
find . -name ChangeLog`; do
|
||||||
# Update this ChangeLog file only if it does not yet contain the
|
# Update this ChangeLog file only if it does not yet contain the
|
||||||
|
@ -154,7 +155,7 @@ ${LONG_DATE} Release Manager
|
||||||
EOF
|
EOF
|
||||||
mv ${SOURCE_DIRECTORY}/${x}.new ${SOURCE_DIRECTORY}/${x} \
|
mv ${SOURCE_DIRECTORY}/${x}.new ${SOURCE_DIRECTORY}/${x} \
|
||||||
|| error "Could not update ${x}"
|
|| error "Could not update ${x}"
|
||||||
svnciargs="${svnciargs} ${x}"
|
commit_files="${commit_files} ${x}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -169,7 +170,7 @@ EOF
|
||||||
(changedir ${SOURCE_DIRECTORY}/gcc && \
|
(changedir ${SOURCE_DIRECTORY}/gcc && \
|
||||||
echo ${RELEASE} > BASE-VER) || \
|
echo ${RELEASE} > BASE-VER) || \
|
||||||
error "Could not update BASE-VER"
|
error "Could not update BASE-VER"
|
||||||
svnciargs="${svnciargs} gcc/BASE-VER"
|
commit_files="${commit_files} gcc/BASE-VER"
|
||||||
else
|
else
|
||||||
error "Release number ${RELEASE} does not immediately follow BASE-VER"
|
error "Release number ${RELEASE} does not immediately follow BASE-VER"
|
||||||
fi
|
fi
|
||||||
|
@ -177,16 +178,15 @@ EOF
|
||||||
(changedir ${SOURCE_DIRECTORY}/gcc && \
|
(changedir ${SOURCE_DIRECTORY}/gcc && \
|
||||||
: > DEV-PHASE) || \
|
: > DEV-PHASE) || \
|
||||||
error "Could not update DEV-PHASE"
|
error "Could not update DEV-PHASE"
|
||||||
svnciargs="${svnciargs} gcc/DEV-PHASE"
|
commit_files="${commit_files} gcc/DEV-PHASE"
|
||||||
|
|
||||||
(changedir ${SOURCE_DIRECTORY} && \
|
(changedir ${SOURCE_DIRECTORY} && \
|
||||||
${SVN} -q ci -m 'Update ChangeLog and version files for release' ${svnciargs}) || \
|
${GIT} commit -q -m 'Update ChangeLog and version files for release' ${commit_files} && \
|
||||||
|
${GIT} push) || \
|
||||||
error "Could not commit ChangeLog and version file updates"
|
error "Could not commit ChangeLog and version file updates"
|
||||||
|
|
||||||
# Make sure we tag the sources for a final release.
|
# Make sure we tag the sources for a final release.
|
||||||
TAG="tags/gcc_`echo ${RELEASE} | tr . _`_release"
|
TAG="releases/gcc-${RELEASE}"
|
||||||
|
|
||||||
rm -rf ${SOURCE_DIRECTORY}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Tag the sources.
|
# Tag the sources.
|
||||||
|
@ -195,30 +195,43 @@ EOF
|
||||||
# We don't want to overwrite an existing tag. So, if the tag
|
# We don't want to overwrite an existing tag. So, if the tag
|
||||||
# already exists, issue an error message; the release manager can
|
# already exists, issue an error message; the release manager can
|
||||||
# manually remove the tag if appropriate.
|
# manually remove the tag if appropriate.
|
||||||
echo "${SVN} ls ${SVNROOT}/${TAG}/ChangeLog"
|
if (changedir ${SOURCE_DIRECTORY} && \
|
||||||
if ${SVN} ls "${SVNROOT}/${TAG}/ChangeLog"; then
|
${GIT} rev-parse "refs/tags/${TAG}" > /dev/null 2>&1); then
|
||||||
error "Tag ${TAG} already exists"
|
error "Tag ${TAG} already exists"
|
||||||
fi
|
fi
|
||||||
${SVN} -m "Tagging source as ${TAG}" cp "${SVNROOT}/${SVNBRANCH}" "${SVNROOT}/${TAG}" || \
|
(changedir ${SOURCE_DIRECTORY} && \
|
||||||
|
${GIT} tag -s -m "GCC ${RELEASE} release" "${TAG}" && \
|
||||||
|
${GIT} push origin tag "${TAG}") || \
|
||||||
error "Could not tag sources"
|
error "Could not tag sources"
|
||||||
SVNBRANCH=${TAG}
|
GITBRANCH=${TAG}
|
||||||
fi
|
fi
|
||||||
SVNREV=`${SVN} info "${SVNROOT}/${SVNBRANCH}"|awk '/Revision:/ {print $2}'`
|
|
||||||
|
|
||||||
# Export the current sources.
|
GITREV=`cd ${SOURCE_DIRECTORY} && ${GIT} rev-parse HEAD`
|
||||||
inform "Retrieving sources (svn export -r ${SVNREV} ${SVNROOT}/${SVNBRANCH})"
|
inform "Sources are commit ${GITREV}"
|
||||||
|
|
||||||
${SVN} -q export -r${SVNREV} "${SVNROOT}/${SVNBRANCH}" "`basename ${SOURCE_DIRECTORY}`" ||\
|
# Make sure there are no uncommitted changes in the sources.
|
||||||
error "Could not retrieve sources"
|
status=${WORKING_DIRECTORY}/gitstatus.$$
|
||||||
|
(changedir ${SOURCE_DIRECTORY} && \
|
||||||
|
${GIT} status --porcelain --ignored > "$status") || \
|
||||||
|
error "Could not get source directory status"
|
||||||
|
if [ -s "$status" ]; then
|
||||||
|
cat "$status"
|
||||||
|
error "Source directory has unexpected changes"
|
||||||
|
fi
|
||||||
|
rm "$status"
|
||||||
|
|
||||||
|
# Remove .git from the sources.
|
||||||
|
rm -rf "${SOURCE_DIRECTORY}/.git" || \
|
||||||
|
error "Could not remove .git from sources"
|
||||||
|
|
||||||
# Run gcc_update on them to set up the timestamps nicely, and (re)write
|
# Run gcc_update on them to set up the timestamps nicely, and (re)write
|
||||||
# the LAST_UPDATED file containing the SVN tag/revision used.
|
# the LAST_UPDATED file containing the git tag/revision used.
|
||||||
changedir "gcc-${RELEASE}"
|
changedir "gcc-${RELEASE}"
|
||||||
contrib/gcc_update --touch
|
contrib/gcc_update --touch
|
||||||
echo "Obtained from SVN: ${SVNBRANCH} revision ${SVNREV}" > LAST_UPDATED
|
echo "Obtained from git: ${GITBRANCH} revision ${GITREV}" > LAST_UPDATED
|
||||||
|
|
||||||
# For a prerelease or real release, we need to generate additional
|
# For a prerelease or real release, we need to generate additional
|
||||||
# files not present in SVN.
|
# files not present in git.
|
||||||
changedir "${SOURCE_DIRECTORY}"
|
changedir "${SOURCE_DIRECTORY}"
|
||||||
if [ $SNAPSHOT -ne 1 ]; then
|
if [ $SNAPSHOT -ne 1 ]; then
|
||||||
# Generate the documentation.
|
# Generate the documentation.
|
||||||
|
@ -430,11 +443,11 @@ announce_snapshot() {
|
||||||
changedir "${SNAPSHOTS_DIR}"
|
changedir "${SNAPSHOTS_DIR}"
|
||||||
echo \
|
echo \
|
||||||
"Snapshot gcc-"${RELEASE}" is now available on
|
"Snapshot gcc-"${RELEASE}" is now available on
|
||||||
ftp://gcc.gnu.org/pub/gcc/snapshots/"${RELEASE}"/
|
https://gcc.gnu.org/pub/gcc/snapshots/"${RELEASE}"/
|
||||||
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
|
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
|
||||||
|
|
||||||
This snapshot has been generated from the GCC "${BRANCH}" SVN branch
|
This snapshot has been generated from the GCC "${BRANCH}" git branch
|
||||||
with the following options: "svn://gcc.gnu.org/svn/gcc/${SVNBRANCH} revision ${SVNREV}"
|
with the following options: "git://gcc.gnu.org/git/gcc.git branch ${GITBRANCH} revision ${GITREV}"
|
||||||
|
|
||||||
You'll find:
|
You'll find:
|
||||||
" > ${SNAPSHOT_README}
|
" > ${SNAPSHOT_README}
|
||||||
|
@ -457,8 +470,8 @@ for testing purposes.</p>
|
||||||
we highly recommend you join the GCC developers list. Details for
|
we highly recommend you join the GCC developers list. Details for
|
||||||
how to sign up can be found on the GCC project home page.</p>
|
how to sign up can be found on the GCC project home page.</p>
|
||||||
|
|
||||||
<p>This snapshot has been generated from the GCC "${BRANCH}" SVN branch
|
<p>This snapshot has been generated from the GCC "${BRANCH}" git branch
|
||||||
with the following options: <code>"svn://gcc.gnu.org/svn/gcc/${SVNBRANCH} revision ${SVNREV}"</code></p>
|
with the following options: <code>"git://gcc.gnu.org/git/gcc.git branch ${GITBRANCH} revision ${GITREV}"</code></p>
|
||||||
|
|
||||||
<table>" > ${SNAPSHOT_INDEX}
|
<table>" > ${SNAPSHOT_INDEX}
|
||||||
|
|
||||||
|
@ -511,13 +524,13 @@ export LC_ALL
|
||||||
DATE=`date "+%Y%m%d"`
|
DATE=`date "+%Y%m%d"`
|
||||||
LONG_DATE=`date "+%Y-%m-%d"`
|
LONG_DATE=`date "+%Y-%m-%d"`
|
||||||
|
|
||||||
SVN=${SVN:-svn}
|
GIT=${GIT:-git}
|
||||||
# The CVS server containing the GCC repository.
|
# The server containing the GCC repository.
|
||||||
SVN_SERVER="gcc.gnu.org"
|
GIT_SERVER="gcc.gnu.org"
|
||||||
# The path to the repository on that server.
|
# The path to the repository on that server.
|
||||||
SVN_REPOSITORY="/svn/gcc"
|
GIT_REPOSITORY="/git/gcc.git"
|
||||||
# The username to use when connecting to the server.
|
# The username to use when connecting to the server.
|
||||||
SVN_USERNAME="${USER}"
|
GIT_USERNAME="${USER}"
|
||||||
|
|
||||||
# The machine to which files will be uploaded.
|
# The machine to which files will be uploaded.
|
||||||
GCC_HOSTNAME="gcc.gnu.org"
|
GCC_HOSTNAME="gcc.gnu.org"
|
||||||
|
@ -546,7 +559,7 @@ BRANCH=""
|
||||||
|
|
||||||
# The name of the branch from which the release should be made, as used
|
# The name of the branch from which the release should be made, as used
|
||||||
# for our version control system.
|
# for our version control system.
|
||||||
SVNBRANCH=""
|
GITBRANCH=""
|
||||||
|
|
||||||
# The tag to apply to the sources used for the release.
|
# The tag to apply to the sources used for the release.
|
||||||
TAG=""
|
TAG=""
|
||||||
|
@ -605,11 +618,11 @@ while getopts "d:fr:u:t:p:s:l" ARG; do
|
||||||
d) DESTINATION="${OPTARG}";;
|
d) DESTINATION="${OPTARG}";;
|
||||||
r) RELEASE="${OPTARG}";;
|
r) RELEASE="${OPTARG}";;
|
||||||
t) TAG="${OPTARG}";;
|
t) TAG="${OPTARG}";;
|
||||||
u) SVN_USERNAME="${OPTARG}";;
|
u) GIT_USERNAME="${OPTARG}";;
|
||||||
f) FINAL=1;;
|
f) FINAL=1;;
|
||||||
s) SNAPSHOT=1
|
s) SNAPSHOT=1
|
||||||
BRANCH=${OPTARG%:*}
|
BRANCH=${OPTARG%:*}
|
||||||
SVNBRANCH=${OPTARG#*:}
|
GITBRANCH=${OPTARG#*:}
|
||||||
;;
|
;;
|
||||||
l) LOCAL=1
|
l) LOCAL=1
|
||||||
SCP=cp
|
SCP=cp
|
||||||
|
@ -643,7 +656,7 @@ while [ $# -ne 0 ]; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Perform consistency checking.
|
# Perform consistency checking.
|
||||||
if [ ${LOCAL} -eq 0 ] && [ -z ${SVN_USERNAME} ]; then
|
if [ ${LOCAL} -eq 0 ] && [ -z ${GIT_USERNAME} ]; then
|
||||||
error "No username specified"
|
error "No username specified"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -673,12 +686,8 @@ if [ $SNAPSHOT -eq 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Compute the name of the branch, which is based solely on the major
|
# Compute the name of the branch, which is based solely on the major
|
||||||
# and minor release numbers.
|
# release number.
|
||||||
if [ ${RELEASE_MAJOR} -ge 5 ]; then
|
GITBRANCH="releases/gcc-${RELEASE_MAJOR}"
|
||||||
SVNBRANCH="branches/gcc-${RELEASE_MAJOR}-branch"
|
|
||||||
else
|
|
||||||
SVNBRANCH="branches/gcc-${RELEASE_MAJOR}_${RELEASE_MINOR}-branch"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If this is not a final release, set various parameters accordingly.
|
# If this is not a final release, set various parameters accordingly.
|
||||||
if [ ${FINAL} -ne 1 ]; then
|
if [ ${FINAL} -ne 1 ]; then
|
||||||
|
@ -707,13 +716,13 @@ fi
|
||||||
WORKING_DIRECTORY="${DESTINATION}/gcc-${RELEASE}"
|
WORKING_DIRECTORY="${DESTINATION}/gcc-${RELEASE}"
|
||||||
SOURCE_DIRECTORY="${WORKING_DIRECTORY}/gcc-${RELEASE}"
|
SOURCE_DIRECTORY="${WORKING_DIRECTORY}/gcc-${RELEASE}"
|
||||||
|
|
||||||
# Set up SVNROOT.
|
# Set up GITROOT.
|
||||||
if [ $LOCAL -eq 0 ]; then
|
if [ $LOCAL -eq 0 ]; then
|
||||||
SVNROOT="svn+ssh://${SVN_USERNAME}@${SVN_SERVER}${SVN_REPOSITORY}"
|
GITROOT="git+ssh://${GIT_USERNAME}@${GIT_SERVER}${GIT_REPOSITORY}"
|
||||||
else
|
else
|
||||||
SVNROOT="file:///svn/gcc"
|
GITROOT="/git/gcc.git"
|
||||||
fi
|
fi
|
||||||
export SVNROOT
|
export GITROOT
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Main Program
|
# Main Program
|
||||||
|
|
Loading…
Reference in New Issue