]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
8 years agobase.bbclass: Drop unnecessary dirs setting
Richard Purdie [Wed, 21 Sep 2016 21:30:03 +0000 (22:30 +0100)]
base.bbclass: Drop unnecessary dirs setting

${D} is listed in cleandirs so no need to list it in dirs as well.
The default directory is ${B} so this is a cleanup which should have
no changes to the execution.

[YOCTO #10017]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoautotools/siteinfo: Tweak CONFIG_SITE handling for determism/races
Richard Purdie [Wed, 21 Sep 2016 10:53:57 +0000 (11:53 +0100)]
autotools/siteinfo: Tweak CONFIG_SITE handling for determism/races

As things stand there are multiple races in the CONFIG_SITE handling
where checksums can change depending on whether site directories
exist or not when parsing happens. This is bad.

Secondly, there is a build race that occurs if you build virtuals
in parallel with the "main" recipe, since the main recipe is parsed
when the virtual is (since it sets variables like BBCLASSEXTEND)
and with the current code, it may look for files and directories
which could be created/destroyed which the loop is executing. This
is also bad.

The aclocal-copy directory should only ever be accessed by the call
from autotools.bbclass. This changes the parameter name to make it
clear and ensures all callers have the right usage, neatly avoiding
all the problems above. Also added better comments.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoasciidoc: set CLEANBROKEN to fix rebuild
Robert Yang [Tue, 20 Sep 2016 10:32:57 +0000 (03:32 -0700)]
asciidoc: set CLEANBROKEN to fix rebuild

The make clean removes doc/a2x.1 and doc/asciidoc.1, then it would cause
build failures since in the second build:
Fixing CONF_DIR in asciidoc.py
Fixing CONF_DIR in a2x.py
python a2x.py -f manpage doc/a2x.1.txt
a2x: ERROR: "xmllint" --nonet --noout --valid "/path/to/asciidoc-native/8.6.9-r0/asciidoc-8.6.9/doc/a2x.1.xml" returned non-zero exit status 4
make: *** [doc/a2x.1] Error 1

The xmllint failed because "--nonext" is used:
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
/buildarea/lyang1/test_arm/tmp/work/x86_64-linux/asciidoc-native/8.6.9-r0/asciidoc-8.6.9/doc/a2x.1.xml:2: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"

Avoid running make clean will fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agodirectdisk*.wks: add serial console support
Ed Bartosh [Tue, 20 Sep 2016 12:13:31 +0000 (15:13 +0300)]
directdisk*.wks: add serial console support

Added serial console to kernel command line to to make it
easier to boot wic images on devices without display.

Tested on MinnowBoard MAX.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoperf: Fix to obey LD failure on qemux86-64
Christopher Larson [Wed, 21 Sep 2016 05:17:42 +0000 (10:47 +0530)]
perf: Fix to obey LD failure on qemux86-64

When built on an i686 host for qemux86-64 without the
fix to obey LD and it fails:

/scratch/dogwood/toolchains/x86_64/bin/i686-pc-linux-gnu-ld:
Relocatable linking with relocations from format elf64-x86-64
(/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/fs.o)
to format elf32-i386 (/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/libapi-in.o)
is not supported

This is because LD includes HOST_LD_ARCH, which contains TUNE_LDARGS,
which is -m elf32_x86_64 for x86_64. Without that, direct use of ld will fail.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agolibunwind: fix build by linking with bfd instead of gold
Andreas Müller [Wed, 21 Sep 2016 05:30:43 +0000 (07:30 +0200)]
libunwind: fix build by linking with bfd instead of gold

works around:
<native-sysroot>/ld: error: Gperf-simple.o: cannot make copy relocation for protected symbol '_Uarm_local_addr_space', defined in ../src/.libs/libunwind-arm.so
collect2: error: ld returned 1 exit status
Makefile:1038: recipe for target 'Gperf-simple' failed
make[1]: *** [Gperf-simple] Error 1
make[1]: *** Waiting for unfinished jobs....
<...>
<native-sysroot>/ld: error: Lperf-simple.o: cannot make copy relocation for protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
collect2: error: ld returned 1 exit status
Makefile:1094: recipe for target 'Lperf-simple' failed
make[1]: *** [Lperf-simple] Error 1
<...>
ERROR: oe_runmake failed
<native-sysroot>/ld: error: Gperf-trace.o: cannot make copy relocation for protected symbol '_Uarm_local_addr_space', defined in ../src/.libs/libunwind-arm.so
collect2: error: ld returned 1 exit status
Makefile:1042: recipe for target 'Gperf-trace' failed
make[1]: *** [Gperf-trace] Error 1
<native-sysroot>/ld: error: Lperf-trace.o: cannot make copy relocation for protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
collect2: error: ld returned 1 exit status
Makefile:1098: recipe for target 'Lperf-trace' failed
make[1]: *** [Lperf-trace] Error 1
<...>
<native-sysroot>/ld: error: test-coredump-unwind.o: cannot make copy relocation for protected symbol '_UCD_accessors', defined in ../src/.libs/libunwind-coredump.so
collect2: error: ld returned 1 exit status
Makefile:1186: recipe for target 'test-coredump-unwind' failed

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agosystemd: fix indentation
Maciej Borzecki [Wed, 21 Sep 2016 08:19:58 +0000 (10:19 +0200)]
systemd: fix indentation

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agox264: add textrel to INSANE_SKIP
Fahad Usman [Wed, 21 Sep 2016 09:42:43 +0000 (15:12 +0530)]
x264: add textrel to INSANE_SKIP

Tried by adding CFLAGS_append = " -fpic " to
the recipe. But that couldn't help resolve the
warning message:

x264/r2491+gitAUTOINC+c8a773ebfc-r0/packages-split/x264/usr/lib/libx264.so.144' has relocations in .text [textrel]

It was found that this warning is emitted because of the
assembly files in the source code. And it is not easy to
get rid of TEXTREL's which are coming from the assembly
source files.

Adding textrel to INSANE_SKIP resolves this issue.
This issue was observed in cyclone5 and imx6qsabresd BSP's.
So generalizing the patch.

Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoperl: fix CVE-2015-8607
Mingli Yu [Wed, 21 Sep 2016 09:47:32 +0000 (17:47 +0800)]
perl: fix CVE-2015-8607

Backport patch to fix CVE-2015-8607 from perl upstream:
http://perl5.git.perl.org/perl.git/commitdiff/0b6f93036de171c12ba95d415e264d9cf7f4e1fd

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoperl: fix CVE-2016-6185
Mingli Yu [Wed, 21 Sep 2016 09:47:31 +0000 (17:47 +0800)]
perl: fix CVE-2016-6185

Backport patch to fix CVE-2016-6185 from perl upstream:
http://perl5.git.perl.org/perl.git/commitdiff/08e3451d7

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agotoolchain-shar-relocate.sh: Add error-handling
Mariano Lopez [Wed, 21 Sep 2016 07:54:25 +0000 (07:54 +0000)]
toolchain-shar-relocate.sh: Add error-handling

The relocation script of the SDK doesn't have enough
error handling when replacing host perl with SDK perl
or changing the symlinks. This will add those checks
along with a sanity check of xargs.

[YOCTO #10114]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agolibnewt: link whiptail properly with libnewt
Andreas Müller [Wed, 21 Sep 2016 20:46:38 +0000 (22:46 +0200)]
libnewt: link whiptail properly with libnewt

Configuration failed to detect gold as GNU linker. It was searching for
'GNU ld' but gold returns 'GNU gold (GNU Binutils 2.27.0.20160806) 1.12' which
does not match. When not linking by GNU linker Makefile did some magic link
target alignment:

ifneq ($(GNU_LD),)
SHLIBFLAGS= -Wl,--version-script,newt.0.52.ver -Wl,-soname,$(LIBNEWTSONAME)
else
SHLIBFLAGS=
endif

which caused:

| WARNING: libnewt-0.52.19-r0 do_package_qa: QA Issue: /usr/bin/whiptail contained in package whiptail requires libnewt.so, but no providers found in RDEPENDS_whiptail? [file-rdeps]

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agouninative-tarball: Make stamp independent
Richard Purdie [Wed, 21 Sep 2016 23:24:03 +0000 (00:24 +0100)]
uninative-tarball: Make stamp independent

The uninative tarball only contains nativesdk compoents. It should
not get regenerated when MACHINE changes for example. Currently its
sstate arch is also incorrect so changing SDKMACHINE results in other
variants being removed from the deploy directory.

This patch removes the target architecture dependencies so that
deploy artefacts can overlap and it doesn't continually rebuild. This
also fixes various autobuilder/release artefact issues we're having
as a result of these issues.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuildtools-tarball: add SDKMACHINE to stamps-extra-info
Joshua Lock [Wed, 21 Sep 2016 18:44:47 +0000 (19:44 +0100)]
buildtools-tarball: add SDKMACHINE to stamps-extra-info

Otherwise the stamps for x86-64 and i686 uninative tarballs match
and we can't deploy both to the DEPLOYDIR.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: don't fail during check_arg_machine()
Joshua Lock [Wed, 21 Sep 2016 19:35:39 +0000 (20:35 +0100)]
runqemu: don't fail during check_arg_machine()

If DEPLOY_DIR_IMAGE doesn't exist during check_arg_machine() we
will attempt to guess a suitable value later when check_and_set()
calls validate_paths(), therefore this shouldn't raise an exception

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: don't try and invoke bitbake when running in a toolchain env
Joshua Lock [Wed, 21 Sep 2016 19:35:38 +0000 (20:35 +0100)]
runqemu: don't try and invoke bitbake when running in a toolchain env

If a MACHINE value is passed we can't validate it by running bitbake
as the toolchain environment doesn't include the build system, we
must assume that the passed value for MACHINE is correct.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: try and guess qemu-system binary when MACHINE isn't set
Joshua Lock [Wed, 21 Sep 2016 19:35:37 +0000 (20:35 +0100)]
runqemu: try and guess qemu-system binary when MACHINE isn't set

Emulate some logic from the prior, shell based, version of runqemu
to try and infer the correct setting for MACHINE from the kernel
and rootfs filenames.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: validate paths and attempt to infer unset paths
Joshua Lock [Wed, 21 Sep 2016 19:35:36 +0000 (20:35 +0100)]
runqemu: validate paths and attempt to infer unset paths

We need to validate and ensure all paths are set regardless of
whether runqemu was invoked with a .qemuboot.conf file or
otherwise. Split this logic out into a separate method called
during check_and_set()

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolinux-yocto/4.8: introduce preempt-rt
Bruce Ashfield [Tue, 20 Sep 2016 15:16:38 +0000 (11:16 -0400)]
linux-yocto/4.8: introduce preempt-rt

Paul Gortmaker has made the preempt-rt patch available for the
4.8 kernel.

This commit merges his queue to standard/preempt-rt/rebase, which
will be kept up to date with a clean history, and it also makes
it available in standard/preempt-rt/base, which will be kept fast
forward for board support.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolinux-yocto/4.8: integrate 4.8-rc7
Bruce Ashfield [Tue, 20 Sep 2016 15:16:37 +0000 (11:16 -0400)]
linux-yocto/4.8: integrate 4.8-rc7

Updating to the latest release candidate.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolinux-yocto/4.1: 4.1.32 content and configuration warning fixes
Bruce Ashfield [Tue, 20 Sep 2016 15:16:36 +0000 (11:16 -0400)]
linux-yocto/4.1: 4.1.32 content and configuration warning fixes

The LINUX_VERSION was previously updated to 4.1.32, but the
SRCREVs for the actual content were missed. This gets our actual
version and the PV back in sync.

We also update the meta data to fix configuration audit warnings
from the beaglebone builds.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
squash with 4.1

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agokernel.bbclass: Add kernel_version_sanity_check function
California Sullivan [Fri, 16 Sep 2016 23:48:24 +0000 (16:48 -0700)]
kernel.bbclass: Add kernel_version_sanity_check function

The kernel being built should match what the recipe claims it is
building. This function ensures that happens by comparing the version
information in the kernel's Makefile to the PV the recipe is using.

v2 changes:
* Match against PV instead of LINUX_VERSION
* Match against EXTRAVERSION as well (e.g., -rc4)
* Cleaned up version string building

Fixes [YOCTO #6767].

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoboost: Replace math::static_lcm with integer
Jackie Huang [Tue, 13 Sep 2016 05:32:31 +0000 (13:32 +0800)]
boost: Replace math::static_lcm with integer

Replace math with integer according to the commit upstream:

(From OE-Core rev: 2e2ecd867d47ee24b37f61af6db5338df5059844)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agouninative-tarball: add SDKMACHINE to stamps-extra-info
Joshua Lock [Wed, 21 Sep 2016 09:26:41 +0000 (10:26 +0100)]
uninative-tarball: add SDKMACHINE to stamps-extra-info

Otherwise the stamps for x86-64 and i686 uninative tarballs match
and we can't deploy both to the DEPLOYDIR.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopopulate_sdk_base: fix support for changing SDKMACHINE settings
Joshua Lock [Wed, 21 Sep 2016 09:26:22 +0000 (10:26 +0100)]
populate_sdk_base: fix support for changing SDKMACHINE settings

Include SDKMACHINE in the tasks stamp information and the name of
the sstate-inputdirs so that changing SDKMACHINE doesn't result in
valid output of the task being deleted when SDKMACHINE is changed.

Without this patch changing SDKMACHINE and building an SDK resulted
in toolchain installers for other  SDKMACHINE's being deleted from
the deploy directoy.

[YOCTO #10275]

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooeqa/selftest/lic-checksum: don't report the expected failure to errors.yp
Ross Burton [Tue, 20 Sep 2016 08:13:51 +0000 (09:13 +0100)]
oeqa/selftest/lic-checksum: don't report the expected failure to errors.yp

This test has a bitbake invocation that is expected to fail, so inhibit
report-error running.

Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoopenssl: fix do_configure error when cwd is not in @INC
Robert Yang [Tue, 20 Sep 2016 05:34:36 +0000 (22:34 -0700)]
openssl: fix do_configure error when cwd is not in @INC

Fixed when building on Debian-testing:
| Can't locate find.pl in @INC (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.2 /usr/local/share/perl/5.22.2 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at perlpath.pl line 7.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agogcc-configure: Enable initfini-array
Saul Wold [Mon, 19 Sep 2016 17:16:00 +0000 (10:16 -0700)]
gcc-configure: Enable initfini-array

This adds the correct support for initfini-array which replaces .init
and .fini with .init-array and .fini-array.  There is no appreciable
size difference with this change.

The change is needed since configure will not correctly detect support
when building cross-compilers.

Signed-off-by: Haitao Huang <haitao.huang@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agooeqa/runtime/parselogs.py: Add ignore of tsc calibration fail in x86
Aníbal Limón [Mon, 19 Sep 2016 16:50:19 +0000 (11:50 -0500)]
oeqa/runtime/parselogs.py: Add ignore of tsc calibration fail in x86

We are experimenting failures to calibrate CPU's using TSC in x86
VM's due to usage of nested KVM [1], this is a known issue [2][3]
in virtualization environments, for detail explnation see [4].

Also we already have an ignore for 'TSC Fast calibration fail'.

[1] http://errors.yoctoproject.org/Errors/Details/83684/
[2] https://bugzilla.redhat.com/show_bug.cgi?id=814231
[3] https://lists.nongnu.org/archive/html/qemu-devel/2010-09/msg01547.html
[4] https://www.kernel.org/doc/Documentation/virtual/kvm/timekeeping.txt

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoenchant: add PACKAGECONFIG for *spell
Martin Jansa [Mon, 19 Sep 2016 14:17:31 +0000 (16:17 +0200)]
enchant: add PACKAGECONFIG for *spell

* use PACKAGECONFIG for various *spell implementations

* keep aspell enabled by default

* prevent hunspell/myspell being autodetected as reported in "bitbake world status" e-mails:
  WARN: enchant: enchant rdepends on hunspell, but it isn't a build dependency?

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoboost: switch to using C++11 atomics when available
André Draszik [Mon, 19 Sep 2016 10:26:06 +0000 (11:26 +0100)]
boost: switch to using C++11 atomics when available

The alleviates the need to use and maintain hand-written
assembly, just relying on the compiler to do the right
thing.

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agorunqemu: improve finding of rootfs, kernel and dtb
Robert Yang [Sun, 18 Sep 2016 07:05:33 +0000 (00:05 -0700)]
runqemu: improve finding of rootfs, kernel and dtb

* Search rootfs in the following order:
  - IMAGE_NAME*.FSTYPE
  - IMAGE_LINK_NAME*.FSTYPE

* Search kernel in the following order:
  - QB_DEFAULT_KERNEL
  - KERNEL_IMAGETYPE
  - KERNEL_IMAGETYPE*

* Search dtb in the following order:
   - QB_DTB
   - QB_DTB*
   - *.dtb

* Fix DTB, it should only work with "-kernel" option.

[YOCTO #10265]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agolinux-firmware: package carl9170 separately
Ioan-Adrian Ratiu [Thu, 1 Sep 2016 12:45:39 +0000 (15:45 +0300)]
linux-firmware: package carl9170 separately

Package the carl9170 binary firmware separately because it is needed
by various usb dongles and installing whole linux-firmware is overkill.

carl9170 is an atheros-based firmware, the succesor of ar9170 which is
deprecated and its driver (ar9170) was removed from the kernel tree.
carl9170 comes both as a binary blob and also with free sources; the
sources are deleted in linux-firmware.bb to avoid depeding on bash/etc.

Also we should keep ar9170 as is because OOT drivers might still use it.

The license for carl9170 is GPLv2 (sources are beside the bin in the
linux-firmware git repo).

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agorunqemu-gen-tapdevs: remove /etc/runqemu-nosudo when remove taps
Robert Yang [Mon, 19 Sep 2016 09:18:58 +0000 (02:18 -0700)]
runqemu-gen-tapdevs: remove /etc/runqemu-nosudo when remove taps

It creats /etc/runqemu-nosudo when creats taps, so should remove it when
remove taps.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agodefault-distrovars.inc: remove libidn from LGPLv2_WHITELIST_GPL-3.0
Jackie Huang [Thu, 1 Sep 2016 02:48:21 +0000 (10:48 +0800)]
default-distrovars.inc: remove libidn from LGPLv2_WHITELIST_GPL-3.0

The libidn recipe is now buildable in distros which blacklist
GPL-3.0 without needing to be explicitly whitelisted (since it
provides at least one non GPLv3 package).

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoopenssh: fix potential signed overflow to enable compilation with -ftrapv
Yuanjie Huang [Fri, 26 Aug 2016 01:57:33 +0000 (09:57 +0800)]
openssh: fix potential signed overflow to enable compilation with -ftrapv

Pointer arithmatic results in implementation defined signed integer
type, so that 's - src' in strlcpy and others may trigger signed overflow.
In case of compilation by gcc or clang with -ftrapv option, the overflow
would lead to program abort.

Upstream-status: Submitted [https://bugzilla.mindrot.org/show_bug.cgi?id=2608]

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoimage_types: add parted-native to do_image_wic depends
Ed Bartosh [Fri, 16 Sep 2016 14:32:53 +0000 (17:32 +0300)]
image_types: add parted-native to do_image_wic depends

As parted is always used by wic it makes sense to make do_image_wic
dependent on parted-native:do_populate_sysroot. This should help
to avoid adding it to all wic image recipes.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agogawk-3.1.5: fix non-glibc & gcc >= v4 builds
André Draszik [Fri, 16 Sep 2016 15:11:19 +0000 (16:11 +0100)]
gawk-3.1.5: fix non-glibc & gcc >= v4 builds

See commit message of patch added

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agopackage_manager.py: Change diagnostic messages per IRC
Mark Hatle [Thu, 15 Sep 2016 22:47:39 +0000 (17:47 -0500)]
package_manager.py: Change diagnostic messages per IRC

Based on a discussion with IRC user: Ulfalizer

It was suggested that removing the diagnostic list, and replacing it with a
simple hint to what might be causing the problem was a better solution.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agopackage_manager.py: Adjust error message order
Mark Hatle [Thu, 15 Sep 2016 22:47:38 +0000 (17:47 -0500)]
package_manager.py: Adjust error message order

Move the debug before the error (as it can take many pages.)  This makes it
much easier for the user to see the actual error message as it is still on
the screen.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoqemuboot.bbclass: don't fail on very first build
André Draszik [Fri, 16 Sep 2016 10:06:29 +0000 (11:06 +0100)]
qemuboot.bbclass: don't fail on very first build

During the very first build, the DEPLOY_DIR_IMAGE
directory might not have been created yet, causing
the creation of the qemuboot.conf config file to
fail.

This is because write_qemuboot_conf() runs at
rootfs creation time, i.e. before deploy.

So let's create the directory if necessary before
trying to write the config file.

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoexternalsrc.bbclass: Make reparsing work for BBCLASSEXTENDed recipes
Peter Kjellerstedt [Sat, 17 Sep 2016 01:18:08 +0000 (03:18 +0200)]
externalsrc.bbclass: Make reparsing work for BBCLASSEXTENDed recipes

To make sure changes to any source files are detected when externalsrc
is used, it sets BB_DONT_CACHE to force the recipe to be reparsed
every time. Previously, this was done conditionally based on whether
EXTERNALSRC was set. This worked fine for building the base recipe.
But if one tried to build, e.g., a native version of it (provided via
BBCLASSEXTEND), the recipe would not be reparsed as expected.

To solve the above problem, BB_DONT_CACHE is now set for the base
recipe if EXTERNALSRC is set for it or any of it derivatives.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agokernel.bbclass: assign INITRAMFS_BASE_NAME using ?=
Andre McCurdy [Fri, 16 Sep 2016 22:52:29 +0000 (15:52 -0700)]
kernel.bbclass: assign INITRAMFS_BASE_NAME using ?=

Default values for KERNEL_IMAGE_BASE_NAME and MODULE_IMAGE_BASE_NAME
are already assigned using ?= and anyone wanting to over-ride one is
likely to want to over-ride them all. Make the three consistent with
each other.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodropbear: deterministic selection of system -vs- bundled libtom libs
Andre McCurdy [Fri, 16 Sep 2016 22:29:12 +0000 (15:29 -0700)]
dropbear: deterministic selection of system -vs- bundled libtom libs

Dropbear will use system versions of libtommath and libtomcrypt if
available. To make builds deterministic, add a PACKAGECONFIG option
to choose system libs or force use of the bundled versions.

Note that currently there are no libtommath or libtomcrypt recipes
in oe-core, so default to using the bundled versions.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodropbear: fix -ltomcrypt -ltommath order when using system libtom libs
Andre McCurdy [Fri, 16 Sep 2016 22:29:11 +0000 (15:29 -0700)]
dropbear: fix -ltomcrypt -ltommath order when using system libtom libs

To prevent build failures when using system libtom libraries and
linking with --as-needed, LIBTOM_LIBS should be in the order
-ltomcrypt -ltommath, not the other way around, ie libs should be
prepended to LIBTOM_LIBS as they are found, not appended.

Note that LIBTOM_LIBS is not used when linking with the bundled
libtom libs.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: use OECORE_NATIVE_SYSROOT from sdk
Robert Yang [Sun, 18 Sep 2016 07:39:29 +0000 (00:39 -0700)]
runqemu: use OECORE_NATIVE_SYSROOT from sdk

There is no STAGING_DIR_NATIVE or bitbake in a extracted sdk,
so check OECORE_NATIVE_SYSROOT and use it.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: work even if a *.qemuboot.conf isn't found
Joshua Lock [Sun, 18 Sep 2016 07:39:28 +0000 (00:39 -0700)]
runqemu: work even if a *.qemuboot.conf isn't found

A qemuboot conf file is a convenience but it should still be
possible to invoke runqemu without them, especially for examples
such as using the SDK with an extracted rootfs via NFS.

As read_qemuboot() is always called we need to be sure that function
can return cleanly, without throwing Exceptions, even if a qemuboot
conf file isn't found.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: try symlinks when kernel or rootfs can't be found
Joshua Lock [Sun, 18 Sep 2016 07:39:27 +0000 (00:39 -0700)]
runqemu: try symlinks when kernel or rootfs can't be found

If the kernel or rootfs names written to the qemuboot.conf can't
be found, try and find the symlinked variant of the filename.

This will help usability of runqemu, for example where a user
downloads an image and associated files as the symlinked names
yet the qemuboot.conf variables point to the full, non-linked,
file names.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoqemuboot: also write the kernel link name to the conf file
Joshua Lock [Sun, 18 Sep 2016 07:39:26 +0000 (00:39 -0700)]
qemuboot: also write the kernel link name to the conf file

This will allow runqemu to fall back to trying the link name when
a file matching the full name can't be found.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: clarify an INFO message
Joshua Lock [Sun, 18 Sep 2016 07:39:25 +0000 (00:39 -0700)]
runqemu: clarify an INFO message

Make it clearer that we are looking for a file which ends with
qemuboot.conf

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoqemuboot: write the full kernel filename, not the link name
Joshua Lock [Sun, 18 Sep 2016 07:39:24 +0000 (00:39 -0700)]
qemuboot: write the full kernel filename, not the link name

KERNEL_IMAGETYPE gives the filename of a symlink to the kernel,
which may not be available i.e. if the user downloads some build
artefacts to run on a local machine. It's also possible that the
link will point to a newer kernel than was intended for use with
the rootfs in the qemuboot.conf.

It's much more reliable to read the name of the file
KERNEL_IMAGETYPE is linking to and assign the full filename to
QB_DEFAULT_KERNEL.

[YOCTO #10285]

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: add guidance to resolve issues with missing files
Joshua Lock [Sun, 18 Sep 2016 07:39:23 +0000 (00:39 -0700)]
runqemu: add guidance to resolve issues with missing files

When a required binary cannot be found print some guidance pointing
to using a sourced OE build environment or a qemuboot.conf file,
based on a similar message from the previous shell-based runqemu.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodevtool: add: drop superfluous validation for recipe name
Paul Eggleton [Sun, 18 Sep 2016 20:08:13 +0000 (08:08 +1200)]
devtool: add: drop superfluous validation for recipe name

Now that recipeutils.validate_pn() properly validates characters used in
the name, we can drop this bit checking for '/' since that's not
permitted by validate_pn(). (The FIXME comment here - that I myself
apparently wrote - is questionable since that function was clearly never
intended to allow '/', perhaps I was misled because it was broken and
did so).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolib/oe/recipeutils: fix invalid character detection in validate_pn()
Paul Eggleton [Sun, 18 Sep 2016 20:08:12 +0000 (08:08 +1200)]
lib/oe/recipeutils: fix invalid character detection in validate_pn()

* validate_pn() is supposed to protect against invalid characters, fix
  the function so that it actually does (unanchored regex strikes
  again...)
* However, now that the function is enforcing the restrictions, we do
  still want to allow + in recipe names (e.g. "gtk+")

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorecipetool: create: support git short form URLs
Paul Eggleton [Sun, 18 Sep 2016 20:08:11 +0000 (08:08 +1200)]
recipetool: create: support git short form URLs

In keeping with making recipetool create / devtool add as easy to use as
possible, users shouldn't have to know how to reformat git short form ssh
URLs for consumption by BitBake's fetcher (for example
user@git.example.com:repo.git should be expressed as
git://user@git.example.com/repo.git;protocol=ssh ) - instead we should
just take care of that automatically. Add some logic in the appropriate
places to do that.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorecipetool: create: tweak license crunching
Paul Eggleton [Sun, 18 Sep 2016 20:08:10 +0000 (08:08 +1200)]
recipetool: create: tweak license crunching

Filter out a plain "Licensed under the XXXX license" statement, as seen
in the capnproto project (and no doubt others).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorecipetool: create: pick up AC_PROG_SWIG
Paul Eggleton [Sun, 18 Sep 2016 20:08:09 +0000 (08:08 +1200)]
recipetool: create: pick up AC_PROG_SWIG

AX_PKG_SWIG is not the only commonly-used macro for detecting swig -
there's also AC_PROG_SWIG. As per AX_PKG_SWIG, add swig-native to
DEPENDS if AC_PROG_SWIG is found in configure.ac.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorecipetool: create: detect python autoconf macros
Paul Eggleton [Sun, 18 Sep 2016 20:08:08 +0000 (08:08 +1200)]
recipetool: create: detect python autoconf macros

If python is required then we need to inherit pythonnative (or
python3native) otherwise do_configure will probably fail since it won't
be able to find python.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorecipetool: create: fix error with git tree and no network
Paul Eggleton [Sun, 18 Sep 2016 20:08:07 +0000 (08:08 +1200)]
recipetool: create: fix error with git tree and no network

When creating a recipe for an existing local git clone, we attempt to
use the fetcher to determine if it supports the SRCREV variable.
Unfortunately running this code does a network check to get the latest
revision as a direct result of us using '${AUTOREV}' as a default value.
If you don't have a network connection this will of course fail. Rather
than have this block creating the recipe, catch the exception and just
guess from the URL.

Ultimately this should probably be fixed in the fetcher but for now this
will at least resolve the issue on this end.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorecipetool: create: fix name/version extraction from filename
Paul Eggleton [Sun, 18 Sep 2016 20:08:06 +0000 (08:08 +1200)]
recipetool: create: fix name/version extraction from filename

I ran into an example where recipetool was getting the name/version
completely wrong:

https://bitbucket.org/sortsmill/libunicodenames/downloads/libunicodenames-1.1.0_beta1.tar.xz

>From this it would create a libunicodenames-1.1.0-beta1_1.1.0-beta1.bb
file (likely because it couldn't split the file name and therefore took
all of it, then got the version from one of the files inside the
tarball). When this happens it's just irritating because you then have
to delete the recipe / run devtool reset and then run recipetool create
/ devtool add again and specify the version manually.

This patch is the result of systematically running the
determine_from_filename() function over the files on the Yocto Project
source mirror and my local downloads directory and fixing as many of the
generic issues as reasonably practical - it now gets the name and
version correct much more often. There are still cases where it won't,
but they are now in the minority.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorecipetool: create: improve python recipe license handling
Paul Eggleton [Sun, 18 Sep 2016 20:08:05 +0000 (08:08 +1200)]
recipetool: create: improve python recipe license handling

Try to ensure that for Apache, GPL and LGPL where the values extracted
from the "Classifiers" field may not be version-specific, if there is a
versioned license in the free-form license field then use that instead.
Also insert the free-form license field as a comment in the recipe for
the user's reference.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorecipetool: create: fix picking up name from local python source tree
Paul Eggleton [Sun, 18 Sep 2016 20:08:04 +0000 (08:08 +1200)]
recipetool: create: fix picking up name from local python source tree

Make use of the extravalues dict to send back other variable values from
the python handling plugin, and enable passing back PV and PN. This not
only places variable values in the final recipe a bit more consistently
with other types of source, it also allows the name and version to be
picked up fron a local source tree and not just when the recipe is
fetched from a remote URL that happens to have those in it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: acquire_lock() should fail when failed to open the file
Robert Yang [Mon, 19 Sep 2016 07:20:08 +0000 (00:20 -0700)]
runqemu: acquire_lock() should fail when failed to open the file

The open(self.lock, 'w') may fail when the lock is created by other
users, return false for this case to let it try other devices.

Fixed:
runqemu - INFO - Running /sbin/ip link...
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap0.lock...
Traceback (most recent call last):
  File "/buildarea/lyang1/poky/scripts/runqemu", line 972, in <module>
    ret = main()
  File "/buildarea/lyang1/poky/scripts/runqemu", line 963, in main
    config.setup_network()
  File "/buildarea/lyang1/poky/scripts/runqemu", line 810, in setup_network
    self.setup_tap()
  File "/buildarea/lyang1/poky/scripts/runqemu", line 761, in setup_tap
    if self.acquire_lock():
  File "/buildarea/lyang1/poky/scripts/runqemu", line 182, in acquire_lock
    lock_descriptor = open(self.lock, 'w')
PermissionError: [Errno 13] Permission denied: '/tmp/qemu-tap-locks/tap0.lock'

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoqemuppc.conf: adjust kernel console
Robert Yang [Mon, 19 Sep 2016 06:29:24 +0000 (23:29 -0700)]
qemuppc.conf: adjust kernel console

Fixed kernel trace when booting:
[   12.825809] random: crng init done
[   13.918323] irq 36: nobody cared (try booting with the "irqpoll" option)
[   13.924821] CPU: 0 PID: 335 Comm: getty Not tainted 4.8.0-rc5-yocto-standard #1
[   13.930492] Call Trace:
[   13.936214] [cff73f20] [c00790f0] __report_bad_irq.isra.0+0x3c/0x128 (unreliable)
[   13.941908] [cff73f40] [c0079518] note_interrupt+0x2b8/0x304
[   13.947265] [cff73f70] [c00766f4] handle_irq_event_percpu+0x5c/0x74
[   13.952503] [cff73f90] [c0076768] handle_irq_event+0x5c/0xdc
[   13.957667] [cff73fa0] [c007a29c] handle_fasteoi_irq+0xdc/0x234
[   13.962984] [cff73fc0] [c007592c] generic_handle_irq+0x3c/0x58
[   13.968288] [cff73fd0] [c0006c74] __do_irq+0x54/0x18c
[   13.973612] [cff73ff0] [c000f9c8] call_do_irq+0x24/0x3c
[   13.978742] [cf0cdb70] [c0006e40] do_IRQ+0x94/0x110
[   13.983992] [cf0cdba0] [c001215c] ret_from_except+0x0/0x14
[   13.989281] --- interrupt: 501 at pmz_set_termios+0x130/0x6d8
[   13.989281]     LR = pmz_set_termios+0xf0/0x6d8
[   13.999353] [cf0cdc90] [c049f130] uart_change_speed.isra.2+0x60/0x168
[   14.004436] [cf0cdcb0] [c049fdbc] uart_startup.part.8+0xec/0x1e0
[   14.009625] [cf0cdce0] [c04a0ab4] uart_open+0x138/0x16c
[   14.014723] [cf0cdd00] [c047e510] tty_open+0x118/0x65c
[   14.019743] [cf0cdd60] [c01894c8] chrdev_open+0xdc/0x1e0
[   14.024616] [cf0cdd90] [c01807d0] do_dentry_open+0x23c/0x358
[   14.029418] [cf0cddc0] [c0194878] path_openat+0x58c/0x1084
[   14.034054] [cf0cde50] [c01965b4] do_filp_open+0xbc/0x10c
[   14.038539] [cf0cdf00] [c01822fc] do_sys_open+0x154/0x224
[   14.043105] [cf0cdf40] [c0011a44] ret_from_syscall+0x0/0x38
[   14.047828] --- interrupt: c01 at 0xfeef5a0
[   14.047828]     LR = 0xfeef544
[   14.056543] handlers:
[   14.060980] [<c04a2b10>] pmz_interrupt
[   14.065468] Disabling IRQ #36

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agogroff: not ship /usr/bin/glilypond
Mingli Yu [Tue, 6 Sep 2016 02:39:37 +0000 (10:39 +0800)]
groff: not ship /usr/bin/glilypond

Not ship /usr/bin/glilypond and related files such
as man file /usr/share/man/man1/glilypond.1 and other
three files related to glilypond under
/usr/lib/groff/glilypond in embedded system, it is because:

- Remove the confusion about glilypond fails to run
  because it lacks dependency on File::HomeDir perl
  module

- We don't often have need for sheet music conversion
  in groff in embedded or IoT devices (glilypond
  transforms sheet music written in the lilypond language
  into the groff language using the .PSPIC request, such
  that groff can transform it into a format that can be
  displayed directly).

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolinux-firmware: Add missing ralink-firmware License
Saul Wold [Fri, 16 Sep 2016 21:37:47 +0000 (14:37 -0700)]
linux-firmware: Add missing ralink-firmware License

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolinux-firmware: Correct the LICENSE setting of license packages
Saul Wold [Fri, 16 Sep 2016 21:37:38 +0000 (14:37 -0700)]
linux-firmware: Correct the LICENSE setting of license packages

This change causes the licenses of the linux-firmware-*-license to be the license
that it contains instead of all the licenses of the linux-firmware package.

[YOCTO #10251]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuild-appliance-image: Create image in correct location
Juro Bystricky [Sun, 18 Sep 2016 15:37:45 +0000 (08:37 -0700)]
build-appliance-image: Create image in correct location

Due to the recipe now using variable IMGDEPLOYDIR instead of DEPLOY_DIR_IMAGE,
the final Build Appliance image ended up being created in a wrong location.

This patch assures the final ZIP image is created in identical location as before:

   tmp/deploy/images/<machine>/Yocto_Build_Apliance.zip

[YOCTO#10274]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoscripts: add tool to scan for bashisms recipe shell scripts
Ross Burton [Fri, 12 Feb 2016 14:55:50 +0000 (14:55 +0000)]
scripts: add tool to scan for bashisms recipe shell scripts

Shell functions in bitbake are executed with /bin/sh so should be POSIX
compliant and not use Bash extensions, or at least only use extensions that are
implemented in both dash and ash (busybox).

This tool will extract all of the shell scripts from all recipes and run them
through checkbashisms (it assumes that checkbashisms is on $PATH).

There is a whitelist to filter out false-positives such as the use of $HOSTNAME
(a bashism) in functions where we have defined it, or using the 'type' builtin
which is supported by ash/dash.

[ YOCTO #8851 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosanity.bbclass: split out config re-parse check
Markus Lehtonen [Thu, 15 Sep 2016 11:21:26 +0000 (14:21 +0300)]
sanity.bbclass: split out config re-parse check

Split out the functionality doing configuration re-parse check into a
separate event handler that is hooked into ConfigParsed event. This will
make config re-parsing actually work. Re-parsing in bitbake is triggered
by setting BB_INVALIDCONF whose value is checked after configuration has
been parsed (after ConfigParsed event). However, previously
BB_INVALIDCONF was set in SanityCheck event handler which caused
re-parsing never to happen.

[YOCTO #10188]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopulseaudio: add ${S}/LICENSE to LIC_FILES_CHKSUM
Ross Burton [Thu, 15 Sep 2016 14:14:36 +0000 (15:14 +0100)]
pulseaudio: add ${S}/LICENSE to LIC_FILES_CHKSUM

The LICENSE file describes how the various pieces are licensed, so add it to the
checksum so we notice when it changes.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agouseradd_base.bbclass: Do not mess with the gshadow file in the sysroot
Peter Kjellerstedt [Thu, 15 Sep 2016 15:44:47 +0000 (17:44 +0200)]
useradd_base.bbclass: Do not mess with the gshadow file in the sysroot

Previously, if the gshadow file did not exist in the sysroot when
perform_groupmems() was run, it would be temporarily created and
removed again afterwards. This was supposedly due to groupmems failing
if it does not exist.

However, based on empirical testing and examination of the source code
for groupmems, it should not fail if the gshadow file does not exist
when groupmems is started. But it WILL fail if the file is removed
sometime after its existence has been check at the beginning of the
execution, but before it needs to be modified. And this is exactly
what the previous code in perform_groupmems() could cause if multiple
tasks simultaneously modified users or groups. It could cause any of
the useradd, groupadd and groupmems commands to fail as long as at
least one other recipe invoked perform_groupmems().

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoutil-linux: Disable bfs support
Patrick Williams [Thu, 15 Sep 2016 21:11:17 +0000 (16:11 -0500)]
util-linux: Disable bfs support

Disable building of mkfs.bfs, which is used to create
BFS file-systems used by SCO UnixWare.  This is highly
unlikely to be utilized and there are otherwise no
references to 'bfs' throughout the rest of the tree.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoutil-linux: Disable minix support.
Patrick Williams [Thu, 15 Sep 2016 21:11:16 +0000 (16:11 -0500)]
util-linux: Disable minix support.

Disable building of {mkfs,fsck}.minix, which are used
to support minix file-systems.  Minix predates Linux and
support for its file-systems is unlikely to be needed.

No recipes otherwise reference minix, except in patches
to autotools configuration scripts, so there should be no
impact to other recipes.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoqemuboot-x86: Add task_timeout = -1 to uvesafb
Saul Wold [Thu, 15 Sep 2016 20:29:33 +0000 (13:29 -0700)]
qemuboot-x86: Add task_timeout = -1 to uvesafb

This causes the default timeout to be set to infinity, it will still report out
every 5000 milliseconds

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocmake-native: rationalise system/internal library dependencies
Ross Burton [Tue, 13 Sep 2016 14:57:03 +0000 (15:57 +0100)]
cmake-native: rationalise system/internal library dependencies

By default cmake will auto-detect if a library is present on the host and if it
isn't present will use an internal fork.  For some libraries using the internal
fork is preferable as it can be built with less dependencies, but for others
we're either already building it or the impact of building it is comparable to
internal build.

Continue to use the internal fork of libarchive as our libarchive-native has a
large number of build dependencies.  Using the internal libarchive means that
system bzip2 and zlib must be used.

Explicitly use the internal fork of jsoncpp as we don't have this in oe-core.

Explicitly depend on curl-native, expat-native, and xz-native to ensure these
dependencies are not floating.  curl-native is a non-trivial dependency but is
comparable to building the internal fork, so there's no reason to build it
twice.

Change bzip2-native to bzip2-replacement-native as bzip2-native is
ASSUME_PROVIDED.

[ YOCTO #9639 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agocmake: use convenience options for clarity
Ross Burton [Tue, 13 Sep 2016 14:55:53 +0000 (15:55 +0100)]
cmake: use convenience options for clarity

The intention here was "everything but jsoncpp is system provided" so use the
convenience option to ensure this remains true in the future.

Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoscripts: introduce buildstats-diff
Markus Lehtonen [Wed, 14 Sep 2016 11:24:42 +0000 (14:24 +0300)]
scripts: introduce buildstats-diff

New script for comparing buildstats from two separate builds. The script
has two modes: normally it prints the differences in task execution
(cpu) times but using --ver-diff option makes it just print the recipe
version differences without any cpu time data. Other command line
options are provided to alter the sort criteria of the data and to
filter out insignificant differences and/or short tasks.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agopackage_manager.py: fix bitbake package-index failed
Hongxu Jia [Tue, 13 Sep 2016 08:48:32 +0000 (04:48 -0400)]
package_manager.py: fix bitbake package-index failed

Previously the following commit in oe-core move RPM metadata
from DEPLOY_DIR to WORKDIR.
-----------
commit a92c196449c516fe51786d429078bbb1213bb029
Author: Stephano Cetola <stephano.cetola@linux.intel.com>
Date:   Wed Aug 10 13:03:16 2016 -0700

    Allow for simultaneous do_rootfs tasks with rpm

    Give each rootfs its own RPM channel to use.  This puts the RPM metadata
    in a private subdirectory of $WORKDIR, rather than living in DEPLOY_DIR
    where other tasks may race with it.
-----------

In the modification of 'class RpmIndexer, it should not
directly set arch_dir with WORKDIR. It caused 'bitbake
package-index' could not work correctly.

Assign WORKDIR as input parameter at RpmIndexer initial time
could fix the issue.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoshadow: use relaxed usernames
Shan Hai [Tue, 13 Sep 2016 05:45:46 +0000 (13:45 +0800)]
shadow: use relaxed usernames

The groupadd from shadow does not allow upper case group names, the
same is true for the upstream shadow. But distributions like
Debian/Ubuntu/CentOS has their own way to cope with this problem,
this patch is picked up from CentOS release 7.0 to relax the usernames
restrictions to allow the upper case group names, and the relaxation is
POSIX compliant because POSIX indicate that usernames are composed of
characters from the portable filename character set [A-Za-z0-9._-].

Signed-off-by: Shan Hai <shan.hai@windriver.com>
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agooeqa/sdkext/devtool: use a smaller module to test node.js functionality
Paul Eggleton [Tue, 13 Sep 2016 02:15:14 +0000 (14:15 +1200)]
oeqa/sdkext/devtool: use a smaller module to test node.js functionality

The "forever" package, despite its innocent description, actually drags
in a surprising number of dependencies and as a result the nodejs test
takes up to 10 minutes as a result. Pick a different example with a much
more reasonable set of dependencies.

Addresses part of [YOCTO #10254].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agomakedevs: don't restrict device node paths to 40 characters
Andre McCurdy [Mon, 12 Sep 2016 20:14:05 +0000 (13:14 -0700)]
makedevs: don't restrict device node paths to 40 characters

40 character paths work OK for device nodes in /dev but not for
device nodes created in a chroot, LXC container, etc.

Since the 'path' array is already a 4k buffer, the sscanf 40
character limit seems to be a typo or historical mis-merge. Update
the sscanf limit and bring the code in sync with the Buildroot
version:

  https://git.buildroot.net/buildroot/commit/?id=8876b6751e0bc19a3754290061808f0f8420708e

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoqemurunner: print out the runqemu command
bavery [Fri, 9 Sep 2016 16:38:54 +0000 (09:38 -0700)]
qemurunner: print out the runqemu command

This logs the launch command that was used for runqemu while running -c
testimage.  This way, if I'd like to easily launch qemu manually in
order to debug a failed test, I know what commmand was run to create
the qemu instance.

Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agocve-check.bbclass: Add class
Mariano Lopez [Wed, 24 Aug 2016 18:58:35 +0000 (18:58 +0000)]
cve-check.bbclass: Add class

This class adds a new task for all the recipes to use
cve-check-tool in order to look for public CVEs affecting
the packages generated.

It is possible to use this class when building an image,
building a recipe, or using the "world" or "universe" cases.

In order to use this class it must be inherited and it will
add the task automatically to every recipe.

[YOCTO #7515]

Co-authored by Ross Burton & Mariano Lopez

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agocve-check-tool: Add recipe
Mariano Lopez [Wed, 24 Aug 2016 18:58:34 +0000 (18:58 +0000)]
cve-check-tool: Add recipe

cve-check-tool is a program for public CVEs checking.
This tool also seek to determine if a vulnerability has
been addressed by a patch.

The recipe also includes the do_populate_cve_db task
that will populate the database used by the tool.

[YOCTO #7515]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agocmake: don't inherit autotools
Ross Burton [Wed, 14 Sep 2016 16:41:35 +0000 (17:41 +0100)]
cmake: don't inherit autotools

cmake doesn't use autotools, the functions get replaced by either cmake.bbclass
(target) or the recipe itself (native) leaving just lots of superfluous
dependencies.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoopenssl: Fix MIPS64be and add MIPS64le
Zubair Lutfullah Kakakhel [Wed, 14 Sep 2016 16:53:11 +0000 (17:53 +0100)]
openssl: Fix MIPS64be and add MIPS64le

MIPS64 target was being configured for linux-mips which defaults to
MIPS32. Doesn't cause any issue as far as I can see but it would be
wiser to use the correct target configuration.

Also add MIPS64le configuration which is missing.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooeqa/oetest: show stderr when running commands
Ross Burton [Wed, 14 Sep 2016 22:14:07 +0000 (23:14 +0100)]
oeqa/oetest: show stderr when running commands

To help debug failures, redirect stderr to stdout in oeSDKTest.run() and
oeSDKExtTest.run().

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosanity: make license QA failures fatal again
Ross Burton [Wed, 14 Sep 2016 23:08:01 +0000 (00:08 +0100)]
sanity: make license QA failures fatal again

Previous work to clean up the license QA code (oe-core fbdf977) had the side
effect that failing the license sanity check (bad or missing LIC_FILES_CHKSUM)
would emit an error message but wouldn't actually abort the build.

Solve this by changing populate_lic_qa_checksum() so that it tracks if the
message class was in ERROR_QA and if so, aborts the function.

[ YOCTO #10280 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoopenjade/sgml-common: Add sstate postrm commands
Richard Purdie [Thu, 15 Sep 2016 10:48:39 +0000 (11:48 +0100)]
openjade/sgml-common: Add sstate postrm commands

If you bump the PR of sgml-common and openjade-native but not sgml-
common-native, you will see a failure as files were removed from the
sysroot but still referenced by the sgml docbook catalog.

To properly handle this, the clean function needs to run at sstate
removal time, the problem is that this sstate removal can happen when
the metadata isn't present, so the correct removal commands are
unknown.

To avoid this, we need to write the commands into a "postrm" script
when we install the files, this can then be executed at sstate removal
time.

[YOCTO #8273]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosstate: Add postrm command support
Richard Purdie [Thu, 15 Sep 2016 10:45:14 +0000 (11:45 +0100)]
sstate: Add postrm command support

There are some issues in sstate which can't be handled by file removal
alone. Currently there is no way to execute a command against sstate and
doing so is potentially problematic for things like dependencies. This
patch adds a mechanism where any "postrm" script is executed if its present
allowing some openjade/sgml issues to be resolved.

[YOCTO #8273]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooeqa/utils/decorators: LogResults fix race condition in linkfile
Aníbal Limón [Tue, 13 Sep 2016 20:25:42 +0000 (15:25 -0500)]
oeqa/utils/decorators: LogResults fix race condition in linkfile

In order to avoid race condition when test if exists the linkfile
use bb.utils.lock, the best solution is to create a unique name
for the link file.

There is no way to create a unique linkfile name at this decorator
because is needed the machine and image variables, those variables
can't be passed easily in this code.

To avoid broke test export functionality use a try/except because bb
isn't available when use test export

[YOCTO #10225]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooe-selftest: check for coverage version before starting tests
Humberto Ibarra [Mon, 12 Sep 2016 20:30:50 +0000 (15:30 -0500)]
oe-selftest: check for coverage version before starting tests

python coverage versions lower than 4.x have problems with some distros. Adding the 4.x version as requirement to continue with coverage tracking.

[YOCTO #10207]

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoimage.bbclass: add IMAGE_DEVICE_TABLE to rootfs[vardeps]
Andre McCurdy [Mon, 12 Sep 2016 22:57:45 +0000 (15:57 -0700)]
image.bbclass: add IMAGE_DEVICE_TABLE to rootfs[vardeps]

IMAGE_DEVICE_TABLE and IMAGE_DEVICE_TABLES are both referenced by
_create_devfs, therefore ensure that rootfs is rebuilt if changes
are made to either variable.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocreate-pull-request: remove output directory
Ed Bartosh [Wed, 14 Sep 2016 12:02:04 +0000 (15:02 +0300)]
create-pull-request: remove output directory

When 'git request-pull' fails it makes sense to remove output
directory. Otherwise create-pull-request will complain that
output directory already exists on the next run.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoptest-runner: allow building from externalsrc
Christian Schuler [Wed, 14 Sep 2016 12:45:40 +0000 (14:45 +0200)]
ptest-runner: allow building from externalsrc

The ${WORKDIR}/git refers to the source folder S which is different in
the case of an external source build.

Signed-off-by: Christian Schuler <schuler.christian@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopatchelf: Update to version 0.9
Fabio Berton [Wed, 14 Sep 2016 12:30:29 +0000 (09:30 -0300)]
patchelf: Update to version 0.9

 * Remove patch maxsize.patch already applied upstream.

 * Add patch Skip-empty-section-fixes-66.patch to prevent errors like:

  /
  |ERROR: go-cross-1.6.2-r0 do_populate_sysroot_setscene: '('patchelf-uninative',
  |'--set-interpreter', '/home/user/src/prj/build/tmp/sysroots-uninative/
  |x86_64-linux/lib/ld-linux-x86-64.so.2', '/home/user/src/prj/build/tmp/
  |work/x86_64-linux/go-cross/1.6.2-r0/sstate-install-populate_sysroot/x86_64-
  |linux/usr/bin/aarch64-prj-linux/go')'
  |failed with exit code 1 and the following output:
  |cannot find section .rela.dyn
  \

  * Add patch handle-read-only-files.patch to fix error when building
    eSKD, the following error appears on task do_testsdkext

  /
  |ERROR: db-native-6.0.30-r1 do_populate_sysroot_setscene: '('patchelf-uninative',
  |'--set-interpreter', 'src/fsl-community-bsp/build/tmp/work/qemuarm-poky-linux-
  |gnueabi/core-image-minimal/1.0-r0/testsdkext/tc/tmp/sysroots-uninative/
  |x86_64-linux/lib/ld-linux-x86-64.so.2', 'src/fsl-community-bsp/build/tmp/work/
  |qemuarm-poky-linux-gnueabi/core-image-minimal/1.0-r0/testsdkext/tc/tmp/work/
  |x86_64-linux/db-native/6.0.30-r1/sstate-install-populate_sysroot/x86_64-linux/
  |usr/bin/db_tuner')' failed with exit code 1 and the following output:
  |b'open: Permission denied\n
  \

  * Add patch Increase-maxSize-to-64MB.patch to fix error described
  bellow, the same issue is discussed here:
    - https://github.com/NixOS/patchelf/issues/47

  /
  |ERROR: qemu-native-2.5.0-r1 do_populate_sysroot_setscene: '('patchelf-uninative',
  |'--set-interpreter', '../build/tmp/sysroots-uninative/x86_64-linux/lib/
  |ld-linux-x86-64.so.2', '../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
  |sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64')'
  |failed with exit code 1 and the following output:
  |warning: working around a Linux kernel bug by creating a hole of 36032512
  |bytes in ‘../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
  |sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64’
  |maximum file size exceeded
  \

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobusybox: Avoid race building libbb
Juro Bystricky [Wed, 14 Sep 2016 17:05:46 +0000 (10:05 -0700)]
busybox: Avoid race building libbb

When building busybox, an occasional error was observed.
The error is consistently the same:

libbb/appletlib.c:164:13: error: 'NUM_APPLETS' undeclared (first use in this function)
  while (i < NUM_APPLETS) {

The reason is the include file where NUM_APPLETS is defined is not yet generated (or is being modified)
at the time libbb/appletlib.c is compiled.
The attached patchset fixes the problem by assuring libb is compiled as the last directory.

[YOCTO#10116]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoRevert "oeqa.runtime.smart: work around smart race issues"
Richard Purdie [Wed, 14 Sep 2016 10:46:09 +0000 (11:46 +0100)]
Revert "oeqa.runtime.smart: work around smart race issues"

We have a proper fix now so we can remove the workaround.

This reverts commit 4d268abc2fc892c5d34449f78c8e9f2b1a9d6bac.

8 years agolibdrm: Explicitly disable cunit tests
Jussi Kukkonen [Tue, 13 Sep 2016 08:46:41 +0000 (11:46 +0300)]
libdrm: Explicitly disable cunit tests

Add patch to control building cunit-tests explicitly. Disable
them in the recipe.

Fixes [YOCTO #9849].

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>