]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
6 years agoperf: fix build with kernel older than 4.8
Martin Jansa [Thu, 24 May 2018 14:56:01 +0000 (14:56 +0000)]
perf: fix build with kernel older than 4.8

* perf is failing to build for me since this oe-core commit:
  commit 9b38c824961fc9dce51bda95c25dac91a69fc64f
  Author: Hongxu Jia <hongxu.jia@windriver.com>
  Date:   Tue Apr 24 11:33:47 2018 +0800

    perf: make a copy of kernel source to perf workdir

  the problem is that perf sources in kernel older than 4.8 (in my case
  4.4) are depending on the "global" include headers outside tools
  directory, e.g. swab.h in:
  kernel-source/tools$ git grep swab.h
  perf/MANIFEST:include/linux/swab.h
  perf/MANIFEST:include/uapi/linux/swab.h
  perf/util/include/asm/byteorder.h:#include "../../../../include/uapi/linux/swab.h"

  this was resolved in 4.8 with:
  commit 7e3f36411342a54f1981fa97b43550b8406a3d69
  Author: Arnaldo Carvalho de Melo <acme@redhat.com>
  Date:   Mon Jul 18 17:42:16 2016 -0300

    perf tools: Remove tools/perf/util/include/asm/byteorder.h

    Not used anymore. This also stops include linux/swab.h directly
    from the kernel sources, remove that reference from the MANIFEST.

  and few more changes to make tools/include more complete and standalone:
  tools/include in 4.15:
  asm  asm-generic  linux  tools  trace  uapi

  tools/include in 4.4:
  asm  asm-generic  linux  tools

  but copying the include header even for kernels which don't really
  need it doesn't add big overhead, so just copy include to perf sources
  for all kernels.

(From OE-Core rev: 19fb2d11a8bb3c6dfdd5edc1b9155d642dc0f5e0)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agosystemd: Define basename() for musl
Khem Raj [Mon, 28 May 2018 15:58:32 +0000 (08:58 -0700)]
systemd: Define basename() for musl

(From OE-Core rev: 167098cdd875a02221ff6d15f443c02c1bcdc33f)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agosystemd: Fix build with gcc8
Khem Raj [Mon, 28 May 2018 15:58:31 +0000 (08:58 -0700)]
systemd: Fix build with gcc8

(From OE-Core rev: 6a3805f06cd7832d70d5b652ec1be612f5f027e6)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agosystemd: fix build with util-linux 2.32
Ross Burton [Thu, 10 May 2018 11:06:19 +0000 (12:06 +0100)]
systemd: fix build with util-linux 2.32

(From OE-Core rev: 12b4fc15f6919d7573bea5d913fb805993e8640a)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoutil-linux: update to 2.32
Armin Kuster [Wed, 9 May 2018 14:51:48 +0000 (07:51 -0700)]
util-linux: update to 2.32

rfkill moved locations, update accordingly

refactored avoid_parallel_tests.patch

includes security fix:
CVE-2018-7738 (score: 7.2)
affects: < 2.32-rc1

see changelog for other bugfixes:
https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.32/v2.32-ChangeLog

(From OE-Core rev: a7a1e3155287d3bac7ab83e58d53ee2a364f2e29)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agogrub2: fix build with gcc8
Martin Jansa [Wed, 9 May 2018 18:33:09 +0000 (18:33 +0000)]
grub2: fix build with gcc8

(From OE-Core rev: 3eca7aa8196ef8ed682659ff47f3f1e3b2c6867d)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agodepmodwrapper-cross: Add kmod-native to DEPENDS
Haris Okanovic [Wed, 9 May 2018 14:59:58 +0000 (09:59 -0500)]
depmodwrapper-cross: Add kmod-native to DEPENDS

Add `DEPENDS += "kmod-native"` to ensure depmod utility is added to
recipe-sysroot-native during image build.

Without this dependency, image builds where BUILD_IMAGES_FROM_FEEDS=1
have depmodwrapper in recipe-sysroot-native but are missing depmod.
Kernel postinst scripts rely on depmod (via depmodwrapper) to index
newly installed modules.

(From OE-Core rev: d693457f9de92e4e8b61881638787e831f0ca197)

Signed-off-by: Haris Okanovic <haris.okanovic@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agosystemd: backport patch to fix build when gcrypt is enabled
Andrea Galbusera [Wed, 9 May 2018 12:16:08 +0000 (14:16 +0200)]
systemd: backport patch to fix build when gcrypt is enabled

When gcrypt support is present in PACKAGECONFIG, build fails due to the bug
reported in [1]. Since this is already solved upstream, this commit backports
the corresponding patch.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=893602

(From OE-Core rev: 4f68722e37d28b5fdd30409570405bf65445eef2)

Signed-off-by: Andrea Galbusera <gizero@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoperl: native modules will not trigger build perl for target.
Krzysztof Taborski [Tue, 8 May 2018 16:46:58 +0000 (18:46 +0200)]
perl: native modules will not trigger build perl for target.

Currently building perl-native modules triggers
build perl for target due to PACKAGES_DYNAMIC regex.

This commit will cause, that perl native modules will
trigger perl-native build.

(From OE-Core rev: 7dd9772eca6df52db09b65537fdf689f1aa3fd8f)

Signed-off-by: Krzysztof Taborski <taborskikrzysztof@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agodistcc-doc_3.2: improve reproducibility
Juro Bystricky [Tue, 20 Mar 2018 22:37:44 +0000 (15:37 -0700)]
distcc-doc_3.2: improve reproducibility

Remove timestamps from metadata of gzip compressed files.

(From OE-Core rev: 8d009dd8c3c56601905a156cb06f339dd4a298e6)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoifupdown: correct the repository location
Alexander Kanavin [Fri, 4 May 2018 12:32:43 +0000 (15:32 +0300)]
ifupdown: correct the repository location

The old repo is gone.

(From OE-Core rev: f171137579bf3141032d309fa433c14ac9141e43)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agosettings-daemon: Drop pointless apply=yes in SRC_URI
Richard Purdie [Thu, 3 May 2018 13:02:44 +0000 (14:02 +0100)]
settings-daemon: Drop pointless apply=yes in SRC_URI

