You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2021/09/06 10:56:25 UTC

svn commit: r1892985 - in /httpd/dev-tools/v2: README common-lib.sh make-candidate.sh make-tars.sh push-tars.sh release-candidate.sh reset-candidate.sh

Author: icing
Date: Mon Sep  6 10:56:24 2021
New Revision: 1892985

URL: http://svn.apache.org/viewvc?rev=1892985&view=rev
Log:
 * Scripts now differentiates between $VERSION, the version a candidate shall become,
   from $FULL_VERSION which carries an optional suffix, e.g. 2.4.49-rc1
 * added 'release-candidate.sh' to move tarballs and CHANGES from dev to release dist
   and renaming tags/candidate-$FULL_VERSION to tags/$VERSION
 * added 'reset-candidate.sh' to remove any tarballs from dev dist repository and
   the tags/candidate-$FULL_VERSION tag
 * documentation, small fixes and added checks


Added:
    httpd/dev-tools/v2/release-candidate.sh   (with props)
    httpd/dev-tools/v2/reset-candidate.sh   (with props)
Modified:
    httpd/dev-tools/v2/README
    httpd/dev-tools/v2/common-lib.sh
    httpd/dev-tools/v2/make-candidate.sh
    httpd/dev-tools/v2/make-tars.sh
    httpd/dev-tools/v2/push-tars.sh

Modified: httpd/dev-tools/v2/README
URL: http://svn.apache.org/viewvc/httpd/dev-tools/v2/README?rev=1892985&r1=1892984&r2=1892985&view=diff
==============================================================================
--- httpd/dev-tools/v2/README (original)
+++ httpd/dev-tools/v2/README Mon Sep  6 10:56:24 2021
@@ -15,26 +15,28 @@ MISSING
 
 Usage overview:
  in a local checkout of the branch you want to release, run
-   > $BUILD_TOOLS/v2/make-candidate.sh
-   > $BUILD_TOOLS/v2/make-tars.sh
-   > $BUILD_TOOLS/v2/push-tars.sh
- and the release files are created in the "dist" directory,
- with checksums and signed. An email template for voting has
- also been created.
-
- NO CHANGES have been made to the checked out branch. This
- means you can repeat this process over and over until you
- are happy with the results.
-
- push-tars.sh is asking for confirmation before commiting
- your changes to https://dist.apache.org/repos/dist/dev/$PROJECT.
- You may skip that and commit it later after inspection.
-
- To revert this at any stage:
-   > rm -rf dist
-   > svn rm ^/httpd/httpd/tags/candidate-$VERSION
-   if the push was commited in REV at dist.apache.org, revert the change with
-   > svn merge -c -$REV https://dist.apache.org/repos/dist/dev/$PROJECT
+   > $BUILD_TOOLS/v2/make-candidate.sh version
+   > $BUILD_TOOLS/v2/make-tars.sh version
+   > $BUILD_TOOLS/v2/push-tars.sh version
+   # tars are available at https://dist.apache.org/repos/dist/dev/ now
+   # send out a mail for voting on it
+
+   # ----------------
+   # update to here, everything can be reverted via 'reset-candidate.sh'
+   #-----------------
+
+ On success:
+   > $BUILD_TOOLS/v2/release-candidate.sh version
+   # tars are moved to https://dist.apache.org/repos/dist/release/
+   # the SVN tags/candidate-$FULL_VERSION is moved to tags/$VERSION
+   # send out the announcements
+   > $BUILD_TOOLS/announce.sh
+   > TODO: increment the version in your local branch for development of next
+
+ On failure or when aborting for other reasons:
+   > $BUILD_TOOLS/v2/reset-candidate.sh version
+   # removes all additions to SVN repositories and clears local dist
+
 
 The local checkout:
  - same as you otherwise use, e.g. of ^/httpd/httpd/branches/2.4.x
@@ -45,12 +47,17 @@ The local checkout:
  - make-candidate.sh checks if there are no local, uncomitted changes
 
 Handling of VERSIONs:
