[PATCH v2 00/10] Collect documentation-related tools under /tools/docs

Jonathan Corbet posted 10 patches 3 months, 2 weeks ago
There is a newer version of this series
Documentation/Kconfig                         |    2 +-
Documentation/Makefile                        |    8 +-
Documentation/conf.py                         |    2 +-
Documentation/doc-guide/checktransupdate.rst  |    6 +-
Documentation/doc-guide/contributing.rst      |    2 +-
Documentation/doc-guide/kernel-doc.rst        |   18 +-
Documentation/doc-guide/sphinx.rst            |    2 +-
Documentation/kbuild/kbuild.rst               |    2 +-
Documentation/process/coding-style.rst        |    2 +-
Documentation/sphinx/kernel_abi.py            |    2 +-
Documentation/sphinx/kernel_feat.py           |    4 +-
.../it_IT/doc-guide/kernel-doc.rst            |    8 +-
.../sp_SP/process/coding-style.rst            |    2 +-
.../zh_CN/doc-guide/checktransupdate.rst      |    6 +-
.../zh_CN/doc-guide/contributing.rst          |    2 +-
.../zh_CN/doc-guide/kernel-doc.rst            |   16 +-
Documentation/translations/zh_CN/how-to.rst   |    2 +-
.../translations/zh_CN/kbuild/kbuild.rst      |    2 +-
.../zh_CN/process/coding-style.rst            |    2 +-
.../zh_TW/process/coding-style.rst            |    2 +-
MAINTAINERS                                   |    8 +-
Makefile                                      |    2 +-
drivers/gpu/drm/i915/Makefile                 |    2 +-
scripts/kernel-doc                            |    1 -
scripts/kernel-doc.pl                         | 2439 -----------------
scripts/sphinx-pre-install                    |    2 +-
.../docs}/check-variable-fonts.sh             |    2 +-
{scripts => tools/docs}/checktransupdate.py   |    8 +-
.../docs}/documentation-file-ref-check        |    2 +-
.../docs}/features-refresh.sh                 |    0
{scripts => tools/docs}/find-unused-docs.sh   |    8 +-
{scripts => tools/docs}/get_abi.py            |    0
{scripts => tools/docs}/get_feat.pl           |    2 +-
.../kernel-doc.py => tools/docs/kernel-doc    |    0
.../features => tools/docs}/list-arch.sh      |    2 +-
{scripts => tools/docs}/split-man.pl          |    0
{scripts => tools/docs}/test_doc_build.py     |    0
37 files changed, 63 insertions(+), 2507 deletions(-)
delete mode 120000 scripts/kernel-doc
delete mode 100755 scripts/kernel-doc.pl
rename {scripts => tools/docs}/check-variable-fonts.sh (98%)
rename {scripts => tools/docs}/checktransupdate.py (97%)
rename {scripts => tools/docs}/documentation-file-ref-check (99%)
rename {Documentation/features/scripts => tools/docs}/features-refresh.sh (100%)
rename {scripts => tools/docs}/find-unused-docs.sh (79%)
rename {scripts => tools/docs}/get_abi.py (100%)
rename {scripts => tools/docs}/get_feat.pl (99%)
rename scripts/kernel-doc.py => tools/docs/kernel-doc (100%)
rename {Documentation/features => tools/docs}/list-arch.sh (83%)
rename {scripts => tools/docs}/split-man.pl (100%)
rename {scripts => tools/docs}/test_doc_build.py (100%)
[PATCH v2 00/10] Collect documentation-related tools under /tools/docs
Posted by Jonathan Corbet 3 months, 2 weeks ago
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.

Recently, the idea of creating a dedicated directory for documentation tools
came up; I decided to see what it would look like.  This series creates a
new directory, tools/docs, and moves various utilities there, hopefully
fixing up all of the relevant references in the process.

At the end, rather than move the old, Perl kernel-doc, I simply removed it.

The big elephant lurking in this small room is the home for Python modules;
I left them under scripts/lib, but that is an even less appropriate place
than it was before.  I would propose either tools/python or lib/python;
thoughts on that matter welcome.

