]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/log
thirdparty/openembedded/openembedded-core.git
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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.

6 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>
6 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>
6 years agocrosstap: replace script with new python based implementation
Victor Kamensky [Thu, 5 Apr 2018 18:25:30 +0000 (11:25 -0700)] 
crosstap: replace script with new python based implementation

New crosstap python implementation is total replacement for
crosstap shell script, that has superseding capabilities.
New script support cross compiling of SystemTap scripts
for user-land, by using supplied image rootfs. Whereas old
script could only deal with scripts against kernel. New script
has more complex logic and additional capabilities.

As invocation interface new script support old "legacy"
mode and provides alternative new regular options interface
to access additional functionality.

Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosystemtap: support --sysroot option in variety of situations in cross build
Victor Kamensky [Thu, 5 Apr 2018 18:25:28 +0000 (11:25 -0700)] 
systemtap: support --sysroot option in variety of situations in cross build

For details on issues fixed please look at commit message of individual
patches.

Upstream-Status: Backport [systemtap@sourceware.org]
Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosystemtap: create translator packageconfig
Victor Kamensky [Thu, 5 Apr 2018 18:25:29 +0000 (11:25 -0700)] 
systemtap: create translator packageconfig

For cases when systemap module compilation happens on host in
cross-compilation mode, and it is desirable to minimize systemtap
presense on target we need to have just smallest possible set of
utilties that are required to run compiled modules.

Introduce new "translator" PACKAGECONFIG, if it is not set
it would mean that just minimal set of run-time utilities will
be included in the package.

For run-time only systemtap build variant use
PACKAGECONFIG_pn-systemtap = "" or
PACKAGECONFIG_pn-systemtap = "monitor"

Suggested-by: Taras Kondratiuk <takondra@cisco.com>
Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoimage: add image-combined-dbg helper class
Victor Kamensky [Thu, 5 Apr 2018 18:25:26 +0000 (11:25 -0700)] 
image: add image-combined-dbg helper class

There is IMAGE_GEN_DEBUGFS="1" variable that enables build of
additional rootfs-dbg and additional archive that contains
complimentary symbols files for a given image. But the issue
with this resulting directory and tarball that before use it
has to be combined with original image content. It is required
since all cross debugging tools like gdb, perf, and systemtap
need file system that contains both target executables/libraries
and their symbols. Those tools need to find executable/library
first and through it debuglink note find corresponding symbols
file.

image-combined-dbg when added to USER_CLASSES just copies
final resulting rootfs back into rootfs-dbg creating combined
target and debug symbols rootfs that can be used for debugging
directly.

Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoRevert "systemtap: Cross compilation fix"
Victor Kamensky [Thu, 5 Apr 2018 18:25:27 +0000 (11:25 -0700)] 
Revert "systemtap: Cross compilation fix"

This reverts commit 787bed708676fc04aee2850825e803273152f657.

Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agocurl: DEPENDS on libidn2 (not libidn)
André Draszik [Thu, 5 Apr 2018 11:08:58 +0000 (12:08 +0100)] 
curl: DEPENDS on libidn2 (not libidn)

Since v7.51.0, libidn2 is the only available option, libidn
support was dropped.
The configure option was renamed as of v7.53.0

Therefore, curl unconditionally tries to build against libidn2,
which in particular is a problem for curl-native, as that might
or might not build against the build-machine's libidn2 now,
which furthermore causes problems when trying to share sstate
between multiple build machines.

We therefore see the following in the config log:
    ...
    checking whether to build with libidn2... (assumed) yes
    ...
    checking for libidn2 options with pkg-config... no
    configure: IDN_LIBS: "-lidn2"
    configure: IDN_LDFLAGS: ""
    configure: IDN_CPPFLAGS: ""
    configure: IDN_DIR: ""
    checking if idn2_lookup_ul can be linked... yes
    checking idn2.h usability... yes
    checking idn2.h presence... yes
    checking for idn2.h... yes
    ...
      IDN support:      enabled (libidn2)
    ...
even though this recipe tries to disable that.

While libidn2 isn't available in OE, this change at least:
* prevents curl-native to silently build against libidn2 if
  that is installed on build machine, even if not requested
* alerts people who use the PACKAGECONFIG option that it's
  not actually doing what they intend to do

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopackagegroup-core-sdk: update sanitizer lists
Dan McGregor [Wed, 4 Apr 2018 16:16:30 +0000 (10:16 -0600)] 
packagegroup-core-sdk: update sanitizer lists

aarch64 has been supported since GCC 5.1, sparc has been supported
since 4.9, and S390 since 7.1.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agogcc-sanitizers: Update supported architectures
Dan McGregor [Wed, 4 Apr 2018 16:08:49 +0000 (10:08 -0600)] 
gcc-sanitizers: Update supported architectures

aarch64 has been supported since GCC 5.1, sparc has been supported
since 4.9, and S390 since 7.1.

