Remove redundancy: generate vulnerabilities indexes from templates
authorRichard Levitte <levitte@openssl.org>
Sun, 24 Feb 2019 23:56:11 +0000 (00:56 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 28 Feb 2019 14:42:17 +0000 (15:42 +0100)
Adapt Makefile accordingly

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/web/pull/120)

.gitignore
Makefile
news/vulnerabilities-0.9.6.html [deleted file]
news/vulnerabilities-0.9.7.html [deleted file]
news/vulnerabilities-0.9.8.html [deleted file]
news/vulnerabilities-1.0.0.html [deleted file]
news/vulnerabilities-1.0.1.html [deleted file]
news/vulnerabilities-1.0.2.html [deleted file]
news/vulnerabilities-1.1.0.html [deleted file]
news/vulnerabilities-1.1.1.html [deleted file]
news/vulnerabilities.html.tt [moved from news/vulnerabilities.html with 92% similarity]

index 555d8f1fd76d170c9ac1c30e74092ede0a06545e..594bd791956d0def6563371b76c6ac3f7d6c1f37 100644 (file)
@@ -28,6 +28,7 @@ news/newsflash.inc
 news/openssl-*-notes.html
 news/openssl-*-notes.inc
 news/vulnerabilities*.inc
+news/vulnerabilities*.html
 newsflash.inc
 source/*.gz*
 source/*.patch
index 2edd44d00263c2d29cd819afcccc6af16fb11ff8..ca462f7473a23b04150fd357fe4b7ec6e1d9a4b6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,9 @@ SIMPLE = newsflash.inc sitemap.txt \
         $(foreach S,$(SERIES),news/openssl-$(S)-notes.html) \
         news/newsflash.inc \
         news/vulnerabilities.inc \
+        news/vulnerabilities.html \
         $(foreach S,$(SERIES) $(OLDSERIES),news/vulnerabilities-$(S).inc) \
+        $(foreach S,$(SERIES) $(OLDSERIES),news/vulnerabilities-$(S).html) \
         source/.htaccess \
         source/index.inc \
         source/old/index.html
@@ -173,6 +175,9 @@ define mknews_vulnerability
 news/vulnerabilities$(1).inc: bin/mk-cvepage news/vulnerabilities.xml
        @rm -f $$@
        ./bin/mk-cvepage -i news/vulnerabilities.xml $(2) > $$@
+news/vulnerabilities$(1).html: news/vulnerabilities.html.tt bin/from-tt
+       @rm -f $$@
+       ./bin/from-tt -d news vulnerabilitiesinc='vulnerabilities$(1).inc' < $$< > $$@
 endef
 $(eval $(call mknews_vulnerability,,))
 $(foreach S,$(SERIES) $(OLDSERIES),$(eval $(call mknews_vulnerability,-$(S),-b $(S))))
diff --git a/news/vulnerabilities-0.9.6.html b/news/vulnerabilities-0.9.6.html
deleted file mode 100644 (file)
index 34d4b20..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-
-<body>
-<!--#include virtual="/inc/banner.shtml" -->
-
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>Vulnerabilities<h2></header>
-         <div class="entry-content">
-           <p>
-              If you think you have found a security bug in OpenSSL,
-              please <a href="/community/#securityreports">report it to us</a>.
-           </p>
-            <h2>Note: Support for OpenSSL 0.9.6 ended and
-              is no longer receiving security updates</h2>
-            <!--#include virtual="vulnerabilities-0.9.6.inc" -->
-           </p>
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href=".">News</a>
-            : <a href="">Vulnerabilities</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="sidebar.shtml" -->
-    </div>
-  </div>
-
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-
-</html>
-
diff --git a/news/vulnerabilities-0.9.7.html b/news/vulnerabilities-0.9.7.html
deleted file mode 100644 (file)
index 8293333..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-
-<body>
-<!--#include virtual="/inc/banner.shtml" -->
-
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>Vulnerabilities<h2></header>
-         <div class="entry-content">
-           <p>
-              If you think you have found a security bug in OpenSSL,
-              please <a href="/community/#securityreports">report it to us</a>.
-           </p>
-            <h2>Note: Support for OpenSSL 0.9.7 ended and
-              is no longer receiving security updates</h2>
-            <!--#include virtual="vulnerabilities-0.9.7.inc" -->
-           </p>
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href=".">News</a>
-            : <a href="">Vulnerabilities</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="sidebar.shtml" -->
-    </div>
-  </div>
-
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-
-</html>
-
diff --git a/news/vulnerabilities-0.9.8.html b/news/vulnerabilities-0.9.8.html
deleted file mode 100644 (file)
index 127624f..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-
-<body>
-<!--#include virtual="/inc/banner.shtml" -->
-
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>Vulnerabilities<h2></header>
-         <div class="entry-content">
-           <p>
-              If you think you have found a security bug in OpenSSL,
-              please <a href="/community/#securityreports">report it to us</a>.
-           </p>
-            <h2>Note: Support for OpenSSL 0.9.8 ended on 31st December 2015 and
-              is no longer receiving security updates</h2>
-            <!--#include virtual="vulnerabilities-0.9.8.inc" -->
-           </p>
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href=".">News</a>
-            : <a href="">Vulnerabilities</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="sidebar.shtml" -->
-    </div>
-  </div>
-
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-
-</html>
-
diff --git a/news/vulnerabilities-1.0.0.html b/news/vulnerabilities-1.0.0.html
deleted file mode 100644 (file)
index f0c375d..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-
-<body>
-<!--#include virtual="/inc/banner.shtml" -->
-
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>Vulnerabilities<h2></header>
-         <div class="entry-content">
-           <p>
-              If you think you have found a security bug in OpenSSL,
-              please <a href="/community/#securityreports">report it to us</a>.
-           </p>
-            <h2>Note: Support for OpenSSL 1.0.0 ended on 31st December 2015 and
-            is no longer receiving security updates</h2>
-            <!--#include virtual="vulnerabilities-1.0.0.inc" -->
-           </p>
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href=".">News</a>
-            : <a href="">Vulnerabilities</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="sidebar.shtml" -->
-    </div>
-  </div>
-
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-
-</html>
-
diff --git a/news/vulnerabilities-1.0.1.html b/news/vulnerabilities-1.0.1.html
deleted file mode 100644 (file)
index 08302c2..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-
-<body>
-<!--#include virtual="/inc/banner.shtml" -->
-
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>Vulnerabilities<h2></header>
-         <div class="entry-content">
-           <p>
-              If you think you have found a security bug in OpenSSL,
-              please <a href="/community/#securityreports">report it to us</a>.
-           </p>
-            <h2>Note: Support for OpenSSL 1.0.1 ended on 31st December 2016 and
-            is no longer receiving security updates</h2>
-            <!--#include virtual="vulnerabilities-1.0.1.inc" -->
-           </p>
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href=".">News</a>
-            : <a href="">Vulnerabilities</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="sidebar.shtml" -->
-    </div>
-  </div>
-
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-
-</html>
-
diff --git a/news/vulnerabilities-1.0.2.html b/news/vulnerabilities-1.0.2.html
deleted file mode 100644 (file)
index 0f1ac3b..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-
-<body>
-<!--#include virtual="/inc/banner.shtml" -->
-
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>Vulnerabilities<h2></header>
-         <div class="entry-content">
-           <p>
-              If you think you have found a security bug in OpenSSL,
-              please <a href="/community/#securityreports">report it to us</a>.
-           </p>
-            <!--#include virtual="vulnerabilities-1.0.2.inc" -->
-           </p>
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href=".">News</a>
-            : <a href="">Vulnerabilities</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="sidebar.shtml" -->
-    </div>
-  </div>
-
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-
-</html>
-
diff --git a/news/vulnerabilities-1.1.0.html b/news/vulnerabilities-1.1.0.html
deleted file mode 100644 (file)
index 15a62de..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-
-<body>
-<!--#include virtual="/inc/banner.shtml" -->
-
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>Vulnerabilities<h2></header>
-         <div class="entry-content">
-           <p>
-              If you think you have found a security bug in OpenSSL,
-              please <a href="/community/#securityreports">report it to us</a>.
-           </p>
-            <!--#include virtual="vulnerabilities-1.1.0.inc" -->
-           </p>
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href=".">News</a>
-            : <a href="">Vulnerabilities</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="sidebar.shtml" -->
-    </div>
-  </div>
-
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-
-</html>
-
diff --git a/news/vulnerabilities-1.1.1.html b/news/vulnerabilities-1.1.1.html
deleted file mode 100644 (file)
index db54fa1..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-
-<body>
-<!--#include virtual="/inc/banner.shtml" -->
-
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>Vulnerabilities<h2></header>
-         <div class="entry-content">
-           <p>
-              If you think you have found a security bug in OpenSSL,
-              please <a href="/community/#securityreports">report it to us</a>.
-           </p>
-            <!--#include virtual="vulnerabilities-1.1.1.inc" -->
-           </p>
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href=".">News</a>
-            : <a href="">Vulnerabilities</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="sidebar.shtml" -->
-    </div>
-  </div>
-
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-
-</html>
-
similarity index 92%
rename from news/vulnerabilities.html
rename to news/vulnerabilities.html.tt
index 672b6ec522ae36542d224102e361cbc7d7a7442a..840ef339bf587799a46ac3a0171305b709b7e27d 100644 (file)
@@ -15,7 +15,7 @@
               If you think you have found a security bug in OpenSSL,
               please <a href="/community/#securityreports">report it to us</a>.
            </p>
-            <!--#include virtual="vulnerabilities.inc" -->
+            <!--#include virtual="[% vulnerabilitiesinc %]" -->
            </p>
          </div>
          <footer>