tools/docs/sphinx-build-wrapper | 9 +++++++++ 1 file changed, 9 insertions(+)
Add any localversion* text to the kernel version string
so that the docs index (home) page accurately indicates what
the docs build version is.
E.g.:
7.2.0-rc6-next-20260807
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-doc@vger.kernel.org
tools/docs/sphinx-build-wrapper | 9 +++++++++
1 file changed, 9 insertions(+)
--- linux-next-20260807.orig/tools/docs/sphinx-build-wrapper
+++ linux-next-20260807/tools/docs/sphinx-build-wrapper
@@ -220,6 +220,15 @@ class SphinxBuilder:
self.pdflatex = os.environ.get("PDFLATEX", "xelatex")
#
+ # Add localversion* to kernelversion if present
+ #
+ for file in glob(os.environ["srctree"] + "/localversion*"):
+ if not file.endswith(".orig"):
+ with open(file, 'r', encoding='utf-8') as f:
+ text = f.read()
+ self.kernelversion += text
+
+ #
# Kernel main Makefile defines a PYTHON3 variable whose default is
# "python3". When set to a different value, it allows running a
# diferent version than the default official python3 package.
Randy Dunlap <rdunlap@infradead.org> writes: > Add any localversion* text to the kernel version string > so that the docs index (home) page accurately indicates what > the docs build version is. > > E.g.: > 7.2.0-rc6-next-20260807 > > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > --- > Cc: Jonathan Corbet <corbet@lwn.net> > Cc: Shuah Khan <skhan@linuxfoundation.org> > Cc: Mauro Carvalho Chehab <mchehab@kernel.org> > Cc: linux-doc@vger.kernel.org > > tools/docs/sphinx-build-wrapper | 9 +++++++++ > 1 file changed, 9 insertions(+) Applied, thanks. jon
© 2016 - 2026 Red Hat, Inc.