You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by co...@apache.org on 2023/04/13 02:27:54 UTC

svn commit: r1909111 - in /apr/site/trunk/release: README.md r0-make-candidate.sh r2-prep-vote.sh release.sh

Author: covener
Date: Thu Apr 13 02:27:54 2023
New Revision: 1909111

URL: http://svn.apache.org/viewvc?rev=1909111&view=rev
Log:
pick up a port of r2_prep_vote.sh

make r0 and release.sh consistent with r2_prep_vote so the 
artifacts can be found and copied to dev/dist

Added:
    apr/site/trunk/release/r2-prep-vote.sh   (with props)
Modified:
    apr/site/trunk/release/README.md
    apr/site/trunk/release/r0-make-candidate.sh
    apr/site/trunk/release/release.sh

Modified: apr/site/trunk/release/README.md
URL: http://svn.apache.org/viewvc/apr/site/trunk/release/README.md?rev=1909111&r1=1909110&r2=1909111&view=diff
==============================================================================
--- apr/site/trunk/release/README.md (original)
+++ apr/site/trunk/release/README.md Thu Apr 13 02:27:54 2023
@@ -1,23 +1,32 @@
 # APR/APU release process
 
+## 0) prep
+
+1. Remind yourself of your GPG password
+2. Make sure your key is in the KEYS file of the project and has some useful signatures.
+
 ## 1) Release basics
+
 1. set APR_DEV_TOOLS to the parent directory of this readme, e.g. APR_DEV_TOOLS=$HOME/SRC/apr-site/release
 2. set your working directory to a clean checkout of the project you're releasing
-3. Tag an rc:
+3. Tag an rc (the version is taken from include/apX_version.h)
 
    ```
     $APR_DEV_TOOLS/r0-make-candidate.sh rc1
    ```
-4. cd $APR_DEV_TOOLS and read/run release.sh pointing to the tag created
+4. From the same project directory, run `$APR_DEV_TOOLS/release.sh` pointing to the tag created
    by r0-make-candidate.sh.
