Skip to contentSkip to conversation

Revert "docs: conf.py: fix cve extlinks caption for sphinx <4.0"

PATCH In review [email protected] 2 participants 3 messages Jun 10, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "docs: conf.py: fix cve extlinks caption for sphinx <4.0"

From: Michael Opdenacker <[email protected]>

This reverts commit c9922076f5c1285d9cfd6aff8ce5b6635d88222f, and allows to avoid this new warning which appears with Sphinx 5.0.1:

WARNING: extlinks: Sphinx-6.0 will require a caption string to contain exactly one '%s' and all other '%' need to be escaped as '%%'.

---
 documentation/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
documentation/conf.py +1 -1
index baf550e3e3..5a3ec58bc2 100644
@@ -90,7 +90,7 @@ rst_prolog = """
 
 # external links and substitutions
 extlinks = {
-    'cve': ('https://nvd.nist.gov/vuln/detail/CVE-%s', 'CVE-'),
+    'cve': ('https://nvd.nist.gov/vuln/detail/CVE-%s', 'CVE-%s'),
     'yocto_home': ('https://www.yoctoproject.org%s', None),
     'yocto_wiki': ('https://wiki.yoctoproject.org/wiki%s', None),
     'yocto_dl': ('https://downloads.yoctoproject.org%s', None),
Signature · 1 line
2.34.1
#1 lore raw

Hi Michael,

Quoted 6 lines · Michael Opdenacker via lists.yoctoproject.org

From: Michael Opdenacker <[email protected]>

This reverts commit c9922076f5c1285d9cfd6aff8ce5b6635d88222f, and allows to avoid this new warning which appears with Sphinx 5.0.1:

WARNING: extlinks: Sphinx-6.0 will require a caption string to contain exactly one '%s' and all other '%' need to be escaped as '%%'.

Missing SoB.

In any case, NACK until we use a newer Sphinx for building the docs with the autobuilder (currently 3.2.1) otherwise we get CVE-%s-<CVE_ID> instead of CVE-<CVE_ID>.

We'd need a patch that bumps the minimum version of Sphinx to build the docs (in conf.py, needs_sphinx), revert the patch and use a new docs_buildtools in the autobuilder. Without this you're just fixing your a build issue on your local PC and failing the autobuilder.

We do not have a "stable" release available yet on https://autobuilder.yocto.io/pub/buildtools/ so we'd need to create one. I know Richard made an attempt a few months ago when we added Sphinx recipe inside poky (specifically for creating the docs buildtools).

Nothing impossible, but, today, this patch is doing more harm than good.

Cheers,
Quentin

#2 lore raw
Quoted 12 lines · Quentin Schulz

Hi Michael,

Quoted 6 lines · Michael Opdenacker via lists.yoctoproject.org

From: Michael Opdenacker <[email protected]>

This reverts commit c9922076f5c1285d9cfd6aff8ce5b6635d88222f, and allows to avoid this new warning which appears with Sphinx 5.0.1:

WARNING: extlinks: Sphinx-6.0 will require a caption string to contain exactly one '%s' and all other '%' need to be escaped as '%%'.

Missing SoB.

Quoted 7 lines

In any case, NACK until we use a newer Sphinx for building the docs with the autobuilder (currently 3.2.1) otherwise we get CVE-%s-<CVE_ID> instead of CVE-<CVE_ID>.

We'd need a patch that bumps the minimum version of Sphinx to build the docs (in conf.py, needs_sphinx), revert the patch and use a new docs_buildtools in the autobuilder. Without this you're just fixing your a build issue on your local PC and failing the autobuilder.

We do not have a "stable" release available yet on https://autobuilder.yocto.io/pub/buildtools/ so we'd need to create one. I know Richard made an attempt a few months ago when we added Sphinx recipe inside poky (specifically for creating the docs buildtools).

Nothing impossible, but, today, this patch is doing more harm than good.

Understood, thanks!
Then, I'll disable the turning of warnings into errors on my PC, waiting for an upgrade to Sphinx. Thanks for the quick reply!

I'll file a new bug to keep track of this.

Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com