Compare commits

..

590 Commits

Author SHA1 Message Date
Richard Purdie
fe43e59932 gcc: Drop 7.3 since 8.2 is working fine for us
We've had gcc 8.2 around for long enough that 7.3 can be removed now.

(From OE-Core rev: 20aea61385e1a53ac245353899277ba20104ed2f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:52 +00:00
Raul Martins
f7ef271db5 oe: Fix opkg status list parse - Missing postinst
While parsing opkg package status, last package status was not
properly handled, resulting in final image without postinst and
pkg depends

(From OE-Core rev: 0d3ca08347eb0c8b9615a0197c213a32f52033c8)

Signed-off-by: Raul Martins <raul.martins@alta-rt.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:52 +00:00
Robert Yang
2e8f8d7eb3 base.bbclass: Add comments for gcc links to ccache
(From OE-Core rev: ce6bf125aba7344d56368885605949e373b06393)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:52 +00:00
Serhey Popovych
a669023fe5 gcc-7.3, gcc-8.2: Use variable SYSTEMLIBS_DIR instead of hardcoding it for ppc64
(From OE-Core rev: d4063951acabae0b69fc195ec1e0f2dcd02a5d01)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:52 +00:00
Serhey Popovych
fc735f3e43 gcc: Enable secureplt for powerpc64 target too
(From OE-Core rev: 72c3381ef5b18c784707ef361ee02f07770220f6)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:52 +00:00
Serhey Popovych
9eedf05a34 gcc: More places to patch to disable ldbl 128 for musl on PPC
There are four functions using TFmode type (128bit) that isn't
available when building with musl. Move each of them from common
ppc64-fp.c to individual files referenced from t-float128 that used
when ldbl 128 enabled at configure time.

For gcc-7.3 if -mfloat128 is given -mfloat128-type must be given too.

Exclude ibm-ldouble.c when ldbl 128 isn't enabled at config time.

Build and boot tested with musl (no float128) and glibc (float128
and ibm128 on PowerPC64).

(From OE-Core rev: dec8e566810525563b33c2877d10db0a70965d6d)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:52 +00:00
Serhey Popovych
e0aabf1442 gcc: Fix preprocessor redefines for header pathes
When building for powerpc64 using musl as C library we get preprocessor
macro redefinition errors since gcc-configure-common.inc adds #define
of STANDARD_STARTFILE_PREFIX_1 and STANDARD_STARTFILE_PREFIX_2 to
gcc/defaults.h after ones added by a patch that ensures target gcc
headers included.

Since gcc-configure-common.inc included in every gcc recipe either
directly or indirectly, do_configure task is not disabled/deleted for
any of them (except gcc-source.inc) and there is no precondition that
skips gcc/defaults.h patching in
gcc-configure-common.inc::do_configure_prepend() we can just remove
conflicting parts of mentioned above patch to have single place where
start files prefixes defined in do_configure() task.

(From OE-Core rev: 0622a4168aac627b44547f72fe93589cf1050e42)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:52 +00:00
Serhey Popovych
9d2ea1ea50 python3: Fix do_configure check platform triplet error (2)
When building for powerpc 32bit with musl following error triggered
from do_configure:

checking for the platform triplet based on compiler characteristics... powerpc-linux-gnu
configure: error: internal configure error for the platform triplet, please file a bug report

This is caused by PLATFORM_TRIPLET != MULTIARCH mismatch since MULTIARCH
in case of musl is powerpc-linux-musl. Since triplet is used as part
module name as described in PEP-3149 to make fix less intrusive alias
powerpc-linux-musl to powerpc-linux-gnu to avoid possible runtime
(e.g. tests) incompatibilities later.

Fix was inspired by commit cda0ef61d373 ("python3: fix do_configure
check platform triplet error").

(From OE-Core rev: b2ec91e12088afa0560aecede587d0970fc64110)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:52 +00:00
Serhey Popovych
fb02d11cad openssl: Skip assembler optimized code for powerpc64 with musl
This code is written for elfv1 ABI in mind and linked as such: disable
all optimizations at the moment when building for powerpc64 with musl.

(From OE-Core rev: bee9e807430178426b2a5635b573ae285e889c39)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:52 +00:00
Serhey Popovych
6be12c0622 musl: Create default library search path based on configuration
In absence of /etc/ld-musl-$(ARCH).path file musl uses hardcoded default
search path "/lib:/usr/local/lib:/usr/lib". This works for cases when
system libraries installed in one of these pathes.

However if lib64 or libx32 used as system library directories and no
usr merge functionality enabled for distro musl dynamic loader cannot
find libraries and finally execute binaries.

Found while working on support for musl on powerpc64 builds where
lib64 variant is used regardless of multilib being on or off.

Fix by creating default search path based on configuration time values
for syslibdir and libdir.

(From OE-Core rev: 2da79f021b5525ea5b56a86563905a67fc958fa5)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:52 +00:00
Serhey Popovych
2468becd4b arch-powerpc64.inc: Use elfv2 ABI when building with musl
Historically first PowerPC ABI was big-endian only (elfv1 currently). It
is standard ABI for both 32-bit ppc and 64-bit ppc64 architectures.

With PowerPC little-endian support new ABI was introduced (elfv2) and it
is used primarily with ppc64le target only. While it has support for
big-endian it is not commonly used and elfv1 still preferred.

Musl does support only elfv2 ABI for both LE and BE and does not have
any plans to support elfv1.

Since then to build for powerpc64 with musl new ABI should be used. As
expected it is not compatible with elfv1 but that isn't problem as long
as there is no binary distributed software or assembly code written for
elfv1 ABI.

(From OE-Core rev: 68c9641855199f34aabe1050e863c21830116fe1)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:52 +00:00
Serhey Popovych
76172256e3 qemuwrapper: Explicitly exit in case of no qemu supported for target
Running qemu for userspace code on unsupported target binaries might
be bad idea because qemu could say running in endless loop instead
of crashing due to illegal instruction or unsupported binary format.

While this is qemu bug we should avoid hitting it by explicitly exiting
from the wrapper when qemu backfill considered for machine.

Behaviour was observed in do_rootfs stage when building on IBM Power 8
host for PowerPC e7400 target.

(From OE-Core rev: a0ebc77ee0b461fc30e704f7dd9e9c2061ef4193)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:51 +00:00
Serhey Popovych
14dc19f868 tune-power[5-7].inc: Disable QEMU usermode usage
The QEMU usermode fails with invalid instruction error when
used with those tunes.

(From OE-Core rev: c1c881ef7f4faf94f385ae742030382122ee5816)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:51 +00:00
Serhey Popovych
e2901424ed tune-power[5-7].inc: Fix DEFAULTTUNE values
It is ppcpX, not ppcprX, where X is 6 or 7. While there select 32bit
tune for P5 machine to bring it inline with P6 and P7.

(From OE-Core rev: 220eee184a4f510cdf7c55e2aed00330abee1553)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:51 +00:00
Serhey Popovych
71ec61ed7a lib/oe/elf.py: Add powerpc64 architecture definition for musl
Add the ELF definition for the powerpc64 architecture when building
with musl as libc.

(From OE-Core rev: 2c09ab40fd92a49d16352639331db9c7e5171515)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:51 +00:00
Erik Botö
217035f098 testimage: Add possibility to pass parmeters to qemu
Add a variable called TEST_QEMUPARAMS in testimage.bbclass to make it
possible to pass parameters to qemu. This can be useful for e.g.
increasing the amount of RAM available during testimage runs.

(From OE-Core rev: 1a9163f5779d233c884c8fd50e0812eabab4fdf3)

Signed-off-by: Erik Botö <erik.boto@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 17:10:51 +00:00
Ross Burton
a785fdbe62 runqemu: clean up subprocess usage
Where possible pass lists instead of strings, don't use a subshell, and call
check*() instead of using Popen directly.

(From OE-Core rev: d2374623444752af1ad748ed36b68ea58f629bf6)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:55:38 +00:00
Peter Kjellerstedt
1e534573c7 ref-manual: Document the fifth argument to PACKAGECONFIG
(From yocto-docs rev: adb17e3172c829de77d2664c91f7cf4b22c9e5f0)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:59 +00:00
Peter Kjellerstedt
989577c4ad ref-manual: Add missing whitespace around "=" in a few code examples.
(From yocto-docs rev: 0d22771c64d082bf86f5efd85ac9aaeb1c7f3093)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:59 +00:00
Scott Rifenbark
dfe7b95ea4 documentation: Preparing for 2.7 release.
Updated poky.ent to have variables for 2.7.
Updated mega-manual.sed file to use "2.7" string.
Updated all <manual>.xml Manual History Tables to use "TBD"

(From yocto-docs rev: d6f8bbd6e107913265ea1ac95ab8817e199ff60b)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:59 +00:00
Scott Rifenbark
eda8ce60e1 poky.ent: Updated copyright variable to span into 2019.
(From yocto-docs rev: f06b1838f7f4516272aca290995f00f6fd16e35a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:59 +00:00
Scott Rifenbark
d29f4dcc45 ref-manual: Updates to CMake and cmake.bbclass.
I cleaned up the terminology used for the CMake build system.
I provided some meaningful links to a good overview page for CMake.
I also built in some cross-referencing as needed.

(From yocto-docs rev: 7c38add39b97a7a8786a1be53f9ff549e4727fad)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:59 +00:00
Richard Purdie
32395abc6d bitbake: server/process: Ensure socket has a timeout set
We're seeing hangs in oe-selftest where server startup and shutdown are
racing. The assumption was a connect would timeout however no timeout is
set which can leave processes hanging. Set a short timeout for
the connection to avoid this.

(Bitbake rev: f02114cb70e8f6f1d32e19c02b758fe0aadecd19)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:33 +00:00
Alistair Francis
d1c2b732e7 qemu: Bump to version 3.1
Bump QEMU to the latest 3.1 and update the patches.

(From OE-Core rev: eeb918fc9b67a5d252b9d5ad5f3674cc1a45aa7f)

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:07 +00:00
Alistair Francis
b115d25ec6 qemu-targets: Fix the list of QEMU targets
(From OE-Core rev: b5a69bfa8bf0481658bee10cc8ed186166457eee)

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:07 +00:00
Khem Raj
851c9a1887 ltp: Fix build with glibc 2.29
(From OE-Core rev: 1ba3400e1022ad9ea5bfea8d2237f3db0b83a83c)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:07 +00:00
Ross Burton
fbcd81d38f tcl: in run-ptest show output if a test fails
If a test fails the log has useful information, so include that in the output.

(From OE-Core rev: f66f533eb9974cdefaacfee00d019c65e0d80b9e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:07 +00:00
Ross Burton
f19efc8673 Revert "popt: update SRC_URI"
Go back to use rpm5.org, as it's the canonical host for popt.  The host is back up now.

This reverts commit 347ee336dcc94e6fa4e4788117013615b90abd70.

(From OE-Core rev: 691e540e724c609cceeb9379e1252a05abebd5b1)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:07 +00:00
Ross Burton
e7161695e6 libsoup: upgrade to 2.64.2
Add new build dependency libpsl.

(From OE-Core rev: 936d511150f7bb1a3b70a421e7531e89ce37ef67)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:07 +00:00
Richard Purdie
51faba849a maintainers: Add entry for libpsl (required by libsoup)
(From OE-Core rev: 70a1a10ddb2e7e99d4d854c653e89799a16aad74)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:07 +00:00
Ross Burton
6fd0c9abbd libpsl: add
A Public Suffix List is a collection of Top Level Domains (TLDs) suffixes. TLDs
include Global Top Level Domains (gTLDs) like .com and .net; Country Top Level
Domains (ccTLDs) like .de and .cn; and Brand Top Level Domains like .apple and
.google. Brand TLDs allows users to register their own top level domain that
exist at the same level as ICANN's gTLDs. Brand TLDs are sometimes referred to
as Vanity Domains.

(From OE-Core rev: 30f4c433e3b205648c70b154debdea9eb9e668d7)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:07 +00:00
Michael Halstead
1c26b0c4dc yocto-uninative: Correct sha256sum for aarch64
Avoid uninative checksum warnings when building on aarch64 hardware.

(From OE-Core rev: 3ccc2de5f08fb2023abeeed39e23c68dbc75725b)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:07 +00:00
Richard Purdie
7d7340bf31 oeqa/selftest/distrodata: Port to use the new recipeutils.get_recipe_upgrade_status() function
Rather than use the obsolete do_checkpkg function, use the new recipeutils
function which uses tinfoil to get the data rather than needing csv file
manipulation.

(From OE-Core rev: 3f3f80b00cd999f1b2aef8f5c0ce0900aa4dcbcb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:07 +00:00
Richard Purdie
13940a81da lib/oe/recipeutils: Add a new function to mimic do_checkpkg
The code in distrodata.bbclass related to the do_checkpkg task is rather
dated, has holes in it (ignoring some recipes) and has horrible locking
and csv related issues.

We should use modern APIs such as tinfoil to make the calls we need directly
against bitbake, cutting out the middleman and clarifing the code.

This change imports the bits of distrodata.bbclass that are needed by the
automated upgrade helper (AUH) into a standalone function which uses the
tinfoil API. This can then be used by AUH and by the tests in
oeqa/selftest/distrodata as well as by any other standalone script that needs
this functionality. Its likely it can be further improved from here but this is a
good start and appears to function as before, with slightly wider recipe
coverage as some things skipped by distrodata are not skipped here (images,
pieces of gcc, nativesdk only recipes).

(From OE-Core rev: 92e33277b1b7892bae9cc0801ab379bd1c57c0f0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15 11:48:07 +00:00
Richard Purdie
88c41f3d8b bitbake: utils: Add aarch64 support to ioprio_set
With aarch64 hosts coming into use, set the syscall number to
avoid ioprio warnings on that platform.

(Bitbake rev: 5eaf9e7b26f09f5f106e1c3c6976d517b289450a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-14 17:10:59 +00:00
Richard Purdie
999ae9291c bitbake: data_smart: Allow numeric characters in overrides
We're seeing problems due to the way x86-64 is handled (or not handled)
as an override. Relax the containts on overrides from being lowercase
to being lowercase or numeric. This fixes problem where MACHINE=qemux86
would work but MACHINE=qemux86-64 would fail the same tests.

(Bitbake rev: 3a3be518536acc868c7eeb3c1111ad1b321480b7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-14 17:10:59 +00:00
Richard Purdie
b06c7392e1 bitbake: data_smart: Add missing regexp markup
Fix some further python3 warnings about unescaped regexs.

(Bitbake rev: 8667605d016e82add95638fcb15c2bbc1b489ecc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-14 17:10:59 +00:00
Richard Purdie
55b6d577a0 maintainers: Clarify/add several entries
Images were previously missing but are added, this also corrects the names
used for gcc/go/bintuils/gdb recipes and adds a few other misc missing ones
to ensure we have complete coverage of the recipes in OE-Core.

(From OE-Core rev: 6408b4b90833706dd1307f845266dcf9fccdbcaf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-14 17:10:59 +00:00
Richard Purdie
f8e488e724 go-crosssdk: PN should use SDK_SYS, not TARGET_ARCH
The crosssdk dependencies are handled using the virtual/ namespace so
this name doesn't matter in the general sense. We want to be able to provide
recipe maintainer information through overrides though, so this standardises it
with the behaviour from gcc-crosssdk and ensures the maintainer overrides work.

(From OE-Core rev: da8c3728bf8bb4d4ae71e15626fc10976802185d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-14 17:10:59 +00:00
Ross Burton
6a0ebb6123 vulkan: don't fetch from the deprecated repository
(From OE-Core rev: 34109d66cd0f1f9746e8cc50a5d4334efdc0ce38)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-14 17:10:59 +00:00
Kai Kang
e66a9c7506 lttng-tools: fix compile error for x32
Fix build error of src/common/utils.c for x32:

| .../src/common/utils.c: Assembler messages:
| .../src/common/utils.c:1026: Error: register type mismatch for `bsr'
| .../src/common/utils.c:1028: Error: operand type mismatch for `movq'
| make[3]: *** [utils.lo] Error 1

[YOCTO #13081]

(From OE-Core rev: db9c892eb1697e3ba3c17eabf59b007c0cf3ff33)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-14 17:10:59 +00:00
Kai Kang
53d8896c5b systemd: fix compile error for x32
Backport patch to fix systemd compile error for x32:

| ../git/src/timesync/timesyncd-manager.c:607:19: error: format '%lli'
| expects argument of type 'long long int', but argument 11 has type
| 'long int' [-Werror=format=]

[YOCTO #13074]

(From OE-Core rev: 7201df413616cab8d7f3257f86dd7a0a5c7719ee)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-14 17:10:59 +00:00
Paul Eggleton
d2ba6dfab3 oe-selftest: distrodata: change test_maintainers() to use tinfoil
Use tinfoil to enumerate recipes and get the value of RECIPE_MAINTAINER
to make it a bit more reliable in the face of do_checkpkg issues we are
currently seeing on the Yocto Project autobuilder. This also makes it a
little less painful to re-execute test_maintainers() since you don't
have to wait for bitbake -c checkpkg to complete every time.

Note that the new test has been written in such a way that it will still
function if RECIPE_MAINTAINER values are ever moved to the recipes.
Also, the test still currently fails as there are recipes that don't
have an assigned maintainer.

(From OE-Core rev: 47282a2f6f12acebf58961ea9410cfbc335d560b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-14 17:10:59 +00:00
Robert Yang
66c2638844 lib/oe/utils: Set stderr for host_gcc_version()
Fixed:
$ ln -s /usr/bin/ccache /folk/lyang1/bin/gcc
$ rm -fr tmp/hosttools/ && bitbake -p
[snip]
ERROR: Error running gcc  --version:

It didn't print the error message, now it is:
ERROR: Error running gcc  --version: ccache: error: Could not find compiler "gcc" in PATH

For the error itself, it is because ccache is not in my HOSTTOOLS, so this is
an expected error.

(From OE-Core rev: 91955caae584b4f75118e04411851b1a3d783fec)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-14 17:10:59 +00:00
Michael Ho
bc25bb645e insane.bbclass: add package specific skips to sstate hash
The bbclass currently adds INSANE_SKIP to the sstate hash dependencies
however the package specific skips such as INSANE_SKIP_${PN} are
not added automatically because of how the class references them.

This causes the problem that modifying INSANE_SKIP_${PN} does not
invalidate the sstate cache and can mask build breaking warnings.

Add an anonymous python snippet to explicitly include these additional
relevant skips to the sstate hash.

Singed-off-by: Michael Ho <Michael.Ho@bmw.de>
(From OE-Core rev: 8690332183f10a5e5689da7ec030567dfd1ac091)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-14 17:10:58 +00:00
Michael Ho
f510f79859 cmake.bbclass: append includedir to implicit include dirs
This resolves issues with paths being marked as system includes that
differ from /usr/include but are considered implicit by the toolchain.
This enables developers to add directories to system includes
to supress compiler compiler warnings from them.

(From OE-Core rev: 9c2227d5d960f93e00791157354f0c920fbecf39)

Signed-off-by: Michael Ho <Michael.Ho@bmw.de>
Cc: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-14 17:10:58 +00:00
Ross Burton
8e8898bc2d oeqa/sdk: rewrite cpio test
Don't use the helper class as it gets in the way more than it helps, exercise
the out-of-tree paths, and verify the installed files match the expected
architecture.

(From OE-Core rev: 6d666b0413336de2e556b2722c5be97ae5cd40ad)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Ross Burton
1d49a3a23a oeqa/sdk: rewrite lzip test
Don't use the helper class as it gets in the way more than it helps, exercise
the out-of-tree paths, and verify the installed files match the expected
architecture.

(From OE-Core rev: 920ae8c6537c2469f21ab9439587fd094ecc40f6)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Ross Burton
01bee70c31 oeqa/sdk: clean up galculator test
Drop redundant imports and variables, and use os.makedirs() instead of
bb.utils.mkdirhier().

(From OE-Core rev: 2de9b1e611e5047afb540f98756994925c22e446)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Ross Burton
5e15b242a4 oeqa/sdk: show output if run() fails
Use oeqa.utils.subprocesstweak to monkey-patch the subprocess exception so that
any output is shown, and remove any explicit try/catch handling that would have
hidden this.

(From OE-Core rev: 55964b33b561397287779ee474170790dfd03e85)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Ross Burton
778f3ce1e6 oeqa/sdk: clarify ELF assertion message
For example, instead of saying "3 != 62", say "Binary was x86-64 but expected
i586".

(From OE-Core rev: 9ab94cea589fca4394ec1fd8dc06b23fd8e990b9)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
He Zhe
3bf7cd7182 linux-libc-headers: Fix build failure by using fixed temporary file instead of pipe
This is a workaround for the following possible build failure.

*** Compiler lacks asm-goto support.. Stop.

When building linux-libc-headers we need to use binutils on build machine.
binutils v2.31 introduces a bug that could cause scripts/gcc-goto.sh to fail
when running in an environment where /tmp is rarely used, e.g. in docker.

(From OE-Core rev: 2322dc4f414da0281fdaffa7bc2205fb82a63d12)

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Khem Raj
bd220d576d webkitgtk: Link compiler-rt for clang specific built-ins
When using clang, its increasingly using its own runtime which means
libgcc is not enough to find all primitives its using.

Fixes errors like
recipe-sysroot/usr/lib/libwebkit2gtk-4.0.so: undefined reference to
`__mulodi4'

(From OE-Core rev: 9584fc5ff7e07bb38c6ab115a216d9d28d1632d9)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Khem Raj
a34555a54d insane.bbclass: BPF objects may mismatch in endianness and bitness too
This ensures that bitness and endianness is ignored for BPF objects
Fixes QA issues like

Bit size did not match (32 to 64) kernel-selftest on
/work/qemumips-yoe-linux/kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/bpf/test_btf_nokv.o

(From OE-Core rev: 26722e59ca5df14bd90fc09306d97ff0fd078f32)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Ross Burton
adfd8582ea lzip: clean up recipe
Use cleandirs to ensure ${B} is always empty, and remove redundant assignment of
EXTRA_OEMAKE (presumably from when it had a non-empty default).

(From OE-Core rev: 326e183479f9cae12f2219a2bf9112b322832daa)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Otavio Salvador
df31c72676 curl: Add PACKAGECONFIG to enable NSS support
(From OE-Core rev: 72e542f564691d892d140a69d7fcc6b442897cf8)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Ola x Nilsson
e798efcc5b selftest/package: Correct format arguments in test_gdb_hardlink_debug
(From OE-Core rev: 7c2c9b876334cc7357f818c3b3744fc97987e38f)

Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Ross Burton
f4a63c1345 nss: fix Upstream-Status format
(From OE-Core rev: 2f5622bbe8cc59593ad18f54477a7a56a8177f36)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Tim Orling
2720226d82 liberror-perl: upgrade 0.17026 -> 0.17027
* add RDEPENDS
* add RDEPENDS for ptest
  - tested on qemux86 with glibc and musl
* drop do_compile, not obvious why LIBC needed to be set
* Added HOMEPAGE:
  https://bitbucket.org/shlomif/perl-error.pm
  - Repository used to be github.com/shlomif (deadlink)

Upstream release notes:
"""
0.17027         2018-10-28
- Documentation and examples enhancements.
  - https://bitbucket.org/shlomif/perl-error.pm/pull-requests/1/october-prc-some-minor-mostly-doc-changes/diff
  - Thanks to https://metacpan.org/author/JMERELO .
"""

(From OE-Core rev: 236e801df6e3bd859acc2b8456880a4bc4f0943c)

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Alejandro Enedino Hernandez Samaniego
d0c2395db3 create_manifest2: Dont match filenames which contain the directory name for new manifest
When creating a new python2 manifest, there is a corner case on which
the filepath for a certain dependency that was found, could contain
the path of an existing folder, e.g. ${libdir}/python2.7/xmlrpclib.py
module path contains ${libdir}/python2.7/xml, this causes an issue where
the dependency doesnt get eventually added on FILES for that module.

This patch checks if the dependency that was found is a directory, if it
is, it checks if it matches one of the existing directories on the
manifest, if it is not, then it checks if the dependency's path (without
the filename) matches one of the directories.

Also some misc indentation fixes.

(From OE-Core rev: a1c1253b44eb2000de55b7fa3836e5cdaa28a508)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Yong, Jonathan
e235a9e18b bitbake: bitbake-user-manual: Added "usehead" parameter.
(Bitbake rev: 91e308992d676ea541b891261e21b840606fc1c4)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-10 20:32:05 +00:00
Khem Raj
d47e89f338 mdadm: Drop redundant patches and fix build with clang
Several patches were being applied unnecessarily, the purpose they
served at one point has either been fixed differently, or accepted
upstream.

Add a new patch to make clang's diagnostics happy

(From OE-Core rev: 8bc0d2f2197430723f8b2d0785169e48c883eedb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09 11:08:11 +00:00
Alejandro Enedino Hernandez Samaniego
55553c2477 create_manifest3: Dont match filenames which contain the directory name for new manifest
When creating a new python3 manifest, there is a corner case on which
the filepath for a certain dependency that was found, could contain
the path of an existing folder, e.g. ${libdir}/python3/xmlrpclib.py
module path contains ${libdir}/python3/xml, this causes an issue where
the dependency doesnt get eventually added on FILES for that module.

This patch checks if the dependency that was found is a directory, if it
is, it checks if it matches one of the existing directories on the
manifest, if it is not, then it checks if the dependency's path (without
the filename) matches one of the directories.

(From OE-Core rev: 59db12fdf294cfab5c1730337d092a75867658f7)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09 11:08:11 +00:00
Robert Yang
d6bc389e81 bitbake: bitbake: pysh: Improve error handling for shell code
The p_error() is used for printing errors when parse shell code, but it can't
the EOF error correctly

- Add the following lines to quilt.inc
  do_configure_prepend () {
      find ${s} -name "*.in" -exec sed -i -e "1s,^#\!.*@perl@ -w$,#\! @perl@\nuse warnings;," {} \;
      if [ hello ]; then
  }

- Before the patch:
  $ rm -fr cache/ tmp/cache/; bitbake -p
  [snip]
  WARNING: /path/to/quilt/quilt-native_0.65.bb: Error during finalise of /path/to/quilt/quilt-native_0.65.bb
  [snip]
  bb.pysh.sherrors.ShellSyntaxError: None
  followed by:

  We can see that this isn't easy to debug, let p_error() check wheter it is EOF
  and print appropriate errors can improve the error message. And don't let
  codeparser.py except pyshlex.NeedMore (in fact, it never worked since p_error()
  only raise ShellSyntaxError), but make it print the last 5 lines which might be
  useful for debuging.

- After the patch
  $ rm -fr cache/ tmp/cache/; bitbake -p
  [snip]
  ERROR: /path/to/quilt/quilt_0.65.bb: Error during parse shell code, the last 5 lines are:
      find /path/to/quilt/0.65-r0/quilt-0.65 -name "*.in" -exec sed -i -e "1s,^#\!.*@PERL@ -w$,#\! @PERL@\nuse warnings;," {} \;
      if [ hello ]; then
      autotools_do_configure
      sed -e 's,^COMPAT_SYMLINKS.*:=.*,COMPAT_SYMLINKS    :=,' -i /path/to/quilt/0.65-r0/quilt-0.65/Makefile
  [snip]
    File "/path/to/bb/pysh/pyshyacc.py", line 649, in p_error(p=None):
               w('Unexpected EOF')
      >    raise sherrors.ShellSyntaxError(''.join(msg))

  bb.pysh.sherrors.ShellSyntaxError: Unexpected EOF

(Bitbake rev: 44790597951638e32eb1672de2e40bd5a603326b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09 11:07:48 +00:00
Robert Yang
b3f0b96a25 bitbake: pysh/pyshlex.py: Set is not importable
>>> from Set import Set
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'Set'

So remove related code.

(Bitbake rev: 118e9d8894e64d102543562314b318676006e710)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09 11:07:48 +00:00
Robert Yang
cbc102d8fc bitbake: pysh/sherrors.py: Remove unused classes
The only two that we need are ShellSyntaxError and ShellError, others are not
used, so remove them.

(Bitbake rev: abee2ff5ee71bf8c3221cd9d3cd4243ebb4ca273)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09 11:07:48 +00:00
Robert Yang
54de2f5089 bitbake: pysh: Remove unused modules
We don't use these modules in bitbake, so remove them.

And pysh's author declared that pysh is no longer maintained:
http://pysh.sourceforge.net/

(Bitbake rev: 9cc4f12d2aef366a593c7977d3818a3002b1d8bf)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09 11:07:48 +00:00
Joshua Watt
66318c5831 bitbake: bitbake: persist_data: Retry database setup
The configuration of the sqlite database can timeout due to locking
under heavy load and should be subject to the same retry logic as the
other statements.

[YOCTO #13069]

(Bitbake rev: 5a2a95b0396e39662968690b3065d2f88167a71c)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:37 +00:00
Richard Purdie
888d76d221 bitbake: utils: Use utils.remove() within prunedir()
We've already tweaked remove() for speed and not to error if it
races for deletion. Therefore use this for prunedir() which was
starting to show the same bug reports.

[YOCTO #13003]

(Bitbake rev: 47f359f9b017f8d99d0bb2161ac0dcefcbd915de)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:37 +00:00
Richard Purdie
e74f80433e bitbake: fetch2: Fix os.errno references
os.errno used to happen to work but is invalid. Correct to use errno.

[YOCTO #13068]

(Bitbake rev: 03aae96a8859409b1ce7e3d5c1197371fa96bd14)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:37 +00:00
Richard Purdie
3630328d05 bitbake: fetch2/wget: Fix typo in exception name
This could clearly never have worked since the python3 migration
but as its in an error path, it doesn't get tested/used much.

(Bitbake rev: 704f27dc28d50a6dc02c8b64274ee4ecb3058c4a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:37 +00:00
Richard Purdie
89e2d2835d bitbake: cooker: Add some timing debug messages to the server startup
We're seeing slow startup in bitbake, add some timeing debug messages so
the logs are more useful for debugging when its slow.

(Bitbake rev: 8d1fc115b8a176009f1f3a8ce840b422e7e0b45e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:37 +00:00
Richard Purdie
55197b853d bitbake: server/process: Increase server startup time delay
On loaded production systems we've seen bitbake server take over
40s to start up. Increase the timeout to 90s which tries to avoid
failures in selftests.

The delays come from setting up the inotify watches (31s) so can't
really be avoided.

After 5s delay we now warn the user we're waiting for 90s so the
interactive exeperience shouldn't be much changed and its very
unlikely the user would see that anyway.

(Bitbake rev: 7a4e105093c3080c1087cd06abc2883852a23e28)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:37 +00:00
Khem Raj
73e8104f9c nfs-utils: Fix build with clang
(From OE-Core rev: 924d6956fb5bef3effe8914fe61e8cad6f71a231)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:02 +00:00
Andrea Adami
3c6751ee7a meson.bbclass: map mips64el TARGET_ARCH to mips64 for the cross file
Meson uses 'mips64' for both big- and little-endian MIPS64 machines,
so map mips64el to mips64.

(From OE-Core rev: 8d1023f222f32ef64d37c3cb15b7dcf9c3e5990d)

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:02 +00:00
Ross Burton
a9093bc81b oeqa/sdk/galculator: rewrite to use new helpers
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Ross Burton
aa8a9a05c2 oeqa/sdk/python: fix version typo
(From OE-Core rev: 581b43d7b3566624e6b17d516755d8e7a5142ebf)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Ross Burton
7c34751a0d oeqa/sdk/assimp: use helpers
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Ross Burton
2a2a38aa2c oeqa/sdk/case: add fundamental helper methods
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Jens Rehsack
ccf3c1ca49 avahi: avoid depending on skipped package
When built without D-Bus, libavahi-client is not build:
  Building libavahi-client:           no   (You need avahi-daemon and D-Bus!)
which causes avahi-dev RDEPENDS failing when creating an image
containing development-tools:
 *   - nothing provides libavahi-client = 0.7-r0 needed by avahi-dev-0.7-r0.cortexa8hf-neon

(From OE-Core rev: 319532792435be73e96c8319e90336e1298ac2a1)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Robert Yang
67628ea66b uboot-sign.bbclass: fix signature and deployment
Fixed:
MACHINE = "beaglebone-yocto"
KERNEL_CLASSES += "kernel-fitimage"
KERNEL_IMAGETYPE_beaglebone-yocto = "fitImage"
UBOOT_MACHINE_beaglebone-yocto = "am335x_boneblack_vboot_config"
UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000"
UBOOT_SIGN_KEYDIR = "${TOPDIR}/conf"
UBOOT_SIGN_KEYNAME = "dev"
UBOOT_SIGN_ENABLE = "1"
IMAGE_INSTALL_remove = "kernel-image-zimage"

$ cd conf
$ openssl genrsa -F4 -out dev.key 2048
$ openssl req -batch -new -x509 -key dev.key -out dev.crt
$ cd ../
$ bitbake u-boot linux-yocto
$ grep signature tmp/deploy/images/beaglebone-yocto/*.dtb
Binary file tmp/deploy/images/beaglebone-yocto/u-boot-beaglebone-yocto-2018.07-r0.dtb matches
Binary file tmp/deploy/images/beaglebone-yocto/u-boot-beaglebone-yocto.dtb matches
Binary file tmp/deploy/images/beaglebone-yocto/u-boot.dtb matches

And there would be no signature info when rebuild from sstate:
$ bitbake u-boot linux-yocto -cclean
$ bitbake u-boot linux-yocto
$ grep signature tmp/deploy/images/beaglebone-yocto/*.dtb
No result

This s because kernel directly edit ${DEPLOY_DIR_IMAGE}/u-boot.dtb, (Note, it
is global ${DEPLOY_DIR_IMAGE}, not recipe's DEPLOYDIR), so that the modified
info is not in sstate, and would be lost when rebuild from sstate.

There are other problems in previouse code:
- The u-boot.dtb is provided by u-boot, but edited by kernel during signing, so
  it should be deployed by kernel rather than u-boot.

- The u-boot.do_concat_dtb directly install files to global ${DEPLOY_DIR_IMAGE},
  this is incorrect, the ${DEPLOY_DIR_IMAGE} should be installed by do_deploy.

- It seems that it assumes do_deploy depends on do_install according the comments,
  but they have no relationships:
  # do_concat_dtb is scheduled _before_ do_install as it overwrite the
  # u-boot.bin in both DEPLOYDIR and DEPLOY_IMAGE_DIR.

- The do_concat_dtb should be run after do_compile, but it doesn't have this
  dependency.

Make u-boot install u-boot.dtb to ${datadir}, kernel copies u-boot.dtb from
${STAGING_DATADIR} to ${B} and deploy it can fix the problem.

[YOCTO #12112]

Reported-by: Christian Andersen <c.andersen@kostal.com>
(From OE-Core rev: 493f70cfb177f1d452a13329647a38642bf2b161)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Changqing Li
3eda00b42e strace: fix ptest fail and strip ptest host references
1. Add LDFLAGS_FOR_BUILD for strip host reference
2. Revert one previous replace operation for fix ptest fail.
   refer oe commit: 74b5088f1cc1708db43c33ac2dc7f01f4a4db9c1

(From OE-Core rev: e52eede3dfd7155e4e016734586b527932d1ef2a)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Kai Kang
7f84f42cf1 u-boot-tools: fix compile error
It uses sandbox_defconfig to produce u-boot tools. But EFI is only
supported by arm and x86, then it fails to run task do_compile on other
arches:

| include/config_distro_bootcmd.h:267:3: error: #error "sandbox EFI
| support is only supported on ARM and x86"

Only enable EFI support for u-boot-tools on x86 and arm to fix the issue.

(From OE-Core rev: f79039497a6bb8521d5dc076924b6eb2626607c5)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Hongxu Jia
ede2e5b4b3 glibc: improve reproducibility with multilib
Multilib builds specify several loaders which will end up embedded in
some binaries or script files. To support reproducible builds, we must
ensure the loaders are always in deterministic order.

[YOCTO #2655]
[YOCTO #12478]
[YOCTO #12480]

(From OE-Core rev: 3f839c0cdfe253677ebee47838fe476a0939e0aa)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>

Improve the fix and rebase it to 2.28

Here is the log of lib32-glibc
[log.do_compile]
|Adjust ldd script
|ldd "/lib64/ld-linux-x86-64.so.2 /lib/ld-linux.so.2 /lib/ld-linux.so.2
/lib64/ld-linux-x86-64.so.2" -> "/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2"
[log.do_compile]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Khem Raj
b71c20a8b0 recipeutils-test: Add missing LIC_FILES_CHKSUM
Fixes
ERROR: QA Issue: recipeutils-test: Recipe file fetches files and does
not have license file information (LIC_FILES_CHKSUM) [license-checksum]

(From OE-Core rev: ee65f7ab11302982124bcd1974a05c87342ab28e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Khem Raj
d5811e6835 libunwind: Enable building static archive on musl
This ensures that we have .a for libunwind on musl targets, this is used
for stack unwinding infra e.g. in rust

Help compiling rust compiler and standard library from meta-rust

(From OE-Core rev: 37ddab09f0ed9b532fb9ac57f622c8609121aa65)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Federico Sauter
6aef6271e1 kernel: don't assign the build user/host
The KBUILD_BUILD_USER and KBUILD_BUILD_HOST variables were
assigned at the kernel class level, which made it impossible
to override them in the local configuration.

By setting only the default values of those variables in the
kernel class, it is now possible to override them as expected.

(From OE-Core rev: a3e8cdf9c3ba966fa4b5a21235540eb0b00fb487)

Signed-off-by: Federico Sauter <federico.sauter@ableton.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Richard Purdie
559fe1a4d4 oeqa/selftest/runcmd: Increase timeout delta
Expecting 1s accuracy on a 2s timeout on a heavily loaded system has proven to be
unreliable. Update this to a 5s timeout with a 3s delta which should be achievable.

(From OE-Core rev: 5feecb639d49d72d8a6abc589b937e07ee72f252)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Joshua Watt
0fc667d695 image-buildinfo: Remove unused function argument
Removes the listvars argument to image_buildinfo_outputvars(). It
doesn't appear that this argument ever did anything.

(From OE-Core rev: 66ff9408291f3df98e8a6cb3e6e348d7ec8f401d)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Alex Kiernan
85bad95a08 kernel-fitimage: Replace tabs with spaces in python
Fix:

  WARNING: python should use 4 spaces indentation, but found tabs in kernel-fitimage.bbclass, line 24

(From OE-Core rev: 4ec42465e9df8cef20a97be11243726aa7dfb8c1)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Chen Qi
d3a94e5b9b oeqa/selftest/context: ensure log directory exists
Ensure log directory exists to avoid the following error.

  FileNotFoundError: [Errno 2] No such file or directory: '/.../build-selftest/tmp/log/oe-selftest-results-20181207043431.log'

(From OE-Core rev: 6c41de48db76087fee596d9440d8f05346ab1094)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Khem Raj
665ff32609 binutils: Fix build with clang
(From OE-Core rev: 208dadb8f1864aca88c69766f3bfb37a2ef4953c)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Ross Burton
78037fd610 libart-lgpl: remove
This is very dead, and nothing in oe-core or meta-oe depends on it anymore.

(From OE-Core rev: 508746e28d971952b1153a4c24ee3c5a020f9ee9)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Richard Purdie
6829a8990a bitbake.conf: Cleanup deprecated function usage
This function was moved in bitbake a long time ago, use the
preferred version to avoid a Deprecation warning.

(From OE-Core rev: aeb189ac8bc6625ec936fd69f18974ebde758946)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Richard Purdie
7843548285 classes: Correctly markup regex strings
There are various escape characters in these stings which python warns
about so use the correct regex markup for them.

(From OE-Core rev: 252b69c9f2abe3258366c540f56b156ed63e5437)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Richard Purdie
0985ac745f oeqa/selftest/esdk: Ensure parent directory exists
INFO - ======================================================================
INFO - ERROR: setUpClass (eSDK.oeSDKExtSelfTest)
INFO - ----------------------------------------------------------------------
INFO - Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/core/case.py", line 32, in _oeSetUpClass
    clss.setUpClassMethod()
  File "/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/selftest/cases/eSDK.py", line 76, in setUpClass
    cls.tmpdirobj = tempfile.TemporaryDirectory(prefix="selftest-esdk-", dir=bb_vars["WORKDIR"])
  File "/usr/lib/python3.5/tempfile.py", line 929, in __init__
    self.name = mkdtemp(suffix, prefix, dir)
  File "/usr/lib/python3.5/tempfile.py", line 507, in mkdtemp
    _os.mkdir(file, 0o700)
FileNotFoundError: [Errno 2] No such file or directory: '/home/pokybuild/yocto-worker/oe-selftest-debian/build/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/selftest-esdk-q7ln84gc'

(From OE-Core rev: 48719bc4d108df7e357e7f22f9f356cd72b3ebbd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Richard Purdie
e5c713acb0 bitbake: cache: Cleanup deprecated function usage
Remove a deprecated warning and stop using our own deprecated API!

(Bitbake rev: 83ece2c6f4b000e906fec9148f25bd1dff66cfb0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07 12:38:58 +00:00
Joshua Watt
e089fb1ae0 bitbake: siggen: Split out stampfile hash fetch
The mechanism used to get the hash for a stamp file is split out so that
it can be overridden by derived classes

[YOCTO #13030]

(Bitbake rev: ce241534d19b2f1c51dbdb3b92419676d234e464)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07 12:38:58 +00:00
Joshua Watt
86cc1a4104 bitbake: bitbake-worker: Pass taskhash as runtask parameter
Pass the task hash as a parameter to the 'runtask' message instead of
passing the entire dictionary of hashes when the worker is setup. This
is possible less efficient, but prevents the worker taskhashes from
being out of sync with the runqueue in the event that the taskhashes in
the runqueue change.

[YOCTO #13030]

(Bitbake rev: 1e86d8c1bec7ea5d016a5ad2097f999362e29033)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07 12:38:58 +00:00
Joshua Watt
7509b5ee05 bitbake: persist_data: Disable enable_shared_cache
Turns off the shared cache. It isn't a significant factor in performance
(now that WAL is enabled), and is a really bad idea to have enabled in
processes that fork() (as bitbake it prone to do).

[YOCTO #13030]

(Bitbake rev: 71b427bf01374973a971c10cb64024c8ef2a11eb)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07 12:38:58 +00:00
Joshua Watt
09b4de78f2 bitbake: persist_data: Enable Write Ahead Log
Enabling the write ahead log improves database reliability, speeds up
writes (since they mostly happen sequentially), and speeds up readers
(since they are no longer blocked by most write operations). The
persistent database is very read heavy, so the auto-checkpoint size is
reduced from the default (usually 1000) to 100 so that reads remain
fast.

[YOCTO #13030]

(Bitbake rev: 79100fa67539f9654af9bf6d3e6842eb5c12e989)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07 12:38:58 +00:00
Joshua Watt
549eccc0db bitbake: persist_data: Add key constraints
Constructs the "key" column in the persistent database as a non-NULL
primary key. This significantly speeds up lookup operations in large
databases.

[YOCTO #13030]

(Bitbake rev: f5ba7775cfcb90401522d977cc66fe0f5aeb7a66)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07 12:38:58 +00:00
Joshua Watt
7afa726bec bitbake: persist_data: Fix leaking cursors causing deadlock
The original implementation of persistent data executed all SQL
statements via sqlite3.Connection.execute(). Behind the scenes, this
function created a sqlite3 Cursor object, executed the statement, then
returned the cursor. However, the implementation did not account for
this and failed to close the cursor object when it was done. The cursor
would eventually be closed when the garbage collector got around to
destroying it. However, sqlite has a limit on the number of cursors that
can exist at any given time, and once this limit is reached it will
block a query to wait for a cursor to be destroyed. Under heavy database
queries, this can result in Python deadlocking with itself, since the
SQL query will block waiting for a free cursor, but Python can no longer
run garbage collection (as it is blocked) to free one.

This restructures the SQLTable class to use two decorators to aid in
performing actions correctly. The first decorator (@retry) wraps a
member function in the retry logic that automatically restarts the
function in the event that the database is locked.

The second decorator (@transaction) wraps the function so that it occurs
in a database transaction, which will automatically COMMIT the changes
on success and ROLLBACK on failure. This function additionally creates
an explicit cursor, passes it to the wrapped function, and cleans it up
when the function is finished.

Note that it is still possible to leak cursors when iterating. This is
much less frequent, but can still be mitigated by wrapping the iteration
in a `with` statement:

 with db.iteritems() as it:
     for (k, v) in it:
         ...

As a side effect, since most statements are wrapped in a transaction,
setting the isolation_level when the connection is created is no longer
necessary.

[YOCTO #13030]

(Bitbake rev: e8b9d3f534ef404780be23b601d5a4bb9cec928a)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07 12:38:58 +00:00
Richard Purdie
6f2ef620d9 oeqa/selftest/esdk: Fix typo causing test failure
2018-12-06 23:19:24,564 - oe-selftest - INFO - Traceback (most recent call last):
  File "/media/build1/poky-sumo/meta/lib/oeqa/core/case.py", line 32, in _oeSetUpClass
    clss.setUpClassMethod()
  File "/media/build1/poky-sumo/meta/lib/oeqa/selftest/cases/eSDK.py", line 78, in setUpClass
    cls.tmpdir_eSDKQA = cls.tempdirobj.name
AttributeError: type object 'oeSDKExtSelfTest' has no attribute 'tempdirobj'

(From OE-Core rev: c6de27c2f6f598849dcb8036ee849f449ba7f327)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-06 23:27:50 +00:00
Hong Liu
aa93957c83 tcl: Upgrade to 8.6.9
Upgrade tcl from 8.6.8 to 8.6.9.

(From OE-Core rev: bbe5099ba78369dac861d78e056eb07d1fe6c9d2)

Signed-off-by: Hong Liu <hongl.fnst@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 22:30:19 +00:00
Chen Qi
9661c03d68 at: upgrade to 3.1.23
The following patches are rebased.

  fix_parallel_build_error.patch
  pam.conf.patch

(From OE-Core rev: 30fa97ec4c9d0553f1566bc26a6949e93cb6da90)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 22:30:19 +00:00
Chen Qi
8a0fb932e9 sysstat: upgrade to 12.1.1
(From OE-Core rev: af912ac17f406ff11319eb33bc0d3910bcea39ef)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 22:30:19 +00:00
Chen Qi
29e20d031f cups: upgrade to 2.2.9
The following patch is rebased.

  0001-don-t-try-to-run-generated-binaries.patch

(From OE-Core rev: ee57d79aec06e9b160cf2713636cda650ba68d5a)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 22:30:19 +00:00
Chen Qi
ccfeb253c5 sudo: upgrade to 1.8.26
License-Update: include more files to check, but license remains the same.

(From OE-Core rev: ad0f26263eb51cda4cf96cd2fe7f6e7f950b9e8e)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 22:30:19 +00:00
Kai Kang
a035221691 packages: respect PACKAGE_NO_GCONV
PACKAGE_NO_GCONV is set in libc-package.bbclass if not all of
'libc-charsets libc-locale-code libc-locales' included in
DISTRO_FEATURES. And then no packages glibc-gconv-* glibc-charmap-* and
glibc-localedata-* is created. Update recipes and conf file which depend
on these packages to check required distro features.

(From OE-Core rev: 58446992de0f16a345f1f55b66d0d34d31dc341b)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 22:30:19 +00:00
Kai Kang
3a439047bf image.bbclass: respect PACKAGE_NO_GCONV
It installs locale-base-* packages according to var IMAGE_LINGUAS.
Packages locale-base-* are split in libc-package.bbclass if variable
PACKAGE_NO_GCONV is not set. When none of ditro features libc-charsets
libc-locales and libc-locale-code is set, PACKAGE_NO_GCONV is set. Then
no locale-base-* is created and fails to create image.

Clear IMAGE_LINGUAS in such situation.

(From OE-Core rev: 85240094175a8ea726bfba19c00d4556a62862fc)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 22:30:19 +00:00
Kai Kang
7291426ed5 glibc-locale: fix installed-vs-shipped qa issue
Variable PACKAGE_NO_GCONV is set in libc-package.bbclass when none of
libc-charsets, libc-locales and libc-locale-code set in DISTRO_FEATURES.
Then it causes installed-vs-shipped qa issue of glibc-locale:

| ERROR: glibc-locale-2.28-r0 do_package: QA Issue: glibc-locale:
| Files/directories were installed but not shipped in any package:
|   /usr/share/i18n
|   /usr/share/i18n/charmaps
|   /usr/share/i18n/locales
|   /usr/share/i18n/charmaps/CP737.gz
|   ...
|   /usr/share/i18n/locales/ru_RU
|   ...
|   /usr/lib64/gconv/gconv-modules
| Please set FILES such that these items are packaged. Alternatively if they
| are unneeded, avoid installing them or delete them within do_install.
| glibc-locale: 843 installed and not shipped files. [installed-vs-shipped]

So check PACKAGE_NO_GCONV during do_install and not copy those files if
PACKAGE_NO_GCONV has been set.

Simplify call of bb.utils.contains() in libc-package.bbclass as well.

(From OE-Core rev: 39840ed10af559bbcc306b378baa4723921668f5)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 22:30:19 +00:00
Hongxu Jia
e67349dd55 autoconf-doc: improve reproducibility
autoconf-doc package contains autoconf.info.
This file contains date when this file was created, i.e:

     "This manual (31 January 2018) .."

Therefore, two builds done on two different days will show different dates for
otherwise identical files, hence breaking reproducibility.
The date is obtained from mtime of "autoconf.texi", unfortunately we patch this
file and change the mtime as a consequence.
We restore reproducibility by removing the patch modifying "autoconf.texi".
As a consequence certain supplemental information will be not added to the documentation.
In particular:  more details on usage, and on workarounds for non-updated projects.

[YOCTO #12524]

(From OE-Core rev: 1eaa918ae3663e3f863c025744a9ced0300b6b78)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>

With applying this fix:

    "This manual (24 April 2012) .."

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 22:30:19 +00:00
Joshua Watt
794a60191b classes/waf: Fix builds when B != S
Waf requires that the current working directory be ${S} (the location of
the wscript) when building. Most of the time, this was true only because
B defaults to S. However, anything that changed that behavior (notably,
using externalsrc) would break the recipe. Remedy this by explicitly
changing cwd to ${S} when running waf commands. As a happy side effect,
B can be set up for "out of tree" builds to keep the source directory
clean.

(From OE-Core rev: 62dffb71ce22222c635bd90eaa47dd01f70f9c0f)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 22:30:19 +00:00
Richard Purdie
5806b4cbd8 bitbake: main: Don't use print() directly, use logger
Avoid failures like:

2018-12-04 03:30:56,033 - oe-selftest - INFO - ======================================================================
2018-12-04 03:30:56,033 - oe-selftest - INFO - FAIL: pkgdata.OePkgdataUtilTests.test_find_path (subunit.RemotedTestCase)
2018-12-04 03:30:56,033 - oe-selftest - INFO - ----------------------------------------------------------------------
2018-12-04 03:30:56,033 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
[...]
AssertionError: 'Previous bitbake instance shutting down?,[77 chars]xist' != 'ERROR: Unable to find any package produci[14 chars]xist'
- Previous bitbake instance shutting down?, waiting to retry...
  ERROR: Unable to find any package producing path /not/exist

We need to use the logger so output is correctly handled in such cases.

(Bitbake rev: b5686fc07d06e1f0a55161b5ebcec6552d74ceff)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 13:11:27 +00:00
Richard Purdie
afe797a277 bitbake: process: Flush key output to logs
Small tweak to ensure these items are printed into the log since there
is other logging code which looks for the header and this makes it clearer
the server did start but is slow somewhere in startup.

(Bitbake rev: 7c0b84cac892744225fa0462f918ea9a79b356cb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 13:11:27 +00:00
Richard Purdie
5610acda80 bitbake: server/process: Handle short reads
Its possible the read may return a smaller number of characters. Remove
the possibility by using a single character to signal the server is ready.

(Bitbake rev: 767c9596d129d21ddf5d2e00c55f0a0525c641dc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 13:11:27 +00:00
Richard Purdie
b9439e0255 bitbake: server/process: Make lockfile handling clearer
This simplifies the code and makes it easier to read but has the
same functionality.

(Bitbake rev: a0b9cfaf2d03fd047a79d32e668001718d02c4bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 13:11:27 +00:00
Robert Yang
f7060a4399 bitbake: bitbake: BBHandler: Check tab indentation for python code
The previous check was in data.py which only can check code like "python
funcname()" in the dependency chain, but there are 3 kinds of python functions:
  - python()
  - def py_funcname()
  - python funcname()

Add the checking to BBHandler to check and warn for all of them.

The warning looks like:
WARNING: /path/to/recipes-core/busybox/busybox_1.29.2.bb: python should use 4 spaces indentation, but found tabs in busybox.inc, line 75

(Bitbake rev: 0cdc5b81fc1f5e5281a525a657e420ebc3bb9e90)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 13:04:54 +00:00
Robert Yang
eff9942d30 uboot-sign.bbclass: Remove tab indentations in python code
Use 4 spaces to replace a tab.

(From OE-Core rev: 790828a65316fee57cd7659ad8b7544de5d2610c)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 13:04:23 +00:00
Ross Burton
13dd62344b oeqa/selftest/esdk: run selftest inside workdir not /tmp
We've seen issues with rootfs size calculations and we've seen systems
like opensuse which have btrfs mounted on /tmp causing selftest failures.

(From OE-Core rev: 61be3cd748d1b7321a1fc4cfe84efa9b26a6aee0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
affd7388f3 oeqa: don't litter /tmp with temporary directories
If we need to create a temporary directory in targetbuild or buildproject use
tempfile.TemporaryDirectory so that when the test case is finished, the
directory is deleted.

Also synchronise the logic and don't possibly store the temporary directory in
self.tmpdir as nothing uses that.

(From OE-Core rev: db0e658097130d146752785d0d45f46a3e0bad71)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Richard Purdie
8cd28e2f3f oeqa/utils/qemurunner: Avoid tracebacks on closed files
Reorder the shutdown/teardown to avoid:

  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/utils/qemurunner.py", line 224, in launch
    op = self.getOutput(output)
  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/utils/qemurunner.py", line 90, in getOutput
    fl = fcntl.fcntl(o, fcntl.F_GETFL)
ValueError: I/O operation on closed file

(From OE-Core rev: 8e7d756862d2a8d62f3c87497d6d65ddb3c1b962)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Richard Purdie
f24df3f8b2 oeqa/selftest/runqemu: Improve testcase failure handling
assertTrue doesn't give good debug information when things fail. Update
several to use assertIn which gives information upon failure, for the
others print the log information upon failure.

(From OE-Core rev: c29cb75d5ce6b0873a934f4709b0c8824f7164d3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Richard Purdie
d8d5199e66 lib/oe/utils: Improve multiprocess_lauch exception handling
We've seen a cryptic:

"ERROR: Fatal errors occurred in subprocesses, tracebacks printed above"

message from oe-selftest with no other traceback information. Improve the
traceback logging to try and give a better indication of any errors that is
ocurring.

(From OE-Core rev: 521dd3d00979a27b6932e58d5497de68abac26e1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
ba89e87d8e python3: drop redundant patch
This patch altered the clean target's behaviour to skip the ipkg-install
directory.  However this directory isn't created by opkg, opkg-utils, or the
package_ipk class; and we don't invoke the clean target as we perform
out-of-tree builds.

(From OE-Core rev: 9f8bd475701e5d797d3ffc1ba97647101ba0b9b0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
dda336cbbb python3: don't cripple target distutils
We stop distutils for *native* Python from rewriting hashbangs when installing
(so installed scripts don't have a hashbang that refers to sysroot paths), but
this isn't needed nor desirable for the *target* Python.

(From OE-Core rev: 52e128619803907c804d42815ea979b1848529c4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Zheng Ruoqin
2218fe92a3 nss: Fix SHA_HTONL bug for arm 32be.
Rpm use nss as digest crypto library and which will cause an error as follows:

error: test-manual-1.2.3-20181012.noarch.rpm: Header SHA1 digest: BAD (Expected
f1deb7dc4a10742d88ccd1e967dbc62ae45095a5 !=4ad9d7dad6d70d6086eefec62612ad5d77f2fe81)  => this value is wrong
error: test-manual-1.2.3-20181012.noarch.rpm: not an rpm package (or package manifest)

The error is caused by SHA_HTONL in nss, for there is no need to reverse the host value for arm 32be, so fix it.

(From OE-Core rev: 50a554a8ffff0bb34f844fb6cb9dd69362caafa5)

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Alexey Brodkin
84986d45b7 gdb: Remove long ago upstreamed patch
This fix was upstreamed a long ago, see [1].

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=37ce4055fe907b9edd25498dcda7a133dbd19784

(From OE-Core rev: 873507c0cbbf1f7ef22d1cb9dcb0e2b167460490)

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Khem Raj
006f665af1 valgrind: Skip vgpreload_memcheck shared object from stripping
This is a special library for memcheck tool, where it needs to have the
symbols intact for the stack traces to work on target, current option is
to install valgrind-dbg ( 151 MB uncompressed ) is quite big for some
systems which may not have space to install it all. Leaving it
unstripped adds about 200KB to image which is much better, this alone
gets memcheck working, as an aside we might need same solution for other
tools e.g. helgrind etc. when needed, they also have leading libraries
installed

(From OE-Core rev: 23da8f50b1e0a74777035c9f7b65b81456908f9f)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Joshua Watt
645493af37 classes/icecc.bbclass: Fix ccache disable
The ccache disable flag was misspelled, preventing it from being
disabled.

(From OE-Core rev: 33fba601a7365aced9f4b206c1fadda997076d4c)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
André Draszik
2e7141a785 util-linux: split out blkdiscard into its own package
For systems that don't otherwise depend on the full
util-linux package, blkdiscard is a mere 18k (on
cortexa7t2hf-neon).

(From OE-Core rev: 96bfdea8e0ec891b44fc4b0c69120669954426ad)

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
71460428e4 patchreview: Various fixes/improvements
Add various fixes and improvements including the ability to export
patch statsitics as json data.

(From OE-Core rev: aa4a4b3ca799948047337e006ee9bf482be7b409)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
be0b9a3a81 insane: Clarify GNU_HASH warning
We have a fatal error if ELF objects don't have GNU_HASH segments but it
doesn't explain what the problem is.  At least give a hint to users by
suggesting that LDFLAGS wasn't passed to the compiler.

(From OE-Core rev: 5d4da6713b40e10e853eb746f700096307ffe158)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
André Draszik
491d4833f5 linux-firmware: better packaging for TI wl12xx & wl18xx firmwares
Currently, the linux-firmware-wl12xx contains all wl12xx and
wl18xx firmwares, except for the wl18xx compatibility symlinks
for old kernels and the linux-firmware-wl18xx contains just
those compatibility symlinks and nothing else. This doesn't
make sense...

Be more specific about what to package into each package, in
particular because the existing wl12xx package is specific
about symlinks already.

At the same time, we split the common bits into a -wlcommon
package, so that the wl18xx package doesn't need to depend
on all the wl12xx firmwares, saving several MiB in the file
system.

(From OE-Core rev: e4423eef71c463efe7a1cdf1a426cc9619c78b8a)

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Otavio Salvador
7117dda864 linux-firmware: Bump revision to 1baa348
This adds following changes:

1baa348 Merge branch 'nxp_mc' of https://github.com/NXP/linux-firmware
c7ba355 qed: Add 8.37.7.0 firmware image
1cb4e51 amdgpu: add raven dmcu firmware
aa71b2d amdgpu: update raven firmware to 18.40
fcd5a5f amdgpu: update fiji firmware to 18.40
453caa3 amdgpu: update tonga firmware to 18.40
7ceb224 amdgpu: update carrizo firmware to 18.40
a136e78 amdgpu: update polaris10 firmware to 18.40
ac5f8bd amdgpu: update vega10 firmware to 18.40
8d3825c linux-firmware: add firmware for mt7650e
96d6db5 linux-firmware: add MC firmware for NXP DPAA2 SoCs
d877533 linux-firmware: liquidio: fix GPL compliance issue
2618544 linux-firmware: Update firmware file for Intel Bluetooth,8265
c34a52a linux-firmware: Update firmware patch for Intel Bluetooth 8260
d8e8163 linux-firmware: Update firmware file for Intel Bluetooth,9260
66b58d4 linux-firmware: Update firmware file for Intel Bluetooth,9560
50b8b0b linux-firmware: add firmware for mt7610e
de9cefa Merge branch 'firmware-update' of https://github.com/01org/opa-firmware
951cd9e Merge branch 'ath10k-20181010' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/linux-firmware
c6398e3 Update Intel OPA hfi1 firmware
eaceb79 ath10k: QCA9984 hw1.0: update board-2.bin
a00e61b ath10k: QCA9984 hw1.0: update firmware-5.bin to 10.4-3.6.0.1-00003
50d4180 ath10k: QCA988X hw2.0: update firmware-5.bin to 10.2.4-1.0-00041
427d31d ath10k: QCA9888 hw2.0: update board-2.bin
d87e815 ath10k: QCA9888 hw2.0: update firmware-5.bin to 10.4-3.6-00140
097bbdf ath10k: QCA9887 hw1.0: update firmware-5.bin to 10.2.4-1.0-00041
3e2e5d3 ath10k: QCA9377 hw1.0: add firmware-6.bin to WLAN.TF.2.1-00021-QCARMSWP-1
a87eb5f ath10k: QCA6174 hw3.0: update firmware-6.bin to RM.4.4.1.c2-00057-QCARMSWP-1
14024d3 ath10k: QCA4019 hw1.0: update board-2.bin
2ac415e ath10k: QCA4019 hw1.0: update firmware-5.bin to 10.4-3.6-00140
f503e1d nfp: Add Agilio BPF firmware rev 2.0.6.124
c6b6265 Merge tag 'iwlwifi-fw-2018-10-03' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware
338684a rtw88: Add firmware file for driver rtw88
68a4930 nfp: update Agilio SmartNIC flower firmware to rev AOTC-2.9.A.37
da110f2 iwlwifi: add -41.ucode firmwares for 9000 series
b1ac8f4 iwlwifi: update firmwares for 9000 series
58265e0 iwlwifi: update firmwares for 7000, 8000 and 9000 series
dc638d6 nfp: update Agilio SmartNIC firmware to rev 2.1.13
7c81f23 ti-connectivity: add firmware for CC2560(A) Bluetooth
f0a1cbf linux-firmware: mediatek: add firmware for mt7668u Bluetooth
eb6419c nvidia: add GV100 signed firmware
1ab9095 Merge git://git.marvell.com/mwifiex-firmware
2ddd8f0 Merge branch 'master' of https://github.com/bgodavar/qca_rome_firmware
18c4c8a firmware/icl/dmc: Add v1.07 of DMC for Icelake
52b23a9 linux-firmware: add Marvell SD8997 firmware image
534daf4 qca: update BT firmware files for QCA ROME chip.

License-Update: new firmware files additions
(From OE-Core rev: f1638d3acbabe43f4909a6dc8de6158e1d8cb439)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Christophe PRIOUZEAU
5d10ff7e0f openssl: correct bad path on package preprocess
In case of SDK generation, /usr/bin/ path are not correct
and must be replaced by ${bindir}.

(From OE-Core rev: 0fa7d99444763192914e798d8bc9dba1d9cdae42)

Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
f3cfd39ac6 piglit: upgrade to current HEAD
(From OE-Core rev: 1785be8220d8790ffdabfbc30e58244aae6400cc)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
16ddae1172 ruby: upgrade 2.5.1 -> 2.5.3
(From OE-Core rev: 17a8576375fadbfa44e9272a942bf12887b5e1a2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
96eba17645 libevdev: upgrade 1.5.9 -> 1.6.0
(From OE-Core rev: 0037321e4a009d0af76ff643f169d1b1e92feca7)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
b614ed391b gnutls: no need to inherit binconfig
This recipe doesn't ship a *-config binary, so don't inherit binconfig.

(From OE-Core rev: acfcebec2d0849cc52abed31663da888e2a230f9)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
bd57916ae5 gnome-desktop-testing: upgrade to 2018.1
Drop backported and obsolete patches.

Respect systemd DISTRO_FEATURE when enabling/disabling journal support.

(From OE-Core rev: 33d2cee29758d2a827baa2dda98b10c993101be2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Alexander Kanavin
185f1d99fd gobject-introspection.bbclass: add libdir to XDG_DATA_DIRS
Otherwise .gir files installed in the sysroot will not be found when multilib is in use
(multilib configurations use libdir rather than datadir).

(From OE-Core rev: cfae171964ba85298d883e70635324a33b8539ac)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Alexander Kanavin
a72b52b405 gobject-introspection: add a missing patch that was overlooked when adding meson support
This should also fix Rygel builds in meta-oe

(From OE-Core rev: 8332fe551f018339b93841609625121145e97684)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
367df47d37 oeqa/oelib/path: don't leak temporary directories
setUp() is used to populate a directory of temporary files, and deleted in
__del__.  However setUp() is called once *per test* so __del__ would only be
able to remove the last directory created.

Fix the code by using the natural counterpart to setUp, tearDown(), to clean up.

(From OE-Core rev: 68b4723e6fb11d171869185bccf28f32f6284c18)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
b7ffedc262 cpio: update patch to merged version
The segfault on append was fixed upstream with a different patch, so apply that
instead.

(From OE-Core rev: 24000d1fdba2684202e15371f80bb385722c9d91)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Ross Burton
65d17cd92c mdadm: add back lost Upstream-Status tags
(From OE-Core rev: ffde22a3a78c0333f42e8bc9bad633ef279f11ca)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05 12:37:02 +00:00
Alexander Kanavin
016e3dda2d btrfs-tools: update to 4.19
Add a backported patch to fix big endian compilation.

(From OE-Core rev: 9f5f4b31df01a29fd07ce27efc7534b4ea29a778)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Khem Raj
1305199d7e musl: Update to latest trunk
Complete changelogs are here
https://git.musl-libc.org/cgit/musl/log/?qt=range&q=c50985d5c8e316c5c464f352e79eeebfed1121a9..39ef612aa193cc6e954ac5a01574300ccd4b7ef9

(From OE-Core rev: e0564cbd6c824ba9ee1ed20a261261228fb594e3)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Khem Raj
e792fdbfb9 nfs-utils: Fix exportfs segfault on musl
(From OE-Core rev: c5c0342908ca81aacfe3cba1427fa77751bed53b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Khem Raj
b5ff76a701 nfs-utils: Upgrade to 2.3.3
enhance the musl-only patch to degrade certain Werros into Warnings
which helps in compiling on musl, since its checking for __GLIBC__
defines which are undefined on musl.

fix build on x32 ABI

(From OE-Core rev: 61290f91e6667e1e494f6d9cb8c19ebecda122b5)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Ross Burton
fefe59b2e6 oeqa/sdk/python: add Python 2 and fix detection
Add a Python 2 form to exercise that if present, and fix the setUp() so it
actually looks for a package that exists (nativesdk-python3 is a virtual
package, the interpretter is in nativesdk-python3-core).

(From OE-Core rev: d286c2ad3eec24978557e16a8fa599476791109f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Joshua Watt
9775741a20 classes/update-alternatives: Skip alternatives when disabled
Skips the update alternative steps for recipes that shouldn't have them
enabled.

Fixes errors like:

 nativesdk-bzip2-1.0.6-r5 do_package: bzip2: alternative target
 (/opt/poky/2.5+snapshot/sysroots/i686-pokysdk-mingw32/usr/bin/bunzip2
 or
 /opt/poky/2.5+snapshot/sysroots/i686-pokysdk-mingw32/usr/bin/bunzip2.bzip2)
 does not exist, skipping...

When building mingw SDKs

[YOCTO #12962]

(From OE-Core rev: d11576f569ee618a8e638eee3b1f17bf8a9d4264)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Douglas Royds
42fedcd96f attr: Strip build host paths and tool versions from ptest files
Using the new PTEST_BUILD_HOST_FILES mechanism.
Specifically remove reference to build host rpm version, if any.

(From OE-Core rev: 2664926ff154aacfb274e3055e81ba41190fa403)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Douglas Royds
ea9f050cbc acl: Strip build host tool details from installed ptest file
Adopt the PTEST_BUILD_HOST_FILES mechanism to strip build host paths from the
installed builddefs file. Also strip the record of the build host rpm version.

(From OE-Core rev: 800953bcd4ce9c4e4f768bc0de504b91d5be99cb)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Douglas Royds
fc5d914379 acl: Use install instead of cp
(From OE-Core rev: df65ec47a8743aab2e06f920539a6d79b2d65b54)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Douglas Royds
916f9d2eb2 strace: Strip build host tool details from installed ptest Makefile
Adopt new PTEST_BUILD_HOST_PATTERN mechanism.

(From OE-Core rev: f6ba7888138b6acecd3335cbfc3fa51272d69e57)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Douglas Royds
8e02319bd0 openssl: Strip perl version from installed ptest configdata.pm file
(From OE-Core rev: fab0f5162b930f87798be61359a5c287fb13a76c)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Douglas Royds
66bf9cb3ac openssl ptest: Strip build host paths from configdata.pm
This file contains CC, CPP, CFLAGS, CXXFLAGS and the like.

(From OE-Core rev: c423cd1070045849c3a5b4e2b53043b28e5194f7)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Douglas Royds
fa424823b6 ptest: Optionally strip build host tool info from installed files
Several packages (eg. acl, attr, openssl) install Makefiles or other build host
configuration files for ptest so that they can run `make check`, for instance.
These build host files commonly include paths and versions of build host tools,
(eg. rpm or perl) whose presence and version depends on the build host distro.

Optionally strip lines from installed PTEST_BUILD_HOST_FILES using an
extended regex pattern defined in PTEST_BUILD_HOST_PATTERN. This has no
effect on the on-target ptest.

(From OE-Core rev: a3b657470eeea9f1954bc3a3e593a5c4907b6f17)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Douglas Royds
d3d09bd064 ptest: Reproducibility: Strip build host paths from any installed Makefile
A common pattern for ptest is to install a Makefile that provides a make check
target. These generated Makefiles are normally full of build host paths, to
hosttools, and to files and scripts within the source or build tree. They also
commonly include the CFLAGS and CPPFLAGS. None of these build host paths
can possibly work on-target, so stripping them has no effect on the success of
the resulting ptests.

Stripping the HOSTTOOLS_DIR has this effect, for instance:

    -MKDIR_P = /home/douglas/workspace/upstream/build/tmp/hosttools/mkdir -p
    +MKDIR_P = mkdir -p

The curious WORKDIR/*= pattern avoids non-parseable -fdebug-prefix-map patterns
in the CFLAGS by adding an arbitrary ".", eg:

    -fdebug-prefix-map=.=/usr/src/debug/rsyslog/8.37.0-r0

In all other cases, we simply remove the WORKDIR, eg:

    CPP = arm-tait-linux-gnueabi-gcc -E --sysroot=recipe-sysroot ...

(From OE-Core rev: 137e38dbae42e9d4d413cd2f9460fb707ca77f9c)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Paul Eggleton
5cd79e8147 oe-selftest: add some tests for recipeutils module
Add some tests for functions in meta/lib/oe/recipeutils.py, in
particular for a few issues I've just fixed. I haven't added tests for
all of the functions - some of them are already being tested via devtool
in any case.

(From OE-Core rev: 72d0cb3f8f1e69aeef93ea0bc90db3e8b8d6f94c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:00 +00:00
Paul Eggleton
1c0a6cdf42 lib/oe/recipeutils: drop obsolete functions
These date from the time before Tinfoil's API covered this functionality
(back when you could actually access cooker from a tinfoil-based
script).

(From OE-Core rev: fc8098756e8d1d995e3c68e4addc1a5e3596d2ae)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:00 +00:00
Paul Eggleton
f1ca6f73eb lib/oe/recipeutils: patch_recipe(): fix replacing varflag values
The code here wasn't correctly getting the variable history for
varflags, so for example if you did a devtool upgrade on a recipe where
the SRC_URI checksums were in the .inc file (typical for python recipes
in order to support both python 2 and 3) then after the upgrade the
new values would be set in the recipe and the old values were left in
the .inc, which is not right. Teach the code here how to get the history
for varflags so it works properly.

(From OE-Core rev: f077ab3ad67b2f3eb4aa8882fe2e7aef2d09a26c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:00 +00:00
Paul Eggleton
15fb7acb77 lib/oe/recipeutils: patch_recipe(): fix handling of values across includes/classes
If we were setting a variable and part of the variable's value was being
set in a class or a .inc file, we were still just setting the value
outright on the assumption that it was too hard to do otherwise. With
some careful use of the variable history we can do better for certain
situations i.e. when the recipe does not currently set the value
outright.

Additionally, correctly remove _appends for variables we are changing if
we're trying to remove the value added in the _append.

Fixes [YOCTO #12623] and partially fixes [YOCTO #9360].

(From OE-Core rev: f798d963db77db66a2a5a4b8d4c157d46ede417f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:00 +00:00
Peter Kjellerstedt
aeb6c44af7 meson: Correct use of the _append operator
The value to SRC_URI_append_class-native was not prefixed with a space.
This was not noticed as the SRC_URI before applying the _append contains
trailing spaces. However, if one, e.g., has a .bbappend and adds to the
SRC_URI using SRC_URI += "file://foo.patch", then there no longer is any
trailing space and the _append concatenates the two URIs together,
leading to a build failue.

(From OE-Core rev: c07ee11e99dfe28405a7225903a541b33aeb1de6)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:00 +00:00
Khem Raj
7faf6a00ba local.conf.sample: Update the sample config as per new migration manual
Syncs with oe-core and the documentation
https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-TESTIMAGE_AUTO
https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#migration-2.6-automatic-testing-changes

(From meta-yocto rev: 1d180bc08eb6b46be4127d0b1a067b0fb92544d5)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:44:57 +00:00
Richard Purdie
d0e43bb3f0 libmodulemd: Extend to nativesdk
Avoids universe fetch warnings:

WARNING: Nothing PROVIDES 'nativesdk-libmodulemd' (but virtual:nativesdk:/home/pokybuild/yocto-worker/build-appliance/build/meta/recipes-devtools/libdnf/libdnf_0.22.3.bb DEPENDS on or otherwise requires it). Close matches:
WARNING: Nothing RPROVIDES 'nativesdk-libdnf-dev' (but virtual:nativesdk:/home/pokybuild/yocto-worker/build-appliance/build/meta/recipes-devtools/libdnf/libdnf_0.22.3.bb RDEPENDS on or otherwise requires it)
WARNING: Nothing RPROVIDES 'nativesdk-libdnf' (but virtual:nativesdk:/home/pokybuild/yocto-worker/build-appliance/build/meta/recipes-devtools/libdnf/libdnf_0.22.3.bb RDEPENDS on or otherwise requires it)
WARNING: Nothing RPROVIDES 'nativesdk-dnf' (but virtual:nativesdk:/home/pokybuild/yocto-worker/build-appliance/build/meta/recipes-devtools/dnf/dnf_4.0.9.bb RDEPENDS on or otherwise requires it)
WARNING: Nothing RPROVIDES 'nativesdk-dnf-dev' (but virtual:nativesdk:/home/pokybuild/yocto-worker/build-appliance/build/meta/recipes-devtools/dnf/dnf_4.0.9.bb RDEPENDS on or otherwise requires it)

(From OE-Core rev: 3d89f6a8337b6dc3867b5472713ac2c482b9f260)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:37 +00:00
Eric Chanudet
dea60666ab licence: Add license file CC-BY-SA-4.0
Original legalcode.txt:
https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt

(From OE-Core rev: fa06fcce7942f5960178dcdeb61a7b659f7f8207)

Signed-off-by: Eric Chanudet <chanudete@ainfosec.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:37 +00:00
Ross Burton
f473c365d9 ltp: add missing patch Upstream-Status
(From OE-Core rev: a6ca465d0981f25723b4ff93a2731e87fb20bd49)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:37 +00:00
Ross Burton
9f33f5f265 piglit: add missing waffle-bin dependency
The sanity test uses wflinfo, so depend on waffle-bin.

(From OE-Core rev: 0f5c8ce010a296904f767f38e262eef251417c4e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:37 +00:00
Ross Burton
22fe4e27ec binconfig: only try to mangles files
If a file matches the glob that is an absolute symlink then sed will try to
alter files on the host, so restrict the search to just actual files.

(From OE-Core rev: 5556b5ca9efac132754bd82af52a0f68bc4ce85a)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:37 +00:00
Anuj Mittal
67f5aac7df gstreamer1.0-vaapi: downgrade vaapisink to marginal rank
Using vaapisink (which doesn't supports DRI3 [1] and uses DRI2) with
default poky configuration currently results in an unresponsive display
because DRI2 rendering doesn't work (as of xserver 1.20.3) in non-composited
environments [2].

Downgrade vaapisink to marginal for now so playbin (and in turn gst-play
and gtk-play examples) uses next best sink element and works out of box.

[1] https://github.com/intel/libva/issues/122
[2] https://gitlab.freedesktop.org/xorg/xserver/issues/13

(From OE-Core rev: 7911039a3a82a29166f3be2ff5bdd719430e5a80)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:37 +00:00
Alexander Kanavin
b8c3449613 libc-package: fix postinst error when ENABLE_BINARY_LOCALE_GENERATION = "0"
[YOCTO #13028]

(From OE-Core rev: f630da64b010795482e013362c3fe184dcbd8d25)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:37 +00:00
Alejandro Enedino Hernandez Samaniego
8627773268 python: Adds instructions to the manifest file
While there is a bit of documentation regarding building a new
manifest file for python, it seems that users usually only read
the manifest file.

The manifest file is in JSON format which doesn't allow comments,
hence why instructions were initially put elsewhere.

This patch hacks the call to open the JSON manifest file by using a
marker to trick it into reading only part of the file as the manifest
itself, and keep the other part as comments, which contain instructions
for the user to run the create_manifest task after an upgrade or
when adding a new package.

(From OE-Core rev: 5641a24a70b54544012c04c6a082514d9a5aa49a)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:37 +00:00
Alejandro Enedino Hernandez Samaniego
6c524c0906 python3: Adds instructions to the manifest file
While there is a bit of documentation regarding building a new
manifest file for python, it seems that users usually only read
the manifest file.

The manifest file is in JSON format which doesn't allow comments,
hence why instructions were initially put elsewhere.

This patch hacks the call to open the JSON manifest file by using a
marker to trick it into reading only part of the file as the manifest
itself, and keep the other part as comments, which contain instructions
for the user to run the create_manifest task after an upgrade or when
adding a new package.

(From OE-Core rev: 3eab24c6dc095fd2305b9be8467aab1191141e35)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:37 +00:00
Ross Burton
a1e2c4e9bd libtasn1: no need to inherit binconfig
This recipe doesn't ship a *-config binary, so don't inherit binconfig.

(From OE-Core rev: 8b7d74aa7bb73daf84593fafde3eef4595918b63)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Ross Burton
66dadb754f image_types: use cpio-native to build cpio images
As per the previous commit, upstream cpio has a bug which means it crashes on
append. If the image being built has already had testimage ran then cpio-native
will be in the sysroot.  It's also possible that some distributions are shipping
this broken CVE patch too.

Now that our cpio-native is fixed, until we can be sure that the host cpio isn't
broken depend on cpio-native if building a cpio image.

[ YOCTO #13042 ]

(From OE-Core rev: c3b9aedcbe538d7fa74bd814644b4899769dec46)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Ross Burton
572990892e cpio: fix crash when appending to archives
The upstream fix for CVE-2016-2037 introduced a read from uninitialized memory
bug when appending to an existing archive, which is an operation we perform when
building an image.

(From OE-Core rev: 046e3e1fca925febf47b3fdd5d4e9ee2e1fad868)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
28cbaf1de1 oeqa/selftest/context: Improve log file handling
The existing logfile is simply placed in the current directory. Since the test
changes cwd to BUILDDIR, the symlink to the log can be placed in an invalid
directory. We also see trackbacks if the symlink is invalid.

Improve things by:

* Placing logs in LOG_DIR (or BUILDDIR if unset).
* Using a full path to the log meaning the log and link are placed in the same directory.
* Using lexists instead of exists so invalid symlinks are handled correctly.

(From OE-Core rev: 750ece11bed0e62a11e0003d1d16a81f7c219761)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
4482befac6 meta-selftest/error: Cleanup large trailing whitespace
(From OE-Core rev: 0772b6de9dfbb276845c0a08ebcce41896b8056e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
5c7f5e2d3b oeqa/selftest/buildoptions: Ensure diskmon tests run consistently
Heartbeat events default to once a second and we need to ensure we have
enough time in the task to see them.

Add a nostamp delay task 5s long so we can have a consistently timed
task which doesn't need cleanup or have unneeded dependencies. This
ensures we should deterministically see the disk moinitor events
regardless of the state of the build. This is done in a way which
doesn't corrupt build state or need cleanup and is efficient.

(From OE-Core rev: ecc49ee8986929e2429d948000a0ca588fe63959)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
91f838e036 oeqa/selftest/buildoptions: Improve ccache test
This test occisionally fails as m4 doesn't recompile, meaning the logfile test
then doesn't find mention of ccache.

To ensure m4 does recompile, clean m4 before force compiling it.

(Reading the test is confusing due to the test cleanup also involving a clean)

(From OE-Core rev: 6e0b9214a0d57ed45a5df0ba5c9887a9045b89b1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Mingli Yu
a04d5ed026 nspr: improve reproducibility
Remove _BUILD_STRING and _BUILD_TIME in _pl_bld.h
to avoid introducing timestamp in the .so library
such as libnspr4.so as below:
 $ readelf --wide --decompress --hex-dump=.rodata libnspr4.so
 [snip]
  0x00004000 32303138 2d31312d 31352030 353a3439 2018-11-15 05:49
 [snip]

[YOCTO #12639]

(From OE-Core rev: a3ca6272845c33f48430210470f133034ad8399d)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Hongxu Jia
93db812f0c ghostscript: 9.25 -> 9.26
- Drop backported CVE fixes
  000[1-8]*.patch

(From OE-Core rev: f30bd6bf01dbf81f0872382be44d507fb981f953)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
407138c7e5 scripts/runqemu: Improve lockfile handling for python with close_fd=True
On python versions with close_fds=True (python 3.2 onwards), the tap
device lockfile isn't passed to the child process.

Since this guards against use of an active interface, we really want this
here, so pass it in pass_fds. This means if the parent exits early, the child
still holds the lock, avoiding messages like:

runqemu - ERROR - Failed to run qemu: qemu-system-x86_64: could not configure /dev/net/tun (tap0): Device or resource busy

(From OE-Core rev: 17a0a067d597c445c5892ff9914e91a2187f7e09)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
2d0b794b03 scripts/runqemu: Tidy up lock handling code
Various tweaks:
- Balance up the aquire/release functions
- Use debug messge for both acquiring and release message for consistency in logs
- Use None instead of an empty string
- Reset the value of the field if we don't have the lock any more

(From OE-Core rev: 58e48211f7cb44d959b571d449a94291c27535a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
3ecf232ec0 oeqa/qemurunner: Remove resource python warnings
If runqemu fails it would leak an unclosed socket and file. Ensure we
close these in all cases to remove the resource warning.

(From OE-Core rev: ed80e46ccbc8fe8e9148d80723152066fa00ba28)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
1eaf3631a6 scripts/runqemu: Fix logic error causing failures with MACHINE from the environment
MACHINE=qemux86-64 oe-selftest -r runqemu.RunqemuTests.test_boot_machine_slirp_qcow2

fails yet

oe-selftest -r runqemu.RunqemuTests.test_boot_machine_slirp_qcow2

with MACHINE in local.conf would work.

It turns out that:

runqemu slirp wic.qcow2 qemux86-64

works but:

MACHINE=qemux86-64 runqemu slirp wic.qcow2 qemux86-64

does not.

The reason are the misplaced return statements in runqemu, its skipping a block
of logic when MACHINE is set in the environment when it shouldn't. Fix this.

(From OE-Core rev: 98d113ae52cbbc88773a81a17b0933412a8e463b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
ce17f3b679 oeqa/utils/commands: Avoid log message duplication
Each time a runqemu() fails, the log handler would be left behind meaning
messages from any subsequent run would be duplicated (or worse/more).

This ensures we remove the handler regardless and means we no longer
have the duplication.

(From OE-Core rev: 532984708436bdfa3a8cac2c684a425eb249bad0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
f33fb239d6 oeqa/utils/qemurunner: Fix python ResourceWarning for unclosed file
Fixes:

Stderr:
/media/build1/poky/meta/lib/oeqa/utils/qemurunner.py:381: ResourceWarning: unclosed file <_io.BufferedWriter name=16>
  self.runqemu = None

(From OE-Core rev: b9e0bf919e6fc1a58e02145a363ebe7066e5bf4f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Richard Purdie
060c320e8a oeqa/utils/commands: Add extra qemu failure logging
Rather than just referring the user to the logs containing the failure, print
them on the console. This aids debugging with oe-selftest with parallelisation
as the logs may otherwise be lost.

(From OE-Core rev: 36a018e245a232f520ff946f152cc875927a6fb4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:38:36 +00:00
Ulf Magnusson
db20fe6f0a bitbake: fetch2/svn: Fix SVN repository concurrent update race
The ${DL_DIR}/svn directory is used by BitBake to keep checked-out SVN
repositories from which tarballs are generated. These repositories were
protected from concurrent update with a lock on the tarballs. However,
the tarballs are specific to the SRCREV and module checked out (many
tarballs can come from the same repository), meaning a repository could
be modified concurrently if two recipes checked out two different
SRCREVs or modules from it in parallel. This caused errors like the
following:

ERROR: Fetcher failure: Fetch command failed with exit code 1, output:
svn: E155004: Run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
svn: E155004: Working copy '/home/foo/downloads/svn/repo/trunk' locked.
svn: E155004: '/home/foo/downloads/svn/repo/trunk' is already locked.

Fix it by adding a per-repository lock that's independent of the module
and SRCREV.

(Bitbake rev: 3f1f183a17bf3580da8a4ffd6dab30b62c2654a8)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@bmw.de>
Signed-off-by: Michael Ho <Michael.Ho@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:32:08 +00:00
Richard Purdie
c5ca140d38 bitbake: runqueue: Ensure disk monitor is started when no setscene tasks are run
Currently if there are no setscene tasks, the disk monitor isn't started.

Move the startup code to somewhere to ensure it always is started. This
issue would partially explain occasional selftest failures.

(Bitbake rev: 5ba83ee25c1c9cba349edb68a22476b1d5fca6ce)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:32:08 +00:00
Richard Purdie
3be7080d82 bitbake: server/process: Fix ConnectionRefusedError tracebacks
Improve connetion refused error handling:

NOTE: Retrying server connection...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection... (Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/server/process.py", line 471, in connectProcessServer
    sock.connect(os.path.basename(sockname))
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/main.py", line 464, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/server/process.py", line 502, in connectProcessServer
    os.close(i)
TypeError: an integer is required (got type NoneType)
)
WARNING: /home/pokybuild/yocto-worker/oe-selftest-opensuse/build/bitbake/lib/bb/main.py:481: ResourceWarning: unclosed <socket.socket fd=14, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
  logger.info("Retrying server connection... (%s)" % traceback.format_exc())

(Bitbake rev: 6998fd816ceb0034c852a8fb994901fdf1975cfd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01 11:32:08 +00:00
Richard Purdie
41d8955262 bitbake: fetch2: Avoid warning about incorrect character escaping in regex
Fixes:

lib/bb/fetch2/__init__.py:259: DeprecationWarning: invalid escape sequence \w
  re.compile("^\w+:(?!//)").match(uri):

(Bitbake rev: 2f0b6cea2be7e89ef01181b10899b3e7f11e8f20)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:15:34 +00:00
Richard Purdie
754976a116 bitbake: server/process: Show the last 60 log lines, not the last 10
10 log lines may not capture any full traceback, increase the number of
lines to 60 which covers most tracebacks.

(Bitbake rev: b8538c2088c199157404712a60a6740c926ce312)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:15:34 +00:00
Richard Purdie
1b04525d3f bitbake: server/process: Show last 60 lines of the log if the server didn't start
We're seeing issues where the server doesn't start with no logs as to why. Allow
the server to print the last 60 log lines just in case this shows us something useful
about what is failing.

(Bitbake rev: c8c80b404e38fe96f65d6314cd95f4069319f3d6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:15:34 +00:00
Anuj Mittal
a834889120 gst-validate: upgrade 1.14.2 -> 1.14.4
(From OE-Core rev: 21387613fec1a8c142ed48d7a74d587e205b0c98)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
49934844c3 gstreamer1.0-python: upgrade 1.14.3 -> 1.14.4
(From OE-Core rev: 454129a0dc8eabb53753f9d416cf7271c796acf4)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
412b11c8a2 gstreamer1.0-omx: upgrade 1.14.3 -> 1.14.4
(From OE-Core rev: 9b613f029490a3540492393206be004b649c0806)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
91e8298df5 gstreamer1.0-rtsp-server: upgrade 1.14.3 -> 1.14.4
(From OE-Core rev: 8a73dc7da63bbd3c57bde2a3733d172d784e5f46)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
96212a48bc gstreamer1.0-vaapi: upgrade 1.14.3 -> 1.14.4
(From OE-Core rev: 9caacfe4c3ef92f3701f24ff3c924f50adb5f9de)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
59ceb083f0 gstreamer1.0-libav: upgrade 1.14.3 -> 1.14.4
(From OE-Core rev: 14370389a50bda84eee7b3a024709fd43fc7c5aa)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
1b9082ab82 gstreamer1.0-plugins-ugly: upgrade 1.14.3 -> 1.14.4
(From OE-Core rev: d1e5c9b85f980e747c9d6c5682448e0756bd25cd)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
ed8d6e4d32 gstreamer1.0-plugins-bad: upgrade 1.14.3 -> 1.14.4
(From OE-Core rev: 74d9bd02f41d555317eef6b82e94f351ffc61529)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
d9f8534039 gstreamer1.0-plugins-good: upgrade 1.14.3 -> 1.14.4
(From OE-Core rev: adeec11d875a5603bd64b9bfb888da5cdb7631e5)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
8a8a741b73 gstreamer1.0-plugins-base: upgrade 1.14.3 -> 1.14.4
(From OE-Core rev: 868059f052547a73e428fe8d4066dc4412e29478)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
13869ec721 gstreamer1.0: upgrade 1.14.3 -> 1.14.4
This release only contains bugfixes and it should be safe to update from
1.14.x.

Release notes:

https://gstreamer.freedesktop.org/releases/1.14/

(From OE-Core rev: 4286f191c4b10cf5f3a14ed391902a11a9d61a09)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
8a5e6368a5 gst-plugins-bad: add PACKAGECONFIG for msdk
gst-msdk is a plugin for Intel Media SDK. More details:

https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/sys/msdk/README

(From OE-Core rev: c138fa26dde7fca5b366ab69bac84359ebbd0fd7)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
66196984f0 libva-utils: 2.2.0 -> 2.3.0
No release tarballs, so switch to git instead.

Changes from release notes:

Add HEVC encode sample code
Add sample code for avc decode streamout
Add VP8 sample encoder application (SVCT supported)

(From OE-Core rev: aa2affa837fa9bbf59dcd9cadd42bd9afd0c38f0)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Anuj Mittal
807b2a8c70 maintainers.inc: update Intel owners
(From OE-Core rev: 198fe6d08f000b3db9082b5fd4337536931719ee)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Adrian Freihofer
ac9c5b9212 devtool: fix target-deploy --strip
This is a fixup for: e1ba46109e

devtool deploy-target --strip foo root@192.168.7.2
ended up with:
Traceback (most recent call last):
  File "/home/user/bar_sdk/sysroots/x86_64-pokysdk-linux/usr/bin/
        devtool", line 344, in <module>
   ret = main()
  File "/home/user/bar_sdk/sysroots/x86_64-pokysdk-linux/usr/bin/
        devtool", line 331, in main
    ret = args.func(args, config, basepath, workspace)
  File "/home/user/bar_sdk/layers/poky/scripts/lib/devtool/
        deploy.py", line 187, in deploy
    rd.getVar('base_libdir'))
TypeError: strip_exbar() missing 1 required positional argument: 'd'

(From OE-Core rev: bc349b2d99d74f6d7fb590fd97750e5ff8d6e6c4)

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Kai Kang
8d53253d0a multilib_script: fix packages split
In multilib_script.bbclass it renames script file which listed in
MULTILIB_SCRIPTS. It may mix up packages split. Take package curl as
example, ${bindir}/curl-config is packaged to curl-dev originally. But
it is renamed to curl-config-${MULTILIB_SUFFIX} and packaged to curl
when multilib is enabled.

And expand 'pkg' to fix QA warning:

| WARNING: Variable key FILES_${PN}-dev (
| ${bindir}/curl-config-${MULTILIB_SUFFIX}) replaces original key
| FILES_curl-dev (${includedir} ${FILES_SOLIBSDEV} ... ${bindir}/*-config)

Insert a necessary space to the argument 'value' of d.appendVar() as well.

(From OE-Core rev: 841bcbe429dcab54de3b89a927394750f9ccae60)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Adrian Freihofer
d0b2cedfb0 systemd: fix PN-container package splitting
- Fix package splitting for services installed with
  systemd-container. Some files have been installed with systemd
  package instead of systemd-container package. (*.service,
  *.socket, *.html...)
- Split journal-upload, journal-remote, journal-gatewayd into
  separate packages. These services are not strictly related to
  nspawn containers. Remote logging is now possible without
  installing all the container stuff.
- systemd-container package rrecommends journal-upload, journal-
  remote, journal-gatewayd packages.

(From OE-Core rev: d31ff84a5f4723700ed48fd14ace81d3c707065e)

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Adrian Bunk
2cba73f2b1 archiver.bbclass: Fix COPYLEFT_LICENSE_{IN, EX}CLUDE
Setting them to empty before inheriting copyleft_filter
made them not getting their documented values there.

(From OE-Core rev: ee1f86ca7affc65265f219f0718f89406c9181a5)

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Richard Purdie
e865e4e703 oeqa/selftest/buildoptions: Improve ccache test failure output
The current failure mode doesn't show us what the logs actually looked like
and later cleans can lose them. Show the whole log in case of failure
to aid debugging intermittent problems on the autobuilder.

(From OE-Core rev: 7c3a0dc5978cea898b1ca51decf4d6e7cf9d519f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Richard Purdie
3b06853f59 oeqa/selftest/case: Use bb.utils.remove() instead of shutil.remove()
This avoids problems where shutil.remove will error with:

  File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.extra'

when there are races over file deletion (gpg agent may be slow to exit).

We already worked around speed and race issues in bb.utils.

(From OE-Core rev: 00a8fd5b93a5c19ce0b7498e2bc653ce8ad58aaf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Richard Purdie
ff60dc33be oeqa/selftest/signing: Use do_populate_lic target instead of do_package
This should speed the test up signficiantly without any loss of functionality
for the purposes of the test.

(From OE-Core rev: 3dde0b749643575878bfbca2f8d2d9ec30bad166)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Richard Purdie
0c1e13ca44 oeqa/selftest/signing: Allow tests not to need gpg on the host
We ideally don't want to use gpg from the host. This is straightforward for package
management but not for sstate.

For sstate, create a second build directory to run the test in using gnupg-native
from the original build directory.

(From OE-Core rev: 10afa94c3f0d7eb7524a26deda86949073d55fde)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Richard Purdie
05edac6a96 oeqa/selftest/signing: Skip tests if gpg isn't found
Raising an assertionError in the class setup isn't a particuarly good way to
indicate gpg isn't installed. Instead skip the tests if the required binary
isn't present. For the signing tests we do require it to be present and can't
use a prebuilt one.

(From OE-Core rev: 2d486af97e51b9daa9c40482c31d637c9ab4ae79)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Alexander Kanavin
e2f53e4823 openssl: update to 1.1.1a
(From OE-Core rev: eec95f90093a6aa1d8be145e351fc9df4abef172)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Ming Liu
12e30bd897 image.bbclass: fix a wrong position blank
A flaw was introduced by commit c5fa6034:
[ image.bbclass: use prependVarFlag for postfuncs ]

it changed to use prependVarFlag instead of appendVarFlag, then the
blank also needs change to adapt it.

(From OE-Core rev: 6085023158ffbfbaf0f3d65ef18054c003d3f463)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Mingli Yu
99e50c7e64 mdadm: improve the run-ptest
* There are 120+ cases under ${libdir}/mdadm/ptest/tests,
  but the test will break if one test fails as
  below logic in run-ptest.
  ./test &>./test.log

  That's to say, the tests after the failed test
  have no chance to run with the current logic.

  To guarantee all the tests can run even one
  of the tests fails, the option --keep-going
  should be added.

* Refactor the test report to make the report
  more detailed and more common

(From OE-Core rev: 80d17497b719efb2ca9f36b8a730815547e93aa7)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27 22:13:11 +00:00
Otavio Salvador
6bf94ad3b6 u-boot: Upgrade 2018.07 -> 2018.11
This upgrades U-Boot to 2018.11 release and drop the backported
security fixes which are now included upstream.

(From OE-Core rev: 04469ab5b7f0446404b4cb55a15595678581ab26)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:20 +00:00
Alexander Kanavin
9ec07073a1 dnf: update to 4.0.9
(From OE-Core rev: 7670325f4b04000255e2fd4ad58a42ab60a70579)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:20 +00:00
Alexander Kanavin
efebb348c1 libdnf: update to 0.22.3
(From OE-Core rev: e5b650bdafbf6691ceed35fda251ac9ced1217c5)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:20 +00:00
Richard Purdie
9f3aa44e1b meson: Disable rpath stripping at install time
As discussed in https://github.com/mesonbuild/meson/issues/2567 there
needs to be a way to allow our rpath options passed to the linker to be
preserved, else we run into weird build failures.

(e.g. libmodulemd-native used by libdnf can't find libyaml)

Disable this for now until upstream come up with a better way of handling
this.

(From OE-Core rev: b4e36281631e0b59d1058f5cf391eb8b15e605cf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Ross Burton
dfe84d9ca3 python: let more modules build in native
(From OE-Core rev: 55b0a7332c57abc27367aba46702990e3a99cbf9)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Mingli Yu
8b7c98e0e0 python: add tk support
Add support to enable tk via PACKGECONFIG.
before the patch:
 # python
 Python 2.7.15 (default, Nov  8 2018, 04:53:50)
 [GCC 8.2.0] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import Tkinter
 Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/lib-tk/Tkinter.py", line 39, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
 ImportError: No module named _tkinter
 >>>

After the patch, if enable tk in PACKGECONFIG, then
 # python
 Python 2.7.15 (default, Oct 25 2018, 08:12:45)
 [GCC 8.2.0] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import Tkinter
 >>>

(From OE-Core rev: 26b2702475697c123937d237e00c34eb2216b5ea)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Mingli Yu
75d2d6776b python3: add tk support
Add support to enable tk via PACKAGECONFIG.
before this patch:
 # python3
 Python 3.5.6 (default, Nov  8 2018, 04:53:45)
 [GCC 8.2.0] on linux
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import tkinter
 Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.5/tkinter/__init__.py", line 35, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
 ImportError: No module named '_tkinter'
 >>>

After this patch, if enable tk in PACKAGECONFIG, then
 # python3
 Python 3.5.6 (default, Nov  8 2018, 03:15:52)
 [GCC 8.2.0] on linux
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import tkinter
 >>>

(From OE-Core rev: 4b781d545e7e0b084201cd6a8fad953b0f231513)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Otavio Salvador
a596919132 libdrm: Upgrade 2.4.94 -> 2.4.96
(From OE-Core rev: e8e00d68eb8e114bdabd546e5c6634fb02a6e6c4)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Changhyeok Bae
10147692de ethtool: 4.17 -> 4.19
(From OE-Core rev: 565bbbf43da14de466fccdfaa259bdb9b50b686e)

Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Changhyeok Bae
e9af47b7ad iproute2: 4.18.0 -> 4.19.0
(From OE-Core rev: b5acefc041b2316c75eefae745d894412ac7bd78)

Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Chen Qi
9d2f4b00e1 busybox: add zip to RDEPENDS of ptest package
busybox's unzip test case requires zip command. However, busybox
itself does not provide one. So add zip as a runtime dependency.

(From OE-Core rev: 223e5c3e1f7cb4001961347c85505d88a52d221f)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Ross Burton
f72e95df33 busybox: ship a symlink farm for ptest
Ship a symlink farm for busybox, which correctly considers SUID
split. This ensures that all utilities used in busybox's test cases
will first use that ones that are provided by busybox.

Modify run-ptest to prepend the directory to PATH, and also change
variable name from current_dir to current_path, as the former is
a little misleading. `readlink -f $0' gets a path to the current
script instead of the current directory.

(From OE-Core rev: 7ef8f96941ed52b2a00cbe8f57511a8891b39698)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Chen Qi
41e772d726 busybox: check CONFIG_DESKTOP before using 'od -t' in test case
The '-t' option support for 'od' is enabled by CONFIG_DESKTOP.
So check it before using it in test cases.

(From OE-Core rev: c89fa1992987fa3c12616d2d379f524188310a2e)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Chen Qi
4d7f14780f busybox: fix du-l-works test case
64 + 64 + 16 = 144K
144 + sizeof_a_directory >= 145
So fix to use 145 instead of 144.

(From OE-Core rev: 4818223ca4d64ee9501250cb866c23630eafa2fa)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Chen Qi
34ea70924f busybox: use example.org instead of google.com in wget test case
Use example.org to ensure it's always reachible.

(From OE-Core rev: 914960f06f035b82834e4b5313f7d3a5879220ae)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Chen Qi
e9d3c569aa busybox: check uudecode before using it in test case
Check uudecode before using it in test case to avoid unexpected failure.

(From OE-Core rev: 32ff819233024f23af1caa889691ccc3b0dadc50)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Chen Qi
a3e7ab0168 bzip2: extend alternatives list to include bzip2
bzip2 could also be provided by busybox. So extend the alternatives
list to include bzip2.

(From OE-Core rev: 832ce25879d5e3df2d443bdf4362bf4af1377e87)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Chen Qi
48e25b57f8 busybox: enable bzip2 by default
bunzip2 is enabled by default, but bzip2 is not. This is kind of
strange, and it also causes busybox's ptest failure regarding
bunzip2, as bunzip2's test case needs bzip2 command.

(From OE-Core rev: b54717b06e52970b3547cc5cb89424d824a4ef6a)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Robert Yang
871fcd2c15 sstate.bbclass: Only remove sstate file when task is existed
This can improve the performance a lot for "bitbake <recipe-native/cross/crosssdk>
-ccleansstate" when there are a lot of sstate files.

For example:
* Before
  $ bitbake quilt-native -ccleansstate
  - Check log.do_cleansstate:
  Removing /sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_package.tgz*
  Removing /sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_package_qa.tgz*
  Removing /sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_package_write_rpm.tgz*
  Removing /sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_packagedata.tgz*
  Removing /sstate-cache/*/sstate:quilt-native::0.65:r0::3:*_populate_lic.tgz*
  Removing /sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_populate_sysroot.tgz*

  There are no package tasks for quilt-native, so the first 4 lines doesn't
  make any sense, but the glob pattern "sstate-cache/*/*" is very time
  consuming when there are no disk caches. E.g., I have more than 600,000
  sstate files:
  - Without disk caches
  # echo 3 >/proc/sys/vm/drop_caches
  $ time python3 -c 'import glob; glob.glob("/sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_package.tgz*")'
    real    4m32.583s
    user    0m5.768s
    sys     0m12.892s

  - With disk caches (e.g., run it in the second time)
  $ time python3 -c 'import glob; glob.glob("/sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_package.tgz*")'
    real    0m5.128s
    user    0m2.772s
    sys     0m2.308s

  So the 4 removing *package* commands cost more than 20s or 272s in theory.

* After
  $ bitbake quilt-native -ccleansstate
  - Check log.do_cleansstate:
  Removing /sstate-cache/*/sstate:quilt-native::0.65:r0::3:*_populate_lic.tgz*
  Removing /sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_populate_sysroot.tgz*

  We can see that it saved 20s or 272s in theory.

(From OE-Core rev: bb2d6349ea87f090c58001f0d4348b24c2982cde)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Robert Yang
cffefd2eae bugzilla.bbclass: Remove it since obsoleted
It is a still python2 bbclass, so it has been broken since bitbake changed to
python3 which was 2 years ago. No one reported/fixed it for python3 in recent 2
years. So we can assume that no one uses it anymore.

(From OE-Core rev: 7f6da5fb54cbcf8e358e988382f45839a8b80019)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Hongxu Jia
c38b35bc5b ncurses: upgrade 6.1 -> 6.1+20181013
(From OE-Core rev: 0471efa2189c0ec2d4dece259e54cd38f82315b2)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Hongxu Jia
96163d2ab3 libgcrypt: upgrade 1.8.3 -> 1.8.4
(From OE-Core rev: 1100e7f1519be91c90b139c337799c7ea635a8b3)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Hongxu Jia
f8de83e39d gnupg: upgrade 2.2.10 -> 2.2.11
(From OE-Core rev: 4a373ce7d718ee3299bcf7f9fa62e7337d41e40a)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Hongxu Jia
43413f8dd6 elfutils: 0.174 -> 0.175
- Drop backport CVE patches
  0001-libdwfl-Sanity-check-partial-core-file-data-reads.patch
  0001-size-Handle-recursive-ELF-ar-files.patch
  0001-arlib-Check-that-sh_entsize-isn-t-zero.patch

- Drop patches that upstream has fixed
  0005-fix-a-stack-usage-warning.patch [9a74c19 backends: ppc use define
  instead of const for size of dwarf_regs array.]

- Update debian patches to 0.175

- Rebase local patch to 0.175
  0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch

(From OE-Core rev: 8748de4df5a4ece303f07f8bbb248920a199478a)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Robert Yang
fec5323dba recipes: Remove tab indentations in python code
Use 4 spaces to replace a tab.

(From OE-Core rev: cbb6743d46752481782789fa1a0dfade11057114)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Robert Yang
00379e9589 classes: Remove tab indentations in python code
Use 4 spaces to replace a tab.

(From OE-Core rev: 55eaf8779170b9396e94dc4a44667824c4f36363)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Douglas Royds
3518cdde5b ptest: Reproducibility: Take control of umask
The build host umask was leaking into the thing-ptest packages
at do_install_ptest() time.

(From OE-Core rev: 891343e8ba6490ca3e1876c892269b611ddc7877)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Alexey Brodkin
c0f89c609d u-boot: Add mkenvimage tool
This utility is used for creation of images containing
usable in run-time U-Boot environment.

As of today this utility is added per-board like here [1]
for Intel Edison board.

[1] http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-edison/tree/meta-intel-edison-bsp/recipes-bsp/u-boot/u-boot-tools_2014.04.bb

Given there're quite some U-Boot tools that we may want to add later
this recipe name switch from "u-boot-mkimage" to generic "u-boot-tools"
still for compatibility we provide "u-boot-mkimage" with help
of PROVIDES as well as proposed "u-boot-mkenvimage".

(From OE-Core rev: 314885b16e5d26d27d46a4bfb0d581b27a03b8fe)

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Martin Jansa <martin.jansa@gmail.com>
Cc: Ross Burton <ross.burton@intel.com>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Alexander Kanavin
584c539eaa dmidecode: fix the Upstream-Status in a custom patch
(From OE-Core rev: c2d8081216b03c7f26063ca9f971661e76550464)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Alexey Brodkin
7dce24ded9 arc: Disable LTTng
LTTng depends on liburcu which is not yet ported to ARC
so disable LTTng on ARC for now.

(From OE-Core rev: 701e63154c727522704aee6e890dd7d2b5615c6d)

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Douglas Royds
721c000b00 reproducible: Don't look for youngest file when no source tarball
Some packages (eg. init-ifupdown) take their source files entirely from
openembedded-core, that is, they download no source tarball.
These recipes either don't use S at all (ie. it is empty at unpack time),
or they set S = WORKDIR (as in init-ifupdown).
Looking at the file timestamps in the WORKDIR causes a non-reproducible
SOURCE_DATE_EPOCH, as files taken from file:// URIs do not have
reproducible timestamps.

If S == WORKDIR, we are better to assume that there is no source tarball,
and to fall back to a fixed timestamp for the SOURCE_DATE_EPOCH.
This makes the init-ifupdown build reproducible.

(From OE-Core rev: d395bad0179037eb5d0fa4d921985c87ae13f3a4)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Douglas Royds
59c8937095 reproducible: Refactor: Break out fixed_source_date_epoch() function
(From OE-Core rev: 4eb6def4fe82959c2a348142b9eada27d3354aef)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Douglas Royds
f9991cb875 boost-context: Reproducibility: Set .file section for all *_elf_gas.S files
Add a .file directive explicitly for all *_elf_gas.S files to prevent the linker
adding a host build-system path as a FILE symbol to the object file.

This replaces the existing patch that added the .file directive to a small
subset of these files.

Upstream-Status: Submitted [https://github.com/boostorg/context/issues/91]
(From OE-Core rev: 5ff5f89f2db079a6baf0275ebf1333b4b9642504)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Paul Eggleton
8b9dbff36b socat: fix LICENSE
According to both the README and source headers, the LICENSE value for
socat is explicitly GPLv2, not v2 or later, so adjust LICENSE
accordingly (leaving aside whether "GPL-2.0+-with-OpenSSL-exception"
should actually be considered a valid LICENSE string or not).

(From OE-Core rev: 466044a341a8b42159bd9388950c9079e0d7a2c3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Alexander Kanavin
3969a8a865 lighttpd: update to 1.4.51
(From OE-Core rev: 7e95eca23f06bfeb7b780958a46ec01feb58f20b)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Alexander Kanavin
71875722a8 libwebp: update to 1.0.1
(From OE-Core rev: 67ae24f82279bb304b747e953a2b65ae5d46cad2)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Alexander Kanavin
5d00233802 sysprof: update to 3.30.2
(From OE-Core rev: c2a63b10300cab8bc896fdd2509bb06cc08ac420)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Alexander Kanavin
60973c804e psmisc: update to 23.2
(From OE-Core rev: df7a2a50b20fcbae17b87d0291cbc405b04c37d7)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Alexander Kanavin
26762b70b2 webkitgtk: update to 2.22.4
(From OE-Core rev: a0d2154aac9926a4723bb3c38d511872b7b14f4c)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:19 +00:00
Alexander Kanavin
a10925bb00 vala: update to 0.42.3
(From OE-Core rev: 0bbd83a06d7c7c435489188f31b3f82018cc1b84)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Alexander Kanavin
2a96011a42 icu: update to 63.1
(From OE-Core rev: 12765813bda38efe2a8ace2d7e56c32882530268)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Alexander Kanavin
a15b8cb1fe gdbm: update to 1.18.1
(From OE-Core rev: 7fa0996f39f55dbc3c4441d8df7ff2aff17fc6b7)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Alexander Kanavin
691e306994 tiff: update to 4.0.10
(From OE-Core rev: 92a2e6dc73085ccb5482986c6b61d40992fb4f50)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Alexander Kanavin
71c0092d16 dmidecode: update to 3.2
Also, replace a sed hack with a proper patch.

(From OE-Core rev: bdde940c05490d3128721e4f5eb67d456e7cc323)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Alexander Kanavin
476b644ef1 openssl10: update to 1.0.2q
(From OE-Core rev: 03149ca307282c22dd9ceb6fe3224bf586b03f6d)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Alexander Kanavin
fd665d1b0e gobject-introspection: update to 1.58.1
Also, change default meson option to building introspection files
(previously they were not built by default).

(From OE-Core rev: 44e5bbbbed500553d1ddf451eba02e826a91e4cc)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Ross Burton
cd52b7670f openssl: don't disable the AFALG engine based on host kernel
Whether the AFALG engine (use of hardware crypto via AF_ALG) is enable or
disable depends on whether the host kernel is 4.1 or above, which has no bearing
on whether the target system supports it.

Remove the complicated logic and simply enable/disable as requested.

(From OE-Core rev: 4b6c566c0540fe8e560d0feeb9c765c0eb6e5182)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Ross Burton
64aca31a78 openssl: output the configure data in do_configure
To aid debugging configure, dump the configdata in do_configure.

(From OE-Core rev: a385e6c47663854a375d061033efc856361f3dba)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Richard Purdie
6881cf4229 documentation: Add newlib to TCLIBC's [doc] entry
TCBLIC can be set to 'newlib' now, document this.

[YOCTO #13032]

(From OE-Core rev: d06271500c485686536352f1202a74d21c51a406)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Mingli Yu
55d59d3f6d mdadm: Upgrade to 4.1
* Remove 5 backported patches
* Refresh patches to remove fuzz warnings

(From OE-Core rev: a455616df65f1e9dac5e283a9cda047868465d23)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Alexey Brodkin
c4f4c5347c gcc: Select proper ARC CPU when build for target
By default GCC for ARC is configured with ARC700 CPU.
This means when we don't pass "-mcpu=xxx":
 a) Code will be compiled for ARC700
 b) Libs will used for ARC700

And if we happen to run on ARCv2 core like ARC HSxx we
won't be able to use target gcc w/o "-mcpu=xxx" which
is not very convenient as we want to build "target" toolchain
but not canadian-cross.

Note the trick here is we set TUNE_PKGARCH in just 2 values,
it is either "arc700" for all ARCompact cores (ARC750 & ARC770)
and "archs" for all ARCv2 cores (ARC HS38 & HS48), see [1].
This gives us usable defaults.

For cross-compilation we use TUNE_CCARGS for fine-tuning depending
on which HW features we have on the current target so that
we may have HW feature A & B or B & C or A & B & C, see [2].

[1] https://github.com/foss-for-synopsys-dwc-arc-processors/meta-synopsys/blob/master/conf/machine/include/tune-arcv2.inc#L4
[2] https://github.com/foss-for-synopsys-dwc-arc-processors/meta-synopsys/blob/master/conf/machine/include/tune-arcv2.inc#L34

(From OE-Core rev: 6d2e44db7ebada41ad1cfc1c98ce9012242ced11)

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Robert Yang
76276d90ce sstate.bbclass: set SSTATE_EXTRAPATHWILDCARD explicitly
The glob.glob("/sstate/*/*/") is very time consuming, set
SSTATE_EXTRAPATHWILDCARD explicity to avoid that. This can save a lot of time
when there are many sstate files.

For example, I have more than 600,000 sstate files:
* Before
  - Without disk caches
  $ time python3 -c 'import glob; glob.glob("/sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_populate_sysroot.tgz*")'
    real    4m32.583s
    user    0m5.768s
    sys     0m12.892s

  - With disk caches
  $ time python3 -c 'import glob; glob.glob("/sstate-cache/*/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_populate_sysroot.tgz*")'
  real    0m4.111s
  user    0m2.348s
  sys     0m1.756s

* After
  $ time python3 -c 'import glob; glob.glob("/sstate-cache.bak/universal/*/sstate:quilt-native:x86_64-linux:0.65:r0:x86_64:3:*_populate_sysroot.tgz*")'
  - Without disk caches:
  real    0m7.928s
  user    0m0.172s
  sys     0m0.124s

  - With disk caches:
  real    0m0.131s
  user    0m0.088s
  sys     0m0.044s

We can see that it saves about 3.8s with disk caches, and saves about 264s
without disk caches.

(From OE-Core rev: 8b31c919814b8bdf25b3381053656523c001ae0d)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Mike Crowe
bdda030127 terminal: Cope with unreleased versions of tmux
When tmux is built from a non-release Git version, its version number is
"next-X" where X appears to be the expected version number for the next
release. For example, when built from the current state of master, running
"tmux -V" yields:

 tmux next-2.9

Currently check_tmux_pane_size only checks for the version being less than
1.9, so it seems unfair to fail with an obscure Python error in this case.

Let's just use the version number after the "next-" prefix if it is
present.

(From OE-Core rev: 07b59afd52244410d8d833e6dfe262d952e5e344)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Yeoh Ee Peng
fea124ae44 testimage: Add support for slirp
Enable testimage to support qemu slirp. Configure "QEMU_USE_SLIRP"
& "TEST_SERVER_IP" variables to enable slirp.

[YOCTO#10713]

(From OE-Core rev: 3df9ee85ce7fe52f0893fd33aea3bf1fcc6ead0a)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Yeoh Ee Peng
325ae1008c oeqa/qemu: Add support for slirp
Enable qemu for slirp. Initialize Qemurunner with slirp. Setup ip
and port attribute to enable connection with qemu running with slirp.

[YOCTO#10713]

(From OE-Core rev: 815e05ac4abb42238d6fdeb15d7426759e059ce1)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Yeoh Ee Peng
ba9c6285c5 qemurunner: Add support for slirp
Enable qemurunner for slirp. Retrieved the ip & port from host machine
to connect to qemu from host machine.

[YOCTO#10713]

(From OE-Core rev: 1db6a6fc9cde28d0a29bcf6d24a8bfbe51d120b1)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Yeoh Ee Peng
010c24307b oeqa/qemu & runtime: qemu do not need ip input from external
Qemu do not use the ip input from external. It will
retrieve ip from QemuRunner instance and assign
ip value.

(From OE-Core rev: 14d99dc6c39c963ba3e0d9a30274846bd5369210)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 23:35:18 +00:00
Ross Burton
3786729785 bitbake: fetch: don't use shell=True when listing ar files
(Bitbake rev: 7414b3537e8adfb41a9581d70bf8296c4f7d38c0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 16:10:37 +00:00
Ross Burton
9c032d3dd9 bitbake: layerindex: don't use shell=True when cloning
(Bitbake rev: cb4aab7406dc8aefb646b37330b722cf9060ad73)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 16:10:37 +00:00
Armin Kuster
6b84ac7883 ref-manual: Updated list of supported Linux Distros:
Updates for the "thud" release.

(From yocto-docs rev: ccd2d2c7b062627a3fd1961ab23ee6fff714428a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
8aba364ff9 dev-manual: Added note stating no WSL support
The Windows Subsystem for Linux is not supported.  Added a note
in the section on setting up the build host.

(From yocto-docs rev: e6c3b0acd77569e0422cf86e7dc56433e76bdf20)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
10d53356a2 ref-manual: Added a note saying WSL is not supported.
Windows Subsystem for Linux (WSL) is not supported with the
Yocto Project.

(From yocto-docs rev: 0898d7fb7166da91598854f385cd574004098ac3)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
0e91bc0a6b brief-yoctoprojectqs: Added warnings about WSL, which can't be used.
Windows Subsystem for Linux (WSL) is not compatible with the
Yocto Project.  Added information in the beginning to note this
fact to the user.

(From yocto-docs rev: d8fcc0e3dc609086ca82a3419a337350f4e5c529)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
58128d2b32 kernel-dev: Updated phrasing for what a "defconfig" file is.
It was over simplistic.

(From yocto-docs rev: 1c17e3ef607d18c89c3e20d2d44eb5120779cd2c)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Ming Liu
236e2c80de ref-manual: Updated image_types.bbclass description.
The "image_types" class is now inherited mandatorily in
image.bbclass through the variable IMGCLASSES.  Users do not
have to inherit it in their customized image type bbclass.
They also do not have to put it in IMAGE_CLASSES.

(From yocto-docs rev: bd391092b216e39dad317dc1aae5c715371766ef)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
4adb1e29a1 ref-manual: Added description for devupstream.bbclass
New section added.

Fixes [YOCTO #12732]

(From yocto-docs rev: 3d4a1fef8e1809cd7f1dece55790b6ee12dc60b3)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
e33920f4c9 dev-manual: Updated the "Post-Installation Scripts" section.
Added a better, more up-to-date description of the way to defer
a post-installation script past the boot.

(From yocto-docs rev: 1bcec14eed720fd05e81fbe7ecaa2f95174c0fbf)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
69f269e090 ref-manual: Added cross-references to "Post-Installation Scripts"
Two areas in the migration chapter discuss the post-installation
behavior when you defer the scripts to after boot.  I added a
couple references to each of those migration note sections that
go into the dev-manual's section.

(From yocto-docs rev: eeb09b5fa208499f37be4e5aafcf55db82715fd1)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
108fe4b941 ref-manual: Updated "Packaging Changes" section for 2.6 migration.
Changed reference to "python-modules" to "python-modules /
python3-modules".

(From yocto-docs rev: 49d66f928366dda19b6afd1e9ac6431f0f66ab21)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
028deee71f ref-manual: Applied review edits to the 2.6 migration section.
Minor fixes here and there.

(From yocto-docs rev: 740b4392bd98a12f188b79ae3ecdc7c3031f9f7d)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
83b605ccef ref-manual: New 2.6 Migration section complete.
(From yocto-docs rev: 6597ea2d706e3975ff0ffae15cf748ffd7aaed8b)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
184b441580 ref-manual: Added new python3 profile-optimization migration topic
(From yocto-docs rev: 2d0960d9282ffcb843ed9956a0e49183b22f11f2)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
40433a0229 ref-manual: Updated postinstall migration note.
(From yocto-docs rev: fa6582df36d770e7207e4c5201dafe0e64f46a76)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
506bbde783 ref-manual: Updates to the 2.6 migration section.
This is the completed first draft.

(From yocto-docs rev: 45d39b7655ea5b515c8dda91249a84ee19387099)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
2103d41b2e ref-manual: Added KERNEL_ARTIFACT_NAME and adjusted referencing variables.
The KERNEL_ARTIFACT_NAME variable is used throughout to set the names
of build artifacts.  Rather than repeat informaiton about
KERNEL_ARTIFACT_NAME in the many variables that use it, I added
a new entry for the variable.  This also impacted the descriptions
of the variables that were repeating information.  I updated those
variable descriptions as well.

(From yocto-docs rev: 5750d30be21e17fe21d89254925dc0e773c08e66)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:52 +00:00
Scott Rifenbark
b9834979b1 ref-manual: Removed the NOISO and NOHDD references.
(From yocto-docs rev: fdce52a34db29c98140daa05bd9c660a2494dc12)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
dab1295f25 dev-manual: Removed occurrence of mkefidisk.sh script.
Script has been removed.

(From yocto-docs rev: c23de8eb2648f98864579e857a1de0b2ed74532a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
c215b12caa ref-manual: Removed the NOISO and NOHDD variables.
(From yocto-docs rev: bdb67279cd6707e5b0141ecfbfbc09101d508ef4)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
c029a905c8 ref-manual: Added several new sections to the 2.6 migration section.
(From yocto-docs rev: 54703fbde3f7808b9257da883fe8e4769a65fc44)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
ab2b5029e7 ref-manual: Added new artifact naming variables to glossary.
(From yocto-docs rev: ed122fae8ec6e9eb38c196decfc6f5016945f4ee)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
f148a5750d ref-manual: Changed "post 2.6" to correct wording.
I changed the wording "post 2.6" to state "2.6 and
forward".  It was incorrect as the changes are  inclusive
of YP release 2.6.

(From yocto-docs rev: fb3f3db17ea416cd829a291df3933cc3597392b8)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
073df1158c ref-manual: Added KERNEL_IMAGE_NAME description
The KERNEL_IMAGE_NAME variable is new and is effectively
a renamed KERNEL_IMAGE_BASE_NAME variable now.  I provided a
new glossary description for the new variable.  I updated the
existing KERNEL_IMAGE_BASE_NAME description to note it has
changed.  We can't just delete the old variable as there are
migration notes for previous releases of YP.

(From yocto-docs rev: e5a38711342f88ded4368521a70e9d117b6d991c)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
b2e118252d ref-manual: Added GCCVERSION variable description to glossary.
(From yocto-docs rev: 8095f61c0bf0bbfc7fcf83e3f1c080913ed5f17d)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
ba78d21173 ref-manual: Updated migration section for 2.6
Made two minor corrections from reviewer feedback.

(From yocto-docs rev: 765e44127f52e1d9d4d1c365b0574ca73364add2)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
12eee34540 ref-manual: Updated 2.6 migration topic "_remove"
Provided more explanation and also a link into the BB manual
for a detailed example.

(From yocto-docs rev: ca1e113dc837f5104f765b655880a87d1fbd66ac)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
016e34a2e8 ref-manual: Added the 2.6 Migration Section.
Provided some new sections on the information for migrating from the
2.5 release to the 2.6 release.

(From yocto-docs rev: dd721a31594c753d7229c45ebad0ce11640a0704)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
53fa948ae3 ref-manual: Updated testimage and testsdk class descriptions.
I added notes indicating that the best practice for automated testing
is to inherit these classes by using the IMAGE_CLASSES variable instead
of the INHERIT variable.

(From yocto-docs rev: 8f4765db897c20f0011ea65f62d6b45495d313d2)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
01c64b6aa1 ref-manual, dev-manual: Removed TEST_IMAGE for TESTIMAGE_AUTO.
The TEST_IMAGE variable went away and was replaced with the
TESTIMAGE_AUTO variable.  Fixed all related/affected areas.

(From yocto-docs rev: 660da40b4fcdc05666e1877037fa63eb1dfe7227)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Scott Rifenbark
b131879f0c poky.ent: Updated release month to November 2018 (thud)
(From yocto-docs rev: b90dd0f7e8d6762bb5dafaedd10cbc01044635d3)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:20:51 +00:00
Richard Purdie
38c9e52b6e maintainers: Add entry for new recipe libdazzle
(From OE-Core rev: c80972be1f3592d797da9eb0845b739420c6da4a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:02:57 +00:00
Alexander Kanavin
06fb03495b gtk+3: update to 3.24.1
(From OE-Core rev: d76fa906dd603bd8eadd1932048969065ebd3aab)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:02:57 +00:00
Alexander Kanavin
f87c86f67f libdazzle: add recipe
This is a new requirement of epiphany web browser.

(From OE-Core rev: 7bce6eb66749b7f773c24868cf85ebfcda8d636b)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:02:57 +00:00
Alexander Kanavin
3fd33713b9 epiphany: update to 3.30.2
libdazzle is a new requirement

(From OE-Core rev: 2a02ed07785dc68045c746d350199702856e6d8d)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:02:57 +00:00
Alexander Kanavin
3da759cd97 webkitgtk: update to 2.22.3
Remove upstreamed patches.
Add a tweak to 0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch
for Javascriptcore gir file (previously it was pre-compiled in tarballs).

Rebase 0001-Fix-build-with-musl.patch

(From OE-Core rev: 7cd49245249f5c20579d1bb3992d60f3ed40708c)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:02:57 +00:00
Alexander Kanavin
00822848f5 package_manager.py: fix the message used to catch failing postinsts from dnf
Latest dnf versions have tweaked it.

(From OE-Core rev: 477db7cf4a6a0d06554c9d1539a01fed7c5cb389)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:02:57 +00:00
Alexander Kanavin
6460e97d92 libcomps: add a patch to fix the missing crc32 symbol error under musl
(From OE-Core rev: 73faaea3cc0f26052cd4e2422106c6243fb676b1)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:02:57 +00:00
Alexander Kanavin
33dbdd91cf dnf: update to 4.0.4
License-Update: spelling fixes

(From OE-Core rev: f03c0f06e14d18a5ed263e943e36920d70796db9)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:02:57 +00:00
Alexander Kanavin
4603f83e23 libsolv: update to 0.7.1
(From OE-Core rev: 425f8a83a47c013beb6303b88dda4c727d173ab9)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:02:57 +00:00
Alexander Kanavin
cafdd25de0 librepo: update to 1.9.2
expat dependency has been replaced by libxml

(From OE-Core rev: 6eeda04126009d5ab216d8178d8cbb0a22318bc5)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:02:57 +00:00
Alexander Kanavin
27467678ae rpm: update to 4.14.2.1
(From OE-Core rev: fc6951e46dcdce0af7861ffa78fe54426d5cb439)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:02:57 +00:00
Alexander Kanavin
a57d688e46 libdnf: update to 0.22.0
(From OE-Core rev: 35c163f6ebdc41eb6b65fca05706854b1aac20b5)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:02:57 +00:00
Richard Purdie
0c5e19c96d bitbake: tests/fetch: Update after recent gitsm message changes
Also use assetIn instead of assertTrue which aids debugging failures.

(Bitbake rev: 19dee675bb9ad012d28e1e57a888931355a831cb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 12:01:59 +00:00
Christopher Larson
e3e88600ce bitbake: fetch/git: fix AttributeError in shallow extraction logic
This code checks to see if shallow is either disabled or the tarball is
missing, but the else block tries to print the tarball filename, and
this attribute doesn't exist at all when shallow is disabled. Handle the
two cases separately to give sane errors for both cases without the
exception:

    Exception: AttributeError: 'FetchData' object has no attribute 'fullshallow'

(Bitbake rev: bdbb558342ebb4e64384c9838d2485d9299d91a6)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 10:45:14 +00:00
Alejandro Enedino Hernandez Samaniego
d9175f3748 bitbake: cooker: Fix multiconfig dependencies
When multiconfig is enabled the cooker adds providers
for all the targets to be built on all the multiconfig
variables that were set, regardless if there is a dependency
to it or not.

This causes an issue when a certain target is incompatible
with one or more of the multiconfigs, e.g. the target is not
in COMPATIBLE_MACHINE for one of the MACHINEs being built,
causing the cooker to error out since no providers can be
found for that certain target on that multiconfig.

This patch modifies the behavior to only look for PROVIDERS
for a target on the multiconfig that was selected to be built,
PROVIDERS are then looked for in other multiconfigs only when
there is a defined dependency to them.

[YOCTO #12985]

(Bitbake rev: f2106a3a767542359fdde238abcf5fe35ab3a144)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22 10:45:14 +00:00
Joshua Watt
ba1456ab7e poky.conf: Include SDKMACHINE in SDK name
Replace SDK_ARCH with SDKMACHINE so that SDK targeting different
development machines but having the same architecture don't cause
similar errors as found in '3614dd4aee9 ("poky.conf: Add MACHINE to
SDK_NAME")'

This doesn't have any effect on the SDK machines provided in oe-core,
since SDK_ARCH is the same as SDKMACHINE for all of them.

(From meta-yocto rev: 951184fd62b3ab14266f300defd47d3c5c09ad9b)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 17:19:29 +00:00
Richard Purdie
264f19f686 poky.conf: Add MACHINE to SDK_NAME
Avoid errors from:
MACHINE=qemux86-64 bitbake core-image-sato:do_populate_sdk
then:
MACHINE=genericx86-64 bitbake core-image-sato:do_populate_sdk

which gives:

ERROR: core-image-sato-1.0-r0 do_populate_sdk: The recipe core-image-sato is trying
to install files into a shared area when those files already exist. Those files and
 their manifest location are:
  deploy/sdk/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-2.6+snapshot.host.manifest
    (matched in manifest-qemux86_64x86_64-core-image-sato.populate_sdk)
  deploy/sdk/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-2.6+snapshot.testdata.json
    (matched in manifest-qemux86_64x86_64-core-image-sato.populate_sdk)
  deploy/sdk/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-2.6+snapshot.target.manifest
    (matched in manifest-qemux86_64x86_64-core-image-sato.populate_sdk)
  deploy/sdk/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-2.6+snapshot.sh
    (matched in manifest-qemux86_64x86_64-core-image-sato.populate_sdk)
Please verify which recipe should provide the above files.

Adding MACHINE to the artefact name will avoid this. The issue was highlighted by
changes to the autobuilder configuration.

(From meta-yocto rev: 3614dd4aee9d19f1024edb6a36b2862c2d726c04)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:48 +00:00
Parthiban Nallathambi
83b587e77b bitbake: fetch2/npm.py: Allow shrinkwrap resolved relative URL which startswith 'http' (e.g http-proxy)
shrinkwrap resolved relative URL can start with http. For example,
"resolved: http-proxy/-/http-proxy-${PV}.tgz" is still relative URL
to npm registry, but starts with http.

Current if statement compares the startswith 'resolved' to 'http',
which makes impossible to use npm download. Condtional comparison
now strictly checks for "http://" and "https://"

(Bitbake rev: f76075aa1a5159fd4d62949cb588346888b9fe60)

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:47 +00:00
Joshua Watt
5dd8df08c5 meta/icecc.bbclass: Update system blacklists
Updates the system blacklists to include packages that are known to have
problems compiling under icecream

(From OE-Core rev: fc5418e7bbdecfb27bafe595084e0fd0f991a388)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:14 +00:00
Joshua Watt
1da297d354 meta/icecc.bbclass: Move system blacklist to variables
The system blacklists are moved to variables which are ignore when
hashing. This prevents changes to the blacklists from causing all
taskhashes to change (and thus rebuild).

(From OE-Core rev: f5be9f6e9180ace3362bba52c7ced3b039441d7d)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:14 +00:00
Ross Burton
5ce58802e0 xcb-proto: use python3native to have reproducible pyc files
(From OE-Core rev: 7709b2551c07cfad591bb37817474fd106e7c2f1)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:14 +00:00
Ross Burton
01aa606e53 json-glib: add ptest
(From OE-Core rev: c33e9b5a6ecd43796ff88e44f68b122248145aa0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:14 +00:00
Ross Burton
1ced01965c libinput: 1.12.1 -> 1.12.3
(From OE-Core rev: fe627bbff2bf772bc3e7a58262ec1b6431f65222)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:14 +00:00
Ross Burton
615cd458a2 harfbuzz: upgrade 1.9.0 -> 2.1.3
(From OE-Core rev: aee2d09a18d42ed0bff582629f3b21d16e681f93)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:14 +00:00
Hongzhi.Song
f5c2e03a21 ltp: Use a legal bad address for mips in setrlimit05.c
This testcase fails on mips32. The process is killed by SIGBUS which
is not as expect.

This is because:
((void *)-1) is not a legal bad address which causes the process
killed by SIGBUG on mips.

'tst_get_bad_addr()' returns an address that should works on mips
and other arches.

(From OE-Core rev: e45948d4be14c14eff0a5c8c8597a7523f2edff1)

Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:14 +00:00
Daniel Díaz
707512e90a ltp: Delete unneeded patch for FNM_EXTMATCH
The patch in question was reworked, merged and released by
upstream version 20180926, as commit 822ad2043379.

(From OE-Core rev: 6ad99f3eabe359d5be98d63d4781063b63c83eea)

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:14 +00:00
Alexander Kanavin
3732e2deab maintainers.inc: add libmodulemd entry
(From OE-Core rev: bdeb0277c084ac4ecfa21bd77d318a9b0c39616d)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:14 +00:00
Alexander Kanavin
f06d14b296 libmodulemd: add a new recipe
This is a hard requirement of the new libdnf versions.

(From OE-Core rev: 4b53d713523f56994beb4a7b5dbb3347c8713e42)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:14 +00:00
Joshua Watt
1554c7c3a6 classes/testsdk: Split implementation into classes
Splits the SDK test implementation into configurable Python classes. The
classes used for the normal and extensible SDKs are
${TESTSDK_CLASS_NAME} and ${TESTSDKEXT_CLASS_NAME} respectively.

This allows SDK machines to override the classes used to implement the
tests. For the traditional SDK, a common "run()" function is provided by
the class (oeqa.sdk.testsdk.TestSDK), with several hook member functions
that can be overridden in child classes, making it easier to have
consistent behavior. The extensible SDK class
(oeqa.sdkext.testsdk.TestSDKEXT) also has a common "run()" function, but
no hooks have yet been added as there is not currently a known use case
for create derived classes.

These changes should be purely organizational; no functional changes
have been made to either the standard SDK or extensible SDK tests.

[YOCTO #13020]

(From OE-Core rev: a06d53928b22d5f88276023c4d57b206db2f27f9)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:14 +00:00
Richard Purdie
bdffa0ce10 apt: Improve SRC_URI
Use PV and BPN in SRC_URI as a minor improvement.

(From OE-Core rev: 19c9842644b7b0a599437fd394111f161c8b1f1e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Jens Rehsack
1d8a8e36b9 pseudo: fix link of sqlite3 using pkg-config
If sqlite3 is built with FTS5 it uses log() from libm, it sqlite3 is built
with READLINE it uses tgetent from a curses lib and readline from libreadline,
if it is built using deflate from libz ... , but all that linkage is lost
if we manually statically link so explicitely extract extra static linking
options from pkg-config and force them into pseudo as well.

This commit obsoletes (so include the implicit revert)
    e39fec613d pseudo: fix link with new sqlite3

(From OE-Core rev: 042af406583acc091ef82c3d1dcedd41315046de)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Jens Rehsack
e234be1bef sqlite3: Update 3.25.2 -> 3.25.3
Update SQLite3 from 3.25.2 to 3.25.3 to fix following issues:

* Disallow the use of window functions in the recursive part of a CTE.
* Fix the behavior of typeof() and length() on virtual tables.
* Strengthen defenses against deliberately corrupted database files.
* Fix a problem in the query planner that results when a row-value
  expression is used with a PRIMARY KEY with redundant columns.
* Fix the query planner so that it works correctly for IS NOT NULL
  operators in the ON clause of a LEFT JOIN with the
  SQLITE_ENABLE_STAT4 compile-time option.

Also introduce PACKAGECONFIG tunables to enable/disable e.g. index
and search functions to allow shrinking the library for very small
targets.

(From OE-Core rev: d533ad9b93383a8d721b72b4030b112a3799d559)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Alex Kiernan
9d0e83fdec systemd: backport fix to stop enabling ECN
>From upstream:

  Turning on ECN still causes slow or broken network on linux. Our tcp
  is not yet ready for wide spread use of ECN.

https://github.com/systemd/systemd/issues/9748

(From OE-Core rev: f951aa6f9fcf318f108ecdc3371498ee2e919e68)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Hongxu Jia
bf8ceefb8e go-target.inc: fix go not found while multilib enabled
Go binaries were installed to ${libdir}/go/bin, and create symlink
in ${bindir}, while enabling multilib, libdir was extended (such as
/usr/lib64), but BASELIB was not (still /lib), so use
baselib (such as /lib64)) to replace

(From OE-Core rev: 8b69af74c377bc9342f631d7e6b90fe05876216c)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Alexander Kanavin
a0c8ddea61 gobject-introspection: port cross-compilation support to meson
Also add a missing libdl dependency to the native relocation patch,
which was not necessary with autotools.

(From OE-Core rev: ff3f8d4fde8a1d07f5b5381546e740efa14fd483)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Alexander Kanavin
ab8ea8ad6f meson: do not manipulate the environment when looking for python via pkg-config
meson does it in a way that breaks oe builds (they export a bunch of PKG_CONFIG_ variables)

(From OE-Core rev: f071c5eb0a46b8ac5424c5baeb471a8080d4a078)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Armin Kuster
9b52aee1ef kexec-tools: update to 2.0.18
Drop patch included
0001-kexec-fix-for-Unhandled-rela-relocation-R_X86_64_PLT.patch

(From OE-Core rev: fd2a682812bf5b3e1bdb6571e965b1b9aeb54817)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Armin Kuster
7862ee1689 libx11: move hashes to inc
This should help keep libx11 and libx11-diet in sync
by throwing an error when building

(From OE-Core rev: 5d5434e77c60faa78f15c99714e34221d154617b)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Armin Kuster
b5f690c27d libx11-diet: update to 1.6.7
(From OE-Core rev: b9bc0ab578d86baa2d7e1988b0c3485bc7a632a3)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Armin Kuster
24dd7bfbdb nss: update to 3.40
see: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.40_release_notes

(From OE-Core rev: 56715665cc264083fdcb184f06d08f391b06c1c6)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Armin Kuster
a00ca26adb curl: update to 7.62.0
Drop all CVE patches now included in update.

For details see: https://curl.haxx.se/changes.html

(From OE-Core rev: 43a802c2605cd2f6095a7738347338492eafe722)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Richard Purdie
aa24e1aaf8 lttng-tools: Upgrade 2.9.5 -> 2.10.5 and improve ptest
A backported patch was removed.

The kmod option changed format in the new version so was adjusted accordingly.

The ptest package was improved to resolve failures in the tests/unit/
directory but disabling attempts to rebuild the binaries on target.

Various ptest libtool script wrappers are now replaced with real binaries
and since the test suite knows about these paths for dymanic libraries,
we put links in place for those.

A data file needed by one of the tests is also copied in.

(From OE-Core rev: fbafcd9a0101a637181d0aa9ec14579309a9bddf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Richard Purdie
33a8339608 lttng-tools: Improve ptest robustness
There are some fatal make errors that occur from the current ptest
for lttng-tools however since other tests are successful, those make
build failures were being ignored.

When upgrading, the order of test execution changed and the ptest failed
fatally straight away with the same errors.

Passing -k to make means it will try and run all the tests making the
test suite run more consistently over all lttng-tools versions.

(From OE-Core rev: 3113fb0812aba96df59fca58fe68b751d1d886e6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:16 +00:00
Richard Purdie
1805ee68dd nasm: Couple of recipe cleanups
The do_install now matches that from autotools.bbclass.

Document that brokensep is still needed.

Use a better form of handling of aclocal.m4

(From OE-Core rev: ef25d9bb18b3a26eefe7fc0c2d7003578c55f416)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:15 +00:00
Richard Purdie
ceafdb6953 nasm: Upgrade 2.13.03 -> 2.14
The patches are all backports or have equivalent changes in the new
release so can be dropped.

Upstream reworked the install handling to use DESTDIR instead of INSTALLROOT
and we no longer need to create directories.

(From OE-Core rev: ac9b892f06237a384a60d0404e6ed0afd63c1005)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-20 10:32:15 +00:00
Robert Yang
6ac5723769 bitbake: BBHandler: Fix __python_func_regexp__ for comment lines
Fixed:
- Add a comment in base.bbclass:
  def oe_import(d):
      import sys
  # Comment
      bbpath = d.getVar("BBPATH").split(":")
  [snip]

  Note, '# Comment' is started with '#', it is legal in python's syntax
  (though maybe not a good style), but bitbake reported errors:

  $ bitbake -p
  ERROR: ParseError at /path/to/base.bbclass:20: unparsed line: '    bbpath = d.getVar("BBPATH").split(":")'

  This error report would mislead people, the real problem is that '# Comment'
  is not supported, but it reports the next line, this may make it hard to debug
  the code are complicated.

We can make __python_func_regexp__ handle '^#' to fix the problem, since it
already can handle blank line "^$" in a python function, so it would be pretty
safe to handle "^#" as well.

(Bitbake rev: 79e62eef1c93f742bf71e9f25db57fdd2ffedd02)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:25 +00:00
Robert Yang
5a485dc014 bitbake: server/process: print a message when no logfile
[YOCTO #12898]

There might be no bitbake-cookerdaemon.log, print a message for debugging.

(Bitbake rev: 4adc582d2df7fdb9e51c4ebb5e66bbd21165b4dc)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:25 +00:00
Robert Yang
6b761940fe bitbake: data_smart: fix filename for compile()
Fixed:
Add the following two lines to conf/local.conf:
FOO = "${@foo = 5}"
HOSTTOOLS += "${FOO}"

* Before the patch
  $ bitbake -p
  Check the first lines of bitbake bitbake-cookerdaemon.log
  [snip]
  File "/buildarea1/lyang1/poky/bitbake/lib/bb/data_smart.py", line 125, in python_sub
    codeobj = compile(code.strip(), self.varname or "<expansion>", "eval")
  File "FOO", line 1
  [snip]

  There isn't a file named 'FOO', but a variable name.

* After the patch
  $ bitbake -p
  [snip]
  File "/buildarea1/lyang1/poky/bitbake/lib/bb/data_smart.py", line 129, in python_sub
    codeobj = compile(code.strip(), varname, "eval")
  File "Var <FOO>", line 1
    foo = 5

(Bitbake rev: 540b546be55e0f5f5d91695956da3a7732b2f90a)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:25 +00:00
Robert Yang
4a5062302b bitbake: data_smart: Add original traceback to ExpansionError
This can make it print clearer errors, for exmaple:

Add Runtime_error to 'def oe_import(d)"

 16 def oe_import(d):
 17     import sys
 18     Runtime_error
[snip]

* Before the patch:
  $ bitbake -p
  ERROR: Unable to parse /buildarea1/lyang1/poky/bitbake/lib/bb/data_smart.py
  Traceback (most recent call last):
    File "/buildarea1/lyang1/poky/bitbake/lib/bb/data_smart.py", line 430, in DataSmart.expandWithRefs(s='${@oe_import(d)}', varname='OE_IMPORTED[:=]'):
                   except Exception as exc:
      >                raise ExpansionError(varname, s, exc) from exc

  bb.data_smart.ExpansionError: Failure expanding variable OE_IMPORTED[:=], expression was ${@oe_import(d)} which triggered exception NameError: name 'Runtime_error' is not defined

  This error message has two problems:
  - "Unable to parse data_smart.py": This isn't the real cause.
  - It pionts to "raise ExpansionError(varname, s, exc) from exc" which isn't clear enough.

* After the patch:
  $ bitbake -p
  ERROR: Unable to parse OE_IMPORTED[:=]
  Traceback (most recent call last):
    File "OE_IMPORTED[:=]", line 1, in <module>
    File "/buildarea1/lyang1/poky/meta/classes/base.bbclass", line 18, in oe_import(d=<bb.data_smart.DataSmart object at 0x7f9257e7a0b8>):
           import sys
      >    Runtime_error

  bb.data_smart.ExpansionError: Failure expanding variable OE_IMPORTED[:=], expression was ${@oe_import(d)} which triggered exception NameError: name 'Runtime_error' is not defined

This one is more clearer than before.

(Bitbake rev: c0fe524c1aeccb24ddd2e1f7bf235c00fdbf79a7)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:25 +00:00
Robert Yang
c1f46c5064 bitbake: parse/ast: fix line number for anonymous function
Fixed:
- Define an error anonymous function in base.bbclass:
  15
  16 python() {
  17     Compile error
  18 }

  $ bitbake -p
  ERROR: Error in compiling python function in /buildarea1/lyang1/poky/meta/classes/base.bbclass, line 18:

  The code lines resulting in this error were:
       0001:def __anon_18__buildarea1_lyang1_poky_meta_classes_base_bbclass(d):
   *** 0002:    Compile error
       0003:
  SyntaxError: invalid syntax (base.bbclass, line 18)

  The lineno should be 17, but it reported 18, this would mislead people a lot
  when there more lines.

- Now fix it to:
  ERROR: Error in compiling python function in /buildarea1/lyang1/poky/meta/classes/base.bbclass, line 17:

  The code lines resulting in this error were:
       0001:def __anon_18__buildarea1_lyang1_poky_meta_classes_base_bbclass(d):
   *** 0002:    Compile error
       0003:
  SyntaxError: invalid syntax (base.bbclass, line 17)

This is because the anonymous function is constructed by:
text = "def %s(d):\n" % (funcname) + text

The len(self.body) doesn't include the "def " line, the length of the function
should be "len(self.body) + 1", so we need pass "self.lineno - (len(self.body) + 1)"
which is the same as 'self.lineno - len(self.body) - 1' to
bb.methodpool.insert_method() as we already had done to named function. Otherwise, the
lineno is wrong, and would cause other problems such as report which line is
wrong, but the line is not what we want since it reports incorrect line.

(Bitbake rev: 7466c8765fcc792e5ea3daefda3c5895e782d6c4)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:25 +00:00
Robert Yang
3de56327b2 bitbake: utils: better_compile(): Fix line number when report errors
Fixed:
- Add an error line in base.bbclass, e.g.:
  15
  16 def oe_import(d):
  17     import sys
  18     Compile error
  19     bbpath = d.getVar("BBPATH").split(":")
  [snip]

  Note the "Compile error" line, I added it for reporting errors.

  $ bitbake -p
  ERROR: Error in compiling python function in /buildarea1/lyang1/poky/meta/classes/base.bbclass, line 15:

  The code lines resulting in this error were:
       0014:    import oe.data
       0015:    for toimport in oe.data.typed_value("OE_IMPORTS", d):
       0016:        imported = __import__(toimport)
       0017:        inject(toimport.split(".", 1)[0], imported)
   *** 0018:
       0019:    return ""
       0020:
  SyntaxError: invalid syntax (base.bbclass, line 18)

  There are 2 problems:
  - The "line 15" is incorrect, it is a blank line, not the error line.
  - The "*** 0018" points to incorrect position.

  These two problems would mislead people a lot sometimes.

- Now fix it to:
  $ bitbake -p
  ERROR: Error in compiling python function in /buildarea1/lyang1/poky/meta/classes/base.bbclass, line 18:

  The code lines resulting in this error were:
       0001:def oe_import(d):
       0002:    import sys
   *** 0003:    Compile error
       0004:    bbpath = d.getVar("BBPATH").split(":")
                [snip]
  SyntaxError: invalid syntax (base.bbclass, line 18)

Please see comments in the code for more details on how it is fixed.

(Bitbake rev: bbb3d87d171da38fd8e9bce011d109fba28a75c0)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Peter Kjellerstedt
07e1a65f07 bitbake: siggen: Adapt colors used by bitbake-diffsigs to support light themes
The colors specified for use with bitbake-diffsigs were adapted for a
dark theme, e.g., by setting the background color to black, which made
it look very bad when used with a light theme.

To make it look good both with a dark or a light theme, it is better
to drop the background color. It is also better to leave out the color
altogether for the title and just use bold. Finally, dropping bold for
the red and green texts indicating removed/added values better matches
other colorized diff implementations as, e.g., git diff.

(Bitbake rev: f1a2c23520832ee91e85338c1ad8af1fec0d0b19)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Ross Burton
6e706b3927 ofono: upgrade 1.24 -> 1.25
(From OE-Core rev: 2c858a2e1c8c99f87e74c2f95ccc749edfbe01ac)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Richard Purdie
94520c7790 mtools: upgrade 4.0.18 -> 4.0.19
(From OE-Core rev: f08f09accc124162e7538595694868d307c59649)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Richard Purdie
4d64e87ce3 libinput: upgrade 1.11.3 -> 1.12.1
(From OE-Core rev: 54b58dab8c76279ef7f9d2bd8ec1018dbcdf958b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Richard Purdie
3f84fa1d0c libepoxy: upgrade 1.5.2 -> 1.5.3
(From OE-Core rev: f69b41b0796a9ce5716f794b8e9fc3be7ea96b68)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Richard Purdie
6437423dfd at-spi2-core: upgrade 2.28.0 -> 2.30.0
(From OE-Core rev: de796789d386ec0e4f67455b07cf80df5324d897)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Richard Purdie
f9c149e5c7 lttng-modules: upgrade 2.10.7 -> 2.10.8
Drop backported patch already applied upstream.

(From OE-Core rev: 7399dd25bcd81e61dca21bd187aa7217231eb8c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Richard Purdie
40fb7e115b lttng-ust: upgrade 2.10.1 -> 2.10.2
(From OE-Core rev: 1df9f7d6946c9a0ee0749ed8646446eb56878846)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Richard Purdie
476b519c59 subversion: upgrade 1.10.0 -> 1.11.0
(From OE-Core rev: e06afc5cc6d848e63e1dd66425612c6a486a5a6c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Hong Liu
77ad20f55b harfbuzz: upgrade 1.8.8->1.9.0
Upgrade harfbuzz from 1.8.8 to 1.9.0.

(From OE-Core rev: 55a2d8619b0a3e5606076808d306cd78cf3edf41)

Signed-off-by: Hong Liu <hongl.fnst@cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Petr Vorel
b98f453633 ltp: Update to 20180926
New patches
* 0001-statx-fix-compile-errors.patch

Rebased patches
* 0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch

Removed removed (accepted in upstream)
* 0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch
* 0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch
* 0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch

Removed patches (different fix accepted in upstream)
* 0001-mmap15-mips64-return-EINVAL.patch

(From OE-Core rev: 439cb0421570e1edea6994775ed782b9b264f4a1)

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Carlos Rafael Giani
944d24eb0b gstreamer1.0-python: upgrade to version 1.14.3
(From OE-Core rev: 750e03a231eb3bcf31c30cf67ff80a6bc821ee66)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Carlos Rafael Giani
cf620d8493 gstreamer1.0-omx: upgrade to version 1.14.3
(From OE-Core rev: ea4882b89500d9da8d7a731968ea7a311737f6ea)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Carlos Rafael Giani
ca8d3f1494 gstreamer1.0-vaapi: upgrade to version 1.14.3
(From OE-Core rev: c3d863f4f989461c61e7d61259423fe0e8202eed)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Carlos Rafael Giani
bcb6cd29f8 gstreamer1.0-rtsp-server: upgrade to version 1.14.3
(From OE-Core rev: f62a87b3c6638c6da764d19133eba552f2102bae)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Carlos Rafael Giani
5fcb2ce593 gstreamer1.0-libav: upgrade to version 1.14.3
(From OE-Core rev: 4508d6f0befb1b91f9cfe74b0ca84c8fb5f79da5)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Carlos Rafael Giani
8f99a47347 gstreamer1.0-plugin-ugly: upgrade to version 1.14.3
(From OE-Core rev: aedec50bc8fb2ddcd1ea7cadbdd07f9d103840aa)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Carlos Rafael Giani
cd3e85374c gstreamer1.0-plugin-bad: upgrade to version 1.14.3
(From OE-Core rev: 22e124ef0b01c3aae75e8e29a3078cb42a47ae17)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Carlos Rafael Giani
f34fd887fa gstreamer1.0-plugin-good: upgrade to version 1.14.3
(From OE-Core rev: 63753e9c06641025ba4711af61a4f34e2388ec72)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Carlos Rafael Giani
d72486074f gstreamer1.0-plugin-base: upgrade to version 1.14.3
(From OE-Core rev: df2a0fd27a23ece636c018d007e2dcf9343fb7a8)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Carlos Rafael Giani
80b700db66 gstreamer1.0: upgrade to version 1.14.3
(From OE-Core rev: fb840932018cb449ee96904b8a2f17e7693a5669)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Anuj Mittal
943583f59e libva: update 2.2.0 -> 2.3.0
>From release notes:

    Bump VA-API version to 1.3.0 and libva to 2.3.0
    Add max frame size parameters for multiple pass case in legacy mode
    Add new BRC mode AVBR
    Add new interface for High Dynamic Range tone mapping
    Add missing enum to string conversions
    Add hevc subsets parameters structure
    Add Customized Noise Reduction (HVS) interfaces
    Add new BRC mode definition QVBR
    Add more complete colour properties for use in VPP

(From OE-Core rev: 8825a6e7c5c0d1e1d17e2bb8ed23dc8b3c9ce8ab)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-19 17:03:24 +00:00
Richard Purdie
9c55d8d8fe sanity: Add check for WSL
Users are starting to expect OE to work under WSL which it doesn't. Add a warning to
tell them about this up front and manage expectations.

(From OE-Core rev: 62fe04c2451f612b9ee5eba469c7724b63484499)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Richard Purdie
fabffda42e testimage: Enable autorunning of the package manager testsuites
Now that the hangs in httpservice are fixed we can let these tests
auto skip as appropriate.

(From OE-Core rev: 42a0d70291d551578e21f590fcb85ca72a78ccb5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Richard Purdie
11340de05b oeqa/utils/httpserver: Rework to avoid hangs and improve logging
testimage.bbclass installs a SIGTERM handler which conflicts with the
use of multiprocessing here. This is paritcularly problematic if the http
service is terminated before its started and hence before its had a chance
to reset the default signal handler (as the code was written).

Instead, temporarily remove testimage's handler whilst forking the http process
which means the correct handler is installed and won't deadlock.

Also take the opportunity to add in some log messages about the server start
and shutdown so that future debugging is easier and its clearer what the code
is doing.

(From OE-Core rev: 0762b6021b87ceb1f37952f3a6d64a36e99ae6a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Richard Purdie
99f0e68973 testimage/testsdk/selftest: Avoid platform.distro_identifier deprecation warnings
Use our own lsb function instead as used elsewhere by the codebase.

(From OE-Core rev: acac45a6fd604d28ef7c23d67482af3d7e8bcfe3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Richard Purdie
8cee6d31bb oeqa/concurrencytest: Avoid unclosed file warnings
Avoid an unclosed file per thread warning when running selftests concurrently
by closing the result stream.

(From OE-Core rev: 33a4a076e8aa72a872807332501e7f5ae1cee0e2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Richard Purdie
dbe49d0ad1 scripts: Remove deprecated imp module usage
The imp module is deprecated, port the code over to use importlib
as recently done for bb.utils as well.

(From OE-Core rev: 24809582d4850190d87cd8eb8180d0dce215dbdf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Chen Qi
f48d111e42 busybox: skip known bugs in ptest
Set SKIP_KNOWN_BUGS in run-ptest script to skip ptest cases which
are known to relate to some known bugs.

(From OE-Core rev: b7ab8de1e5767593d1933cf1a86b91ec2fb9d607)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Randy MacLeod
e442370f2a valgrind: update upstream patch status
Two recent patches are now marked as reported in the
valgrind bugzilla.

(From OE-Core rev: 0f8608dbdf150470f1b4e882515fe9f78f82b43a)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Ming Liu
20eb0733e5 wic: bootimg-efi: add a title source parameter
Sometimes the users might want to change the title showing on UEFI
booting screen, so far it's hard-coded to 'boot'.

There is not a easy way to customize it in current design, I tried
firstly with '--configfile', but that does not work with --use-uuid,
since the later option will generate a UUID and write it to boot
config, only when the former option is not enabled.

So a new source parameter 'titile' is added in this patch, it defaults
to 'boot' to be consistent with the original title.

(From OE-Core rev: 37e16188ef3b1b328eb18b3e459c051c9c9f0332)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Ming Liu
e5a43f6386 image.bbclass: add a missing blank
When calling d.appendVarFlag, a blank is needed or else it could mess
up the later appended variables.

Reported-by: Stefan Agner <stefan.agner@toradex.com>
(From OE-Core rev: 8b2df6e5874b932b356847c5bde10d5b31d67213)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Richard Purdie
e2af21d119 lib/oe/package_manager: Avoid race problems when calling list_pkgs()
list_pkgs() for rpm calls RpmPM() which would try and create a copy of the
package feed. This can be called for example from buildhistory whilst some
other task may be working on an SDK or image construction, causing the package
feed to disappear part way through an operation.

Avoid the need to copy the package index just to list the installed
packages, avoiding the race.

(From OE-Core rev: d05fa49e06034913e22c223803c98cb265e2ae58)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Richard Purdie
f1d0b6d296 oeqa/utils/qemurunner.py: Fix python regex warnings
Fix the warnings:

meta/lib/oeqa/utils/qemurunner.py:250: DeprecationWarning: invalid escape sequence \.
  ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1])
meta/lib/oeqa/utils/qemurunner.py:343: DeprecationWarning: invalid escape sequence \-
  if re.search("root@[a-zA-Z0-9\-]+:~#", output):
poky/meta/lib/oeqa/utils/qemurunner.py:350: DeprecationWarning: invalid escape sequence \-
  if re.search("root@[a-zA-Z0-9\-]+:~#", output):
meta/lib/oeqa/utils/qemurunner.py:448: DeprecationWarning: invalid escape sequence \-
  if re.search("[a-zA-Z0-9]+@[a-zA-Z0-9\-]+:~#", data):

by correctly marking the regexs.

(From OE-Core rev: 8e6987735002560fca714f77ea8ece9d4b28f7fa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Richard Purdie
3e9505274b oeqa/selftest/context: Replace deprecated imp module usage
Avoid the warning:

meta/lib/oeqa/selftest/context.py:8: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp

In this case importlib is a direct replacement.

(From OE-Core rev: db7a60c36a2d3eefc61ae6e1ede01680dc932035)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Changqing Li
f027576193 oepydevshell-internal.py: decode only when readdata is valid
fix below problem:
pydevshell raises exception when maximize the python shell window.
when click maximize, rlist of select return ready object, but the
pty.read is None, so throw exception of 'NoneType' object has no
attribute 'decode', change to only decode when readdata is valid.

[YOCTO #11875]

(From OE-Core rev: d598f8d48e9b094af99effa7471d613b16ffa817)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Wes Lindauer
10270f4222 module.bbclass: Add INSTALL_FW_PATH for out-of-tree modules
This same variable was added to the make line in kernel.bbclass in
0decf1cc1c. With the addition of the
usrmerge feature, out-of-tree modules could use this same variable.

(From OE-Core rev: 1d24d1ac5b9c772d84104396438e5d1308332785)

Signed-off-by: Wes Lindauer <wesley.lindauer@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Wes Lindauer
2ce3efc6a6 busybox: Provide /bin/ash when usrmerge is enabled
When usrmerge is enabled, scripts that were explicitly using #!/bin/ash
will cause a QA Error like the following:

QA Issue: bar.sh contained in package foo requires /bin/ash,
but no providers found in RDEPENDS_foo? [file-rdeps].

It seems perfectly acceptable for scripts to use /bin/ash so provide
it along with /bin/sh.

(From OE-Core rev: cc8d54521aa79c1ca88c801e89c3ade6c17ae7a2)

Signed-off-by: Wes Lindauer <wesley.lindauer@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Changqing Li
bfe2255172 checklayer: generate locked-sigs.inc under builddir
yocto-check-layer will find locked-sigs.inc under builddir,
but locked-sigs.inc is generated under current bitbake working
dir. if run yocto-check-layer outside builddir, we will met error
like "No such file or directory: *locked-sigs.inc". change to
run bitbake -S under builddir to fix this problem.

[YOCTO #12973]

(From OE-Core rev: 2ec0bc0b038bc6413978c8f34ef5c0d22b4bc3e7)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Kai Kang
6da5d5b324 gettext: fix CVE-2018-18751
Backport patch to fix CVE-2018-18751 for gettext. Because po-gram-gen.y
has been modified by fix-CVE-2018-18751.patch, it requires yacc which
provided by bison-native to re-create po-gram-gen.c. Please remove
bison-native from DEPENDS* when next upgrade.

Ref:
https://security-tracker.debian.org/tracker/CVE-2018-18751

(From OE-Core rev: 4b3a085d6c63fd8459bb084aaa277dd2e8949594)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16 11:46:07 +00:00
Richard Purdie
be1c84a91e poky.conf: Update the distros we test against on the autobuilder
(From meta-yocto rev: e2bad29f075d668d70b55f85aec4fd6039e7c119)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:18:18 +00:00
Richard Purdie
5078c262e4 poky.conf: Update to post release versioning
(From meta-yocto rev: 5f3083593d7d0bb537d861fd7b995b97a4fee921)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:18:18 +00:00
Heiko Schocher
81e48b24dd meta-yocto-bsp: beaglebone-yocto.conf: support 8250 serial driver
it is possible to use the beagleboneblack with the 8250 serial
driver or with the deprecated omap serial driver.

Unfortunately serial console get different names (ttyS0 with
8250 driver and ttyO0 with omap driver)

So set SERIAL_CONSOLES to
SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0"

(intentionally with "?=" so it is overwriteable)
and activate

SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"

with that on the first boot the correct value is picked up
automatically.

(From meta-yocto rev: ffd224382af6fe1f5eeae32d7b28cc975acdde05)

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:18:18 +00:00
Richard Purdie
490bca81c3 bitbake: utils: Avoid regex value escape warnings
Avoid warnings such as:
bitbake/lib/bb/utils.py:72: DeprecationWarning: invalid escape sequence \d
  numeric_regexp = re.compile('^(\d+)(.*)$')
bitbake/lib/bb/utils.py:1165: DeprecationWarning: invalid escape sequence \(
  var_res[var] = re.compile('^(%s%s)[ \\t]*\([ \\t]*\)[ \\t]*{' % (var[:-2].rstrip(), override_re))

(Bitbake rev: bbf3cbae775383265292a778cd522d4e2f69a3a0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:18:18 +00:00
Richard Purdie
54bbe35eab bitbake: utils: Avoid warnings about deprecated imp module
The imp module is deprecated, port the code over to use importlib.

bitbake/lib/bb/utils.py:30: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp

(Bitbake rev: 3c2cb35588e91fbd7b136e5e2c78eeb77e126c84)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:18:18 +00:00
Richard Purdie
57e290371b bitbake: lib/bb/server: Avoid UnboundLocalError traceback
Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/main.py", line 464, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/server/process.py", line 490, in connectProcessServer
    if command_chan_recv:
UnboundLocalError: local variable 'command_chan_recv' referenced before assignment

(Bitbake rev: ad79fadd855f5c10242ed17e9e0f3eb0274f26d2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:18:18 +00:00
Andreas Müller
1c7bc2ff9d scons.bbclass: fix indention
(From OE-Core rev: ae12c5f86601a81f4208fd371ce8803464aedaa0)

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Andreas Müller
11af905ac7 scons.bbclass: Force rebuild if necessary
(From OE-Core rev: dd462c3b3f449805e104be402b23fbfabcaefe8f)

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Alexey Brodkin
4fd6797319 tcf-agent: Disable architecture-specific features for ARC
There's no support of architecture-specific features for ARC
in tcf-agent, so disable non-generic stuff for now.

(From OE-Core rev: 49b376b84bcb321eac9787957be2c94ec59e0a95)

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Mingli Yu
99956aa33a x264: Disable asm on x86
The previous commit as below only fixes the
textrel issue with musl on x86, update it also to
fix the issue such as with glibc on x86.
74ea4f280c x264: Disable asm on musl/x86

[YOCTO #11770]

(From OE-Core rev: 521af79d1d7635b4bd0ee2cc45b96729285bf469)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Hongxu Jia
a5de19553e rpcbind: 0.2.4 -> 1.2.5
- Drop backport fixes
  0001-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch
  pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch
  rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch

- Do not manually move binaries from bindir to sbindir,
  the upstream already moved rpcbind from bin_PROGRAMS
  to sbin_PROGRAMS in Makefile.am
  https://git.linux-nfs.org/?p=steved/rpcbind.git;a=commitdiff;h=9afccfcd5ab350d6bc72622f3d1ccfb9e54652b0

(From OE-Core rev: 3df591cd914a4f060f0a178a59c93b464192d80d)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Peter A. Bigot
a97bfad798 bluez5: add mesh dependency on ell
Introduced at or before 5.50.

(From OE-Core rev: aec2020cec8a21ac85797cb049961d9cfcf8b4f1)

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Richard Purdie
df63ae7edd oeqa/utils/commands: Avoid unclosed file warnings
Avoid warnings such as:

meta/lib/oeqa/utils/commands.py:213: ResourceWarning: unclosed file <_io.BufferedReader name=4>
  return runCmd(cmd, ignore_status, timeout, output_log=output_log, **options)

(From OE-Core rev: 6a68c42de08cffbadb59ebda63fa5e19f6e5acef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Richard Purdie
629c9f1cac oeqa/core/runner: Correctly markup regexs
Avoid the warning "DeprecationWarning: invalid escape sequence \(" by marking
the regexs correctly.

(From OE-Core rev: cb49980fa4a158d5529902df731dec61a8c9b3d4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Richard Purdie
66effe5765 oeqa/loader: Fix deprecation warning
Clean up the warning:
meta/lib/oeqa/core/loader.py:27: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  _failed_test_args = inspect.getargspec(unittest.loader._make_failed_test).args

(From OE-Core rev: d2deb66830be2d44532fea3d5db763b57778252a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Richard Purdie
5c590a3733 oeqa/runner: Sort the test result output by result class
We want to see failures/errors listed last since this is the most easily
visible part of the log on consoles or autobuilder output and makes
human processing easier rather than having to scroll up and scan for
a single failure.

(From OE-Core rev: 7954b19020c28a4120bc1671aa81b9e1e2b05fa2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Richard Purdie
cc08d4bad2 oeqa/runner: Always show a summary of success/fail/error/skip counts
Its useful to have the counts of success/failure/error/skipped at the end of the
results to allow for easier human reading of what happened.

(From OE-Core rev: 080d8900d470a8e7f929b0c5c2765ad461744fbb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Richard Purdie
0577d02fae license_image: Fix rootfs file ownership issues with COPY_LIC_DIRS
We need to set ownership of the license files after copying into the rootfs.
We also need to ensure we don't overwrite the rootfs files outside rootfs
generation, hence only write there when the new rootfs function parameter
is True.

[YOCTO #12961]

(From OE-Core rev: 6aa0eeaa4d31a440700f7695174de2a1dcc54866)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Alexey Brodkin
ef63723965 locale: Allow usage of cross-localedef for ARC
With this it's possible to build locale data for ARC
and not do it instead on the first boot.

(From OE-Core rev: f13c303491dc8850126ea14baedc7b63b7b5ecf4)

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Alexey Brodkin
aae2c1ad96 packagegroup-core-sdk: Disable SANITIZERS for ARC
Sanitizers are not yet supported on ARC.

(From OE-Core rev: 1b7b2d2ab887f1c169bb4d3298404549948d1b32)

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Niko Mauno
f00b998ef2 opkg-utils: Fix update-alternatives link relocation
Recently Debian-style support for link relocation was added to
'update-alternatives' script, but it fails under circumstances where
host rootfs root directory differs from target rootfs root directory
and two alternative packages provide a symbolic link with source
located in different directories.

An example of the case is busybox provided /bin/rev (symlinking to
/bin/busybox.nosuid) and util-linux provided /usr/bin/rev (symlinking
to /usr/bin/rev.util-linux) in which case following failure occurs
during image recipe's do_rootfs() task:

  ERROR: core-image-minimal-1.0-r0 do_rootfs: Postinstall scriptlets of ['util-linux'] have failed. If the intention is to defer them to first boot,
  then please place them into pkg_postinst_ontarget_${PN} ().
  Deferring to first boot via 'exit 1' is no longer supported.
  Details of the failure are in .../tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.
  ERROR: core-image-minimal-1.0-r0 do_rootfs: Function failed: do_rootfs

Looking in log.do_rootfs file, following relevant lines can be observed:

  update-alternatives: renaming rev link from /bin/rev to /usr/bin/rev
  mv: cannot stat '/bin/rev': No such file or directory

Mitigate issue by applying patch which adds target root filesystem root
directory path prefix to failing 'mv' calls relevant variable references

(From OE-Core rev: f0912e23629758fe4303284e7db8f4089bb7b4cb)

Signed-off-by: Niko Mauno <niko.mauno@iki.fi>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Richard Purdie
8291cd25d8 testimage: Further cleanup DEFAULT_TEST_SUITES
Now the test markup of the development tools tests is complete, this
can be further tweaked to auto run the correct tests.

(From OE-Core rev: bd4f8d12fe1f9f2643ee9e68fa2bb981134294fb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Richard Purdie
cd81cd155b oeqa/runtime/cases: Improve dependencies of kernel/gcc/build tests
Mark up these tests as needing a compiler, make and kernel source code
as appropriate, the image feature requirements can then be retired.

(From OE-Core rev: 9f64e6c25abdf494fb511e9cd401f8dcaa08be2a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Richard Purdie
8c4ba1afdd testimage: Simplfy DEFAULT_TEST_SUITES logic
Now that the tests have correct markup to automatically determine which images
they can run against, clean up the default test suites logic to be simpler
and not image specific.

Some cleanup of the compiler tests still needs to be completed but this
is a good first step.

The only downside to this is more noise during testing as we now see
many skipped messages for simple images like core-image-minimal.

The auto type is being removed since it currently breaks badly due to the
socat mandatory inclusion from the meta-selftest layer which is a problem
which needs to be addressed seperately.

(From OE-Core rev: 4966bc33845752eb0aeae54b72e8ba0146a7ed52)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Richard Purdie
633bd85270 oeqa/runtime/cases: Improve test dependency information
Add the OEHasPackage decorator to a variety of tests so they determine
automatically if they should run against a given image.

To ensure tests can do this we need to move target operations such
as scp commands into the tests and out of the class startup/teardown.

(From OE-Core rev: 60d6580b85714b8960a964e775d76a7f937f5e5a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Hongxu Jia
4c034810e5 rng-tools: fix typo of unrecognised options: --disable-jitterntropy
- Fix typo of `--disable-jitterntropy' in both of PACKAGECONFIG and configure --help

- Enable jitterntropy for musl

(From OE-Core rev: c3b96aaa40413d66d8fc4252235e6fa27dd8db53)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Richard Purdie
3eae7a84b2 maintainers.inc: Add entry for libjitterentropy (copied from rng-tools)
(From OE-Core rev: 9a24e79aea2fb3c60803cb265c1d03a1873cfe9d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Hongxu Jia
9a124f6539 libjitterentropy: add 2.1.2
>From the following kernel commit we know: Fedora has integrated the jitter
entropy daemon to work around slow boot problems, especially on VM's that
don't support virtio-rng

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=81e69df38e2911b642ec121dec319fad2a4782f3

Do the same thing for Yocto.

(From OE-Core rev: fb85c1b420b86b8420785334a3a18afbb013b238)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Hongxu Jia
b39fca9d45 rng-tools: 5 -> 6.6
- Update SRC_URI, previously upstream is dead, latest update is 2014

- Drop read_error_msg.patch

- Rework do_configure and do_compile

- Enable jitterentropy

License-Update: Upstream changed, but license is still gplv2

(From OE-Core rev: 0d5fb24babec69b653f582acdf47fa22fcdeed2e)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Hongxu Jia
bc0d9a1a5e machine/qemu*: fix kernel finish crng init more and more slowly
Just adding `-device virtio-rng-pci' to the QEMU invocation will
add the device with a default host backend. As of QEMU 1.3+,
the default backend is to use the host's /dev/random as a
source of entropy. [1]

When the entropy pool is empty, reads from /dev/random will
block until additional environmental noise is gathered. [2]

For Yocto, if call runqemu frequently, it will consume lots
of host's /dev/random, and kernel finish crng init in guest get
more and more slowly.

Here are 4 times runqemu boot test:

[    3.464432] random: crng init done
[   20.874030] random: crng init done
[   23.583589] random: crng init done
[   23.858945] random: crng init done

Modify entropy source to /dev/urandom device on the host which
returns random bytes using a pseudorandom number generator seeded
from the entropy pool. Reads from this device do not block and
kernel finish crng init in guest will not delay.

Of course, the side effect is obviously, we lost the quality of
randomness, but the modification is only on runqemu script
rather than real embedded device, and it benefits oeqa efficiency
in which many cases call runqemu especially multiple oeqa builds
on one host.

After apply the fix:

[    3.364670] random: crng init done
[    4.619061] random: crng init done
[    3.403897] random: crng init done
[    3.450717] random: crng init done

[1] https://wiki.qemu.org/Features/VirtIORNG
[2] http://man7.org/linux/man-pages/man4/random.4.html

(From OE-Core rev: 853644f82eb3205ef3efc1ea3959c7225dfacf61)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Hongxu Jia
81fc280bae rng-tools: Fix crazy defaults
Since commit [f1dc9ac rng-tools: Fix crazy defaults] fixed
init based on sysvinit, this fix rngd.service based on systemd.

(From OE-Core rev: 078630b7bf8599ea2b3717ce33d2da0f7f26b0e2)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:40 +00:00
Hongxu Jia
d40767ac83 testsdk: fix skipped testcase output "UNKNOWN" status while multiprocess execution
Usually skipped testcase output "SKIPPED"
[snip serial execution]
|RESULTS - buildgalculator.GalculatorTest.test_galculator - Testcase -1: SKIPPED (0.01s)
|RESULTS - python.PythonTest.test_python3 - Testcase -1: SKIPPED (0.01s)
[snip serial execution]

But if enable multiprocess execution, skipped testcase output "UNKNOWN" status
[snip enable multiprocess execution]
|RESULTS - buildgalculator.GalculatorTest.test_galculator - Testcase -1: UNKNOWN
|RESULTS - python.PythonTest.test_python3 - Testcase -1: UNKNOWN
[snip enable multiprocess execution]

Here is my investigation:

There is a class pairs TestProtocolClient and TestProtocolServer
provided by python3-subunit. The TestProtocolClient generates a
subunit stream of TestResult from a test run, and TestProtocolServer
parses the stream of subunit TestResult.

The class ProtocolTestCase is a unittest.TestCase adapter and it
uses TestProtocolServer to parse the stream of subunit TestResult.

In Yocto testsdk, it forks multiple processes to execute testcases
and use TestProtocolClient to generate TestResult stream; and then
it creates multiple threads to use ProtocolTestCase to parse stream
of subunit TestResult through pipe; finally it passes multiple
ProtocolTestCase as TestCase instance to main process and output
status result.

The problem point is TestProtocolServer parses `skip:' directive
after reading a `test:' directive. Without `test:' directive,
`skip:' directive will be ignored. All above requires SkipTest should
be raised inside a test method rather than setUpClass method.

Throwing SkipTest inside setUp works correctly

(From OE-Core rev: 4828a88556d59e4d06933164c2ebeb9361b7450e)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Peter Kjellerstedt
6b7227b68a libaio: Extend to native
lvm2 currently requires libaio. So building lvm2-native will result in
the following error.

  ERROR: Required build target 'lvm2-native' has no buildable providers.
  Missing or unbuildable dependency chain was: ['lvm2-native', 'libaio-native']

Extend libaio to native to fix this issue.

(From OE-Core rev: fe871d23c2714e66a1f5e2428a16e742ca40fc62)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Mingli Yu
e4263671a3 libsm: extend to nativesdk
After enable tk via PACKAGECONFIG for python3,
there comes below error:
Missing or unbuildable dependency chain was: ['buildtools-tarball', 'nativesdk-python3-testtools', 'nativesdk-python3-pbr', 'nativesdk-python3', 'nativesdk-tk', 'nativesdk-libxt', 'nativesdk-libsm']

Extend libsm to nativesdk to fix this issue.

(From OE-Core rev: 5a527e381705ed8a3e2caba98205c8c8172a347a)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Mingli Yu
b0e6452137 libice: extend to nativesdk
After enable tk via PACKAGECONFIG for python3,
there comes below error:
Missing or unbuildable dependency chain was: ['buildtools-tarball', 'nativesdk-python3-git', 'nativesdk-python3-gitdb', 'nativesdk-python3-async', 'nativesdk-python3', 'nativesdk-tk', 'nativesdk-libxt', 'nativesdk-libsm', 'nativesdk-libice']

Extend libice to nativesdk to fix this issue.

(From OE-Core rev: 46f39d402fbf5487d7a1036fbeec6726ba49334b)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Mingli Yu
c1b27dd347 fontconfig: extend to nativesdk
After enable tk via PACKAGECONFIG for python3,
there comes below error:
Missing or unbuildable dependency chain was: ['nativesdk-packagegroup-sdk-host', 'nativesdk-opkg', 'nativesdk-libsolv', 'nativesdk-rpm', 'nativesdk-python3', 'nativesdk-tk', 'nativesdk-xft', 'nativesdk-fontconfig']

Extend fontconfig to nativesdk to fix this issue.

(From OE-Core rev: f15120430914582f0889ddc442de1055e6c5dca9)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Mingli Yu
ca2e5ccfa0 libxft: extend to nativesdk
After enable tk via PACKAGECONFIG for python3,
there comes below error:
Missing or unbuildable dependency chain was: ['buildtools-tarball', 'nativesdk-python3-testtools', 'nativesdk-python3-pbr', 'nativesdk-python3', 'nativesdk-tk', 'nativesdk-xft']

Extend libxft to nativesdk to fix this issue as
PROVIDES = "xft" in libxft recipe.

(From OE-Core rev: 2709062a47b86bb86b2768f04f97f00af1bb9b47)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Mingli Yu
62a36938e5 libxt: extend to nativesdk
After enable tk via PACKAGECONFIG for python3,
there comes below error:
Missing or unbuildable dependency chain was: ['buildtools-tarball', 'nativesdk-python3-pytz', 'nativesdk-python3', 'nativesdk-tk', 'nativesdk-libxt']

Extend libxt to nativesdk to fix this issue.

(From OE-Core rev: 2ed08a6c467202504737040b83a8b9fd6481f62b)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Richard Purdie
7ed0af48df testimage: Remove duplicate dependencies
(From OE-Core rev: 16d4368e7b85d5179374adb0a2d1ac215793e104)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Richard Purdie
a9150f1252 oeqa/runtime/utils/targetbuildproject: Use a subdir within ~/
Without doing this, the code can and sometimes does try and do "rm ~/"
which I think we'd all prefer it didn't.

(From OE-Core rev: 9dc1de59330c366783ea043c68c1b59b1b49e707)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Richard Purdie
8ec759a723 oeqa/utils/buildproject: Only clean files if we've done something
We should only be wiping out things on target if the tests have
actually run.

(From OE-Core rev: d38c3eac0a5a1a9b0eb98385832e92f48145655e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Richard Purdie
44ffe76f37 distcc: Handle upstream branch deletion for old releases
distcc upstream dropped the 3.2 branch which we reference in older project releases
the revisions are there, just the branch is not. In order to be able to continue
to build those old releases, adjust any mirror tarball to contain the missing branch.
We have updated the  newer point releases but the previous tags were failing to build.

(From OE-Core rev: 5a1a322cfca2a514707eeb48f4c3dce5e4c1ad48)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Richard Purdie
9b7c076032 oeqa/manual/build-appliance: Drop test which is already automated
The nightly-build-appliance target already tests this particular build.

(From OE-Core rev: 02c5f853f30568eb3f289c6b6fb5cacf712d15f7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Nathan Rossi
97c9fb7ba0 base.bbclass: Display name of licenses which caused SkipRecipe
Display the name of the restricted licenses which caused the recipe to
be skipped. This makes it easy to determine which license or licenses
are missing and need to be checked and whitelisted.

(From OE-Core rev: b71cd1ec45e247db688b784697829c1b485ca9ca)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Martin Hundebøll
c77d38acd6 openssl-1.1.1: remove build path from version info
The openssl build system generates buildinf.h containing the full
compiler command line used to compile objects. This breaks
reproducibility, as the compile command is baked into libcrypto, where
it is used when running `openssl version -f`.

Add stripped build variables for the compiler and cflags lines, and use
those when generating buildinfo.h.

This is based on a similar patch for older openssl versions:
https://patchwork.openembedded.org/patch/147229/

(From OE-Core rev: cbc9b743a711f07c04cf9f5b2fc3f83da6d28913)

Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Jens Rehsack
62c15051ce cpan.bbclass: avoid newer MakeMaker run perl.real
In newer versions of ExtUtils::MakeMaker, the location of the perl
binary to run is determined differently which results in finding
${bindir}/perl.real instead of ${bindir}/perl

(From OE-Core rev: 362bd36cbec052d2a37710498c901b699dcf5ca7)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Martin Hundebøll
3689c735b5 busybox: make busybox.links.{suid, nosuid} reproducible
The busybox.link.* files are generated from autoconf.h and applets.h,
which are both auto-generated by the build system. The contents of the
two files might be in different order, and so the link files are not
reproducble as is.

Fix this by sorting the lists using `sort`.

(From OE-Core rev: e2450857d898238b0b719a5400e2340c65c80ada)

Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Yeoh Ee Peng
f3b1155f2b oeqa/runtime: Add tests for gstreamer CLI
We should not be finding GStreamer issues right around
release time but that's what we seem to do.

Port gstreamer tests from Intel Ref Kit.
https://github.com/intel/intel-iot-refkit/blob/master/meta-iotqa/
lib/oeqa/runtime/multimedia/gstreamer/gstreamer_cli.py

Add tests for gstreamer commandline tools (gst-inspect-1.0
& gst-launch-1.0).

[YOCTO #11418]

(From OE-Core rev: 3e77f845b517e3f4b3e7d09d088a9a80bf171653)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Michael Halstead
36249d8a1c scripts/autobuilder-worker-prereq-tests: Shore up qemu testing
Check that yocto-autobuilder-helper has been cloned to the correct location.
Check that vnc is running using the same script the autobuilder does.
Set the DISPLAY enviroment variable to :1 the same way we do when building
normally.
Make the VM's serial console available so we can log in and power off allowing
the tests to continue.

(From OE-Core rev: 5fb26ff0b56eebb864fd8f74c015e414476eec43)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Michael Halstead
aba0686c72 scripts/runqemu: Replace subprocess.run() for compatibilty
subprocess.run() was introduced in Python 3.5. We currently support down to
Python 3.4 so I've replaced it with subprocess.check_call() which is available
in that version.

(From OE-Core rev: 3a09cee5994ce65079dab1042e47e5eed4540bb9)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Richard Purdie
e69ac0cab6 scripts/runqemu: Add serialstdio mode
Its currently not possible to have a console available whilst using qemu in graphics
mode. This is causing some issues for testing autobuilder bringup so all a "serialstdio"
mode to runqemu to accomodate this.

The existing serialstdio internal variable is renamed to allow the new user visible option.

(From OE-Core rev: 101b70d3c6a0a5a022d96dfdd21500b757c8fada)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Jens Rehsack
3f959b5dbd sqlite3_3: Update to 3.25.2
Update SQLite3 from 3.23.1 to 3.25.2 for UPSERT, window
functions and improved ALTER TABLE support.

For a detailed list of changes since 3.23.1, see
* https://www.sqlite.org/releaselog/3_25_2.html
* https://www.sqlite.org/releaselog/3_24_0.html

(From OE-Core rev: eea7b16e762ab971d2ccea728e0019304325aed7)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Brad Bishop
17726d0834 systemd-systemctl-native: handle Install wildcards
Handle the %i wildcard appearing in a dependency in the Install section
of a template unit, e.g.

  $ cat foo@.service

  [Install]
  WantedBy=bar@%i.target

Using the real systemctl something like:

  $ systemctl enable foo@baz.service

will create a symlink in /etc/systemd/system/bar@baz.target.wants.
Detect wildcards in templates and make the appropriate substitution.

(From OE-Core rev: 22ed19292d160461042d4a2294fe2ec0b953873e)

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Ross Burton
e39fec613d pseudo: fix link with new sqlite3
If sqlite3 is built with FTS5 it uses log() from libm, but that linkage is lost
if we manually statically link so explicitly link to libm.

(From OE-Core rev: b24a67217d82f225e76fbc2dfb70dd8e1a6ea215)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Kai Kang
254c577fae glide: disable ptest on mips
It fails to run task compile_ptest_base of glide on mips:

| vet config not found

The root cause is that go lang lacks '-buildmode=pie' support for mips.
So disable glide ptest on mips for now.

(From OE-Core rev: b8a1a5a5d8fe376e9015b0406881bcee0658f1a0)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Andrej Valek
1a2ae051ae rootfs: ensure that packages in IMAGE_INSTALL_DEBUGFS are existing
Ensure that additional packages in IMAGE_INSTALL_DEBUGFS are available
before installation.

(From OE-Core rev: 06a1bbea67a7233deff80ebe3681b4e0cca6817a)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Richard Purdie
f702509017 metadata_scm: Drop orphaned monotone functions
Its been 'a while' since we used monotone, drop these revision
function remnants.

(From OE-Core rev: f1c77ab87b3c16d14deff801f48292ed348da637)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Robert Yang
a0618f5726 metadata_scm.bbclass: simplify base_detect_revision()
The previous code looks strange because of historical reason, simply return
base_get_metadata_git_revision/branch() is enough, the later functions has
handled everything like '<unknown>' and strip().

(From OE-Core rev: 8a6e70960e021e10a1d02e20e0519fdbdeac8616)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Martin Hundebøll
68dfc310f5 shadow: improve reproducibility by hard-coding shell path
The shadow configure script tries really hard to detect the running
shell to make sure it doesn't do unsupported calls.

On my system the shell is detected as /bin/sh, while a build in an
ubuntu docker it resolves to /bin/bash. And since the shell path is
baked into the target binaries through config.h, the build becomes
inreproducible.

Fix reproducibility by hard-coding the shell to be /bin/sh

(From OE-Core rev: 5e3e30446b6abd98d1d3e9bee818203a6a206634)

Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Hongxu Jia
88ac8e5334 go 1.9/1.11: fix textrel qa warning for non mips arch
While building go itself, the go build system does not support
to set `-buildmode=pie' from environment.

Add GOBUILDMODE to support it which make PIE executables the default
build mode, as PIE executables are required as of Yocto

But mips doesn't support -buildmode=pie, so skip the QA checking for
mips and its variants

(From OE-Core rev: d11cb2ea0abfca4a5958ff4647f22a5b203113e5)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Joshua Watt
07999325f9 pkgconfig: export variables
Export the PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR variables in case the
parent shell hasn't done so.

(From OE-Core rev: 42f33bb5a480324b81c875fbb28872c734860253)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Chunrong Guo
2bef0ae54a ppce500v2: remove spe
*The PowerPC SPE support is split off to a separate powerpcspe port

(From OE-Core rev: c67bc9bdcbcf46ed54dfbafd1bb6e405ed77f86a)

Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Mauno Niko
f616a6031d strace: Bump to version 4.25
V4L2_CID_USER_IMX_BASE value differs in v4.14 and v4.19 LTS kernels
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/uapi/linux/v4l2-controls.h?h=v4.14.79#n191
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/uapi/linux/v4l2-controls.h?h=v4.19.1#n191

Building strace v4.24 against 4.19 kernel headers results in following
build failure

  | arm-vaisala-linux-gnueabi-ranlib libstrace.a
  | In file included from ../strace-4.24/static_assert.h:31,
  |                  from ../strace-4.24/xlat/v4l2_pix_fmts.h:4,
  |                  from ../strace-4.24/v4l2.c:78:
  | ../strace-4.24/xlat/v4l2_control_id_bases.h:36:1: error: static assertion failed: "V4L2_CID_USER_IMX_BASE != (V4L2_CID_BASE + 0x1090)"

This Linux kernel ABI breakage that occurred wrt V4L2_CID_USER_IMX_BASE
has been observed and addressed in strace upstream commit
b89a69dec2

Bump strace to version 4.25 which also addresses ABI breakage so that
strace once again builds against both v4.14 and v4.19 LTS kernel headers

(From OE-Core rev: facb6e2fd887d526e031b6c16b4bb8d385db952a)

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Hongxu Jia
f885c4cd7f gpgme: 1.11.1 -> 1.12.0
Rebase 0007-qt-python-Add-variables-to-tests.patch

Rework 0007-qt-python-Add-variables-to-tests.patch -> 0007-python-Add-variables-to-tests.patch

Drop newly added option --disable-lang-qt-test which is merged to --disable-gpg-test by
upstream commit [26820ba qt: Respect --disable-gpg-test for tests]

(From OE-Core rev: 9457163b2c4982a64814c6b38c292d7bc61ff643)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Hongxu Jia
13646cc96b man-db: 2.8.3 -> 2.8.4
(From OE-Core rev: b630168f54e8414faad12710bc10133cff9e5857)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Hongxu Jia
05af551a39 ncurses: upgrade 6.1 -> 6.1+20180714
(From OE-Core rev: c1d824c3bd3ff8651df0083a47e4cedbaa180831)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Hongxu Jia
ec206ffe9e gnupg: upgrade 2.2.9 -> 2.2.10
(From OE-Core rev: 5efe9eb79ac325f55fc52f67b522afaf7ebb847a)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Hongxu Jia
14898aa475 apr: upgrade 1.6.3 -> 1.6.5
(From OE-Core rev: a9c90d3d97c928dad4bd9137bff957877bb57a3c)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Anuj Mittal
621e043b8d xf86-video-intel: update to latest
For changes, please see:

https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/log/?qt=range&q=e4fe79cf0d9a05ee3f3a027148ef0aeb2b1b34e1...0932a6b37ba6d5c9e916a1cb6ab89c3205b81a0c

Enable sna by default and remove upstreamed patches.

Also include a patch from fedora to fix compile issues when using
qemux86 which doesn't enable sse2 leading to gcc refusing to
inline vertex_emit_2s in emit_vertex because they are defined as:

  static __attribute__((always_inline)) void
  vertex_emit_2s(struct sna *sna, int16_t x, int16_t y)

  __attribute__((target("sse2,fpmath=sse"))) __attribute__((always_inline))
  static void emit_vertex(/* omitted */)

leading to errors like:

| In file included from ../../../git/src/sna/gen4_vertex.c:34:
| ../../../git/src/sna/gen4_vertex.c: In function 'emit_vertex':
| ../../../git/src/sna/sna_render_inline.h:40:26: error: inlining failed in call to always_inline 'vertex_emit_2s': target specific option mismatch
|  static force_inline void vertex_emit_2s(struct sna *sna, int16_t x, int16_t y)
|                           ^~~~~~~~~~~~~~
| ../../../git/src/sna/gen4_vertex.c:308:25: note: called from here
|  #define OUT_VERTEX(x,y) vertex_emit_2s(sna, x,y) /* XXX assert(!too_large(x, y)); */
|                          ^~~~~~~~~~~~~~~~~~~~~~~~
| ../../../git/src/sna/gen4_vertex.c:360:2: note: in expansion of macro 'OUT_VERTEX'
|   OUT_VERTEX(dstX, dstY);
|   ^~~~~~~~~~

(From OE-Core rev: a181b36bf2357c5f7d5835df2f828ff1e0007dc6)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Olekandr Kravchuk
dc804276ef connman: update to 1.36
- updated connman to v1.36
- removed mainstreamed patches
- includes.patch has been rabased and transformed into git format

(From OE-Core rev: 85b76e52d2060e197435606eb6316c8833b46361)

Signed-off-by: Oleksandr Kravchuk <dev@sashko.rv.ua>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Armin Kuster
0cbda4a42e xserver-xorg: update to 1.20.3
1.20.3 fixes arm booting in testimage

(From OE-Core rev: 7d96e1659b1616f287805abb42f512fa17c0c493)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Bruce Ashfield
d2aaa2614a kernel: use olddefconfig as the primary target for KERNEL_CONFIG_COMMAND
As was warned by commit 312ee68752fa [kconfig: announce removal of
oldnoconfig if used], oldnoconfig has been removed from the 4.20 kernel.

So we switch our default mode to olddefconfig.

commit fb16d8912 [kconfig: replace 'oldnoconfig' with 'olddefconfig',
and keep the old name as an alias] introduced olddefconfig in the 3.10
kernel, we shuffle oldnoconfig to the fallback target.

The fallback mode allows kernels between 3.10 and the currently listed
oldest kernel of 3.2 to continue to configure.

(From OE-Core rev: 8593dcb7e8c938530ff00ffedf7f3d02d26c3bad)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Armin Kuster
e8a26b48de bind: update to latest LTS 9.11.5
includes:
CVE-2018-5738

drop patch for CVE-2018-5740 now included in update

see: https://ftp.isc.org/isc/bind9/9.11.5/RELEASE-NOTES-bind-9.11.5.html

Add RECIPE_NO_UPDATE_REASON for lts

(From OE-Core rev: bf1be2e0b1484ca8a91eabbd8b89663eacccf4a9)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Armin Kuster
0cb5107646 dhcp: fix issue with new bind changes
(From OE-Core rev: 5775e9ef2fce1d0b9860602f1065bb1e09bc1b61)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Armin Kuster
4191d3f3aa xf86-input-libinput: update to 0.28.1
(From OE-Core rev: ec251cdc481d2e088ed817e651bacdf213fb9ded)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Armin Kuster
1d3c498502 xkeyboard-config: update to 2.25
(From OE-Core rev: ff129d24dbd83768c221aa522bd32031fdbc2071)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Armin Kuster
1fe0a449af libxcb: update to 1.13.1
(From OE-Core rev: c3ecf470b0f4d681dd11c366e3fa903c6e13717e)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Armin Kuster
60dcdbf6bf libx11: update to 1.6.7 and sytle cleanup
refresh Fix-hanging-issue-in-_XReply.patch

(From OE-Core rev: 7edcf4f5b54ae713ede600f6c43ae955320efe69)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Armin Kuster
e1e2581ba0 libsm: update to 1.2.3
reoder things per style

(From OE-Core rev: 4e22f40647014dbd9eb05f0a9becd90fd903e7b1)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Armin Kuster
f4ad391a02 openssh: Update to 7.9 primarily bug fixes
see: https://lwn.net/Articles/768991/

(From OE-Core rev: d9b69aa41bc0b768698b132b9805a8abf0fac40d)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Armin Kuster
43bddc6aab libpcre2: update to 10.32
LIC_FILES_CHKSUM changed do to typo fixes and tidies for 10.32

see: https://www.pcre.org/changelog.txt

(From OE-Core rev: e619b06dd8b66b802dd87174cfa57bd6a4a47e93)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Armin Kuster
7c1e1f3e15 gnutls: update to 3.6.4
Notable change:

libgnutls: Added the final (RFC8446) version numbering of the TLS1.3 protocol.
see: https://lists.gnupg.org/pipermail/gnutls-help/2018-September/004457.html

(From OE-Core rev: 0697141e7be0b755db600aa0d5a975eac62cc7b8)

Signed-off-by: Armin Kuster <akuster808@gmail.com>

--
[v2]
Fix typo in version in subject

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Armin Kuster
050d0d8297 nspr: Update to 4.20
RISC-v support now included in this release so drop patch.
and refresh patches

(From OE-Core rev: 800f4bd6f9fa18ed68f14f5e6e12be3499fb8038)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:38 +00:00
Ross Burton
eddff2b361 curl: actually apply latest CVE patches
(From OE-Core rev: f0394e80a37f1da47042a1aa0487594f390603f9)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-09 17:46:18 +00:00
Ross Burton
e2da957ca4 unzip: actually apply CVE-2018-18384
(From OE-Core rev: d8e1b7afc536f989e7e6efdab0998d54f26ad1f6)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-09 17:46:18 +00:00
Mohamad Noor Alim Hussin
4f59608a32 oeqa/selftest/recipetool: Fix problems from changing upstream source
The upstream source tarball checksums changed. Use the copy from our source
mirror to avoid failures.

[YOCTO #12979]

(From OE-Core rev: e97a31e6bbaec5cb56d4750bf5171dbba510ee33)

Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-09 15:27:34 +00:00
Richard Purdie
d3b55a3f67 image-buildinfo,oeqa/selftest/containerimage: Ensure image-buildinfo doesn't break tests
Having image-buildinfo enabled causes containerimage.ContainerImageTests.test_expected_files
to fail due to the presence of an unexpected file:
  ['./',
   './etc/',
-  './etc/build',
   './etc/default/',
   './etc/default/postinst',

Tweak the class to allow it to be disabled and disable it from the test just in
case it was enabled.

(From OE-Core rev: af67bf422a4df5b7e07894512ff73a5f493682ab)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-09 15:27:34 +00:00
Randy MacLeod
73f8baa8d8 valgrind: drop mips n32 support
valgrind for qemumips64 multilib builds fails to configure
for libn32 with the error:
   configure:6190: checking for 32 bit build support
   ...
   fatal error: bits/long-double-32.h: No such file or directory
It seems that the toolchain is producing:
   tmp-glibc/sysroots-components/mips64-n32/libn32-glibc/usr/include/bits/long-double-n32.h

Until the toolchain problem is resolved, skip valgrind for libn32.

(From OE-Core rev: 17d5574f05384edeb5c80ada2724fff4a1c3c94b)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-09 15:27:34 +00:00
Yeoh Ee Peng
b1c3b40146 oeqa/selftest: Standardize json logging output directory
Currently sdk & sdkext will output json file to LOG_DIR, while
selftest will output json file to TOPDIR/log.

Standardize selftest json output file to LOG_DIR.

(From OE-Core rev: 2012d6b076fc833864a0254d56d78536314a6799)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-09 15:27:34 +00:00
Martin Hundebøll
7373dc71b6 glibc: make ld-2.28.so reproducible on arm
Play the whack-a-mole game and add the .file directive to another
assembly file that otherwise shows itself in ld-2.28.so debug file,
which in turns alters the build-id of ld-2.28.so on target.

(From OE-Core rev: 4cbf901b3a127ed039371e614946002d26d56997)

Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-09 15:27:34 +00:00
Matthias Schiffer
f4de5d85b8 base.bbclass: avoid 'find -ignore_readdir_race -delete'
Due to a bug in find [1], -ignore_readdir_race does not work correctly with
-delete. This can lead to spurious build failures when files disappear
while such a command is running; specifically this was seen in the case of
do_configure and do_populate_lic running concurrently for packages
with ${B} == ${WORKDIR}:

   find: '.../sstate-build-populate_lic': No such file or directory

While the issue is fixed in the findutils git master, the find command of
the host system is called here, so we can't ensure that the used version
contains the fix. Many common distros have not updated to a recent enough
findutils version yet (Ubuntu 18.10 contains the fix, while 18.04 is still
affected).

Work around the issue by passing the output of find to 'rm -f' instead of
using -delete.

[1] https://savannah.gnu.org/bugs/?52981

(From OE-Core rev: 8079e2d62e23f7c274f46185e6dad64fa95394c1)

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-09 15:27:34 +00:00
Zhixiong Chi
b9feb4e46b binutils: fix four CVE issues
Backport the CVE patches from the binutils upstream.

(From OE-Core rev: 84bb9c0514ecbd7c31935c22062b18b4aaefbef1)

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-09 15:27:34 +00:00
Richard Purdie
0814e48a08 bitbake: server/process: Fix unclosed socket warnings upon server connection refused
Extend the server error handling to avoid:

Reconnecting to bitbake server...
NOTE: Retrying server connection... (Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/main.py", line 464, in setup_bitbake
    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
  File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/server/process.py", line 457, in connectProcessServer
    sock.connect(os.path.basename(sockname))
ConnectionRefusedError: [Errno 111] Connection refused
)
WARNING: /home/pokybuild/yocto-worker/nightly-oe-selftest/build/bitbake/lib/bb/main.py:481: ResourceWarning: unclosed <socket.socket fd=20, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
  logger.info("Retrying server connection... (%s)" % traceback.format_exc())

NOTE: Starting bitbake server...

(Bitbake rev: afee3f594e1510051a0b18e430e92549caf72fa2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Mike Crowe
b8e08c6519 bitbake: siggen: Correct format argument substitution
Use % operator to ensure that the dependency is substituted into the error
message correctly.

(Bitbake rev: 8e587386b0b3a0ed11edf71dfbe9fb508f60d0b3)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Mike Crowe
b322b69a97 bitbake: fetch: Also export GIT_SSH environment variable
Support users who want to specify a custom ssh to Git using an environment
variable. (This lets build systems work without requiring users to
configure Git explicitly.)

(Bitbake rev: db46fb2755a4b1033ab60051ce511cc9dd7e34fb)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Awais Belal
1bdd416102 bitbake: bitbake: toaster: allow OE_ROOT to be provided through environment
Updates for YOCTO #12891 allowed a user to have a directory
structure different to that of yocto (bitbake isn't inside
oe-core) whereas the definition of OE_ROOT in the main toaster
binary still assumes the same while checking for .templateconf
and hence we see an error on the cmdline in such cases:
bash: <repo-path>/bitbake/bin/../../.templateconf: No such file or directory
The change here now allows the user to provide OE_ROOT through
the environment in such cases and otherwise defaults to the older
mechanism to fix this issue.

(Bitbake rev: 9cc6fe4be797e106899d2448797a4b3af8eace4e)

Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Mark Hatle
a042179a78 bitbake: fetch2/gitsm.py: Fix the references when the module and path are different
Git does not require the module and target path to be the same in the
.gitmodules file.  This incorrect assumption was being made previously
causing various unpack failures.

An example .gitmodule showing this issue:

   [submodule "plugins/WaveShaper/Libs/inih"]
        path = plugins/wolf-shaper/Libs/inih
        url = https://github.com/pdesaulniers/inih.git

The unpack function also needed to work in a loop on the overall
submodules_queue.  Before it could have missed items that were not in the
primary repository.

(Bitbake rev: 5a7009c204f4d2254e3b2d83ad9319ac23f1cf4d)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Mark Hatle
a28637abbc bitbake: fetch2/gitsm.py: Disable branch checking on submodules
Submodules by definition refer to a specific commit, not branch.  If we don't
ignore the branch, then any commits on a submodule on a branch different then
the original module will trigger a failure that the commit is not on the
branch.

(Bitbake rev: fdc1dbf96f153b496de52acd8263366a1ff303ad)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Alexey Brodkin
f059696c60 perf: Disable libunwind for ARC & RISCV64
libunwind is not yet ported for ARC & RISCV64 and on attempt
to build it for those arches we just get an error message.

If we explicitly disable libunwind it is gracefully handled by
perf build system and it just gets configured to not use it
so perf is still usable even on those arches.

(From OE-Core rev: bb06900a1f29fdd4066f6d7e7a961d230c2e9438)

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Changqing Li
a369f55ad3 apt: update SRC_URI
update SRC_URI since previous link is not valid now

(From OE-Core rev: 0b5972c8189dade0e77df175651b8d8707647bb1)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Fabien Lahoudere
82da3463c8 archiver: Drop unwanted directories
In sources directory we can find patches/ and temp/.
The first one is filled with symbolic link unusable on another
machines.
The second contains yocto logs to create this archives and are
typically copied when 'S = "${WORKDIR}"'

(From OE-Core rev: 3904f98851c6a63dd9377e38f1432be6b1c0a94d)

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Michael Halstead
a73ea94113 scripts/autobuilder-worker-prereq-tests: adjust max_user_watches
Temporarily modify path to run as non-privileged user on more distros.
Change the recommended value to match what we use on the autobuilder.

(From OE-Core rev: 2f86c3f1180ba8bf77301a0bc29c3b290bc28d91)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Kosta Zertsekel
92027161b5 meta: Use double colon for chown OWNER:GROUP
Rationale - excerp from `info chown`
====================================

OWNER‘:’GROUP
     If the OWNER is followed by a colon and a GROUP (a group name or
     numeric group ID), with no spaces between them, the group ownership
     of the files is changed as well (to GROUP).

   Some older scripts may still use ‘.’ in place of the ‘:’ separator.
POSIX 1003.1-2001 (*note Standards conformance::) does not require
support for that, but for backward compatibility GNU ‘chown’ supports
‘.’ so long as no ambiguity results.  New scripts should avoid the use
of ‘.’ because it is not portable, and because it has undesirable
results if the entire OWNER‘.’GROUP happens to identify a user whose
name contains ‘.’.

(From OE-Core rev: 185918234a07cb506d7d7464a49ac33972c7d963)

Signed-off-by: Kosta Zertsekel <zertsekel@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Ross Burton
ff842fe777 wic: use explicit errno import
os.errno doesn't work in Python 3.7 and shouldn't have ever worked, so use
import errno explicitly.

(From OE-Core rev: 82f9157e84dcaf0ad4292053b09be68c2290d197)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Richard Purdie
36df73a523 oeqa/selftest: Add test for Yocto source mirror functionality/completeness
We've had a number of occasions where the Yocto Project source mirrors have not
been complete or functioning correctly. This adds a test so that if this happens
we find out out it sooner.

It also only works over http meaning we should be able to test that anyone behind
an http only proxy (no git protocol) also has functional fetches for OE-Core and
layers built by the core of the project.

(From OE-Core rev: 9a25b2eb9cc13dd77a774dad83067ea5f9bf9716)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Serhey Popovych
e1f8c4dac8 libgpg-error: Support build for native on ppc64/ppc64le hosts
Both RHEL and SLES uses ppc64/ppc64le for powerpc 64 bit big/little
endian targets instead of powerpc64/powerpc64le in libgpg-error.

Also libgpg-error provides common target system names in form like
<arch>-unknown-linux-gnu.

Add mapping for ppc64/ppc64le targets to their libgpg-error equivalents
to fix native builds.

Cross build for arm64 tested on IBM Power 8 machine with RHEL7 for
ppc64le variant only, but should work for ppc64 as well.

(From OE-Core rev: f1af780769477f06eb925fd87c844baba04ada2d)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Serhey Popovych
a7bf511703 v86d: Make cross compilation working on more architectures
Since commit 709c603dec19 ("v86d: Accept aarch64 as build host") we
support cross compilation on aarch64 host in addition to x86 host.
However building on hosts different than two above will fail.

Make cross compilation support more generic by checking for TARGET_ARCH
in v86d configure script with fallback to `uname -m` when not present in
environment and pass TARGET_ARCH explicitly in do_configure().

Cross build for x86 tested on IBM Power 8 machine with RHEL7. Should
work on aarch64 and rest too.

(From OE-Core rev: 69f7579eb36c00b557225377e1a3cc61b103be23)

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Richard Purdie
8929ffd67c oe-init-buildenv/base: Relax python version checks in favour of HOSTTOOLS manipulation
Several distros are now shipping "python" as python v3 contra to the original
python guidelines. This causes users confusion/pain in trying to use our tools.

We can just force "python" to "python2" within HOSTTOOLS to avoid this issue
and hide the complexity from the user.

(From OE-Core rev: b06a6cde5c5503f456f260c773cf126085e18c8d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Richard Purdie
fcf55f58ae oeqa/runtime/ptest: Inject results+logs into stored json results file
This allows the ptest results from ptest-runner, run in an image to be
transferred over to the resulting json results output.

Each test is given a pass/skip/fail so individual results can be monitored
and the raw log output from the ptest-runner is also dumped into the
results json file as this means after the fact debugging becomes much easier.

Currently the log output is not split up per test but that would make a good
future enhancement.

I attempted to implement this as python subTests however it failed as the
output was too confusing, subTests don't support any kind of log
output handling, subTest successes aren't logged and it was making things
far more complex than they needed to be.

We mark ptest-runner as "EXPECTEDFAILURE" since its unlikely every ptest
will pass currently and we don't want that to fail the whole image test run.
Its assumed there would be later analysis of the json output to determine
regressions. We do have to change the test runner code so that
'unexpectedsuccess' is not a failure.

Also, the test names are manipuated to remove spaces and brackets with
"_" used as a replacement and any duplicate occurrences truncated.

(From OE-Core rev: a13e088942e2a3c3521e98954a394e61a15234e8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Richard Purdie
d21cf7ca12 crosssdk: Remove usage of host flags for cross-compilation
Similarlly to OE-Core rev 4b936cde58ca0a6f34092ce82640a02859110411 for
cross.sdk, BUILD_* flags can't be used as TARGET_* flags

gcc-crosssdk buils leaks config.log's through "gcc-stashed-builddir" and
TARGET_* flags to libgcc cross-build through "gcc/libgcc.mvars" file
on "gcc-stashed-builddir". This means that if BUILD_CFLAGS contains
host-specific flags like "-isystem/usr/include" libgcc build will
fail "do_qa_configure" and "do_package_qa" checks.

Remove host-related flags from TARGET_* flags for gcc-crosssdk builds.

[YOCTO #11874]

(From OE-Core rev: 6e162e619b6f5173c073cd9bedbcadf205017e30)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Richard Purdie
e06de80a61 go: Change from TARGET_ARCH to TUNE_PKGARCH
Right now go-cross is changing signatures when you change TUNE for a given
architecture. In particular this breaks layer tests like:

yocto-check-layer ../meta-yocto-bsp/ --machines qemuarm beaglebone-yocto

This changes the PN addtion to something containing the tune rather than
the arch which avoids these kinds of errors. If go-cross can be tune
independent that would be nice but currently that isn't the case.

[YOCTO #12586]

(From OE-Core rev: e3c7e1703499e6a5332d9ab8a941671ec8235c4f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Chen Qi
09e1916ef6 go-dep: disable PTEST_ENABLED for mips and mips64
The current go-dep does not compile ptest successfully on mips
and mips64. So as a workaround, disable PTEST_ENABLED explicitly
to avoid error like below.

  | vet config not found

(From OE-Core rev: 786322ec408e2ef5cd6fb809456e0453e5f5e162)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Ross Burton
fc3af664f3 python3: add python3-venv to the python3-modules RDEPENDS
(From OE-Core rev: ed5e7541677f6a046f85389cd0c879be3db422cd)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Hugues Kamba
0140a1c2f7 python3: Fix python3-pyvenv run-time dependency
Pyvenv is just a small script that uses venv to create virtual
environments.
https://www.python.org/dev/peps/pep-0405/#creating-virtual-environments

This patch adds the python3-venv module as a self-contained package which
python3-pyvenv must depend on at run-time.

The patch also provides the package python3-pyvenv from the pyhton3-venv
package.This is good for future-proofing since python3-pyvenv has been
deprecated and only python3-venv is now available in Python 3.6.
https://docs.python.org/3/library/venv.html.

Without this patch python3-pyvenv is broken because it is missing the
venv module at run-time. This patch specifies the newly created
python3-venv as a run-time dependency of python3-pyvenv.

(From OE-Core rev: effa141bfce55aab25142ee578c95383c755ad73)

Signed-off-by: Hugues Kamba <hugues.kamba@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Chen Qi
ade79d7799 gdbm: fix ptest failure
Some of gdbm's ptest cases require gdbmtool, which is packaged into
${PN}-bin. So extend the RDEPENDS_${PN}-ptest to include the package.

(From OE-Core rev: e188a75aa882efc98b8390f43f18279c3707314a)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Peter Kjellerstedt
f6914eda1c pixman: Trim license info extracted from pixman-matrix.c
Four unrelated lines were extracted from pixman-matrix.c for the
license information.

License-Update: Only extract the relevant part from pixman-matrix.c
(From OE-Core rev: d0a209e8cf29d982567e3978e1dcbb3871505a39)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Peter Kjellerstedt
6b15bfed10 libgpg-error: Trim license info extracted from init.c & gpg-error.h.in
License-Update: Only extract relevant parts from init.c & gpg-error.h.in
(From OE-Core rev: a5c1ff6deb6393666745889eee8297112848ba28)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Peter Kjellerstedt
73868d36be apr-util: Trim license info extracted from apu_version.h
Two unrelated lines were extracted from apu_version.h for the license
information.

License-Update: Only extract the relevant part from apu_version.h
(From OE-Core rev: 2edb0f24a13f27b2fae94fb447221ad2ddb924a0)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Peter Kjellerstedt
90b25e48d1 apr: Trim license info extracted from apr_lib.h
Two unrelated lines were extracted from apr_lib.h for the license
information.

License-Update: Only extract the relevant part from apr_lib.h
(From OE-Core rev: 90ab83ecc509c2fdc1f6083d771031decdcaad63)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Peter Kjellerstedt
a8c192ff84 common-licenses: Correct the FreeType license text
It now matches:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT

(From OE-Core rev: 9dcb393551b65c8b674f625e90171b512f5e5a60)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Douglas Royds
87b140abdb reproducible_build: update do_deploy_source_date_epoch commment
Once the value of SOURCE_DATE_EPOCH is determined, it is stored in the recipe's SDE_FILE.
If none of the existing mechanisms are suitable, replace the do_deploy_source_date_epoch task
with recipe-specific functionality to write the appropriate SOURCE_DATE_EPOCH into the SDE_FILE.

(From OE-Core rev: e7b891b76954c784f5a93bd0a1c91315673ce40d)

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Changqing Li
c67e7d1eb3 curl: fix for CVE-2018-16839/CVE-2018-16840/CVE-2018-16842
(From OE-Core rev: 0f0db9fc8512a0ecd0cdba3304a195cd925a5029)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Kai Kang
faacc50487 openssl: fix CVE-2018-0735 for 1.1.1
Backport patch to fix CVE-2018-0735 for openssl 1.1.1.

(From OE-Core rev: 78e751e33d3ec4394d96391e737cc39cad960ebe)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Kai Kang
d5fe5c654b openssl: fix CVE-2018-0734 for both 1.0.2p and 1.1.1
Backport patches to fix CVE-2018-0734 for both openssl 1.0.2p and 1.1.1
versions.

(From OE-Core rev: 9d5c6a87eb72a8b8b8d417126a831565982ca9a6)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Hongxu Jia
05c548c5f4 ghostscript: fix CVE-2018-18284
Artifex Ghostscript 9.25 and earlier allows attackers to bypass a
sandbox protection mechanism via vectors involving the 1Policy
operator.

(From OE-Core rev: 98ab5c5770d20b39bf3c58083f31f31838f2e940)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Hongxu Jia
9e2e38d349 ghostscript: fix CVE-2018-18073
Artifex Ghostscript allows attackers to bypass a sandbox protection
mechanism by leveraging exposure of system operators in the saved
execution stack in an error object.

(From OE-Core rev: 6098c19e1f179896af7013c4b5db3081549c97bc)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Hongxu Jia
e84345d6e6 ghostscript: fix CVE-2018-17961
Artifex Ghostscript 9.25 and earlier allows attackers to bypass a
sandbox protection mechanism via vectors involving errorhandler
setup. NOTE: this issue exists because of an incomplete fix for
CVE-2018-17183.

(From OE-Core rev: 6c32ea184941d292cd8f0eb898e6cc90120ada40)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Hongxu Jia
918c8a13b6 elfutils: fix CVE-2018-18520 & CVE-2018-18521 & CVE-2018-18310
These CVE fixes come from upstream master branch and no
new version released, so backport rather than upgrade.

(From OE-Core rev: bd8d2c25f595e30a3fdcad8a2409913bb8af7c5c)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Hongxu Jia
4f6bb406d0 elfutils: 0.173 -> 0.174
- Drop backport fixes
  CVE-2018-16062.patch
  0001-libdw-Check-end-of-attributes-list-consistently.patch
  0002-libelf-Return-error-if-elf_compress_gnu-is-used-on-S.patch

- Rebase 0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch

(From OE-Core rev: 777c1f8b6e20643964c304400e2d746dc2926524)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Hongxu Jia
68b68dc28a nasm: fix CVE-2018-1000667
Since the latest nasm is  2.14rc16 (not formal release),
so backport a patch to 2.13 to fix CVE-2018-1000667.

(From OE-Core rev: 024b395425c95a08c881d922c310be78ffad483a)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Changqing Li
886922a0b3 unzip: fix for CVE-2018-18384
(From OE-Core rev: 2ddb3b25ed063b47d3fe2b3e9e17b7f9d0e2a7e5)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Changqing Li
cae6e5dc83 qemu: fix for CVE-2018-10839
(From OE-Core rev: 5c2b164e1022c46f6bf541894429773c3dde7af2)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Chen Qi
d6d723665d systemd: fix CVE-2018-15688
Backport patch to fix the following CVE.

CVE: CVE-2018-15688

(From OE-Core rev: 13591d7224393dc0ae529a03cdf74aceb3540ce9)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Chen Qi
3eab300ce3 systemd: fix CVE-2018-15687
Backport patch to fix the following CVE.

CVE: CVE-2018-15687

(From OE-Core rev: eeb621aa19f690971caf862290a172a115578ba1)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Chen Qi
89b142f7da systemd: fix CVE-2018-15686
Backport patch to fix the following CVE.

CVE: CVE-2018-15686

(From OE-Core rev: 0ef70603bc983315eb0e8a97958d995a31198c35)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Armin Kuster
586751f7bf tzdata: update to 2018g
Changes to code

    When generating TZif files with leap seconds, zic no longer uses a
    format that trips up older 32-bit clients, fixing a bug introduced
    in 2018f.  (Reported by Daniel Fischer.)  Also, the zic workaround
    for QTBUG-53071 now also works for TZif files with leap seconds.

    The translator to rearguard format now rewrites the line
    "Rule Japan 1948 1951 - Sep Sat>=8 25:00 0 S" to
    "Rule Japan 1948 1951 - Sep Sun>=9  1:00 0 S".
    This caters to zic before 2007 and to Oracle TZUpdater 2.2.0
    and earlier.  (Reported by Christos Zoulas.)

  Changes to past time zone abbreviations

    Change HDT to HWT/HPT for WWII-era abbreviations in Hawaii.
    This reverts to 2011h, as the abbreviation change in 2011i was
    likely inadvertent.

  Changes to documentation

    tzfile.5 has new sections on interoperability issues.

(From OE-Core rev: 32e5dd919a61b1c245fb6a867d0ea4a71d394aca)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Armin Kuster
628088dc7e tzcode-native: update to 2018g
Changes to code

    When generating TZif files with leap seconds, zic no longer uses a
    format that trips up older 32-bit clients, fixing a bug introduced
    in 2018f.  (Reported by Daniel Fischer.)  Also, the zic workaround
    for QTBUG-53071 now also works for TZif files with leap seconds.

    The translator to rearguard format now rewrites the line
    "Rule Japan 1948 1951 - Sep Sat>=8 25:00 0 S" to
    "Rule Japan 1948 1951 - Sep Sun>=9  1:00 0 S".
    This caters to zic before 2007 and to Oracle TZUpdater 2.2.0
    and earlier.  (Reported by Christos Zoulas.)

  Changes to past time zone abbreviations

    Change HDT to HWT/HPT for WWII-era abbreviations in Hawaii.
    This reverts to 2011h, as the abbreviation change in 2011i was
    likely inadvertent.

  Changes to documentation

    tzfile.5 has new sections on interoperability issues.

(From OE-Core rev: a24d0c174411a32a2793c89980ca87c4f9d98bc4)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Armin Kuster
7e3e19064d nss: update to 3.39 includes CVE-2018-12384
see: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.39_release_notes

(From OE-Core rev: 9d5d19cee30ac73b9fbf75308e5729857384983e)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:54 +00:00
Ross Burton
411184bfaa xserver-xorg: fix CVE-2018-14665
Incorrect command-line parameter validation in the Xorg X server can lead to
privilege elevation and/or arbitrary files overwrite, when the X server is
running with elevated privileges (ie when Xorg is installed with the setuid bit
set and started by a non-root user). The -modulepath argument can be used to
specify an insecure path to modules that are going to be loaded in the X server,
allowing to execute unprivileged code in the privileged process. The -logfile
argument can be used to overwrite arbitrary files in the file system, due to
incorrect checks in the parsing of the option.

(From OE-Core rev: 14b5854d50c38e94fc0d1ce6af36698fc69f52b4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-01 13:27:26 +00:00
Scott Rifenbark
5061421409 bitbake: bitbake-user-manual: Added hard-spacing to "_remove" example.
Rendering the manual to its HTML form was collapsing the two
leading and four trailing whitespace characters into single
whitespace characters.  I inserted multiple "&nbsp;" strings
to force the spacing to come through.

(Bitbake rev: 701f76f773a6e77258f307a4f8e2ec1a8552f6f3)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-31 21:40:36 +00:00
Richard Purdie
84eecb017e build-appliance-image: Update to master head revision
(From OE-Core rev: 1fd7d0f2fbf7e200844c675ddb77513a8d5d7327)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:38:16 +00:00
Armin Kuster
53332c9f1b tzdata: update to 2018f
Briefly:
  Volgograd moves from +03 to +04 on 2018-10-28.
  Fiji ends DST 2019-01-13, not 2019-01-20.
  Most of Chile changes DST dates, effective 2019-04-06.

  Changes to future timestamps

    Volgograd moves from +03 to +04 on 2018-10-28 at 02:00.
    (Thanks to Alexander Fetisov and Stepan Golosunov.)

    Fiji ends DST 2019-01-13 instead of the 2019-01-20 previously
    predicted.  (Thanks to Raymond Kumar.)  Adjust future predictions
    accordingly.

    Most of Chile will end DST on the first Saturday in April at 24:00 mainland
    time, and resume DST on the first Saturday in September at 24:00 mainland
    time.  The changes are effective from 2019-04-06, and do not affect the
    Magallanes region modeled by America/Punta_Arenas.  (Thanks to Juan Correa
    and Tim Parenti.)  Adjust future predictions accordingly.

  Changes to past timestamps

    The 2018-05-05 North Korea 30-minute time zone change took place
    at 23:30 the previous day, not at 00:00 that day.

    China's 1988 spring-forward transition was on April 17, not
    April 10.  Its DST transitions in 1986/91 were at 02:00, not 00:00.
    (Thanks to P Chan.)

    Fix several issues for Macau before 1992.  Macau's pre-1904 LMT
    was off by 10 s.  Macau switched to +08 in 1904 not 1912, and
    temporarily switched to +09/+10 during World War II.  Macau
    observed DST in 1942/79, not 1961/80, and there were several
    errors for transition times and dates.  (Thanks to P Chan.)

    The 1948-1951 fallback transitions in Japan were at 25:00 on
    September's second Saturday, not at 24:00.  (Thanks to Phake Nick.)
    zic turns this into 01:00 on the day after September's second
    Saturday, which is the best that POSIX or C platforms can do.

    Incorporate 1940-1949 Asia/Shanghai DST transitions from a 2014
    paper by Li Yu, replacing more-questionable data from Shanks.

  Changes to time zone abbreviations

    Use "PST" and "PDT" for Philippine time.  (Thanks to Paul Goyette.)

 Changes to documentation

    New restrictions: A Rule name must start with a character that
    is neither an ASCII digit nor "-" nor "+", and an unquoted name
    should not use characters in the set "!$%&'()*,/:;<=>?@[\]^`{|}~".
    The latter restriction makes room for future extensions (a
    possibility noted by Tom Lane).

    tzfile.5 now documents what time types apply before the first and
    after the last transition, if any.

    Documentation now uses the spelling "timezone" for a TZ setting
    that determines timestamp history, and "time zone" for a
    geographic region currently sharing the same standard time.

    The name "TZif" is now used for the tz binary data format.

    tz-link.htm now mentions the A0 TimeZone Migration utilities.
    (Thanks to Aldrin Martoq for the link.)

  Changes to build procedure

    New 'make' target 'rearguard_tarballs' to build the rearguard
    tarball only.  This is a convenience on platforms that lack lzip
    if you want to build the rearguard tarball.  (Problem reported by
    Deborah Goldsmith.)

    tzdata.zi is now more stable from release to release.  (Problem
    noted by Tom Lane.)  It is also a bit shorter.

    tzdata.zi now can contain comment lines documenting configuration
    information, such as which data format was selected, which input
    files were used, and how leap seconds are treated.  (Problems
    noted by Lester Caine and Brian Inglis.)  If the Makefile defaults
    are used these comment lines are absent, for backward
    compatibility.  A redistributor intending to alter its copy of the
    files should also append "-LABEL" to the 'version' file's first
    line, where "LABEL" identifies the redistributor's change.
(From OE-Core rev: 9d786808fb9471eff46d95dd354f6254e468aa17)

Signed-off-by: Armin Kuster <akuster808@gmail.com>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:37:26 +00:00
Armin Kuster
9b2bb9783b tzcode: update to 2018f
Changes to code

    zic now always generates TZif files where time type 0 is used for
    timestamps before the first transition.  This simplifies the
    reading of TZif files and should not affect behavior of existing
    TZif readers because the same set of time types is used; only
    their internal indexes may have changed.  This affects only the
    legacy zones EST5EDT, CST6CDT, MST7MDT, PST8PDT, CET, MET, and
    EET, which previously used nonzero types for these timestamps.

    Because of the type 0 change, zic no longer outputs a dummy
    transition at time -2**59 (before the Big Bang), as clients should
    no longer need this to handle historical timestamps correctly.
    This reverts a change introduced in 2013d and shrinks most TZif
    files by a few bytes.

    zic now supports negative time-of-day in Rule and Leap lines, e.g.,
    "Rule X min max - Apr lastSun -6:00 1:00 -" means the transition
    occurs at 18:00 on the Saturday before the last Sunday in April.
    This behavior was documented in 2018a but the code did not
    entirely match the documentation.

    localtime.c no longer requires at least one time type in TZif
    files that lack transitions or have a POSIX-style TZ string.  This
    future-proofs the code against possible future extensions to the
    format that would allow TZif files with POSIX-style TZ strings and
    without transitions or time types.

    A read-access subscript error in localtime.c has been fixed.
    It could occur only in TZif files with timecnt == 0, something that
    does not happen in practice now but could happen in future versions.

    localtime.c no longer ignores TZif POSIX-style TZ strings that
    specify only standard time.  Instead, these TZ strings now
    override the default time type for timestamps after the last
    transition (or for all time stamps if there are no transitions),
    just as DST strings specifying DST have always done.

    leapseconds.awk now outputs "#updated" and "#expires" comments,
    and supports leap seconds at the ends of months other than June
    and December.  (Inspired by suggestions from Chris Woodbury.)
(From OE-Core rev: 4670dcdb6e2504469c30ebed828d4702d8c0003c)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:37:26 +00:00
Richard Purdie
5a0bf2a02a build-appliance-image: Update to thud head revision
(From OE-Core rev: 4a022fddc06587ffd0147c6c3d06ef0d595da112)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:33:53 +00:00
Richard Purdie
4e6ce6231a poky.conf: Bump version for 2.6 thud release
(From meta-yocto rev: b5aa0db24dae27e4e66773767ea72f0e3c7c57de)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:32:20 +00:00
Victor Kamensky
4f7deccda2 meson: map powerpc64 TARGET_ARCH to ppc64 for the cross file
Meson uses 'ppc64' for 64 bit powerpc. Issue came up while
building systemd for MACHINE that uses ppc64e5500 tune.

(From OE-Core rev: eccd5414c37be26df63a90154c1808f6f5618b7d)

Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Hongxu Jia
3c790c9bd1 libxcrypt: tweak branch from master to develop
The master branch does not exist any more, use develop to replace.

(From OE-Core rev: 6db5e994ed9179eb6174ace1fd60c007f11deadd)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Kai Kang
123670227d groff: not search fonts on build host
groff searches fonts on build host which are provided by ghostscript.
The number of font files installed by groff are different according to
whether ghostscript fonts are installed on build host. Fix it by not
search font dirs on the host.

(From OE-Core rev: 01bce5fada48ecc7bd76c3d7fbade3c034518573)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Changqing Li
57fd1c9b66 git: upgrade 2.18.0 -> 2.18.1
Includes a fix for CVE-2018-17456.

(From OE-Core rev: 95a74460f30223e6db9bff068b3ba84c74e1ba63)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Christian Meusel
061dfb7926 gitignore: Ignore repo tool directory
This reduces the noise produced by 'git status' and 'repo status' when
orchestrating the layers with Google's repo tool
(https://gerrit.googlesource.com/git-repo/).

(From OE-Core rev: 0c2c8d9edcba148c5beb22a9fb8ff06e1ada30cd)

Signed-off-by: Christian Meusel <christian.meusel@posteo.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Richard Purdie
44ee41052c oeqa/utils/metadata: Allow to function without the git module
The python git module may or may not be enabled, allow this code to
function without it, falling back to the same method as metadata_scm.bbclass
uses. This will be cleaned up in the next round of feature development.

(From OE-Core rev: 6350586ba9f4a4107a2d457590824cd4d662d5b9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Richard Purdie
4b9ef43274 oeqa/core/runner: Don't add empty log entries
There is no point in adding empty log entries to the json result files, only
add them if there is log data.

(From OE-Core rev: da6aef0b6bd4655805f7f743858d4e04341f75ed)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Richard Purdie
1fd2d4acfc testsdk: Improvements to the json logging
Tweak the preceeding commit to:
* Add STARTTIME to the identifier to make it unique
* Add MACHINE to the identifier
* Use LOG_DIR
* Store the layer config in a more natural json format
* Drop '_' function prefixes

(From OE-Core rev: c272079d662237b1b9f87940c88cbadaeda9a9d1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Yeoh Ee Peng
fc16be1787 testsdk.bbclass: write testresult to json files
As part of the solution to replace Testopia to store testresult,
OEQA sdk and sdkext need to output testresult into json files, where
these json testresult files will be stored into git repository
by the future test-case-management tools.

By default, json testresult file will be written to "oeqa"
directory under the "WORKDIR" directory.

To configure multiple instances of bitbake to write json testresult
to a single testresult file at custom directory, user will define
the variable "OEQA_JSON_RESULT_DIR" with the custom directory for
json testresult.

(From OE-Core rev: cdbedba7da9c3f97a642d79a5e8ec363ba938e35)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Richard Purdie
8daaae4206 testimage: Improvements to the json logging
Tweak the preceeding commit to:

* Add STARTTIME to the identifier to make it unique
* Log DISTRO
* Use LOG_DIR
* Store the layer config in a more natural json format
* Drop '_' function prefixes

(From OE-Core rev: dda94cfa708cf3c6e5408d6dbcece360b4e8cd27)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Yeoh Ee Peng
e73bcdd059 testimage.bbclass: write testresult to json files
As part of the solution to replace Testopia to store testresult,
OEQA testimage need to output testresult into json files, where
these json testresult files will be stored into git repository
by the future test-case-management tools.

By default, json testresult file will be written to "oeqa"
directory under the "WORKDIR" directory.

To configure multiple instances of bitbake to write json testresult
to a single testresult file at custom directory, user will define
the variable "OEQA_JSON_RESULT_DIR" with the custom directory for
json testresult.

(From OE-Core rev: 5d135d4769b6bb60d575eb6ed196367f9e077cc4)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Richard Purdie
1418c0ea24 oeqa/selftest: Improvements to the json logging
Tweak the preceeding commit to:

* Add STARTTIME to the identifier to make it unique
* Use LOG_DIR
* Store the layer config in a more natural json format
* Drop '_' function prefixes

(From OE-Core rev: 173f59acf9722e2ef27fdd49c20f7d3d664917eb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Yeoh Ee Peng
d89e06083e oeqa/selftest/context: write testresult to json files
As part of the solution to replace Testopia to store testresult,
OEQA selftest need to output testresult into json files, where
these json testresult files will be stored into git repository
by the future test-case-management tools.

By default, json testresult file will be written to "oeqa"
directory under the oe-selftest log directory.

To configure multiple instances of bitbake to write json testresult
to a single testresult file at custom directory, user will define
the variable "OEQA_JSON_RESULT_DIR" with the custom directory for
json testresult.

(From OE-Core rev: 10697165c832e3dbb2913b6215164ea75e23ec23)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Yeoh Ee Peng
4ef72d556f oeqa/core/runner: write testresult to json files
As part of the solution to replace Testopia to store testresult,
OEQA need to output testresult into single json file, where json
testresult file will be stored in git repository by the future
test-case-management tools.

The json testresult file will store more than one set of results,
where each set of results was uniquely identified by the result_id.
The result_id would be like "runtime-qemux86-core-image-sato", where
it was a runtime test with target machine equal to qemux86 and running
on core-image-sato image. The json testresult file will only store
the latest test content for a given result_id. The json testresult
file contains the configuration (eg. COMMIT, BRANCH, MACHINE, IMAGE),
result (eg. PASSED, FAILED, ERROR), test log, and result_id.

Based on the destination json testresult file directory provided,
it could have multiple instances of bitbake trying to write json
testresult to a single testresult file, using locking a lockfile
alongside the results file directory to prevent races.

Also the library class inside this patch will be reused by the future
test-case-management tools to write json testresult for manual test
case executed.

(From OE-Core rev: 00e03b5004f1eb6d59295544b3a8620504278f51)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:26:47 +00:00
Grygorii Tertychnyi
3ca7d58e6f curl: extend CVE_PRODUCT
There are both "curl" and "libcurl" CPEs in NVD.
All "curl" CVEs are now missed in the reports.

Hence, switch "CVE_PRODUCT" to a space separated list
of the items.

(From OE-Core rev: 69ff709c2450c42139fd9705e3a74464221ad754)

Signed-off-by: Grygorii Tertychnyi <gtertych@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:01:45 +00:00
Grygorii Tertychnyi
e93457c151 cve-check: Allow multiple entries in CVE_PRODUCT
There are both "curl" and "libcurl" CPEs in NVD.
All "curl" CVEs are currently missing in the reports.

Hence, switch "CVE_PRODUCT" to a space separated list.
It is useful for recipes generating several packages,
that have different product names in NVD.

(From OE-Core rev: 404f75e026393ddc55da87f6f04fb1201cff4e11)

Signed-off-by: Grygorii Tertychnyi <gtertych@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:01:45 +00:00
Ross Burton
bc395e0e87 python: add missing CVE tag to patches
(From OE-Core rev: 67f9e9045ab91a9df15876ad73e44ff98f11bf59)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 17:01:45 +00:00
Scott Rifenbark
21e5d8e2c6 ref-manual: Updates to variable wildcard support
Fixes [YOCTO #12390]

Updated three variables: BB_ALLOWED_NETWORKS, BBMASK, and BBFILES.
Fixed some linking to be sure to use Python3 links instead of
Python 2.  Fixed a note to clarify use of the "*" wildcard
restrictions in the BB_ALLOWED_NETWORKS variable.

(From yocto-docs rev: 6f880d10d0830d80cc2d4d1d5b7ea141dad6d4af)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 16:55:19 +00:00
Scott Rifenbark
bd6d8db54b ref-manual: Updates to the SSTATE_MIRRORS variable.
Accounting for uninative stuff.

(From yocto-docs rev: 5915f1345e3b91ae848cf419560d8fae4e850058)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 16:55:19 +00:00
Scott Rifenbark
21c7646779 ref-manual: Updated SSTATE_MIRRORS variable description
Fixes [YOCTO #11107]

Updated the SSTATE_MIRRORS variable description to include
explanation of how to use regular expressions to map file locations
to server-provided URLs to share sstate information.

(From yocto-docs rev: 1357095864ee919f576de8df36f4e177b24fdd22)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 16:55:19 +00:00
Scott Rifenbark
2520246d67 bitbake: bitbake-user-manual: Updates to variable wildcard support.
Fixes [YOCTO #12390]

Applied some fixes to the variable wildcard support documentation
in the BitBake manual.  Wording changes and changes to make links
referencing Python syntax go to version 3 rather than version 2.

(Bitbake rev: 0cfc71d1a342b82781b0ba547421e41f6340902a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 16:54:48 +00:00
Scott Rifenbark
8c0a94129e bitbake: bitbake-user-manual: Added wildcarding descriptions
Fixes [YOCTO #12390]

Added specific descriptions for how wildcarding works for a variety
of variables and files (e.g. append files).

(Bitbake rev: 0a4377cb1837ede213d9640344f4908de3689d91)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29 16:54:48 +00:00
Victor Kamensky
3e5c6cbf34 systemtap: move systemtap-exporter into separate package
stap-exporter runs a set of systemtap scripts and relays
their procfs outputs to remote HTTP clients on demand.

systemtap-exporter is not supposed to run in untrusted
environment. It starts HTTP server on some port. It does
not look safe enough to be included by default along with
the rest of systemtap.

Move systemtap-exporter, its systemd unit, configuration
files and examples scripts into separate package. So if one
needs it and understand its implication, he/she can include
it explicitely.

(From OE-Core rev: 03e01c26a297642dbe4b0e1c7cf2cbe3c225140e)

Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-28 08:31:57 +00:00
Richard Purdie
e2958cd76d yocto-uninative: Upgrade to verson 2.3 which includes glibc 2.28
This allows us to handle distros which contain glibc 2.28 such as
Ubuntu 18.10.

(From OE-Core rev: 5c7d9abcd611d23d4340f9a0aee2564f72158a0b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-28 08:31:57 +00:00
Mingli Yu
f3e21c3b6e package_manager.py: correct the deploydir when packagefeed-stability inherited
After create_packages_dir added in below commit:
85e72e1 package_manager: Filter to only rpms we depend upon

When add below line into conf/local.conf
INHERIT += "packagefeed-stability"

There comes below error when do_rootfs
Exception: FileExistsError: [Errno 17] File exists: '/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm' -> '/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm'

def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies):
  [snip]
  bb.utils.remove(subrepo_dir, recurse=True)
  [snip]

In create_packages_dir function, there is a logic
as bb.utils.remove(subrepo_dir, recurse=True) to
clean subrepo_dir which is actually as example is
/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm.

But currently when inherit packagefeed-stability class,
the deploydir should be /$Prj/tmp/deploy/rpm-prediff,
not the default /$Prj/tmp/deploy/rpm.

If use /$Prj/tmp/deploy/rpm, then result in the
logic as below:
os.link("/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm", "/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm")

Update to the actual deploydir to guarantee the logic
as below:
os.link("/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm", "/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm/i586/initscripts-1.0-r155.i586.rpm")

(From OE-Core rev: 3b17052611e640fb3db5d03c06ab87185a12be58)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-28 08:31:57 +00:00
Chen Qi
360bba5cc9 systemd: add back alternatives for init utitilies
Add back alternatives for init utilities to avoid regression.

These alternatives were removed when upgradeing systemd to 239.
They were removed out of the logic that init utitilies should be
bound to init manager. However, it turned out that two use cases
were not covered.

1) initramfs using commands like 'reboot' from busybox.
2) Users use customized busybox defconfig which enables init utilities.

The first use case caused a regression bug in yocto.
  https://bugzilla.yoctoproject.org/show_bug.cgi?id=12914
Patches were sent to fix the reboot problem.

But this is not enough. As we may have the second use case. In such
situation, users will find themselves having regression error when
using 'busybox + systemd' (and busybox is installed after systemd,
overriding the systemd symlinks).

So in order to avoid regression, add back these alternatives.

(From OE-Core rev: 43ef422d80e0544232a9361187ac1c608304c969)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-28 08:31:57 +00:00
Mark Hatle
4001e1adb2 weston: Split out machine specific configuration
Weston needs to be configured to load the fbdev driver when run on a QEMU system.
Other MACHINEs may want to also provider their own configuration as well..

Adding a new RRECOMMEND configuration package will allow this, but avoid
installing empty packages/files in the majority case where it is not needed.

Add maintainer entry as well.

(From OE-Core rev: 0f43ea8510ae6148a49eb25accac407b6b301b43)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-28 08:31:57 +00:00
Mark Hatle
4046716c2f systemd-conf: Fix clean support
(From OE-Core rev: ed335e201c878ab4518675f57ce0d12cdc60e02e)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-28 08:31:57 +00:00
Armin Kuster
3be5331986 testimage.bbclass: define ptest suite variable
Ptest has dependencies on other tests so contain them in a
variable. This allows layers to not worry about maintaining the depends
themselves.

(From OE-Core rev: c5c5ad9030ec7ddaa6387e2ba52e9e37b9ea76a2)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
Victor Kamensky via Openembedded-core
cf94bdaf3f kernel-devsrc: add selinux include files needed by scripts/selinux build
If CONFIG_SECURITY_SELINUX=y is enabled in kernel configuration, then
'make scripts' command in /usr/src/kernel fails to build
utilities under scripts/selinux that would be pulled in by this config:

  HOSTCC  scripts/selinux/genheaders/genheaders
scripts/selinux/genheaders/genheaders.c:19:10: fatal error: classmap.h: No such file or directory
 #include "classmap.h"

To address this issue add security/selinux/include files into
kernel-devsrc.

(From OE-Core rev: 8dce789ae1a2c11521ebe895fd3bd636cff64261)

Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
Chen Qi
40350b46d5 libaio: extend to nativesdk
lvm2 currently requires libaio. So building nativesdk-lvm2 will
result in the following error.

  ERROR: Required build target 'nativesdk-lvm2' has no buildable providers.
  Missing or unbuildable dependency chain was: ['nativesdk-lvm2', 'nativesdk-libaio']

Extend libaio to nativesdk to fix this issue.

(From OE-Core rev: 5f56ce58360320d7ef9526b3bdcc7e26a647b6de)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
Ioan-Adrian Ratiu
519aaef791 kernel.bbclass: allow custom KERNEL_IMAGEDEST
Some distros want to install the kernel in a custom location other
than /boot and have it properly packaged, so it's useful to use a
weaker assignment.

(From OE-Core rev: cadd91655a336eb6d65ca43dc1231bbe5271e1cf)

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
Khem Raj
04f4fad960 glide: Minor update to 0.13.2
Fixed ptest issue
vet config not found

(From OE-Core rev: 735430db632bcb1a1a5e7fe85b56408396881894)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
Kevin Hao
39e476a17f udev-extraconf: Skip the entry in /etc/fstab when using the systemd-mount
When using systemd, the systemd-fstab-generator would parse the
/etc/fstab and create the corresponding unit dynamically. So we don't
need to handle the ADD action for the partitions in /etc/fstab.

(From OE-Core rev: 6104109ceba1a1323e42d67a632921fb91184ab6)

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
Kevin Hao
a9bf8397ab udev-extraconf: Fix the recursively dependency for the systemd-mount
The commit 4ca9402c37 ("udev-extraconf: Add systemd-mount to
udev-extraconf/mount.sh") uses the systemd-mount to mount the new added
disk partitions if systemd is used. But it forgot to move the codes
which tries to mount the partition by using the configuration in
/etc/fstab to the non-systemd function. And it will cause the
systemd-mount try to mount the partition synchronously and trigger a
recursively dependency like the following:
    dev-sda1.device -> run-media-sda1.mount -> dev-sda1.device

(From OE-Core rev: fcf6a4d629c05048cbb7298e285d84ff73a320d2)

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
Kevin Hao
654d57985a udev-extraconf: Use the canonical file name of systemd
The new version of systemd has changed the symbolic link between
/sbin/init and /lib/systemd/systemd to relative. So the output of
the command 'readlink /sbin/init' become:
    ../lib/systemd/systemd

Then it causes the following check of "/lib/systemd/systemd" to return
false. Fix this issue by using the canonical file name of the systemd.

(From OE-Core rev: 352b3f0b07370d8df7d6ae13c0bac0697f7751ba)

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
Chen Qi
6aa369153b packagegroup-core-lsb/-x11-sato: no udev-extraconf in case of systemd
The automount udev rule in udev-extraconf is likely to cause conflicts
or failures in case of systemd. We are seeing errors like below for
qemu bsps.

  run-media-hdc.mount loaded failed failed /run/media/hdc

So do not install udev-extraconf in case of systemd in these two
packagegroups.

(From OE-Core rev: ecf1e696a03f11e19247c4f37e17de7084d0056c)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
Jef Driesen
3a184fdfa2 npm.bbclass: allow overriding NPM_INSTALL_DEV
Commit b1f10b18ea added the NPM_INSTALL_DEV
variable. But due to the use of simple assignment, a recipe can't override its
value.

(From OE-Core rev: b53d5094d5e05f9c1955c8565d777ad74f668f7e)

Signed-off-by: Jef Driesen <jef.driesen@niko.eu>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
Richard Purdie
e9270af429 npm: change install directory to upstream default
The node binary searches for packages in a number of locations, the last
of which is $PREFIX/lib/node (here: /usr/lib/node) from the list of
GLOBAL_FOLDERS [1]. So change the installation directory for all
packages depending on npm.bbclass to that location. This removes the
need to define the NODE_PATH variable to the non-standard
/usr/lib/node_modules value.

While the Tips for Package Managers [2] discusses installing packages to
/usr/lib/node_modules/<name>/<version>, this has several drawbacks:

 * it does not work for the REPL as mentioned in the documentation
 * it also does not work for any code _not_ installed as a global
   package under /usr/lib/node_modules (e.g. /usr/share/foo.js will not
   find any packages below /usr/lib)
 * using the non-default location and then having to set NODE_PATH
   barely saves any time: there are only two file-system lookups (to the
   legacy $HOME/.node_modules and $HOME/.node_libraries) directories
   before the library would be found

And the suggestion was made in the context of deduping the node_modules
tree by installing all packages in a flat hierarchy and using symlinks
to the correct version of each dependency. This is not what OpenEmbedded
does, so none of those benefits (deduping, cleaner packages) are being
had by shifting the installation directory to /usr/lib/node_modules.

The choice of a "proper" installation path is not helped by npm
installing to /usr/lib/node_modules if asked to install globally. Still,
using the location expected by nodejs (/usr/lib/node) seems the right
choice.

[1]: https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
[2]: https://nodejs.org/api/modules.html#modules_addenda_package_manager_tips

(From OE-Core rev: c73bc49038effd64f2c2542c1f4da8b6a4168477)

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
Randy MacLeod
1c03ada82d valgrind: Make local functions static to avoid assembler error
Avoid mips32 x-compiler warnings such as:

| ../../../valgrind-3.14.0/helgrind/tests/annotate_hbefore.c:360:6: warning: no previous prototype for 'do_signal' [-Wmissing-prototypes]
|  void do_signal ( UWord* w )
|       ^~~~~~~~~

by making functions and global variables that are file scope be static
and more importantly also avoid an assembler error:

/tmp/cce22iiw.s: Assembler messages:
/tmp/cce22iiw.s:446: Error: symbol `exit_0' is already defined
/tmp/cce22iiw.s:448: Error: symbol `exit' is already defined
/tmp/cce22iiw.s:915: Error: symbol `exit_0' is already defined
/tmp/cce22iiw.s:917: Error: symbol `exit' is already defined

(From OE-Core rev: 5fface331c46b809c10b4f3d65904534d6933896)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
Kai Kang
60bdb3d6a1 udev-hwdb: fix postinstall scripts failures when multilib enabled
When multilib is enabled and both udev-hwdb and ${MLPREFIX}udev-hwdb are
installed to image, it fails to run one of their postinstall scripts
that they both call ${base_bindir}/udevadm with same user mode qemu.

Duplicate udevadm and add postinst-intercept update_udev_hwdb to fix the
failures.

(From OE-Core rev: d6b737a31a8842cdc770b05e28503c81a691d10d)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25 14:53:44 +01:00
688 changed files with 13955 additions and 16186 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
*.pyc
*.pyo
/*.patch
/.repo/
/build*/
pyshtables.py
pstage/

View File

@@ -136,7 +136,7 @@ def sigterm_handler(signum, frame):
os.killpg(0, signal.SIGTERM)
sys.exit()
def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, appends, taskdepdata, extraconfigdata, quieterrors=False, dry_run_exec=False):
def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskhash, appends, taskdepdata, extraconfigdata, quieterrors=False, dry_run_exec=False):
# We need to setup the environment BEFORE the fork, since
# a fork() or exec*() activates PSEUDO...
@@ -234,7 +234,7 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, append
ret = 0
the_data = bb_cache.loadDataFull(fn, appends)
the_data.setVar('BB_TASKHASH', workerdata["runq_hash"][task])
the_data.setVar('BB_TASKHASH', taskhash)
bb.utils.set_process_name("%s:%s" % (the_data.getVar("PN"), taskname.replace("do_", "")))
@@ -425,10 +425,10 @@ class BitbakeWorker(object):
sys.exit(0)
def handle_runtask(self, data):
fn, task, taskname, quieterrors, appends, taskdepdata, dry_run_exec = pickle.loads(data)
fn, task, taskname, taskhash, quieterrors, appends, taskdepdata, dry_run_exec = pickle.loads(data)
workerlog_write("Handling runtask %s %s %s\n" % (task, fn, taskname))
pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, self.databuilder, self.workerdata, fn, task, taskname, appends, taskdepdata, self.extraconfigdata, quieterrors, dry_run_exec)
pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, self.databuilder, self.workerdata, fn, task, taskname, taskhash, appends, taskdepdata, self.extraconfigdata, quieterrors, dry_run_exec)
self.build_pids[pid] = task
self.build_pipes[pid] = runQueueWorkerPipe(pipein, pipeout)

View File

@@ -161,7 +161,9 @@ fi
export BBBASEDIR=`dirname $TOASTER`/..
MANAGE="python3 $BBBASEDIR/lib/toaster/manage.py"
OE_ROOT=`dirname $TOASTER`/../..
if [ -z "$OE_ROOT" ]; then
OE_ROOT=`dirname $TOASTER`/../..
fi
# this is the configuraton file we are using for toaster
# we are using the same logic that oe-setup-builddir uses

View File

@@ -588,6 +588,14 @@
The name of the path in which to place the checkout.
By default, the path is <filename>git/</filename>.
</para></listitem>
<listitem><para><emphasis>"usehead":</emphasis>
Enables local <filename>git://</filename> URLs to use the
current branch HEAD as the revision for use with
<filename>AUTOREV</filename>.
The "usehead" parameter implies no branch and only works
when the transfer protocol is
<filename>file://</filename>.
</para></listitem>
</itemizedlist>
Here are some example URLs:
<literallayout class='monospaced'>

View File

@@ -342,13 +342,14 @@
<para>
When you name an append file, you can use the
wildcard character (%) to allow for matching recipe names.
"<filename>%</filename>" wildcard character to allow for matching
recipe names.
For example, suppose you have an append file named
as follows:
<literallayout class='monospaced'>
busybox_1.21.%.bbappend
</literallayout>
That append file would match any <filename>busybox_1.21.x.bb</filename>
That append file would match any <filename>busybox_1.21.</filename><replaceable>x</replaceable><filename>.bb</filename>
version of the recipe.
So, the append file would match the following recipe names:
<literallayout class='monospaced'>
@@ -356,6 +357,14 @@
busybox_1.21.2.bb
busybox_1.21.3.bb
</literallayout>
<note><title>Important</title>
The use of the "<filename>%</filename>" character
is limited in that it only works directly in front of the
<filename>.bbappend</filename> portion of the append file's
name.
You cannot use the wildcard character in any other
location of the name.
</note>
If the <filename>busybox</filename> recipe was updated to
<filename>busybox_1.3.0.bb</filename>, the append name would not
match.

View File

@@ -352,8 +352,9 @@
FOO2_remove = "abc def"
</literallayout>
The variable <filename>FOO</filename> becomes
" 789 123456 " and <filename>FOO2</filename> becomes
" ghi abcdef ".
"&nbsp;&nbsp;789 123456&nbsp;&nbsp;&nbsp;&nbsp;"
and <filename>FOO2</filename> becomes
"&nbsp;&nbsp;ghi abcdef&nbsp;&nbsp;&nbsp;&nbsp;".
</para>
<para>
@@ -2751,4 +2752,30 @@
</itemizedlist>
</para>
</section>
<section id='wildcard-support-in-variables'>
<title>Wildcard Support in Variables</title>
<para>
Support for wildcard use in variables varies depending on the
context in which it is used.
For example, some variables and file names allow limited use of
wildcards through the "<filename>%</filename>" and
"<filename>*</filename>" characters.
Other variables or names support Python's
<ulink url='https://docs.python.org/3/library/glob.html'><filename>glob</filename></ulink>
syntax,
<ulink url='https://docs.python.org/3/library/fnmatch.html#module-fnmatch'><filename>fnmatch</filename></ulink>
syntax, or
<ulink url='https://docs.python.org/3/library/re.html#re'><filename>Regular Expression (re)</filename></ulink>
syntax.
</para>
<para>
For variables that have wildcard suport, the
documentation describes which form of wildcard, its
use, and its limitations.
</para>
</section>
</chapter>

View File

@@ -115,7 +115,8 @@
is either not set or set to "0".
</para></listitem>
<listitem><para>
Limited support for wildcard matching against the
Limited support for the "<filename>*</filename>"
wildcard character for matching against the
beginning of host names exists.
For example, the following setting matches
<filename>git.gnu.org</filename>,
@@ -124,6 +125,20 @@
<literallayout class='monospaced'>
BB_ALLOWED_NETWORKS = "*.gnu.org"
</literallayout>
<note><title>Important</title>
<para>The use of the "<filename>*</filename>"
character only works at the beginning of
a host name and it must be isolated from
the remainder of the host name.
You cannot use the wildcard character in any
other location of the name or combined with
the front part of the name.</para>
<para>For example,
<filename>*.foo.bar</filename> is supported,
while <filename>*aa.foo.bar</filename> is not.
</para>
</note>
</para></listitem>
<listitem><para>
Mirrors not in the host list are skipped and
@@ -1082,7 +1097,19 @@
<glossentry id='var-BBFILES'><glossterm>BBFILES</glossterm>
<glossdef>
<para>List of recipe files BitBake uses to build software.</para>
<para>
A space-separated list of recipe files BitBake uses to
build software.
</para>
<para>
When specifying recipe files, you can pattern match using
Python's
<ulink url='https://docs.python.org/3/library/glob.html'><filename>glob</filename></ulink>
syntax.
For details on the syntax, see the documentation by
following the previous link.
</para>
</glossdef>
</glossentry>
@@ -1166,15 +1193,19 @@
match any of the expressions.
It is as if BitBake does not see them at all.
Consequently, matching files are not parsed or otherwise
used by BitBake.</para>
used by BitBake.
</para>
<para>
The values you provide are passed to Python's regular
expression compiler.
Consequently, the syntax follows Python's Regular
Expression (re) syntax.
The expressions are compared against the full paths to
the files.
For complete syntax information, see Python's
documentation at
<ulink url='http://docs.python.org/release/2.3/lib/re-syntax.html'></ulink>.
<ulink url='http://docs.python.org/3/library/re.html#re'></ulink>.
</para>
<para>
@@ -1933,15 +1964,27 @@
you want to select, and you should set
<link linkend='var-PV'><filename>PV</filename></link>
accordingly for precedence.
You can use the "<filename>%</filename>" character as a
wildcard to match any number of characters, which can be
useful when specifying versions that contain long revision
numbers that could potentially change.
</para>
<para>
The <filename>PREFERRED_VERSION</filename> variable
supports limited wildcard use through the
"<filename>%</filename>" character.
You can use the character to match any number of
characters, which can be useful when specifying versions
that contain long revision numbers that potentially change.
Here are two examples:
<literallayout class='monospaced'>
PREFERRED_VERSION_python = "2.7.3"
PREFERRED_VERSION_linux-yocto = "4.12%"
</literallayout>
<note><title>Important</title>
The use of the "<filename>%</filename>" character
is limited in that it only works at the end of the
string.
You cannot use the wildcard character in any other
location of the string.
</note>
</para>
</glossdef>
</glossentry>

View File

@@ -97,7 +97,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
self.skipreason = self.getvar('__SKIPPED', metadata)
if self.skipreason:
self.pn = self.getvar('PN', metadata) or bb.parse.BBHandler.vars_from_file(filename,metadata)[0]
self.pn = self.getvar('PN', metadata) or bb.parse.vars_from_file(filename,metadata)[0]
self.skipped = True
self.provides = self.depvar('PROVIDES', metadata)
self.rprovides = self.depvar('RPROVIDES', metadata)

View File

@@ -368,8 +368,9 @@ class ShellParser():
def _parse_shell(self, value):
try:
tokens, _ = pyshyacc.parse(value, eof=True, debug=False)
except pyshlex.NeedMore:
raise sherrors.ShellSyntaxError("Unexpected EOF")
except Exception:
bb.error('Error during parse shell code, the last 5 lines are:\n%s' % '\n'.join(value.split('\n')[-5:]))
raise
self.process_tokens(tokens)

View File

@@ -175,18 +175,31 @@ class BBCooker:
self.configuration = configuration
bb.debug(1, "BBCooker starting %s" % time.time())
sys.stdout.flush()
self.configwatcher = pyinotify.WatchManager()
bb.debug(1, "BBCooker pyinotify1 %s" % time.time())
sys.stdout.flush()
self.configwatcher.bbseen = []
self.configwatcher.bbwatchedfiles = []
self.confignotifier = pyinotify.Notifier(self.configwatcher, self.config_notifications)
bb.debug(1, "BBCooker pyinotify2 %s" % time.time())
sys.stdout.flush()
self.watchmask = pyinotify.IN_CLOSE_WRITE | pyinotify.IN_CREATE | pyinotify.IN_DELETE | \
pyinotify.IN_DELETE_SELF | pyinotify.IN_MODIFY | pyinotify.IN_MOVE_SELF | \
pyinotify.IN_MOVED_FROM | pyinotify.IN_MOVED_TO
self.watcher = pyinotify.WatchManager()
bb.debug(1, "BBCooker pyinotify3 %s" % time.time())
sys.stdout.flush()
self.watcher.bbseen = []
self.watcher.bbwatchedfiles = []
self.notifier = pyinotify.Notifier(self.watcher, self.notifications)
bb.debug(1, "BBCooker pyinotify complete %s" % time.time())
sys.stdout.flush()
# If being called by something like tinfoil, we need to clean cached data
# which may now be invalid
bb.parse.clear_cache()
@@ -196,6 +209,9 @@ class BBCooker:
self.initConfigurationData()
bb.debug(1, "BBCooker parsed base configuration %s" % time.time())
sys.stdout.flush()
# we log all events to a file if so directed
if self.configuration.writeeventlog:
# register the log file writer as UI Handler
@@ -233,6 +249,9 @@ class BBCooker:
# Let SIGHUP exit as SIGTERM
signal.signal(signal.SIGHUP, self.sigterm_exception)
bb.debug(1, "BBCooker startup complete %s" % time.time())
sys.stdout.flush()
def process_inotify_updates(self):
for n in [self.confignotifier, self.notifier]:
if n.check_events(timeout=0):
@@ -609,14 +628,7 @@ class BBCooker:
k2 = k.split(":do_")
k = k2[0]
ktask = k2[1]
if mc:
# Provider might be from another mc
for mcavailable in self.multiconfigs:
# The first element is empty
if mcavailable:
taskdata[mcavailable].add_provider(localdata[mcavailable], self.recipecaches[mcavailable], k)
else:
taskdata[mc].add_provider(localdata[mc], self.recipecaches[mc], k)
taskdata[mc].add_provider(localdata[mc], self.recipecaches[mc], k)
current += 1
if not ktask.startswith("do_"):
ktask = "do_%s" % ktask

View File

@@ -322,8 +322,6 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
if varflags.get("python"):
value = d.getVarFlag(key, "_content", False)
parser = bb.codeparser.PythonParser(key, logger)
if value and "\t" in value:
logger.warning("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE")))
parser.parse_python(value, filename=varflags.get("filename"), lineno=varflags.get("lineno"))
deps = deps | parser.references
deps = deps | (keys & parser.execs)

View File

@@ -39,10 +39,11 @@ from bb.COW import COWDictBase
logger = logging.getLogger("BitBake.Data")
__setvar_keyword__ = ["_append", "_prepend", "_remove"]
__setvar_regexp__ = re.compile('(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>[^A-Z]*))?$')
__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>[^A-Z]*))?$')
__expand_var_regexp__ = re.compile(r"\${[^{}@\n\t :]+}")
__expand_python_regexp__ = re.compile(r"\${@.+?}")
__whitespace_split__ = re.compile('(\s)')
__whitespace_split__ = re.compile(r'(\s)')
__override_regexp__ = re.compile(r'[a-z0-9]+')
def infer_caller_details(loginfo, parent = False, varval = True):
"""Save the caller the trouble of specifying everything."""
@@ -122,7 +123,11 @@ class VariableParse:
connector = self.d["_remote_data"]
return connector.expandPythonRef(self.varname, code, self.d)
codeobj = compile(code.strip(), self.varname or "<expansion>", "eval")
if self.varname:
varname = 'Var <%s>' % self.varname
else:
varname = '<expansion>'
codeobj = compile(code.strip(), varname, "eval")
parser = bb.codeparser.PythonParser(self.varname, logger)
parser.parse_python(code)
@@ -427,7 +432,8 @@ class DataSmart(MutableMapping):
except bb.parse.SkipRecipe:
raise
except Exception as exc:
raise ExpansionError(varname, s, exc) from exc
tb = sys.exc_info()[2]
raise ExpansionError(varname, s, exc).with_traceback(tb) from exc
varparse.value = s
@@ -592,7 +598,7 @@ class DataSmart(MutableMapping):
# aka pay the cookie monster
override = var[var.rfind('_')+1:]
shortvar = var[:var.rfind('_')]
while override and override.islower():
while override and __override_regexp__.match(override):
if shortvar not in self.overridedata:
self.overridedata[shortvar] = []
if [var, override] not in self.overridedata[shortvar]:

View File

@@ -256,7 +256,7 @@ class URI(object):
# Identify if the URI is relative or not
if urlp.scheme in self._relative_schemes and \
re.compile("^\w+:(?!//)").match(uri):
re.compile(r"^\w+:(?!//)").match(uri):
self.relative = True
if not self.relative:
@@ -827,6 +827,7 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None, log=None, workdir=None):
'NO_PROXY', 'no_proxy',
'ALL_PROXY', 'all_proxy',
'GIT_PROXY_COMMAND',
'GIT_SSH',
'GIT_SSL_CAINFO',
'GIT_SMART_HTTP',
'SSH_AUTH_SOCK', 'SSH_AGENT_PID',
@@ -1026,7 +1027,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = False):
raise
except IOError as e:
if e.errno in [os.errno.ESTALE]:
if e.errno in [errno.ESTALE]:
logger.warning("Stale Error Observed %s." % ud.url)
return False
raise
@@ -1468,7 +1469,7 @@ class FetchMethod(object):
else:
cmd = 'rpm2cpio.sh %s | cpio -id' % (file)
elif file.endswith('.deb') or file.endswith('.ipk'):
output = subprocess.check_output('ar -t %s' % file, preexec_fn=subprocess_setup, shell=True)
output = subprocess.check_output(['ar', '-t', file], preexec_fn=subprocess_setup)
datafile = None
if output:
for line in output.decode().splitlines():
@@ -1715,7 +1716,7 @@ class Fetch(object):
update_stamp(ud, self.d)
except IOError as e:
if e.errno in [os.errno.ESTALE]:
if e.errno in [errno.ESTALE]:
logger.error("Stale Error Observed %s." % u)
raise ChecksumError("Stale Error Detected")

View File

@@ -488,12 +488,15 @@ class Git(FetchMethod):
source_error.append("clone directory not available or not up to date: " + ud.clonedir)
if not source_found:
if ud.shallow and os.path.exists(ud.fullshallow):
bb.utils.mkdirhier(destdir)
runfetchcmd("tar -xzf %s" % ud.fullshallow, d, workdir=destdir)
source_found = True
if ud.shallow:
if os.path.exists(ud.fullshallow):
bb.utils.mkdirhier(destdir)
runfetchcmd("tar -xzf %s" % ud.fullshallow, d, workdir=destdir)
source_found = True
else:
source_error.append("shallow clone not available: " + ud.fullshallow)
else:
source_error.append("shallow clone not enabled or not available: " + ud.fullshallow)
source_error.append("shallow clone not enabled")
if not source_found:
raise bb.fetch2.UnpackError("No up to date source found: " + "; ".join(source_error), ud.url)

View File

@@ -92,7 +92,7 @@ class GitSM(Git):
url = uris[module].replace('%s:' % proto, 'gitsm:', 1)
url += ';protocol=%s' % proto
url += ";name=%s" % module
url += ";bareclone=1;nocheckout=1"
url += ";bareclone=1;nocheckout=1;nobranch=1"
ld = d.createCopy()
# Not necessary to set SRC_URI, since we're passing the URI to
@@ -152,9 +152,9 @@ class GitSM(Git):
if submodules and not os.path.exists(os.path.join(repo_conf, 'modules')):
os.mkdir(os.path.join(repo_conf, 'modules'))
for module in submodules:
srcpath = os.path.join(ud.clonedir, 'modules', module)
modpath = os.path.join(repo_conf, 'modules', module)
for module, md in submodules.items():
srcpath = os.path.join(ud.clonedir, 'modules', md['path'])
modpath = os.path.join(repo_conf, 'modules', md['path'])
if os.path.exists(srcpath):
if os.path.exists(os.path.join(srcpath, '.git')):
@@ -187,9 +187,8 @@ class GitSM(Git):
# No submodules to update
continue
submodules = list(self.parse_gitmodules(gitmodules).keys())
self.copy_submodules(submodules, ud, dest, d)
submodules = self.parse_gitmodules(gitmodules)
self.copy_submodules(submodules, ud, dest, d)
def unpack(self, ud, destdir, d):
Git.unpack(self, ud, destdir, d)
@@ -200,7 +199,7 @@ class GitSM(Git):
else:
repo_conf = os.path.join(ud.destdir, '.git')
submodules = []
update_submodules = False
paths = {}
uris = {}
local_paths = {}
@@ -211,41 +210,41 @@ class GitSM(Git):
# No submodules to update
continue
for m, md in self.parse_gitmodules(gitmodules).items():
submodules.append(m)
paths[m] = md['path']
uris[m] = md['url']
submodules = self.parse_gitmodules(gitmodules)
self.copy_submodules(submodules, ud, ud.destdir, d)
self.copy_submodules(submodules, ud, ud.destdir, d)
submodules_queue = [(module, os.path.join(repo_conf, 'modules', md['path'])) for module, md in submodules.items()]
while len(submodules_queue) != 0:
module, modpath = submodules_queue.pop()
submodules_queue = [(module, os.path.join(repo_conf, 'modules', module)) for module in submodules]
while len(submodules_queue) != 0:
module, modpath = submodules_queue.pop()
# add submodule children recursively
try:
gitmodules = runfetchcmd("%s show HEAD:.gitmodules" % (ud.basecmd), d, quiet=True, workdir=modpath)
for m, md in self.parse_gitmodules(gitmodules).items():
submodules_queue.append([m, os.path.join(modpath, 'modules', md['path'])])
except:
# no children
pass
# add submodule children recursively
try:
gitmodules = runfetchcmd("%s show HEAD:.gitmodules" % (ud.basecmd), d, quiet=True, workdir=modpath)
for m, md in self.parse_gitmodules(gitmodules).items():
submodules_queue.append([m, os.path.join(modpath, 'modules', m)])
except:
# no children
pass
# Determine (from the submodule) the correct url to reference
try:
output = runfetchcmd("%(basecmd)s config remote.origin.url" % {'basecmd': ud.basecmd}, d, workdir=modpath)
except bb.fetch2.FetchError as e:
# No remote url defined in this submodule
continue
# There are submodules to update
update_submodules = True
local_paths[module] = output
# Determine (from the submodule) the correct url to reference
try:
output = runfetchcmd("%(basecmd)s config remote.origin.url" % {'basecmd': ud.basecmd}, d, workdir=modpath)
except bb.fetch2.FetchError as e:
# No remote url defined in this submodule
continue
# Setup the local URL properly (like git submodule init or sync would do...)
runfetchcmd("%(basecmd)s config submodule.%(module)s.url %(url)s" % {'basecmd': ud.basecmd, 'module': module, 'url' : local_paths[module]}, d, workdir=ud.destdir)
local_paths[module] = output
# Ensure the submodule repository is NOT set to bare, since we're checking it out...
runfetchcmd("%s config core.bare false" % (ud.basecmd), d, quiet=True, workdir=modpath)
# Setup the local URL properly (like git submodule init or sync would do...)
runfetchcmd("%(basecmd)s config submodule.%(module)s.url %(url)s" % {'basecmd': ud.basecmd, 'module': module, 'url' : local_paths[module]}, d, workdir=ud.destdir)
if submodules:
# Ensure the submodule repository is NOT set to bare, since we're checking it out...
runfetchcmd("%s config core.bare false" % (ud.basecmd), d, quiet=True, workdir=modpath)
if update_submodules:
# Run submodule update, this sets up the directories -- without touching the config
runfetchcmd("%s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir)

View File

@@ -226,7 +226,7 @@ class Npm(FetchMethod):
self._getshrinkeddependencies(obj, data['dependencies'][obj], data['dependencies'][obj]['version'], d, ud, lockdown, manifest, False)
return
outputurl = "invalid"
if ('resolved' not in data) or (not data['resolved'].startswith('http')):
if ('resolved' not in data) or (not data['resolved'].startswith('http://') and not data['resolved'].startswith('https://')):
# will be the case for ${PN}
fetchcmd = "npm view %s@%s dist.tarball --registry %s" % (pkg, version, ud.registry)
logger.debug(2, "Found this matching URL: %s" % str(fetchcmd))

View File

@@ -63,6 +63,9 @@ class Svn(FetchMethod):
relpath = self._strip_leading_slashes(ud.path)
ud.pkgdir = os.path.join(svndir, ud.host, relpath)
ud.moddir = os.path.join(ud.pkgdir, ud.module)
# Protects the repository from concurrent updates, e.g. from two
# recipes fetching different revisions at the same time
ud.svnlock = os.path.join(ud.pkgdir, "svn.lock")
ud.setup_revisions(d)
@@ -123,35 +126,40 @@ class Svn(FetchMethod):
logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'")
if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK):
svnupdatecmd = self._buildsvncommand(ud, d, "update")
logger.info("Update " + ud.url)
# We need to attempt to run svn upgrade first in case its an older working format
try:
runfetchcmd(ud.basecmd + " upgrade", d, workdir=ud.moddir)
except FetchError:
pass
logger.debug(1, "Running %s", svnupdatecmd)
bb.fetch2.check_network_access(d, svnupdatecmd, ud.url)
runfetchcmd(svnupdatecmd, d, workdir=ud.moddir)
else:
svnfetchcmd = self._buildsvncommand(ud, d, "fetch")
logger.info("Fetch " + ud.url)
# check out sources there
bb.utils.mkdirhier(ud.pkgdir)
logger.debug(1, "Running %s", svnfetchcmd)
bb.fetch2.check_network_access(d, svnfetchcmd, ud.url)
runfetchcmd(svnfetchcmd, d, workdir=ud.pkgdir)
lf = bb.utils.lockfile(ud.svnlock)
scmdata = ud.parm.get("scmdata", "")
if scmdata == "keep":
tar_flags = ""
else:
tar_flags = "--exclude='.svn'"
try:
if os.access(os.path.join(ud.moddir, '.svn'), os.R_OK):
svnupdatecmd = self._buildsvncommand(ud, d, "update")
logger.info("Update " + ud.url)
# We need to attempt to run svn upgrade first in case its an older working format
try:
runfetchcmd(ud.basecmd + " upgrade", d, workdir=ud.moddir)
except FetchError:
pass
logger.debug(1, "Running %s", svnupdatecmd)
bb.fetch2.check_network_access(d, svnupdatecmd, ud.url)
runfetchcmd(svnupdatecmd, d, workdir=ud.moddir)
else:
svnfetchcmd = self._buildsvncommand(ud, d, "fetch")
logger.info("Fetch " + ud.url)
# check out sources there
bb.utils.mkdirhier(ud.pkgdir)
logger.debug(1, "Running %s", svnfetchcmd)
bb.fetch2.check_network_access(d, svnfetchcmd, ud.url)
runfetchcmd(svnfetchcmd, d, workdir=ud.pkgdir)
# tar them up to a defined filename
runfetchcmd("tar %s -czf %s %s" % (tar_flags, ud.localpath, ud.path_spec), d,
cleanup=[ud.localpath], workdir=ud.pkgdir)
scmdata = ud.parm.get("scmdata", "")
if scmdata == "keep":
tar_flags = ""
else:
tar_flags = "--exclude='.svn'"
# tar them up to a defined filename
runfetchcmd("tar %s -czf %s %s" % (tar_flags, ud.localpath, ud.path_spec), d,
cleanup=[ud.localpath], workdir=ud.pkgdir)
finally:
bb.utils.unlockfile(lf)
def clean(self, ud, d):
""" Clean SVN specific files and dirs """

View File

@@ -168,7 +168,7 @@ class Wget(FetchMethod):
"""
host = req.host
if not host:
raise urlllib2.URLError('no host given')
raise urllib.error.URLError('no host given')
h = http_class(host, timeout=req.timeout) # will parse host:port
h.set_debuglevel(self._debuglevel)

View File

@@ -448,7 +448,7 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
else:
logger.info("Reconnecting to bitbake server...")
if not os.path.exists(sockname):
print("Previous bitbake instance shutting down?, waiting to retry...")
logger.info("Previous bitbake instance shutting down?, waiting to retry...")
i = 0
lock = None
# Wait for 5s or until we can get the lock

View File

@@ -178,7 +178,7 @@ class MethodNode(AstNode):
funcname = ("__anon_%s_%s" % (self.lineno, self.filename.translate(MethodNode.tr_tbl)))
self.python = True
text = "def %s(d):\n" % (funcname) + text
bb.methodpool.insert_method(funcname, text, self.filename, self.lineno - len(self.body))
bb.methodpool.insert_method(funcname, text, self.filename, self.lineno - len(self.body) - 1)
anonfuncs = data.getVar('__BBANONFUNCS', False) or []
anonfuncs.append(funcname)
data.setVar('__BBANONFUNCS', anonfuncs)

View File

@@ -45,7 +45,8 @@ __addtask_regexp__ = re.compile("addtask\s+(?P<func>\w+)\s*((before\s*(?P<
__deltask_regexp__ = re.compile("deltask\s+(?P<func>\w+)")
__addhandler_regexp__ = re.compile( r"addhandler\s+(.+)" )
__def_regexp__ = re.compile( r"def\s+(\w+).*:" )
__python_func_regexp__ = re.compile( r"(\s+.*)|(^$)" )
__python_func_regexp__ = re.compile( r"(\s+.*)|(^$)|(^#)" )
__python_tab_regexp__ = re.compile(" *\t")
__infunc__ = []
__inpython__ = False
@@ -160,6 +161,16 @@ def handle(fn, d, include):
def feeder(lineno, s, fn, root, statements, eof=False):
global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __def_regexp__, __python_func_regexp__, __inpython__, __infunc__, __body__, bb, __residue__, __classname__
# Check tabs in python functions:
# - def py_funcname(): covered by __inpython__
# - python(): covered by '__anonymous' == __infunc__[0]
# - python funcname(): covered by __infunc__[3]
if __inpython__ or (__infunc__ and ('__anonymous' == __infunc__[0] or __infunc__[3])):
tab = __python_tab_regexp__.match(s)
if tab:
bb.warn('python should use 4 spaces indentation, but found tabs in %s, line %s' % (root, lineno))
if __infunc__:
if s == '}':
__body__.append('')

View File

@@ -29,6 +29,7 @@ import warnings
from bb.compat import total_ordering
from collections import Mapping
import sqlite3
import contextlib
sqlversion = sqlite3.sqlite_version_info
if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3):
@@ -36,84 +37,181 @@ if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3):
logger = logging.getLogger("BitBake.PersistData")
if hasattr(sqlite3, 'enable_shared_cache'):
try:
sqlite3.enable_shared_cache(True)
except sqlite3.OperationalError:
pass
@total_ordering
class SQLTable(collections.MutableMapping):
class _Decorators(object):
@staticmethod
def retry(*, reconnect=True):
"""
Decorator that restarts a function if a database locked sqlite
exception occurs. If reconnect is True, the database connection
will be closed and reopened each time a failure occurs
"""
def retry_wrapper(f):
def wrap_func(self, *args, **kwargs):
# Reconnect if necessary
if self.connection is None and reconnect:
self.reconnect()
count = 0
while True:
try:
return f(self, *args, **kwargs)
except sqlite3.OperationalError as exc:
if 'is locked' in str(exc) and count < 500:
count = count + 1
if reconnect:
self.reconnect()
continue
raise
return wrap_func
return retry_wrapper
@staticmethod
def transaction(f):
"""
Decorator that starts a database transaction and creates a database
cursor for performing queries. If no exception is thrown, the
database results are commited. If an exception occurs, the database
is rolled back. In all cases, the cursor is closed after the
function ends.
Note that the cursor is passed as an extra argument to the function
after `self` and before any of the normal arguments
"""
def wrap_func(self, *args, **kwargs):
# Context manager will COMMIT the database on success,
# or ROLLBACK on an exception
with self.connection:
# Automatically close the cursor when done
with contextlib.closing(self.connection.cursor()) as cursor:
return f(self, cursor, *args, **kwargs)
return wrap_func
"""Object representing a table/domain in the database"""
def __init__(self, cachefile, table):
self.cachefile = cachefile
self.table = table
self.cursor = connect(self.cachefile)
self._execute("CREATE TABLE IF NOT EXISTS %s(key TEXT, value TEXT);"
% table)
self.connection = None
self._execute_single("CREATE TABLE IF NOT EXISTS %s(key TEXT PRIMARY KEY NOT NULL, value TEXT);" % table)
def _execute(self, *query):
"""Execute a query, waiting to acquire a lock if necessary"""
count = 0
while True:
try:
return self.cursor.execute(*query)
except sqlite3.OperationalError as exc:
if 'database is locked' in str(exc) and count < 500:
count = count + 1
@_Decorators.retry(reconnect=False)
@_Decorators.transaction
def _setup_database(self, cursor):
cursor.execute("pragma synchronous = off;")
# Enable WAL and keep the autocheckpoint length small (the default is
# usually 1000). Persistent caches are usually read-mostly, so keeping
# this short will keep readers running quickly
cursor.execute("pragma journal_mode = WAL;")
cursor.execute("pragma wal_autocheckpoint = 100;")
def reconnect(self):
if self.connection is not None:
self.connection.close()
self.connection = sqlite3.connect(self.cachefile, timeout=5)
self.connection.text_factory = str
self._setup_database()
@_Decorators.retry()
@_Decorators.transaction
def _execute_single(self, cursor, *query):
"""
Executes a single query and discards the results. This correctly closes
the database cursor when finished
"""
cursor.execute(*query)
@_Decorators.retry()
def _row_iter(self, f, *query):
"""
Helper function that returns a row iterator. Each time __next__ is
called on the iterator, the provided function is evaluated to determine
the return value
"""
class CursorIter(object):
def __init__(self, cursor):
self.cursor = cursor
def __iter__(self):
return self
def __next__(self):
row = self.cursor.fetchone()
if row is None:
self.cursor.close()
self.cursor = connect(self.cachefile)
continue
raise
raise StopIteration
return f(row)
def __enter__(self):
return self
def __exit__(self, typ, value, traceback):
self.cursor.close()
return False
cursor = self.connection.cursor()
try:
cursor.execute(*query)
return CursorIter(cursor)
except:
cursor.close()
def __enter__(self):
self.cursor.__enter__()
self.connection.__enter__()
return self
def __exit__(self, *excinfo):
self.cursor.__exit__(*excinfo)
self.connection.__exit__(*excinfo)
def __getitem__(self, key):
data = self._execute("SELECT * from %s where key=?;" %
self.table, [key])
for row in data:
@_Decorators.retry()
@_Decorators.transaction
def __getitem__(self, cursor, key):
cursor.execute("SELECT * from %s where key=?;" % self.table, [key])
row = cursor.fetchone()
if row is not None:
return row[1]
raise KeyError(key)
def __delitem__(self, key):
@_Decorators.retry()
@_Decorators.transaction
def __delitem__(self, cursor, key):
if key not in self:
raise KeyError(key)
self._execute("DELETE from %s where key=?;" % self.table, [key])
cursor.execute("DELETE from %s where key=?;" % self.table, [key])
def __setitem__(self, key, value):
@_Decorators.retry()
@_Decorators.transaction
def __setitem__(self, cursor, key, value):
if not isinstance(key, str):
raise TypeError('Only string keys are supported')
elif not isinstance(value, str):
raise TypeError('Only string values are supported')
data = self._execute("SELECT * from %s where key=?;" %
self.table, [key])
exists = len(list(data))
if exists:
self._execute("UPDATE %s SET value=? WHERE key=?;" % self.table,
[value, key])
cursor.execute("SELECT * from %s where key=?;" % self.table, [key])
row = cursor.fetchone()
if row is not None:
cursor.execute("UPDATE %s SET value=? WHERE key=?;" % self.table, [value, key])
else:
self._execute("INSERT into %s(key, value) values (?, ?);" %
self.table, [key, value])
cursor.execute("INSERT into %s(key, value) values (?, ?);" % self.table, [key, value])
def __contains__(self, key):
return key in set(self)
@_Decorators.retry()
@_Decorators.transaction
def __contains__(self, cursor, key):
cursor.execute('SELECT * from %s where key=?;' % self.table, [key])
return cursor.fetchone() is not None
def __len__(self):
data = self._execute("SELECT COUNT(key) FROM %s;" % self.table)
for row in data:
@_Decorators.retry()
@_Decorators.transaction
def __len__(self, cursor):
cursor.execute("SELECT COUNT(key) FROM %s;" % self.table)
row = cursor.fetchone()
if row is not None:
return row[0]
def __iter__(self):
data = self._execute("SELECT key FROM %s;" % self.table)
return (row[0] for row in data)
return self._row_iter(lambda row: row[0], "SELECT key from %s;" % self.table)
def __lt__(self, other):
if not isinstance(other, Mapping):
@@ -122,25 +220,27 @@ class SQLTable(collections.MutableMapping):
return len(self) < len(other)
def get_by_pattern(self, pattern):
data = self._execute("SELECT * FROM %s WHERE key LIKE ?;" %
self.table, [pattern])
return [row[1] for row in data]
return self._row_iter(lambda row: row[1], "SELECT * FROM %s WHERE key LIKE ?;" %
self.table, [pattern])
def values(self):
return list(self.itervalues())
def itervalues(self):
data = self._execute("SELECT value FROM %s;" % self.table)
return (row[0] for row in data)
return self._row_iter(lambda row: row[0], "SELECT value FROM %s;" %
self.table)
def items(self):
return list(self.iteritems())
def iteritems(self):
return self._execute("SELECT * FROM %s;" % self.table)
return self._row_iter(lambda row: (row[0], row[1]), "SELECT * FROM %s;" %
self.table)
def clear(self):
self._execute("DELETE FROM %s;" % self.table)
@_Decorators.retry()
@_Decorators.transaction
def clear(self, cursor):
cursor.execute("DELETE FROM %s;" % self.table)
def has_key(self, key):
return key in self
@@ -194,12 +294,6 @@ class PersistData(object):
"""
del self.data[domain][key]
def connect(database):
connection = sqlite3.connect(database, timeout=5, isolation_level=None)
connection.execute("pragma synchronous = off;")
connection.text_factory = str
return connection
def persist(domain, d):
"""Convenience factory for SQLTable objects based upon metadata"""
import bb.utils

View File

@@ -1,710 +0,0 @@
# builtin.py - builtins and utilities definitions for pysh.
#
# Copyright 2007 Patrick Mezard
#
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
"""Builtin and internal utilities implementations.
- Beware not to use python interpreter environment as if it were the shell
environment. For instance, commands working directory must be explicitely handled
through env['PWD'] instead of relying on python working directory.
"""
import errno
import optparse
import os
import re
import subprocess
import sys
import time
def has_subprocess_bug():
return getattr(subprocess, 'list2cmdline') and \
( subprocess.list2cmdline(['']) == '' or \
subprocess.list2cmdline(['foo|bar']) == 'foo|bar')
# Detect python bug 1634343: "subprocess swallows empty arguments under win32"
# <http://sourceforge.net/tracker/index.php?func=detail&aid=1634343&group_id=5470&atid=105470>
# Also detect: "[ 1710802 ] subprocess must escape redirection characters under win32"
# <http://sourceforge.net/tracker/index.php?func=detail&aid=1710802&group_id=5470&atid=105470>
if has_subprocess_bug():
import subprocess_fix
subprocess.list2cmdline = subprocess_fix.list2cmdline
from sherrors import *
class NonExitingParser(optparse.OptionParser):
"""OptionParser default behaviour upon error is to print the error message and
exit. Raise a utility error instead.
"""
def error(self, msg):
raise UtilityError(msg)
#-------------------------------------------------------------------------------
# set special builtin
#-------------------------------------------------------------------------------
OPT_SET = NonExitingParser(usage="set - set or unset options and positional parameters")
OPT_SET.add_option( '-f', action='store_true', dest='has_f', default=False,
help='The shell shall disable pathname expansion.')
OPT_SET.add_option('-e', action='store_true', dest='has_e', default=False,
help="""When this option is on, if a simple command fails for any of the \
reasons listed in Consequences of Shell Errors or returns an exit status \
value >0, and is not part of the compound list following a while, until, \
or if keyword, and is not a part of an AND or OR list, and is not a \
pipeline preceded by the ! reserved word, then the shell shall immediately \
exit.""")
OPT_SET.add_option('-x', action='store_true', dest='has_x', default=False,
help="""The shell shall write to standard error a trace for each command \
after it expands the command and before it executes it. It is unspecified \
whether the command that turns tracing off is traced.""")
def builtin_set(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
option, args = OPT_SET.parse_args(args)
env = interp.get_env()
if option.has_f:
env.set_opt('-f')
if option.has_e:
env.set_opt('-e')
if option.has_x:
env.set_opt('-x')
return 0
#-------------------------------------------------------------------------------
# shift special builtin
#-------------------------------------------------------------------------------
def builtin_shift(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
params = interp.get_env().get_positional_args()
if args:
try:
n = int(args[0])
if n > len(params):
raise ValueError()
except ValueError:
return 1
else:
n = 1
params[:n] = []
interp.get_env().set_positional_args(params)
return 0
#-------------------------------------------------------------------------------
# export special builtin
#-------------------------------------------------------------------------------
OPT_EXPORT = NonExitingParser(usage="set - set or unset options and positional parameters")
OPT_EXPORT.add_option('-p', action='store_true', dest='has_p', default=False)
def builtin_export(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
option, args = OPT_EXPORT.parse_args(args)
if option.has_p:
raise NotImplementedError()
for arg in args:
try:
name, value = arg.split('=', 1)
except ValueError:
name, value = arg, None
env = interp.get_env().export(name, value)
return 0
#-------------------------------------------------------------------------------
# return special builtin
#-------------------------------------------------------------------------------
def builtin_return(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
res = 0
if args:
try:
res = int(args[0])
except ValueError:
res = 0
if not 0<=res<=255:
res = 0
# BUG: should be last executed command exit code
raise ReturnSignal(res)
#-------------------------------------------------------------------------------
# trap special builtin
#-------------------------------------------------------------------------------
def builtin_trap(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
if len(args) < 2:
stderr.write('trap: usage: trap [[arg] signal_spec ...]\n')
return 2
action = args[0]
for sig in args[1:]:
try:
env.traps[sig] = action
except Exception as e:
stderr.write('trap: %s\n' % str(e))
return 0
#-------------------------------------------------------------------------------
# unset special builtin
#-------------------------------------------------------------------------------
OPT_UNSET = NonExitingParser("unset - unset values and attributes of variables and functions")
OPT_UNSET.add_option( '-f', action='store_true', dest='has_f', default=False)
OPT_UNSET.add_option( '-v', action='store_true', dest='has_v', default=False)
def builtin_unset(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
option, args = OPT_UNSET.parse_args(args)
status = 0
env = interp.get_env()
for arg in args:
try:
if option.has_f:
env.remove_function(arg)
else:
del env[arg]
except KeyError:
pass
except VarAssignmentError:
status = 1
return status
#-------------------------------------------------------------------------------
# wait special builtin
#-------------------------------------------------------------------------------
def builtin_wait(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
return interp.wait([int(arg) for arg in args])
#-------------------------------------------------------------------------------
# cat utility
#-------------------------------------------------------------------------------
def utility_cat(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
if not args:
args = ['-']
status = 0
for arg in args:
if arg == '-':
data = stdin.read()
else:
path = os.path.join(env['PWD'], arg)
try:
f = file(path, 'rb')
try:
data = f.read()
finally:
f.close()
except IOError as e:
if e.errno != errno.ENOENT:
raise
status = 1
continue
stdout.write(data)
stdout.flush()
return status
#-------------------------------------------------------------------------------
# cd utility
#-------------------------------------------------------------------------------
OPT_CD = NonExitingParser("cd - change the working directory")
def utility_cd(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
option, args = OPT_CD.parse_args(args)
env = interp.get_env()
directory = None
printdir = False
if not args:
home = env.get('HOME')
if home:
# Unspecified, do nothing
return 0
else:
directory = home
elif len(args)==1:
directory = args[0]
if directory=='-':
if 'OLDPWD' not in env:
raise UtilityError("OLDPWD not set")
printdir = True
directory = env['OLDPWD']
else:
raise UtilityError("too many arguments")
curpath = None
# Absolute directories will be handled correctly by the os.path.join call.
if not directory.startswith('.') and not directory.startswith('..'):
cdpaths = env.get('CDPATH', '.').split(';')
for cdpath in cdpaths:
p = os.path.join(cdpath, directory)
if os.path.isdir(p):
curpath = p
break
if curpath is None:
curpath = directory
curpath = os.path.join(env['PWD'], directory)
env['OLDPWD'] = env['PWD']
env['PWD'] = curpath
if printdir:
stdout.write('%s\n' % curpath)
return 0
#-------------------------------------------------------------------------------
# colon utility
#-------------------------------------------------------------------------------
def utility_colon(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
return 0
#-------------------------------------------------------------------------------
# echo utility
#-------------------------------------------------------------------------------
def utility_echo(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
# Echo only takes arguments, no options. Use printf if you need fancy stuff.
output = ' '.join(args) + '\n'
stdout.write(output)
stdout.flush()
return 0
#-------------------------------------------------------------------------------
# egrep utility
#-------------------------------------------------------------------------------
# egrep is usually a shell script.
# Unfortunately, pysh does not support shell scripts *with arguments* right now,
# so the redirection is implemented here, assuming grep is available.
def utility_egrep(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
return run_command('grep', ['-E'] + args, interp, env, stdin, stdout,
stderr, debugflags)
#-------------------------------------------------------------------------------
# env utility
#-------------------------------------------------------------------------------
def utility_env(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
if args and args[0]=='-i':
raise NotImplementedError('env: -i option is not implemented')
i = 0
for arg in args:
if '=' not in arg:
break
# Update the current environment
name, value = arg.split('=', 1)
env[name] = value
i += 1
if args[i:]:
# Find then execute the specified interpreter
utility = env.find_in_path(args[i])
if not utility:
return 127
args[i:i+1] = utility
name = args[i]
args = args[i+1:]
try:
return run_command(name, args, interp, env, stdin, stdout, stderr,
debugflags)
except UtilityError:
stderr.write('env: failed to execute %s' % ' '.join([name]+args))
return 126
else:
for pair in env.get_variables().iteritems():
stdout.write('%s=%s\n' % pair)
return 0
#-------------------------------------------------------------------------------
# exit utility
#-------------------------------------------------------------------------------
def utility_exit(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
res = None
if args:
try:
res = int(args[0])
except ValueError:
res = None
if not 0<=res<=255:
res = None
if res is None:
# BUG: should be last executed command exit code
res = 0
raise ExitSignal(res)
#-------------------------------------------------------------------------------
# fgrep utility
#-------------------------------------------------------------------------------
# see egrep
def utility_fgrep(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
return run_command('grep', ['-F'] + args, interp, env, stdin, stdout,
stderr, debugflags)
#-------------------------------------------------------------------------------
# gunzip utility
#-------------------------------------------------------------------------------
# see egrep
def utility_gunzip(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
return run_command('gzip', ['-d'] + args, interp, env, stdin, stdout,
stderr, debugflags)
#-------------------------------------------------------------------------------
# kill utility
#-------------------------------------------------------------------------------
def utility_kill(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
for arg in args:
pid = int(arg)
status = subprocess.call(['pskill', '/T', str(pid)],
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
# pskill is asynchronous, hence the stupid polling loop
while 1:
p = subprocess.Popen(['pslist', str(pid)],
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
output = p.communicate()[0]
if ('process %d was not' % pid) in output:
break
time.sleep(1)
return status
#-------------------------------------------------------------------------------
# mkdir utility
#-------------------------------------------------------------------------------
OPT_MKDIR = NonExitingParser("mkdir - make directories.")
OPT_MKDIR.add_option('-p', action='store_true', dest='has_p', default=False)
def utility_mkdir(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
# TODO: implement umask
# TODO: implement proper utility error report
option, args = OPT_MKDIR.parse_args(args)
for arg in args:
path = os.path.join(env['PWD'], arg)
if option.has_p:
try:
os.makedirs(path)
except IOError as e:
if e.errno != errno.EEXIST:
raise
else:
os.mkdir(path)
return 0
#-------------------------------------------------------------------------------
# netstat utility
#-------------------------------------------------------------------------------
def utility_netstat(name, args, interp, env, stdin, stdout, stderr, debugflags):
# Do you really expect me to implement netstat ?
# This empty form is enough for Mercurial tests since it's
# supposed to generate nothing upon success. Faking this test
# is not a big deal either.
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
return 0
#-------------------------------------------------------------------------------
# pwd utility
#-------------------------------------------------------------------------------
OPT_PWD = NonExitingParser("pwd - return working directory name")
OPT_PWD.add_option('-L', action='store_true', dest='has_L', default=True,
help="""If the PWD environment variable contains an absolute pathname of \
the current directory that does not contain the filenames dot or dot-dot, \
pwd shall write this pathname to standard output. Otherwise, the -L option \
shall behave as the -P option.""")
OPT_PWD.add_option('-P', action='store_true', dest='has_L', default=False,
help="""The absolute pathname written shall not contain filenames that, in \
the context of the pathname, refer to files of type symbolic link.""")
def utility_pwd(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
option, args = OPT_PWD.parse_args(args)
stdout.write('%s\n' % env['PWD'])
return 0
#-------------------------------------------------------------------------------
# printf utility
#-------------------------------------------------------------------------------
RE_UNESCAPE = re.compile(r'(\\x[a-zA-Z0-9]{2}|\\[0-7]{1,3}|\\.)')
def utility_printf(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
def replace(m):
assert m.group()
g = m.group()[1:]
if g.startswith('x'):
return chr(int(g[1:], 16))
if len(g) <= 3 and len([c for c in g if c in '01234567']) == len(g):
# Yay, an octal number
return chr(int(g, 8))
return {
'a': '\a',
'b': '\b',
'f': '\f',
'n': '\n',
'r': '\r',
't': '\t',
'v': '\v',
'\\': '\\',
}.get(g)
# Convert escape sequences
format = re.sub(RE_UNESCAPE, replace, args[0])
stdout.write(format % tuple(args[1:]))
return 0
#-------------------------------------------------------------------------------
# true utility
#-------------------------------------------------------------------------------
def utility_true(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
return 0
#-------------------------------------------------------------------------------
# sed utility
#-------------------------------------------------------------------------------
RE_SED = re.compile(r'^s(.).*\1[a-zA-Z]*$')
# cygwin sed fails with some expressions when they do not end with a single space.
# see unit tests for details. Interestingly, the same expressions works perfectly
# in cygwin shell.
def utility_sed(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
# Scan pattern arguments and append a space if necessary
for i in range(len(args)):
if not RE_SED.search(args[i]):
continue
args[i] = args[i] + ' '
return run_command(name, args, interp, env, stdin, stdout,
stderr, debugflags)
#-------------------------------------------------------------------------------
# sleep utility
#-------------------------------------------------------------------------------
def utility_sleep(name, args, interp, env, stdin, stdout, stderr, debugflags):
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
time.sleep(int(args[0]))
return 0
#-------------------------------------------------------------------------------
# sort utility
#-------------------------------------------------------------------------------
OPT_SORT = NonExitingParser("sort - sort, merge, or sequence check text files")
def utility_sort(name, args, interp, env, stdin, stdout, stderr, debugflags):
def sort(path):
if path == '-':
lines = stdin.readlines()
else:
try:
f = file(path)
try:
lines = f.readlines()
finally:
f.close()
except IOError as e:
stderr.write(str(e) + '\n')
return 1
if lines and lines[-1][-1]!='\n':
lines[-1] = lines[-1] + '\n'
return lines
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
option, args = OPT_SORT.parse_args(args)
alllines = []
if len(args)<=0:
args += ['-']
# Load all files lines
curdir = os.getcwd()
try:
os.chdir(env['PWD'])
for path in args:
alllines += sort(path)
finally:
os.chdir(curdir)
alllines.sort()
for line in alllines:
stdout.write(line)
return 0
#-------------------------------------------------------------------------------
# hg utility
#-------------------------------------------------------------------------------
hgcommands = [
'add',
'addremove',
'commit', 'ci',
'debugrename',
'debugwalk',
'falabala', # Dummy command used in a mercurial test
'incoming',
'locate',
'pull',
'push',
'qinit',
'remove', 'rm',
'rename', 'mv',
'revert',
'showconfig',
'status', 'st',
'strip',
]
def rewriteslashes(name, args):
# Several hg commands output file paths, rewrite the separators
if len(args) > 1 and name.lower().endswith('python') \
and args[0].endswith('hg'):
for cmd in hgcommands:
if cmd in args[1:]:
return True
# svn output contains many paths with OS specific separators.
# Normalize these to unix paths.
base = os.path.basename(name)
if base.startswith('svn'):
return True
return False
def rewritehg(output):
if not output:
return output
# Rewrite os specific messages
output = output.replace(': The system cannot find the file specified',
': No such file or directory')
output = re.sub(': Access is denied.*$', ': Permission denied', output)
output = output.replace(': No connection could be made because the target machine actively refused it',
': Connection refused')
return output
def run_command(name, args, interp, env, stdin, stdout,
stderr, debugflags):
# Execute the command
if 'debug-utility' in debugflags:
print interp.log(' '.join([name, str(args), interp['PWD']]) + '\n')
hgbin = interp.options().hgbinary
ishg = hgbin and ('hg' in name or args and 'hg' in args[0])
unixoutput = 'cygwin' in name or ishg
exec_env = env.get_variables()
try:
# BUG: comparing file descriptor is clearly not a reliable way to tell
# whether they point on the same underlying object. But in pysh limited
# scope this is usually right, we do not expect complicated redirections
# besides usual 2>&1.
# Still there is one case we have but cannot deal with is when stdout
# and stderr are redirected *by pysh caller*. This the reason for the
# --redirect pysh() option.
# Now, we want to know they are the same because we sometimes need to
# transform the command output, mostly remove CR-LF to ensure that
# command output is unix-like. Cygwin utilies are a special case because
# they explicitely set their output streams to binary mode, so we have
# nothing to do. For all others commands, we have to guess whether they
# are sending text data, in which case the transformation must be done.
# Again, the NUL character test is unreliable but should be enough for
# hg tests.
redirected = stdout.fileno()==stderr.fileno()
if not redirected:
p = subprocess.Popen([name] + args, cwd=env['PWD'], env=exec_env,
stdin=stdin, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
p = subprocess.Popen([name] + args, cwd=env['PWD'], env=exec_env,
stdin=stdin, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
out, err = p.communicate()
except WindowsError as e:
raise UtilityError(str(e))
if not unixoutput:
def encode(s):
if '\0' in s:
return s
return s.replace('\r\n', '\n')
else:
encode = lambda s: s
if rewriteslashes(name, args):
encode1_ = encode
def encode(s):
s = encode1_(s)
s = s.replace('\\\\', '\\')
s = s.replace('\\', '/')
return s
if ishg:
encode2_ = encode
def encode(s):
return rewritehg(encode2_(s))
stdout.write(encode(out))
if not redirected:
stderr.write(encode(err))
return p.returncode

File diff suppressed because it is too large Load Diff

View File

@@ -1,116 +0,0 @@
#! /usr/bin/env python
import sys
from _lsprof import Profiler, profiler_entry
__all__ = ['profile', 'Stats']
def profile(f, *args, **kwds):
"""XXX docstring"""
p = Profiler()
p.enable(subcalls=True, builtins=True)
try:
f(*args, **kwds)
finally:
p.disable()
return Stats(p.getstats())
class Stats(object):
"""XXX docstring"""
def __init__(self, data):
self.data = data
def sort(self, crit="inlinetime"):
"""XXX docstring"""
if crit not in profiler_entry.__dict__:
raise ValueError("Can't sort by %s" % crit)
self.data.sort(lambda b, a: cmp(getattr(a, crit),
getattr(b, crit)))
for e in self.data:
if e.calls:
e.calls.sort(lambda b, a: cmp(getattr(a, crit),
getattr(b, crit)))
def pprint(self, top=None, file=None, limit=None, climit=None):
"""XXX docstring"""
if file is None:
file = sys.stdout
d = self.data
if top is not None:
d = d[:top]
cols = "% 12s %12s %11.4f %11.4f %s\n"
hcols = "% 12s %12s %12s %12s %s\n"
cols2 = "+%12s %12s %11.4f %11.4f + %s\n"
file.write(hcols % ("CallCount", "Recursive", "Total(ms)",
"Inline(ms)", "module:lineno(function)"))
count = 0
for e in d:
file.write(cols % (e.callcount, e.reccallcount, e.totaltime,
e.inlinetime, label(e.code)))
count += 1
if limit is not None and count == limit:
return
ccount = 0
if e.calls:
for se in e.calls:
file.write(cols % ("+%s" % se.callcount, se.reccallcount,
se.totaltime, se.inlinetime,
"+%s" % label(se.code)))
count += 1
ccount += 1
if limit is not None and count == limit:
return
if climit is not None and ccount == climit:
break
def freeze(self):
"""Replace all references to code objects with string
descriptions; this makes it possible to pickle the instance."""
# this code is probably rather ickier than it needs to be!
for i in range(len(self.data)):
e = self.data[i]
if not isinstance(e.code, str):
self.data[i] = type(e)((label(e.code),) + e[1:])
if e.calls:
for j in range(len(e.calls)):
se = e.calls[j]
if not isinstance(se.code, str):
e.calls[j] = type(se)((label(se.code),) + se[1:])
_fn2mod = {}
def label(code):
if isinstance(code, str):
return code
try:
mname = _fn2mod[code.co_filename]
except KeyError:
for k, v in sys.modules.items():
if v is None:
continue
if not hasattr(v, '__file__'):
continue
if not isinstance(v.__file__, str):
continue
if v.__file__.startswith(code.co_filename):
mname = _fn2mod[code.co_filename] = k
break
else:
mname = _fn2mod[code.co_filename] = '<%s>'%code.co_filename
return '%s:%d(%s)' % (mname, code.co_firstlineno, code.co_name)
if __name__ == '__main__':
import os
sys.argv = sys.argv[1:]
if not sys.argv:
print >> sys.stderr, "usage: lsprof.py <script> <arguments...>"
sys.exit(2)
sys.path.insert(0, os.path.abspath(os.path.dirname(sys.argv[0])))
stats = profile(execfile, sys.argv[0], globals(), locals())
stats.sort()
stats.pprint()

View File

@@ -1,167 +0,0 @@
# pysh.py - command processing for pysh.
#
# Copyright 2007 Patrick Mezard
#
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
import optparse
import os
import sys
import interp
SH_OPT = optparse.OptionParser(prog='pysh', usage="%prog [OPTIONS]", version='0.1')
SH_OPT.add_option('-c', action='store_true', dest='command_string', default=None,
help='A string that shall be interpreted by the shell as one or more commands')
SH_OPT.add_option('--redirect-to', dest='redirect_to', default=None,
help='Redirect script commands stdout and stderr to the specified file')
# See utility_command in builtin.py about the reason for this flag.
SH_OPT.add_option('--redirected', dest='redirected', action='store_true', default=False,
help='Tell the interpreter that stdout and stderr are actually the same objects, which is really stdout')
SH_OPT.add_option('--debug-parsing', action='store_true', dest='debug_parsing', default=False,
help='Trace PLY execution')
SH_OPT.add_option('--debug-tree', action='store_true', dest='debug_tree', default=False,
help='Display the generated syntax tree.')
SH_OPT.add_option('--debug-cmd', action='store_true', dest='debug_cmd', default=False,
help='Trace command execution before parameters expansion and exit status.')
SH_OPT.add_option('--debug-utility', action='store_true', dest='debug_utility', default=False,
help='Trace utility calls, after parameters expansions')
SH_OPT.add_option('--ast', action='store_true', dest='ast', default=False,
help='Encoded commands to execute in a subprocess')
SH_OPT.add_option('--profile', action='store_true', default=False,
help='Profile pysh run')
def split_args(args):
# Separate shell arguments from command ones
# Just stop at the first argument not starting with a dash. I know, this is completely broken,
# it ignores files starting with a dash or may take option values for command file. This is not
# supposed to happen for now
command_index = len(args)
for i,arg in enumerate(args):
if not arg.startswith('-'):
command_index = i
break
return args[:command_index], args[command_index:]
def fixenv(env):
path = env.get('PATH')
if path is not None:
parts = path.split(os.pathsep)
# Remove Windows utilities from PATH, they are useless at best and
# some of them (find) may be confused with other utilities.
parts = [p for p in parts if 'system32' not in p.lower()]
env['PATH'] = os.pathsep.join(parts)
if env.get('HOME') is None:
# Several utilities, including cvsps, cannot work without
# a defined HOME directory.
env['HOME'] = os.path.expanduser('~')
return env
def _sh(cwd, shargs, cmdargs, options, debugflags=None, env=None):
if os.environ.get('PYSH_TEXT') != '1':
import msvcrt
for fp in (sys.stdin, sys.stdout, sys.stderr):
msvcrt.setmode(fp.fileno(), os.O_BINARY)
hgbin = os.environ.get('PYSH_HGTEXT') != '1'
if debugflags is None:
debugflags = []
if options.debug_parsing: debugflags.append('debug-parsing')
if options.debug_utility: debugflags.append('debug-utility')
if options.debug_cmd: debugflags.append('debug-cmd')
if options.debug_tree: debugflags.append('debug-tree')
if env is None:
env = fixenv(dict(os.environ))
if cwd is None:
cwd = os.getcwd()
if not cmdargs:
# Nothing to do
return 0
ast = None
command_file = None
if options.command_string:
input = cmdargs[0]
if not options.ast:
input += '\n'
else:
args, input = interp.decodeargs(input), None
env, ast = args
cwd = env.get('PWD', cwd)
else:
command_file = cmdargs[0]
arguments = cmdargs[1:]
prefix = interp.resolve_shebang(command_file, ignoreshell=True)
if prefix:
input = ' '.join(prefix + [command_file] + arguments)
else:
# Read commands from file
f = file(command_file)
try:
# Trailing newline to help the parser
input = f.read() + '\n'
finally:
f.close()
redirect = None
try:
if options.redirected:
stdout = sys.stdout
stderr = stdout
elif options.redirect_to:
redirect = open(options.redirect_to, 'wb')
stdout = redirect
stderr = redirect
else:
stdout = sys.stdout
stderr = sys.stderr
# TODO: set arguments to environment variables
opts = interp.Options()
opts.hgbinary = hgbin
ip = interp.Interpreter(cwd, debugflags, stdout=stdout, stderr=stderr,
opts=opts)
try:
# Export given environment in shell object
for k,v in env.iteritems():
ip.get_env().export(k,v)
return ip.execute_script(input, ast, scriptpath=command_file)
finally:
ip.close()
finally:
if redirect is not None:
redirect.close()
def sh(cwd=None, args=None, debugflags=None, env=None):
if args is None:
args = sys.argv[1:]
shargs, cmdargs = split_args(args)
options, shargs = SH_OPT.parse_args(shargs)
if options.profile:
import lsprof
p = lsprof.Profiler()
p.enable(subcalls=True)
try:
return _sh(cwd, shargs, cmdargs, options, debugflags, env)
finally:
p.disable()
stats = lsprof.Stats(p.getstats())
stats.sort()
stats.pprint(top=10, file=sys.stderr, climit=5)
else:
return _sh(cwd, shargs, cmdargs, options, debugflags, env)
def main():
sys.exit(sh())
if __name__=='__main__':
main()

View File

@@ -13,11 +13,6 @@
# PLY in pull mode. It was designed to work incrementally and it would not be
# that hard to enable pull mode.
import re
try:
s = set()
del s
except NameError:
from Set import Set as set
from ply import lex
from bb.pysh.sherrors import *

View File

@@ -636,13 +636,16 @@ def p_empty(p):
def p_error(p):
msg = []
w = msg.append
w('%r\n' % p)
w('followed by:\n')
for i in range(5):
n = yacc.token()
if not n:
break
w(' %r\n' % n)
if p:
w('%r\n' % p)
w('followed by:\n')
for i in range(5):
n = yacc.token()
if not n:
break
w(' %r\n' % n)
else:
w('Unexpected EOF')
raise sherrors.ShellSyntaxError(''.join(msg))
# Build the parser

View File

@@ -13,29 +13,3 @@ class ShellError(Exception):
class ShellSyntaxError(ShellError):
pass
class UtilityError(ShellError):
"""Raised upon utility syntax error (option or operand error)."""
pass
class ExpansionError(ShellError):
pass
class CommandNotFound(ShellError):
"""Specified command was not found."""
pass
class RedirectionError(ShellError):
pass
class VarAssignmentError(ShellError):
"""Variable assignment error."""
pass
class ExitSignal(ShellError):
"""Exit signal."""
pass
class ReturnSignal(ShellError):
"""Exit signal."""
pass

View File

@@ -1,77 +0,0 @@
# subprocess - Subprocesses with accessible I/O streams
#
# For more information about this module, see PEP 324.
#
# This module should remain compatible with Python 2.2, see PEP 291.
#
# Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se>
#
# Licensed to PSF under a Contributor Agreement.
# See http://www.python.org/2.4/license for licensing details.
def list2cmdline(seq):
"""
Translate a sequence of arguments into a command line
string, using the same rules as the MS C runtime:
1) Arguments are delimited by white space, which is either a
space or a tab.
2) A string surrounded by double quotation marks is
interpreted as a single argument, regardless of white space
contained within. A quoted string can be embedded in an
argument.
3) A double quotation mark preceded by a backslash is
interpreted as a literal double quotation mark.
4) Backslashes are interpreted literally, unless they
immediately precede a double quotation mark.
5) If backslashes immediately precede a double quotation mark,
every pair of backslashes is interpreted as a literal
backslash. If the number of backslashes is odd, the last
backslash escapes the next double quotation mark as
described in rule 3.
"""
# See
# http://msdn.microsoft.com/library/en-us/vccelng/htm/progs_12.asp
result = []
needquote = False
for arg in seq:
bs_buf = []
# Add a space to separate this argument from the others
if result:
result.append(' ')
needquote = (" " in arg) or ("\t" in arg) or ("|" in arg) or arg == ""
if needquote:
result.append('"')
for c in arg:
if c == '\\':
# Don't know if we need to double yet.
bs_buf.append(c)
elif c == '"':
# Double backspaces.
result.append('\\' * len(bs_buf)*2)
bs_buf = []
result.append('\\"')
else:
# Normal char
if bs_buf:
result.extend(bs_buf)
bs_buf = []
result.append(c)
# Add remaining backspaces, if any.
if bs_buf:
result.extend(bs_buf)
if needquote:
result.extend(bs_buf)
result.append('"')
return ''.join(result)

View File

@@ -1224,17 +1224,12 @@ class RunQueue:
bb.utils.nonblockingfd(worker.stdout)
workerpipe = runQueuePipe(worker.stdout, None, self.cfgData, self, rqexec)
runqhash = {}
for tid in self.rqdata.runtaskentries:
runqhash[tid] = self.rqdata.runtaskentries[tid].hash
workerdata = {
"taskdeps" : self.rqdata.dataCaches[mc].task_deps,
"fakerootenv" : self.rqdata.dataCaches[mc].fakerootenv,
"fakerootdirs" : self.rqdata.dataCaches[mc].fakerootdirs,
"fakerootnoenv" : self.rqdata.dataCaches[mc].fakerootnoenv,
"sigdata" : bb.parse.siggen.get_taskdata(),
"runq_hash" : runqhash,
"logdefaultdebug" : bb.msg.loggerDefaultDebugLevel,
"logdefaultverbose" : bb.msg.loggerDefaultVerbose,
"logdefaultverboselogs" : bb.msg.loggerVerboseLogs,
@@ -1409,6 +1404,12 @@ class RunQueue:
bb.event.fire(bb.event.DepTreeGenerated(depgraph), self.cooker.data)
if self.state is runQueueSceneInit:
if not self.dm_event_handler_registered:
res = bb.event.register(self.dm_event_handler_name,
lambda x: self.dm.check(self) if self.state in [runQueueSceneRun, runQueueRunning, runQueueCleanUp] else False,
('bb.event.HeartbeatEvent',))
self.dm_event_handler_registered = True
dump = self.cooker.configuration.dump_signatures
if dump:
self.rqdata.init_progress_reporter.finish()
@@ -1425,11 +1426,6 @@ class RunQueue:
self.rqexe = RunQueueExecuteScenequeue(self)
if self.state is runQueueSceneRun:
if not self.dm_event_handler_registered:
res = bb.event.register(self.dm_event_handler_name,
lambda x: self.dm.check(self) if self.state in [runQueueSceneRun, runQueueRunning, runQueueCleanUp] else False,
('bb.event.HeartbeatEvent',))
self.dm_event_handler_registered = True
retval = self.rqexe.execute()
if self.state is runQueueRunInit:
@@ -2030,6 +2026,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
taskdepdata = self.build_taskdepdata(task)
taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
taskhash = self.rqdata.get_task_hash(task)
if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not (self.cooker.configuration.dry_run or self.rqdata.setscene_enforce):
if not mc in self.rq.fakeworker:
try:
@@ -2039,10 +2036,10 @@ class RunQueueExecuteTasks(RunQueueExecute):
self.rq.state = runQueueFailed
self.stats.taskFailed()
return True
self.rq.fakeworker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, False, self.cooker.collection.get_file_appends(taskfn), taskdepdata, self.rqdata.setscene_enforce)) + b"</runtask>")
self.rq.fakeworker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, taskhash, False, self.cooker.collection.get_file_appends(taskfn), taskdepdata, self.rqdata.setscene_enforce)) + b"</runtask>")
self.rq.fakeworker[mc].process.stdin.flush()
else:
self.rq.worker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, False, self.cooker.collection.get_file_appends(taskfn), taskdepdata, self.rqdata.setscene_enforce)) + b"</runtask>")
self.rq.worker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, taskhash, False, self.cooker.collection.get_file_appends(taskfn), taskdepdata, self.rqdata.setscene_enforce)) + b"</runtask>")
self.rq.worker[mc].process.stdin.flush()
self.build_stamps[task] = bb.build.stampfile(taskname, self.rqdata.dataCaches[mc], taskfn, noextra=True)
@@ -2456,13 +2453,14 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
taskdepdata = self.build_taskdepdata(task)
taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
taskhash = self.rqdata.get_task_hash(task)
if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not self.cooker.configuration.dry_run:
if not mc in self.rq.fakeworker:
self.rq.start_fakeworker(self, mc)
self.rq.fakeworker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, True, self.cooker.collection.get_file_appends(taskfn), taskdepdata, False)) + b"</runtask>")
self.rq.fakeworker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, taskhash, True, self.cooker.collection.get_file_appends(taskfn), taskdepdata, False)) + b"</runtask>")
self.rq.fakeworker[mc].process.stdin.flush()
else:
self.rq.worker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, True, self.cooker.collection.get_file_appends(taskfn), taskdepdata, False)) + b"</runtask>")
self.rq.worker[mc].process.stdin.write(b"<runtask>" + pickle.dumps((taskfn, task, taskname, taskhash, True, self.cooker.collection.get_file_appends(taskfn), taskdepdata, False)) + b"</runtask>")
self.rq.worker[mc].process.stdin.flush()
self.build_stamps[task] = bb.build.stampfile(taskname, self.rqdata.dataCaches[mc], taskfn, noextra=True)

View File

@@ -239,6 +239,12 @@ class ProcessServer(multiprocessing.Process):
while not lock:
with bb.utils.timeout(3):
lock = bb.utils.lockfile(lockfile, shared=False, retry=False, block=True)
if lock:
# We hold the lock so we can remove the file (hide stale pid data)
bb.utils.remove(lockfile)
bb.utils.unlockfile(lock)
return
if not lock:
# Some systems may not have lsof available
procs = None
@@ -259,10 +265,6 @@ class ProcessServer(multiprocessing.Process):
if procs:
msg += ":\n%s" % str(procs)
print(msg)
return
# We hold the lock so we can remove the file (hide stale pid data)
bb.utils.remove(lockfile)
bb.utils.unlockfile(lock)
def idle_commands(self, delay, fds=None):
nextsleep = delay
@@ -398,52 +400,69 @@ class BitBakeServer(object):
os.close(self.readypipein)
ready = ConnectionReader(self.readypipe)
r = ready.poll(30)
r = ready.poll(5)
if not r:
bb.note("Bitbake server didn't start within 5 seconds, waiting for 90")
r = ready.poll(90)
if r:
try:
r = ready.get()
except EOFError:
# Trap the child exitting/closing the pipe and error out
r = None
if not r or r != "ready":
if not r or r[0] != "r":
ready.close()
bb.error("Unable to start bitbake server")
bb.error("Unable to start bitbake server (%s)" % str(r))
if os.path.exists(logfile):
logstart_re = re.compile(self.start_log_format % ('([0-9]+)', '([0-9-]+ [0-9:.]+)'))
started = False
lines = []
lastlines = []
with open(logfile, "r") as f:
for line in f:
if started:
lines.append(line)
else:
lastlines.append(line)
res = logstart_re.match(line.rstrip())
if res:
ldatetime = datetime.datetime.strptime(res.group(2), self.start_log_datetime_format)
if ldatetime >= startdatetime:
started = True
lines.append(line)
if len(lastlines) > 60:
lastlines = lastlines[-60:]
if lines:
if len(lines) > 10:
bb.error("Last 10 lines of server log for this session (%s):\n%s" % (logfile, "".join(lines[-10:])))
if len(lines) > 60:
bb.error("Last 60 lines of server log for this session (%s):\n%s" % (logfile, "".join(lines[-60:])))
else:
bb.error("Server log for this session (%s):\n%s" % (logfile, "".join(lines)))
elif lastlines:
bb.error("Server didn't start, last 60 loglines (%s):\n%s" % (logfile, "".join(lastlines)))
else:
bb.error("%s doesn't exist" % logfile)
raise SystemExit(1)
ready.close()
def _startServer(self):
print(self.start_log_format % (os.getpid(), datetime.datetime.now().strftime(self.start_log_datetime_format)))
sys.stdout.flush()
server = ProcessServer(self.bitbake_lock, self.sock, self.sockname)
self.configuration.setServerRegIdleCallback(server.register_idle_function)
os.close(self.readypipe)
writer = ConnectionWriter(self.readypipein)
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
writer.send("ready")
writer.send("r")
writer.close()
server.cooker = self.cooker
server.server_timeout = self.configuration.server_timeout
server.xmlrpcinterface = self.configuration.xmlrpcinterface
print("Started bitbake server pid %d" % os.getpid())
sys.stdout.flush()
server.start()
def connectProcessServer(sockname, featureset):
@@ -452,16 +471,17 @@ def connectProcessServer(sockname, featureset):
# AF_UNIX has path length issues so chdir here to workaround
cwd = os.getcwd()
try:
os.chdir(os.path.dirname(sockname))
sock.connect(os.path.basename(sockname))
finally:
os.chdir(cwd)
readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None
eq = command_chan_recv = command_chan = None
sock.settimeout(2)
try:
try:
os.chdir(os.path.dirname(sockname))
sock.connect(os.path.basename(sockname))
finally:
os.chdir(cwd)
# Send an fd for the remote to write events to
readfd, writefd = os.pipe()
@@ -490,7 +510,8 @@ def connectProcessServer(sockname, featureset):
command_chan.close()
for i in [writefd, readfd1, writefd2]:
try:
os.close(i)
if i:
os.close(i)
except OSError:
pass
sock.close()

View File

@@ -185,7 +185,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
if not self.rundep_check(fn, recipename, task, dep, depname, dataCache):
continue
if dep not in self.taskhash:
bb.fatal("%s is not in taskhash, caller isn't calling in dependency order?", dep)
bb.fatal("%s is not in taskhash, caller isn't calling in dependency order?" % dep)
data = data + self.taskhash[dep]
self.runtaskdeps[k].append(dep)
@@ -311,6 +311,13 @@ class SignatureGeneratorBasic(SignatureGenerator):
class SignatureGeneratorBasicHash(SignatureGeneratorBasic):
name = "basichash"
def get_stampfile_hash(self, task):
if task in self.taskhash:
return self.taskhash[task]
# If task is not in basehash, then error
return self.basehash[task]
def stampfile(self, stampbase, fn, taskname, extrainfo, clean=False):
if taskname != "do_setscene" and taskname.endswith("_setscene"):
k = fn + "." + taskname[:-9]
@@ -318,11 +325,9 @@ class SignatureGeneratorBasicHash(SignatureGeneratorBasic):
k = fn + "." + taskname
if clean:
h = "*"
elif k in self.taskhash:
h = self.taskhash[k]
else:
# If k is not in basehash, then error
h = self.basehash[k]
h = self.get_stampfile_hash(k)
return ("%s.%s.%s.%s" % (stampbase, taskname, h, extrainfo)).rstrip('.')
def stampcleanmask(self, stampbase, fn, taskname, extrainfo):
@@ -342,10 +347,10 @@ def dump_this_task(outfile, d):
def init_colors(enable_color):
"""Initialise colour dict for passing to compare_sigfiles()"""
# First set up the colours
colors = {'color_title': '\033[1;37;40m',
'color_default': '\033[0;37;40m',
'color_add': '\033[1;32;40m',
'color_remove': '\033[1;31;40m',
colors = {'color_title': '\033[1m',
'color_default': '\033[0m',
'color_add': '\033[0;32m',
'color_remove': '\033[0;31m',
}
# Leave all keys present but clear the values
if not enable_color:

View File

@@ -1708,9 +1708,8 @@ class GitShallowTest(FetcherTest):
with self.assertRaises(bb.fetch2.UnpackError) as context:
fetcher.unpack(self.d.getVar('WORKDIR'))
self.assertTrue("No up to date source found" in context.exception.msg)
self.assertTrue("clone directory not available or not up to date" in context.exception.msg)
self.assertTrue("shallow clone not enabled or not available" in context.exception.msg)
self.assertIn("No up to date source found", context.exception.msg)
self.assertIn("clone directory not available or not up to date", context.exception.msg)
@skipIfNoNetwork()
def test_that_unpack_does_work_when_using_git_shallow_tarball_but_tarball_is_not_available(self):

View File

@@ -27,7 +27,8 @@ import bb
import bb.msg
import multiprocessing
import fcntl
import imp
import importlib
from importlib import machinery
import itertools
import subprocess
import glob
@@ -43,7 +44,7 @@ from contextlib import contextmanager
from ctypes import cdll
logger = logging.getLogger("BitBake.Util")
python_extensions = [e for e, _, _ in imp.get_suffixes()]
python_extensions = importlib.machinery.all_suffixes()
def clean_context():
@@ -68,8 +69,8 @@ class VersionStringException(Exception):
def explode_version(s):
r = []
alpha_regexp = re.compile('^([a-zA-Z]+)(.*)$')
numeric_regexp = re.compile('^(\d+)(.*)$')
alpha_regexp = re.compile(r'^([a-zA-Z]+)(.*)$')
numeric_regexp = re.compile(r'^(\d+)(.*)$')
while (s != ''):
if s[0] in string.digits:
m = numeric_regexp.match(s)
@@ -317,10 +318,13 @@ def better_compile(text, file, realfile, mode = "exec", lineno = 0):
error = []
# split the text into lines again
body = text.split('\n')
error.append("Error in compiling python function in %s, line %s:\n" % (realfile, lineno))
error.append("Error in compiling python function in %s, line %s:\n" % (realfile, e.lineno))
if hasattr(e, "lineno"):
error.append("The code lines resulting in this error were:")
error.extend(_print_trace(body, e.lineno))
# e.lineno: line's position in reaflile
# lineno: function name's "position -1" in realfile
# e.lineno - lineno: line's relative position in function
error.extend(_print_trace(body, e.lineno - lineno))
else:
error.append("The function causing this error was:")
for line in body:
@@ -704,15 +708,7 @@ def prunedir(topdir):
# CAUTION: This is dangerous!
if _check_unsafe_delete_path(topdir):
raise Exception('bb.utils.prunedir: called with dangerous path "%s", refusing to delete!' % topdir)
for root, dirs, files in os.walk(topdir, topdown = False):
for name in files:
os.remove(os.path.join(root, name))
for name in dirs:
if os.path.islink(os.path.join(root, name)):
os.remove(os.path.join(root, name))
else:
os.rmdir(os.path.join(root, name))
os.rmdir(topdir)
remove(topdir, recurse=True)
#
# Could also use return re.compile("(%s)" % "|".join(map(re.escape, suffixes))).sub(lambda mo: "", var)
@@ -1157,14 +1153,14 @@ def edit_metadata(meta_lines, variables, varfunc, match_overrides=False):
var_res = {}
if match_overrides:
override_re = '(_[a-zA-Z0-9-_$(){}]+)?'
override_re = r'(_[a-zA-Z0-9-_$(){}]+)?'
else:
override_re = ''
for var in variables:
if var.endswith('()'):
var_res[var] = re.compile('^(%s%s)[ \\t]*\([ \\t]*\)[ \\t]*{' % (var[:-2].rstrip(), override_re))
var_res[var] = re.compile(r'^(%s%s)[ \\t]*\([ \\t]*\)[ \\t]*{' % (var[:-2].rstrip(), override_re))
else:
var_res[var] = re.compile('^(%s%s)[ \\t]*[?+:.]*=[+.]*[ \\t]*(["\'])' % (var, override_re))
var_res[var] = re.compile(r'^(%s%s)[ \\t]*[?+:.]*=[+.]*[ \\t]*(["\'])' % (var, override_re))
updated = False
varset_start = ''
@@ -1501,6 +1497,8 @@ def ioprio_set(who, cls, value):
NR_ioprio_set = 251
elif _unamearch[0] == "i" and _unamearch[2:3] == "86":
NR_ioprio_set = 289
elif _unamearch == "aarch64":
NR_ioprio_set = 30
if NR_ioprio_set:
ioprio = value | (cls << IOPRIO_CLASS_SHIFT)
@@ -1544,12 +1542,9 @@ def export_proxies(d):
def load_plugins(logger, plugins, pluginpath):
def load_plugin(name):
logger.debug(1, 'Loading plugin %s' % name)
fp, pathname, description = imp.find_module(name, [pluginpath])
try:
return imp.load_module(name, fp, pathname, description)
finally:
if fp:
fp.close()
spec = importlib.machinery.PathFinder.find_spec(name, path=[pluginpath] )
if spec:
return spec.loader.load_module()
logger.debug(1, 'Loading plugins from %s...' % pluginpath)

View File

@@ -28,7 +28,7 @@ class LayerIndexPlugin(ActionPlugin):
layerdir = os.path.join(repodir, subdir)
if not os.path.exists(repodir):
if fetch_layer:
result = subprocess.call('git clone %s %s' % (url, repodir), shell = True)
result = subprocess.call(['git', 'clone', url, repodir])
if result:
logger.error("Failed to download %s" % url)
return None, None, None

View File

@@ -37,17 +37,30 @@
hardware.
You will use Yocto Project to build a reference embedded OS
called Poky.
<note>
The examples in this paper assume you are using a native Linux
system running a recent Ubuntu Linux distribution.
If the machine you want to use
Yocto Project on to build an image is not a native Linux
system, you can still perform these steps by using CROss
PlatformS (CROPS) and setting up a Poky container.
See the
<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-to-use-crops'>Setting Up to Use CROss PlatformS (CROPS)</ulink>"
section in the Yocto Project Development Tasks Manual for more
information.
<note><title>Notes</title>
<itemizedlist>
<listitem><para>
The examples in this paper assume you are using a
native Linux system running a recent Ubuntu Linux
distribution.
If the machine you want to use Yocto Project on to
build an image
(<ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>)
is not a native Linux system, you can
still perform these steps by using CROss PlatformS
(CROPS) and setting up a Poky container.
See the
<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-to-use-crops'>Setting Up to Use CROss PlatformS (CROPS)</ulink>"
section in the Yocto Project Development Tasks Manual for more
information.
</para></listitem>
<listitem><para>
You cannot use a build host that is using the
<ulink url='https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux'>Windows Subsystem for Linux</ulink>
(WSL).
The Yocto Project is not compatible with WSL.
</para></listitem>
</itemizedlist>
</note>
</para>
@@ -75,6 +88,10 @@
Linux distributions that support the Yocto Project, see the
"<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
section in the Yocto Project Reference Manual.
For detailed information on preparing your build host, see
the
"<ulink url='&YOCTO_DOCS_DEV_URL;#dev-preparing-the-build-host'>Preparing the Build Host</ulink>"
section in the Yocto Project Development Tasks Manual.
</para></listitem>
<listitem><para>
<itemizedlist>

View File

@@ -123,9 +123,14 @@
</revision>
<revision>
<revnumber>2.6</revnumber>
<date>&REL_MONTH_YEAR;</date>
<date>November 2018</date>
<revremark>Released with the Yocto Project 2.6 Release.</revremark>
</revision>
<revision>
<revnumber>2.7</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -3237,30 +3237,22 @@
post-installation script to be delayed until the first boot.
For example, the script might need to be executed on the
device itself.
To delay script execution until boot time, use the following
structure in the post-installation script:
<literallayout class='monospaced'>
pkg_postinst_<replaceable>PACKAGENAME</replaceable>() {
if [ x"$D" = "x" ]; then
# Actions to carry out on the device go here
else
exit 1
fi
}
</literallayout>
To delay script execution until boot time, you must explicitly
mark post installs to defer to the target.
You can use <filename>pkg_postinst_ontarget()</filename> or
call
<filename>postinst-intercepts defer_to_first_boot</filename>
from <filename>pkg_postinst()</filename>.
Any failure of a <filename>pkg_postinst()</filename> script
(including exit 1) triggers an error during the
<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-rootfs'><filename>do_rootfs</filename></ulink>
task.
</para>
<para>
The previous example delays execution until the image boots
again because the environment variable <filename>D</filename>
points to the directory containing the image when
the root filesystem is created at build time but is unset
when executed on the first boot.
</para>
<para>
If you have recipes that use <filename>pkg_postinst</filename>
scripts and they require the use of non-standard native
If you have recipes that use
<filename>pkg_postinst</filename> function
and they require the use of non-standard native
tools that have dependencies during rootfs construction, you
need to use the
<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_WRITE_DEPS'><filename>PACKAGE_WRITE_DEPS</filename></ulink>
@@ -3279,8 +3271,8 @@
<filename>pkg_prerm</filename>, and
<filename>pkg_postrm</filename>, respectively.
These scrips work in exactly the same way as does
<filename>pkg_postinst</filename> with the exception that they
run at different times.
<filename>pkg_postinst</filename> with the exception
that they run at different times.
Also, because of when they run, they are not applicable to
being run at image creation time like
<filename>pkg_postinst</filename>.
@@ -7270,13 +7262,12 @@
easier-to-use and more flexible replacements for an
existing functionality in OE-Core's
<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image-live'><filename>image-live</filename></ulink>
class and <filename>mkefidisk.sh</filename> script.
The difference between
Wic and those examples is
that with Wic the
functionality of those scripts is implemented
by a general-purpose partitioning language, which is
based on Redhat kickstart syntax.</para></listitem>
class.
The difference between Wic and those examples is
that with Wic the functionality of those scripts is
implemented by a general-purpose partitioning language,
which is based on Redhat kickstart syntax.
</para></listitem>
</itemizedlist>
</para>
</section>
@@ -11798,16 +11789,15 @@
To run the tests automatically after the
OpenEmbedded build system successfully creates an image,
first set the
<ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_IMAGE'><filename>TEST_IMAGE</filename></ulink>
<ulink url='&YOCTO_DOCS_REF_URL;#var-TESTIMAGE_AUTO'><filename>TESTIMAGE_AUTO</filename></ulink>
variable to "1" in your <filename>local.conf</filename>
file in the
<ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
<literallayout class='monospaced'>
TEST_IMAGE = "1"
TESTIMAGE_AUTO = "1"
</literallayout>
Next, build your image.
If the image successfully builds, the tests will be
run:
If the image successfully builds, the tests run:
<literallayout class='monospaced'>
bitbake core-image-sato
</literallayout></para></listitem>

View File

@@ -408,6 +408,12 @@
<ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/crops/about/'>CROPS</ulink>,
which leverages
<ulink url='https://www.docker.com/'>Docker Containers</ulink>.
<note>
You cannot use a build host that is using the
<ulink url='https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux'>Windows Subsystem for Linux</ulink>
(WSL).
The Yocto Project is not compatible with WSL.
</note>
</para>
<para>

View File

@@ -108,9 +108,14 @@
</revision>
<revision>
<revnumber>2.6</revnumber>
<date>&REL_MONTH_YEAR;</date>
<date>November 2018</date>
<revremark>Released with the Yocto Project 2.6 Release.</revremark>
</revision>
<revision>
<revnumber>2.7</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -1603,8 +1603,11 @@
<title>Creating a&nbsp;&nbsp;<filename>defconfig</filename> File</title>
<para>
A <filename>defconfig</filename> file is simply a
<filename>.config</filename> renamed to "defconfig".
A <filename>defconfig</filename> file in the context of
the Yocto Project is often a <filename>.config</filename>
file that is copied from a build or a
<filename>defconfig</filename> taken from the kernel tree
and moved into recipe space.
You can use a <filename>defconfig</filename> file
to retain a known set of kernel configurations from which the
OpenEmbedded build system can draw to create the final

View File

@@ -93,9 +93,14 @@
</revision>
<revision>
<revnumber>2.6</revnumber>
<date>&REL_MONTH_YEAR;</date>
<date>November 2018</date>
<revremark>Released with the Yocto Project 2.6 Release.</revremark>
</revision>
<revision>
<revnumber>2.7</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -77,9 +77,14 @@
</revision>
<revision>
<revnumber>2.6</revnumber>
<date>&REL_MONTH_YEAR;</date>
<date>November 2018</date>
<revremark>Released with the Yocto Project 2.6 Release.</revremark>
</revision>
<revision>
<revnumber>2.7</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -1,19 +1,19 @@
<!ENTITY DISTRO "2.6">
<!ENTITY DISTRO_COMPRESSED "26">
<!ENTITY DISTRO_NAME_NO_CAP "thud">
<!ENTITY DISTRO_NAME "Thud">
<!ENTITY DISTRO_NAME_NO_CAP_MINUS_ONE "sumo">
<!ENTITY DISTRO_NAME_MINUS_ONE "Sumo">
<!ENTITY YOCTO_DOC_VERSION "2.6">
<!ENTITY YOCTO_DOC_VERSION_MINUS_ONE "2.5">
<!ENTITY DISTRO_REL_TAG "yocto-2.6">
<!ENTITY DISTRO "2.7">
<!ENTITY DISTRO_COMPRESSED "27">
<!ENTITY DISTRO_NAME_NO_CAP "warrior">
<!ENTITY DISTRO_NAME "Warrior">
<!ENTITY DISTRO_NAME_NO_CAP_MINUS_ONE "thud">
<!ENTITY DISTRO_NAME_MINUS_ONE "Thud">
<!ENTITY YOCTO_DOC_VERSION "2.7">
<!ENTITY YOCTO_DOC_VERSION_MINUS_ONE "2.6">
<!ENTITY DISTRO_REL_TAG "yocto-2.7">
<!ENTITY METAINTELVERSION "9.0">
<!ENTITY REL_MONTH_YEAR "October 2018">
<!ENTITY REL_MONTH_YEAR "TBD">
<!ENTITY META_INTEL_REL_TAG "&METAINTELVERSION;-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;">
<!ENTITY POKYVERSION "21.0.0">
<!ENTITY POKYVERSION_COMPRESSED "2100">
<!ENTITY POKYVERSION "22.0.0">
<!ENTITY POKYVERSION_COMPRESSED "2200">
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;">
<!ENTITY COPYRIGHT_YEAR "2010-2018">
<!ENTITY COPYRIGHT_YEAR "2010-2019">
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
<!ENTITY YOCTO_HOME_URL "http://www.yoctoproject.org">
<!ENTITY YOCTO_LISTS_URL "http://lists.yoctoproject.org">

View File

@@ -93,9 +93,14 @@
</revision>
<revision>
<revnumber>2.6</revnumber>
<date>&REL_MONTH_YEAR;</date>
<date>November 2018</date>
<revremark>Released with the Yocto Project 2.6 Release.</revremark>
</revision>
<revision>
<revnumber>2.7</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -3619,7 +3619,7 @@ $ runqemu qemux86-64 tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.
<para>
The
<link linkend='var-KERNEL_IMAGE_BASE_NAME'><filename>KERNEL_IMAGE_BASE_NAME</filename></link>
<filename>KERNEL_IMAGE_BASE_NAME</filename>
variable no longer uses the
<link linkend='var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></link>
variable to create the image's base name.
@@ -5557,8 +5557,9 @@ id=f4d4f99cfbc2396e49c1613a7d237b9e57f06f81'>commit message</ulink>.
incompatible with other implementations.
</para></listitem>
<listitem><para>
By default, the <filename>cmake</filename> class uses
<filename>ninja</filename> instead of
By default, the
<link linkend='ref-classes-cmake'><filename>cmake</filename></link>
class uses <filename>ninja</filename> instead of
<filename>make</filename> for building.
This improves build performance.
If a recipe is broken with <filename>ninja</filename>, then
@@ -5608,7 +5609,11 @@ id=f4d4f99cfbc2396e49c1613a7d237b9e57f06f81'>commit message</ulink>.
Any failure of a <filename>pkg_postinst()</filename>
script (including <filename>exit 1</filename>)
will trigger a warning during
<filename>do_rootfs</filename>.
<filename>do_rootfs</filename>.</para>
<para>For more information, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-post-installation-scripts'>Post-Installation Scripts</ulink>"
section in the Yocto Project Development Tasks Manual.
</para></listitem>
<listitem><para>
The <filename>elf</filename> image type has been removed.
@@ -5678,6 +5683,648 @@ id=f4d4f99cfbc2396e49c1613a7d237b9e57f06f81'>commit message</ulink>.
</para>
</section>
</section>
<section id='moving-to-the-yocto-project-2.6-release'>
<title>Moving to the Yocto Project 2.6 Release</title>
<para>
This section provides migration information for moving to the
Yocto Project 2.6 Release from the prior release.
</para>
<section id='migration-2.6-gcc-changes'>
<title>GCC 8.2 is Now Used by Default</title>
<para>
The GNU Compiler Collection version 8.2 is now used by default
for compilation.
For more information on what has changed in the GCC 8.x release,
see
<ulink url='https://gcc.gnu.org/gcc-8/changes.html'></ulink>.
</para>
<para>
If you still need to compile with version 7.x, GCC 7.3 is
also provided.
You can select this version by setting the
and can be selected by setting the
<link linkend='var-GCCVERSION'><filename>GCCVERSION</filename></link>
variable to "7.%" in your configuration.
</para>
</section>
<section id='migration-2.6-removed-recipes'>
<title>Removed Recipes</title>
<para>
The following recipes have been removed:
<literallayout class='monospaced'>
<emphasis><filename>beecrypt</filename>:</emphasis> No longer needed since moving to RPM 4.
<emphasis><filename>bigreqsproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>calibrateproto</filename>:</emphasis> Removed in favor of <filename>xinput</filename>.
<emphasis><filename>compositeproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>damageproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>dmxproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>dri2proto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>dri3proto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>eee-acpi-scripts</filename>:</emphasis> Became obsolete.
<emphasis><filename>fixesproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>fontsproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>fstests</filename>:</emphasis> Became obsolete.
<emphasis><filename>gccmakedep</filename>:</emphasis> No longer used.
<emphasis><filename>glproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>gnome-desktop3</filename>:</emphasis> No longer needed. This recipe has moved to <filename>meta-oe</filename>.
<emphasis><filename>icon-naming-utils</filename>:</emphasis> No longer used since the Sato theme was removed in 2016.
<emphasis><filename>inputproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>kbproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>libusb-compat</filename>:</emphasis> Became obsolete.
<emphasis><filename>libuser</filename>:</emphasis> Became obsolete.
<emphasis><filename>libnfsidmap</filename>:</emphasis> No longer an external requirement since <filename>nfs-utils</filename> 2.2.1. <filename>libnfsidmap</filename> is now integrated.
<emphasis><filename>libxcalibrate</filename>:</emphasis> No longer needed with <filename>xinput</filename>
<emphasis><filename>mktemp</filename>:</emphasis> Became obsolete. The <filename>mktemp</filename> command is provided by both <filename>busybox</filename> and <filename>coreutils</filename>.
<emphasis><filename>ossp-uuid</filename>:</emphasis> Is not being maintained and has mostly been replaced by <filename>uuid.h</filename> in <filename>util-linux</filename>.
<emphasis><filename>pax-utils</filename>:</emphasis> No longer needed. Previous QA tests that did use this recipe are now done at build time.
<emphasis><filename>pcmciautils</filename>:</emphasis> Became obsolete.
<emphasis><filename>pixz</filename>:</emphasis> No longer needed. <filename>xz</filename> now supports multi-threaded compression.
<emphasis><filename>presentproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>randrproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>recordproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>renderproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>resourceproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>scrnsaverproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>trace-cmd</filename>:</emphasis> Became obsolete. <filename>perf</filename> replaced this recipe's functionally.
<emphasis><filename>videoproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>wireless-tools</filename>:</emphasis> Became obsolete. Superseded by <filename>iw</filename>.
<emphasis><filename>xcmiscproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>xextproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>xf86dgaproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>xf86driproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>xf86miscproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>xf86-video-omapfb</filename>:</emphasis> Became obsolete. Use kernel modesetting driver instead.
<emphasis><filename>xf86-video-omap</filename>:</emphasis> Became obsolete. Use kernel modesetting driver instead.
<emphasis><filename>xf86vidmodeproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>xineramaproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>xproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
<emphasis><filename>yasm</filename>:</emphasis> No longer needed since previous usages are now satisfied by <filename>nasm</filename>.
</literallayout>
</para>
</section>
<section id='migration-2.6-packaging-changes'>
<title>Packaging Changes</title>
<para>
The following packaging changes have been made:
<itemizedlist>
<listitem><para>
<emphasis><filename>cmake</filename>:</emphasis>
<filename>cmake.m4</filename> and
<filename>toolchain</filename> files have been moved to the
main package.
</para></listitem>
<listitem><para>
<emphasis><filename>iptables</filename>:</emphasis>
The <filename>iptables</filename> modules have been split
into separate packages.
</para></listitem>
<listitem><para>
<emphasis><filename>alsa-lib</filename>:</emphasis>
<filename>libasound</filename> is now in the main
<filename>alsa-lib</filename> package instead of
<filename>libasound</filename>.
</para></listitem>
<listitem><para>
<emphasis><filename>glibc</filename>:</emphasis>
<filename>libnss-db</filename> is now in its own package
along with a <filename>/var/db/makedbs.sh</filename>
script to update databases.
</para></listitem>
<listitem><para>
<emphasis><filename>python</filename> and <filename>python3</filename>:</emphasis>
The main package has been removed from the recipe.
You must install specific packages or
<filename>python-modules</filename> /
<filename>python3-modules</filename> for everything.
</para></listitem>
<listitem><para>
<emphasis><filename>systemtap</filename>:</emphasis>
Moved <filename>systemtap-exporter</filename> into its own
package.
</para></listitem>
</itemizedlist>
</para>
</section>
<section id='migration-2.6-xorg-protocol-dependencies'>
<title>XOrg Protocol dependencies</title>
<para>
The "*proto" upstream repositories have been combined into one
"xorgproto" repository.
Thus, the corresponding recipes have also been combined into a
single <filename>xorgproto</filename> recipe.
Any recipes that depend upon the older <filename>*proto</filename>
recipes need to be changed to depend on the newer
<filename>xorgproto</filename> recipe instead.
</para>
<para>
For names of recipes removed because of this repository change,
see the
<link linkend="migration-2.6-removed-recipes">Removed Recipes</link>
section.
</para>
</section>
<section id='migration-2.6-distutils-distutils3-fetching-dependencies'>
<title><filename>distutils</filename> and <filename>distutils3</filename> Now Prevent Fetching Dependencies During the <filename>do_configure</filename> Task</title>
<para>
Previously, it was possible for Python recipes that inherited
the
<link linkend='ref-classes-distutils'><filename>distutils</filename></link>
and
<link linkend='ref-classes-distutils3'><filename>distutils3</filename></link>
classes to fetch code during the
<link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
task to satisfy dependencies mentioned in
<filename>setup.py</filename> if those dependencies were not
provided in the sysroot (i.e. recipes providing the dependencies
were missing from
<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>).
<note>
This change affects classes beyond just the two mentioned
(i.e. <filename>distutils</filename> and
<filename>distutils3</filename>).
Any recipe that inherits <filename>distutils*</filename>
classes are affected.
For example, the <filename>setuptools</filename> and
<filename>setuptools3</filename> recipes are affected since
they inherit the <filename>distutils*</filename> classes.
</note>
</para>
<para>
Fetching these types of dependencies that are not provided in the
sysroot negatively affects the ability to reproduce builds.
This type of fetching is now explicitly disabled.
Consequently, any missing dependencies in Python recipes that
use these classes now result in an error during the
<filename>do_configure</filename> task.
</para>
</section>
<section id='migration-2.6-linux-yocto-configuration-audit-issues-now-correctly-reported'>
<title><filename>linux-yocto</filename> Configuration Audit Issues Now Correctly Reported</title>
<para>
Due to a bug, the kernel configuration audit functionality was
not writing out any resulting warnings during the build.
This issue is now corrected.
You might notice these warnings now if you have a custom kernel
configuration with a <filename>linux-yocto</filename> style
kernel recipe.
</para>
</section>
<section id='migration-2.6-image-kernel-artifact-naming-changes'>
<title>Image/Kernel Artifact Naming Changes</title>
<para>
The following changes have been made:
<itemizedlist>
<listitem><para>
Name variables (e.g.
<link linkend='var-IMAGE_NAME'><filename>IMAGE_NAME</filename></link>)
use a new <filename>IMAGE_VERSION_SUFFIX</filename>
variable instead of
<link linkend='var-DATETIME'><filename>DATETIME</filename></link>.
Using <filename>IMAGE_VERSION_SUFFIX</filename> allows
easier and more direct changes.</para>
<para>The <filename>IMAGE_VERSION_SUFFIX</filename>
variable is set in the
<filename>bitbake.conf</filename> configuration file as
follows:
<literallayout class='monospaced'>
IMAGE_VERSION_SUFFIX = "-${DATETIME}"
</literallayout>
</para></listitem>
<listitem><para>
Several variables have changed names for consistency:
<literallayout class='monospaced'>
Old Variable Name New Variable Name
========================================================
KERNEL_IMAGE_BASE_NAME <link linkend='var-KERNEL_IMAGE_NAME'>KERNEL_IMAGE_NAME</link>
KERNEL_IMAGE_SYMLINK_NAME <link linkend='var-KERNEL_IMAGE_LINK_NAME'>KERNEL_IMAGE_LINK_NAME</link>
MODULE_TARBALL_BASE_NAME <link linkend='var-MODULE_TARBALL_NAME'>MODULE_TARBALL_NAME</link>
MODULE_TARBALL_SYMLINK_NAME <link linkend='var-MODULE_TARBALL_LINK_NAME'>MODULE_TARBALL_LINK_NAME</link>
INITRAMFS_BASE_NAME <link linkend='var-INITRAMFS_NAME'>INITRAMFS_NAME</link>
</literallayout>
</para></listitem>
<listitem><para>
The <filename>MODULE_IMAGE_BASE_NAME</filename> variable
has been removed.
The module tarball name is now controlled directly with the
<link linkend='var-MODULE_TARBALL_NAME'><filename>MODULE_TARBALL_NAME</filename></link>
variable.
</para></listitem>
<listitem><para>
The
<link linkend='var-KERNEL_DTB_NAME'><filename>KERNEL_DTB_NAME</filename></link>
and
<link linkend='var-KERNEL_DTB_LINK_NAME'><filename>KERNEL_DTB_LINK_NAME</filename></link>
variables have been introduced to control kernel Device
Tree Binary (DTB) artifact names instead of mangling
<filename>KERNEL_IMAGE_*</filename> variables.
</para></listitem>
<listitem><para>
The
<link linkend='var-KERNEL_FIT_NAME'><filename>KERNEL_FIT_NAME</filename></link>
and
<link linkend='var-KERNEL_FIT_LINK_NAME'><filename>KERNEL_FIT_LINK_NAME</filename></link>
variables have been introduced to specify the name of
flattened image tree (FIT) kernel images similar to other
deployed artifacts.
</para></listitem>
<listitem><para>
The
<link linkend='var-MODULE_TARBALL_NAME'><filename>MODULE_TARBALL_NAME</filename></link>
and
<link linkend='var-MODULE_TARBALL_LINK_NAME'><filename>MODULE_TARBALL_LINK_NAME</filename></link>
variable values no longer include the "module-" prefix or
".tgz" suffix.
These parts are now hardcoded so that the values are
consistent with other artifact naming variables.
</para></listitem>
<listitem><para>
Added the
<link linkend='var-INITRAMFS_LINK_NAME'><filename>INITRAMFS_LINK_NAME</filename></link>
variable so that the symlink can be controlled similarly
to other artifact types.
</para></listitem>
<listitem><para>
<link linkend='var-INITRAMFS_NAME'><filename>INITRAMFS_NAME</filename></link>
now uses
"${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
instead of
"${PV}-${PR}-${MACHINE}-${DATETIME}", which
makes it consistent with other variables.
</para></listitem>
</itemizedlist>
</para>
</section>
<section id='migration-2.6-serial-console-deprecated'>
<title><filename>SERIAL_CONSOLE</filename> Deprecated</title>
<para>
The
<link linkend='var-SERIAL_CONSOLE'><filename>SERIAL_CONSOLE</filename></link>
variable has been functionally replaced by the
<link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>
variable for some time.
With the Yocto Project 2.6 release,
<filename>SERIAL_CONSOLE</filename> has been officially deprecated.
</para>
<para>
<filename>SERIAL_CONSOLE</filename> will continue to work as
before for the 2.6 release.
However, for the sake of future compatibility, it is recommended
that you replace all instances of
<filename>SERIAL_CONSOLE</filename> with
<filename>SERIAL_CONSOLES</filename>.
<note>
The only difference in usage is that
<filename>SERIAL_CONSOLES</filename> expects entries to be
separated using semicolons as compared to
<filename>SERIAL_CONSOLE</filename>, which expects spaces.
</note>
</para>
</section>
<section id='migration-2.6-poky-sets-unknown-configure-option-to-qa-error'>
<title>Configure Script Reports Unknown Options as Errors</title>
<para>
If the configure script reports an unknown option, this now
triggers a QA error instead of a warning.
Any recipes that previously got away with specifying such unknown
options now need to be fixed.
</para>
</section>
<section id='migration-2.6-override-changes'>
<title>Override Changes</title>
<para>
The following changes have occurred:
<itemizedlist>
<listitem><para>
<emphasis>The <filename>virtclass-native</filename> and
<filename>virtclass-nativesdk</filename> Overrides Have
Been Removed:</emphasis>
The <filename>virtclass-native</filename> and
<filename>virtclass-nativesdk</filename> overrides have
been deprecated since 2012 in favor of
<filename>class-native</filename> and
<filename>class-nativesdk</filename>, respectively.
Both <filename>virtclass-native</filename> and
<filename>virtclass-nativesdk</filename> are now dropped.
<note>
The <filename>virtclass-multilib-</filename> overrides
for multilib are still valid.
</note>
</para></listitem>
<listitem><para>
<emphasis>The <filename>forcevariable</filename>
Override Now Has a Higher Priority Than
<filename>libc</filename> Overrides:</emphasis>
The <filename>forcevariable</filename> override is
documented to be the highest priority override.
However, due to a long-standing quirk of how
<link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
is set, the <filename>libc</filename> overrides (e.g.
<filename>libc-glibc</filename>,
<filename>libc-musl</filename>, and so forth) erroneously
had a higher priority.
This issue is now corrected.</para>
<para>It is likely this change will not cause any
problems.
However, it is possible with some unusual configurations
that you might see a change in behavior if you were
relying on the previous behavior.
Be sure to check how you use
<filename>forcevariable</filename> and
<filename>libc-*</filename> overrides in your custom
layers and configuration files to ensure they make sense.
</para></listitem>
<listitem><para>
<emphasis>The <filename>build-${BUILD_OS}</filename>
Override Has Been Removed:</emphasis>
The <filename>build-${BUILD_OS}</filename>, which is
typically <filename>build-linux</filename>, override has
been removed because building on a host operating system
other than a recent version of Linux is neither supported
nor recommended.
Dropping the override avoids giving the impression that
other host operating systems might be supported.
</para></listitem>
<listitem><para>
The "_remove" operator now preserves whitespace.
Consequently, when specifying list items to remove, be
aware that leading and trailing whitespace resulting from
the removal is retained.</para>
<para>See the
"<ulink url='&YOCTO_DOCS_BB_URL;#removing-override-style-syntax'>Removal (Override Style Syntax)</ulink>"
section in the BitBake User Manual for a detailed example.
</para></listitem>
</itemizedlist>
</para>
</section>
<section id='migration-2.6-systemd-configuration-now-split-out-to-system-conf'>
<title><filename>systemd</filename> Configuration is Now Split Into <filename>systemd-conf</filename></title>
<para>
The configuration for the <filename>systemd</filename> recipe
has been moved into a <filename>system-conf</filename> recipe.
Moving this configuration to a separate recipe avoids the
<filename>systemd</filename> recipe from becoming machine-specific
for cases where machine-specific configurations need to be applied
(e.g. for <filename>qemu*</filename> machines).
</para>
<para>
Currently, the new recipe packages the following files:
<literallayout class='monospaced'>
${sysconfdir}/machine-id
${sysconfdir}/systemd/coredump.conf
${sysconfdir}/systemd/journald.conf
${sysconfdir}/systemd/logind.conf
${sysconfdir}/systemd/system.conf
${sysconfdir}/systemd/user.conf
</literallayout>
If you previously used bbappend files to append the
<filename>systemd</filename> recipe to change any of the
listed files, you must do so for the
<filename>systemd-conf</filename> recipe instead.
</para>
</section>
<section id='migration-2.6-automatic-testing-changes'>
<title>Automatic Testing Changes</title>
<para>
This section provides information about automatic testing
changes:
<itemizedlist>
<listitem><para>
<emphasis><filename>TEST_IMAGE</filename> Variable Removed:</emphasis>
Prior to this release, you set the
<filename>TEST_IMAGE</filename> variable to "1" to
enable automatic testing for successfully built images.
The <filename>TEST_IMAGE</filename> variable no longer
exists and has been replaced by the
<link linkend='var-TESTIMAGE_AUTO'><filename>TESTIMAGE_AUTO</filename></link>
variable.
</para></listitem>
<listitem><para>
<emphasis>Inheriting the <filename>testimage</filename> and
<filename>testsdk</filename> Classes:</emphasis>
Best practices now dictate that you use the
<link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link>
variable rather than the
<link linkend='var-INHERIT'><filename>INHERIT</filename></link>
variable when you inherit the
<link linkend='ref-classes-testimage*'><filename>testimage</filename></link>
and
<link linkend='ref-classes-testsdk'><filename>testsdk</filename></link>
classes used for automatic testing.
</para></listitem>
</itemizedlist>
</para>
</section>
<section id='migration-2.6-openssl-changes'>
<title>OpenSSL Changes</title>
<para>
<ulink url='https://www.openssl.org/'>OpenSSL</ulink> has been
upgraded from 1.0 to 1.1.
By default, this upgrade could cause problems for recipes that
have both versions in their dependency chains.
The problem is that both versions cannot be installed together
at build time.
<note>
It is possible to have both versions of the library at runtime.
</note>
</para>
</section>
<section id='migration-2.6-bitbake-changes'>
<title>BitBake Changes</title>
<para>
The server logfile <filename>bitbake-cookerdaemon.log</filename> is
now always placed in the
<link linkend='build-directory'>Build Directory</link>
instead of the current directory.
</para>
</section>
<section id='migration-2.6-security-changes'>
<title>Security Changes</title>
<para>
The Poky distribution now uses security compiler flags by
default.
Inclusion of these flags could cause new failures due to stricter
checking for various potential security issues in code.
</para>
</section>
<section id='migration-2.6-post-installation-changes'>
<title>Post Installation Changes</title>
<para>
You must explicitly mark post installs to defer to the target.
If you want to explicitly defer a postinstall to first boot on
the target rather than at rootfs creation time, use
<filename>pkg_postinst_ontarget()</filename> or call
<filename>postinst-intercepts defer_to_first_boot</filename> from
<filename>pkg_postinst()</filename>.
Any failure of a <filename>pkg_postinst()</filename> script
(including exit 1) triggers an error during the
<link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link> task.
</para>
<para>
For more information on post-installation behavior, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-post-installation-scripts'>Post-Installation Scripts</ulink>"
section in the Yocto Project Development Tasks Manual.
</para>
</section>
<section id='migration-2.6-python-3-profile-guided-optimizations'>
<title>Python 3 Profile-Guided Optimization</title>
<para>
The <filename>python3</filename> recipe now enables profile-guided
optimization.
Using this optimization requires a little extra build time in
exchange for improved performance on the target at runtime.
Additionally, the optimization is only enabled if the current
<link linkend='var-MACHINE'><filename>MACHINE</filename></link>
has support for user-mode emulation in QEMU (i.e. "qemu-usermode"
is in
<link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>,
which it is by default).
</para>
<para>
If you wish to disable Python profile-guided optimization
regardless of the value of
<filename>MACHINE_FEATURES</filename>, then ensure that
<link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
for the <filename>python3</filename> recipe does not contain "pgo".
You could accomplish the latter using the following at the
configuration level:
<literallayout class='monospaced'>
PACKAGECONFIG_remove_pn-python3 = "pgo"
</literallayout>
Alternatively, you can set
<filename>PACKAGECONFIG</filename> using an append file for the
<filename>python3</filename> recipe.
</para>
</section>
<section id='migration-2.6-miscellaneous-changes'>
<title>Miscellaneous Changes</title>
<para>
The following miscellaneous changes occurred:
<itemizedlist>
<listitem><para>
Default to using the Thumb-2 instruction set for armv7a
and above.
If you have any custom recipes that build software that
needs to be built with the ARM instruction set, change the
recipe to set the instruction set as follows:
<literallayout class='monospaced'>
ARM_INSTRUCTION_SET = "arm"
</literallayout>
</para></listitem>
<listitem><para>
<filename>run-postinsts</filename> no longer uses
<filename>/etc/*-postinsts</filename> for
<filename>dpkg/opkg</filename> in favor of built-in
postinst support.
RPM behavior remains unchanged.
</para></listitem>
<listitem><para>
The <filename>NOISO</filename> and
<filename>NOHDD</filename> variables are no longer used.
You now control building <filename>*.iso</filename> and
<filename>*.hddimg</filename> image types directly
by using the
<link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
variable.
</para></listitem>
<listitem><para>
The <filename>scripts/contrib/mkefidisk.sh</filename>
has been removed in favor of Wic.
</para></listitem>
<listitem><para>
<filename>kernel-modules</filename> has been removed from
<link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
for <filename>qemumips</filename> and
<filename>qemumips64</filename> machines.
Removal also impacts the <filename>x86-base.inc</filename>
file.
<note>
<filename>genericx86</filename> and
<filename>genericx86-64</filename> retain
<filename>kernel-modules</filename> as part of the
<filename>RRECOMMENDS</filename> variable setting.
</note>
</para></listitem>
<listitem><para>
The <filename>LGPLv2_WHITELIST_GPL-3.0</filename>
variable has been removed.
If you are setting this variable in your configuration,
set or append it to the
<filename>WHITELIST_GPL-3.0</filename> variable instead.
</para></listitem>
<listitem><para>
<filename>${ASNEEDED}</filename> is now included in
the
<link linkend='var-TARGET_LDFLAGS'><filename>TARGET_LDFLAGS</filename></link>
variable directly.
The remaining definitions from
<filename>meta/conf/distro/include/as-needed.inc</filename>
have been moved to corresponding recipes.
</para></listitem>
<listitem><para>
Support for DSA host keys has been dropped from the
OpenSSH recipes.
If you are still using DSA keys, you must switch over to a
more secure algorithm as recommended by OpenSSH upstream.
</para></listitem>
<listitem><para>
The <filename>dhcp</filename> recipe now uses the
<filename>dhcpd6.conf</filename> configuration file in
<filename>dhcpd6.service</filename> for IPv6 DHCP rather
than re-using <filename>dhcpd.conf</filename>, which is
now reserved for IPv4.
</para></listitem>
</itemizedlist>
</para>
</section>
</section>
</chapter>
<!--
vim: expandtab tw=80 ts=4

View File

@@ -449,12 +449,13 @@
<title><filename>cmake.bbclass</filename></title>
<para>
The <filename>cmake</filename> class allows for
recipes that need to build software using the CMake build system.
The <filename>cmake</filename> class allows for recipes that need to
build software using the
<ulink url='https://cmake.org/overview/'>CMake</ulink> build system.
You can use the
<link linkend='var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></link>
variable to specify additional configuration options to be passed on
the <filename>cmake</filename> command line.
variable to specify additional configuration options to be passed
using the <filename>cmake</filename> command line.
</para>
</section>
@@ -645,6 +646,54 @@
</para>
</section>
<section id='ref-classes-devupstream'>
<title><filename>devupstream.bbclass</filename></title>
<para>
The <filename>devupstream</filename> class uses
<link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link>
to add a variant of the recipe that fetches from an alternative URI
(e.g. Git) instead of a tarball.
Following is an example:
<literallayout class='monospaced'>
BBCLASSEXTEND = "devupstream:target"
SRC_URI_class-devupstream = "git://git.example.com/example"
SRCREV_class-devupstream = "abcd1234"
</literallayout>
Adding the above statements to your recipe creates a variant that has
<link linkend='var-DEFAULT_PREFERENCE'><filename>DEFAULT_PREFERENCE</filename></link>
set to "-1".
Consequently, you need to select the variant of the recipe to use it.
Any development-specific adjustments can be done by using the
<filename>class-devupstream</filename> override.
Here is an example:
<literallayout class='monospaced'>
DEPENDS_append_class-devupstream = " gperf-native"
do_configure_prepend_class-devupstream() {
touch ${S}/README
}
</literallayout>
The class currently only supports creating a development variant of
the target recipe, not <filename>native</filename> or
<filename>nativesdk</filename> variants.
</para>
<para>
The <filename>BBCLASSEXTEND</filename> syntax
(i.e. <filename>devupstream:target</filename>) provides support for
<filename>native</filename> and <filename>nativesdk</filename>
variants.
Consequently, this functionality can be added in a future release.
</para>
<para>
Support for other version control systems such as Subversion is
limited due to BitBake's automatic fetch dependencies (e.g.
<filename>subversion-native</filename>).
</para>
</section>
<section id='ref-classes-distro_features_check'>
<title><filename>distro_features_check.bbclass</filename></title>
@@ -1266,28 +1315,35 @@
<title><filename>image_types.bbclass</filename></title>
<para>
The <filename>image_types</filename> class defines all of
the standard image output types that you can enable through the
The <filename>image_types</filename> class defines all of the
standard image output types that you can enable through the
<link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
variable.
You can use this class as a reference on how to add support for custom
image output types.
You can use this class as a reference on how to add support for
custom image output types.
</para>
<para>
By default, this class is enabled through the
<link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link>
variable in
<link linkend='ref-classes-image'><filename>image.bbclass</filename></link>.
If you define your own image types using a custom BitBake class and
then use <filename>IMAGE_CLASSES</filename> to enable it, the custom
class must either inherit <filename>image_types</filename> or
<filename>image_types</filename> must also appear in
<filename>IMAGE_CLASSES</filename>.
By default, the
<link linkend='ref-classes-image'><filename>image</filename></link>
class automatically enables the <filename>image_types</filename> class.
The <filename>image</filename> class uses the
<filename>IMGCLASSES</filename> variable as follows:
<literallayout class='monospaced'>
IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}"
IMGCLASSES += "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}"
IMGCLASSES += "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso hddimg', 'image-live', '', d)}"
IMGCLASSES += "${@bb.utils.contains('IMAGE_FSTYPES', 'container', 'image-container', '', d)}"
IMGCLASSES += "image_types_wic"
IMGCLASSES += "rootfs-postcommands"
IMGCLASSES += "image-postinst-intercepts"
inherit ${IMGCLASSES}
</literallayout>
</para>
<para>
This class also handles conversion and compression of images.
The <filename>image_types</filename> class also handles conversion and
compression of images.
<note>
To build a VMware VMDK image, you need to add "wic.vmdk" to
<filename>IMAGE_FSTYPES</filename>.
@@ -1314,14 +1370,6 @@
Normally, you do not use this class directly.
Instead, you add "live" to
<link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
You can selectively build just one of these types through the
<link linkend='var-NOISO'><filename>NOISO</filename></link>
and
<link linkend='var-NOHDD'><filename>NOHDD</filename></link> variables.
For example, if you were building an ISO image, you would add "live"
to <filename>IMAGE_FSTYPES</filename>, set the
<filename>NOISO</filename> variable to "0" and the build system would
use the <filename>image-live</filename> class to build the ISO image.
</para>
</section>
@@ -3502,6 +3550,14 @@ This check was removed for YP 2.3 release
The classes handle loading the tests and starting the image.
To use the classes, you need to perform steps to set up the
environment.
<note><title>Tip</title>
Best practices include using
<link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link>
rather than
<link linkend='var-INHERIT'><filename>INHERIT</filename></link> to
inherit the <filename>testimage</filename> class for automated
image testing.
</note>
</para>
<para>
@@ -3519,7 +3575,7 @@ This check was removed for YP 2.3 release
</literallayout>
The <filename>testimage-auto</filename> class runs tests on an image
after the image is constructed (i.e.
<link linkend='var-TEST_IMAGE'><filename>TEST_IMAGE</filename></link>
<link linkend='var-TESTIMAGE_AUTO'><filename>TESTIMAGE_AUTO</filename></link>
must be set to "1").
</para>
@@ -3541,6 +3597,14 @@ This check was removed for YP 2.3 release
<literallayout class='monospaced'>
$ bitbake -c testsdk image
</literallayout>
<note><title>Tip</title>
Best practices include using
<link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link>
rather than
<link linkend='var-INHERIT'><filename>INHERIT</filename></link> to
inherit the <filename>testsdk</filename> class for automated
SDK testing.
</note>
</para>
</section>

View File

@@ -124,9 +124,14 @@
</revision>
<revision>
<revnumber>2.6</revnumber>
<date>&REL_MONTH_YEAR;</date>
<date>November 2018</date>
<revremark>Released with the Yocto Project 2.6 Release.</revremark>
</revision>
<revision>
<revnumber>2.7</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -65,6 +65,14 @@
that our priority is on the supported platforms listed
below.
</para></listitem>
<listitem><para>
The Yocto Project is not compatible with the
<ulink url='https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux'>Windows Subsystem for Linux</ulink>
(WSL).
You cannot use a
<link linkend='hardware-build-system-term'>build host</link>
that is running WSL.
</para></listitem>
<listitem><para>
If you encounter problems, please go to
<ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
@@ -80,46 +88,49 @@
</itemizedlist>
</note>
<itemizedlist>
<!--
<listitem><para>Ubuntu 10.04</para></listitem>
<!-- <listitem><para>Ubuntu 10.04</para></listitem>
<listitem><para>Ubuntu 11.10</para></listitem>
<listitem><para>Ubuntu 12.04 (LTS)</para></listitem>
<listitem><para>Ubuntu 13.10</para></listitem>
<listitem><para>Ubuntu 14.04 (LTS)</para></listitem> -->
<listitem><para>Ubuntu 14.04 (LTS)</para></listitem>
<listitem><para>Ubuntu 14.10</para></listitem>
<listitem><para>Ubuntu 15.04</para></listitem>
<listitem><para>Ubuntu 15.10</para></listitem>
<listitem><para>Ubuntu 15.10</para></listitem> -->
<listitem><para>Ubuntu 16.04 (LTS)</para></listitem>
<!-- <listitem><para>Fedora 16 (Verne)</para></listitem>
<listitem><para>Ubuntu 16.10 (LTS)</para></listitem>
<listitem><para>Ubuntu 17.04</para></listitem>
<!-- <listitem><para>Fedora 16 (Verne)</para></listitem>
<listitem><para>Fedora 17 (Spherical)</para></listitem>
<listitem><para>Fedora release 19 (Schrödinger's Cat)</para></listitem>
<listitem><para>Fedora release 20 (Heisenbug)</para></listitem> -->
<listitem><para>Fedora 19 (Schrödinger's Cat)</para></listitem>
<listitem><para>Fedora release 20 (Heisenbug)</para></listitem>
<listitem><para>Fedora release 22</para></listitem>
<listitem><para>Fedora release 23</para></listitem>
<!-- <listitem><para>Fedora release 24</para></listitem>
<listitem><para>CentOS release 5.6 (Final)</para></listitem>
<listitem><para>Fedora release 24</para></listitem> -->
<listitem><para>Fedora release 26</para></listitem>
<!-- <listitem><para>CentOS release 5.6 (Final)</para></listitem>
<listitem><para>CentOS release 5.7 (Final)</para></listitem>
<listitem><para>CentOS release 5.8 (Final)</para></listitem>
<listitem><para>CentOS release 6.3 (Final)</para></listitem>
<listitem><para>CentOS release 6.x</para></listitem> -->
<listitem><para>CentOS release 7.x</para></listitem>
<!-- <listitem><para>Debian GNU/Linux 6.0 (Squeeze)</para></listitem>
<!-- <listitem><para>Debian GNU/Linux 6.0 (Squeeze)</para></listitem>
<listitem><para>Debian GNU/Linux 7.x (Wheezy)</para></listitem> -->
<listitem><para>Debian GNU/Linux 8.x (Jessie)</para></listitem>
<listitem><para>Debian GNU/Linux 9.x (Stretch)</para></listitem>
<!-- <listitem><para>Debian GNU/Linux 7.1 (Wheezy)</para></listitem>
<!-- <listitem><para>Debian GNU/Linux 7.1 (Wheezy)</para></listitem>
<listitem><para>Debian GNU/Linux 7.2 (Wheezy)</para></listitem>
<listitem><para>Debian GNU/Linux 7.3 (Wheezy)</para></listitem>
<listitem><para>Debian GNU/Linux 7.4 (Wheezy)</para></listitem>
<listitem><para>Debian GNU/Linux 7.5 (Wheezy)</para></listitem>
<listitem><para>Debian GNU/Linux 7.6 (Wheezy)</para></listitem> -->
<!-- <listitem><para>openSUSE 11.4</para></listitem>
<listitem><para>Debian GNU/Linux 7.6 (Wheezy)</para></listitem>
<listitem><para>openSUSE 11.4</para></listitem>
<listitem><para>openSUSE 12.1</para></listitem>
<listitem><para>openSUSE 12.2</para></listitem>
<listitem><para>openSUSE 12.3</para></listitem>
<listitem><para>openSUSE 13.1</para></listitem> -->
<listitem><para>openSUSE 13.2</para></listitem>
<listitem><para>openSUSE 13.1</para></listitem>
<listitem><para>openSUSE 13.2</para></listitem> -->
<listitem><para>openSUSE 42.1</para></listitem>
<listitem><para>openSUSE 42.2</para></listitem>
</itemizedlist>
</para>

View File

@@ -886,7 +886,7 @@
Boots an image and performs runtime tests within the image
immediately after it has been built.
This task is enabled when you set
<link linkend='var-TEST_IMAGE'><filename>TEST_IMAGE</filename></link>
<link linkend='var-TESTIMAGE_AUTO'><filename>TESTIMAGE_AUTO</filename></link>
equal to "1".
</para>

View File

@@ -680,11 +680,18 @@
BB_ALLOWED_NETWORKS = "*.gnu.org"
</literallayout>
<note><title>Important</title>
The use of the "<filename>*</filename>"
<para>The use of the "<filename>*</filename>"
character only works at the beginning of
a host name.
a host name and it must be isolated from
the remainder of the host name.
You cannot use the wildcard character in any
other location of the name.
other location of the name or combined with
the front part of the name.</para>
<para>For example,
<filename>*.foo.bar</filename> is supported,
while <filename>*aa.foo.bar</filename> is not.
</para>
</note>
</para></listitem>
<listitem><para>
@@ -1152,7 +1159,7 @@
<para>
When specifying recipe files, you can pattern match using
Python's
<ulink url='https://docs.python.org/2/library/glob.html'><filename>glob</filename></ulink>
<ulink url='https://docs.python.org/3/library/glob.html'><filename>glob</filename></ulink>
syntax.
For details on the syntax, see the documentation by
following the previous link.
@@ -1296,7 +1303,7 @@
the files.
For complete syntax information, see Python's
documentation at
<ulink url='http://docs.python.org/release/2.3/lib/re-syntax.html'></ulink>.
<ulink url='http://docs.python.org/3/library/re.html#re'></ulink>.
</para>
<para>
@@ -4626,7 +4633,12 @@
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Additional <filename>cmake</filename> options.
Additional
<ulink url='https://cmake.org/overview/'>CMake</ulink>
options.
See the
<link linkend='ref-classes-cmake'><filename>cmake</filename></link>
class for additional information.
</para>
</glossdef>
</glossentry>
@@ -5221,6 +5233,28 @@
</glossdef>
</glossentry>
<glossentry id='var-GCCVERSION'><glossterm>GCCVERSION</glossterm>
<info>
GCCVERSION[doc] = "Specifies the default version of the GNU C Compiler (GCC) to use."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Specifies the default version of the GNU C Compiler (GCC)
used for compilation.
By default, <filename>GCCVERSION</filename> is set to
"8.x" in the
<filename>meta/conf/distro/include/tcmode-default.inc</filename>
include file:
<literallayout class='monospaced'>
GCCVERSION ?= "8.%"
</literallayout>
You can override this value by setting it in a configuration
file such as the <filename>local.conf</filename>.
</para>
</glossdef>
</glossentry>
<glossentry id='var-GDB'><glossterm>GDB</glossterm>
<info>
GDB[doc] = "The minimal command and arguments to run the GNU Debugger."
@@ -6995,6 +7029,61 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
<glossentry id='var-INITRAMFS_LINK_NAME'><glossterm>INITRAMFS_LINK_NAME</glossterm>
<info>
INITRAMFS_LINK_NAME[doc] = "The link name of the initial RAM filesystem image."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The link name of the initial RAM filesystem image.
This variable is set in the
<filename>meta/classes/kernel-artifact-names.bbclass</filename>
file as follows:
<literallayout class='monospaced'>
INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
</literallayout>
The value of the <filename>KERNEL_ARTIFACT_LINK_NAME</filename>
variable, which is set in the same file, has the following
value:
<literallayout class='monospaced'>
KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
</literallayout>
</para>
<para>
See the
<link linkend='var-MACHINE'><filename>MACHINE</filename></link>
variable for additional information.
</para>
</glossdef>
</glossentry>
<glossentry id='var-INITRAMFS_NAME'><glossterm>INITRAMFS_NAME</glossterm>
<info>
INITRAMFS_NAME[doc] = "The base name of the initial RAM filesystem image."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The base name of the initial RAM filesystem image.
This variable is set in the
<filename>meta/classes/kernel-artifact-names.bbclass</filename>
file as follows:
<literallayout class='monospaced'>
INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
</literallayout>
The value of the
<link linkend='var-KERNEL_ARTIFACT_NAME'><filename>KERNEL_ARTIFACT_NAME</filename></link>
variable, which is set in the same file, has the following
value:
<literallayout class='monospaced'>
KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
</literallayout>
</para>
</glossdef>
</glossentry>
<glossentry id='var-INITRD'><glossterm>INITRD</glossterm>
<info>
INITRD[doc] = "Indicates a list of filesystem images to concatenate and use as an initial RAM disk (initrd)."
@@ -7371,6 +7460,45 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
<glossentry id='var-KERNEL_ARTIFACT_NAME'><glossterm>KERNEL_ARTIFACT_NAME</glossterm>
<info>
KERNEL_ARTIFACT_NAME[doc] = "Specifies the name of all of the build artifacts."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Specifies the name of all of the build artifacts.
You can change the name of the artifacts by changing the
<filename>KERNEL_ARTIFACT_NAME</filename> variable.
</para>
<para>
The value of <filename>KERNEL_ARTIFACT_NAME</filename>,
which is set in the
<filename> meta/classes/kernel-artifact-names.bbclass</filename>
file, has the following default value:
<literallayout class='monospaced'>
KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
</literallayout>
</para>
<para>
See the
<link linkend='var-PKGE'><filename>PKGE</filename></link>,
<link linkend='var-PKGV'><filename>PKGV</filename></link>,
<link linkend='var-PKGR'><filename>PKGR</filename></link>,
and
<link linkend='var-MACHINE'><filename>MACHINE</filename></link>
variables for additional information.
<note>
The <filename>IMAGE_VERSION_SUFFIX</filename> variable
is set to
<link linkend='var-DATETIME'><filename>DATETIME</filename></link>.
</note>
</para>
</glossdef>
</glossentry>
<glossentry id='var-KERNEL_CLASSES'><glossterm>KERNEL_CLASSES</glossterm>
<info>
KERNEL_CLASSES[doc] = "A list of classes defining kernel image types that kernel class should inherit."
@@ -7420,6 +7548,61 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
<glossentry id='var-KERNEL_DTB_LINK_NAME'><glossterm>KERNEL_DTB_LINK_NAME</glossterm>
<info>
KERNEL_DTB_LINK_NAME[doc] = "The link name of the kernel device tree binary (DTB)."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The link name of the kernel device tree binary (DTB).
This variable is set in the
<filename>meta/classes/kernel-artifact-names.bbclass</filename>
file as follows:
<literallayout class='monospaced'>
KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
</literallayout>
The value of the <filename>KERNEL_ARTIFACT_LINK_NAME</filename>
variable, which is set in the same file, has the following
value:
<literallayout class='monospaced'>
KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
</literallayout>
</para>
<para>
See the
<link linkend='var-MACHINE'><filename>MACHINE</filename></link>
variable for additional information.
</para>
</glossdef>
</glossentry>
<glossentry id='var-KERNEL_DTB_NAME'><glossterm>KERNEL_DTB_NAME</glossterm>
<info>
KERNEL_DTB_NAME[doc] = "The base name of the kernel device tree binary (DTB)."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The base name of the kernel device tree binary (DTB).
This variable is set in the
<filename>meta/classes/kernel-artifact-names.bbclass</filename>
file as follows:
<literallayout class='monospaced'>
KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
</literallayout>
The value of the
<link linkend='var-KERNEL_ARTIFACT_NAME'><filename>KERNEL_ARTIFACT_NAME</filename></link>
variable, which is set in the same file, has the following
value:
<literallayout class='monospaced'>
KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
</literallayout>
</para>
</glossdef>
</glossentry>
<glossentry id='var-KERNEL_EXTRA_ARGS'><glossterm>KERNEL_EXTRA_ARGS</glossterm>
<info>
KERNEL_EXTRA_ARGS[doc] = "Specifies additional make command-line arguments the OpenEmbedded build system passes on when compiling the kernel."
@@ -7477,38 +7660,93 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<literallayout class='monospaced'>
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
</literallayout></para>
KERNEL_FEATURES_append_qemuall = " cfg/virtio.scc"
KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES_append_qemux86-64 = " cfg/sound.scc" </literallayout></para>
</glossdef>
</glossentry>
<glossentry id='var-KERNEL_IMAGE_BASE_NAME'><glossterm>KERNEL_IMAGE_BASE_NAME</glossterm>
<glossentry id='var-KERNEL_FIT_LINK_NAME'><glossterm>KERNEL_FIT_LINK_NAME</glossterm>
<info>
KERNEL_IMAGE_BASE_NAME[doc] = "The base name of the kernel image."
KERNEL_FIT_LINK_NAME[doc] = "The link name of the kernel flattened image tree (FIT) image."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The base name of the kernel image.
The link name of the kernel flattened image tree (FIT) image.
This variable is set in the
<link linkend='ref-classes-kernel'>kernel</link> class
as follows:
<filename>meta/classes/kernel-artifact-names.bbclass</filename>
file as follows:
<literallayout class='monospaced'>
KERNEL_IMAGE_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
</literallayout>
The value of the <filename>KERNEL_ARTIFACT_LINK_NAME</filename>
variable, which is set in the same file, has the following
value:
<literallayout class='monospaced'>
KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
</literallayout>
</para>
<para>
See the
<link linkend='var-PKGE'><filename>PKGE</filename></link>,
<link linkend='var-PKGV'><filename>PKGV</filename></link>,
<link linkend='var-PKGR'><filename>PKGR</filename></link>,
<link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
and
<link linkend='var-DATETIME'><filename>DATETIME</filename></link>
variables for additional information.
<link linkend='var-MACHINE'><filename>MACHINE</filename></link>
variable for additional information.
</para>
</glossdef>
</glossentry>
<glossentry id='var-KERNEL_FIT_NAME'><glossterm>KERNEL_FIT_NAME</glossterm>
<info>
KERNEL_FIT_NAME[doc] = "The base name of the kernel flattened image tree (FIT) image."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The base name of the kernel flattened image tree (FIT) image.
This variable is set in the
<filename>meta/classes/kernel-artifact-names.bbclass</filename>
file as follows:
<literallayout class='monospaced'>
KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
</literallayout>
The value of the
<link linkend='var-KERNEL_ARTIFACT_NAME'><filename>KERNEL_ARTIFACT_NAME</filename></link>
variable, which is set in the same file, has the following
value:
<literallayout class='monospaced'>
KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
</literallayout>
</para>
</glossdef>
</glossentry>
<glossentry id='var-KERNEL_IMAGE_LINK_NAME'><glossterm>KERNEL_IMAGE_LINK_NAME</glossterm>
<info>
KERNEL_IMAGE_LINK_NAME[doc] = "The link name for the kernel image."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The link name for the kernel image.
This variable is set in the
<filename>meta/classes/kernel-artifact-names.bbclass</filename>
file as follows:
<literallayout class='monospaced'>
KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
</literallayout>
The value of the <filename>KERNEL_ARTIFACT_LINK_NAME</filename>
variable, which is set in the same file, has the following
value:
<literallayout class='monospaced'>
KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
</literallayout>
</para>
<para>
See the
<link linkend='var-MACHINE'><filename>MACHINE</filename></link>
variable for additional information.
</para>
</glossdef>
</glossentry>
@@ -7544,6 +7782,31 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
<glossentry id='var-KERNEL_IMAGE_NAME'><glossterm>KERNEL_IMAGE_NAME</glossterm>
<info>
KERNEL_IMAGE_NAME[doc] = "The base name of the kernel image."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The base name of the kernel image.
This variable is set in the
<filename>meta/classes/kernel-artifact-names.bbclass</filename>
file as follows:
<literallayout class='monospaced'>
KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
</literallayout>
The value of the
<link linkend='var-KERNEL_ARTIFACT_NAME'><filename>KERNEL_ARTIFACT_NAME</filename></link>
variable, which is set in the same file, has the following
value:
<literallayout class='monospaced'>
KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
</literallayout>
</para>
</glossdef>
</glossentry>
<glossentry id='var-KERNEL_IMAGETYPE'><glossterm>KERNEL_IMAGETYPE</glossterm>
<info>
KERNEL_IMAGETYPE[doc] = "The type of kernel to build for a device, usually set by the machine configuration files and defaults to 'zImage'."
@@ -8957,35 +9220,6 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
<glossentry id='var-MODULE_IMAGE_BASE_NAME'><glossterm>MODULE_IMAGE_BASE_NAME</glossterm>
<info>
MODULE_IMAGE_BASE_NAME[doc] = "The base name of the kernel modules tarball."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The base name of the kernel modules tarball.
This variable is set in the
<link linkend='ref-classes-kernel'>kernel</link> class
as follows:
<literallayout class='monospaced'>
MODULE_IMAGE_BASE_NAME ?= "modules-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
</literallayout>
</para>
<para>
See the
<link linkend='var-PKGE'><filename>PKGE</filename></link>,
<link linkend='var-PKGV'><filename>PKGV</filename></link>,
<link linkend='var-PKGR'><filename>PKGR</filename></link>,
<link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
and
<link linkend='var-DATETIME'><filename>DATETIME</filename></link>
variables for additional information.
</para>
</glossdef>
</glossentry>
<glossentry id='var-MODULE_TARBALL_DEPLOY'><glossterm>MODULE_TARBALL_DEPLOY</glossterm>
<info>
MODULE_TARBALL_DEPLOY[doc] = "Controls creation of the modules-*.tgz file. Set this variable to "0" to disable creation of this file, which contains all of the kernel modules resulting from a kernel build."
@@ -9002,6 +9236,61 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
<glossentry id='var-MODULE_TARBALL_LINK_NAME'><glossterm>MODULE_TARBALL_LINK_NAME</glossterm>
<info>
MODULE_TARBALL_LINK_NAME[doc] = "The link name of the kernel module tarball."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The link name of the kernel module tarball.
This variable is set in the
<filename>meta/classes/kernel-artifact-names.bbclass</filename>
file as follows:
<literallayout class='monospaced'>
MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
</literallayout>
The value of the <filename>KERNEL_ARTIFACT_LINK_NAME</filename>
variable, which is set in the same file, has the following
value:
<literallayout class='monospaced'>
KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
</literallayout>
</para>
<para>
See the
<link linkend='var-MACHINE'><filename>MACHINE</filename></link>
variable for additional information.
</para>
</glossdef>
</glossentry>
<glossentry id='var-MODULE_TARBALL_NAME'><glossterm>MODULE_TARBALL_NAME</glossterm>
<info>
MODULE_TARBALL_NAME[doc] = "The base name of the kernel module tarball."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
The base name of the kernel module tarball.
This variable is set in the
<filename>meta/classes/kernel-artifact-names.bbclass</filename>
file as follows:
<literallayout class='monospaced'>
MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
</literallayout>
The value of the
<link linkend='var-KERNEL_ARTIFACT_NAME'><filename>KERNEL_ARTIFACT_NAME</filename></link>
variable, which is set in the same file, has the following
value:
<literallayout class='monospaced'>
KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
</literallayout>
</para>
</glossdef>
</glossentry>
<!--
<glossentry id='var-MULTIMACH_HOST_SYS'><glossterm>MULTIMACH_HOST_SYS</glossterm>
<info>
@@ -9230,44 +9519,6 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</para>
</glossdef>
</glossentry>
<glossentry id='var-NOHDD'><glossterm>NOHDD</glossterm>
<info>
NOHDD[doc] = "Causes the OpenEmbedded build system to skip building the .hddimg image."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Causes the OpenEmbedded build system to skip building the
<filename>.hddimg</filename> image.
The <filename>NOHDD</filename> variable is used with the
<link linkend='ref-classes-image-live'><filename>image-live</filename></link>
class.
Set the variable to "1" to prevent the
<filename>.hddimg</filename> image from being built.
</para>
</glossdef>
</glossentry>
<glossentry id='var-NOISO'><glossterm>NOISO</glossterm>
<info>
NOISO[doc] = "Causes the OpenEmbedded build system to skip building the ISO image."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Causes the OpenEmbedded build system to skip building the
ISO image.
The <filename>NOISO</filename> variable is used with the
<link linkend='ref-classes-image-live'><filename>image-live</filename></link>
class.
Set the variable to "1" to prevent the ISO image from
being built.
To enable building an ISO image, set the variable to "0".
</para>
</glossdef>
</glossentry>
</glossdiv>
<glossdiv id='var-glossary-o'><title>O</title>
@@ -10086,9 +10337,9 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
Here is the basic block structure:
<literallayout class='monospaced'>
PACKAGECONFIG ??= "f1 f2 f3 ..."
PACKAGECONFIG[f1] = "--with-f1,--without-f1,build-deps-f1,rt-deps-f1"
PACKAGECONFIG[f2] = "--with-f2,--without-f2,build-deps-f2,rt-deps-f2"
PACKAGECONFIG[f3] = "--with-f3,--without-f3,build-deps-f3,rt-deps-f3"
PACKAGECONFIG[f1] = "--with-f1,--without-f1,build-deps-f1,rt-deps-f1,rt-recs-f1"
PACKAGECONFIG[f2] = "--with-f2,--without-f2,build-deps-f2,rt-deps-f2,rt-recs-f2"
PACKAGECONFIG[f3] = "--with-f3,--without-f3,build-deps-f3,rt-deps-f3,rt-recs-f3"
</literallayout>
</para>
@@ -10097,7 +10348,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
variable itself specifies a space-separated list of the
features to enable.
Following the features, you can determine the behavior of
each feature by providing up to four order-dependent
each feature by providing up to five order-dependent
arguments, which are separated by commas.
You can omit any argument you like but must retain the
separating commas.
@@ -10123,6 +10374,10 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
(<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
that should be added if the feature is enabled.
</para></listitem>
<listitem><para>Additional runtime recommendations
(<link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>)
that should be added if the feature is enabled.
</para></listitem>
</orderedlist>
</para>
@@ -10171,7 +10426,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<filename>PACKAGECONFIG</filename>.
You can either completely override the variable:
<literallayout class='monospaced'>
PACKAGECONFIG="f4 f5"
PACKAGECONFIG = "f4 f5"
</literallayout>
Or, you can just append the variable:
<literallayout class='monospaced'>
@@ -10185,7 +10440,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
As with append files previously described,
you can either completely override the variable:
<literallayout class='monospaced'>
PACKAGECONFIG_pn-<replaceable>recipename</replaceable>="f4 f5"
PACKAGECONFIG_pn-<replaceable>recipename</replaceable> = "f4 f5"
</literallayout>
Or, you can just amend the variable:
<literallayout class='monospaced'>
@@ -13657,7 +13912,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
and <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
and points to the cache locations to check for the shared
objects.
state (sstate) objects.
</para>
<para>
@@ -13669,6 +13924,25 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
other machines.
</para>
<para>
When pointing to sstate build artifacts on another machine
that uses a different GCC version for native builds,
you must configure <filename>SSTATE_MIRROR</filename>
with a regular expression that maps local search paths
to server paths.
The paths need to take into account
<link linkend='var-NATIVELSBSTRING'><filename>NATIVELSBSTRING</filename></link>
set by the
<link linkend='ref-classes-uninative'><filename>uninative</filename></link>
class.
For example, the following maps the local search path
<filename>universal-4.9</filename> to the server-provided
path <replaceable>server_url_sstate_path</replaceable>:
<literallayout class='monospaced'>
SSTATE_MIRRORS ?= file://universal-4.9/(.*) http://<replaceable>server_url_sstate_path</replaceable>/universal-4.8/\1 \n
</literallayout>
</para>
<para>
If a mirror uses the same structure as
<link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>,
@@ -15169,41 +15443,6 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
<glossentry id='var-TEST_IMAGE'><glossterm>TEST_IMAGE</glossterm>
<info>
TEST_IMAGE[doc] = "Enables test booting of virtual machine images under the QEMU emulator after any root filesystems are created and runs tests against those images."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Automatically runs the series of automated tests for
images when an image is successfully built.
</para>
<para>
These tests are written in Python making use of the
<filename>unittest</filename> module, and the majority of
them run commands on the target system over
<filename>ssh</filename>.
You can set this variable to "1" in your
<filename>local.conf</filename> file in the
<link linkend='build-directory'>Build Directory</link>
to have the OpenEmbedded build system automatically run
these tests after an image successfully builds:
<literallayout class='monospaced'>
TEST_IMAGE = "1"
</literallayout>
For more information on enabling, running, and writing
these tests, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
section in the Yocto Project Development Tasks Manual and
the
"<link linkend='ref-classes-testimage*'><filename>testimage*.bbclass</filename></link>"
section.
</para>
</glossdef>
</glossentry>
<glossentry id='var-TEST_LOG_DIR'><glossterm>TEST_LOG_DIR</glossterm>
<info>
TEST_LOG_DIR[doc] = "Holds the SSH log and the boot log for QEMU machines. The TEST_LOG_DIR variable defaults to "${WORKDIR}/testimage"."
@@ -15504,6 +15743,47 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
<glossentry id='var-TESTIMAGE_AUTO'><glossterm>TESTIMAGE_AUTO</glossterm>
<info>
TESTIMAGE_AUTO[doc] = "Enables automatic testing of an image once it is built."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Automatically runs the series of automated tests for
images when an image is successfully built.
Setting <filename>TESTIMAGE_AUTO</filename> to "1"
causes any image that successfully builds to automatically
boot under QEMU.
Using the variable also adds in dependencies so that any
SDK for which testing is requested is automatically built
first.
</para>
<para>
These tests are written in Python making use of the
<filename>unittest</filename> module, and the majority of
them run commands on the target system over
<filename>ssh</filename>.
You can set this variable to "1" in your
<filename>local.conf</filename> file in the
<link linkend='build-directory'>Build Directory</link>
to have the OpenEmbedded build system automatically run
these tests after an image successfully builds:
<literallayout class='monospaced'>
TESTIMAGE_AUTO = "1"
</literallayout>
For more information on enabling, running, and writing
these tests, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
section in the Yocto Project Development Tasks Manual and
the
"<link linkend='ref-classes-testimage*'><filename>testimage*.bbclass</filename></link>"
section.
</para>
</glossdef>
</glossentry>
<glossentry id='var-THISDIR'><glossterm>THISDIR</glossterm>
<info>
THISDIR[doc] = "The directory in which the file BitBake is currently parsing is located."

View File

@@ -58,9 +58,14 @@
</revision>
<revision>
<revnumber>2.6</revnumber>
<date>&REL_MONTH_YEAR;</date>
<date>November 2018</date>
<revremark>Released with the Yocto Project 2.6 Release.</revremark>
</revision>
<revision>
<revnumber>2.7</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -68,9 +68,14 @@
</revision>
<revision>
<revnumber>2.6</revnumber>
<date>&REL_MONTH_YEAR;</date>
<date>November 2018</date>
<revremark>Released with the Yocto Project 2.6 Release.</revremark>
</revision>
<revision>
<revnumber>2.7</revnumber>
<date>&REL_MONTH_YEAR;</date>
<revremark>Released with the Yocto Project 2.7 Release.</revremark>
</revision>
</revhistory>
<copyright>

View File

@@ -2,39 +2,39 @@
# This style is for manual folders like "yocto-project-qs" and "poky-ref-manual".
# This is the old way that did it. Can't do that now that we have "bitbake-user-manual" strings
# in the mega-manual.
# s@"ulink" href="http://www.yoctoproject.org/docs/2.6/[a-z]*-[a-z]*-[a-z]*/[a-z]*-[a-z]*-[a-z]*.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.6/yocto-project-qs/yocto-project-qs.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.6/poky-ref-manual/poky-ref-manual.html#@"link" href="#@g
# s@"ulink" href="http://www.yoctoproject.org/docs/2.7/[a-z]*-[a-z]*-[a-z]*/[a-z]*-[a-z]*-[a-z]*.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.7/yocto-project-qs/yocto-project-qs.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.7/poky-ref-manual/poky-ref-manual.html#@"link" href="#@g
# Processes all other manuals (<word>-<word> style) except for the BitBake User Manual because
# it is not included in the mega-manual.
# This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual").
# This was the one-liner that worked before we introduced the BitBake User Manual, which is
# not in the mega-manual.
# s@"ulink" href="http://www.yoctoproject.org/docs/2.6/[a-z]*-[a-z]*/[a-z]*-[a-z]*.html#@"link" href="#@g
# s@"ulink" href="http://www.yoctoproject.org/docs/2.7/[a-z]*-[a-z]*/[a-z]*-[a-z]*.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.6/sdk-manual/sdk-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.6/bsp-guide/bsp-guide.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.6/dev-manual/dev-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.6/overview-manual/overview-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.6/brief-yoctoprojectqs/brief-yoctoprojectqs.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.6/kernel-dev/kernel-dev.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.6/profile-manual/profile-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.6/ref-manual/ref-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.6/toaster-manual/toaster-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.7/sdk-manual/sdk-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.7/bsp-guide/bsp-guide.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.7/dev-manual/dev-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.7/overview-manual/overview-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.7/brief-yoctoprojectqs/brief-yoctoprojectqs.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.7/kernel-dev/kernel-dev.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.7/profile-manual/profile-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.7/ref-manual/ref-manual.html#@"link" href="#@g
s@"ulink" href="http://www.yoctoproject.org/docs/2.7/toaster-manual/toaster-manual.html#@"link" href="#@g
# Process cases where just an external manual is referenced without an id anchor
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.6/brief-yoctoprojectqs/brief-yoctoprojectqs.html" target="_top">Yocto Project Quick Build</a>@Yocto Project Quick Build@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.6/yocto-project-qs/yocto-project-qs.html" target="_top">Yocto Project Quick Start</a>@Yocto Project Quick Start@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.6/dev-manual/dev-manual.html" target="_top">Yocto Project Development Tasks Manual</a>@Yocto Project Development Tasks Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.6/overview-manual/overview-manual.html" target="_top">Yocto Project Overview and Concepts Manual</a>@Yocto project Overview and Concepts Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.6/sdk-manual/sdk-manual.html" target="_top">Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</a>@Yocto Project Application Development and the Extensible Software Development Kit (eSDK)@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.6/bsp-guide/bsp-guide.html" target="_top">Yocto Project Board Support Package (BSP) Developer's Guide</a>@Yocto Project Board Support Package (BSP) Developer's Guide@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.6/profile-manual/profile-manual.html" target="_top">Yocto Project Profiling and Tracing Manual</a>@Yocto Project Profiling and Tracing Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.6/kernel-dev/kernel-dev.html" target="_top">Yocto Project Linux Kernel Development Manual</a>@Yocto Project Linux Kernel Development Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.6/ref-manual/ref-manual.html" target="_top">Yocto Project Reference Manual</a>@Yocto Project Reference Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.6/toaster-manual/toaster-manual.html" target="_top">Toaster User Manual</a>@Toaster User Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.7/brief-yoctoprojectqs/brief-yoctoprojectqs.html" target="_top">Yocto Project Quick Build</a>@Yocto Project Quick Build@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.7/yocto-project-qs/yocto-project-qs.html" target="_top">Yocto Project Quick Start</a>@Yocto Project Quick Start@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.7/dev-manual/dev-manual.html" target="_top">Yocto Project Development Tasks Manual</a>@Yocto Project Development Tasks Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.7/overview-manual/overview-manual.html" target="_top">Yocto Project Overview and Concepts Manual</a>@Yocto project Overview and Concepts Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.7/sdk-manual/sdk-manual.html" target="_top">Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</a>@Yocto Project Application Development and the Extensible Software Development Kit (eSDK)@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.7/bsp-guide/bsp-guide.html" target="_top">Yocto Project Board Support Package (BSP) Developer's Guide</a>@Yocto Project Board Support Package (BSP) Developer's Guide@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.7/profile-manual/profile-manual.html" target="_top">Yocto Project Profiling and Tracing Manual</a>@Yocto Project Profiling and Tracing Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.7/kernel-dev/kernel-dev.html" target="_top">Yocto Project Linux Kernel Development Manual</a>@Yocto Project Linux Kernel Development Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.7/ref-manual/ref-manual.html" target="_top">Yocto Project Reference Manual</a>@Yocto Project Reference Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.7/toaster-manual/toaster-manual.html" target="_top">Toaster User Manual</a>@Toaster User Manual@g
# Process a single, rouge occurrence of a linked reference to the Mega-Manual.
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.6/mega-manual/mega-manual.html" target="_top">Yocto Project Mega-Manual</a>@Yocto Project Mega-Manual@g
s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.7/mega-manual/mega-manual.html" target="_top">Yocto Project Mega-Manual</a>@Yocto Project Mega-Manual@g

View File

@@ -1,6 +1,6 @@
DISTRO = "poky"
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
DISTRO_VERSION = "2.5+snapshot-${DATE}"
DISTRO_VERSION = "2.6+snapshot-${DATE}"
DISTRO_CODENAME = "master"
SDK_VENDOR = "-pokysdk"
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
@@ -23,7 +23,7 @@ DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DE
PREFERRED_VERSION_linux-yocto ?= "4.18%"
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}"
SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}"
DISTRO_EXTRA_RDEPENDS += " ${POKY_DEFAULT_EXTRA_RDEPENDS}"
@@ -64,18 +64,15 @@ https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"
CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/"
SANITY_TESTED_DISTROS ?= " \
poky-2.4 \n \
poky-2.5 \n \
ubuntu-15.04 \n \
poky-2.6 \n \
ubuntu-16.04 \n \
ubuntu-16.10 \n \
ubuntu-17.04 \n \
fedora-26 \n \
ubuntu-18.04 \n \
fedora-28 \n \
centos-7 \n \
debian-8 \n \
debian-9 \n \
opensuse-42.1 \n \
opensuse-42.2 \n \
opensuse-42.3 \n \
"
#
# OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in

View File

@@ -157,10 +157,12 @@ USER_CLASSES ?= "buildstats image-mklibs image-prelink"
# Runtime testing of images
#
# The build system can test booting virtual machine images under qemu (an emulator)
# after any root filesystems are created and run tests against those images. To
# enable this uncomment this line. See classes/testimage(-auto).bbclass for
# further details.
#TEST_IMAGE = "1"
# after any root filesystems are created and run tests against those images. It can also
# run tests against any SDK that are built. To enable this uncomment these lines.
# See classes/test{image,sdk}.bbclass for further details.
#IMAGE_CLASSES += "testimage testsdk"
#TESTIMAGE_AUTO_qemuall = "1"
#
# Interactive shell configuration
#

View File

@@ -0,0 +1,16 @@
SUMMARY = "Python framework to process interdependent tasks in a pool of workers"
HOMEPAGE = "http://github.com/gitpython-developers/async"
SECTION = "devel/python"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
inherit pypi
PYPI_PACKAGE = "async"
SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
RDEPENDS_${PN} += "${PYTHON_PN}-threading"
BBCLASSEXTEND = "nativesdk"

View File

@@ -0,0 +1,2 @@
inherit setuptools3
require python-async-test.inc

View File

@@ -0,0 +1,12 @@
SUMMARY = "Recipe with a fixed delay task"
DESCRIPTION = "Contains a delay task to be used to for testing."
LICENSE = "MIT"
INHIBIT_DEFAULT_DEPS = "1"
EXCLUDE_FROM_WORLD = "1"
do_delay() {
sleep 5
}
do_delay[nostamp] = "1"
addtask delay

View File

@@ -2,7 +2,7 @@ SUMMARY = "Error Test case that fails on do_compile"
DESCRIPTION = "This generates a compile time error to be used to for testing."
LICENSE = "MIT"
INHIBIT_DEFAULT_DEPS = "1"
INHIBIT_DEFAULT_DEPS = "1"
EXCLUDE_FROM_WORLD = "1"
do_compile() {

View File

@@ -0,0 +1,5 @@
SRC_URI = "http://xorg.freedesktop.org/releases/individual/lib/libxshmfence-${PV}.tar.bz2"
SRC_URI[md5sum] = "66662e76899112c0f99e22f2fc775a7e"
SRC_URI[sha256sum] = "d21b2d1fd78c1efbe1f2c16dae1cb23f8fd231dcf891465b8debe636a9054b0c"

View File

@@ -0,0 +1,13 @@
SUMMARY = "Test recipe for recipeutils.patch_recipe()"
require recipeutils-test.inc
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://${WORKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e"
DEPENDS += "virtual/libx11"
BBCLASSEXTEND = "native nativesdk"
SRC_URI += "file://somefile"
SRC_URI_append = " file://anotherfile"

View File

@@ -20,7 +20,8 @@ WKS_FILE ?= "beaglebone-yocto.wks"
IMAGE_INSTALL_append = " kernel-devicetree kernel-image-zimage"
do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"
SERIAL_CONSOLES = "115200;ttyO0"
SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0"
SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "4.18%"

View File

@@ -23,9 +23,6 @@
# COPYLEFT_RECIPE_TYPES = 'target'
#
# Don't filter the license by default
COPYLEFT_LICENSE_INCLUDE ?= ''
COPYLEFT_LICENSE_EXCLUDE ?= ''
# Create archive for all the recipe types
COPYLEFT_RECIPE_TYPES ?= 'target native nativesdk cross crosssdk cross-canadian'
inherit copyleft_filter
@@ -275,6 +272,14 @@ python do_ar_configured() {
create_tarball(d, srcdir, 'configured', ar_outdir)
}
def exclude_useless_paths(tarinfo):
if tarinfo.isdir():
if tarinfo.name.endswith('/temp') or tarinfo.name.endswith('/patches') or tarinfo.name.endswith('/.pc'):
return None
elif tarinfo.name == 'temp' or tarinfo.name == 'patches' or tarinfo.name == '.pc':
return None
return tarinfo
def create_tarball(d, srcdir, suffix, ar_outdir):
"""
create the tarball from srcdir
@@ -299,7 +304,7 @@ def create_tarball(d, srcdir, suffix, ar_outdir):
bb.note('Creating %s' % tarname)
tar = tarfile.open(tarname, 'w:gz')
tar.add(srcdir, arcname=os.path.basename(srcdir))
tar.add(srcdir, arcname=os.path.basename(srcdir), filter=exclude_useless_paths)
tar.close()
# creating .diff.gz between source.orig and source

View File

@@ -122,12 +122,22 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True):
desttool = os.path.join(dest, tool)
if not os.path.exists(desttool):
srctool = bb.utils.which(path, tool, executable=True)
# gcc/g++ may link to ccache on some hosts, e.g.,
# /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc)
# would return /usr/local/bin/ccache/gcc, but what we need is
# /usr/bin/gcc, this code can check and fix that.
if "ccache" in srctool:
srctool = bb.utils.which(path, tool, executable=True, direction=1)
if srctool:
os.symlink(srctool, desttool)
else:
notfound.append(tool)
# Force "python" -> "python2"
desttool = os.path.join(dest, "python")
if not os.path.exists(desttool):
srctool = "python2"
os.symlink(srctool, desttool)
if notfound and fatal:
bb.fatal("The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n %s" % " ".join(notfound))
@@ -303,7 +313,9 @@ base_do_configure() {
if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then
oe_runmake clean
fi
find ${B} -ignore_readdir_race -name \*.la -delete
# -ignore_readdir_race does not work correctly with -delete;
# use xargs to avoid spurious build failures
find ${B} -ignore_readdir_race -name \*.la -type f -print0 | xargs -0 rm -f
fi
fi
if [ -n "${CONFIGURESTAMPFILE}" ]; then
@@ -459,12 +471,15 @@ python () {
if bb.data.inherits_class('license', d):
check_license_format(d)
unmatched_license_flag = check_license_flags(d)
if unmatched_license_flag:
bb.debug(1, "Skipping %s because it has a restricted license not"
" whitelisted in LICENSE_FLAGS_WHITELIST" % pn)
raise bb.parse.SkipRecipe("because it has a restricted license not"
" whitelisted in LICENSE_FLAGS_WHITELIST")
unmatched_license_flags = check_license_flags(d)
if unmatched_license_flags:
if len(unmatched_license_flags) == 1:
message = "because it has a restricted license '{0}'. Which is not whitelisted in LICENSE_FLAGS_WHITELIST".format(unmatched_license_flags[0])
else:
message = "because it has restricted licenses {0}. Which are not whitelisted in LICENSE_FLAGS_WHITELIST".format(
", ".join("'{0}'".format(f) for f in unmatched_license_flags))
bb.debug(1, "Skipping %s %s" % (pn, message))
raise bb.parse.SkipRecipe(message)
# If we're building a target package we need to use fakeroot (pseudo)
# in order to capture permissions, owners, groups and special files

View File

@@ -31,7 +31,7 @@ BINCONFIG_GLOB ?= "*-config"
PACKAGE_PREPROCESS_FUNCS += "binconfig_package_preprocess"
binconfig_package_preprocess () {
for config in `find ${PKGD} -name '${BINCONFIG_GLOB}'`; do
for config in `find ${PKGD} -type f -name '${BINCONFIG_GLOB}'`; do
sed -i \
-e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \
-e 's:${STAGING_LIBDIR}:${libdir}:g;' \
@@ -40,7 +40,7 @@ binconfig_package_preprocess () {
-e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' \
$config
done
for lafile in `find ${PKGD} -name "*.la"` ; do
for lafile in `find ${PKGD} -type f -name "*.la"` ; do
sed -i \
-e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \
-e 's:${STAGING_LIBDIR}:${libdir}:g;' \
@@ -54,7 +54,7 @@ binconfig_package_preprocess () {
SYSROOT_PREPROCESS_FUNCS += "binconfig_sysroot_preprocess"
binconfig_sysroot_preprocess () {
for config in `find ${S} -name '${BINCONFIG_GLOB}'` `find ${B} -name '${BINCONFIG_GLOB}'`; do
for config in `find ${S} -type f -name '${BINCONFIG_GLOB}'` `find ${B} -type f -name '${BINCONFIG_GLOB}'`; do
configname=`basename $config`
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
sed ${@get_binconfig_mangle(d)} $config > ${SYSROOT_DESTDIR}${bindir_crossscripts}/$configname

View File

@@ -1,187 +0,0 @@
#
# Small event handler to automatically open URLs and file
# bug reports at a bugzilla of your choiche
# it uses XML-RPC interface, so you must have it enabled
#
# Before using you must define BUGZILLA_USER, BUGZILLA_PASS credentials,
# BUGZILLA_XMLRPC - uri of xmlrpc.cgi,
# BUGZILLA_PRODUCT, BUGZILLA_COMPONENT - a place in BTS for build bugs
# BUGZILLA_VERSION - version against which to report new bugs
#
def bugzilla_find_bug_report(debug_file, server, args, bugname):
args['summary'] = bugname
bugs = server.Bug.search(args)
if len(bugs['bugs']) == 0:
print >> debug_file, "Bugs not found"
return (False,None)
else: # silently pick the first result
print >> debug_file, "Result of bug search is "
print >> debug_file, bugs
status = bugs['bugs'][0]['status']
id = bugs['bugs'][0]['id']
return (not status in ["CLOSED", "RESOLVED", "VERIFIED"],id)
def bugzilla_file_bug(debug_file, server, args, name, text, version):
args['summary'] = name
args['comment'] = text
args['version'] = version
args['op_sys'] = 'Linux'
args['platform'] = 'Other'
args['severity'] = 'normal'
args['priority'] = 'Normal'
try:
return server.Bug.create(args)['id']
except Exception, e:
print >> debug_file, repr(e)
return None
def bugzilla_reopen_bug(debug_file, server, args, bug_number):
args['ids'] = [bug_number]
args['status'] = "CONFIRMED"
try:
server.Bug.update(args)
return True
except Exception, e:
print >> debug_file, repr(e)
return False
def bugzilla_create_attachment(debug_file, server, args, bug_number, text, file_name, log, logdescription):
args['ids'] = [bug_number]
args['file_name'] = file_name
args['summary'] = logdescription
args['content_type'] = "text/plain"
args['data'] = log
args['comment'] = text
try:
server.Bug.add_attachment(args)
return True
except Exception, e:
print >> debug_file, repr(e)
return False
def bugzilla_add_comment(debug_file, server, args, bug_number, text):
args['id'] = bug_number
args['comment'] = text
try:
server.Bug.add_comment(args)
return True
except Exception, e:
print >> debug_file, repr(e)
return False
addhandler bugzilla_eventhandler
bugzilla_eventhandler[eventmask] = "bb.event.MsgNote bb.build.TaskFailed"
python bugzilla_eventhandler() {
import glob
import xmlrpclib, httplib
class ProxiedTransport(xmlrpclib.Transport):
def __init__(self, proxy, use_datetime = 0):
xmlrpclib.Transport.__init__(self, use_datetime)
self.proxy = proxy
self.user = None
self.password = None
def set_user(self, user):
self.user = user
def set_password(self, password):
self.password = password
def make_connection(self, host):
self.realhost = host
return httplib.HTTP(self.proxy)
def send_request(self, connection, handler, request_body):
connection.putrequest("POST", 'http://%s%s' % (self.realhost, handler))
if self.user != None:
if self.password != None:
auth = "%s:%s" % (self.user, self.password)
else:
auth = self.user
connection.putheader("Proxy-authorization", "Basic " + base64.encodestring(auth))
event = e
data = e.data
name = bb.event.getName(event)
if name == "MsgNote":
# avoid recursion
return
if name == "TaskFailed":
xmlrpc = data.getVar("BUGZILLA_XMLRPC")
user = data.getVar("BUGZILLA_USER")
passw = data.getVar("BUGZILLA_PASS")
product = data.getVar("BUGZILLA_PRODUCT")
compon = data.getVar("BUGZILLA_COMPONENT")
version = data.getVar("BUGZILLA_VERSION")
proxy = data.getVar('http_proxy')
if (proxy):
import urllib2
s, u, p, hostport = urllib2._parse_proxy(proxy)
transport = ProxiedTransport(hostport)
else:
transport = None
server = xmlrpclib.ServerProxy(xmlrpc, transport=transport, verbose=0)
args = {
'Bugzilla_login': user,
'Bugzilla_password': passw,
'product': product,
'component': compon}
# evil hack to figure out what is going on
debug_file = open(os.path.join(data.getVar("TMPDIR"),"..","bugzilla-log"),"a")
file = None
bugname = "%(package)s-%(pv)s-autobuild" % { "package" : data.getVar("PN"),
"pv" : data.getVar("PV"),
}
log_file = glob.glob("%s/log.%s.*" % (event.data.getVar('T'), event.task))
text = "The %s step in %s failed at %s for machine %s" % (e.task, data.getVar("PN"), data.getVar('DATETIME'), data.getVar('MACHINE') )
if len(log_file) != 0:
print >> debug_file, "Adding log file %s" % log_file[0]
file = open(log_file[0], 'r')
log = file.read()
file.close();
else:
print >> debug_file, "No log file found for the glob"
log = None
(bug_open, bug_number) = bugzilla_find_bug_report(debug_file, server, args.copy(), bugname)
print >> debug_file, "Bug is open: %s and bug number: %s" % (bug_open, bug_number)
# The bug is present and still open, attach an error log
if not bug_number:
bug_number = bugzilla_file_bug(debug_file, server, args.copy(), bugname, text, version)
if not bug_number:
print >> debug_file, "Couldn't acquire a new bug_numer, filing a bugreport failed"
else:
print >> debug_file, "The new bug_number: '%s'" % bug_number
elif not bug_open:
if not bugzilla_reopen_bug(debug_file, server, args.copy(), bug_number):
print >> debug_file, "Failed to reopen the bug #%s" % bug_number
else:
print >> debug_file, "Reopened the bug #%s" % bug_number
if bug_number and log:
print >> debug_file, "The bug is known as '%s'" % bug_number
desc = "Build log for machine %s" % (data.getVar('MACHINE'))
if not bugzilla_create_attachment(debug_file, server, args.copy(), bug_number, text, log_file[0], log, desc):
print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number
else:
print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, compon, bug_number)
else:
print >> debug_file, "Not trying to create an attachment for bug #%s" % bug_number
if not bugzilla_add_comment(debug_file, server, args.copy(), bug_number, text, ):
print >> debug_file, "Failed to create a comment the build log for bug #%s" % bug_number
else:
print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, compon, bug_number)
# store bug number for oestats-client
if bug_number:
data.setVar('OESTATS_BUG_NUMBER', bug_number)
}

View File

@@ -1,11 +1,11 @@
def get_minor_dir(v):
import re
m = re.match("^([0-9]+)\.([0-9]+)", v)
m = re.match(r"^([0-9]+)\.([0-9]+)", v)
return "%s.%s" % (m.group(1), m.group(2))
def get_real_name(n):
import re
m = re.match("^([a-z]+(-[a-z]+)?)(-[0-9]+\.[0-9]+)?", n)
m = re.match(r"^([a-z]+(-[a-z]+)?)(-[0-9]+\.[0-9]+)?", n)
return "%s" % (m.group(1))
VERMINOR = "${@get_minor_dir("${PV}")}"

View File

@@ -20,7 +20,7 @@ python() {
elif generator == "Ninja":
d.appendVar("DEPENDS", " ninja-native")
d.setVar("OECMAKE_GENERATOR_ARGS", "-G Ninja -DCMAKE_MAKE_PROGRAM=ninja")
d.setVarFlag("do_compile", "progress", "outof:^\[(\d+)/(\d+)\]\s+")
d.setVarFlag("do_compile", "progress", r"outof:^\[(\d+)/(\d+)\]\s+")
else:
bb.fatal("Unknown CMake Generator %s" % generator)
}
@@ -108,6 +108,10 @@ list(APPEND CMAKE_MODULE_PATH "${STAGING_DATADIR}/cmake/Modules/")
# add for non /usr/lib libdir, e.g. /usr/lib64
set( CMAKE_LIBRARY_PATH ${libdir} ${base_libdir})
# add include dir to implicit includes in case it differs from /usr/include
list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES ${includedir})
list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${includedir})
EOF
}

View File

@@ -16,7 +16,7 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version
export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${@get_perl_version(d)}/"
cpan_do_configure () {
yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 ${EXTRA_CPANFLAGS}
yes '' | perl ${EXTRA_PERLFLAGS} Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 PERL=$(which perl) ${EXTRA_CPANFLAGS}
# Makefile.PLs can exit with success without generating a
# Makefile, e.g. in cases of missing configure time

View File

@@ -4,8 +4,8 @@ CLASSOVERRIDE = "class-crosssdk"
MACHINEOVERRIDES = ""
PACKAGE_ARCH = "${SDK_ARCH}"
python () {
# set TUNE_PKGARCH to SDK_ARCH
d.setVar('TUNE_PKGARCH', d.getVar('SDK_ARCH'))
# set TUNE_PKGARCH to SDK_ARCH
d.setVar('TUNE_PKGARCH', d.getVar('SDK_ARCH'))
}
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
@@ -21,10 +21,10 @@ TARGET_PREFIX = "${SDK_PREFIX}"
TARGET_CC_ARCH = "${SDK_CC_ARCH}"
TARGET_LD_ARCH = "${SDK_LD_ARCH}"
TARGET_AS_ARCH = "${SDK_AS_ARCH}"
TARGET_CPPFLAGS = "${BUILD_CPPFLAGS}"
TARGET_CFLAGS = "${BUILD_CFLAGS}"
TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
TARGET_CPPFLAGS = ""
TARGET_CFLAGS = ""
TARGET_CXXFLAGS = ""
TARGET_LDFLAGS = ""
TARGET_FPU = ""

View File

@@ -190,7 +190,8 @@ def check_cves(d, patched_cves):
# Write the faux CSV file to be used with cve-check-tool
fd, faux = tempfile.mkstemp(prefix="cve-faux-")
with os.fdopen(fd, "w") as f:
f.write("%s,%s,%s," % (bpn, pv, cves))
for pn in bpn.split():
f.write("%s,%s,%s,\n" % (pn, pv, cves))
cmd.append(faux)
output = subprocess.check_output(cmd).decode("utf-8")

View File

@@ -8,7 +8,7 @@ GOROOT = "${STAGING_LIBDIR}/go"
export GOROOT
export GOROOT_FINAL = "${libdir}/go"
DEPENDS_GOLANG_class-target = "virtual/${TARGET_PREFIX}go virtual/${TARGET_PREFIX}go-runtime"
DEPENDS_GOLANG_class-target = "virtual/${TUNE_PKGARCH}-go virtual/${TARGET_PREFIX}go-runtime"
DEPENDS_GOLANG_class-native = "go-native"
DEPENDS_GOLANG_class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk virtual/${TARGET_PREFIX}go-runtime"

View File

@@ -25,7 +25,7 @@ DEPENDS_append_class-native = " gobject-introspection-native"
DEPENDS_append_class-nativesdk = " gobject-introspection-native"
# This is used by introspection tools to find .gir includes
export XDG_DATA_DIRS = "${STAGING_DATADIR}"
export XDG_DATA_DIRS = "${STAGING_DATADIR}:${STAGING_LIBDIR}"
do_configure_prepend_class-target () {
# introspection.m4 pre-packaged with upstream tarballs does not yet

View File

@@ -33,7 +33,7 @@ BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_
ICECC_CARET_WORKAROUND ICECC_CFLAGS ICECC_ENV_VERSION \
ICECC_DEBUG ICECC_LOGFILE ICECC_REPEAT_RATE ICECC_PREFERRED_HOST \
ICECC_CLANG_REMOTE_CPP ICECC_IGNORE_UNVERIFIED ICECC_TEST_SOCKET \
ICECC_ENV_DEBUG \
ICECC_ENV_DEBUG ICECC_SYSTEM_PACKAGE_BL ICECC_SYSTEM_CLASS_BL \
"
ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
@@ -61,6 +61,31 @@ CXXFLAGS += "${ICECC_CFLAGS}"
# Debug flags when generating environments
ICECC_ENV_DEBUG ??= ""
# "system" recipe blacklist contains a list of packages that can not distribute
# compile tasks for one reason or the other. When adding new entry, please
# document why (how it failed) so that we can re-evaluate it later e.g. when
# there is new version
#
# libgcc-initial - fails with CPP sanity check error if host sysroot contains
# cross gcc built for another target tune/variant
# target-sdk-provides-dummy - ${HOST_PREFIX} is empty which triggers the "NULL
# prefix" error.
ICECC_SYSTEM_PACKAGE_BL += "\
libgcc-initial \
target-sdk-provides-dummy \
"
# "system" classes that should be blacklisted. When adding new entry, please
# document why (how it failed) so that we can re-evaluate it later
#
# image - Image aren't compiling, but the testing framework for images captures
# PARALLEL_MAKE as part of the test environment. Many tests won't use
# icecream, but leaving the high level of parallelism can cause them to
# consume an unnecessary amount of resources.
ICECC_SYSTEM_CLASS_BL += "\
image \
"
def icecc_dep_prepend(d):
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
# we need that built is the responsibility of the patch function / class, not
@@ -134,7 +159,7 @@ def use_icecc(bb,d):
pn = d.getVar('PN')
system_class_blacklist = []
system_class_blacklist = (d.getVar('ICECC_SYSTEM_CLASS_BL') or "").split()
user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split()
package_class_blacklist = system_class_blacklist + user_class_blacklist
@@ -143,15 +168,7 @@ def use_icecc(bb,d):
bb.debug(1, "%s: class %s found in blacklist, disable icecc" % (pn, black))
return "no"
# "system" recipe blacklist contains a list of packages that can not distribute compile tasks
# for one reason or the other
# this is the old list (which doesn't seem to be valid anymore, because I was able to build
# all these with icecc enabled)
# system_package_blacklist = [ "glibc", "gcc", "bind", "u-boot", "dhcp-forwarder", "enchant", "connman", "orbit2" ]
# when adding new entry, please document why (how it failed) so that we can re-evaluate it later
# e.g. when there is new version
# building libgcc-initial with icecc fails with CPP sanity check error if host sysroot contains cross gcc built for another target tune/variant
system_package_blacklist = ["libgcc-initial"]
system_package_blacklist = (d.getVar('ICECC_SYSTEM_PACKAGE_BL') or "").split()
user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split()
user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL') or "").split()
package_blacklist = system_package_blacklist + user_package_blacklist
@@ -381,7 +398,7 @@ set_icecc_env() {
# Don't let ccache find the icecream compiler links that have been created, otherwise
# it can end up invoking icecream recursively.
export CCACHE_PATH="$PATH"
export CCACHE_DISBALE="1"
export CCACHE_DISABLE="1"
export ICECC_VERSION ICECC_CC ICECC_CXX
export PATH="$ICE_PATH:$PATH"

View File

@@ -16,9 +16,8 @@ IMAGE_BUILDINFO_VARS ?= "DISTRO DISTRO_VERSION"
IMAGE_BUILDINFO_FILE ??= "${sysconfdir}/build"
# From buildhistory.bbclass
def image_buildinfo_outputvars(vars, listvars, d):
def image_buildinfo_outputvars(vars, d):
vars = vars.split()
listvars = listvars.split()
ret = ""
for var in vars:
value = d.getVar(var) or ""
@@ -59,11 +58,12 @@ def buildinfo_target(d):
return ""
# Single and list variables to be read
vars = (d.getVar("IMAGE_BUILDINFO_VARS") or "")
listvars = (d.getVar("IMAGE_BUILDINFO_LVARS") or "")
return image_buildinfo_outputvars(vars, listvars, d)
return image_buildinfo_outputvars(vars, d)
# Write build information to target filesystem
python buildinfo () {
if not d.getVar('IMAGE_BUILDINFO_FILE'):
return
with open(d.expand('${IMAGE_ROOTFS}${IMAGE_BUILDINFO_FILE}'), 'w') as build:
build.writelines((
'''-----------------------

View File

@@ -24,7 +24,7 @@ POPULATE_SDK_POST_TARGET_COMMAND += "rootfs_sysroot_relativelinks; "
LICENSE ?= "MIT"
PACKAGES = ""
DEPENDS += "${@' '.join(["%s-qemuwrapper-cross" % m for m in d.getVar("MULTILIB_VARIANTS").split()])} qemuwrapper-cross depmodwrapper-cross cross-localedef-native"
RDEPENDS += "${PACKAGE_INSTALL} ${LINGUAS_INSTALL}"
RDEPENDS += "${PACKAGE_INSTALL} ${LINGUAS_INSTALL} ${IMAGE_INSTALL_DEBUGFS}"
RRECOMMENDS += "${PACKAGE_INSTALL_ATTEMPTONLY}"
PATH_prepend = "${@":".join(all_multilib_tune_values(d, 'STAGING_BINDIR_CROSS').split())}:"
@@ -176,6 +176,11 @@ IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS').split()))}"
python () {
if not bb.utils.contains('DISTRO_FEATURES', 'libc-charsets libc-locale-code libc-locales', True, False, d):
d.setVar('IMAGE_LINGUAS', '')
}
# Prefer image, but use the fallback files for lookups if the image ones
# aren't yet available.
PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}"
@@ -497,10 +502,10 @@ python () {
d.setVarFlag(task, 'fakeroot', '1')
d.appendVarFlag(task, 'prefuncs', ' ' + debug + ' set_image_size')
d.prependVarFlag(task, 'postfuncs', ' create_symlinks')
d.prependVarFlag(task, 'postfuncs', 'create_symlinks ')
d.appendVarFlag(task, 'subimages', ' ' + ' '.join(subimages))
d.appendVarFlag(task, 'vardeps', ' ' + ' '.join(vardeps))
d.appendVarFlag(task, 'vardepsexclude', 'DATETIME DATE ' + ' '.join(vardepsexclude))
d.appendVarFlag(task, 'vardepsexclude', ' DATETIME DATE ' + ' '.join(vardepsexclude))
bb.debug(2, "Adding task %s before %s, after %s" % (task, 'do_image_complete', after))
bb.build.addtask(task, 'do_image_complete', after, d)

View File

@@ -239,6 +239,7 @@ EXTRA_IMAGECMD_ext4 ?= "-i 4096"
EXTRA_IMAGECMD_btrfs ?= "-n 4096"
EXTRA_IMAGECMD_f2fs ?= ""
do_image_cpio[depends] += "cpio-native:do_populate_sysroot"
do_image_jffs2[depends] += "mtd-utils-native:do_populate_sysroot"
do_image_cramfs[depends] += "util-linux-native:do_populate_sysroot"
do_image_ext2[depends] += "e2fsprogs-native:do_populate_sysroot"
@@ -308,7 +309,7 @@ CONVERSION_DEPENDS_lzo = "lzop-native"
CONVERSION_DEPENDS_zip = "zip-native"
CONVERSION_DEPENDS_sum = "mtd-utils-native"
CONVERSION_DEPENDS_bmap = "bmap-tools-native"
CONVERSION_DEPENDS_u-boot = "u-boot-mkimage-native"
CONVERSION_DEPENDS_u-boot = "u-boot-tools-native"
CONVERSION_DEPENDS_vmdk = "qemu-native"
CONVERSION_DEPENDS_vdi = "qemu-native"
CONVERSION_DEPENDS_qcow2 = "qemu-native"

View File

@@ -111,7 +111,7 @@ def package_qa_check_rpath(file,name, d, elf, messages):
phdrs = elf.run_objdump("-p", d)
import re
rpath_re = re.compile("\s+RPATH\s+(.*)")
rpath_re = re.compile(r"\s+RPATH\s+(.*)")
for line in phdrs.split("\n"):
m = rpath_re.match(line)
if m:
@@ -140,7 +140,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
phdrs = elf.run_objdump("-p", d)
import re
rpath_re = re.compile("\s+RPATH\s+(.*)")
rpath_re = re.compile(r"\s+RPATH\s+(.*)")
for line in phdrs.split("\n"):
m = rpath_re.match(line)
if m:
@@ -203,8 +203,8 @@ def package_qa_check_libdir(d):
# The re's are purposely fuzzy, as some there are some .so.x.y.z files
# that don't follow the standard naming convention. It checks later
# that they are actual ELF files
lib_re = re.compile("^/lib.+\.so(\..+)?$")
exec_re = re.compile("^%s.*/lib.+\.so(\..+)?$" % exec_prefix)
lib_re = re.compile(r"^/lib.+\.so(\..+)?$")
exec_re = re.compile(r"^%s.*/lib.+\.so(\..+)?$" % exec_prefix)
for root, dirs, files in os.walk(pkgdest):
if root == pkgdest:
@@ -302,15 +302,15 @@ def package_qa_check_arch(path,name,d, elf, messages):
# Check the architecture and endiannes of the binary
is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
(target_os == "linux-gnux32" or target_os == "linux-muslx32" or \
target_os == "linux-gnu_ilp32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE')))
target_os == "linux-gnu_ilp32" or re.match(r'mips64.*32', d.getVar('DEFAULTTUNE')))
is_bpf = (oe.qa.elf_machine_to_string(elf.machine()) == "BPF")
if not ((machine == elf.machine()) or is_32 or is_bpf):
package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \
(oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d)))
elif not ((bits == elf.abiSize()) or is_32):
elif not ((bits == elf.abiSize()) or is_32 or is_bpf):
package_qa_add_message(messages, "arch", "Bit size did not match (%d to %d) %s on %s" % \
(bits, elf.abiSize(), bpn, package_qa_clean_path(path,d)))
elif not littleendian == elf.isLittleEndian():
elif not ((littleendian == elf.isLittleEndian()) or is_bpf):
package_qa_add_message(messages, "arch", "Endiannes did not match (%d to %d) on %s" % \
(littleendian, elf.isLittleEndian(), package_qa_clean_path(path,d)))
@@ -342,7 +342,7 @@ def package_qa_textrel(path, name, d, elf, messages):
sane = True
import re
textrel_re = re.compile("\s+TEXTREL\s+")
textrel_re = re.compile(r"\s+TEXTREL\s+")
for line in phdrs.split("\n"):
if textrel_re.match(line):
sane = False
@@ -383,7 +383,7 @@ def package_qa_hash_style(path, name, d, elf, messages):
sane = True
if has_syms and not sane:
package_qa_add_message(messages, "ldflags", "No GNU_HASH in the elf binary: '%s'" % path)
package_qa_add_message(messages, "ldflags", "No GNU_HASH in the ELF binary %s, didn't pass LDFLAGS?" % path)
QAPATHTEST[buildpaths] = "package_qa_check_buildpaths"
@@ -952,7 +952,7 @@ python do_package_qa () {
import re
# The package name matches the [a-z0-9.+-]+ regular expression
pkgname_pattern = re.compile("^[a-z0-9.+-]+$")
pkgname_pattern = re.compile(r"^[a-z0-9.+-]+$")
taskdepdata = d.getVar("BB_TASKDEPDATA", False)
taskdeps = set()
@@ -1017,6 +1017,13 @@ do_package_qa[vardepsexclude] = "BB_TASKDEPDATA"
do_package_qa[rdeptask] = "do_packagedata"
addtask do_package_qa after do_packagedata do_package before do_build
# Add the package specific INSANE_SKIPs to the sstate dependencies
python() {
pkgs = (d.getVar('PACKAGES') or '').split()
for pkg in pkgs:
d.appendVarFlag("do_package_qa", "vardeps", " INSANE_SKIP_{}".format(pkg))
}
SSTATETASKS += "do_package_qa"
do_package_qa[sstate-inputdirs] = ""
do_package_qa[sstate-outputdirs] = ""
@@ -1160,7 +1167,7 @@ python () {
if pn in overrides:
msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn)
package_qa_handle_error("pn-overrides", msg, d)
prog = re.compile('[A-Z]')
prog = re.compile(r'[A-Z]')
if prog.search(pn):
package_qa_handle_error("uppercase-pn", 'PN: %s is upper case, this can result in unexpected behavior.' % pn, d)

View File

@@ -4,7 +4,7 @@ python __anonymous () {
kerneltypes = d.getVar('KERNEL_IMAGETYPES') or ""
if 'fitImage' in kerneltypes.split():
depends = d.getVar("DEPENDS")
depends = "%s u-boot-mkimage-native dtc-native" % depends
depends = "%s u-boot-tools-native dtc-native" % depends
d.setVar("DEPENDS", depends)
uarch = d.getVar("UBOOT_ARCH")
@@ -19,9 +19,9 @@ python __anonymous () {
else:
replacementtype = "zImage"
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or ""
if 'fitImage' in typeformake.split():
d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('fitImage', replacementtype))
@@ -35,7 +35,7 @@ python __anonymous () {
# the fitImage:
if d.getVar('UBOOT_SIGN_ENABLE') == "1":
uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot'
d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_deploy' % uboot_pn)
d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_populate_sysroot' % uboot_pn)
}
# Options for the device tree compiler passed to mkimage '-D' feature:
@@ -456,10 +456,17 @@ fitimage_assemble() {
# Step 7: Sign the image and add public key to U-Boot dtb
#
if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then
add_key_to_u_boot=""
if [ -n "${UBOOT_DTB_BINARY}" ]; then
# The u-boot.dtb is a symlink to UBOOT_DTB_IMAGE, so we need copy
# both of them, and don't dereference the symlink.
cp -P ${STAGING_DATADIR}/u-boot*.dtb ${B}
add_key_to_u_boot="-K ${B}/${UBOOT_DTB_BINARY}"
fi
uboot-mkimage \
${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
-F -k "${UBOOT_SIGN_KEYDIR}" \
${@'-K "${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY}"' if len('${UBOOT_DTB_BINARY}') else ''} \
$add_key_to_u_boot \
-r arch/${ARCH}/boot/${2}
fi
}
@@ -505,5 +512,11 @@ kernel_do_deploy_append() {
install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin
ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin ${DEPLOYDIR}/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}
fi
if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ] ; then
# UBOOT_DTB_IMAGE is a realfile, but we can't use
# ${UBOOT_DTB_IMAGE} since it contains ${PV} which is aimed
# for u-boot, but we are in kernel env now.
install -m 0644 ${B}/u-boot-${MACHINE}*.dtb ${DEPLOYDIR}/
fi
fi
}

View File

@@ -3,7 +3,7 @@ inherit kernel-uboot
python __anonymous () {
if "uImage" in d.getVar('KERNEL_IMAGETYPES'):
depends = d.getVar("DEPENDS")
depends = "%s u-boot-mkimage-native" % depends
depends = "%s u-boot-tools-native" % depends
d.setVar("DEPENDS", depends)
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal

View File

@@ -157,14 +157,14 @@ PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-firmware-.*"
export OS = "${TARGET_OS}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
export KBUILD_BUILD_VERSION = "1"
export KBUILD_BUILD_USER = "oe-user"
export KBUILD_BUILD_HOST = "oe-host"
export KBUILD_BUILD_USER ?= "oe-user"
export KBUILD_BUILD_HOST ?= "oe-host"
KERNEL_RELEASE ?= "${KERNEL_VERSION}"
# The directory where built kernel lies in the kernel tree
KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
KERNEL_IMAGEDEST = "boot"
KERNEL_IMAGEDEST ?= "boot"
#
# configuration
@@ -492,7 +492,7 @@ sysroot_stage_all () {
:
}
KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} oldnoconfig"
KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} olddefconfig || oe_runmake -C ${S} O=${B} CC="${KERNEL_CC}" oldnoconfig"
python check_oldest_kernel() {
oldest_kernel = d.getVar('OLDEST_KERNEL')

View File

@@ -39,9 +39,7 @@ python __anonymous () {
break
# try to fix disable charsets/locales/locale-code compile fail
if bb.utils.contains('DISTRO_FEATURES', 'libc-charsets', True, False, d) and \
bb.utils.contains('DISTRO_FEATURES', 'libc-locales', True, False, d) and \
bb.utils.contains('DISTRO_FEATURES', 'libc-locale-code', True, False, d):
if bb.utils.contains('DISTRO_FEATURES', 'libc-charsets libc-locales libc-locale-code', True, False, d):
d.setVar('PACKAGE_NO_GCONV', '0')
else:
d.setVar('PACKAGE_NO_GCONV', '1')
@@ -49,13 +47,7 @@ python __anonymous () {
OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
locale_base_postinst() {
#!/bin/sh
if [ "x$D" != "x" ]; then
exit 1
fi
locale_base_postinst_ontarget() {
localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s %s
}
@@ -215,7 +207,7 @@ python package_do_split_gconvs () {
def output_locale_source(name, pkgname, locale, encoding):
d.setVar('RDEPENDS_%s' % pkgname, '%slocaledef %s-localedata-%s %s-charmap-%s' % \
(mlprefix, mlprefix+bpn, legitimize_package_name(locale), mlprefix+bpn, legitimize_package_name(encoding)))
d.setVar('pkg_postinst_%s' % pkgname, d.getVar('locale_base_postinst') \
d.setVar('pkg_postinst_ontarget_%s' % pkgname, d.getVar('locale_base_postinst_ontarget') \
% (locale, encoding, locale))
d.setVar('pkg_postrm_%s' % pkgname, d.getVar('locale_base_postrm') % \
(locale, encoding, locale))
@@ -242,6 +234,8 @@ python package_do_split_gconvs () {
if use_cross_localedef == "1":
target_arch = d.getVar('TARGET_ARCH')
locale_arch_options = { \
"arc": " --uint32-align=4 --little-endian ", \
"arceb": " --uint32-align=4 --big-endian ", \
"arm": " --uint32-align=4 --little-endian ", \
"armeb": " --uint32-align=4 --big-endian ", \
"aarch64": " --uint32-align=4 --little-endian ", \

View File

@@ -309,15 +309,15 @@ def incompatible_license(d, dont_want_licenses, package=None):
except oe.license.LicenseError as exc:
bb.fatal('%s: %s' % (d.getVar('P'), exc))
return any(not oe.license.license_ok(canonical_license(d, l), \
dont_want_licenses) for l in licenses)
dont_want_licenses) for l in licenses)
def check_license_flags(d):
"""
This function checks if a recipe has any LICENSE_FLAGS that
aren't whitelisted.
If it does, it returns the first LICENSE_FLAGS item missing from the
whitelist, or all of the LICENSE_FLAGS if there is no whitelist.
If it does, it returns the all LICENSE_FLAGS missing from the whitelist, or
all of the LICENSE_FLAGS if there is no whitelist.
If everything is is properly whitelisted, it returns None.
"""
@@ -354,22 +354,23 @@ def check_license_flags(d):
return False
def all_license_flags_match(license_flags, whitelist):
""" Return first unmatched flag, None if all flags match """
""" Return all unmatched flags, None if all flags match """
pn = d.getVar('PN')
split_whitelist = whitelist.split()
flags = []
for flag in license_flags.split():
if not license_flag_matches(flag, split_whitelist, pn):
return flag
return None
flags.append(flag)
return flags if flags else None
license_flags = d.getVar('LICENSE_FLAGS')
if license_flags:
whitelist = d.getVar('LICENSE_FLAGS_WHITELIST')
if not whitelist:
return license_flags
unmatched_flag = all_license_flags_match(license_flags, whitelist)
if unmatched_flag:
return unmatched_flag
return license_flags.split()
unmatched_flags = all_license_flags_match(license_flags, whitelist)
if unmatched_flags:
return unmatched_flags
return None
def check_license_format(d):

View File

@@ -32,10 +32,10 @@ python license_create_manifest() {
rootfs_license_manifest = os.path.join(d.getVar('LICENSE_DIRECTORY'),
d.getVar('IMAGE_NAME'), 'license.manifest')
write_license_files(d, rootfs_license_manifest, pkg_dic)
write_license_files(d, rootfs_license_manifest, pkg_dic, rootfs=True)
}
def write_license_files(d, license_manifest, pkg_dic):
def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
import re
bad_licenses = (d.getVar("INCOMPATIBLE_LICENSE") or "").split()
@@ -52,8 +52,8 @@ def write_license_files(d, license_manifest, pkg_dic):
except oe.license.LicenseError as exc:
bb.fatal('%s: %s' % (d.getVar('P'), exc))
else:
pkg_dic[pkg]["LICENSES"] = re.sub('[|&()*]', ' ', pkg_dic[pkg]["LICENSE"])
pkg_dic[pkg]["LICENSES"] = re.sub(' *', ' ', pkg_dic[pkg]["LICENSES"])
pkg_dic[pkg]["LICENSES"] = re.sub(r'[|&()*]', ' ', pkg_dic[pkg]["LICENSE"])
pkg_dic[pkg]["LICENSES"] = re.sub(r' *', ' ', pkg_dic[pkg]["LICENSES"])
pkg_dic[pkg]["LICENSES"] = pkg_dic[pkg]["LICENSES"].split()
if not "IMAGE_MANIFEST" in pkg_dic[pkg]:
@@ -78,7 +78,7 @@ def write_license_files(d, license_manifest, pkg_dic):
for lic in pkg_dic[pkg]["LICENSES"]:
lic_file = os.path.join(d.getVar('LICENSE_DIRECTORY'),
pkg_dic[pkg]["PN"], "generic_%s" %
re.sub('\+', '', lic))
re.sub(r'\+', '', lic))
# add explicity avoid of CLOSED license because isn't generic
if lic == "CLOSED":
continue
@@ -94,7 +94,7 @@ def write_license_files(d, license_manifest, pkg_dic):
# With both options set we see a .5 M increase in core-image-minimal
copy_lic_manifest = d.getVar('COPY_LIC_MANIFEST')
copy_lic_dirs = d.getVar('COPY_LIC_DIRS')
if copy_lic_manifest == "1":
if rootfs and copy_lic_manifest == "1":
rootfs_license_dir = os.path.join(d.getVar('IMAGE_ROOTFS'),
'usr', 'share', 'common-licenses')
bb.utils.mkdirhier(rootfs_license_dir)
@@ -119,14 +119,14 @@ def write_license_files(d, license_manifest, pkg_dic):
pkg_license = os.path.join(pkg_license_dir, lic)
pkg_rootfs_license = os.path.join(pkg_rootfs_license_dir, lic)
if re.match("^generic_.*$", lic):
if re.match(r"^generic_.*$", lic):
generic_lic = canonical_license(d,
re.search("^generic_(.*)$", lic).group(1))
re.search(r"^generic_(.*)$", lic).group(1))
# Do not copy generic license into package if isn't
# declared into LICENSES of the package.
if not re.sub('\+$', '', generic_lic) in \
[re.sub('\+', '', lic) for lic in \
if not re.sub(r'\+$', '', generic_lic) in \
[re.sub(r'\+', '', lic) for lic in \
pkg_manifest_licenses]:
continue
@@ -146,6 +146,13 @@ def write_license_files(d, license_manifest, pkg_dic):
continue
os.link(pkg_license, pkg_rootfs_license)
# Fixup file ownership
for walkroot, dirs, files in os.walk(rootfs_license_dir):
for f in files:
os.lchown(os.path.join(walkroot, f), 0, 0)
for dir in dirs:
os.lchown(os.path.join(walkroot, dir), 0, 0)
def license_deployed_manifest(d):
@@ -176,7 +183,7 @@ def license_deployed_manifest(d):
d.getVar('IMAGE_NAME'))
bb.utils.mkdirhier(lic_manifest_dir)
image_license_manifest = os.path.join(lic_manifest_dir, 'image_license.manifest')
write_license_files(d, image_license_manifest, man_dic)
write_license_files(d, image_license_manifest, man_dic, rootfs=False)
def get_deployed_dependencies(d):
"""

View File

@@ -34,8 +34,8 @@ def get_kernelversion_file(p):
return None
def linux_module_packages(s, d):
suffix = ""
return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split()))
suffix = ""
return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split()))
# that's all

View File

@@ -52,8 +52,12 @@ def meson_cpu_family(var, d):
arch = d.getVar(var)
if arch == 'powerpc':
return 'ppc'
elif arch == 'powerpc64':
return 'ppc64'
elif arch == 'mipsel':
return 'mips'
elif arch == 'mips64el':
return 'mips64'
elif re.match(r"i[3-6]86", arch):
return "x86"
else:

View File

@@ -3,55 +3,15 @@ METADATA_REVISION ?= "${@base_detect_revision(d)}"
def base_detect_revision(d):
path = base_get_scmbasepath(d)
scms = [base_get_metadata_git_revision]
for scm in scms:
rev = scm(path, d)
if rev != "<unknown>":
return rev
return "<unknown>"
return base_get_metadata_git_revision(path, d)
def base_detect_branch(d):
path = base_get_scmbasepath(d)
scms = [base_get_metadata_git_branch]
for scm in scms:
rev = scm(path, d)
if rev != "<unknown>":
return rev.strip()
return "<unknown>"
return base_get_metadata_git_branch(path, d)
def base_get_scmbasepath(d):
return os.path.join(d.getVar('COREBASE'), 'meta')
def base_get_metadata_monotone_branch(path, d):
monotone_branch = "<unknown>"
try:
with open("%s/_MTN/options" % path) as f:
monotone_branch = f.read().strip()
if monotone_branch.startswith( "database" ):
monotone_branch_words = monotone_branch.split()
monotone_branch = monotone_branch_words[ monotone_branch_words.index( "branch" )+1][1:-1]
except:
pass
return monotone_branch
def base_get_metadata_monotone_revision(path, d):
monotone_revision = "<unknown>"
try:
with open("%s/_MTN/revision" % path) as f:
monotone_revision = f.read().strip()
if monotone_revision.startswith( "format_version" ):
monotone_revision_words = monotone_revision.split()
monotone_revision = monotone_revision_words[ monotone_revision_words.index( "old_revision" )+1][1:-1]
except IOError:
pass
return monotone_revision
def base_get_metadata_svn_revision(path, d):
# This only works with older subversion. For newer versions
# this function will need to be fixed by someone interested

View File

@@ -48,6 +48,7 @@ module_do_compile() {
module_do_install() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \
INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
O=${STAGING_KERNEL_BUILDDIR} \
${MODULES_INSTALL_TARGET}

View File

@@ -24,9 +24,11 @@ python () {
for entry in (d.getVar("MULTILIB_SCRIPTS", False) or "").split():
pkg, script = entry.split(":")
epkg = d.expand(pkg)
scriptname = os.path.basename(script)
d.appendVar("ALTERNATIVE_" + pkg, scriptname + " ")
d.appendVar("ALTERNATIVE_" + epkg, " " + scriptname + " ")
d.setVarFlag("ALTERNATIVE_LINK_NAME", scriptname, script)
d.setVarFlag("ALTERNATIVE_TARGET", scriptname, script + "-${MULTILIB_SUFFIX}")
d.appendVar("multilibscript_rename", "\n mv ${PKGD}" + script + " ${PKGD}" + script + "-${MULTILIB_SUFFIX}")
d.appendVar("FILES_" + epkg, " " + script + "-${MULTILIB_SUFFIX}")
}

View File

@@ -10,7 +10,7 @@ def node_pkgname(d):
NPMPN ?= "${@node_pkgname(d)}"
NPM_INSTALLDIR = "${D}${libdir}/node/${NPMPN}"
NPM_INSTALLDIR = "${libdir}/node/${NPMPN}"
# function maps arch names to npm arch names
def npm_oe_arch_map(target_arch, d):
@@ -22,7 +22,7 @@ def npm_oe_arch_map(target_arch, d):
return target_arch
NPM_ARCH ?= "${@npm_oe_arch_map(d.getVar('TARGET_ARCH'), d)}"
NPM_INSTALL_DEV = "0"
NPM_INSTALL_DEV ?= "0"
npm_do_compile() {
# Copy in any additionally fetched modules
@@ -52,9 +52,10 @@ npm_do_install() {
# changing the home directory to the working directory, the .npmrc will
# be created in this directory
export HOME=${WORKDIR}
mkdir -p ${NPM_INSTALLDIR}/
mkdir -p ${D}${libdir}/node_modules
npm pack .
npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry ${NPMPN}-${PV}.tgz
mv ${D}${libdir}/node_modules ${D}${libdir}/node
if [ -d ${D}${prefix}/etc ] ; then
# This will be empty
rmdir ${D}${prefix}/etc
@@ -62,13 +63,13 @@ npm_do_install() {
}
python populate_packages_prepend () {
instdir = d.expand('${D}${libdir}/node_modules/${NPMPN}')
instdir = d.expand('${D}${NPM_INSTALLDIR}')
extrapackages = oe.package.npm_split_package_dirs(instdir)
pkgnames = extrapackages.keys()
d.prependVar('PACKAGES', '%s ' % ' '.join(pkgnames))
for pkgname in pkgnames:
pkgrelpath, pdata = extrapackages[pkgname]
pkgpath = '${libdir}/node_modules/${NPMPN}/' + pkgrelpath
pkgpath = '${NPM_INSTALLDIR}/' + pkgrelpath
# package names can't have underscores but npm packages sometimes use them
oe_pkg_name = pkgname.replace('_', '-')
expanded_pkgname = d.expand(oe_pkg_name)
@@ -84,7 +85,7 @@ python populate_packages_prepend () {
}
FILES_${PN} += " \
${libdir}/node_modules/${NPMPN} \
${NPM_INSTALLDIR} \
"
EXPORT_FUNCTIONS do_compile do_install

View File

@@ -13,7 +13,7 @@ def get_perl_version(d):
return None
l = f.readlines();
f.close();
r = re.compile("^version='(\d*\.\d*\.\d*)'")
r = re.compile(r"^version='(\d*\.\d*\.\d*)'")
for s in l:
m = r.match(s)
if m:

View File

@@ -3,6 +3,9 @@ DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION} \
This package contains a test directory ${PTEST_PATH} for package test purposes."
PTEST_PATH ?= "${libdir}/${BPN}/ptest"
PTEST_BUILD_HOST_FILES ?= "Makefile"
PTEST_BUILD_HOST_PATTERN ?= ""
FILES_${PN}-ptest = "${PTEST_PATH}"
SECTION_${PN}-ptest = "devel"
ALLOW_EMPTY_${PN}-ptest = "1"
@@ -45,6 +48,21 @@ do_install_ptest_base() {
fi
do_install_ptest
chown -R root:root ${D}${PTEST_PATH}
# Strip build host paths from any installed Makefile
for filename in ${PTEST_BUILD_HOST_FILES}; do
for installed_ptest_file in $(find ${D}${PTEST_PATH} -type f -name $filename); do
bbnote "Stripping host paths from: $installed_ptest_file"
sed -e 's#${HOSTTOOLS_DIR}/*##g' \
-e 's#${WORKDIR}/*=#.=#g' \
-e 's#${WORKDIR}/*##g' \
-i $installed_ptest_file
if [ -n "${PTEST_BUILD_HOST_PATTERN}" ]; then
sed -E '/${PTEST_BUILD_HOST_PATTERN}/d' \
-i $installed_ptest_file
fi
done
done
}
do_configure_ptest_base[dirs] = "${B}"
@@ -59,6 +77,7 @@ addtask install_ptest_base after do_install before do_package do_populate_sy
python () {
if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
d.setVarFlag('do_install_ptest_base', 'fakeroot', '1')
d.setVarFlag('do_install_ptest_base', 'umask', '022')
# Remove all '*ptest_base' tasks when ptest is not enabled
if not(d.getVar('PTEST_ENABLED') == "1"):

View File

@@ -22,9 +22,15 @@
# 3. Use the mtime of "known" files such as NEWS, CHANGLELOG, ...
# This works for well-kept repositories distributed via tarball.
#
# 4. If the above steps fail, use the modification time of the youngest file in the source tree.
# 4. Use the modification time of the youngest file in the source tree, if there is one.
# This will be the newest file from the distribution tarball, if any.
#
# 5. Fall back to a fixed timestamp.
#
# Once the value of SOURCE_DATE_EPOCH is determined, it is stored in the recipe's SDE_FILE.
# If none of these mechanisms are suitable, replace the do_deploy_source_date_epoch task
# with recipe-specific functionality to write the appropriate SOURCE_DATE_EPOCH into the SDE_FILE.
#
# Once the value of SOURCE_DATE_EPOCH is determined, it is stored in the recipe's ${SDE_FILE}.
# If this file is found by other tasks, the value is exported in the SOURCE_DATE_EPOCH variable.
# SOURCE_DATE_EPOCH is set for all tasks that might use it (do_configure, do_compile, do_package, ...)
@@ -101,15 +107,15 @@ def get_source_date_epoch_from_git(d, sourcedir):
return source_date_epoch
def get_source_date_epoch_from_youngest_file(d, sourcedir):
if sourcedir == d.getVar('WORKDIR'):
# These sources are almost certainly not from a tarball
return None
# Do it the hard way: check all files and find the youngest one...
source_date_epoch = None
newest_file = None
# Just in case S = WORKDIR
exclude = set(["build", "image", "license-destdir", "patches", "pseudo",
"recipe-sysroot", "recipe-sysroot-native", "sysroot-destdir", "temp"])
for root, dirs, files in os.walk(sourcedir, topdown=True):
files = [f for f in files if not f[0] == '.']
dirs[:] = [d for d in dirs if d not in exclude]
for fname in files:
filename = os.path.join(root, fname)
@@ -125,6 +131,10 @@ def get_source_date_epoch_from_youngest_file(d, sourcedir):
bb.debug(1, "Newest file found: %s" % newest_file)
return source_date_epoch
def fixed_source_date_epoch():
bb.debug(1, "No tarball or git repo found to determine SOURCE_DATE_EPOCH")
return 0
python do_create_source_date_epoch_stamp() {
epochfile = d.getVar('SDE_FILE')
if os.path.isfile(epochfile):
@@ -136,11 +146,8 @@ python do_create_source_date_epoch_stamp() {
get_source_date_epoch_from_git(d, sourcedir) or
get_source_date_epoch_from_known_files(d, sourcedir) or
get_source_date_epoch_from_youngest_file(d, sourcedir) or
0 # Last resort
fixed_source_date_epoch() # Last resort
)
if source_date_epoch == 0:
# empty folder, not a single file ...
bb.debug(1, "No files found to determine SOURCE_DATE_EPOCH")
bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch)
bb.utils.mkdirhier(d.getVar('SDE_DIR'))

View File

@@ -511,6 +511,16 @@ def check_make_version(sanity_data):
return None
# Check if we're running on WSL (Windows Subsystem for Linux). Its known not to
# work but we should tell the user that upfront.
def check_wsl(d):
with open("/proc/version", "r") as f:
verdata = f.readlines()
for l in verdata:
if "Microsoft" in l:
return "OpenEmbedded doesn't work under WSL at this time, sorry"
return None
# Tar version 1.24 and onwards handle overwriting symlinks correctly
# but earlier versions do not; this needs to work properly for sstate
def check_tar_version(sanity_data):
@@ -625,6 +635,7 @@ def check_sanity_version_change(status, d):
status.addresult(check_tar_version(d))
status.addresult(check_git_version(d))
status.addresult(check_perl_modules(d))
status.addresult(check_wsl(d))
missing = ""

View File

@@ -2,16 +2,25 @@ DEPENDS += "python-scons-native"
EXTRA_OESCONS ?= ""
do_configure[noexec] = "1"
do_configure() {
if [ -n "${CONFIGURESTAMPFILE}" ]; then
if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then
${STAGING_BINDIR_NATIVE}/scons --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
fi
mkdir -p `dirname ${CONFIGURESTAMPFILE}`
echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
fi
}
scons_do_compile() {
${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
die "scons build execution failed."
${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
die "scons build execution failed."
}
scons_do_install() {
${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
die "scons install execution failed."
${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
die "scons install execution failed."
}
EXPORT_FUNCTIONS do_compile do_install

View File

@@ -1,13 +1,13 @@
python siteconfig_do_siteconfig () {
shared_state = sstate_state_fromvars(d)
if shared_state['task'] != 'populate_sysroot':
return
if not os.path.isdir(os.path.join(d.getVar('FILE_DIRNAME'), 'site_config')):
bb.debug(1, "No site_config directory, skipping do_siteconfig")
return
sstate_install(shared_state, d)
bb.build.exec_func('do_siteconfig_gencache', d)
sstate_clean(shared_state, d)
shared_state = sstate_state_fromvars(d)
if shared_state['task'] != 'populate_sysroot':
return
if not os.path.isdir(os.path.join(d.getVar('FILE_DIRNAME'), 'site_config')):
bb.debug(1, "No site_config directory, skipping do_siteconfig")
return
sstate_install(shared_state, d)
bb.build.exec_func('do_siteconfig_gencache', d)
sstate_clean(shared_state, d)
}
EXTRASITECONFIG ?= ""

Some files were not shown because too many files have changed in this diff Show More