- - You *may* specify the version as argument to the scripts. If you do not,
+ - You *should* just specify the version suffix and let the scripts figure
+   out the rest. Example:
+   > $BUILD_TOOLS/v2/make-candidate.sh rc1
+   to make the "release candidate 1" of the current checkout version.
+ - You *may* specify the complete version as argument to the scripts. If you do not,
    the scripts will use the version they find in your local checkout. After
    a release, we increment the version to be used next. Even on a failed
    release candidate, we have done this in the past. This means, as long
    as we stick to this, specifying no version should work best.
- - The scripts are prepared to work with a version suffix, as in "2.4.51-rc1",
+
+   The scripts are prepared to work with a version suffix, as in "2.4.51-rc1",
    but this is not really tested. It may prove easier to follow this versioning
    and only step the version on httpd after a successful release.
 

Modified: httpd/dev-tools/v2/common-lib.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/v2/common-lib.sh?rev=1892985&r1=1892984&r2=1892985&view=diff
==============================================================================
--- httpd/dev-tools/v2/common-lib.sh (original)
+++ httpd/dev-tools/v2/common-lib.sh Mon Sep  6 10:56:24 2021
@@ -63,13 +63,20 @@ detect_checkout() {
 
 # given the version input (possibly empty),
 # detect/check the version components and set variabels
-# VERSION      the full version string
+# VERSION      the version string "major.minor.patch"
+# FULL_VERSION $VERSION plus the optional suffix
 # v_major      the major integer
 # v_minor      the minor integer
 # v_patch      the patch integer
 # v_suffix     the optional suffix, e.g. 'rc1' or so
 detect_version() {
   version=$1
+  case "$version" in
+    rc*)
+      v_suffix="$version"
+      version=""
+      ;;
+  esac
   if test -z "$version"; then
     # determine version from local files
     if test -f include/ap_release.h; then
@@ -95,8 +102,9 @@ detect_version() {
   is_int ${v_patch} || fail "version patch '${v_patch}' is not a number"
 
   VERSION="${v_major}.${v_minor}.${v_patch}"
+  FULL_VERSION="${VERSION}"
   if test -n "${v_suffix}"; then
-    VERSION="${VERSION}-${v_suffix}"
+    FULL_VERSION="${VERSION}-${v_suffix}"
   fi
 }
 

Modified: httpd/dev-tools/v2/make-candidate.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/v2/make-candidate.sh?rev=1892985&r1=1892984&r2=1892985&view=diff
==============================================================================
--- httpd/dev-tools/v2/make-candidate.sh (original)
+++ httpd/dev-tools/v2/make-candidate.sh Mon Sep  6 10:56:24 2021
@@ -10,8 +10,6 @@
 # @version       the version identifier, major.minor.patch, to use. If not given
 #                it will determine the version from the local sources
 #
-# Environment:
-# name         default
 
 #Useful for debugging
 #set -x
@@ -52,13 +50,13 @@ detect_checkout
 detect_version $1
 
 PROJECT=`basename $SVN_BASE`
-SVN_DEST="tags/candidate-${VERSION}"
-DIST_DIR="dist/candidate-${VERSION}"
+SVN_DEST="tags/candidate-${FULL_VERSION}"
+DIST_DIR="dist/candidate-${FULL_VERSION}"
 
 cat <<EOF
 creating release candidate:
   PROJECT: $PROJECT
-  VERSION: $VERSION
+  VERSION: $FULL_VERSION
   URL: $SVN_URL
   SOURCE: $SVN_SRC@$SVN_REV
   DEST: $SVN_DEST
@@ -90,7 +88,7 @@ if svn ls "$SVN_BASE/$SVN_DEST" >/dev/nu
   fi
 else
   echo "creating candidate tag: $SVN_DEST"
-  svn cp -m "Tag $SVN_SRC@$SVN_REV as $VERSION" "$SVN_BASE/$SVN_SRC@$SVN_REV" "$SVN_BASE/$SVN_DEST"
+  svn cp -m "Tag $SVN_SRC@$SVN_REV as $FULL_VERSION" "$SVN_BASE/$SVN_SRC@$SVN_REV" "$SVN_BASE/$SVN_DEST"
   rm -rf "$DIST_DIR"
 fi
 
@@ -151,7 +149,7 @@ fi
 
 popd >/dev/null
 
-echo "changes for candidate-${VERSION} in ${DIST_DIR}"
+echo "changes for candidate-${FULL_VERSION} in ${DIST_DIR}"
 svn stat "${DIST_DIR}"
 if ask_yes_no "Do you want to commit these?"; then
   svn commit -m "Post $version tag updates" "$DIST_DIR"

Modified: httpd/dev-tools/v2/make-tars.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/v2/make-tars.sh?rev=1892985&r1=1892984&r2=1892985&view=diff
==============================================================================
--- httpd/dev-tools/v2/make-tars.sh (original)
+++ httpd/dev-tools/v2/make-tars.sh Mon Sep  6 10:56:24 2021
@@ -2,16 +2,12 @@
 
 # Create the release tars from a svn candidate tag
 #
-# USAGE: make-tars.sh [version [dir]]
-# EXAMPLE: make-tars.sh 2.4.49 ./dist
+# USAGE: make-tars.sh [version]
+# EXAMPLE: make-tars.sh 2.4.49
 #
 # Create the tar files for a release candidate svn tag
 # @version       the version identifier, major.minor.patch, to use. If not given
 #                it will determine the version from the local sources
-# @dir           directory to create the tars and exports in
-#
-# Environment:
-# name         default
 
 #Useful for debugging
 #set -x
@@ -51,19 +47,22 @@ detect_checkout
 detect_version $1
 
 PROJECT=`basename $SVN_BASE`
-SVN_DEST="tags/candidate-${VERSION}"
+SVN_DEST="tags/candidate-${FULL_VERSION}"
 DIST_DIR="dist"
 
 cat <<EOF
 creating release tars:
   PROJECT: $PROJECT
-  VERSION: $VERSION
+  VERSION: $FULL_VERSION
   CANDIDATE: $SVN_BASE/$SVN_DEST
   LOCAL: $DIST_DIR
 EOF
 
 EXP_DIRNAME="${PROJECT}-${VERSION}"
 EXP_PATH="${DIST_DIR}/${EXP_DIRNAME}"
+# almost the same, except using the full version string
+TAR_BASENAME="${PROJECT}-${FULL_VERSION}"
+TAR_PATH="${DIST_DIR}/${TAR_BASENAME}"
 
 svn ls "$SVN_BASE/$SVN_DEST" >/dev/null 2>&1 ||
   fail "release candidate does not exist in SVN: $SVN_DEST"
@@ -105,9 +104,9 @@ case "$PROJECT" in
     mkdir -p "${EXP_PATH}-deps"/${EXP_DIRNAME}/srclib
     mv "${EXP_PATH}/srclib/apr" "${EXP_PATH}-deps/${EXP_DIRNAME}/srclib"
     mv "${EXP_PATH}/srclib/apr-util" "${EXP_PATH}-deps/${EXP_DIRNAME}/srclib"
-    tar -C "${EXP_PATH}-deps" -cf ${EXP_PATH}-deps.tar "${EXP_DIRNAME}"
-    gzip -9 --to-stdout "${EXP_PATH}-deps.tar" > "${EXP_PATH}-deps.tar.gz"
-    bzip2 -9 "${EXP_PATH}-deps.tar"
+    tar -C "${EXP_PATH}-deps" -cf ${TAR_PATH}-deps.tar "${EXP_DIRNAME}"
+    gzip -9 --to-stdout "${TAR_PATH}-deps.tar" > "${TAR_PATH}-deps.tar.gz"
+    bzip2 -9 "${TAR_PATH}-deps.tar"
     ;;
 
   *)
