]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
6 years agoopenssl: update 1.1.0h -> 1.1.0i
Andrej Valek [Thu, 16 Aug 2018 12:27:57 +0000 (14:27 +0200)]
openssl: update 1.1.0h -> 1.1.0i

Please see this security advisory:
https://www.openssl.org/news/secadv/20180612.txt

Remove obsolete patch.

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoopenssl: update 1.0.2o -> 1.0.2p
Andrej Valek [Thu, 16 Aug 2018 12:27:56 +0000 (14:27 +0200)]
openssl: update 1.0.2o -> 1.0.2p

Please see this security advisory:
https://www.openssl.org/news/secadv/20180612.txt

Refresh patches

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agovala: refresh patch
Maxin B. John [Thu, 16 Aug 2018 10:41:30 +0000 (13:41 +0300)]
vala: refresh patch

Refresh the following patch:
"disable-graphviz.patch" to fix this warning:

Some of the context lines in patches were ignored. This can lead to
incorrectly applied patches.
The context lines in the patches can be updated with devtool:

    devtool modify <recipe>
    devtool finish --force-patch-refresh <recipe> <layer_path>

Then the updated patches and the source tree (in devtool's workspace)
should be reviewed to make sure the patches apply in the correct place
and don't introduce duplicate lines (which can, and does happen
when some of the context is ignored). Further information:
http://lists.openembedded.org/pipermail/openembedded-core/2018-March/148675.html
https://bugzilla.yoctoproject.org/show_bug.cgi?id=10450
Details:
        checking file configure.ac
        checking file libvaladoc/Makefile.am
        checking file libvaladoc/html/basicdoclet.vala
        checking file libvaladoc/html/htmlmarkupwriter.vala
        Hunk #1 succeeded at 51 with fuzz 1 (offset 8 lines).

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglibc: re-package for libnss-db
Chen Qi [Thu, 16 Aug 2018 10:37:58 +0000 (18:37 +0800)]
glibc: re-package for libnss-db

On other distros like ubuntu/centos, libnss-db usually provides:
- The libraries
- The Makefile to create database
  (in /var/db for centos, /var/lib/misc/ for ubuntu)
