]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
5 years agoglibc-testsuite: Exclude this recipe from world builds
Nathan Rossi [Fri, 14 Feb 2020 05:59:43 +0000 (05:59 +0000)]
glibc-testsuite: Exclude this recipe from world builds

This recipe is intended to be run manually or via oeqa.

[YOCTO #13737]

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoglibc-testsuite: Remove the do_install task
Nathan Rossi [Fri, 14 Feb 2020 05:59:43 +0000 (05:59 +0000)]
glibc-testsuite: Remove the do_install task

This task is not intended to be run as this recipe does not produce any
packages or install any sysroot content. Additionally running this task
behaves differently from a normal glibc build, and can result in issues.

[YOCTO #13737]

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosquashfs-tools: Enable on musl
Khem Raj [Fri, 14 Feb 2020 07:03:52 +0000 (23:03 -0800)]
squashfs-tools: Enable on musl

Upstream has a patch [1] to fix musl builds, Prior to this it would not
build on musl due to missing GNU extentions for fnmatch

[1] https://github.com/plougher/squashfs-tools/commit/4280e74de14070869787a9166242f9ce2dafd82e

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibxml2: Fix CVE-2019-20388
Lee Chee Yang [Fri, 14 Feb 2020 11:28:10 +0000 (19:28 +0800)]
libxml2: Fix CVE-2019-20388

see:
https://gitlab.gnome.org/GNOME/libxml2/merge_requests/68

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobash: include patch 12-16
Lee Chee Yang [Fri, 14 Feb 2020 11:28:09 +0000 (19:28 +0800)]
bash: include patch 12-16

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agostaging: Handle races between binaries and their libs
Richard Purdie [Fri, 14 Feb 2020 12:50:18 +0000 (12:50 +0000)]
staging: Handle races between binaries and their libs

There is a long standing issue where a binary could be installed into the
sysroot before its library dependencies. We've always argued nothing should
use the binary until it has been installed by a dependency but there are issues
around binaries which conflict with the host system, for example patch,
python3, gzip and more.

With the recent patch changes we've seen issues like:
ERROR: gdb-cross-canadian-powerpc-8.3.1-r0 do_patch: Command Error: 'quilt --quiltrc /home/pokybuild/yocto-worker/qemuppc/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-powerpc/8.3.1-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0  Output:
Applying patch 0009-Change-order-of-CFLAGS.patch
patch: /lib64/libattr.so.1: version `ATTR_1.3' not found (required by patch)
Patch 0009-Change-order-of-CFLAGS.patch does not apply (enforce with -f)

which is a symptom of this issue (libattr-native is a dependency of patch-native).

There are other ways to fix this such as disabling libattr in patch, installing
patch to a subdirectory and requiring PATH manipulation and so on.

We can simply fix the staging code to handle /bin/ after everything else so
do that and avoid all these other complications.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibrepo: upgrade 1.11.1 -> 1.11.2
Wang Mingyu [Mon, 10 Feb 2020 17:38:05 +0000 (09:38 -0800)]
librepo: upgrade 1.11.1 -> 1.11.2

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibcheck: upgrade 0.13.0 -> 0.14.0
Wang Mingyu [Mon, 10 Feb 2020 17:38:04 +0000 (09:38 -0800)]
libcheck: upgrade 0.13.0 -> 0.14.0

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibxcrypt: upgrade 4.4.10 -> 4.4.12
Wang Mingyu [Mon, 10 Feb 2020 17:38:03 +0000 (09:38 -0800)]
libxcrypt: upgrade 4.4.10 -> 4.4.12

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibtasn1: upgrade 4.15.0 -> 4.16.0
Wang Mingyu [Mon, 10 Feb 2020 17:38:02 +0000 (09:38 -0800)]
libtasn1: upgrade 4.15.0 -> 4.16.0

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosudo: upgrade 1.8.30 -> 1.8.31
Wang Mingyu [Mon, 10 Feb 2020 17:38:00 +0000 (09:38 -0800)]
sudo: upgrade 1.8.30 -> 1.8.31

-License-Update: Copyright year updated from 1998-2019 to 1998-2020.

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoqemu: Upgrade to 4.2.0
Alistair Francis [Mon, 10 Feb 2020 21:25:15 +0000 (13:25 -0800)]
qemu: Upgrade to 4.2.0

While we are upgrading let's refresh patches and remove the outdated
patches.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobinutils: additional patch should be added with space.
Jeremy Puhlman [Mon, 10 Feb 2020 21:29:26 +0000 (13:29 -0800)]
binutils: additional patch should be added with space.

If an append adds a patch or file with SRC_URI += , the spaceless
append causes the file listings to concatinate and cause failures
in the nativesdk-binutils parse/build.

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agomtdev: upgrade 1.1.5 -> 1.1.6
Pierre-Jean Texier via Openembedded-core [Mon, 10 Feb 2020 21:25:59 +0000 (22:25 +0100)]
mtdev: upgrade 1.1.5 -> 1.1.6

Also remove patch which have been merged upstream

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agodevicetree.bbclass: include symbols in base DT
Alex Kiernan [Wed, 12 Feb 2020 10:35:26 +0000 (10:35 +0000)]
devicetree.bbclass: include symbols in base DT

When processing overlays, the base device tree must be compiled with
symbols, otherwise attempting to apply overlays in U-Boot will fail
with:

  failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
  base fdt does did not have a /__symbols__ node
  make sure you've compiled with -@

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokernel-fitimage: fix devicetree reproducibility
Alex Kiernan [Wed, 12 Feb 2020 11:33:36 +0000 (11:33 +0000)]
kernel-fitimage: fix devicetree reproducibility

Ensure that the order of dtb/dtbo files in the generated fitimage is
reproducible.

Fixes: 71bfa9838cbf ("kernel-fitimage: Handle overlays in EXTERNAL_KERNEL_DEVICETREE")
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolinux-yocto-dev: Add paravirt_kvm support for qemux86-64
He Zhe [Wed, 12 Feb 2020 07:35:57 +0000 (15:35 +0800)]
linux-yocto-dev: Add paravirt_kvm support for qemux86-64

This feature includes paravirtualized KVM guest support, including
KVMCLOCK for enhancing clock accuracy of guest OS. With it we can prevent
the following error.

"clocksource: timekeeping watchdog on CPU3: Marking clocksource 'tsc' as
unstable because the skew is too large"

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython3: install _tkinter.*.so to python3-tkinter package
Yi Zhao [Wed, 12 Feb 2020 06:24:40 +0000 (14:24 +0800)]
python3: install _tkinter.*.so to python3-tkinter package

When enable PACKAGECONFIG[tk], we should install _tkinter.*.so to
python3-tkinter package rather than python3-misc package.

Fixes:
ERROR: python3-3.8.1-r0 do_package_qa: QA Issue:
/usr/lib/python3.8/lib-dynload/_tkinter.cpython-38-x86_64-linux-gnu.so
contained in package python3-misc requires libtk8.6.so()(64bit), but no
providers found in RDEPENDS_python3-misc? [file-rdeps]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agooeqa: reproducible: Run diffoscope on saved output
Joshua Watt [Wed, 12 Feb 2020 03:14:35 +0000 (21:14 -0600)]
oeqa: reproducible: Run diffoscope on saved output

If there are differing packages and they are being saved for review,
automatically run diffoscope on them and include the output in the saved
output. The output is currently done in HTML format since these are
typically published on a webpage by the autobuilder.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agodiffoscope: Exclude from musl builds
Richard Purdie [Fri, 14 Feb 2020 08:25:18 +0000 (08:25 +0000)]
diffoscope: Exclude from musl builds

Various dependencies don't build for musl so exclude this recipe too, at
least for now until the issues are resolved to avoid build failures in
world builds.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agorecipes-support: Add diffoscope recipe
Joshua Watt [Wed, 12 Feb 2020 03:14:34 +0000 (21:14 -0600)]
recipes-support: Add diffoscope recipe

Diffoscope is the universal diff tool, capable of comparing many
different formats.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython: Add magic recipe
Joshua Watt [Wed, 12 Feb 2020 03:14:33 +0000 (21:14 -0600)]
python: Add magic recipe

The python-magic module is used by diffoscope tool to make
build comparisons.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython: Add libarchive-c recipe
Joshua Watt [Wed, 12 Feb 2020 03:14:32 +0000 (21:14 -0600)]
python: Add libarchive-c recipe

The libarchive python module is used by diffoscope tool to
make build comparisons.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agowayland: upgrade 1.17.0 -> 1.18.0
Denys Dmytriyenko [Thu, 13 Feb 2020 06:23:44 +0000 (01:23 -0500)]
wayland: upgrade 1.17.0 -> 1.18.0

This is the official release for Wayland 1.18. The main new features in
this release are:

- Add support for the Meson build system (autotools is still supported
  but will be removed in a future release)
- Add API to tag proxy objects to allow applications and toolkits to
  share the same Wayland connection
- Track wayland-server timers in user-space to prevent creating too
  many FDs
- Add wl_global_remove, a new function to mitigate race conditions with
  globals
https://lists.freedesktop.org/archives/wayland-devel/2020-February/041207.html

2 upstreamed patches are dropped.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoppp: Security fix CVE-2020-8597
Yi Zhao [Thu, 13 Feb 2020 08:55:01 +0000 (16:55 +0800)]
ppp: Security fix CVE-2020-8597

CVE-2020-8597: eap.c in pppd in ppp 2.4.2 through 2.4.8 has an rhostname
buffer overflow in the eap_request and eap_response functions.

References:
https://nvd.nist.gov/vuln/detail/CVE-2020-8597

Patch from:
https://github.com/paulusmack/ppp/commit/8d7970b8f3db727fe798b65f3377fe6787575426

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoicecc.bbclass: replace superfluous "+=" with "="
Robert P. J. Day [Thu, 13 Feb 2020 13:21:57 +0000 (08:21 -0500)]
icecc.bbclass: replace superfluous "+=" with "="

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoiputils: Fix systemd and ipv6 detection
Alex Kiernan [Thu, 13 Feb 2020 10:00:29 +0000 (10:00 +0000)]
iputils: Fix systemd and ipv6 detection

When systemd is enabled, ensure iputils detects it correctly. Split out
IPv6 only features based on ipv6 enabled in DISTRO_FEATURES.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobinutils: Bail out if gold is used on 32/64 bit RISC-V
Khem Raj [Thu, 13 Feb 2020 08:21:59 +0000 (00:21 -0800)]
binutils: Bail out if gold is used on 32/64 bit RISC-V

gold is not supporting risc-v yet and, this will cause subltle errors
during build e.g. autoconf not finding certain features like visibility
and it could take a while to unwind the problem. Its better to error out
early

Remove dwp and ld.gold for rv32 as well

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agocrosssdk: Set nativesdk specific distro features
Khem Raj [Thu, 13 Feb 2020 08:21:58 +0000 (00:21 -0800)]
crosssdk: Set nativesdk specific distro features

Currently, normal distro features e.g. ld-is-gold is impacting
crosssdk recipes, which actually should not be the case, since
that feature is essentially intended for target packages and not
nativesdk packages

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoltp: Fix tescases with 64bit time_t using 32bit arches
Khem Raj [Thu, 13 Feb 2020 08:21:57 +0000 (00:21 -0800)]
ltp: Fix tescases with 64bit time_t using 32bit arches

This helps it compile on musl

Fixes
| tst_clocks.c:31:17: error: 'SYS_clock_getres' undeclared (first use in this function); did you mean 'tst_clock_getres

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agooeqa: Use --disable-maintainer-mode configure option
Khem Raj [Thu, 13 Feb 2020 08:21:51 +0000 (00:21 -0800)]
oeqa: Use --disable-maintainer-mode configure option

since the versions of autotools might differ on target and build host, plus difference in
timestamps for configure and system can result in reconfigure lets avoid
that by disabling maintainer mode

Avoids
error: newly created file is older than distributed files!

[YOCTO #13779]

Suggested-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoqemuarm: Disable highmem when QB_MACHINE is virt
Khem Raj [Thu, 13 Feb 2020 08:21:50 +0000 (00:21 -0800)]
qemuarm: Disable highmem when QB_MACHINE is virt

running ptests on qemuarm returns fails since it finds errors in kernel
logs like below

***********************
Central error: [    4.338465] pci-host-generic 4010000000.pcie: ECAM ioremap failed
***********************

Since its a 32bit kernel 4010000000 address is truncated to 10000000 and ends up
in conflicts with VIRT_PCIE_MMIO, which ranges from 0x10000000 to 0x3efeffff

This is happening because the linux-yocto kernel is not compiled with
LPAE support, however, virt machine for qemuarm assumes that by default

Should LPAE be enabled by default in kernel config is a separate
question

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopackage_ipk: Minor import tweak + ensure packages regenerated
Richard Purdie [Thu, 13 Feb 2020 14:06:49 +0000 (14:06 +0000)]
package_ipk: Minor import tweak + ensure packages regenerated

The recent opkg-utils change didn't update all the packages since its
marked as ABISAFE (and has to be due to update-alternatives).

Fix a minor import issue to avoid multiple imports of glob which
also causes packages to re-generate.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopkgconf: Remove pointless DEFAULT_PREFERENCE
Richard Purdie [Mon, 10 Feb 2020 15:58:45 +0000 (15:58 +0000)]
pkgconf: Remove pointless DEFAULT_PREFERENCE

There is no other version of pkgconfig to have a preference against,
remove the unneeded variable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoscripts/lib/resulttool/report: Enable report selected test case result
Yeoh Ee Peng [Fri, 31 Jan 2020 05:47:42 +0000 (13:47 +0800)]
scripts/lib/resulttool/report: Enable report selected test case result

Enable reporting selected test case result given the user provided
the selected test case id. If both test result id and test case id
were provided, report the selected test case result from the
selected test result id.

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agometa/recipes-graphics/waffle: Add python3 dependency
Aníbal Limón [Tue, 14 Jan 2020 16:20:23 +0000 (10:20 -0600)]
meta/recipes-graphics/waffle: Add python3 dependency

The python3native.bbclass set PYTHON_{LIBRARY, INCLUDE_DIR} pointing to
python target build, a patch was add to use target _sysconfigdata too [1]
but is not available without python3 dependency.

Fixes waffle build when trying to find _sysconfigdata module,

...
| Program python3 found: YES (/home/anibal.limon/linaro/oe-rpb-master/build-410c/tmp-rpb-glibc/work/aarch64-linaro-linux/waffle/1.6.0-r0/recipe-sysroot-native/usr/bin/python3-native/python3)
|
| meson.build:36:0: ERROR: <ExternalProgram 'python3' -> ['/home/anibal.limon/linaro/oe-rpb-master/build-410c/tmp-rpb-glibc/work/aarch64-linaro-linux/waffle/1.6.0-r0/recipe-sysroot-native/usr/bin/python3-native/python3']> is not a valid python or it is missing setuptools
|
| A full log can be found at /home/anibal.limon/linaro/oe-rpb-master/build-410c/tmp-rpb-glibc/work/aarch64-linaro-linux/waffle/1.6.0-r0/build/meson-logs/meson-log.txt
| WARNING: exit code 1 from a shell command.
...

[1] http://git.openembedded.org/openembedded-core/commit/?id=02714c105426b0d687620913c1a7401b386428b6

Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibubootenv: Split binaries to a libubootenv-bin package
Otavio Salvador [Fri, 31 Jan 2020 13:33:23 +0000 (10:33 -0300)]
libubootenv: Split binaries to a libubootenv-bin package

The fw_setenv and fw_printenv binaries should be on a specific package
as some systems may require just the library.

The upgrade path was kept using the RPROVIDES for the -bin package.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopopulate_sdk_base: if the SDKIMAGE_FEATURES changes, refresh the SDK
Mark Hatle [Fri, 7 Feb 2020 17:43:37 +0000 (11:43 -0600)]
populate_sdk_base: if the SDKIMAGE_FEATURES changes, refresh the SDK

Since the features are processed by a python fragment, we need to explicitly
list the variables that should affect the resulting hash, and thus sstate
re-use.

Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokernel-fitimage: Handle overlays in EXTERNAL_KERNEL_DEVICETREE
Alex Kiernan [Fri, 31 Jan 2020 16:24:42 +0000 (16:24 +0000)]
kernel-fitimage: Handle overlays in EXTERNAL_KERNEL_DEVICETREE

When using EXTERNAL_KERNEL_DEVICETREE, collect DTB overlays too (*.dtbo)
as well as iterating down into sub-directories so using the behaviour
for naming which matches KERNEL_DEVICETREE.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoxserver-nodm-init: Fix the start failure for non-root user
Kevin Hao [Sat, 8 Feb 2020 12:36:42 +0000 (20:36 +0800)]
xserver-nodm-init: Fix the start failure for non-root user

In order to start the xserver, a non-root user should have the
cap_sys_admin capability to set the drm master. We try to get
the cap_sys_admin capability by setting it in both the thread
and file inheritable set. The side effect of this is that we
would have to add the "pam" to the distro features if we want
use the xserver-nodm-init for a non-root user.

[Yocto #11526]

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agotestimage: Extend runtime testing infrastructure to allow unconventional booting...
Alejandro Hernandez Samaniego [Sat, 8 Feb 2020 10:32:02 +0000 (02:32 -0800)]
testimage: Extend runtime testing infrastructure to allow unconventional booting processes to be tested

The current runtime infrastructure contains hardcoded values which Ill refer to
as patterns, these patterns are either searched through or sent via the serial
terminal to communicate between HOST and TARGET.

These patterns are required since they allow us to check when a device has
finished booting, to log in, and to check whether a command sent from our tests
has returned, this way we are able to check both the status of the commands that
were sent along with its output.

The testing process goes somewhat as follows:
1. Launch QEMU and start booting.
2. Check when the device has booted by looking for the pattern login:.
3. Log in as the root user (default for our images).
4. Check that we were able to log in succesfully.
5. Start running the runtime test cases defined by TEST_SUITES.
6. One of such test cases could send a command to the QEMU target.
7. Check whether that command returned.
8. Check its output and status, return whether the test case passed or failed.

This patch allows this set of patterns to be defined instead of being hardcoded,
but it also automatically sets the defaults that we have been using in the past
if they have not been manually defined, for this reason, the patch is less
invasive and should not affect in any way how tests are currently being run.

Cases that can be enabled with this patch:
- A customized image that does not use the root user (or maybe we want to check
what happens if we dont use the root user).
- An image where the PS1 env variable has been modified, and the prompt pattern
wouldnt match the default.
- Baremetal applications, which do not follow the conventional way of booting
Linux and would probably not show a prompt for a user to log in, same applies
for testing bootloaders.
- poky-tiny: Using DISTRO=poky-tiny and an image such as the core-image-tiny
from meta-intel, which boots directly to RAM, and does not show a log in prompt
since it does not contain a conventional init process.

The code itself contains comments that should be self explanatory but here is an
example on how these patterns can be defined in a hypothetical case where we
want to run test cases as the webserver user instead:

TESTIMAGE_BOOT_PATTERNS = "send_login_user search_login_succeeded"
TESTIMAGE_BOOT_PATTERNS[send_login_user] = "webserver\n"
TESTIMAGE_BOOT_PATTERNS[search_login_succeeded] = "webserver@[a-zA-Z0-9\-]+:~#"

The variable TESTIMAGE_BOOT_PATTERNS defines which patterns to override when
used to communicate with the target when booting, anyone familiar with the
PACKAGECONFIG syntax should have no trouble setting these.

Other patterns would still be set up as default, e.g.
search_reached_prompt would still be login:

The accepted flags for TESTIMAGE_BOOT_PATTERNS are the following:
search_reached_prompt, send_login_user, search_login_succeeded,
search_cmd_finished.

They are prefixed with either search/send, to differentiate if the pattern is
meant to be sent or searched to/from the target terminal.

A working example of this code that falls under the baremetal case mentioned
above along with a test case is present on the meta-freertos layer, which tests
an RTOS image built with OpenEmbedded and automatically runs a test case on it
after booting such image:

As usual, INHERIT += "testimage" needs to be present on local.conf
$ bitbake freertos-demo -c testimage

RESULTS:
RESULTS - freertos_echo.FreeRTOSTest.test_freertos_echo: PASSED (2.00s)
SUMMARY:
freertos-demo () - Ran 1 test in 2.006s
freertos-demo - OK - All required tests passed (successes=1, skipped=0,
failures=0, errors=0)

Signed-off-by: Alejandro Hernandez Samaniego <aehs29@gmail.com>
Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agotestimage: Allow testing on QEMU machines with a single serial port
Alejandro Hernandez Samaniego [Sat, 8 Feb 2020 10:30:04 +0000 (02:30 -0800)]
testimage: Allow testing on QEMU machines with a single serial port

commmit 6cde67d0a84 enables the use of qemurunner on machines that
only have a single serial port, but still sets the default value
as serial_ports=2 if not provided.

The testimage class does not call qemurunner with a serial_ports
argument, hence always defaulting to two.

Pass the serial_ports argument from the testimage class to allow
tests to run on QEMU machines with a single serial port.

Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopciutils: upgrade 3.6.2 -> 3.6.4
Wang Mingyu [Sat, 8 Feb 2020 17:00:55 +0000 (09:00 -0800)]
pciutils: upgrade 3.6.2 -> 3.6.4

refresh the following patch:
configure.patch

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosystemd: upgrade 243.4 -> 244.1
Alex Kiernan [Thu, 6 Feb 2020 16:48:13 +0000 (16:48 +0000)]
systemd: upgrade 243.4 -> 244.1

Drop 0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch a
variant on which was introduced in 2c1047310970 ("Upgrade to systemd
211+") in 2014. The oldest supported build machine is now CentOS 7 which
has --relative support in ln, so there no longer appears to be any need
for this change.

Rebase/refresh musl patches:

- replace missing.h with specific missing_... header
- fix additional WRITE_STRING_FILE_DISABLE_BUFFER
- fix more places that need netinet/if_ether.h

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agodhcp: upgrade 4.4.1 -> 4.4.2
Wang Mingyu [Thu, 6 Feb 2020 14:53:22 +0000 (06:53 -0800)]
dhcp: upgrade 4.4.1 -> 4.4.2

0001-Fix-a-NSUPDATE-compiling-issue.patch
0001-master-Added-includes-of-new-BIND9-compatibility-hea.patch
Removed since they are included in 4.4.2.

refresh the following patch:
0004-Fix-out-of-tree-builds.patch

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolighttpd: upgrade 1.4.54 -> 1.4.55
Wang Mingyu [Thu, 6 Feb 2020 14:52:26 +0000 (06:52 -0800)]
lighttpd: upgrade 1.4.54 -> 1.4.55

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoprocps: upgrade 3.3.15 -> 3.3.16
Yi Zhao [Thu, 6 Feb 2020 11:18:12 +0000 (19:18 +0800)]
procps: upgrade 3.3.15 -> 3.3.16

Drop 0001-Fix-out-of-tree-builds.patch since it has been merged
upstream.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython3: Do not hardcode "lib" for distutils
Changqing Li [Fri, 7 Feb 2020 06:07:44 +0000 (14:07 +0800)]
python3: Do not hardcode "lib" for distutils

Get the sys.lib from python3 itself and do not use
hardcoded value of 'lib' for distutils.

Solve the error below that occurs when run "python3 setup.py
install"
on lib64 multilib platform:
[Errno 2] No such file or directory:
'/usr/lib/python3.7/site-packages/test-easy-install-1828.write-test'

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython3: fix the installation path of libpython3.7m.a for multilib
Changqing Li [Fri, 7 Feb 2020 06:07:43 +0000 (14:07 +0800)]
python3: fix the installation path of libpython3.7m.a for multilib

Fix the installation path of libpython3.7m.a on mulitlib lib64
platform to lib64 instead of lib

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agomesa: upgrade 19.3.1 -> 19.3.3
Wang Mingyu [Thu, 6 Feb 2020 19:02:54 +0000 (11:02 -0800)]
mesa: upgrade 19.3.1 -> 19.3.3

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoxserver-xorg: upgrade 1.20.6 -> 1.20.7
Alexander Kanavin [Fri, 7 Feb 2020 19:45:58 +0000 (20:45 +0100)]
xserver-xorg: upgrade 1.20.6 -> 1.20.7

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobison: Upgrade to 3.5.1
Khem Raj [Wed, 5 Feb 2020 01:08:19 +0000 (17:08 -0800)]
bison: Upgrade to 3.5.1

Minor upgrade on 3.5 release series

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agocryptodev: update to Jan.23, 2020
Scott Branden via Openembedded-core [Thu, 6 Feb 2020 20:57:43 +0000 (12:57 -0800)]
cryptodev: update to Jan.23, 2020

* Remove backported patches:
  0001-Fix-module-loading-with-Linux-v5.0-rc5.patch

Update to latest cryptodev dated Jan.23, 2020.
Fixes build on kernel v5.5+

Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosstate.bbclass: fix issue while handling long sstate filenames
Jaewon Lee [Thu, 6 Feb 2020 21:45:11 +0000 (13:45 -0800)]
sstate.bbclass: fix issue while handling long sstate filenames

When moving to python3, divison using '/' now returns float instead of
an integer. In upstream commit b8025e972081b70960ffcbcbe43a7118041556a1
sstate filenames longer than the limit are changed to just include
necessary info + 3 fields just for information. The space left over
after the necessary info is divided into 3 for each of the fields.
Using '//' instead to do the division to solve the following error
message:

avail = (254 - len(hash + "_" + taskname + extension) -
len(components[0]) - len(components[1]) - len(components[5]) -
len(components[6]) - 7) / 3
    >        components[2] = components[2][:avail]
             components[3] = components[3][:avail]
TypeError: slice indices must be integers or None or have an __index__
method

Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopackage.bbclass: Support stripping and debug copy of static libraries
Mark Hatle [Fri, 7 Feb 2020 20:20:08 +0000 (14:20 -0600)]
package.bbclass: Support stripping and debug copy of static libraries

By default, we won't copy and strip static libraries.  However, this
functionality can be useful in some cases where people are doing
development on the target, and don't generally want the larger debug
capable static libraries.  To enable the new functionality set:

    PACKAGE_DEBUG_STATIC_SPLIT = '1'

Add a new function splitstaticdebuginfo.  Thus function will copy the
unmodified static library into the specific debug directory location.
By keeping an unmodified version, it is possible for a user trying
to debug something to use -L /usr/lib/.debug-static and their existing
build commands to switch from stripped to full debug versions.

The PACKAGE_DEBUG_SPLIT_STYLE will select between two different
approaches, /usr/lib/debug-static or <path>/.debug-static.

Additionally you can now choose to strip static libraries to conserve
space.  If either 'PACKAGE_DEBUG_STATIC_SPLIT' or 'PACKAGE_STRIP_STATIC'
is set to 1, the static library will be stripped.  (This is not on by
default, as it could make diagnosing static library usage difficult in
some cases.)

Add to insane.bbclass a skip to the staticdev warning for the specific
-dbg package versions.

Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopackage.bbclass: Allow INHIBIT_PACKAGE_STRIP_FILES to skip .ko and static libs
Mark Hatle [Fri, 7 Feb 2020 20:20:07 +0000 (14:20 -0600)]
package.bbclass: Allow INHIBIT_PACKAGE_STRIP_FILES to skip .ko and static libs

Change the order of the skip processing to happen before any .ko and static
library processing.  This will allow these types of files to be individually
skipped if necessary.

Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopackage.bbclass: Fix debug source processing for static libraries
Mark Hatle [Fri, 7 Feb 2020 20:20:06 +0000 (14:20 -0600)]
package.bbclass: Fix debug source processing for static libraries

Format of the sources list is the [ (file, [source, ...]), ... ] before
this change, the static libraries were processed but the items were
included incorrectly causing no sources for static libraries to be
included.

Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agochkconfig: remove the recipe
Alexander Kanavin [Fri, 7 Feb 2020 19:45:59 +0000 (20:45 +0100)]
chkconfig: remove the recipe

chkconfig is one of the options for virtual/update-alternatives,
however opkg-utils have been used as the default for a very long time,
while chkconfig isn't anymore tested in any way, and is stuck
at a very old version due to newer versions requiring selinux.

[YOCTO #11264]

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoqemurunner.py: add try/except for pid handling race
Trevor Gamblin [Fri, 7 Feb 2020 13:46:52 +0000 (08:46 -0500)]
qemurunner.py: add try/except for pid handling race

In some instances, attempts to remove the qemu pidfile within the
stop() method fail despite the os.path.exists() call immediately
before implying that the file is present. Add a try/except block
to log a warning if this occurs, rather than failing outright,
since the process simply appears to be exiting at an inconvenient
time.

[YOCTO #13675]

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agooeqa: Use cpio 2.13 as testcase
Khem Raj [Wed, 5 Feb 2020 05:41:19 +0000 (21:41 -0800)]
oeqa: Use cpio 2.13 as testcase

cpio 2.12 was released in 2015 and might have used older autotools
which could result in errors like

https://bugzilla.yoctoproject.org/show_bug.cgi?id=13779

Bumping to 2.13 will help in matching the tool versions
A good change on top would be to run

aclocal -I .; autoheader; autoconf; automake --add-missing -c

before running configure step perhaps

[YOCTO #13779]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokern-tools: fix merge_config when LD contains parameters
Bruce Ashfield [Fri, 7 Feb 2020 14:52:04 +0000 (09:52 -0500)]
kern-tools: fix merge_config when LD contains parameters

To ensure that the kernel linker is used when allno/mod/yes config
merge_config steps were executed, the call to make was tweaked to
explicitly pass LD.

But since the variable wasn't quoted, any parameters to LD (like
the sysroot) were mistakenly passed to make, and hence could trigger
an error on some architectures.

We also tweak the logging to hightlight errors like this in the
future and avoid losing it in the noise of merge configs sometimes
overly verbose output.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokernel-yocto: fix defconfig detection in find_sccs()
Gavin Li [Thu, 6 Feb 2020 17:35:52 +0000 (12:35 -0500)]
kernel-yocto: fix defconfig detection in find_sccs()

The current code would cause a file like "config.bin" to added to the
config sources list. I am sure the intention was to add any files with
defconfig in its name and not the other way around.

Signed-off-by: Gavin Li <gavinli@thegavinli.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokernel-yocto.bbclass: do_kernel_configme: don't use +errexit, merge_config_build...
Martin Jansa [Thu, 6 Feb 2020 17:35:51 +0000 (12:35 -0500)]
kernel-yocto.bbclass: do_kernel_configme: don't use +errexit, merge_config_build.log and fail when /.config wasn't created

* for whatever reason, instead of silently continuing to build default kernel config

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh
Martin Jansa [Thu, 6 Feb 2020 17:35:50 +0000 (12:35 -0500)]
kernel-yocto.bbclass: set KERNEL_LD also for merge_config.sh

* when ld-is-gold is used, merge_config.sh silently fails and doesn't generate anything
  useful in .config (and also include directory isn't created):

  tmp-glibc-bfd-qemux86-do_kernel_configme/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build:
  total 164K
  drwxr-xr-x 4 martin martin 4.0K Feb  5 02:27 .
  drwxrwxr-x 7 martin martin 4.0K Feb  5 02:27 ..
  -rw-rw-r-- 1 martin martin 133K Feb  5 02:28 .config
  -rw-rw-r-- 1 martin martin   39 Feb  5 02:27 .gitignore
  drwxr-xr-x 4 martin martin 4.0K Feb  5 02:27 include
  -rw-rw-r-- 1 martin martin  201 Feb  5 02:27 Makefile
  drwxrwxr-x 4 martin martin 4.0K Feb  5 02:27 scripts
  lrwxrwxrwx 1 martin martin   61 Feb  5 02:27 source -> /OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source

  tmp-glibc-gold-qemux86-do_kernel_configme/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build:
  total 28K
  drwxr-xr-x 3 martin martin 4.0K Feb  5 02:26 .
  drwxrwxr-x 7 martin martin 4.0K Feb  5 02:26 ..
  -rw-rw-r-- 1 martin martin   74 Feb  5 02:26 .config
  -rw-rw-r-- 1 martin martin   39 Feb  5 02:26 .gitignore
  -rw-rw-r-- 1 martin martin  201 Feb  5 02:26 Makefile
  drwxrwxr-x 4 martin martin 4.0K Feb  5 02:26 scripts
  lrwxrwxrwx 1 martin martin   61 Feb  5 02:26 source -> /OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source

  $ cat tmp-glibc-gold-qemux86-do_kernel_configme/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/.config
  CONFIG_LOCALVERSION="-yocto-standard"

* and because the failure is silent, it will happily start building
  kernel with default defconfig, which even builds OK for qemux86-64
  but on qemux86 I've noticed this issue, because incorrectly
  configured kernel build fails with:

  $ tail -n 20 tmp-glibc-gold-qemux86/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/temp/log.do_compile
    LD       /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/tools/objtool/libsubcmd-in.o
    AR       /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/tools/objtool/libsubcmd.a
    HOSTCC  scripts/mod/mk_elfconfig
    CC      scripts/mod/devicetable-offsets.s
    CC      scripts/mod/empty.o
  cc1: error: code model 'kernel' not supported in the 32 bit mode
  cc1: sorry, unimplemented: 64-bit mode not compiled in
  make[2]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/scripts/Makefile.build:99: scripts/mod/devicetable-offsets.s] Error 1
  make[2]: *** Waiting for unfinished jobs....
  cc1: error: code model 'kernel' not supported in the 32 bit mode
  cc1: sorry, unimplemented: 64-bit mode not compiled in
  make[2]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/scripts/Makefile.build:266: scripts/mod/empty.o] Error 1
  make[1]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/Makefile:1111: prepare0] Error 2
  make[1]: *** Waiting for unfinished jobs....
    LD       /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/tools/objtool/objtool-in.o
  /OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/tools/objtool
    LINK     /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/tools/objtool/objtool
  make: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/Makefile:179: sub-make] Error 2
  WARNING: exit code 1 from a shell command.

* the issue happens in log.do_kernel_configme, but the log is completely useless:

  cat tmp-glibc-gold-qemux86-do_kernel_configme/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/temp/log.do_kernel_configme
  DEBUG: Executing python function extend_recipe_sysroot
  NOTE: Direct dependencies are ['virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-devtools/bison/bison_3.5.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot', 'virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-extended/bc/bc_1.07.1.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/binutils/binutils-cross_2.33.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_populate_sysroot', '/OE/build/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross_9.2.bb:do_populate_sysroot']
  NOTE: Installed into sysroot: ['bison-native', 'bc-native', 'binutils-cross-i686', 'gcc-cross-i686', 'autoconf-native', 'xz-native', 'flex-native', 'gnu-config-native', 'automake-native', 'libtool-native', 'texinfo-dummy-native', 'gettext-minimal-native', 'readline-native', 'zlib-native', 'gmp-native', 'libmpc-native', 'mpfr-native', 'linux-libc-headers', 'm4-native', 'ncurses-native', 'pkgconfig-native']
  NOTE: Skipping as already exists in sysroot: ['kern-tools-native', 'quilt-native']
  DEBUG: sed -e 's:^[^/]*/:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native/:g' /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/bison-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/gcc-cross-i686/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/autoconf-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/gnu-config-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/automake-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/libtool-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/gmp-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/ncurses-native/fixmepath /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/pkgconfig-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/OE/build/oe-core/tmp-glibc/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/OE/build/oe-core/tmp-glibc/pkgdata/qemux86:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/temp/fifo.10476:g'
  DEBUG: Python function extend_recipe_sysroot finished
  DEBUG: Executing shell function do_kernel_configme
  DEBUG: Shell function do_kernel_configme finished

  ]because merge_config.sh is redirected to work-shared/qemux86/kernel-source/.kernel-meta/cfg/merge_config_build.log
  and bbfatal_log called in do_kernel_configme only when merge_config.sh fails which it should in this case
  but doesn't.

  The merge_config_build.log shows 5.4 specific error:
    scripts/Kconfig.include:39:  gold linker 'i686-oe-linux-ld' not supported
  but then it happily continues reporting what isn't applied in not created
  .config file

  --- tmp-glibc-bfd-qemux86-do_kernel_configme/work-shared/qemux86/kernel-source/.kernel-meta/cfg/merge_config_build.log  2020-02-05 02:28:01.455520207 +0100
  +++ tmp-glibc-gold-qemux86-do_kernel_configme/work-shared/qemux86/kernel-source/.kernel-meta/cfg/merge_config_build.log 2020-02-05 02:26:30.656470909 +0100
  @@ -171,586 +171,5113 @@
     HOSTCC  scripts/kconfig/symbol.o
     HOSTLD  scripts/kconfig/conf
   scripts/kconfig/conf  --alldefconfig Kconfig
  -./.tmp.config.jDjIEYi9Yq:2208:warning: unexpected data:  #
  -./.tmp.config.jDjIEYi9Yq:2209:warning: unexpected data:  # Generic Driver Options
  -./.tmp.config.jDjIEYi9Yq:2210:warning: unexpected data:  #
  -./.tmp.config.jDjIEYi9Yq:3102:warning: symbol value 'm' invalid for SAMPLE_SECCOMP
  -./.tmp.config.jDjIEYi9Yq:3119:warning: symbol value 'm' invalid for NF_CT_PROTO_GRE
  -./.tmp.config.jDjIEYi9Yq:3120:warning: symbol value 'm' invalid for NF_CT_PROTO_SCTP
  -./.tmp.config.jDjIEYi9Yq:3121:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE
  -#
  -# configuration written to .config
  -#
  +scripts/Kconfig.include:39:  gold linker 'i686-oe-linux-ld' not supported
  +make[2]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/scripts/kconfig/Makefile:73: alldefconfig] Error 1
  +make[1]: *** [/OE/build/oe-core/tmp-glibc/work-shared/qemux86/kernel-source/Makefile:567: alldefconfig] Error 2
   make[1]: Leaving directory '/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build'
  +make: *** [Makefile:179: sub-make] Error 2
  +grep: /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/.config: No such file or directory
  +Value requested for CONFIG_LOCALVERSION not in final .config
  +Requested value:  CONFIG_LOCALVERSION=""
  +Actual value:
  +
  +grep: /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/linux-yocto/5.4.15-r0/linux-qemux86-standard-build/.config: No such file or directory
  +Value requested for CONFIG_LOCALVERSION_AUTO not in final .config
  +Requested value:  # CONFIG_LOCALVERSION_AUTO is not set
  +Actual value:

* I don't know why merge_config.sh uses separate more difficult to find merge_config_build.log
  instead of leaving the output to end in log.do_kernel_configme, I'll send it as separate
  commit so that it can be discussed there.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokernel-yocto: Only override CONFIG_LOCALVERSION if LINUX_VERSION_EXTENSION is set
Paul Barker [Thu, 6 Feb 2020 17:35:49 +0000 (12:35 -0500)]
kernel-yocto: Only override CONFIG_LOCALVERSION if LINUX_VERSION_EXTENSION is set

CONFIG_LOCALVERSION may already be set in a defconfig or config fragment
and this should not be unconditionally overridden.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokernel-yocto: Drop setting of unused variables in do_kernel_metadata
Paul Barker [Thu, 6 Feb 2020 17:35:48 +0000 (12:35 -0500)]
kernel-yocto: Drop setting of unused variables in do_kernel_metadata

The machine_branch and machine_srcrev variables were set but not used in
do_kernel_metadata.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokernel-yocto: Move defaults and tasks from linux-yocto.inc into bbclass
Paul Barker [Thu, 6 Feb 2020 17:35:47 +0000 (12:35 -0500)]
kernel-yocto: Move defaults and tasks from linux-yocto.inc into bbclass

This allows the kernel-yocto bbclass to be inherited in a recipe without
needing to include linux-yocto.inc. The bbclass should stand on its own
and linux-yocto.inc does a few things which may not be desired in other
kernel recipes (such as modifying KERNEL_FEATURES).

The LINUX_VERSION_EXTENSION default is not moved as other kernel recipes
may not want this setting in place.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokern-tools-native: use more common S value and oe_runmake
Martin Jansa [Thu, 6 Feb 2020 17:35:46 +0000 (12:35 -0500)]
kern-tools-native: use more common S value and oe_runmake

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokern-tools: integrate merge_config fix for gold linker
Bruce Ashfield [Thu, 6 Feb 2020 17:35:45 +0000 (12:35 -0500)]
kern-tools: integrate merge_config fix for gold linker

Bumping the SRCREV to pickup the following fix:

   Author: Martin Jansa <Martin.Jansa@gmail.com>
   Date:   Wed Feb 5 03:26:57 2020 +0100

       merge_config.sh: pass LD variable from shell environment to make

       * since 5.4 kernel Kconfig will fail immediately when it detects
         that LD points to gold linker:

         scripts/Kconfig.include:39:  gold linker 'i686-oe-linux-ld' not supported

       * in OE we already pass bfd linker in KERNEL_LD variable to merge_config.sh
         but we need to pass it also into the make call here

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokern-tools: tweak symbol_why to be python safe
Bruce Ashfield [Thu, 6 Feb 2020 17:35:44 +0000 (12:35 -0500)]
kern-tools: tweak symbol_why to be python safe

Updating the SRCREV to pickup tweaks to symbol_why.py to be
python3 safe:

  - we explicitly call /usr/bin/env python3
  - we full specifiy our symbols
  - do not assume that 'None' can be converted to a string

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoncurses: Fix reproducibility issue
Richard Purdie [Fri, 7 Feb 2020 15:09:48 +0000 (15:09 +0000)]
ncurses: Fix reproducibility issue

The build was deciding whether to rename manpages based upon the presence of
/etc/debian_version. Be explicit about the configuration instead and
ensure determinism.

[YOCTO #13781]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibevdev: Fix determinism issue
Richard Purdie [Fri, 7 Feb 2020 12:29:56 +0000 (12:29 +0000)]
libevdev: Fix determinism issue

We need to sort python dict output to be deterministic and generate consistent
header files.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosysvinit: Fix Reproducibility issue
Richard Purdie [Fri, 7 Feb 2020 14:33:30 +0000 (14:33 +0000)]
sysvinit: Fix Reproducibility issue

With a sequence like:

bitbake sysvinit
bitbake sysvinit -c clean
bitbake sysvinit -c package_write_ipk -f

then the resulting package has two files with group "root/70" rather
than "root/shutdown". The issue is that of do_package is a setscene
task, base-passwd isn't present. This patch fixes that dependency
but there may be other cases of this problem around.

[YOCTO #13776]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosudo: specify where target tools are
Ross Burton [Fri, 7 Feb 2020 14:29:28 +0000 (14:29 +0000)]
sudo: specify where target tools are

sudo uses AC_PATH_PROG to find target paths, which means at best
potential host-contamination (and reproducible issues) and at worst it
thinks sh is at /your/build/path/hosttools/sh.

Solve this by explicitly passing the correct paths to configure.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibgcrypt: Fix determinism issue
Richard Purdie [Thu, 6 Feb 2020 23:58:46 +0000 (23:58 +0000)]
libgcrypt: Fix determinism issue

The build was injection git information from the wrong git tree, stop this
to allow reproducible builds.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibinput: Fix determinism issue
Richard Purdie [Thu, 6 Feb 2020 23:57:28 +0000 (23:57 +0000)]
libinput: Fix determinism issue

The build was injection git information from the wrong git tree, stop this
to allow reproducible builds.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoiputils: Fix build determinism
Richard Purdie [Thu, 6 Feb 2020 23:34:46 +0000 (23:34 +0000)]
iputils: Fix build determinism

The suid/setcap code depends on whether setcap is on the host system or not
with suid as a fallback. Disable this functionality to be deterministic.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoopenssl: Fix reproducibility issue
Richard Purdie [Thu, 6 Feb 2020 22:47:07 +0000 (22:47 +0000)]
openssl: Fix reproducibility issue

There was a build architecture leaking into the target ptest which
could vary depending upon host. Remove it as its cosmetic.

[YOCTO #13770]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoperl: Fix various reproducibile build issues
Richard Purdie [Wed, 5 Feb 2020 23:54:02 +0000 (23:54 +0000)]
perl: Fix various reproducibile build issues

Add a patch which handles the following issues:

a) Remove the \n from configure_attr.sh since it gets quoted differently depending on
   whether the shell is bash or dash which can cause the test result to be incorrect.
   Reported upstream: https://github.com/arsv/perl-cross/issues/87

b) Sort the order of the module lists from configure_mods.sh since otherwise
   the result isn't the same leading to makefile differences.
   Reported upstream: https://github.com/arsv/perl-cross/issues/88

c) Sort the Encode::Byte byte_t.fnm file output (and the makefile depends whilst
   there for good measure)
   This needs to go to upstream perl (not done)

d) Use bash for perl-cross configure since otherwise trnl gets set to "\n" with bash
   and "" with dash
   Reported upstream: https://github.com/arsv/perl-cross/issues/87

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoperl: do not install files that contain build host specific data
Alexander Kanavin [Thu, 6 Feb 2020 22:14:38 +0000 (23:14 +0100)]
perl: do not install files that contain build host specific data

This was breaking reproducibility, and the files aren't needed on
target.

[YOCTO #13772]

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agomicroblaze: Adjust Linux items from microblazeeb to microblaze
Mark Hatle [Tue, 4 Feb 2020 21:06:30 +0000 (15:06 -0600)]
microblaze: Adjust Linux items from microblazeeb to microblaze

Due to recent changes to the tune, in order to match config.guess, the name
of the big-endian microblaze architecture was changes to 'microblaze'.

Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agomicroblaze tune: cleanup +=
Mark Hatle [Tue, 4 Feb 2020 21:06:29 +0000 (15:06 -0600)]
microblaze tune: cleanup +=

Various += were used, refactor these to be either = or .= depending on
usuage.

CONFLICTS should be '=', as no leading space is required and they are not
amending any other conflict settings.

The TUNE_CCARGS should be .= so that if the feature does not define a CCARG
blank spaces are not added to the CFLAGS.  This is consistent to how the arm
tuning is implemented.

Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agomicroblaze tune: Enable 64-bit
Mark Hatle [Tue, 4 Feb 2020 21:06:28 +0000 (15:06 -0600)]
microblaze tune: Enable 64-bit

64-bit is not yet available in Linux, but some non-Linux uses exist.

Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agomicroblaze tune: Allow no version to be set
Mark Hatle [Tue, 4 Feb 2020 21:06:27 +0000 (15:06 -0600)]
microblaze tune: Allow no version to be set

We want to allow no version to be configured.  This should use the GCC default
which is the latest defined version, currently 11.0.

Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agomicroblaze tune: change microblazeeb to microblaze
Mark Hatle [Tue, 4 Feb 2020 21:06:26 +0000 (15:06 -0600)]
microblaze tune: change microblazeeb to microblaze

Using microblazeeb breaks a number of autoconf recipes, including newlib
components.  'microblaze' is defined as the big-endian version, while
microblazeel is defined as the little-endian version.

config.sub: 2018-07-03

...
        | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
...
        | microblaze-* | microblazeel-* \
...
        microblaze*)
                basic_machine=microblaze-xilinx
...

Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agogtk+3: sort resources for reproducible binaries
Ross Burton [Wed, 5 Feb 2020 17:32:01 +0000 (17:32 +0000)]
gtk+3: sort resources for reproducible binaries

The list of resources is gathered with $(wildcard) in Make, which isn't
sorted. If this order changes then the generated libraries will differ.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibidn2: Fix reproducibility issue
Richard Purdie [Wed, 5 Feb 2020 15:55:16 +0000 (15:55 +0000)]
libidn2: Fix reproducibility issue

The previous tweak for reproducibility didn't handle the duplicate
whitepace left behind, fix this.

[YOCTO #13771]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agotar: Fix build determinism, disable rsh
Richard Purdie [Wed, 5 Feb 2020 15:37:19 +0000 (15:37 +0000)]
tar: Fix build determinism, disable rsh

rsh is insecure and obsolete but tar will enable support if the binary is
on the host system. Some systems point it at ssh. Lets explictly disable it
for now unless someone actually needs/uses this at which point it could
become a packageconfig.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoxserver-xorg: Fix reproducibility issue
Richard Purdie [Wed, 5 Feb 2020 10:27:59 +0000 (10:27 +0000)]
xserver-xorg: Fix reproducibility issue

The host kernel version was being encoded into the Xorg binary. Set
an appropriate configure option to avoid this and be deterministic.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopatch: Extend to native/nativesdk and depend upon
Richard Purdie [Tue, 4 Feb 2020 22:20:35 +0000 (22:20 +0000)]
patch: Extend to native/nativesdk and depend upon

There is a bug in patch 2.7.3 and earlier where index lines
in patches can change file modes when they shouldn't:
http://git.savannah.gnu.org/cgit/patch.git/patch/?id=82b800c9552a088a241457948219d25ce0a407a4

This leaks into debug sources in particular (e.g. tcp-wrappers where
source files are read-only). Add the dependency to target recipes
to avoid this problem until we can rely on 2.7.4 or later.

We could try and remove all index lines from patch files but it will be a
losing battle. We could try and identify all the recipes which change
modes on files in patches but again, its a losing battle.

Instead, compromise and have patch-native as a dependency
for target recipes. We use patch-replacement-native since patch-native
is in ASSUME_PROVIDED.

Also add nativesdk-patch to buildtools-tarball.

[YOCTO #13777]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agomc: Fix manpage date indeterminism
Richard Purdie [Tue, 4 Feb 2020 18:12:15 +0000 (18:12 +0000)]
mc: Fix manpage date indeterminism

The man page date can vary depending upon the host perl, e.g. in Russian
some versions print 'июня', others 'Июнь' or Polish 'czerwca' or 'czerwiec'.
Rather than depend upon perl-native to fix this, just remove the date from
the manpages.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agomc: Set zipinfo presence determinstically
Richard Purdie [Tue, 4 Feb 2020 13:59:26 +0000 (13:59 +0000)]
mc: Set zipinfo presence determinstically

This value was floating causing differences in generated files.
Set it determinstically.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agooeqa/reproducible: Improve test output and ensure deb+ipk compared
Richard Purdie [Mon, 3 Feb 2020 23:39:29 +0000 (23:39 +0000)]
oeqa/reproducible: Improve test output and ensure deb+ipk compared

Adding newline characters between the packages in the failure output
massively improves readability.

Also ensure to output ipk failures when there are deb failures by
calling self.fail() at the end, else sometimes only partial differences
are returned.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoopkg-utils: Fix reproducibility issues in opkg-build
Richard Purdie [Mon, 3 Feb 2020 20:39:14 +0000 (20:39 +0000)]
opkg-utils: Fix reproducibility issues in opkg-build

There is a sorting problem with opkg-build where the ipk generated is depending
upon the order of files on disk. The reason is the --sort option to tar only
influences the orders of files tar reads, not those passed by the -T option.

Add in a sort call to resolve this issue. To ensure consistent sorting we
also need to force to a specific locale (C) else the results are still not
deterministic.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosqlite3: upgrade 3.30.1 -> 3.31.1
Anuj Mittal [Tue, 4 Feb 2020 05:51:45 +0000 (13:51 +0800)]
sqlite3: upgrade 3.30.1 -> 3.31.1

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibxml2: fix CVE-2020-7595
Anuj Mittal [Tue, 4 Feb 2020 05:47:06 +0000 (13:47 +0800)]
libxml2: fix CVE-2020-7595

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoncurses: add CVE_VERSION
Anuj Mittal [Tue, 4 Feb 2020 05:47:05 +0000 (13:47 +0800)]
ncurses: add CVE_VERSION

Include the version number in a format that is comparable to what we get
from NVD.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agox264: upgrade to latest revision
Anuj Mittal [Tue, 4 Feb 2020 05:47:04 +0000 (13:47 +0800)]
x264: upgrade to latest revision

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agogcc-9.2: fix bug #91102 'aarch64 ICE on Linux kernel with -Os'
Taras Kondratiuk via Openembedded-core [Tue, 4 Feb 2020 02:20:06 +0000 (02:20 +0000)]
gcc-9.2: fix bug #91102 'aarch64 ICE on Linux kernel with -Os'

Linux kernel compilation for aarch64 triggers ICE if
CONFIG_CC_OPTIMIZE_FOR_SIZE=y.

The rootcause is GCC bug #91102 'aarch64 ICE on Linux kernel with -Os'.
Apply the fix to 9.2.

Signed-off-by: Taras Kondratiuk <takondra@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agowebkitgtk: Prefer -pthread over -lpthread
Khem Raj [Tue, 4 Feb 2020 01:45:36 +0000 (17:45 -0800)]
webkitgtk: Prefer -pthread over -lpthread

-pthread is compiler driver option which links in needed dependencies
for pthreads along with -lpthread, this aids in fixing build failures
on rv64

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>