(From OE-Core rev: ae8b78f2ef5df4b24f8e2294c5e2760367b8bf8d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agogo: Update 1.9.4 -> 1.9.6
Otavio Salvador [Wed, 2 May 2018 13:31:59 +0000 (10:31 -0300)]
go: Update 1.9.4 -> 1.9.6

The 1.9.6 fixes a number of issues since 1.9.4 release, mainly:

go1.9.5 (released 2018/03/28) includes fixes to the compiler, go
command, and net/http/pprof package.

go1.9.6 (released 2018/05/01) includes fixes to the compiler and go
command.

(From OE-Core rev: d4abc33c81f7aa33c432ead92ae16df01ebe36c8)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agogo: Upgrade 1.10.1 -> 1.10.2
Otavio Salvador [Wed, 2 May 2018 13:31:58 +0000 (10:31 -0300)]
go: Upgrade 1.10.1 -> 1.10.2

This is a minor release that fixes many important issues found since
1.10.1 release.

(From OE-Core rev: 844f3191cd3d8746b7b31cff83e7655958226520)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoalsa-utils: Fix error when removing unwanted udev rules
Mike Crowe [Wed, 2 May 2018 13:38:03 +0000 (14:38 +0100)]
alsa-utils: Fix error when removing unwanted udev rules

If alsa-utils configure is not passed a --with-udev-rules-dir option then
it defaults to using /lib/udev/rules.d. This meant that the hard-coded use
of ${D}/lib in do_install in 262e69c9c7acf0beb7bb6b96299e3c993c906434
worked correctly to remove the unwanted rules.

Subsequently, 0a4372705a030ca54ed420cdfec33d46ab93499c changed do_install
to use ${nonarch_base_libdir}, claiming to fix this in the usrmerge case.

This means that if udev is not present in PACKAGECONFIG and usrmerge is
present in DISTRO_FEATURES then the alsa-utils build system will install
the rules in ${D}/lib/udev/rules.d but do_install will attempt to remove
${D}/usr/lib, resulting in something like:

 rmdir: failed to remove '.../tmp-glibc/work/i586-oe-linux/alsa-utils/1.1.5-r0/image/usr/lib': No such file or directory

To fix this, let's just tell configure to install the rules in a specific
known location when udev is disabled. This location can then easily be
cleaned up in do_install without doing any harm if udev is enabled.

Tested both with and without usrmerge in DISTRO_FEATURES and with and
without udev in PACKAGECONFIG.

(From OE-Core rev: 022b644e6ba2caa0b32ce3323621c07f78166234)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Cc: Phil Blundell <pb@pbcl.net>
Cc: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agomtd-utils: Add mtd-utils-tests package
Martin Lund [Thu, 26 Apr 2018 09:47:50 +0000 (11:47 +0200)]
mtd-utils: Add mtd-utils-tests package

Add mtd-utils-tests package which includes the test suites mtd-tests,
ubi-tests, fs-tests, etc.

These test suites are useful for verifying flash features or stress
testing.

(From OE-Core rev: 612d0468e34ca922b42a1176ab1e2feef72a2a13)

Signed-off-by: Martin Lund <malu@gomspace.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoqemu: fix CVE-2017-16845
Hongxu Jia [Tue, 24 Apr 2018 07:37:50 +0000 (15:37 +0800)]
qemu: fix CVE-2017-16845

During Qemu guest migration, a destination process invokes ps2
post_load function. In that, if 'rptr' and 'count' values were
invalid, it could lead to OOB access or infinite loop issue.
Add check to avoid it.

(From OE-Core rev: 0d8f68fe43b4da1a0d356fe6bedb52b8f2a02081)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoperf: make a copy of kernel source to perf workdir
Hongxu Jia [Tue, 24 Apr 2018 03:33:47 +0000 (11:33 +0800)]
perf: make a copy of kernel source to perf workdir

Since perf contaminates linux shared workdir, it probably caused
kernel-devsrc compile failure at world build.
...
|0 blocks
|cpio: ./tools/perf/arch/arm/util/sedr7ORqk: Cannot stat:
No such file or directory
|0 blocks
...
cpio tried to find a file at ${S}/tools/perf and failed
if the input list is not valid.

Make a copy of kernel shared source directory into a perf workdir
could fix the issue.

Drop `Fix for rebuilding' which is obsolete

[YOCTO #10880]

(From OE-Core rev: 9b38c824961fc9dce51bda95c25dac91a69fc64f)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agopython3-native: correctly invoke regen-importlib make target
Joe Slater [Mon, 23 Apr 2018 17:21:42 +0000 (10:21 -0700)]
python3-native: correctly invoke regen-importlib make target

Redefiine regen-all in Makefile to invoke regen-importlib after
building other regen- targets.  Change the recipe to not build it
before regen-all.  This avoids trying to build it multiple times,
which can occasionally fail.

(From OE-Core rev: 72d62c9af07bf34bb8fbb3958742eb592985acc2)

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoimage_types_wic: add do_image_wic before do_image_complete
Ming Liu [Fri, 20 Apr 2018 07:32:56 +0000 (09:32 +0200)]
image_types_wic: add do_image_wic before do_image_complete

We have some tasks depending on image's do_image_complete task, and we
are also using WKS files to generate partitioned images, but now there
is lacking a inter dependency between do_image_wic and
do_image_complete, so we have to depend on both of them.

Fixed by adding the dependency.

(From OE-Core rev: e3a25f06f2cde701415f4130a43c9b3895d42f10)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agogrub-efi: add grub target and image for aarch64
Ricardo Salveti [Wed, 18 Apr 2018 00:30:12 +0000 (21:30 -0300)]
grub-efi: add grub target and image for aarch64

Add missing target and image for aarch64, as the current revision is
already fully compatible with ARMv8.

(From OE-Core rev: 43dc32aa00c87f62dcf9a857d4e32469ce27c9e9)

Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agomtd-utils: Complement update-alternatives scope
Niko Mauno [Fri, 20 Apr 2018 14:09:30 +0000 (17:09 +0300)]
mtd-utils: Complement update-alternatives scope

Avoid collision of mtd-utils and mtd-utils-ubifs provided binaries
with identically named BusyBox provided applets in case packages
are installed to same rootfs, by adding relevant binaries to
update-alternatives scope

(From OE-Core rev: a9d8a8b27fc4bc6bdaa9133efd87430813a13212)

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agolinux-libc-headers: multilib_header asm/kvm_para.h and asm/bpf_perf_event.h
Chen Qi [Fri, 20 Apr 2018 09:07:35 +0000 (17:07 +0800)]
linux-libc-headers: multilib_header asm/kvm_para.h and asm/bpf_perf_event.h

When building SDK via populate_sdk for qemuarm64 with multilib
enabled, we would have conflict about bits/floatn.h at populate_sdk
time.

  file /usr/include/asm/bpf_perf_event.h conflicts between attempted installs of lib32-linux-libc-headers-dev-4.15.7-r0.armv7vehf_vfp and linux-libc-headers-dev-4.15.7-r0.aarch64
  file /usr/include/asm/kvm_para.h conflicts between attempted installs of lib32-linux-libc-headers-dev-4.15.7-r0.armv7vehf_vfp and linux-libc-headers-dev-4.15.7-r0.aarch64

Apply oe_multilib_header on these header files to fix the problem.

(From OE-Core rev: 89b4e77129990b842e2ca917b98473ec58205e88)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoglibc: use oe_multilib_header on bits/floatn.h
Chen Qi [Fri, 20 Apr 2018 09:07:34 +0000 (17:07 +0800)]
glibc: use oe_multilib_header on bits/floatn.h

When building SDK via populate_sdk for qemuarm64 with multilib
enabled, we would have conflict about bits/floatn.h at populate_sdk
time.

  file /usr/include/bits/floatn.h conflicts between attempted ins
talls of libc6-dev-2.27-r0.aarch64 and lib32-libc6-dev-2.27-r0.armv7vehf_vfp

Apply oe_multilib_header on this header file to fix the problem.

(From OE-Core rev: 650c59c8b6796cf4797ca1860be85f6ccf50bcd2)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoprocps: Complement update-alternatives scope
Niko Mauno [Fri, 20 Apr 2018 14:09:28 +0000 (17:09 +0300)]
procps: Complement update-alternatives scope

Avoid collision of propcs provided w binary with BusyBox-provided
applet in case both are installed to same rootfs, by adding w to
update-alternatives scope via bindir_progs variable

(From OE-Core rev: de4206c6fd0c3be77d71958f532604b65a4dd5be)

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agollvm: Fix [compile-host-path] QA issue
Khem Raj [Fri, 20 Apr 2018 16:33:54 +0000 (09:33 -0700)]
llvm: Fix [compile-host-path] QA issue

Its trying to build NATIVE llvm-config which is
already built with llvm-native so we do not need
to rebuild it

Drop setting NINJA_STATUS explicitly, its no longer
needed, on the contrary it hinders the task status
update

(From OE-Core rev: f8393b2b4bc5fbd972be00cb17d0c574ae8deff9)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agoperl: fix CVE-2017-12837
Hongxu Jia [Tue, 24 Apr 2018 07:37:51 +0000 (15:37 +0800)]
perl: fix CVE-2017-12837

https://perl5.git.perl.org/perl.git/commitdiff/96c83ed78aeea1a0496dd2b2d935869a822dc8a5

(From OE-Core rev: bd53256e165f5bb59a28d77a466d71fce39080fa)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agorecipetool: fixed uncaught NameError exception
Sarah Marsh [Thu, 26 Apr 2018 01:35:25 +0000 (20:35 -0500)]
recipetool: fixed uncaught NameError exception

When packaging a node application, a `NameError` can be thrown in create_npm.py if an optional npm dependency does not
support Linux.

(From OE-Core rev: 8293201d98d368d6322eaa960fb3e7cee2ba9368)

Signed-off-by: Sarah Marsh <sarah.marsh@arm.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agotzdata: fix a typo.
Kevin Carli [Wed, 25 Apr 2018 14:28:33 +0000 (16:28 +0200)]
tzdata: fix a typo.

(From OE-Core rev: 6e3ea2f17bcd9d942f838ba972338d92e95f65d4)

Signed-off-by: Kevin Carli <k.carli@overkiz.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
6 years agotoolchain-scripts/meta-ide-support: Handle dash shells correctly
Richard Purdie [Thu, 3 May 2018 17:54:46 +0000 (18:54 +0100)]
toolchain-scripts/meta-ide-support: Handle dash shells correctly

Where /bin/sh is dash, the recent toolchain scripts change fails as the $(pwd)
usage in oe-init-build-env doesn't function correctly. Fix this by saving
and restoring the cwd and calling the script within its own directory.

This fixes meta-ide-support on dash based systems.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agotoolchain-scripts: preserve host path in environment setup script
Chin Huat Ang [Wed, 25 Apr 2018 08:00:13 +0000 (16:00 +0800)]
toolchain-scripts: preserve host path in environment setup script

The environment setup script generated in the build directory sets the PATH
variable by expanding ${PATH} which would have host paths filtered. Sourcing
this script to run runqemu will not work as it complains host stty (/bin/stty)
cannot be found.

To resolve this, the script no longer expands ${PATH} during generation time,
instead it will now source oe-init-build-env to initialize the build
environment so that all host paths will be preserved. Also be sure to prepend
STAGING_BINDIR_TOOLCHAIN to the PATH variable so that the toolchain from the
build directory can be found.

[YOCTO #12695]

Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agobuild-appliance-image: Update to sumo head revision 2018-04 2018-04-sumo yocto-2.5
Richard Purdie [Mon, 23 Apr 2018 16:53:31 +0000 (17:53 +0100)]
build-appliance-image: Update to sumo head revision

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoperl: Security fix CVE-2017-12883
Armin Kuster [Sun, 22 Apr 2018 01:00:30 +0000 (18:00 -0700)]
perl: Security fix CVE-2017-12883

Affects: Perl  < 5.24.3-rc1 and  5.26.x before 5.26.1-RC1

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agopackage.bbclass: Make staticlib problems non-fatal
Ola x Nilsson [Mon, 23 Apr 2018 07:49:49 +0000 (09:49 +0200)]
package.bbclass: Make staticlib problems non-fatal

Allow debugsource listing using dwarfsourcefiles to fail for static
libraries when the archive content is not as expected.

Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agogo-runtime_1.9: pass BUILD_ flags to cgo for host-side build
Matt Madison [Sat, 21 Apr 2018 13:19:37 +0000 (06:19 -0700)]
go-runtime_1.9: pass BUILD_ flags to cgo for host-side build

When running the make.bash script to build the host-side
tools, make sure that cgo is using CFLAGS and LDFLAGS for
the build host, rather than those for the target.

[YOCTO #12704]

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoRevert "icecc.bbclass: Improve error reporting"
Joshua Watt [Fri, 20 Apr 2018 13:54:06 +0000 (08:54 -0500)]
Revert "icecc.bbclass: Improve error reporting"

This reverts commit b28114cf1e58643bd233bc0c83d6d8138952b7ac.

The "-E" option for flock is not ubiquitously supported, so don't use
it.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agopseudo: use latest SRCREV
Martin Jansa [Fri, 20 Apr 2018 08:25:26 +0000 (08:25 +0000)]
pseudo: use latest SRCREV

* the pseudo.log is significantly shorter with this revision

fddbe85 Fix symlink following errors
3a48dc4 Fix one more stray slash
691a230 Less chatty debugging
0c053e5 Change copyright default.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agopackage: Fix PACKAGELOCK handling
Richard Purdie [Fri, 20 Apr 2018 07:25:32 +0000 (08:25 +0100)]
package: Fix PACKAGELOCK handling

PACKAGELOCK is there to protect readers of PKGDATA_DIR from writes and files
changing whilst they're being read. With various changes to the codebase,
the lock code has become confused as the files are now written by the sstate
code in do_packagedata, not in do_package directly any longer.

This change cleans up the code so read sites take the shared lock (anything in
do_package), write sites take the full lock (do_packagedata sstate).

The lock from do_package sstate is no longer needed since it doesn't write
outside WORKDIR.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agobitbake.conf: re-order DEBUG_PREFIX_MAP
Juro Bystricky [Thu, 19 Apr 2018 18:04:10 +0000 (11:04 -0700)]
bitbake.conf: re-order DEBUG_PREFIX_MAP

When specifying several -fdebug-prefix-map command line options to
gcc, they are evaluated right to left (last one first).
Normally, the order is irrelevant. However, when we try to map both:

recipe-sysroot-native
recipe-sysroot

the order matters. With the original order most of our debug packages contain
incorrect debug symbols.
Take for example /usr/bin/.debug/setfacl from acl-dbg:

$ strings setfacl | grep native
...
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include

Reordering the fdebug-prefix-map arguments will give us the correct paths:
/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include

Note there may be additional an incorrect paths, such as:
/usr/src/debug/glibc/2.27-r0/recipe-sysroot-native/usr/lib/x86_64-poky-linux.gcc-cross-initial-x86_64/gcc/x86_64-poky-linux/7.3.0/include

But that one needs to be fixed in the recipe for glibc.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoglib-2.0/glib.inc: fix broken mingw build
Juro Bystricky [Thu, 19 Apr 2018 16:53:02 +0000 (09:53 -0700)]
glib-2.0/glib.inc: fix broken mingw build

mingw build was broken by the commit:
"glib-2.0/glib.inc: apply MLPREFIX renaming to all package classes"

When building for mingw, we encounter build errors such as:

  mv: cannot stat '<builddir>/<...>/usr/libexec/gio-querymodules': No such file or directory

The mingw file that exists is "gio-querymodules.exe" instead of "gio-qeurymodules".
The fix is to append the names of executables by an OS specific EXEEXT.

[YOCTO #12679]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic/imager/direct: Ensure correct ROOTFS_DIR is shown
Richard Purdie [Thu, 19 Apr 2018 10:53:14 +0000 (11:53 +0100)]
wic/imager/direct: Ensure correct ROOTFS_DIR is shown

This changes the output of "wic create mkefidisk -e core-image-sato" from:

The following build artifacts were used to create the image(s):
  ROOTFS_DIR:                   /media/build1/poky/build/tmp.wic.ybraavmb/rootfs_copy

to:

The following build artifacts were used to create the image(s):
  ROOTFS_DIR:                   /media/build1/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs

which s much less confusing for the user.

[YOCTO #12564]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agooeqa/selftest/runqemu: qemu nfs testing not ready for deployment
Richard Purdie [Fri, 20 Apr 2018 07:10:42 +0000 (08:10 +0100)]
oeqa/selftest/runqemu: qemu nfs testing not ready for deployment

This test shouldn't have merged yet since we don't run portmap/rpcbind
on the autobuilder infrastructure and the test therefore cannot succeed.

We need to document this, set it up, then enable the test. The test itself
is fine and good to have so its left in the code but disabled for now.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agopackage.bbclass: Only try and process static lib debug symbols on targetos != mingw*
Richard Purdie [Fri, 20 Apr 2018 07:08:01 +0000 (08:08 +0100)]
package.bbclass: Only try and process static lib debug symbols on targetos != mingw*

"package.bbclass: Include dbgsrc for static libs" introduced a regression
on mingw, fix this by excluding on that TARGETOS.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agooe-selftest: runqemu: add tests for qemu boot and shutdown
Yeoh Ee Peng [Tue, 10 Apr 2018 01:28:32 +0000 (18:28 -0700)]
oe-selftest: runqemu: add tests for qemu boot and shutdown

QA team were testing qemu boot image and shutdown on each
qemu architecture manually. Add automated test to test qemu boot on
ext4 and nfs, finally check that it can shutdown properly.

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agopackage.bbclass: Include dbgsrc for static libs
Ola x Nilsson [Thu, 19 Apr 2018 11:17:30 +0000 (13:17 +0200)]
package.bbclass: Include dbgsrc for static libs

The debugsource must be added from the package providing the static
lib, because any package using that lib does not have access to the
source code.

Fixes [YOCTO #12558]

Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agobitbake.conf: add scp to HOSTTOOLS_NONFATAL
Jef Driesen [Fri, 13 Apr 2018 13:33:05 +0000 (15:33 +0200)]
bitbake.conf: add scp to HOSTTOOLS_NONFATAL

The scp tool is used by the ssh fetcher.

Signed-off-by: Jef Driesen <jef.driesen@niko.eu>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agopackage.py: use single quotes for path passed to file in is_elf()
Andre McCurdy [Wed, 18 Apr 2018 22:10:23 +0000 (15:10 -0700)]
package.py: use single quotes for path passed to file in is_elf()

Align package.py is_elf() with recent changes in package.bbclass
isELF():

  http://git.openembedded.org/openembedded-core/commit/?id=7877761534b0c2492da6289e9f2269d41b6ed464

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agousbutils: use update-alternatives for lsusb
Ricardo Salveti [Tue, 17 Apr 2018 22:47:29 +0000 (19:47 -0300)]
usbutils: use update-alternatives for lsusb

lsusb can also be provided by busybox (CONFIG_LSUSB), so use
update-alternatives to handle the conflict.

Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoopenssh: disable ciphers not supported by OpenSSL DES
Hongxu Jia [Wed, 18 Apr 2018 14:32:54 +0000 (22:32 +0800)]
openssh: disable ciphers not supported by OpenSSL DES

While compiling openssl with option `no-des', it caused the openssh
build failure
...
cipher.c:85:41: error: 'EVP_des_ede3_cbc' undeclared here (not in a function);
...

OpenSSL configured that way defines OPENSSL_NO_DES to disable des

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agouninative: Set the dynamic linker to use at compile time
Richard Purdie [Wed, 18 Apr 2018 10:38:06 +0000 (11:38 +0100)]
uninative: Set the dynamic linker to use at compile time

Its possible some dynamic runtime library in the dependency chain may
come from sstate and link to libraries which need the libc from
uninative. If we don't do this and binaries are run at do_install time
they would fail to find the symbols from the later libc. Examples:

cmake-native do_install:
bin/cmake: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by TOPDIR/tmp/work/x86_64-linux/cmake-native/3.10.3-r0/recipe-sysroot-native/usr/lib/libexpat.so.1)

