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

Message ID 20220610143401.2239827-1-michael.opdenacker@bootlin.com
State New
Headers show
Series Revert "docs: conf.py: fix cve extlinks caption for sphinx <4.0" | expand

Commit Message

Michael Opdenacker June 10, 2022, 2:34 p.m. UTC
From: Michael Opdenacker <michael.opdenacker@bootlin.com>

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(-)

Comments

Quentin Schulz June 10, 2022, 2:41 p.m. UTC | #1
Hi Michael,

On 6/10/22 16:34, Michael Opdenacker via lists.yoctoproject.org wrote:
> From: Michael Opdenacker <michael.opdenacker@bootlin.com>
> 
> 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
Michael Opdenacker June 10, 2022, 2:46 p.m. UTC | #2
On 6/10/22 16:41, Quentin Schulz wrote:
> Hi Michael,
>
> On 6/10/22 16:34, Michael Opdenacker via lists.yoctoproject.org wrote:
>> From: Michael Opdenacker <michael.opdenacker@bootlin.com>
>>
>> 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.


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.

Patch

diff --git a/documentation/conf.py b/documentation/conf.py
index baf550e3e3..5a3ec58bc2 100644
--- a/documentation/conf.py
+++ b/documentation/conf.py
@@ -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),