@@ -117,16 +116,16 @@ esac
 
 
 echo "building dist tarballs ..."
-tar  -C "${DIST_DIR}" -cf "${EXP_PATH}".tar "${EXP_DIRNAME}"
-gzip -9 --to-stdout "${EXP_PATH}".tar > "${EXP_PATH}".tar.gz
-bzip2 -9 "${EXP_PATH}".tar
+tar  -C "${DIST_DIR}" -cf "${TAR_PATH}".tar "${EXP_DIRNAME}"
+gzip -9 --to-stdout "${TAR_PATH}".tar > "${TAR_PATH}".tar.gz
+bzip2 -9 "${TAR_PATH}".tar
 
 if test "$build_checksums" = 1; then
   echo " - create dist checksums ..."
-  create_dist_checksums "${EXP_PATH}"*.tar.gz "${EXP_PATH}"*.tar.bz2
+  create_dist_checksums "${TAR_PATH}"*.tar.gz "${TAR_PATH}"*.tar.bz2
 fi
 
 if test -n "$SVN_DIST_KEYS"; then
   echo " - signing dist files ..."
-  sign_dist_files "${signing_user}" "${EXP_PATH}"*.tar.gz "${EXP_PATH}"*.tar.bz2
+  sign_dist_files "${signing_user}" "${TAR_PATH}"*.tar.gz "${TAR_PATH}"*.tar.bz2
 fi

