]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
7 years agoRevert "go: Fix build with PIE on musl"
Otavio Salvador [Wed, 6 Dec 2017 11:17:01 +0000 (09:17 -0200)]
Revert "go: Fix build with PIE on musl"

This reverts commit d6fcf91c06a3d118e8741273fac6903100141db4.

This commit was included on the rocko update by mistake. It ended
being dropped from master merge queue but forgotten in rocko one.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agogstreamer1.0-plugins: disable introspection on mips64
Alexander Kanavin [Tue, 14 Nov 2017 14:57:42 +0000 (16:57 +0200)]
gstreamer1.0-plugins: disable introspection on mips64

The failure is weird and difficult to diagnoze, so disable the
introspection for now:

qemu-mips64: error while loading shared libraries: .../recipe-sysroot/usr/lib/libgthread-2.0.so.0: ELF file data encoding not little-endian

Note that it shows up only for one specific library (gstaudio), and only
on mips64. Introspection data for other libraries is generated just fine.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 4cfe09598c1ec1ffd108acdfd0f4cce1b8688895)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agosudo: improve reproducibility
Juro Bystricky [Thu, 16 Nov 2017 19:48:50 +0000 (11:48 -0800)]
sudo: improve reproducibility

Delete various build host references from the internally
generated file sudo_usage.h. The references get compiled into
executables, which leads to non-reproducible builds.
The removed references (configure options) were only used as part
of the sudo "usage", and even then only when ran as root.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 090eb9efdb2204673b1d569582813ea8860c8570)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agox11perf: improve reproducibility
Juro Bystricky [Thu, 16 Nov 2017 19:48:49 +0000 (11:48 -0800)]
x11perf: improve reproducibility

Remove build host refeences.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 7eedafd32a24cfdc33d791b2bf5a5d5c36c48e2f)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agogrub-efi_2.02.bb: improve reproducibility
Juro Bystricky [Thu, 16 Nov 2017 19:48:48 +0000 (11:48 -0800)]
grub-efi_2.02.bb: improve reproducibility

Remove several build host references from modinfo.sh files.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 6e4182b7c540e22f25ea8bfd16b0e2b2c8eb9f82)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agolibnsl2: fix installed-vs-shipped QA issue
Jackie Huang [Thu, 16 Nov 2017 07:41:36 +0000 (15:41 +0800)]
libnsl2: fix installed-vs-shipped QA issue

Fix the installed-vs-shipped QA issue:
| WARNING: libnsl2-1.0.5+gitAUTOINC+dfa2f31352-r0 do_package: QA Issue:
  libnsl2: Files/directories were installed but not shipped in any package:
  /usr/lib64/nsl/libnsl.a

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 2e6636b23dde2c1b547f98373a2f49e617c37a9f)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agonss: pay attention to CFLAGS
Joe Slater [Wed, 15 Nov 2017 18:54:09 +0000 (10:54 -0800)]
nss: pay attention to CFLAGS

nss ignores CFLAGS so we suggest them via CC.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 95b65eefe7eb001752a37d1015bbf9be63bfd6bb)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agoqemu.inc: let linux-yocto-rt also provide nfs server kernel module
Ming Liu [Wed, 15 Nov 2017 13:15:50 +0000 (14:15 +0100)]
qemu.inc: let linux-yocto-rt also provide nfs server kernel module

In case some users want to use linux-yocto-rt as the preferred kernel.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit bb0e574d3c74b6cd2d7e41933e0e28c91f0a411b)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agosystemd: fix duplication of CACHED_CONFIGUREVARS
Andre McCurdy [Tue, 14 Nov 2017 19:39:24 +0000 (11:39 -0800)]
systemd: fix duplication of CACHED_CONFIGUREVARS

Fix historical duplication that appears to have been caused by
merging two independent fixes for the same issue:

  http://git.openembedded.org/openembedded-core/commit/?id=294adc0907a359d9c0ad260823188145aab294ad
  http://git.openembedded.org/openembedded-core/commit/?id=b30d7b1b97ffd1d44083d93ed0e572d80fcebc54

Also minor reformatting of EXTRA_OECONF values.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 94bc5910ebdf7bb4677fa06150ba1219295e5eda)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agosystemd: use consistent indenting and coding style in do_install()
Andre McCurdy [Tue, 14 Nov 2017 19:39:23 +0000 (11:39 -0800)]
systemd: use consistent indenting and coding style in do_install()

Make the polkit fixup etc at the end of do_install() more consistent
with the rest of the function. Also indent do_install_ptest() with
tabs instead of spaces to make do_install_ptest() consistent with
do_install().

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 7a188e646a7a713ec5eab73580de624dc61f2936)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agosystemd: sort PACKAGECONFIG options
Andre McCurdy [Tue, 14 Nov 2017 19:39:22 +0000 (11:39 -0800)]
systemd: sort PACKAGECONFIG options

Also fix some minor formatting inconsistencies (extra spaces or
commas etc). No functional changes.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 4caf480c8d824575e970ec8ba15e4ee221166954)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agosystemd: use consistent approach for musl PACKAGECONFIG options
Andre McCurdy [Tue, 14 Nov 2017 19:39:21 +0000 (11:39 -0800)]
systemd: use consistent approach for musl PACKAGECONFIG options

Consistently use PACKAGECONFIG_remove_libc-musl to disable options
which are not compatible with musl.

Also sort the default PACKAGECONFIG list.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 8fb362d90628d0dbc9a5073a0d75296eab569d44)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agosystemd: remove musl specific control of ldconfig PACKAGECONFIG
Andre McCurdy [Tue, 14 Nov 2017 19:39:20 +0000 (11:39 -0800)]
systemd: remove musl specific control of ldconfig PACKAGECONFIG

The ldconfig PACKAGECONFIG option is controlled by the ldconfig
distro feature - which is now disabled by default when building for
musl.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 84c841c5b4d3ae753c377f5bdbda19281c771f60)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agotclibc-musl.inc: disable ldconfig distro feature
Andre McCurdy [Tue, 14 Nov 2017 19:39:19 +0000 (11:39 -0800)]
tclibc-musl.inc: disable ldconfig distro feature

Musl has no support for ldconfig, so ensure that the corresponding
distro feature is disabled when building with musl.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit baacd7ea99265f5493d2452b173a12def92f6202)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agorunqemu: print command search result when not found
Robert Yang [Fri, 10 Nov 2017 13:48:55 +0000 (21:48 +0800)]
runqemu: print command search result when not found

