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/08 13:17:05 UTC

svn commit: r1893143 - in /httpd/dev-tools/release: check-cves.sh common-lib.sh env.sh r0-make-candidate.sh r1-make-tars.sh r2-prep-vote.sh r3-push-release-tars.sh r4-stage-release.sh r5-commit-staged-release.sh r6-announce.sh reset-candidate.sh

Author: icing
Date: Wed Sep  8 13:17:05 2021
New Revision: 1893143

URL: http://svn.apache.org/viewvc?rev=1893143&view=rev
Log:
 * added release/check-cves.sh to see exaclty which ones would be added
 * added env.sh for common URL definitions sources in all scripts
 * r5-commit-staged-release.sh fleshed out, but actual commits still commented out

Added:
    httpd/dev-tools/release/check-cves.sh   (with props)
    httpd/dev-tools/release/env.sh
Modified:
    httpd/dev-tools/release/common-lib.sh
    httpd/dev-tools/release/r0-make-candidate.sh
    httpd/dev-tools/release/r1-make-tars.sh
    httpd/dev-tools/release/r2-prep-vote.sh
    httpd/dev-tools/release/r3-push-release-tars.sh
    httpd/dev-tools/release/r4-stage-release.sh
    httpd/dev-tools/release/r5-commit-staged-release.sh
    httpd/dev-tools/release/r6-announce.sh
    httpd/dev-tools/release/reset-candidate.sh

Added: httpd/dev-tools/release/check-cves.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/release/check-cves.sh?rev=1893143&view=auto
==============================================================================
--- httpd/dev-tools/release/check-cves.sh (added)
+++ httpd/dev-tools/release/check-cves.sh Wed Sep  8 13:17:05 2021
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+# Check which CVEs are ready for a release right now.
+#
+
+#Useful for debugging
+#set -x
+
+#Bail when non-zero return codes are encountered
+set -e
+
+
+usage () {
+    cat <<EOF 1>&2
+usage: $0 [options]
+  Check which CVEs are ready for release.
+  Options:
+    -h             print usage information
+EOF
+  exit 1
+}
+
+while getopts "h" opt; do
+    case $opt in
+        h)  usage
+            ;;
+    esac
+done
+shift $((OPTIND-1))
+
+source `dirname $0`/common-lib.sh
+source `dirname $0`/env.sh
+
+detect_checkout
+detect_version ""
+
+PROJECT=`basename $SVN_BASE`
+SVN_DEST="tags/candidate-${FULL_VERSION}"
+SVN_RELEASE="tags/${VERSION}"
+
+DIST_DIR="dist"
+
+calc_ready_CVE_DIRS "${DIST_DIR}/pmc-check"
+echo
+if test -n "${CVE_DIRS}"; then
+  echo "CVEs ready for release:"
+  echo "-----------------------"
+  for CVE in $CVE_DIRS; do
+    echo "$CVE"
+    cat "${DIST_DIR}/pmc-check/SECURITY/${CVE}/CHANGES"
+  done
+  echo "-----------------------"
+else
+  echo "No CVEs ready for release."
+fi
\ No newline at end of file