-5. Add the generated tarballs, sigs, checksums, etc to checkout of https://dist.apache.org/repos/dist/dev/apr
-   - XXX: Need to borrow automation from httpd-dev-tools/release
-6. Announce the vote w/ the links to dist/dev/apr
+5. Review the generated tarballs in the dist/ subdirectory. If they look reasonable, run the following
+   to add the generated tarballs, sigs, checksums, etc to checkout of https://dist.apache.org/repos/dist/dev/apr
+
+   ```
+   $APR_DEV_TOOLS/r2-prep-vote.sh
+6. Announce the vote w/ the output produced from the above
 7. Wait for results and repeat or release
 8. If unsuccessful, cleanup https://dist.apache.org/repos/dist/dev/apr and repeat with a later rcX.
-9. On successful release
+9. On successful vote:
    1. rename the tag to drop the -rcX-candidate suffix
-   2. rename the files to drop the -rxX suffix
+   2. rename the files to drop the -rcX-candidate suffix
    3. svn mv them from dist/dev/ to dist/release
       - wait for dlcdn links (immediate) and directory listings (up to 2 hours) to show the new files.
       - update the Announcement txt and html on dist/dev and copy it.

Modified: apr/site/trunk/release/r0-make-candidate.sh
URL: http://svn.apache.org/viewvc/apr/site/trunk/release/r0-make-candidate.sh?rev=1909111&r1=1909110&r2=1909111&view=diff
==============================================================================
--- apr/site/trunk/release/r0-make-candidate.sh (original)
+++ apr/site/trunk/release/r0-make-candidate.sh Thu Apr 13 02:27:54 2023
@@ -49,7 +49,7 @@ assure_clean_checkout
 detect_version $1
 
 SVN_DEST="tags/${FULL_VERSION}-candidate"
-DEST_DIR="${DIST_DIR}/${FULL_VERSION}-candidate"
+DEST_DIR="${DIST_DIR}/${PROJECT}-${FULL_VERSION}-candidate"
 
 # find out which CVEs are ready and will be reporting in this candidate
 calc_ready_CVE_DIRS "${DIST_DIR}/pmc"

Added: apr/site/trunk/release/r2-prep-vote.sh
URL: http://svn.apache.org/viewvc/apr/site/trunk/release/r2-prep-vote.sh?rev=1909111&view=auto
==============================================================================
--- apr/site/trunk/release/r2-prep-vote.sh (added)
+++ apr/site/trunk/release/r2-prep-vote.sh Thu Apr 13 02:27:54 2023
@@ -0,0 +1,131 @@
+#!/bin/sh
+
+# Take generated tarballs and call vor a vote.
+
+#Useful for debugging
+set -x
+
+#Bail when non-zero return codes are encountered
+set -e
+
+usage () {
+    cat <<EOF 1>&2
+usage: $0 [options] [version]
+  publish the release candidate tarballs in the dist SVN. The tars need
+  to exist in the local 'dist' directory (created by r1-make-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
+}
+
+while getopts "hy" opt; do
+    case $opt in
+        h)  usage
+            ;;
+        y)  ALWAYS_YES=1
+            ;;
+    esac
+done
+shift $((OPTIND-1))
+
+source `dirname $0`/common-lib.sh
+source `dirname $0`/env.sh
+
+detect_checkout
+detect_version $1
+
+SVN_DEST="tags/${FULL_VERSION}-candidate"
+
+if [ -f include/apr_version.h ]; then
+    is_apr=1
+    ANNOUNCEFILE=Announcement1.x
+else
+    ANNOUNCEFILE=Announcement-aprutil-1.x
+    is_apr=0
+fi
+
+EXP_DIRNAME="${PROJECT}-${VERSION}"
+EXP_PATH="${DIST_DIR}/"
+# almost the same, except using the full version string
+TAR_BASENAME="${PROJECT}-${FULL_VERSION}-candidate"
+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 "${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"
+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
+
+# Place the tarballs and add to changeset, remove any existing
+# tarballs with same major.minor.patch
+echo "adding candidate tars from ${EXP_PATH}*.tar.*"
+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 Announcement${v_major}.${v_minor}.*"
+#Prep announcement files with latest version
+perl -pi -e "s/$v_major\.$v_minor\.\d+ (Released|of the)/$VERSION \1/g" \
+  "${AO_DIST_DEV_PATH}"/${ANNOUNCEFILE}.*
+
+#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_DEV_PATH}"/${ANNOUNCEFILE}.*
+
+#Push changes up to dev
+echo "changes ready for commit in ${AO_DIST_DEV_PATH}"
+svn stat "${AO_DIST_DEV_PATH}"
+svn diff "${AO_DIST_DEV_PATH}"/dev/apr/Announcement1*
+if ask_yes_no "Do you want to commit these?"; then
+  svn commit -m "Add $FULL_VERSION files" "${AO_DIST_DEV_PATH}"
+fi
+
+pushd ${DIST_DIR} > /dev/null
+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 ${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 ${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.
+
+The computed digests of the tarball up for vote are:
+${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-$FULL_VERSION.txt"
+cat "${DIST_DIR}/mail-vote-$FULL_VERSION.txt"
+
+save_version

Propchange: apr/site/trunk/release/r2-prep-vote.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: apr/site/trunk/release/release.sh
URL: http://svn.apache.org/viewvc/apr/site/trunk/release/release.sh?rev=1909111&r1=1909110&r2=1909111&view=diff
==============================================================================
--- apr/site/trunk/release/release.sh (original)
+++ apr/site/trunk/release/release.sh Thu Apr 13 02:27:54 2023
@@ -4,14 +4,13 @@
 #
 # USAGE: release.sh PROJECT TAG [SIGNING-USER] [APR-SOURCE]
 #
+#   example: $APR_DEV_TOOLS/release.sh  apr 1.7.4-rc1-candidate covener@apache.org
+#
 #   The project is either 'apr', 'apr-util' or 'apr-iconv'
 #
 #   The TAG is the SVN tag that will be pulled when retreiving the source. If the tag has an -rcX suffix, the packages will too.
 #   See README.md and r0-make-candidate.sh in this directory.
 #
-#   The RELEASE-VERSION is the name that will be given to the tarball.
-#   Eg. if RELEASE-VERSION is 5.6.7 then the tarball will be apr-5.6.7.tar.gz
-#
 #   The SIGNING-USER is an optional name of the key that you'll be signing the
 #   release with.
 #
@@ -56,11 +55,11 @@ case "$PROJECT" in
 esac
 
 dirname="${repos_name}-${TAG}"
-filename="${dirname}"
-# remove -rcX
-dirname="$(echo $dirname | sed -E -e 's/-rc[0-9]+//')"
+filename="${repos_name}-${TAG}"
+# remove -rcX-candidate
+dirname="$(echo $dirname | sed -E -e 's/-rc[0-9]+(-candidate)?//')"
 
-echo "       Tag name: $TAG"
+echo "      Tag name : $TAG"
 echo "      Directory: $dirname"
 
 if test -d ${dirname}; then
@@ -208,3 +207,5 @@ elif test -x "${gpg}"; then
 else
   echo "PGP or GnuPG not found!  Not signing release!"
 fi
+
+mv ${filename}* dist/