Skip to contentSkip to conversation

Updates to host requirements

PATCH Applied Antonin Godard 1 participant 4 messages Apr 20 – Apr 24

lore
Share & tools
lore
#0 lore raw

v3 cover Updates to host requirements

---
Changes in v3:
- Apply suggestions by Quentin (thanks!).
- Link to v2: https://patch.msgid.link/20260420-python3-websockets-requirement-v2-0-a273a01a6f44@bootlin.com

Changes in v2:
- Rework this websockets addition, as it proved to be tricky to provide
on older Ubuntu/Debian distros.
- Add a patch to document the buildtools requirement on openSUSE Leap
15.6.
- Link to v1: https://patch.msgid.link/20260420-python3-websockets-requirement-v1-1-28c4fce2f766@bootlin.com

---
Antonin Godard (2):
ref-manual/system-requirements.rst: make python3-websockets a default host requirement ref-manual/system-requirements.rst: instruct to install a buildtools tarball

 documentation/ref-manual/system-requirements.rst   | 36 ++++++++++++++++++++++
 .../host_packages_scripts/fedora_essential.sh      |  2 +-
 .../opensuse_essential_16.0.sh                     |  2 +-
 3 files changed, 38 insertions(+), 2 deletions(-)

---
base-commit: 5cc3b6690acf0c209514eae68006b1f24735302b
change-id: 20260420-python3-websockets-requirement-4594450f8d92

#1 lore raw

PATCH v3 1/2 ref-manual/system-requirements.rst: make python3-websockets a default host requirement

When configuring the project through bitbake-setup we can choose the "poky-with-sstate" configuration, which requires the python3-websockets package.

Add this package as a host requirement (under different names depending on the distro).

Alma, CentOS, and Rocky have a requirement on the buildtools tarball, which already contains this package, so we don't need to add it for them.

On Ubuntu 22.04 and Debian 11, the version of python3-websockets provided by the distribution is too old compared to what we need [1]. Add a separate set of instructions for these.

---
 documentation/ref-manual/system-requirements.rst   | 31 ++++++++++++++++++++++
 .../host_packages_scripts/fedora_essential.sh      |  2 +-
 .../opensuse_essential_16.0.sh                     |  2 +-
 3 files changed, 33 insertions(+), 2 deletions(-)
documentation/ref-manual/system-requirements.rst +31 -0
index 298832dd9..dba11a135 100644
@@ -166,6 +166,37 @@ Ubuntu and Debian
 
 .. include:: ubuntu-debian-host-packages-nodocs.rst
 
+Additionally, on distributions other than Debian 11 and Ubuntu 22.04 (otherwise
+see note below), install the following package:
+
+.. code-block:: console
+
+   $ sudo apt-get install python3-websockets
+
+.. note::
+
+   On Debian 11 and Ubuntu 22.04, the minimum version for
+   ``python3-websockets`` is not satisfied by the host distribution. This
+   package is used for fetching pre-built :ref:`shared state
+   <overview-manual/concepts:shared state>` artifacts from upstream Yocto Project
+   servers (see :ref:`ref-fragments-core-yocto-sstate-mirror-cdn` for more
+   information).
+
+   In order to use this feature, you can get the correct version of
+   ``python3-websockets`` by either:
+
+   -  Using a :term:`buildtools` tarball by following the
+      :ref:`system-requirements-buildtools` section below.
+
+   -  Installing ``python3-websockets`` using `Pip
+      <https://pip.pypa.io/en/stable/>`__ in a virtual environment, e.g.:
+
+      .. code-block:: console
+
+         $ python3 -m venv --clear ./yocto-docs-venv
+         $ . ./yocto-docs-venv/bin/activate
+         $ pip install websockets
+
 Here are the packages needed to build Project documentation manuals:
 
 .. literalinclude:: ../tools/host_packages_scripts/ubuntu_docs.sh
documentation/tools/host_packages_scripts/fedora_essential.sh +1 -1
index 99e5d2c0b..55b8b704b 100644
@@ -1 +1 @@
-sudo dnf install bzip2 ccache chrpath cpio cpp diffstat diffutils file findutils gawk gcc gcc-c++ git glibc-devel glibc-langpack-en gzip hostname libacl make patch perl perl-Data-Dumper perl-File-Compare perl-File-Copy perl-FindBin perl-Text-ParseWords perl-Thread-Queue perl-bignum perl-locale python python3 python3-GitPython python3-jinja2 python3-pexpect python3-pip rpcgen socat tar texinfo unzip wget which xz zstd $([ $(rpm -E %fedora) -ge 42 ] && echo "util-linux-script")
+sudo dnf install bzip2 ccache chrpath cpio cpp diffstat diffutils file findutils gawk gcc gcc-c++ git glibc-devel glibc-langpack-en gzip hostname libacl make patch perl perl-Data-Dumper perl-File-Compare perl-File-Copy perl-FindBin perl-Text-ParseWords perl-Thread-Queue perl-bignum perl-locale python python3 python3-GitPython python3-jinja2 python3-pexpect python3-pip python3-websockets rpcgen socat tar texinfo unzip wget which xz zstd $([ $(rpm -E %fedora) -ge 42 ] && echo "util-linux-script")
documentation/tools/host_packages_scripts/opensuse_essential_16.0.sh +1 -1
index e557ae4fb..f3ee6ad54 100644
@@ -1 +1 @@
-sudo zypper install bzip2 chrpath diffstat gcc gcc-c++ git gzip hostname libacl1 make makeinfo patch python3 python3-GitPython python3-Jinja2 python3-curses python3-pexpect python3-pip python3-xml rpcgen socat tar wget which xz zstd
+sudo zypper install bzip2 chrpath diffstat gcc gcc-c++ git gzip hostname libacl1 make makeinfo patch python3 python3-GitPython python3-Jinja2 python3-curses python3-pexpect python3-pip python3-websockets python3-xml rpcgen socat tar wget which xz zstd
Signature · 1 line
2.53.0
#2 lore raw

PATCH v3 2/2 ref-manual/system-requirements.rst: instruct to install a buildtools tarball

In reply to Antonin Godard

I noticed that openSUSE Leap 15.6 provide Python 3.6, which is not supported by BitBake (which requires Python >3.9). Instruct to use a buildtools tarball, which is how this is done on the Autobuilder.

---
 documentation/ref-manual/system-requirements.rst | 5 +++++
 1 file changed, 5 insertions(+)
documentation/ref-manual/system-requirements.rst +5 -0
index dba11a135..05c852043 100644
@@ -246,6 +246,11 @@ with a supported openSUSE Leap 15.6 distribution:
 .. literalinclude:: ../tools/host_packages_scripts/opensuse_essential_15.6.sh
    :language: shell
 
+Additionally, openSUSE Leap 15.6 requires a :term:`buildtools` tarball to be
+installed and set up, as this distribution provides a version of Python that is
+too old for :term:`BitBake`. Follow the :ref:`system-requirements-buildtools`
+section below for more information.
+
 Here are the packages needed to build Project documentation manuals:
 
 .. literalinclude:: ../tools/host_packages_scripts/opensuse_docs.sh
Signature · 1 line
2.53.0
author Applied
#3 lore raw
In reply to Antonin Godard

Applied, thanks!

[1/2] ref-manual/system-requirements.rst: make python3-websockets a default host requirement

      commit: 144b182d71f073f37748e3b71e0f18b4ea5fc659
[2/2] ref-manual/system-requirements.rst: instruct to install a buildtools tarball
      commit: eb74fdfd9e5e579a65e8872d1a73b51e77b14f63