subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1802130 - in /subversion/trunk/tools/dist: templates/rc-release-ann.ezt templates/stable-release-ann.ezt
Date Mon, 17 Jul 2017 11:35:34 GMT
Author: danielsh
Date: Mon Jul 17 11:35:34 2017
New Revision: 1802130

Log: Add details to email announcements.

* tools/dist/templates/rc-announce-ann.ezt,
* tools/dist/templates/stable-announce-ann.ezt:
    Say "This is a feature/security/bugfix release"
    and "Subversion is an open-source version control system" [quoted
    from our homepage] to make the announcements self-contained for
    readers of and other aggregators.

* tools/dist/
  (): Tell Python this file is UTF-8 encoded, because there is a UTF-8 comment.
  (ezt_False, ezt_True, ezt_bool): New.
  (write_announcement): Pass two new parameters, 'security' and 'dot-zero',
    to the ezt templates.
  (main): New --security option to write-announcement.

Suggested by: sebb 

Apologies to: gstein
(for that ezt API workaround)


Modified: subversion/trunk/tools/dist/
--- subversion/trunk/tools/dist/ (original)
+++ subversion/trunk/tools/dist/ Mon Jul 17 11:35:34 2017
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
+# python: coding=utf-8
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -268,6 +268,20 @@ def download_file(url, target, checksum)
                            (target, checksum, checksum2))
+# ezt helpers
+# In ezt, «[if-any foo]» is true when «data['foo'] == False»,
+# hence, provide this constant for readability.
+ezt_False = ""
+# And this constant for symmetry.
+ezt_True = True
+# And this for convenience.
+def ezt_bool(boolean_value):
+    return ezt_True if boolean_value else ezt_False
 # Cleaning up the environment
 def cleanup(args):
@@ -803,8 +817,19 @@ def write_announcement(args):
     if args.version.is_prerelease():
         template_filename = 'rc-release-ann.ezt'
+        data['dot-zero'] = ezt_bool(args.version.patch == 0)
+        # TODO: instead of requiring the RM to remember to pass --security,
+        #   read the private repository where CVE announcements are staged,
+        #   parse the json file that identifies which versions are affected,
+        #   and accordingly automagically set data['security'].
+        data['security'] = ezt_bool(
         template_filename = 'stable-release-ann.ezt'
+        # The template text assumes these two are mutually exclusive.
+        # If you ever find a reason to make a x.y.0 release with a security
+        # bug, just comment this out and update the template before sending.
+        assert not (data['dot-zero'] and data['security'])
     template = ezt.Template(compress_whitespace = False)
     template.generate(sys.stdout, data)
@@ -1077,6 +1102,9 @@ def main():
                     help='''Output to stdout template text for the emailed
                             release announcement.''')
+    subparser.add_argument('--security', action='store_true', default=False,
+                    help='''The release being announced includes security
+                            fixes.''')
                     help='''The full path to the directory containing
                             release artifacts.''')

Modified: subversion/trunk/tools/dist/templates/rc-release-ann.ezt
--- subversion/trunk/tools/dist/templates/rc-release-ann.ezt (original)
+++ subversion/trunk/tools/dist/templates/rc-release-ann.ezt Mon Jul 17 11:35:34 2017
@@ -26,9 +26,10 @@ PGP Signatures are available at:
 For this release, the following people have provided PGP signatures:
-This is a pre-release for what will eventually become Apache Subversion
-[major-minor-patch].  It may contain known issues, a complete list of
-[major-minor-patch]-blocking issues can be found here:
+This is a pre-release for what will eventually become version [major-minor-patch] of the
+Apache Subversion open source version control system.  It may contain known
+issues, a complete list of [major-minor-patch]-blocking issues can be found

Modified: subversion/trunk/tools/dist/templates/stable-release-ann.ezt
--- subversion/trunk/tools/dist/templates/stable-release-ann.ezt (original)
+++ subversion/trunk/tools/dist/templates/stable-release-ann.ezt Mon Jul 17 11:35:34 2017
@@ -1,17 +1,23 @@
-Subject: [[]ANNOUNCE] Apache Subversion [version] released
-Subject: [[]SECURITY][[]ANNOUNCE] Apache Subversion [version] released
+[if-any security]Cc:
+[end][if-any security]Subject: [[]SECURITY][[]ANNOUNCE] Apache Subversion [version] released
+[else]Subject: [[]ANNOUNCE] Apache Subversion [version] released
 I'm happy to announce the release of Apache Subversion [version].
 Please choose the mirror closest to you by visiting:[anchor]
+[if-any dot-zero]
+This is a stable feature release of the Apache Subversion open source
+version control system.
+[else][if-any security]
+This is a stable bugfix and security release of the Apache Subversion
+open source version control system.
+This is a stable bugfix release of the Apache Subversion open source
+version control system.
 The SHA1 checksums are:
 [for sha1info]    [sha1info.sha1] [sha1info.filename]

View raw message