Also mark as broken entirely with musl.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolayer.conf: Update LAYERSERIES rocko -> sumo
Richard Purdie [Fri, 6 Apr 2018 10:00:10 +0000 (11:00 +0100)] 
layer.conf: Update LAYERSERIES rocko -> sumo

Also set LAYERSERIES_COMPAT for core (we're compatible with ourself).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agomesa: Update to use llvm 6.0
Richard Purdie [Wed, 4 Apr 2018 15:34:41 +0000 (16:34 +0100)] 
mesa: Update to use llvm 6.0

Adpat to the upgrade from 5.0 -> 6.0.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agollvm: Upgrade to 6.0 release
Khem Raj [Sun, 1 Apr 2018 07:19:46 +0000 (00:19 -0700)] 
llvm: Upgrade to 6.0 release

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibrsvg: remove duplication in inherit
Maxin B. John [Wed, 4 Apr 2018 13:40:38 +0000 (16:40 +0300)] 
librsvg: remove duplication in inherit

Since gnomebase class already inherits autotools and pkgconfig,
there is no need to repeat it here.

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agogcr: remove duplication in inherit
Maxin B. John [Wed, 4 Apr 2018 13:40:37 +0000 (16:40 +0300)] 
gcr: remove duplication in inherit

Since gnomebase class already inherits autotools,
there is no need to repeat it here.

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibcroco: remove duplication in inherit
Maxin B. John [Wed, 4 Apr 2018 13:40:36 +0000 (16:40 +0300)] 
libcroco: remove duplication in inherit

Since gnomebase class already inherits autotools and pkgconfig,
there is no need to repeat it here.

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopython3-pygobject: remove duplication in inherit
Maxin B. John [Wed, 4 Apr 2018 13:40:35 +0000 (16:40 +0300)] 
python3-pygobject: remove duplication in inherit

Since gnomebase class already inherits autotools and pkgconfig,
there is no need to repeat it here.

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agodocumentation.conf: remove obsolete variable
Maxin B. John [Wed, 4 Apr 2018 13:40:34 +0000 (16:40 +0300)] 
documentation.conf: remove obsolete variable

PRINC is no longer used and removed from documentation:

commit 7baadd86ee1386756e3bc3ef7fd02d5d1367068f
Author: Scott Rifenbark <scott.m.rifenbark@intel.com>
Date:   Mon May 18 09:25:51 2015 -0600

 ref-manual: Removed PRINC entry from the glossary

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoarchiver: Fix archive for linked kernel source
Tom Hochstein [Tue, 3 Apr 2018 13:51:15 +0000 (08:51 -0500)] 
archiver: Fix archive for linked kernel source

When archiving a kernel, if S is ${WORKDIR}/git, then
${WORKDIR}/git is in fact a soft link into work-shared,
and the archive contains just the soft link. Fix by
archiving the real directory.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoarchiver: Fix build errors for kernels that don't use kernel-yocto.bbclass
Tom Hochstein [Tue, 3 Apr 2018 13:51:14 +0000 (08:51 -0500)] 
archiver: Fix build errors for kernels that don't use kernel-yocto.bbclass

Special handling for kernel source in work-shared was
incorrectly limited to kernel-yocto.bbclass instead
of kernel.bbclass.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglib-2.0/glib.inc: apply MLPREFIX renaming to all package classes
Alexander Kanavin [Tue, 3 Apr 2018 15:45:24 +0000 (18:45 +0300)] 
glib-2.0/glib.inc: apply MLPREFIX renaming to all package classes

Now that we have postinst intercept execution working for SDK generation,
adding MLPREFIX again makes sense in all cases, as the intercepts do require
that it is there.

This reverts commit 4ffb728df4bdf21daef31d89cfa5771eaf0d90f8.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agogio-module-cache.bbclass: pass in ${libexecdir}
Alexander Kanavin [Tue, 3 Apr 2018 15:45:23 +0000 (18:45 +0300)] 
gio-module-cache.bbclass: pass in ${libexecdir}

When it was something else than /usr/libexec (e.g. when
installing native SDK packages), things broke down.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosdk.py: run postinst intercepts
Alexander Kanavin [Tue, 3 Apr 2018 15:45:22 +0000 (18:45 +0300)] 
sdk.py: run postinst intercepts

Previously this wasn't done, and so any packages installed from
populate_sdk would not have the postinsts fully executed
(particularly generation of various caches via running nativesdk or target
binaries with qemu wasn't working).

[YOCTO #12630]

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopackage_manager.py: do not hardcode the task name when referring to log files
Alexander Kanavin [Tue, 3 Apr 2018 15:45:21 +0000 (18:45 +0300)] 
package_manager.py: do not hardcode the task name when referring to log files

This can be do_rootfs or do_populate_sdk, or anything else.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopackage_manager.py: move intercept running logic from rootfs class to PackageManager...
Alexander Kanavin [Tue, 3 Apr 2018 15:45:20 +0000 (18:45 +0300)] 
package_manager.py: move intercept running logic from rootfs class to PackageManager class

This allows running the intercepts when creating SDKs, which previously
wasn't possible, as SDK code does not use the rootfs class, and calls
into PackageManager methods directly.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopackage_manager.py: move postinst_intercept dir initialization from RootFS to Package...
Alexander Kanavin [Tue, 3 Apr 2018 15:45:19 +0000 (18:45 +0300)] 
package_manager.py: move postinst_intercept dir initialization from RootFS to PackageManager class

This will allow handling postinst_intercepts when populating SDKs (which
use PackageManager class directly, and do not utilize RootFS class).

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopackage_manager.py: move target_rootfs property to common ancestor class
Alexander Kanavin [Tue, 3 Apr 2018 15:45:18 +0000 (18:45 +0300)] 
package_manager.py: move target_rootfs property to common ancestor class

This will be useful when also moving postinst_intercept handling to
package manager class from rootfs class.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agonativesdk-postinst-intercept: remove the recipe
Alexander Kanavin [Tue, 3 Apr 2018 15:45:17 +0000 (18:45 +0300)] 
nativesdk-postinst-intercept: remove the recipe

Its use required a script from an external repo which hasn't been updated
in 4 years, the recipe itself is out of date (doesn't install all
intercepts), and there is no oe-selftest or documentation for this.
If anyone still wants this, please do it in a separate layer.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoelfutils: Clean up comments
Peter Kjellerstedt [Tue, 3 Apr 2018 17:03:46 +0000 (19:03 +0200)] 
elfutils: Clean up comments

The list of patches in SRC_URI was restructured in 49aae1d7, and left
a comment about patches from Debian hanging without context. Move and
reword it to make it remain useful.

There was also a leftover comment that referred to two .h files and
do_configure_prepend() that were removed in f960c026.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopackage_manager.py: Skip gpgcheck while using dnf on target
Manjukumar Matha [Tue, 3 Apr 2018 20:35:04 +0000 (13:35 -0700)] 
package_manager.py: Skip gpgcheck while using dnf on target

By default, RPM_SIGN_PACKAGES is not defined. Add gpgcheck=0 to
oe-remote-repo.repo file, otherwise dnf will complain during
install operation on target

Note, RPM_SIGN_PACKAGES is set only when you inherit sign_rpm explicitly

Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agomesa: Upgrade 17.3.7 -> 17.3.8
Otavio Salvador [Tue, 3 Apr 2018 21:01:46 +0000 (18:01 -0300)] 
mesa: Upgrade 17.3.7 -> 17.3.8

This version has been published at April 03, 2018, and it is a bugfix
only release.

The release includes several important fixes that were made as part of
18.0.1 development cycle. Full list of bug fixes can be see online at:

  https://www.mesa3d.org/relnotes/17.3.8.html

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobase.bbclass: fix do_unpack[cleandirs] varflag handling
Enrico Jorns [Sat, 20 Jan 2018 23:44:41 +0000 (00:44 +0100)] 
base.bbclass: fix do_unpack[cleandirs] varflag handling

As introduced by a56fb90dc3805494eeaf04c60538425e8d52efc5 ('base.bbclass
wipe ${S} before unpacking source') the base.bbclass uses a python
anonymous function to set the 'do_unpack' varflag 'cleandirs' to either
'${S}' or '${S}/patches' depending on equality of '${S}' and '${WORKDIR}'.

Not that this only differs from the way almost all other recipes set or
modify a tasks 'cleandirs' flag, it also has a significant impact on the
kernel.bbclass (and possibly further ones) and causes incorrect
behavior for rebuilds triggered by source modification, e.g. by a change
of the defconfig file for a kernel build.

The kernel.bbclass tries to extend do_unpack[cleandirs]:

| do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"

As python anonymous functions are evaluated at the very end of recipe
parsing, the d.setVarFlag('do_unpack', 'cleandirs', '${S}') statement in
base.bbclass will overwrite every modification to cleandirs that is done
as shown for the kernel class above.

As a result of this, a change to a kernels 'defconfig' will lead to an
updated defconfig file in ${WORKDIR}, but as ${B} never gets cleaned and
${B}/.config still exists, it will not be copied to ${B}/.config and
thus not find its way in the build kernel.

This is a severe issue for the kernel development and build process!

This patch changes setting of the cleandirs varflag in base.bbclass to
a simple variable assignment as almost all other recipes do it. This now
again allows overwriting or appending the varflag with common methods
such as done in kernel.bbclass.

This issue affects morty, pyro, rocko and master.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoclasses/externalsrc: ensure cleandirs code handles non-absolute paths
Paul Eggleton [Wed, 4 Apr 2018 11:02:36 +0000 (23:02 +1200)] 
classes/externalsrc: ensure cleandirs code handles non-absolute paths

It's possible that a trailing or extra slash somewhere in the external
source path could result in the directory not being removed from
cleandirs; it's also possible that a cleandirs entry is somewhere
underneath the source tree and that tree should never have parts of it
deleted by the build system. Use oe.path.is_path_parent() (which makes
paths absolute before checking them) to find out if any path in
cleandirs is anywhere underneath the external source path, and drop it
if it is.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>