Linux Documentation
 help / color / mirror / Atom feed
* [PATCH] docs: sphinx-build-wrapper: include localversion in kernel version string
@ 2026-08-08  4:53 Randy Dunlap
  0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2026-08-08  4:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Jonathan Corbet, Shuah Khan, Mauro Carvalho Chehab,
	linux-doc

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-08  4:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-08  4:53 [PATCH] docs: sphinx-build-wrapper: include localversion in kernel version string Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox