]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
5 years agorun-postinsts: Set RemainAfterExit on systemd unit
Alex Kiernan [Thu, 23 Apr 2020 14:12:07 +0000 (15:12 +0100)]
run-postinsts: Set RemainAfterExit on systemd unit

run-postinsts is only expected to run once, but during startup, but if
any dependency is pulled into a transaction, even once it has been
marked disabled, then it can be restarted.

This leads to occasional failures during QA if an ssh session starts
whilst the existing transaction is still running:

  Finished Run pending postinsts.
  run-postinsts.service: Succeeded.
  Condition check resulted in Commit a transient machine-id on disk being skipped.
  Condition check resulted in Bind mount volatile /srv being skipped.
  Condition check resulted in Bind mount volatile /var/spool being skipped.
  Condition check resulted in Bind mount volatile /var/lib being skipped.
  Condition check resulted in Bind mount volatile /var/cache being skipped.
  Condition check resulted in Platform Persistent Storage Archival being skipped.
  Condition check resulted in Rebuild Hardware Database being skipped.
  Starting Run pending postinsts...
  Condition check resulted in Kernel Configuration File System being skipped.
  Condition check resulted in FUSE Control File System being skipped.
  Condition check resulted in Load Kernel Modules being skipped.
  Condition check resulted in File System Check on Root Device being skipped.
  Condition check resulted in Huge Pages File System being skipped.
  Condition check resulted in Journal Audit Socket being skipped.
  dropbear@125-192.168.7.2:22-192.168.7.1:44226.service: Succeeded.
  Condition check resulted in Platform Persistent Storage Archival being skipped.
  Started SSH Per-Connection Server (192.168.7.1:44226).
  dropbear@124-192.168.7.2:22-192.168.7.1:44224.service: Succeeded.
  Started SSH Per-Connection Server (192.168.7.1:44224).
  Condition check resulted in Commit a transient machine-id on disk being skipped.
  Condition check resulted in Bind mount volatile /srv being skipped.
  Condition check resulted in Bind mount volatile /var/spool being skipped.
  Condition check resulted in Bind mount volatile /var/lib being skipped.
  Condition check resulted in Bind mount volatile /var/cache being skipped.
  Condition check resulted in Platform Persistent Storage Archival being skipped.
  Condition check resulted in Rebuild Hardware Database being skipped.
  Failed to start Run pending postinsts.
  run-postinsts.service: Failed with result 'start-limit-hit'.
  run-postinsts.service: Start request repeated too quickly.

Setting RemainAfterExit ensures that the unit remains active and is not
gratuitously restarted, unless done so explicitly using systemctl
restart.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agorng-tools: Restrict rngd.service
Alex Kiernan [Thu, 23 Apr 2020 14:12:06 +0000 (15:12 +0100)]
rng-tools: Restrict rngd.service

Whilst rngd has to run as root, we can significantly constrain its
permissions (network is only required if nistbeacon is enabled).

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agorngd-tools: Install as part of sysinit.target
Alex Kiernan [Thu, 23 Apr 2020 14:12:05 +0000 (15:12 +0100)]
rngd-tools: Install as part of sysinit.target

rngd.service has a constraint of Before=sysinit.target, installing as
part of multi-user.target is an odd choice as unless it's pulled in by a
different dependency, an other target would not start it.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoopenssh: Move sshdgenkeys.service to sshd.socket
Alex Kiernan [Thu, 23 Apr 2020 14:12:04 +0000 (15:12 +0100)]
openssh: Move sshdgenkeys.service to sshd.socket

sshd.socket launches the templated sshd@.service, so by moving the
sshdgenkeys.service to sshd.socket, key generation can start in advance
of a connection.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agowic: use Filesystem UUID when expand swap partition
Lee Chee Yang [Mon, 13 Apr 2020 11:00:54 +0000 (19:00 +0800)]
wic: use Filesystem UUID when expand swap partition

part.get("uuid") return the Partition UUID from the partition
table instead of Filesystem UUID. This lead to swap partition
UUID not match/change when wic write expand swap partition.

change it to read the filesystem UUID using blkid. The output
from blkid should looks like this:
wic-partvzhiwq3s: LABEL="swap1" UUID="04e55c19-3f3f-4491-9e32-44eea8daa827" VERSION="1" TYPE="swap" USAGE="other"

