Commit Graph

5360 Commits

Author SHA1 Message Date
Robert Yang 8cedb5f3f0 binconfig.bbclass: fix typo in get_binconfig_mangle()
It should be -IOEINCDIR, not -I-IOEINCDIR.

(From OE-Core rev: 3c432e130b47461f845e1618b565f174417e1aa5)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-14 09:47:08 +01:00
Richard Purdie b5c383074a base-passwd/useradd: Various improvements to useradd with RSS
Currently there are multiple issues with useradd:

* If base-passwd rebuilds, it wipes out recipe specific user/group additions
  to sysroots and causes errors
* If recipe A adds a user and recipe B depends on A, it can't see any of the
  users/groups A adds.

This patch changes base-passwd so it always works as a postinst script
within the sysroot and copies in the master files, then runs any
postinst-useradd-* scripts afterwards to add additional user/groups.

The postinst-useradd-* scripts are tweaked so that if /etc/passwd doesn't exist
they just exit, knowning they'll be executed later. We also add a dummy entry to
the dummy passwd file from pseudo so we can avoid this too.

There is a problem where if recipe A adds a user and recipe B depends on A but
doesn't care about users, it may not have a dependency on the useradd/groupadd
tools which would therefore not be available in B's sysroot. We therefore also
tweak postinst-useradd-* scripts so that if the tools aren't present we simply
don't add users. If you need the users, you add a dependency on the tools in the
recipe and they'll be added.

We add postinst-* to SSTATE_SCAN_FILES since almost any postinst script of this
kind is going to need relocation help.

We also ensure that the postinst-useradd script is written into the sstate
object as the current script was only being added in a recipe local way.

Thanks to Peter Kjellerstedt <pkj@axis.com> and Patrick Ohly for some pieces
of this patch.

