| 174dbf0d | 11-Feb-2025 |
Mauro Carvalho Chehab <[email protected]> |
docs: automarkup: drop legacy support
Python 2 is already EOL for quite some time. Drop support for it.
Also, the minimal Sphinx version is now 3.4.3. So, we can drop support for Sphinx < 3.
Signe
docs: automarkup: drop legacy support
Python 2 is already EOL for quite some time. Drop support for it.
Also, the minimal Sphinx version is now 3.4.3. So, we can drop support for Sphinx < 3.
Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/5cb57d158e42957d4bff06db38be141d849ac13b.1739254867.git.mchehab+huawei@kernel.org
show more ...
|
| 089e06c3 | 11-Feb-2025 |
Mauro Carvalho Chehab <[email protected]> |
scripts/kernel-doc: drop Sphinx version check
As the current minimal supported Sphinx version is 3.4.3, drop support for older versions.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.
scripts/kernel-doc: drop Sphinx version check
As the current minimal supported Sphinx version is 3.4.3, drop support for older versions.
Signed-off-by: Mauro Carvalho Chehab <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/0d002e7550476a68547ee53ad06cfd8fdcaf7c3a.1739254187.git.mchehab+huawei@kernel.org
show more ...
|
| 5ca0e7ff | 10-Feb-2025 |
Mauro Carvalho Chehab <[email protected]> |
docs: sphinx/kernel_abi: avoid warnings during Sphinx module init
Sphinx logging system doesn't like warnings during module load, as it understands that such logs are produced at the wrong time:
W
docs: sphinx/kernel_abi: avoid warnings during Sphinx module init
Sphinx logging system doesn't like warnings during module load, as it understands that such logs are produced at the wrong time:
WARNING: while setting up extension automarkup: /sys/devices/system/cpu/cpuX/topology/physical_package_id is defined 2 times: /new_devel/v4l/docs/Documentation/ABI/stable/sysfs-devices-system-cpu:27; /new_devel/v4l/docs/Documentation/ABI/testing/sysfs-devices-system-cpu:70 WARNING: while setting up extension automarkup: /sys/devices/system/cpu/cpuX/topology/ppin is defined 2 times: /new_devel/v4l/docs/Documentation/ABI/stable/sysfs-devices-system-cpu:89; /new_devel/v4l/docs/Documentation/ABI/testing/sysfs-devices-system-cpu:70
So, use a function to allocate/process ABI files and use it to be called at kernel_abi.py, as automarkup also needs it to produce the right cross-references.
Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/b0e79dc60d556e3b39fa6774d3b7bf734b73f352.1739182025.git.mchehab+huawei@kernel.org
show more ...
|
| c9408169 | 10-Feb-2025 |
Mauro Carvalho Chehab <[email protected]> |
docs: sphinx/automarkup: add cross-references for ABI
Now that all ABI files are handled together, we can add a feature at automarkup for it to generate cross-references for ABI symbols.
The cross-
docs: sphinx/automarkup: add cross-references for ABI
Now that all ABI files are handled together, we can add a feature at automarkup for it to generate cross-references for ABI symbols.
The cross-reference logic can produce references for all existing files, except for README (as this is not parsed).
For symbols, they need to be an exact match of what it is described at the docs, which is not always true due to wildcards.
If symbols at /sys /proc and /config are identical, a cross-reference will be used.
Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/0b97a51b68b1c20127ad4a6a55658557fe0848d0.1739182025.git.mchehab+huawei@kernel.org
show more ...
|
| 5d7871d7 | 10-Feb-2025 |
Mauro Carvalho Chehab <[email protected]> |
docs: sphinx/kernel_abi: parse ABI files only once
Right now, the logic parses ABI files on 4 steps, one for each directory. While this is fine in principle, by doing that, not all symbol cross-refe
docs: sphinx/kernel_abi: parse ABI files only once
Right now, the logic parses ABI files on 4 steps, one for each directory. While this is fine in principle, by doing that, not all symbol cross-references will be created.
Change the logic to do the parsing only once in order to get a global dictionary to be used when creating ABI cross-references.
Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/5205c53838b6ea25f4cdd4cc1e3d17c0141e75a6.1739182025.git.mchehab+huawei@kernel.org
show more ...
|
| cc93e482 | 10-Feb-2025 |
Mauro Carvalho Chehab <[email protected]> |
docs: sphinx/kernel_abi: properly split lines
Sphinx doesn't like to have lines split with str.split("\n").
Instead, it uses its own splitter, with handles line breaks the way Spinx expects. Not us
docs: sphinx/kernel_abi: properly split lines
Sphinx doesn't like to have lines split with str.split("\n").
Instead, it uses its own splitter, with handles line breaks the way Spinx expects. Not using it cause issues at the output files.
Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/d4ad5b977799616544376210364d5cec686119ef.1739182025.git.mchehab+huawei@kernel.org
show more ...
|
| aea5e52d | 10-Feb-2025 |
Mauro Carvalho Chehab <[email protected]> |
docs: sphinx/kernel_abi: reduce buffer usage for ABI messages
Instead of producing a big message with all ABI contents and then parse as a whole, simplify the code by handling each ABI symbol in sep
docs: sphinx/kernel_abi: reduce buffer usage for ABI messages
Instead of producing a big message with all ABI contents and then parse as a whole, simplify the code by handling each ABI symbol in separate. As an additional benefit, there's no need to place file/line nubers inlined at the data and use a regex to convert them.
Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/15be22955e3c6df49d7256c8fd24f62b397ad0ff.1739182025.git.mchehab+huawei@kernel.org
show more ...
|
| ee34f830 | 10-Feb-2025 |
Mauro Carvalho Chehab <[email protected]> |
docs: sphinx/kernel_abi: use AbiParser directly
Instead of running get_abi.py script, import AbiParser class and handle messages directly there using an interactor. This shold save some memory, as t
docs: sphinx/kernel_abi: use AbiParser directly
Instead of running get_abi.py script, import AbiParser class and handle messages directly there using an interactor. This shold save some memory, as there's no need to exec python inside the Sphinx python extension.
Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/8dbc244dcda97112c1b694e2512a5d600e62873b.1739182025.git.mchehab+huawei@kernel.org
show more ...
|
| b31274d5 | 01-Mar-2024 |
Lukas Bulwahn <[email protected]> |
docs: drop the version constraints for sphinx and dependencies
As discussed (see Links), there is some inertia to move to the recent Sphinx versions for the doc build environment.
As first step, dr
docs: drop the version constraints for sphinx and dependencies
As discussed (see Links), there is some inertia to move to the recent Sphinx versions for the doc build environment.
As first step, drop the version constraints and the related comments. As sphinx depends on jinja2, jinja2 is pulled in automatically. So drop that. Then, the sphinx-pre-install script will fail though with:
Can't get default sphinx version from ./Documentation/sphinx/requirements.txt at ./scripts/sphinx-pre-install line 305.
The script simply expects to parse a version constraint with Sphinx in the requirements.txt. That version is used in the script for suggesting the virtualenv directory name.
To suggest a virtualenv directory name, when there is no version given in the requirements.txt, one could try to guess the version that would be downloaded with 'pip install -r Documentation/sphinx/requirements.txt'. However, there seems no simple way to get that version without actually setting up the venv and running pip. So, instead, name the directory with the fixed name 'sphinx_latest'.
Finally update the Sphinx build documentation to reflect this directory name change.
Link: https://lore.kernel.org/linux-doc/[email protected]/ Link: https://lore.kernel.org/linux-doc/[email protected]/ Reviewed-by: Akira Yokosawa <[email protected]> Tested-by: Vegard Nossum <[email protected]> Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Message-ID: <[email protected]>
show more ...
|
| 0df46e09 | 01-Mar-2024 |
Akira Yokosawa <[email protected]> |
docs: kerneldoc-preamble.sty: Remove code for Sphinx <2.4
Now that Sphinx 2.4.4 or better is required, get rid of \providecommand{}'s for compatibility with Sphinx 1.7.9.
While at it, reword the co
docs: kerneldoc-preamble.sty: Remove code for Sphinx <2.4
Now that Sphinx 2.4.4 or better is required, get rid of \providecommand{}'s for compatibility with Sphinx 1.7.9.
While at it, reword the comment on \sphinxtableofcontentshook for better description of why it needs to be emptied.
Signed-off-by: Akira Yokosawa <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Message-ID: <[email protected]>
show more ...
|
| 983e20cf | 05-Feb-2024 |
Vegard Nossum <[email protected]> |
docs: kernel_feat.py: fix build error for missing files
If the directory passed to the '.. kernel-feat::' directive does not exist or the get_feat.pl script does not find any files to extract featur
docs: kernel_feat.py: fix build error for missing files
If the directory passed to the '.. kernel-feat::' directive does not exist or the get_feat.pl script does not find any files to extract features from, Sphinx will report the following error:
Sphinx parallel build error: UnboundLocalError: local variable 'fname' referenced before assignment make[2]: *** [Documentation/Makefile:102: htmldocs] Error 2
This is due to how I changed the script in c48a7c44a1d0 ("docs: kernel_feat.py: fix potential command injection"). Before that, the filename passed along to self.nestedParse() in this case was weirdly just the whole get_feat.pl invocation.
We can fix it by doing what kernel_abi.py does -- just pass self.arguments[0] as 'fname'.
Fixes: c48a7c44a1d0 ("docs: kernel_feat.py: fix potential command injection") Cc: Justin Forbes <[email protected]> Cc: Salvatore Bonaccorso <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: [email protected] Signed-off-by: Vegard Nossum <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Corbet <[email protected]>
show more ...
|
| b7b2ffc3 | 15-Feb-2024 |
Vegard Nossum <[email protected]> |
docs: translations: use attribute to store current language
Akira Yokosawa reported [1] that the "translations" extension we added in commit 7418ec5b151f ("docs: translations: add translations links
docs: translations: use attribute to store current language
Akira Yokosawa reported [1] that the "translations" extension we added in commit 7418ec5b151f ("docs: translations: add translations links when they exist") broke the build on Sphinx versions v6.1.3 through 7.1.2 (possibly others) with the following error:
Exception occurred: File "/usr/lib/python3.12/site-packages/sphinx/util/nodes.py", line 624, in _copy_except__document newnode = self.__class__(rawsource=self.rawsource, **self.attributes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: LanguagesNode.__init__() missing 1 required positional argument: 'current_language' The full traceback has been saved in /tmp/sphinx-err-7xmwytuu.log, if you want to report the issue to the developers.
Solve this problem by making 'current_language' a true element attribute of the LanguagesNode element, which is probably the more correct way to do it anyway.
Tested on Sphinx 2.x, 3.x, 6.x, and 7.x.
[1]: https://lore.kernel.org/all/[email protected]/
Fixes: 7418ec5b151f ("docs: translations: add translations links when they exist") Reported-by: Akira Yokosawa <[email protected]> Signed-off-by: Vegard Nossum <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Tested-by: Akira Yokosawa <[email protected]> # Sphinx 4.3.2, 5.3.0 and 6.2.1 Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
| c23de7ce | 05-Feb-2024 |
Vegard Nossum <[email protected]> |
docs: kernel_feat.py: fix build error for missing files
If the directory passed to the '.. kernel-feat::' directive does not exist or the get_feat.pl script does not find any files to extract featur
docs: kernel_feat.py: fix build error for missing files
If the directory passed to the '.. kernel-feat::' directive does not exist or the get_feat.pl script does not find any files to extract features from, Sphinx will report the following error:
Sphinx parallel build error: UnboundLocalError: local variable 'fname' referenced before assignment make[2]: *** [Documentation/Makefile:102: htmldocs] Error 2
This is due to how I changed the script in c48a7c44a1d0 ("docs: kernel_feat.py: fix potential command injection"). Before that, the filename passed along to self.nestedParse() in this case was weirdly just the whole get_feat.pl invocation.
We can fix it by doing what kernel_abi.py does -- just pass self.arguments[0] as 'fname'.
Fixes: c48a7c44a1d0 ("docs: kernel_feat.py: fix potential command injection") Cc: Justin Forbes <[email protected]> Cc: Salvatore Bonaccorso <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: [email protected] Signed-off-by: Vegard Nossum <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Corbet <[email protected]>
show more ...
|