summaryrefslogtreecommitdiff
path: root/poky/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'poky/bitbake')
-rwxr-xr-xpoky/bitbake/bin/bitbake2
-rw-r--r--poky/bitbake/contrib/prserv/Dockerfile62
-rw-r--r--poky/bitbake/doc/README2
-rw-r--r--poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst4
-rw-r--r--poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst30
-rw-r--r--poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst7
-rw-r--r--poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst26
-rw-r--r--poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst130
-rw-r--r--poky/bitbake/doc/releases.rst84
-rw-r--r--poky/bitbake/lib/bb/__init__.py2
-rw-r--r--poky/bitbake/lib/bb/build.py2
-rw-r--r--poky/bitbake/lib/bb/codeparser.py20
-rw-r--r--poky/bitbake/lib/bb/cooker.py163
-rw-r--r--poky/bitbake/lib/bb/data_smart.py10
-rw-r--r--poky/bitbake/lib/bb/fetch2/git.py5
-rw-r--r--poky/bitbake/lib/bb/fetch2/ssh.py47
-rw-r--r--poky/bitbake/lib/bb/monitordisk.py2
-rw-r--r--poky/bitbake/lib/bb/server/process.py30
-rw-r--r--poky/bitbake/lib/bb/server/xmlrpcserver.py1
-rw-r--r--poky/bitbake/lib/bb/siggen.py17
-rw-r--r--poky/bitbake/lib/bb/tests/fetch.py30
-rw-r--r--poky/bitbake/lib/bb/tinfoil.py4
-rw-r--r--poky/bitbake/lib/bb/ui/buildinfohelper.py22
-rw-r--r--poky/bitbake/lib/bb/ui/knotty.py53
-rw-r--r--poky/bitbake/lib/bb/ui/uievent.py2
-rw-r--r--poky/bitbake/lib/bb/utils.py11
-rw-r--r--poky/bitbake/lib/ply/yacc.py7
-rw-r--r--poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py83
-rw-r--r--poky/bitbake/lib/toaster/bldcontrol/migrations/0008_models_bigautofield.py48
-rwxr-xr-xpoky/bitbake/lib/toaster/orm/fixtures/gen_fixtures.py445
-rw-r--r--poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml40
-rw-r--r--poky/bitbake/lib/toaster/orm/fixtures/poky.xml98
-rw-r--r--poky/bitbake/lib/toaster/orm/fixtures/settings.xml2
-rw-r--r--poky/bitbake/lib/toaster/orm/migrations/0020_models_bigautofield.py173
-rw-r--r--poky/bitbake/lib/toaster/orm/models.py3
-rw-r--r--poky/bitbake/lib/toaster/toastergui/templates/base.html2
-rw-r--r--poky/bitbake/lib/toaster/toastergui/templates/configvars.html2
-rw-r--r--poky/bitbake/lib/toaster/toastergui/templates/landing.html6
-rw-r--r--poky/bitbake/lib/toaster/toastergui/templates/landing_not_managed.html34
-rw-r--r--poky/bitbake/lib/toaster/toastergui/templates/project.html2
-rw-r--r--poky/bitbake/lib/toaster/toastergui/templates/project_specific.html2
-rw-r--r--poky/bitbake/lib/toaster/toastergui/templates/projectconf.html24
-rw-r--r--poky/bitbake/lib/toaster/toastermain/settings.py3
-rw-r--r--poky/bitbake/toaster-requirements.txt2
44 files changed, 1424 insertions, 320 deletions
diff --git a/poky/bitbake/bin/bitbake b/poky/bitbake/bin/bitbake
index 5cff9f9cb6..042c91807d 100755
--- a/poky/bitbake/bin/bitbake
+++ b/poky/bitbake/bin/bitbake
@@ -28,7 +28,7 @@ from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException
if sys.getfilesystemencoding() != "utf-8":
sys.exit("Please use a locale setting which supports UTF-8 (such as LANG=en_US.UTF-8).\nPython can't change the filesystem locale after loading so we need a UTF-8 when Python starts or things won't work.")
-__version__ = "1.53.1"
+__version__ = "2.0.0"
if __name__ == "__main__":
if __version__ != bb.__version__:
diff --git a/poky/bitbake/contrib/prserv/Dockerfile b/poky/bitbake/contrib/prserv/Dockerfile
new file mode 100644
index 0000000000..9585fe3f07
--- /dev/null
+++ b/poky/bitbake/contrib/prserv/Dockerfile
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: MIT
+#
+# Copyright (c) 2022 Daniel Gomez <daniel@qtec.com>
+#
+# Dockerfile to build a bitbake PR service container
+#
+# From the root of the bitbake repository, run:
+#
+# docker build -f contrib/prserv/Dockerfile . -t prserv
+#
+# Running examples:
+#
+# 1. PR Service in RW mode, port 18585:
+#
+# docker run --detach --tty \
+# --env PORT=18585 \
+# --publish 18585:18585 \
+# --volume $PWD:/var/lib/bbprserv \
+# prserv
+#
+# 2. PR Service in RO mode, default port (8585) and custom LOGFILE:
+#
+# docker run --detach --tty \
+# --env DBMODE="--read-only" \
+# --env LOGFILE=/var/lib/bbprserv/prservro.log \
+# --publish 8585:8585 \
+# --volume $PWD:/var/lib/bbprserv \
+# prserv
+#
+
+FROM alpine:3.14.4
+
+RUN apk add --no-cache python3
+
+COPY bin/bitbake-prserv /opt/bbprserv/bin/
+COPY lib/prserv /opt/bbprserv/lib/prserv/
+COPY lib/bb /opt/bbprserv/lib/bb/
+COPY lib/codegen.py /opt/bbprserv/lib/codegen.py
+COPY lib/ply /opt/bbprserv/lib/ply/
+COPY lib/bs4 /opt/bbprserv/lib/bs4/
+
+ENV PATH=$PATH:/opt/bbprserv/bin
+
+RUN mkdir -p /var/lib/bbprserv
+
+ENV DBFILE=/var/lib/bbprserv/prserv.sqlite3 \
+ LOGFILE=/var/lib/bbprserv/prserv.log \
+ LOGLEVEL=debug \
+ HOST=0.0.0.0 \
+ PORT=8585 \
+ DBMODE=""
+
+ENTRYPOINT [ "/bin/sh", "-c", \
+"bitbake-prserv \
+--file=$DBFILE \
+--log=$LOGFILE \
+--loglevel=$LOGLEVEL \
+--start \
+--host=$HOST \
+--port=$PORT \
+$DBMODE \
+&& tail -f $LOGFILE"]
diff --git a/poky/bitbake/doc/README b/poky/bitbake/doc/README
index 16e6cdf990..cdbb23776e 100644
--- a/poky/bitbake/doc/README
+++ b/poky/bitbake/doc/README
@@ -8,7 +8,7 @@ Manual Organization
Folders exist for individual manuals as follows:
-* bitbake-user-manual - The BitBake User Manual
+* bitbake-user-manual --- The BitBake User Manual
Each folder is self-contained regarding content and figures.
diff --git a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
index 088eb818d6..7a22e96edf 100644
--- a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
+++ b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
@@ -523,7 +523,7 @@ it cannot figure out dependencies.
Thus far, this section has limited discussion to the direct inputs into
a task. Information based on direct inputs is referred to as the
"basehash" in the code. However, there is still the question of a task's
-indirect inputs - the things that were already built and present in the
+indirect inputs --- the things that were already built and present in the
build directory. The checksum (or signature) for a particular task needs
to add the hashes of all the tasks on which the particular task depends.
Choosing which dependencies to add is a policy decision. However, the
@@ -534,7 +534,7 @@ At the code level, there are a variety of ways both the basehash and the
dependent task hashes can be influenced. Within the BitBake
configuration file, we can give BitBake some extra information to help
it construct the basehash. The following statement effectively results
-in a list of global variable dependency excludes - variables never
+in a list of global variable dependency excludes --- variables never
included in any checksum. This example uses variables from OpenEmbedded
to help illustrate the concept::
diff --git a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
index 77384cfdc7..f9d9e617f3 100644
--- a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
+++ b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
@@ -405,7 +405,7 @@ This fetcher supports the following parameters:
``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;..."
+ SRC_URI = "git://git@gitlab.freedesktop.org/mesa/mesa.git;branch=main;protocol=ssh;..."
Note the ``:`` character changed for a ``/`` before the path to the project.
@@ -432,9 +432,9 @@ This fetcher supports the following parameters:
raw Git metadata is provided. This parameter implies the "nocheckout"
parameter as well.
-- *"branch":* The branch(es) of the Git tree to clone. If unset, this
- is assumed to be "master". The number of branch parameters much match
- the number of name parameters.
+- *"branch":* The branch(es) of the Git tree to clone. Unless
+ "nobranch" is set to "1", this is a mandatory parameter. The number of
+ branch parameters must match the number of name parameters.
- *"rev":* The revision to use for the checkout. The default is
"master".
@@ -457,9 +457,9 @@ This fetcher supports the following parameters:
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;..."
+ SRC_URI = "git://github.com/fronteed/icheck.git;protocol=https;branch=${PV};tag=${PV}"
+ SRC_URI = "git://github.com/asciidoc/asciidoc-py;protocol=https;branch=main"
+ SRC_URI = "git://git@gitlab.freedesktop.org/mesa/mesa.git;branch=main;protocol=ssh;..."
.. note::
@@ -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 crate registries too.
+
+The format for the :term:`SRC_URI` setting must be::
+
+ SRC_URI = "crate://REGISTRY/NAME/VERSION"
+
+Here is an example URL::
+
+ SRC_URI = "crate://crates.io/glob/0.2.11"
+
Other Fetchers
--------------
diff --git a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
index 1c31c1f9e8..35ffb88b02 100644
--- a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
+++ b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.rst
@@ -61,10 +61,9 @@ member Chris Larson split the project into two distinct pieces:
Today, BitBake is the primary basis of the
`OpenEmbedded <https://www.openembedded.org/>`__ project, which is being
-used to build and maintain Linux distributions such as the `Angstrom
-Distribution <http://www.angstrom-distribution.org/>`__, and which is
-also being used as the build tool for Linux projects such as the `Yocto
-Project <https://www.yoctoproject.org>`__.
+used to build and maintain Linux distributions such as the `Poky
+Reference Distribution <https://www.yoctoproject.org/software-item/poky/>`__,
+developed under the umbrella of the `Yocto Project <https://www.yoctoproject.org>`__.
Prior to BitBake, no other build tool adequately met the needs of an
aspiring embedded Linux distribution. All of the build systems used by
diff --git a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
index 174cac7818..af4b135867 100644
--- a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
+++ b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
@@ -510,8 +510,8 @@ variable.
.. note::
- Overrides can only use lower-case characters. Additionally,
- underscores are not permitted in override names as they are used to
+ Overrides can only use lower-case characters, digits and dashes.
+ In particular, colons are not permitted in override names as they are used to
separate overrides from each other and from the variable name.
- *Selecting a Variable:* The :term:`OVERRIDES` variable is a
@@ -523,14 +523,14 @@ variable.
OVERRIDES = "architecture:os:machine"
TEST = "default"
- TEST_os = "osspecific"
- TEST_nooverride = "othercondvalue"
+ TEST:os = "osspecific"
+ TEST:nooverride = "othercondvalue"
In this example, the :term:`OVERRIDES`
variable lists three overrides: "architecture", "os", and "machine".
The variable ``TEST`` by itself has a default value of "default". You
select the os-specific version of the ``TEST`` variable by appending
- the "os" override to the variable (i.e. ``TEST_os``).
+ the "os" override to the variable (i.e. ``TEST:os``).
To better understand this, consider a practical example that assumes
an OpenEmbedded metadata-based Linux kernel recipe file. The
@@ -567,7 +567,7 @@ variable.
- *Setting a Variable for a Single Task:* BitBake supports setting a
variable just for the duration of a single task. Here is an example::
- FOO_task-configure = "val 1"
+ FOO:task-configure = "val 1"
FOO:task-compile = "val 2"
In the
@@ -585,6 +585,16 @@ variable.
EXTRA_OEMAKE:prepend:task-compile = "${PARALLEL_MAKE} "
+.. note::
+
+ Before BitBake 1.52 (Honister 3.4), the syntax for :term:`OVERRIDES`
+ used ``_`` instead of ``:``, so you will still find a lot of documentation
+ using ``_append``, ``_prepend``, and ``_remove``, for example.
+
+ For details, see the
+ :yocto_docs:`Overrides Syntax Changes </migration-guides/migration-3.4.html#override-syntax-changes>`
+ section in the Yocto Project manual migration notes.
+
Key Expansion
-------------
@@ -1648,8 +1658,8 @@ user interfaces:
.. _variants-class-extension-mechanism:
-Variants - Class Extension Mechanism
-====================================
+Variants --- Class Extension Mechanism
+======================================
BitBake supports multiple incarnations of a recipe file via the
:term:`BBCLASSEXTEND` variable.
diff --git a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index 59a9de2fb8..af4ff9805c 100644
--- a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -93,6 +93,13 @@ overview of their function and contents.
fetcher does not attempt to use the host listed in :term:`SRC_URI` after
a successful fetch from the :term:`PREMIRRORS` occurs.
+ :term:`BB_BASEHASH_IGNORE_VARS`
+ Lists variables that are excluded from checksum and dependency data.
+ Variables that are excluded can therefore change without affecting
+ the checksum mechanism. A common example would be the variable for
+ the path of the build. BitBake's output should not (and usually does
+ not) depend on the directory in which it was built.
+
:term:`BB_CHECK_SSL_CERTS`
Specifies if SSL certificates should be checked when fetching. The default
value is ``1`` and certificates are not checked if the value is set to ``0``.
@@ -236,17 +243,6 @@ overview of their function and contents.
based on the interval occur each time a respective interval is
reached beyond the initial warning (i.e. 1 Gbytes and 100 Kbytes).
- :term:`BB_ENV_PASSTHROUGH_ADDITIONS`
- Specifies an additional set of variables to allow through from the
- external environment into BitBake's datastore. This list of variables
- are on top of the internal list set in
- :term:`BB_ENV_PASSTHROUGH`.
-
- .. note::
-
- You must set this variable in the external environment in order
- for it to work.
-
:term:`BB_ENV_PASSTHROUGH`
Specifies the internal list of variables to allow through from
the external environment into BitBake's datastore. If the value of
@@ -259,6 +255,17 @@ overview of their function and contents.
You must set this variable in the external environment in order
for it to work.
+ :term:`BB_ENV_PASSTHROUGH_ADDITIONS`
+ Specifies an additional set of variables to allow through from the
+ external environment into BitBake's datastore. This list of variables
+ are on top of the internal list set in
+ :term:`BB_ENV_PASSTHROUGH`.
+
+ .. note::
+
+ You must set this variable in the external environment in order
+ for it to work.
+
:term:`BB_FETCH_PREMIRRORONLY`
When set to "1", causes BitBake's fetcher module to only search
:term:`PREMIRRORS` for files. BitBake will not
@@ -337,13 +344,6 @@ overview of their function and contents.
For example usage, see :term:`BB_GIT_SHALLOW`.
- :term:`BB_BASEHASH_IGNORE_VARS`
- Lists variables that are excluded from checksum and dependency data.
- Variables that are excluded can therefore change without affecting
- the checksum mechanism. A common example would be the variable for
- the path of the build. BitBake's output should not (and usually does
- not) depend on the directory in which it was built.
-
:term:`BB_HASHCHECK_FUNCTION`
Specifies the name of the function to call during the "setscene" part
of the task's execution in order to validate the list of task hashes.
@@ -426,6 +426,19 @@ overview of their function and contents.
If you want to force log files to take a specific name, you can set this
variable in a configuration file.
+ :term:`BB_MULTI_PROVIDER_ALLOWED`
+ Allows you to suppress BitBake warnings caused when building two
+ separate recipes that provide the same output.
+
+ BitBake normally issues a warning when building two different recipes
+ where each provides the same output. This scenario is usually
+ something the user does not want. However, cases do exist where it
+ makes sense, particularly in the ``virtual/*`` namespace. You can use
+ this variable to suppress BitBake's warnings.
+
+ To use the variable, list provider names (e.g. recipe names,
+ ``virtual/kernel``, and so forth).
+
:term:`BB_NICE_LEVEL`
Allows BitBake to run at a specific priority (i.e. nice level).
System permissions usually mean that BitBake can reduce its priority
@@ -490,14 +503,14 @@ overview of their function and contents.
Selects the name of the scheduler to use for the scheduling of
BitBake tasks. Three options exist:
- - *basic* - The basic framework from which everything derives. Using
+ - *basic* --- the basic framework from which everything derives. Using
this option causes tasks to be ordered numerically as they are
parsed.
- - *speed* - Executes tasks first that have more tasks depending on
+ - *speed* --- executes tasks first that have more tasks depending on
them. The "speed" option is the default.
- - *completion* - Causes the scheduler to try to complete a given
+ - *completion* --- causes the scheduler to try to complete a given
recipe once its build has started.
:term:`BB_SCHEDULERS`
@@ -544,10 +557,10 @@ overview of their function and contents.
The variable can be set using one of two policies:
- - *cache* - Retains the value the system obtained previously rather
+ - *cache* --- retains the value the system obtained previously rather
than querying the source control system each time.
- - *clear* - Queries the source controls system every time. With this
+ - *clear* --- queries the source controls system every time. With this
policy, there is no cache. The "clear" policy is the default.
:term:`BB_STRICT_CHECKSUM`
@@ -673,7 +686,7 @@ overview of their function and contents.
This variable is useful in situations where the same recipe appears
in more than one layer. Setting this variable allows you to
prioritize a layer against other layers that contain the same recipe
- - effectively letting you control the precedence for the multiple
+ --- effectively letting you control the precedence for the multiple
layers. The precedence established through this variable stands
regardless of a recipe's version (:term:`PV` variable).
For example, a layer that has a recipe with a higher :term:`PV` value but
@@ -1054,19 +1067,6 @@ overview of their function and contents.
upstream source, and then locations specified by :term:`MIRRORS` in that
order.
- :term:`BB_MULTI_PROVIDER_ALLOWED`
- Allows you to suppress BitBake warnings caused when building two
- separate recipes that provide the same output.
-
- BitBake normally issues a warning when building two different recipes
- where each provides the same output. This scenario is usually
- something the user does not want. However, cases do exist where it
- makes sense, particularly in the ``virtual/*`` namespace. You can use
- this variable to suppress BitBake's warnings.
-
- To use the variable, list provider names (e.g. recipe names,
- ``virtual/kernel``, and so forth).
-
:term:`OVERRIDES`
BitBake uses :term:`OVERRIDES` to control what variables are overridden
after BitBake parses recipes and configuration files.
@@ -1331,7 +1331,7 @@ overview of their function and contents.
The section in which packages should be categorized.
:term:`SRC_URI`
- The list of source files - local or remote. This variable tells
+ The list of source files --- local or remote. This variable tells
BitBake which bits to pull for the build and how to pull them. For
example, if the recipe or append file needs to fetch a single tarball
from the Internet, the recipe or append file uses a :term:`SRC_URI`
@@ -1347,17 +1347,17 @@ overview of their function and contents.
the :ref:`bitbake-user-manual/bitbake-user-manual-fetching:fetchers`
section.
- - ``az://`` : Fetches files from an Azure Storage account using HTTPS.
+ - ``az://``: Fetches files from an Azure Storage account using HTTPS.
- - ``bzr://`` : Fetches files from a Bazaar revision control
+ - ``bzr://``: Fetches files from a Bazaar revision control
repository.
- - ``ccrc://`` - Fetches files from a ClearCase repository.
+ - ``ccrc://``: Fetches files from a ClearCase repository.
- - ``cvs://`` : Fetches files from a CVS revision control
+ - ``cvs://``: Fetches files from a CVS revision control
repository.
- - ``file://`` - Fetches files, which are usually files shipped
+ - ``file://``: Fetches files, which are usually files shipped
with the Metadata, from the local machine.
The path is relative to the :term:`FILESPATH`
variable. Thus, the build system searches, in order, from the
@@ -1365,71 +1365,71 @@ overview of their function and contents.
the directory in which the recipe file (``.bb``) or append file
(``.bbappend``) resides:
- - ``${BPN}`` - The base recipe name without any special suffix
+ - ``${BPN}``: the base recipe name without any special suffix
or version numbers.
- - ``${BP}`` - ``${BPN}-${PV}``. The base recipe name and
+ - ``${BP}`` - ``${BPN}-${PV}``: the base recipe name and
version but without any special package name suffix.
- - *files -* Files within a directory, which is named ``files``
+ - ``files``: files within a directory, which is named ``files``
and is also alongside the recipe or append file.
- - ``ftp://`` : Fetches files from the Internet using FTP.
+ - ``ftp://``: Fetches files from the Internet using FTP.
- - ``git://`` : Fetches files from a Git revision control
+ - ``git://``: Fetches files from a Git revision control
repository.
- - ``gitsm://`` : Fetches submodules from a Git revision control
+ - ``gitsm://``: Fetches submodules from a Git revision control
repository.
- - ``hg://`` : Fetches files from a Mercurial (``hg``) revision
+ - ``hg://``: Fetches files from a Mercurial (``hg``) revision
control repository.
- - ``http://`` : Fetches files from the Internet using HTTP.
+ - ``http://``: Fetches files from the Internet using HTTP.
- - ``https://`` : Fetches files from the Internet using HTTPS.
+ - ``https://``: Fetches files from the Internet using HTTPS.
- - ``npm://`` - Fetches JavaScript modules from a registry.
+ - ``npm://``: Fetches JavaScript modules from a registry.
- - ``osc://`` : Fetches files from an OSC (OpenSUSE Build service)
+ - ``osc://``: Fetches files from an OSC (OpenSUSE Build service)
revision control repository.
- - ``p4://`` : Fetches files from a Perforce (``p4``) revision
+ - ``p4://``: Fetches files from a Perforce (``p4``) revision
control repository.
- - ``repo://`` : Fetches files from a repo (Git) repository.
+ - ``repo://``: Fetches files from a repo (Git) repository.
- - ``ssh://`` : Fetches files from a secure shell.
+ - ``ssh://``: Fetches files from a secure shell.
- - ``svn://`` : Fetches files from a Subversion (``svn``) revision
+ - ``svn://``: Fetches files from a Subversion (``svn``) revision
control repository.
Here are some additional options worth mentioning:
- - ``downloadfilename`` : Specifies the filename used when storing
+ - ``downloadfilename``: Specifies the filename used when storing
the downloaded file.
- - ``name`` - Specifies a name to be used for association with
+ - ``name``: Specifies a name to be used for association with
:term:`SRC_URI` checksums or :term:`SRCREV` when you have more than one
file or git repository specified in :term:`SRC_URI`. For example::
- SRC_URI = "git://example.com/foo.git;name=first \
- git://example.com/bar.git;name=second \
+ SRC_URI = "git://example.com/foo.git;branch=main;name=first \
+ git://example.com/bar.git;branch=main;name=second \
http://example.com/file.tar.gz;name=third"
SRCREV_first = "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15"
SRCREV_second = "e242ed3bffccdf271b7fbaf34ed72d089537b42f"
SRC_URI[third.sha256sum] = "13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de"
- - ``subdir`` : Places the file (or extracts its contents) into the
+ - ``subdir``: Places the file (or extracts its contents) into the
specified subdirectory. This option is useful for unusual tarballs
or other archives that do not have their files already in a
subdirectory within the archive.
- - ``subpath`` - Limits the checkout to a specific subpath of the
+ - ``subpath``: Limits the checkout to a specific subpath of the
tree when using the Git fetcher is used.
- - ``unpack`` : Controls whether or not to unpack the file if it is
+ - ``unpack``: Controls whether or not to unpack the file if it is
an archive. The default action is to unpack the file.
:term:`SRCDATE`
diff --git a/poky/bitbake/doc/releases.rst b/poky/bitbake/doc/releases.rst
index d68d71599c..6635032c01 100644
--- a/poky/bitbake/doc/releases.rst
+++ b/poky/bitbake/doc/releases.rst
@@ -1,32 +1,74 @@
.. SPDX-License-Identifier: CC-BY-2.5
-=========================
- Current Release Manuals
-=========================
+===========================
+ Supported Release Manuals
+===========================
+
+******************************
+Release Series 3.4 (honister)
+******************************
+
+- :yocto_docs:`3.4 BitBake User Manual </3.4/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.4.1 BitBake User Manual </3.4.1/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.4.2 BitBake User Manual </3.4.2/bitbake-user-manual/bitbake-user-manual.html>`
+
+******************************
+Release Series 3.3 (hardknott)
+******************************
+
+- :yocto_docs:`3.3 BitBake User Manual </3.3/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.3.1 BitBake User Manual </3.3.1/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.3.2 BitBake User Manual </3.3.2/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.3.3 BitBake User Manual </3.3.3/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.3.4 BitBake User Manual </3.3.4/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.3.5 BitBake User Manual </3.3.5/bitbake-user-manual/bitbake-user-manual.html>`
****************************
-3.1 'dunfell' Release Series
+Release Series 3.1 (dunfell)
****************************
- :yocto_docs:`3.1 BitBake User Manual </3.1/bitbake-user-manual/bitbake-user-manual.html>`
- :yocto_docs:`3.1.1 BitBake User Manual </3.1.1/bitbake-user-manual/bitbake-user-manual.html>`
- :yocto_docs:`3.1.2 BitBake User Manual </3.1.2/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.1.3 BitBake User Manual </3.1.3/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.1.4 BitBake User Manual </3.1.4/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.1.5 BitBake User Manual </3.1.5/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.1.6 BitBake User Manual </3.1.6/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.1.7 BitBake User Manual </3.1.7/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.1.8 BitBake User Manual </3.1.8/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.1.9 BitBake User Manual </3.1.9/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.1.10 BitBake User Manual </3.1.10/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.1.11 BitBake User Manual </3.1.11/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.1.12 BitBake User Manual </3.1.12/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.1.13 BitBake User Manual </3.1.13/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.1.14 BitBake User Manual </3.1.14/bitbake-user-manual/bitbake-user-manual.html>`
==========================
- Previous Release Manuals
+ Outdated Release Manuals
==========================
+*******************************
+Release Series 3.2 (gatesgarth)
+*******************************
+
+- :yocto_docs:`3.2 BitBake User Manual </3.2/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.2.1 BitBake User Manual </3.2.1/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.2.2 BitBake User Manual </3.2.2/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.2.3 BitBake User Manual </3.2.3/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.2.4 BitBake User Manual </3.2.4/bitbake-user-manual/bitbake-user-manual.html>`
+
*************************
-3.0 'zeus' Release Series
+Release Series 3.0 (zeus)
*************************
- :yocto_docs:`3.0 BitBake User Manual </3.0/bitbake-user-manual/bitbake-user-manual.html>`
- :yocto_docs:`3.0.1 BitBake User Manual </3.0.1/bitbake-user-manual/bitbake-user-manual.html>`
- :yocto_docs:`3.0.2 BitBake User Manual </3.0.2/bitbake-user-manual/bitbake-user-manual.html>`
- :yocto_docs:`3.0.3 BitBake User Manual </3.0.3/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`3.0.4 BitBake User Manual </3.0.4/bitbake-user-manual/bitbake-user-manual.html>`
****************************
-2.7 'warrior' Release Series
+Release Series 2.7 (warrior)
****************************
- :yocto_docs:`2.7 BitBake User Manual </2.7/bitbake-user-manual/bitbake-user-manual.html>`
@@ -36,7 +78,7 @@
- :yocto_docs:`2.7.4 BitBake User Manual </2.7.4/bitbake-user-manual/bitbake-user-manual.html>`
*************************
-2.6 'thud' Release Series
+Release Series 2.6 (thud)
*************************
- :yocto_docs:`2.6 BitBake User Manual </2.6/bitbake-user-manual/bitbake-user-manual.html>`
@@ -46,16 +88,16 @@
- :yocto_docs:`2.6.4 BitBake User Manual </2.6.4/bitbake-user-manual/bitbake-user-manual.html>`
*************************
-2.5 'sumo' Release Series
+Release Series 2.5 (sumo)
*************************
-- :yocto_docs:`2.5 BitBake User Manual </2.5/bitbake-user-manual/bitbake-user-manual.html>`
-- :yocto_docs:`2.5.1 BitBake User Manual </2.5.1/bitbake-user-manual/bitbake-user-manual.html>`
-- :yocto_docs:`2.5.2 BitBake User Manual </2.5.2/bitbake-user-manual/bitbake-user-manual.html>`
-- :yocto_docs:`2.5.3 BitBake User Manual </2.5.3/bitbake-user-manual/bitbake-user-manual.html>`
+- :yocto_docs:`2.5 Documentation </2.5>`
+- :yocto_docs:`2.5.1 Documentation </2.5.1>`
+- :yocto_docs:`2.5.2 Documentation </2.5.2>`
+- :yocto_docs:`2.5.3 Documentation </2.5.3>`
**************************
-2.4 'rocko' Release Series
+Release Series 2.4 (rocko)
**************************
- :yocto_docs:`2.4 BitBake User Manual </2.4/bitbake-user-manual/bitbake-user-manual.html>`
@@ -65,7 +107,7 @@
- :yocto_docs:`2.4.4 BitBake User Manual </2.4.4/bitbake-user-manual/bitbake-user-manual.html>`
*************************
-2.3 'pyro' Release Series
+Release Series 2.3 (pyro)
*************************
- :yocto_docs:`2.3 BitBake User Manual </2.3/bitbake-user-manual/bitbake-user-manual.html>`
@@ -75,7 +117,7 @@
- :yocto_docs:`2.3.4 BitBake User Manual </2.3.4/bitbake-user-manual/bitbake-user-manual.html>`
**************************
-2.2 'morty' Release Series
+Release Series 2.2 (morty)
**************************
- :yocto_docs:`2.2 BitBake User Manual </2.2/bitbake-user-manual/bitbake-user-manual.html>`
@@ -84,7 +126,7 @@
- :yocto_docs:`2.2.3 BitBake User Manual </2.2.3/bitbake-user-manual/bitbake-user-manual.html>`
****************************
-2.1 'krogoth' Release Series
+Release Series 2.1 (krogoth)
****************************
- :yocto_docs:`2.1 BitBake User Manual </2.1/bitbake-user-manual/bitbake-user-manual.html>`
@@ -93,7 +135,7 @@
- :yocto_docs:`2.1.3 BitBake User Manual </2.1.3/bitbake-user-manual/bitbake-user-manual.html>`
***************************
-2.0 'jethro' Release Series
+Release Series 2.0 (jethro)
***************************
- :yocto_docs:`1.9 BitBake User Manual </1.9/bitbake-user-manual/bitbake-user-manual.html>`
@@ -103,7 +145,7 @@
- :yocto_docs:`2.0.3 BitBake User Manual </2.0.3/bitbake-user-manual/bitbake-user-manual.html>`
*************************
-1.8 'fido' Release Series
+Release Series 1.8 (fido)
*************************
- :yocto_docs:`1.8 BitBake User Manual </1.8/bitbake-user-manual/bitbake-user-manual.html>`
@@ -111,7 +153,7 @@
- :yocto_docs:`1.8.2 BitBake User Manual </1.8.2/bitbake-user-manual/bitbake-user-manual.html>`
**************************
-1.7 'dizzy' Release Series
+Release Series 1.7 (dizzy)
**************************
- :yocto_docs:`1.7 BitBake User Manual </1.7/bitbake-user-manual/bitbake-user-manual.html>`
@@ -120,7 +162,7 @@
- :yocto_docs:`1.7.3 BitBake User Manual </1.7.3/bitbake-user-manual/bitbake-user-manual.html>`
**************************
-1.6 'daisy' Release Series
+Release Series 1.6 (daisy)
**************************
- :yocto_docs:`1.6 BitBake User Manual </1.6/bitbake-user-manual/bitbake-user-manual.html>`
diff --git a/poky/bitbake/lib/bb/__init__.py b/poky/bitbake/lib/bb/__init__.py
index 506f74dc47..b8333bdb81 100644
--- a/poky/bitbake/lib/bb/__init__.py
+++ b/poky/bitbake/lib/bb/__init__.py
@@ -9,7 +9,7 @@
# SPDX-License-Identifier: GPL-2.0-only
#
-__version__ = "1.53.1"
+__version__ = "2.0.0"
import sys
if sys.version_info < (3, 6, 0):
diff --git a/poky/bitbake/lib/bb/build.py b/poky/bitbake/lib/bb/build.py
index 65b7fc000d..af60c3d8f5 100644
--- a/poky/bitbake/lib/bb/build.py
+++ b/poky/bitbake/lib/bb/build.py
@@ -582,7 +582,7 @@ def _exec_task(fn, task, d, quieterr):
running it with its own local metadata, and with some useful variables set.
"""
if not d.getVarFlag(task, 'task', False):
- event.fire(TaskInvalid(task, d), d)
+ event.fire(TaskInvalid(task, fn, d), d)
logger.error("No such task: %s" % task)
return 1
diff --git a/poky/bitbake/lib/bb/codeparser.py b/poky/bitbake/lib/bb/codeparser.py
index 0cec452c00..3b3c3b41ff 100644
--- a/poky/bitbake/lib/bb/codeparser.py
+++ b/poky/bitbake/lib/bb/codeparser.py
@@ -195,6 +195,10 @@ class BufferedLogger(Logger):
self.target.handle(record)
self.buffer = []
+class DummyLogger():
+ def flush(self):
+ return
+
class PythonParser():
getvars = (".getVar", ".appendVar", ".prependVar", "oe.utils.conditional")
getvarflags = (".getVarFlag", ".appendVarFlag", ".prependVarFlag")
@@ -276,7 +280,9 @@ class PythonParser():
self.contains = {}
self.execs = set()
self.references = set()
- self.log = BufferedLogger('BitBake.Data.PythonParser', logging.DEBUG, log)
+ self._log = log
+ # Defer init as expensive
+ self.log = DummyLogger()
self.unhandled_message = "in call of %s, argument '%s' is not a string literal"
self.unhandled_message = "while parsing %s, %s" % (name, self.unhandled_message)
@@ -303,6 +309,9 @@ class PythonParser():
self.contains[i] = set(codeparsercache.pythoncacheextras[h].contains[i])
return
+ # Need to parse so take the hit on the real log buffer
+ self.log = BufferedLogger('BitBake.Data.PythonParser', logging.DEBUG, self._log)
+
# We can't add to the linenumbers for compile, we can pad to the correct number of blank lines though
node = "\n" * int(lineno) + node
code = compile(check_indent(str(node)), filename, "exec",
@@ -321,7 +330,11 @@ class ShellParser():
self.funcdefs = set()
self.allexecs = set()
self.execs = set()
- self.log = BufferedLogger('BitBake.Data.%s' % name, logging.DEBUG, log)
+ self._name = name
+ self._log = log
+ # Defer init as expensive
+ self.log = DummyLogger()
+
self.unhandled_template = "unable to handle non-literal command '%s'"
self.unhandled_template = "while parsing %s, %s" % (name, self.unhandled_template)
@@ -340,6 +353,9 @@ class ShellParser():
self.execs = set(codeparsercache.shellcacheextras[h].execs)
return self.execs
+ # Need to parse so take the hit on the real log buffer
+ self.log = BufferedLogger('BitBake.Data.%s' % self._name, logging.DEBUG, self._log)
+
self._parse_shell(value)
self.execs = set(cmd for cmd in self.allexecs if cmd not in self.funcdefs)
diff --git a/poky/bitbake/lib/bb/cooker.py b/poky/bitbake/lib/bb/cooker.py
index 0133a3278f..f435b18c87 100644
--- a/poky/bitbake/lib/bb/cooker.py
+++ b/poky/bitbake/lib/bb/cooker.py
@@ -253,6 +253,11 @@ class BBCooker:
return
if not event.pathname in self.configwatcher.bbwatchedfiles:
return
+ if "IN_ISDIR" in event.maskname:
+ if "IN_CREATE" in event.maskname:
+ self.add_filewatch([[event.pathname]], watcher=self.configwatcher, dirs=True)
+ elif "IN_DELETE" in event.maskname and event.pathname in self.watcher.bbseen:
+ self.configwatcher.bbseen.remove(event.pathname)
if not event.pathname in self.inotify_modified_files:
self.inotify_modified_files.append(event.pathname)
self.baseconfig_valid = False
@@ -266,6 +271,11 @@ class BBCooker:
if event.pathname.endswith("bitbake-cookerdaemon.log") \
or event.pathname.endswith("bitbake.lock"):
return
+ if "IN_ISDIR" in event.maskname:
+ if "IN_CREATE" in event.maskname:
+ self.add_filewatch([[event.pathname]], dirs=True)
+ elif "IN_DELETE" in event.maskname and event.pathname in self.watcher.bbseen:
+ self.watcher.bbseen.remove(event.pathname)
if not event.pathname in self.inotify_modified_files:
self.inotify_modified_files.append(event.pathname)
self.parsecache_valid = False
@@ -555,6 +565,8 @@ class BBCooker:
if not orig_tracking:
self.enableDataTracking()
self.reset()
+ # reset() resets to the UI requested value so we have to redo this
+ self.enableDataTracking()
def mc_base(p):
if p.startswith('mc:'):
@@ -1601,7 +1613,7 @@ class BBCooker:
if self.state in (state.shutdown, state.forceshutdown, state.error):
if hasattr(self.parser, 'shutdown'):
- self.parser.shutdown(clean=False, force = True)
+ self.parser.shutdown(clean=False)
self.parser.final_cleanup()
raise bb.BBHandledException()
@@ -1715,6 +1727,7 @@ class BBCooker:
def post_serve(self):
self.shutdown(force=True)
prserv.serv.auto_shutdown()
+ bb.parse.siggen.exit()
if self.hashserv:
self.hashserv.process.terminate()
self.hashserv.process.join()
@@ -1728,7 +1741,7 @@ class BBCooker:
self.state = state.shutdown
if self.parser:
- self.parser.shutdown(clean=not force, force=force)
+ self.parser.shutdown(clean=not force)
self.parser.final_cleanup()
def finishcommand(self):
@@ -1996,15 +2009,30 @@ class ParsingFailure(Exception):
Exception.__init__(self, realexception, recipe)
class Parser(multiprocessing.Process):
- def __init__(self, jobs, results, quit, init, profile):
+ def __init__(self, jobs, results, quit, profile):
self.jobs = jobs
self.results = results
self.quit = quit
- self.init = init
multiprocessing.Process.__init__(self)
self.context = bb.utils.get_context().copy()
self.handlers = bb.event.get_class_handlers().copy()
self.profile = profile
+ self.queue_signals = False
+ self.signal_received = []
+ self.signal_threadlock = threading.Lock()
+
+ def catch_sig(self, signum, frame):
+ if self.queue_signals:
+ self.signal_received.append(signum)
+ else:
+ self.handle_sig(signum, frame)
+
+ def handle_sig(self, signum, frame):
+ if signum == signal.SIGTERM:
+ signal.signal(signal.SIGTERM, signal.SIG_DFL)
+ os.kill(os.getpid(), signal.SIGTERM)
+ elif signum == signal.SIGINT:
+ signal.default_int_handler(signum, frame)
def run(self):
@@ -2024,36 +2052,48 @@ class Parser(multiprocessing.Process):
prof.dump_stats(logfile)
def realrun(self):
- if self.init:
- self.init()
+ # Signal handling here is hard. We must not terminate any process or thread holding the write
+ # lock for the event stream as it will not be released, ever, and things will hang.
+ # Python handles signals in the main thread/process but they can be raised from any thread and
+ # we want to defer processing of any SIGTERM/SIGINT signal until we're outside the critical section
+ # and don't hold the lock (see server/process.py). We therefore always catch the signals (so any
+ # new thread should also do so) and we defer handling but we handle with the local thread lock
+ # held (a threading lock, not a multiprocessing one) so that no other thread in the process
+ # can be in the critical section.
+ signal.signal(signal.SIGTERM, self.catch_sig)
+ signal.signal(signal.SIGHUP, signal.SIG_DFL)
+ signal.signal(signal.SIGINT, self.catch_sig)
+ bb.utils.set_process_name(multiprocessing.current_process().name)
+ multiprocessing.util.Finalize(None, bb.codeparser.parser_cache_save, exitpriority=1)
+ multiprocessing.util.Finalize(None, bb.fetch.fetcher_parse_save, exitpriority=1)
pending = []
- while True:
- try:
- self.quit.get_nowait()
- except queue.Empty:
- pass
- else:
- self.results.close()
- self.results.join_thread()
- break
-
- if pending:
- result = pending.pop()
- else:
+ try:
+ while True:
try:
- job = self.jobs.pop()
- except IndexError:
- self.results.close()
- self.results.join_thread()
+ self.quit.get_nowait()
+ except queue.Empty:
+ pass
+ else:
break
- result = self.parse(*job)
- # Clear the siggen cache after parsing to control memory usage, its huge
- bb.parse.siggen.postparsing_clean_cache()
- try:
- self.results.put(result, timeout=0.25)
- except queue.Full:
- pending.append(result)
+
+ if pending:
+ result = pending.pop()
+ else:
+ try:
+ job = self.jobs.pop()
+ except IndexError:
+ break
+ result = self.parse(*job)
+ # Clear the siggen cache after parsing to control memory usage, its huge
+ bb.parse.siggen.postparsing_clean_cache()
+ try:
+ self.results.put(result, timeout=0.25)
+ except queue.Full:
+ pending.append(result)
+ finally:
+ self.results.close()
+ self.results.join_thread()
def parse(self, mc, cache, filename, appends):
try:
@@ -2074,12 +2114,12 @@ class Parser(multiprocessing.Process):
tb = sys.exc_info()[2]
exc.recipe = filename
exc.traceback = list(bb.exceptions.extract_traceback(tb, context=3))
- return True, exc
+ return True, None, exc
# Need to turn BaseExceptions into Exceptions here so we gracefully shutdown
# and for example a worker thread doesn't just exit on its own in response to
# a SystemExit event for example.
except BaseException as exc:
- return True, ParsingFailure(exc, filename)
+ return True, None, ParsingFailure(exc, filename)
finally:
bb.event.LogHandler.filter = origfilter
@@ -2130,13 +2170,6 @@ class CookerParser(object):
self.processes = []
if self.toparse:
bb.event.fire(bb.event.ParseStarted(self.toparse), self.cfgdata)
- def init():
- signal.signal(signal.SIGTERM, signal.SIG_DFL)
- signal.signal(signal.SIGHUP, signal.SIG_DFL)
- signal.signal(signal.SIGINT, signal.SIG_IGN)
- bb.utils.set_process_name(multiprocessing.current_process().name)
- multiprocessing.util.Finalize(None, bb.codeparser.parser_cache_save, exitpriority=1)
- multiprocessing.util.Finalize(None, bb.fetch.fetcher_parse_save, exitpriority=1)
self.parser_quit = multiprocessing.Queue(maxsize=self.num_processes)
self.result_queue = multiprocessing.Queue()
@@ -2146,14 +2179,14 @@ class CookerParser(object):
self.jobs = chunkify(list(self.willparse), self.num_processes)
for i in range(0, self.num_processes):
- parser = Parser(self.jobs[i], self.result_queue, self.parser_quit, init, self.cooker.configuration.profile)
+ parser = Parser(self.jobs[i], self.result_queue, self.parser_quit, self.cooker.configuration.profile)
parser.start()
self.process_names.append(parser.name)
self.processes.append(parser)
self.results = itertools.chain(self.results, self.parse_generator())
- def shutdown(self, clean=True, force=False):
+ def shutdown(self, clean=True):
if not self.toparse:
return
if self.haveshutdown:
@@ -2168,7 +2201,7 @@ class CookerParser(object):
bb.event.fire(event, self.cfgdata)
else:
- bb.error("Parsing halted due to errors")
+ bb.error("Parsing halted due to errors, see error messages above")
for process in self.processes:
self.parser_quit.put(None)
@@ -2182,11 +2215,24 @@ class CookerParser(object):
break
for process in self.processes:
- if force:
- process.join(.1)
+ process.join(0.5)
+
+ for process in self.processes:
+ if process.exitcode is None:
+ os.kill(process.pid, signal.SIGINT)
+
+ for process in self.processes:
+ process.join(0.5)
+
+ for process in self.processes:
+ if process.exitcode is None:
process.terminate()
- else:
- process.join()
+
+ for process in self.processes:
+ process.join()
+ # Added in 3.7, cleans up zombies
+ if hasattr(process, "close"):
+ process.close()
self.parser_quit.close()
# Allow data left in the cancel queue to be discarded
@@ -2236,14 +2282,10 @@ class CookerParser(object):
result = self.result_queue.get(timeout=0.25)
except queue.Empty:
empty = True
- pass
+ yield None, None, None
else:
empty = False
- value = result[1]
- if isinstance(value, BaseException):
- raise value
- else:
- yield result
+ yield result
if not (self.parsed >= self.toparse):
raise bb.parse.ParseError("Not all recipes parsed, parser thread killed/died? Exiting.", None)
@@ -2254,24 +2296,31 @@ class CookerParser(object):
parsed = None
try:
parsed, mc, result = next(self.results)
+ if isinstance(result, BaseException):
+ # Turn exceptions back into exceptions
+ raise result
+ if parsed is None:
+ # Timeout, loop back through the main loop
+ return True
+
except StopIteration:
self.shutdown()
return False
except bb.BBHandledException as exc:
self.error += 1
logger.debug('Failed to parse recipe: %s' % exc.recipe)
- self.shutdown(clean=False, force=True)
+ self.shutdown(clean=False)
return False
except ParsingFailure as exc:
self.error += 1
logger.error('Unable to parse %s: %s' %
(exc.recipe, bb.exceptions.to_string(exc.realexception)))
- self.shutdown(clean=False, force=True)
+ self.shutdown(clean=False)
return False
except bb.parse.ParseError as exc:
self.error += 1
logger.error(str(exc))
- self.shutdown(clean=False, force=True)
+ self.shutdown(clean=False)
return False
except bb.data_smart.ExpansionError as exc:
self.error += 1
@@ -2280,7 +2329,7 @@ class CookerParser(object):
tb = list(itertools.dropwhile(lambda e: e.filename.startswith(bbdir), exc.traceback))
logger.error('ExpansionError during parsing %s', value.recipe,
exc_info=(etype, value, tb))
- self.shutdown(clean=False, force=True)
+ self.shutdown(clean=False)
return False
except Exception as exc:
self.error += 1
@@ -2292,7 +2341,7 @@ class CookerParser(object):
# Most likely, an exception occurred during raising an exception
import traceback
logger.error('Exception during parse: %s' % traceback.format_exc())
- self.shutdown(clean=False, force=True)
+ self.shutdown(clean=False)
return False
self.current += 1
diff --git a/poky/bitbake/lib/bb/data_smart.py b/poky/bitbake/lib/bb/data_smart.py
index 8d3825f398..dd20ca557e 100644
--- a/poky/bitbake/lib/bb/data_smart.py
+++ b/poky/bitbake/lib/bb/data_smart.py
@@ -152,6 +152,9 @@ class DataContext(dict):
self['d'] = metadata
def __missing__(self, key):
+ # Skip commonly accessed invalid variables
+ if key in ['bb', 'oe', 'int', 'bool', 'time', 'str', 'os']:
+ raise KeyError(key)
value = self.metadata.getVar(key)
if value is None or self.metadata.getVarFlag(key, 'func', False):
raise KeyError(key)
@@ -670,10 +673,11 @@ class DataSmart(MutableMapping):
self.varhistory.record(**loginfo)
self.setVar(newkey, val, ignore=True, parsing=True)
- for i in (__setvar_keyword__):
- src = self.getVarFlag(key, i, False)
- if src is None:
+ srcflags = self.getVarFlags(key, False, True) or {}
+ for i in srcflags:
+ if i not in (__setvar_keyword__):
continue
+ src = srcflags[i]
dest = self.getVarFlag(newkey, i, False) or []
dest.extend(src)
diff --git a/poky/bitbake/lib/bb/fetch2/git.py b/poky/bitbake/lib/bb/fetch2/git.py
index b3c5e6dacc..4d06a57198 100644
--- a/poky/bitbake/lib/bb/fetch2/git.py
+++ b/poky/bitbake/lib/bb/fetch2/git.py
@@ -462,7 +462,10 @@ class Git(FetchMethod):
logger.info("Creating tarball of git repository")
with create_atomic(ud.fullmirror) as tfile:
- runfetchcmd("tar -czf %s ." % tfile, d, workdir=ud.clonedir)
+ mtime = runfetchcmd("git log --all -1 --format=%cD", d,
+ quiet=True, workdir=ud.clonedir)
+ runfetchcmd("tar -czf %s --owner pokybuild --group users --mtime \"%s\" ."
+ % (tfile, mtime), d, workdir=ud.clonedir)
runfetchcmd("touch %s.done" % ud.fullmirror, d)
def clone_shallow_local(self, ud, dest, d):
diff --git a/poky/bitbake/lib/bb/fetch2/ssh.py b/poky/bitbake/lib/bb/fetch2/ssh.py
index 2c8557e1f8..484453088f 100644
--- a/poky/bitbake/lib/bb/fetch2/ssh.py
+++ b/poky/bitbake/lib/bb/fetch2/ssh.py
@@ -40,9 +40,9 @@ __pattern__ = re.compile(r'''
( # Optional username/password block
(?P<user>\S+) # username
(:(?P<pass>\S+))? # colon followed by the password (optional)
- )?
(?P<cparam>(;[^;]+)*)? # connection parameters block (optional)
@
+ )?
(?P<host>\S+?) # non-greedy match of the host
(:(?P<port>[0-9]+))? # colon followed by the port (optional)
/
@@ -96,6 +96,11 @@ class SSH(FetchMethod):
fr += '@%s' % host
else:
fr = host
+
+ if path[0] != '~':
+ path = '/%s' % path
+ path = path.replace("%3A", ":")
+
fr += ':%s' % path
cmd = 'scp -B -r %s %s %s/' % (
@@ -108,3 +113,43 @@ class SSH(FetchMethod):
runfetchcmd(cmd, d)
+ def checkstatus(self, fetch, urldata, d):
+ """
+ Check the status of the url
+ """
+ m = __pattern__.match(urldata.url)
+ path = m.group('path')
+ host = m.group('host')
+ port = m.group('port')
+ user = m.group('user')
+ password = m.group('pass')
+
+ if port:
+ portarg = '-P %s' % port
+ else:
+ portarg = ''
+
+ if user:
+ fr = user
+ if password:
+ fr += ':%s' % password
+ fr += '@%s' % host
+ else:
+ fr = host
+
+ if path[0] != '~':
+ path = '/%s' % path
+ path = path.replace("%3A", ":")
+
+ cmd = 'ssh -o BatchMode=true %s %s [ -f %s ]' % (
+ portarg,
+ fr,
+ path
+ )
+
+ check_network_access(d, cmd, urldata.url)
+
+ if runfetchcmd(cmd, d):
+ return True
+
+ return False
diff --git a/poky/bitbake/lib/bb/monitordisk.py b/poky/bitbake/lib/bb/monitordisk.py
index 8d8cfbb937..a1b910007d 100644
--- a/poky/bitbake/lib/bb/monitordisk.py
+++ b/poky/bitbake/lib/bb/monitordisk.py
@@ -78,7 +78,7 @@ def getDiskData(BBDirs):
action = pathSpaceInodeRe.group(1)
if action == "ABORT":
# Emit a deprecation warning
- logger.warnonce("The BB_DISKMON_DIRS \"ABORT\" action has been been renamed to \"HALT\", update configuration")
+ logger.warnonce("The BB_DISKMON_DIRS \"ABORT\" action has been renamed to \"HALT\", update configuration")
action = "HALT"
if action not in ("HALT", "STOPTASKS", "WARN"):
diff --git a/poky/bitbake/lib/bb/server/process.py b/poky/bitbake/lib/bb/server/process.py
index 1636616660..ce53fdc678 100644
--- a/poky/bitbake/lib/bb/server/process.py
+++ b/poky/bitbake/lib/bb/server/process.py
@@ -20,6 +20,7 @@ import os
import sys
import time
import select
+import signal
import socket
import subprocess
import errno
@@ -243,9 +244,6 @@ class ProcessServer():
ready = self.idle_commands(.1, fds)
- if len(threading.enumerate()) != 1:
- serverlog("More than one thread left?: " + str(threading.enumerate()))
-
serverlog("Exiting")
# Remove the socket file so we don't get any more connections to avoid races
try:
@@ -263,6 +261,9 @@ class ProcessServer():
self.cooker.post_serve()
+ if len(threading.enumerate()) != 1:
+ serverlog("More than one thread left?: " + str(threading.enumerate()))
+
# Flush logs before we release the lock
sys.stdout.flush()
sys.stderr.flush()
@@ -556,7 +557,7 @@ def execServer(lockfd, readypipeinfd, lockname, sockname, server_timeout, xmlrpc
server.run()
finally:
- # Flush any ,essages/errors to the logfile before exit
+ # Flush any messages/errors to the logfile before exit
sys.stdout.flush()
sys.stderr.flush()
@@ -737,11 +738,28 @@ class ConnectionWriter(object):
# Why bb.event needs this I have no idea
self.event = self
- def send(self, obj):
- obj = multiprocessing.reduction.ForkingPickler.dumps(obj)
+ def _send(self, obj):
with self.wlock:
self.writer.send_bytes(obj)
+ def send(self, obj):
+ obj = multiprocessing.reduction.ForkingPickler.dumps(obj)
+ # See notes/code in CookerParser
+ # We must not terminate holding this lock else processes will hang.
+ # For SIGTERM, raising afterwards avoids this.
+ # For SIGINT, we don't want to have written partial data to the pipe.
+ # pthread_sigmask block/unblock would be nice but doesn't work, https://bugs.python.org/issue47139
+ process = multiprocessing.current_process()
+ if process and hasattr(process, "queue_signals"):
+ with process.signal_threadlock:
+ process.queue_signals = True
+ self._send(obj)
+ process.queue_signals = False
+ for sig in process.signal_received.pop():
+ process.handle_sig(sig, None)
+ else:
+ self._send(obj)
+
def fileno(self):
return self.writer.fileno()
diff --git a/poky/bitbake/lib/bb/server/xmlrpcserver.py b/poky/bitbake/lib/bb/server/xmlrpcserver.py
index 2fa71be667..01f55538ae 100644
--- a/poky/bitbake/lib/bb/server/xmlrpcserver.py
+++ b/poky/bitbake/lib/bb/server/xmlrpcserver.py
@@ -11,6 +11,7 @@ import hashlib
import time
import inspect
from xmlrpc.server import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
+import bb.server.xmlrpcclient
import bb
diff --git a/poky/bitbake/lib/bb/siggen.py b/poky/bitbake/lib/bb/siggen.py
index ebba452592..1612b4efa1 100644
--- a/poky/bitbake/lib/bb/siggen.py
+++ b/poky/bitbake/lib/bb/siggen.py
@@ -156,6 +156,9 @@ class SignatureGenerator(object):
return DataCacheProxy()
+ def exit(self):
+ return
+
class SignatureGeneratorBasic(SignatureGenerator):
"""
"""
@@ -489,6 +492,18 @@ class SignatureGeneratorUniHashMixIn(object):
self._client = hashserv.create_client(self.server)
return self._client
+ def reset(self, data):
+ if getattr(self, '_client', None) is not None:
+ self._client.close()
+ self._client = None
+ return super().reset(data)
+
+ def exit(self):
+ if getattr(self, '_client', None) is not None:
+ self._client.close()
+ self._client = None
+ return super().exit()
+
def get_stampfile_hash(self, tid):
if tid in self.taskhash:
# If a unique hash is reported, use it as the stampfile hash. This
@@ -1002,7 +1017,7 @@ def compare_sigfiles(a, b, recursecb=None, color=False, collapsed=False):
if changed:
for dep in sorted(changed):
if not collapsed:
- output.append(color_format("{color_title}Hash for dependent task %s changed{color_default} from %s to %s") % (clean_basepath(dep), a[dep], b[dep]))
+ output.append(color_format("{color_title}Hash for task dependency %s changed{color_default} from %s to %s") % (clean_basepath(dep), a[dep], b[dep]))
if callable(recursecb):
recout = recursecb(dep, a[dep], b[dep])
if recout:
diff --git a/poky/bitbake/lib/bb/tests/fetch.py b/poky/bitbake/lib/bb/tests/fetch.py
index eff12b7c50..233ecae737 100644
--- a/poky/bitbake/lib/bb/tests/fetch.py
+++ b/poky/bitbake/lib/bb/tests/fetch.py
@@ -11,6 +11,7 @@ import hashlib
import tempfile
import collections
import os
+import tarfile
from bb.fetch2 import URI
from bb.fetch2 import FetchMethod
import bb
@@ -628,6 +629,35 @@ class GitShallowTarballNamingTest(FetcherTest):
self.assertIn(self.mirror_tarball, dir)
+class CleanTarballTest(FetcherTest):
+ def setUp(self):
+ super(CleanTarballTest, self).setUp()
+ self.recipe_url = "git://git.openembedded.org/bitbake"
+ self.recipe_tarball = "git2_git.openembedded.org.bitbake.tar.gz"
+
+ self.d.setVar('BB_GENERATE_MIRROR_TARBALLS', '1')
+ self.d.setVar('SRCREV', '82ea737a0b42a8b53e11c9cde141e9e9c0bd8c40')
+
+ @skipIfNoNetwork()
+ def test_that_the_tarball_contents_does_not_leak_info(self):
+ fetcher = bb.fetch.Fetch([self.recipe_url], self.d)
+
+ fetcher.download()
+
+ fetcher.unpack(self.unpackdir)
+ mtime = bb.process.run('git log --all -1 --format=%ct',
+ cwd=os.path.join(self.unpackdir, 'git'))
+ self.assertEqual(len(mtime), 2)
+ mtime = int(mtime[0])
+
+ archive = tarfile.open(os.path.join(self.dldir, self.recipe_tarball))
+ self.assertNotEqual(len(archive.members), 0)
+ for member in archive.members:
+ self.assertEqual(member.uname, 'pokybuild')
+ self.assertEqual(member.gname, 'users')
+ self.assertEqual(member.mtime, mtime)
+
+
class FetcherLocalTest(FetcherTest):
def setUp(self):
def touch(fn):
diff --git a/poky/bitbake/lib/bb/tinfoil.py b/poky/bitbake/lib/bb/tinfoil.py
index 02c0bab600..e68a3b879a 100644
--- a/poky/bitbake/lib/bb/tinfoil.py
+++ b/poky/bitbake/lib/bb/tinfoil.py
@@ -448,7 +448,7 @@ class Tinfoil:
self.run_actions(config_params)
self.recipes_parsed = True
- def run_command(self, command, *params):
+ def run_command(self, command, *params, handle_events=True):
"""
Run a command on the server (as implemented in bb.command).
Note that there are two types of command - synchronous and
@@ -468,7 +468,7 @@ class Tinfoil:
try:
result = self.server_connection.connection.runCommand(commandline)
finally:
- while True:
+ while handle_events:
event = self.wait_event()
if not event:
break
diff --git a/poky/bitbake/lib/bb/ui/buildinfohelper.py b/poky/bitbake/lib/bb/ui/buildinfohelper.py
index 835e92c299..0761f73b3b 100644
--- a/poky/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/poky/bitbake/lib/bb/ui/buildinfohelper.py
@@ -227,6 +227,12 @@ class ORMWrapper(object):
build.completed_on = timezone.now()
build.outcome = outcome
build.save()
+
+ # We force a sync point here to force the outcome status commit,
+ # which resolves a race condition with the build completion takedown
+ transaction.set_autocommit(True)
+ transaction.set_autocommit(False)
+
signal_runbuilds()
def update_target_set_license_manifest(self, target, license_manifest_path):
@@ -893,9 +899,6 @@ class BuildInfoHelper(object):
self.task_order = 0
self.autocommit_step = 1
self.server = server
- # we use manual transactions if the database doesn't autocommit on us
- if not connection.features.autocommits_when_autocommit_is_off:
- transaction.set_autocommit(False)
self.orm_wrapper = ORMWrapper()
self.has_build_history = has_build_history
self.tmp_dir = self.server.runCommand(["getVariable", "TMPDIR"])[0]
@@ -1313,12 +1316,11 @@ class BuildInfoHelper(object):
task_information['outcome'] = Task.OUTCOME_FAILED
del self.internal_state['taskdata'][identifier]
- if not connection.features.autocommits_when_autocommit_is_off:
- # we force a sync point here, to get the progress bar to show
- if self.autocommit_step % 3 == 0:
- transaction.set_autocommit(True)
- transaction.set_autocommit(False)
- self.autocommit_step += 1
+ # we force a sync point here, to get the progress bar to show
+ if self.autocommit_step % 3 == 0:
+ transaction.set_autocommit(True)
+ transaction.set_autocommit(False)
+ self.autocommit_step += 1
self.orm_wrapper.get_update_task_object(task_information, True) # must exist
@@ -1990,8 +1992,6 @@ class BuildInfoHelper(object):
# Do not skip command line build events
self.store_log_event(tempevent,False)
- if not connection.features.autocommits_when_autocommit_is_off:
- transaction.set_autocommit(True)
# unset the brbe; this is to prevent subsequent command-line builds
# being incorrectly attached to the previous Toaster-triggered build;
diff --git a/poky/bitbake/lib/bb/ui/knotty.py b/poky/bitbake/lib/bb/ui/knotty.py
index 528b8a0760..b2e7520ee7 100644
--- a/poky/bitbake/lib/bb/ui/knotty.py
+++ b/poky/bitbake/lib/bb/ui/knotty.py
@@ -228,7 +228,9 @@ class TerminalFilter(object):
def keepAlive(self, t):
if not self.cuu:
- print("Bitbake still alive (%ds)" % t)
+ print("Bitbake still alive (no events for %ds). Active tasks:" % t)
+ for t in self.helper.running_tasks:
+ print(t)
sys.stdout.flush()
def updateFooter(self):
@@ -272,29 +274,39 @@ class TerminalFilter(object):
tasks.append("%s (pid %s)" % (activetasks[t]["title"], activetasks[t]["pid"]))
if self.main.shutdown:
- content = "Waiting for %s running tasks to finish:" % len(activetasks)
+ content = pluralise("Waiting for %s running task to finish",
+ "Waiting for %s running tasks to finish", len(activetasks))
+ if not self.quiet:
+ content += ':'
print(content)
else:
+ scene_tasks = "%s of %s" % (self.helper.setscene_current, self.helper.setscene_total)
+ cur_tasks = "%s of %s" % (self.helper.tasknumber_current, self.helper.tasknumber_total)
+
+ content = ''
+ if not self.quiet:
+ msg = "Setscene tasks: %s" % scene_tasks
+ content += msg + "\n"
+ print(msg)
+
if self.quiet:
- content = "Running tasks (%s of %s/%s of %s)" % (self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total)
+ msg = "Running tasks (%s, %s)" % (scene_tasks, cur_tasks)
elif not len(activetasks):
- content = "No currently running tasks (%s of %s/%s of %s)" % (self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total)
+ msg = "No currently running tasks (%s)" % cur_tasks
else:
- content = "Currently %2s running tasks (%s of %s/%s of %s)" % (len(activetasks), self.helper.setscene_current, self.helper.setscene_total, self.helper.tasknumber_current, self.helper.tasknumber_total)
+ msg = "Currently %2s running tasks (%s)" % (len(activetasks), cur_tasks)
maxtask = self.helper.tasknumber_total
if not self.main_progress or self.main_progress.maxval != maxtask:
widgets = [' ', progressbar.Percentage(), ' ', progressbar.Bar()]
self.main_progress = BBProgress("Running tasks", maxtask, widgets=widgets, resize_handler=self.sigwinch_handle)
self.main_progress.start(False)
- self.main_progress.setmessage(content)
- progress = self.helper.tasknumber_current - 1
- if progress < 0:
- progress = 0
- content = self.main_progress.update(progress)
+ self.main_progress.setmessage(msg)
+ progress = max(0, self.helper.tasknumber_current - 1)
+ content += self.main_progress.update(progress)
print('')
- lines = 1 + int(len(content) / (self.columns + 1))
- if self.quiet == 0:
- for tasknum, task in enumerate(tasks[:(self.rows - 2)]):
+ lines = self.getlines(content)
+ if not self.quiet:
+ for tasknum, task in enumerate(tasks[:(self.rows - 1 - lines)]):
if isinstance(task, tuple):
pbar, progress, rate, start_time = task
if not pbar.start_time:
@@ -311,11 +323,17 @@ class TerminalFilter(object):
else:
content = "%s: %s" % (tasknum, task)
print(content)
- lines = lines + 1 + int(len(content) / (self.columns + 1))
+ lines = lines + self.getlines(content)
self.footer_present = lines
self.lastpids = runningpids[:]
self.lastcount = self.helper.tasknumber_current
+ def getlines(self, content):
+ lines = 0
+ for line in content.split("\n"):
+ lines = lines + 1 + int(len(line) / (self.columns + 1))
+ return lines
+
def finish(self):
if self.stdinbackup:
fd = sys.stdin.fileno()
@@ -605,7 +623,8 @@ def main(server, eventHandler, params, tf = TerminalFilter):
warnings = 0
taskfailures = []
- printinterval = 5000
+ printintervaldelta = 10 * 60 # 10 minutes
+ printinterval = printintervaldelta
lastprint = time.time()
termfilter = tf(main, helper, console_handlers, params.options.quiet)
@@ -615,7 +634,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
try:
if (lastprint + printinterval) <= time.time():
termfilter.keepAlive(printinterval)
- printinterval += 5000
+ printinterval += printintervaldelta
event = eventHandler.waitEvent(0)
if event is None:
if main.shutdown > 1:
@@ -646,7 +665,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
if isinstance(event, logging.LogRecord):
lastprint = time.time()
- printinterval = 5000
+ printinterval = printintervaldelta
if event.levelno >= bb.msg.BBLogFormatter.ERRORONCE:
errors = errors + 1
return_value = 1
diff --git a/poky/bitbake/lib/bb/ui/uievent.py b/poky/bitbake/lib/bb/ui/uievent.py
index e19c770bc9..d595f172ac 100644
--- a/poky/bitbake/lib/bb/ui/uievent.py
+++ b/poky/bitbake/lib/bb/ui/uievent.py
@@ -44,7 +44,7 @@ class BBUIEventQueue:
for count_tries in range(5):
ret = self.BBServer.registerEventHandler(self.host, self.port)
- if isinstance(ret, collections.Iterable):
+ if isinstance(ret, collections.abc.Iterable):
self.EventHandle, error = ret
else:
self.EventHandle = ret
diff --git a/poky/bitbake/lib/bb/utils.py b/poky/bitbake/lib/bb/utils.py
index 2e8256101a..d11da978d7 100644
--- a/poky/bitbake/lib/bb/utils.py
+++ b/poky/bitbake/lib/bb/utils.py
@@ -453,13 +453,16 @@ def lockfile(name, shared=False, retry=True, block=False):
consider the possibility of sending a signal to the process to break
out - at which point you want block=True rather than retry=True.
"""
- if len(name) > 255:
- root, ext = os.path.splitext(name)
- name = root[:255 - len(ext)] + ext
+ basename = os.path.basename(name)
+ if len(basename) > 255:
+ root, ext = os.path.splitext(basename)
+ basename = root[:255 - len(ext)] + ext
dirname = os.path.dirname(name)
mkdirhier(dirname)
+ name = os.path.join(dirname, basename)
+
if not os.access(dirname, os.W_OK):
logger.error("Unable to acquire lock '%s', directory is not writable",
name)
@@ -538,7 +541,7 @@ def md5_file(filename):
Return the hex string representation of the MD5 checksum of filename.
"""
import hashlib
- return _hasher(hashlib.md5(), filename)
+ return _hasher(hashlib.new('MD5', usedforsecurity=False), filename)
def sha256_file(filename):
"""
diff --git a/poky/bitbake/lib/ply/yacc.py b/poky/bitbake/lib/ply/yacc.py
index 46e7dc96f6..767c4e4674 100644
--- a/poky/bitbake/lib/ply/yacc.py
+++ b/poky/bitbake/lib/ply/yacc.py
@@ -2797,11 +2797,8 @@ class ParserReflect(object):
# Compute a signature over the grammar
def signature(self):
try:
- from hashlib import md5
- except ImportError:
- from md5 import md5
- try:
- sig = md5()
+ import hashlib
+ sig = hashlib.new('MD5', usedforsecurity=False)
if self.start:
sig.update(self.start.encode('latin-1'))
if self.prec:
diff --git a/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
index 19f659ec41..834e32b36f 100644
--- a/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -180,6 +180,77 @@ class Command(BaseCommand):
except Exception as e:
logger.warning("runbuilds: schedule exception %s" % str(e))
+ # Test to see if a build pre-maturely died due to a bitbake crash
+ def check_dead_builds(self):
+ do_cleanup = False
+ try:
+ for br in BuildRequest.objects.filter(state=BuildRequest.REQ_INPROGRESS):
+ # Get the build directory
+ if br.project.builddir:
+ builddir = br.project.builddir
+ else:
+ builddir = '%s-toaster-%d' % (br.environment.builddir,br.project.id)
+ # Check log to see if there is a recent traceback
+ toaster_ui_log = os.path.join(builddir, 'toaster_ui.log')
+ test_file = os.path.join(builddir, '._toaster_check.txt')
+ os.system("tail -n 50 %s > %s" % (os.path.join(builddir, 'toaster_ui.log'),test_file))
+ traceback_text = ''
+ is_traceback = False
+ with open(test_file,'r') as test_file_fd:
+ test_file_tail = test_file_fd.readlines()
+ for line in test_file_tail:
+ if line.startswith('Traceback (most recent call last):'):
+ traceback_text = line
+ is_traceback = True
+ elif line.startswith('NOTE: ToasterUI waiting for events'):
+ # Ignore any traceback before new build start
+ traceback_text = ''
+ is_traceback = False
+ elif line.startswith('Note: Toaster traceback auto-stop'):
+ # Ignore any traceback before this previous traceback catch
+ traceback_text = ''
+ is_traceback = False
+ elif is_traceback:
+ traceback_text += line
+ # Test the results
+ is_stop = False
+ if is_traceback:
+ # Found a traceback
+ errtype = 'Bitbake crash'
+ errmsg = 'Bitbake crash\n' + traceback_text
+ state = BuildRequest.REQ_FAILED
+ # Clean up bitbake files
+ bitbake_lock = os.path.join(builddir, 'bitbake.lock')
+ if os.path.isfile(bitbake_lock):
+ os.remove(bitbake_lock)
+ bitbake_sock = os.path.join(builddir, 'bitbake.sock')
+ if os.path.isfile(bitbake_sock):
+ os.remove(bitbake_sock)
+ if os.path.isfile(test_file):
+ os.remove(test_file)
+ # Add note to ignore this traceback on next check
+ os.system('echo "Note: Toaster traceback auto-stop" >> %s' % toaster_ui_log)
+ is_stop = True
+ # Add more tests here
+ #elif ...
+ # Stop the build request?
+ if is_stop:
+ brerror = BRError(
+ req = br,
+ errtype = errtype,
+ errmsg = errmsg,
+ traceback = traceback_text,
+ )
+ brerror.save()
+ br.state = state
+ br.save()
+ do_cleanup = True
+ # Do cleanup
+ if do_cleanup:
+ self.cleanup()
+ except Exception as e:
+ logger.error("runbuilds: Error in check_dead_builds %s" % e)
+
def handle(self, **options):
pidfile_path = os.path.join(os.environ.get("BUILDDIR", "."),
".runbuilds.pid")
@@ -187,10 +258,18 @@ class Command(BaseCommand):
with open(pidfile_path, 'w') as pidfile:
pidfile.write("%s" % os.getpid())
+ # Clean up any stale/failed builds from previous Toaster run
self.runbuild()
signal.signal(signal.SIGUSR1, lambda sig, frame: None)
while True:
- signal.pause()
- self.runbuild()
+ sigset = signal.sigtimedwait([signal.SIGUSR1], 5)
+ if sigset:
+ for sig in sigset:
+ # Consume each captured pending event
+ self.runbuild()
+ else:
+ # Check for build exceptions
+ self.check_dead_builds()
+
diff --git a/poky/bitbake/lib/toaster/bldcontrol/migrations/0008_models_bigautofield.py b/poky/bitbake/lib/toaster/bldcontrol/migrations/0008_models_bigautofield.py
new file mode 100644
index 0000000000..45b477d02c
--- /dev/null
+++ b/poky/bitbake/lib/toaster/bldcontrol/migrations/0008_models_bigautofield.py
@@ -0,0 +1,48 @@
+# Generated by Django 3.2.12 on 2022-03-06 03:28
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('bldcontrol', '0007_brlayers_optional_gitinfo'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='brbitbake',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='brerror',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='brlayer',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='brtarget',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='brvariable',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='buildenvironment',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='buildrequest',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ ]
diff --git a/poky/bitbake/lib/toaster/orm/fixtures/gen_fixtures.py b/poky/bitbake/lib/toaster/orm/fixtures/gen_fixtures.py
new file mode 100755
index 0000000000..0d5f4533bf
--- /dev/null
+++ b/poky/bitbake/lib/toaster/orm/fixtures/gen_fixtures.py
@@ -0,0 +1,445 @@
+#!/usr/bin/env python3
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# Generate Toaster Fixtures for 'poky.xml' and 'oe-core.xml'
+#
+# Copyright (C) 2022 Wind River Systems
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Edit the 'current_releases' table for each new release cycle
+#
+# Usage: ./get_fixtures all
+#
+
+import os
+import sys
+import argparse
+
+verbose = False
+
+####################################
+# Releases
+#
+# https://wiki.yoctoproject.org/wiki/Releases
+#
+# NOTE: for the current releases table, it helps to keep continuing releases
+# in the same table positions since this minimizes the patch diff for review.
+# The order of the table does not matter since Toaster presents them sorted.
+#
+# Traditionally, the two most current releases are included in addition to the
+# 'master' branch and the local installation's 'HEAD'.
+# It is also policy to include all active LTS releases.
+#
+
+# [Codename, Yocto Project Version, Release Date, Current Version, Support Level, Poky Version, BitBake branch]
+current_releases = [
+ # Release slot #1
+ ['Kirkstone','3.5','April 2022','','Future - Long Term Support (until Apr. 2024)','27.0','1.54'],
+# ['Dunfell','3.1','April 2021','3.1.5 (March 2022)','Stable - Support for 13 months (until Apr. 2022)','23.0','1.46'],
+ # Release slot #2 'local'
+ ['HEAD','HEAD','','Local Yocto Project','HEAD','','HEAD'],
+ # Release slot #3 'master'
+ ['Master','master','','Yocto Project master','master','','master'],
+ # Release slot #4
+ ['Honister','3.4','October 2021','3.4.2 (February 2022)','Support for 7 months (until May 2022)','26.0','1.52'],
+# ['Gatesgarth','3.2','Oct 2020','3.2.4 (May 2021)','EOL','24.0','1.48'],
+ # Optional Release slot #4
+ ['Hardknott','3.3','April 2021','3.3.5 (March 2022)','Stable - Support for 13 months (until Apr. 2022)','25.0','1.50'],
+]
+
+default_poky_layers = [
+ 'openembedded-core',
+ 'meta-poky',
+ 'meta-yocto-bsp',
+]
+
+default_oe_core_layers = [
+ 'openembedded-core',
+]
+
+####################################
+# Templates
+
+prolog_template = '''\
+<?xml version="1.0" encoding="utf-8"?>
+<django-objects version="1.0">
+ <!-- Set the project default value for DISTRO -->
+ <object model="orm.toastersetting" pk="1">
+ <field type="CharField" name="name">DEFCONF_DISTRO</field>
+ <field type="CharField" name="value">{{distro}}</field>
+ </object>
+'''
+
+#<!-- Bitbake versions which correspond to the metadata release -->')
+bitbakeversion_poky_template = '''\
+ <object model="orm.bitbakeversion" pk="{{bitbake_id}}">
+ <field type="CharField" name="name">{{name}}</field>
+ <field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field>
+ <field type="CharField" name="branch">{{branch}}</field>
+ <field type="CharField" name="dirpath">bitbake</field>
+ </object>
+'''
+bitbakeversion_oecore_template = '''\
+ <object model="orm.bitbakeversion" pk="{{bitbake_id}}">
+ <field type="CharField" name="name">{{name}}</field>
+ <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
+ <field type="CharField" name="branch">{{bitbakeversion}}</field>
+ </object>
+'''
+
+# <!-- Releases available -->
+releases_available_template = '''\
+ <object model="orm.release" pk="{{ra_count}}">
+ <field type="CharField" name="name">{{name}}</field>
+ <field type="CharField" name="description">{{description}}</field>
+ <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">{{ra_count}}</field>
+ <field type="CharField" name="branch_name">{{release}}</field>
+ <field type="TextField" name="helptext">Toaster will run your builds {{help_source}}.</field>
+ </object>
+'''
+
+# <!-- Default project layers for each release -->
+default_layers_template = '''\
+ <object model="orm.releasedefaultlayer" pk="{{rdl_count}}">
+ <field rel="ManyToOneRel" to="orm.release" name="release">{{release_id}}</field>
+ <field type="CharField" name="layer_name">{{layer}}</field>
+ </object>
+'''
+
+default_layers_preface = '''\
+ <!-- Default layers provided by poky
+ openembedded-core
+ meta-poky
+ meta-yocto-bsp
+ -->
+'''
+
+layer_poky_template = '''\
+ <object model="orm.layer" pk="{{layer_id}}">
+ <field type="CharField" name="name">{{layer}}</field>
+ <field type="CharField" name="layer_index_url"></field>
+ <field type="CharField" name="vcs_url">{{vcs_url}}</field>
+ <field type="CharField" name="vcs_web_url">{{vcs_web_url}}</field>
+ <field type="CharField" name="vcs_web_tree_base_url">{{vcs_web_tree_base_url}}</field>
+ <field type="CharField" name="vcs_web_file_base_url">{{vcs_web_file_base_url}}</field>
+ </object>
+'''
+
+layer_oe_core_template = '''\
+ <object model="orm.layer" pk="{{layer_id}}">
+ <field type="CharField" name="name">{{layer}}</field>
+ <field type="CharField" name="vcs_url">{{vcs_url}}</field>
+ <field type="CharField" name="vcs_web_url">{{vcs_web_url}}</field>
+ <field type="CharField" name="vcs_web_tree_base_url">{{vcs_web_tree_base_url}}</field>
+ <field type="CharField" name="vcs_web_file_base_url">{{vcs_web_file_base_url}}</field>
+ </object>
+'''
+
+layer_version_template = '''\
+ <object model="orm.layer_version" pk="{{lv_count}}">
+ <field rel="ManyToOneRel" to="orm.layer" name="layer">{{layer_id}}</field>
+ <field type="IntegerField" name="layer_source">0</field>
+ <field rel="ManyToOneRel" to="orm.release" name="release">{{release_id}}</field>
+ <field type="CharField" name="branch">{{branch}}</field>
+ <field type="CharField" name="dirpath">{{dirpath}}</field>
+ </object>
+'''
+
+layer_version_HEAD_template = '''\
+ <object model="orm.layer_version" pk="{{lv_count}}">
+ <field rel="ManyToOneRel" to="orm.layer" name="layer">{{layer_id}}</field>
+ <field type="IntegerField" name="layer_source">0</field>
+ <field rel="ManyToOneRel" to="orm.release" name="release">{{release_id}}</field>
+ <field type="CharField" name="branch">{{branch}}</field>
+ <field type="CharField" name="commit">{{commit}}</field>
+ <field type="CharField" name="dirpath">{{dirpath}}</field>
+ </object>
+'''
+
+layer_version_oe_core_template = '''\
+ <object model="orm.layer_version" pk="1">
+ <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
+ <field rel="ManyToOneRel" to="orm.release" name="release">2</field>
+ <field type="CharField" name="local_path">OE-CORE-LAYER-DIR</field>
+ <field type="CharField" name="branch">HEAD</field>
+ <field type="CharField" name="dirpath">meta</field>
+ <field type="IntegerField" name="layer_source">0</field>
+ </object>
+'''
+
+epilog_template = '''\
+</django-objects>
+'''
+
+#################################
+# Helper Routines
+#
+
+def print_str(str,fd):
+ # Avoid extra newline at end
+ if str and (str[-1] == '\n'):
+ str = str[0:-1]
+ print(str,file=fd)
+
+def print_template(template,params,fd):
+ for line in template.split('\n'):
+ p = line.find('{{')
+ while p > 0:
+ q = line.find('}}')
+ key = line[p+2:q]
+ if key in params:
+ line = line[0:p] + params[key] + line[q+2:]
+ else:
+ line = line[0:p] + '?' + key + '?' + line[q+2:]
+ p = line.find('{{')
+ if line:
+ print(line,file=fd)
+
+#################################
+# Generate poky.xml
+#
+
+def generate_poky():
+ fd = open('poky.xml','w')
+
+ params = {}
+ params['distro'] = 'poky'
+ print_template(prolog_template,params,fd)
+ print_str('',fd)
+
+ print_str(' <!-- Bitbake versions which correspond to the metadata release -->',fd)
+ for i,release in enumerate(current_releases):
+ params = {}
+ params['release'] = release[0]
+ params['Release'] = release[0]
+ params['release_version'] = release[1]
+ if not (params['release'] in ('HEAD')): # 'master',
+ params['release'] = params['release'][0].lower() + params['release'][1:]
+ params['name'] = params['release']
+ params['bitbake_id'] = str(i+1)
+ params['branch'] = params['release']
+ print_template(bitbakeversion_poky_template,params,fd)
+ print_str('',fd)
+
+ print_str('',fd)
+ print_str(' <!-- Releases available -->',fd)
+ for i,release in enumerate(current_releases):
+ params = {}
+ params['release'] = release[0]
+ params['Release'] = release[0]
+ params['release_version'] = release[1]
+ if not (params['release'] in ('HEAD')): #'master',
+ params['release'] = params['release'][0].lower() + params['release'][1:]
+ params['h_release'] = '?h={{release}}'
+ params['name'] = params['release']
+ params['ra_count'] = str(i+1)
+ params['branch'] = params['release']
+
+ if 'HEAD' == params['release']:
+ params['help_source'] = 'with the version of the Yocto Project you have cloned or downloaded to your computer'
+ params['description'] = 'Local Yocto Project'
+ params['name'] = 'local'
+ else:
+ params['help_source'] = 'using the tip of the &lt;a href="https://git.yoctoproject.org/cgit/cgit.cgi/poky/log/{{h_release}}"&gt;Yocto Project {{Release}} branch&lt;/a&gt;'
+ params['description'] = 'Yocto Project {{release_version}} "{{Release}}"'
+ if 'master' == params['release']:
+ params['h_release'] = ''
+ params['description'] = 'Yocto Project master'
+
+ print_template(releases_available_template,params,fd)
+ print_str('',fd)
+
+ print_str(' <!-- Default project layers for each release -->',fd)
+ rdl_count = 1
+ for i,release in enumerate(current_releases):
+ for j,layer in enumerate(default_poky_layers):
+ params = {}
+ params['layer'] = layer
+ params['release'] = release[0]
+ params['Release'] = release[0]
+ params['release_version'] = release[1]
+ if not (params['release'] in ('master','HEAD')):
+ params['release'] = params['release'][0].lower() + params['release'][1:]
+ params['release_id'] = str(i+1)
+ params['rdl_count'] = str(rdl_count)
+ params['branch'] = params['release']
+ print_template(default_layers_template,params,fd)
+ rdl_count += 1
+ print_str('',fd)
+
+ print_str(default_layers_preface,fd)
+ lv_count = 1
+ for i,layer in enumerate(default_poky_layers):
+ params = {}
+ params['layer'] = layer
+ params['layer_id'] = str(i+1)
+ params['vcs_url'] = 'git://git.yoctoproject.org/poky'
+ params['vcs_web_url'] = 'https://git.yoctoproject.org/cgit/cgit.cgi/poky'
+ params['vcs_web_tree_base_url'] = 'https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%'
+ params['vcs_web_file_base_url'] = 'https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%'
+
+ if i:
+ print_str('',fd)
+ print_template(layer_poky_template,params,fd)
+ for j,release in enumerate(current_releases):
+ params['release'] = release[0]
+ params['Release'] = release[0]
+ params['release_version'] = release[1]
+ if not (params['release'] in ('master','HEAD')):
+ params['release'] = params['release'][0].lower() + params['release'][1:]
+ params['release_id'] = str(j+1)
+ params['lv_count'] = str(lv_count)
+ params['branch'] = params['release']
+ params['commit'] = params['release']
+
+ params['dirpath'] = params['layer']
+ if params['layer'] in ('openembedded-core'): #'openembedded-core',
+ params['dirpath'] = 'meta'
+
+ if 'HEAD' == params['release']:
+ print_template(layer_version_HEAD_template,params,fd)
+ else:
+ print_template(layer_version_template,params,fd)
+ lv_count += 1
+
+ print_str(epilog_template,fd)
+ fd.close()
+
+#################################
+# Generate oe-core.xml
+#
+
+def generate_oe_core():
+ fd = open('oe-core.xml','w')
+
+ params = {}
+ params['distro'] = 'nodistro'
+ print_template(prolog_template,params,fd)
+ print_str('',fd)
+
+ print_str(' <!-- Bitbake versions which correspond to the metadata release -->',fd)
+ for i,release in enumerate(current_releases):
+ params = {}
+ params['release'] = release[0]
+ params['Release'] = release[0]
+ params['bitbakeversion'] = release[6]
+ params['release_version'] = release[1]
+ if not (params['release'] in ('HEAD')): # 'master',
+ params['release'] = params['release'][0].lower() + params['release'][1:]
+ params['name'] = params['release']
+ params['bitbake_id'] = str(i+1)
+ params['branch'] = params['release']
+ print_template(bitbakeversion_oecore_template,params,fd)
+ print_str('',fd)
+
+ print_str(' <!-- Releases available -->',fd)
+ for i,release in enumerate(current_releases):
+ params = {}
+ params['release'] = release[0]
+ params['Release'] = release[0]
+ params['release_version'] = release[1]
+ if not (params['release'] in ('HEAD')): #'master',
+ params['release'] = params['release'][0].lower() + params['release'][1:]
+ params['h_release'] = '?h={{release}}'
+ params['name'] = params['release']
+ params['ra_count'] = str(i+1)
+ params['branch'] = params['release']
+
+ if 'HEAD' == params['release']:
+ params['help_source'] = 'with the version of OpenEmbedded that you have cloned or downloaded to your computer'
+ params['description'] = 'Local Openembedded'
+ params['name'] = 'local'
+ else:
+ params['help_source'] = 'using the tip of the &lt;a href=\\"https://cgit.openembedded.org/openembedded-core/log/{{h_release}}\\"&gt;OpenEmbedded {{Release}}&lt;/a&gt; branch'
+ params['description'] = 'Openembedded {{Release}}'
+ if 'master' == params['release']:
+ params['h_release'] = ''
+ params['description'] = 'OpenEmbedded core master'
+ params['Release'] = params['release']
+
+ print_template(releases_available_template,params,fd)
+ print_str('',fd)
+
+ print_str(' <!-- Default layers for each release -->',fd)
+ rdl_count = 1
+ for i,release in enumerate(current_releases):
+ for j,layer in enumerate(default_oe_core_layers):
+ params = {}
+ params['layer'] = layer
+ params['release'] = release[0]
+ params['Release'] = release[0]
+ params['release_version'] = release[1]
+ if not (params['release'] in ('master','HEAD')):
+ params['release'] = params['release'][0].lower() + params['release'][1:]
+ params['release_id'] = str(i+1)
+ params['rdl_count'] = str(rdl_count)
+ params['branch'] = params['release']
+ print_template(default_layers_template,params,fd)
+ rdl_count += 1
+ print_str('',fd)
+
+ print_str('',fd)
+ print_str(' <!-- Layer for the Local release -->',fd)
+ lv_count = 1
+ for i,layer in enumerate(default_oe_core_layers):
+ params = {}
+ params['layer'] = layer
+ params['layer_id'] = str(i+1)
+ params['vcs_url'] = 'git://git.openembedded.org/openembedded-core'
+ params['vcs_web_url'] = 'https://cgit.openembedded.org/openembedded-core'
+ params['vcs_web_tree_base_url'] = 'https://cgit.openembedded.org/openembedded-core/tree/%path%?h=%branch%'
+ params['vcs_web_file_base_url'] = 'https://cgit.openembedded.org/openembedded-core/tree/%path%?h=%branch%'
+ if i:
+ print_str('',fd)
+ print_template(layer_oe_core_template,params,fd)
+
+ print_template(layer_version_oe_core_template,params,fd)
+ print_str('',fd)
+
+ print_str(epilog_template,fd)
+ fd.close()
+
+#################################
+# Help
+#
+
+def list_releases():
+ print("Release ReleaseVer BitbakeVer Support Level")
+ print("========== =========== ========== ==============================================")
+ for release in current_releases:
+ print("%10s %10s %11s %s" % (release[0],release[1],release[6],release[4]))
+
+#################################
+# main
+#
+
+def main(argv):
+ global verbose
+
+ parser = argparse.ArgumentParser(description='gen_fixtures.py: table generate the fixture files')
+ parser.add_argument('--poky', '-p', action='store_const', const='poky', dest='command', help='Generate the poky.xml file')
+ parser.add_argument('--oe-core', '-o', action='store_const', const='oe_core', dest='command', help='Generate the oe-core.xml file')
+ parser.add_argument('--all', '-a', action='store_const', const='all', dest='command', help='Generate all fixture files')
+ parser.add_argument('--list', '-l', action='store_const', const='list', dest='command', help='List the release table')
+ parser.add_argument('--verbose', '-v', action='store_true', dest='verbose', help='Enable verbose debugging output')
+ args = parser.parse_args()
+
+ verbose = args.verbose
+ if 'poky' == args.command:
+ generate_poky()
+ elif 'oe_core' == args.command:
+ generate_oe_core()
+ elif 'all' == args.command:
+ generate_poky()
+ generate_oe_core()
+ elif 'all' == args.command:
+ list_releases()
+ elif 'list' == args.command:
+ list_releases()
+
+ else:
+ print("No command for 'gen_fixtures.py' selected")
+
+if __name__ == '__main__':
+ main(sys.argv[1:])
diff --git a/poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml b/poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml
index b01a337012..450e7a2f85 100644
--- a/poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml
+++ b/poky/bitbake/lib/toaster/orm/fixtures/oe-core.xml
@@ -8,9 +8,9 @@
<!-- Bitbake versions which correspond to the metadata release -->
<object model="orm.bitbakeversion" pk="1">
- <field type="CharField" name="name">dunfell</field>
+ <field type="CharField" name="name">kirkstone</field>
<field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
- <field type="CharField" name="branch">1.46</field>
+ <field type="CharField" name="branch">1.54</field>
</object>
<object model="orm.bitbakeversion" pk="2">
<field type="CharField" name="name">HEAD</field>
@@ -23,18 +23,23 @@
<field type="CharField" name="branch">master</field>
</object>
<object model="orm.bitbakeversion" pk="4">
- <field type="CharField" name="name">gatesgarth</field>
+ <field type="CharField" name="name">honister</field>
<field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
- <field type="CharField" name="branch">1.48</field>
+ <field type="CharField" name="branch">1.52</field>
+ </object>
+ <object model="orm.bitbakeversion" pk="5">
+ <field type="CharField" name="name">hardknott</field>
+ <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
+ <field type="CharField" name="branch">1.50</field>
</object>
<!-- Releases available -->
<object model="orm.release" pk="1">
- <field type="CharField" name="name">dunfell</field>
- <field type="CharField" name="description">Openembedded Dunfell</field>
+ <field type="CharField" name="name">kirkstone</field>
+ <field type="CharField" name="description">Openembedded Kirkstone</field>
<field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field>
- <field type="CharField" name="branch_name">dunfell</field>
- <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"https://cgit.openembedded.org/openembedded-core/log/?h=dunfell\"&gt;OpenEmbedded Dunfell&lt;/a&gt; branch.</field>
+ <field type="CharField" name="branch_name">kirkstone</field>
+ <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"https://cgit.openembedded.org/openembedded-core/log/?h=kirkstone\"&gt;OpenEmbedded Kirkstone&lt;/a&gt; branch.</field>
</object>
<object model="orm.release" pk="2">
<field type="CharField" name="name">local</field>
@@ -51,11 +56,18 @@
<field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"https://cgit.openembedded.org/openembedded-core/log/\"&gt;OpenEmbedded master&lt;/a&gt; branch.</field>
</object>
<object model="orm.release" pk="4">
- <field type="CharField" name="name">gatesgarth</field>
- <field type="CharField" name="description">Openembedded Gatesgarth</field>
+ <field type="CharField" name="name">honister</field>
+ <field type="CharField" name="description">Openembedded Honister</field>
<field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">4</field>
- <field type="CharField" name="branch_name">gatesgarth</field>
- <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"https://cgit.openembedded.org/openembedded-core/log/?h=gatesgarth\"&gt;OpenEmbedded Gatesgarth&lt;/a&gt; branch.</field>
+ <field type="CharField" name="branch_name">honister</field>
+ <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"https://cgit.openembedded.org/openembedded-core/log/?h=honister\"&gt;OpenEmbedded Honister&lt;/a&gt; branch.</field>
+ </object>
+ <object model="orm.release" pk="5">
+ <field type="CharField" name="name">hardknott</field>
+ <field type="CharField" name="description">Openembedded Hardknott</field>
+ <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">5</field>
+ <field type="CharField" name="branch_name">hardknott</field>
+ <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"https://cgit.openembedded.org/openembedded-core/log/?h=hardknott\"&gt;OpenEmbedded Hardknott&lt;/a&gt; branch.</field>
</object>
<!-- Default layers for each release -->
@@ -75,6 +87,10 @@
<field rel="ManyToOneRel" to="orm.release" name="release">4</field>
<field type="CharField" name="layer_name">openembedded-core</field>
</object>
+ <object model="orm.releasedefaultlayer" pk="5">
+ <field rel="ManyToOneRel" to="orm.release" name="release">5</field>
+ <field type="CharField" name="layer_name">openembedded-core</field>
+ </object>
<!-- Layer for the Local release -->
diff --git a/poky/bitbake/lib/toaster/orm/fixtures/poky.xml b/poky/bitbake/lib/toaster/orm/fixtures/poky.xml
index 363789d624..ed86114ebe 100644
--- a/poky/bitbake/lib/toaster/orm/fixtures/poky.xml
+++ b/poky/bitbake/lib/toaster/orm/fixtures/poky.xml
@@ -8,9 +8,9 @@
<!-- Bitbake versions which correspond to the metadata release -->
<object model="orm.bitbakeversion" pk="1">
- <field type="CharField" name="name">dunfell</field>
+ <field type="CharField" name="name">kirkstone</field>
<field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field>
- <field type="CharField" name="branch">dunfell</field>
+ <field type="CharField" name="branch">kirkstone</field>
<field type="CharField" name="dirpath">bitbake</field>
</object>
<object model="orm.bitbakeversion" pk="2">
@@ -26,20 +26,26 @@
<field type="CharField" name="dirpath">bitbake</field>
</object>
<object model="orm.bitbakeversion" pk="4">
- <field type="CharField" name="name">gatesgarth</field>
+ <field type="CharField" name="name">honister</field>
<field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field>
- <field type="CharField" name="branch">gatesgarth</field>
+ <field type="CharField" name="branch">honister</field>
+ <field type="CharField" name="dirpath">bitbake</field>
+ </object>
+ <object model="orm.bitbakeversion" pk="5">
+ <field type="CharField" name="name">hardknott</field>
+ <field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field>
+ <field type="CharField" name="branch">hardknott</field>
<field type="CharField" name="dirpath">bitbake</field>
</object>
<!-- Releases available -->
<object model="orm.release" pk="1">
- <field type="CharField" name="name">dunfell</field>
- <field type="CharField" name="description">Yocto Project 3.1 "Dunfell"</field>
+ <field type="CharField" name="name">kirkstone</field>
+ <field type="CharField" name="description">Yocto Project 3.5 "Kirkstone"</field>
<field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field>
- <field type="CharField" name="branch_name">dunfell</field>
- <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="https://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=dunfell"&gt;Yocto Project Dunfell branch&lt;/a&gt;.</field>
+ <field type="CharField" name="branch_name">kirkstone</field>
+ <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="https://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=kirkstone"&gt;Yocto Project Kirkstone branch&lt;/a&gt;.</field>
</object>
<object model="orm.release" pk="2">
<field type="CharField" name="name">local</field>
@@ -56,11 +62,18 @@
<field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="https://git.yoctoproject.org/cgit/cgit.cgi/poky/log/"&gt;Yocto Project Master branch&lt;/a&gt;.</field>
</object>
<object model="orm.release" pk="4">
- <field type="CharField" name="name">gatesgarth</field>
- <field type="CharField" name="description">Yocto Project 3.2 "Gatesgarth"</field>
+ <field type="CharField" name="name">honister</field>
+ <field type="CharField" name="description">Yocto Project 3.4 "Honister"</field>
<field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">4</field>
- <field type="CharField" name="branch_name">gatesgarth</field>
- <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="https://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=gatesgarth"&gt;Yocto Project Gatesgarth branch&lt;/a&gt;.</field>
+ <field type="CharField" name="branch_name">honister</field>
+ <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="https://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=honister"&gt;Yocto Project Honister branch&lt;/a&gt;.</field>
+ </object>
+ <object model="orm.release" pk="5">
+ <field type="CharField" name="name">hardknott</field>
+ <field type="CharField" name="description">Yocto Project 3.3 "Hardknott"</field>
+ <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">5</field>
+ <field type="CharField" name="branch_name">hardknott</field>
+ <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="https://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=hardknott"&gt;Yocto Project Hardknott branch&lt;/a&gt;.</field>
</object>
<!-- Default project layers for each release -->
@@ -112,6 +125,18 @@
<field rel="ManyToOneRel" to="orm.release" name="release">4</field>
<field type="CharField" name="layer_name">meta-yocto-bsp</field>
</object>
+ <object model="orm.releasedefaultlayer" pk="13">
+ <field rel="ManyToOneRel" to="orm.release" name="release">5</field>
+ <field type="CharField" name="layer_name">openembedded-core</field>
+ </object>
+ <object model="orm.releasedefaultlayer" pk="14">
+ <field rel="ManyToOneRel" to="orm.release" name="release">5</field>
+ <field type="CharField" name="layer_name">meta-poky</field>
+ </object>
+ <object model="orm.releasedefaultlayer" pk="15">
+ <field rel="ManyToOneRel" to="orm.release" name="release">5</field>
+ <field type="CharField" name="layer_name">meta-yocto-bsp</field>
+ </object>
<!-- Default layers provided by poky
openembedded-core
@@ -130,7 +155,7 @@
<field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">1</field>
- <field type="CharField" name="branch">dunfell</field>
+ <field type="CharField" name="branch">kirkstone</field>
<field type="CharField" name="dirpath">meta</field>
</object>
<object model="orm.layer_version" pk="2">
@@ -152,7 +177,14 @@
<field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">4</field>
- <field type="CharField" name="branch">gatesgarth</field>
+ <field type="CharField" name="branch">honister</field>
+ <field type="CharField" name="dirpath">meta</field>
+ </object>
+ <object model="orm.layer_version" pk="5">
+ <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
+ <field type="IntegerField" name="layer_source">0</field>
+ <field rel="ManyToOneRel" to="orm.release" name="release">5</field>
+ <field type="CharField" name="branch">hardknott</field>
<field type="CharField" name="dirpath">meta</field>
</object>
@@ -164,14 +196,14 @@
<field type="CharField" name="vcs_web_tree_base_url">https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
<field type="CharField" name="vcs_web_file_base_url">https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
</object>
- <object model="orm.layer_version" pk="5">
+ <object model="orm.layer_version" pk="6">
<field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">1</field>
- <field type="CharField" name="branch">dunfell</field>
+ <field type="CharField" name="branch">kirkstone</field>
<field type="CharField" name="dirpath">meta-poky</field>
</object>
- <object model="orm.layer_version" pk="6">
+ <object model="orm.layer_version" pk="7">
<field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">2</field>
@@ -179,18 +211,25 @@
<field type="CharField" name="commit">HEAD</field>
<field type="CharField" name="dirpath">meta-poky</field>
</object>
- <object model="orm.layer_version" pk="7">
+ <object model="orm.layer_version" pk="8">
<field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">3</field>
<field type="CharField" name="branch">master</field>
<field type="CharField" name="dirpath">meta-poky</field>
</object>
- <object model="orm.layer_version" pk="8">
+ <object model="orm.layer_version" pk="9">
<field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">4</field>
- <field type="CharField" name="branch">gatesgarth</field>
+ <field type="CharField" name="branch">honister</field>
+ <field type="CharField" name="dirpath">meta-poky</field>
+ </object>
+ <object model="orm.layer_version" pk="10">
+ <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
+ <field type="IntegerField" name="layer_source">0</field>
+ <field rel="ManyToOneRel" to="orm.release" name="release">5</field>
+ <field type="CharField" name="branch">hardknott</field>
<field type="CharField" name="dirpath">meta-poky</field>
</object>
@@ -202,14 +241,14 @@
<field type="CharField" name="vcs_web_tree_base_url">https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
<field type="CharField" name="vcs_web_file_base_url">https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%</field>
</object>
- <object model="orm.layer_version" pk="9">
+ <object model="orm.layer_version" pk="11">
<field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">1</field>
- <field type="CharField" name="branch">dunfell</field>
+ <field type="CharField" name="branch">kirkstone</field>
<field type="CharField" name="dirpath">meta-yocto-bsp</field>
</object>
- <object model="orm.layer_version" pk="10">
+ <object model="orm.layer_version" pk="12">
<field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">2</field>
@@ -217,18 +256,25 @@
<field type="CharField" name="commit">HEAD</field>
<field type="CharField" name="dirpath">meta-yocto-bsp</field>
</object>
- <object model="orm.layer_version" pk="11">
+ <object model="orm.layer_version" pk="13">
<field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">3</field>
<field type="CharField" name="branch">master</field>
<field type="CharField" name="dirpath">meta-yocto-bsp</field>
</object>
- <object model="orm.layer_version" pk="12">
+ <object model="orm.layer_version" pk="14">
<field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
<field type="IntegerField" name="layer_source">0</field>
<field rel="ManyToOneRel" to="orm.release" name="release">4</field>
- <field type="CharField" name="branch">gatesgarth</field>
+ <field type="CharField" name="branch">honister</field>
+ <field type="CharField" name="dirpath">meta-yocto-bsp</field>
+ </object>
+ <object model="orm.layer_version" pk="15">
+ <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
+ <field type="IntegerField" name="layer_source">0</field>
+ <field rel="ManyToOneRel" to="orm.release" name="release">5</field>
+ <field type="CharField" name="branch">hardknott</field>
<field type="CharField" name="dirpath">meta-yocto-bsp</field>
</object>
</django-objects>
diff --git a/poky/bitbake/lib/toaster/orm/fixtures/settings.xml b/poky/bitbake/lib/toaster/orm/fixtures/settings.xml
index 78c0fdca7f..ab3ea021f5 100644
--- a/poky/bitbake/lib/toaster/orm/fixtures/settings.xml
+++ b/poky/bitbake/lib/toaster/orm/fixtures/settings.xml
@@ -19,7 +19,7 @@
<field type="CharField" name="value">${TOPDIR}/../sstate-cache</field>
</object>
<object model="orm.toastersetting" pk="6">
- <field type="CharField" name="name">DEFCONF_IMAGE_INSTALL_append</field>
+ <field type="CharField" name="name">DEFCONF_IMAGE_INSTALL:append</field>
<field type="CharField" name="value"></field>
</object>
<object model="orm.toastersetting" pk="7">
diff --git a/poky/bitbake/lib/toaster/orm/migrations/0020_models_bigautofield.py b/poky/bitbake/lib/toaster/orm/migrations/0020_models_bigautofield.py
new file mode 100644
index 0000000000..f19b5dddbc
--- /dev/null
+++ b/poky/bitbake/lib/toaster/orm/migrations/0020_models_bigautofield.py
@@ -0,0 +1,173 @@
+# Generated by Django 3.2.12 on 2022-03-06 03:28
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('orm', '0019_django_2_2'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='bitbakeversion',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='build',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='distro',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='helptext',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='layer',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='layer_version',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='layerversiondependency',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='logmessage',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='machine',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='package',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='package_dependency',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='package_file',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='project',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='projectlayer',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='projecttarget',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='projectvariable',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='provides',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='recipe',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='recipe_dependency',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='release',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='releasedefaultlayer',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='target',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='target_file',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='target_image_file',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='target_installed_package',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='targetkernelfile',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='targetsdkfile',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='task',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='task_dependency',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='toastersetting',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='variable',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ migrations.AlterField(
+ model_name='variablehistory',
+ name='id',
+ field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
+ ),
+ ]
diff --git a/poky/bitbake/lib/toaster/orm/models.py b/poky/bitbake/lib/toaster/orm/models.py
index 4c94b407d7..2cb7d7e049 100644
--- a/poky/bitbake/lib/toaster/orm/models.py
+++ b/poky/bitbake/lib/toaster/orm/models.py
@@ -58,7 +58,6 @@ if 'sqlite' in settings.DATABASES['default']['ENGINE']:
return _base_insert(self, *args, **kwargs)
QuerySet._insert = _insert
- from django.utils import six
def _create_object_from_params(self, lookup, params):
"""
Tries to create an object using passed params.
@@ -1717,7 +1716,7 @@ class CustomImageRecipe(Recipe):
def generate_recipe_file_contents(self):
"""Generate the contents for the recipe file."""
- # If we have no excluded packages we only need to _append
+ # If we have no excluded packages we only need to :append
if self.excludes_set.count() == 0:
packages_conf = "IMAGE_INSTALL:append = \" "
diff --git a/poky/bitbake/lib/toaster/toastergui/templates/base.html b/poky/bitbake/lib/toaster/toastergui/templates/base.html
index 9e19cc33ca..2b3054936a 100644
--- a/poky/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/poky/bitbake/lib/toaster/toastergui/templates/base.html
@@ -123,7 +123,7 @@
{% endif %}
{% endif %}
<li id="navbar-docs">
- <a target="_blank" href="https://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html">
+ <a target="_blank" href="http://docs.yoctoproject.org/toaster-manual/index.html#toaster-user-manual">
<i class="glyphicon glyphicon-book"></i>
Documentation
</a>
diff --git a/poky/bitbake/lib/toaster/toastergui/templates/configvars.html b/poky/bitbake/lib/toaster/toastergui/templates/configvars.html
index 33fef9316d..691dace3a2 100644
--- a/poky/bitbake/lib/toaster/toastergui/templates/configvars.html
+++ b/poky/bitbake/lib/toaster/toastergui/templates/configvars.html
@@ -66,7 +66,7 @@
<td class="description">
{% if variable.description %}
{{variable.description}}
- <a href="https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-{{variable.variable_name|variable_parent_name}}" target="_blank">
+ <a href="http://docs.yoctoproject.org/ref-manual/variables.html#term-{{variable.variable_name|variable_parent_name}}" target="_blank">
<span class="glyphicon glyphicon-new-window get-info"></span></a>
{% endif %}
</td>
diff --git a/poky/bitbake/lib/toaster/toastergui/templates/landing.html b/poky/bitbake/lib/toaster/toastergui/templates/landing.html
index bfaaf6fc83..08b40fb2f2 100644
--- a/poky/bitbake/lib/toaster/toastergui/templates/landing.html
+++ b/poky/bitbake/lib/toaster/toastergui/templates/landing.html
@@ -15,7 +15,7 @@
<p>A web interface to <a href="https://www.openembedded.org">OpenEmbedded</a> and <a href="https://www.yoctoproject.org/tools-resources/projects/bitbake">BitBake</a>, the <a href="https://www.yoctoproject.org">Yocto Project</a> build system.</p>
<p class="top-air">
- <a class="btn btn-info btn-lg" href="https://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#toaster-manual-setup-and-use">
+ <a class="btn btn-info btn-lg" href="http://docs.yoctoproject.org/toaster-manual/setup-and-use.html#setting-up-and-using-toaster">
Toaster is ready to capture your command line builds
</a>
</p>
@@ -33,7 +33,7 @@
Toaster has no layer information. Without layer information, you cannot run builds. To generate layer information you can:
<ul>
<li>
- <a href="https://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#layer-source">Configure a layer source</a>
+ <a href="http://docs.yoctoproject.org/toaster-manual/reference.html#layer-source">Configure a layer source</a>
</li>
<li>
<a href="{% url 'newproject' %}">Create a project</a>, then import layers
@@ -44,7 +44,7 @@
<ul class="list-unstyled lead">
<li>
- <a href="https://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html">
+ <a href="http://docs.yoctoproject.org/toaster-manual/index.html#toaster-user-manual">
Read the Toaster manual
</a>
</li>
diff --git a/poky/bitbake/lib/toaster/toastergui/templates/landing_not_managed.html b/poky/bitbake/lib/toaster/toastergui/templates/landing_not_managed.html
deleted file mode 100644
index e7200b8412..0000000000
--- a/poky/bitbake/lib/toaster/toastergui/templates/landing_not_managed.html
+++ /dev/null
@@ -1,34 +0,0 @@
-{% extends "base.html" %}
-
-{% load static %}
-{% load projecttags %}
-{% load humanize %}
-
-{% block title %} Welcome to Toaster {% endblock %}
-
-{% block pagecontent %}
-
- <div class="container">
- <div class="row">
- <!-- Empty - no build module -->
- <div class="page-header top-air">
- <h1>
- This page only works with Toaster in 'Build' mode
- </h1>
- </div>
- <div class="alert alert-info lead">
- <p">
- The 'Build' mode allows you to configure and run your Yocto Project builds from Toaster.
- <ul>
- <li><a href="https://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#intro-modes">
- Read about the 'Build' mode
- </a></li>
- <li><a href="/">
- View your builds
- </a></li>
- </ul>
- </p>
- </div>
- </div>
-
-{% endblock %}
diff --git a/poky/bitbake/lib/toaster/toastergui/templates/project.html b/poky/bitbake/lib/toaster/toastergui/templates/project.html
index d8ad2c79dc..22239a82fd 100644
--- a/poky/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/poky/bitbake/lib/toaster/toastergui/templates/project.html
@@ -139,7 +139,7 @@
<ul>
<li><a href="{% url 'projectlayers' project.id %}">Choose from the layers compatible with this project</a></li>
<li><a href="{% url 'importlayer' project.id %}">Import a layer</a></li>
- <li><a href="https://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers" target="_blank">Read about layers in the documentation</a></li>
+ <li><a href="http://docs.yoctoproject.org/dev-manual/common-tasks.html#understanding-and-creating-layers" target="_blank">Read about layers in the documentation</a></li>
<li>Or type a layer name below</li>
</ul>
</div>
diff --git a/poky/bitbake/lib/toaster/toastergui/templates/project_specific.html b/poky/bitbake/lib/toaster/toastergui/templates/project_specific.html
index 42725c0dba..76d45b1b39 100644
--- a/poky/bitbake/lib/toaster/toastergui/templates/project_specific.html
+++ b/poky/bitbake/lib/toaster/toastergui/templates/project_specific.html
@@ -137,7 +137,7 @@
<ul>
<li><a href="{% url 'projectlayers' project.id %}">Choose from the layers compatible with this project</a></li>
<li><a href="{% url 'importlayer' project.id %}">Import a layer</a></li>
- <li><a href="https://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers" target="_blank">Read about layers in the documentation</a></li>
+ <li><a href="http://docs.yoctoproject.org/dev-manual/common-tasks.html#understanding-and-creating-layers" target="_blank">Read about layers in the documentation</a></li>
<li>Or type a layer name below</li>
</ul>
</div>
diff --git a/poky/bitbake/lib/toaster/toastergui/templates/projectconf.html b/poky/bitbake/lib/toaster/toastergui/templates/projectconf.html
index d62691df1d..c306835832 100644
--- a/poky/bitbake/lib/toaster/toastergui/templates/projectconf.html
+++ b/poky/bitbake/lib/toaster/toastergui/templates/projectconf.html
@@ -73,7 +73,7 @@
{% if image_install_append_defined %}
<dt>
- <span class="js-config-var-name js-config-var-managed-name">IMAGE_INSTALL_append</span>
+ <span class="js-config-var-name js-config-var-managed-name">IMAGE_INSTALL:append</span>
<span class="glyphicon glyphicon-question-sign get-help" title="Specifies additional packages to install into an image. If your build creates more than one image, the packages will be installed in all of them"></span>
</dt>
<dd class="variable-list">
@@ -83,7 +83,7 @@
<form id="change-image_install-form" class="form-inline" style="display:none;">
<div class="row">
<div class="col-md-4">
- <span class="help-block">To set IMAGE_INSTALL_append to more than one package, type the package names separated by a space.</span>
+ <span class="help-block">To set IMAGE_INSTALL:append to more than one package, type the package names separated by a space.</span>
</div>
</div>
<div class="form-group">
@@ -201,12 +201,12 @@
<p>Toaster cannot set any variables that impact 1) the configuration of the build servers,
or 2) where artifacts produced by the build are stored. Such variables include: </p>
<p>
- <code><a href="https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-BB_DISKMON_DIRS" target="_blank">BB_DISKMON_DIRS</a></code>
- <code><a href="https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-BB_NUMBER_THREADS" target="_blank">BB_NUMBER_THREADS</a></code>
+ <code><a href="http://docs.yoctoproject.org/ref-manual/variables.html#term-BB_DISKMON_DIRS" target="_blank">BB_DISKMON_DIRS</a></code>
+ <code><a href="http://docs.yoctoproject.org/ref-manual/variables.html#term-BB_NUMBER_THREADS" target="_blank">BB_NUMBER_THREADS</a></code>
<code>CVS_PROXY_HOST</code>
<code>CVS_PROXY_PORT</code>
- <code><a href="https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PARALLEL_MAKE" target="_blank">PARALLEL_MAKE</a></code>
- <code><a href="https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-TMPDIR" target="_blank">TMPDIR</a></code></p>
+ <code><a href="http://docs.yoctoproject.org/ref-manual/variables.html#term-PARALLEL_MAKE" target="_blank">PARALLEL_MAKE</a></code>
+ <code><a href="http://docs.yoctoproject.org/ref-manual/variables.html#term-TMPDIR" target="_blank">TMPDIR</a></code></p>
<p>Plus the following standard shell environment variables:</p>
<p><code>http_proxy</code> <code>ftp_proxy</code> <code>https_proxy</code> <code>all_proxy</code></p>
</div>
@@ -771,10 +771,10 @@ $(document).ready(function() {
{% if image_install_append_defined %}
- // init IMAGE_INSTALL_append trash icon
+ // init IMAGE_INSTALL:append trash icon
setDeleteTooltip($('#delete-image_install-icon'));
- // change IMAGE_INSTALL_append variable
+ // change IMAGE_INSTALL:append variable
$('#change-image_install-icon').click(function() {
// preset the edit value
var current_val = $("span#image_install").text().trim();
@@ -814,7 +814,7 @@ $(document).ready(function() {
$('#apply-change-image_install').click(function(){
// insure these non-empty values have single space prefix
var value = " " + $('#new-image_install').val().trim();
- postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+value});
+ postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL:append:'+value});
$('#image_install').text(value);
$('#image_install').removeClass('text-muted');
$("#change-image_install-form").slideUp(function () {
@@ -826,10 +826,10 @@ $(document).ready(function() {
});
});
- // delete IMAGE_INSTALL_append variable value
+ // delete IMAGE_INSTALL:append variable value
$('#delete-image_install-icon').click(function(){
$(this).tooltip('hide');
- postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+''});
+ postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL:append:'+''});
$('#image_install').parent().fadeOut(1000, function(){
$('#image_install').addClass('text-muted');
$('#image_install').text('Not set');
@@ -1011,7 +1011,7 @@ $(document).ready(function() {
$(".save").attr("disabled","disabled");
// Reload page if admin-removed core managed value is manually added back in
- if (0 <= " DISTRO DL_DIR IMAGE_FSTYPES IMAGE_INSTALL_append PACKAGE_CLASSES SSTATE_DIR ".indexOf( " "+variable+" " )) {
+ if (0 <= " DISTRO DL_DIR IMAGE_FSTYPES IMAGE_INSTALL:append PACKAGE_CLASSES SSTATE_DIR ".indexOf( " "+variable+" " )) {
// delayed reload to avoid race condition with postEditAjaxRequest
do_reload=true;
}
diff --git a/poky/bitbake/lib/toaster/toastermain/settings.py b/poky/bitbake/lib/toaster/toastermain/settings.py
index a4b370c8d4..609c85d9d8 100644
--- a/poky/bitbake/lib/toaster/toastermain/settings.py
+++ b/poky/bitbake/lib/toaster/toastermain/settings.py
@@ -39,6 +39,9 @@ DATABASES = {
}
}
+# New in Django 3.2
+DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
+
# Needed when Using sqlite especially to add a longer timeout for waiting
# for the database lock to be released
# https://docs.djangoproject.com/en/1.6/ref/databases/#database-is-locked-errors
diff --git a/poky/bitbake/toaster-requirements.txt b/poky/bitbake/toaster-requirements.txt
index 735b614546..dedd423556 100644
--- a/poky/bitbake/toaster-requirements.txt
+++ b/poky/bitbake/toaster-requirements.txt
@@ -1,3 +1,3 @@
-Django>2.2,<2.3
+Django>3.2,<3.3
beautifulsoup4>=4.4.0
pytz