[PATCH] docs: sphinx-build-wrapper: include localversion in kernel version string
Randy Dunlap <[email protected]>
| Newsgroups | org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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(+) --- 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.