Propchange: httpd/dev-tools/release/check-cves.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: httpd/dev-tools/release/common-lib.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/release/common-lib.sh?rev=1893143&r1=1893142&r2=1893143&view=diff
==============================================================================
--- httpd/dev-tools/release/common-lib.sh (original)
+++ httpd/dev-tools/release/common-lib.sh Wed Sep  8 13:17:05 2021
@@ -15,7 +15,9 @@ warn() {
   if test -n "$*"; then
     echo "WARNING: $*" >&2
   fi
-  test "$exit_on_warnings" = 1 && exit 1
+  if test "$exit_on_warnings" = 1; then
+    exit 1
+  fi
 }
 
 is_int() {
@@ -61,6 +63,7 @@ detect_checkout() {
   esac
   SVN_REV=`svn info --show-item revision` || fail "unable to determine SVN revision"
   test -n "$SVN_REV" || fail "unable to determine SVN revision"
+  PROJECT=`basename $SVN_BASE`
 }
 
 assure_clean_checkout() {
@@ -399,14 +402,13 @@ stage_checkout_release() {
       fi
     fi
 
-    # Execute ./build.sh all convmap to ensure that the documentation transformations are up to date.
     echo "rebuilding manuals"
     pushd docs/manual >/dev/null
     #See http://httpd.apache.org/docs-project/docsformat.html for these instructions
     if test -d build; then
       svn update build
     else
-      svn checkout https://svn.apache.org/repos/asf/httpd/docs-build/trunk build
+      svn checkout "${SVN_DOCS_BUILD_URL}/trunk" build
     fi
     pushd build >/dev/null
     ./build.sh all convmap
@@ -417,28 +419,35 @@ stage_checkout_release() {
   fi
 }
 
-stage_website_release() {
-  DIST_SITEPATH="$1"
-  SVN_SITE_URL=https://svn.apache.org/repos/asf/${PROJECT}/site/trunk/content/
-  rm -rf "${DIST_SITEPATH}"
-  svn checkout --depth=empty "${SVN_SITE_URL}" "${DIST_SITEPATH}"
-
-  #Update the site content with the new release date and version
-  iso_date=`date +%Y-%m-%d`
-  svn update "${DIST_SITEPATH}"/doap.rdf
-  perl -pi -e "s/${v_major}\.${v_minor}\.\d+/${VERSION}/g" "${DIST_SITEPATH}"/doap.rdf
-  perl -pi -e "s|<created>.*|<created>$iso_date</created>|g" "${DIST_SITEPATH}"/doap.rdf
-
-  #Modify the home page by replacing the date and the version string
-  svn update "${DIST_SITEPATH}"/index.mdtext
-  perl -pi -e "s|Apache httpd $major.$minor.* Released <span>.*</span>|Apache httpd ${VERSION} Released <span>$iso_date</span>|g" "${DIST_SITEPATH}"/index.mdtext
-  perl -pi -e "s/${v_major}\.${v_minor}\.\d+/${VERSION}/g" "${DIST_SITEPATH}"/index.mdtext
-
-  #Downloads page
-  svn update "${DIST_SITEPATH}"/download.mdtext
-  perl -pi -e "s/${v_major}\.${v_minor}\.\d+/${VERSION}/g" "${DIST_SITEPATH}"/download.mdtext
-  perl -pi -e "s/\\d{4}-\\d{2}-\\d{2}/$iso_date/ if /${VERSION}/" "${DIST_SITEPATH}"/download.mdtext
-  if ! grep -e "# Apache HTTP Server ${VERSION} (httpd): ${VERSION}.*<span>$iso_date</span>" "${DIST_SITEPATH}"/download.mdtext >/dev/null;then
-    fail "Failed to update the release version and/or date in download.mdtext"
+checkout_pmc() {
+  dest="$1"
+  test -n "${SVN_PMC_URL}" || fail "SVN_PMC_URL not set"
+  echo "checking out pmc/${PROJECT} as ${dest}"
+  rm -rf "${dest}"
+  svn checkout "${SVN_PMC_URL}/${PROJECT}" "${dest}" >/dev/null
+}
+
+calc_ready_CVE_DIRS() {
+  dest="$1"
+  checkout_pmc "${dest}"
+  pushd "${dest}/SECURITY" >/dev/null
+  CVE_DIRS=`./tools/readiness.sh -n | fgrep '[OK]'| awk '{print $2}' | sort `
+  popd >/dev/null
+
+  cves_ok=1
+  for CVE in $CVE_DIRS; do
+    if test -f "${dest}/SECURITY/${CVE}/CHANGES"; then
+      :
+    elif test -f "${dest}/SECURITY/${CVE}/CHANGES.diff"; then
+      echo "ERROR: cannot apply old-style diff in ${dest}/SECURITY/${CVE}/CHANGES.diff." \
+        " Please convert this to a CHANGES files with just the text."
+      cves_ok=0
+    else
+      echo "ERROR: CVE ${CVE} does not have a CHANGES file."
+      cves_ok=0
+    fi
+  done
+  if test "${cves_ok}" != 1; then
+    fail "Please correct the files mentioned."
   fi
 }
\ No newline at end of file

Added: httpd/dev-tools/release/env.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/release/env.sh?rev=1893143&view=auto
==============================================================================
--- httpd/dev-tools/release/env.sh (added)
+++ httpd/dev-tools/release/env.sh Wed Sep  8 13:17:05 2021
@@ -0,0 +1,5 @@
+DIST_DIR="dist"
+SVN_DIST_URL="https://dist.apache.org/repos/dist/"
+SVN_PMC_URL="https://svn.apache.org/repos/private/pmc"
+SVN_DOCS_BUILD_URL="https://svn.apache.org/repos/asf/httpd/docs-build"
+GIT_SITE_URL="git@github.com:apache/httpd-site.git"

Modified: httpd/dev-tools/release/r0-make-candidate.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/release/r0-make-candidate.sh?rev=1893143&r1=1893142&r2=1893143&view=diff
==============================================================================
--- httpd/dev-tools/release/r0-make-candidate.sh (original)
+++ httpd/dev-tools/release/r0-make-candidate.sh Wed Sep  8 13:17:05 2021
@@ -17,8 +17,6 @@
 #Bail when non-zero return codes are encountered
 set -e
 
-source `dirname $0`/common-lib.sh
-
 usage () {
     cat <<EOF 1>&2
 usage: $0 [options] [version]
@@ -43,13 +41,15 @@ while getopts "hy" opt; do
 done
 shift $((OPTIND-1))
 
+source `dirname $0`/common-lib.sh
+source `dirname $0`/env.sh
+
 detect_checkout
 assure_clean_checkout
 detect_version $1
 
-PROJECT=`basename $SVN_BASE`
 SVN_DEST="tags/candidate-${FULL_VERSION}"
-DIST_DIR="dist/candidate-${FULL_VERSION}"
+DEST_DIR="${DIST_DIR}/candidate-${FULL_VERSION}"
 
 cat <<EOF
 creating release candidate:
@@ -58,7 +58,7 @@ creating release candidate:
   URL: $SVN_URL
   SOURCE: $SVN_SRC@$SVN_REV
   DEST: $SVN_DEST
-  LOCAL: $DIST_DIR
+  LOCAL: $DEST_DIR
 EOF
 
 if test -f include/ap_release.h; then
@@ -87,18 +87,19 @@ if svn ls "$SVN_BASE/$SVN_DEST" >/dev/nu
 else
   echo "creating candidate tag: $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"
+  rm -rf "$DEST_DIR"
 fi
 
-if test ! -d "$DIST_DIR"; then
-  mkdir -p `dirname "$DIST_DIR"`
-  svn checkout -q "$SVN_BASE/$SVN_DEST" "$DIST_DIR"
+if test ! -d "$DEST_DIR"; then
+  mkdir -p `dirname "$DEST_DIR"`
+  echo "checkout $DEST_DIR"
+  svn checkout -q "$SVN_BASE/$SVN_DEST" "$DEST_DIR"
 else
-  echo "updating existing checkout in $DIST_DIR"
-  svn update "$DIST_DIR"
+  echo "updating existing checkout in $DEST_DIR"
+  svn update "$DEST_DIR"
 fi
 
-pushd "$DIST_DIR" >/dev/null
+pushd "$DEST_DIR" >/dev/null
 
 if test -f include/ap_release.h; then
   # Set AP_SERVER_DEVBUILD_BOOLEAN to 0 in include/ap_release.h.
@@ -136,7 +137,9 @@ if test -d docs/manual; then
   echo "rebuilding manuals"
   pushd docs/manual >/dev/null
   #See http://httpd.apache.org/docs-project/docsformat.html for these instructions
-  svn checkout https://svn.apache.org/repos/asf/httpd/docs-build/trunk build
+SVN_DOCS_BUILD_URL="https://svn.apache.org/repos/asf/httpd/docs-build"
+
+  svn checkout "${SVN_DOCS_BUILD_URL}/trunk" build
   pushd build >/dev/null
   ./build.sh all convmap
   ./build.sh validate-xml
@@ -148,9 +151,9 @@ fi
 
 popd >/dev/null
 
-echo "changes for candidate-${FULL_VERSION} in ${DIST_DIR}"
-svn stat "${DIST_DIR}"
+echo "changes for candidate-${FULL_VERSION} in ${DEST_DIR}"
+svn stat "${DEST_DIR}"
 if ask_yes_no "Do you want to commit these?"; then
-  svn commit -m "Post $FULL_VERSION tag updates" "$DIST_DIR"
+  svn commit -m "Post $FULL_VERSION tag updates" "$DEST_DIR"
   echo "release candidate sources created in $SVN_DEST"
 fi

Modified: httpd/dev-tools/release/r1-make-tars.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/release/r1-make-tars.sh?rev=1893143&r1=1893142&r2=1893143&view=diff
==============================================================================
--- httpd/dev-tools/release/r1-make-tars.sh (original)
+++ httpd/dev-tools/release/r1-make-tars.sh Wed Sep  8 13:17:05 2021
@@ -15,8 +15,6 @@
 #Bail when non-zero return codes are encountered
 set -e
 
-source `dirname $0`/common-lib.sh
-
 usage () {
     cat <<EOF 1>&2
 usage: $0 [options] [version]
@@ -44,12 +42,13 @@ while getopts "hs" opt; do
 done
 shift $((OPTIND-1))
 
+source `dirname $0`/common-lib.sh
+source `dirname $0`/env.sh
+
 detect_checkout
 detect_version $1
 
-PROJECT=`basename $SVN_BASE`
 SVN_DEST="tags/candidate-${FULL_VERSION}"
-DIST_DIR="dist"
 
 cat <<EOF
 creating release tars:

Modified: httpd/dev-tools/release/r2-prep-vote.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/release/r2-prep-vote.sh?rev=1893143&r1=1893142&r2=1893143&view=diff
==============================================================================
--- httpd/dev-tools/release/r2-prep-vote.sh (original)
+++ httpd/dev-tools/release/r2-prep-vote.sh Wed Sep  8 13:17:05 2021
@@ -9,8 +9,6 @@
 #Bail when non-zero return codes are encountered
 set -e
 
-source `dirname $0`/common-lib.sh
-
 usage () {
     cat <<EOF 1>&2
 usage: $0 [options] [version]
@@ -36,14 +34,14 @@ while getopts "hy" opt; do
 done
 shift $((OPTIND-1))
 
+source `dirname $0`/common-lib.sh
+source `dirname $0`/env.sh
+
 detect_checkout
 detect_version $1
 
-PROJECT=`basename $SVN_BASE`
 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}"
@@ -129,17 +127,18 @@ if ask_yes_no "Do you want to commit the
 fi
 
 pushd ${DIST_DIR} > /dev/null
-TAR_SIGS=`grep '^' ${PROJECT}-${VERSION}.tar.gz.sha* | sed -e 's/.*.tar.gz.//g' -e 's/:/: /g'`
+TAR_SIGS=`grep '^' ${PROJECT}-${FULL_VERSION}.tar.gz.sha* | sed -e 's/.*.tar.gz.//g' -e 's/:/: /g'`
 popd >/dev/null
 
 cat <<EOF > "${DIST_DIR}/mail-vote-$FULL_VERSION.txt"
-Subject: [VOTE] Release httpd-$FULL_VERSION
+Subject: [VOTE] Release ${PROJECT}-${FULL_VERSION} as ${PROJECT}-${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 $FULL_VERSION:
+I would like to call a VOTE over the next few days to release
+this candidate tarball ${PROJECT}-${FULL_VERSION} as $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.

Modified: httpd/dev-tools/release/r3-push-release-tars.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/release/r3-push-release-tars.sh?rev=1893143&r1=1893142&r2=1893143&view=diff
==============================================================================
--- httpd/dev-tools/release/r3-push-release-tars.sh (original)
+++ httpd/dev-tools/release/r3-push-release-tars.sh Wed Sep  8 13:17:05 2021
@@ -11,10 +11,6 @@
 #Bail when non-zero return codes are encountered
 set -e
 
-source `dirname $0`/common-lib.sh
-
-SVN_DIST_URL=https://dist.apache.org/repos/dist/
-
 usage () {
     cat <<EOF 1>&2
 usage: $0 [options] [version]
@@ -40,18 +36,18 @@ while getopts "hy" opt; do
 done
 shift $((OPTIND-1))
 
+source `dirname $0`/common-lib.sh
+source `dirname $0`/env.sh
+
 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

Modified: httpd/dev-tools/release/r4-stage-release.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/release/r4-stage-release.sh?rev=1893143&r1=1893142&r2=1893143&view=diff
==============================================================================
--- httpd/dev-tools/release/r4-stage-release.sh (original)
+++ httpd/dev-tools/release/r4-stage-release.sh Wed Sep  8 13:17:05 2021
@@ -11,10 +11,6 @@
 #Bail when non-zero return codes are encountered
 set -e
 
-source `dirname $0`/common-lib.sh
-
-SVN_DIST_URL=https://dist.apache.org/repos/dist/
-
 usage () {
     cat <<EOF 1>&2
 usage: $0 [options] [version]
@@ -32,19 +28,6 @@ EOF
   exit 1
 }
 
-DRY_RUN=""
-while getopts "hny" opt; do
-    case $opt in
-        h)  usage
-            ;;
-        n)  DRY_RUN="1"
-            ;;
-        y)  ALWAYS_YES=1
-            ;;
-    esac
-done
-shift $((OPTIND-1))
-
 fail_not_dry() {
   if test -z "${DRY_RUN}"; then
     fail "$@"
@@ -61,6 +44,22 @@ Changes with Apache ${VERSION}
 EOF
 }
 
+DRY_RUN=""
+while getopts "hny" opt; do
+    case $opt in
+        h)  usage
+            ;;
+        n)  DRY_RUN="1"
+            ;;
+        y)  ALWAYS_YES=1
+            ;;
+    esac
+done
+shift $((OPTIND-1))
+
+source `dirname $0`/common-lib.sh
+source `dirname $0`/env.sh
+
 detect_checkout
 assure_clean_checkout
 
@@ -68,20 +67,18 @@ detect_version $1
 # no matter how we are called, the release never has a suffix
 detect_version "${v_major}.${v_minor}.${v_patch}"
 
-PROJECT=`basename $SVN_BASE`
 SVN_RELEASE="tags/${VERSION}"
 
 svn ls "$SVN_BASE/$SVN_RELEASE" >/dev/null 2>&1 ||
   fail_not_dry "release does not exist in SVN: $SVN_RELEASE"
 
-DIST_DIR="dist"
-
-TAR_BASENAME="${PROJECT}-${VERSION}"
-
-#Ensure scratch space is in a state we are ready to work with
 AO_DIST_PATH="dist/apache.org-dist"
 AO_DIST_RELEASE_PATH="${AO_DIST_PATH}/release/${PROJECT}"
 
+DIST_SITEPATH="${DIST_DIR}/site"
+
+TAR_BASENAME="${PROJECT}-${VERSION}"
+
 # SVN repository is huge, carefully check out only what we need
 rm -rf "${AO_DIST_PATH}"
 echo "checking out dist from ${SVN_DIST_URL} ..."
@@ -101,55 +98,61 @@ if test ! -f "${AO_DIST_RELEASE_PATH}/CH
   fake_changes "${AO_DIST_RELEASE_PATH}/CHANGES_${VERSION}"
 fi
 
-echo "checking out pmc/${PROJECT} as ${DIST_DIR}/pmc"
-rm -rf "${DIST_DIR}/pmc"
-svn checkout https://svn.apache.org/repos/private/pmc/httpd "${DIST_DIR}/pmc" >/dev/null
-pushd "${DIST_DIR}/pmc/SECURITY" >/dev/null
-CVE_DIRS=`./tools/readiness.sh -n | fgrep '[OK]'| awk '{print $2}' | sort `
-popd >/dev/null
-
-cves_ok=1
-for CVE in $CVE_DIRS; do
-  if test -f "${DIST_DIR}/pmc/SECURITY/${CVE}/CHANGES"; then
-    echo "add ${DIST_DIR}/pmc/SECURITY/${CVE}/CHANGES"
-  elif test -f "${DIST_DIR}/pmc/SECURITY/${CVE}/CHANGES.diff"; then
-    echo "ERROR: cannot apply old-style diff in ${DIST_DIR}/pmc/SECURITY/${CVE}/CHANGES.diff." \
-      "Please convert this to a CHANGES files with just the text."
-    cves_ok=0
-  else
-    echo "ERROR: CVE ${CVE} does not have a CHANGES file."
-    cves_ok=0
-  fi
-done
-if test "${cves_ok}" != 1; then
-  fail "Please correct the files mentioned."
-fi
 
+# checkout/update pmc and get dir dir names that are ready
 # add the CVE CHANGES to all relevant files
-for changes in CHANGES \
-  "${AO_DIST_RELEASE_PATH}/CHANGES_${v_major}.${v_minor}" \
-  "${AO_DIST_RELEASE_PATH}/CHANGES_${VERSION}"; do
+calc_ready_CVE_DIRS "${DIST_DIR}/pmc"
+if test -n "${CVE_DIRS}"; then
+  echo "adding CVEs: ${CVE_DIRS}"
+  for changes in CHANGES \
+    "${AO_DIST_RELEASE_PATH}/CHANGES_${v_major}.${v_minor}" \
+    "${AO_DIST_RELEASE_PATH}/CHANGES_${VERSION}"; do
+    for CVE in $CVE_DIRS; do
+      add_changes_entry "$changes" "${DIST_DIR}/pmc/SECURITY/${CVE}/CHANGES"
+    done
+  done
+
+  echo "moving CVEs to pmc/resolved ..."
   for CVE in $CVE_DIRS; do
-    add_changes_entry "$changes" "${DIST_DIR}/pmc/SECURITY/${CVE}/CHANGES"
+    svn mv "${DIST_DIR}/pmc/SECURITY/${CVE}" "${DIST_DIR}/pmc/resolved/" >/dev/null
   done
-done
+fi
 
-echo "moving CVEs to pmc/resolved ..."
-for CVE in $CVE_DIRS; do
-  svn mv "${DIST_DIR}/pmc/SECURITY/${CVE}" "${DIST_DIR}/pmc/resolved/" >/dev/null
-done
 
 # Update the latest version pointer
 svn rm --force "${AO_DIST_RELEASE_PATH}/CURRENT-IS-${v_major}.${v_minor}"* >/dev/null
 touch "${AO_DIST_RELEASE_PATH}/CURRENT-IS-${VERSION}"
 svn add "${AO_DIST_RELEASE_PATH}/CURRENT-IS-${VERSION}" >/dev/null
 
+########################################
+# checkout and patch the project website
+test -n "${GIT_SITE_URL}" || fail "site URL not given"
+test -n "${DIST_SITEPATH}" || fail "site path not given"
+rm -rf "${DIST_SITEPATH}"
+git clone "${GIT_SITE_URL}" "${DIST_SITEPATH}"
+
+#Update the site content with the new release date and version
+iso_date=`date +%Y-%m-%d`
+perl -pi -e "s/${v_major}\.${v_minor}\.\d+/${VERSION}/g" "${DIST_SITEPATH}"/content/doap.rdf
+perl -pi -e "s|<created>.*|<created>$iso_date</created>|g" "${DIST_SITEPATH}"/content/doap.rdf
+
+#Modify the home page by replacing the date and the version string
+perl -pi -e "s|Apache httpd $major.$minor.* Released <span>.*</span>|Apache httpd ${VERSION} Released <span>$iso_date</span>|g" "${DIST_SITEPATH}"/content/index.md
+perl -pi -e "s/${v_major}\.${v_minor}\.\d+/${VERSION}/g" "${DIST_SITEPATH}"/content/index.md
+
+#Downloads page
+perl -pi -e "s/${v_major}\.${v_minor}\.\d+/${VERSION}/g" "${DIST_SITEPATH}"/content/download.md
+perl -pi -e "s/\\d{4}-\\d{2}-\\d{2}/$iso_date/ if /${VERSION}/" "${DIST_SITEPATH}"/content/download.md
+if ! grep -e "# Apache HTTP Server ${VERSION} (httpd): ${VERSION}.*<span>$iso_date</span>" "${DIST_SITEPATH}"/content/download.md >/dev/null;then
+  fail "Failed to update the release version and/or date in download.md"
+fi
+(cd "${DIST_SITEPATH}" && git add .)
+
+########################################
+# stage changes in the local branch checkout
 # step the patch level and update local files for the next version
 stage_checkout_release
 
-DIST_SITEPATH="${DIST_DIR}/site"
-stage_website_release "${DIST_SITEPATH}"
-
 
 echo
 echo "PENDING REPOSITORY CHANGES"
@@ -160,8 +163,8 @@ echo "--------"
 echo "SVN changes staged in pmc/${PROJECT}"
 svn stat "${DIST_DIR}/pmc"
 echo "--------"
-echo "SVN changes staged in ${DIST_SITEPATH}"
-svn stat "${DIST_SITEPATH}"
+echo "git changes staged in ${DIST_SITEPATH}"
+(cd "${DIST_SITEPATH}" && git status)
 echo "--------"
 echo "SVN changes staged in local checkout for ${SVN_URL}"
 svn stat

Modified: httpd/dev-tools/release/r5-commit-staged-release.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/release/r5-commit-staged-release.sh?rev=1893143&r1=1893142&r2=1893143&view=diff
==============================================================================
--- httpd/dev-tools/release/r5-commit-staged-release.sh (original)
+++ httpd/dev-tools/release/r5-commit-staged-release.sh Wed Sep  8 13:17:05 2021
@@ -9,10 +9,6 @@
 #Bail when non-zero return codes are encountered
 set -e
 
-source `dirname $0`/common-lib.sh
-
-SVN_DIST_URL=https://dist.apache.org/repos/dist/
-
 usage () {
     cat <<EOF 1>&2
 usage: $0 [options] [version]
@@ -22,40 +18,77 @@ usage: $0 [options] [version]
     version        as 'm.n.p(-suffix)?', the version to use.
   Options:
     -h             print usage information
-    -y             never ask, always assume yes
+    -u user-id     your apache user-id, e.g 'ylavic'
 EOF
   exit 1
 }
 
-while getopts "hy" opt; do
+asf_id="$USER"
+
+while getopts "hu:" opt; do
     case $opt in
         h)  usage
             ;;
-        y)  ALWAYS_YES=1
+        u)  asf_id="$OPTARG"
             ;;
     esac
 done
 shift $((OPTIND-1))
 
