From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96447 invoked by alias); 4 Feb 2020 21:11:47 -0000 Mailing-List: contact gcc-cvs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-cvs-owner@gcc.gnu.org Received: (qmail 95417 invoked by uid 9576); 4 Feb 2020 21:11:47 -0000 Date: Tue, 04 Feb 2020 21:11:00 -0000 Message-ID: <20200204211147.95405.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Peter Bergner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ibm/heads/gcc-9)] Update gcc_release to mainline version. X-Act-Checkin: gcc X-Git-Author: Joseph Myers X-Git-Refname: refs/vendors/ibm/heads/gcc-9 X-Git-Oldrev: 45917f7d4dcb9eb3c0a60d56aaa585993f500240 X-Git-Newrev: 6abd781f44a53c8103dd13225114bd10b255083d X-SW-Source: 2020-02/txt/msg00451.txt.bz2 https://gcc.gnu.org/g:6abd781f44a53c8103dd13225114bd10b255083d commit 6abd781f44a53c8103dd13225114bd10b255083d Author: Joseph Myers Date: Mon Jan 13 15:58:45 2020 +0000 Update gcc_release to mainline version. Will be needed for building subsequent releases on this branch from git. Backport: 2020-01-13 Joseph Myers * gcc_release: Use git instead of SVN. 2019-11-20 Janne Blomqvist * gcc_release: Use https for gcc.gnu.org. Diff: --- maintainer-scripts/ChangeLog | 12 +++++ maintainer-scripts/gcc_release | 109 ++++++++++++++++++++++------------------- 2 files changed, 71 insertions(+), 50 deletions(-) diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog index 280c506..b411200 100644 --- a/maintainer-scripts/ChangeLog +++ b/maintainer-scripts/ChangeLog @@ -1,3 +1,15 @@ +2020-01-13 Joseph Myers + + Backport: + + 2020-01-13 Joseph Myers + + * gcc_release: Use git instead of SVN. + + 2019-11-20 Janne Blomqvist + + * gcc_release: Use https for gcc.gnu.org. + 2019-08-12 Release Manager * GCC 9.2.0 released. diff --git a/maintainer-scripts/gcc_release b/maintainer-scripts/gcc_release index bfb6b03..8be8701 100755 --- a/maintainer-scripts/gcc_release +++ b/maintainer-scripts/gcc_release @@ -64,19 +64,19 @@ inform() { usage() { cat < BASE-VER) || \ error "Could not update BASE-VER" - svnciargs="${svnciargs} gcc/BASE-VER" + commit_files="${commit_files} gcc/BASE-VER" else error "Release number ${RELEASE} does not immediately follow BASE-VER" fi @@ -177,16 +178,15 @@ EOF (changedir ${SOURCE_DIRECTORY}/gcc && \ : > DEV-PHASE) || \ error "Could not update DEV-PHASE" - svnciargs="${svnciargs} gcc/DEV-PHASE" + commit_files="${commit_files} gcc/DEV-PHASE" (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" # Make sure we tag the sources for a final release. - TAG="tags/gcc_`echo ${RELEASE} | tr . _`_release" - - rm -rf ${SOURCE_DIRECTORY} + TAG="releases/gcc-${RELEASE}" fi # Tag the sources. @@ -195,30 +195,43 @@ EOF # We don't want to overwrite an existing tag. So, if the tag # already exists, issue an error message; the release manager can # manually remove the tag if appropriate. - echo "${SVN} ls ${SVNROOT}/${TAG}/ChangeLog" - if ${SVN} ls "${SVNROOT}/${TAG}/ChangeLog"; then + if (changedir ${SOURCE_DIRECTORY} && \ + ${GIT} rev-parse "refs/tags/${TAG}" > /dev/null 2>&1); then error "Tag ${TAG} already exists" 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" - SVNBRANCH=${TAG} + GITBRANCH=${TAG} fi - SVNREV=`${SVN} info "${SVNROOT}/${SVNBRANCH}"|awk '/Revision:/ {print $2}'` - # Export the current sources. - inform "Retrieving sources (svn export -r ${SVNREV} ${SVNROOT}/${SVNBRANCH})" + GITREV=`cd ${SOURCE_DIRECTORY} && ${GIT} rev-parse HEAD` + inform "Sources are commit ${GITREV}" + + # Make sure there are no uncommitted changes in the 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" - ${SVN} -q export -r${SVNREV} "${SVNROOT}/${SVNBRANCH}" "`basename ${SOURCE_DIRECTORY}`" ||\ - error "Could not retrieve sources" + # 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 - # the LAST_UPDATED file containing the SVN tag/revision used. + # the LAST_UPDATED file containing the git tag/revision used. changedir "gcc-${RELEASE}" 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 - # files not present in SVN. + # files not present in git. changedir "${SOURCE_DIRECTORY}" if [ $SNAPSHOT -ne 1 ]; then # Generate the documentation. @@ -430,11 +443,11 @@ announce_snapshot() { changedir "${SNAPSHOTS_DIR}" echo \ "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. -This snapshot has been generated from the GCC "${BRANCH}" SVN branch -with the following options: "svn://gcc.gnu.org/svn/gcc/${SVNBRANCH} revision ${SVNREV}" +This snapshot has been generated from the GCC "${BRANCH}" git branch +with the following options: "git://gcc.gnu.org/git/gcc.git branch ${GITBRANCH} revision ${GITREV}" You'll find: " > ${SNAPSHOT_README} @@ -457,8 +470,8 @@ for testing purposes.