Modified: httpd/dev-tools/v2/push-tars.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/v2/push-tars.sh?rev=1892985&r1=1892984&r2=1892985&view=diff
==============================================================================
--- httpd/dev-tools/v2/push-tars.sh (original)
+++ httpd/dev-tools/v2/push-tars.sh Mon Sep  6 10:56:24 2021
@@ -2,13 +2,8 @@
 
 # Push candidate release tarballs in directory to the dev or release dist repos
 #
-# USAGE: push.sh directory version dev|dist (scratch_dir)
-# directory: Directory to obtain release artifacts from
+# USAGE: push.sh [version]
 # version: x.y.z (example 2.4.38)
-# dev|dist: If "dev", push to https://dist.apache.org/repos/dist/dev/httpd/
-#           If "dist", push to https://dist.apache.org/repos/dist/release/httpd
-# scratch_dir: Optional directory to use as the SVN clone and staging location.
-#              Will be created and deleted automatically by this script
 
 #Useful for debugging
 #set -x
@@ -49,26 +44,29 @@ detect_checkout
 detect_version $1
 
 PROJECT=`basename $SVN_BASE`
-SVN_DEST="tags/candidate-${VERSION}"
+SVN_DEST="tags/candidate-${FULL_VERSION}"
 
 DIST_DIR="dist"
 SVN_DIST_URL=https://dist.apache.org/repos/dist/
+
 EXP_DIRNAME="${PROJECT}-${VERSION}"
 EXP_PATH="${DIST_DIR}/${EXP_DIRNAME}"
+# almost the same, except using the full version string
+TAR_BASENAME="${PROJECT}-${FULL_VERSION}"
+TAR_PATH="${DIST_DIR}/${TAR_BASENAME}"
 
 test -d "${EXP_PATH}" ||
   fail "export directory ${EXP_PATH} does not exist. Did you run 'make-tars.sh'?"
-test -f "${EXP_PATH}.tar.gz" ||
-  fail "export tarball ${EXP_PATH}.tar.gz does not exist. Did you run 'make-tars.sh'?"
+test -f "${TAR_PATH}.tar.gz" ||
+  fail "export tarball ${TAR_PATH}.tar.gz does not exist. Did you run 'make-tars.sh'?"
 
 #Ensure scratch space is in a state we are ready to work with
 AO_DIST_PATH="dist/apache.org-dist"