This makes debug easier.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit a453639e19fb2a9f9fb63fddd0b3ee26c0116d91)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agorunqemu: Also specialcase resolution of '.' to the file's location
Richard Purdie [Tue, 21 Nov 2017 17:56:40 +0000 (17:56 +0000)]
runqemu: Also specialcase resolution of '.' to the file's location

Similarly to handling "../", handle "." to resovle to the qemuconf
file's current directory.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 33418ed064fe9cff5b4803f09135a81d9170c189)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agoimage_types: Add debugging code to ext4 fs creation
Saul Wold [Tue, 21 Nov 2017 15:26:44 +0000 (07:26 -0800)]
image_types: Add debugging code to ext4 fs creation

We have seen a small number of issues with ROOTFS_SIZE not getting
computed correctly, resulting in a failure in the mke2fs processing
and populating the resulting new filesystem.

This information should help us to reproduce [YOCTO #12304]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3a72f6783e142d53d19b37811a854d08d32485ab)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agoqemurunner: Simplify binary data handling
Richard Purdie [Tue, 21 Nov 2017 11:42:54 +0000 (11:42 +0000)]
qemurunner: Simplify binary data handling

I have concerns that bad timing of the flow of data from the logger
might corrupt the output due to the way binary strings are handled
in qemurunner.

This simplifies the code to do the same thing it did before but much
more safely.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1e87283e92a2765bb5d54d17138b208bc395953b)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agoqemuboot: Improve relative path handling
Richard Purdie [Tue, 21 Nov 2017 11:39:12 +0000 (11:39 +0000)]
qemuboot: Improve relative path handling

qemuconf files are currently written relative to TOPDIR. What
makes more sense is to write paths relative to the location of the
file. This makes moving them around and decoding the end paths in
runqemu much easier.

The effect of this should allow less use of bitbake to determine
variables and allow us to simplify runqemu.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 55a0028a961c0ad3c2e5729a9e3919cbbf256fe1)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agorunqemu: Improve relative path handling in qemuconf files
Richard Purdie [Tue, 21 Nov 2017 11:37:39 +0000 (11:37 +0000)]
runqemu: Improve relative path handling in qemuconf files

If a variable starts with "../", its likely its a path and we want to
set it to an absolute path relative to the qemuconf file.

This means we don't have to use bitbake as often to figure out variables.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit dfc7940900d798aa47716288338107e1d46a3972)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agoqemu: Add patch to avoid qemuppc boot hangs
Richard Purdie [Tue, 21 Nov 2017 11:32:55 +0000 (11:32 +0000)]
qemu: Add patch to avoid qemuppc boot hangs

qemuppc boots are occasionally hanging on the autobuilder. This adds a
patch which fixes the issue in local testing. Its being discussed with
upstream qemu.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 87719e35db08b21cd43ab3ebd72f4567ca0fdc65)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agorunqemu: Ensure we process all tap devices
Richard Purdie [Mon, 20 Nov 2017 20:55:34 +0000 (20:55 +0000)]
runqemu: Ensure we process all tap devices

The regexp in the script misses some tap devices, e.g. we see output like:

runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap25.lock failed: [Errno 11] Resource temporarily unavailable
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap26.lock failed: [Errno 11] Resource temporarily unavailable
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap27.lock failed: [Errno 11] Resource temporarily unavailable
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap28.lock failed: [Errno 11] Resource temporarily unavailable
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap40.lock failed: [Errno 11] Resource temporarily unavailable
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap41.lock failed: [Errno 11] Resource temporarily unavailable

What happened to tap29 to tap39?

The issue is was we were missing devices with '0' in the number,
like "10:" and so on in the output from "ip link".

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6447697a48e3b693ee38806bc2ba07c2a65c2bc8)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agobase: add automatic dependency on xz-native for .txz SRC_URI
André Draszik [Fri, 17 Nov 2017 21:43:51 +0000 (21:43 +0000)]
base: add automatic dependency on xz-native for .txz SRC_URI

.txz is .tar.xz, so add it, as this can actually be found in the
wild.

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 58af8c2e4bd17692274fc5a6ac8f8af84319fec6)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agonet-tools: correctly set COPTS and LOPTS
Joe Slater [Tue, 14 Nov 2017 21:53:28 +0000 (13:53 -0800)]
net-tools: correctly set COPTS and LOPTS

COPTS will be ignored if it is defined in the environment.
It must be passed directly to make.  To be consistent, we
pass LOPTS that way, too.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit dede6d3d37aab72ae897c3709d21108fa75f6673)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agorecipetool: create: fix failure handling included dicts
Paul Eggleton [Sun, 12 Nov 2017 22:00:25 +0000 (11:00 +1300)]
recipetool: create: fix failure handling included dicts

If a setup dict in a python setup.py file pulled in the contents of
another dict (e.g.  **otherdict), then we got an error when mapping
the keys because the key is None in that case. Skip those keys to avoid
the error (we pick up the values directly in any case).

A quick reproducer for this issue:

recipetool create https://files.pythonhosted.org/packages/source/p/pyqtgraph/pyqtgraph-0.10.0.tar.gz

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit ae62a9953e219df5147ed4a5ae3f4163d51cff28)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agolinux-firmware: Remove iwlwifi-8000C-19 SRC_URI
Saul Wold [Fri, 10 Nov 2017 17:41:32 +0000 (09:41 -0800)]
linux-firmware: Remove iwlwifi-8000C-19 SRC_URI

Since it's been removed from the upstream repo and not fetchable
remove it here.  The newer firmware supports the device correctly.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 8b8c40bdbd09ddd1409dc30e04ef847f6a15f109)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agoicu: CVE-2017-14952
Ovidiu Panait [Fri, 10 Nov 2017 15:46:10 +0000 (17:46 +0200)]
icu: CVE-2017-14952

Double free in i18n/zonemeta.cpp in International Components for Unicode
(ICU) for C/C++ through 59.1 allows remote attackers to execute arbitrary
code via a crafted string, aka a "redundant UVector entry clean up
function call" issue.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2017-14952

Upstream patches:
http://bugs.icu-project.org/trac/changeset/40324/trunk/icu4c/source/i18n/zonemeta.cpp

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 4ff12a8bf2b8d094085afbe8fa1d43f781cfa79d)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agogcc: backport patch to fix miscompilation on mips64
Chen Qi [Wed, 8 Nov 2017 02:33:52 +0000 (10:33 +0800)]
gcc: backport patch to fix miscompilation on mips64

Backport a patch to fix miscompilation on mips64.

