Commit Graph

4053 Commits

Author SHA1 Message Date
Lucian Musat 994915b0af oeqa/testimage: Remove absolute path to oeqa from json
In the json file the whole datastore is serialized which contains
absolute path to the oeqa folder. This breaks the functionality
when trying to run the tests from other machines.

(From OE-Core rev: 94057ccc70aa3fe29d774f571a65f56fd1285d4c)

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:30 +01:00
Alexander Kanavin ea031f05a5 distrodata: handle recipes with empty or absent SRC_URI in checkpkg()
(From OE-Core rev: ea7cd81d6d1d4d00553cd475623af0d24f5ea84f)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:25 +01:00
Ross Burton 5fd30897f5 sstate: run recipe-provided hooks outside of ${B}
To avoid races between the sstate tasks/hooks using ${B} as the cwd, and other
tasks such as cmake_do_configure which deletes and re-creates ${B}, ensure that
all sstate hooks are run in the right directory, and run the prefunc/postfunc in WORKDIR.

(From OE-Core rev: 1d3bde02641f4b40030cf7e305ee3d7c2faabe29)

(From OE-Core rev: a026dbfa0ce4ee769ae2c714f27f4c4eaa4a0c73)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:22 +01:00
Patrick Ohly 5f371e5a0b image types: add hdddirect
When image-vm.bbclass was introduced, it indirectly also introduced a
".hdddirect" image type based on boot-directdisk.bbclass. However, one
could only get that image when also enabling at least one of the
virtual machine images.

The .hdddirect images are useful by themselves. By registering
image-vm.bbclass as implementation of it, it becomes possible to
select them with:
  IMAGE_FSTYPES = "hdddirect"

(From OE-Core rev: e3ff509091cbbfdef851f8a3c9e31c7b76d37e89)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:21 +01:00
Alex Franco c5aab3f63e sanity.bbclass: show warning when chmod fails
* for some reason this part of:
  http://patchwork.openembedded.org/patch/102561/
  wasn't ever merged.