Changes in v2:
  - Rebase on top of all of Mauro's changes (the most painful rebase I've
    ever done, I think).
  - Land everything in /tools/docs/ rather than /tools/doc/

v1: https://lore.kernel.org/lkml/20250813213218.198582-1-corbet@lwn.net/

Jonathan Corbet (10):
  docs: Move the "features" tools to tools/docs
  docs: move checktransupdate.py to tools/docs
  docs: move scripts/check-variable-fonts.sh to tools/docs
  docs: move scripts/documentation-file-ref-check to tools/docs
  docs: move get_abi.py to tools/docs
  docs: move test_doc_build.py to tools/docs
  docs: move kernel-doc to tools/docs
  docs: move split-man.pl to tools/docs
  docs: move find-unused-docs.sh to tools/docs
  docs: remove kernel-doc.pl

 Documentation/Kconfig                         |    2 +-
 Documentation/Makefile                        |    8 +-
 Documentation/conf.py                         |    2 +-
 Documentation/doc-guide/checktransupdate.rst  |    6 +-
 Documentation/doc-guide/contributing.rst      |    2 +-
 Documentation/doc-guide/kernel-doc.rst        |   18 +-
 Documentation/doc-guide/sphinx.rst            |    2 +-
 Documentation/kbuild/kbuild.rst               |    2 +-
 Documentation/process/coding-style.rst        |    2 +-
 Documentation/sphinx/kernel_abi.py            |    2 +-
 Documentation/sphinx/kernel_feat.py           |    4 +-
 .../it_IT/doc-guide/kernel-doc.rst            |    8 +-
 .../sp_SP/process/coding-style.rst            |    2 +-
 .../zh_CN/doc-guide/checktransupdate.rst      |    6 +-
 .../zh_CN/doc-guide/contributing.rst          |    2 +-
 .../zh_CN/doc-guide/kernel-doc.rst            |   16 +-
 Documentation/translations/zh_CN/how-to.rst   |    2 +-
 .../translations/zh_CN/kbuild/kbuild.rst      |    2 +-
 .../zh_CN/process/coding-style.rst            |    2 +-
 .../zh_TW/process/coding-style.rst            |    2 +-
 MAINTAINERS                                   |    8 +-
 Makefile                                      |    2 +-
 drivers/gpu/drm/i915/Makefile                 |    2 +-
 scripts/kernel-doc                            |    1 -
 scripts/kernel-doc.pl                         | 2439 -----------------
 scripts/sphinx-pre-install                    |    2 +-
 .../docs}/check-variable-fonts.sh             |    2 +-
 {scripts => tools/docs}/checktransupdate.py   |    8 +-
 .../docs}/documentation-file-ref-check        |    2 +-
 .../docs}/features-refresh.sh                 |    0
 {scripts => tools/docs}/find-unused-docs.sh   |    8 +-
 {scripts => tools/docs}/get_abi.py            |    0
 {scripts => tools/docs}/get_feat.pl           |    2 +-
 .../kernel-doc.py => tools/docs/kernel-doc    |    0
 .../features => tools/docs}/list-arch.sh      |    2 +-
 {scripts => tools/docs}/split-man.pl          |    0
 {scripts => tools/docs}/test_doc_build.py     |    0
 37 files changed, 63 insertions(+), 2507 deletions(-)
 delete mode 120000 scripts/kernel-doc
 delete mode 100755 scripts/kernel-doc.pl
 rename {scripts => tools/docs}/check-variable-fonts.sh (98%)
 rename {scripts => tools/docs}/checktransupdate.py (97%)
 rename {scripts => tools/docs}/documentation-file-ref-check (99%)
 rename {Documentation/features/scripts => tools/docs}/features-refresh.sh (100%)
 rename {scripts => tools/docs}/find-unused-docs.sh (79%)
 rename {scripts => tools/docs}/get_abi.py (100%)
 rename {scripts => tools/docs}/get_feat.pl (99%)
 rename scripts/kernel-doc.py => tools/docs/kernel-doc (100%)
 rename {Documentation/features => tools/docs}/list-arch.sh (83%)
 rename {scripts => tools/docs}/split-man.pl (100%)
 rename {scripts => tools/docs}/test_doc_build.py (100%)