we highly recommend you join the GCC developers list. Details for how to sign up can be found on the GCC project home page.

-

This snapshot has been generated from the GCC "${BRANCH}" SVN branch -with the following options: "svn://gcc.gnu.org/svn/gcc/${SVNBRANCH} revision ${SVNREV}"

+

This snapshot has been generated from the GCC "${BRANCH}" git branch +with the following options: "git://gcc.gnu.org/git/gcc.git branch ${GITBRANCH} revision ${GITREV}"

" > ${SNAPSHOT_INDEX} @@ -511,13 +524,13 @@ export LC_ALL DATE=`date "+%Y%m%d"` LONG_DATE=`date "+%Y-%m-%d"` -SVN=${SVN:-svn} -# The CVS server containing the GCC repository. -SVN_SERVER="gcc.gnu.org" +GIT=${GIT:-git} +# The server containing the GCC repository. +GIT_SERVER="gcc.gnu.org" # 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. -SVN_USERNAME="${USER}" +GIT_USERNAME="${USER}" # The machine to which files will be uploaded. GCC_HOSTNAME="gcc.gnu.org" @@ -546,7 +559,7 @@ BRANCH="" # The name of the branch from which the release should be made, as used # for our version control system. -SVNBRANCH="" +GITBRANCH="" # The tag to apply to the sources used for the release. TAG="" @@ -605,11 +618,11 @@ while getopts "d:fr:u:t:p:s:l" ARG; do d) DESTINATION="${OPTARG}";; r) RELEASE="${OPTARG}";; t) TAG="${OPTARG}";; - u) SVN_USERNAME="${OPTARG}";; + u) GIT_USERNAME="${OPTARG}";; f) FINAL=1;; s) SNAPSHOT=1 BRANCH=${OPTARG%:*} - SVNBRANCH=${OPTARG#*:} + GITBRANCH=${OPTARG#*:} ;; l) LOCAL=1 SCP=cp @@ -643,7 +656,7 @@ while [ $# -ne 0 ]; do done # Perform consistency checking. -if [ ${LOCAL} -eq 0 ] && [ -z ${SVN_USERNAME} ]; then +if [ ${LOCAL} -eq 0 ] && [ -z ${GIT_USERNAME} ]; then error "No username specified" fi @@ -673,12 +686,8 @@ if [ $SNAPSHOT -eq 0 ]; then fi # Compute the name of the branch, which is based solely on the major - # and minor release numbers. - if [ ${RELEASE_MAJOR} -ge 5 ]; then - SVNBRANCH="branches/gcc-${RELEASE_MAJOR}-branch" - else - SVNBRANCH="branches/gcc-${RELEASE_MAJOR}_${RELEASE_MINOR}-branch" - fi + # release number. + GITBRANCH="releases/gcc-${RELEASE_MAJOR}" # If this is not a final release, set various parameters accordingly. if [ ${FINAL} -ne 1 ]; then @@ -707,13 +716,13 @@ fi WORKING_DIRECTORY="${DESTINATION}/gcc-${RELEASE}" SOURCE_DIRECTORY="${WORKING_DIRECTORY}/gcc-${RELEASE}" -# Set up SVNROOT. +# Set up GITROOT. if [ $LOCAL -eq 0 ]; then - SVNROOT="svn+ssh://${SVN_USERNAME}@${SVN_SERVER}${SVN_REPOSITORY}" + GITROOT="git+ssh://${GIT_USERNAME}@${GIT_SERVER}${GIT_REPOSITORY}" else - SVNROOT="file:///svn/gcc" + GITROOT="/git/gcc.git" fi -export SVNROOT +export GITROOT ######################################################################## # Main Program