cve-check-tool-native do_populate_cve_db task was using deprecated NVD
xml data feeds, cve-update-db uses NVD json data feeds.
Sqlite database schema was updated to take into account CVSSv3 CVE
scores and operator in affected product versions.
A new META table was added to store the last modification date of the
NVD json data feeds.
Signed-off-by: Pierre Le Magourou <pierre.lemagourou@softbankrobotics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Wed, 19 Jun 2019 13:52:35 +0000 (14:52 +0100)]
uninative-tarball: Add libxcrypt-compat
This avoids sstate/uninative relocation issues where a binary was built against
a system with libcrypt.so.1 or libcrypt.so.2 and then run on the opposite by
ensuring both libraries are in uninative.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie [Wed, 19 Jun 2019 13:51:27 +0000 (14:51 +0100)]
libxcrypt-compat: Add recipe to build the obsolete APIs
Add a recipe which is able to build the obsolete APIs. This is mainly
to support uninative which needs to have both the new and obsolete APIs
available to support the different host combinations.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
When building x86->x86 the system will try to execute .so and related items
from the default PYTHONPATH. This will fail if the target CPU contains
instructions that the host CPU does not have, add CROSSPYTHONPATH
into PYTHONPATH so we can prepend the list to find correct libs.
File "/workdir/build/tmp/work/dbfp4-poky-linux/qv4l2/1.17.0+gitAUTOINC+95f39aae48-r0/recipe-sysroot-native/usr/lib/python3.7/site-packages/mesonbuild/dependencies/base.py", line 574, in _call_pkgbin
cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env, use_native)
File "/workdir/build/tmp/work/dbfp4-poky-linux/qv4l2/1.17.0+gitAUTOINC+95f39aae48-r0/recipe-sysroot-native/usr/lib/python3.7/site-packages/mesonbuild/dependencies/base.py", line 556, in _call_pkgbin_real
cmd = self.pkgbin.get_command() + "-native" + args
TypeError: can only concatenate list (not "str") to list
Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Ross Burton [Tue, 18 Jun 2019 15:12:29 +0000 (16:12 +0100)]
glib-2.0: fix host path appearing in gsocketclient-slow test script
Glib's build looks for the 'env' binary and embeds that path into the test
script, but thanks to hosttools this is /path/to/tmpdir/hosttools/env.
Fix this by hardcoding the path to env in the cross file.
Also as the cross file is only used in target builds only add it to SRC_URI for
target builds, so that changes to the cross file don't cause a rebuild of
glib-2.0-native.
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Adrian Bunk [Tue, 18 Jun 2019 19:59:45 +0000 (22:59 +0300)]
wireless-regdb: Add recipe
Since wpa-supplicant is provided,
the database of permitted frequencies should also be provided.
wireless-regdb-static should be used with kernel >= 4.15.
wireless-regdb can be used with older kernels and is mostly
irrelevant here, but keeping it in meta-networking would
create needless recipe duplication.
This package was previously in meta-networking.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Martin Jansa [Tue, 18 Jun 2019 21:45:34 +0000 (21:45 +0000)]
serf: stop scons trying to create directories in hosts rootfs
* since 1522f09a4d serf: cleanup recipe
serf.do_install fails in builds with multilib enabled (with
libdir=/usr/lib64 on host where /usr/lib64 doesn't exist)
DEBUG: Executing shell function do_install
scons: Reading SConscript files ...
PermissionError: [Errno 13] Permission denied: '/usr/lib64':
File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 158:
ENV = os.environ,
File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Environment.py", line 965:
variables.Update(self)
File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/__init__.py", line 227:
option.validator(option.key, env.subst('${%s}'%option.key), env)
File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/serf-1.3.9/SConstruct", line 60:
return PathVariable.PathIsDirCreate(key, val, env)
File "/TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/bin/../../usr/lib/python3.7/site-packages/SCons/Variables/PathVariable.py", line 101:
os.makedirs(val)
File "TOPDIR/BUILD/work/qemux86-signage-linux/serf/1.3.9-r0/recipe-sysroot-native/usr/lib/python3.7/os.py", line 221:
mkdir(name, mode)
ERROR: scons install execution failed.
* I don't know how exactly --install-sandbox is supposed to work but
in this case it's trying to mkdir /usr/lib64 on the host rootfs
which is clearly wrong and if I set LIBDIR together with
--install-sandbox then the install paths are prefixed with $D twice
in some cases (not for includedir and empty libdir at the end).
So in the end I think it was an issue caused by the custom path
validator in serf's SConstruct, removing that stops touching host
and the installed paths (including the paths inside libserf*.pc)
look correct
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Chen Qi [Wed, 19 Jun 2019 05:09:48 +0000 (13:09 +0800)]
target-sdk-provides-dummy: add libperl.so.5 to DUMMY_PROVIDES
Add libperl.so.5 to DUMMY_PROVIDES to avoid do_rootfs failure like
below.
Error:
Problem: package postgresql-11.3-r0.core2_32 requires libperl.so.5, but none of the providers can be installed
package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl provided by perl-5.30.0-r0.core2_32
package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl-module-strict provided by perl-5.30.0-r0.core2_32
This problem could be reproduced by add 'postgresql' to IMAGE_INSTALL
and then `bitbake core-image-minimal -c populate_sdk'.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Anuj Mittal [Wed, 19 Jun 2019 03:13:26 +0000 (11:13 +0800)]
runtime/cases/logrotate: make test more reliable
By default logrotate uses 'dateext' in logrotate.conf which results in a
date string being appended at the end of log name. In cases when a test
that installs configuration in logrotate.d is executed first (dnf for
example), it might result in errors when logrotate test is executed:
Changqing Li [Tue, 18 Jun 2019 07:46:56 +0000 (15:46 +0800)]
gcc-runtime: fix C++ header mapping for n32/x32 tune
The SDK was unable to find the C++ header pieces correctly since it's
using a generic compiler, not one specifically targeting the multilib
vendor prefix and default tune. This adds the right mapping to ensure
SDKs work as expected. And fix problem in below configurations:
For this configuration:
for target gcc-runtime, need to create symlink like mips64-poly-linux --> mips64-poky-linux-gnu32
for target lib64-gcc-runtime, need to create symlink like mips64-poly-linux/32 --> mips64-pokymllib64-linux
in order to avoid conflict during populate_sdk, create symlink for subfoler bits/ext for target gcc-runtime,
this is ugly, but seems no better way to cover all kinds of configuration.
single lib configuration:
MACHINE="qemumips64"
DEFAULTTUNE = "mips64-n32"
Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Martin Jansa [Tue, 18 Jun 2019 11:41:52 +0000 (11:41 +0000)]
base.bbclass: define PACKAGECONFIG_CONFARGS before only sometimes appending to it
* just to make sure it's expaned by bitbake before it gets
executed in shell
* e.g. with cmake.bbclass and cmake recipe (any recipe without
PACKAGECONFIG options have this issue) it looks like this:
bitbake -e cmake | grep EXTRA_OECMAKE=
EXTRA_OECMAKE=" -DCMAKE_DOC_DIR=share/doc/cmake-3.14
-DCMAKE_USE_SYSTEM_LIBRARIES=1 -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0
-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0
-DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 -DKWSYS_CHAR_IS_SIGNED=1
-DBUILD_CursesDialog=0 -DKWSYS_LFS_WORKS=1
\${PACKAGECONFIG_CONFARGS}"
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Stefano Babic [Tue, 18 Jun 2019 10:06:17 +0000 (12:06 +0200)]
systat: systemd never enables the service
Even if SYSTEMD_AUTO_ENABLE is set to "enable", the service is never
activated by systemd. The cause is the postinst function in the recipe:
pkg_postinst_${PN} () {
if [ -n "$D" ]; then
exit 0
fi
if [ -e /etc/init.d/populate-volatile.sh ]; then
/etc/init.d/populate-volatile.sh update
fi
}
This generates with activated systemd the following postinst script:
set -e
if [ -n "$D" ]; then
exit 0
fi
if [ -e /etc/init.d/populate-volatile.sh ]; then
/etc/init.d/populate-volatile.sh update
fi
OPTS=""
if [ -n "$D" ]; then
OPTS="--root=$D"
fi
if type systemctl >/dev/null 2>/dev/null; then
if [ -z "$D" ]; then
systemctl daemon-reload
fi
systemctl $OPTS enable sysstat.service
if [ -z "$D" -a "enable" = "enable" ]; then
systemctl --no-block restart sysstat.service
fi
fi
Due to the exit statement, systemctl is never called and the service is
never enabled in rootfs.
Invert the logic for the check to let run the rest of postinst script.
Signed-off-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Martin Jansa [Tue, 18 Jun 2019 07:51:31 +0000 (07:51 +0000)]
buildhistory: show time spent writting buildhistory
* especially when pushing longer history to slow remote git server or when
it timeouts during the push, it's useful to see where the time was actually
spent
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Yi Zhao [Tue, 18 Jun 2019 00:26:19 +0000 (08:26 +0800)]
shadow: fix configure error with dash
A configure error occurs when /bin/sh -> dash:
checking for is_selinux_enabled in -lselinux... yes
checking for semanage_connect in -lsemanage... yes
configure: 16322: test: yesyes: unexpected operator
Use "=" instead of "==" since dash doesn't support the latter.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* 0001-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch is upstreamed
* Add "crypto" PACKAGECONFIG for UBIFS crypto features
* One extra commit after 2.1.0 release tag is pulled in to fix openssl error
when "crypto" PACKAGECONFIG is not enabled:
| In file included from ../git/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c:25:
| ../git/ubifs-utils/mkfs.ubifs/mkfs.ubifs.h:49:10: fatal error: openssl/rand.h: No such file or directory
| #include <openssl/rand.h>
| ^~~~~~~~~~~~~~~~
| compilation terminated.
| Makefile:3457: recipe for target 'ubifs-utils/mkfs.ubifs/mkfs_ubifs-mkfs.ubifs.o' failed
| make: *** [ubifs-utils/mkfs.ubifs/mkfs_ubifs-mkfs.ubifs.o] Error 1
Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add runtime and ptest dependencies
* Add own run-ptest, since we need to run blib
License-Update: License lines moved up in README
Upstream release notes:
0.4229 - Tue Apr 16 00:49:45 CEST 2019
- Released 0.42_28 without changes
0.42_28 - Thu Apr 19 16:34:32 CEST 2018
- Replace "MOTIVATIONS" section with "COMPARISON" [Dan Brook]
- Update configure, build, test prereqs [Karen Etheridge]
0.4227 - Wed Dec 13 11:17:51 CET 2017
- Released 0.42_26 without changes
0.42_26 - Wed Dec 13 10:52:39 CET 2017
- Improve pureperl-only support (#119914) [Shoichi Kaji]
- Improve the documentation of Module::Build::Compat and dynamic_config [Dan Brook]
Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Tim Orling [Mon, 17 Jun 2019 22:11:41 +0000 (15:11 -0700)]
libxml-sax-perl: upgrade 1.00 -> 1.02
* Sort ptest dependencies alphabetically
Upstream release notes:
1.02 14 Jun 2019 Grant McLean
- Spelling fixes (patch from Ville Skyttä)
- Add repo location to metadata (patches from Ville Skyttä & Martin McGrath)
- Reorganise module files under lib/XML
- Regenerate MANIFEST using 'make manifest' to include missing test files
Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Tim Orling [Mon, 17 Jun 2019 22:11:40 +0000 (15:11 -0700)]
perl-rdepends.txt: more ptest dependencies fixes
* File::Spec::Unix runtime depends on Cwd and constant
* Module::Metadata runtime depends on version
* CPAN::Meta runtime depends on Parse::CPAN::Meta and JSON::PP
* ExtUtils::MakeMaker runtime depends on ExtUtils::MM_Unix
* TAP::Base runtime depends on TAP::Object
* TAP::Parser::SourceHandler::Perl runtime depends on
TAP::Parser::SourceHandler::Executable
* TAP::Harness runtime depends on TAP::Formatter::File
* TAP::Formatter::File runtime depends on TAP::Formatter::Session
and TAP::Formatter::Base
* Many TAP::Harness::* dependencies
* POD::Simple::Transcode runtime depends on POD::Simple::Transcode{dumb,smart}
Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Randy MacLeod [Sun, 16 Jun 2019 15:48:17 +0000 (11:48 -0400)]
bash: use setpriv, sed.sed to run ptests
The execscript test in bash fails when run with ptest-runner calling
'su', with the error:
bash: cannot set terminal process group (16036): Inappropriate ioctl for device
Even with ptest-runner fixed to make a child process use the right
process group, 'su' still results in the warning above. Use 'setpriv'
instead. 'runuser' was considered and works but depends on pam so it's
ruled out.
Now that all bash tests are run as a user, the patch:
fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch
can be removed. Also to create the account 'bashtest' in the
'run-ptest' script the bash-ptest must depend on 'shadow'. Also,
in 'run-ptest', ensure that the bash ptests are owned by the 'bashtest' user.
Add 'sed' as a dependency for ptests since tests/exp8.sub runs:
var=$'x\001y\177z'
declare -p var | sed -n l
and that results in:
sed.busybox: ""
sed.sed: declare -- var="x\001y\177z"$
This appears to be a feature that busybox sed has not implemented.
With this series of changes, bash-ptest for qemux86-64 passes
79 of 81 tests. The remaining failures are:
1. run-read:
# cat tests/read6.sub
# test read with a timeout of 0 -- input polling
# sleep with fractional seconds argument is not universal
echo abcde | { sleep 0.25 2>/dev/null ; read -t 0; }
echo $?
read -t 0 < $0
echo $?
read -t 0
echo $? <-- returns 1, when 0 is expected.
I can reproduce this on my workstation but only when using ptest-runner
and initially logging into the console as root. That's a little odd and
seems like I need to continue to improve ptest-runner.
This is a scheduler behaviour difference between the common case
on a workstation and the common case in qemu. The test case does
warn about the completion order not being deterministic so I plan
to ignore it.
>From tests/run-trap:
UNIX versions number signals and schedule processes differently.
If output differing only in line numbers is produced, please
do not consider this a test failure.
Still, it's notable and slightly odd that the common case output
is different.
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Randy MacLeod [Sun, 16 Jun 2019 15:48:16 +0000 (11:48 -0400)]
ptest-runner: enable child procs as session leader
When running the run-execscript bash ptest as a user rather than root, a warning:
bash: cannot set terminal process group (16036): Inappropriate ioctl for device
bash: no job control in this shell
contaminates the bash log files causing the test to fail. This happens only
when run under ptest-runner and not when interactively testing!
The changes made to fix this include:
1. Get the process group id (pgid) before forking,
2. Set the pgid in both the parent and child to avoid a race,
3. Find, open and set permission on the child tty, and
4. Allow the child to attach to controlling tty.
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Randy MacLeod [Sun, 16 Jun 2019 15:48:14 +0000 (11:48 -0400)]
util-linux: add setpriv utility
Enable the setpriv utility for targets only. It will be used in
the run-ptest script for bash and perhaps other packages where
the ptest code is expected to run as a user.
setpriv uses libcap-ng which doesn't build natively so disable
it for native* builds. Also, busybox has a setpriv implementation
so ensure that setpriv adheres to the alternatives scheme.
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Chen Qi [Mon, 17 Jun 2019 02:12:29 +0000 (10:12 +0800)]
context.py: fix skipping function
The current codes to skip test cases are logically correct, but they
do not work correctly in reality. It does skip the tests as the command
line argument specifies, but the related information is wrong.
e.g.
$ oe-selftest -R archiver bblayers runtime_test
2019-06-17 09:24:53,764 - oe-selftest - WARNING - meta-selftest layer not found in BBLAYERS, adding it
2019-06-17 09:25:06,309 - oe-selftest - INFO - Adding layer libraries:
2019-06-17 09:25:06,310 - oe-selftest - INFO - /buildarea5/chenqi/SWAT/poky/meta/lib
2019-06-17 09:25:06,310 - oe-selftest - INFO - /buildarea5/chenqi/SWAT/poky/meta-yocto-bsp/lib
2019-06-17 09:25:06,310 - oe-selftest - INFO - /buildarea5/chenqi/SWAT/poky/meta-selftest/lib
2019-06-17 09:25:06,312 - oe-selftest - INFO - Running bitbake -e to test the configuration is valid/parsable
2019-06-17 09:25:10,521 - oe-selftest - INFO - Adding: "include selftest.inc" in /buildarea5/chenqi/SWAT/poky/build-selftest/conf/local.conf
2019-06-17 09:25:10,521 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf
2019-06-17 09:25:10,522 - oe-selftest - INFO - test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver)
2019-06-17 09:25:10,522 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "runtime_test"'
2019-06-17 09:25:10,522 - oe-selftest - INFO - Skip by the command line argument "runtime_test"
2019-06-17 09:25:10,523 - oe-selftest - INFO - test_archiver_filters_by_type (archiver.Archiver)
2019-06-17 09:25:10,523 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "runtime_test"'
2019-06-17 09:25:10,523 - oe-selftest - INFO - Skip by the command line argument "runtime_test"
The archiver.Archiver.xxx tests should be skipped by 'archiver' command line
argument, not 'runtime_test'.
Change to use a function generator to achieve the desired effect. After the change,
the effect is as follows.
$ oe-selftest -R archiver bblayers runtime_test
2019-06-17 09:19:06,223 - oe-selftest - WARNING - meta-selftest layer not found in BBLAYERS, adding it
2019-06-17 09:19:19,598 - oe-selftest - INFO - Adding layer libraries:
2019-06-17 09:19:19,599 - oe-selftest - INFO - /buildarea5/chenqi/SWAT/poky/meta/lib
2019-06-17 09:19:19,599 - oe-selftest - INFO - /buildarea5/chenqi/SWAT/poky/meta-yocto-bsp/lib
2019-06-17 09:19:19,599 - oe-selftest - INFO - /buildarea5/chenqi/SWAT/poky/meta-selftest/lib
2019-06-17 09:19:19,602 - oe-selftest - INFO - Running bitbake -e to test the configuration is valid/parsable
2019-06-17 09:19:24,368 - oe-selftest - INFO - Adding: "include selftest.inc" in /buildarea5/chenqi/SWAT/poky/build-selftest/conf/local.conf
2019-06-17 09:19:24,368 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf
2019-06-17 09:19:24,369 - oe-selftest - INFO - test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver)
2019-06-17 09:19:24,369 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "archiver"'
2019-06-17 09:19:24,369 - oe-selftest - INFO - Skip by the command line argument "archiver"
2019-06-17 09:19:24,369 - oe-selftest - INFO - test_archiver_filters_by_type (archiver.Archiver)
2019-06-17 09:19:24,370 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "archiver"'
2019-06-17 09:19:24,370 - oe-selftest - INFO - Skip by the command line argument "archiver"
2019-06-17 09:19:24,370 - oe-selftest - INFO - test_archiver_filters_by_type_and_name (archiver.Archiver)
2019-06-17 09:19:24,370 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "archiver"'
2019-06-17 09:19:24,371 - oe-selftest - INFO - Skip by the command line argument "archiver"
2019-06-17 09:19:24,371 - oe-selftest - INFO - test_archiver_srpm_mode (archiver.Archiver)
2019-06-17 09:19:24,371 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "archiver"'
2019-06-17 09:19:24,372 - oe-selftest - INFO - Skip by the command line argument "archiver"
2019-06-17 09:19:24,372 - oe-selftest - INFO - test_bitbakelayers_add_remove (bblayers.BitbakeLayers)
2019-06-17 09:19:24,373 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "bblayers"'
2019-06-17 09:19:24,373 - oe-selftest - INFO - Skip by the command line argument "bblayers"
2019-06-17 09:19:24,373 - oe-selftest - INFO - test_bitbakelayers_createlayer (bblayers.BitbakeLayers)
2019-06-17 09:19:24,373 - oe-selftest - INFO - ... skipped 'Skip by the command line argument "bblayers"'
2019-06-17 09:19:24,374 - oe-selftest - INFO - Skip by the command line argument "bblayers"
[snip]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hongxu Jia [Mon, 17 Jun 2019 02:17:41 +0000 (22:17 -0400)]
openssh: fix potential signed overflow in pointer arithmatic
Pointer arithmatic results in implementation defined signed integer
type, so that 'd - dst’ in strlcat may trigger signed overflow if
pointer ‘d’ is near 0x7fffffff in 32 bits system. In case of ompilation
by gcc or clang with -ftrapv option, the overflow would generate
program abort.
Richard Purdie [Fri, 14 Jun 2019 07:44:15 +0000 (08:44 +0100)]
perl: Fix setgroup call regression from 5.30
The upgrade from 5.28 to 5.30 caused acl's ptests to fail. The issue is
that the new function changes the endptr to the end of the scanned number
and this now needs to be reset to the end of the string for each iteration
of the loop.
[YOCTO #13391]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Jaewon Lee [Wed, 12 Jun 2019 23:29:01 +0000 (16:29 -0700)]
devicetree.bbclass: Combine stderr into stdout to see actual dtc error
Previously the subprocess command to run dtc was not properly displaying
the error on console. Combining stderr into stdout for the dtc subprocess
so the actual error can be seen on console without having to open the
do_compile log.
For example, previously on a dtc error, just the following stack trace
and dtc command was being shown on console:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:devicetree_do_compile(d)
0003:
File:
function: devicetree_do_compile
0127: if not(os.path.isfile(dtspath)) or
not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)):
0128: continue # skip non-.dts files and non-overlay
files
0129: except:
0130: continue # skip if can't determine if overlay
*** 0131: devicetree_compile(dtspath, includes, d)
Anuj Mittal [Thu, 13 Jun 2019 00:28:48 +0000 (08:28 +0800)]
python3-scons: fix regex replacing python by python3
Match only the first line and match even if the line says python3.
Otherwise we end up with multiple 3s at the end after multiple
invocations of do_install on same source.
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alex Kiernan [Thu, 13 Jun 2019 06:07:45 +0000 (07:07 +0100)]
systemd: Backport OpenSSL BUF_MEM fix
Building `systemd-resolve` from systemd 242 with OpenSSL 1.1.1c and enabling
DNS over TLS ends up calling abort (on 32 bit armhf):
Program terminated with signal SIGABRT, Aborted.
#0 __libc_do_syscall () at libc-do-syscall.S:49
49 libc-do-syscall.S: No such file or directory.
(gdb) where
#0 __libc_do_syscall () at libc-do-syscall.S:49
#1 0xb6940ea4 in __libc_signal_restore_set (set=0xbec68b78) at ../sysdeps/unix/sysv/linux/internal-signals.h:84
#2 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:48
#3 0xb69336e0 in __GI_abort () at abort.c:79
#4 0xb6968428 in __libc_message (action=action@entry=do_abort, fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:181
#5 0xb696c7e6 in malloc_printerr (str=<optimized out>) at malloc.c:5352
#6 0xb696ca1a in munmap_chunk (p=<optimized out>) at malloc.c:2840
#7 0xb6bd1c4a in CRYPTO_clear_realloc (str=0xd0e59a, old_len=388, num=<optimized out>, file=0xb6c300dc "../../../../../../workspace/sources/openssl/crypto/buffer/buffer.c", line=135)
at ../../../../../../workspace/sources/openssl/crypto/mem.c:290
#8 0xb6b5da3a in BUF_MEM_grow_clean (str=0xcfb960, len=len@entry=393) at ../../../../../../workspace/sources/openssl/crypto/buffer/buffer.c:135
#9 0xb6b486a0 in mem_write (b=0xcf8300, in=0xd07c6b "\027\003\003", inl=24) at ../../../../../../workspace/sources/openssl/crypto/bio/bss_mem.c:235
#10 0xb6b45c86 in bwrite_conv (bio=<optimized out>, data=<optimized out>, datal=<optimized out>, written=0xbec68ec8) at ../../../../../../workspace/sources/openssl/crypto/bio/bio_meth.c:77
#11 0xb6b452d4 in bio_write_intern (written=0xbec68ec8, dlen=24, data=0xd07c6b, b=0xcf8300) at ../../../../../../workspace/sources/openssl/crypto/bio/bio_lib.c:343
#12 bio_write_intern (b=0xcf8300, data=0xd07c6b, dlen=24, written=0xbec68ec8) at ../../../../../../workspace/sources/openssl/crypto/bio/bio_lib.c:320
#13 0xb6b455b2 in BIO_write (b=<optimized out>, data=<optimized out>, dlen=<optimized out>) at ../../../../../../workspace/sources/openssl/crypto/bio/bio_lib.c:363
#14 0xb6cabd1a in ssl3_write_pending (s=s@entry=0xcfd2d8, type=type@entry=23, buf=buf@entry=0xcfcc28 "", len=len@entry=2, written=written@entry=0xbec698b0) at ../../../../../../workspace/sources/openssl/ssl/record/rec_layer_s3.c:1146
#15 0xb6cac72e in do_ssl3_write (s=s@entry=0xcfd2d8, type=type@entry=23, buf=buf@entry=0xcfcc28 "", pipelens=pipelens@entry=0xbec698b4, numpipes=numpipes@entry=1, create_empty_fragment=create_empty_fragment@entry=0,
written=written@entry=0xbec698b0) at ../../../../../../workspace/sources/openssl/ssl/record/rec_layer_s3.c:1107
#16 0xb6cac92e in ssl3_write_bytes (s=0xcfd2d8, type=23, buf_=0xcfcc28, len=<optimized out>, written=0xbec699c0) at ../../../../../../workspace/sources/openssl/ssl/record/rec_layer_s3.c:613
#17 0xb6cb1698 in ssl3_write (s=<optimized out>, buf=0xcfcc28, len=2, written=0xbec699c0) at ../../../../../../workspace/sources/openssl/ssl/s3_lib.c:4460
#18 0xb6cb87b2 in ssl_write_internal (s=<optimized out>, buf=buf@entry=0xcfcc28, num=num@entry=2, written=written@entry=0xbec699c0) at ../../../../../../workspace/sources/openssl/ssl/ssl_lib.c:1943
#19 0xb6cb8896 in SSL_write (s=<optimized out>, buf=buf@entry=0xcfcc28, num=num@entry=2) at ../../../../../../workspace/sources/openssl/ssl/ssl_lib.c:1957
#20 0x004ddac8 in dnstls_stream_write (stream=stream@entry=0xcfca60, buf=0xcfcc28 "", count=2) at ../git/src/resolve/resolved-dnstls-openssl.c:270
#21 0x004d8d5c in dns_stream_writev (s=s@entry=0xcfca60, iov=iov@entry=0xbec69b4c, iovcnt=iovcnt@entry=2, flags=flags@entry=0) at ../git/src/resolve/resolved-dns-stream.c:225
#22 0x004d9516 in on_stream_io (es=<optimized out>, fd=<optimized out>, revents=4, userdata=0xcfca60) at ../git/src/resolve/resolved-dns-stream.c:334
#23 0xb6e7f020 in source_dispatch (s=0xcf3658) at ../git/src/libsystemd/sd-event/sd-event.c:2821
#24 0xb6e806b0 in sd_event_dispatch (e=e@entry=0xced6d0) at ../git/src/libsystemd/sd-event/sd-event.c:3234
#25 0xb6e807f6 in sd_event_run (e=0xced6d0, timeout=<optimized out>) at ../git/src/libsystemd/sd-event/sd-event.c:3291
#26 0xb6e809bc in sd_event_loop (e=0xced6d0) at ../git/src/libsystemd/sd-event/sd-event.c:3312
#27 0x004bb64c in run (argv=<optimized out>, argc=<optimized out>) at ../git/src/resolve/resolved.c:84
#28 main (argc=<optimized out>, argv=<optimized out>) at ../git/src/resolve/resolved.c:91
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Anuj Mittal [Thu, 13 Jun 2019 00:49:10 +0000 (08:49 +0800)]
scons: inherit python3native
scons tries to get build time vars by loading sysconfigdata. Inherit
python3native instead of using host python and unset
_PYTHON_SYSCONFIGDATA_NAME to avoid the need to depend on target
python3 for sysconfigdata when using scons to build.
Avoids build errors on still supported CentOS 7:
| DEBUG: Executing shell function do_compile
| scons: *** SCons version 3.0.5 does not run under Python version
3.4.8.
| Python 2.7 or >= 3.5 is required.
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Hongxu Jia [Thu, 13 Jun 2019 08:06:24 +0000 (04:06 -0400)]
diffutils/run-ptest: support to run at arbitrary path
1. Run run-ptest at arbitrary path
2. Fix large-subopt.in1 not found
...
|diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in1:
No such file or directory
|diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in2:
No such file or directory
...
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Mariano López [Fri, 14 Jun 2019 03:32:41 +0000 (22:32 -0500)]
linux-yocto: Add scsi_debug module when ptest is in DISTRO_FEATURES
util-linux ptest requires the scsi_debug module to perform eject/mount
tests. This will conditionally add scsi_debug module when ptest is in
DISTRO_FEATURES.
This doesn't include linux-yocto-tiny because the resulting image will
be too big and do_image would complain about this.
[YOCTO #13301]
Signed-off-by: Mariano López <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Mariano López [Fri, 14 Jun 2019 03:32:40 +0000 (22:32 -0500)]
util-linux: Stop udevd to run ptests
The util-linux's ptest uses the SCSI_DEBUG kernel module to create
virtual SCSI disks. The automount feature of udevd will try to mount
these disks by default. Because udevd controls the mount of the disks,
the eject/mount tests will fail or be skipped. This change will stop
udevd before executing the util-linux's ptest and start the daemon
again after all the tests.
This is for eudevd only, systemd-udevd doesn't present this problem
because there are no automount rules.
[YOCTO #13301]
Signed-off-by: Mariano López <just.another.mariano@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Martin Jansa [Wed, 12 Jun 2019 19:48:16 +0000 (19:48 +0000)]
pigz: install pigz, unpigz, pigzcat in native and nativesdk builds again
* since this commit:
commit ad1db93d134db1ec4f6d6598c9741dc13e82e1f3
Author: Anuj Mittal <anuj.mittal@intel.com>
Date: Tue May 28 06:32:10 2019 +0800
Subject: Revert "pigz: pigz is not gzip"
pigz-native and nativesdk-pigz no longer installs pigz, unpigz, pigzcat,
so scripts explicitly depending on pigz-native and calling pigz started to fail.
* reverse the logic
- all the builds install pigz, unpigz, pigzcat
- only the native one installs it as gzip as well
* it could be optimized a bit more to create gzip as just a symlink
in native case as well, but they are in different directories
(pigz in base_bindir and gzip in bindir) and it's only 130kB..
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alex Kiernan [Wed, 12 Jun 2019 08:15:59 +0000 (09:15 +0100)]
kernel-fitimage: uboot-sign: Check UBOOT_DTB_BINARY before adding deps
Since UBOOT_DTB_BINARY empty means we don't need to inject signatures
into the U-Boot DTB, we can remove the dependencies between consumers of
these two classes and resolve a circular dependency between u-boot and
kernel.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Changqing Li [Wed, 12 Jun 2019 07:04:05 +0000 (15:04 +0800)]
multilib: add override for image recipe
MACHINE set to qemux86-64
for lib32-core-image-sato, during do_rootfs, it will run
install_complementary, which will get localedir by
d.getVar("libdir"), without override, libdir will still be
lib64. add override to fix it.
Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Chen Qi [Wed, 12 Jun 2019 06:08:20 +0000 (14:08 +0800)]
util-linux: upgrade to 2.33.2
The license files' names are changed, but the contents remain the
same. However, the LICENSE section of the recipe was wrong. This
upgrade change the 'BSD' part to 'BSD-3-Clause & BSD-4-Clause'.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Mike Crowe [Sun, 12 Nov 2017 16:39:23 +0000 (16:39 +0000)]
cmake: Avoid passing empty prefix to os.path.relpath
With meta-micro, ${prefix} is the empty string. This means that
CMAKE_INSTALL_BINDIR:PATH and friends end up containing paths starting with
many instances of "../", presumably due to os.path.relpath attempting to
find its way to the current directory.
Let's avoid this by ensuring that the root path always ends in a slash. If
it already ends in a slash then adding another one shouldn't cause any
problems.
Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Quentin Schulz [Tue, 11 Jun 2019 15:11:20 +0000 (17:11 +0200)]
selftests: add tests for INCOMPATIBLE_LICENSE
One bug went unnoticed without these selftests: an INCOMPATIBLE_LICENSE
with a non-SPDX license for a package with that non-SPDX license wasn't
enforcing the denial of build for said package. See 4b6ce4604cc15e289a48f8586d58a101b7a70b52 ("meta: license: fix non-SPDX
license being removed from INCOMPATIBLE_LICENSE")
While adding a test for that particular case, let's add a few more so
that we cover a handful more use cases of INCOMPATIBLE_LICENSE.
Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>