[Yocto #11124]

(From OE-Core rev: 1b5afaf437f7a1107d4edca8eeb668b9618a5488)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-14 09:47:08 +01:00
Ed Bartosh 4273422072 sstate.bbclass: check if mirror directory is writable
Commit 51edde6537 makes a wrong assumption
that SSTATE_MIRRORS have write permissions.

A mirror is by definition outside of it's user control. In my use case
it happens I does not have permissions to update the access time of the
dereferenced symbolic-link file.

Checked if file is writable before changing its atime.

Thanks to Paulo Neves for the patch.

[YOCTO #11307]

(From OE-Core rev: b8f26c011d5ed888d85fef040bd821400d54c8fe)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-13 10:54:10 +01:00
Ed Bartosh ec9b108f46 qemuboot: write native sysroot of qemu-helper into qemuboot.conf
Native sysroot of qemu-helper contains all required tools
(qemu-system and tunctl atm) for runqemu to work. It's not
removed by rm_dir and should always exist. It makes sense
to write it into qemuboot.conf to make runqemu to use it
as a default directory for native tools.

This should also speed up runqemu as it doesn't need to run
to run 'bitbake qemu-helper -e' to get its native sysroot.

[YOCTO #11266]
[YOCTO #11193]

(From OE-Core rev: 0f207bfc1f7a4fd509b78d32bbe1a8d4ebea8053)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-13 10:54:10 +01:00
Mylène Josserand 04f3423a2a meta: classes: Add building dir to uImage creation
On the do_uboot_mkimage task from kernel-uimage.bbclass, in case
KEEPUIMAGE is different than the default "yes" value, the uboot-mkimage
command fails because the path of the created uImage does not exist.

On this task, we are under the BUILDDIR so there is no folder arch/<ARCH>/boot.
Add the ${B} (for kernel build directory) as prefix to this folder fixes the problem.

(From OE-Core rev: e5a6ee0d0655827d06a6030380277ee61a6db0ef)

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-13 10:54:10 +01:00
Robert Yang 9dc4707035 blacklist.bbclass: fix for multilib
* Fixed:
  The netmap has been blacklisted in
  meta-networking/recipes-kernel/netmap/netmap_git.bb, but lib32-netmap still can
  be built (suppose it doesn't depend on another broken recipe netmap-modules, it
  is a little complicated, will talk below):
  $ bitbake lib32-netmap

  This is because of the old code masks on bb.event.ConfigParsed which can only
  handle global blacklist, netmap sets blacklist in the recipe, so it can't be
  handled, and lib32-netmap can be built. which was incorrect:
  blacklist_multilib_eventhandler[eventmask] = "bb.event.ConfigParsed"

  Move multilib code into multilib.bbclass can fix the problem easily:
  $ bitbake lib32-netmap
    ERROR: Nothing PROVIDES 'lib32-netmap'
    ERROR: lib32-netmap was skipped: Recipe is blacklisted: BROKEN: <foo>

* Not fixed
  Another problem is netmap-modules has also been blacklisted in the recipe, and
  the recipe inherits module.bbclass, so multilib.bbclass doesn't handle it as the
  code shows:
    # There should only be one kernel in multilib configs
    # We also skip multilib setup for module packages.
    provides = (e.data.getVar("PROVIDES") or "").split()
    if "virtual/kernel" in provides or bb.data.inherits_class('module-base', e.data):
        raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel")

  And netmap-modules provides lib32-netmap-modules which is handled in
  multilib_global.bbclass, so bitbake lib32-netmap-modules can't show
  the blacklist message:
  $ bitbake netmap-modules
  ERROR: Nothing PROVIDES 'netmap-modules'
  ERROR: netmap-modules was skipped: Recipe is blacklisted: BROKEN: <foo>
  ERROR: netmap-modules was skipped: We shouldn't have multilib variants for the kernel

  $ bitbake lib32-netmap-modules
  ERROR: Nothing PROVIDES 'lib32-netmap-modules'. Close matches:
    netmap-modules
    netmap-modules
    lib32-fbset-modes

  Note the different messages between netmap-modules and lib32-netmap-modules.
  This is because multilib.bbclass doesn't handle the "module" recipe so
  there is no PN called lib32-netmap-modules, therefore blacklist.bbclass can't
  handle it.

  Note, there are two "netmap-modules" which needs to be fixed later.

(From OE-Core rev: c8749ed1edcbb544f6656ee5da80f2cf647c405a)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-13 10:54:09 +01:00
Jussi Kukkonen db1f1adace 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.

(From OE-Core rev: 731744d5538e315702be828e6f2bd556309dee07)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:58 +01:00
Robert Yang f57393b386 runqemu: do not rely on grepping images
Fixed when the image is large and not enough memory:
  grep: memory exhausted
  Aborted

[YOCTO #11073]

(From OE-Core rev: a99deb30a0138594147ae28aab016fe4b74b8959)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:57 +01:00
Richard Purdie 283a9b3883 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.

(From OE-Core rev: b32fbfc85b14059f0bfdeeffe2c52f8d3c20f276)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:18 +01:00
David Reyna ba1d8e3691 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]

(From OE-Core rev: a6ec56d372f833be50f57bcb79b6ebe78bb93be0)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:18 +01:00
Paul Eggleton 3df7ee4755 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.

(From OE-Core rev: ca5d1273432e20059ab66d721a9eb314a54e81e7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:18 +01:00
Paul Eggleton 54426c3a3b 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.

(From OE-Core rev: a147838c3dfd4c53084a19b052b8d4e183293412)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:17 +01:00
Paul Eggleton 6774995322 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.

(From OE-Core rev: 11f68f65c46c5bc26ddeeade3021e83b3a7f895a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:17 +01:00
Patrick Ohly 874a46b6a7 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.

(From OE-Core rev: e4c28ea05ef4514deb3d19e8e33f81d352712455)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:17 +01:00
Richard Purdie 0793c758b1 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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 00:57:03 +01:00
Richard Purdie 177d4be3c1 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.

(From OE-Core rev: cd5e0a32184d98beb8d81e6b5527166d3ca4fb3c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Ming Liu 863b6d4f80 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.

(From OE-Core rev: 767335c92b7cc657a008722a908380a3c89c3c66)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Ming Liu e378c0ee4b 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.

(From OE-Core rev: 85b69a5ec9ba9ea9ebdcd8ac18e1e147ddb1ff33)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Ming Liu 0ab2c6e82d 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.

(From OE-Core rev: 3facbe700a2f28a11620c4954686ed5d5e47a3d9)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Ming Liu b9f9bb443b 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.

(From OE-Core rev: 55c83cb239df5faf5e2143fffca47f2f16931cb3)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Richard Purdie 34313c4047 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.

(From OE-Core rev: 246df3df4b7da4b75de0745938438124c2b1d4a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:43 +01:00
Juro Bystricky 950be7ae8d 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.

(From OE-Core rev: 007ebc84979b1bc8b7520097793c7ab6d646c243)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:43 +01:00
David Vincent 77de4e58bf 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.

(From OE-Core rev: ee44dabc065912ac17f1ee5f06f12695c90b5482)

Signed-off-by: David Vincent <freesilicon@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:42 +01:00
Mariano Lopez 78971cee15 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]

(From OE-Core rev: 3e678d9b6a9eaeed76ce538d7f6ecf9f423864bc)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:42 +01:00
Ming Liu 5e3a636b20 kernel.bbclass: move in addtask kernel_link_images statement from linux-yocto.inc
Add kernel_link_images task in kernel.bbclass instead of adding it in
linux-yocto.inc, or else the recipes inheriting kernel.bbclass might
run into implicit dependency issues.

(From OE-Core rev: 3211d43d80f69d9c200a0e4f90fd37736046aafe)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-05 23:22:12 +01:00
Ross Burton bb81269c3d sanity: explain where TMPDIR is if we're telling the user to delete it
(From OE-Core rev: c03de901213846d7c8cc2a12a97034273aa904c3)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-05 23:22:12 +01:00
Richard Purdie a584c181ac recipe_sanity: Drop now unused FILESDIR
FILESDIR is long dead and unreferenced pretty much anywhere now, drop these
sanity references too.

(From OE-Core rev: 760ab75be6b794fdcd0b1717439fcea605db9e0b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-05 23:22:11 +01:00
Ming Liu c09a0631b5 kernel.bbclass: introduce INITRAMFS_IMAGE_NAME
It defaults to ${INITRAMFS_IMAGE}-${MACHINE} if INITRAMFS_IMAGE is not
empty.

This allows the end users to be able to override the initramfs image
name with a customized value.

(From OE-Core rev: e788fb2b894852f71b1c545abde71b45b9f230dc)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-01 08:14:58 +01:00
Ming Liu 35565057fa kernel.bbclass: fix a typo
In a addtask statement, do_strip should be strip.

(From OE-Core rev: 8413e26164644230615f4503ca9488b5b4021aeb)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-01 08:14:58 +01:00
Serhii Popovych 5156cdc36b distutils3.bbclass: Fix path to python for scripts
This change is similar to the recently introduced
change to the distutils.bbclass fixing shebang
line in python scripts for nativesdk class builds.

v2: Rebased on top of new head.

Cc: XE-Linux <xe-linux-external@cisco.com>
(From OE-Core rev: 49772e1a1f291d1cacce27b381009dbb441c483e)

Signed-off-by: Serhii Popovych <spopovyc@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-31 10:10:30 +01:00
Serhii Popovych 253ce5d6c0 distutils.bbclass: Fix path to python for scripts
Commit 11229de (distutils: Replacing path to native python by path
to python in the image to support python packages with
console-script setup) replaces path to python-native with path
to the python interpreter in the target image.

However on nativesdk builds ${bindir} expanded to the
${SDKPATHNATIVE}${prefix_nativesdk} making shebang line
pointing to the absolute path to env(1) in SDKPATHNATIVE
which may not be present if coreutils isn't part of nativesdk.

On the other hand commit cf63d90 (bitbake.conf: Define USRBINPATH
globally instead of individually) introduces USRBINPATH variable
which has correct value regarding build class and intended for
this use case.

v2: Rebased on top of new head.

Cc: XE-Linux <xe-linux-external@cisco.com>
(From OE-Core rev: 2a83c22a510e10b169015ce936eb51a6fc959ec1)

Signed-off-by: Serhii Popovych <spopovyc@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-31 10:10:29 +01:00
Ross Burton 2a934a3df7 base.bbclass: ensure HOSTTOOLS links point to executables
Use the new executable argument to bb.utils.which() to ensure that the symlinks
point to executable files and not for example directories with the right name
which happened to be on $PATH.

[ YOCTO #11256 ]

(From OE-Core rev: 7f40c934c3aeb1d34f95f30b281e25a17c428fce)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-31 10:10:29 +01:00
Richard Purdie 8b41b5ddfe multilib_header: Update wrapper to handle arm 32/64 bit
Having arm 32/64 bit headers coexisting turns out to be tricky. Unfortunately
our wrapper works using wordsize.h and this differs on arm so we can't use it.

Therefore replicate the logic here for arm. I did look into writing our
own wordsize.h but we also need to remap kernel headers on arm and
since wordsize.h comes from libc, that doesn't work for kernel headers.

(From OE-Core rev: 141dc7136c9c62da1d30132df4b3244fe6d8898d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-31 10:10:29 +01:00
Richard Purdie 33887b5c07 ccache: Use MULTIMACH_TARGET_SYS not HOST_SYS
I suspect this was a typo and that TARGET_SYS makes more sense here. Its
also the only remaining user of MULTIMACH_HOST_SYS in OE-Core. Change it.

(From OE-Core rev: fd51900f203ae997b0f606f94ab87c12e37696c0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-31 10:10:29 +01:00
Richard Purdie 236a291abc sanity: Drop obsolete TMPDIR ABI conversions
When we get to version 12 we have a hard break as we can't convert to newer
versions. There is no point in running the old conversions on an old tmpdir
only to hit that block. Remove all the old conversions to avoid that and
make things clearer.

(From OE-Core rev: 163b27bdfe323b648929240375aaf251e8d5edf4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-31 10:10:29 +01:00
Patrick Ohly caf1c90871 populate_sdk_ext.bbclass: enhance compatibility with rm_work.bbclass
"bitbake -c populate_dsk_ext" must not trigger do_rm_work, because it
is impossible to declare that the additional tasks activated by "-c
populate_dsk_ext" must run before do_rm_work. When do_populate_dsk_ext
and do_rm_work are both active, the resulting race condition breaks
do_populate_dsk_ext.

The existing bitbake dependencies can't be used for that, because
"addtask populate_dsk_ext before do_rm_work" would then always execute
populate_dsk_ext also in normal builds.

do_populate_dsk_ext triggers do_rm_work indirectly through the
dependency on do_build of the SDK_TARGETs. Using the new
do_build_without_rm_work instead (when available, with do_build as
before if not) avoids the problem.

However, one has to be careful to not trigger do_rm_work in the same
build in some other way.  "bitbake core-image-sato:do_populate_sdk_ext
core-image-sato:do_build" still fails, for example. Doing one after
the other works.

Fixes: [YOCTO 11042]

(From OE-Core rev: 00b1911c65fa1b21c3dedec40170998573b62178)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-31 10:10:29 +01:00
Patrick Ohly d83e16a99c rm_work.bbclass: introduce do_build_without_rm_work
Some classes, for example populate_sdk_ext.bbclass, must be able to
trigger a full build of a recipe without also triggering
do_rm_work. They cannot depend on do_build anymore, because that would
trigger do_rm_work.

Instead, do_build_without_rm_work can be used. It has the exact same
dependencies as do_build, minus do_rm_work and do_rm_work_all.

This may also be useful in a test build of a recipe where one wants
to preserve the work directory without having to modify configuration
settings:
   bitbake foobar:do_build_without_rm_work

(From OE-Core rev: 04a7b8d6d2e86cc4dd1362c775f5e3ac1eb1d19d)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-31 10:10:29 +01:00
Christopher Larson 6b0abc9b7c systemd-boot: write startup.nsh
This aligns with the behavior of grub-efi and gummiboot, and is needed to fix
auto-boot of intel-corei7-64 for non-GPLv3 builds.

(From OE-Core rev: c187326afcf1e9d781c1bd0923e1362a6f50f613)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-29 16:37:28 +01:00
Patrick Ohly 759fcd204f oeqa: QEMU_USE_KVM can list machines
Previously, QEMU_USE_KVM=True enabled the use of kvm only when "x86"
was in the MACHINE name. That is too limiting, because for example
intel-corei7-64 can also use kvm but it wasn't possible to enable that
without changing OE-core.

That traditional usage is still supported. In addition, QEMU_USE_KVM
can be set to a list of space-separated MACHINE names for which kvm is
to be enabled.

(From OE-Core rev: d5421dd00b9cf785fa77e77c6c739e8bd8822fa3)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28 08:43:13 +01:00
Alexander Kanavin 8c1c392ca3 dnf: move the entire dnf/rpm4 stack to Python 3
[YOCTO #11180]

(From OE-Core rev: bedcdc4cf921b70a8cfb16c6684668d0ac9e1942)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28 08:43:13 +01:00
Stephano Cetola b907e25fd9 insane.bbclass: error if file-rdeps not met
Missing runtime dependencies should result in an error rather than a
warning. Indeed, if RPM is listed in PACKAGE_CLASSES, it will throw
an error rather than install packages with missing dependencies. This
functionality should be consistent across package types. This patch
ensures that an error will be thrown.

[YOCTO #10949]

(From OE-Core rev: 90bc7bfa1b27cd5ea2480463f7631f179a296b10)

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28 08:43:13 +01:00
Robert P. J. Day f5187871ce classes: Replace "if test" file tests with POSIX file tests
In entire meta/classes/ directory, replace shell tests of the form
"if test -? ..." with POSIX tests of the form "if [ -? ...

(From OE-Core rev: 78928016f4cf38cf6751cb089200bf950d07ae93)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 11:08:34 +01:00
Robert P. J. Day 6b210e74b7 autotools.bbclass: Replace "grep ... >/dev/null" with "grep -q"
For aesthetic style reasons, use "grep -q" instead of ">/dev/null".

(From OE-Core rev: 39a7bfde92211b3546ff0a8e6a3e549714996b28)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 11:08:34 +01:00
Enrico Jorns a2d1d525f0 image_types: perform fsck on created ext image
When performing a file system check, the image created with mkfs will
trigger Pass 3A ('Optimizing directories') which turns the file system
into state "changed" (EXT2_FLAG_CHANGED).

This will let fsck request a reboot by setting the return code flag "2".

The result of this is that each ext-image built with oe-core will
trigger a reboot during the first time an fsck is triggered.

A common case where this might occur is when fsck detects having
a future superblock write time. This always happens when booting a
newly created ext4 rootfs with a target that does not have a recent time
set.

This patch moves the initial fsck run that performs the optimization
from the target to the host system and thus prevents the target from
performing an avoidable reboot.

(From OE-Core rev: a93d005934192402d7cceb36016b25b7d0c65547)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Ulrich Ölmann <uol@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 08:15:07 +01:00
Richard Purdie faf70253ba staging: Remove uninstalled dependencies from sysroots
Currently, if something is added to a sysroot, its hash remains unchanged,
and it continues to be buildable, it doesn't get removed from the sysroot.

This patch handles the case where something is removed from DEPENDS or
[depends].

It does introduce its own issue where something could get removed even
though some other task in parallel may have the same requirement. This
case should be extrememly rare and fixing the more common DEPENDS removal
is likely the bigger win though.

(From OE-Core rev: 06227bc5e533841ab12cde84a6ed6f8b8ddeb5cb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-24 23:43:33 +00:00
Richard Purdie ce9cbae874 staging: Update extend_recipe_sysroot vardepsexclude after code changes
Changed were made to the code but not reflected in vardepsexclude, fix this.

(From OE-Core rev: e59dc6985e22e7ac30b6afa81d448fbc372f5dab)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-24 23:43:33 +00:00
Richard Purdie 3d3194a68f staging: Drop BB_SETSCENE_VERIFY_FUNCTION2
The original description for this was:
"""
Since we clean out do_populate_sysroot if do_configure runs, don't
allow do_populate_sysroot_setscene functions if we're going to
run do_configure.
"""

With RSS, we don't need to clean do_populate_sysroot any more. Since
we no longer do that, this function also has no purpose any longer
and can also be removed.

(From OE-Core rev: 637c6d17b4a812379cbab64d340660092e046965)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-24 23:43:33 +00:00
Richard Purdie 6e74b4e031 staging: Drop do_configure clean prefunc
With recipe specific sysroots its now pointless to do this, may as well
save the cpu cycles.

(From OE-Core rev: b70c8e91e6c4240e95e8b22bcc36525a5a0703f9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-24 23:43:32 +00:00
Richard Purdie d74efb6aa9 staging: Drop BB_SETSCENE_VERIFY_FUNCTION since it was replaced
BB_SETSCENE_VERIFY_FUNCTION2 replaced BB_SETSCENE_VERIFY_FUNCTION
and due to our minimum bitbake requirements there is no point in
retaining the older version any more.

(From OE-Core rev: f08d6ccda5db9fdc81d53370aea1f599718897da)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-24 23:43:32 +00:00
Andre McCurdy ce109ff89c native.bbclass: clear MACHINE_FEATURES
Try to avoid native recipes accidentally being dependent on
MACHINE_FEATURES. This simple change doesn't prevent MACHINE_FEATURES
set via MACHINE_FEATURES_BACKFILL sneaking through, but it's better
than nothing.

(From OE-Core rev: 96c20c9df714cdf3f0e9461ec566c4f5d3bdb5f1)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-24 23:43:32 +00:00
Trevor Woerner 2180349f75 core-image.bbclass: update available IMAGE_FEATURES
Update the list of available IMAGE_FEATURES with the sub-features of
'debug-tweaks' and add 'splash'.

(From OE-Core rev: 1e46220bb3901476266846447ff40533c9bffa1d)

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-24 23:43:32 +00:00
Alexander Kanavin 4581e2c3e6 sign_rpm.bbclass: do not set/use RPM_GPG_PUBKEY
This is entirely unnecessary (we can ask the signer backend to export the
key to a file when needed), and was causing confusing selftest failures
due to the variable being set from two different places.

[YOCTO #11191]

(From OE-Core rev: 74ea979044368dc28c24325e7e77471b70aa8fe8)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23 13:19:49 +00:00
Richard Purdie 0cb6f85335 sstate: Ensure installation directory is empty before execution
When you enable the systemd DISTRO_FEATURE, opkg-native contains systemd units
which have a relocation fixme list. When systemd isn't in DISTRO_FEATURES, there
are no fixmes required. Unfortunately as sstate isn't cleaning up its installation
directory before use, if you install the systemd version, then install the
non-systemd version from sstate, it would leave behind the fixme file from the
systemd version and breakage results as it would try and fixup files which don't
exist.

The solution is to ensure the unpack/install directory is clean before use. It
does raise other questions about opkg-native, systemd and DISTRO_FEATURES but there
is an underlying sstate issue here too which would cause missing file failures.

(From OE-Core rev: d1d55041e38b12d40f896834b56475ea19a6047f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Richard Purdie c0a2268ae8 externalsrc: Use git add -A for compatibility with all git versions
I've been debugging a selftest failure on Centos7. The problem turns out
to be the elderly git version (1.8.3.1) on those systems. It means that
the system doesn't correctly checksum changed files in the source tree,
which in turn means do_compile fails to run and this leads to the following
selftest failure:

======================================================================
FAIL [141.373s]: test_devtool_buildclean (oeqa.selftest.devtool.DevtoolTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/devtool.py", line 530, in test_devtool_buildclean
    assertFile(tempdir_mdadm, 'mdadm')
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/devtool.py", line 497, in assertFile
    self.assertTrue(os.path.exists(f), "%r does not exist" % f)
AssertionError: False is not true : '/tmp/devtoolqag88s39z8/mdadm' does not exist

The solution is to use -A on the git add commandline which matches the behaviour
in git 2.0+ versions and resolves the problem.

(From OE-Core rev: 964e8b8cae4b28e21ade12b5effb494e459b1f0f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Mikko Rapeli c52fe3a77a buildhistory.bbclass: add layer name to source recipe data
It is useful to know which layer provided a given recipe and its
binary packages.

Many projects combine a number of layers and some of them
also provide same recipe names in which case bitbake
can prioritize between them. buildhistory can record
the decision by saving the layer from where the recipe
was taken from.

Also, if a project is split to sub projects which maintain
recipes in different meta layers, then meta layer specific
summaries of e.g. disk usage can be calculated if
source recipes meta layer name is recorded for example in
buildhistory.

If source layer is not in build history, then layer providing
the recipe can be exported from build environment using
'bitbake-layers show-recipes', but it takes a long time to execute
since all recipes are parsed again and requires full source tree
with correct build configuration.

This patch exports the name of layer as configured in BBFILE_COLLECTIONS
append of its layer.conf. 'bitbake-layers show-recipes' exports the
meta layers directory path name. For several open source layers
these are different, e.g. meta-openembedded/meta-perl/conf/layer.conf
is perl-layer, poky/meta/conf/layer.conf is core,
poky/meta-skeleton/conf/layer.conf is skeleton etc.

(From OE-Core rev: d8e59d1f840e4282859ad14397d1c06516b8eb11)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Ross Burton 3a1e31d714 insane: remove broken unsafe-references-in-binaries test
This test aims to detect binaries in /bin which link to libraries in /usr/lib,
for the case where the user has /usr on a separate filesystem to /.

However it doesn't scan both image/ and the sysroot, so if a binary in /bin
links to a library in /usr/lib that was built by the same recipe then it will
error out.

This test isn't enabled by default, and because of this serious bug I suspect
nobody else is enabling it either.  As /usr being on a separate partition to /
is a very rare configuration these days I think we should delete the test: if
someone cares sufficiently they should write a test that actually works.

(From OE-Core rev: a6af5bbf3dad6f0951c67a0aae13ef86a8906893)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Peter Kjellerstedt fc3ae0cb2a package.bbclass: Add PRIVATE_LIBS to list of package specific variables
Changes to PRIVATE_LIBS should change the sstate checksum. To make
that happen, it needs to be listed in the list of package specific
variables, therefore add it.

(From OE-Core rev: 1a6555dfd17e180b81dec407095787d8a72a9edd)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Patrick Ohly ff73130718 image-buildinfo.bbclass: configurable location for build file
In a stateless image, /etc is not a good place for the "build"
file. By definining the location with a variable it becomes possible
to have the file created elsewhere on a per-image basis. The default
is the same as before.

(From OE-Core rev: 6750ea8160edccb156cb2ab68548adfc1c789895)

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>
2017-03-22 11:35:21 +00:00
brian avery c0970e0af9 meta/lib/oeqa: change sdk test from cvs to cpio
We currently fetch,configure,build, and install cvs as our test for the
sdk.  cvs unfortunately, requires a default editor in order to run.  The
change in 94790a8254 that checks to see if you have something like vi
installed is fragile since you may have a different default editor. This
patch switches from using cvs as a test to using cpio. cpio also uses
autotools so the functionality tested is equivalent.

(From OE-Core rev: 233d36b0382a8b2e430c3377e50885d1a0c3ba21)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Patrick Ohly 3c8d045d79 rm_work.bbclass: re-enable recursive do_rm_work_all
When rewriting the do_rm_work injection, do_rm_work_all had been
removed because it seemed obsolete, as do_build now always triggers
do_rm_work.

However, do_build does not get triggered for all recipes and thus
do_rm_work was not called for recipes that got built only
partially. For example, zlib depends indirectly on
zlib-native:do_populate_sysroot.  Because of that dependency,
zlib-native got compiled, but do_rm_work was never called for it.

Re-introducing do_rm_work_all fixes that by making do_build depend on
do_rm_work_all, which then recursively depends on do_rm_work of all
dependencies. This has the unintended side-effect that do_rm_work then
also triggers additional work (like do_populate_lic) that normally
doesn't need to be done for a build. This seems like the lesser evil,
compared to an incomplete cleanup because it mostly enables the
lighter tasks after do_populate_sysroot.

The real solution would be to have two kinds of relationships: a weak
ordering relationship ("if A and B are enabled, A must run before B,
but B can also run without A") and hard dependencies ("B cannot run
unless A has run before").

(From OE-Core rev: b3de5d5795767a4b8c331fa5040166e7e410eeec)

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>
2017-03-22 11:35:21 +00:00
Patrick Ohly e4b5771409 image_types_wic.bbclass: tighten dependency to help do_rm_work_all
Depending on wic-tools:do_build pulls a lot of additional, indirect
dependencies into the image sysroot during do_image_wic as soon as
rm_work.bbclass is active, because then we have
do_build->do_rm_work_all->[all dependencies]. One of those
dependencies is libgcc-initial, which clashes with libgcc itself,
leading to errors in extend_recipe_sysroot like this:

   Exception: FileExistsError: [Errno 17] File exists: '.../tmp/sysroots-components/corei7-64/glibc-initial/usr/include/fstab.h' -> '.../tmp/work/intel_corei7_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/include/fstab.h'

As the image recipe only needs the sysroot of wic-tools and does not
need to wait for the build of wic-tools to finish, depending on
do_populate_sysroot is the better choice and happens to avoid
the problem above.

(From OE-Core rev: a678f54e710e46b3cf674ffa41d6432b22effbdf)

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>
2017-03-22 11:35:21 +00:00
Florian Wickert 1ec405ef5d kernel-fitimage: dtb sections named by their filenames and one config section for each dtb
Before this, dtb sections were named by their position index in KERNEL_DEVICETREE. Also there was only one item in the config section, so only the first dtb was seen by the bootloader.
This patch adds a config section for each dtb named by the dtb filename. This is what bootloaders usually know about the machine they run on.

(From OE-Core rev: cd2ed7f80b555add07795cc0cbaee866e6c193a3)

Signed-off-by: Florian Wickert <fw@javox-solutions.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Amarnath Valluri 0decf1cc1c kernel: use ${nonarch_base_libdir} for kernel modules installation.
Replace hardcoded '/lib' in kernel modules installation path with
${nonarch_base_libdir}, which is meant exactly for this.

(From OE-Core rev: 22f5ba7154fcbe826d0a3283740903312b2aab46)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Peter Kjellerstedt b2cd8759b1 useradd-staticids.bbclass: Always fail/warn for missing IDs
Previously, with USERADD_ERROR_DYNAMIC set to error/warn, if a static
UID/GID was specified in the recipe, then no error/warning would be
issued even if no ID was specified in the passwd/groups files.

(From OE-Core rev: 8e4b4e28a7c3a9dbd6b9298bea5d2c1328b3f24a)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Peter Kjellerstedt 6b5502566f useradd-staticids.bbclass: Support recipes specifying static IDs
If this bbclass is used and a recipe specifies a static ID for a
user/group as part of the USERADD_PARAM_${PN} or GROUPADD_PARAM_${PN},
the build would fail with and error like this if there was no
corresponding ID in the passwd/group files specified via
USERADD_UID_TABLES/USERADD_GID_TABLES:

  ERROR: meta-oe/recipes-support/postgresql/postgresql_9.4.11.bb:
  meta-oe/recipes-support/postgresql/postgresql_9.4.11.bb inherits
  useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or
  GROUPMEMS_PARAM for package postgresql

(From OE-Core rev: e744fac05fc5cc19cabc59c1e79ff4c1b3ee396d)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Anders Darander b1f10b18ea classes/npm: allow installation of devDependencies
Often, eg when using angular2, there's a need to install also
the devDependencies.

The default is to keep the old behaviour, to not install
devDependencies.

(From OE-Core rev: 9377d16751aeff0a913e754d711bca6e4e4d9df1)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Joshua Lock cc2744267f meta: replace uses of bb.data.expand(VARNAME, d) with d.expand(VARNAME)
bb.data.expand(x, d) is deprecated API.

[YOCTO #10678]

(From OE-Core rev: a361babe443da635aed83be46679067457fd6a58)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:19 +00:00
Ed Bartosh e7ce3c7f62 image_types: increase filesystem size for BTRFS
16777216 bytes is a minimal possible filesystem size for BTRFS.
mkfs.btrfs fails to create a filesystem if rootfs size is too small.

Increased filesystem size to make it possible for mkfs.btrfs
to create an image for small rootfs directories,
e.g. for core-image-minimal.

[YOCTO #11163]

(From OE-Core rev: 17c2b1ca8a4e2023583645840db61bbde22bf65e)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:19 +00:00
Mike Crowe e987f62009 ccache: Disable CCACHE_HASHDIR by default
As of ccache-3.3, ccache tries to ensure that the paths in the debug
information are always correct. It does this by including the current
directory in the hash if debug output is enabled. It includes support for
detecting remapping via a single -fdebug-prefix-map argument uses the
remapped directory in the hash instead.

The DEBUG_PREFIX_MAP in bitbake.conf remaps the source directory, target
sysroot and native sysroot separately which results in multiple
-fdebug-prefix-map arguments. Although ccache passes all these arguments
through to the compiler, it only enables the special behaviour described
above if the last one matches the current directory. (See
https://github.com/ccache/ccache/issues/163 )

Even if ccache did correctly honour each of the remapping arguments, the
hashes would still be different every time ${PV} or ${PR} change because
the default DEBUG_PREFIX_MAP contains maps to paths including them.

So it seems that for ccache to be of any use with this configuration,
CCACHE_NOHASHDIR needs to be set.

(From OE-Core rev: fb7a5cdcff19bb44a25a51e20de0440c1ebcc057)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Helped-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:06 +00:00
Leonardo Sandoval 37785b9fdb uninative.bbclass: split long command
Single long commands are difficult to read and maintain. Split it to make
it more human-friendly.

(From OE-Core rev: c93b3b18f8daa8b419cc65b52cb5ceccfb1c142d)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:06 +00:00
Robert P. J. Day 8c1ac497da classes: Fix "U-boot", use proper spelling of "U-Boot".
U-Boot people are amazingly pedantic in their insistence on proper
spelling of "U-Boot", so humour them.

(From OE-Core rev: f346a9bdc372ec477bafcda358f9339ff4e4c79d)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:05 +00:00
Peter Kjellerstedt 12cc4f550a toaster.bbclass: Correct parsing of installed-package-sizes.txt
The recent change in buildhistory.bbclass to use a tab in
installed-package-sizes.txt between "KiB" and the package name caused
toaster_buildhistory_dump() to fail since it parses the file and
expected a space there.

(From OE-Core rev: 7b3692f57628b33840f6dbcddbe05ae56c24b98e)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:05 +00:00
Peter Kjellerstedt cb05db0d03 package.bbclass: Add SKIP_FILEDEPS to list of package specific variables
Changes to SKIP_FILEDEPS should change the sstate checksum. To make
that happen, it needs to be listed in the list of package specific
variables, therefore add it.

(From OE-Core rev: 4d9fb8414300c0adc003f2d77041713a17b49bd4)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:04 +00:00
Paul Eggleton 8aebe890fd classes/base: reformat HOSTTOOLS error
Adjust the message slightly to make it clearer, in particular mentioning
the HOSTTOOLS variable.

(From OE-Core rev: e022b27d189c1dcc7b3baea2b99dba8d724e6e2b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16 22:11:32 +00:00
Juro Bystricky ab2caed31a sanity.bbclass: modify check for shell
Due to the recently implemented update-alternatives for bash binary,
sanity checker may end up with a (false-positive) error such as:

Error, /bin/sh links to /bin/bash.bash, must be dash or bash

This patch modifies the test: presence of "/bash" or "/dash" in shell binary
name results in pass.

[YOCTO#11108]

(From OE-Core rev: ef51746cdd12e6b08109e9bd90a0a465c3f9f93c)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16 22:11:32 +00:00
Khem Raj c46c25dcfe go: Enable on musl
Working fine for musl targets now

(From OE-Core rev: 1bab5be8133f62cdae251e66db6f472c3c37297c)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:18 +00:00
Richard Purdie c90246caeb package: Fix various rpmdeps relocation issues
There are several issues with rpmdeps after the rpm v5 -> v4 transition:
 * _rpmfc_magic_path  is an invalid option for rpm4
 * --rpmpopt is an invalid option for rpm4
 * we need to use the path to rpmrc since otherwise it poitns at the
   original build path
 * we need to set MAGIC in the environment so libmagic can find its
   files.

This patch addresses those and ensures rpmdeps works in relocated builds
from sstate (or with rm_work).

(From OE-Core rev: 806e37264d7102ae982867350ad8363ed3e5f475)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:18 +00:00
Richard Purdie d97a6eeaed testimage: Don't use systemd.log_level=debug logging
This causes MBs of log messages which overload the standard 200kb syslog limit
used by busybox syslog by default. This means some tests which rely on messages
being detected in syslog, e.g.
rpm.RpmInstallRemoveTest.test_check_rpm_install_removal_log_file_size
fail (AssertionError: 54 not greater than or equal to 80 : Cound not find sufficient
amount of rpm entries in /var/log/messages, found 54 entries).

We enabled this to aid debugging of some systemd race issues, those are
now resolved so we can disable this. Leave the log level parameter as a
comment to save others having to look it up if they need debugging.

(From OE-Core rev: 84d4daffaebcb4816d597671b287329e8a472f59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:18 +00:00
Alexander Kanavin 226cc7396a package.bbclass: don't exclude package groups from runtime mapping
This ensures that remapping happens correctly, particularly
when package groups list noarch packages, and multilib is in use. Previously
this was masked by rpm doing *another* layer of remapping on top of this.

(From OE-Core rev: ad0e32014e846d20a1449de76e152e5f06812685)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin 44e229c995 package_rpm.bbclass: do not strip multilib prefixes from package names, do not add multilib prefix to package arch
This is done for reasons I cannot establish, and greatly complicates the code
that installs packages into rootfs.

(From OE-Core rev: d9ea9003677d195f64eb4b3202e1c5d37d21b330)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin b45765d7ac package_rpm.bbclass: do not set the OS dynamically when building rpms
Packages need to contain just one value for the os field, otherwise
rpm will refuse to install them if they don't match what is in
/etc/rpm/platform.

(From OE-Core rev: 580ba965f5f38f6718a83f690bbe23a63fbcd3dd)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin 1cf9dd6492 package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages
nativesdk-* rpm packages all require /bin/sh because postinst scriptlets
are run with it. We can either teach rpm4 and dnf to ignore that dependency
(a lot of non-upstreamable work), or add auto-satisfy the dependency
in each package. I've chosen to do the latter.

(From OE-Core rev: b18c32ab6bc9c4f1953e9f79aa39bc92d1c4e30d)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin 529244ee21 run-postinsts: simplify the logic of whether to install it to images
The logic is scattered all over the place, but amounts to
"install, unless the rootfs is read only". Let's express that directly.

(From OE-Core rev: 697804229a172125ce7d3bfc9b343812d6fe3240)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin d94b98fe30 package_rpm.bbclass: instruct rpm to not remove the buildroot directory
This is the ${W}/package directory which may be reused in subsequent builds.

Also clean up various default directories rpm 4 creates.

(From OE-Core rev: bdebe0d50a210438730ee7797968eafe169ded23)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin ea4bac7e45 testimage.bbclass: fix runtime test for rpm, port smart tests to dnf
(From OE-Core rev: 749a496d273f9fd378588e309cf976294584ca5f)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin dfa2987623 package_rpm.bbclass: no need to specify the magic file location
It's handled by the rpm wrapper command, created in rpm recipe.

(From OE-Core rev: 8f331db8136c8bf28ceea7f8ae410eb9d83225ad)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin 5445f03975 package_rpm.bbclass: replace createrepo reference with createrepo_c
(From OE-Core rev: de6ed676712f79e54a32000a1b090eb918c939b9)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin 67615e0175 rootfs_rpm.bbclass: migrate image creation to dnf
To properly look at this patch, you probably need a side-by-side diff viewing tool.

(From OE-Core rev: 65581c68d130fa74d703f6c3c92560e053857ac7)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin df3734551f package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tags
Previously they were swapped, not sure why. Their meaning, as far as rpm
world goes, is different:

- Recommends is a soft dependency and will be installed by default; there is
an option not to do that.

- Suggests is a suggestion to be picked up and presented to end user by
package management tools; it has no special meaning otherwise.

OE packages use RRECOMMENDS, which should be mapped to Recommends rpm tag,
so that the packages will be picked up as dependencies.

(From OE-Core rev: 06270f20ba4312d20d0fd348595adf1b239bcac5)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin cf7e0baffa package_rpm.bbclass: make architecture-independent .rpm packages "noarch" instead of "all"
Too many places in dnf/rpm4 stack make that assumption; let's not fight against it.

(From OE-Core rev: 341810aff923ace6b1cc1e15e19383c4f8773b51)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin a1180e91d0 package.bbclass: fix locations of debugedit and rpmdeps utilities
rpm4 installs them in different locations than rpm5. This also replaces
our custom rpmdeps-oecore with standard rpmdeps; I'm not seeing a
significant performance penalty.

(From OE-Core rev: ec20cda53caeebfdf95e2871d5da8b926e84d2aa)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:16 +00:00
Jack Mitchell 3e5f3cfe81 u-boot: add option to specify FDT argument in extlinux.conf
Also fixes a use before defined bug with localdata.

(From OE-Core rev: 86b09a7ed67a43a45c805f44778bed0bfdf57361)

Signed-off-by: Jack Mitchell <jack@embed.me.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-13 09:43:14 +00:00
Richard Purdie 8406db9e11 terminal: Use original PATH for terminals
Now that we filter out PATH to only the utilities we rely upon, the devshel
terminal was broken since it can no longer find the terminals. Even if
we fix that, the user couldn't access any of their commands within
devshell which somewhat defeats its purpose.

Add the original PATH back to the environment to restore that behaviour
since this is more in line with user expectations and it wouldn't be possible
(or desireable) to whitelist all the commands a user might want to use from
the shell.

(From OE-Core rev: 67d7ea2db8bce766daf3419feae3cd8045af5114)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-13 09:42:09 +00:00
Stephano Cetola e018993541 uninative: remove unneeded call to sparse copy
As of this commit:

39f5a05152aa0c3503735e18dd3b4c066b284107

patchelf no longer inflates file sizes. Since the files are no longer
inflated by patchelf, we can skip using cp with the --sparse option.
More details as to how patchelf has changed are available in that
commit log.

(From OE-Core rev: a2519a2f96bfea53a527c704e620e3584c97c67d)

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-11 16:09:14 +00:00
Ross Burton ca5059e638 classes: add devupstream class
This class lets you use BBCLASSEXTEND to add a variant of the recipe that
fetches from an alternative URI (such as git:) instead of a tarball.

For example:

 BBCLASSEXTEND = "devupstream:target"
 SRC_URI_class-devupstream = "git://git.example.com/example"
 SRCREV_class-devupstream = "abcd1234"

This variant will have DEFAULT_PREFERENCE set to -1 so it needs to be selected
to be used, and any development-specific tweaks can be done with the
class-devupstream override, for example:

 DEPENDS_append_class-devupstream = " gperf-native"

 do_configure_prepend_class-devupstream() {
    touch ${S}/README
 }

It currently only supports creating a development variant of the target recipe,
not native or nativesdk.  The BBCLASSEXTEND syntax (devupstream:target) was
chosen so that support for native and nativesdk can be added at a later date.

Support for other version control systems such as subversion is limited, as
bitbake's automatic fetch dependencies on for example subversion-native are not
generated.

[ YOCTO #10215 ]

(From OE-Core rev: c48ef2d7c7198232846f36a975c673cc57f4a090)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-11 16:09:14 +00:00
Richard Purdie 94790a8254 base/bitbake.conf: Filter contents of PATH to only allow whitelisted tools
We currently have a determinism problem in that the host tools present
in PATH can influence the build. In particular, the presence of pkg-config
on the build host can mask missing pkgconfig class dependencies.

This adds in a new HOSTTOOLS variable and then uses it to set up a directory
of symlinks to the whitelisted host tools. This directory is placed as PATH
instead of the usual /usr/bin:/bin and so on.

This should improve determinism of builds and avoid the issues which have
been particularly obvious since the introduction of recipe specific sysroots.

If users find there is a tool missing, they can extend HOSTTOOLS from a global
class or global conf file.

Right now the settings should be enough to build everything in OE-Core.

(From OE-Core rev: fa764a403da34bb0ca9fa3767a9e9dba8d685965)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-11 16:09:14 +00:00
Khem Raj 760e81678c go: Add recipes for golang compilers and tools
* This is converging the recipes for go from
  meta-virtualization and oe-meta-go

* Add recipes for go 1.7

* go.bbclass is added to ease out writing
  recipes for go packages

* go-examples: Add an example, helloworld written in go
  This should serve as temlate for writing go recipes

* Disable for musl, at least for now

* Disable for x32/ppc32 which is not supported

(From OE-Core rev: 78615e9260fb5d6569de4883521b049717fa4340)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10 15:51:55 +00:00
Ross Burton 0ed537f95b license: don't assume source files are UTF-8
We can't assume that source files are entirely UTF-8, so when copying the
license blocks open the file as binary instead of text.

[ YOCTO #11135 ]

(From OE-Core rev: b606e1430c36f1ad528fbfbbf9b8b6243390b879)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10 14:50:11 +00:00
Andre McCurdy 3f3ced499c sanity.bbclass: allow s3 protocol when sanity checking MIRRORS, etc
Bitbake now supports an Amazon AWS S3 fetcher:

  http://git.openembedded.org/bitbake/commit/?id=6fe07ed25457dd7952b60f4b2153d56b15d5eea6

(From OE-Core rev: 5cc3592afc72bae8dd12d3d8ff15bb7418baaea3)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10 14:50:10 +00:00
Ed Bartosh 51edde6537 sstate.bbclass: update .siginfo atime
.siginfo files are not being accessed from local or NFS-mounted
sstate mirrors when sstate package is installed, so their atime
is not updated. If sstate mirror is cleaned based on access time,
they get deleted, even though they are still being used.

Updated atime of .siginfo symlinks with 'touch -a'. This command
dereferences symlinks pointing to the local mirror and updates
atime of the .siginfo file on the mirror.

[YOCTO #10857]

(From OE-Core rev: fb1499a42756faeef025122bbde98bc14f4ae61e)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10 14:50:10 +00:00
Maxin B. John d070d151d3 useradd.bbclass: drop obsolete code
Cleanup useradd class by removing the code made obsolete by
the introduction of Recipe Specific Sysroot.

(From OE-Core rev: 2c126e704ebb58afc0d79fe220dc370e09d6bfd5)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:57 +00:00
Khem Raj dc80d4f4bc kernel-arch: Lock the toolchain to use gcc compiler
kernel and external modules are still using gcc to build

(From OE-Core rev: 75cf0f0690c9c192e4cbffb71015866f967c2e1f)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:57 +00:00
Andre McCurdy b41e1c9209 base.bbclass: improve wording when skipping recipes with incompatible licenses
The previous wording, e.g.

  ERROR: wget was skipped: incompatible with license GPLv3

isn't very clear and could be taken to imply that the recipe is
incompatible with its own license.

(From OE-Core rev: c2047067daadb40ff3a944f380c10b2a56b8e080)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:56 +00:00
Peter Kjellerstedt 1df119cd06 module.bbclass: Add inherit of pkgconfig
This is needed for the make_scripts task.

(From OE-Core rev: 554672d5f649eaf6a7d76f79520304415d926a3e)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:56 +00:00
Aníbal Limón aac3ad4785 buildhistory.bbclass: Only execute get_extra_sdkinfo when sdk is enabled
If sdk ins't in BUILDHISTORY_FEATURES the get_extra_sdkinfo fails
because no information about sdk is generated in buildhistory repo.

(From OE-Core rev: e6a0ea6146171635c49b18e00b4b11a9a7ff20ee)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:56 +00:00
Mikko Rapeli f1475ed582 buildhistory.bbclass: use tabs as separator in installed-package-sizes.txt
All other fields are separated by tabs except KiB and binary package
name. This helps users, *cough managers*, who import this file into
MS Excel to calculate file system usage summaries.

(From OE-Core rev: e26bed8493d7b096740cd6fff2e72ab27d48a933)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:19 +00:00
California Sullivan 132b4d13e0 kernel.bbclass: Give sanity check function an opt-out variable
Having no opt-out method and adding the task to linux-yocto.inc was
causing issues. For example, linux-yocto-dev would often fail because
it uses AUTOREV with no way to dynamically change the PV.

Add a variable to turn off the sanity check, allowing an easy opt out,
and set the opt-out variable in linux-yocto-dev, fixing the issue with
AUTOREV.

(From OE-Core rev: 1b6a3c17874ead7ee0957e67329aa3bd019fa129)

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:19 +00:00
Nathan Rossi f3881e63fd package.bbclass: Add SHLIB detection support for mingw targets
Add support to detect dll files as shared objects as well as process
Windows .dll and .exe files to determine the runtime libraries
dependencies.

This implementation is sufficient to detect and map runtime library
dependencies between packages. And does not implement any version naming
conventions that might apply for .dll files (e.g. lib*-x.dll).

(From OE-Core rev: 7df031e1ffe409573753585ba2f1a82ff707ad7e)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:19 +00:00
Nathan Rossi 09a253d09f update-alternatives.bbclass: Disable for mingw32 targets
When building for mingw32 targets (e.g. nativesdk cross compiling for
windows), disable the dependency on update-alternatives as the Windows
platform does not support symlinks or package management.

This avoids the complex (partly non-buildable for mingw32) dependency
chain virtual/update-alternatives -> opkg-utils -> python -> ...

(From OE-Core rev: 0131abe2d94d6836a54bc1616566c3bf3f2d6eb0)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:19 +00:00
Dengke Du f6eec55982 autotools.bbclass: delete the extra varflag set for autotools_copy_aclocals
The autotools_copy_aclocals has been droped, so the varflag set for that should
be removed.

(From OE-Core rev: 2940340cc3c8581d16acdaec3ba1dbfd3e88f840)

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:19 +00:00
Jackie Huang 5528cd5c0f ptest.bbclass: use BPN in PTEST_PATH for multilib
Use BPN instead of PN in PTEST_PATH for multilib builds,
or we get two directories for a package in libdir which
doesn't make sense, e.g.

$ ls /usr/lib/*coreutils
/usr/lib/coreutils:
libstdbuf.so

/usr/lib/lib32-coreutils:
ptest

(From OE-Core rev: 0e949b7bfc4207aba0e3c4d12b76cc1f1815470d)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:19 +00:00
Andre McCurdy 2d1b0452ba bitbake.conf: replace USE_LDCONFIG with new "ldconfig" distro feature
USE_LDCONFIG could previously be set to 0 by distros which do not
require ldconfig or ld.so.conf on the target. Since more and more
recipes may need to respect that option, replace the ad-hoc variable
with a distro feature.

Distros which previously set:

  USE_LDCONFIG = "0"

Should now instead use:

  DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " ldconfig"

(From OE-Core rev: a905df2dd8f43a2febffa64a39b6e508510326a0)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:19 +00:00
Ed Bartosh ee860b3bf5 wic: add WKS_FILE_DEPENDS variable
This variable should be used to specify dependencies that
will be added to DEPENDS only if wic image build is 'active'
i.e. when 'wic' is in IMAGE_FSTYPES.

(From OE-Core rev: 243ccd6b8b389231f6c4a8e251c2bd6b2cf6eaad)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Richard Purdie 2e5181e510 testsdk: Fix lockfile patch
In the previous lock removal patch I mixed up the two tasks and broke sdk
testing. Fix this by removing locks for both sdk and extsdk.

(From OE-Core rev: 20c6e876ed6b8c8ac007848e2b36e9a8a56bb703)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-03 12:21:09 +00:00
Richard Purdie 32e1eac492 populate_ext_sdk: Merge auto.conf into local.conf
auto.conf is included before local.conf. Instead of keeping them separate, merge
them into the extsdk local.conf. As it happens we can do this quite neatly, more
neatly than the current code IMO and it makes the configuration easier for the end
user to understand too.

This means auto.conf is then available for the testsdk code to use for testing
purposes.

(From OE-Core rev: fb625e555707478d5b4931c6bc83ab06b17a8ca9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-03 11:16:12 +00:00
Richard Purdie 7fefdc1e11 populate_ext_sdk: Append to SSTATE_MIRRORS
We need to appent to SSTATE_MIRRORS in case other areas of code are also
setting the variable.

(From OE-Core rev: 9cab832b1e85822fa9be5ea9fa0415f48fba86f2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-03 11:16:12 +00:00
Richard Purdie e05c8d812e testsdk: Drop lockfile usage
We should be able to test sdks in parallel. As far as I can tell, this
restriction crept in for no good reason, based on locks that testimage used
for the non-qemu case.

Therefore remove the lock and allow sdks to test in parallel.

(From OE-Core rev: 54477664dc13c6aa15b3246f328b66591a340659)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-03 11:16:12 +00:00
Richard Purdie 85188262f7 sanity: Allow whitespace only mirror entries
Forcing the use of "\n" in mirror variables is pointless, we can just require that
there are pairs of values. With the bitbake restriction relaxed, we can relax
the sanity check too.

(From OE-Core rev: 7313b10e242da9225211ca9fd53d14a121c5fa42)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-03 00:19:37 +00:00
Richard Purdie ea2fd77ba5 testsdk: Use auto.conf instead of local.conf to set SSTATE_MIRROR
The local.conf file can get overritten and changed by the SDK so (ab)use
auto.conf instead to ensure our configuration tweaks get applied.

Also ensure we append to any other configured SSTATE_MIRROR variable
that already exists.

(From OE-Core rev: 444a71b1c2d8f86fc4c35c8ff8e92bcbbe646b75)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-02 16:09:42 +00:00
Ross Burton 88c1fb2f0c oeqa/sdkext/devtool: use finally instead of repeating cleanup
Use the finally: block to always to cleanup.

Now that the test harness in testsdk.bbclass has monkey-patched
CalledProcessException to display the output we don't need to do that in the
test case.

(From OE-Core rev: 9f0f6326083ee76b72b431fbfcbe12c1ab2793b2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Richard Purdie 28430385ad populate_sdk_ext: Allow generation of meta-extsdk-toolchain even for minimal SDKs
If you build a minimal eSDK currently, you don't build meta-extesdk-toolchain
even if you will have built most of its dependencies. This means when you try
and install a toolchain into the eSDK, it fails, breaking our automated testing
of the eSDK.

Therefore add the dependency unconditionally even when a minimal eSDK is being
built and allow the automated testing to work.

(From OE-Core rev: 6e4ae81d76c5a61e7603ff4ca94452a6e724c244)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Richard Purdie 51d6f19fa8 testsdk: Handle minimal eSDK and avoid download costs
When using a minimal eSDK, testing currently fails as the sdk isn't
populated. We therefore setup the eSDK under test to point at local
sstate and execute a command to ensure the toolchain is populated
since most of the tests depend on this being present.

At the same time, add in a link to DL_DIR through own-mirrors so
that tests which fetch source (e.g. the kernel module one) can
use the local stash. This cuts test execution of the kernel module
test from 2000s to 120s.

We did try using DL_DIR directly but that causes uninative issues
requiring other workarounds so own-mirrors is neater.

Together these fixes unbreak eSDK testing on the autobuilder.

(From OE-Core rev: 866b55905eabf93f45c10a08d5b53c459ac4c056)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Mariano Lopez f786def0ec insane.bbclass: Add missing dependencies
package_qa task requires some tools installed in sysroot; with
the introduction of recipe specific sysroot this task won't
have such tools installed if it's forced to run.

(From OE-Core rev: cf351eb49c44d9cbba82392f3331e7cba0c0d0ee)

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>
2017-03-01 23:27:10 +00:00
Joshua Watt 8d8d0a52d5 base.bbclass: Fix OE_IMPORTS
Udpate OE_IMPORTS to include oe.license because it is being used.

(From OE-Core rev: d0902a5c3babbd3b291fa494462e083794ca4bee)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:10 +00:00
Pavel Modilaynen 010b368bc8 buildstats.bbclass: Avoid index exception in /proc/PID/io parsing
There is some probability (depends on system load) to get empty
or line containing "0" as the last line while reading /proc/PID/io.
Avoid build failure by checking if line contains separator
":" before split.

(From OE-Core rev: b26feaf51af55f17fad79dbd53dd3ec0a37c38ff)

Signed-off-by: Pavel Modilaynen <pavelmn@axis.com>
Signed-off-by: Daniel Lublin <daniel@lublin.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:10 +00:00
Markus Lehtonen 6e1aad4596 license.bbclass: run chown only under pseudo
The copy_license_files() function in license.bbclass is called in two
different contexts. First, it is run as part of the do_populate_lic
task. In addition, it is called from do_package task when
LICENSE_CREATE_PACKAGE is enabled. The function has code that changes
the owner of license files to root which is meant only to happend in the
latter case - i.e. under do_package which is run under pseudo.
Previously, the code was blindly always running chown and just ignored
errors that happened when running from do_populate_lic. This patch
changes it to be more intelligent, only doing chown when running under
pseudo.

[YOCTO #10897]

(From OE-Core rev: 19118a1408f32bb24d95ab3d7d7faed58cbae900)

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>
2017-03-01 23:27:09 +00:00
Aníbal Limón 129fbf324a classes/license.bbclass: Don't copy unneeded licenses by package
Usually a recipe only provides one package but when provides more
than one package the LICENSE variable per package (i.e. linux-firmware)
needs to take into account to avoid unnecesary copy of licenses into
packages.

The patch validates if LICENSE exists in package LICENSES in order to
don't copy unneeded licenses.

As result of this patch some packages will not contain licenses there
are not into LICENSE variable.

For example:

acl contains GPLv2+ instead of GPLv2+ and LGPLv2.1+
libacl contains LGPLv2+ instead of GPLv2+ and LGPLv2.1+

This behaviour is declared on the acl recipe as:

SUMMARY = "Utilities for managing POSIX Access Control Lists"
HOMEPAGE = "http://savannah.nongnu.org/projects/acl/"
SECTION = "libs"

LICENSE = "LGPLv2.1+ & GPLv2+"
LICENSE_${PN} = "GPLv2+"
LICENSE_lib${BPN} = "LGPLv2.1+"

[YOCTO #10325]

(From OE-Core rev: 8c8c8edea9c9015e21f47f3d10e6f45446a2823b)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:06 +00:00
Aníbal Limón 5a2a1ec16b license.bbclass: Don't copy again LICENSE already handled as no-generic
The NO_GENERIC_LICENSE mapping was added [1] to enable copy LICENSES
from upstream source code into recipe licenses, previously that only
common-licenses was processed.

This result on copy twice the NO_GENERIC_LICENSE specified because there
is a mapping between license in LIC_CHKSUM and NO_GENERIC_LICENSE.

In order to avoid double copy one as generic_ and other as LICENSE. keep
track of licenses already copied.

For linux-firmware the result will be only generic_ licenses into
common-licenses.

[YOCTO #10325]

[1] http://lists.openembedded.org/pipermail/openembedded-core/2015-April/104222.html

(From OE-Core rev: 95b9e2cd26c7cae265ff52af90480b75251f00e5)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:06 +00:00
Peter Kjellerstedt 254bfb1071 recipes: Make use of the new bb.utils.filter() function
(From OE-Core rev: 0a1427bf9aeeda6bee2cc0af8da4ea5fd90aef6f)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 11:17:45 +00:00
Mike Crowe 0b8d85a094 kernel, license, sstate, rootfs.py: Remove deploy directory README
It isn't clear that the README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
file in the deploy directory warrants the complexity it brings elsewhere.
Let's just remove it entirely.

In particular, if two do_image_complete tasks run in parallel they risk
both trying to put their image into ${DEPLOY_DIR_IMAGE} at the same time.
Both will contain a README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
file. In theory this should be safe because "cp -alf" will just cause one
to overwrite the other. Unfortunately, coreutils cp also has a race[1]
which means that if one copy creates the file at just the wrong point the
other will fail with:

 cp: cannot create hard link ‘..../tmp-glibc/deploy/images/pantera/README_-_DO_NOT_DELETE_FILES_IN_THIS_D.txt’ to
+‘..../tmp-glibc/work/rage_against-oe-linux-gnueabi/my-own-image/1.0-r0/deploy-my-own-image-complete/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt’: File exists

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25680

(From OE-Core rev: 71e9e88847d7000781642ea6187ebd8f40dfdcfe)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 11:17:45 +00:00
Robert Yang 3711607d91 binconfig.bbclass: fix get_binconfig_mangle()
The command was:
s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'"
s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'"

The STAGING_LIBDIR and STAGING_INCDIR now contains WORKDIR, so the
result would be incorrect like:
TCL_INCLUDE_SPEC='-IFIXMESTAGINGDIRTARGET/usr/include/recipe-sysroot/usr/include/tcl8.6'

Note, the "/usr/include/recipe-sysroot" is not needed. Move the last two
sed commands ahead will fix the problem.

(From OE-Core rev: 42e4e36de37b8e06a2ff56172d04d3ffeccfbfae)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:49 -08:00
Saul Wold ce79111e73 native.bbclass: populate native recipe with it's files
This allows a native package's recipe-sysroot-native to be populated with
that packages native image files.  This in turns allows it to be used by
scripts or other tools without creating un-necessary DEPENDS.

An example of this is systemtap-native and the crosstap script.

(From OE-Core rev: 7f6b4359e1f2d9d748d23305a2af73c0efba5928)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:49 -08:00
Robert Yang 970b0321cf kernel.bbclass: do_deploy requires depmodwrapper
Fixed:
run.do_deploy.27809: line 155: depmodwrapper: command not found

(From OE-Core rev: 96b7eceefb3e99848d1c16d7c5da123056dcdc24)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:49 -08:00
Robert Yang 1aed4140bf terminal.bbclass: export configure vars
So that we can easily reproduce configure by:

$ $CACHED_CONFIGUREVARS ./configure $CONFIGUREOPTS $EXTRA_OECONF

[YOCTO #9423]

(From OE-Core rev: a851f57de63fe527e04f2296245e9720c40f9c2e)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:49 -08:00
Peter Bergin 42d6b7818d useradd-staticids: fix typo for '--expiredate'
There is a typo in the useradd-staticids.bbclass that
causes error during do_install.

If build was configured to use usedadd-staticids and
the recipe included (for example):

USERADD_PARAM_${PN} = "--expiredate '' testUser"

Due to the typo this added the wrong option '--expiredata '
that caused an error.

(From OE-Core rev: 9d26a2f9f52ae9df6aa5e0ee20683ada35c32af1)

Signed-off-by: Peter Bergin <peter@berginkonsult.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:48 -08:00
Mariano Lopez cf0b92f893 oeqa/runtime/context.py: Fix use of getTarget() with testexport
The idea on getTarget is to use kwargs to send custom variables
to different targets, instead of this, a new variable was added
(just used for custom targets) and this broke testexport. So
in order to fix it, just add the custom variable to kwargs.

This fixes the use of getTarget() in testexport class that was
introduced in 1dc8010afd71fe46fb28bb86fb7c07a5fbd3d7cf.

(From OE-Core rev: cf138029a1f18f991fc7a28c81d85884942e9d56)

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>
2017-02-23 12:49:48 -08:00
Ed Bartosh 88bda7d78d image_types_wic: fix expansion error
Variable WKS_SEARCH_PATH was not fully expanded when used directly
in this expression:
    WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(), '${WKS_SEARCH_PATH}') or ''}"

This caused expansion error: bb.data_smart.ExpansionError:
Failure expanding variable WKS_FULL_PATH, .... which triggered exception
SyntaxError: invalid syntax (WKS_FULL_PATH, line 1)

Calling d.getVar instead of directly referencing variables
should fix the issue.

(From OE-Core rev: 20f8fddd28fe46d7e694804de3d894cdf9f7c636)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:48 -08:00
Randy Witt 5da9c1c38b image-container.bbclass: Error if not using linux-dummy
In the typical case of a container, the user doesn't particularly care
about the kernel version used. Since using linux-dummy prevents building
a kernel in the most common case, alert the user if they choose a
container image, but don't also specify linux-dummy.

In the cases the user actually does want to build against particular
kernel headers, etc, they can override by setting
IMAGE_CONTAINER_NO_DUMMY = "1".

[YOCTO #9502]

(From OE-Core rev: f0645e172bb839803d616f19307e1e81e0d204c0)

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>
2017-02-19 06:49:00 -08:00
Randy Witt 1b8f485c24 image-container.bbclass: Add the "container" IMAGE_FSTYPES
The "container" fstype does very little other than pick tar.bz2 as the
actual image type and disable installation of ROOTFS_BOOTSTRAP_INSTALL.

[YOCTO #9502]

(From OE-Core rev: e45f074b792a43aa2fd84a5a3f0e20bf1d88ad7e)

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>
2017-02-19 06:49:00 -08:00
Bruce Ashfield 9b77a677a0 kernel-yocto: trivial: remove extra } from bsp_definition
A typo introduced an extra } in the logging of the bsp_definition.
While this won't cause problems .. it needs to be fixed!

(From OE-Core rev: 9b95f3fca2a94ca922e05321096e07a11e98f9bb)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-19 06:16:58 -08:00
Awais Belal 35a79cc495 kernel-yocto.bbclass: ensure repatching when HEAD is checked out
In some cases it is seen that kernel_checkout and validate_branches are
run again in simultaneous builds. During do_patch the kgit-s2q mechanism
looks for a sentinel file inside the .git directory, finds a fence post
and starts picking up patches after that.

This can create trouble as validate_branches checks out the HEAD of the
branch and so the patches should be reapplied rather than skipped due to
finding of the fence post.

We can call kgit-s2q --clean to remove the sentinel file when the
branches are checked out.

(From OE-Core rev: d57aeafdd2b49010a9fa6d1cd9d10f3cfd5754a5)

Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-19 06:16:57 -08:00
Joshua Watt 8279d6f257 classes/license: Respect beginline and endline
Recipes have the option of specifying a 'beginline' and 'endline'
options in LIC_FILES_CHKSUM which will cause the license bbclass to
only extract those specific lines from the license file when generating
the license database.

(From OE-Core rev: 515f4c129ad27e9502621738d0bf7f5552627f19)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:41 -08:00
Stephano Cetola 2c74929555 insane.bbclass: print QA message correctly
Replace call to non-existent method "messages" with call to correct
QA logging method.

Fixes [YOCTO #11014]

introduced in OE-core revision 1dcb38ca9d6

(From OE-Core rev: 7f3e6d7ce94659447e1b1cdcb2440305581c8cbb)

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:40 -08:00
Amarnath Valluri f377eaa011 package_deb.bbclass: Ignore file paths in RPROVIDES
Unlike rpm, debian packaging does not allow file paths in 'Provides:' field.
When 'usrmerge' distro feature enabled bash/busybox packages adds '/bin/sh' to
it's RPROVIDES to satisfy build dependencies, this entry should be filtered out.

(From OE-Core rev: a36165ea8bf8c7a061a0173076c83ae6806d65b6)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:40 -08:00
Mariano Lopez b61eee699d testimage.bbclass: Add check for empty test suite
If for some reason (most likely incorrect TEST_SUITES var)
you end with an empty test suite, testimage will start the
target (qemu by default) and will run an empty suite, so
better have a check before starting the target.

[YOCTO #10979]

(From OE-Core rev: 8345f834a080737f03bee3f0c615dd9654401d93)

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>
2017-02-15 09:29:56 -08:00
Nathan Rossi fd1ecec6a9 image.bbclass: Use 'populate_sdk_base' for non-linux targets
When 'populate_sdk_ext' was first introduced in commit bf81d6bb7f6 it
replaced the inheriting of 'populate_sdk_base'. For non-linux targets
building the extensible SDK caused build errors, and the image class was
changed to inherit 'populate_sdk' when targeting a non-linux SDK_OS (in
commmit e471ce3464d). However inheriting 'populate_sdk' instead of
'populate_sdk_base' causes the SDK to always be built, this is not
expected for the image class.

This change makes the image class inherit 'populate_sdk_base' in the
non-linux SDK_OS case so that it behaves the same as it is expected to
behave where 'bitbake <image> -c populate_sdk' must be executed to
generate the SDK deployables.

(From OE-Core rev: b7d6bb07fd37c55d07903a1e8921f17e39afde0a)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:56 -08:00
Philip Balister b6939b7392 sanity.bbclass: Add which to SANITY_REQUIRED_UTILITIES.
Using docker with the Fedora 23 container exposed an issue with
the rpm-native configure step. If which is not present the configure
script fork bombs. After much pain, I tracked this to which not being
present in the default container. Add a check for which so others
do not have to have this experience.

(From OE-Core rev: 096c07900250db157bb0c38785b9d8efc6301cab)

Signed-off-by: Philip Balister <philip@balister.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:56 -08:00
Dalon Westergreen 6f3f9457a6 uboot-extlinux-config.bbclass: add support for timeout & default
When multible targets are defined it is useful to allow for
a default target along with a timeout.  After timeout, the
default target will be selected.

(From OE-Core rev: 1e01c2e32c168805a9b71c1dba4b487916955813)

Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:56 -08:00
Paul Eggleton 4794518720 classes/copyleft_filter: include AGPL in default included list
If we're including all GPL licenses then we should include AGPL in
the default COPYLEFT_LICENSE_INCLUDE since it has similar terms (and
currently we do have one AGPL-licensed recipe in OE-Core, namely db).

(Note that the default list isn't meant to be a guaranteed complete
safe list - seek legal advice based on what you're distributing if
unsure.)

(From OE-Core rev: a16fbf6970056a79cac8b70ce54e55e61ef63a8d)

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>
2017-02-15 09:29:56 -08:00
Andrea Adami 0fce3ec656 kernel.bbclass: Make symbol to vmlinuz.bin in boot directory
The changes committed with 6e58f54be103814b6b8a85b236510633c49e6832 did only
consider the vmlinuz ELF kernel but some devices do reqire a raw vmlinuz.bin
(as for example gcw0 in meta-handheld booted by ubiboot).
Expand the above mentioned patch to consider this case.

(From OE-Core rev: 413a5faf99280f4e083358e4134aebbcfa47bb4c)

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:56 -08:00