docs/userguide: use a consistent date for reproducible builds

By default, when Sphinx generates the man pages, the current date will
be embedded in them. This can be set to a specific date with the
"today" variable. Typically the date embedded in manpages in the
release date.

To achieve this, attempt to use the environment variable, RELEASE_DATE
to set the "today" variable, reverting back to the empty string if not
set. It is up to our build system to properly set this date.

Ticket: #6911
pull/10767/head
Jason Ish 1 year ago committed by Victor Julien
parent c00c2b116f
commit 51bf1c3510

@ -74,6 +74,7 @@ userguide.pdf: _build/latex/Suricata.pdf
pdf: userguide.pdf
_build/man: manpages/suricata.rst manpages/suricatasc.rst manpages/suricatactl.rst manpages/suricatactl-filestore.rst
RELEASE_DATE=$(RELEASE_DATE) \
sysconfdir=$(sysconfdir) \
localstatedir=$(localstatedir) \
version=$(PACKAGE_VERSION) \

@ -19,6 +19,10 @@ import re
import subprocess
import datetime
# Set 'today'. This will be used as the man page date. If an empty
# string todays date will be used.
today = os.environ.get('RELEASE_DATE', '')
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
# If extensions (or modules to document with autodoc) are in another directory,

Loading…
Cancel
Save