[YOCTO #13313]

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agotestimage: add an overall timeout setting
Alexander Kanavin [Fri, 17 Apr 2020 14:18:45 +0000 (16:18 +0200)]
testimage: add an overall timeout setting

This is useful when tests misbehave and get stuck, or when
a significant increase in testing time is undesirable and
needs to be caught automatically.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agotestimage.bbclass: correctly process SIGTERM
Alexander Kanavin [Fri, 17 Apr 2020 14:18:44 +0000 (16:18 +0200)]
testimage.bbclass: correctly process SIGTERM

Python's unittest will not propagate exceptions upside
of itself, but rather will just catch and print them.

The working way to make it stop is to send a SIGINT
(e.g. simulate a ctrl-c press), which will make it exit
with a KeyboardInterrupt exception.

This also makes pressing ctrl-c twice from bitbake work
again (previously hanging instances of bitbake and qemu were
left around, and bitbake would no longer start until they
were killed manually).

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoperl: Add missing dependency for tie-hash on carp.
Drew Moseley [Wed, 22 Apr 2020 19:56:57 +0000 (19:56 +0000)]
perl: Add missing dependency for tie-hash on carp.

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoxorgproto: upgrade 2019.2 -> 2020.1
Wang Mingyu [Wed, 22 Apr 2020 20:02:58 +0000 (13:02 -0700)]
xorgproto: upgrade 2019.2 -> 2020.1

legacy.patch
removed since it is included in 2020.1

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agomsmtp: upgrade 1.8.7 -> 1.8.8
Wang Mingyu [Wed, 22 Apr 2020 20:02:56 +0000 (13:02 -0700)]
msmtp: upgrade 1.8.7 -> 1.8.8

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agooeqa/runtime/weston: Enhance weston tests
Yeoh Ee Peng [Tue, 21 Apr 2020 00:50:09 +0000 (08:50 +0800)]
oeqa/runtime/weston: Enhance weston tests

Existing weston test available make sure that a process
for weston-desktop-shell exist when image boot up.

Enhance weston tests by:
 - execute weston-info to make sure weston interface(s)
   are initialized
 - execute weston and make sure it can initialize a
   new wayland compositor (retry checking for
   wayland processes up to 5 times)
 - enable weston logging for debugging when fail
   to initialize wayland compositor

[YOCTO# 10690]

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoboost: revert 1.72.0 regression
Andrew Geissler [Wed, 22 Apr 2020 00:19:11 +0000 (19:19 -0500)]
boost: revert 1.72.0 regression

https://www.boost.org/users/history/version_1_72_0.html documents a
"Known Issue" and has a revert patch for an issue that causes code to
fail to compile that includes the coroutine function. Without this
patch, code which includes the asymmetric_coroutine.hpp will fail to
compile.

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoliburcu: upgrade 0.11.1 -> 0.12.0
zhengruoqin [Mon, 20 Apr 2020 16:26:49 +0000 (00:26 +0800)]
liburcu: upgrade 0.11.1 -> 0.12.0

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibtirpc: upgrade 1.2.5 -> 1.2.6
zhengruoqin [Mon, 20 Apr 2020 16:21:57 +0000 (00:21 +0800)]
libtirpc: upgrade 1.2.5 -> 1.2.6

0001-xdr_float-do-not-include-bits-endian.h.patch
removed since it is included in 1.2.6

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoxf86-video-intel: Add more i915 pciids
LiweiSong [Fri, 17 Apr 2020 10:04:13 +0000 (18:04 +0800)]
xf86-video-intel: Add more i915 pciids

Add more i915 pciids to make graphic work well on some new boards
like TigerLake.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobuildall-qemu: automate build testing for qemu MACHINEs
Trevor Gamblin [Tue, 25 Feb 2020 14:11:15 +0000 (09:11 -0500)]
buildall-qemu: automate build testing for qemu MACHINEs

buildall-qemu simplifies the process of build testing an upgraded or
patched recipe by cycling through the build steps for each available qemu
target, with desired LIBC specified by the user as an option (defaulting
to both glibc and musl if no option is provided). While building, a log
file with the name "<recipe>-buildall.log" is written, containing a PASS
or FAIL line upon completion of the build for each architecture. For now,
qemu targets are not selectable (i.e. the recipe is built for all qemu
targets found in meta/conf/machine), but this functionality can be added
in the future along with other useful options.

The log file created by buildall-qemu also includes some basic system
info (e.g. build start time, hostname, host OS, host kernel). Since it is
not guaranteed that tools such as lsb_release will be available on the
host (it isn't by default on my Fedora machine), this information is
collected manually. Additionally, the previous run's log is retained for
comparison by renaming it in the format <recipe>-buildall.log.old once a
new set of builds is triggered for the same recipe.

We've seen multiple variations of this concept in use as one-liners and
as bash functions in dotfiles, so it seemed appropriate to submit it in
script form to oe-core for everyone to use.

Sample log output:

BUILDALL-QEMU LOG FOR aspell
START TIME: 2020-02-11_19:50:02
HOSTNAME: yow-tgamblin-fedora2
HOST OS: Fedora 31 (Server Edition)
HOST KERNEL: 5.4.10-200.fc31.x86_64
===============
BUILD RESULTS:
[glibc]
PASS: qemuarmv5
PASS: qemux86
PASS: qemuppc
PASS: qemumips64
PASS: qemux86-64
PASS: qemumips
PASS: qemuarm
PASS: qemuarm64
PASS: qemuriscv64
[musl]
PASS: qemuarmv5
PASS: qemux86
PASS: qemuppc
PASS: qemumips64
PASS: qemux86-64
FAIL: qemumips
FAIL: qemuarm
FAIL: qemuarm64
FAIL: qemuriscv64
===============
PASSED: 14
FAILED: 4

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agotestimage: enable ovmf support
Konrad Weihmann [Tue, 14 Apr 2020 19:19:14 +0000 (21:19 +0200)]
testimage: enable ovmf support

Add support for running wic images with EFI as testimage.
Introduces a variable called QEMU_USE_OVMF for configuration.

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoed: upgrade 1.15 -> 1.16
Wang Mingyu [Wed, 15 Apr 2020 08:33:38 +0000 (01:33 -0700)]
ed: upgrade 1.15 -> 1.16

-License-Update: Copyright year updated to 2020.

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobison: upgrade 3.5.3 -> 3.5.4
Wang Mingyu [Wed, 15 Apr 2020 08:33:37 +0000 (01:33 -0700)]
bison: upgrade 3.5.3 -> 3.5.4

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agocups: add volatiles files to create /var/log/cups
Yi Zhao [Wed, 15 Apr 2020 04:47:20 +0000 (12:47 +0800)]
cups: add volatiles files to create /var/log/cups

Add volatiles files to create /var/log/cups directory rather than create
it directly when do_install.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agovim: do not adjust script paths building for target
Joe Slater [Wed, 15 Apr 2020 21:28:38 +0000 (14:28 -0700)]
vim: do not adjust script paths building for target

When cross-compiling, do not change scripts to use host
versions of perl and gawk.

Also, use INSANE_SKIP to suppress QA complaints if perl
or gawk are not on the target.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoinsane.bbclass: Add test for shebang line length
Domarys Correa [Tue, 14 Apr 2020 18:20:20 +0000 (15:20 -0300)]
insane.bbclass: Add test for shebang line length

Shebang lines longer than 128 characters can give an error
depending on the operating system.
This implements a test that signals an error when locating a
faulty shebang.

YOCTO: #11053

Signed-off-by: Domarys Correa <domarys.correa@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agorunqemu: add QB_ROOTFS_EXTRA_OPT parameter
Konrad Weihmann [Wed, 15 Apr 2020 18:39:31 +0000 (20:39 +0200)]
runqemu: add QB_ROOTFS_EXTRA_OPT parameter

Content of the optional parameter will be appended to the rootfs-device
in the qemu configuration, in case QB_ROOTFS_OPT is not specified.
By default this is empty.

Example use cases are:

Defining 'readonly' when using squashfs, so multiple instances of qemu
can share the same base image, something that cannot be done by just
specifying 'snapshot'.

Defining 'bootindex=0' which helps to get past the EFI shell in
ovmf-binary. This also enables the use case of running WIC images with
EFI bootloader through the testimage.bbclass.

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopackagegroup-go-sdk-target: Enable on rv64
Khem Raj [Wed, 15 Apr 2020 16:49:59 +0000 (09:49 -0700)]
packagegroup-go-sdk-target: Enable on rv64

RISCV64 now supports golang (starting dunfell), therefore limit
disabling to rv32 only.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoman-db: upgrade 2.9.0 -> 2.9.1
zhengruoqin [Thu, 9 Apr 2020 14:49:47 +0000 (22:49 +0800)]
man-db: upgrade 2.9.0 -> 2.9.1

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoat-spi2-atk: upgrade 2.34.1 -> 2.34.2
zhengruoqin [Thu, 9 Apr 2020 14:48:28 +0000 (22:48 +0800)]
at-spi2-atk: upgrade 2.34.1 -> 2.34.2

0001-atk_test_util.h-add-missing-sys-time.h-include.patch was removed since it was included in 2.34.2

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoxserver-xorg: upgrade 1.20.7 -> 1.20.8
Wang Mingyu [Thu, 2 Apr 2020 09:16:59 +0000 (02:16 -0700)]
xserver-xorg: upgrade 1.20.7 -> 1.20.8

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibusb1: upgrade 1.0.22 -> 1.0.23
Wang Mingyu [Thu, 2 Apr 2020 09:16:58 +0000 (02:16 -0700)]
libusb1: upgrade 1.0.22 -> 1.0.23

no-dll.patch
removed since it is no available for 1.0.23

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoelfutils: upgrade 0.178 -> 0.179
Wang Mingyu [Thu, 2 Apr 2020 09:16:57 +0000 (02:16 -0700)]
elfutils: upgrade 0.178 -> 0.179

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibdrm: upgrade 2.4.100 -> 2.4.101
Wang Mingyu [Wed, 8 Apr 2020 09:00:15 +0000 (02:00 -0700)]
libdrm: upgrade 2.4.100 -> 2.4.101

musl-ioctl.patch
removed since it is included in 2.4.101

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosysklogd: update the patch
Changqing Li [Wed, 8 Apr 2020 02:01:58 +0000 (10:01 +0800)]
sysklogd: update the patch

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoqemuboot.bbclass: don't redefine IMGDEPLOYDIR
Bartosz Golaszewski [Mon, 6 Apr 2020 17:02:28 +0000 (19:02 +0200)]
qemuboot.bbclass: don't redefine IMGDEPLOYDIR

This variable is already defined in image.bbclass and there's not need
to redefine it here.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoparselogs.py: ignore pulseaudio startup warning messages
Changqing Li [Wed, 8 Apr 2020 07:04:48 +0000 (15:04 +0800)]
parselogs.py: ignore pulseaudio startup warning messages

If set default syslog to rsyslog, we can see below messages
in user.log,

[pulseaudio] authkey.c: Failed to open cookie file
[pulseaudio] authkey.c: Failed to load authentication key

They are only warnings when cookie file is not found. And
PulseAudio will create it if it doesn't exist.

refer:
https://wiki.archlinux.org/index.php/PulseAudio/Configuration
https://lists.freedesktop.org/archives/pulseaudio-discuss/2014-December/022719.html

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobuildtools-tarball: add nativesdk-mtools for `wic ls'
hongxu [Wed, 8 Apr 2020 10:30:15 +0000 (18:30 +0800)]
buildtools-tarball: add nativesdk-mtools for `wic ls'

On ubuntu 18.04.1, it does not provides `mdir' by default
which caused `wic ls **.wic' failed on fat partition

...
$ wic ls build/tmp-glibc/deploy/images/xilinx-zynqmp/wrlinux-image-std-xilinx-zynqmp.wic

ERROR: Can't find executable 'mdir'
...

Add nativesdk-mtools to buildtools-tarball and use buildtools
to provide mdir

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoalsa-state: ignore 'No soundcards found' error in pkg_postinst
Yi Zhao [Fri, 17 Apr 2020 10:15:27 +0000 (18:15 +0800)]
alsa-state: ignore 'No soundcards found' error in pkg_postinst

If there is no soundcards on the target (e.g. qemu), the pkp_postinst
function will report an error:
  alsactl: load_state:1735: No soundcards found...
  pkg_run_script: package "alsa-state" postinst script returned status 19.
  opkg_configure: alsa-state.postinst returned 19.

Pass '-g' option to alsactl to ignore this error.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopython3-manifest.json: add pathlib to core
Tim Orling [Sat, 11 Apr 2020 01:27:02 +0000 (18:27 -0700)]
python3-manifest.json: add pathlib to core

The pathlib module is for Object-oriented filesystem paths

It also provides a lot of handy utilities for checking on
paths. This seems to justify adding it to the core package
along side os, sys, and the other *path libraries.

[YOCTO #13670]

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoell: upgrade 0.30 -> 0.31
Pierre-Jean Texier [Fri, 17 Apr 2020 11:47:11 +0000 (13:47 +0200)]
ell: upgrade 0.30 -> 0.31

This is a bugfix release:

ver 0.31:
Fix issue with verification of the second certificate in chain.
Fix issue with handling trusted CA matching in verification.

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agognutls: upgrade 3.6.12 -> 3.6.13
Wang Mingyu [Wed, 8 Apr 2020 09:00:14 +0000 (02:00 -0700)]
gnutls: upgrade 3.6.12 -> 3.6.13

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agotzdata: remove exit 0 from pkg_postinst
Maxime Roussin-B?langer [Wed, 15 Apr 2020 16:24:46 +0000 (12:24 -0400)]
tzdata: remove exit 0 from pkg_postinst

Documentation says that if you exit 0 in a pkg_postinst it will marked as
installed.
If you exit 0, before running postinst-intercepts defer_to_first_boot, the
pkg_postinst_ontarget script will not be present on target.

The "exit 0" in tzdata makes it difficult to have a bbappend with a
pkg_postinst_target step when you have `INSTALL_TIMEZONE_FILE = 0`

Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoruby: Link with libucontext on musl
Khem Raj [Tue, 14 Apr 2020 17:31:53 +0000 (10:31 -0700)]
ruby: Link with libucontext on musl

coroutines in ruby 2.7+ needs ucontext APIs which are not available in
musl but an external library is available to provide them so use it

Use cached values for ac_cv_func_isnan and ac_cv_func_isinf this is not
detected correctly by configure on musl

on ARM drop using old arm32 implementation of coroutine which is slow and
inefficient

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibucontext: Bring in mips/mips64 support
Khem Raj [Tue, 14 Apr 2020 17:31:52 +0000 (10:31 -0700)]
libucontext: Bring in mips/mips64 support

License-Update: Updated copyright years [1]

Latest master 0.10.x+ has added support for mips/mips64, which should
help compile ruby on musl for these architectures

Switch SRC_URI to github upstream URI

Check for common arches before checking others in map_kernel_arch

Drop already upstreamed patches

[1] https://github.com/kaniini/libucontext/commit/d31eaabbaf5f45656c10e4bccd3fe6653a7d3ec1

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobuildtools-extended-tarball: Add libstc++.a
Jeremy Puhlman [Wed, 15 Apr 2020 02:32:05 +0000 (19:32 -0700)]
buildtools-extended-tarball: Add libstc++.a

Builds like native-openjdk, really wants a to link
some tools against the static version. Since when
using the extended tarball, its the only place to
get it, add the library.

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agonativesdk-gcc-runtime: enable building libstdc++.a
Jeremy Puhlman [Wed, 15 Apr 2020 02:32:04 +0000 (19:32 -0700)]
nativesdk-gcc-runtime: enable building libstdc++.a

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoqemu-system-native: Fix commented out PACKAGECONFIG
Jeremy Puhlman [Wed, 8 Apr 2020 04:40:56 +0000 (21:40 -0700)]
qemu-system-native: Fix commented out PACKAGECONFIG

Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agokernel-yocto.bbclass: Fix deps when externalsrc is used
Paul Barker [Wed, 8 Apr 2020 15:14:55 +0000 (16:14 +0100)]
kernel-yocto.bbclass: Fix deps when externalsrc is used

do_kernel_configme was recently removed from SRCTREECOVEREDTASKS so this
task still runs when externalsrc is used. This task normally runs after
do_patch but when externalsrc is used, do_patch is removed and this ordering
restriction does nothing. This allows bitbake to execute do_kernel_configme
too early, causing races with do_unpack.

This is fixed by adding in a dependency on do_unpack when externalsrc is
used.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobzip2/pbzip2: Correct license information
Richard Purdie [Tue, 14 Apr 2020 13:29:49 +0000 (14:29 +0100)]
bzip2/pbzip2: Correct license information

The license of pbzip2 looks slightly BSD like but is in fact the bzip2
license. The SPDX identifier for this is "bzip-1.0.6" since there is
another version of the bzip license out there.

To clear up all the confusion, use the SPDX license name and update
both recipes to refer to it. The copyright information is slightly
different between the codebases but the license looks the same.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agou-boot.inc: install u-boot-initial-env as ${PN}-initial-env in $D and $DEPLOYDIR
Denys Dmytriyenko [Sun, 12 Apr 2020 22:42:37 +0000 (18:42 -0400)]
u-boot.inc: install u-boot-initial-env as ${PN}-initial-env in $D and $DEPLOYDIR

The common u-boot.inc can be used by multiple recipes in the same build for
different cores and/or multiple stages of the bootloader. Naming initial-env
with ${PN} prefix avoids clashes in deploy and rootfs between those recipes.

This fixes 69b3b093079c2ca2744d6c02747c5d1b5d3e7ecf that unconditionally
builds, installs and deploys u-boot-initial-env in the common u-boot.inc.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobuild-appliance-image: Update to master head revision 2020-04 2020-04-dunfell yocto-3.1
Richard Purdie [Tue, 7 Apr 2020 21:15:32 +0000 (22:15 +0100)]
build-appliance-image: Update to master head revision

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoRevert "u-boot: cmd/gpt.c: fix memory leak"
Richard Purdie [Tue, 7 Apr 2020 21:15:07 +0000 (22:15 +0100)]
Revert "u-boot: cmd/gpt.c: fix memory leak"

This reverts commit 32f01f9e72089d4412cef5da80970c99c651cc49.

5 years agobuild-appliance-image: Update to master head revision
Richard Purdie [Tue, 7 Apr 2020 21:01:30 +0000 (22:01 +0100)]
build-appliance-image: Update to master head revision

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolibubootenv: update to latest git hash
Max Krummenacher [Tue, 7 Apr 2020 18:05:01 +0000 (20:05 +0200)]
libubootenv: update to latest git hash

This adds the missing feature 'negative offsets' which was present
in the orginal U-Boot based tools.

git change log:
f4b9cde Allow negative offsets
45bf92a Detect sector size if not found in config
9f59db6 uboot_env: remove unused variables
65d243e README: libubootenv is now in oe-core

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agou-boot: cmd/gpt.c: fix memory leak
Sakib Sajal [Mon, 6 Apr 2020 16:08:28 +0000 (09:08 -0700)]
u-boot: cmd/gpt.c: fix memory leak

Fixes CVE-2020-8432, a double free introduced
by commit 18030d04d25d7c08d3deff85881772a520d84d49

CVE: CVE-2020-8432
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoparselogs.py: update network interface related messages
Changqing Li [Tue, 7 Apr 2020 09:46:36 +0000 (17:46 +0800)]
parselogs.py: update network interface related messages

along with systemd upgrade, error message related change
network interface have changed, update it.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoRevert "dhclient: not always skip the nfsroot interface"
Mingli Yu [Tue, 7 Apr 2020 08:38:58 +0000 (16:38 +0800)]
Revert "dhclient: not always skip the nfsroot interface"

This reverts commit[27aec88 dhclient: not always skip
the nfsroot interface] which used to address the IP
address renew issue when boot a system in a nfsroot fs
and altogether boot with ip=dhcp.

But reported by some tester, the above commit introduces
below issue when run ltp test on a nfsroot system which
boot with ip=dhcp:
nfs: server 192.168.100.1 not responding, still trying
nfs: server 192.168.100.1 not responding, still trying
[snip]

So revert the above commit now to avoid blocking test.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoqemu: fix CVE-2020-11102
Lee Chee Yang [Tue, 7 Apr 2020 05:00:04 +0000 (13:00 +0800)]
qemu: fix CVE-2020-11102

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoRevert "wic: Fix permissions when using exclude or include path"
Richard Purdie [Tue, 7 Apr 2020 20:52:20 +0000 (21:52 +0100)]
Revert "wic: Fix permissions when using exclude or include path"

This reverts commit 36993eea89d1c011397b7692b9b8d61b499d0171.

After discussion on the mailing list it was felt these changes
were not ready yet.

5 years agoRevert "wic: Add --embed-rootfs argument"
Richard Purdie [Tue, 7 Apr 2020 20:52:15 +0000 (21:52 +0100)]
Revert "wic: Add --embed-rootfs argument"

This reverts commit efdcf94801f6abe8e4099e324d9a3deccd8d4384.

After discussion on the mailing list it was felt these
changes were not ready yet.

5 years agobuild-appliance-image: Update to master head revision
Richard Purdie [Mon, 6 Apr 2020 15:50:35 +0000 (16:50 +0100)]
build-appliance-image: Update to master head revision

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agorunqemu-extract-sdk: fix install debugfs on rootfs
Adrian Freihofer [Mon, 6 Apr 2020 14:48:33 +0000 (16:48 +0200)]
runqemu-extract-sdk: fix install debugfs on rootfs

At least with my current setup and acc. the manual, the images are named
like image-dbg.rootfs.tar.bz2.

The filter has two bugs:
- expects something like -dbg.tar
- tar without compression suffix is not allowed

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoapt-native: don't let dpkg overwrite files by default
Jan Luebbe [Mon, 6 Apr 2020 13:23:57 +0000 (15:23 +0200)]
apt-native: don't let dpkg overwrite files by default

With --force-overwrite (implied by --force-all), dpkg will not abort
when a package overwrites files from different packages. As this can
also lead to "The following package disappeared from your system as
all files have been overwritten by other packages: <package>" and
subsequently broken dependencies, this makes the simple case of
conflicting files hard to debug.

Instead of finding all possibly required force options, only disable
overwrite for now.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosystemd: Package systemd-hwdb-update.service into udev
Khem Raj [Mon, 6 Apr 2020 06:53:14 +0000 (23:53 -0700)]
systemd: Package systemd-hwdb-update.service into udev

Currently, this unit is packaged into udev-hwdb which then adds it as rdep
instead of rrecommends to systemd itself, this meant that even if we
added udev-hwdb to BAD_RECOMMENDATIONS, it would not be respected since
its a rdep, therefore move the service unit file into udev package
instead, this decouples the hard runtime dependency and restores the bad
recommendations expectations

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Alex Kiernan <alex.kiernan@gmail.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopseudo: During DB fix, remove files that do not exist
Ricardo Ribalda Delgado [Sun, 5 Apr 2020 11:47:12 +0000 (13:47 +0200)]
pseudo: During DB fix, remove files that do not exist

If a file does not exist, either because it has been removed outside
bitbake, or because only some of the files have been moved to a
different location, delete it from the pseudo-db is the user decides to
fix the database.

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agowic: Add --embed-rootfs argument
Ricardo Ribalda Delgado [Wed, 4 Mar 2020 14:49:36 +0000 (15:49 +0100)]
wic: Add --embed-rootfs argument

This option adds the content of a rootfs on a specific location on the
rootfs.

It is very useful for making a partition that contains the rootfs for a
host and a target Eg:

/ -> Roofs for the host
/export/ -> Rootfs for the target (which will netboot)

Although today we support making a partition for "/export" this might
not be compatible with some upgrade systems, or we might be limited by
the number of partitions.

With this patch we can use something like:

part / --source rootfs --embed-rootfs target-image /export --embed-rootfs target-image2 /export2

on the .wks file.

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agowic: Fix permissions when using exclude or include path
Ricardo Ribalda Delgado [Wed, 4 Mar 2020 14:49:35 +0000 (15:49 +0100)]
wic: Fix permissions when using exclude or include path

When parameters include_path or exclude_path are passed to the rootfs
plugin, it will copy the partition content into a folder and make all
the modifications there.

This is done using copyhardlinktree(), which does not take into
consideration the content of the pseudo folder, which contains the
information about the right permissions and ownership of the folders.

This results in a rootfs owned by the user that is running the wic
command (usually UID 1000), which makes some rootfs unbootable.

To fix this we copy the content of the pseudo folders to the new folder
and modify the pseudo database using the "pseudo -B" command.

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agopseudo: Force seccomp to return success when in fact doing nothing
Richard Purdie [Fri, 3 Apr 2020 12:55:12 +0000 (13:55 +0100)]
pseudo: Force seccomp to return success when in fact doing nothing

Pseudo changes the syscall access patterns which makes it incompatible with
seccomp. Therefore intercept the seccomp syscall and alter it, pretending that
seccomp was setup when in fact we do nothing. If we error as unsupported,
utilities like file will exit with errors so we can't just disable it.

This works around issues on platforms where seccomp is enabled in file
(e.g. archlinux).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoWindows: Enable Windows builds under WSLv2 and warn accordingly
Alejandro Hernandez Samaniego [Sun, 15 Mar 2020 06:13:11 +0000 (23:13 -0700)]
Windows: Enable Windows builds under WSLv2 and warn accordingly

Due to the architectural changes between Windows Subsystem for Linux v2,
and WSL v1 it should now be possible to run bitbake on the several distros
offered through the Microsoft Store.

WSLv2 is available on Windows 10 build number > 18917

The current build number may be checked by opening a cmd prompt on Windows
and running:

C:\Users\myuser>ver

Microsoft Windows [Version 10.0.19041.113]

If a distro has already been installed via the Microsoft Store, then we can
check which WSL version its using by opening a Windows Powershell (notice this
is a powershell and not a cmd prompt):

C:\WINDOWS\system32> wsl -l -v
  NAME      STATE           VERSION
  * Ubuntu    Running         2
    Debian    Stopped         1

In this case it shows two distros installed, Ubuntu running WSLv2 and
Debian running WSLv1

To change the version of WSL being used by a certain distro run:

C:\WINDOWS\system32> wsl --set-version <Distro> 2

e.g

C:\WINDOWS\system32> wsl --set-version Debian 2

For more information on installing WSLv2 please look at:

  https://docs.microsoft.com/en-us/windows/wsl/wsl2-install

There are some caveats related to the way storage is handled by WSLv2 though,
and at this point these have to be managed by the user manually, the storage
space used by WSL is not reflected immediately and since bitbake heavily uses
storage, after several builds this can prove to be a bit of an issue.

WSLv2 uses a VHDX file for storage, this issue can be easily avoided by
optimizing this file every now and then, this can be done via the following:

1.- Find the location of your VHDX file:
 - Get the distro app package directory.
 - Open Windows Powershell as Administrator and run:
  Get-AppxPackage -Name "*<DISTRO>*" | Select PackageFamilyName

 e.g.:
  PS C:\WINDOWS\system32> Get-AppxPackage -Name "*Ubuntu*" | Select PackageFamilyName

 PackageFamilyName
  -----------------
   CanonicalGroupLimited.UbuntuonWindows_79abcdefgh

 Replace the PackageFamilyName (and your user) on the following path:

 C:\Users\<user>\AppData\Local\Packages\<PackageFamilyName>\LocalState\

 e.g.

 ls C:\Users\<user>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\

 Mode                 LastWriteTime         Length Name
  -a----         3/14/2020   9:52 PM    57418973184 ext4.vhdx

 The VHDX file path is:
  C:\Users\<user>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ext4.vhdx

2.- Optimize your VHDX file (Also on Powershell):
 - Make sure WSL is shutdown
  wsl --shutdown

 - Optimize it
  optimize-vhd -Path C:\Users\<user>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ext4.vhdx -Mode full

 A progress bar should be shown while optimizing the VHDX file.

 As an example, after building core-image-sato, removing the TMPDIR did not reflect
 any changes on Windows Explorer for storage space being used, after optimizing the
 VHDX file, 14 extra GB were shown as free.

 So, as long as the the user optimizes its storage, the builds should run smoothly.

This patch warns the user that is running bitbake under WSLv2, that they should
optimize the VHDX file eventually to avoid storage issues.

The same check previoulsy used for WSLv1 works for WSLv2, checking for the kernel
version:
WSLv1:
Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com)

WSLv2:
Linux version 4.19.84-microsoft-standard (oe-user@oe-host)

Builds have been tested under Ubuntu and Debian distros offered and installed through
the Microsoft Store, and other distros should be able to run builds just as fine.

Performance wise, using the same hardware, and same configuration a comparison between
builds using native Linux vs WSLv2 for the following targets has been performed:
- core-image-minimal
- core-image-sato
- core-image-sato-sdk
- meta-toolchain

No real evidence of any performance changes could be found, with WSLv2 builds running even
faster in some cases.

Running a recently built image can be done just as smoothly, if using "nographic" as
argument for runqemu, or if its a graphical image, installing an X server and running
runqemu runs just as fine.

Happy bitbaking.

Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Alejandro Hernandez Samaniego <alhe@linux.microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobusybox: sysctl: ignore EIO of stable_secret below /proc/sys/net/ipv6/conf
Yi Zhao [Sat, 4 Apr 2020 09:11:08 +0000 (17:11 +0800)]
busybox: sysctl: ignore EIO of stable_secret below /proc/sys/net/ipv6/conf

Avoid confusing messages caused by EIO on reading
/proc/sys/net/ipv6/conf/*/stable_secret if those are not set yet.
Make it behave the same as procps(>=3.3.13).

Fixes:
$ sysctl -a | grep ipv6.conf | grep stable_secret
sysctl: error reading key 'net.ipv6.conf.all.stable_secret': Input/output error
sysctl: error reading key 'net.ipv6.conf.default.stable_secret': Input/output error
sysctl: error reading key 'net.ipv6.conf.eth0.stable_secret': Input/output error
sysctl: error reading key 'net.ipv6.conf.lo.stable_secret': Input/output error

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoicu: Mark strtod_l unavailable on musl
Khem Raj [Sat, 4 Apr 2020 18:51:59 +0000 (11:51 -0700)]
icu: Mark strtod_l unavailable on musl

Musl version is just a wrapper to strtod and not an exposed API

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoicu: Add knobs to generate a subset of ICU data
Khem Raj [Sat, 4 Apr 2020 23:02:57 +0000 (16:02 -0700)]
icu: Add knobs to generate a subset of ICU data

Recent versions of ICU (64+) provides a tool for configuring ICU
locale data file with finer granularity [1]

Default generated size for libicudata.so.66.1 is ~27M, which is quite
large for embedded systems and all of them may not even need all locale
data.

This patch calls the icudata buildtool during configure on the icudata
and utilizes a filter called 'filter.json` ( empty by default) to
create the data, default behavior should remain same but someone can
add a filter.json in own layer to configure this data, e.g.

{
  "localeFilter": {
    "filterType": "language",
    "whitelist": [
      "en",
      "de",
      "it"
    ]
  }
}

would only generate the locale data for english/german/italian

This would reduce the size of libicudata.so.66.1 to 12M

Ensure that icudata is generated using host-tools so it can deal with
endianness correctly, when host and target systems have different
endianness

install the icudtata file back into in/ folder so that main build
can now pickup this data file instead of regenerating it and wiping
out the filter changes that are expected to take effect

Use native compiler tools

Update the big-endian support patch to apply to latest Makefile.in
from icudata source and mark it as backport

defer applying 0001-Fix-big-endian-build.patch after moving new data/ in

[1] https://github.com/unicode-org/icu/blob/master/docs/userguide/icu_data/buildtool.md

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Suggested-by: Wouter Meek <w.meek@metrological.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobinutils: Use configure options to disable gdb and dependencies
Khem Raj [Sat, 4 Apr 2020 00:44:45 +0000 (17:44 -0700)]
binutils: Use configure options to disable gdb and dependencies

Deleting sources is a rough way of dealing with disabling components,
using configure option is elegant way and we also keep the sources
unchanged, this should not cause any funcitonal changes otherwise

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoscripts/install-buildtools: refactor for Python 3.4
Tim Orling [Fri, 3 Apr 2020 23:11:38 +0000 (16:11 -0700)]
scripts/install-buildtools: refactor for Python 3.4

Our least common denominator supported distro is debian-8
which has python 3.4. The whole point of the install-buildtools
script is to make it easier on the user to install buildtools
tarball. So it needs to run on Python 3.4.

The way we checked if the install was successful in the prior
version of the script was not workable in python 3.4. Since
the environment-setup-... script is currently just exporting
environment variables, use os.environ to do the equivalent from
values gleaned via regex from the environment-setup-... file.

Corrected a couple minor whitespace errors

NOTE: License changed to GPL-2.0-only due to inclusion of code
copied directly from bitbake/lib/bb/utils.py. This avoids the
need to depend on bitbake, which is now Python 3.5+ only.

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosanity.bbclass: echo current SDK_VENDOR if it is invalid
Paul Gortmaker [Fri, 3 Apr 2020 16:21:58 +0000 (12:21 -0400)]
sanity.bbclass: echo current SDK_VENDOR if it is invalid

It can be frustrating if this sanity check triggers, but you
don't know why; you haven't explicitly set any SDK vars, or
similar.

At least echo out the offending value, so the end user has
a bit more information to go on.

Before:
  SDK_VENDOR should be of the form '-foosdk' with a single dash
After:
  SDK_VENDOR should be of the form '-foosdk' with a single dash; found '-overc-sdk'

Cc: Ross Burton <ross.burton@intel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agonativesdk-binutils: correct path to ld.so.conf
Jeremy Puhlman [Fri, 3 Apr 2020 21:25:55 +0000 (14:25 -0700)]
nativesdk-binutils: correct path to ld.so.conf

The alternative ld.so patch is set up so the linker will search
the nativesdk sysroot before searching the host filesystem.

However the patch concatenates <sysroot>/etc and /etc/ld.so.conf
leading to a path that does not exist:

3061991 openat(AT_FDCWD, "/buildtools/sysroots/x86_64-pokysdk-linux/etc/etc/ld.so.conf",
O_RDONLY) = -1 ENOENT (No such file or directory)

In native-nspr, the build uses -lpthread, which triggers a search for librt, but because
of the above it drags in the system librt leading to errors as follows:

/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/gcc/x86_64-pokysdk-linux/
9.3.0/../../../../x86_64-pokysdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_getcpuclockid@GLIBC_PRIVATE'

update concatenation to correctly construct the path to the nativesdk ld.so.conf

[YOCTO #13853]

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agocdrtools-native: remove use of REALPV in versioning
rpjday@crashcourse.ca [Fri, 3 Apr 2020 19:49:31 +0000 (15:49 -0400)]
cdrtools-native: remove use of REALPV in versioning

There appears to be no need for the use of REALPV in the recipe for
cdrtools-native as the downloaded tarball has the official version in
it.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoglib-2.0: Backport GMainContext fixes
Daniel Gomez [Fri, 3 Apr 2020 07:20:18 +0000 (09:20 +0200)]
glib-2.0: Backport GMainContext fixes

Backport fixes introduced in 2.63.6 for memory leaks and memory corruption in
GMainContext

Upstream merge: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1353

Fixes SIGSEGV in GStreamer:

    Thread 2 "multihandlesink" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7ffff6bb9700 (LWP 18045)]
    0x00007ffff7d65992 in g_source_unref_internal (source=0x7ffff00047d0, context=0x55555561c800, have_lock=1) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c:2146
    2146    ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c: No such file or directory.
    (gdb) bt
    #0  0x00007ffff7d65992 in g_source_unref_internal (source=0x7ffff00047d0, context=0x55555561c800, have_lock=1) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c:2146
    #1  0x00007ffff7d65bb6 in g_source_iter_next (iter=iter@entry=0x7ffff6bb8db0, source=source@entry=0x7ffff6bb8da8) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c:980
    #2  0x00007ffff7d67ef3 in g_main_context_prepare (context=context@entry=0x55555561c800, priority=priority@entry=0x7ffff6bb8e30) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c:944
    #3  0x00007ffff7d6896b in g_main_context_iterate (context=context@entry=0x55555561c800, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c:3900
    #4  0x00007ffff7d68b4c in g_main_context_iteration (context=0x55555561c800, may_block=may_block@entry=1) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gmain.c:3981
    #5  0x00007ffff6be4482 in gst_multi_socket_sink_thread (mhsink=0x555555679ab0 [GstMultiSocketSink]) at ../../../gst-plugins-base-1.14.4/gst/tcp/gstmultisocketsink.c:1164
    #6  0x00007ffff7d8fb35 in g_thread_proxy (data=0x55555565c770) at ../../../../../../../repo/workspace/sources/glib-2.0/glib/gthread.c:784
    #7  0x00007ffff7841ebd in start_thread (arg=<optimized out>) at pthread_create.c:486
    #8  0x00007ffff7aa12bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
    #8  0x00007ffff7aa12bf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Signed-off-by: Daniel Gomez <daniel@qtec.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobusybox: on upgrade save busybox if it is the last shell
Jeremy Puhlman [Thu, 2 Apr 2020 22:58:20 +0000 (15:58 -0700)]
busybox: on upgrade save busybox if it is the last shell

During a busybox upgrade on a ipk based system, it is possible
that busybox is the only shell in the system. During the uninstall
the alternative for /bin/sh is removed and everything after that
goes down hill.

* Add a check to verify if busybox is the shell, and save it to
the busyboxrm directory created in tmp. Then add an alternative
for /bin/sh that points to that busybox at the lowest priority.

* Add PATH to the busyboxrm directory using shell(as during an upgrade
busybox and its links are missing).

* When install over remove extra busybox if present.

deb and rpm are uneffected by the bug because they both drag in bash,
however neither upgrade seemed to have issue with the changes.

[YOCTO 13850]

Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agocmake: fix Python executable with cmake
Martin Kelly [Thu, 2 Apr 2020 20:56:32 +0000 (13:56 -0700)]
cmake: fix Python executable with cmake

Currently, CMake has two ways of finding Python executables:
FindPythonInterp and FindPython/FindPython3. FindPythonInterp is
deprecated and may be removed at some point. Currently, python3native
sets PYTHON_EXECUTABLE, which FindPythonInterp uses. This is a problem
for a few reasons:

- Setting PYTHON_EXECUTABLE as an environment variable doesn't work, as
  CMake needs it to be set as an explicit CMake option via -D.
- Projects using the newer FindPython/FindPython3 don't pickup the right
  Python, as the newer routines use Python_EXECUTABLE and
  Python3_EXECUTABLE.

Fix this by setting PYTHON_EXECUTABLE, Python_EXECUTABLE, and
Python3_EXECUTABLE using -D options to EXTRA_OECMAKE.

The CMake routines are documented below:
https://cmake.org/cmake/help/latest/module/FindPythonInterp.html
https://cmake.org/cmake/help/latest/module/FindPython.html
https://cmake.org/cmake/help/latest/module/FindPython3.html

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoprservice.py: fix do_package with newer Python in Ubuntu 20.04
Martin Jansa [Thu, 2 Apr 2020 17:05:14 +0000 (19:05 +0200)]
prservice.py: fix do_package with newer Python in Ubuntu 20.04

* with Ubuntu 20.04 which is using python 3.8 I'm seeing a lot of errors like:
  ERROR: libxml2-2.9.10-r0 do_package: Can NOT get PRAUTO, exception No module named '_sysconfigdata'
  not sure what caused this from python 3.8, but this seems to work
* PRserv is enabled with:
  PRSERV_HOST = "localhost:0"

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agocve-update-db-native: fix DB file version for '-'
Lee Chee Yang [Thu, 2 Apr 2020 11:48:55 +0000 (19:48 +0800)]
cve-update-db-native: fix DB file version for '-'

fix logic for CVE DB update so that when the CPE version is '-',
it keeps the version as '-' in the DB file too and leave other
operation as blank.

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosanity: Require gcc 5.0 minimum version
Richard Purdie [Thu, 2 Apr 2020 15:45:26 +0000 (16:45 +0100)]
sanity: Require gcc 5.0 minimum version

After polling various develoeprs, its clear that many layers are struggling
with gcc 4.8 and its better for the project to adopt 5.0 as a minimum
version at this point in time. We should have technology like
buildtools-extended-tarball available to ensure things still work on Centos 7
and Debian 8.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agodhcp: add RDEPENDS for dhcp-client
Mingli Yu [Thu, 2 Apr 2020 06:26:09 +0000 (14:26 +0800)]
dhcp: add RDEPENDS for dhcp-client

Add iproute2 RDEPENDS for dhcp-client as
/sbin/dhclient-systemd-wrapper which called
by dhclient.service depends on ip command which
provided by iproute2 package when systemd enabled
in DISTRO_FEATURES.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agodhclient: not always skip the nfsroot interface
Mingli Yu [Thu, 2 Apr 2020 06:26:08 +0000 (14:26 +0800)]
dhclient: not always skip the nfsroot interface

Don't skip the nfsroot interface when use dhcp
to get the address for nfsroot interface as the
nfsroot interface may need dhclient to renew
the lease.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agou-boot: Restore valid default environment for running system
Otavio Salvador [Thu, 2 Apr 2020 00:14:31 +0000 (21:14 -0300)]
u-boot: Restore valid default environment for running system

One significant change from previous OE-Core releases was the move from
u-boot-fw-utils to libubootenv which offers a generic and not machine
specific alternative. However, it is not fully functional as currently
we don't provide the default environment nor the required configuration
file to be used by it.

This change address this and include on the default u-boot.inc the
needed code to generate, install and deploy the default environment.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoperf: fix compile error when rebuilding
Changqing Li [Wed, 1 Apr 2020 02:32:55 +0000 (10:32 +0800)]
perf: fix compile error when rebuilding

Fix error like:
Makefile.perf:597: recipe for target
'intel_x86_64-wrs-linux/perf/1.0-r9/perf-1.0/perf-in.o] Error 2
Makefile.perf:220: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
Makefile:69: recipe for target 'all' failed
make: *** [all] Error 2

during rebuilding, when kernel version changed, some
source files also maybe changed. It could happened
that the source under ${S} messed up with some already
dropped files and also new files. Fix by clean the ${S}
before copy source files.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agogstreamer1.0-plugins-good: Fix build when egl is enabled but no x11/wayland
Khem Raj [Wed, 1 Apr 2020 04:30:32 +0000 (21:30 -0700)]
gstreamer1.0-plugins-good: Fix build when egl is enabled but no x11/wayland

This fixes build errors seen in no-x11/no-wayland configuration ( eglfs
) and when QT5 support is enabled

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoinetutils: Use alternatives to avoid manpage conflict
Ovidiu Panait [Wed, 1 Apr 2020 06:48:06 +0000 (09:48 +0300)]
inetutils: Use alternatives to avoid manpage conflict

Fix the following manpage conflicts:
 * check_data_file_clashes: Package inetutils-doc wants to install file /usr/share/man/man1/tftp.1
But that file is already provided by package  * tftp-hpa-doc
 * check_data_file_clashes: Package inetutils-doc wants to install file /usr/share/man/man8/tftpd.8
But that file is already provided by package  * tftp-hpa-doc
 * check_data_file_clashes: Package netkit-telnet-doc wants to install file /usr/share/man/man8/telnetd.8
But that file is already provided by package  * inetutils-doc

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agowic: align layer plugin path
Lee Chee Yang [Wed, 1 Apr 2020 06:39:56 +0000 (14:39 +0800)]
wic: align layer plugin path

wic look for external layer source plugin under scripts/lib/
while other tools look for lib/.

allow wic to check for source plugin at both scripts/lib/ and
lib/ to align with other tools while avoid breaking any existing
source plugin in external layer.

[YOCTO #13056]

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agobinutils: Do not build gold linker on mips/glibc
Khem Raj [Wed, 1 Apr 2020 18:13:31 +0000 (11:13 -0700)]
binutils: Do not build gold linker on mips/glibc

Using gnu_hash style is unsupported on gold for now therefore disable
building gold on mips/glibc

Certain applications poke for presence of gold linker and silently use
it (webkit), therefore its best to disable building it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolib/oe/package_manager: don't try to rm /var/lib/opkg
Jan Luebbe [Wed, 1 Apr 2020 14:58:05 +0000 (16:58 +0200)]
lib/oe/package_manager: don't try to rm /var/lib/opkg

As opkglibdir starts with a /, os.path.join will ignore
self.target_rootfs, leading to an attempt to remove /var/lib/opkg.

This only fails if it exists on the host, explaining why this remained
undiscovered for long.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolib/oe/package_manager: avoid installing provided packages via apt
Jan Luebbe [Wed, 1 Apr 2020 14:58:04 +0000 (16:58 +0200)]
lib/oe/package_manager: avoid installing provided packages via apt

If there already is a package providing (and conflicting against)
packages what should be installed, apt will try remove the conflicting
package (target-sdk-provides-dummy) and any that depend on it (like apt
and dpkg). This usually fails because of the protection of essential
packages. In that case, no -dev/-dbg packages are installed to the SDK.

Avoid this problem by checking which packages are already provided and
removing them from the list to be installed. Also sort the list to make
it easier to read when debugging.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolib/oe/package_manager: collect provided package names when using debs
Jan Luebbe [Wed, 1 Apr 2020 14:58:03 +0000 (16:58 +0200)]
lib/oe/package_manager: collect provided package names when using debs

This is needed for a later change to avoid installing packages which are
already provided by an installed package.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolib/oe/package_manager: fix handling of last package
Jan Luebbe [Wed, 1 Apr 2020 14:58:02 +0000 (16:58 +0200)]
lib/oe/package_manager: fix handling of last package

In commit 7d214b34e11dc57316ed5c1c7747c4601286f6d2, only the code in the
for loop was modified to store the pkgarch value. The code used if there
was no empty line at the end was not modified.

Instead of fixing the duplicated code, remove it and just make sure that
a final empty line is processed.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolib/oe/package_manager: make sure to not remove packages in apt install
Jan Luebbe [Wed, 1 Apr 2020 14:58:01 +0000 (16:58 +0200)]
lib/oe/package_manager: make sure to not remove packages in apt install

apt install can decide to remove already installed packages if there are
conflicts. Avoid this by explicitly specifying --no-remove. This will
then cause a "E: Packages need to be removed but remove is disabled."
message.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoscripts/oe-buildenv-internal: Add pointer to scripts/install-buildtools
Richard Purdie [Tue, 31 Mar 2020 21:54:16 +0000 (22:54 +0100)]
scripts/oe-buildenv-internal: Add pointer to scripts/install-buildtools

If the minimum python version isn't met, show a pointer to the new
install-buildtools script.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoopenssl: update to 1.1.1f
Alexander Kanavin [Tue, 31 Mar 2020 21:12:48 +0000 (23:12 +0200)]
openssl: update to 1.1.1f

This also un-breaks python3 ptest which got broken
with 1.1.1e update.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agoinstall-buildtools: bump default to yocto-3.1_M3, fixes
Tim Orling [Tue, 31 Mar 2020 20:03:06 +0000 (13:03 -0700)]
install-buildtools: bump default to yocto-3.1_M3, fixes

Add ability to check md5sum (yocto-3.1_M2 and before) or sha256
(yocto-3.1_M3 and beyond).

Make regex for path in checksum file optional, since
for yocto-3.1_M3 the format is <checksum>  <filename>,
but prior releases was <checksum>  <path><filename>

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosanity.bbclass: add test for gcc < 4.8
Tim Orling [Tue, 31 Mar 2020 20:03:05 +0000 (13:03 -0700)]
sanity.bbclass: add test for gcc < 4.8

It is known that old versions of gcc prior to 4.8 causes builds to fail.

Add a test for BUILD_CC == 'gcc' and gcc < 4.8 and recommend using
scripts/install-buildtools or user built buildtools-extended-tarball.

Use the new get_host_compiler_version function from lib/oe/utils.py

NOTE: another solution is to install devtoolset-6+ from scl [1], but
this is a rather large install (> 1 Gb) and fairly invasive.

[1] https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/

Adding this code means we can increase the minimum version easily
in the future too (which will soon be needed).

RP: Change minimum version from 5.0 to 4.8 for initial patch
Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agolib/oe/utils.py: add get_host_compiler_version()
Tim Orling [Tue, 31 Mar 2020 20:03:04 +0000 (13:03 -0700)]
lib/oe/utils.py: add get_host_compiler_version()

Add helper function to get the host compiler and version.
Do not assume compiler is gcc.

NOTE: cannot set env to d.getVar("PATH") as that does not contain
the session PATH which was set by environment-setup-... which
breaks the install-buildtools use-case

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agosanity.bbclass: recommend using install-buildtools
Tim Orling [Tue, 31 Mar 2020 20:03:03 +0000 (13:03 -0700)]
sanity.bbclass: recommend using install-buildtools

For old tar version (< 1.28), recommend using
scripts/install-buildtools

Drop check for tar version 1.24. Dubious extra value.

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 years agooe-buildenv-internal: python 3.5 as min version
Tim Orling [Tue, 31 Mar 2020 20:03:02 +0000 (13:03 -0700)]
oe-buildenv-internal: python 3.5 as min version

Python 3.4 is EOL:
https://www.python.org/downloads/release/python-3410/

The last supported distro was probably CentOS-7, which has python36 available
from epel-7 or scl (as rh-python36) [1]

[1] https://www.softwarecollections.org/en/scls/rhscl/rh-python36/

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>