Validating a staged release

On MacOS and Linux the first 4 steps can be automated. For details please read the section about tooling after this chapter.
  • Download all staged artifacts under the url specified in the release vote email into a directory we’ll now call download-dir.

  • Verify the signature is correct: Additional Apache tutorial on how to verify downloads can be found here.

gpg --verify apache-plc4x-{current-full-version}-source-release.zip.asc apache-plc4x-#{current-full-version}-source-release.zip
  • Check if the check is successful.

  • Check if the signature references an Apache email address.

  • Verify the SHA512 hashes:

Mac/Linux: shasum -a512 apache-plc4x-{current-full-version}-source-release.zip

Windows (PowerShell): Get-FileHash -Algorithm SHA512 .\apache-plc4x-code-generation-{current-full-version}-source-release.zip | Format-List
  • Unzip the archive:

unzip apache-plc4x-{current-full-version}-source-release.zip
  • Verify the existence of LICENSE, NOTICE, README, RELEASE_NOTES files in the extracted source bundle.

  • Verify the content of LICENSE, NOTICE, README, RELEASE_NOTES files in the extracted source bundle.

(Especially pay attention to the year in the NOTICE file if this is the first release of the year)
  • [RM] Verify the staged source README, RELEASE_NOTE files correspond to those in the extracted source bundle.

  • [RM] Run RAT externally to ensure there are no surprises.

java -jar apache-rat-0.13.jar apache-plc4x-{current-full-version}-source-release.zip > rat.log
  • Search for SNAPSHOT references:

find . -type f -name 'pom.xml' -exec grep -l "SNAPSHOT" {} \;
  • Search for Copyright references, and if they are in headers, make sure these files containing them are mentioned in the LICENSE file.

  • Build the project according to the information in the README.md file.

  • [RM] Build the project with all with-xyz profiles and tests enabled and an empty maven local repo: by appending -Dmaven.repo.local=../.m2 (On windows use -D"maven.repo.local"="../.m2").

Using RAT

Even if we are using RAT to ensure sources have headers in place, still the project can contain exclusions that hide things from the check.

The only way to avoid missing important files is by running RAT externally.

If you haven’t got it, yet please download it form here.

Also do I like to run RAT against the zip archive containing the source release as this way you avoid the problem of eventually scanning the binaries produced by the build (If you run RAT after building, it will complain about every jar and ever class file).

java -jar apache-rat-0.13.jar apache-plc4x-1.0.0-source-release.zip > rat.log

By piping the result into a text file gives you the chance to investigate the content more easily.

Release Tooling

tools/validate-release.sh checks the hardest part for you: that the artifacts staged in Nexus can be reproduced from the staged sources.

Unpack the apache-plc4x-1.0.0-source-release.zip you downloaded above and run it from inside the unpacked directory:

   ./tools/validate-release.sh

It builds the project inside the same Docker container the release was built in and then compares the result against the staging repository with artifact:compare. It refuses to run on a SNAPSHOT version, so it cannot accidentally be pointed at a development checkout, and it needs at least 12 GB of memory available to Docker.

Only the Java artifacts are compared - the C, .Net and Python ones are either platform specific or not published to Maven at all, so there is nothing staged to compare them against.

The signature and hash checks above are still done by hand; there is no script for those any more.

Template for the email for voting

+1/-1 (binding)

Name

[] Download all staged artifacts under the url specified in the release vote email.
[] Verify the signature is correct.
[] Check if the signature references an Apache email address.
[] Verify the SHA512 hashes.
[] Unzip the archive.
[] Verify the existence of LICENSE, NOTICE, README, RELEASE_NOTES files in the extracted source bundle.
[] Verify the content of LICENSE, NOTICE, README, RELEASE_NOTES files in the extracted source bundle.
[] [RM] Verify the staged source README, RELEASE_NOTE files correspond to those in the extracted source bundle.
[] [RM] Run RAT externally to ensure there are no surprises.
[] Search for SNAPSHOT references
[] Search for Copyright references, and if they are in headers, make sure these files containing them are mentioned in the LICENSE file.
[] Build the project according to the information in the README.md file.
[] [RM] Build the project with all with-xyz profiles and tests enabled and an empty maven local repo.

If everything is ok, I put "OK" int the square brackets. If there are minor issues, I put "MINOR" in there and, if it’s a short reason, I put an explanation at the end of the line. If it’s longer I put a longer section after the checklist. If there are major issues, I put "FAIL" in there and comment the same way as with minor issues.