]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
6 years agolinux-yocto-rt: fixup 4.14 merge issues
Bruce Ashfield [Wed, 17 Oct 2018 13:38:54 +0000 (09:38 -0400)]
linux-yocto-rt: fixup 4.14 merge issues

The latest -stable updates broke 4.14 -rt with some rtmutex
issues. We sync with the rt-stable tree to pickup the fix.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolinux-yocto-rt/4.18: update to -rt5
Bruce Ashfield [Wed, 17 Oct 2018 13:38:53 +0000 (09:38 -0400)]
linux-yocto-rt/4.18: update to -rt5

There was one missing fixup in the recent -rt referesh of 4.18,
this SRCREV bump picks up the gic changes that were missing.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibgcc/gcc-runtime: Disable thumb mode on armv6
Richard Purdie [Tue, 16 Oct 2018 19:52:35 +0000 (20:52 +0100)]
libgcc/gcc-runtime: Disable thumb mode on armv6

Without this the build fails for armv6t targets due to invalid
assembler instructions in thumb mode.

[YOCTO #12929]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosystemtap: Fix typo in chown command
Richard Purdie [Wed, 17 Oct 2018 12:40:54 +0000 (13:40 +0100)]
systemtap: Fix typo in chown command

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosystemtap: Fix issues from 4.0 upgrade
Richard Purdie [Tue, 16 Oct 2018 09:51:18 +0000 (10:51 +0100)]
systemtap: Fix issues from 4.0 upgrade

4.0 adds systemd support but installs the unit files in the wrong location.
Fix this in do_install and inherit systemd to package them correctly.

Also fix ownership of files manually copied in to root:root to avoid QA warnings.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosystemtap: 3.3 -> 4.0
Victor Kamensky via Openembedded-core [Mon, 15 Oct 2018 18:21:28 +0000 (11:21 -0700)]
systemtap: 3.3 -> 4.0

Upgrade systemtap from 3.3 to 4.0: Removed backported patch.

Very short summary of major changes from SystemTap 4.0
announcement by Frank Ch. Eigler <fche@redhat.com>:

> prometheus exporter network service; ebpf support extensions including
> strings and implementation of traditional log(), sprintf() functions;
> rebuilt rich tapset coverage for 4.17+ syscalls and for
> tracepoint-based syscalls; script language tweaks for supporting
> machine-generated scripts

Fixes [YOCTO #12950]

Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoscripts/patchreview: tighten patch detection
Ross Burton [Mon, 15 Oct 2018 20:30:37 +0000 (21:30 +0100)]
scripts/patchreview: tighten patch detection

Only look in recipes-* folders for patches, to stop finding patches in
e.g. meta/lib/oeqa/manual.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoRevert "gstreamer1.0-plugins-bad: remove rtmpdump from DEPENDS"
Florian Wickert [Mon, 15 Oct 2018 14:48:49 +0000 (16:48 +0200)]
Revert "gstreamer1.0-plugins-bad: remove rtmpdump from DEPENDS"

This reverts commit aa6def606fcb239fa8997764cdf4ebb1ec27802d which I
posted myself.
The Problem is rtmpdump, not the gstreamer1.0-plugins-bad recipe.
The correct to fix this is to patch rtmpdump to work with OpenSSL 1.1.

Signed-off-by: Florian Wickert <fw@javox-solutions.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoupdate-rc.d: add -f into postinst OPT
Changqing Li [Mon, 15 Oct 2018 07:24:11 +0000 (15:24 +0800)]
update-rc.d: add -f into postinst OPT

add -f into postinst OPT to fix run postinst scriptlet fail
problem during do rootfs, while INITSCRIPT_PARAMS set to remove.

+ type update-rc.d
+ '[' -n qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs ']'
+ OPT='-r qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs'
+ update-rc.d -r work/qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs keepalived remove
update-rc.d: work/qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs/etc/init.d/keepalived exists during rc.d purge (use -f to force)
D: %post(keepalived-1.4.2-r0.core2_64): waitpid(305974) rc 305974 status 100

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosstatetests.py: reset TCLIBCAPPEND
Kai Kang [Tue, 16 Oct 2018 02:19:16 +0000 (10:19 +0800)]
sstatetests.py: reset TCLIBCAPPEND

It appends TCLIBCAPPEND to TMPDIR in meta/conf/distro/defaultsetup.conf:

  TMPDIR .= "${TCLIBCAPPEND}"

It affects some oe selftest cases in sstatetests.py. Reset TCLIBCAPPEND
for these cases.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoopenssl: correct license comment
Paul Eggleton [Tue, 16 Oct 2018 03:22:03 +0000 (16:22 +1300)]
openssl: correct license comment

The comment here stated that openssl is dual-licensed, but that would
mean that either of the two licenses could be used which is *not* the
case [1]. However LICENSE = "openssl" *is* correct because in OE that
maps to a generic license file which includes both licenses, which
makes sense because there isn't really any such thing as OpenSSL that
would be covered by the "OpenSSL license" and not the "SSLeay license".
Correct the comment to avoid any confusion.

[1] https://www.openssl.org/source/license.html

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoltp: modify mmap_24-2 testcase
Hongzhi.Song [Tue, 16 Oct 2018 02:54:19 +0000 (22:54 -0400)]
ltp: modify mmap_24-2 testcase

Mips will return EINVAL instead of ENOMEM as expected
if the range [addr + len) exceeds TASK_SIZE.

Linux kernel code: arch/mips/mm/mmap.c
if (flags & MAP_FIXED) {
    /* Even MAP_FIXED mappings must reside within TASK_SIZE */
    if (TASK_SIZE - len < addr)
       return -EINVAL;

Relax the condition and accept both ENOMEM and EINVAL
as expected outcome.

Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoperl: skip tests that are not useful
Anuj Mittal [Tue, 16 Oct 2018 02:47:12 +0000 (10:47 +0800)]
perl: skip tests that are not useful

Some tests, like the one that compares the hashes for a list of files
against those stored in a .dat file, don't make sense for downstream
distros packaging perl.

Backport a patch from upstream that allows skipping of these tests at
runtime. Also remove the local patch trying to keep hashes up-to-date
for one of those tests.

Fixes [YOCTO #12787]

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobinutils: fix three CVE issues
Zhixiong Chi [Tue, 16 Oct 2018 07:55:04 +0000 (00:55 -0700)]
binutils: fix three CVE issues

Backport the CVE patches from the upstream:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;
h=30838132997e6a3cfe3ec11c58b32b22f6f6b102
h=cf93e9c2cf8f8b2566f8fc86e961592b51b5980d

[BZ 23686] https://sourceware.org/bugzilla/show_bug.cgi?id=23686
[BZ 23685] https://sourceware.org/bugzilla/show_bug.cgi?id=23685

The one is for CVE-2018-17358 and CVE-2018-17359, and the another
is for CVE-2018-17360.

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agogobject-introspection.bbclass: fix gir installed but not shipped in any package while...
Hongxu Jia [Tue, 16 Oct 2018 07:34:56 +0000 (00:34 -0700)]
gobject-introspection.bbclass: fix gir installed but not shipped in any package while multilib enabled

Since commit [9524330 gobject-introspection: fix multilib install
file conflicts] applied in oe-core, while multilib enabled, gir
files will be installed to `${libdir}'.

Refer above commit, modify gobject-introspection.bbclass to
split gir to package correctly.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agowic: search nonarch STAGING_DATADIR for multilib
Kai Kang [Tue, 16 Oct 2018 08:29:14 +0000 (16:29 +0800)]
wic: search nonarch STAGING_DATADIR for multilib

It fails to build multilib image such as lib32-core-image-minimal with
wic by set 'IMAGE_FSTYPES = "wic"':

| ERROR: Couldn't find correct bootimg_dir, exiting

When multilib is enabled, STAGING_DATADIR is expanded with MLPREFIX. But
dependencies of images such as syslinux is still populated to nonarch
STAGING_DATADIR.

Search nonarch STAGING_DATADIR to fix the error.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoqemu: fix CVE-2018-17958/17962/17963
Changqing Li [Mon, 15 Oct 2018 08:59:44 +0000 (16:59 +0800)]
qemu: fix CVE-2018-17958/17962/17963

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agouseradd_base.bbclass: Make perform_groupmems handle overlapping usernames
Peter Kjellerstedt [Mon, 15 Oct 2018 20:25:44 +0000 (22:25 +0200)]
useradd_base.bbclass: Make perform_groupmems handle overlapping usernames

If the name of the last user being part of the group had a name that
was a prefix of the user being added, then perform_groupmems() would
treat it as if the user already existed in the list of users and not
add it.

Reported-by: Peter Henricsson <peter.henricsson@axis.com>
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopython: remove the PN package entirely
Ross Burton [Mon, 15 Oct 2018 18:13:02 +0000 (19:13 +0100)]
python: remove the PN package entirely

Nothing should be in this package, so remove it entirely to be sure nothing does
end up in there.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopython: don't wipe RDEPENDS when parsing manifest
Ross Burton [Mon, 15 Oct 2018 18:13:01 +0000 (19:13 +0100)]
python: don't wipe RDEPENDS when parsing manifest

We want to allow the main recipe to extend RDEPENDS directly, so don't wipe
RDEPENDS when reading the manifest.

This fixes the missing python-misc dependency from python-modules.

As the wiping was having the good side-effect of removing the PN-dev dependency
on PN (which doesn't exist), clear RDEPENDS_${PN}-dev.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobind: fix startup failure in sysvinit
Chen Qi [Mon, 15 Oct 2018 09:25:27 +0000 (17:25 +0800)]
bind: fix startup failure in sysvinit

The generated key file should try to have bind group so that if
the named daemon is started via '-u bind' option, which is the
default in OE core, we will not get startup failure because of
'permission denied' error.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agonasm: fix CVE-2018-10016
Hongxu Jia [Sun, 14 Oct 2018 09:45:59 +0000 (02:45 -0700)]
nasm: fix CVE-2018-10016

Previously fix of CVE-2018-10016 caused ovmf build failure,
I reported the failure to upstream and it replied with
this V2 fix.

Details at:
https://bugzilla.nasm.us/show_bug.cgi?id=3392473

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglib.inc: drop duplicate locale-base-fr-fr runtime dependency
Martin Jansa [Sat, 13 Oct 2018 21:17:03 +0000 (21:17 +0000)]
glib.inc: drop duplicate locale-base-fr-fr runtime dependency

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolocal.conf.sample.extended: add another warning to comment about GLIBC_GENERATE_LOCALES
Martin Jansa [Sat, 13 Oct 2018 21:17:02 +0000 (21:17 +0000)]
local.conf.sample.extended: add another warning to comment about GLIBC_GENERATE_LOCALES

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglibc: Do not use thumb1 ISA on armv6
Khem Raj [Sat, 13 Oct 2018 16:43:18 +0000 (09:43 -0700)]
glibc: Do not use thumb1 ISA on armv6

This does not work and is unsupported so lets compile glibc in ARM mode
always on armv6 SOCs

Fixes [YOCTO #12929]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoinitscripts: populate-volatiles: Speed up processing
Joshua Watt [Fri, 12 Oct 2018 16:24:09 +0000 (11:24 -0500)]
initscripts: populate-volatiles: Speed up processing

Checking the requirements for each volatiles file in the
populate-volatiles script can be very slow when there are a large number
of volatiles files, easily consuming over 80% of the processing time.
These checks don't usually uncover any problems so concatenate all the
volatiles files together and process them as one large file for a "fast
path" option. This ensures that the penalty for checking the
requirements is only incurred once. In the event that checking the
requirements for the unified file fails, fall back to the slow process
of checking each one individually so that the offending one can be
skipped.

The core file is handled separately because it is responsible for
creating the temp directory used by check_requirements and thus must
always run first and without having its requirements checked.

[YOCTO #12949]

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoe2fsprogs: add perl dependency to e2fsprogs-ptest
Ross Burton [Fri, 12 Oct 2018 11:15:02 +0000 (12:15 +0100)]
e2fsprogs: add perl dependency to e2fsprogs-ptest

Some of the tests need perl, so add it to the RDEPENDS.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopython3: add ptest runner
Ross Burton [Fri, 12 Oct 2018 13:43:55 +0000 (14:43 +0100)]
python3: add ptest runner

Copy the Python 2 run-ptest script to execute the Python 3 test suite.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopython3: set PYTHONHOME for nativesdk
Cheuk Wing Leung [Thu, 11 Oct 2018 14:15:54 +0000 (16:15 +0200)]
python3: set PYTHONHOME for nativesdk

commit c5629268b0f8ae0a425c98337d13e8dc83107e13:
[
    python: set PYTHONHOME for nativesdk

    This ensures that the nativesdk python functions correctly without needing to
    set PYTHONHOME in the sdk environment setup script.
]

it's also needed for python3.

Signed-off-by: Cheuk Wing Leung <cwleung@kth.se>
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopython: don't use runtime checks to identify float endianism
Ross Burton [Fri, 12 Oct 2018 13:44:03 +0000 (14:44 +0100)]
python: don't use runtime checks to identify float endianism

Python uses AC_RUN_IFELSE to determine the byte order for floats and doubles,
and falls back onto "I don't know" if it can't run code.  This results in
crippled floating point numbers in Python, and the regression tests fail.

Instead of running code, take a macro from autoconf-archive which compiles C
with a special double in which has an ASCII representation, and then greps the
binary to identify the format.

This is essentially a backport of the Python 3 patch in oe-core 1781b87.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopython: clean up ptest
Ross Burton [Fri, 12 Oct 2018 11:55:02 +0000 (12:55 +0100)]
python: clean up ptest

As the manifest handling is done differently now, just inherit ptest with the
other inherits.

test_shutil needs unzip so add to RDEPENDS.

Instead of using a patched Makefile, call test.regrtest directly.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoopenssl: use deterministic perl Text::Template module bundled by openssl source
Hongxu Jia [Fri, 12 Oct 2018 16:28:48 +0000 (09:28 -0700)]
openssl: use deterministic perl Text::Template module bundled by openssl source

1. The building openssl requires to install perl Text::Template module(>=1.46),
but Text::Template is a non core Perl module, openssl chooses to bundle
Text::Template 1.46 into the source, for convenience.
https://github.com/openssl/openssl/commit/8ff2af548303d311ce3591406111f77862875a60

2. While Text::Template < 1.46, the produced build files are gravely faulty.
https://github.com/openssl/openssl/pull/6682

3. If host has installed Text::Template < 1.46 (such as CentOS-7.5 has Text::
Template 1.45). The mismatched old module was used although the right one in
openssl source.

So set PERL5LIB to use deterministic perl Text::Template module bundled
by openssl source and ignore the one of host

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agonss: fix non-determinism when create a blank certificate
Kai Kang [Fri, 12 Oct 2018 02:08:44 +0000 (10:08 +0800)]
nss: fix non-determinism when create a blank certificate

It uses certutil from nss to create a blank certificate. But the
checksum of database file key4.db changes every time:

$ certutil -N -d sql:. --empty-password
$ md5sum *
f9dac2cfcb07cc8ca6db442a9a570906  cert9.db
b892c5ff7c1977d4728240b0cf628377  key4.db
7b9136cb03f07ae62eb213a5239fda71  pkcs11.txt
$ rm *

$ certutil -N -d sql:. --empty-password
$ md5sum *
f9dac2cfcb07cc8ca6db442a9a570906  cert9.db
405d55178e866a115c1aa975fccfa764  key4.db
7b9136cb03f07ae62eb213a5239fda71  pkcs11.txt

Provide pre-created databases with a blank certificate to fix
non-determinism issue. And these database files are from nss qemux86-64
build.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agounfs3: Fix utime for symlink in attr.c
Rui Wang [Fri, 12 Oct 2018 02:51:36 +0000 (10:51 +0800)]
unfs3: Fix utime for symlink in attr.c

unfs3 has an old defect that it can not change the timestamps of a
symlink file because it only uses utime(), which will follow the
symlink. This will not cause an error if the symlink points to an
existent file but can be triggered with rpm workflows.

Making unfs3 support lutimes() addresses this problem.

Signed-off-by: Rui Wang <rui.wang@windriver.com>
Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agonativesdk-packagegroup-sdk-host: add nativesdk-flex
Chen Qi [Fri, 12 Oct 2018 02:24:52 +0000 (10:24 +0800)]
nativesdk-packagegroup-sdk-host: add nativesdk-flex

nativesdk-flex is needed for kernel development inside traidtional
SDK environment, more particularly, `make scripts' under /usr/src/kernel.
So add it to nativesdk-packagegroup-sdk-host.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopackagegroup-core-lsb/-full-cmdline: add bzip2
Chen Qi [Fri, 12 Oct 2018 02:24:51 +0000 (10:24 +0800)]
packagegroup-core-lsb/-full-cmdline: add bzip2

We are having the following error when using 'tar' from tar
recipe to decompress .tar.bz2 files.

  tar (child): bzip2: Cannot exec: No such file or directory
  tar (child): Error is not recoverable: exiting now
  tar: Child returned status 2
  tar: Error is not recoverable: exiting now

The tar package is introduced by these two packagegroups into image.

>From the README file from tar's source codes:

  """
  ** gzip and bzip2.

  GNU tar uses the gzip and bzip2 programs to read and write compressed
  archives.  If you don't have these programs already, you need to
  install them.
  """

So we'd better cluster gzip and bzip2 with tar. These two packagegroups
already get 'gzip', so we also add 'bzip2'.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoksample.py: fix error message
Chen Qi [Fri, 12 Oct 2018 02:24:50 +0000 (10:24 +0800)]
ksample.py: fix error message

The current error message is like:

  kobject-example.kodoesn't exist

Add a space so that it looks like:

  kobject-example.ko doesn't exist

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoe2fsprogs: fix test f_detect_junk print error msg
Changqing Li [Fri, 12 Oct 2018 02:21:12 +0000 (10:21 +0800)]
e2fsprogs: fix test f_detect_junk print error msg

This test need to check config.h, so install it
to fix below err msg:

grep: ../lib/config.h: No such file or directory
./test/f_detect_junk/script: line 3: [: : integer expression expected
f_detect_junk: detect non-fs file data: ok

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agowic: make engine.py:get_partitions() resilient to parted/dmidecode stderr output
Geoff Parker [Thu, 11 Oct 2018 16:31:26 +0000 (09:31 -0700)]
wic: make engine.py:get_partitions() resilient to parted/dmidecode stderr output

Running wic commands on Debian 10 systems fail in
scripts/lib/wic/engine.py:get_partitions() due to new stderr output captured
when trying to parse the output from /sbin/parted as a non-root user.

The parted command calls the dmidecode utility, which produces this error
as a non-root user:
    /sys/firmware/dmi/tables/smbios_entry_point: Permission denied
    /dev/mem: Permission denied

scripts/lib/wic/engine.py:get_partitions() calls misc.py:exec_cmd(),
a subprocess wrapper which returns a combined stderr and sdtdout.
These messages to stderr confuse the partition table parser in
get_partitions().

This patch has the partition table parser ignore lines before the expected
"BYT;" header string.

Running wic in Debian 9 does not have this issue.

Signed-off-by: Geoff Parker <geoffhp@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoinitscripts: read-only-rootfs-hook: Use overlay if available
Joshua Watt [Thu, 11 Oct 2018 18:09:04 +0000 (13:09 -0500)]
initscripts: read-only-rootfs-hook: Use overlay if available

Copying files from the read-only /var/lib to tmpfs can be slow and waste
memory. If the kernel supports the overlay file system, use it to mount
a writable tmpfs on top of the read-only /var/lib and avoid the file
copy.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agomeson.bbclass: Fix build issues with /tmp mounted with noexec
Mark Asselstine [Wed, 10 Oct 2018 19:35:44 +0000 (15:35 -0400)]
meson.bbclass: Fix build issues with /tmp mounted with noexec

Since commit d297f7ebf3f6 [fribidi: use Meson instead of autotools]
build failures have been observed with this package. The immediate
issue was related to improperly named #defines per
https://github.com/fribidi/fribidi/commit/46f52d588ab5, however, the
root cause was FRIBIDI_SIZEOF_INT getting a value of "-1".

After searching the meson logs the following was found:

  Could not run: /tmp/tmp2fxe6ha1/output.exe (error: [Errno 13] Permission denied)
  Checking for size of "int": -1

Which pointed to the real root cause being /tmp mounted with noexec, a
common configuration on Redhat and other distros. This issues has been
raised in the meson community:
https://github.com/mesonbuild/meson/issues/2972 but is yet to be
addressed.

Using the discussion from issue#2972 and the fact that the underlying
code makes use of python 'tempfile' we can simply create a 'tmp'
directory and make use of TMPDIR to avoid this issue.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoe2fsprogs: fix test i_bitmaps failed
Changqing Li [Thu, 11 Oct 2018 10:16:18 +0000 (18:16 +0800)]
e2fsprogs: fix test i_bitmaps failed

without diffutils, diff from busybox will be used, diff of
busybox cause diff result different with expect file under test.
The diff result generated by 2 /usr/bin/diff is different.

change to use diff under diffutils to fix it

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoutil-linux: fix alternatives setting for unshare
Chen Qi [Thu, 11 Oct 2018 09:04:08 +0000 (17:04 +0800)]
util-linux: fix alternatives setting for unshare

The alternative setting for unshare belongs to the util-linux-unshare
package instead of the util-linux package. Fix this problem to avoid
a dead symlink /usr/bin/unshare -> /usr/bin/unshare.util-linux on target.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosystemd: add ALTERNATIVE for reboot
Anuj Mittal [Thu, 11 Oct 2018 08:41:11 +0000 (16:41 +0800)]
systemd: add ALTERNATIVE for reboot

reboot is provided by busybox too. Add ALTERNATIVE to ensure that there
are no conflicts when both are installed.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobusybox: move reboot out of init.cfg
Anuj Mittal [Thu, 11 Oct 2018 08:41:10 +0000 (16:41 +0800)]
busybox: move reboot out of init.cfg

reboot is needed for initramfs where no init manager is set. This
partially reverts:

commit b6fbb3f3d4d6367b0fd7921078f67057551c7ede
Author: Chen Qi <Qi.Chen@windriver.com>
Date:   Mon Jul 30 17:41:57 2018 +0800

    busybox: move init related configs to init.cfg

    Move init related configs to init.cfg.

    These config items do not make much sense unless busybox is selected
    as the init manager. They should belong to init.cfg.

We would need to set up ALTERNATIVES for reboot in this case.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoinit-install-efi.sh: improve info message
Anuj Mittal [Thu, 11 Oct 2018 08:41:09 +0000 (16:41 +0800)]
init-install-efi.sh: improve info message

Let users know that the installation was successful and that pressing
Enter would lead to a reboot.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoprelink: Fix Segmentation fault error when prelink qemu
Robert Yang [Thu, 11 Oct 2018 04:06:53 +0000 (12:06 +0800)]
prelink: Fix Segmentation fault error when prelink qemu

The info->resolvetls might be NULL according to src/prelink.c:
[snip]
 /* Dynamic linker does not depend on any other library,
    all symbols resolve to themselves with the exception
    of SHN_UNDEF symbols which resolve to 0.  */
if (info->symtab[r_sym].st_shndx == SHN_UNDEF)
  {
    info->resolveent = NULL;
    info->resolvetls = NULL;
[snip]

So we must check it before use its members, otherwise, there might be
Segmentation fault error.

Fixed:
MACHINE = "qemumips"
IMAGE_INSTALL_append = " qemu"
$ bitbake core-image-minimal
[snip]
| /path/to/qemumips-poky-linux/core-image-minimal/1.0-r0/temp/run.prelink_image.1000: line 111:  1010 Segmentation fault      (core dumped)
[snip]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoltp: use 'ping -6' if ping6 is not avaliable in netns_helper.sh
Yi Zhao [Thu, 11 Oct 2018 00:30:15 +0000 (08:30 +0800)]
ltp: use 'ping -6' if ping6 is not avaliable in netns_helper.sh

The iputils-ping6 was dropped since the 'ping6' command had been merged
into ping command. Backport patch from upstream to let both 'ping6' and
'ping -6' work.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agovala: update vapigen-wrapper
Kai Kang [Wed, 10 Oct 2018 15:03:01 +0000 (23:03 +0800)]
vala: update vapigen-wrapper

The .gir files from gobject-introspection are configured to install to
${libdir}/gir-1.0 when multilib is enabled. Update vapigen-wrapper accordingly.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agogobject-introspection: fix multilib install file conflicts
Kai Kang [Wed, 10 Oct 2018 15:03:00 +0000 (23:03 +0800)]
gobject-introspection: fix multilib install file conflicts

Fix multilib isntall file conflicts for gobject-introspection.
* use multilib_script.bbclass to handle ${bindir}/g-ir-annotation-tool
  and ${bindir}/g-ir-scanner
* add configure option to install .gir files to an alternative path and
  only set it when multilib is enabled

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agogobject-introspection: add required python modules to rdepends
Kai Kang [Fri, 12 Oct 2018 05:47:31 +0000 (13:47 +0800)]
gobject-introspection: add required python modules to rdepends

It fails to run g-ir-scanner from package gobject-introspection that
missing python modules 'xml' and 'pickle'. Add them to rdepends.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agotestimage: Ensure opkg/apt test suites are run
Richard Purdie [Wed, 10 Oct 2018 13:48:50 +0000 (14:48 +0100)]
testimage: Ensure opkg/apt test suites are run

Currently only the dnf package manager tests are automatically added to the
list of tests to run. Improve the code to handle automatic addition of
the apt and opkg tests too.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/manual/oe-core: Drop image build during taskexp test
Richard Purdie [Thu, 11 Oct 2018 19:20:43 +0000 (20:20 +0100)]
oeqa/manual/oe-core: Drop image build during taskexp test

Building an image takes time and isn't necessary to test taskexp,
we can drop this step.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/manual: Remove bitbake-selftest execution
Richard Purdie [Thu, 11 Oct 2018 19:19:28 +0000 (20:19 +0100)]
oeqa/manual: Remove bitbake-selftest execution

The autobuilder runs bitbake-selftest already so we don't need
to execute this manually.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/manual: transfer manual test cases from testopia to oeqa
Yeoh Ee Peng [Thu, 11 Oct 2018 09:39:01 +0000 (17:39 +0800)]
oeqa/manual: transfer manual test cases from testopia to oeqa

As part of the solution to replace Testopia, manual test cases
need to be migrated to OEQA. These manual test case json files
will serve two use cases.

Use case#1: as input to the future commandline-based manual test
runner script, where this script will display actions and expected
result information in user friendly text, then it will capture
user input for test result and log, finally it will write test
result and log into existing standardize test result json format
from OEQA framework for automated tests.

Use case#2: QA will open and read these json file manually for
planning manual test execution. Any reader interested in
understanding manual test cases will open and read these files.

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/runtime/opkg: Ensure the test works on multilib
Richard Purdie [Thu, 11 Oct 2018 19:05:35 +0000 (20:05 +0100)]
oeqa/runtime/opkg: Ensure the test works on multilib

After allarch was disabled in multilib, this test broke. Fix the test to account
for that change.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agotestimage: Ensure package-index is triggered for opkg/apt tests
Richard Purdie [Wed, 10 Oct 2018 22:25:30 +0000 (23:25 +0100)]
testimage: Ensure package-index is triggered for opkg/apt tests

If the opkg/apt tests are run without a package-index they will fail.
Trigger this here for now as a dependency until the code can be improved.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agotestimage: Ensure TESTIMAGEDEPENDS is appended to for qemuall override
Richard Purdie [Wed, 10 Oct 2018 22:25:05 +0000 (23:25 +0100)]
testimage: Ensure TESTIMAGEDEPENDS is appended to for qemuall override

The current qemuall override overwrites other dependencies unintentionally.
Tweak the code to avoid this by appending to the variable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolib/oe/utils: add eol to format_pkg_list()
grygorii tertychnyi via Openembedded-core [Wed, 10 Oct 2018 16:26:24 +0000 (19:26 +0300)]
lib/oe/utils: add eol to format_pkg_list()

Append '\n' to the non-empty formatted string before return. If you
write it to the (manifest) file, it will ensure file ends with a newline.

Many GNU utilities have problems processing the last line of a file
if it is not '\n' terminated. E.g. if the last line is not terminated
by a newline character, then "read" will read it but return false,
leaving the broken partial line in the read variable(s).
It can also break or adversely affect some text processing tools,
that operate on the file.

Signed-off-by: grygorii tertychnyi <gtertych@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibproxy: correctly disable the KDE module
Ross Burton [Wed, 10 Oct 2018 15:07:48 +0000 (16:07 +0100)]
libproxy: correctly disable the KDE module

The configuration option is WITH_KDE now, as it supports both KDE4 and KDE5.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibproxy: disable python2 and python3 support
Pascal Bach [Wed, 10 Oct 2018 14:28:38 +0000 (16:28 +0200)]
libproxy: disable python2 and python3 support

The option WITH_PYTHON got replaced by
WITH_PYTHON2 and WITH_PYTHON3.

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibarchive: fix bug1066
Andrej Valek [Wed, 10 Oct 2018 13:40:14 +0000 (15:40 +0200)]
libarchive: fix bug1066

Fix out of bounds read on empty string filename for guntar, pax and v7tar

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibxml2: Make it compatible with externalsrc
Peter Kjellerstedt [Mon, 24 Sep 2018 19:03:13 +0000 (21:03 +0200)]
libxml2: Make it compatible with externalsrc

Fetch the test tar ball to a subdirectory in ${S}. This avoids the
following error after having done `devtool modify libxml2`:

| DEBUG: Executing shell function do_configure
| find: â€˜.../build/tmp/work/mips32r2el-nf-poky-linux/libxml2/2.9.4-r0/xmlconf/’: No such file or directory

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolsof: Make it compatible with externalsrc
Peter Kjellerstedt [Mon, 24 Sep 2018 19:03:12 +0000 (21:03 +0200)]
lsof: Make it compatible with externalsrc

Make the unpack task do nothing if externalsrc is in use. This avoids
the following error after having done `devtool modify lsof`:

ERROR: lsof-4.91-r0 do_unpack: Unpack failure for URL:
'file://.../builds/qemux86-64/tmp/work/core2-64-poky-linux/lsof/4.91-r0/lsof_4.91/lsof_4.91_src.tar'.
Unpack command PATH="..." tar x --no-same-owner -f
.../builds/qemux86-64/tmp/work/core2-64-poky-linux/lsof/4.91-r0/lsof_4.91/lsof_4.91_src.tar
failed with return value 2

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoacl: Make it compatible with externalsrc
Peter Kjellerstedt [Mon, 24 Sep 2018 19:03:11 +0000 (21:03 +0200)]
acl: Make it compatible with externalsrc

Make the subdir fetch path for configure.ac relative. This avoids the
following error after having done `devtool modify acl`:

ERROR: acl-2.2.52-r0 do_unpack: Unpack failure for URL:
'file://configure.ac;subdir=.../builds/qemux86-64/workspace/sources/acl'.
subdir argument isn't a subdirectory of unpack root
.../builds/qemux86-64/tmp/work/core2-64-poky-linux/acl/2.2.52-r0

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglib-2.0: add missing locale dependencies to PN-ptest
Ross Burton [Tue, 9 Oct 2018 11:00:19 +0000 (12:00 +0100)]
glib-2.0: add missing locale dependencies to PN-ptest

The test suite skips several tests if the required locales are not found, so add
them as dependencies of glib-2.0-ptest.

(From OE-Core rev: b9317997bd4527b7873eb4f903cc4890b5b3580f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglib: fix Lithuanian strings in GDate test suite
Ross Burton [Tue, 9 Oct 2018 11:00:13 +0000 (12:00 +0100)]
glib: fix Lithuanian strings in GDate test suite

This test suite has hard-coded strings which don't match the new translations in
glibc 2.28, so update the test suite.

(From OE-Core rev: e1fa8611de2df3a1a15ae795c34f32e4e7fdbc79)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agowebkitgtk/epiphany: add opengl to REQUIRED_DISTRO_FEATURES
Hongxu Jia [Wed, 10 Oct 2018 07:16:48 +0000 (15:16 +0800)]
webkitgtk/epiphany: add opengl to REQUIRED_DISTRO_FEATURES

They can't be built without opengl in DISTRO_FEATURES.
[snip]
|webkitgtk-2.20.3/Source/WebCore/platform/graphics/OpenGLShims.h:23:10:
fatal error: GL/gl.h: No such file or directory
[snip]

Some sort of GL is needed yes. We indicate that with opengl loosely in OE

The epiphany depends on webkitgtk, add opengl to REQUIRED_DISTRO_FEATURES also.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoarchiver: remove left-over debugging
Ross Burton [Tue, 9 Oct 2018 20:21:37 +0000 (21:21 +0100)]
archiver: remove left-over debugging

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agowic: Support for changing the imager.
Davis, Michael [Mon, 8 Oct 2018 19:55:22 +0000 (19:55 +0000)]
wic: Support for changing the imager.

Signed-off-by: Michael Davis <michael.davis@essvote.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibsndfile1: CVE-2018-13139
Changqing Li [Wed, 10 Oct 2018 01:15:53 +0000 (09:15 +0800)]
libsndfile1: CVE-2018-13139

A stack-based buffer overflow in psf_memset in common.c in libsndfile 1.0.28.

Fixed in https://github.com/erikd/libsndfile/issues/397

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibxml2: move xmlcatalog and xmllint back into libxml2-utils
Andre McCurdy [Wed, 10 Oct 2018 01:04:18 +0000 (18:04 -0700)]
libxml2: move xmlcatalog and xmllint back into libxml2-utils

Packaging of libxml2-utils has been broken since 2011:

  http://git.openembedded.org/openembedded-core/commit/?id=76052861cc95fd4ad4c4b9eb6ce4cd1065ad4dc9

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopopulate_sdk_ext.bbclass: avoid populating tools twice
Jens Rehsack [Tue, 9 Oct 2018 18:34:56 +0000 (20:34 +0200)]
populate_sdk_ext.bbclass: avoid populating tools twice

When running `bitbake -c populate_sdk_ext ...` for an image
recipe inheriting populate_sdk_qt5, `nativesdk-qemu-helper` is
deployed via `nativesdk-packagegroup-sdk-host`, which already
contains some of the tools (by name: "oe-find-native-sysroot
runqemu*").

To avoid error like:
    Configuring nativesdk-packagegroup-qt5-toolchain-host.

    NOTE: Running intercept scripts:
    NOTE: > Executing update_gio_module_cache-nativesdk intercept ...
    NOTE: + [ True = False ]
    + qemu-x86_64 -r 3.2.0 -E LD_LIBRARY_PATH=/home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/fischer-poky-linux/updatable-app-image/1.0-r0/sdk-ext/image/opt/mops/2.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib:/home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/fischer-poky-linux/updatable-app-image/1.0-r0/sdk-ext/image/opt/mops/2.5+snapshot/sysroots/x86_64-pokysdk-linux/lib -L /home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/fischer-poky-linux/updatable-app-image/1.0-r0/sdk-ext/image /home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/fischer-poky-linux/updatable-app-image/1.0-r0/sdk-ext/image/opt/mops/2.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/nativesdk-gio-querymodules /home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/fischer-poky-linux/updatable-app-image/1.0-r0/sdk-ext/image/opt/mops/2.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/gio/modules/

    NOTE: Executing copy_buildsystem ...
    DEBUG: Executing python function copy_buildsystem
    NOTE: Generating sstate task list...
    NOTE: Generating sstate-cache...
    NOTE: Generating sstate-cache...
    DEBUG: Python function copy_buildsystem finished
    NOTE: Executing install_tools ...
    DEBUG: Executing shell function install_tools
    Traceback (most recent call last):
      File "/home/sno/gpw-community-bsp/sources/poky/scripts/lnr", line 21, in <module>
os.symlink(target, linkname)
    FileExistsError: [Errno 17] File exists: '../../../../layers/poky/scripts/oe-find-native-sysroot' -> '/home/sno/gpw-community-bsp/mops-yocto-platform/tmp/work/fischer-poky-linux/updatable-app-image/1.0-r0/sdk-ext/image//opt/mops/2.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/oe-find-native-sysroot'
    WARNING: exit code 1 from a shell command.
    DEBUG: Python function do_populate_sdk_ext finished

only add those tools unpackaged to the deployment which are
still missing.

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopopulate_sdk_base: move template files location to variables
Andrej Valek [Thu, 4 Oct 2018 06:40:04 +0000 (08:40 +0200)]
populate_sdk_base: move template files location to variables

Let users to use custom toolchain template files instead of overloading
the whole function.

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolinux-firmware: use ${nonarch_base_libdir} for all firmware
Stefan Agner [Tue, 9 Oct 2018 15:27:29 +0000 (17:27 +0200)]
linux-firmware: use ${nonarch_base_libdir} for all firmware

Replace the remaining hardcoded '/lib' in kernel firmware installation
path with ${nonarch_base_libdir}.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agogptfdisk: Use PACKAGECONFIG to control ncurses and popt dependencies
Jacob Kroon [Sun, 7 Oct 2018 17:11:21 +0000 (19:11 +0200)]
gptfdisk: Use PACKAGECONFIG to control ncurses and popt dependencies

gptfdisk uses a simple Makefile with no automatic detection of
external library support. Use PACKAGECONFIG_CONFARGS and pass
the make targets in EXTRA_OEMAKE.

Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoperf: make tools needed for API documentation respect the manpages PACKAGECONFIG
Ross Burton [Tue, 9 Oct 2018 14:05:34 +0000 (15:05 +0100)]
perf: make tools needed for API documentation respect the manpages PACKAGECONFIG

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobusybox: unify recipe style
Andrej Valek [Tue, 9 Oct 2018 12:56:40 +0000 (14:56 +0200)]
busybox: unify recipe style

- change spaces to tabs and unify indent level

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobusybox: do not write grep outputs into log
Andrej Valek [Tue, 9 Oct 2018 12:56:39 +0000 (14:56 +0200)]
busybox: do not write grep outputs into log

Make grep quiet for prevent to write information into logs.

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobusybox: fix conflict with runlevel applet
Andrej Valek [Tue, 9 Oct 2018 12:56:38 +0000 (14:56 +0200)]
busybox: fix conflict with runlevel applet

- remove OE runlevel script which conflicts with busybox's applet
- don't install empty directories

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolttng-modules: Fix build failure by syncing up with kernel 4.19
He Zhe [Tue, 9 Oct 2018 11:44:31 +0000 (19:44 +0800)]
lttng-modules: Fix build failure by syncing up with kernel 4.19

linux-yocto-dev has been upreved to v4.19. This patch backports a patch from
upstream to make lttng-modules sync up with linux-yocto-dev and later
linux-yocto, and fix the following do_compile error.

| tmp/work/qemux86_64-poky-linux/lttng-modules/2.10.7-r0/lttng-modules-2.10.7/probes/../probes/lttng-tracepoint-event-impl.h:143:6: error: conflict
ing types for 'trace_sock_exceed_buf_limit'
|  void trace_##_name(_proto);
|       ^~~~~~

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoselftest/runqemu: Handle SystemExit
Richard Purdie [Fri, 5 Oct 2018 18:30:08 +0000 (19:30 +0100)]
selftest/runqemu: Handle SystemExit

The sigchld handler in runqemu can raise a SystemExit when qemu shuts down.
Rather than backtracing, accept this as a successful test result.

ERROR: runqemu.QemuTest.test_qemu_can_shutdown (subunit.RemotedTestCase)
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/runqemu.py", line 183, in test_qemu_can_shutdown
    qemu_shutdown_succeeded = self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
  File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/runqemu.py", line 175, in _start_qemu_shutdown_check_if_shutdown_succeeded
    time.sleep(1)
  File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/qemurunner.py", line 100, in handleSIGCHLD
    raise SystemExit
SystemExit

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoqemurunner: Remove the signal handler before stopping qemu
Richard Purdie [Fri, 5 Oct 2018 11:05:04 +0000 (12:05 +0100)]
qemurunner: Remove the signal handler before stopping qemu

The qemu shutdown can race with the signal handler removal leading to
confusing tracebacks on slower/loaded systems.

Remove the signal handler first before shutting down.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agostrace: fix ptests
Anuj Mittal [Fri, 5 Oct 2018 11:24:01 +0000 (19:24 +0800)]
strace: fix ptests

* Let automake use parallel test harness which ensures that appropriate
environment variables are actually used.

* Copy generated config.h as part of ptest package and define a variable
in tests Makefile to control the name of target that we'd like to
invoke for tests instead of relying on default value.

* configure relies on tools that are not available in release tarballs
resulting in warnings and failed tests. Get the required information
from available files instead.

* Reduces the count of failing tests to 18 from 35. The rest of
tests fail or get skipped mostly because of missing syscalls. Number of
tests getting skipped can probably be reduced further.

Fixes [YOCTO #12948]

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoutil-linux: Use update-alternatives for fsfreeze, nsenter
Max Krummenacher [Fri, 5 Oct 2018 10:05:18 +0000 (12:05 +0200)]
util-linux: Use update-alternatives for fsfreeze, nsenter

busybox may also provide a fsfreeze and nsenter implementation,
so use u-a to allow installing them side by side.
If one installs both, busybox and util-linux, one gets the following error
(seen on a populate-sdk run):

| ERROR: Postinstall scriptlets of ['busybox'] have failed. If the intention is to defer them to first boot,
| then please place them into pkg_postinst_ontarget_${PN} ().
| Deferring to first boot via 'exit 1' is no longer supported.

And the coresponding do_populate_sdk extract:

| ...
| update-alternatives: Error: not linking ...sdk/image/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/sbin/fsfreeze
|     to /bin/busybox.nosuid /bin/busybox.nosuid since ...sdk/image/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/sbin/fsfreeze
|     exists and is not a link
| ...

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoparted: use update-alternatives for partprobe
Max Krummenacher [Fri, 5 Oct 2018 10:05:17 +0000 (12:05 +0200)]
parted: use update-alternatives for partprobe

busybox may also provide a partprobe implementation, so use u-a to allow
installing them side by side.
If one installs both, busybox and parted, one gets the following error:

| ERROR: image do_rootfs: Postinstall scriptlets of ['busybox'] have failed. If the intention is to defer them to first boot,
| then please place them into pkg_postinst_ontarget_${PN} ().
| Deferring to first boot via 'exit 1' is no longer supported.

And the coresponding log.do_rootfs extract:

| ...
| update-alternatives: Error: not linking ...image/rootfs/usr/sbin/partprobe to /bin/busybox.nosuid since ...image/rootfs/usr/sbin/partprobe exists and is not a link
| ...

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agogcc: Remove unnecessary --with-mpfr and --with-mpc when cross compiling
Mike Crowe [Fri, 5 Oct 2018 13:49:13 +0000 (14:49 +0100)]
gcc: Remove unnecessary --with-mpfr and --with-mpc when cross compiling

Passing --with-mpfr and --with-mpc when compiling the cross compiler
appears to be at best unnecessary, and at worst can cause build failures.

Firstly, the paths passed in gcc-cross-canadian are using the undefined
${layout_exec_prefix}. This results in configure passing
-I${STAGING_DIR_HOST}/include twice to the compiler when it's doing its
test builds. This is mostly pointless since that directory doesn't exist
with the default oe-core configuration - the correct path would be
-I${STAGING_DIR_HOST}/usr/include.

The path for mpfr passed in gcc-cross is correct, but unnecessary since it
is just the sysroot default.

I've gone back through the history, and it seems that these lines (or
similar ones) were originally added way back in
8800d8be25295dd7c7d84dde62c3be4df8e43346 for GCC 4.1.1 in 2006! I asked[1]
if anyone knew why this was necessary but received no response, so I can
only assume that no-one knows.

I've successfully built for various targets with this patch applied and
observed no problems.

[1] http://lists.openembedded.org/pipermail/openembedded-core/2018-September/155971.html

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agorootfs_*: Also depend on do_package_qa
Tom Rini [Fri, 5 Oct 2018 19:30:41 +0000 (15:30 -0400)]
rootfs_*: Also depend on do_package_qa

Make sure that we don't create images that have QA problems with their
package files by adding do_package_qa to do_rootfs[recrdeptask].

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoopkg-utils: Add support for pigz
Mike Crowe [Fri, 5 Oct 2018 15:27:25 +0000 (16:27 +0100)]
opkg-utils: Add support for pigz

Support explicit use of pigz when compressing the package contents by
setting:

 OPKGBUILDCMD = "opkg-build -Z pigz"

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibgcrypt: Add the LICENSES file to LIC_FILES_CHKSUM
Peter Kjellerstedt [Fri, 5 Oct 2018 20:45:56 +0000 (22:45 +0200)]
libgcrypt: Add the LICENSES file to LIC_FILES_CHKSUM

The LICENSES file contains references to source files with other
licenses than GPL/LGPL that stipulate that they shall be mentioned in
any documentation accompanying a product including this library.

License-Update: Add missing LICENSES file
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglib-2.0: Include the complete license information for pcre
Peter Kjellerstedt [Fri, 5 Oct 2018 20:45:55 +0000 (22:45 +0200)]
glib-2.0: Include the complete license information for pcre

For some reason, the copyright part was left out of the license
information for pcre in LIC_FILES_CHKSUM, preventing it from being
used in, e.g., documentation to satisfy the requirements of the
license.

Also drop pcre/COPYING from LIC_FILES_CHKSUM as it does not really
contain any licensing information, it only refers to a LICENSE file
that does not exist.

License-Update: Include the complete license information for pcre
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobzip2: Include the complete license information
Peter Kjellerstedt [Fri, 5 Oct 2018 20:45:54 +0000 (22:45 +0200)]
bzip2: Include the complete license information

For some reason, the copyright part was left out of the license
information included in LIC_FILES_CHKSUM, preventing it from being
used in, e.g., documentation to satisfy the requirements of the
license.

License-Update: Include the complete license information
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agocurl: Include the complete license information
Peter Kjellerstedt [Fri, 5 Oct 2018 20:45:53 +0000 (22:45 +0200)]
curl: Include the complete license information

For some reason, the copyright part was left out of the license
information included in LIC_FILES_CHKSUM, preventing it from being
used in, e.g., documentation to satisfy the requirements of the
license.

License-Update: Include the complete license information
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobinutils: fix symlinks
Achille Fouilleul [Fri, 5 Oct 2018 14:38:08 +0000 (16:38 +0200)]
binutils: fix symlinks

For nativesdk, symlinks created by do_install contain ${SDKPATHNATIVE}.

This is a problem with SDKs that include nativesdk-binutils and nativesdk-gcc.
When extracting such an SDK dangling symlinks are created, because
relocate_sdk.py does not adjust symlinks. As a result gcc ends up calling the
host binutils.

Use the os.path.relpath function to obtain shorter relative paths, which do not
contain ${SDKPATHNATIVE}.

Signed-off-by: Achille Fouilleul <achille.fouilleul@gadz.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agox264: Disable asm on musl/x86
Khem Raj [Sun, 7 Oct 2018 01:29:17 +0000 (18:29 -0700)]
x264: Disable asm on musl/x86

Fixes

WARNING: x264-r2854+gitAUTOINC+e9a5903edf-r0 do_package_qa: QA Issue: ELF binary '/mnt/a/yoe/build/tmp/work/i586-yoe-linux-musl/x264/r2854+gitAUTOINC+e9a5903edf-r0/packages-split/x264/usr/lib/libx264.so.152'
has relocations in .text [textrel]
WARNING: x264-r2854+gitAUTOINC+e9a5903edf-r0 do_package_qa: QA Issue: ELF binary '/mnt/a/yoe/build/tmp/work/i586-yoe-linux-musl/x264/r2854+gitAUTOINC+e9a5903edf-r0/packages-split/x264-bin/usr/bin/x264'
has relocations in .text [textrel]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoffmpeg: use bfd linker always for x86 target
Khem Raj [Sun, 7 Oct 2018 01:29:16 +0000 (18:29 -0700)]
ffmpeg: use bfd linker always for x86 target

gold crashes when linking, so use bfd linker here, another option is to
use --disable-asm but then we loose performance.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoltp: recent glibc calls syscall directly
Hongzhi.Song [Mon, 8 Oct 2018 03:31:51 +0000 (20:31 -0700)]
ltp: recent glibc calls syscall directly

The case of sigwaitinfo related to sigwaitinfo API failed.

glibc commit
  8b0e795aaa44 ("Simplify Linux sig{timed}wait{info} implementations")
  changed sigwaitinfo to call sigtimedwait, which calls rt_sigtimedwait
  syscall directly.

So, an invalid pointer no longer crashes child process and test
reports failure. Fix it by accepting either crash or EFAULT.

Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopython3: add ca-certificates to python3-crypt RRECOMMENDS
Ross Burton [Mon, 8 Oct 2018 13:28:30 +0000 (14:28 +0100)]
python3: add ca-certificates to python3-crypt RRECOMMENDS

It's likely that the certificate root chain is needed if python3-crypt is
installed, so recommend it.

Also remove the redundant nativesdk-python3-crypt assignment, as the general
form is sufficient when class-extended.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibsoup: upgrade to 2.62.3
Ross Burton [Mon, 8 Oct 2018 10:58:32 +0000 (11:58 +0100)]
libsoup: upgrade to 2.62.3

Freeze-breaking upgrade for a security bug fix involving cookie URLs, and a
number of static analysis fixes.

Drop CVE-2018-12910.patch as this is merged in 2.62.3.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibx11: fix patch headers
Ross Burton [Mon, 8 Oct 2018 14:04:36 +0000 (15:04 +0100)]
libx11: fix patch headers

devtool doesn't like patches without subjects, so add meaningful subjects.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>