dbus-native do_install:
tmp/work/x86_64-linux/dbus-native/1.12.2-r0/build/bus/.libs/lt-dbus-daemon: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x32/build/build/tmp/work/x86_64-linux/dbus-native/1.12.2-r0/recipe-sysroot-native/usr/lib/libexpat.so.1)

This issue is resolved when the interpreter is changed at sstate unpack
time but this isn't soon enough to avoid issues at compile/install time.

By specifing which dynamic linker/loader to use at compile time, this
race window is removed entirely.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agouninative: Add allow-shlib-undefined to BUILD_LDFLAGS and drop other workarounds
Richard Purdie [Tue, 17 Apr 2018 14:42:31 +0000 (15:42 +0100)]
uninative: Add allow-shlib-undefined to BUILD_LDFLAGS and drop other workarounds

We have a problem when for example, a glibc 2.27 based system builds some
library like libpopt-native and puts it into sstate then it is reused
on a pre glibc-2.27 system to build something which depends on popt like
rpm-native. This results in an error like:

recipe-sysroot-native/usr/lib/libpopt.so: undefined reference to `glob@GLIBC_2.27'

In the past we've had this problem with new symbols like getrandom and
getentropy, here its with a more complex symbol where there is an old
version and a newer version.

We've looked into various options, basically we cannot link against our
uninative libc/ld.so since we don't have the right headers or compiler
link libraries. The compiler doesn't allow you to switch in a new set
either, even if we did want to ship them. Shipping a complete compiler,
dev headers and libs also isn't an option.

On the other hand if we follow the ld man page, it does say:

"""
The reasons for allowing undefined symbol references in shared libraries
specified at link time are that:

- A shared library specified at link time may not be the same as the one
  that is available at load time, so the symbol might actually be
  resolvable at load time.
"""

which is exactly this case. By the time the binary runs, it will use
our uninative loader and libc and the symbol will be available.

Therefore we basically have a choice, we get weird intermittent bugs,
we drop uninative entirely, or we pass this option.

If we pass the option, we can drop the other workarounds too.

(From OE-Core rev: 75a62ede393bf6b4972390ef5290d50add19341a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake.conf: Set and export TZ envvar to UTC
Richard Purdie [Fri, 13 Apr 2018 16:08:10 +0000 (17:08 +0100)]
bitbake.conf: Set and export TZ envvar to UTC

We just ran into an issue where tar failed to build on one server setup
but built everywhere else just fine.

It was running makeinfo to regenerate some docs files and makeinfo was too
old for the host it was running on. There was no dependency on makeinfo-native
as it was not meant to be regenerating the docs.

It was being regenerated as a date from a timestamp used in the docs
was different in Asian timezones than in the other timezones our builds
were being tested in.

I added an entry to https://wiki.yoctoproject.org/wiki/TipsAndTricks/
about how this was debugged.

As such, lets default to setting and exporting TZ to 'UTC' as was already
pioneered by the reproducibile builds work. This makes the builds
deterministic.

[YOCTO #12665]

(From OE-Core rev: 2a90ae7a3286724ff9e3615c4dbf56038f703810)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoyocto-uninative: Update to version 1.9 (fedora28 compatible)
Richard Purdie [Fri, 6 Apr 2018 10:05:33 +0000 (11:05 +0100)]
yocto-uninative: Update to version 1.9 (fedora28 compatible)

This includes the libxcrypt change which allows uninative to work on fedora28.

(From OE-Core rev: 4b27ab6487a54b42a52aa16e98ea4d19fa62b5ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agopackage.bbclass: Add '-b' option to file call in isELF
Mark Hatle [Mon, 16 Apr 2018 15:34:18 +0000 (11:34 -0400)]
package.bbclass: Add '-b' option to file call in isELF

The isELF function works by running:

   result = file <pathname>
   if 'ELF' in result

By default 'file' will prepend the result with the path name of the file
that is being checked.  This usually works fine, such as:

$ file /home/foo/openembedded-core/meta/classes/package.bbclass
/home/foo/openembedded-core/meta/classes/package.bbclass: Python script, ASCII text executable, with very long lines

However, if the path includes 'ELF', ELF will end up in the result, and then
the check will return positive.

$ file /home/ELF/openembedded-core/meta/classes/package.bbclass
/home/ELF/openembedded-core/meta/classes/package.bbclass: Python script, ASCII text executable, with very long lines

This will then result in the isELF coming back true, and possibly causing the
checks that use isELF, such as the 'is it already stripped' check, to do the
incorrect thing.

Adding the '-b' option to file will result in the path being omitted in the
result:

$ file /home/ELF/openembedded-core/meta/classes/package.bbclass
Python script, ASCII text executable, with very long lines

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agorun-postinsts: Replace pi_dir variable test
Niko Mauno [Sat, 14 Apr 2018 06:54:56 +0000 (09:54 +0300)]
run-postinsts: Replace pi_dir variable test

Since commit 5159ddcb62682e1b7e63a20a9218ea96e3fe10a2 string length test
performed against pi_dir has effectively never been able to succeed.

Change this to rather test if pi_dir is not an existing directory. By
doing we remove the chance of seeing the following console error message
during first boot to a pristine rootfs:

  'ls: /etc/ipk-postinsts: No such file or directory'

Signed-off-by: Niko Mauno <niko.mauno@iki.fi>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agorootfs-postcommands.bbclass: improve binary reproducibility
Juro Bystricky [Fri, 13 Apr 2018 22:47:44 +0000 (15:47 -0700)]
rootfs-postcommands.bbclass: improve binary reproducibility

Conditionally support binary reproducibility of rootfs images.
If REPRODUCIBLE_TIMESTAMP_ROOTFS is specified then:

1. set /etc/timestamp to a reproducible value
2. set /etc/version to a reproducible value
3. set /etc/gconf: set mtime in all %gconf.xml to reproducible values

The reproducible value is taken from the variable REPRODUCIBLE_TIMESTAMP_ROOTFS.

[YOCTO #11176]
[YOCTO #12422]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agocore-image-minimal-initramfs: use initramfs-framework for initialization
California Sullivan [Fri, 13 Apr 2018 20:36:40 +0000 (13:36 -0700)]
core-image-minimal-initramfs: use initramfs-framework for initialization

initramfs-framework is more modular and expandable. This change was
proposed in commit 28fc6ba761ed4a47efa7c43e7f7dff5e2fe72b5e
"core-image-minimal-initramfs: use initramfs-framework by default" but
reverted due to the selftests runqemu.RunqemuTests.test_boot_machine_iso
and runqemu.RunqemuTests.test_boot_deploy_hddimg failing. Since then,
the kinks have been worked out, and missing functionality that had been
missed (non-EFI installation module) has been added.

Since the PACKAGE_INSTALL variable was getting so long with all these
individual modules getting added, I also introduced a new
INITRAMFS_SCRIPTS variable to the core-image-minimal-initramfs recipe.
This variable makes the recipe look much cleaner, and also allows easier
replacement or additions to the scripts.

Fixes [YOCTO #10987].

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoqemu_2.11.1.bb: support mingw build
Juro Bystricky [Fri, 13 Apr 2018 18:11:03 +0000 (11:11 -0700)]
qemu_2.11.1.bb: support mingw build

The patch chardev-connect-socket-to-a-spawned-command.patch calls
"socketpair". This function is missing in mingw, so the patch
needs to be modified accordingly (by conditional compilation using
_WIN32 macro where appropriate), otherwise we end up with a broken
mingw build.

While it is possible to simply remove the whole patch for mingw build
(via a .bbappend file in meta-mingw), it makes more sense to modify
the patch itself.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoman-db: add groff to RDEPENDS
Chen Qi [Fri, 13 Apr 2018 10:19:57 +0000 (18:19 +0800)]
man-db: add groff to RDEPENDS

Add groff to RDEPENDS_${PN}, otherwise, the 'man' command cannot
work correctly on target.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoglibc: Set libc_cv_ssp_all to no as well
Khem Raj [Fri, 13 Apr 2018 05:05:59 +0000 (22:05 -0700)]
glibc: Set libc_cv_ssp_all to no as well

This is not a problem right now but if we
were to use -fstack-protector-all this can
cause build errors

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agotestimage: run systemtap test on SDK images
Ross Burton [Wed, 11 Apr 2018 14:21:55 +0000 (15:21 +0100)]
testimage: run systemtap test on SDK images

Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agooeqa/runtime/stap.py: add runtime test for systemtap
Victor Kamensky [Tue, 3 Apr 2018 15:25:01 +0000 (08:25 -0700)]
oeqa/runtime/stap.py: add runtime test for systemtap

Add runtime test for stap to test basic SystemTap
operations: can compile very basic module and run on
target device.

Note we disable (-DSTP_NO_VERREL_CHECK) SystemTap
additional kernel release check since during OE testing
mismatching kernel-devsrc and kernels are used.

Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agopackagegroup-core-tools-profile: include systemtap on MIPS and aarch64
Ross Burton [Thu, 12 Apr 2018 13:08:01 +0000 (14:08 +0100)]
packagegroup-core-tools-profile: include systemtap on MIPS and aarch64

Modern systemtap builds fine for MIPS and aarch64, so don't exclude it from this
packagegroup.

Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agosystemtap: don't build under musl
Ross Burton [Thu, 12 Apr 2018 13:06:38 +0000 (14:06 +0100)]
systemtap: don't build under musl

systemtap uses obstack.h and FTW_SKIP_SUBTREE, both of which are GNU extensions
in glibc.

Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoscripts/test-dependencies.sh: remove
Martin Jansa [Wed, 11 Apr 2018 17:55:32 +0000 (17:55 +0000)]
scripts/test-dependencies.sh: remove

* with RSS used in pyro this script isn't very useful anymore
* RSS makes sure that the dependencies are almost always deterministic
  the only case known to me where dependencies are different based on
  what was already built in TMPDIR are runtime dependencies resolved
  by shlibs code in package.bbclass (which is using global pkgdata, not
  specific to given recipe and its RSS) as described here:
  https://bugzilla.yoctoproject.org/show_bug.cgi?id=9217#c4
  but for this case it's not worth running complete test-dependencies.sh
  runs

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoxserver-nodm-init: Respawn service in case of failure
Ramon Fried [Tue, 10 Apr 2018 11:20:40 +0000 (14:20 +0300)]
xserver-nodm-init: Respawn service in case of failure

It appears that sometimes xserver-nodm.service is starting before
display driver finished loading causing the following failure in
Xorg log:
(EE) open /dev/dri/card0: No such file or directory

The introduced by this patch is to restart the service,
hopefully the display driver will finish loading.

Signed-off-by: Ramon Fried <rfried@codeaurora.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agovalgrind: fix the shared object issue while prelink ptest
Zhixiong Chi [Wed, 11 Apr 2018 08:26:18 +0000 (16:26 +0800)]
valgrind: fix the shared object issue while prelink ptest

If valgrind-ptest is installed, we will get the some prelink error
like below at do_image:

  .../usr/sbin/prelink: /usr/lib64/valgrind/ptest/memcheck/tests/wrap7:\
  Could not find one of the dependencies: \
  .../usr/sbin//prelink-rtld: error   \
  while loading shared libraries: wrap7so.so: cannot open shared  \
  object file: No such file or directory

The wrap7 needs to link the shared object in the path
/usr/lib64/valgrind/ptest/memcheck/tests, but it fails.
So we correct the path for ptest.

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agodistro: default: Change Go default version to 1.9
Otavio Salvador [Wed, 11 Apr 2018 14:32:52 +0000 (11:32 -0300)]
distro: default: Change Go default version to 1.9

For the time being, there is a serious bug[1] in Go 1.10 when it comes to
use the shared runtime support which cases problems in multiple projects.

 1. https://github.com/golang/go/issues/24640

It is still unclear if the problem arises from a bug inside the
compiler itself or it makes a real problem more visible. Either way,
using 1.10 as default seems to be a risk so we are changing back to
1.9 for now.

Refs: [YOCTO: #12631]

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agopatch: fix CVE-2018-1000156
Jackie Huang [Wed, 11 Apr 2018 06:56:10 +0000 (14:56 +0800)]
patch: fix CVE-2018-1000156

* CVE detail: https://nvd.nist.gov/vuln/detail/CVE-2018-1000156

* upstream tracking: https://savannah.gnu.org/bugs/index.php?53566

* Fix arbitrary command execution in ed-style patches:
  - src/pch.c (do_ed_script): Write ed script to a temporary file instead
    of piping it to ed: this will cause ed to abort on invalid commands
    instead of rejecting them and carrying on.
  - tests/ed-style: New test case.
  - tests/Makefile.am (TESTS): Add test case.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agopatch: fix CVE-2018-6951
Jackie Huang [Wed, 11 Apr 2018 06:56:09 +0000 (14:56 +0800)]
patch: fix CVE-2018-6951

* CVE detail: https://nvd.nist.gov/vuln/detail/CVE-2018-6951

* upstream tracking: http://savannah.gnu.org/bugs/?53132

* Fix segfault with mangled rename patch
  - src/pch.c (intuit_diff_type): Ensure that two filenames are specified
    for renames and copies (fix the existing check).

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoicecc.bbclass: Bump version number
Joshua Watt [Wed, 11 Apr 2018 02:22:00 +0000 (21:22 -0500)]
icecc.bbclass: Bump version number

Bump the version number for force remotes to use a newly generated
environment, since the old one potentially had a few bugs

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoicecc.bbclass: Improve error reporting
Joshua Watt [Wed, 11 Apr 2018 02:21:59 +0000 (21:21 -0500)]
icecc.bbclass: Improve error reporting

Improve reporting when the icecream environment cannot be created by
assigning the flock call a specific error number when the lock fails so
it can be distinguished from environment creation errors.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoicecc.bbclass: Add ICECC_ENV_DEBUG variable
Joshua Watt [Wed, 11 Apr 2018 02:21:58 +0000 (21:21 -0500)]
icecc.bbclass: Add ICECC_ENV_DEBUG variable

The ICECC_ENV_DEBUG variable can be set in local.conf to pass additional
debugging options to the Icecream toolchain creation script.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoicecc-create-env: Add extra tools option
Joshua Watt [Wed, 11 Apr 2018 02:21:57 +0000 (21:21 -0500)]
icecc-create-env: Add extra tools option

It can often be useful to include additional debugging tools the
toolchain such as strace. Add an option to include an arbitrary path.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoicecc-create-env: Fix library interpreter usage
Joshua Watt [Wed, 11 Apr 2018 02:21:56 +0000 (21:21 -0500)]
icecc-create-env: Fix library interpreter usage

Shared libraries sometimes (frequently?) don't have a program
interpreter specified. The previous code would fail to find the library
dependencies in these cases because no interpreter could be found.
Commonly, this meant that if a library depends on another library, it
might not be included toolchain because dependency scanning stops with
the first one.

Instead, capture the program interpreter from the program or library
that starts the dependency chain and use that interpreter to get all of
the dependencies in the chain, recursively.

Additionally, if no interpreter can be found, fallback to using ldd

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoicecc-create-env: Fix RUNPATH files
Joshua Watt [Wed, 11 Apr 2018 02:21:55 +0000 (21:21 -0500)]
icecc-create-env: Fix RUNPATH files

Some newer libraries and programs use RUNPATH to specify the library
search path. These executables were being skipped by the rpath fixup
code because it was grepping the ELF header for RPATH only. A more
correct solution is to ask patchelf to report the rpath, as that tool
will properly report either RPATH or RUNPATH as appropriate.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoicecc-create-env: Allow logging to a file
Joshua Watt [Wed, 11 Apr 2018 02:21:54 +0000 (21:21 -0500)]
icecc-create-env: Allow logging to a file

Modifies the icecc-create-env script so that it can log output to a log
file. In addition, a --debug flag is added that allows verbose logging.
Finally, the silent flag was removed since it was never used in
icecc.bbclass

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agodhcp: Security Advisory - CVE-2017-3144
Yue Tao [Wed, 11 Apr 2018 00:21:18 +0000 (08:21 +0800)]
dhcp: Security Advisory - CVE-2017-3144

Fix CVE-2017-3144

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-3144
https://kb.isc.org/article/AA-01541

Patch from:
https://source.isc.org/cgi-bin/gitweb.cgi?p=dhcp.git;a=commitdiff;h=5097bc0559f592683faac1f67bf350e1bddf6ed4

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agogconf: fix saving of settings when config folder doesnt exist
Jaewon Lee [Tue, 10 Apr 2018 21:26:47 +0000 (14:26 -0700)]
gconf: fix saving of settings when config folder doesnt exist

In some circumstances, gconf isn't able to save configurations
because ~/.config folder aka root_dir doesn't exist.

For example when saving settings using matchbox-appearance,
the following error is shown:

GConf Error: Configuration server couldn't be contacted: D-BUS error:
Can't overwrite existing read-only value: Value for
`/desktop/poky/interface/font_name' set in a read-only source at the
front of your configuration path