+source `dirname $0`/common-lib.sh
+source `dirname $0`/env.sh
 
 detect_checkout
 detect_version $1
 # no matter how we are called, the release never has a suffix
 detect_version "${v_major}.${v_minor}.${v_patch}"
 
-# TBD
-fail "not implemented yet"
+AO_DIST_PATH="dist/apache.org-dist"
+AO_DIST_RELEASE_PATH="${AO_DIST_PATH}/release/${PROJECT}"
 
-#Publish the site updates
-TMP_KEY=`curl -s -u "$asf_id" --url https://cms.apache.org/httpd/publish | grep key | cut -d '"' -f 6`
-if test -z "$TMP_KEY";then
-  echo "There was an error getting a key to publish the website."
-  echo "Visit https://cms.apache.org/httpd/publish to do this manually."
-  exit 1
-fi
+SVN_SITE_CONTENT_URL="${SVN_SITE_URL}/${PROJECT}/site/trunk/content/"
+DIST_SITEPATH="${DIST_DIR}/site"
 
-curl --url https://cms.apache.org/httpd/publish \
-  -X POST \
-  -u "$asf_id" \
-  -H 'Content-Type: application/x-www-form-urlencoded' \
-  -d "key=$TMP_KEY&message=Publish%20${VERSION}%20updates&source_url=https%3A%2F%2Fsvn.apache.org%2Frepos%2Fasf%2F${PROJECT}%2Fsite&submit=Submit&referer="
+
+test -d "${AO_DIST_RELEASE_PATH}" ||
+  fail "staged changes for dist.apache.org not found in ${AO_DIST_RELEASE_PATH}"
+test -d "${DIST_DIR}/pmc" ||
+  fail "staged changes for pmc repository not found in ${DIST_DIR}/pmc"
+test -d "${DIST_SITEPATH}" ||
+  fail "staged changes for project site not found in ${DIST_SITEPATH}"
+
+echo
+echo "PENDING REPOSITORY CHANGES"
+echo "--------"
+echo "SVN changes staged for ${SVN_DIST_URL}"
+svn stat "${AO_DIST_RELEASE_PATH}"
+echo "--------"
+echo "SVN changes staged in pmc/${PROJECT}"
+svn stat "${DIST_DIR}/pmc"
+echo "--------"
+echo "git changes staged in ${DIST_SITEPATH}"
+(cd "${DIST_SITEPATH}" && git status)
+echo "--------"
+echo "SVN changes staged in local checkout for ${SVN_URL}"
+svn stat
+
+if ask_yes_no "Do you want to commit these changes?"; then
+  echo "WARNING: this is quite irreversible!"
+  if ask_yes_no "Do you REALLY want to commit these changes?"; then
+    MSG="publishing release ${PROJECT}-${VERSION}"
+
+    echo nop: svn commit -m "${MSG}" "${DIST_DIR}/pmc"
+    # svn commit -m "${MSG}" "${DIST_DIR}/pmc"
+    echo nop: svn commit -m "${MSG}" "${AO_DIST_RELEASE_PATH}"
+    # svn commit -m "${MSG}" "${AO_DIST_RELEASE_PATH}"
+    echo nop: svn commit -m "${MSG}" .
+    # svn commit -m "${MSG}" .
+    echo "nop: cd ${DIST_SITEPATH}; git commit -m ${MSG}"
+    # (cd "${DIST_SITEPATH}" && git commit -m "${MSG}" )
+
+    # success exit
+    exit 0
+  fi
+fi
+# failure exit
+exit 1