[YOCTO #7669]

(From OE-Core rev: 95daa7c26d119ae11f1835ce0e895bbd4a3e9605)

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:20 +01:00
Richard Purdie 5d4f39f258 mulitlib: Ensure SDKTARGETSYSROOT is set correctly
When building something like lib32-core-image-minimal -c populate_sdk, we
expect one sysroot with both multilibs installed. We therefore
need a single SDKTARGETSYSROOT value which doesn't change when multilibs
are enabled.

This makes the image generation code match what the meta-environment
files set the SDK up to use.

(From OE-Core rev: a6ade4d24e8153920311db9a9033a7f5c430d1e4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:17 +01:00
Ross Burton c356961f15 gtk-icon-cache/pixbufcache: don't set GDK_PIXBUF_MODULEDIR
In normal use gdk-pixbuf knows where to find its own loaders and explicitly
stating this will cause work in the future if the ABI version changes.

(From OE-Core rev: 87eea290a799be0e852d8b3c357879680abedb77)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:17 +01:00
Ross Burton 8a12632e97 gdk-pixbuf: move gdk-pixbuf-query-loaders to $libdir for multilib safety
If for example gdk-pixbuf and lib32-gdk-pixbuf are in an image then only one
${bindir}/gdk-pixbuf-query-loaders will be installed, so only one variant will
actually be usable.

Solve this by moving gdk-pixbuf-query-loaders into ${libdir} as it's intimately
tied to the library and rarely directly invoked by the user, and update the
callers to use the right path.

(From OE-Core rev: 69df75f268e2b3d5874f05e2b5a6125f6d990a03)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:16 +01:00
Richard Purdie 7fb583aa95 multilib: Drop populate_sdk variable manipulation
I believe this code dates from previous times when we didn't extend
the TOOLCHAIN_TARGET* variables to cover all multilibs. We now do
this so this code acutally breaks things by removing the non-multilib
variants.

By changing this, a multilib SDK now contains both sets of base libraries
which matches the tools we ship with it. If the user wishes to customise,
this also becomes easier.

(From OE-Core rev: 568b81b5102213643e382d31a4e5e56f90ee6ff9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28 12:00:15 +01:00
Richard Purdie 99fc78653a archiver: stamp-base is dead, remove it
stamp-base was only ever used by the shared workdir code in gcc. This
turned out to be problematic and has been replaced by other approaches
which don't need specialist bitbake knowledge.

stamp-base will likely get removed from bitbake but for now, remove it
from archiver to simplfy the code since gcc no longer uses it.

This stops people getting confused by the obsolete code paths which I'm
getting a lot of questions about.

(From OE-Core rev: 4b9f70f03cbefe9db758500e3ad89f7a8ff8226e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-24 17:54:31 +01:00
Robert Yang dd26efba06 insane.bbclass: make package_qa_clean_path return a relative path
Make package_qa_clean_path() return something like "work/path/to/file"
rather than "/work/path/to/file", the relative path is a little clear.

(From OE-Core rev: 67a1e4b087a39db04370685616d5b439b0f2b505)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-24 17:54:26 +01:00
Paul Eggleton 8fb70c6e7a classes/externalsrc: fix setting of deps varflag as a string
The value of the deps varflag for tasks is (unusually) expected to be a
list object rather than a space-separated string, hence we cannot use
appendVarFlag() here. This fixes a traceback when parsing the gcc recipe
with externalsrc enabled, for example.

(From OE-Core rev: 47c1ff11a9b8b1e9f40ffb2b3d387252200cf0ec)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:53:13 +01:00
Paul Eggleton 586291fe2b classes/externalsrc: scale back warning to a plain note
It turns out that there are folks out there who use externalsrc in
normal builds and don't really need to be warned; additionally within
the extensible SDK or when using devtool, it shouldn't be a warning
situation. Thus, scale it back to a note (we can't use bb.note() here
since that wouldn't actually be piped through to the bitbake UI). Also
touch up the message a little bit.

(From OE-Core rev: 87bedd137a77c5ac0033a1de4587c40dbe93e81d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:53:13 +01:00
Paul Eggleton 0dc9299774 classes/populate_sdk_ext: drop work-config.inc
This is not actually used for anything - I thought that we would need to
use it within devtool to set global configuration, but we're able to do
everything we need within the bbappends it creates, which also saves on
parse time. If we're not going to use work-config.inc let's just drop it
completely.

(From OE-Core rev: 84a1f82acd3b6ebb3c073aae6b996d2203dad2ce)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:53:12 +01:00
Paul Eggleton 3a08728671 classes/populate_sdk_ext: allow custom configuration for extensible SDK
Provide the ability to define a function containing extra configuration
values to be added to the local.conf file that goes into the SDK. For
example, this could be used to set up SSTATE_MIRRORS within the SDK.

(From OE-Core rev: ef7001232ac2da8ee63ec568d1abba13e4fd4382)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:53:11 +01:00
Paul Eggleton b853dded41 classes/populate_sdk_ext: fix missing environment settings if running installer with sh
If you ran the extensible SDK installer file with sh (instead of bash),
then the additional call to buildtools environment setup, extension of
PATH to support running devtool, and setting of OE_SKIP_SDK_CHECK
weren't being added to the end of the script. This is because apparently
bash is happy to expand wildcards in the target of a redirection, but
bash running in POSIX sh mode won't (although it apparently does work on
the sh command line rather than within a script run as an argument to
sh). In any case using a wildcard here is a bit of a crutch which we
don't need, so replace it with the proper path to the environment setup
script.

(From OE-Core rev: ba0f6b6ec32275329ebbb7c27f661c027b7a921d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:53:11 +01:00
Mike Looijmans 9241ec5793 image_types.bbclass: Don't try to create ubi symlink twice
Fixes b6e64de541b37 "Restore compatibility with previous UBI filesystems"

The multivolume UBI code creates symlinks for each volume. If the volume name
is empty, it will create a symlink that the rootfs code will attempt to
create again later, resulting in a crash like this (unless IMAGE_LINK_NAME
is blank):
  ERROR: Error executing a python function in .../recipes-core/images/my-image.bb:
  File: '.../oe-core/meta/lib/oe/image.py', lineno: 203, function: _create_symlinks
   *** 0203:                    os.symlink(src, dst)
  Exception: OSError: [Errno 17] File exists

To prevent this from happening, only create symlinks to volumes that have
a name, and let the rootfs script create the default symlink later.

(From OE-Core rev: fce257892488b9ef537526ccf412e9deda37c439)

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:53:10 +01:00
Marek Vasut 8efff24775 kernel-arch: Add nios2 to valid archs
Add nios2 target to valid arch list definition.

Based on previous work by Walter Goossens <waltergoossens@home.nl>
at https://github.com/wgoossens/meta-nios2 .

(From OE-Core rev: f0af7d0d9316a6eeacc0686b8c4640491f255883)

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Walter Goossens <waltergoossens@home.nl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:53:07 +01:00
Marek Vasut 76a8c74c13 insane: Add nios2 support
Add support information for the Altera NIOS-II soft processor.

Based on previous work by Walter Goossens <waltergoossens@home.nl>
at https://github.com/wgoossens/meta-nios2 .

(From OE-Core rev: 4e8175cf0f0a5b9e75e451b030b73643e7b33791)

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Walter Goossens <waltergoossens@home.nl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:53:06 +01:00
Christopher Larson 6adffd09e5 autotools: fix traversal bug in aclocal copying
The logic is supposed to avoid following dependencies when we depend on
a target recipe which depends on a native recipe. The problem is, we were
marking the dep (the native recipe) as already processed when we avoided
traversal, meaning that even when that recipe would be pulled in via
a different dependency, we skipped it there too, and whether it was skipped
entirely depended on the non-deterministic dep processing order. If the first
one to be encountered was via the indirect target dep, it wouldn't end up in
configuredeps, otherwise it would.

As we want to avoid traversing that particular dependency relationship, not
*every* dependency on the native, we should continue, but not add it to done,
so it can be traversed from other avenues.

This fixes an intermittent bug in some of my non-GPLv3 builds, where one
dependency upon gettext-minimal-native was skipped, but others should not have
been, resulting in it being removed from configuredeps entirely, and no
gettext macros being available.

Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
(From OE-Core rev: e6d4f8198a8708f54fc17333ae643b51ed9100b6)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:53:06 +01:00
Mariano Lopez c8a7d76d36 testimage.bbclass: Fix break introduced with SIGTERM handling
The SIGTERM introduced another break into runexported test,
the handler is in the class TestContext while exporting it
will try to convert the singnal handler to JSON, and this
will throw an exception.

The SIGTERM handler is not needed in the exported test, so this
change will remove the handler before exporting the test. Also
when a test is exported the target is not deployed/started
anymore, it is not necessary.

[YOCTO #8239]

(From OE-Core rev: 94ab9892e87f159840432fdbfb3873d4496d4786)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:53:03 +01:00
Martin Jansa a96069d410 insane.bbclass: drop extra line-feed in pkgname check
* it was causing QA checck name to be shown on separate line like this:
  sblim-sfcCommon-1.0.1: sblim-sfcCommon-dev doesn't match the [a-z0-9.+-]+ regex
   [pkgname]

(From OE-Core rev: 8df8b942fa570de42910dcd8a1416063cbe1ddbe)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:53:00 +01:00
Martin Jansa 10fb575d61 insane.bbclass: show PN and relative path in package_qa_check_host_user
* show PN as other QA checks
* strip PKGDEST prefix from shown path as other QA checks

(From OE-Core rev: 39b1bca459d52b58ca055604b5012d9a411e3a59)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:52:59 +01:00
Martin Jansa 5624889982 package.bbclass: add summary line to installed-vs-shipped QA check
* there is PN at the beginning, then possibly long list of files and
  at the end we don't see which recipe has this issue, add another
  line which says which PN and how many files

(From OE-Core rev: 32412ac530bcf286980a6f9c7367df4944dd603a)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:52:59 +01:00
Randy Witt a66f586729 testimage.bbclass: Don't require an image manifest
Sometimes an "image" may not actually have a manifest file such as when
using a "baremetal kernel". This change allows for  a user to set a
IMAGE_NO_MANIFEST flag to 1 in order to inform the code that there is no
corresponding manifest that should exist for an image.

(From OE-Core rev: 78f5c3cb3971c31a950deb5cab8992f3ba577440)

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23 09:52:53 +01:00
Robert Yang 96795000ea autotools.bbclass: mkdir ${B} -> mkdir -p ${B}
${B} is the default cwd of tasks, so there might be race issues such as:
| mkdir: cannot create directory `${B}': File exists
[snip]
NOTE: recipe perf-1.0-r9: task do_configure: Failed

(From OE-Core rev: 72682d72b52355c3fed947167ca3c6064340ead1)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-18 09:05:31 +01:00
Christopher Larson 6c05e6a71a image.bbclass: add do_rootfs vardeps for {COMPRESS, IMAGE}_CMD_*
We want do_rootfs to rerun if the fstype or compression commands or
dependencies change for any of our configured fstypes (IMAGE_FSTYPES).
IMAGE_TYPEDEP isn't explicitly handled, as it's traversed already, so the end
result will change if it does, and we only really care about the results, not
how we got there. This uses oe.image.Image()._get_image_types() to get the
info about the image and compression types in use.

(From OE-Core rev: a3473d1ee30f8ec688d57dddb6e3c2b887194384)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-18 09:05:26 +01:00
Alejandro Hernandez 7eabed3039 distutils.bbclass: Handle python-backport modules
When installing backport modules they stumble upon each other, complaining with
the following error:

ERROR: The recipe python-backports-ssl is trying to install files into a shared
area when those files already exist.

This is the correct behavior since thats just the way they were designed, all backport
modules provide an __init__.py file (the same among all packages), and without it they
simply wouldnt work.

distutils handles FILES_${PN}* variables for python packages, but it uses wildcards
to include the required files, hence removing the __init__.py files from each backport
package during build time is impossible since it doenst actually contain that value,
this patch simply removes the __init__.py* files from the staging area if they already
exist on sysroot, this way, these are not included in FILES_${PN} anymore, fixing the
issue mentioned above.

[YOCTO #8207]

(From OE-Core rev: e607a89267949b3d5e199b139f752db6000eac25)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-14 20:46:38 +01:00
Mike Looijmans 62fca975cf image_types.bbclass: Restore compatibility with previous UBI filesystems
Support for multiple ubi images has broken dozens of machine deployment scripts
in two ways:
Previously, ubi filesystems would be named $IMAGE_NAME as one would expect. The
current version would append "_rootfs" to that name for no reason. Fix it so that
the name for ubi images remains unchanged if there is only one image to build.
Machines would append to IMAGE_CMD_ubi, adding extra image processing of their
own. This is broken now that IMAGE_CMD_ubi became a variable instead of a function.
Make IMAGE_CMD_ubi a function again, this also makes for more logical quotes (I
was surprised to find that " within " would even work).

(From OE-Core rev: b6e64de541b37bc5c558c4ad362a0467291a5609)

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-14 20:46:36 +01:00
Richard Purdie 58ef81c5cc testimage: Handle core-image-lsb-sdk qemumips test restriction
On qemumips, some tests are slow to the point of the autobuilder appearing
hung. We therefore specifically exclude buildsudoku but to do this, we need
to list the tests we expect to work on core-image-lsb-sdk.

(From OE-Core rev: cf03765705c6cd26c1a904b62b9aca8f914f44aa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:48 +01:00
Richard Purdie 7c2ff62cb4 populate_sdk_base: Fix aarch64 OLDEST_KERNEL sdk issues
aarch64 sets OLDEST_KERNEL to 3.14. This stops the aarch64 SDK installing on
anything with an older kernel which is clearly incorrect.

I attempted to extract the correct non-overridden version from the data store
but it proved problematic and I was running into data store issues. Those
are a separate problem but there isn't time to fix this right now.

Instead just code the SDK kernel version separately to work around this for
now (and fix the autobuilder tests and SDK usage).

(From OE-Core rev: 522ba4c51fff53566678b2689d0d63c393e417b3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:47 +01:00
Richard Purdie 6a71f66173 testimage: Fix SDK extraction error handling
Currently if the SDK fails to extract, no error is shown and the test is marked
as passed! Clearly this is incorrect, fix it to correctly raise an error.

(From OE-Core rev: fb2235a21e45fa1a47c3b7a9a6a72c515ef10dd1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:47 +01:00
Ross Burton 9cda8f782f Revert "ptest: use fakeroot for do_install_ptest_base"
This reverts commit 56c5fa106eeccda2ca92dbeb73ff01ba40992e7d.

(This fix was incorrect and there is a better fix due to be merged)

(From OE-Core rev: 21e044d92e927639a574c43cf7778e31f2e66377)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:46 +01:00
Paul Eggleton 3a9e230b7a classes/sstate: break out function to get sstate manifest filename
It is useful in a few different contexts to see which files have been
written out by an sstate task; break out a function that lets us get the
path to the manifest file easily.

(From OE-Core rev: 090196dd2d8f4306b34b239e78c39d37cc86034c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:45 +01:00
Ross Burton 48a144b4a4 sstate: only fetch remote signatures if verification is enabled
Only fetch remote signatures if verification has been enabled, as otherwise the
fetcher throws errors that sstate.bbclass can't ignore.

[ YOCTO #8265 ]

(From OE-Core rev: aa8ba5c4af2636dbc2d0c1ad9c230e8aa26d9962)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:35 +01:00
Patrick Ohly f7056fafd2 Revert "boot-directdisk.bbclass: use rootfs UUID by default"
This reverts commit 8ca8e2e5bf4a9f01dc48300149a8e1d71d715400.

Further testing showed the kernel does not support root=UUID; it is
something typically handled by the initramfs.

Because boot-directdisk.bbclass cannot know whether it is using a
suitable initramfs, root=UUID cannot be the default. Instead, it will
have to be set in image recipes on a case-by-case basis.

(From OE-Core rev: 8478024bd25651aa866d4582dcc193d51553554a)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:35 +01:00
Ross Burton a2ec6d4720 ptest: fix file ownerships in ${PTEST_PATH}
As most upstreams don't have installable test suites it's fairly common to copy
files directly out of a source tree for ptests, but this results in files in the
recipe being owned by the user running bitbake:

  WARNING: QA Issue: .../sed/4.2.2-r0/packages-split/sed-ptest/usr/lib64/
  sed/ptest/testsuite/bug-regex21 is owned by uid 1000, which is the same
  as the user running bitbake. This may be due to host contamination
  [host-user-contaminated]

Instead of needing to fix this in every recipe that has this problem simply
chown the files to root:root in do_install_ptest_base.

(From OE-Core rev: 552daf60c58784c8f1acc12c5a443a44a922f743)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:34 +01:00
Roy Li d0abea0133 packagegroup-core-nfs: provide the nfs-client IMAGE_FEATURES
provide the nfs-client IMAGE_FEATURES, to ease a user to only
install nfs client related files to image

(From OE-Core rev: bbdc808a8ea76369a36473c906991e25ca49c323)

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:32 +01:00
Markus Lehtonen 9a24b6b123 externalsrc.bbclass: better filtering of cleandirs
We really do not want our (external) source tree to be removed. There
might be multiple values in the 'cleandirs' varflag pointing to our
source tree - causing it to be wiped out. This patch improves the
filtering of 'cleandirs' by examining the expanded values inside it. Any
(expanded) values pointing to our source tree get removed.

(From OE-Core rev: eec871fe405e140a1919999fe2f4cf24f1839e5d)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:31 +01:00
Christopher Larson 32633f0844 sanity.bbclass: remove abspath warning for SSTATE_MIRRORS
The sstate URI is relative to begin with, so it's completely valid to want to
alter it in a way that keeps it relative using a mirror, and I have real world
cases where this is causing issues. Remove the warning.

(From OE-Core rev: 6d20514b1289212991b4945ad267f85960dc945c)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12 22:48:25 +01:00
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
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
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 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 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