Skip to contentSkip to conversation

migration-guides: placeholder files for 5.1

PATCH In review [email protected] 2 participants 7 messages May 23, 2024 – May 24, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 migration-guides: placeholder files for 5.1

From: Michael Opdenacker <[email protected]>

---
 documentation/migration-guides/index.rst      |  1 +
 .../migration-guides/migration-5.1.rst        | 83 +++++++++++++++++++
 .../migration-guides/release-5.1.rst          |  9 ++
 .../migration-guides/release-notes-5.1.rst    | 67 +++++++++++++++
 4 files changed, 160 insertions(+)
 create mode 100644 documentation/migration-guides/migration-5.1.rst
 create mode 100644 documentation/migration-guides/release-5.1.rst
 create mode 100644 documentation/migration-guides/release-notes-5.1.rst
documentation/migration-guides/index.rst +1 -0
index d8edd05b89..e9d7f72809 100644
@@ -12,6 +12,7 @@ to move to one release of the Yocto Project from the previous one.
 .. toctree::
 
    migration-general
+   release-5.1
    release-5.0
    release-4.3
    release-4.2
documentation/migration-guides/migration-5.1.rst new file +83 -0

83 lines not on this page · raw message

documentation/migration-guides/release-5.1.rst new file +9 -0
new file mode 100644
index 0000000000..768edfa2b0
@@ -0,0 +1,9 @@
+.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
+
+Release 5.1 (styhead)
+=======================
+
+.. toctree::
+
+   migration-5.1
+   release-notes-5.1
documentation/migration-guides/release-notes-5.1.rst new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/3 ref-manual: introduce UNPACKDIR variable

From: Michael Opdenacker <[email protected]>

Note that this doesn't touch the "Source Fetching" section in overview-manual/concepts.rst yet, as the unpack implementation may not be finalized yet.

---
 documentation/ref-manual/tasks.rst     | 8 ++++----
 documentation/ref-manual/variables.rst | 5 +++++
 2 files changed, 9 insertions(+), 4 deletions(-)
documentation/ref-manual/tasks.rst +4 -4
index 2e4b23408d..70c0dea3bb 100644
@@ -412,12 +412,12 @@ them. You can learn more by looking at the
 -------------
 
 Unpacks the source code into a working directory pointed to by
-``${``\ :term:`WORKDIR`\ ``}``. The :term:`S`
-variable also plays a role in where unpacked source files ultimately
-reside. For more information on how source files are unpacked, see the
+``${``\ :term:`UNPACKDIR`\ ``}``. Another, legacy way to specify
+this directory is through the :term:`S` and :term:`WORKDIR` variables.
+For more information on how source files are unpacked, see the
 ":ref:`overview-manual/concepts:source fetching`"
 section in the Yocto Project Overview and Concepts Manual and also see
-the :term:`WORKDIR` and :term:`S` variable descriptions.
+the :term:`UNPACKDIR`, :term:`WORKDIR` and :term:`S` variable descriptions.
 
 Manually Called Tasks
 =====================
documentation/ref-manual/variables.rst +5 -0
index 546c674699..07b5b6f95c 100644
@@ -9698,6 +9698,11 @@ system and gives an overview of their function and contents.
       :ref:`ref-classes-insane` class and is only enabled if the
       recipe inherits the :ref:`ref-classes-autotools` class.
 
+   :term:`UNPACKDIR`
+      This variable, used by the :ref:`ref-classes-base` class,
+      specifies where fetches sources should be unpacked by the
+      :ref:`ref-tasks-unpack` task.
+
    :term:`UPDATERCPN`
       For recipes inheriting the
       :ref:`ref-classes-update-rc.d` class, :term:`UPDATERCPN`
Signature · 1 line
2.34.1
#2 lore raw

Re: [docs] [PATCH 2/3] ref-manual: introduce UNPACKDIR variable

Hi Michael,

Quoted 18 lines · Michael Opdenacker via lists.yoctoproject.org

From: Michael Opdenacker <[email protected]>

Note that this doesn't touch the "Source Fetching" section in overview-manual/concepts.rst yet, as the unpack implementation may not be finalized yet.

---
 documentation/ref-manual/tasks.rst     | 8 ++++----
 documentation/ref-manual/variables.rst | 5 +++++
 2 files changed, 9 insertions(+), 4 deletions(-)
documentation/ref-manual/tasks.rst +0 -0
index 2e4b23408d..70c0dea3bb 100644

documentation/ref-manual/tasks.rst them. You can learn more by looking at the · line 416

