You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/12/04 20:53:27 UTC

[groovy-website] branch asf-site updated: GROOVY-9846: Spurious hashes and sigs for 2.4.1 on download page

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 7d9ff40  GROOVY-9846: Spurious hashes and sigs for 2.4.1 on download page
7d9ff40 is described below

commit 7d9ff40badda86386030f3807d96024ea8431ff9
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat Dec 5 06:53:16 2020 +1000

    GROOVY-9846: Spurious hashes and sigs for 2.4.1 on download page
---
 site/src/site/pages/download.groovy | 54 +++++++++++++++++--------------------
 1 file changed, 25 insertions(+), 29 deletions(-)

diff --git a/site/src/site/pages/download.groovy b/site/src/site/pages/download.groovy
index 0474d7a..4298f5a 100644
--- a/site/src/site/pages/download.groovy
+++ b/site/src/site/pages/download.groovy
@@ -104,12 +104,21 @@ layout 'layouts/main.groovy', true,
                                 }
                                 h3 'Verification'
                                 p {
-                                    yield "We provide OpenPGP signatures ('.asc') files and checksums for every release artifact. We recommend that you "
+                                    yield "We provide OpenPGP signatures ('.asc') files and checksums ('.sha256') for every release artifact. We recommend that you "
                                     a(href: 'https://www.apache.org/info/verification.html', 'verify')
                                     yield ' the integrity of downloaded files by generating your own checksums and matching them against ours and checking signatures using the '
                                     a(href: 'https://www.apache.org/dist/groovy/KEYS', 'KEYS')
                                     yield " file which contains the OpenPGP keys of Groovy's Release Managers across all releases."
                                 }
+                                p {
+                                    yield "Newer releases have two sets of verification links. The "
+                                    span(style: 'font-variant: small-caps', 'dist')
+                                    yield " labelled links are through the normal Apache distribution mechanism. The "
+                                    span(style: 'font-variant: small-caps', 'perm')
+                                    yield " labelled links are through the Apache archive server. The latter "
+                                    yield " of these won't change but may not be available for a short while (usually less than a day) after a release. "
+                                    yield " Older releases are only available from the archive server. "
+                                }
 
                                 distributions.each { dist ->
                                     h2 {
@@ -126,41 +135,28 @@ layout 'layouts/main.groovy', true,
                                     def distUrl = { String type, String area, v -> "https://downloads.apache.org/groovy/${v}/${area}/apache-groovy-${type}-${v}.zip".toString() }
                                     def distExtUrl = { String type, String area, v, String ext -> "${distUrl(type, area, v)}.$ext".toString() }
                                     def findUrl = { String type, String area, v, String ext, boolean preferPermalink ->
-                                        def u
-                                        if (preferPermalink) {
-                                            u = archiveExtUrl(type, area, v, ext)
-                                            if (SiteGenerator.exists(u)) return u
+                                        def u = preferPermalink ? archiveExtUrl(type, area, v, ext) : distExtUrl(type, area, v, ext)
+                                        if (!SiteGenerator.exists(u)) {
+                                            println "WARNING: URL $u does not yet exist!"
                                         }
-                                        u = distExtUrl(type, area, v, ext)
-                                        if (SiteGenerator.exists(u)) return u
-                                        if (!preferPermalink) {
-                                            u = archiveExtUrl(type, area, v, ext)
-                                            if (SiteGenerator.exists(u)) return u
-                                        }
-                                        null
+                                        u
                                     }
                                     def buildExtras = { String prefix, String type, String area, String v, boolean preferPermalink ->
-                                        def extras = [:]
-                                        def url = findUrl(type, area, v, 'asc', preferPermalink)
-                                        if (url) { extras.asc = url }
-                                        url = findUrl(type, area, v, 'md5', preferPermalink)
-                                        if (url) { extras.md5 = url }
-                                        url = findUrl(type, area, v, 'sha256', preferPermalink)
-                                        if (url) { extras.sha256 = url }
-                                        if (extras) {
-                                            def first = true
-                                            br()
-                                            span(style: 'font-variant: small-caps', prefix)
-                                            extras.each { ext, u ->
-                                                if (first) first = false
-                                                else yield ' '
-                                                a(href: u, ext)
-                                            }
+                                        def extras = [
+                                                asc   : findUrl(type, area, v, 'asc', preferPermalink),
+                                                sha256: findUrl(type, area, v, 'sha256', preferPermalink)]
+                                        def first = true
+                                        br()
+                                        span(style: 'font-variant: small-caps', prefix)
+                                        extras.each { ext, u ->
+                                            if (first) first = false
+                                            else yield ' '
+                                            a(href: u, ext)
                                         }
                                     }
                                     def srcUrl = { pkg ->
                                         def v = pkg.version
-                                        pkg.archive ? archiveUrl('src', 'sources', v) : "http://www.apache.org/dyn/closer.cgi/groovy/${v}/sources/apache-groovy-src-${v}.zip"
+                                        pkg.archive ? archiveUrl('src', 'sources', v) : "https://www.apache.org/dyn/closer.cgi/groovy/${v}/sources/apache-groovy-src-${v}.zip"
                                     }
                                     dist.packages.each { pkg ->
                                         def v = pkg.version