bitbake-user-manual: add "crate" fetcher

Message ID 20220120105438.1212027-1-michael.opdenacker@bootlin.com
State New
Headers show
Series bitbake-user-manual: add "crate" fetcher | expand

Commit Message

Michael Opdenacker Jan. 20, 2022, 10:54 a.m. UTC
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
 ...itbake-user-manual-add-crate-fetcher.patch | 40 +++++++++++++++++++
 .../bitbake-user-manual-fetching.rst          | 16 ++++++++
 2 files changed, 56 insertions(+)
 create mode 100644 doc/0001-bitbake-user-manual-add-crate-fetcher.patch

Comments

Quentin Schulz Jan. 20, 2022, 1:55 p.m. UTC | #1
Hi Michael,

On 1/20/22 11:54, Michael Opdenacker wrote:
> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
> ---
>   ...itbake-user-manual-add-crate-fetcher.patch | 40 +++++++++++++++++++

This file shouldn't have made it to the patch :)

>   .../bitbake-user-manual-fetching.rst          | 16 ++++++++
>   2 files changed, 56 insertions(+)
>   create mode 100644 doc/0001-bitbake-user-manual-add-crate-fetcher.patch
> 
> diff --git a/doc/0001-bitbake-user-manual-add-crate-fetcher.patch b/doc/0001-bitbake-user-manual-add-crate-fetcher.patch
> new file mode 100644
> index 00000000..db26cd80
> --- /dev/null
> +++ b/doc/0001-bitbake-user-manual-add-crate-fetcher.patch
> @@ -0,0 +1,40 @@
> +From 9959a987ae3def8ea4fed41df4c890fb8856bae5 Mon Sep 17 00:00:00 2001
> +From: Michael Opdenacker <michael.opdenacker@bootlin.com>
> +Date: Thu, 20 Jan 2022 11:52:53 +0100
> +Subject: [PATCH] bitbake-user-manual: add "crate" fetcher
> +
> +Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
> +---
> + .../bitbake-user-manual-fetching.rst             | 16 ++++++++++++++++
> + 1 file changed, 16 insertions(+)
> +
> +diff --git a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> +index 77384cfd..4a18c076 100644
> +--- a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> ++++ b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> +@@ -688,6 +688,22 @@ Here is an example URL::
> +
> + It can also be used when setting mirrors definitions using the :term:`PREMIRRORS` variable.
> +
> ++Crate Fetcher (``crate://``)
> ++----------------------------
> ++
> ++This submodule fetches code for
> ++`Rust language "crates" <https://urldefense.proofpoint.com/v2/url?u=https-3A__doc.rust-2Dlang.org_reference_glossary.html-3Fhighlight-3Dcrate-23crate&d=DwIDAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=CHJ0aMuvquHpaEHy6W1mCt8cQmLCOjcbuG6o4kHVhcjP7jasS5ECYt9CRze7wfTx&s=voX-MQd60MDlvVkYFzAidn-531SxV5qD1XuuDN2gYvA&e= >`__
> ++corresponding to Rust libraries and programs to compile. Such crates are typically shared
> ++on https://urldefense.proofpoint.com/v2/url?u=https-3A__crates.io_&d=DwIDAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=CHJ0aMuvquHpaEHy6W1mCt8cQmLCOjcbuG6o4kHVhcjP7jasS5ECYt9CRze7wfTx&s=lJNZ5TpoVpkjKcSdv6agIg0u3XUw54RE0ELn_CF9nJo&e=  but this fetchers supports other servers too.

s/fetchers/fetcher/

Sorry for the rewritten URLs. I hate Microsoft.

> ++
> ++The format for the :term:`SRC_URI` setting must be::
> ++
> ++   SRC_URI = "crate://HOST/NAME/VERSION"
> ++

Nitpick: above you say "fetcher supports other servers" and here you 
mention "HOST", maybe we can write SERVER instead? or what is the proper 
rustlang term?

cheers,
quentin

> ++Here is an example URL::
> ++
> ++   SRC_URI = "crate://crates.io/glob/0.2.11"
> ++
> + Other Fetchers
> + --------------
> +
> +--
> +2.25.1
> +
> diff --git a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> index 77384cfd..2c15ad7d 100644
> --- a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> +++ b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> @@ -688,6 +688,22 @@ Here is an example URL::
>   
>   It can also be used when setting mirrors definitions using the :term:`PREMIRRORS` variable.
>   
> +Crate Fetcher (``crate://``)
> +----------------------------
> +
> +This submodule fetches code for
> +`Rust language "crates" <https://urldefense.proofpoint.com/v2/url?u=https-3A__doc.rust-2Dlang.org_reference_glossary.html-3Fhighlight-3Dcrate-23crate&d=DwIDAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=CHJ0aMuvquHpaEHy6W1mCt8cQmLCOjcbuG6o4kHVhcjP7jasS5ECYt9CRze7wfTx&s=voX-MQd60MDlvVkYFzAidn-531SxV5qD1XuuDN2gYvA&e= >`__
> +corresponding to Rust libraries and programs to compile. Such crates are typically shared
> +on https://urldefense.proofpoint.com/v2/url?u=https-3A__crates.io_&d=DwIDAg&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=CHJ0aMuvquHpaEHy6W1mCt8cQmLCOjcbuG6o4kHVhcjP7jasS5ECYt9CRze7wfTx&s=lJNZ5TpoVpkjKcSdv6agIg0u3XUw54RE0ELn_CF9nJo&e=  but this fetcher supports other servers too.
> +
> +The format for the :term:`SRC_URI` setting must be::
> +
> +   SRC_URI = "crate://HOST/NAME/VERSION"
> +
> +Here is an example URL::
> +
> +   SRC_URI = "crate://crates.io/glob/0.2.11"
> +
>   Other Fetchers
>   --------------
>   
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#13254): https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_bitbake-2Ddevel_message_13254&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=CHJ0aMuvquHpaEHy6W1mCt8cQmLCOjcbuG6o4kHVhcjP7jasS5ECYt9CRze7wfTx&s=EGmspyiMAZLNporqOaddHgukGUMVbXS71vTMcCEUpdU&e=
> Mute This Topic: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_mt_88556264_6293953&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=CHJ0aMuvquHpaEHy6W1mCt8cQmLCOjcbuG6o4kHVhcjP7jasS5ECYt9CRze7wfTx&s=Ar467842MtbGsDaRuAqMmf-B81guKIda34KjKtcmN24&e=
> Group Owner: bitbake-devel+owner@lists.openembedded.org
> Unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_bitbake-2Ddevel_unsub&d=DwIFaQ&c=_sEr5x9kUWhuk4_nFwjJtA&r=LYjLexDn7rXIzVmkNPvw5ymA1XTSqHGq8yBP6m6qZZ4njZguQhZhkI_-172IIy1t&m=CHJ0aMuvquHpaEHy6W1mCt8cQmLCOjcbuG6o4kHVhcjP7jasS5ECYt9CRze7wfTx&s=PDSdxeqqw5NYpwUkOLNQhWtEF6vUhltKgkv-DqtB3Rg&e=  [quentin.schulz@theobroma-systems.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Quentin Schulz Jan. 20, 2022, 3:47 p.m. UTC | #2
Hi Michael,

On 1/20/22 16:41, Michael Opdenacker wrote:
> Hi Quentin,
> 
> On 1/20/22 2:55 PM, Quentin Schulz wrote:
>> Hi Michael,
>>
>> On 1/20/22 11:54, Michael Opdenacker wrote:
>>> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
>>> ---
>>>    ...itbake-user-manual-add-crate-fetcher.patch | 40 +++++++++++++++++++
>>
>> This file shouldn't have made it to the patch :)
> 
> 
> Oops, I sent an incorrect patch file, indeed. My apologies!
> 
>>
>> s/fetchers/fetcher/
> 
> 
> Thanks. Actually, this would have already been fixed if I had used the
> correct version.
> 
>> Nitpick: above you say "fetcher supports other servers" and here you
>> mention "HOST", maybe we can write SERVER instead? or what is the
>> proper rustlang term?
> 
> Well, I followed the comments in the fetcher code. Not being able to
> find rustlang specifications about this, I propose to say "other server
> hosts" for a little more clarity.
> 

Seems like they call it "registry", c.f. 
https://doc.rust-lang.org/cargo/reference/registries.html#registries

I can suggest "other crate registries" and "crate://REGISTRY/NAME/..." ?

Cheers,
Quentin
Michael Opdenacker Jan. 20, 2022, 4:05 p.m. UTC | #3
Hi Quentin,

On 1/20/22 4:47 PM, Quentin Schulz wrote:
> Seems like they call it "registry", c.f.
> https://doc.rust-lang.org/cargo/reference/registries.html#registries
>
> I can suggest "other crate registries" and "crate://REGISTRY/NAME/..." ?


This definitely makes sense. Thank you with your much appreciated help!
Cheers
Michael.

Patch

diff --git a/doc/0001-bitbake-user-manual-add-crate-fetcher.patch b/doc/0001-bitbake-user-manual-add-crate-fetcher.patch
new file mode 100644
index 00000000..db26cd80
--- /dev/null
+++ b/doc/0001-bitbake-user-manual-add-crate-fetcher.patch
@@ -0,0 +1,40 @@ 
+From 9959a987ae3def8ea4fed41df4c890fb8856bae5 Mon Sep 17 00:00:00 2001
+From: Michael Opdenacker <michael.opdenacker@bootlin.com>
+Date: Thu, 20 Jan 2022 11:52:53 +0100
+Subject: [PATCH] bitbake-user-manual: add "crate" fetcher
+
+Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
+---
+ .../bitbake-user-manual-fetching.rst             | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
+index 77384cfd..4a18c076 100644
+--- a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
++++ b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
+@@ -688,6 +688,22 @@ Here is an example URL::
+ 
+ It can also be used when setting mirrors definitions using the :term:`PREMIRRORS` variable.
+ 
++Crate Fetcher (``crate://``)
++----------------------------
++
++This submodule fetches code for
++`Rust language "crates" <https://doc.rust-lang.org/reference/glossary.html?highlight=crate#crate>`__
++corresponding to Rust libraries and programs to compile. Such crates are typically shared
++on https://crates.io/ but this fetchers supports other servers too.
++
++The format for the :term:`SRC_URI` setting must be::
++
++   SRC_URI = "crate://HOST/NAME/VERSION"
++
++Here is an example URL::
++
++   SRC_URI = "crate://crates.io/glob/0.2.11"
++
+ Other Fetchers
+ --------------
+ 
+-- 
+2.25.1
+
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
index 77384cfd..2c15ad7d 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
@@ -688,6 +688,22 @@  Here is an example URL::
 
 It can also be used when setting mirrors definitions using the :term:`PREMIRRORS` variable.
 
+Crate Fetcher (``crate://``)
+----------------------------
+
+This submodule fetches code for
+`Rust language "crates" <https://doc.rust-lang.org/reference/glossary.html?highlight=crate#crate>`__
+corresponding to Rust libraries and programs to compile. Such crates are typically shared
+on https://crates.io/ but this fetcher supports other servers too.
+
+The format for the :term:`SRC_URI` setting must be::
+
+   SRC_URI = "crate://HOST/NAME/VERSION"
+
+Here is an example URL::
+
+   SRC_URI = "crate://crates.io/glob/0.2.11"
+
 Other Fetchers
 --------------