Provide a mechanism to allow users to choose whether the /tmp directory
is on persistent storage (non-volatile) or a RAM-based tmpfs (volatile).
The default is volatile.
Works for both sysvinit-based and systemd-based systems.
(From OE-Core rev: 8b76c0637eaeaf5bd5e696680cd74b7a642f4157)
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
We've had a couple of reports of recipes expecting to be able to call
split("-") on PN. There isn't any real harm in adding a dash to the dummy
PN value to avoid these errors.
(From OE-Core rev: 10e140d98790ce28b440b8e8697a4311658fe4df)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This stops the codeparser cache changing ever time a new commit is
added to the main repository.
(From OE-Core rev: f77b9f983395c648fddc96f0d6c8ebd6d52056d4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Add an initial value for the new bitbake BB_HASH_CODEPARSER_VALS support,
which optimises the codeparser cache's size and stops it growing at every
parse.
(From OE-Core rev: 7c15e03dd30abe43d784f41e3c04c96a7bbb0d62)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Move one of the PACKAGEFUNCS from the package bbclass to packagedata
library code for parsing efficiency.
(From OE-Core rev: ceba33bf2897f7dd5b1ffe6b742c47bf616243c8)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Now that bitbake can look into python module code variable and function
dependencies, there are a few extra basic variables we need to exclude.
This is done per function since it keeps the main exclusion list cleaner
and is also slightly faster.
(From OE-Core rev: 870c324d47f1d920fcb736e09fc6e857f24945c7)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
A long time ago the bitbake cache didn't use hashes in it's filename and
hence values such as MACHINE were needed in the path to the cache file
so that when switching MACHINE, a new cache wasn't always parsed.
Times have moved on, we have a hash which represents the configuration
and the caches are reused if there is an existing hash that matches.
This means the values added to CACHE are obsolete and not needed,
we can drop them.
(From OE-Core rev: 550ed0a4ce8839946781f18fdce18452de34ddaf)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Whilst SDE definitely needs to be exported, the fallback does not as
it is only used in our python code via the datastore.
It was introduced as an export in 9a1dde74e794362399193dc3f81c9685a83d0776
but even then it doesn't look like it needed to be, likely just a copy and
paste mistake.
Drop the export.
(From OE-Core rev: 74fb6539dd06acb0dd6a9af4809152975e8473e6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This variable is used to denote the C/C++ compiler runtime to use.
Right now there are few alternatives out of the core which could
use this variable to define this property, the values it can take
are 'gnu' for gcc runtime. 'llvm' for using compiler-rt+libc++ and
'android' to use android runtime. Default settings is to use gnu
which is current silent default also.
(From OE-Core rev: a32f4309aec277cac01c1fd8c78e28d0fd63b064)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Currently, there's no way for the user's site.conf, local.conf or
similar to set BB_DEFAULT_UMASK, because those files are included by
bitbake.conf prior to the unconditional assignment of
BB_DEFAULT_UMASK. To make that possible, use a weak default assignment
instead. This is also consistent with most other variable assignments
in the lower half of bitbake.conf.
I believe the risk of a regression is very small; it would require
something like somebody having a definition of BB_DEFAULT_UMASK in a
local configuration file, and having been relying on that _not_ taking
effect.
(From OE-Core rev: e3dbded499f0bd1e71abb0650ae98fd9ade94250)
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
We don't really need to keep S and B separate for debug source purposes
and there shouldn't be source references in WORKDIR that isn't S and B
either.
Separating these out simplifies the shared-work directory handling for
gcc and should also help fix external source usage. Therefore handle
S and B in DEBUG_PREFIX_MAP separately and clean up other code.
Indentation is reduced here as it is introduced on every compiler
commandline so minimising it is helpful.
(From OE-Core rev: c39b5020b8705d17e3745c41e38d0f99a1ac94cf)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The code was using a mixture of XXX_SYS and RUST_XXX_SYS. Use
RUST_XXX_SYS consistently and add the variables to the global exclsion
on signatures as they're reflected in the directory triplets and trying
to filter them out the hashes separately is too painful.
(From OE-Core rev: ee0c0fdf9c1eba9eece6ed1293fda25bf18964b3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Switch the default DEPENDS for ${PN}-dev to be a RRECOMMENDS instead. This
takes advantage of a change to complmentary package globbing to not follow
RRECOMMENDS and means and SDK for an image with both openssh and dropbear
compoments will now build successfully.
(From OE-Core rev: 6f28420ab0e8f2ab5eb06326024777a40aded0a6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
There is a pattern that several recipes need to break the dependency of ${PN}-dev
on ${PN}, most often as ${PN} may be be empty. Add a new variable to parameterise
this and allow it to be changed more easily.
(From OE-Core rev: a5b381c0f45c590a762647a9956a8f41e2e2315e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This allows two level of overriding (distro level and local.conf/shell
variable). Previous settings blocked shell variables overring
if it was overriden on distro level.
(From OE-Core rev: de6c3f9cb2c589aecbf8d9d25fa83cd18bf80891)
Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Turns out this doesn't actually work, as git doesn't respect the environment
when reading the safe.directory configuration variable.
This reverts commit d4a5862ce8.
(From OE-Core rev: e28dd48ffb84c8bb4356d889b70a4b876c8bbaf3)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Recent git releases containing [1] have an ownership check when opening
repositories, and refuse to open a repository if it is owned by a
different user.
This breaks any use of git in do_install, as that is executed by the
(fake) root user. Whilst not common, this does happen.
Setting the git configuration safe.directories=* disables this check, so
that git is usable in fakeroot tasks. This can be set globally via the
internal environment variable GIT_CONFIG_PARAMETERS, we can't use
GIT_CONFIG_*_KEY/VALUE as that isn't present in all the releases which
have the ownership check.
We already set GIT_CEILING_DIRECTORIES to ensure that git doesn't
recurse up out of the work directory, so this isn't a security issue.
[1] 8959555cee
(From OE-Core rev: 8bed8e6993e7297bdcd68940aa0d47ef47120117)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Some of the flags listed here do change the output and hence do need to
be included in task checksums.
This means we start including the following flags in function/task/variable
checksums:
type, func, export, unexport, noexec, dirs, cleandirs
(From OE-Core rev: 54e8b744bb7e7aa03277a42b0c5cf707440f8b8a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
A long time ago, we used to pass our parent execution environment into our task
environments during build. We stopped doing that for reproducibility and consistency
of builds. The variables TARGET_ARCH, DISTRO and MACHINE are not exported into
tasks and hence we don't need to unexport them. The resasons these exist is
therefore no longer relavent and they can be removed. This happens to improve
bitbake -e output from a user commandline perspective.
(From OE-Core rev: 8e97ff1560bd563251405cd92b6ccf5c9fcecf4b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
If a QA test is added to ERROR_QA, all package_qa tasks should rerun
to make sure any already existing errors are caught.
(From OE-Core rev: de7b559e4f5845e2b06d20836223f7d237322236)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This re-writes the INCOMPATIBLE_LICENSE checking code to replace
the WHITELIST_<lic> with
INCOMPATIBLE_LICENSE_EXCEPTIONS = '<pkg>:<lic> <pkg>:<lic> ...'
This initial change leaves most of the code structure in place,
but the code in base.bbclass needs to be re-written to make
the check more consistent around packages (PKGS) and not recipe
names (PN). This also is taking into account the changes for SPDX
licenses.
The aim is to provide a mode consistent variable where the variable
name is known and can easily be queried.
(From OE-Core rev: 0d19c45ba6cf43518f380ca5afe9753a2eda0691)
Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Add entries for the removed variables TUNEABI_WHITELIST and INHERIT_BLACKLIST.
(From OE-Core rev: b3bf2862e221af157f545a216b56b9b393dcc66d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The SYSTEM and USER seperation between variables seems odd and not necessary,
drop it. Avoid the use of whitelist/blacklist and also change "packages" to
"recipes" since that misuse causes confusion.
(From OE-Core rev: 0df0eb6401a02139b9110bc95e21d97a67125ec5)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Remove the old class and rename VarFlag to SKIP_RECIPE, handling this
in base.bbclass for efficiency. This means a separate inherit is no longer
needed.
This change better describes what the VarFlag is doing since it
is implemeted with the SkipRecipe() function.
By moving this into base.bbclass we simplify the distro inherit.
(From OE-Core rev: a5f735746cba6af41a25aa2aa121453a8bc363b4)
Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
After other variables were renamed in bitbake, update OE-Core to match.
(From OE-Core rev: 91812ba5a34598e03ad860745707c7cba1ae5d91)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
After the change to bitbake, update the references in OE-Core to match the updates.
(From OE-Core rev: 193affb9f28b0116c3fd619834f145326fee08c5)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Add the -D option to BUILD_RANLIB so that deterministic archives
are built for native/cross output. This improves the changes of hash
equivalence matches and hence build artefact reuse.
We don't need this in the target case since we compile binutils-cross
with an option making this the default.
(From OE-Core rev: f5d136f5a9c14e6629a47bf3e796f1d951ed998b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The wayland-scanner is missing from SDKs with weston, but the weston build
requires wayland-scanner. Allow the distro feature in order to include
the wayland-scanner packages via nativesdk-packagegroup-sdk-host.bb.
(From OE-Core rev: 858cc6f257e22e39df83f4808ea27c6d12cd1b80)
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The url changes from the script accidentally corrupted this mirror
url, fix it.
(From OE-Core rev: a16dd60fb058ec2257eb1c6c0baa86e11e78cb42)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
There is uncertainty about the default branch name in git going forward.
To try and cover the different possible outcomes, add branch names to all
git:// and gitsm:// SRC_URI entries.
This update was made with the script added to contrib in this patch which
aims to help others convert other layers.
(From OE-Core rev: b51c405faf6f8c0365f7533bfaf470d79152a463)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
We want things to be reproduicble and the variable doesn't really change
much any more. Drop the remaining uses and make those code paths always
active.
(From OE-Core rev: d15fb02c7ee7da50e322d74bc6a545234e20c7f3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
The reproducibility code was originally developed as separate
standalone class but development is no longer experimental and
the code is widely tested and used by default for poky. Reproducible
builds are the direction we need to take as a project.
Transition the core variable definitions to bitbake.conf as part of
a move to make these part of the default workflow.
This also helps reduce test matrix complexity as there is now one
code path.
(From OE-Core rev: f38a8de19550ae216575b5b39163666f74b07e2d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
If gpg is used, it will find the first gpg agent in the path, this
may lead to issues where gpg comes from the host, and the agent
comes from a gnupg-native due to package signing. The versions
being out of sync causes gpg to fail.
(From OE-Core rev: 2b59fb9d52a405a32a1d069d4c5320b72fbd35ce)
Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Tasks shouldn't vary dependning on the value of BB_CURRENTTASK. They
happen not to due to when bitbake sets this but to fix other issues,
bitbake needs to set it earlier. Therefore exclude from hashes
globally.
(From OE-Core rev: 04a4ed1c509b0ef6af6d9ff53901c674ca402252)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Currently, installed packages are listed for images in image-info.txt, but
not for SDKs in sdk-info.txt. Add TOOLCHAIN_HOST_TASK and
TOOLCHAIN_TARGET_TASK to the output variables in sdk-info.txt.
Moreover, package output files for the SDK host are empty because
PKGDATA_DIR defaults to the target directory. Fix this bug and create a new
variable called PKGDATA_DIR_SDK which stores the correct path for the SDK
host package data.
(From OE-Core rev: 82e6172c1df378dff4e503aa878501c08937b5bb)
Signed-off-by: Andres Beltran <abeltran@linux.microsoft.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
zstd has similar time and space performance in compression but is
vastly faster in decompression, which benefits rootfs creation
(especially when installing very large packages) and on-target
package installation.
Also, ensure ZSTD_THREADS doesn't change sstate checksums. The
detailed explanation is in the commit making similar change for
XZ_THREADS.
(From OE-Core rev: e72c0b94554a9bc293844ec2bddb0c04ea19791d)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
If you leave PARALLEL_MAKEINST at its default from PARALLEL_MAKE,
sstate checksums are fine and don't change as the number of cores do.
If you override it to a specific value, this does the cause the sstate
checksums to change. We don't want the checksums to change if the
value of this variable differs.
Therefore set a vardepvalue so a specific value is used for checksum
purposes.
(From OE-Core rev: 0a20d7f462b42800a8420dbb57e6ac8b84770b39)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
rpm output packages currently depend on the value of XZ_THREADS which
is ok if left to the default value but problematic if system limits
are set such as on the autobuilder.
Force the value to a specific one in the hashes for better sstate reuse
and consistent rpm task checksums.
(From OE-Core rev: 0296dc71c01d1b7953d74ef37d56429e2f4fcfab)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
It is probably a good idea if the comment that describes how variable
overrides work use the new override syntax...
(From OE-Core rev: 1fd8882db9011a6fe18da7611fba3426fd5cb00d)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Add SDKPATHINSTALL which is used as the default install location of the SDK
instead of SDKPATH. This means the default install path isn't encoded into
every SDK binary, meaning if a date is used there the entire SDK doesn't
have to rebuild. Most distros can switch to only customise SDKPATHINSTALL
meaning more sstate reuse too.
[YOCTO #14100]
(From OE-Core rev: bc4ee5453560dcefc4a4ecc5657df5cc1666e153)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This is the result of automated script conversion:
scripts/contrib/convert-overrides.py <oe-core directory>
converting the metadata to use ":" as the override character instead of "_".
(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This was an oversight when the distro feature was introduced.
(From OE-Core rev: 4a985ff0dd13c455dadf85f4ad35a0a42f4bd9f1)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>