-- 
2.51.0
Re: [PATCH v2 00/10] Collect documentation-related tools under /tools/docs
Posted by Mauro Carvalho Chehab 3 months, 2 weeks ago
Em Thu, 23 Oct 2025 10:10:08 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:

> 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.
> 
> Recently, the idea of creating a dedicated directory for documentation tools
> came up; I decided to see what it would look like.  This series creates a
> new directory, tools/docs, and moves various utilities there, hopefully
> fixing up all of the relevant references in the process.
> 
> At the end, rather than move the old, Perl kernel-doc, I simply removed it.
> 
> The big elephant lurking in this small room is the home for Python modules;
> I left them under scripts/lib, but that is an even less appropriate place
> than it was before.  I would propose either tools/python or lib/python;
> thoughts on that matter welcome.

Hmm... What about tools/docs/python?

> 
> Changes in v2:
>   - Rebase on top of all of Mauro's changes (the most painful rebase I've
>     ever done, I think).

Sorry for that! Yeah, renaming patches are very hard to rebase. It is
usually better to have a renaming script and re-run it if changes get
merged.

>   - Land everything in /tools/docs/ rather than /tools/doc/
> 
> v1: https://lore.kernel.org/lkml/20250813213218.198582-1-corbet@lwn.net/
> 
> Jonathan Corbet (10):
>   docs: Move the "features" tools to tools/docs
>   docs: move checktransupdate.py to tools/docs
>   docs: move scripts/check-variable-fonts.sh to tools/docs
>   docs: move scripts/documentation-file-ref-check to tools/docs
>   docs: move get_abi.py to tools/docs
>   docs: move test_doc_build.py to tools/docs
>   docs: move kernel-doc to tools/docs
>   docs: move split-man.pl to tools/docs
>   docs: move find-unused-docs.sh to tools/docs
>   docs: remove kernel-doc.pl
> 
>  Documentation/Kconfig                         |    2 +-
>  Documentation/Makefile                        |    8 +-
>  Documentation/conf.py                         |    2 +-
>  Documentation/doc-guide/checktransupdate.rst  |    6 +-
>  Documentation/doc-guide/contributing.rst      |    2 +-
>  Documentation/doc-guide/kernel-doc.rst        |   18 +-
>  Documentation/doc-guide/sphinx.rst            |    2 +-
>  Documentation/kbuild/kbuild.rst               |    2 +-
>  Documentation/process/coding-style.rst        |    2 +-
>  Documentation/sphinx/kernel_abi.py            |    2 +-
>  Documentation/sphinx/kernel_feat.py           |    4 +-
>  .../it_IT/doc-guide/kernel-doc.rst            |    8 +-
>  .../sp_SP/process/coding-style.rst            |    2 +-
>  .../zh_CN/doc-guide/checktransupdate.rst      |    6 +-
>  .../zh_CN/doc-guide/contributing.rst          |    2 +-
>  .../zh_CN/doc-guide/kernel-doc.rst            |   16 +-
>  Documentation/translations/zh_CN/how-to.rst   |    2 +-
>  .../translations/zh_CN/kbuild/kbuild.rst      |    2 +-
>  .../zh_CN/process/coding-style.rst            |    2 +-
>  .../zh_TW/process/coding-style.rst            |    2 +-
>  MAINTAINERS                                   |    8 +-
>  Makefile                                      |    2 +-
>  drivers/gpu/drm/i915/Makefile                 |    2 +-
>  scripts/kernel-doc                            |    1 -
>  scripts/kernel-doc.pl                         | 2439 -----------------
>  scripts/sphinx-pre-install                    |    2 +-
>  .../docs}/check-variable-fonts.sh             |    2 +-
>  {scripts => tools/docs}/checktransupdate.py   |    8 +-
>  .../docs}/documentation-file-ref-check        |    2 +-
>  .../docs}/features-refresh.sh                 |    0
>  {scripts => tools/docs}/find-unused-docs.sh   |    8 +-
>  {scripts => tools/docs}/get_abi.py            |    0
>  {scripts => tools/docs}/get_feat.pl           |    2 +-
>  .../kernel-doc.py => tools/docs/kernel-doc    |    0
>  .../features => tools/docs}/list-arch.sh      |    2 +-
>  {scripts => tools/docs}/split-man.pl          |    0
>  {scripts => tools/docs}/test_doc_build.py     |    0
>  37 files changed, 63 insertions(+), 2507 deletions(-)
>  delete mode 120000 scripts/kernel-doc
>  delete mode 100755 scripts/kernel-doc.pl
>  rename {scripts => tools/docs}/check-variable-fonts.sh (98%)
>  rename {scripts => tools/docs}/checktransupdate.py (97%)
>  rename {scripts => tools/docs}/documentation-file-ref-check (99%)
>  rename {Documentation/features/scripts => tools/docs}/features-refresh.sh (100%)
>  rename {scripts => tools/docs}/find-unused-docs.sh (79%)
>  rename {scripts => tools/docs}/get_abi.py (100%)
>  rename {scripts => tools/docs}/get_feat.pl (99%)
>  rename scripts/kernel-doc.py => tools/docs/kernel-doc (100%)
>  rename {Documentation/features => tools/docs}/list-arch.sh (83%)
>  rename {scripts => tools/docs}/split-man.pl (100%)
>  rename {scripts => tools/docs}/test_doc_build.py (100%)

