doc: bitbake-user-manual: specify the URL to be used with SSH over git is different from `git clone`'s

Message ID 20220117130816.104203-1-quentin.schulz@theobroma-systems.com
State New
Headers show
Series doc: bitbake-user-manual: specify the URL to be used with SSH over git is different from `git clone`'s | expand

Commit Message

Quentin Schulz Jan. 17, 2022, 1:08 p.m. UTC
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

The URL expected by git fetcher when the SSH protocol is used differs
from the one given by Git servers to be used with the `git clone`
command.

Add a note making this specificity known to users.

Cc: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 .../bitbake-user-manual-fetching.rst               | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Quentin Schulz Jan. 17, 2022, 3:04 p.m. UTC | #1
Hi all,

On 1/17/22 14:08, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> 
> The URL expected by git fetcher when the SSH protocol is used differs
> from the one given by Git servers to be used with the `git clone`
> command.
> 
> Add a note making this specificity known to users.
> 
> Cc: Quentin Schulz <foss+yocto@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ---
>   .../bitbake-user-manual-fetching.rst               | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
> 
> diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> index 0fc2d5e699..77384cfdc7 100644
> --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst

Forgot to make the patch from a subdir instead of poky root, lemme know 
if I need to resend a patch.

Cheers,
Quentin

> @@ -396,6 +396,19 @@ This fetcher supports the following parameters:
>      protocol is "file". You can also use "http", "https", "ssh" and
>      "rsync".
>   
> +   .. note::
> +
> +     When ``protocol`` is "ssh", the URL expected in :term:`SRC_URI` differs
> +     from the one that is typically passed to ``git clone`` command and provided
> +     by the Git server to fetch from. For example, the URL returned by GitLab
> +     server for ``mesa`` when cloning over SSH is
> +     ``git@gitlab.freedesktop.org:mesa/mesa.git``, however the expected URL in
> +     :term:`SRC_URI` is the following::
> +
> +       SRC_URI = "git://git@gitlab.freedesktop.org/mesa/mesa.git;protocol=ssh;..."
> +
> +     Note the ``:`` character changed for a ``/`` before the path to the project.
> +
>   -  *"nocheckout":* Tells the fetcher to not checkout source code when
>      unpacking when set to "1". Set this option for the URL where there is
>      a custom routine to checkout code. The default is "0".
> @@ -446,6 +459,7 @@ Here are some example URLs::
>   
>      SRC_URI = "git://git.oe.handhelds.org/git/vip.git;tag=version-1"
>      SRC_URI = "git://git.oe.handhelds.org/git/vip.git;protocol=http"
> +   SRC_URI = "git://git@gitlab.freedesktop.org/mesa/mesa.git;protocol=ssh;..."
>   
>   .. note::
>   
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#2416): https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_docs_message_2416&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=_l7-tAR3swWTH4C1S8UI63LA1SPlO2MekWnZZJITMwpYJava3108u83_dMFzD5LU&s=F_w0Ot9oRIjE4kXGRrG-cjdVPE5_S0uSmhOaV74rLKE&e=
> Mute This Topic: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_mt_88483091_6293953&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=_l7-tAR3swWTH4C1S8UI63LA1SPlO2MekWnZZJITMwpYJava3108u83_dMFzD5LU&s=-nz5CF1CFvGdLoLVQGx84M1Jev0zSa2FHRJ-xAWXncg&e=
> Group Owner: docs+owner@lists.yoctoproject.org
> Unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_docs_unsub&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=_l7-tAR3swWTH4C1S8UI63LA1SPlO2MekWnZZJITMwpYJava3108u83_dMFzD5LU&s=9I0R47Ub2WW27sRRxCqP65jf1LHTx4TU4dhRbBOu888&e=  [quentin.schulz@theobroma-systems.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Richard Purdie Jan. 17, 2022, 9:54 p.m. UTC | #2
On Mon, 2022-01-17 at 16:04 +0100, Quentin Schulz wrote:
> Hi all,
> 
> On 1/17/22 14:08, Quentin Schulz wrote:
> > From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> > 
> > The URL expected by git fetcher when the SSH protocol is used differs
> > from the one given by Git servers to be used with the `git clone`
> > command.
> > 
> > Add a note making this specificity known to users.
> > 
> > Cc: Quentin Schulz <foss+yocto@0leil.net>
> > Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> > ---
> >   .../bitbake-user-manual-fetching.rst               | 14 ++++++++++++++
> >   1 file changed, 14 insertions(+)
> > 
> > diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> > index 0fc2d5e699..77384cfdc7 100644
> > --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> > +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> 
> Forgot to make the patch from a subdir instead of poky root, lemme know 
> if I need to resend a patch.

I can handle that, merged, thanks.

Cheers,

Richard

Patch

diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
index 0fc2d5e699..77384cfdc7 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
@@ -396,6 +396,19 @@  This fetcher supports the following parameters:
    protocol is "file". You can also use "http", "https", "ssh" and
    "rsync".
 
+   .. note::
+
+     When ``protocol`` is "ssh", the URL expected in :term:`SRC_URI` differs
+     from the one that is typically passed to ``git clone`` command and provided
+     by the Git server to fetch from. For example, the URL returned by GitLab
+     server for ``mesa`` when cloning over SSH is
+     ``git@gitlab.freedesktop.org:mesa/mesa.git``, however the expected URL in
+     :term:`SRC_URI` is the following::
+
+       SRC_URI = "git://git@gitlab.freedesktop.org/mesa/mesa.git;protocol=ssh;..."
+
+     Note the ``:`` character changed for a ``/`` before the path to the project.
+
 -  *"nocheckout":* Tells the fetcher to not checkout source code when
    unpacking when set to "1". Set this option for the URL where there is
    a custom routine to checkout code. The default is "0".
@@ -446,6 +459,7 @@  Here are some example URLs::
 
    SRC_URI = "git://git.oe.handhelds.org/git/vip.git;tag=version-1"
    SRC_URI = "git://git.oe.handhelds.org/git/vip.git;protocol=http"
+   SRC_URI = "git://git@gitlab.freedesktop.org/mesa/mesa.git;protocol=ssh;..."
 
 .. note::