]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
8 years agoed: update SRC_URI to yoctoproject mirror
Maxin B. John [Tue, 11 Apr 2017 10:47:52 +0000 (13:47 +0300)]
ed: update SRC_URI to yoctoproject mirror

Upstream has removed the 1.14.1 release from ftp.gnu.org and
moved to the latest 1.14.2. Since we don't want to upgrade at
this point of time, temporarily move the SRC_URI to yoctoproject
mirror.

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agonative/nativesdk: Use fixed DISTRO_FEATURES
Jussi Kukkonen [Tue, 11 Apr 2017 14:35:40 +0000 (17:35 +0300)]
native/nativesdk: Use fixed DISTRO_FEATURES

There seems to be little advantage to letting distro features affect
native builds. There is a significant disadvantage: a change to
DISTRO_FEATURES will trigger a lot of unnecessary native tasks. In a
test like this:
  $ bitbake core-image-minimal
  # append " systemd" to DISTRO_FEATURES
  $ bitbake core-image-minimal
The latter build takes 44 minutes (28%) of cpu-time less with this
patch (skipping 135 native tasks). Sadly wall clock time was not
affected as glibc remains the bottleneck.

Set native distro features to DISTRO_FEATURES_NATIVE appended with
an intersection of DISTRO_FEATURES and DISTRO_FEATURES_FILTER_NATIVE.
Current default values (baitbake.conf) are
* DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation" (as gtk-doc-native
has much less dependencies when built without it)
* DISTRO_FEATURES_NATIVE ?= "x11" (to enable native UIs even if target
does not containe them)

Do the variable setting in native_virtclass_handler() because otherwise
it could still be overridden by appends and the feature backfilling.
Shuffle the early returns so DISTRO_FEATURES gets set as long as
the packagename ends with "-native".

Add similar variables for nativesdk.

To make nativesdk work we need to enable the locale options so
nativesdk-glibc-locales can build and to avoid the init manager check
in the nativesdk case so add those fixes.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopackage_manager.py: Add a name for the generated dnf repo.
Ian.Arkver [Tue, 11 Apr 2017 13:25:39 +0000 (14:25 +0100)]
package_manager.py: Add a name for the generated dnf repo.

This adds repo_name as the name, which is the same as the
repo ID and hence a bit pointless, but it stops dnf from
complaining that the repo doesn't have a configured name.

Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoselftest/wic.py: vda -> sda
Robert Yang [Tue, 11 Apr 2017 09:21:29 +0000 (02:21 -0700)]
selftest/wic.py: vda -> sda

Previously, runqemu grep root=/dev/sd or root=/dev/hd on the image, and
would use vda if no grep result, now we have set QB_DRIVE_TYPE to
"/dev/sd" by default, and the device will be /dev/sda, so use sda to
replace vda in the test case.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooe-selftest: test wic sparse_copy API
Ed Bartosh [Thu, 6 Apr 2017 11:58:49 +0000 (14:58 +0300)]
oe-selftest: test wic sparse_copy API

Added new parameter 'api' to sparse_copy function to specify
underlying filemap API to use. By default sparse_copy will
try both available APIs.

Added test case for sparse_copy to wic test suite.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoqemux86-directdisk.wks: vda -> sda
Robert Yang [Tue, 11 Apr 2017 09:21:31 +0000 (02:21 -0700)]
qemux86-directdisk.wks: vda -> sda

Previously, runqemu grep root=/dev/sd or root=/dev/hd on the image, and
would use vda if no grep result, now we have set QB_DRIVE_TYPE to
"/dev/sd" by default, and the device will be /dev/sda, so use sda to
replace vda in the test case.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: use self.rootfs to replace self.nfs_dir
Robert Yang [Tue, 11 Apr 2017 09:21:26 +0000 (02:21 -0700)]
runqemu: use self.rootfs to replace self.nfs_dir

We can use self.rootfs as self.nfs_dir when self.fstype is nfs, this can
reduce the code's complexity and we can re-use the code of checking
ROOTFS conflictions.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agowic-image-minimal.wks: vda -> sda
Robert Yang [Tue, 11 Apr 2017 09:21:30 +0000 (02:21 -0700)]
wic-image-minimal.wks: vda -> sda

Previously, runqemu grep root=/dev/sd or root=/dev/hd on the image, and
would use vda if no grep result, now we have set QB_DRIVE_TYPE to
"/dev/sd" by default, and the device will be /dev/sda, so use sda to
replace vda in the test case.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: do not rely on grepping images
Robert Yang [Tue, 11 Apr 2017 09:21:28 +0000 (02:21 -0700)]
runqemu: do not rely on grepping images

Fixed when the image is large and not enough memory:
  grep: memory exhausted
  Aborted

