Skip to content

Commit b396bf5

Browse files
committed
docs: changes to website docs to announce CVE's
Changes to the website doc generation to create CVE.html by extracing secions from upgrading.txt. It also allows overriding the release version that is displayed in the web page titles. It also adds support for making a zipfile (which is better supported on windows that a tarball) of the templates needed to address the CVE in the tracker home html files The next commit for this directory will remove the generation of the CVE.html file as CVE remediation/scope issue will be in the upgrading.html document. It will also remove generation of templates.zip.
1 parent 860e3c8 commit b396bf5

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

website/www/Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ help:
1111
@echo " production website"
1212
@echo " sourceforge_dev_sync sync html directory to sourceforce"
1313
@echo " /dev_docs subdirectory"
14+
@echo " sourceforge_home_sync sync html directory to"
15+
@echo " sourceforge:~/roundup_docs"
1416
@echo " clean remove all produced files"
1517
clean:
16-
-rm -rf $(TMP) $(HTML) docs COPYING.txt
18+
-rm -rf $(TMP) $(HTML) docs COPYING.txt templates.zip
1719

1820
docs:
1921
ln -s ../../doc ./docs
@@ -22,7 +24,7 @@ docs:
2224
# after upgrade to sphinx 1.8.5, search.html is missing load of searchtools.
2325
# fix that in postprocess
2426
# also sed index.html to properly format meta og:... entries.
25-
html: docs
27+
html: docs templates.zip
2628
rm -rf html
2729
mkdir -p $(TMP)/doctrees $(HTML)
2830
sphinx-build -n -W -b html -d $(TMP)/doctrees . $(HTML)
@@ -39,6 +41,8 @@ html: docs
3941
@echo; \
4042
l=$$(find html -name '*.orig' -o -name '*~' | tee /dev/tty | wc -l);\
4143
if [ $$l -ne 0 ]; then echo "Garbage files found" && false; fi
44+
if [ -e templates.zip ]; then cp templates.zip \
45+
html/CVE-2024-39124-templates.zip; fi
4246

4347
linkcheck:
4448
mkdir -p $(TMP)/linkcheck $(TMP)/doctrees
@@ -47,6 +51,11 @@ linkcheck:
4751
@echo "Link check complete; look for any errors in the above output " \
4852
"or in .build/linkcheck/output.txt."
4953

54+
templates.zip:
55+
rm -f templates.zip
56+
(cd ../../share/roundup; hg status -A templates | \
57+
sed -ne '/^[AMC]/s/^..//p' | sort | zip -@ - ) > templates.zip
58+
5059
sourceforge_dev_sync:
5160
# --no-times makes _images/* and other files sync over every time
5261
# so docs_backup-... is complete with all files and can be served

website/www/conf.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@
2626
DOCROOT = os.path.abspath(os.path.dirname(__file__) + "/..")
2727
sys.path = [os.path.dirname(DOCROOT)]
2828
try:
29-
from roundup import __version__ as VERSION
30-
SHORTVER = '.'.join(VERSION.split('.', 2)[:2])
29+
if "RELEASE_VERSION" in os.environ:
30+
SHORTVER = '.'.join(os.environ['RELEASE_VERSION'].split('.', 2)[:2])
31+
VERSION = os.environ['RELEASE_VERSION']
32+
else:
33+
from roundup import __version__ as VERSION
34+
SHORTVER = '.'.join(VERSION.split('.', 2)[:2])
3135
except ImportError:
3236
VERSION = SHORTVER = '(unknown version)'
3337
finally:

website/www/contents.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ Contents:
2323
:hidden:
2424

2525
docs/announcement
26+
docs/CVE

0 commit comments

Comments
 (0)