Chen Qi [Wed, 4 Aug 2021 08:10:13 +0000 (01:10 -0700)]
insane.bbclass: fix the file-rdeps QA message for the new override syntax
Instead of replacing '_<pkg>', we should be replacing ':<pkg>'.
Otherwise, when we meet a 'file-rdeps' QA error, the error message would be
like below.
QA Issue: /usr/lib64/libatopology.so.2.0.0:libatopology contained in package libatopology ...
The ':libatopology' should not be in the error message.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Paul Barker [Mon, 2 Aug 2021 10:44:30 +0000 (11:44 +0100)]
kernel-yocto: Simplify no git repo case in do_kernel_checkout
If the kernel sources are not fetched via git, a local git repository is
created in do_kernel_checkout. In this case we know that there will be
no remote branches and we will already be on the correct branch (since
only one branch will exist). So we can simplify things by skipping these
steps.
This also removes the assumption that the default git branch name will
be "master". Prior to this change, the final git checkout command in
do_kernel_checkout could fail if a local git repo was created and the
user had changed init.defaultBranch in their gitconfig.
Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Mon, 2 Aug 2021 15:37:03 +0000 (16:37 +0100)]
vim: Clarify where RDEPENDS/RRECOMMENDS apply
The tricky of using BPN in a common inc file is rather hard to understand.
Simplfy this by moving it to the base vim recipe and use the standard
variable form.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Kai Kang [Sun, 1 Aug 2021 11:41:30 +0000 (19:41 +0800)]
python3-pytest: display correct version info
It does not show correct version info of python3-pytest:
$ pip3 list | grep pytest
pytest 0.0.0
pytest requires setuptools-scm in setup.cfg. It could be met by adding
python3-setuptools-scm-native to dependency and then it will not
download egg file of setuptools-scm during do_compile any more. So
remove 0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch
and depend on python3-setuptools-scm-native to make it show the correct
version info.
Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sun, 1 Aug 2021 13:04:15 +0000 (14:04 +0100)]
populate_sdk_ext: Fix handling of TOOLCHAIN_HOST_TASK in the eSDK case
The current way TOOLCHAIN_HOST_TASK is handled within eSDK builds is
causing much confusion, even to people who should understand the code.
For a normal SDK, some layers append to TOOLCHAIN_HOST_TASK unconditionally
which is fine, until the eSDK tries to override the variable to it's own
values. It does not support or use packages installed using this variable
and would use native recipes instead, it is a very different approach.
In the referenced bug, binaries are added but not relocated leading to
confusing errors.
To fix this, add a new variables for the eSDK TOOLCHAIN_HOST_TASK
to be explict and force the eSDK code to use this instead. The setVar
in non-parsing context will clear out any appends resolving the current
issues. The patch also gets rid of some dubious task override use.
[YCOTO #14047]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sun, 1 Aug 2021 12:47:21 +0000 (13:47 +0100)]
sstate: Fix rebuilds when changing layer config
When adding a layer which changed SSTATE_EXCLUDEDEPS_SYSROOT, the state
hashes were changing when they should not. This was caused by wider use
of setscene_depvalid which means the dependency on the variable was seen
when it was previously not.
Exclude the variable since this should be be included in the hashes.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Fri, 30 Jul 2021 15:44:56 +0000 (16:44 +0100)]
sdk: Decouple default install path from built in path
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]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Thu, 29 Jul 2021 23:20:47 +0000 (00:20 +0100)]
dropbear: Fix incorrect package override for postrm
This bug has been around for a long time (2011) but fix it to do
what was intended originally. The postrm is changed by classes but
those should append to existing entries.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta-skeleton: add recipe examples from documentation sources
This adds three examples previously located in the yocto-docs
repository (under documentation/ref-manual/examples).
The examples were not used for building the documentation
so it's better to keep them here where they can automatically be
tested.
Fixed the "hello-single" to add a version number to the .bb file.
After this, all examples build fine with the "master" branch of Poky.
Note that the "mtd-utils" example, and example of a recipe
for an Autotools page, was not copied over. It doesn't build any
more, and anyway, we already have an official recipe for a recent version
of "mtd-utils" in OE-core.
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
4.3 (2021-07-22)
decode-dimms: Attempt to decode LPDDR3 modules
eeprom, eepromer: Removed the tools in favor of eeprog
i2cdetect: Sort the bus list by number
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5671. [bug] A race condition could occur where two threads were
competing for the same set of key file locks, leading to
a deadlock. This has been fixed. [GL #2786]
5670. [bug] create_keydata() created an invalid placeholder keydata
record upon a refresh failure, which prevented the
database of managed keys from subsequently being read
back. This has been fixed. [GL #2686]
5669. [func] KASP support was extended with the "check DS" feature.
Zones with "dnssec-policy" and "parental-agents"
configured now check for DS presence and can perform
automatic KSK rollovers. [GL #1126]
5668. [bug] Rescheduling a setnsec3param() task when a zone failed
to load on startup caused a hang on shutdown. This has
been fixed. [GL #2791]
5667. [bug] The configuration-checking code failed to account for
the inheritance rules of the "dnssec-policy" option.
This has been fixed. [GL #2780]
5666. [doc] The safe "edns-udp-size" value was tweaked to match the
probing value from BIND 9.16 for better compatibility.
[GL #2183]
5665. [bug] If nsupdate sends an SOA request and receives a REFUSED
response, it now fails over to the next available
server. [GL #2758]
5664. [func] For UDP messages larger than the path MTU, named now
sends an empty response with the TC (TrunCated) bit set.
In addition, setting the DF (Don't Fragment) flag on
outgoing UDP sockets was re-enabled. [GL #2790]
5662. [bug] Views with recursion disabled are now configured with a
default cache size of 2 MB unless "max-cache-size" is
explicitly set. This prevents cache RBT hash tables from
being needlessly preallocated for such views. [GL #2777]
5661. [bug] Change 5644 inadvertently introduced a deadlock: when
locking the key file mutex for each zone structure in a
different view, the "in-view" logic was not considered.
This has been fixed. [GL #2783]
5658. [bug] Increasing "max-cache-size" for a running named instance
(using "rndc reconfig") did not cause the hash tables
used by cache databases to be grown accordingly. This
has been fixed. [GL #2770]
5655. [bug] Signed, insecure delegation responses prepared by named
either lacked the necessary NSEC records or contained
duplicate NSEC records when both wildcard expansion and
CNAME chaining were required to prepare the response.
This has been fixed. [GL #2759]
5653. [bug] A bug that caused the NSEC3 salt to be changed on every
restart for zones using KASP has been fixed. [GL #2725]
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Drop 0002-Allow-for-setting-password-in-clear-text.patch;
what it adds is horribly insecure and AB testing didn't reveal any
regressions or use cases for it.
Drop /etc/default/ tweaks as files are no longer installed there.
Drop manpage alternatives as manpages are no longer installed.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
selftest: add core-image-weston to no-gpl3-no-meta-gpl2 image test
This demonstrates more of the tricks and techniques that can be used
to achieve gpl3-free images withough having to roll back to ancient
versions of various core items via meta-gpl2.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This avoids pulling in perl, python and (especially) bash;
rpm building functionality should be neither hard nor soft
dependency of rpm package management.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Thu, 29 Jul 2021 22:36:55 +0000 (23:36 +0100)]
local.conf.sample: Bump version so users update their config
It has been a while since we've done this but with the new syntax, users
need to update their local.conf if based off the template. Update the
versions to trigger this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Wed, 28 Jul 2021 13:27:33 +0000 (14:27 +0100)]
meta: Manual override fixes
The automated conversion of OE-Core to use the new override sytax isn't
perfect. This patches some mis-converted lines and some lines which were missed
by the automation.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Martin Jansa [Fri, 30 Jul 2021 09:25:44 +0000 (11:25 +0200)]
convert-overrides.py: show processed file and version of this script
* on bigger layer this script takes couple minutes without showing any progress
* add a version to reference it in the conversion commit (to easily figure out
if it's worth re-converting the layer).
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Fri, 16 Jul 2021 13:53:23 +0000 (14:53 +0100)]
scripts/contrib: Add override conversion script
This adds a script I've developed to migrate metadata to use the new override
syntax. It is a bit rough but since its for a single use with validation, it
doesn't need to be perfect. It is run simply as:
scripts/contrib/convert-overrides.py <directory>
It is setup and has been tested to work with OE-Core, Bitbake, yocto-docs,
meta-yocto, meta-gplv2 and meta-mingw. For OE-Core, it converts around 10,100
lines with about 34 manual fixes needed.
For other layers it would need updating for override names and exclusions for
functions/variable names with "append", "prepend" or "remove" in them.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Thu, 29 Jul 2021 14:21:56 +0000 (15:21 +0100)]
autotools/base/icecc: Remove prepend from function names
Using prepend as part of a function name is a poor choice. Whilst we're
about to make the syntax explict, improve the names anyway making the
conversion easier and the intent clear that this isn't an override.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Jon Mason [Wed, 28 Jul 2021 17:32:26 +0000 (13:32 -0400)]
parselogs.py: qemuarm should be qemuarmv5
All of the errors being masked off for qemuarm are legacy from before
the migration of qemuarm to qemuarmv5. Rename the machine to that to
allow for qemuarmv5 to pass parselog test. Light testing shows no
errors in dmesg for qemuarm.
Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Currently the build will break if the patch already applied
as the return value of "test ! -f $@" is not 0, so make sure
to return 0 if the patch already applied.
Mesa would unnecessarily fail in the v3d and vc4 driver if a dmabuf
could not imported for scanout. In particular, this meant the
weston-simple-dmabuf-egl test program would fail on a Raspberry Pi.
Marek Vasut [Tue, 27 Jul 2021 16:25:29 +0000 (18:25 +0200)]
kernel-uboot: Handle gzip and lzo compression options
Since 5c72105e29 ("kernel-uboot: allow compression option to be configurable")
it is possible to select kernel compression method, however the resulting
image is always compressed with gzip, so selecting any other method than
gzip results in unbootable images. Add support for lzo for starters, since
that is fast to decompress and useful in low boot time scenarios.
Note that we should likely add some check for unsupported compression
methods. We should also add dependency on lzop-native I think.
Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Sinan Kaya <okaya@kernel.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Currently the mkfs.btrfs generates large images with a lot of wasted
space. This happens since OE-core updated btrfs-tools from 4.13.3 to
4.15.1 in commit 94b645aa77 ("btrfs-tools: update to 4.15.1") .
Note in mkfs.btrfs(8) manpage section -r says the following:
"
-r|--rootdir <rootdir>
...
Note This option may enlarge the image or file to ensure
it’s big enough to contain the files from rootdir. Since
version 4.14.1 the filesystem size is not minimized. Please
see option --shrink if you need that functionality.
--shrink
Shrink the filesystem to its minimal size, only works with
--rootdir option.
...
Note prior to version 4.14.1, the shrinking was done
automatically.
"
Add the --shrink option to EXTRA_IMAGECMD_btrfs to reinstate the
original behavior and un-waste the space.
Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alexander Kanavin <alexander.kanavin@linux.intel.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
rootfs: remove ldconfig auxiliary cache where appropriate
Removes the /var/cache/ldconfig auxiliary cache directory from
the rootfs when:
- read-only-rootfs is in IMAGE_FEATURES,
- ldconfig is not in DISTRO_FEATURES.
In both cases the /var/cache/ldconfig/aux-cache is useless.
Nicolas Dechesne [Thu, 22 Jul 2021 12:46:44 +0000 (14:46 +0200)]
yocto-check-layer: ensure that all layer dependencies are tested too
In order to be compliant with the YP compatible status, a layer also
needs to ensure that all its dependencies are compatible
too. Currently yocto-check-layer only checks the requested layer,
without testing any dependencies.
With this change, all dependencies are also checked by default, so the
summary printed at the end will give a clear picture whether all
dependencies pass the script or not.
Using --no-auto-dependency can be used to skip that.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Nicolas Dechesne [Thu, 22 Jul 2021 12:46:42 +0000 (14:46 +0200)]
checklayer: new function get_layer_dependencies()
Split add_layer_dependencies() into 2 parts. First search for layer
dependencies, and then add them to the config. That allows us to
call get_layer_dependencies() independently.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Nicolas Dechesne [Thu, 22 Jul 2021 12:46:41 +0000 (14:46 +0200)]
yocto-check-layer: improve missed dependencies
The first 2 calls to add_layer_dependencies() are here to add all
dependencies for the 'layer under test' and the additional layers
provided by the users.
In both cases, we use misssing_dependencies boolean to indicate if any
dependency is missing. But we then never really use
missing_dependencies. Instead the script is calling
add_layer_dependencies() again (for both the layer under test, and the
additional layers) to detect if there are any missing dependency. As a
result, we are trying to add again all dependencies, and we can see
that from the traces:
INFO: Detected layers:
INFO: meta-aws: LayerType.SOFTWARE, /work/oe/sources/meta-aws
INFO: checklayer: Doesn't have conf/layer.conf file, so ignoring
INFO:
INFO: Setting up for meta-aws(LayerType.SOFTWARE), /work/oe/sources/meta-aws
INFO: Adding layer meta-python
INFO: Adding layer meta-oe
INFO: Adding layer meta-networking
-->
INFO: Adding layer meta-python
INFO: meta-python is already in /work/oe/poky/master/build-checklayer/conf/bblayers.conf
INFO: Adding layer meta-oe
INFO: meta-oe is already in /work/oe/poky/master/build-checklayer/conf/bblayers.conf
INFO: Adding layer meta-networking
INFO: meta-networking is already in /work/oe/poky/master/build-checklayer/conf/bblayers.conf
<--
INFO: Getting initial bitbake variables ...
The code appears more complex than it should, and we can simply
replace the complex if statement by using missing_dependencies, and
avoid duplicating the call to add_layer_dependencies().
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
set UBOOT_MACHINE with malta defconfigs for qemumips and qemumips64.
Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Sun, 25 Jul 2021 16:11:30 +0000 (17:11 +0100)]
libubootenv: Drop default-env RRECOMMENDS
The link back to uboot's env is causing a ton of pain since it is making
this recipe machine specific. Some machines may use uboot, some may
not but you really want an architecture/machine neutral library.
Revert this part of the 0.3 upgrade (OE-Core rev: 02d55cd35aac15095fc44f0cf8f9e7a71638f485) so that we don't need some
of the horrible workarounds being seen in other layers. If a given
machine uses u-boot, the env can be pulled in by the machine directly.
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>
conf-notes.txt: now suggesting to run 'runqemu qemux86-64'
'runqemu qemux86' doesn't work any more.
The "Quick Build" documentation has already been updated
but this message that we get when sourcing "oe-init-build-env"
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Thu, 22 Jul 2021 09:53:57 +0000 (10:53 +0100)]
yocto-check-layer: Remove duplicated code
Nicolas Dechesne spotted there was duplicate code I had introduced with a
previous fix. Remove the second statement since the earlier one is correct
all that is needed.
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>
initscripts: populate-volatile.sh: run create_file synchronously
The behavior of running create_file in the background was introduced in d44816bedade ("initscripts: Populate volatile from existing file")
without further explanation. Besides its questionable benefit, this
causes actual issues:
- Not all create_file processes may have finished by the time the
initscript exits (or when it moves /etc/volatile.cache.build !)
- By making the order of commands nondeterminstic, it could hide
dependency issues where it was attempted to create files before their
containing directories
initscripts: populate-volatile.sh: do not log to tty0
tty0 may not be the intended console for log messages, or it may not
exist at all in kernel configurations without CONFIG_VT. Just use the
default stdout/stderr instead.