-rm -rf "${AO_DIST_PATH}"
-
 AO_DIST_DEV_PATH="${AO_DIST_PATH}/dev/${PROJECT}"
 AO_DIST_RELEASE_PATH="${AO_DIST_PATH}/release/${PROJECT}"
 
 # SVN repository is huge, carefully check out only what we need
+rm -rf "${AO_DIST_PATH}"
 echo "checking out dist from ${SVN_DIST_URL} ..."
 svn checkout --depth=empty "$SVN_DIST_URL" "${AO_DIST_PATH}" >/dev/null
 echo "checking out ${AO_DIST_DEV_PATH} ..."
@@ -100,10 +98,14 @@ cat "${EXP_PATH}/CHANGES" | perl -e '
   }' > "${AO_DIST_DEV_PATH}/CHANGES_$VERSION"
 svn add "${AO_DIST_DEV_PATH}/CHANGES_$VERSION" >/dev/null
 
-#Place the tarballs and add to changeset
+# Place the tarballs and add to changeset, remove any existing
+# tarballs with same major.minor.patch
 echo "adding candidate tars from ${EXP_PATH}*.tar.*"
-cp "${EXP_PATH}"*.tar.* "${AO_DIST_DEV_PATH}"/
-svn add "${AO_DIST_DEV_PATH}"/${EXP_DIRNAME}*.tar.* >/dev/null
+if ls "${AO_DIST_DEV_PATH}"/${EXP_DIRNAME}.* >/dev/null 2>&1;then
+  svn rm "${AO_DIST_DEV_PATH}"/${EXP_DIRNAME}.*
+fi
+cp "${TAR_PATH}"*.tar.* "${AO_DIST_DEV_PATH}"/
+svn add "${AO_DIST_DEV_PATH}"/${TAR_BASENAME}*.tar.* >/dev/null
 
 echo "updating CHANGES_${v_major}.${v_minor}"
 RELEASE_LINE_CHANGES="${AO_DIST_DEV_PATH}/CHANGES_${v_major}.${v_minor}"
@@ -127,21 +129,21 @@ perl -pi -e 's/^(\s+Published ).*$/${1}'
 echo "changes ready for commit in ${AO_DIST_DEV_PATH}"
 svn stat "${AO_DIST_DEV_PATH}"
 if ask_yes_no "Do you want to commit these?"; then
-  svn commit -m "Add $VERSION files" "${AO_DIST_DEV_PATH}"
+  svn commit -m "Add $FULL_VERSION files" "${AO_DIST_DEV_PATH}"
 fi
 
 pushd ${DIST_DIR} > /dev/null
 TAR_SIGS=`grep '^' ${PROJECT}-${VERSION}.tar.gz.sha* | sed -e 's/.*.tar.gz.//g' -e 's/:/: /g'`
 popd >/dev/null
 
-cat <<EOF > "${DIST_DIR}/mail-vote-$VERSION.txt"
-Subject: [VOTE] Release httpd-$VERSION
+cat <<EOF > "${DIST_DIR}/mail-vote-$FULL_VERSION.txt"
+Subject: [VOTE] Release httpd-$FULL_VERSION
 
 Hi, all;
    Please find below the proposed release tarball and signatures:
 ${SVN_DIST_URL}dev/${PROJECT}/
 
-I would like to call a VOTE over the next few days to release this candidate tarball as $VERSION:
+I would like to call a VOTE over the next few days to release this candidate tarball as $FULL_VERSION:
 [ ] +1: It's not just good, it's good enough!
 [ ] +0: Let's have a talk.
 [ ] -1: There's trouble in paradise. Here's what's wrong.
@@ -151,5 +153,5 @@ ${TAR_SIGS}
 
 The SVN candidate source is found at ${SVN_DEST}.
 EOF
