Commit Graph

36015 Commits

Author SHA1 Message Date
Ross Burton dae69e6dcf ptest: use fakeroot for do_install_ptest_base
The do_install_ptest_base task wasn't running in the fakeroot environment so
files installed by do_install_ptest were often not owned by root:root but the
user running the builds.

(From OE-Core rev: 56c5fa106eeccda2ca92dbeb73ff01ba40992e7d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:55 +01:00
Richard Purdie 9bfaf596fb oeqa/sstatettests: Improve output of assert
Currently if this fails you see:

"AssertionError: 1 != 0"

which is useless. Add the output of the failed command so we can stand
some chance of debugging what went wrong.

(From OE-Core rev: e482f9bfddc6b710c9b566c3d3433dc2d7d5a22e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:54 +01:00
Armin Kuster 79af375397 bind: update to 9.10.2-p4
fixes two secruity issues:
CVE-2015-5722 and CVE-2015-5986.

see release notes for more information.
ftp://ftp.isc.org/isc/bind9/9.10.2-P4/RELEASE-NOTES.bind-9.10.2-P4.html

(From OE-Core rev: 0dab62934e69019557ebae392dc8cb25e37748c2)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:54 +01:00
Kai Kang e384b970ad screen: backport to fix build error
It fails to compile screen rarely with:

|.../4.3.1-r0/screen-4.3.1/display.h:154:19: error: 'T_N' undeclared here (not in a function)
|   union tcu d_tcs[T_N]; /* terminal capabilities */
|                      ^

Macro T_N is defined in header file term.h but it may not be created
then fails. Backport patch to make sure term.h is created before compile
other source codes.

(From OE-Core rev: 81499ff3bd60dfa931fbae75922a342c31251480)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:54 +01:00
Paul Eggleton 69b7a613fc devtool: fix running from a different directory
Fixes the following error when running devtool from a directory other
than the build directory (or the SDK base path when using within the
extensible SDK):

  The BBPATH variable is not set and bitbake did not find a
  conf/bblayers.conf file in the expected location.
  Maybe you accidentally invoked bitbake from the wrong directory?

(From OE-Core rev: 1687ec04bfee327fe24fdfecb67db689835769f2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:53 +01:00
Brendan Le Foll 7b1f670ca3 devtool: add package plugin that lets you create package via devtool
Enables creating packages using devtool within the extensible SDK. (This
is only enabled within the extensible SDK because it provides no
advantage over just running bitbake directly there).

(From OE-Core rev: 6dc0269bca3e874582d61b40dbf0d495331fb96a)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:53 +01:00
Paul Eggleton 6d50a5e0ed devtool: update-recipe: add a warning when recipe is inside the workspace
If a recipe has been added to the workspace via "devtool add"
or "devtool upgrade" then the recipe file itself will be in the
workspace layer; if you run "devtool update-recipe" particularly in the
upgrade case you might think it would apply the upgrade to the original
recipe, but it will not - in order to remain consistent it has to update
the recipe that's in use which is the one in the workspace. Warn the
user in this situation so that they know what they need to do when they
are finished.

(From OE-Core rev: 4801b64243e57e554a593f0857dd53621d8f52e5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:52 +01:00
Markus Lehtonen 3dd9fc39ab devtool: update-recipe: better 'auto' mode
Enhance the logic behind the 'auto' mode a bit by only updating the
SRCREV if the changes are already found upstream. The logic is simple:
update SRCREV only if the current local HEAD commit is found in the
remote branch (i.e. 'origin/<branch_name>'). Otherwise resort to
patching.

This affects a couple of the oe-selftest tests so update those as well.

[YOCTO #7907]

(From OE-Core rev: 9b9733b7d74032aef4979bec553019421e77da14)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:52 +01:00
Leonardo Sandoval 0d0e50810a devtool: Allow disabling make parallelism on build command
Through -s/--disable-parallel-make, the user can turn off parallelism
on the make tool. This can be useful when debuging race condition issues.
In order to set PARALLEL_MAKE = "" a post-config file created and then
passed into the build.

[YOCTO #7589]

(From OE-Core rev: 0bf2e4b3edfc43e7a2e8d3387a9370d110533b7c)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:52 +01:00
Leonardo Sandoval 1a721815ed devtool: Create a single file for the build devtool feature
The intention is to have a single file for each devtool feature
so devtool can grow in a modular way. In this direction, this patch creates
build.py, moving all related build features from standard.py to build.py.

(From OE-Core rev: 61bb1759f7ecb8b404f7d97573c61aef31f2f109)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:51 +01:00
Leonardo Sandoval 8be95c5fbe devtool: add upgrade feature
Upgrades a recipe to a particular version and downloads the source code
into a folder. User can avoid patching the source code.

These are the general steps of the upgrade function:

   - Extract current recipe source code into srctree and create a branch
   - Extract upgrade recipe source code into srctree and rebase with
     previous branch. In case the rebase is not correctly applied, source
     code will not be deleted, so user correct the patches
   - Creates the new recipe under the workspace

[YOCTO #7642]

(From OE-Core rev: 4020f5d91b3e4d011150d5081d36215f8eab732e)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:51 +01:00
Paul Eggleton 7cde0ebd59 devtool: improve modified file preservation to handle directory structures
Allow the _add_md5() function to be called with a directory in order to
recursively add the files under it. Additionally, we need to skip
preserving empty directories (since directories aren't listed in the md5
file).

(From OE-Core rev: 9383af78adc854a6f6de8b1520edf3cea0c477a6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:50 +01:00
Paul Eggleton ee0c11d988 scriptutils: split out simple fetching function from recipetool
This will now also be used by "devtool upgrade".

(From OE-Core rev: 0d0b8425eaf74a6d7f3d9f6471e6edca1a273c06)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:50 +01:00
Markus Lehtonen 3690281efb devtool: modify: enable do_shared_workdir for kernel
Do not put 'do_shared_workdir' into SRCTREECOVEREDTASKS when creating
bbappend for kernel packages. This will allow building packages that
depend on the shared build artifacts of kernel.

[YOCTO #6658]

(From OE-Core rev: 2355ccc627c0003a14693d1a023a003b7b44ea53)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:50 +01:00
Markus Lehtonen baf39c800a kernel.bbclass: do not mv/link sources when externalsrc enabled
If externalsrc is enabled the 'do_unpack' task is run if the recipe has
some local source files. In the case of kernel recipe this caused the
(externalsrc) source tree to be moved/symlinked. This patch prevents the
behaviour, making sure the source tree is not moved around when
externalsrc is enabled. Instead of moving the source tree,
STAGING_KERNEL_DIR will be a symlink to it.

[YOCTO #6658]

(From OE-Core rev: 8f6c564661a3801012eb2d9a98cdc99c91712367)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:49 +01:00
Markus Lehtonen 0ec0b17f4b kernel-yocto.bbclass: do_kernel_metadata depends on do_unpack
Make sure that 'do_unpack' is executed before 'do_kernel_metadata'.
Enabling externalsrc for kernel disables 'do_validate_branches' task
which caused 'do_kernel_metadata' to fail as the dependency chain to
'do_unpack' got broken.

[YOCTO #6658]

(From OE-Core rev: 8939ea428f642fd6fa48807ded1f9040f09ed375)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:49 +01:00
Markus Lehtonen 07ac146c90 extrernalsrc.bbclass: treat kernel meta like local source
Kernel metadata repository needs to be fetched/unpacked into the work
directory in order to build the kernel. Sources pointing to a remote
location are skipped by externalsrc by default which caused kernel build
to fail (because of remote kernel-meta was not made availeble). This
patch will make kernel-meta always available.

[YOCTO #6658]

(From OE-Core rev: b746280c955f48835d119f3fe637876faae6df97)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:49 +01:00
Alejandro del Castillo 08e09222b2 adt-installer: upgrade to opkg 0.3.0
- Opkg 0.3.0 deprecated --disable-shave & --withopkglibdir options.
- Add -i option to autoreconf since opkg tarball is missing conf.compile.
- Recreate wget_cache.patch

(From OE-Core rev: 8683e198829b729b2f242336d9de6d79251b4be9)

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:48 +01:00
Cristina Agurida dd075b9e79 oeqa/parselogs: Updated log error whitelist.
[YOCTO #7898]
[YOCTO #7761]
[YOCTO #7804]

(From OE-Core rev: fb3a5c732997eddee6dacb52558d4e6c8942f1e1)

Signed-off-by: Cristina Agurida <cristina-danielax.agurida@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:48 +01:00
Jagadeesh Krishnanjanappa 8a2edb9856 binutils: Add thunderx support to gas
Without this patch, cross compiling for AArch64 with
"-mcpu=thunderx" fails with below error,

-- snip --
Assembler messages:
Error: unknown cpu `thunderx'
Error: unrecognized option -mcpu=thunderx
-- CUT --

(From OE-Core rev: 0cdf96013f66ee3a695038af633e3160b7f720dc)

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:47 +01:00
Bruce Ashfield 8ad2c024f3 linux-yocto/3.14: fix edgerouter (octeon) build
Upating the SRCREVs to import the following commit:

    Author: Kevin Hao <kexin.hao@windriver.com>
    Date:   Mon Aug 31 19:34:48 2015 +0800

        mips: octeon: use ll/sc for the atomic ops for all the predecessor
        of octeon2

        Even the octeon plus has the support of the 'saa' instruction, but
        we
        don't have a way to distinguish between octeon and octeon plus at
        compile time and pass "-march=octeon" to all the predecessor of
        octeon2. So it will cause the following error when trying to
        assemble
        the "saa" instruction with option "-march=octeon":
          {standard input}: Assembler messages:
          {standard input}:360: Error: Unrecognized opcode `saa $2,($4)'
          scripts/Makefile.build:308: recipe for target
        'arch/mips/cavium-octeon/executive/cvmx-lap.o' failed

        Forcing to use the "ll/sc" for the atomic ops for all the
        predecessor
        of octeon2 to fix this issue.

        Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
        Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>

(From OE-Core rev: a31c715fe484af7fe582d8becac0f20a33acac42)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:47 +01:00
Richard Purdie e87c182b6c qemurunner: Fix killpg pid usage
killpg should be being called with a pgid, not a pid.

(From OE-Core rev: d23bf86f305a04a47d19236d72979c1027a31620)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:47 +01:00
Richard Purdie 335260cbfc qemurunner: Ensure runqemu doesn't survive SIGKILL
Currently, we see runqemu and qemu-system-* processes left behind when
bitbake is killed by buildbot. This is due to the use of setpgrp() in
the runqemu subprocess call.

We need the setpgrp call so that all runqemu processes can easily be
killed (by killing their process group). This presents a problem if this
controlling process itself is killed however since those processes don't
notice the death of the parent and merrily continue on.

Rather than hack runqemu to deal with this, we add something to
qemurunner, at least for now to resolve the issue. Basically we fork off
another process which holds an open pipe to the parent and also is
setpgrp. If/when the pipe sees EOF from the parent dieing, it kills the
process group. This is like pctrl's PDEATHSIG but for a process group
rather than a single process.

(From OE-Core rev: 99428eafb5352bd39bc4329bdba07c6d6f17b03f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:46 +01:00
Martin Jansa 79bf3f7155 rootfs.py: show intercept script output in log.do_rootfs
* without this the output wasn't shown anywhere even when the bb.warn
  says:
  "See log for details!"

(From OE-Core rev: a3c322b42c7a14584a80e04519c34689ec813210)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:46 +01:00
Robert Yang 525979f3f6 package_manager.py: search provides when not found by pkgname
Fixed when:
PACKAGE_CLASSES = "package_rpm"
IMAGE_INSTALL_append = " perl-module-warnings-register"

$ bitbake core-image-minimal
[snip]
ERROR: perl-module-warnings-register not found in the base feeds
[snip]

And it works well when PACKAGE_CLASSES = "package_ipk" since perl
provides perl-module-warnings-register, the "smart install
perl-module-warnings-register" also works well, this was because
_search_pkg_name_in_feeds() only searched pkg name, but no provides,
this patch fixes the problem.

(From OE-Core rev: 476f9ab6e37bd516919862835e6e00c960a9e242)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:45 +01:00
Ed Bartosh 4031de53f4 wic: round variable before converting to int
Wic uses bitbake variable ROOTFS_SIZE to set correspondent
partition size. This variable is a literal representing
float value. Wic crashes trying to convert it to int with
the error: invalid literal for int() with base 10: '10166.0'

Fixed this by converting variable to float and rounding result.
This should work for int and float literals.

(From OE-Core rev: 3479e299b5f11dfcd3f5f97c4ad3e0449f6c6d6a)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:45 +01:00
Khem Raj a0590d1ada rootfs: Do not uninstall update-rc.d
update-rc.d is now needed by systemd to interact with sysv
scripts, so if we have a mixed system, then we can not uninstall
update-rc.d as it is going to break systemd functionality

(From OE-Core rev: acf90b6c299afe9e9c8fa33c3c6992bfcf40fbbf)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:45 +01:00
Khem Raj 697428cbba busybox: Enable getopt applet
getopts is a common applet more so now needed by systemd for working
with sysv scripts

(From OE-Core rev: 10c2c484d5916ad476ad7717c3629f6684f01e6d)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:44 +01:00
Richard Purdie e3b5d8f42c qemurunner: Drop error to a warning to improve user feedback
If a task shows an error, the full log is surpressed since bitbake assumes
the user has been shown what is wrong. In this code path that isn't the
case and its much more helpful to show the user the full error. Therefore
show a warning instead to aid usability.

(From OE-Core rev: 4ccef5543649262a1630bff586ef9048fe164016)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:44 +01:00
Richard Purdie fa2f7f9964 qemu: Add fixes for smc91c11 qemu segfaults on arm
The smc91c111.c driver appears to have several issues. The can_receive()
function can return that the driver is ready when rx_fifo has not been
freed yet. There is also no sanity check of rx_fifo() in _receive() which
can lead to corruption of the rx_fifo array.

release_packet() can also call qemu_flush_queued_packets() before rx_fifo
has been cleaned up, resulting in cases where packets are submitted
for which there is not yet any space.

This patch therefore:

* fixes the logic in can_receive()
* adds logic to receive() as a sanity check
* moves the flush() calls to the correct places where data is ready
  to be received

Its currently undergoing discussion upstream about exactly which pieces
are the correct fix but for now, this stops the segfaults OE is seeing
which has to be an improvement.

[YOCTO #8234]

(From OE-Core rev: 414a5256d6f00d5682ce226ee4bc49674ee6c614)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:44 +01:00
Qi.Chen@windriver.com ee428e27fe devtool: add mechanism for updating extensible SDK
Enable updating the installed extensible SDK from a local or remote
server, avoiding the need to install it again from scratch when
updating. (This assumes that the updated SDK has been built and then
published somewhere using the oe-publish-sdk script beforehand.)

This plugin is only enabled when devtool is used within the extensible
SDK since it doesn't make sense to use it next to a normal install of
the build system.

E.g.
devtool sdk-update /mnt/sdk-repo/
devtool sdk-update http://mysdkhost/sdk

(From OE-Core rev: 32cbd4c57fc8ca097a18929fc404c07322ef36dd)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:43 +01:00
Qi.Chen@windriver.com 2aaa59ed8e oe-publish-sdk: add script
Add a script to publish an extensible SDK that has previously been built
to a specified destination. This published SDK is intended to be
accessed by the devtool sdk-update command from an installed copy of the
extensible SDK.

e.g.
oe-publish-sdk <ext-sdk> <destination>

(From OE-Core rev: c201ab826046b30281341107b3e6a35204f5c9d8)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:43 +01:00
Qi.Chen@windriver.com ad959638c0 Extensible SDK: allow for installation without preparing build system
When publishing SDK, what we want is basically its metadata and sstate
cache objects. We don't want the SDK to be prepared with running bitbake
as it takes time which reproduces meaningless output for the published SDK.

So this patch adds an option to allow for SDK to be extracted without
preparing the build system.

(From OE-Core rev: 7511862faad1c28804e2410ff42747c8706c5207)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:43 +01:00
Qi.Chen@windriver.com 9f670d18ba populate_sdk_ext: don't remove the native qemu dependencies
These dependencies were deliberately removed because it was assumed that
they were provided by nativesdk packages. On the one hand, nativesdk packages
in extensible SDK don't have these packages; on the other hand, even if we
add these nativesdk packages, they are still not useful because we we need
runqemu to run correctly.

So we don't remove these native qemu dependencies.

(From OE-Core rev: 526537404d5a07189d4c6859f4a572d2107dbfd8)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:42 +01:00
Qi.Chen@windriver.com 164136d310 populate_sdk_ext: consider custom configuration in local.conf
Copy the contents of local.conf under TOPDIR into the final generated
local.conf. In this way, custom settings are also made into the final
local.conf like IMAGE_INSTALL, DISTRO_FEATURES, VIRTUAL-RUNTIME_xxx,
etc. Comments and blank lines are filtered out.

Before this change, installing extensible SDK would usually report failure
when preparing the build system if the user has custom configuration for
DISTRO_FEATURES in local.conf. Also, items in IMAGE_INSTALL_append in
local.conf also don't get built correctly.

This patch solves the above problem by making use of bb.utils.edit_metadata.

In addition, we check to avoid any setting that might lead to host paths
bleeding into the SDK's configuration. Basically, variables with values
starting with '/' are removed. A whitelist mechanism is introduced so that
users could specify variables that should not be ignored. The name of the
whitelist is SDK_LOCAL_CONF_WHITELIST.

The SDK_META_CONF_WHITELIST is removed as it's of no use after this
change.

SDK_LOCAL_CONF_BLACKLIST can be used to prevent copying specific
variable settings to the extensible SDK's local.conf; the default is to
exclude PRSERV_HOST (since this is likely to be internal). Similarly,
SDK_INHERIT_BLACKLIST to forbit local.conf in SDK to inherit certain
classes such as 'buildhistory' or 'icecc' that would not normally make
sense in an SDK environment.

[YOCTO #7616]

(From OE-Core rev: 0dda443bfa5c42f327d8d0ed7b23af11c156a60e)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:42 +01:00
Qi.Chen@windriver.com d7efdfeb5b copy_buildsystem: make sure bitbake directory is copied
The previous code assumes that bitbake/ directory is under the core layer.
This is the case for Yocto project. But users might clone oe-core and bitbake
separately. So we use bb.__file__ to locate the bitbake directory to make sure
it's copied into the extensible SDK.

(From OE-Core rev: 1be1db87343a48e9c25297245a2749d9df25d23c)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:41 +01:00
Qi.Chen@windriver.com 479deeb3f1 populate_sdk_ext: install the latest buildtools-tarball
If we do `bitbake buildtools-tarball' and then after one day do `bitbake
core-image-minimal -c populate_sdk_ext', we would meet errors like below.

| install: cannot stat '/buildarea2/chenqi/poky/build-systemd/tmp/deploy/sdk/
poky-glibc-x86_64-buildtools-tarball-core2-64-buildtools-nativesdk-standalone
-1.8+snapshot-20150429.sh': No such file or directory

The problem is that the output name for buildtools-tarball has ${DATE} in it.
So if populate_sdk_ext task is executed but buildtools-tarball is not rebuilt,
the above error appears.

Instead of hardcoding ${DISTRO_VERSION} which consists of ${DATE} in the
install_tools() function, we should find the latest buildtools-tarball based
on the modification time and install it.

[YOCTO #7674]

(From OE-Core rev: fa708504d71e0b01ee97a172ac17ad16a9e3b897)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:41 +01:00
Paul Eggleton 16d0df58d1 classes/populate_sdk_ext: avoid poky-specific buildtools naming
Only poky sets SDK_NAME to include ${IMAGE_BASENAME} (i.e. ${PN}), so we
can't assume the buildtools filename will include it here. Change it to
look for a file with "buildtools-nativesdk-standalone" in the name
(the buildtools-tarball recipe itself sets TOOLCHAIN_OUTPUTNAME to
include this.)

(From OE-Core rev: 78ea4fcdea468888c0faef22a95dea7015a91df2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:41 +01:00
Brendan Le Foll 45871802af toolchain-shar-extract.sh: explain why we cannot use sudo in extensible SDK
(From OE-Core rev: 0129a12dd3bdb0e9966643c3a355d5eec846da8b)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:40 +01:00
Brendan Le Foll 08d07355c5 toolchain-shar-extract.sh: better default install path for extensible SDK
Extensible SDK cannot be installed as root so by default offer to install it in
user's home directory under distro/distro_version replacing the normal SDK
version '+' char with a '_' as that's a restricted character for bitbake

(From OE-Core rev: 5486e76cd8abb946b81cff78719d67cfb87cddc6)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:40 +01:00
Brendan Le Foll f5f9185344 toolchain-shar-extract.sh: ensure extensible SDK install path obeys restrictions
There are some characters that cannot appear in the installation path, so we
need to check for these

(From OE-Core rev: 5aa9314c342004797e96c87868c5491ad70c13f9)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:40 +01:00
Mariano Lopez 6b41b7cc32 testimage: handle SIGTERM to conclude runqemu
In the current state if a SIGTERM is sent to
the testimage worker, the worker will exit but
runqemu and qemu won't exit and the processes
need to be killed manually to free the
bitbake lock.

This allows to catch the SIGTERM signal in
testimage, this way it is possible to stop
runqemu and qemu and allow to free the bitbake lock.

Also this allows to skip the rest of the tests
when running the tests in qemu or real hardware.

This also solves minimal breaks in the setup of the
runtime test when checking if qemu is alive.

[YOCTO #8239]

(From OE-Core rev: 2694d2f17d597b44fcc7aed5f6836081fa88a6b3)

Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:39 +01:00
Martin Jansa e570b32020 postinst_intercept: allow to pass variables with spaces
* trying to pass foo="a b" through postinst_intercept ends
  with the actual script header to containing:
  b
  foo=a
  which fails because "b" command doesn't exist.

(From OE-Core rev: c66d7d85b7225be8c838449324d506565dd0081d)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:39 +01:00
Martin Jansa ae00b59200 rootfs.py: Allow to override postinst-intercepts location
* useful when we need to overlay/extend intercept scripts from oe-core

(From OE-Core rev: 7d08d2d5c0ae686e3bb8732ea82f30fd189b1cd8)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:38 +01:00
Belen Barros Pena db92bc2388 bitbake: toaster: replace ETA with % of tasks done
The ETA we show for builds in progress is woefully
inaccurate. In the 1.8 release we replaced it with
the % of tasks completed. Somehow, we regressed to
the ETA, so bringing the task % back.

(Bitbake rev: a841dc85770ea5c6fa8cf06ba5fdfe214e69afb2)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-08 23:54:15 +01:00
Belen Barros Pena c386abc89e bitbake: toaster: fix project names in latest builds
Make sure that the project name we show for each build
in the latest builds section of the all builds page:

* Has the same styles as the build, depending on the
build status (in progress, failed or success)

* Links to the project page

(Bitbake rev: 09abcf3199b2e86758a974a47ebe31f5fb79440a)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-08 23:54:15 +01:00
Belen Barros Pena a4dbd4bfa1 bitbake: toaster: remove unnecessary white space
There was too much white space above the first
heading in the all builds page. This patch removes
the class that was adding the extra space.

(Bitbake rev: c9b20009c5e161987a143b00ee22218a4c9c0692)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-08 23:54:15 +01:00
Richard Purdie 1e9ac4c5cc bitbake: toastergui: Add missing files from 1c2f6b9b7b9e700146944b9d6d2114e0d014ee81
(Bitbake rev: cf2b6b621cb483aa1a1a66c09fc431efc207c91e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-08 23:54:14 +01:00
Peter Seebach c1df471fea pseudo_1.7.3.bb: New version of pseudo
Pseudo 1.7 adds an experimental feature (which I think needs more testing
before it becomes the default) allowing the pseudo client to store modes
and uid/gid values in extended attributes rather than using the sqlite
database. On most Linux-like systems, this works only if the underlying
file is a plain file or a directory.

Also added is a profiling feature to allow some amount of reporting on
the wall-clock time the client spends in wrappers, processing operations,
or in IPC. This feature is not intendeded to be precisely accurate, but
gives a good overview of where time is going.

Based on the results from the profiling feature, the client now suppresses
OP_OPEN and OP_EXEC messages if the server is not logging messages, and
no longer uses constant dynamic allocation and free cycles for canonicalized
paths.

There's a few other likely-looking optimizations being considered, but
this seemed like a good cutoff for now.

1.7.1 fixes two bugs, one affecting mostly XFS systems with 64-bit
inode values, and one affecting code that called realpath(x, NULL), such
as the RPM backend.

1.7.2 fixes an indirect side-effect of the chmod fixes to deal with
umask 0700, which had no effect with opkg 0.2.4 but appears to cause
failures with 0.3.0.

1.7.3 prevents mkdirat() (and mkfifoat()) from setting errno on success,
because glibc's localedef inexplicably errors out if errno was set, even
if the operation's actual return code (which it tests) indicated
success.

(From OE-Core rev: 8402958cd2cb87b8283c8ee4e2d08e1a6717d67a)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-06 15:26:27 +01:00
Ross Burton e3feac122b sstate: implement basic signing/validation
To provide some element of integrity to sstate archives, allow sstate archives
to be GPG signed with a specified key (detached signature to a sidecar .sig
file), and verify the signatures when sstate archives are unpacked.

(From OE-Core rev: 237b6c51b42b0c64434dc45685e10f757ac939c2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-06 15:26:27 +01:00