| #
f9616386 |
| 03-Dec-2025 |
Linus Torvalds <torvalds@linux-foundation.org> |
Merge tag 'docs-6.19' of git://git.lwn.net/linux
Pull documentation updates from Jonathan Corbet: "This has been another busy cycle for documentation, with a lot of build-system thrashing. That w
Merge tag 'docs-6.19' of git://git.lwn.net/linux
Pull documentation updates from Jonathan Corbet: "This has been another busy cycle for documentation, with a lot of build-system thrashing. That work should slow down from here on out.
- The various scripts and tools for documentation were spread out in several directories; now they are (almost) all coalesced under tools/docs/. The holdout is the kernel-doc script, which cannot be easily moved without some further thought.
- As the amount of Python code increases, we are accumulating modules that are imported by multiple programs. These modules have been pulled together under tools/lib/python/ -- at least, for documentation-related programs. There is other Python code in the tree that might eventually want to move toward this organization.
- The Perl kernel-doc.pl script has been removed. It is no longer used by default, and nobody has missed it, least of all anybody who actually had to look at it.
- The docs build was controlled by a complex mess of makefilese that few dared to touch. Mauro has moved that logic into a new program (tools/docs/sphinx-build-wrapper) that, with any luck at all, will be far easier to understand and maintain.
- The get_feat.pl program, used to access information under Documentation/features/, has been rewritten in Python, bringing an end to the use of Perl in the docs subsystem.
- The top-level README file has been reorganized into a more reader-friendly presentation.
- A lot of Chinese translation additions
- Typo fixes and documentation updates as usual"
* tag 'docs-6.19' of git://git.lwn.net/linux: (164 commits) docs: makefile: move rustdoc check to the build wrapper README: restructure with role-based documentation and guidelines docs: kdoc: various fixes for grammar, spelling, punctuation docs: kdoc_parser: use '@' for Excess enum value docs: submitting-patches: Clarify that removal of Acks needs explanation too docs: kdoc_parser: add data/function attributes to ignore docs: MAINTAINERS: update Mauro's files/paths docs/zh_CN: Add wd719x.rst translation docs/zh_CN: Add libsas.rst translation get_feat.pl: remove it, as it got replaced by get_feat.py Documentation/sphinx/kernel_feat.py: use class directly tools/docs/get_feat.py: convert get_feat.pl to Python Documentation/admin-guide: fix typo and comment in cscope example docs/zh_CN: Add data-integrity.rst translation docs/zh_CN: Add blk-mq.rst translation docs/zh_CN: Add block/index.rst translation docs/zh_CN: Update the Chinese translation of kbuild.rst docs: bring some order to our Python module hierarchy docs: Move the python libraries to tools/lib/python Documentation/kernel-parameters: Move the kernel build options ...
show more ...
|
|
Revision tags: v6.18, v6.18-rc7 |
|
| #
34a28245 |
| 18-Nov-2025 |
Jonathan Corbet <corbet@lwn.net> |
Merge branch 'python-modules' into docs-mw
scripts/lib was always a bit of an awkward place for Python libraries; give them a proper home under tools/lib/python. Put the modules from tools/docs/lib
Merge branch 'python-modules' into docs-mw
scripts/lib was always a bit of an awkward place for Python libraries; give them a proper home under tools/lib/python. Put the modules from tools/docs/lib there for good measure.
The second patch ties them into a single package namespace. It would be more aesthetically pleasing to add a kernel layer, so we could say:
from kernel.kdoc import kdoc_parser
...and have the kernel-specific stuff clearly marked, but that means adding an empty directory in the hierarchy, which isn't as pleasing.
There are some other "Python library" directories hidden in the kernel tree; we may eventually want to encourage them to move as well.
show more ...
|
|
Revision tags: v6.18-rc6 |
|
| #
992a9df4 |
| 10-Nov-2025 |
Jonathan Corbet <corbet@lwn.net> |
docs: bring some order to our Python module hierarchy
Now that we have tools/lib/python for our Python modules, turn them into proper packages with a single namespace so that everything can just use
docs: bring some order to our Python module hierarchy
Now that we have tools/lib/python for our Python modules, turn them into proper packages with a single namespace so that everything can just use tools/lib/python in sys.path. No functional change.
Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20251110220430.726665-3-corbet@lwn.net>
show more ...
|
| #
778b8ebe |
| 10-Nov-2025 |
Jonathan Corbet <corbet@lwn.net> |
docs: Move the python libraries to tools/lib/python
"scripts/lib" was always a bit of an awkward place for Python modules. We already have tools/lib; create a tools/lib/python, move the libraries t
docs: Move the python libraries to tools/lib/python
"scripts/lib" was always a bit of an awkward place for Python modules. We already have tools/lib; create a tools/lib/python, move the libraries there, and update the users accordingly.
While at it, move the contents of tools/docs/lib. Rather than make another directory, just put these documentation-oriented modules under "kdoc".
Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20251110220430.726665-2-corbet@lwn.net>
show more ...
|
|
Revision tags: v6.18-rc5 |
|
| #
77a22121 |
| 04-Nov-2025 |
Jonathan Corbet <corbet@lwn.net> |
Merge branch 'tools-final2' into docs-mw
Our documentation-related tools are spread out over various directories; several are buried in the scripts/ dumping ground. That makes them harder to discov
Merge branch 'tools-final2' into docs-mw
Our documentation-related tools are spread out over various directories; several are buried in the scripts/ dumping ground. That makes them harder to discover and harder to maintain.
Recent work has started accumulating our documentation-related tools in /tools/docs. This series nearly completes that task, moving most of the rest of our various utilities there, hopefully fixing up all of the relevant references in the process.
The one exception is scripts/kernel-doc; that move turned up some other problems, so I have dropped it until those are ironed out.
At the end, rather than move the old, Perl kernel-doc, I simply removed it.
show more ...
|
|
Revision tags: v6.18-rc4, v6.18-rc3, v6.18-rc2, v6.18-rc1, v6.17, v6.17-rc7, v6.17-rc6, v6.17-rc5, v6.17-rc4, v6.17-rc3, v6.17-rc2 |
|
| #
eaae0ad9 |
| 13-Aug-2025 |
Jonathan Corbet <corbet@lwn.net> |
docs: move scripts/documentation-file-ref-check to tools/docs
Add this script to the growing collection of documentation tools.
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Acked-
docs: move scripts/documentation-file-ref-check to tools/docs
Add this script to the growing collection of documentation tools.
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
show more ...
|
| #
3df5affb |
| 17-Oct-2025 |
Jonathan Corbet <corbet@lwn.net> |
Merge branch 'build-script' into docs-mw
Quoth Mauro:
This series should probably be called:
"Move the trick-or-treat build hacks accumulated over time into a single place and document th
Merge branch 'build-script' into docs-mw
Quoth Mauro:
This series should probably be called:
"Move the trick-or-treat build hacks accumulated over time into a single place and document them."
as this reflects its main goal. As such:
- it places the jobserver logic on a library; - it removes sphinx/parallel-wrapper.sh; - the code now properly implements a jobserver-aware logic to do the parallelism when called via GNU make, failing back to "-j" when there's no jobserver; - converts check-variable-fonts.sh to Python and uses it via function call; - drops an extra script to generate man pages, adding a makefile target for it; - ensures that return code is 0 when PDF successfully builds; - about half of the script is comments and documentation.
I tried to do my best to document all tricks that are inside the script. This way, the docs build steps is now documented.
It should be noticed that it is out of the scope of this series to change the implementation. Surely the process can be improved, but first let's consolidate and document everything on a single place.
Such script was written in a way that it can be called either directly or via a Makefile. Running outside Makefile is interesting specially when debug is needed. The command line interface replaces the need of having lots of env vars before calling sphinx-build:
$ ./tools/docs/sphinx-build-wrapper --help usage: sphinx-build-wrapper [-h] [--sphinxdirs SPHINXDIRS [SPHINXDIRS ...]] [--conf CONF] [--builddir BUILDDIR] [--theme THEME] [--css CSS] [--paper {,a4,letter}] [-v] [-j JOBS] [-i] [-V [VENV]] {cleandocs,linkcheckdocs,htmldocs,epubdocs,texinfodocs,infodocs,mandocs,latexdocs,pdfdocs,xmldocs}
Kernel documentation builder
positional arguments: {cleandocs,linkcheckdocs,htmldocs,epubdocs,texinfodocs,infodocs,mandocs,latexdocs,pdfdocs,xmldocs} Documentation target to build
options: -h, --help show this help message and exit --sphinxdirs SPHINXDIRS [SPHINXDIRS ...] Specific directories to build --conf CONF Sphinx configuration file --builddir BUILDDIR Sphinx configuration file --theme THEME Sphinx theme to use --css CSS Custom CSS file for HTML/EPUB --paper {,a4,letter} Paper size for LaTeX/PDF output -v, --verbose place build in verbose mode -j, --jobs JOBS Sets number of jobs to use with sphinx-build -i, --interactive Change latex default to run in interactive mode -V, --venv [VENV] If used, run Sphinx from a venv dir (default dir: sphinx_latest)
the only mandatory argument is the target, which is identical with "make" targets.
The call inside Makefile doesn't use the last four arguments. They're there to help identifying problems at the build:
-v makes the output verbose; -j helps to test parallelism; -i runs latexmk in interactive mode, allowing to debug PDF build issues; -V is useful when testing it with different venvs.
When used with GNU make (or some other make which implements jobserver), a call like:
make -j <targets> htmldocs
will make the wrapper to automatically use POSIX jobserver to claim the number of available job slots, calling sphinx-build with a "-j" parameter reflecting it. ON such case, the default can be overriden via SPHINXDIRS argument.
Visiable changes when compared with the old behavior:
When V=0, the only visible difference is that: - pdfdocs target now returns 0 on success, 1 on failures. This addresses an issue over the current process where we it always return success even on failures; - it will now print the name of PDF files that failed to build, if any.
In verbose mode, sphinx-build-wrapper and sphinx-build command lines are now displayed.
show more ...
|
| #
62ea383b |
| 18-Sep-2025 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
tools/docs: sphinx-* break documentation bulds on openSUSE
Before this patch, building htmldocs on opensuseLEAP works fine:
# make htmldocs Available Python versions: /usr/bin/python3
tools/docs: sphinx-* break documentation bulds on openSUSE
Before this patch, building htmldocs on opensuseLEAP works fine:
# make htmldocs Available Python versions: /usr/bin/python3.11
Python 3.6.15 not supported. Changing to /usr/bin/python3.11 Python 3.6.15 not supported. Changing to /usr/bin/python3.11 Using alabaster theme Using Python kernel-doc
...
As the logic detects that Python 3.6 is too old and recommends intalling python311-Sphinx. If installed, documentation builds work like a charm.
Yet, some develpers complained that running python3.11 instead of python3 should not happen. So, let's break the build to make them happier:
$ make htmldocs Python 3.6.15 not supported. Bailing out You could run, instead: /usr/bin/python3.11 tools/docs/sphinx-build-wrapper htmldocs \ --sphinxdirs=. --conf=conf.py --builddir=Documentation/output --theme= --css= \ --paper=
Python 3.6.15 not supported. Bailing out make[2]: *** [Documentation/Makefile:76: htmldocs] Error 1 make[1]: *** [Makefile:1806: htmldocs] Error 2 make: *** [Makefile:248: __sub-make] Error 2
It should be noticed that:
1. after this change, sphinx-pre-install needs to be called by hand:
$ /usr/bin/python3.11 tools/docs/sphinx-pre-install Detected OS: openSUSE Leap 15.6. Sphinx version: 7.2.6
All optional dependencies are met. Needed package dependencies are met.
2. sphinx-build-wrapper will auto-detect python3.11 and suggest a way to build the docs using the parameters passed via make variables. In this specific example:
/usr/bin/python3.11 tools/docs/sphinx-build-wrapper htmldocs --sphinxdirs=. --conf=conf.py --theme= --css= --paper=
3. As this needs to be executed outside docs Makefile, it won't run the validation check scripts nor build Rust documentation if enabled, as the extra scripts are part of the docs Makefile.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Message-ID: <0635c311295300e9fb48c0ea607e2408910036e3.1758196090.git.mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
show more ...
|
| #
82c294d4 |
| 18-Sep-2025 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
tools/docs,scripts: sphinx-*: prevent sphinx-build crashes
On a properly set system, LANG and LC_ALL is always defined. However, some distros like Debian, Gentoo and their variants start with those
tools/docs,scripts: sphinx-*: prevent sphinx-build crashes
On a properly set system, LANG and LC_ALL is always defined. However, some distros like Debian, Gentoo and their variants start with those undefioned.
When Sphinx tries to set a locale with:
locale.setlocale(locale.LC_ALL, '')
It raises an exception, making Sphinx fail. This is more likely to happen with test containers.
Add a logic to detect and workaround such issue by setting locale to C.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Message-ID: <1d0afad8fe3d83182be3a08eb00dd71322e23e69.1758196090.git.mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
show more ...
|
| #
adf9dc25 |
| 18-Sep-2025 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
tools/docs: python_version: move version check from sphinx-pre-install
The sphinx-pre-install code has some logic to deal with Python version, which ensures that a minimal version will be enforced f
tools/docs: python_version: move version check from sphinx-pre-install
The sphinx-pre-install code has some logic to deal with Python version, which ensures that a minimal version will be enforced for documentation build logic.
Move it to a separate library to allow re-using its code.
No functional changes.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Message-ID: <d134ace64b55c827565ce68f0527e20c735f0d2e.1758196090.git.mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
show more ...
|
| #
3f835cb1 |
| 18-Sep-2025 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
tools/docs: sphinx-pre-install: allow check for alternatives and bail out
The caller script may not want an automatic execution of the new version. Add two parameters to allow showing alternatives a
tools/docs: sphinx-pre-install: allow check for alternatives and bail out
The caller script may not want an automatic execution of the new version. Add two parameters to allow showing alternatives and to bail out if version is incompatible.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Message-ID: <19777bc710bf901ffbb0ad0f1bb57b18fc01b163.1758196090.git.mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
show more ...
|
| #
4880eac5 |
| 18-Sep-2025 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
tools/docs: sphinx-pre-install: drop a debug print
The version print at the lib was added for debugging purposes. Get rid of it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Mes
tools/docs: sphinx-pre-install: drop a debug print
The version print at the lib was added for debugging purposes. Get rid of it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Message-ID: <27f76a4df2b80c38d277d58a92c85c614544e013.1758196090.git.mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
show more ...
|
| #
abd61d1f |
| 18-Sep-2025 |
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> |
scripts: sphinx-pre-install: move it to tools/docs
As we're reorganizing the place where doc scripts are located, move this one to tools/docs.
No functional changes.
Signed-off-by: Mauro Carvalho
scripts: sphinx-pre-install: move it to tools/docs
As we're reorganizing the place where doc scripts are located, move this one to tools/docs.
No functional changes.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Message-ID: <5e2c40d3aebfd67b7ac7817f548bd1fa4ff661a8.1758196090.git.mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
show more ...
|