You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2015/09/04 15:30:31 UTC

[08/15] incubator-brooklyn git commit: more info on verifying the builds (whether downloaded or not) and vote (a script)

more info on verifying the builds (whether downloaded or not) and vote (a script)

also tidy the release/dir moving pr_report to a subdir


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/27e03e0e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/27e03e0e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/27e03e0e

Branch: refs/heads/master
Commit: 27e03e0e17aa61065d7fae26f1fd252738c45f80
Parents: 155921d
Author: Alex Heneveld <al...@cloudsoft.io>
Authored: Thu Sep 3 14:48:08 2015 +0100
Committer: Alex Heneveld <al...@cloudsoft.io>
Committed: Thu Sep 3 17:18:38 2015 +0100

----------------------------------------------------------------------
 .../release-process/verify-release-artifacts.md |  17 ++-
 .../committers/release-process/vote.md          |  44 ++++---
 release/Gemfile                                 |   5 -
 release/Gemfile.lock                            |  38 ------
 release/README.md                               |   3 +-
 release/make-release-artifacts.sh               |   4 +-
 release/pr_report.rb                            |  12 --
 release/print-vote-email.sh                     | 129 +++++++++++++++++++
 release/pull-request-reports/Gemfile            |   5 +
 release/pull-request-reports/Gemfile.lock       |  38 ++++++
 release/pull-request-reports/pr_report.rb       |  12 ++
 11 files changed, 228 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/27e03e0e/docs/website/developers/committers/release-process/verify-release-artifacts.md
----------------------------------------------------------------------
diff --git a/docs/website/developers/committers/release-process/verify-release-artifacts.md b/docs/website/developers/committers/release-process/verify-release-artifacts.md
index 086e56c..40c8b20 100644
--- a/docs/website/developers/committers/release-process/verify-release-artifacts.md
+++ b/docs/website/developers/committers/release-process/verify-release-artifacts.md
@@ -36,10 +36,12 @@ curl https://dist.apache.org/repos/dist/release/incubator/brooklyn/KEYS | gpg2 -
 {% endhighlight %}
 
 
-Verify the hashes and signatures of artifacts
----------------------------------------------
+Download the artifacts
+----------------------
 
-If the releases have been published to the pre-release area, download them:
+If you've just built the RC, simply go to that directory and skip this step.
+
+If you're verifying a build someone else has made, first download the files including all keys using:
 
 {% highlight bash %}
 TEMP_DIR=~/tmp/brooklyn/release/${VERSION_NAME}-rc${RC_NUMBER}
@@ -56,7 +58,14 @@ for ext in -src.tar.gz -src.zip -bin.tar.gz -bin.zip; do
 done
 {% endhighlight %}
 
-Then verify the hashes, and ensure you get a positive message from each one:
+(Alternatively if you have `apache-dist-dev-repo` checked out,
+you can do an `svn up` in there and `cd apache-brooklyn-${VERSION_NAME}-rc${RC_NUMBER}`.)
+
+
+Verify the hashes and signatures of artifacts
+---------------------------------------------
+
+Then check the hashes and signatures, ensuring you get a positive message from each one:
 
 {% highlight bash %}
 for ext in -src.tar.gz -src.zip -bin.tar.gz -bin.zip; do

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/27e03e0e/docs/website/developers/committers/release-process/vote.md
----------------------------------------------------------------------
diff --git a/docs/website/developers/committers/release-process/vote.md b/docs/website/developers/committers/release-process/vote.md
index db8b305..d3f6930 100644
--- a/docs/website/developers/committers/release-process/vote.md
+++ b/docs/website/developers/committers/release-process/vote.md
@@ -7,32 +7,39 @@ navgroup: developers
 Start the vote
 --------------
 
-Copy-paste the e-mail below, being sure to substitute:
+A script to generate the voting email can be found in `release/print-vote-email.sh`,
+taking a single argument being the staging repo link. For example:
 
-- version number
-- RC number
+    release/print-vote-email.sh orgapachebrooklyn-1234 | pbcopy 
+
+You should move the subject and put your name at the end, and simply eyeball the rest. This should be sent to **dev@brooklyn.incubator.apache.org**.
+
+Alternatively, copy-paste the e-mail template below, being sure to substitute:
+
+- VERSION_NAME
+- RC_NUMBER
 - URLs containing version numbers
 - URL for your own PGP key
 - Checksums
 - URL for the Maven staging repository
 
-### Subject: [VOTE] Release Apache Brooklyn 0.7.0-incubating [rc1]
+### Subject: [VOTE] Release Apache Brooklyn ${VERSION_NAME} [rc${RC_NUMBER}]
 
 {% highlight text %}
-This is to call for a vote for the release of Apache Brooklyn 0.7.0-incubating.
+This is to call for a vote for the release of Apache Brooklyn ${VERSION_NAME}.
 
 This release comprises of a source code distribution, and a corresponding
 binary distribution, and Maven artifacts.
 
 The source and binary distributions, including signatures, digests, etc. can
 be found at:
-https://dist.apache.org/repos/dist/dev/incubator/brooklyn/apache-brooklyn-0.7.0-incubating-rc1
+https://dist.apache.org/repos/dist/dev/incubator/brooklyn/apache-brooklyn-${VERSION_NAME}-rc${RC_NUMBER}
 
 The artifact SHA-256 checksums are as follows:
-c3b5c581f14b44aed786010ac7c8c2d899ea0ff511135330395a2ff2a30dd5cf *apache-brooklyn-0.7.0-incubating-rc1-bin.tar.gz
-cef49056ba6e5bf012746a72600b2cee8e2dfca1c39740c945c456eacd6b6fca *apache-brooklyn-0.7.0-incubating-rc1-bin.zip
-8069bfc54e7f811f6b57841167b35661518aa88cabcb070bf05aae2ff1167b5a *apache-brooklyn-0.7.0-incubating-rc1-src.tar.gz
-acd2229c44e93e41372fd8b7ea0038f15fe4aaede5a3bcc5056f28a770543b82 *apache-brooklyn-0.7.0-incubating-rc1-src.zip
+c3b5c581f14b44aed786010ac7c8c2d899ea0ff511135330395a2ff2a30dd5cf *apache-brooklyn-${VERSION_NAME}-rc${RC_NUMBER}-bin.tar.gz
+cef49056ba6e5bf012746a72600b2cee8e2dfca1c39740c945c456eacd6b6fca *apache-brooklyn-${VERSION_NAME}-rc${RC_NUMBER}-bin.zip
+8069bfc54e7f811f6b57841167b35661518aa88cabcb070bf05aae2ff1167b5a *apache-brooklyn-${VERSION_NAME}-rc${RC_NUMBER}-src.tar.gz
+acd2229c44e93e41372fd8b7ea0038f15fe4aaede5a3bcc5056f28a770543b82 *apache-brooklyn-${VERSION_NAME}-rc${RC_NUMBER}-src.zip
 
 The Nexus staging repository for the Maven artifacts is located at:
 https://repository.apache.org/content/repositories/orgapachebrooklyn-1004
@@ -48,10 +55,10 @@ The artifacts were built from Git commit ID
 https://git-wip-us.apache.org/repos/asf?p=incubator-brooklyn.git;a=commit;h=24a23c5a4fd5967725930b8ceaed61dfbd225980
 
 
-Please vote on releasing this package as Apache Brooklyn 0.7.0-incubating.
+Please vote on releasing this package as Apache Brooklyn ${VERSION_NAME}.
 
 The vote will be open for at least 72 hours.
-[ ] +1 Release this package as Apache Brooklyn 0.7.0-incubating
+[ ] +1 Release this package as Apache Brooklyn ${VERSION_NAME}
 [ ] +0 no opinion
 [ ] -1 Do not release this package because ...
 
@@ -99,12 +106,15 @@ Finally, count up the +1s and separate into binding (PPMC) and non-binding.
 Email the vote result
 ---------------------
 
