docs: sphinx-build-wrapper: include localversion in kernel version string
Subsystems (2)
Randy Dunlap
reviewerPATCH 1/1 docs: sphinx-build-wrapper: include localversion in kernel version string
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 <[email protected]>
---
Cc: Jonathan Corbet <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: [email protected]
tools/docs/sphinx-build-wrapper | 9 +++++++++ 1 file changed, 9 insertions(+)
tools/docs/sphinx-build-wrapper +9 -0
@@ -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.
Quoted 8 lines · Randy Dunlap
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-20260807Signed-off-by Randy Dunlap <[email protected]>
Quoted 8 lines
---
Cc: Jonathan Corbet <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: [email protected]tools/docs/sphinx-build-wrapper | 9 +++++++++ 1 file changed, 9 insertions(+)
Applied, thanks.
jon