Quoted 8 lines
documentation/ref-manual/tasks.rst +2 -3
@@ -412,12 +412,12 @@ them. You can learn more by looking at the
 -------------
 
 Unpacks the source code into a working directory pointed to by
-``${``\ :term:`WORKDIR`\ ``}``. The :term:`S`
-variable also plays a role in where unpacked source files ultimately
-reside. For more information on how source files are unpacked, see the
+``${``\ :term:`UNPACKDIR`\ ``}``. Another, legacy way to specify
+this directory is through the :term:`S` and :term:`WORKDIR` variables.

I find this sentence a little confusing to read.

"Another, legacy" suggests you've already given a method that was legacy. But here you're really saying "Another way, which is legacy". Perhaps this could be phrased differently, e.g. "A legacy way to specify this directory is through..."

Also it doesn't really tell you how to use S and WORKDIR. I wonder if you need to mention these at all, given they'll be described elsewhere in the document. Why point a user to something legacy?

Thanks,

Andrew Murray

#3 lore raw

Re: [docs] [PATCH 2/3] ref-manual: introduce UNPACKDIR variable

Hi Andy

Quoted 32 lines · Andrew Murray

Hi Michael,

Quoted 17 lines · Michael Opdenacker via lists.yoctoproject.org

From: Michael Opdenacker <[email protected]>

Note that this doesn't touch the "Source Fetching" section in overview-manual/concepts.rst yet, as the unpack implementation may not be finalized yet.

---
  documentation/ref-manual/tasks.rst     | 8 ++++----
  documentation/ref-manual/variables.rst | 5 +++++
  2 files changed, 9 insertions(+), 4 deletions(-)
documentation/ref-manual/tasks.rst +0 -0
index 2e4b23408d..70c0dea3bb 100644

documentation/ref-manual/tasks.rst them. You can learn more by looking at the · line 416

Quoted 8 lines
documentation/ref-manual/tasks.rst +2 -3
@@ -412,12 +412,12 @@ them. You can learn more by looking at the
  -------------
 
  Unpacks the source code into a working directory pointed to by
-``${``\ :term:`WORKDIR`\ ``}``. The :term:`S`
-variable also plays a role in where unpacked source files ultimately
-reside. For more information on how source files are unpacked, see the
+``${``\ :term:`UNPACKDIR`\ ``}``. Another, legacy way to specify
+this directory is through the :term:`S` and :term:`WORKDIR` variables.

I find this sentence a little confusing to read.

Quoted 8 lines

"Another, legacy" suggests you've already given a method that was legacy. But here you're really saying "Another way, which is legacy". Perhaps this could be phrased differently, e.g. "A legacy way to specify this directory is through..."

Also it doesn't really tell you how to use S and WORKDIR. I wonder if you need to mention these at all, given they'll be described elsewhere in the document. Why point a user to something legacy?

This definitely makes sense, thanks!

I simplified my paragraph as follows:

Unpacks the source code into a working directory pointed to by ``${``\ :term:UNPACKDIR\ ``}``. A legacy way to specify this directory is through the :term:S and :term:WORKDIR variables. For more information on how source files are unpacked, see the ":ref:overview-manual/concepts:source fetching"
section in the Yocto Project Overview and Concepts Manual.

Thanks again
Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Reviewed-by
#4 lore raw

Re: [docs] [PATCH 2/3] ref-manual: introduce UNPACKDIR variable

Quoted 47 lines · Michael Opdenacker

Hi Andy

Quoted 32 lines · Andrew Murray

Hi Michael,

Quoted 17 lines · Michael Opdenacker via lists.yoctoproject.org

From: Michael Opdenacker <[email protected]>

Note that this doesn't touch the "Source Fetching" section in overview-manual/concepts.rst yet, as the unpack implementation may not be finalized yet.

---
  documentation/ref-manual/tasks.rst     | 8 ++++----
  documentation/ref-manual/variables.rst | 5 +++++
  2 files changed, 9 insertions(+), 4 deletions(-)
documentation/ref-manual/tasks.rst +0 -0
index 2e4b23408d..70c0dea3bb 100644

documentation/ref-manual/tasks.rst them. You can learn more by looking at the · line 416

Quoted 8 lines
documentation/ref-manual/tasks.rst +2 -3
@@ -412,12 +412,12 @@ them. You can learn more by looking at the
  -------------
 
  Unpacks the source code into a working directory pointed to by
-``${``\ :term:`WORKDIR`\ ``}``. The :term:`S`
-variable also plays a role in where unpacked source files ultimately
-reside. For more information on how source files are unpacked, see the
+``${``\ :term:`UNPACKDIR`\ ``}``. Another, legacy way to specify
+this directory is through the :term:`S` and :term:`WORKDIR` variables.