-This is a new email thread with a different subject.
+This is a new email thread with a different subject
+(the same as before with `[RESULT]` prepended).
+
+Note that you must find the URL for the previous thread at [mail-archives.apache.org](https://mail-archives.apache.org/).
 
-### Subject: [RESULT][VOTE] Release Apache Brooklyn 0.7.0-incubating [rc1]
+### Subject: [RESULT]\[VOTE] Release Apache Brooklyn ${VERSION_NAME} [rc${RC_NUMBER}]
 
 {% highlight text %}
-The vote for releasing Apache Brooklyn 0.7.0-incubating passed with 5 binding +1s, 1 non-binding +1s, and no 0 or -1.
+The vote for releasing Apache Brooklyn ${VERSION_NAME} passed with 5 binding +1s, 1 non-binding +1s, and no 0 or -1.
 
 Vote thread link:
 https://mail-archives.apache.org/mod_mbox/incubator-brooklyn-dev/201507.mbox/%3CCABQFKi1WapCMRUqQ93E7Qow5onKgL3nyG3HW9Cse7vo%2BtUChRQ%40mail.gmail.com%3E
@@ -124,6 +134,6 @@ Thanks to everyone that tested our release and voted.
 We will shortly begin a vote on the incubator-general list.
 
 
-Thanks,
-[Release manager name]
+Thanks.
+
 {% endhighlight %}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/27e03e0e/release/Gemfile
----------------------------------------------------------------------
diff --git a/release/Gemfile b/release/Gemfile
deleted file mode 100644
index 8ab84b5..0000000
--- a/release/Gemfile
+++ /dev/null
@@ -1,5 +0,0 @@
-#ruby=ruby-2.1.2
-#ruby-gemset=brooklyn-release-helpers
-
-source 'https://rubygems.org'
-gem 'github_api'

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/27e03e0e/release/Gemfile.lock
----------------------------------------------------------------------
diff --git a/release/Gemfile.lock b/release/Gemfile.lock
deleted file mode 100644
index 859202a..0000000
--- a/release/Gemfile.lock
+++ /dev/null
@@ -1,38 +0,0 @@
-GEM
-  remote: https://rubygems.org/
-  specs:
-    addressable (2.3.8)
-    descendants_tracker (0.0.4)
-      thread_safe (~> 0.3, >= 0.3.1)
-    faraday (0.9.1)
-      multipart-post (>= 1.2, < 3)
-    github_api (0.12.3)
-      addressable (~> 2.3)
-      descendants_tracker (~> 0.0.4)
-      faraday (~> 0.8, < 0.10)
-      hashie (>= 3.3)
-      multi_json (>= 1.7.5, < 2.0)
-      nokogiri (~> 1.6.3)
-      oauth2
-    hashie (3.4.2)
-    jwt (1.5.1)
-    mini_portile (0.6.2)
-    multi_json (1.11.1)
-    multi_xml (0.5.5)
-    multipart-post (2.0.0)
-    nokogiri (1.6.6.2)
-      mini_portile (~> 0.6.0)
-    oauth2 (1.0.0)
-      faraday (>= 0.8, < 0.10)
-      jwt (~> 1.0)
-      multi_json (~> 1.3)
-      multi_xml (~> 0.5)
-      rack (~> 1.2)
-    rack (1.6.4)
-    thread_safe (0.3.5)
-
-PLATFORMS
-  ruby
-
-DEPENDENCIES
-  github_api

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/27e03e0e/release/README.md
----------------------------------------------------------------------
diff --git a/release/README.md b/release/README.md
index f1976f6..325b165 100644
--- a/release/README.md
+++ b/release/README.md
@@ -44,6 +44,7 @@ run for example `/vagrant/make-release/artifacts.sh`.
 Pull request reporting
 ----------------------
 
-`pr_report.rb` (and associated files `Gemfile` and `Gemfile.lock`) uses the GitHub API to extract a list of open pull
+The files in `pull-request-reports`, mainly `pr_report.rb` 
+(and associated files `Gemfile` and `Gemfile.lock`) uses the GitHub API to extract a list of open pull
 requests, and writes a summary into `pr_report.tsv`. This could then be imported into Google Sheets to provide a handy
 way of classifying and managing outstanding PRs ahead of making a release.

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/27e03e0e/release/make-release-artifacts.sh
----------------------------------------------------------------------
diff --git a/release/make-release-artifacts.sh b/release/make-release-artifacts.sh
index 8cefc77..b0b48d4 100755
--- a/release/make-release-artifacts.sh
+++ b/release/make-release-artifacts.sh
@@ -131,8 +131,8 @@ fi
 
 release_script_dir=$( cd $( dirname $0 ) && pwd )
 brooklyn_dir=$( pwd )
-staging_dir="${brooklyn_dir}/src-release-tmp/${release_name}-src"
-bin_staging_dir="${brooklyn_dir}/bin-release-tmp/${release_name}-bin"
+staging_dir="${release_script_dir}/tmp/working-src/${release_name}-src"
+bin_staging_dir="${release_script_dir}/tmp/working-bin/${release_name}-bin"
 artifact_dir="${release_script_dir}/${artifact_name}"
 
 echo "The version is ${current_version}"

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/27e03e0e/release/pr_report.rb
----------------------------------------------------------------------
diff --git a/release/pr_report.rb b/release/pr_report.rb
deleted file mode 100644
index 95b6317..0000000
--- a/release/pr_report.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-#ruby
-
-require 'CSV'
-require 'github_api'
-
-gh = Github.new
-
-CSV.open("pr_report.tsv", "wb", { :col_sep => "\t" }) do |csv|
-  gh.pull_requests.list('apache', 'incubator-brooklyn').
-      select { |pr| pr.state == "open" }.
-      each { |pr| csv << [ pr.number, pr.title, pr.created_at, pr.user.login ] }
-end

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/27e03e0e/release/print-vote-email.sh
----------------------------------------------------------------------
diff --git a/release/print-vote-email.sh b/release/print-vote-email.sh
new file mode 100755
index 0000000..ac62241
--- /dev/null
+++ b/release/print-vote-email.sh
@@ -0,0 +1,129 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# prints a sample email with all the correct information
+
+set +x
+
+fail() {
+    echo >&2 "$@"
+    exit 1
+}
+
+if [ -z "${VERSION_NAME}" ] ; then fail VERSION_NAME must be set ; fi
+if [ -z "${RC_NUMBER}" ] ; then fail RC_NUMBER must be set ; fi
+
+base=apache-brooklyn-${VERSION_NAME}-rc${RC_NUMBER}
+
+if [ -z "$1" ] ; then fail "A single argument being the staging repo ID must be supplied, e.g. orgapachebrooklyn-1234" ; fi
+
+archetype_check=`curl https://repository.apache.org/content/repositories/${staging_repo_id}/archetype-catalog.xml 2> /dev/null`
+if ! echo $archetype_check | grep brooklyn-archetype-quickstart > /dev/null ; then
+  fail staging repo looks wrong at https://repository.apache.org/content/repositories/${staging_repo_id}
+fi
+if ! echo $archetype_check | grep ${VERSION_NAME} > /dev/null ; then
+  fail wrong version at https://repository.apache.org/content/repositories/${staging_repo_id}
+fi
+
+artifact=release/tmp/${base}/${base}-bin.tar.gz
+if [ ! -f $artifact ] ; then
+  fail could not find artifact $artifact
+fi
+if [ -z "$APACHE_ID" ] ; then
+  APACHE_ID=`gpg2 --verify ${artifact}.asc ${artifact} 2>&1 | egrep -o '[^<]*...@apache.org>' | cut -d @ -f 1`
+fi
+if [ -z "$APACHE_ID" ] ; then
+  fail "could not deduce APACHE_ID (your apache username); are files signed correctly?"
+fi
+if ! ( gpg2 --verify ${artifact}.asc ${artifact} 2>&1 | grep ${APACHE_ID}@apache.org > /dev/null ) ; then
+  fail "could not verify signature; are files signed correctly and ID ${APACHE_ID} correct?"
+fi
+
+cat <<EOF
+
+Subject: [VOTE] Release Apache Brooklyn ${VERSION_NAME} [rc${RC_NUMBER}]
+
+
+This is to call for a vote for the release of Apache Brooklyn ${VERSION_NAME}.
+
+This release comprises of a source code distribution, and a corresponding
+binary distribution, and Maven artifacts.
+
+The source and binary distributions, including signatures, digests, etc. can
+be found at:
+
+  https://dist.apache.org/repos/dist/dev/incubator/brooklyn/${base}
+
+The artifact SHA-256 checksums are as follows:
+
+EOF
+
+cat release/tmp/${base}/*.sha256 | awk '{print "  "$0}'
+
+cat <<EOF
+
+The Nexus staging repository for the Maven artifacts is located at:
+
+    https://repository.apache.org/content/repositories/${staging_repo_id}
+
+All release artifacts are signed with the following key:
+
+    https://people.apache.org/keys/committer/${APACHE_ID}.asc
+
+KEYS file available here:
+
+    https://dist.apache.org/repos/dist/release/incubator/brooklyn/KEYS
+
+
+The artifacts were built from git commit ID $( git rev-parse HEAD ):
+
+    https://git-wip-us.apache.org/repos/asf?p=incubator-brooklyn.git;a=commit;h=$( git rev-parse HEAD )
+
+
+Please vote on releasing this package as Apache Brooklyn ${VERSION_NAME}.
+
+The vote will be open for at least 72 hours.
+[ ] +1 Release this package as Apache Brooklyn ${VERSION_NAME}
+[ ] +0 no opinion
+[ ] -1 Do not release this package because ...
+
+
+Thanks!
+EOF
+
+cat <<EOF
+
+
+
+CHECKLIST for reference
+
+[ ] Download links work.
+[ ] Binaries work.
+[ ] Checksums and PGP signatures are valid.
+[ ] Expanded source archive matches contents of RC tag.
+[ ] Expanded source archive builds and passes tests.
+[ ] LICENSE is present and correct.
+[ ] NOTICE is present and correct, including copyright date.
+[ ] All files have license headers where appropriate.
+[ ] All dependencies have compatible licenses.
+[ ] No compiled archives bundled in source archive.
+[ ] I follow this project’s commits list.
+
+EOF

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/27e03e0e/release/pull-request-reports/Gemfile
----------------------------------------------------------------------
diff --git a/release/pull-request-reports/Gemfile b/release/pull-request-reports/Gemfile
new file mode 100644
index 0000000..8ab84b5
--- /dev/null
+++ b/release/pull-request-reports/Gemfile
@@ -0,0 +1,5 @@
+#ruby=ruby-2.1.2
+#ruby-gemset=brooklyn-release-helpers
+
+source 'https://rubygems.org'
+gem 'github_api'

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/27e03e0e/release/pull-request-reports/Gemfile.lock
----------------------------------------------------------------------
diff --git a/release/pull-request-reports/Gemfile.lock b/release/pull-request-reports/Gemfile.lock
new file mode 100644
index 0000000..859202a
--- /dev/null
+++ b/release/pull-request-reports/Gemfile.lock
@@ -0,0 +1,38 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    addressable (2.3.8)
+    descendants_tracker (0.0.4)
+      thread_safe (~> 0.3, >= 0.3.1)
+    faraday (0.9.1)
+      multipart-post (>= 1.2, < 3)
+    github_api (0.12.3)
+      addressable (~> 2.3)
+      descendants_tracker (~> 0.0.4)
+      faraday (~> 0.8, < 0.10)
+      hashie (>= 3.3)
+      multi_json (>= 1.7.5, < 2.0)
+      nokogiri (~> 1.6.3)
+      oauth2
+    hashie (3.4.2)
+    jwt (1.5.1)
+    mini_portile (0.6.2)
+    multi_json (1.11.1)
+    multi_xml (0.5.5)
+    multipart-post (2.0.0)
+    nokogiri (1.6.6.2)
+      mini_portile (~> 0.6.0)
+    oauth2 (1.0.0)
+      faraday (>= 0.8, < 0.10)
+      jwt (~> 1.0)
+      multi_json (~> 1.3)
+      multi_xml (~> 0.5)
+      rack (~> 1.2)
+    rack (1.6.4)
+    thread_safe (0.3.5)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  github_api

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/27e03e0e/release/pull-request-reports/pr_report.rb
----------------------------------------------------------------------
diff --git a/release/pull-request-reports/pr_report.rb b/release/pull-request-reports/pr_report.rb
new file mode 100644
index 0000000..95b6317
--- /dev/null
+++ b/release/pull-request-reports/pr_report.rb
@@ -0,0 +1,12 @@
+#ruby
+
+require 'CSV'
+require 'github_api'
+
+gh = Github.new
+
+CSV.open("pr_report.tsv", "wb", { :col_sep => "\t" }) do |csv|
+  gh.pull_requests.list('apache', 'incubator-brooklyn').
+      select { |pr| pr.state == "open" }.
+      each { |pr| csv << [ pr.number, pr.title, pr.created_at, pr.user.login ] }
+end