-echo "An announcement email template has been created at ${DIST_DIR}/mail-vote-$VERSION.txt"
-cat "${DIST_DIR}/mail-vote-$VERSION.txt"
\ No newline at end of file
+echo "An announcement email template has been created at ${DIST_DIR}/mail-vote-$FULL_VERSION.txt"
+cat "${DIST_DIR}/mail-vote-$FULL_VERSION.txt"
\ No newline at end of file

Added: httpd/dev-tools/v2/release-candidate.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/v2/release-candidate.sh?rev=1892985&view=auto
==============================================================================
--- httpd/dev-tools/v2/release-candidate.sh (added)
+++ httpd/dev-tools/v2/release-candidate.sh Mon Sep  6 10:56:24 2021
@@ -0,0 +1,117 @@
+#!/bin/sh
+
+# Release a candidate that has passed voting
+#
+# USAGE: release-candidate.sh [version]
+# version: x.y.z (example 2.4.38)
+
+#Useful for debugging
+#set -x
+
+#Bail when non-zero return codes are encountered
+set -e
+
+#Make sure English is used when formating dates
+export LANG=en_US.UTF-8
+
+SVN_DIST_URL=https://dist.apache.org/repos/dist/
+
+usage () {
+    cat <<EOF 1>&2
+usage: $0 [options] [version]
+  release a candidate that has passed voting. The tars need
+  to exist at ${SVN_DIST_URL}/dev/ (put there by push-tars.sh).
+  If no version is given, the current version in the checkout is used.
+  Arguments:
+    version        as 'm.n.p(-suffix)?', the version to use.
+  Options:
+    -h             print usage information
+    -y             never ask, always assume yes
+EOF
+  exit 1
+}
+
+source `dirname $0`/common-lib.sh
+
+while getopts "hy" opt; do
+    case $opt in
+        h)  usage
+            ;;
+        y)  ALWAYS_YES=1
+            ;;
+    esac
+done
+
+detect_checkout
+detect_version $1
+
+PROJECT=`basename $SVN_BASE`
+SVN_DEST="tags/candidate-${FULL_VERSION}"
+SVN_RELEASE="tags/${VERSION}"
+
+svn ls "$SVN_BASE/$SVN_DEST" >/dev/null 2>&1 ||
+  fail "release candidate does not exist in SVN: $SVN_DEST"
+
+DIST_DIR="dist"
+
+EXP_DIRNAME="${PROJECT}-${VERSION}"
+EXP_PATH="${DIST_DIR}/${EXP_DIRNAME}"
+# almost the same, except using the full version string
+TAR_BASENAME="${PROJECT}-${FULL_VERSION}"
+TAR_PATH="${DIST_DIR}/${TAR_BASENAME}"
+
+#Ensure scratch space is in a state we are ready to work with
+AO_DIST_PATH="dist/apache.org-dist"
+AO_DIST_DEV_PATH="${AO_DIST_PATH}/dev/${PROJECT}"
+AO_DIST_RELEASE_PATH="${AO_DIST_PATH}/release/${PROJECT}"
+
+# SVN repository is huge, carefully check out only what we need
+rm -rf "${AO_DIST_PATH}"
+echo "checking out dist from ${SVN_DIST_URL} ..."
+svn checkout --depth=empty "$SVN_DIST_URL" "${AO_DIST_PATH}" >/dev/null
+echo "checking out ${AO_DIST_DEV_PATH} ..."
+svn update --set-depth immediates --parents "${AO_DIST_DEV_PATH}" >/dev/null
+echo "checking out ${AO_DIST_RELEASE_PATH} ..."
+svn update --set-depth immediates --parents "${AO_DIST_RELEASE_PATH}" >/dev/null
+
+echo "updating Announcement files ..."
+#Likely a duplicate of what we did above, but be safe... force version number in announcements
+perl -pi -e "s/${v_major}\.${v_minor}\.\d+/$VERSION/g" "${AO_DIST_RELEASE_PATH}/Announcement${v_major}.${v_minor}".*
+
+#Ensure the right date is in announcement file
+release_date=`LC_TIME=en_US date "+%B %d, %Y"`
+perl -pi -e "s/^   (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec).*/   $release_date/" "${AO_DIST_RELEASE_PATH}"/Announcement${v_major}.${v_minor}.*
+
+echo "moving voted tars ${AO_DIST_DEV_PATH}/${PROJECT}-${FULL_VERSION}.tar.*"
+#Do an SVN move of the files to retain history
+svn mv "${AO_DIST_DEV_PATH}/${PROJECT}-${FULL_VERSION}".tar.* "${AO_DIST_RELEASE_PATH}"/
+if test "${VERSION}" != "${FULL_VERSION}"; then
+  # releasing a version with a suffix, e.g. -rc1. rename to just version
+  echo "renaming ${FULL_VERSION} files to ${VERSION}"
+  for file in "${AO_DIST_RELEASE_PATH}/${PROJECT}-${FULL_VERSION}".tar.*; do
+    dest=`echo $file | sed -e "s/${FULL_VERSION}/${VERSION}/"`
+    svn mv "$file" "$dest"
+  done
+fi
+svn mv "${AO_DIST_DEV_PATH}/CHANGES_${VERSION}" "${AO_DIST_RELEASE_PATH}"/
+
+# remove dependency tars from dev
+if ls "${AO_DIST_DEV_PATH}/httpd-${FULL_VERSION}-deps".tar.* >/dev/null 2>&1;then
+  svn rm --force "${AO_DIST_DEV_PATH}/httpd-${FULL_VERSION}-deps".tar.*
+fi
+
+#We cannot move since these exist in the destination
+cp "${AO_DIST_DEV_PATH}/CHANGES_${v_major}.${v_minor}" "${AO_DIST_RELEASE_PATH}"/
+svn rm --force "${AO_DIST_DEV_PATH}/CHANGES_${v_major}.${v_minor}"
+#Note we don't delete the Announce files since it is our template
+
+echo "changes ready for commit in ${AO_DIST_PATH}"
+svn stat "${AO_DIST_PATH}"
+if ask_yes_no "Do you want to commit these?"; then
+  svn commit -m "Add release $PROJECT-$VERSION from voted $FULL_VERSION" "${AO_DIST_PATH}"
+else
+  exit 1
+fi
+
+# As a last step, move the candidate tag to the release tag
+svn mv "$SVN_BASE/$SVN_DEST" "$SVN_BASE/$SVN_RELEASE"