I find this sentence a little confusing to read.

Quoted 8 lines

"Another, legacy" suggests you've already given a method that was legacy. But here you're really saying "Another way, which is legacy". Perhaps this could be phrased differently, e.g. "A legacy way to specify this directory is through..."

Also it doesn't really tell you how to use S and WORKDIR. I wonder if you need to mention these at all, given they'll be described elsewhere in the document. Why point a user to something legacy?

This definitely makes sense, thanks!

Quoted 8 lines

I simplified my paragraph as follows:

Unpacks the source code into a working directory pointed to by ``${``\ :term:UNPACKDIR\ ``}``. A legacy way to specify this directory is through the :term:S and :term:WORKDIR variables. For more information on how source files are unpacked, see the ":ref:overview-manual/concepts:source fetching"
section in the Yocto Project Overview and Concepts Manual.

That looks good. Feel free to add my:

#5 lore raw

Re: [docs] [PATCH 2/3] ref-manual: introduce UNPACKDIR variable

Quoted 3 lines · Andrew Murray

That looks good. Feel free to add my:

Done. Many thanks for the review!
Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 3/3 migration-5.1.rst: preliminary description of UNPACKDIR changes

In reply to [email protected]

From: Michael Opdenacker <[email protected]>

---
 .../migration-guides/migration-5.1.rst        | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
documentation/migration-guides/migration-5.1.rst +55 -0
index b4db04bcee..84ef35e28a 100644
@@ -11,6 +11,61 @@ Project 5.1 Release (codename "styhead") from the prior release.
 
 .. _migration-5.1-supported-kernel-versions:
 
+:term:`WORKDIR` changes
+~~~~~~~~~~~~~~~~~~~~~~~
+
+S = ${WORKDIR} no longer supported
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If a recipe has :term:`S` set to be :term:`WORKDIR`, this is no longer
+supported, and an error will be issued. The recipe should be changed to::
+
+    S = "${WORKDIR}/sources"
+    UNPACKDIR = "${S}"
+
+Any :term:`WORKDIR` references where files from :term:`SRC_URI` are referenced
+should be changed to :term:`S`. These are commonly in :ref:`ref-tasks-compile`,
+:ref:`ref-tasks-compile`, :ref:`ref-tasks-install` and :term:`LIC_FILES_CHKSUM`.
+
+:term:`WORKDIR` references in recipes
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+:term:`WORKDIR` references in other recipes need auditing. If they reference
+files from :term:`SRC_URI`, they likely need changing to :term:`UNPACKDIR`.
+These are commonly in :ref:`ref-tasks-compile` and :ref:`ref-tasks-install`
+for things like service or configuration files. One unusual case is
+``${WORKDIR}/${BP}`` which should probably be set to ``${S}``.
+
+References to ``../`` in :term:`LIC_FILES_CHKSUM` or elsewhere may need changing
+to :term:`UNPACKDIR`. References to :term:`WORKDIR` in ``sed`` commands are
+usually left as they are.
+
+General notes
+^^^^^^^^^^^^^
+
+Files from :ref:`ref-tasks-unpack` now unpack to ``WORKDIR/sources-unpack/``
+rather than ``WORKDIR/``.
+
+If :term:`S` is set to a subdirectory under :term:`WORKDIR` and that
+subdirectory exists in ``sources-unpack`` after :ref:`ref-tasks-unpack` runs,
+it is moved to :term:`WORKDIR`. This means that ``S = "${WORKDIR}/${BP}"``,
+``S = "${WORKDIR}/git"`` and also deeper paths continue to work as expected
+without changes. We cannot use symlinks to do this as it breaks autotools
+based recipes. Keeping all sources under ``sources-unpack`` wasn't considered
+as it meant more invasive recipes changes. The key objective was separating the
+:ref:`ref-tasks-unpack` task output from :term:`WORKDIR`.
+
+Previously, :term:`S` was always created but after the recent changes it is no
+longer the case. This means the check in ``do_unpack_qa`` triggers where
+:term:`S` is not created by a recipe while it didn't happen before. This can
+require to add an :term:`S` definition to a recipe that only uses
+``file://`` :term:`SRC_URI` entries. Building C files from :term:`UNPACKDIR`
+without setting :term:`S` to point at it does not work as the debug prefix
+mapping doesn't handle that.
+
+``devtool``  and ``recipetool`` have been updated to handle this and their
+support for ``S = WORKDIR`` and ``oe-local-files`` has been removed.
+
 Supported kernel versions
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
Signature · 1 line
2.34.1