We've observed strange behaviour of `systemctl status <xxx> on qemumips64.
The output of the command is like `systemctl show <xxx>', which is incorrect.

The problem is due to the miscompilation of gcc for mips64 platform, thus
backporting patch from upstream to fix this problem.

[YOCTO #12266]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit cfa13e5c756849820644d86d1882602649db6a9c)
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agogcc7: Fix unaligned STRD issue on ARM
Khem Raj [Tue, 7 Nov 2017 23:26:52 +0000 (15:26 -0800)]
gcc7: Fix unaligned STRD issue on ARM

Backport
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82445

Fixes [YOCTO 12297]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Excluding GCC 6.3 as it is not affected.
per https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82445#c5

Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agolttng-modules: Upgrade to 2.9.5 release
Otavio Salvador [Thu, 9 Nov 2017 13:34:59 +0000 (11:34 -0200)]
lttng-modules: Upgrade to 2.9.5 release

This upgrade is critical as it fixes the support for Linux 4.14 LTS kernel.

The changlog is:

2017-10-05 LTTng modules 2.9.5
* Fix: update block instrumentation for 4.14 kernel
* Revert "Fix: update block instrumentation for kernel 4.14"

2017-10-03 (National Techies Day) LTTng modules 2.9.4
* Fix: version check error in btrfs instrumentation
* Fix: update btrfs instrumentation for kernel 4.14
* Fix: update writeback instrumentation for kernel 4.14
* Fix: update block instrumentation for kernel 4.14
* Fix: vmalloc wrapper on kernel < 2.6.38
* Fix: vmalloc wrapper on kernel >= 4.12
* Add kmalloc failover to vmalloc
* Fix: mmap: caches aliased on virtual addresses
* Fix: update ext4 instrumentation for kernel 4.13
* Fix: Sleeping function called from invalid context
* Fix: sched for v4.11.5-rt1
* Fix: handle missing ftrace header on v4.12

This also removes the previously backported patches as they are part
of 2.9.4 release and the missing fix is part of 2.9.5 release.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agosbc: fix license
Radek Dostál [Fri, 10 Nov 2017 12:11:05 +0000 (13:11 +0100)]
sbc: fix license

sbc library itself is licensed under LGPLv2.1 or higher as mentioned in
sbc/sbc.h or any other file in sbc directory.

sbc test applications are licensed under GPLv2 or higher as mentioned in
src/sbcenc.c or any other file in src directory

Reported-by: Vladimir Koutny <vladimir.koutny@streamunlimited.com>
Signed-off-by: Radek Dostál <radek.dostal@streamunlimited.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agosbc: move examples to their own package
Radek Dostál [Fri, 10 Nov 2017 12:11:04 +0000 (13:11 +0100)]
sbc: move examples to their own package

Suggested-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Radek Dostál <radek.dostal@streamunlimited.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agoca-certificates: Add /etc to SYSROOT_DIRS
Patrick Vacek [Thu, 9 Nov 2017 14:03:10 +0000 (15:03 +0100)]
ca-certificates: Add /etc to SYSROOT_DIRS

For recipes that depend on native ca-certificates.crt, /etc should be
added to the list of directories that automatically populate the
sysroot, otherwise the file may not be there.

Signed-off-by: Patrick Vacek <patrick@advancedtelematic.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agogo: Fix build with PIE on musl
Khem Raj [Fri, 6 Oct 2017 18:40:08 +0000 (11:40 -0700)]
go: Fix build with PIE on musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agodhcp: fix build issue with libxml2 support
Awais Belal [Wed, 8 Nov 2017 07:58:41 +0000 (12:58 +0500)]
dhcp: fix build issue with libxml2 support

A missing case breaks the build when libxml2 is
required and found appropriately. The third argument
to the function AC_SEARCH_LIB is action-if-found which
was mistakenly been used for the case where the library
is not found and hence breaks the configure phase
where it shoud actually pass.
We now pass on silently when action-if-found is
executed.

Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agodhcp: use ${BPN} instead of ${PN} for user
Dan Dedrick [Wed, 8 Nov 2017 01:12:20 +0000 (20:12 -0500)]
dhcp: use ${BPN} instead of ${PN} for user

${PN} will include additional prefixes, such as lib32-, which are not
actually a part of the user that is being added. This was creating an unused
user and possibly missing the actually intended user. By using ${BPN} this
will remove all additional extra information and consistently be "dhcp".

Signed-off-by: Dan Dedrick <ddedrick@lexmark.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agopackage_ipk.bbclass: handle only whitespace in PACKAGE_EXCLUDE
Andre McCurdy [Wed, 25 Oct 2017 04:55:04 +0000 (21:55 -0700)]
package_ipk.bbclass: handle only whitespace in PACKAGE_EXCLUDE

If PACKAGE_EXCLUDE is constructed using _append then it's possible
that the final value will contain only a space. Currently that
results in build failures due to an invalid opkg command line.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agoinitramfs-live-install: Add aarch64 arch to COMPATIBLE_HOST.
Peter Griffin [Wed, 8 Nov 2017 10:50:39 +0000 (10:50 +0000)]
initramfs-live-install: Add aarch64 arch to COMPATIBLE_HOST.

So that we can use this on aarch64 with HiKey board.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agobase.bbclass: increase indent in get_layers_branch_rev() and buildcfg_vars()
Andre McCurdy [Thu, 9 Nov 2017 02:53:34 +0000 (18:53 -0800)]
base.bbclass: increase indent in get_layers_branch_rev() and buildcfg_vars()

Although it may not appeal so much to users to prefer 80x24 consoles,
the general trend is for screens to get bigger and the current output
has started to look a little cramped on a modern HD display.

Increasing from 17 to 20 is obviously arbitrary, but does give enough
space to cleanly display layers such as "meta-nodejs-contrib" and
"meta-virtualization" while still keeping the output fairly compact.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agolib/oe/recipeutils: fix line splitting in patch_recipe_*
Paul Eggleton [Wed, 1 Nov 2017 00:49:44 +0000 (13:49 +1300)]
lib/oe/recipeutils: fix line splitting in patch_recipe_*

If a value was split over multiple lines (e.g. as SRC_URI usually is)
then we were inserting the value as one item in the lines list with
newlines between each line. There's nothing wrong with this if you're
writing the list out to a file, but if you want to generate a patch (as
patch_recipe_file() will do if the patch parameter is set to True) then
the diff output looks a bit odd. Split the value before adding it to the
lines list to resolve this.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agolib/oe/recipeutils: fix find_layerdir() to return absolute paths
Paul Eggleton [Tue, 7 Nov 2017 20:45:06 +0000 (09:45 +1300)]
lib/oe/recipeutils: fix find_layerdir() to return absolute paths

find_layerdir() should really return absolute paths, so make it do so.
This fixes devtool finish not deleting files it should do after devtool
upgrade if the specified path is relative, since the devtool finish code
was assuming that find_layerdir() was returning an absolute path.

Fixes [YOCTO #12318].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agorecipetool: ignore incidental kernel module source
Paul Eggleton [Wed, 20 Sep 2017 04:43:33 +0000 (16:43 +1200)]
recipetool: ignore incidental kernel module source

If the source tree happens to contain a kernel module as an example, a
test or under a "contrib" directory then we shouldn't be picking it up
and making the determination that the entire thing is a kernel module.

An example that triggered this is zstd, which ships a kernel module
under contrib/linux-kernel:

  https://github.com/facebook/zstd

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agorecipetool: pass absolute source tree path to plugins
Paul Eggleton [Wed, 20 Sep 2017 00:03:39 +0000 (12:03 +1200)]
recipetool: pass absolute source tree path to plugins

We shouldn't be passing a relative path to the plugins if that's what's
been specified on the recipetool command line.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agosystemd: Fix build with musl/mips64
Khem Raj [Fri, 27 Oct 2017 20:16:03 +0000 (13:16 -0700)]
systemd: Fix build with musl/mips64

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agooeqa/runner: Pass the value of buffer, don't force to True
Richard Purdie [Thu, 9 Nov 2017 13:23:04 +0000 (13:23 +0000)]
oeqa/runner: Pass the value of buffer, don't force to True

The value could be False in which case we should pass that through.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agooeqa: Markup further tests for stdout/stderr buffering
Richard Purdie [Thu, 9 Nov 2017 12:10:16 +0000 (12:10 +0000)]
oeqa: Markup further tests for stdout/stderr buffering

This further cleans up the output of oe-selftest so that runqemu output
is hidden unless tests fail.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agotestimage: Ensure full logs are shown for failures
Richard Purdie [Fri, 10 Nov 2017 14:41:32 +0000 (14:41 +0000)]
testimage: Ensure full logs are shown for failures

Currently, the fact an error message is shown means the rest of the
task logs are suppressed. In this case we don't want that as it hides
the real errors and useful information. Therefore override this behaviour.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agomaintainers.inc: add Otavio Salvador for go-dep
Alexander Kanavin [Tue, 10 Oct 2017 13:05:10 +0000 (16:05 +0300)]
maintainers.inc: add Otavio Salvador for go-dep

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agomaintainers.inc: add Khem Raj for libmnl
Alexander Kanavin [Tue, 10 Oct 2017 13:03:32 +0000 (16:03 +0300)]
maintainers.inc: add Khem Raj for libmnl

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agogtk-doc.bbclass: correctly make the list of directories with shared libraries
Alexander Kanavin [Thu, 5 Oct 2017 14:16:11 +0000 (17:16 +0300)]
gtk-doc.bbclass: correctly make the list of directories with shared libraries

Previously it was working only if only one shared library was found, and
broke when there were several.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agooeqa/target/ssh: Drop command/output logging to debug level
Richard Purdie [Thu, 9 Nov 2017 10:56:13 +0000 (10:56 +0000)]
oeqa/target/ssh: Drop command/output logging to debug level

This ensures the console is kept clear of confusing output but that
the main logs contain good debugging information.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agooeqa: Clean up logger handling
Richard Purdie [Wed, 8 Nov 2017 18:17:17 +0000 (18:17 +0000)]
oeqa: Clean up logger handling

The logger handling in oeqa was confused at best. This patch:

a) Passes in a logger through various qemu runner pieces
b) Uses that logger consistently in the code
c) Creates a logger for QemuRunner outside the bitbake namespace
   meaning we don't conflict with the tinfoil logging changes

The result of this is more consistency. For runtime tests in testimage,
the logs always contain the debug info, nothing is shwon on the console.
For the oe-selftests, logs are intercepted and only shown if the test
fails.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agotestimage: Pass the logger into OERuntimeTestContextExecutor.getTarget()
Richard Purdie [Wed, 8 Nov 2017 18:15:02 +0000 (18:15 +0000)]
testimage: Pass the logger into OERuntimeTestContextExecutor.getTarget()

I have no idea why we didn't do this but it means the code has nowhere
to log to unless we do this. This means we can then use the logger
to log data to the task logs.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agooeqa/qemurunner: Use logger.debug, not logger.info
Richard Purdie [Wed, 8 Nov 2017 18:13:24 +0000 (18:13 +0000)]
oeqa/qemurunner: Use logger.debug, not logger.info

Bitbake logs info messages to the console. These messages are really
there as debugging information. At the debug level, they will be shown
in failure logs and in the task logs but not on the console which
is what we want in this case.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agooeqa/targetcontrol: Drop unused get_target_controller function
Richard Purdie [Wed, 8 Nov 2017 14:14:24 +0000 (14:14 +0000)]
oeqa/targetcontrol: Drop unused get_target_controller function

This funciton appears completely unused, drop it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agooeqa/runqemu: Only show stdout/stderr upon test failure
Richard Purdie [Wed, 8 Nov 2017 14:03:28 +0000 (14:03 +0000)]
oeqa/runqemu: Only show stdout/stderr upon test failure

In general we don't need to see the output of runqemu however if it fails
we do. Use the buffer option that already exists in TestResult but allow
us to trigger it on a per test basis.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agoqemurunner: Ensure logging handler is removed
Richard Purdie [Tue, 7 Nov 2017 23:23:54 +0000 (23:23 +0000)]
qemurunner: Ensure logging handler is removed

If we don't remove the handler we end up with duplicate log messages
which is undesireable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agosystemd: Fix build on musl
Khem Raj [Fri, 27 Oct 2017 05:10:42 +0000 (22:10 -0700)]
systemd: Fix build on musl

Add needed patches for portability across glibc/musl
enable systemd on musl too

Disable utmp,ldconfig,nss,resolved,localed for musl
which is not supported on musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agoe2fsprogs-ptest: improve reproducibility
Juro Bystricky [Wed, 25 Oct 2017 23:00:26 +0000 (16:00 -0700)]
e2fsprogs-ptest: improve reproducibility

Remove several Makefiles containing build host references.
While at it, also remove some additional files not needed for
testing.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agooe-build-perf-report-email.py: add images as MIME objects
Markus Lehtonen [Wed, 25 Oct 2017 11:39:38 +0000 (14:39 +0300)]
oe-build-perf-report-email.py: add images as MIME objects

Add images as separate MIME objects instead of directly embedding images
in the html (as base64 encoded pngs). This makes the emails better
suited for certain email servers/clients.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agogobject-introspection: improve reproducibility
Juro Bystricky [Tue, 24 Oct 2017 21:04:09 +0000 (14:04 -0700)]
gobject-introspection: improve reproducibility

Remove cross-compiler wrappers from the package, these contain numerous
build host references.
The wrappers are only needed for cross-compiling.

[YOCTO #11705]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agowic: Update canned-wks for systemd to use UUID everywhere
Tom Rini [Thu, 21 Sep 2017 17:46:17 +0000 (13:46 -0400)]
wic: Update canned-wks for systemd to use UUID everywhere

With systemd, the mounting of the swap partition is handled via systemd
and will mount it, regardless of if PARTUUID is parsed or not.  systemd
has a runtime dependency on util-linux-mount so PARTUUID for regular
mount points will be handled correctly.  Make all partitions that we add
to the image make use of UUIDs for maximum portability.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agowic: When using --use-uuid make sure that we update the fstab with PARTUUID
Tom Rini [Thu, 21 Sep 2017 17:46:16 +0000 (13:46 -0400)]
wic: When using --use-uuid make sure that we update the fstab with PARTUUID

When we have been told to use the UUID we should also update the fstab
to make use of PARTUUID instead of hard-coding the device in question.
This will make the resulting image much more portable.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agosystemctl-native: add target.wants to target regex
Martin Kelly [Mon, 16 Oct 2017 16:31:42 +0000 (09:31 -0700)]
systemctl-native: add target.wants to target regex

The regex for acceptable systemd WantedBy/RequiredBy targets does not include
target.wants, so a line like this:

WantedBy=multi-user.target.wants

gets silently ignored, even though it works fine on a real system.

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agodpkg: use snapshot.debian.org
Ross Burton [Tue, 7 Nov 2017 13:18:18 +0000 (13:18 +0000)]
dpkg: use snapshot.debian.org

Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agocurl_7.54.1.bb: improve reproducibility
Juro Bystricky [Mon, 30 Oct 2017 17:49:46 +0000 (10:49 -0700)]
curl_7.54.1.bb: improve reproducibility

Improve reproducible build of curl-dev and curl-dbg packages.

curl-dev: Correctly remove build host references from curl-config
curl-dbg: Do not generate time stamps in files generated by mkhelp.pl

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agosystemd: remove useless options for mips4
Chen Qi [Fri, 27 Oct 2017 09:43:50 +0000 (17:43 +0800)]
systemd: remove useless options for mips4

Looking back the history, we had problem with systemd on qemumips64
which is also related to compilation flags. We solved that by using
tweaking FULL_OPTIMIZATION for mips64 to have "-fno-tree-switch-conversion
-fno-tree-tail-merge".

Now systemd has been upgraded to 234, and we don't have the above problem
any more, thus removing these flags.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agorpm: remove --sysroot from macros on target
Joe Slater [Fri, 13 Oct 2017 22:40:25 +0000 (15:40 -0700)]
rpm: remove --sysroot from macros on target

We do not want to specify --sysroot when defining __cc
used on a target.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agolibsolv: fix a kernel-devsrc installation issue
Ming Liu [Mon, 2 Oct 2017 05:25:42 +0000 (07:25 +0200)]
libsolv: fix a kernel-devsrc installation issue

We encountered a problem when installing kernel-devsrc package on a
intel-x86 target, as follows:
$ dnf install kernel-devsrc
| Installing : kernel-devsrc-1.0-r0.0.intel_corei7_64 1/1
| failed loading RPMDB
| The downloaded packages were saved in cache until the next successful transaction.
| You can remove cached packages by executing 'dnf clean packages'.

It can be fixed by increasing MAX_HDR_CNT and MAX_HDR_DSIZE in libsolv
per test.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agogrub_2.02.bb: improve reproducibility
Juro Bystricky [Mon, 25 Sep 2017 23:36:08 +0000 (16:36 -0700)]
grub_2.02.bb: improve reproducibility

Remove several build host references from modinfo.sh files.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agopython: add PACKAGECONFIG for Berkeley DB module
Ross Burton [Wed, 1 Nov 2017 00:28:34 +0000 (00:28 +0000)]
python: add PACKAGECONFIG for Berkeley DB module

The bsddb module is deprecated and requires an old version of Berkeley DB that
some may be unhappy with even shipping, so expose a way to disable the module.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agodb: change types to avoid headers changing between architectures
Ross Burton [Wed, 1 Nov 2017 13:52:19 +0000 (13:52 +0000)]
db: change types to avoid headers changing between architectures

Triggered by looking at why Python doesn't find db.h (because it greps db.h for
a regex, and db.h is actually a oe_multilib_header wrapper) I realised that the
only reason we have to oe_multilib_header db.h is because one typedef is
different between 32-bit and 64-bit architectures.

However, the typedef is for a 64-bit integer so instead of using long (64-bit)
or long long (32-bit), just use int64_t.  Some of the overly complicated
configure tests need to be deleted after this change but that is safe as we're
building in a controlled environment and can assume int64_t exists.

With this done the header doesn't change between architectures, and it doesn't
need to be wrapped by oe_multilib_header.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agobash-completion: remove rfkill file that util-linux provides
Chen Qi [Mon, 6 Nov 2017 06:10:17 +0000 (14:10 +0800)]
bash-completion: remove rfkill file that util-linux provides

Remove the rfkill bash completion file that util-linux provides
to avoid conflicts.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agosshcontrol.py: in copy_to() always use scp
Erik Botö [Mon, 6 Nov 2017 18:13:06 +0000 (10:13 -0800)]
sshcontrol.py: in copy_to() always use scp

The current implementation is broken when the localpath is a link.
Then only a symlink would be created on the target, instead of copying
the actual file.

[YOCTO #11524]

Signed-off-by: Erik Botö <erik.boto@pelagicore.com>
Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agomasterimage.py: rename parameter "params" in start() to "extra_bootparams"
Erik Botö [Mon, 6 Nov 2017 18:13:05 +0000 (10:13 -0800)]
masterimage.py: rename parameter "params" in start() to "extra_bootparams"

This matches how it is called, and how it is named in qmeu target.

[YOCTO #11524]

Signed-off-by: Erik Botö <erik.boto@pelagicore.com>
Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agomasterimage.py: fix stop()
Erik Botö [Mon, 6 Nov 2017 18:13:04 +0000 (10:13 -0800)]
masterimage.py: fix stop()

The stop() function is called in the context of the masterimage,
so self.master should be used instead of self.connection which is
undefined at that time.

[YOCTO #11524]

Signed-off-by: Erik Botö <erik.boto@pelagicore.com>
Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agomasterimage.py: fix issue with calling reboot on masterimage/DUT
Erik Botö [Mon, 6 Nov 2017 18:13:03 +0000 (10:13 -0800)]
masterimage.py: fix issue with calling reboot on masterimage/DUT

On systemd systems calling reboot over an ssh connection doesn't
return as expected causing an exception, therefore wrap the call
to reboot in order to avoid this issue.

Also sync the filesystems before rebooting cause otherwise, it will be
done as part of the reboot and could take a very long time and testimage
will fail to access the machine. This issue was observed consistently with
one of our rootfs at Pelagicore.

[YOCTO #11524]

Signed-off-by: Erik Botö <erik.boto@pelagicore.com>
Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agoselftest/imagefeatures: add basic test for useradd-staticids
Ross Burton [Fri, 29 Sep 2017 16:10:16 +0000 (17:10 +0100)]
selftest/imagefeatures: add basic test for useradd-staticids

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agooeqa/core/loader: Make _built_modules_dict() support packages correctly
Peter Kjellerstedt [Fri, 29 Sep 2017 16:06:11 +0000 (18:06 +0200)]
oeqa/core/loader: Make _built_modules_dict() support packages correctly

For test modules in a package, e.g., oelib.license, running
`oe-selftest -r oelib.license` or `oe-selftest -r
oelib.license.TestSimpleCombinations` would fail with a message that
the specified test cases could not be found. This was due to the
parsing in _built_modules_dict(), which failed to distinguish between
<package>.<module>.<class> and <module>.<class>.<testcase> and treated
both cases as the latter.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agooeqa/selftest/runtime_test: use console in postinst_rootfs_and_boot
Ross Burton [Mon, 6 Nov 2017 17:54:48 +0000 (17:54 +0000)]
oeqa/selftest/runtime_test: use console in postinst_rootfs_and_boot

Use a console login not SSH for simplicity.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agoimage.bbclass: let do_image depend on do_populate_lic of EXTRA_IMAGEDEPENDS
Ming Liu [Tue, 26 Sep 2017 12:31:16 +0000 (14:31 +0200)]
image.bbclass: let do_image depend on do_populate_lic of EXTRA_IMAGEDEPENDS

The licenses of EXTRA_IMAGEDEPENDS recipes are being referenced in
image postcommand write_deploy_manifest, but a dependency is missing
between do_image and do_populate_lic of EXTRA_IMAGEDEPENDS recipes,
this leads some license files not present when write_deploy_manifest
runs, hence will cause build errors.

Fixed by letting do_image depend on do_populate_lic of
EXTRA_IMAGEDEPENDS recipes.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agoexternalsrc: fix ExpansionError if the source dir does not exist yet
Luca Ceresoli [Fri, 29 Sep 2017 08:39:24 +0000 (10:39 +0200)]
externalsrc: fix ExpansionError if the source dir does not exist yet

The externalsrc class code assumes that the source directory
(EXTERNALSRC) exists before bitbake is called. Otherwise do_configure
will fail obviously since externalsrc does not fetch anything.

Commit 3ca6085729d9 ("externalsrc: Handle .git not being a directory")
changed this behaviour. Now on a missing EXTERNALSRC directory we get
a bb.data_smart.ExpansionError during _parsing_, way before
do_configure can be run.

This new behaviour creates two problems:

 * First, there error message is very cryptic (and it's hard to
   provide a better message since no task is ever run):

     ERROR: ExpansionError during parsing /<...>/<...>.bb
     Traceback (most recent call last):
     bb.data_smart.ExpansionError: Failure expanding variable do_compile[file-checksums], expression was ${@srctree_hash_files(d)} which triggered exception FileNotFoundError: [Errno 2] No such file or directory: '<...>'

 * Second, this prevents creating a class based on externalsrc that
   automatically fetches the code in EXTERNALSRC before do_compile
   runs.

Fix both problems by simply calling git with '-C ${EXTERNALSRC}'
instead of calling git inside the non-existing directory. This changes
from a bb.data_smart.ExpansionError to a
subprocess.CalledProcessError, which is in line with what's actually
going on: git is telling us it can't find the git dir.

Also remove a comment that does not apply anymore.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Joshua Watt <jpewhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agoimage.bbclass: Fix 'vardepsexclude' mechanism for image_cmd_${FSTYPE}
Igor Romanov [Thu, 28 Sep 2017 18:08:31 +0000 (21:08 +0300)]
image.bbclass: Fix 'vardepsexclude' mechanism for image_cmd_${FSTYPE}

Current mechanism doesn't allow to use any non-determenistic variable, except 'DATE' and 'DATETIME', inside IMAGE_CMD_${FSTYPE} prototype.

Passing 'vardepsexclude' values from IMAGE_CMD_${FSTYPE}, so users will be able to avoid taskhash mismatch problems.

Signed-off-by: Igor Romanov <i.romanov@inango-systems.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agouseradd-staticids: explain how to fix the the problem
Patrick Ohly [Thu, 19 Oct 2017 07:13:26 +0000 (09:13 +0200)]
useradd-staticids: explain how to fix the the problem

When a distro uses useradd-staticids.bbclass and some developer
unfamiliar with the static ID mechanism tries to add a recipe which
needs new IDs, the resulting error or warning is typically not
something that the developer will understand.

Even experienced developers do not get enough information. They first
must find out whether the missing ID is for a system user or group,
then locate the file(s) in which the ID could be added. Both of this
is now part of the message:

ERROR: .../meta/recipes-extended/cronie/cronie_1.5.1.bb: cronie -
cronie: system groupname crontab does not have a static ID defined.
Add crontab to one of these files: /.../conf/distro/include/my-distro-group

The case that no file was found is also handled:

ERROR: .../meta/recipes-extended/cronie/cronie_1.5.1.bb: cronie -
cronie: system groupname crontab does not have a static ID defined.
USERADD_GID_TABLES file(s) not found in BBPATH: files/group

It would be nice if the error message could also list the range in
which a new ID needs to be allocated, but /etc/login.defs isn't
available at the time of creating the message, so that part is still
something that a developer needs to know.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agouseradd-staticids: skip recipes without static IDs
Patrick Ohly [Tue, 26 Sep 2017 07:29:47 +0000 (09:29 +0200)]
useradd-staticids: skip recipes without static IDs

When enabling useradd-staticids.bbclass, one has to define static IDs
for all recipes in a world build, otherwise those without static IDs
generate parse errors or warnings, depending on USERADD_ERROR_DYNAMIC.

Defining unused IDs is a lot of work and clutters the passwd/group
file of a distro.

Distros which want to avoid this can now set USERADD_ERROR_DYNAMIC =
"skip" and recipes which would have triggered a message then silently
get disabled. Only trying to build them shows the error message:

$ bitbake apt
...
ERROR: Nothing PROVIDES 'apt'
ERROR: apt was skipped: apt - apt: username _apt does not have a static ID defined.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agofeature-arm-vfp.inc: drop unnecessary extra space from TUNE_CCARGS
Andre McCurdy [Mon, 16 Oct 2017 17:37:34 +0000 (10:37 -0700)]
feature-arm-vfp.inc: drop unnecessary extra space from TUNE_CCARGS

The trailing space added to TUNE_CCARGS when appending -mfpu=XXX is
unnecessary and leads to a double space in the final value.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agomaintainers.inc: update maintainership
Yi Zhao [Tue, 7 Nov 2017 06:12:05 +0000 (14:12 +0800)]
maintainers.inc: update maintainership

Reassign Dengke's recipes to Yi Zhao.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agooeqa/selftest/runtime_test: fix postinst_rootfs_and_boot
Ross Burton [Mon, 6 Nov 2017 17:54:48 +0000 (17:54 +0000)]
oeqa/selftest/runtime_test: fix postinst_rootfs_and_boot

This test overrides IMAGE_FEATURES but failed to include package-management,
which is essential for postinsts to work under dpkg.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agolib/oe/sstatesig: fix wildcard matching wrong task signature files
Paul Eggleton [Fri, 3 Nov 2017 03:16:10 +0000 (16:16 +1300)]
lib/oe/sstatesig: fix wildcard matching wrong task signature files

With a '*' as a wildcard for the signature here we can also match a
portion of the task name with the result that we may match a sigdata
file for the wrong task. Luckily the signature is always the same
length - 32 characters - so we can simply use 32 '?' characters instead.
(A regex would have been another alternative, but the wildcard should be
effective and I felt like a regex would complicate the code more than
this solution).

Fixes [YOCTO #11763].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agonativesdk-packagegroup-sdk-host: remove redundant LICENSE
Robert Berger [Mon, 30 Oct 2017 17:46:21 +0000 (19:46 +0200)]
nativesdk-packagegroup-sdk-host: remove redundant LICENSE

*) packagegroup class sets a default value for LICENSE
*) usually packagegroups don't contain a LICENSE
   and if they do it's many times a copy/paste and doesn't
   reflect the license of the packages included in the
   packagegroup

Signed-off-by: Robert Berger <robert.berger@ReliableEmbeddedSystems.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agooeqa/selftest/runtime: force empty root password, use helpers to access qemu
Ross Burton [Tue, 31 Oct 2017 20:59:09 +0000 (20:59 +0000)]
oeqa/selftest/runtime: force empty root password, use helpers to access qemu

Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agowic: misc.py: Use mmd from mtools instead of syslinux
Saul Wold [Mon, 23 Oct 2017 23:59:25 +0000 (16:59 -0700)]
wic: misc.py: Use mmd from mtools instead of syslinux

mtools already provides a suite of msdos utilities, switch to this
one also.  This could allow for future changes to reduce wic's
dependecies.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agogoarch: There is no GOARCH defined for mips64-n32
Joe Slater [Tue, 17 Oct 2017 22:03:25 +0000 (15:03 -0700)]
goarch: There is no GOARCH defined for mips64-n32

Defeat building for mipsarchn32 because there is no corresponding
GOARCH.  Neither "mips" nor "mips64" allows go-runtime to compile.
Existing mips32 code assumes the o32 ABI.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agokexec-tools: add systemd support for kdump
Wenlin Kang [Tue, 17 Oct 2017 02:21:29 +0000 (10:21 +0800)]
kexec-tools: add systemd support for kdump

Add file kdump.service to support kdump in systemd.

Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
7 years agolib/oe/terminal.py: use an absolute path to execute oe-gnome-terminal-phonehome
Ming Liu [Fri, 13 Oct 2017 11:26:16 +0000 (13:26 +0200)]
lib/oe/terminal.py: use an absolute path to execute oe-gnome-terminal-phonehome

A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is
the default terminal, when I run any of the tasks:
bitbake busybox -c menuconfig/devshell/devpyshell
bitbake virtual/kernel -c menuconfig/devshell/devpyshell

I got a error as follows:
"Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)"

Seems the environment of the process calling Popen is not passed to the
child process, this behaviour is a known issue in Python bug tracker:
http://bugs.python.org/issue8557

It could be fixed by using an absolute path instead per test.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2117c148ef07d84bc605768e3b3671b0126b9337)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agouseradd.bbclass: print a warn when useradd not found
Robert Yang [Mon, 23 Oct 2017 02:56:35 +0000 (10:56 +0800)]
useradd.bbclass: print a warn when useradd not found

Exit quietly makes it very hard for debugging when user is not added as
expected, print a warning helps a lot.

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>
(cherry picked from commit 057885ed6f22781960bce4e082e3aa96e126764c)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agobind: Convert from ftp to https urls
Richard Purdie [Sun, 5 Nov 2017 23:52:59 +0000 (23:52 +0000)]
bind: Convert from ftp to https urls

The ftp protocol is dated and problematic. Since https is available, lets
use that instead, making new users chances of successful builds higher.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f24a29fcba98ceff08c13b0f029be93995f1deed)

Fix merge conflict do to version diff
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agorunqemu: correct rootfs setup to boot an ide hddimg
Thomas Perrot [Sun, 5 Nov 2017 22:43:29 +0000 (23:43 +0100)]
runqemu: correct rootfs setup to boot an ide hddimg

vm_drive variable is malformed when the drive type is an ide device.

Signed-off-by: Thomas Perrot <thomas.perrot@tupi.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 88d7b17871fe8340ab7fd5c901d3a535ae098c3e)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agotzdata: update 2017c
Armin Kuster [Fri, 3 Nov 2017 19:54:36 +0000 (12:54 -0700)]
tzdata: update 2017c

LICENSE changed do to rewording
https://github.com/eggert/tz/commit/7097a652778d35acf747d14f8bf7b3ced479bbc0#diff-9879d6db96fd29134fc802214163b95a

  Briefly:
  Northern Cyprus switches from +03 to +02/+03 on 2017-10-29.
  Fiji ends DST 2018-01-14, not 2018-01-21.
  Namibia switches from +01/+02 to +02 on 2018-04-01.
  Sudan switches from +03 to +02 on 2017-11-01.
  Tonga likely switches from +13/+14 to +13 on 2017-11-05.
  Turks & Caicos switches from -04 to -05/-04 on 2018-11-04.
  A new file tzdata.zi now holds a small text copy of all data.
  The zic input format has been regularized slightly.

  Changes to future time stamps

    Northern Cyprus has decided to resume EU rules starting
    2017-10-29, thus reinstituting winter time.

    Fiji ends DST 2018-01-14 instead of the 2018-01-21 previously
    predicted.  (Thanks to Dominic Fok.)  Adjust future predictions
    accordingly.

    Namibia will switch from +01 with DST to +02 all year on
    2017-09-03 at 02:00.  This affects UT offsets starting 2018-04-01
    at 02:00.  (Thanks to Steffen Thorsen.)

    Sudan will switch from +03 to +02 on 2017-11-01.  (Thanks to Ahmed
    Atyya and Yahia Abdalla.)  South Sudan is not switching, so
    Africa/Juba is no longer a link to Africa/Khartoum.

    Tonga has likely ended its experiment with DST, and will not
    adjust its clocks on 2017-11-05.  Although Tonga has not announced
    whether it will continue to observe DST, the IATA is assuming that
    it will not.  (Thanks to David Wade.)

    Turks & Caicos will switch from -04 all year to -05 with US DST on
    2018-03-11 at 03:00.  This affects UT offsets starting 2018-11-04
    at 02:00.  (Thanks to Steffen Thorsen.)

  Changes to past time stamps

    Namibia switched from +02 to +01 on 1994-03-21, not 1994-04-03.
    (Thanks to Arthur David Olson.)

    Detroit did not observe DST in 1967.

    Use railway time for Asia/Kolkata before 1941, by switching to
    Madras local time (UT +052110) in 1870, then to IST (UT +0530) in
    1906.  Also, treat 1941-2's +0630 as DST, like 1942-5.

    Europe/Dublin's 1946 and 1947 fallback transitions occurred at
    02:00 standard time, not 02:00 DST.  (Thanks to Michael Deckers.)

    Pacific/Apia and Pacific/Pago_Pago switched from Antipodean to
    American time in 1892, not 1879.  (Thanks to Michael Deckers.)

    Adjust the 1867 transition in Alaska to better reflect the
    historical record, by changing it to occur on 1867-10-18 at 15:30
    Sitka time rather than at the start of 1867-10-17 local time.
    Although strictly speaking this is accurate only for Sitka,
    the rest of Alaska's blanks need to be filled in somehow.

    Fix off-by-one errors in UT offsets for Adak and Nome before 1867.
    (Thanks to Michael Deckers.)

    Add 7 s to the UT offset in Asia/Yangon before 1920.

  Changes to zone names

    Remove Canada/East-Saskatchewan from the 'backward' file, as it
    exceeded the 14-character limit and was an unused misnomer anyway.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 77a8256d9cbfe24d470aac9b4cc2910a41ca0ee8)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
7 years agotzcode-native: update to 2017c
Armin Kuster [Fri, 3 Nov 2017 19:54:35 +0000 (12:54 -0700)]
tzcode-native: update to 2017c

LICENSE changes do to rewording
https://github.com/eggert/tz/commit/7097a652778d35acf747d14f8bf7b3ced479bbc0#diff-9879d6db96fd29134fc802214163b95a

Backported to fixes from upstream too.

Changes to code

    zic and the reference runtime now reject multiple leap seconds
    within 28 days of each other, or leap seconds before the Epoch.
    As a result, support for double leap seconds, which was
    obsolescent and undocumented, has been removed.  Double leap
    seconds were an error in the C89 standard; they have never existed
    in civil timekeeping.  (Thanks to Robert Elz and Bradley White for
    noticing glitches in the code that uncovered this problem.)

    zic now warns about use of the obsolescent and undocumented -y
    option, and about use of the obsolescent TYPE field of Rule lines.

    zic now allows unambiguous abbreviations like "Sa" and "Su" for
    weekdays; formerly it rejected them due to a bug.  Conversely, zic
    no longer considers non-prefixes to be abbreviations; for example,
    it no longer accepts "lF" as an abbreviation for "lastFriday".
    Also, zic warns about the undocumented usage with a "last-"
    prefix, e.g., "last-Fri".

    Similarly, zic now accepts the unambiguous abbreviation "L" for
    "Link" in ordinary context and for "Leap" in leap-second context.
    Conversely, zic no longer accepts non-prefixes such as "La" as
    abbreviations for words like "Leap".

    zic no longer accepts leap second lines in ordinary input, or
    ordinary lines in leap second input.  Formerly, zic sometimes
    warned about this undocumented usage and handled it incorrectly.

    The new macro HAVE_TZNAME governs whether the tzname external
    variable is exported, instead of USG_COMPAT.  USG_COMPAT now
    governs only the external variables "timezone" and "daylight".
    This change is needed because the three variables are not in the
    same category: although POSIX requires tzname, it specifies the
    other two variables as optional.  Also, USG_COMPAT is now 1 or 0:
    if not defined, the code attempts to guess it from other macros.

    localtime.c and difftime.c no longer require stdio.h, and .c files
    other than zic.c no longer require sys/wait.h.

    zdump.c no longer assumes snprintf.  (Reported by Jonathan Leffler.)

    Calculation of time_t extrema works around a bug in GCC 4.8.4
    (Reported by Stan Shebs and Joseph Myers.)

    zic.c no longer mistranslates formats of line numbers in non-English
    locales.  (Problem reported by Benno Schulenberg.)

    Several minor changes have been made to the code to make it a
    bit easier to port to MS-Windows and Solaris.  (Thanks to Kees
    Dekker for reporting the problems.)

  Changes to documentation and commentary

    The two new files 'theory.html' and 'calendars' contain the
    contents of the removed file 'Theory'.  The goal is to document
    tzdb theory more accessibly.

    The zic man page now documents abbreviation rules.

    tz-link.htm now covers how to apply tzdata changes to clients.
    (Thanks to Jorge Fábregas for the AIX link.)  It also mentions MySQL.

    The leap-seconds.list URL has been updated to something that is
    more reliable for tzdb.  (Thanks to Tim Parenti and Brian Inglis.)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 74af497f8d6b4e28d97c0f2cdb4ece90c2a6b8b5)
Signed-off-by: Armin Kuster <akuster808@gmail.com>