diff mbox series

[1/8] conf.py: define new {oecore,bitbake,meta_yocto}_rev roles

Message ID 20260302-release-notes-6-0-v1-1-9662dee58591@bootlin.com
State Accepted
Headers show
Series Update the documentation for 6.0 (Wrynose) | expand

Commit Message

Antonin Godard March 2, 2026, 9:37 a.m. UTC
Use the extlinks extension to create new roles to quickly reference a
commit from openembedded-core, bitbake, or meta-yocto.

For example, use as: :oecore_rev:`437e0419608e`.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 documentation/conf.py | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

Comments

Quentin Schulz March 5, 2026, 10:56 a.m. UTC | #1
Hi Antonin,

On 3/2/26 10:37 AM, Antonin Godard via lists.yoctoproject.org wrote:
> Use the extlinks extension to create new roles to quickly reference a
> commit from openembedded-core, bitbake, or meta-yocto.
> 
> For example, use as: :oecore_rev:`437e0419608e`.
> 
> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
> ---
>   documentation/conf.py | 16 +++++++++++++---
>   1 file changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/documentation/conf.py b/documentation/conf.py
> index 5a69977cf..f3234b241 100644
> --- a/documentation/conf.py
> +++ b/documentation/conf.py
> @@ -91,9 +91,17 @@ rst_prolog = """
>   .. |author| replace:: %s
>   """ % (project, copyright, author)
>   
> +# base url definitions
> +oe_git_baseurl = "https://git.openembedded.org/"
> +oecore_git_baseurl = f"{oe_git_baseurl}/openembedded-core"
> +bitbake_git_baseurl = f"{oe_git_baseurl}/bitbake"
> +yocto_git_baseurl = "https://git.openembedded.org/"

Well, thanks to my company's wonderful mail server this is broken but... 
this should be git.yoctoproject.org and not git.openembedded.org.

> +meta_yocto_baseurl = f"{yocto_git_baseurl}/meta-yocto"
> +

Small nitpick here, I think we should make it easier to distinguish the 
server URLs from the repo URLs.

What about something like

oe_git_server = "https://git.openembedded.org/"
oecore_git_baseurl = f"{oe_git_server}/openembedded-core"

for example?

Not sure we need _baseurl, it's kinda implied if we have oecore_git?

Cheers,
Quentin
Antonin Godard March 5, 2026, 3:15 p.m. UTC | #2
Hi,

On Thu Mar 5, 2026 at 11:56 AM CET, Quentin Schulz wrote:
> Hi Antonin,
>
> On 3/2/26 10:37 AM, Antonin Godard via lists.yoctoproject.org wrote:
>> Use the extlinks extension to create new roles to quickly reference a
>> commit from openembedded-core, bitbake, or meta-yocto.
>> 
>> For example, use as: :oecore_rev:`437e0419608e`.
>> 
>> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
>> ---
>>   documentation/conf.py | 16 +++++++++++++---
>>   1 file changed, 13 insertions(+), 3 deletions(-)
>> 
>> diff --git a/documentation/conf.py b/documentation/conf.py
>> index 5a69977cf..f3234b241 100644
>> --- a/documentation/conf.py
>> +++ b/documentation/conf.py
>> @@ -91,9 +91,17 @@ rst_prolog = """
>>   .. |author| replace:: %s
>>   """ % (project, copyright, author)
>>   
>> +# base url definitions
>> +oe_git_baseurl = "https://git.openembedded.org/"
>> +oecore_git_baseurl = f"{oe_git_baseurl}/openembedded-core"
>> +bitbake_git_baseurl = f"{oe_git_baseurl}/bitbake"
>> +yocto_git_baseurl = "https://git.openembedded.org/"
>
> Well, thanks to my company's wonderful mail server this is broken but... 
> this should be git.yoctoproject.org and not git.openembedded.org.

Darn, thanks for spotting that.

>> +meta_yocto_baseurl = f"{yocto_git_baseurl}/meta-yocto"
>> +
>
> Small nitpick here, I think we should make it easier to distinguish the 
> server URLs from the repo URLs.
>
> What about something like
>
> oe_git_server = "https://git.openembedded.org/"
> oecore_git_baseurl = f"{oe_git_server}/openembedded-core"
>
> for example?
>
> Not sure we need _baseurl, it's kinda implied if we have oecore_git?

I'll take your suggestion, thanks!

Antonin
diff mbox series

Patch

diff --git a/documentation/conf.py b/documentation/conf.py
index 5a69977cf..f3234b241 100644
--- a/documentation/conf.py
+++ b/documentation/conf.py
@@ -91,9 +91,17 @@  rst_prolog = """
 .. |author| replace:: %s
 """ % (project, copyright, author)
 
+# base url definitions
+oe_git_baseurl = "https://git.openembedded.org"
+oecore_git_baseurl = f"{oe_git_baseurl}/openembedded-core"
+bitbake_git_baseurl = f"{oe_git_baseurl}/bitbake"
+yocto_git_baseurl = "https://git.openembedded.org"
+meta_yocto_baseurl = f"{yocto_git_baseurl}/meta-yocto"
+
 # external links and substitutions
 extlinks = {
-    'bitbake_git': ('https://git.openembedded.org/bitbake%s', None),
+    'bitbake_git': (f'{bitbake_git_baseurl}%s', None),
+    'bitbake_rev': (f'{bitbake_git_baseurl}/commit/?id=%s', '%s'),
     'cve_mitre': ('https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-%s', 'CVE-%s'),
     'cve_nist': ('https://nvd.nist.gov/vuln/detail/CVE-%s', 'CVE-%s'),
     'yocto_home': ('https://www.yoctoproject.org%s', None),
@@ -103,11 +111,13 @@  extlinks = {
     'yocto_bugs': ('https://bugzilla.yoctoproject.org%s', None),
     'yocto_ab': ('https://autobuilder.yoctoproject.org%s', None),
     'yocto_docs': ('https://docs.yoctoproject.org%s', None),
-    'yocto_git': ('https://git.yoctoproject.org%s', None),
+    'yocto_git': (f'{yocto_git_baseurl}%s', None),
+    'meta_yocto_rev': (f'{meta_yocto_baseurl}/commit/?id=%s', '%s'),
     'yocto_sstate': ('http://sstate.yoctoproject.org%s', None),
     'oe_home': ('https://www.openembedded.org%s', None),
     'oe_lists': ('https://lists.openembedded.org%s', None),
-    'oe_git': ('https://git.openembedded.org%s', None),
+    'oe_git': (f'{oe_git_baseurl}%s', None),
+    'oecore_rev': (f'{oecore_git_baseurl}/commit/?id=%s', '%s'),
     'oe_wiki': ('https://www.openembedded.org/wiki%s', None),
     'oe_layerindex': ('https://layers.openembedded.org%s', None),
     'oe_layer': ('https://layers.openembedded.org/layerindex/branch/master/layer%s', None),