diff mbox series

dev-manual, CH 5: grammar fixes and update recipes

Message ID 23ac0815-60ab-fef4-533b-920e61f5d38b@crashcourse.ca
State New
Headers show
Series dev-manual, CH 5: grammar fixes and update recipes | expand

Commit Message

Robert P. J. Day June 20, 2025, 7:09 p.m. UTC
Major updates:

  - update strace recipe version
  - replace git example with gnuplot, which actually has two
    SRC_URI values that need naming

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

Comments

Quentin Schulz June 23, 2025, 1:18 p.m. UTC | #1
Hi Robert,

On 6/20/25 9:09 PM, Robert P. J. Day via lists.yoctoproject.org wrote:
> 
> Major updates:
> 
>    - update strace recipe version
>    - replace git example with gnuplot, which actually has two
>      SRC_URI values that need naming

But is part of meta-openembedded. Can we use an example from oe-core maybe?

Looks ok to me otherwise,
Thanks!
Quentin
Robert P. J. Day June 23, 2025, 1:40 p.m. UTC | #2
On Mon, 23 Jun 2025, Quentin Schulz wrote:

> Hi Robert,
>
> On 6/20/25 9:09 PM, Robert P. J. Day via lists.yoctoproject.org wrote:
> >
> > Major updates:
> >
> >    - update strace recipe version
> >    - replace git example with gnuplot, which actually has two
> >      SRC_URI values that need naming
>
> But is part of meta-openembedded. Can we use an example from oe-core maybe?

  i could probably find a suitable one under oe-core, but what is with
the numerous examples of:

  SRC_URI[archive.sha256sum] = "...."

that i see. is there something magic about the name "archive" that is
not explained in the docs, especially when no SRC_URI value uses the
label "archive"?

rday
Robert P. J. Day June 23, 2025, 1:43 p.m. UTC | #3
On Mon, 23 Jun 2025, Robert P. J. Day wrote:

> On Mon, 23 Jun 2025, Quentin Schulz wrote:
>
> > Hi Robert,
> >
> > On 6/20/25 9:09 PM, Robert P. J. Day via lists.yoctoproject.org wrote:
> > >
> > > Major updates:
> > >
> > >    - update strace recipe version
> > >    - replace git example with gnuplot, which actually has two
> > >      SRC_URI values that need naming
> >
> > But is part of meta-openembedded. Can we use an example from oe-core maybe?
>
>   i could probably find a suitable one under oe-core, but what is with
> the numerous examples of:
>
>   SRC_URI[archive.sha256sum] = "...."
>
> that i see. is there something magic about the name "archive" that is
> not explained in the docs, especially when no SRC_URI value uses the
> label "archive"?

  never mind, just saw it's set when inheriting gnomebase.

rday
Robert P. J. Day June 23, 2025, 3:44 p.m. UTC | #4
On Mon, 23 Jun 2025, Quentin Schulz wrote:

> Hi Robert,
>
> On 6/20/25 9:09 PM, Robert P. J. Day via lists.yoctoproject.org wrote:
> >
> > Major updates:
> >
> >    - update strace recipe version
> >    - replace git example with gnuplot, which actually has two
> >      SRC_URI values that need naming
>
> But is part of meta-openembedded. Can we use an example from oe-core maybe?
>
> Looks ok to me otherwise,
> Thanks!
> Quentin

  i think i'll break this into two independent patches, make it easier
to address the "name=" fixup.

rday
diff mbox series

Patch

diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst
index c49881efe..8e071c4d4 100644
--- a/documentation/dev-manual/new-recipe.rst
+++ b/documentation/dev-manual/new-recipe.rst
@@ -276,11 +276,11 @@  upgrading the recipe to a future version is as simple as renaming the
 recipe to match the new version.

 Here is a simple example from the
-``meta/recipes-devtools/strace/strace_5.5.bb`` recipe where the source
+``meta/recipes-devtools/strace/strace_6.15.bb`` recipe where the source
 comes from a single tarball. Notice the use of the
 :term:`PV` variable::

-   SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
+   SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/strace-${PV}.tar.xz \

 Files mentioned in :term:`SRC_URI` whose names end in a typical archive
 extension (e.g. ``.tar``, ``.tar.gz``, ``.tar.bz2``, ``.zip``, and so
@@ -304,27 +304,31 @@  fetched from a remote server other than a version control system,
 BitBake attempts to verify the files against checksums defined in your
 recipe to ensure they have not been tampered with or otherwise modified
 since the recipe was written. Multiple checksums are supported:
-``SRC_URI[md5sum]``, ``SRC_URI[sha1sum]``, ``SRC_URI[sha256sum]``.
+``SRC_URI[md5sum]``, ``SRC_URI[sha1sum]``, ``SRC_URI[sha256sum]``,
 ``SRC_URI[sha384sum]`` and ``SRC_URI[sha512sum]``, but only
 ``SRC_URI[sha256sum]`` is commonly used.

 .. note::

-   ``SRC_URI[md5sum]`` used to also be commonly used, but it is deprecated
-   and should be replaced by ``SRC_URI[sha256sum]`` when updating existing
+   ``SRC_URI[md5sum]`` used to be common, but is now deprecated
+   in favour of ``SRC_URI[sha256sum]`` when updating existing
    recipes.

 If your :term:`SRC_URI` variable points to more than a single URL (excluding
 SCM URLs), you need to provide the ``sha256`` checksum for each URL. For these
 cases, you provide a name for each URL as part of the :term:`SRC_URI` and then
 reference that name in the subsequent checksum statements. Here is an example
-combining lines from the files ``git.inc`` and ``git_2.24.1.bb``::
+from the recipe file ``gnuplot_5.4.3.bb``, which has two ``SRC_URI`` values that
+require naming::

-   SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
-              ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages"
+   SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BP}.tar.gz;name=archive \
+              http://www.mneuroth.de/privat/zaurus/qtplot-0.2.tar.gz;name=qtplot \
+              file://gnuplot.desktop \
+              file://gnuplot.png \
+              "

-   SRC_URI[tarball.sha256sum] = "ad5334956301c86841eb1e5b1bb20884a6bad89a10a6762c958220c7cf64da02"
-   SRC_URI[manpages.sha256sum] = "9a7ae3a093bea39770eb96ca3e5b40bff7af0b9f6123f089d7821d0e5b8e1230"
+   SRC_URI[archive.sha256sum] = "51f89bbab90f96d3543f95235368d188eb1e26eda296912256abcd3535bd4d84"
+   SRC_URI[qtplot.sha256sum] = "6df317183ff62cc82f3dcf88207a267cd6478cb5147f55d7530c94f1ad5f4132"

 The proper value for the ``sha256`` checksum might be available together
 with other signatures on the download page for the upstream source (e.g.