Skip to content

Commit

Permalink
Convert SSI includes to tt includes in news/
Browse files Browse the repository at this point in the history
This also fixes news/dirdata.yaml for better rendering of breadcrumbs

Reviewed-by: Anton Arapov <anton@openssl.org>
Reviewed-by: Tomas Vavra <tvavra@openssl.org>
(Merged from #430)
  • Loading branch information
levitte committed Oct 16, 2023
1 parent 2384799 commit a8a2718
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 23 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ news/changelog.md
news/changelog.txt
news/cl*.txt
news/newsflash.inc
news/newslog.md
news/openssl-*-notes.md
news/openssl-*-notes.inc
news/pgpkey.md
news/secadv/
news/secjson/
news/vulnerabilities*.inc
news/vulnerabilities*.md
news/*.html
Expand Down
22 changes: 13 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ H_DOCS = $(addsuffix .html,\
$(basename $(shell git ls-files -- docs/*.md \
docs/*.md.tt \
| grep -v '/sub-')))
H_NEWS = $(addsuffix .html,$(basename $(shell git ls-files -- news/*.md)))
H_NEWS = $(addsuffix .html,\
$(basename $(shell git ls-files -- news/*.md)) \
$(basename $(basename $(shell git ls-files -- news/*.md.tt))))
H_POLICIES = $(addsuffix .html,\
$(basename $(shell git ls-files -- \
policies/*.md \
Expand All @@ -89,15 +91,10 @@ H_SUPPORT = $(addsuffix .html,$(basename $(shell git ls-files -- support/*.md)))

SIMPLE = $(H_TOP) \
$(H_COMMUNITY) \
news/changelog.html \
$(foreach S,$(SERIES),news/openssl-$(S)-notes.inc) \
$(foreach S,$(SERIES),news/openssl-$(S)-notes.html) \
$(H_NEWS) \
news/secadv \
news/secjson \
news/vulnerabilities.inc \
news/vulnerabilities.html \
$(foreach S,$(SERIES) $(OLDSERIES),news/vulnerabilities-$(S).inc) \
$(foreach S,$(SERIES) $(OLDSERIES),news/vulnerabilities-$(S).html) \
$(H_POLICIES) \
policies/glossary.html \
Expand Down Expand Up @@ -411,7 +408,8 @@ news/changelog.inc: news/changelog.txt bin/post-process-html5 Makefile
@rm -f $@
(echo 'Table of contents'; sed -e '1,/^OpenSSL Releases$$/d' < $<) \
| pandoc -t html5 -f commonmark | ./bin/post-process-html5 >$@
news/changelog.md: news/changelog.md.tt news/changelog.inc Makefile bin/from-tt
news/changelog.md: news/changelog.md.tt news/changelog.inc \
bin/from-tt Makefile
@rm -f $@
./bin/from-tt 'releases=$(SERIES)' $<
# Additionally, make news/changelog.html depend on clxy[z].txt, where xy[z]
Expand Down Expand Up @@ -455,7 +453,9 @@ $(eval $(call mknews_changelogtxt,cl$(subst .,,$(S)).txt,openssl-$(S)-stable/CHA
#
# $(1) = release version, $(2) = NEWS file, relative to CHECKOUTS
define mknews_noteshtml
news/openssl-$(1)-notes.md: news/openssl-notes.md.tt bin/from-tt Makefile
news/openssl-$(1)-notes.md: news/openssl-notes.md.tt \
news/openssl-$(1)-notes.inc \
bin/from-tt Makefile
@rm -f $$@
./bin/from-tt -d news -i $$< -o $$@ release='$(1)'
news/openssl-$(1)-notes.inc: $(CHECKOUTS)/$(2) bin/mk-notes Makefile
Expand Down Expand Up @@ -492,7 +492,9 @@ define mknews_vulnerability
news/vulnerabilities$(1).inc: bin/cvejsontohtml.py news/secjson Makefile
@rm -f $$@
python3 ./bin/cvejsontohtml.py -i news/secjson/ $(2) > $$@
news/vulnerabilities$(1).md: news/vulnerabilities.md.tt bin/from-tt Makefile
news/vulnerabilities$(1).md: news/vulnerabilities.md.tt \
news/vulnerabilities$(1).inc \
bin/from-tt Makefile
@rm -f $$@
./bin/from-tt -d news vulnerabilitiesinc='vulnerabilities$(1).inc' < $$< > $$@
endef
Expand Down Expand Up @@ -595,6 +597,8 @@ source/old/index.md: source/old/index.md.tt Makefile bin/from-tt Makefile

# Extra inc -> markdown dependencies

news/newslog.md: news/newsflash.inc
news/pgpkey.md: news/openssl-security.asc

# Extra HTML dependencies (apart from the markdown file it comes from)

Expand Down
18 changes: 8 additions & 10 deletions news/dirdata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
breadcrumbs:
- |
[Home](/) : [News](.)
sidebar:
- |
# [News](.)
breadcrumbs: >-
[Home](/) : [News](.)
sidebar: |
# [News](.)
- [Newslog](newslog.html)
- [Vulnerabilities](vulnerabilities.html)
- [CVEs and FIPS](fips-cve.html)
- [Changelog](changelog.html)
- [Newslog](newslog.html)
- [Vulnerabilities](vulnerabilities.html)
- [CVEs and FIPS](fips-cve.html)
- [Changelog](changelog.html)
---
2 changes: 1 addition & 1 deletion news/newslog.md → news/newslog.md.tt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ release notices.

<p>
<table class="newsflash" width="90%">
<!--#include virtual="newsflash.inc"-->
[% INCLUDE "newsflash.inc" %]
</table>
</p>
2 changes: 1 addition & 1 deletion news/openssl-notes.md.tt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ git repository.

More details can be found in the [ChangeLog](changelog.html).

<!--#include virtual="openssl-[% release %]-notes.inc" -->
[% INCLUDE "openssl-$release-notes.inc" %]
2 changes: 1 addition & 1 deletion news/pgpkey.md → news/pgpkey.md.tt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ team PGP key, below. The plain-text document of the key is available
here: [openssl-security.asc](openssl-security.asc)

<pre>
<!--#include virtual="openssl-security.asc" -->
[% INCLUDE "openssl-security.asc" %]
</pre>
2 changes: 1 addition & 1 deletion news/vulnerabilities.md.tt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ breadcrumb: Vulnerabilities
If you think you have found a security bug in OpenSSL,
please [report it to us](/community/#securityreports).

<!--#include virtual="[% vulnerabilitiesinc %]" -->
[% INCLUDE "$vulnerabilitiesinc" %]

0 comments on commit a8a2718

Please sign in to comment.