Modified: httpd/dev-tools/release/r6-announce.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/release/r6-announce.sh?rev=1893143&r1=1893142&r2=1893143&view=diff
==============================================================================
--- httpd/dev-tools/release/r6-announce.sh (original)
+++ httpd/dev-tools/release/r6-announce.sh Wed Sep  8 13:17:05 2021
@@ -8,10 +8,6 @@
 #Bail when non-zero return codes are encountered
 set -e
 
-source `dirname $0`/common-lib.sh
-
-SVN_DIST_URL=https://dist.apache.org/repos/dist/
-
 usage () {
     cat <<EOF 1>&2
 usage: $0 [options] [version]
@@ -34,11 +30,16 @@ while getopts "h" opt; do
 done
 shift $((OPTIND-1))
 
+source `dirname $0`/common-lib.sh
+source `dirname $0`/env.sh
 
 detect_checkout
 detect_version $1
 # no matter how we are called, the release never has a suffix
 detect_version "${v_major}.${v_minor}.${v_patch}"
 
+AO_DIST_PATH="dist/apache.org-dist"
+AO_DIST_RELEASE_PATH="${AO_DIST_PATH}/release/${PROJECT}"
+
 # TBD
 fail "not implemented yet"

Modified: httpd/dev-tools/release/reset-candidate.sh
URL: http://svn.apache.org/viewvc/httpd/dev-tools/release/reset-candidate.sh?rev=1893143&r1=1893142&r2=1893143&view=diff
==============================================================================
--- httpd/dev-tools/release/reset-candidate.sh (original)
+++ httpd/dev-tools/release/reset-candidate.sh Wed Sep  8 13:17:05 2021
@@ -11,10 +11,6 @@
 #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
@@ -31,8 +27,6 @@ EOF
   exit 1
 }
 
-source `dirname $0`/common-lib.sh
-
 while getopts "hy" opt; do
     case $opt in
         h)  usage
@@ -43,10 +37,12 @@ while getopts "hy" opt; do
 done
 shift $((OPTIND-1))
 
+source `dirname $0`/common-lib.sh
+source `dirname $0`/env.sh
+
 detect_checkout
 detect_version $1
 
-PROJECT=`basename $SVN_BASE`
 SVN_DEST="tags/candidate-${FULL_VERSION}"
 SVN_RELEASE="tags/${VERSION}"
 
@@ -54,15 +50,13 @@ if svn ls "$SVN_BASE/$SVN_RELEASE" >/dev
   fail "release already tagged at $SVN_RELEASE"
 fi
 
-DIST_DIR="dist"
-
+# the directory we export the candiate to, it does not carry a version suffix
 EXP_DIRNAME="${PROJECT}-${VERSION}"
 EXP_PATH="${DIST_DIR}/${EXP_DIRNAME}"
-# almost the same, except using the full version string
+# almost the same, except using the full version string with suffix
 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}"