- The makedb command (it's in glibc-common for centos7)

What we had is:
- The libraries are in glibc-extra-nss
- The Makefile is removed
- The makedb command is in glibc-utils (lack of dependency)

So when glibc-extra-nss is installed but glibc-utils is not,
we see error like:
nscd[165]: 165 checking for monitored file `/var/db/group.db': No such file or directory
nscd[165]: 165 checking for monitored file `/var/db/passwd.db': No such file or directory

And there is not an easy way to create these databases.

To fix the issue:
- Re-package the libraries into libnss-db
- Don't remove the Makefile and add it in libnss-db
- Add RDEPENDS for libnss-db on glibc-utils
- Provide a shell script, makedbs.sh, to generate the db files.
  This is to avoid dependency on 'make'.

Notes:
1. For external toolchain, an extra package 'libnss-db' need to be provided
   If replacing glibc from core.
2. I've check the git history of nss/db-Makefile, the last two functionality
   fix is as below.
   - fix non-portable `echo -n` usage   --  Date:   Thu Aug 6 04:14:20 2015 -0400
   - Fix db makefile rule for group.db  --  Date:   Fri Nov 11 14:43:36 2011 +0100
   So I think this file is stable enough. And using makedbs.sh which is crafted according
   to that file is not likely to cause maintanence problem.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoruntime selftest: limit kernel hw bp arches
Hongzhi.Song [Thu, 16 Aug 2018 07:38:48 +0000 (00:38 -0700)]
runtime selftest: limit kernel hw bp arches

1. So far, only qemux86[-64] support hw breakpoint, no matter whether or
not with kvm.

qemuppc: The oe-core configuration uses a PPC G4 system as the
default cpu but qemu doesn't simulate the hw breakpoint register for G4.

qemuarm: The arch more than v7 supports hw breakpoint, however arm use
v5 as default.

qemuarm64: We temporarily drop qemuarm64 for the moment. Normally it
will print debug info once, but endlessly when we trigger the break
point. Now it is hard to located the issue, but we will confirm it
later.

qemumips*: Kernel dosen't support hw bp for mips.

2. Syslog maybe not started, so we use dmesg to confirm.

3. Running 'ls' to trigger the hardware breakpoint test.

Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoruntime selftest: test_trace_events_sample of ksample.py
Hongzhi.Song [Thu, 16 Aug 2018 07:38:47 +0000 (00:38 -0700)]
runtime selftest: test_trace_events_sample of ksample.py

The debug info can not be written to trace buffer immediately
by thread. So we should sleep some seconds.

Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopython3: enable profile optimized builds
Anuj Mittal [Thu, 16 Aug 2018 06:26:33 +0000 (14:26 +0800)]
python3: enable profile optimized builds

Enable profile guided optimization (pgo) for python3. Enabling pgo in
python is generally as simple as invoking the target profile-opt which:

- builds python binaries with profile instrumentation enabled,
- runs a specific profile task using that python to get the profile
data and,
- feeds the compiler with this profile data and rebuilds python.

This change invokes qemu-user for the second step of running a profile
task using target python. Depending on how long profile task takes to
run, this might add a significant time to compilation (which would be
true for native builds too). The default profile task can be changed by
the users depending on what makes sense for their use case (or can be
left empty). In case qemu-user isn't supported, profile task won't be run.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoqemu: Upgrade QEMU 2.12 -> 3.0
Alistair Francis [Wed, 15 Aug 2018 22:25:19 +0000 (15:25 -0700)]
qemu: Upgrade QEMU 2.12 -> 3.0

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopiglit: Upgrade to version from 2018-08-13
Khem Raj [Thu, 16 Aug 2018 04:21:11 +0000 (21:21 -0700)]
piglit: Upgrade to version from 2018-08-13

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agollvm: Update to 6.0.1
Khem Raj [Thu, 16 Aug 2018 04:12:00 +0000 (21:12 -0700)]
llvm: Update to 6.0.1

Drop upstreamed patch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibvorbis: 3 CVE fixes
Joe Slater [Wed, 15 Aug 2018 23:13:26 +0000 (16:13 -0700)]
libvorbis: 3 CVE fixes

CVE-2017-14160, CVE-2018-10393 (same as 14160), and CVE-2018-10392.
These fixes should be in libvorbis 1.3.7.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agore2c: Update to 1.0.1
Khem Raj [Wed, 15 Aug 2018 21:51:50 +0000 (14:51 -0700)]
re2c: Update to 1.0.1

Drop upstreamed patch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agompfr: Upgrade to 4.0.1
Khem Raj [Wed, 15 Aug 2018 21:51:49 +0000 (14:51 -0700)]
mpfr: Upgrade to 4.0.1

Drop patch present in 4.0.1 already
Depend on autoconf-archive to fix

| configure:14652: error: possibly undefined macro: AX_PTHREAD

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosstate: Avoid indirect bison-native dependencies (via SSTATE_EXCLUDEDEPS_SYSROOT)
André Draszik [Tue, 22 May 2018 12:25:53 +0000 (13:25 +0100)]
sstate: Avoid indirect bison-native dependencies (via SSTATE_EXCLUDEDEPS_SYSROOT)

Avoid adding bison-native to the sysroot without a specific
dependency in the recipe. This means indirect dependencies
(e.g. X -> Y -> binutils-cross -> bison-native) no longer meet the
dependency incidentally. This improves determinism and avoids build
failures when people switch to external toolchains.

Based on an idea by Richard Purdie:
    http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146324.html

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglibc-initial: Add missing bison-native dependency
Richard Purdie [Thu, 16 Aug 2018 09:06:51 +0000 (10:06 +0100)]
glibc-initial: Add missing bison-native dependency

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoelfutils: check data_list.data.d.d_buf before free it
Robert Yang [Thu, 16 Aug 2018 02:38:22 +0000 (10:38 +0800)]
elfutils: check data_list.data.d.d_buf before free it

[YOCTO #12791]

The one which actually saves the data is data_list.data.d.d_buf, so check it
before free rawdata_base.

This can fix a segmentation fault when prelink libqb_1.0.3:
prelink: /usr/lib/libqb.so.0.18.2: Symbol section index outside of section numbers

The segmentation fault happens when prelink call elf_end().

Fixed:
MACHINE="qemux86-64"
IMAGE_INSTALL_append = " libqb" #libqp is from meta-openembedded
$ bitbake core-image-minimal
Segmention fault

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
6 years agoprelink: use ehdr.e_shstrndx as index rather than ehdr.e_shnum
Robert Yang [Thu, 16 Aug 2018 02:25:46 +0000 (10:25 +0800)]
prelink: use ehdr.e_shstrndx as index rather than ehdr.e_shnum

[YOCTO #12791]

According to struct elf32_hd, the e_shnum is section header number, and the
index is e_shstrndx, not e_shnum.

This can fix segmention fault when handle libqb.so.0.18.2 from libqb_1.0.3.
It fails to handle libqb.so.0.18.2 and get errors:
Symbol section index outside of section numbers

Then segmentation fault, this is because the e_shnum is 34, while e_shstrndx is
27 (it would be 33 when no errors), I've checked several elf files to confirm
that the ones after e_shstrndx is NULL, so use e_shstrndx should be correct.

Fixed:
MACHINE="qemux86-64"
IMAGE_INSTALL_append = " libqb" #libqp is from meta-openembedded
$ bitbake core-image-minimal
Segmention fault

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
6 years agobinutils: Improve check for input file matching output file
Robert Yang [Thu, 16 Aug 2018 02:54:39 +0000 (10:54 +0800)]
binutils: Improve check for input file matching output file

When the assembler reports that the input and output are the same, report the
file names involved, in order to help debugging.  Also do not equate two files
are the same if the have the same inode value but reside on different file
systems.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
6 years agopopulate_sdk_base.bbclass: inherit and use image-postinst-intercepts
Christopher Larson [Fri, 27 Jul 2018 17:24:30 +0000 (22:24 +0500)]
populate_sdk_base.bbclass: inherit and use image-postinst-intercepts

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoimage.bbclass: inherit and use image-postinst-intercepts
Christopher Larson [Fri, 27 Jul 2018 17:24:29 +0000 (22:24 +0500)]
image.bbclass: inherit and use image-postinst-intercepts

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoimage-postinst-intercepts.bbclass: add class
Christopher Larson [Fri, 27 Jul 2018 17:24:28 +0000 (22:24 +0500)]
image-postinst-intercepts.bbclass: add class

This class sets POSTINST_INTERCEPTS and POSTINST_INTERCEPTS_CHECKSUMS,
to allow us to pull intercepts from BBPATH. This is kept as a separate
class, as it's needed by both image construction and sdk construction,
the latter to support meta-toolchain & similar recipes.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooe.package_manager: support loading intercepts from multiple paths
Christopher Larson [Fri, 27 Jul 2018 17:24:27 +0000 (22:24 +0500)]
oe.package_manager: support loading intercepts from multiple paths

- if POSTINST_INTERCEPTS is set, use the listed intercept files, or
- if POSTINST_INTERCEPTS_PATH is set, load from the listed paths, or
- if POSTINST_INTERCEPTS_DIR is set, load from it (for compatibility), or
- load from ${COREBASE}/meta/postinst-intercepts

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoacpica: Add missing DEPENDS on bison-native
Richard Purdie [Wed, 15 Aug 2018 20:42:46 +0000 (21:42 +0100)]
acpica: Add missing DEPENDS on bison-native

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosstate: Optimise SSTATE_EXCLUDEDEPS_SYSROOT handling
Richard Purdie [Wed, 15 Aug 2018 14:30:07 +0000 (14:30 +0000)]
sstate: Optimise SSTATE_EXCLUDEDEPS_SYSROOT handling

Using re.compile() is around six times faster than recompiling the regexp
each time so maintain a cache.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosstate: use SSTATE_EXCLUDEDEPS_SYSROOT for skipping base-passwd|shadow-sysroot recipes
André Draszik [Tue, 22 May 2018 12:25:52 +0000 (13:25 +0100)]
sstate: use SSTATE_EXCLUDEDEPS_SYSROOT for skipping base-passwd|shadow-sysroot recipes

Use the newly introduced SSTATE_EXCLUDEDEPS_SYSROOT for specifying
the base-passwd|shadow-sysroot recipes to be excluded from a recipe sysroot.

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosstate: use SSTATE_EXCLUDEDEPS_SYSROOT for skipping *-initial recipes
André Draszik [Tue, 22 May 2018 12:25:51 +0000 (13:25 +0100)]
sstate: use SSTATE_EXCLUDEDEPS_SYSROOT for skipping *-initial recipes

Use the newly introduced SSTATE_EXCLUDEDEPS_SYSROOT for specifying
the *-initial recipes to be excluded from a recipe sysroot.

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosstate: allow specifying indirect dependencies to exclude from sysroot
André Draszik [Tue, 22 May 2018 12:25:50 +0000 (13:25 +0100)]
sstate: allow specifying indirect dependencies to exclude from sysroot

Currently, a dependency on any -native recipe will pull in
all dependencies of that -native recipe in the recipe
sysroot. This behaviour might not always be wanted, e.g.
when that -native recipe depends on build-tools that are
not relevant for the current recipe.

This change adds a SSTATE_EXCLUDEDEPS_SYSROOT variable,
which will be evaluated for such recursive dependencies to
be excluded. The idea is similar to
   http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146324.html
except that the list is not hard-coded anymore.

SSTATE_EXCLUDEDEPS_SYSROOT is evaluated as two regular
expressions of recipe and dependency to ignore, e.g. in
the above flex-native / bison-native use-case, one would
specify

    SSTATE_EXCLUDEDEPS_SYSROOT = ".*->(flex|bison)-native"

in layer.conf.

The existing special handling of "-initial" as well as
"base-passwd" and "shadow-sysroot" could also be
streamlined:

    SSTATE_EXCLUDEDEPS_SYSROOT += "\
        .*->.*-initial.* \
        .*(base-passwd|shadow-sysroot)->.* \
    "

Another anticipated user is meta-java, where certain newer
JDKs can only be bootstrapped (built) using older JDKs,
but it doesn't make much sense to copy all those older
JDKs and their own build tools (ant, etc.) into the
sysroot of recipes wanting to be built using the newer JDK
(only), e.g.:

    SSTATE_EXCLUDEDEPS_SYSROOT += "\
        openjdk-8-native->(ant-native|attr-native|coreutils-native|icedtea7-native|libxslt-native|make-native|openssl-native|zip-native|unzip-native) \
    "

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosecurity_flags: Add PIC to cflags for some recipes on ppc
Khem Raj [Wed, 15 Aug 2018 01:40:05 +0000 (18:40 -0700)]
security_flags: Add PIC to cflags for some recipes on ppc

Fixes issues related out of range R_PPC_REL24
e.g.
/usr/lib/xorg/modules/input/libinput_drv.so: /usr/lib/libinput.so.10: R_PPC_REL24 relocation at 0x0e8602c4 for symbol `libevdev_has_event_code' out of range

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibdrm: Upgrade to 2.4.93
Khem Raj [Wed, 15 Aug 2018 01:40:04 +0000 (18:40 -0700)]
libdrm: Upgrade to 2.4.93

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoopenssl-1.1: /etc/ssl location compatibility
Andrej Valek [Tue, 17 Jul 2018 09:10:35 +0000 (11:10 +0200)]
openssl-1.1: /etc/ssl location compatibility

Some packages have hard-coded path to /etc/ssl location.
Create a symlinks to correct location.

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Marko Peter <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoopenssl-1.1: rework packaging
Andrej Valek [Tue, 17 Jul 2018 09:10:34 +0000 (11:10 +0200)]
openssl-1.1: rework packaging

The main idea is to have libssl and libcrypto in separate packages.
This saves space if only single library is needed and also some recipes
(in other layers) depend on these library packages.
Together with this other packages like in 1.0.x were created.
The only difference is that openssl 1.1 has additional package openssl-bin.

Add missing dependency to perl for openssl-bin pkg, c_rehash requires it.

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Marko Peter <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoopenssl-1.1: fix c_rehash perl errors
Andrej Valek [Tue, 17 Jul 2018 09:10:33 +0000 (11:10 +0200)]
openssl-1.1: fix c_rehash perl errors

Patch original c_rehash script with Debian patch instead
of overriding it with own version.

Error output from c_reshah without patching:
  Unknown regexp modifier "/b" at ./c_rehash line 15, at end of line
  Unknown regexp modifier "/W" at ./c_rehash line 28, at end of line
  Unknown regexp modifier "/3" at ./c_rehash line 28, at end of line
  Unknown regexp modifier "/2" at ./c_rehash line 28, at end of line
  No such class installdir at ./c_rehash line 63, near "Prefix our
  installdir"
    (Might be a runaway multi-line // string starting on line 28)
  syntax error at ./c_rehash line 63, near "Prefix our installdir"
  Can't redeclare "my" in "my" at ./c_rehash line 68, near ""
  Execution of ./c_rehash aborted due to compilation errors.

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Marko Peter <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agocve-check.bbclass: do not download the CVE DB in package-specific tasks
Konstantin Shemyak [Mon, 13 Aug 2018 07:23:28 +0000 (10:23 +0300)]
cve-check.bbclass: do not download the CVE DB in package-specific tasks

Disable downloading of the vulnerability DB in do_check_cves() task.

When invoked in this task, cve-check-tool attempts re-download of the CVE DB
if the latter is older than certain threshold. While reasonable for a
stand-alone CVE checker, this behavior can cause errors in parallel builds
if the build time is longer than this threshold:
* Other tasks might be using the DB.
* Several packages can start the download of the same file at the same time.

This check is not really needed, as the DB has been downloaded by
cve_check_tool:do_populate_cve_db() which is a prerequisite of any do_build().
The DB will be at most (threshold + build_time) old.

Signed-off-by: Konstantin Shemyak <konstantin.shemyak@ge.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoimage: Use ${COREBASE}/meta for timestamp, fallback to bitbake.conf
Alex Kiernan [Fri, 20 Jul 2018 04:33:17 +0000 (04:33 +0000)]
image: Use ${COREBASE}/meta for timestamp, fallback to bitbake.conf

To handle the case where ${COREBASE} isn't the git directory, avoid
erroring out when the git command fails. If we don't have a timestamp
after this, fall back to the timestamp from conf/bitbake.conf.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopackage.bbclass: improve -dbg and -src package ordering
Rasmus Villemoes [Wed, 11 Jul 2018 11:38:56 +0000 (13:38 +0200)]
package.bbclass: improve -dbg and -src package ordering

nativesdk-gpgme fails package_qa when setting PACKAGE_DEBUG_SPLIT_STYLE
= "debug-with-srcpkg".

ERROR: nativesdk-gpgme-1.10.0-r0 do_package_qa: QA Issue: non debug package contains .debug directory: nativesdk-python3-gpg path /work/x86_64-nativesdk-oesdk-linux/nativesdk-gpgme/1.10.0-r0/packages-split/nativesdk-python3-gpg/usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/python3.5/site-packages/gpg/.debug/_gpgme.cpython-35m-x86_64-linux-gnu.so [debug-files]

This turns out to be because the automatic moving of the -dbg package to
the beginning of the package list is disabled in that case, so the
python3-gpg packages that the recipe prepends to PACKAGES ends up before
the -dbg package.

It's not clear why the "and not split_source_package" was added when
debug-with-srcpkg was introduced. Presumably the intention was to
prevent the -dbg package to end up before the -src package, which we of
course need to. But at the same time, we still need -dbg packages to end
up before all other packages.

Using list.insert(0, ...) also means that if there happens to more than
one -dbg package, their relative ordering gets inverted in the new list.

This tries to fix these issues by sorting the packages by (priority,
original position), where priority is 10 for -src, 30 for -dbg and 50
for everything else. That guarantees that packages of the same "type"
preserve their relative ordering, while also ensuring that -dbg always
preceed other packages. This scheme is also quite extensible, and,
should the need arise, one could even expose the priorities as a knob
the recipe author could use to ensure specific orderings of packages
instead of the somewhat fragile and coarse-grained method of "prepend or
append, and ensure you do that in a proper order".

Probably the autodebug condition needs to stay, but I think the
split_source_package condition in the preceding elif should be removed,
so that that logic applies to all packages called -src, not just the one
we might have created a few lines above.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoweston: add dependency on virtual/libgbm for kms PACKAGECONFIG
Martin Jansa [Tue, 14 Aug 2018 10:53:11 +0000 (10:53 +0000)]
weston: add dependency on virtual/libgbm for kms PACKAGECONFIG

* gbm is checked in configure.ac:

AC_ARG_ENABLE(drm-compositor, [  --enable-drm-compositor],,
              enable_drm_compositor=yes)
AM_CONDITIONAL(ENABLE_DRM_COMPOSITOR, test x$enable_drm_compositor = xyes)
if test x$enable_drm_compositor = xyes; then
  AC_DEFINE([BUILD_DRM_COMPOSITOR], [1], [Build the DRM compositor])
  PKG_CHECK_MODULES(DRM_COMPOSITOR, [libudev >= 136 libdrm >= 2.4.30 gbm mtdev >= 1.1.0])
  PKG_CHECK_MODULES(DRM_COMPOSITOR_GBM, [gbm >= 10.2],
                    [AC_DEFINE([HAVE_GBM_FD_IMPORT], 1, [gbm supports dmabuf import])],
                    [AC_MSG_WARN([gbm does not support dmabuf import, will omit that capability])])
fi

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoswig: fix gcc8 warnings for cast between incompatible function types
Yi Zhao [Wed, 15 Aug 2018 05:20:36 +0000 (13:20 +0800)]
swig: fix gcc8 warnings for cast between incompatible function types

We got an error when building setools in meta-selinux:
setools/policyrep/qpol_wrap.c:1819:23:
error: cast between incompatible function types from 'PyObject * (*)(PyObject *)'
{aka 'struct _object * (*)(struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject *)'
{aka 'struct _object * (*)(struct _object *, struct _object *)'} [-Werror=cast-function-type]
{(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},

This is a swig issue. See: https://github.com/swig/swig/issues/1259
Backport a patch from upstream to fix it.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agowic: bootimg-partition: Add support to create the u-boot boot config file
Kevin Hao [Tue, 14 Aug 2018 01:31:24 +0000 (09:31 +0800)]
wic: bootimg-partition: Add support to create the u-boot boot config file

By leveraging the distro boot command feature in the u-boot, we can
compose the corresponding extlinux.conf when creating the wic image,
and let u-boot boot the kernel automatically. For more detail about
the u-boot distro boot command feature, please see doc/README.distro
in u-boot source files.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agowic: bootimg-partition: Add do_configure_partition() method
Kevin Hao [Tue, 14 Aug 2018 01:31:23 +0000 (09:31 +0800)]
wic: bootimg-partition: Add do_configure_partition() method

We want to add some u-boot specific config file. Before doing this,
we need know what files will be installed into this partition. So
move the codes about parsing the IMAGE_BOOT_FILES into
do_configure_partition(). No function change.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agowic: bootimg-partition: Use the relative path in the install_task
Kevin Hao [Tue, 14 Aug 2018 01:31:22 +0000 (09:31 +0800)]
wic: bootimg-partition: Use the relative path in the install_task

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agowic: Remove the unused variable Partition.sourceparams_dict
Kevin Hao [Tue, 14 Aug 2018 01:31:21 +0000 (09:31 +0800)]
wic: Remove the unused variable Partition.sourceparams_dict

We choose to pass the source parameters to the source plugins' hooks
via a local variable srcparams_dict. So the Partition.sourceparams_dict
is not used by anyone and seems pretty confused. So drop it.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopackage_manager: Add definitions for riscv machines
Richard Purdie [Wed, 15 Aug 2018 08:34:55 +0000 (09:34 +0100)]
package_manager: Add definitions for riscv machines

Add definitions to the locale table for riscv architecture.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosystemd: fixes for the compatibility interface
Andrej Valek [Tue, 14 Aug 2018 10:21:19 +0000 (12:21 +0200)]
systemd: fixes for the compatibility interface

Use a heap allocated string to set arg_ifname, since a stack allocated
one would be lost after the function returns. (This last one broke the
case where an interface name was suffixed with a dot, such as in
`resolvconf -a tap0.dhcp`.)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Simon Ausserlechner <simon.ausserlechner@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolinux-firmware: package Marvel usb 8997 firmware
Joshua Watt [Tue, 14 Aug 2018 20:01:51 +0000 (15:01 -0500)]
linux-firmware: package Marvel usb 8997 firmware

Add package for the firmware required by the Marvell 8997 chipset when
connected over USB.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibunwind: Fix build with musl+security flags
Khem Raj [Tue, 14 Aug 2018 19:21:34 +0000 (12:21 -0700)]
libunwind: Fix build with musl+security flags

Fixes
src/os-linux.c:63: undefined reference to `__stack_chk_fail_local'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agomeson: Support building allarch recipes again
Peter Kjellerstedt [Tue, 14 Aug 2018 19:06:24 +0000 (21:06 +0200)]
meson: Support building allarch recipes again

This registers "allarch" as a known CPU family.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agomeson: Split validate-cpu.patch in three
Peter Kjellerstedt [Tue, 14 Aug 2018 19:06:23 +0000 (21:06 +0200)]
meson: Split validate-cpu.patch in three

This makes it more suitable to work with, e.g., devtool. It also
prepares for the update to 0.47.0 when the first patch will no longer be
needed (as it is a backport).

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoeglinfo: Fix build with raspberrypi with userland graphics driver
Khem Raj [Tue, 14 Aug 2018 16:32:43 +0000 (09:32 -0700)]
eglinfo: Fix build with raspberrypi with userland graphics driver

Let pkgconfig figure out headers and libraries instead of manually
forcing waf to do it.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agomusl: Fix dirent struct alignment issue seen on armv5te
Khem Raj [Tue, 14 Aug 2018 16:32:42 +0000 (09:32 -0700)]
musl: Fix dirent struct alignment issue seen on armv5te

- its a general problem however observed on armv5te based boards in OE
  other arches either have ways to compensate for misaligned access in hardware
  or compiler does not use 8byte alignment

- fix internal linux headers

Full logs
https://git.musl-libc.org/cgit/musl/log/?qt=range&q=9cad27a3dc1a4eb349b6591e4dc8cc89dce32277..1ad8138819ced49851e618c9c063aa0ffc86718c

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agorunqemu: exit gracefully with an error message if qemu system is not evaluated
Jagadeesh Krishnanjanappa [Tue, 14 Aug 2018 14:35:29 +0000 (20:05 +0530)]
runqemu: exit gracefully with an error message if qemu system is not evaluated

It solves below error:
-- snip --
return 'qemu-system-%s' % qbsys
UnboundLocalError: local variable 'qbsys' referenced before assignment
-- snip --

[YOCTO #12846]

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopcmciautils: remove from oe-core
Ross Burton [Tue, 14 Aug 2018 13:09:28 +0000 (14:09 +0100)]
pcmciautils: remove from oe-core

PCMCIA is pretty rare these days, so now that the recipe is in meta-oe we can
remove it from oe-core.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agomesa: Disble TLS for musl
Khem Raj [Tue, 14 Aug 2018 18:34:40 +0000 (11:34 -0700)]
mesa: Disble TLS for musl

See https://bugs.freedesktop.org/show_bug.cgi?id=35268
mesa should infact stop using __attribute__((tls_model("initial-exec")))
until then we disale TLS in glx for musl
The problem could happen even on glibc if static TLS sizes are large enough
which would mean that additional space the glibc leaves for such rogue libraries
get consumed and then same problems show up there as well

Fixes errors seen in xorg logs e.g.

(EE) Failed to load /usr/lib/xorg/modules/extensions/libglx.so: Error relocating /usr/lib/libGL.so.1: _ITM_deregisterTMCloneTable: initial-exec TLS resolves to dynamic definition in /usr/lib/libGL.so.1

enable readonly text segment on x86 for musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoselftest/package: Improve test to cover sparseness and hardlinking from sstate
Richard Purdie [Tue, 14 Aug 2018 17:24:14 +0000 (17:24 +0000)]
selftest/package: Improve test to cover sparseness and hardlinking from sstate

The sparseness test was sometimes working and sometimes failing depending
on whether sstate was valid. This adds an explict test of sstate
to the test for both hardlinking and sparseness. Tweak the test name to
cover the fact its tests sparseness too.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosstate/lib.oe.path: Ensure file sparseness is preserved
Richard Purdie [Tue, 14 Aug 2018 17:23:10 +0000 (17:23 +0000)]
sstate/lib.oe.path: Ensure file sparseness is preserved

Files when restored from sstate were missing their sparseness. Fix up various
functions to preserve this and make things more deterministic.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoselftest: Replace bitbake -p with bitbake -e
Richard Purdie [Tue, 14 Aug 2018 17:20:57 +0000 (17:20 +0000)]
selftest: Replace bitbake -p with bitbake -e

Parsing all the recipes is annoying when trying to re-execute oe-selftest
and also unnecessary as its really just a sanity check. When the tests were
originally being developed the guard was useful but less so now.

Replace it with bitbake -e which is fast and checks the basic configuration
is valid.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosstate: Ensure a given machine only removes things which it created
Richard Purdie [Tue, 14 Aug 2018 14:56:00 +0000 (14:56 +0000)]
sstate: Ensure a given machine only removes things which it created

Currently if you build qemux86 and then generic86, the latter will
remove all of the former from deploy and workdir. This is because
qemux86 is i586, genericx86 is i686 and the architctures are compatible
therefore the sstate 'cleaup' code kicks in.

There was a valid reason for this to ensure i586 packages didn't get into
an i686 rootfs for example. With the rootfs creation being filtered now, this
is no longer necessary.

Instead, save out a list of stamps which a give machine has ever seen in
a given build and only clean up these things if they're no longer
"reachable".

In particular this means the autobuilder should no longer spend a load of time
deleting files when switching MACHINE, improving build times.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopackage_manager/sdk: Use filtered copies of the deploy ipk/deb directories
Richard Purdie [Tue, 14 Aug 2018 15:18:16 +0000 (15:18 +0000)]
package_manager/sdk: Use filtered copies of the deploy ipk/deb directories

Similar to rpm, use copies of the ipk/deb directories for rootfs construction.
This means the image creation code can no longer "see" recipes wich aren't in its
dependency chain which is good for a variety of reasons including determinism,
incompatible recipe (e.g. systemd/sysvinit) package conflicts and locking
performance.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopackage_manager: Remove rpm specific pieces of create_packages_dir()
Richard Purdie [Tue, 14 Aug 2018 14:55:42 +0000 (14:55 +0000)]
package_manager: Remove rpm specific pieces of create_packages_dir()

This function is generic, tweak the variable names and move out the rpm specific
directory name to make it truly generic and reusable for deb/ipk.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglibc: Fix locale archive path patch
Richard Purdie [Mon, 13 Aug 2018 12:44:05 +0000 (12:44 +0000)]
glibc: Fix locale archive path patch

The locale code uses the archive location in two places, ensure both are
corrected to use the environment variable which avoids nasty build
failures when archiving locales in images.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoimage: Add locale archive optimisation
Richard Purdie [Mon, 13 Aug 2018 11:40:03 +0000 (11:40 +0000)]
image: Add locale archive optimisation

Refactor the locale archive function from the SDK to also make it work during
general image creation. This reduces the size of the locales from 900MB to 220MB
in core-image-lsb-sdk.

The exception handling around subprocess was dropped as the standard subprocess
exception printing is better handled than the catchall exception.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoselftest/package: Add test to ensure sparse files are preserved
Richard Purdie [Sun, 12 Aug 2018 22:29:18 +0000 (22:29 +0000)]
selftest/package: Add test to ensure sparse files are preserved

Add a new element to the hardlink test to check we also preseve file
sparseness during the packing process. This should ensure we don't regress this
issue again.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoxf86-video-intel: Fix for glibc
Richard Purdie [Sat, 11 Aug 2018 16:07:18 +0000 (16:07 +0000)]
xf86-video-intel: Fix for glibc

It fails to build wi9th glibc 2.28, add the missing required header inclusion.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoscreen: Add virtual/crypt dependency
Richard Purdie [Sat, 11 Aug 2018 16:06:54 +0000 (16:06 +0000)]
screen: Add virtual/crypt dependency

screen uses crypt() so add the missing DEPENDS triggered by glibc 2.28.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglibc: Add make-native depends
Richard Purdie [Sat, 11 Aug 2018 10:30:28 +0000 (11:30 +0100)]
glibc: Add make-native depends

glibc needs make >= 4 yet some of our build workers have older versions of
make. Add a make-native dependency to work around this until all our supported
distros have a recent version of make.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosysvinit: Fix build with glibc 2.28 + libxcrypt
Khem Raj [Wed, 8 Aug 2018 17:04:25 +0000 (10:04 -0700)]
sysvinit: Fix build with glibc 2.28 + libxcrypt

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoppp, libpam: Add missing dep on virtual/crypt
Khem Raj [Wed, 8 Aug 2018 17:04:24 +0000 (10:04 -0700)]
ppp, libpam: Add missing dep on virtual/crypt

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglibc: Disable crypt support in glibc
Khem Raj [Wed, 8 Aug 2018 17:04:22 +0000 (10:04 -0700)]
glibc: Disable crypt support in glibc

Drop packaging libcrypt from 2.28+ onwards
We have independent crypt implementation coming from libxcrypt

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibxcrypt: Upgrade to 4.1.1
Khem Raj [Wed, 8 Aug 2018 17:04:21 +0000 (10:04 -0700)]
libxcrypt: Upgrade to 4.1.1

license update: Remove CDDL code with Public Domain pieces

https://github.com/besser82/libxcrypt/commit/c76847e3be40c4ac0d78bc8518502418c6207144#diff-fdcb2380ff1eeea2e5795ec115ba1c0d

inherit pkgconfig as it uses pkg-config during build

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibxcrypt: Provide virtual/crypt for target and native as well
Khem Raj [Wed, 8 Aug 2018 17:04:20 +0000 (10:04 -0700)]
libxcrypt: Provide virtual/crypt for target and native as well

virtual/crypt for musl will come from libc itself

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agocross-localedef-native: Update to build with glibc 2.28
Khem Raj [Wed, 8 Aug 2018 17:04:19 +0000 (10:04 -0700)]
cross-localedef-native: Update to build with glibc 2.28

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglibc: Upgrade to 2.28
Khem Raj [Wed, 8 Aug 2018 17:04:18 +0000 (10:04 -0700)]
glibc: Upgrade to 2.28

License-Update: libidn is dropped from glibc and a testcase that was a particular contributor copyrighted

see

https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=LICENSES;h=0e3a9fe39b26e97038d92f904508a4c3aa1bb43b;hp=b29efe01084af28cc40953d7317f22927c0ee3b7;hb=5a357506659f9a00fcf5bc9c5d8fc676175c89a7;hpb=7279af007c420a9d5f88a6909d11e7cb712c16a4
https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=LICENSES;h=b29efe01084af28cc40953d7317f22927c0ee3b7;hp=80f7f1487947f57815b9fe076fadc8c7f94eeb8e;hb=7f9f1ecb710eac4d65bb02785ddf288cac098323;hpb=5f7b841d3aebdccc2baed27cb4b22ddb08cd7c0c

Drop upstreamed and backported patches

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agodropbear.inc: add dependency on virtual/crypt to fix build with glibc-2.28
Martin Jansa [Thu, 9 Aug 2018 12:16:59 +0000 (12:16 +0000)]
dropbear.inc: add dependency on virtual/crypt to fix build with glibc-2.28

configure tests crypt() existence with:

dnl We test for crypt() specially. On Linux (and others?) it resides in libcrypt
dnl but we don't want link all binaries to -lcrypt, just dropbear server.
dnl OS X doesn't need -lcrypt
AC_CHECK_FUNC(crypt, found_crypt_func=here)
AC_CHECK_LIB(crypt, crypt,
        [
        CRYPTLIB="-lcrypt"
        found_crypt_func=here
        ])
AC_SUBST(CRYPTLIB)
if test "t$found_crypt_func" = there; then
AC_DEFINE(HAVE_CRYPT, 1, [crypt() function])
fi

but that silently fails with glibc-2.28 and a bit later do_compile fails with;
http://errors.yoctoproject.org/Errors/Details/185895/

../dropbear-2018.76/sysoptions.h:237:3: error: #error "DROPBEAR_SVR_PASSWORD_AUTH requires `crypt()'."
  #error "DROPBEAR_SVR_PASSWORD_AUTH requires `crypt()'."
   ^~~~~

Add dependency on virtual/crypt so that do_configure detects it correctly.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoglide: add INSANE_SKIP for textrel
Martin Jansa [Thu, 9 Aug 2018 11:44:47 +0000 (11:44 +0000)]
glide: add INSANE_SKIP for textrel

* I'm not using glide, so I'm not going to fix it proplerly,
  it was just bothering me in world builds
* this is reproducible only with ptest in DISTRO_FEATUREs (for aarch64
  issue) and included security_flags.inc, more specifically with the PIE
  flags, so alternative work around is:
  SECURITY_CFLAGS_pn-glide = "${SECURITY_NOPIE_CFLAGS}"

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agogo(-dep): add INSANE_SKIP for textrel
Martin Jansa [Thu, 9 Aug 2018 11:44:46 +0000 (11:44 +0000)]
go(-dep): add INSANE_SKIP for textrel

* I'm not using go or go-dep, so I'm not going to fix it proplerly,
  it was just bothering me in world builds
* this is reproducible only with ptest in DISTRO_FEATUREs (for aarch64
  issue) and included security_flags.inc, more specifically with the PIE
  flags, so alternative work around is:
  SECURITY_CFLAGS_pn-go = "${SECURITY_NOPIE_CFLAGS}"
  SECURITY_CFLAGS_pn-go-dep = "${SECURITY_NOPIE_CFLAGS}"

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoclasses: sanity-check LIC_FILES_CHKSUM
Ross Burton [Mon, 13 Aug 2018 17:20:54 +0000 (18:20 +0100)]
classes: sanity-check LIC_FILES_CHKSUM

We assume that LIC_FILES_CHKSUM is a file: URI but don't actually verify this,
which can lead to problems if you have a URI that resolves to a path of / as
Bitbake will then dutifully checksum / recursively.

[ YOCTO #12883 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobzip2: use Yocto Project mirror for SRC_URI
Ross Burton [Mon, 13 Aug 2018 23:59:39 +0000 (00:59 +0100)]
bzip2: use Yocto Project mirror for SRC_URI

The bzip.org domain expired and is now a holding site for adverts, so we can't
trust a tarball that appears on that site (luckily we have source checksums to
detect this).

For now, point SRC_URI at the tarball in the Yocto Project source mirror, but
set HOMEPAGE and UPSTREAM_CHECK_URI to the sourceware.org/bzip2/ page which
apparently will be resurrected as the new canonical home page.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agopackage: Fix file copying to preserve sparse files
Richard Purdie [Sun, 12 Aug 2018 22:29:49 +0000 (22:29 +0000)]
package: Fix file copying to preserve sparse files

We want to preserve sparse files when building the system, add the option
to tar to ensure we do this when copying files.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agodevtool: Use ConfigParser instead of SafeConfigParser
Khem Raj [Sat, 11 Aug 2018 16:54:00 +0000 (09:54 -0700)]
devtool: Use ConfigParser instead of SafeConfigParser

The SafeConfigParser class has been renamed to ConfigParser in Python
3.2+ see

http://bugs.python.org/issue10627

This alias will be removed in future versions.So we can use
ConfigParser directly instead.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoperf: fail if src path does not exist
Mikko Rapeli [Mon, 13 Aug 2018 09:42:17 +0000 (12:42 +0300)]
perf: fail if src path does not exist

A missing src directory from a broken kernel recipe resulted
only in a warning:

WARNING: copyfile: stat of /home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch failed ([Errno 2] No such file or directory: '/home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch')

and the build failed horribly.

With this change it's an error which can not be missed:

ERROR: perf-1.0-r9 do_configure: Path does not exist: /home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch. Maybe PERF_SRC does not match the kernel version.
ERROR: perf-1.0-r9 do_configure: Function failed: copy_perf_source_from_kernel
ERROR: Logfile of failure stored in: /home/builder/src/tmp-glibc/work/target-linux/perf/1.0-r9/temp/log.do_configure.21083
NOTE: recipe perf-1.0-r9: task do_configure: Failed
ERROR: Task (/home/builder/src/poky/meta/recipes-kernel/perf/perf.bb:do_configure) failed with exit code '1'

To get get perf compiling from a custom kernel, a perf.bbappend can be
created which defines PERF_SRC as list of files and directories needed
from kernel source tree to compile perf. This varies between kernel
versions.

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoparselogs.py: output correct log location
Chen Qi [Mon, 13 Aug 2018 08:54:37 +0000 (16:54 +0800)]
parselogs.py: output correct log location

The log entry in results is altered to remove 'target_logs'. This
causes wrong log location in output.

e.g.
   AssertionError: 1 != 0 : Log: /path/to/image/1.0-r0/postinstall.log

But when user wants to check the log, the user will find the log is
not present. The actual log file is /path/to/image/1.0-r0/target_logs/postinstall.log.

So fix to use the correct log location.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoman-db: rdepend on base-passwd to ensure installation order
Chen Qi [Mon, 13 Aug 2018 09:43:23 +0000 (17:43 +0800)]
man-db: rdepend on base-passwd to ensure installation order

Make man-db rdepend on base-passwd to ensure that base-passwd is
installed before man-db at rootfs time. This is to avoid the following
warning at rootfs time.

  warning: user man does not exist - using root

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoman-db: add volatile configuration file for sysvinit
Chen Qi [Mon, 13 Aug 2018 09:43:22 +0000 (17:43 +0800)]
man-db: add volatile configuration file for sysvinit

Add volatile configuraiton file for man-db so that in sysvinit systems
we don't get failure when running `mandb'. The error message is like
below.

  mandb: can't create index cache /var/cache/man/579: No such file or
  directory

[YOCTO #12872]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agomobile-broadband-provider-info: fix .pc file conflict
Zhixiong Chi [Mon, 13 Aug 2018 07:04:25 +0000 (00:04 -0700)]
mobile-broadband-provider-info: fix .pc file conflict

Issue: LIN10-4485

Error: Transaction check error:
  file /usr/share/pkgconfig/mobile-broadband-provider-info.pc from install of \
  lib32-mobile-broadband-provider-info-dev.core2_32 conflicts with file from package \
  mobile-broadband-provider-info-dev.core2_64

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agonspr: fix script conflict for multilib
Zhixiong Chi [Mon, 13 Aug 2018 07:04:24 +0000 (00:04 -0700)]
nspr: fix script conflict for multilib

Stop the nspr-config scripts conflicting in a multilib case.

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibevent: fix the multilib header conflict
Zhixiong Chi [Mon, 13 Aug 2018 07:04:23 +0000 (00:04 -0700)]
libevent: fix the multilib header conflict

Error: Transaction check error:
  file /usr/include/event2/event-config.h conflicts between attempted installs of libevent-dev-2.1.8-r0.skylake_64 and lib32-libevent-dev-2.1.8-r0.x86

The conflict is the size macro definition between 32bit and 64bit
such as:
< #define EVENT__SIZEOF_LONG 8
> #define EVENT__SIZEOF_LONG 4
< #define EVENT__SIZEOF_PTHREAD_T 8
> #define EVENT__SIZEOF_PTHREAD_T 4

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobase-files: fix handling of resize
Chen Qi [Wed, 1 Aug 2018 05:25:35 +0000 (13:25 +0800)]
base-files: fix handling of resize

The current handling of resize is incorrect. Using `resize > /dev/null
2>&1 && resize > /dev/null' will cause the second resize command to not
execute because 'resize > /dev/null 2>&1' will fail for resize utility
from busybox.

What we really should do is just to check whether ${bindir}/resize
is executable and execute it if so. Using '-x' is sufficient.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agobusybox: move init related configs to init.cfg
Chen Qi [Mon, 30 Jul 2018 09:41:57 +0000 (17:41 +0800)]
busybox: move init related configs to init.cfg

Move init related configs to init.cfg.

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

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibxml2: Fix CVE-2018-14404
Andrej Valek [Thu, 9 Aug 2018 08:06:37 +0000 (10:06 +0200)]
libxml2: Fix CVE-2018-14404

Fix nullptr deref with XPath logic ops

If the XPath stack is corrupted, for example by a misbehaving extension
function, the "and" and "or" XPath operators could dereference NULL
pointers. Check that the XPath stack isn't empty and optimize the
logic operators slightly.

CVE: CVE-2018-14404
Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agocurl: support multilib installation of curl-config
Changqing Li [Fri, 10 Aug 2018 09:35:55 +0000 (17:35 +0800)]
curl: support multilib installation of curl-config

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agomultilib-script: Fix ALTERNATIVE_${PN} overwrite issue
Zhixiong Chi [Fri, 10 Aug 2018 07:31:34 +0000 (00:31 -0700)]
multilib-script: Fix ALTERNATIVE_${PN} overwrite issue

If multilib scripts handle more than one file per package, the variable
ALTERNATIVE_${PN} will be overwritten and there will be only one symbol
link file. Append to the variable to avoid this.

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibjpeg-turbo: fix timezone of reproducible build timestamp
Christopher Clark [Fri, 10 Aug 2018 01:32:01 +0000 (18:32 -0700)]
libjpeg-turbo: fix timezone of reproducible build timestamp

Avoids producing different build results in different timezones.
Uses UTC with SOURCE_DATE_EPOCH.

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agokernel-yocto.bbclass: Adds oe-local-files path (devtool) to include directives
Jaewon Lee [Mon, 30 Jul 2018 21:21:53 +0000 (14:21 -0700)]
kernel-yocto.bbclass: Adds oe-local-files path (devtool) to include directives

The devtool-source class moves all local files specified in SRC_URI to
an oe-local-files directory. When using devtool and a recipe space kernel-meta,
devtool modify throws an error because the paths the kernel-yocto class
is looking for feature directories in, don't include the oe-local-files
directory which devtool is using.

This patch checks for feature directories in oe-local-files,
and if present, adds that path to include directives.

[YOCTO #12855]

Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agodevtool-source.bbclass: Support kernel-fragments/patch not in SRC_URI
Jaewon Lee [Thu, 9 Aug 2018 23:41:29 +0000 (16:41 -0700)]
devtool-source.bbclass: Support kernel-fragments/patch not in SRC_URI

When using a recipe space kernel-meta, scc files are added through
SRC_URI, but they may include corresponding kernel fragments or patches
that are not necessarily in SRC_URI.

For bitbake, this is not a problem because the kernel-yocto class adds
the path where the .scc file was found to includes which consequentially
makes the .cfg, .patch file available to the kernel build.

However, when using devtool, only files specified in SRC_URI are copied
to oe-local-files in devtool's workspace. So if the cfg/patch file is not in
SRC_URI, it won't be copied, causing a kernel build failure when trying
to find it.

This fix parses local .scc files in SRC_URI, copies the corresponding
.cfg/.patch file to devtool's workdir, and also adds it to local_files
so it is available when doing a devtool build for the kernel.

[YOCTO #12858]

v2: also supporting patch not in SRC_URI
v3: fix spacing issues

Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agolibtool-cross: Handle ccache sstate 'infection' issues
Richard Purdie [Fri, 10 Aug 2018 10:10:15 +0000 (10:10 +0000)]
libtool-cross: Handle ccache sstate 'infection' issues

On a system without ccache, f you:

INHERIT += "ccache"
bitbake libtool-cross
<remove INHERIT>
bitbake apmd

then it fails due to being unable to find ccache. The references to ccache are
coded into libtool-cross but the sstate checksum doesn't reflect this due to the
way the class is coded (output should be the same regardless).

The simplest solution is to remove references to ccache from the libtool script.
The output then works regardless of whether ccache is present or not. The
libtool-cross script is only used in a handful of cases (most of the time its
dynamically generated by autoconf) so any performance issue is minor.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agosstate: Remove DEPLOY_DIR_IMAGE from SSTATE_DUPWHITELIST
Richard Purdie [Thu, 9 Aug 2018 16:58:07 +0000 (16:58 +0000)]
sstate: Remove DEPLOY_DIR_IMAGE from SSTATE_DUPWHITELIST

Replace the generic whitelist entry with entries for the three specific
'problem' cases in OE-Core. This means the general DEPLOY_DIR_IMAGE entry
doesn't mask problems for others as was recently encoutered by users
reported on irc. In the whitelisted cases they occur only in multilib builds
and the files are identical.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agooeqa/esdk/devtool: Drop OETestDepends usage
Richard Purdie [Thu, 9 Aug 2018 12:17:39 +0000 (12:17 +0000)]
oeqa/esdk/devtool: Drop OETestDepends usage

OETestDepends doesn't work with parallelism and in this case we don't
really need this dependency, it would just short out some tests quickly
in the rare case the esdk environment was broken.

Currently this is masking tests which is a much worse problem and we
can't make OETestDepends work reliably with parallelism so drop the
dependencies.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agocmake: fix compiling some C++ projects with Yocto SDK and GCC
Urs Fässler [Wed, 8 Aug 2018 07:33:52 +0000 (09:33 +0200)]
cmake: fix compiling some C++ projects with Yocto SDK and GCC

Setting CMAKE_SYSROOT in the toolchain file allows CMake to correctly
remove user-provided system include directories pointing to
<sysroot>/usr/include. The mentioned projects failed with "stdlib.h:
No such file or directory #include_next <stdlib.h>".

Signed-off-by: Urs Fässler <urs.fassler@bbv.ch>
Signed-off-by: Raphael Freudiger <raphael.freudiger@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agoopenssl_1.0: drop unnecessary call to perlpath.pl from do_configure()
Andre McCurdy [Wed, 8 Aug 2018 18:15:12 +0000 (11:15 -0700)]
openssl_1.0: drop unnecessary call to perlpath.pl from do_configure()

The perlpath.pl script is used to patch the #! lines in all perl
scripts in the utils directory. However, as these scripts are run via
e.g. "perl foo.pl", they don't actually rely on the #! path to be
correct (which can be confirmed by the observation that the path is
currently being set to ${STAGING_BINDIR_NATIVE}/perl, which doesn't
exist).

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agometa: replace deprecated "SERIAL_CONSOLE"
Maciej Pijanowski [Wed, 8 Aug 2018 20:27:54 +0000 (22:27 +0200)]
meta: replace deprecated "SERIAL_CONSOLE"

SERIAL_CONSOLE was already deprecated in 2013, yet still some
machine configuration files were using it. This patch replaces
it with SERIAL_CONSOLES, which is the successor.

The default value in systemd-serialgetty.bb can also be safely
transitioned from SERIAL_CONSOLE to SERIAL_CONSOLES, as this
recipe already uses SERIAL_CONSOLES within do_install().

The documentation seems to be already up do date.
beaglebone-yocto.conf in the bsp-guide already uses
SERIAL_CONSOLES. The ref-manual redirects from SERIAL_CONSOLE
to SERIAL_CONSOLES.

[YOCTO #12653]

Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 years agomultilib_header: recognize BPF as a target
Daniel Díaz [Thu, 9 Aug 2018 17:14:54 +0000 (12:14 -0500)]
multilib_header: recognize BPF as a target

When building with `clang -target bpf` using the
multilib_header, a recursion was unavoidable because
bits/wordsize.h would #include itself, still lacking
a definition for __MHWORDSIZE or __WORDSIZE.

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>