At the description you mentioned libs, but I'm not seeing anything
at the above diffstat showing such renames.
> 

Regards,
Mauro
Re: [PATCH v2 00/10] Collect documentation-related tools under /tools/docs
Posted by Jonathan Corbet 3 months, 2 weeks ago
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:

> At the description you mentioned libs, but I'm not seeing anything
> at the above diffstat showing such renames.

As I said... 

> The big elephant lurking in this small room is the home for Python modules;
> I left them under scripts/lib, but that is an even less appropriate place
> than it was before.

Leaving them in place tends to leave the diffstat relatively devoid of
renames... :)

New version coming shortly.

Thanks,

jon
Re: [PATCH v2 00/10] Collect documentation-related tools under /tools/docs
Posted by Mauro Carvalho Chehab 3 months, 2 weeks ago
Em Fri, 24 Oct 2025 09:37:14 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:

> Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:
> 
> > At the description you mentioned libs, but I'm not seeing anything
> > at the above diffstat showing such renames.  
> 
> As I said... 
> 
> > The big elephant lurking in this small room is the home for Python modules;
> > I left them under scripts/lib, but that is an even less appropriate place
> > than it was before.  
> 
> Leaving them in place tends to leave the diffstat relatively devoid of
> renames... :)
> 
> New version coming shortly.

OK!

Personally, I don't mind where they'll sit, but if you place them
outside tools/docs/lib, the best would be to move what's there
too.
> 
> Thanks,
> 
> jon
Re: [PATCH v2 00/10] Collect documentation-related tools under /tools/docs
Posted by Jani Nikula 3 months, 2 weeks ago
On Thu, 23 Oct 2025, Jonathan Corbet <corbet@lwn.net> wrote:
> 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.
>
> Recently, the idea of creating a dedicated directory for documentation tools
> came up; I decided to see what it would look like.  This series creates a
> new directory, tools/docs, and moves various utilities there, hopefully
> fixing up all of the relevant references in the process.
>
> At the end, rather than move the old, Perl kernel-doc, I simply removed it.

FWIW,

Acked-by: Jani Nikula <jani.nikula@intel.com>

> The big elephant lurking in this small room is the home for Python modules;
> I left them under scripts/lib, but that is an even less appropriate place
> than it was before.  I would propose either tools/python or lib/python;
> thoughts on that matter welcome.

I think lib is for kernel code, so lib/python seems out of place.

I don't think tools/python emphasizes lib enough, and gut feeling says
it'll end up containing random python tools, which I think is the wrong
way to organize things.

tools/lib/python?

In any case, I think either tools/python or tools/lib/python is better
than, say, tools/docs/lib, because the python libraries should be geared
at being more generally useful than just for docs.


BR,
Jani.


-- 
Jani Nikula, Intel