Propchange: httpd/dev-tools/v2/release-candidate.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: httpd/dev-tools/v2/reset-candidate.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/v2/reset-candidate.sh?rev=1892985&view=auto
==============================================================================
--- httpd/dev-tools/v2/reset-candidate.sh (added)
+++ httpd/dev-tools/v2/reset-candidate.sh Mon Sep  6 10:56:24 2021
@@ -0,0 +1,113 @@
+#!/bin/sh
+
+# Reset a candidate that is cancelled/voted down
+#
+# USAGE: reset-candidate.sh [version]
+# version: x.y.z (example 2.4.38)
+
+#Useful for debugging
+#set -x
+
+#Bail when non-zero return codes are encountered
+set -e
+
+#Make sure English is used when formating dates
+export LANG=en_US.UTF-8
+
+SVN_DIST_URL=https://dist.apache.org/repos/dist/
+
+usage () {
+    cat <<EOF 1>&2
+usage: $0 [options] [version]
+  reset a candidate that is cancelled. Remove all appearances in
+  the repositories.
+  If no version is given, the current version in the checkout is used.
+  Arguments:
+    version        as 'm.n.p(-suffix)?', the version to use.
+  Options:
+    -h             print usage information
+    -y             never ask, always assume yes
+EOF
+  exit 1
+}
+
+source `dirname $0`/common-lib.sh
+
+while getopts "hy" opt; do
+    case $opt in
+        h)  usage
+            ;;
+        y)  ALWAYS_YES=1
+            ;;
+    esac
+done
+
+detect_checkout
+detect_version $1
+
+PROJECT=`basename $SVN_BASE`
+SVN_DEST="tags/candidate-${FULL_VERSION}"
+SVN_RELEASE="tags/${VERSION}"
+
+if svn ls "$SVN_BASE/$SVN_RELEASE" >/dev/null 2>&1 ; then
+  fail "release already tagged at $SVN_RELEASE"
+fi
+
+DIST_DIR="dist"
+
+EXP_DIRNAME="${PROJECT}-${VERSION}"
+EXP_PATH="${DIST_DIR}/${EXP_DIRNAME}"
+# almost the same, except using the full version string
+TAR_BASENAME="${PROJECT}-${FULL_VERSION}"
+TAR_PATH="${DIST_DIR}/${TAR_BASENAME}"
+
+#Ensure scratch space is in a state we are ready to work with
+AO_DIST_PATH="dist/apache.org-dist"
+AO_DIST_DEV_PATH="${AO_DIST_PATH}/dev/${PROJECT}"
+AO_DIST_RELEASE_PATH="${AO_DIST_PATH}/release/${PROJECT}"
+
+# SVN repository is huge, carefully check out only what we need
+rm -rf "${AO_DIST_PATH}"
+echo "checking out dist from ${SVN_DIST_URL} ..."
+svn checkout --depth=empty "$SVN_DIST_URL" "${AO_DIST_PATH}" >/dev/null
+echo "checking out ${AO_DIST_DEV_PATH} ..."
+svn update --set-depth immediates --parents "${AO_DIST_DEV_PATH}" >/dev/null
+echo "checking out ${AO_DIST_RELEASE_PATH} ..."
+svn update --set-depth immediates --parents "${AO_DIST_RELEASE_PATH}" >/dev/null
+
+# has this been released already?
+if ls "${AO_DIST_RELEASE_PATH}/${PROJECT}-${VERSION}".tar.* >/dev/null 2>&1;then
+  fail "Files exist as ${AO_DIST_RELEASE_PATH}/${PROJECT}-${VERSION}.tar.*" \
+    "This seems to indicate that ${VERSION} has already been released!"
+fi
+
+if ls "${AO_DIST_DEV_PATH}/${PROJECT}-${FULL_VERSION}"* >/dev/null 2>&1;then
+  echo "removing candidate tarballs in ${AO_DIST_DEV_PATH}"
+  svn rm --force "${AO_DIST_DEV_PATH}/${PROJECT}-${FULL_VERSION}"*
+fi
+if ls "${AO_DIST_DEV_PATH}/CHANGES_${v_major}.${v_minor}"* >/dev/null 2>&1;then
+  echo "removing CHANGES in ${AO_DIST_DEV_PATH}"
+  svn rm --force "${AO_DIST_DEV_PATH}/CHANGES_${v_major}.${v_minor}"*
+fi
+
+out=`svn stat "${AO_DIST_PATH}" 2>&1 >/dev/null`
+if test -n "$out"; then
+  svn stat "${AO_DIST_PATH}"
+  if ask_yes_no "Do you want to commit these?"; then
+    svn commit -m "resetting candidate $FULL_VERSION" "${AO_DIST_PATH}"
+  else
+    exit 1
+  fi
+else
+  echo "${AO_DIST_PATH} does not hold and ${FULL_VERSION} files."
+fi
+
+if svn ls "$SVN_BASE/$SVN_DEST" >/dev/null 2>&1 ; then
+  echo "removing $SVN_DEST"
+  svn rm -m "resetting candidate $FULL_VERSION" "$SVN_BASE/$SVN_DEST"
+fi
+
+if test -d "$DIST_DIR"; then
+  echo "removing local $DIST_DIR"
+  rm -rf "$DIST_DIR"
+fi
\ No newline at end of file

Propchange: httpd/dev-tools/v2/reset-candidate.sh
------------------------------------------------------------------------------
    svn:executable = *