[YOCTO #11073]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: run without arguments
Robert Yang [Tue, 11 Apr 2017 09:21:27 +0000 (02:21 -0700)]
runqemu: run without arguments

Since we can get MACHINE and others from env vars and "bitbake -e",
"runqemu" can work without any arguments.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: support env vars explicitly
Robert Yang [Tue, 11 Apr 2017 09:21:25 +0000 (02:21 -0700)]
runqemu: support env vars explicitly

Use self.env_vars to support get vars from environment explicity. The
MACHINE, ROOTFS and KERNEL was supported by shell based runqemu, and
the help text says support them from env vars, so add them back.

[YOCTO #11141]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoptest-runner: Upgrade to minor version 2.0.2
Aníbal Limón [Mon, 10 Apr 2017 17:15:03 +0000 (12:15 -0500)]
ptest-runner: Upgrade to minor version 2.0.2

To fix a problem when print ERROR after a ptest timeout, this
causes the user confusion about if a test ends or not.

[YOCTO #10842]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agogstreamer1.0-plugins-good: Backport patch for v4l2object videometa
Carlos Rafael Giani [Tue, 11 Apr 2017 08:49:05 +0000 (10:49 +0200)]
gstreamer1.0-plugins-good: Backport patch for v4l2object videometa

This patch ensures videometa is added to mem2mem decoder output in case
the output frames have padding rows/columns

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agogstreamer1.0-plugins-bad: Update packageconfigs and config flags
Carlos Rafael Giani [Tue, 11 Apr 2017 08:11:54 +0000 (10:11 +0200)]
gstreamer1.0-plugins-bad: Update packageconfigs and config flags

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agostaging: Fix sysroot problem with populate_sysroot dependencies on do_fetch
Richard Purdie [Mon, 10 Apr 2017 23:20:01 +0000 (00:20 +0100)]
staging: Fix sysroot problem with populate_sysroot dependencies on do_fetch

Dependencies on svn:// urls were failing as the cleandirs on do_fetch was destroying
any sysroot setup by the extend_recipe_sysroot function.

Add code so that if the task do_fetch, we move the cleandirs to a separate function before
the extend_recipe_sysroot prefunc else we'd wipe out the sysroot we just created.

This allows fetcher do_populate_sysroot dependencies to work correctly again.

I did try various other approaches and a seperate function with cleandirs was the
cleanest way to add this without code duplication or too much complexity.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobinutils: Fix CVE-2017-6965 and CVE-2017-6966
Yuanjie Huang [Tue, 11 Apr 2017 07:00:24 +0000 (00:00 -0700)]
binutils: Fix CVE-2017-6965 and CVE-2017-6966

Backport upstream commit to address vulnerabilities:

CVE: CVE-2017-6965
[BZ 21137] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21137

Fix readelf writing to illegal addresses whilst processing corrupt input
files containing symbol-difference relocations.

PR binutils/21137
* readelf.c (target_specific_reloc_handling): Add end parameter.
Check for buffer overflow before writing relocated values.
(apply_relocations): Pass end to target_specific_reloc_handling.

CVE: CVE-2017-6966
[BZ 21139] -- https://sourceware.org/bugzilla/show_bug.cgi?id=21139

Fix read-after-free error in readelf when processing multiple, relocated
sections in an MSP430 binary.

PR binutils/21139
* readelf.c (target_specific_reloc_handling): Add num_syms
parameter.  Check for symbol table overflow before accessing
symbol value.  If reloc pointer is NULL, discard all saved state.
(apply_relocations): Pass num_syms to target_specific_reloc_handling.
Call target_specific_reloc_handling with a NULL reloc pointer
after processing all of the relocs.

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolibsolv: correctly attribute musl fixing patches
Alexander Kanavin [Tue, 11 Apr 2017 09:22:43 +0000 (12:22 +0300)]
libsolv: correctly attribute musl fixing patches

Also, they were previously squashed into a single patch; restore
the original two-patch arrangement.

As requested here:
http://lists.openembedded.org/pipermail/openembedded-core/2017-April/135460.html

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopython2/3: Move config/Makefile from core package to dev package
Li Zhou [Mon, 10 Apr 2017 09:08:19 +0000 (02:08 -0700)]
python2/3: Move config/Makefile from core package to dev package

Move config/Makefile in libdir from core package to dev package for
python, because it is only needed in development process.

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoopenssl: fix the reference to native perl in ptests
Alexander Kanavin [Mon, 10 Apr 2017 19:16:51 +0000 (22:16 +0300)]
openssl: fix the reference to native perl in ptests

This was causing a couple of ptest failures.

[YOCTO #10840]

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooeqa/sdk/cases/buildcpio: enable use of cached cpio from DL_DIR
Joshua Lock [Mon, 10 Apr 2017 11:13:39 +0000 (12:13 +0100)]
oeqa/sdk/cases/buildcpio: enable use of cached cpio from DL_DIR

All build project test cases will try to copy the requested source
artefacts from DL_DIR before fetching. This testcase is referencing bzipped
tarball whereas the recipe fetches a gzipped tarball.

Switch to fetching the gzipped tarball in the test case so that we're able
to use a cached tarball from DL_DIR

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: fix SDK artifact capture
David Reyna [Sun, 9 Apr 2017 22:38:51 +0000 (15:38 -0700)]
toaster: fix SDK artifact capture

Use the TaskArtifacts event to scan the SDK and ESDK manifests
to cleanly collect the respective artifact files.

The previous method was broken when the SDK file deployment moved
from the do_populate_sdk[_ext] tasks to their sstate tasks. That
method is disabled (but not yet removed) in preparation for the
rest of refactor work for the parent #10283 work.

[YOCTO #10850]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agomtd-utils: refresh patches now merged upstream
Andre McCurdy [Thu, 6 Apr 2017 22:43:53 +0000 (15:43 -0700)]
mtd-utils: refresh patches now merged upstream

Update Upstream-Status tags and apply 010-fix-rpmatch.patch
unconditionally, since it's merged unconditionally upstream.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoclasses/buildhistory: save output file signatures for sstate tasks
Paul Eggleton [Fri, 7 Apr 2017 04:57:23 +0000 (16:57 +1200)]
classes/buildhistory: save output file signatures for sstate tasks

Save a file per task listing sha256sums for each file staged, i.e.
the output of the task. Some caveats:

1) This only covers sstate tasks since it uses SSTATEPOSTUNPACKFUNCS,
   however those are generally the most interesting in terms of output
   anyway.
2) The signature is taken before applying any relocations, so any
   relocated files will actually have different signatures, but that's
   churn that you probably won't want to see here.
3) At the moment if you run the same build twice without sstate you will
   very likely see changes in the output for certain tasks due to things
   like timestamps being present in the binary output. Fixing that is
   a general Linux ecosystem problem - see this page for our efforts to
   resolve it on our side:
     https://wiki.yoctoproject.org/wiki/Reproducible_Builds

NOTE: you need to set your BUILDHISTORY_FEATURES value to include
"task" to enable collection of these signatures as it is is disabled by
default.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoclasses/uninative: set SSTATEPOSTUNPACKFUNCS[vardepvalueexclude] properly
Paul Eggleton [Fri, 7 Apr 2017 04:57:22 +0000 (16:57 +1200)]
classes/uninative: set SSTATEPOSTUNPACKFUNCS[vardepvalueexclude] properly

Append to the value with appendVarFlag() instead of setting it outright,
so that we can also append to it in other places. Accordingly, this
varflag is pipe-separated (since we want to be able to exclude any
string fragment, in this case including the leading space), thus put a
leading pipe character to play nicely with any existing value.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuildhistory-diff: add option to compare actual signature differences
Paul Eggleton [Fri, 7 Apr 2017 04:57:21 +0000 (16:57 +1200)]
buildhistory-diff: add option to compare actual signature differences

Use the code underpinning bitbake-diffsigs to add an option to
buildhistory-diff to determine and display the differences between the
actual signature inputs, with a twist - we collapse identical
changes across different tasks, showing only the most recent task to
have that difference, meaning that there's less noise to wade through
when you just want to know what changed in order to cause some
rebuilding you're seeing.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuildhistory-diff: add option to compare task signature list
Paul Eggleton [Fri, 7 Apr 2017 04:57:20 +0000 (16:57 +1200)]
buildhistory-diff: add option to compare task signature list

Having added writing out of the task signature list to buildhistory
(when BUILDHISTORY_FEATURES includes "task"), we now need a way to
compare the list. This just shows which tasks have been added / changed
signature / removed.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoclasses/buildhistory: write out task signatures on every build
Paul Eggleton [Fri, 7 Apr 2017 04:57:19 +0000 (16:57 +1200)]
classes/buildhistory: write out task signatures on every build

If we want to determine what changed since the last build, one angle
from which to look at it is to check the signatures. However, if we
don't actually have the signatures from the last build we don't have
anywhere to start. Save the signatures on each build in order to give us
the starting point.

NOTE: you need to set your BUILDHISTORY_FEATURES value to include
"task" to enable collection of these signatures as it is is disabled by
default.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuildhistory-diff: operate from buildhistory directory
Paul Eggleton [Fri, 7 Apr 2017 04:57:18 +0000 (16:57 +1200)]
buildhistory-diff: operate from buildhistory directory

If the cwd is named "buildhistory" and the user hasn't specified an
alternative path on the command line, then assume that the current
directory is the buildhistory directory. This makes it easier to run
buildhistory-diff and also interact with the buildhistory git repository
as you no longer have to jump into the buildhistory directory and up to
the parent again when doing so.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agomusl: Upgrade to latest tip
Khem Raj [Fri, 7 Apr 2017 05:14:09 +0000 (22:14 -0700)]
musl: Upgrade to latest tip

54807d47 aarch64: add single instruction math functions
b6e1fe0d fix strptime output for %C without %y
834ef7af fix processing of strptime %p format
85dfab7e fix off-by-one in strptime %j
9571c531 regex: fix newline matching with negated brackets
e6917ece increase limit on locale name length from 15 to 23 bytes
e4fc9ad7 search locale name variants for gettext translations
16319a5d make setlocale return a single name for LC_ALL if all categories match
0c53178e fix dlopen/dlsym regression opening libs already loaded at startup
dbff2bb8 fix POSIX-format TZ dst transition times for southern hemisphere
74bca42e s390x: fix fpreg_t and remove unused per_struct
a393d5cc precalculate gnu hash rather than doing it lazily in find_sym inner loop
8cba1dc4 fix threshold constants in j0f, y0f, j1f, y1f

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agologrotate: replace fedorahosted.org SRC_URI with github.com source
Choong YinThong [Sun, 9 Apr 2017 23:33:18 +0000 (16:33 -0700)]
logrotate: replace fedorahosted.org SRC_URI with github.com source

fedorahosted.org was retired on March 1st, 2017. This is to
update the SRC_URI to point to github.com.
Update the ${PN} to ${BPN} in order to pass the autobuilder
mulitlib enable configuration.

[YOCTO #11226]

Signed-off-by: Choong YinThong <yin.thong.choong@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuildhistory.bbclass: do not influence sstate of do_rootfs
Patrick Ohly [Mon, 10 Apr 2017 08:28:12 +0000 (10:28 +0200)]
buildhistory.bbclass: do not influence sstate of do_rootfs

Enabling or disabling buildhistory caused a rebuild of images, which
is undesirable. For example, it prevented image reuse from a main
build with buildhistory in a following oe-selftest where buildhistory
must be disabled.

The reason are the additional ROOTFS_POSTUNINSTALL_COMMAND and
ROOTFS_POSTUNINSTALL_COMMAND entries. Those need to be excluded both
via vardepvalueexclude and vardepsexclude.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopackage_manager.py: Split feed_archs for RPM repo URIs
Ian.Arkver [Mon, 10 Apr 2017 10:50:14 +0000 (11:50 +0100)]
package_manager.py: Split feed_archs for RPM repo URIs

By default the feed_archs variable is split into single characters
resulting in very many broken short repo_uris. Add a split() to
split the string into words first.

Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agognu-efi: copy header files for x32 build
Saul Wold [Mon, 10 Apr 2017 15:58:30 +0000 (08:58 -0700)]
gnu-efi: copy header files for x32 build

Gnu-efi needs to be build for 64bit since it is a boot time tool. It
needs these 2 headers to be in 64 bit versions, we can use the existing
32bit ones as there is not really any difference.

[YOCTO #11051]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoclassutils.py: deterministic sorting
Juro Bystricky [Mon, 10 Apr 2017 20:59:36 +0000 (13:59 -0700)]
classutils.py: deterministic sorting

The method "prioritized" returns a list sorted by the value
of the "priority" field, in descending order. However, if several
list items have the same priority, the ordering of those items
within the priority-sorted list becomes random. As a consequence,
we may end up with a non-deterministic oe-terminal spawning, as several
terminals have the same priority. So running commands such as

$ bitbake xxx -cdevshell
$ bitbake yyy -cmenuconfig

may spawn a different terminal each time, for example sometimes Gnome
and sometimes Konsole as hey have the same priority.
Rather than modifying the priorities so they all differ, we sub-sort
the list based on (terminal) names.
This way we achieve a deterministic outcome.

[YOCTO#10938]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoRevert "staging: Fix sysroot problem with populate_sysroot dependencies on do_fetch"
Richard Purdie [Mon, 10 Apr 2017 23:56:18 +0000 (00:56 +0100)]
Revert "staging: Fix sysroot problem with populate_sysroot dependencies on do_fetch"

There seems to be an issue with the patch, revert for now.

This reverts commit cd5e0a32184d98beb8d81e6b5527166d3ca4fb3c.

8 years agostaging: Fix sysroot problem with populate_sysroot dependencies on do_fetch
Richard Purdie [Mon, 10 Apr 2017 18:59:33 +0000 (19:59 +0100)]
staging: Fix sysroot problem with populate_sysroot dependencies on do_fetch

Dependencies on svn:// urls were failing as the cleandirs on do_fetch was destroying
any sysroot setup by the extend_recipe_sysroot function.

Add code so that if the task do_fetch, we move the cleandirs to the extend_recipe_sysroot
task else we'd wipe out the sysroot we just created.

This allows fetcher do_populate_sysroot dependencies to work correctly again.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoscripts: Drop cleanup-workdir
Richard Purdie [Mon, 10 Apr 2017 16:00:37 +0000 (17:00 +0100)]
scripts: Drop cleanup-workdir

This script appears broken and is actively breaking build directories.
For example, binutils-cross-i586 gets run do_fetch to do_populate_sysroot by:

$ oe-selftest -r devtool.DevtoolTests.test_devtool_virtual_kernel_modify

then:

$ oe-selftest -r oescripts.BuildhistoryDiffTests.test_buildhistory_diff

wipes out the contents of tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/
but does not wipe out the corresponding stamps, then:

$ oe-selftest -r runtime-test.Postinst.test_postinst_rootfs_and_boot

needs binutils-cross-i586:do_populate_lic and if and only if this is
unavailable from sstate, it fails since it thinks the source is already
unpacked when it isn't resulting in:

WARNING: binutils-cross-i586-2.28-r0 do_populate_lic: Could not copy license file /home/pokybuild/yocto-autobuilder/yocto-worker/nigh
tly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3.LIB to /home/pokybuild/yocto-autobuilder/yocto
-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/license-destdir/binutils-cross-i586/COPYING3.LI
B: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-l
inux/binutils-cross-i586/2.28-r0/git/COPYING3.LIB'
ERROR: binutils-cross-i586-2.28-r0 do_populate_lic: QA Issue: binutils-cross-i586: LIC_FILES_CHKSUM points to an invalid file: /home/
pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3 [license-checksum]

and similar errors.

Its safer for users to wipe tmp than try and maintain scripts which try
to remove pieces of tmp and get it wrong so remove the script.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooeqa/selftest: Don't use cleanup-workdir
Richard Purdie [Mon, 10 Apr 2017 15:58:48 +0000 (16:58 +0100)]
oeqa/selftest: Don't use cleanup-workdir

cleanup-workdir isn't a partcularly good way to attempt to cleanup after
tests and in some cases is actively breaking the workdir. Whilst this is
a bug in cleanup-workdir, I'd prefer it didn't break tests, particularly
when as far as I can see, these calls are "belt and braces" and don't appear
to serve a specific purpose. If this introduces bugs, we should fix this
bugs.

For the purposes of history, binutils-cross-i586 gets run do_fetch to
do_populate_sysroot by:

$ oe-selftest -r devtool.DevtoolTests.test_devtool_virtual_kernel_modify

then:

$ oe-selftest -r oescripts.BuildhistoryDiffTests.test_buildhistory_diff

wipes out the contents of tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/
but does not wipe out the corresponding stamps, then:

$ oe-selftest -r runtime-test.Postinst.test_postinst_rootfs_and_boot

needs binutils-cross-i586:do_populate_lic and if and only if this is
unavailable from sstate, it fails since it thinks the source is already
unpacked when it isn't resulting in:

WARNING: binutils-cross-i586-2.28-r0 do_populate_lic: Could not copy license file /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3.LIB to /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/license-destdir/binutils-cross-i586/COPYING3.LIB: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3.LIB'
ERROR: binutils-cross-i586-2.28-r0 do_populate_lic: QA Issue: binutils-cross-i586: LIC_FILES_CHKSUM points to an invalid file: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3 [license-checksum]

and similar errors.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopython-pycurl: create python3-pycurl recipe
Dmitry Rozhkov [Fri, 7 Apr 2017 13:14:16 +0000 (16:14 +0300)]
python-pycurl: create python3-pycurl recipe

The python-pycurl recipe can be used with python2 only even
though python3 is officially supported by upstream.

Create python3-pycurl recipe enabling the pycurl module for
python3.

Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoscripts/oe-build-perf-report: improve guessing of args
Markus Lehtonen [Fri, 7 Apr 2017 11:51:41 +0000 (14:51 +0300)]
scripts/oe-build-perf-report: improve guessing of args

Search remote branches, too, when finding the latest commit.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooe-build-perf-report-email.py: use proper fallback email address
Markus Lehtonen [Fri, 7 Apr 2017 11:51:40 +0000 (14:51 +0300)]
oe-build-perf-report-email.py: use proper fallback email address

Use properly formatted fallback email address instead of just the
username.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuild-perf-test-wrapper.sh: support extra args for email script
Markus Lehtonen [Fri, 7 Apr 2017 11:51:39 +0000 (14:51 +0300)]
build-perf-test-wrapper.sh: support extra args for email script

Make it possible to provide (extra) command line arguments to the
oe-build-perf-test-email script via a new environment variable
OE_BUILD_PERF_REPORT_EMAIL_EXTRA_ARGS.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agouninative-flags.inc: Build binutils-native as pie
Richard Purdie [Fri, 7 Apr 2017 16:39:43 +0000 (17:39 +0100)]
uninative-flags.inc: Build binutils-native as pie

Some distros (ubuntu 16.10, debian-testing) default to gcc configured with
--enable-default-pie (see gcc -v). This breaks e.g. prelink-native on a pie
default system if binutils-native was built on a system which is not pie default
We therefore enable pie unconditionally for native recipes where static libs are
used such as libiberty from binutils, for now, until our minimum distro set is
all default pie.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoncurses: Drop incorrect option
Richard Purdie [Fri, 7 Apr 2017 14:54:12 +0000 (15:54 +0100)]
ncurses: Drop incorrect option

The --disable-static option doesn't exist in ncurses. Its equivalent is
--without-normal so remove the option which does nothing.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agono-static-libs: Add entry for ncurses
Richard Purdie [Fri, 7 Apr 2017 14:30:01 +0000 (15:30 +0100)]
no-static-libs: Add entry for ncurses

Yes, the option to disable static libraries in boost really is
"--without-normal". Add this for ncurses and its variants.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoselftest/sstatetests: Replace glibc-initial with linux-libc-headers
Richard Purdie [Fri, 7 Apr 2017 14:26:30 +0000 (15:26 +0100)]
selftest/sstatetests: Replace glibc-initial with linux-libc-headers

The intent in these tests was to find something early in the bootstrap
process to run tests against which didn't require long build times.
This breaks with the removal of the glibc-initial do_build target.
Replacing it with linux-libc-headers seems like a good choice
and simplifies the conditionals too.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocross-canadian.bbclass: override TARGET_* flags
Ming Liu [Thu, 6 Apr 2017 12:09:44 +0000 (14:09 +0200)]
cross-canadian.bbclass: override TARGET_* flags

Some TARGET_* flags are being exported in bitbake.conf currently, so
they are impacting all the tasks of a cross-canadian recipe even they
are not in use at all.

This can lead a lot of churn when the cross-canadian sysroot are shared
by machines while they have defined different TARGET_* flags.

Fix it by overriding with BUILDSDK_* flags.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agonativesdk.bbclass: override TARGET_* flags
Ming Liu [Thu, 6 Apr 2017 12:09:43 +0000 (14:09 +0200)]
nativesdk.bbclass: override TARGET_* flags

Some TARGET_* flags are being exported in bitbake.conf currently, so
they are impacting all the tasks of a nativesdk recipe even they are
not in use at all.

This can lead a lot of churn when the nativesdk sysroot are shared by
machines while they have defined different TARGET_* flags.

Fix it by overriding with BUILDSDK_* flags.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocrosssdk.bbclass: override TARGET_* flags
Ming Liu [Thu, 6 Apr 2017 12:09:42 +0000 (14:09 +0200)]
crosssdk.bbclass: override TARGET_* flags

Some TARGET_* flags are being exported in bitbake.conf currently, so
they are impacting all the tasks of a crosssdk recipe even they are
not in use at all.

This can lead a lot of churn when the crosssdk sysroot are shared by
machines while they have defined different TARGET_* flags.

Fix it by overriding with BUILD_* flags.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocross.bbclass: override TARGET_* flags
Ming Liu [Thu, 6 Apr 2017 12:09:41 +0000 (14:09 +0200)]
cross.bbclass: override TARGET_* flags

Some TARGET_* flags are being exported in bitbake.conf currently, so
they are impacting all the tasks of a cross recipe even they are not
in use at all.

This can lead a lot of churn when the cross sysroot are shared by
machines while they have defined different TARGET_* flags.

And sometimes it even causes "Taskhash mismatch" errors.

Fix it by overriding with BUILD_* flags.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolib/oe/sstatesig: avoid reporting duplicate siginfo files from sstate
Paul Eggleton [Thu, 6 Apr 2017 22:01:44 +0000 (10:01 +1200)]
lib/oe/sstatesig: avoid reporting duplicate siginfo files from sstate

In find_siginfo(), which is used by bitbake-diffsigs among other things,
avoid adding a siginfo file from the sstate-cache where we've already
collected a sigdata file from the stamps directory with the same hash.
This avoids the possibility that the top two files (as picked by default
using the bitbake-diffsigs -t option) are for the same signature and
thus the tool would report no differences. In order to do that, just use
the hashfiles dict that we already have - we just need to change the
code to populate that even if we're collecting matching files without
looking for a fixed set of hashes (i.e. taskhashlist isn't set).

This replaces previous code in bitbake-diffsigs that attempted to filter
these out with limited success.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolib/oe/sstatesig: fix finding native siginfo files in sstate-cache
Paul Eggleton [Thu, 6 Apr 2017 22:01:43 +0000 (10:01 +1200)]
lib/oe/sstatesig: fix finding native siginfo files in sstate-cache

When comparing signatures with bitbake-diffsigs -t or bitbake -S
printdiff, we use this find_siginfo() function implemented in this
module to find the siginfo/sigdata files corresponding to the tasks
we're looking for. However, native sstate files go into a
NATIVELSBSTRING subdirectory and there was no handling for this when
asking about native recipes.

I'm not even sure why we were walking SSTATE_DIR in order to find
this - we don't need to, we just need to run glob.glob() on the filespec
we calculate, which should be a little bit more efficient.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoqemu: use python2.7 instead of python2
Martin Kelly [Thu, 6 Apr 2017 19:48:39 +0000 (12:48 -0700)]
qemu: use python2.7 instead of python2

meta/conf/bitbake.conf puts python2.7 into the HOSTTOOLS variable but not
python2, so only python2.7 is guaranteed. In addition, on some distros -- such
as Amazon Linux -- /usr/bin/python2 doesn't exist but python2.7 does. So, use
python2.7 for the --python= argument in the qemu configure step.

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoselftest/recipetool: skip create_git in case x11 feature is not present
Leonardo Sandoval [Thu, 6 Apr 2017 16:41:51 +0000 (09:41 -0700)]
selftest/recipetool: skip create_git in case x11 feature is not present

The unit test requires x11 as distro feature, otherwise it will fail
while building the test requirements.

[YOCTO #10903]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoqemux86*.conf: changed dependency task for syslinux
Ed Bartosh [Thu, 6 Apr 2017 14:48:17 +0000 (17:48 +0300)]
qemux86*.conf: changed dependency task for syslinux

Changed dependency task for syslinux from do_build to
do_populate_sysroot as do_build dependency caused conflicts in
populating image recipe sysroot using conflicting recipes. This
makes do_image_wic task to fail with FileExistsError trying to
copy the same file from two conflicting recipes.

This should also speed up image creation a bit as do_populate_sysroot
task is faster than do_build.

[YOCTO #11295]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agogcc-6.3: backport fix of check for empty string in ubsan.c
Joshua Lock [Thu, 6 Apr 2017 13:23:14 +0000 (14:23 +0100)]
gcc-6.3: backport fix of check for empty string in ubsan.c

Building gcc-cross-initial with GCC7 on the host fails due to the
comparison of a pointer to an integer in ubsan_use_new_style_p, which
is forbidden by ISO C++:

ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and
integer [-fpermissive]
       || xloc.file == '\0' || xloc.file[0] == '\xff'

Backport the fix from upstream GCC to enable the build with GCC 7

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoelfutils: fix building elfutils-native with GCC7
Joshua Lock [Thu, 6 Apr 2017 13:23:13 +0000 (14:23 +0100)]
elfutils: fix building elfutils-native with GCC7

Backport a fix from upstream for a -Wformat-truncation=2 warning
and implement a simple fix for a -Wimplicit-fallthrough warning.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosstate: Skip glibc do_stash_locale and gcc do_gcc_stash_builddir tasks
Richard Purdie [Wed, 5 Apr 2017 14:37:12 +0000 (15:37 +0100)]
sstate: Skip glibc do_stash_locale and gcc do_gcc_stash_builddir tasks

We never need these tasks as dependencies of other sstate tasks since
they're only ever needed to build artefacts so we can always skip them
and save some time/space.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolicense.bbclass: improve reproducibility
Juro Bystricky [Wed, 5 Apr 2017 21:51:31 +0000 (14:51 -0700)]
license.bbclass: improve reproducibility

Two identical builds can end up having deploy/licenses folders
that differ. This is observed in cases where there are several
different license files of the same name in different folders,
i.e. "COPYING". In those case we have to differentiate the files
somehow and we do it via file expensions such as COPYING.0, COPYING.1.
However, which file will get which extension is presently random.
This means, for example, that COPYING.0 in one build is the same
as COPYING.1 in the other (and vice versa).
Although there is mothing wrong with this, for the sake of binary
reproducibility it is preferable to have a deterministic outcome.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoselftest/wic: skip wic unit tests in case NLS is disable
Leonardo Sandoval [Wed, 5 Apr 2017 22:34:26 +0000 (15:34 -0700)]
selftest/wic: skip wic unit tests in case NLS is disable

WIC test case requires wic-tools which in turn depends on intltool-native and
gettext-native. However, if NLS is disable, the gettext-minimal-native is used instead
of gettext-native causing a failure on intltool-native as seen below:

  checking for msgfmt... no
  checking for gmsgfmt... no
  configure: error: GNU gettext tools not found; required for intltool
  ERROR: Function failed: do_configure (log file is located at /home/lsandov1/poky/build/tmp/work/i586-poky-linux-musl/systemd-boot/232-r0/temp/log.do_configure.7518)
  ERROR: Task (/home/lsandov1/poky/meta/recipes-bsp/systemd-boot/systemd-boot_232.bb:do_configure) failed with exit code '1'
  NOTE: Tasks Summary: Attempted 609 tasks of which 604 didn't need to be rerun and 1 failed.

[YOCTO #10902]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopython3: fix run-time deps for core python3 libraries
Dmitry Rozhkov [Thu, 6 Apr 2017 05:07:44 +0000 (08:07 +0300)]
python3: fix run-time deps for core python3 libraries

The http.server module from python3-netclient imports the html module
which is in python3-html. Also xmlrpc.server imports pydoc which is a
part of python3-pydoc. But those run-time dependencies are missing
from python3-netclient and python3-xmlrpc respectively.

Add the missing run-time dependencies.

Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoeudev: set LGPL-2.1+ for libudev package
Martin Jansa [Thu, 6 Apr 2017 11:02:27 +0000 (13:02 +0200)]
eudev: set LGPL-2.1+ for libudev package

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agokmod: set ac_cv_path_DOLT_BASH to /usr/bin/env bash
Robert Yang [Thu, 6 Apr 2017 10:05:56 +0000 (03:05 -0700)]
kmod: set ac_cv_path_DOLT_BASH to /usr/bin/env bash

The shebang's length is usually 128 as defined in /usr/include/linux/binfmts.h:
  #define BINPRM_BUF_SIZE 128

So there would be errors when /path/to/hosttools/bash is longer than 128:

/bin/sh: ./doltcompile: [snip]: bad interpreter: No such file or directory

Set ac_cv_path_DOLT_BASH to "/usr/bin/env bash" to fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoautogen-native: fix POSIX_SHELL and perl
Robert Yang [Thu, 6 Apr 2017 10:05:55 +0000 (03:05 -0700)]
autogen-native: fix POSIX_SHELL and perl

The shebang's length is usually 128 as defined in /usr/include/linux/binfmts.h:
  #define BINPRM_BUF_SIZE 128

So there would be errors when /path/to/hosttools/perl is longer than 128.

This patch fixes the problem when POSIX_SHELL and perl are used as the interpreters.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoguile: do_configure: fix "Argument list too long"
Robert Yang [Thu, 6 Apr 2017 10:05:54 +0000 (03:05 -0700)]
guile: do_configure: fix "Argument list too long"

Fixed when len(TMPDIR) =  410:
Can't exec "/bin/sh": Argument list too long at /usr/lib/perl/5.18/IO/File.pm line 65.

This is becuase it has a lot of m4 files, use relative path for them
can fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agom4: do_configure: fix "Argument list too long"
Robert Yang [Thu, 6 Apr 2017 10:05:53 +0000 (03:05 -0700)]
m4: do_configure: fix "Argument list too long"

Fixed when len(TMPDIR) =  410:
Can't exec "/bin/sh": Argument list too long at /usr/lib/perl/5.18/IO/File.pm line 65.

This is becuase it has a lot of m4 files, use relative path for them
can fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agovalgrind: set ac_cv_path_PERL to /usr/bin/env perl
Robert Yang [Thu, 6 Apr 2017 10:05:52 +0000 (03:05 -0700)]
valgrind: set ac_cv_path_PERL to /usr/bin/env perl

The shebang's max length is usually 128 as defined in
/usr/include/linux/binfmts.h:
  #define BINPRM_BUF_SIZE 128

So there would be errors when /path/to/hosttools/perl is longer than 128.

Set ac_cv_path_PERL to "/usr/bin/env perl" to fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agomc: replace "perl -w" with "use warnings"
Robert Yang [Thu, 6 Apr 2017 10:05:51 +0000 (03:05 -0700)]
mc: replace "perl -w" with "use warnings"

The shebang's max length is usually 128 as defined in
/usr/include/linux/binfmts.h:
  #define BINPRM_BUF_SIZE 128

There would be errors when @PERL@ (hostools/perl) is longer than 128,
use '/usr/bin/env perl' can fix the problem, but '/usr/bin/env perl -w'
doesn't work:

/usr/bin/env: perl -w: No such file or directory

So replace "perl -w" with "use warnings" to make it work.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agogroff: replace "perl -w" with "use warnings"
Robert Yang [Thu, 6 Apr 2017 10:05:50 +0000 (03:05 -0700)]
groff: replace "perl -w" with "use warnings"

The shebang's max length is usually 128 as defined in
/usr/include/linux/binfmts.h:
  #define BINPRM_BUF_SIZE 128

There would be errors when @PERL@ (hostools/perl) is longer than 128,
use '/usr/bin/env perl' can fix the problem, but '/usr/bin/env perl -w'
doesn't work:

/usr/bin/env: perl -w: No such file or directory

So replace "perl -w" with "use warnings" to make it work.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoglibc/gcc/libgcc-initial: Delete do_build tasks for -initial
Richard Purdie [Wed, 5 Apr 2017 16:27:20 +0000 (17:27 +0100)]
glibc/gcc/libgcc-initial: Delete do_build tasks for -initial

We've had a lot of users running into RSS issues where -initial recipes
were being installed into sysroots alongside their counterparts and
causing overlapping files issues.

In general this was through do_build dependencies. Such dependencies are
bad in general and I'd encourage people to compare the taskgraphs with
using a more specific dependency like do_populate_sysroot, do_image_complete
or do_deploy as often the more specific dependency will result in a much
cleaner build.

Regardless, we don't want -initial dependencies getting in the way like
this and there are cases a do_build dependency could make sense.

Deleting the do_build task in these cases makes sense since this is not
a build "endpoint" we'd ever want a user to use, its a behind the scenes
piece of bootstrappping.

Unfortunately to make this work, we need a newer bitbake version which
has a bitbake bug fixed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosanity: Require bitbake 1.33.4
Richard Purdie [Thu, 6 Apr 2017 11:22:33 +0000 (12:22 +0100)]
sanity: Require bitbake 1.33.4

We need the bitbake bug in recrdeptask handling of missing tasks fixed in
order to apply a fix for OE-Core.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobase-files: profile: Do not assume that the tty command exists
Peter Kjellerstedt [Mon, 3 Apr 2017 12:48:26 +0000 (14:48 +0200)]
base-files: profile: Do not assume that the tty command exists

This avoids the following error when logging in to a host that does
not have the tty command:

-sh: tty: not found

Reported-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobase-files: profile: Whitespace clean up
Peter Kjellerstedt [Mon, 3 Apr 2017 12:48:25 +0000 (14:48 +0200)]
base-files: profile: Whitespace clean up

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobusybox: Security fix BUG9071
Martin Balik [Wed, 5 Apr 2017 10:38:57 +0000 (12:38 +0200)]
busybox: Security fix BUG9071

Signed-off-by: Martin Balik <martin.balik@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoghostscript: CVE-2017-7207
Catalin Enache [Wed, 5 Apr 2017 12:06:51 +0000 (15:06 +0300)]
ghostscript: CVE-2017-7207

The mem_get_bits_rectangle function in Artifex Software, Inc.
Ghostscript 9.20 allows remote attackers to cause a denial
of service (NULL pointer dereference) via a crafted PostScript
document.

Reference:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-7207

Upstream patch:
http://git.ghostscript.com/?p=ghostpdl.git;h=309eca4e0a31ea70dcc844812691439312dad091

Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopackage.bbclass: add CONFFILES to pkgdata
David Vincent [Wed, 5 Apr 2017 15:43:07 +0000 (17:43 +0200)]
package.bbclass: add CONFFILES to pkgdata

Emit CONFFILES variable in pkgdata, or else the get_conffiles function
will return 'None' for some packages instead of the expected value. This
is especially true for optional module packages.

Signed-off-by: David Vincent <freesilicon@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopackage_ipk.bbclass: Replace empty lines in DESCRIPTION with '.'
Mariano Lopez [Wed, 5 Apr 2017 18:46:35 +0000 (11:46 -0700)]
package_ipk.bbclass: Replace empty lines in DESCRIPTION with '.'

opkg uses empty lines as separator for next package and if an ipk file was
packaged with empty lines in DESCRIPTION opkg won't be able to handle such ipk
file, this happens at execution time.

This commit will replace empty lines in DESCRIPTION with a '.' when generating
an ipk package to avoid this issue.

[YOCTO #10677]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoyocto-compat-layer: limit report of signature changes
Patrick Ohly [Wed, 5 Apr 2017 13:36:05 +0000 (15:36 +0200)]
yocto-compat-layer: limit report of signature changes

Typically a single change cascades through the entire task dependency
chain. Developers had to figure that out themselves, based on hard to
read and interpret output (not sorted, no indention, no explanations):

   $ yocto-compat-layer.py -n meta-xxxx
   ...
   AssertionError: True is not false : Layer meta-xxxx changed signatures.
   webkitgtk:do_install changed fe2edc9082bc0da98f9cb1391c52f565 -> b3a44684c5cd9aacd3f7c6ed88eefab5
   gstreamer1.0-plugins-good:do_configure changed 3b2f8211be3fe08422bf6087f3af16d1 -> 7d80e42fa1f4f01ff4dfe2ea4477d382
   pulseaudio:do_package_qa changed 5d0a58ada66ff17f5576555302ac319a -> 0e13bcb96143d1ae54c451bc3de0aa30
   epiphany:do_prepare_recipe_sysroot changed 29e1b277dbcb005bd54950594c50d91b -> d3c45527b37677a0668ce483c6db3052
   ...
   gst-player:do_packagedata changed 9ce6efdd357dd74919bc4957458b1e95 -> d0c083ce629f37adfc9c4ba9eff81f83
   gstreamer1.0-plugins-base:do_install changed 1161cd867d15bea63e5dd5d9abf0519c -> 5bf2b652a2d77fee3eedb35af2f201a0
   gstreamer1.0-rtsp-server:do_packagedata changed 6781dc3070f80b843ed1970d74dd323e -> 454620c2e3b9fea87e525d14b6ed0344
   alsa-plugins:do_packagedata changed 1808c3f737cb805b169d004e948ea19c -> 480124b7fa5eab1f73bf96440d725231

Now the tool automates the problem analysis: it retrieves the depgraph
using the tinfoil API and only reports those tasks with modified
signatures whose dependencies have not changed, i.e. those tasks which
definitely introduce a change.

>From the previous example, that just leaves two tasks that need to be
checked:

   AssertionError: False is not true : Layer meta-xxxx changed 120 signatures, initial differences (first hash without, second with layer):
      gstreamer1.0-plugins-base:do_fetch: 76973f19f2e30d282152bdd7e4efe5bb -> e6e7c6fa9f2bd59d7d8d107f7c6ca1ac
      pulseaudio:do_install: 668eb1e30af129df9806b0aa0d7c10cd -> 1196bdb88eef56eeee4613bb06b9387e

This pruning might be a bit too aggressive in the sense that tasks
which inherit a change and then add more changes themselves won't be
reported initially. They will be found when fixing the reported tasks
and re-running the check.

For a developer it seems better to have something listed which
definitely is a problem and needs fixing instead of everything,
including the tasks which don't need fixes.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoyocto-compat-layer: fix also other command invocations
Patrick Ohly [Wed, 5 Apr 2017 13:36:04 +0000 (15:36 +0200)]
yocto-compat-layer: fix also other command invocations

In commit 5b9ac62ab535d, one place was fixed where a command was
invoked such that failures caused double stack traces and stderr was
lost. The same problem also occurs elsewhere, triggered for example by
a layer with parsing problems.

Now a new utility method is used instead of repeating the code.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooe-build-perf-report-email.py: fix one file path
Markus Lehtonen [Thu, 6 Apr 2017 07:10:18 +0000 (10:10 +0300)]
oe-build-perf-report-email.py: fix one file path

Sending report email was not working correctly if the script was given
an html report path that contained directory components.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobusybox: Security fix CVE-2016-6301
Andrej Valek [Thu, 6 Apr 2017 07:07:37 +0000 (09:07 +0200)]
busybox: Security fix CVE-2016-6301

ntpd: NTP server denial of service flaw

CVE: CVE-2016-6301
Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: use realpath for imgdir
Robert Yang [Thu, 6 Apr 2017 06:41:37 +0000 (23:41 -0700)]
runqemu: use realpath for imgdir

The DEPLOY_DIR_IMAGE maybe relative or absolute path since it can be
read from env vars, so use realpath for both imgdir and
DEPLOY_DIR_IMAGE when compare.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqemu: fix 2 typos
Robert Yang [Thu, 6 Apr 2017 06:41:33 +0000 (23:41 -0700)]
runqemu: fix 2 typos

* "is it" -> "it is"
* Remove "<image>.qemuboot.conf =" in the error message which looked strange.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooeqa/runtime/utils/targetbuildproject: use parent classes defaults tmpdir
Joshua Lock [Wed, 5 Apr 2017 12:10:55 +0000 (13:10 +0100)]
oeqa/runtime/utils/targetbuildproject: use parent classes defaults tmpdir

Rather than hard-coding the tmpdir for TargetBuildProject to /tmp allow the
parent's default handling to define an appropriate tmpdir.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooeqa/utils/targetbuild: tmp dir improvements
Joshua Lock [Wed, 5 Apr 2017 12:10:54 +0000 (13:10 +0100)]
oeqa/utils/targetbuild: tmp dir improvements

Don't hard-code /tmp as the tmpdir, instead use WORKDIR as the tmpdir if the
instantiater doesn't specify a value.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agooeqa/utils/buildproject: create a more unique tmp dir
Joshua Lock [Wed, 5 Apr 2017 12:10:53 +0000 (13:10 +0100)]
oeqa/utils/buildproject: create a more unique tmp dir

Rather than hardcoding /tmp as the default tmpdir make a more unique tmpdir
with tempfile.mkdtemp() when the caller doesn't specify a tmpdir value.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoglibc: fix nativesdk ldd RTLDLIST
Ming Liu [Tue, 4 Apr 2017 15:12:37 +0000 (17:12 +0200)]
glibc: fix nativesdk ldd RTLDLIST

Override RTLDLIST for nativesdk, or else ldd would fail to run on
SDK targets.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agonet-tools: Fix build with USE_NLS="no"
Jussi Kukkonen [Tue, 4 Apr 2017 08:09:29 +0000 (11:09 +0300)]
net-tools: Fix build with USE_NLS="no"

The configuration change was already done for -native but
we really want it when USE_NLS is set.

Fixes [YOCTO #11285].

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agobusybox.inc: drop comment explaining '-e MAKEFLAGS=' in EXTRA_OEMAKE
Andre McCurdy [Tue, 4 Apr 2017 01:58:43 +0000 (18:58 -0700)]
busybox.inc: drop comment explaining '-e MAKEFLAGS=' in EXTRA_OEMAKE

EXTRA_OEMAKE no longer contains '-e MAKEFLAGS=' so the comment
explaining that it needs to be removed / over-ridden is obsolete.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoethtool: Switch to download mirror
Paul Barker [Sun, 2 Apr 2017 21:31:35 +0000 (22:31 +0100)]
ethtool: Switch to download mirror

The md5sum & sha256sum for ethtool-4.8.tar.gz have changed upstream :(

Signed-off-by: Paul Barker <pbarker@toganlabs.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoselftest/devtool: skip test in case of poky-tiny distro
Leonardo Sandoval [Tue, 4 Apr 2017 04:20:08 +0000 (21:20 -0700)]
selftest/devtool: skip test in case of poky-tiny distro

The recipe being tested (devtoo-test-patch-gz) by devtool has dependencies (at
least libxres and virtual/libx11) that cannot be built with poky-tiny distro so
skip the test for this particular policy.

[YOCTO #10891]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agolibxml2: make dependencies on python conditional
Dmitry Rozhkov [Tue, 4 Apr 2017 06:46:46 +0000 (09:46 +0300)]
libxml2: make dependencies on python conditional

The library libxml2 can provide its own bindings for python2 in addition
to the third party python-lxml and python3-lxml packages if this
functionality is enabled in PACKAGECONFIG.

But in case the functionality is disabled there's no need to depend
on python2.

Make the dependency on python2 enabled only if the python feature
is added to PACKAGECONFIG. Also add missing run-time dependency on make
to libxml2-ptest.

Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoyocto-uninative: Update to the 1.6 release
Joshua Lock [Mon, 3 Apr 2017 16:26:22 +0000 (17:26 +0100)]
yocto-uninative: Update to the 1.6 release

This release includes fixes for Windows/Mingw support.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agou-boot: Add bc-native to DEPENDS to fix u-boot/spl build.
Philip Balister [Mon, 3 Apr 2017 12:51:38 +0000 (08:51 -0400)]
u-boot: Add bc-native to DEPENDS to fix u-boot/spl build.

Signed-off-by: Philip Balister <philip@balister.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agolibjpeg-turbo: don't depend on NASM for non-x86 targets
Ross Burton [Mon, 3 Apr 2017 11:57:52 +0000 (12:57 +0100)]
libjpeg-turbo: don't depend on NASM for non-x86 targets

NASM is a x86-specific assembler so it is only required when building for x86
targets.  Use x86-architecture and class-target overrides to depend on NASM, but
explicitly disable and don't depend on it for native as complications in the
native overrides meant NASM was enabled for x86-64 but disabled for x86 (this
will be investigated later).

Original patch by Tristan Van Berkom <tristan.vanberkom@codethink.co.uk>, more
work to solve selftest failures by Richard Purdie
<richard.purdie@linuxfoundation.org>.  I just wrote a nice commit message.

Also fix some missing whitespace in _appends.

[ YOCTO #11240 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoquilt: Fix paths for patch and perl
Jussi Kukkonen [Thu, 30 Mar 2017 16:49:28 +0000 (19:49 +0300)]
quilt: Fix paths for patch and perl

Currently some shebang lines end up as
    #! /usr/bin/env perl -w
env does not like the argument. Also the current sed to insert env
does not cover the copies ptests use. Fix these issues by:
 - using --with-perl to insert "env"
 - Replacing "-w" in shebang lines with a new "use warning;" line

Remove a EXTRA_OECONF_append_class_target from the native recipe.
Don't overwrite EXTRA_OECONF in native: the values should be correct
for native as well.

--with-patch is used within the gnu patch wrapper only: before this
commit the wrapper contained a (build host) path to native patch.

Also tweak one test so busybox mv output is accepted.

All ptests should now pass: Fixes [YOCTO #11221].

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agowic: improve error message
Chen Qi [Thu, 30 Mar 2017 08:37:36 +0000 (16:37 +0800)]
wic: improve error message

When using `wic create mkefidisk -e core-image-minimal', the following
error message appeared.

  Please bake it with 'bitbake parted-native' and try again.

However, following this command doesn't do any help. The same problem
still appeared.

The problem is that when we 'bitbake parted-native', it doesn't have
anything to do with core-image-minimal. And the required tool 'parted'
is not under core-image-minimal's recipe-sysroot-native directory.

Improve the error message so that following it could get things done.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agoRevert "filemap: remove FilemapSeek class"
Ed Bartosh [Mon, 3 Apr 2017 15:31:00 +0000 (18:31 +0300)]
Revert "filemap: remove FilemapSeek class"

FIEMAP API is not supported by tmpfs file system, but
SEEK_HOLE/SEEK_DATA is supported.

Returned back FilemapSeek class that implements support
of SEEK_HOLE/SEEK_DATA API to make sparse_copy API working
on tmpfs again.

This reverts commit 6b80c13f7a82a312a3b981de5a56c66466ba1fac.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agobuild-perf-test-wrapper.sh: support sending email reports
Markus Lehtonen [Mon, 3 Apr 2017 15:58:39 +0000 (18:58 +0300)]
build-perf-test-wrapper.sh: support sending email reports

Add new '-E' command line option for sending an email report to
specified recipient.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
8 years agobuild-perf-test-wrapper.sh: support pushing to remote Git
Markus Lehtonen [Mon, 3 Apr 2017 15:58:38 +0000 (18:58 +0300)]
build-perf-test-wrapper.sh: support pushing to remote Git

Implement new '-P' option for spefifying a Git remote where to push
results after committing to a local Git repository.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>