This issue was not seen before because ~/.config directory is shared
between several packages and one of those packages usually creates it
by the time gconf wants to use it.

This patch makes sure that gconf creates the .config directory if it
doesn't exist, along with the gconf directory inside it.

[YOCTO #12632]

Signed-off-by: Alejandro Hernandez <alejandr@xilinx.com>
Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agobootchart2: update canonical git URL
Ross Burton [Tue, 10 Apr 2018 16:31:24 +0000 (17:31 +0100)]
bootchart2: update canonical git URL

/mmeeks/bootchart.git is redirecting to /xrmx/bootchart.git so update SRC_URI to
match.

Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agopython3: Add recommended modules to nativesdk install
Tom Hochstein [Mon, 9 Apr 2018 16:20:32 +0000 (11:20 -0500)]
python3: Add recommended modules to nativesdk install

The python3 installation in the SDK did not include the minimum set
of modules to be functional, particularly in the case where Python
is brought in through dependencies. Rather than requiring the user
to explicitly add the modules, it's better to pull in the modules
through RRECOMMENDS. Note that the Python 2 recipe already does
this.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agometa: add missing Signed-off-by and Upstream-Status tags
Ross Burton [Mon, 9 Apr 2018 17:16:58 +0000 (18:16 +0100)]
meta: add missing Signed-off-by and Upstream-Status tags

Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agolinux-yocto/4.14/4.15: deterministic srcversion
Bruce Ashfield [Mon, 9 Apr 2018 15:16:07 +0000 (11:16 -0400)]
linux-yocto/4.14/4.15: deterministic srcversion

   Author: Juro Bystricky <juro.bystricky@intel.com>
   Date:   Fri Mar 30 10:14:05 2018 -0700

       modpost: srcversion sometimes incorrect

       "srcversion" field inserted into module modinfo section contains a
       sum of the source files which made it. However, this field can
       be incorrect. Building the same module can end up having inconsistent
       srcversion field eventhough the sources remain the same.
       This can be reproduced by building modules in a deeply nested directory,
       but other factors contribute as well.

       The reason for incorrect srcversion is that some source files can be
       simply silently skipped from the checksum calculation due to limited
       buffer space for line parsing.

       This patch addresses two issues:

       1. Allocates a larger line buffer (32k vs 4k).
       2. Issues a warning if a line length exceeds the line buffer.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agolinux-yocto-tiny/4.14: fix recipe name
Bruce Ashfield [Mon, 9 Apr 2018 15:16:06 +0000 (11:16 -0400)]
linux-yocto-tiny/4.14: fix recipe name

I guess not many people are building linux-yocto-tiny for
v4.15, given that I managed to mangle the name of the recipe
when I introduced it.

[YOCTO #12640]

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agolinux-yocto/4.14: add elfutils, util-linux and openssl dependencies
Bruce Ashfield [Mon, 9 Apr 2018 15:16:05 +0000 (11:16 -0400)]
linux-yocto/4.14: add elfutils, util-linux and openssl dependencies

4.15+ already has the following dependencies:

 DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
 DEPENDS += "openssl-native util-linux-native"

Updates to 4.14 via the -stable releases have also introduced the same
dependencies to 4.14's "make scripts". As such, we bring the same lines
into 4.14 to restore the ability to build scripts.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agopopulate_sdk_base: use xz -T instead of pixz
Ross Burton [Mon, 9 Apr 2018 15:17:05 +0000 (16:17 +0100)]
populate_sdk_base: use xz -T instead of pixz

xz has native support for threaded compression now and SDK creation was the only
part of oe-core which is using pixz instead of xz.

Not only does this remove pixz-native from the SDK dependencies, but in my
limited testing xz -T0 is slightly faster and produces smaller archives than
pixz for the same input.

Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoimage_types: use pigz to create .gz files
Ross Burton [Tue, 10 Apr 2018 14:32:19 +0000 (15:32 +0100)]
image_types: use pigz to create .gz files

Since pigz is no longer a drop-in replacement for gzip (oe-core 1624b7b) the
image creation has been using gzip instead of pigz, despite still depending on
pigz-native.  Fix this by invoking pigz explicitly.

Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agolicense.bbclass: be a bit more strict when searching ${PN}-${LICENSE_PACKAGE_SUFFIX... uninative-1.9
Martin Jansa [Sun, 8 Apr 2018 20:16:00 +0000 (20:16 +0000)]
license.bbclass: be a bit more strict when searching ${PN}-${LICENSE_PACKAGE_SUFFIX} in packages

* linux-firmware contains ${PN}-license package since this commit:
  commit 1ee083da0730408fffdbbf5f29abc299c0e61be9
  Author: Jackie Huang <jackie.huang@windriver.com>
  Date:   Mon Apr 13 10:17:21 2015 +0800

    linux-firmware: fix the mess of licenses
* LICENSE_CREATE_PACKAGE functionality in license.bbclass when enabled
  adds new package with suffix:
  LICENSE_PACKAGE_SUFFIX ??= "-lic"
  but then it checks if ${PN}-${LICENSE_PACKAGE_SUFFIX} is included
  in PACKAGES before adding it and when found it shows:
  WARNING: linux-firmware-1_0.0+gitAUTOINC+4c0bf113a5-r0 do_package: linux-firmware-lic package already existed in linux-firmware.
  and doesn't add the ${PN}-lic to PACKAGES and causes another warning:
  WARNING: linux-firmware-1_0.0+gitAUTOINC+4c0bf113a5-r0 do_package: QA Issue: linux-firmware: Files/directories were installed but not shipped in any package:
  /usr
  /usr/share
  /usr/share/licenses
  /usr/share/licenses/linux-firmware

  that's because it was searching ${PN}-lic in PACKAGES as a string
  so it found ${PN}-lic as a substring of ${PN}-license, add a split
  to search in an list

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolibxcrypt: add -std=gnu99 to BUILD_CPPFLAGS
Martin Jansa [Mon, 9 Apr 2018 07:51:41 +0000 (07:51 +0000)]
libxcrypt: add -std=gnu99 to BUILD_CPPFLAGS

* add it to allow older distributions e.g. Ubuntu 14.04 with gcc 4.8
  to build this, otherwise it fails with:
  ../git/gen-des-tables.c: In function 'write_table_u8':
  ../git/gen-des-tables.c:307:3: error: 'for' loop initial declarations are only allowed in C99 mode
     for (size_t i = 0; i < m; i++)
     ^

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorpm: build without dbus for rpm-native
Chen Qi [Sun, 8 Apr 2018 07:56:07 +0000 (15:56 +0800)]
rpm: build without dbus for rpm-native

Add option for dbus in configure.ac, and explicitly build without dbus
for rpm-native.

Previously, the rpm recipe tries to prevent rpm-native from attempting
to inhibit shutdown via session dbus by appending '--disable-plugins'
to EXTRA_OECONF in case of native.

However, some layer may need some functionality via plugin support. And
when it enables it, we would meet the following warning at rootfs time.

  Unable to get systemd shutdown inhibition lock: Socket name too long

As plugins/systemd_inhibit.c is the only place that's related to this
dependency, we can be sure that dbus is really not needed for rpm-native.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoyocto-check-layer: add a test for correct setting of LAYERSERIES_COMPAT_collection
Alexander Kanavin [Fri, 6 Apr 2018 14:07:22 +0000 (17:07 +0300)]
yocto-check-layer: add a test for correct setting of LAYERSERIES_COMPAT_collection

[YOCTO #12661]

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolicense.bbclass: Minor simplification of get_deployed_dependencies()
Peter Kjellerstedt [Fri, 6 Apr 2018 18:26:57 +0000 (20:26 +0200)]
license.bbclass: Minor simplification of get_deployed_dependencies()

Since ${SSTATE_ARCHS} now contains ${PACKAGE_EXTRA_ARCHS} there is no
longer any need to add those extra architectures to the list of
architectures handled in get_deployed_dependencies().

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agosstate.bbclass: Add ${PACKAGE_EXTRA_ARCHS} to SSTATE_ARCHS
Peter Kjellerstedt [Fri, 6 Apr 2018 18:26:56 +0000 (20:26 +0200)]
sstate.bbclass: Add ${PACKAGE_EXTRA_ARCHS} to SSTATE_ARCHS

This makes sure files provided by packages that use any of the extra
architectures defined using ${PACKAGE_EXTRA_ARCHS} are cleaned from
tmp/sysroot-components when sstate_eventhandler2() executes.

Without this, changing a package from using one of the extra
architectures to another architecture would lead to files being
leftover in tmp/sysroot-components, which could later be picked up
when creating the RSS for another package rather than the files that
belonged to the updated package.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoclasses: Use ${MACHINE_ARCH} instead of ${MACHINE} for stamp-extra-info task flag
Peter Kjellerstedt [Fri, 6 Apr 2018 18:26:55 +0000 (20:26 +0200)]
classes: Use ${MACHINE_ARCH} instead of ${MACHINE} for stamp-extra-info task flag

Without this change, there will be two sstate index files in
tmp/sstate-control for any machine that contains a dash in the
name.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agonativesdk-glibc: Split glibc and libcrypt to use libxcrypt instead
Richard Purdie [Fri, 6 Apr 2018 12:53:53 +0000 (14:53 +0200)]
nativesdk-glibc: Split glibc and libcrypt to use libxcrypt instead

Fedora28[1] has decided to go ahead and use libxcrypt to replace libcrypt from glibc
despite the change not having merged into glibc upstream yet. This breaks the use of
uninative in OE on fedora28 since binaries there are now using new symbols only found
in libxcrypt. libxcrypt is meant to be backwards compatible with libcrypt but not the
reverse.

Since this will impact OE in the next release cycle, this changes nativesdk only
to use this new model and adds libxcrypt to work in that case. This allows us to
build a uninative which is compatible with fedora28 and previous other OSes.

In order to work, recipes will now need to depend on virtual/crypt where they use
libcrypt since its now a separate library and we can't depend on it from glibc to
preseve backwards compatibility since glibc needs to build first. For now, only the
problematic nativesdk recipes have been fixed up. For target use, the default
provider remains glibc for now. Assuming this change is merged into upstream glibc,
we will need to roll this change out for the target but we will do this in the next
release cycle when we can better deal with the resulting bugs.

[1] https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt

Original patch from Charles-Antoine Couret <charles-antoine.couret@essensium.com>,
tweaked by RP to add virtual provides, SkipRecipe for libxcrypt and other minor
tweaks.

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@essensium.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agodevtool: Ensure added layer sets LAYERSERIES_COMPAT
Richard Purdie [Sat, 7 Apr 2018 21:32:13 +0000 (22:32 +0100)]
devtool: Ensure added layer sets LAYERSERIES_COMPAT

Now that we see warnings if LAYERSERIES_COMPAT is unset, the auto generated
code from devtool needs to set this to avoid warnings which break
various tests.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agodevtool/oeqa: Ensure added layers set LAYERSERIES_COMPAT
Richard Purdie [Sat, 7 Apr 2018 10:32:03 +0000 (11:32 +0100)]
devtool/oeqa: Ensure added layers set LAYERSERIES_COMPAT

Now that we see warnings if LAYERSERIES_COMPAT is unset, the auto generated
code from devtool/oeqa needs to set this to avoid warnings which break
various tests.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoRevert "python3: fix create_manifest to handle pycache folders"
Richard Purdie [Fri, 6 Apr 2018 09:44:20 +0000 (10:44 +0100)]
Revert "python3: fix create_manifest to handle pycache folders"

Alejandro asked this be reverted as the patch causes more problems
than it solves.

This reverts commit 5d288d286e0adb221649d896c132a607ecddc490.

7 years agoperl: add patch to solve libcrypt incompatibility
Charles-Antoine Couret [Fri, 6 Apr 2018 12:53:54 +0000 (14:53 +0200)]
perl: add patch to solve libcrypt incompatibility

Add Perl's patch submitted to upstream to be compiled along with glibc with libcrypt split.

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@essensium.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agohello-mod_0.1.bb: add RPROVIDES
Juro Bystricky [Thu, 5 Apr 2018 23:11:27 +0000 (16:11 -0700)]
hello-mod_0.1.bb: add RPROVIDES

Although the package will get an automatic prefix "kernel-module", so
the package kernel-module-hello does exist, populating rootfs can
generate an error:
  - nothing provides kernel-module-hello ...

This is quite unfortunate, as this recipe is used as a sample.

Adding RPROVIDES_${PN} += "kernel-module-hello" to the recipe fixes
the problem.

[YOCTO #12641]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>