rpm: Fix cpio 32 bit overflow issues on 64 bit inode filesystems

When building on XFS filesystems, the resulting rpms can be corrupted
with the same inode number being used for multiple hardlinked files.
There are two fixes, one to stop rpm crashing when accessing a broken
binary rpm, the other to stop generating them in the first places. Full
descriptions in the patch headers.

(From OE-Core rev: d20d3476157b7c949b0077cad0ab1e8716d6162a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: cache.py: print debug info when EXCLUDE_FROM_WORLD

This gives us an easy way to find out which recipes have been excluded
from world when there are many layers.

(Bitbake rev: cf33d4bfc53ae8dc6353fa295e1acd789d4fc2d2)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: bb/tests/data.py: add tests for contains() and contains_any()

contains_any is buggy so write a test case to demonstrate this.

(Bitbake rev: 25d10c349aab77bf99745c0a90dd8f9b90abccac)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: bb/utils: fix contains_any()

"set1 in set2" doesn't do what you'd expect, and if it did do a subset test
that's not the logic required by contains_any().

Instead get the intersection of checkvalues and val and check if the resulting
set is empty or not (by evaluating it in a boolean context), which tells us if
there are any elements in common.

Based on a patch by Valentin Popa <valentin.popa@intel.com>.

(Bitbake rev: 2e742c03e8dfdfa67899e7f5d579ed14bd87e139)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: toaster: initial bldcontrol application

The build features of Toaster will be contained into
a separate application, as to modularize the Toaster
project and provide multiple options for deployment.

This patch adds the application as a barebone Django
application in the Toaster project.

(Bitbake rev: 08556b79b7b2af08aaeedf8733b1b8996f387c4e)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: toaster: create models for bldcontrol and enable it

We create the model classes that store information
about triggering builds, and the available build
environments.

We add a fixture with a default build environment
for build control, using a "build/" directory under
the poky checkout directory.

We enable the bldcontrol in toaster starting script
and in the toaster settings as to allow the actual database
to be kept in sync with the source code.

(Bitbake rev: d4bfe9059f765f11244b97e324c0131f32f8e400)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: toaster: add function to get the database url

We add a function that returns the DATABASE_URL
for the current 'default' database settings. This
is useful to be able to start other toaster instances
with the same database settigns as the currently running
instance.

(Bitbake rev: 272a4bba0804bb6b5e0d498d3453321b5ed1dc76)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: xmlrpc: add support for token reusing

We add support to specify a connection token in the command line
and in the environment variable BBTOKEN.

When a client registers to a bitbake server, that client
will have exclusive access to the server. The client is identified
by a server-supplied token. If a client terminates, we cannot
reconnect to the server as the token is lost.

This patch adds the capability to specify the connection token
in the command line for xmlrpc clients. This allows us
to have bitbake work as an already-authenticated
client with the server and resume sending commands to a server.

(Bitbake rev: db5390940c0afbcdc9fbcf1225761968ae51d4a7)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: toastergui: fix built ETA calculation

We fix the calculation showing the estimated time
to build completion.

(Bitbake rev: dc1daae51ef5201475b5c1a69d966ae57b66dcb6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: toaster: build control functionality

We add the build control functionality to toaster.

* The bldcontrol application gains bbcontroller classes
that know how to manage a localhost build environment.

* The toaster UI now detects it is running under build
environment controller, and update the build controller
database and will shut down the bitbake server once
the build is complete.

* The toaster script can now run in standalone mode,
launching the build controller and the web interface instead
of just monitoring the build, as in the interactive mode.

* A fixture with the default build controller entry for
localhost is provided.

[YOCTO #5490]
[YOCTO #5491]
[YOCTO #5492]
[YOCTO #5493]
[YOCTO #5494]
[YOCTO #5537]

(Bitbake rev: 10988bd77c8c7cefad3b88744bc5d8a7e3c1f4cf)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
rootfs.py: change the logic in _uninstall_unneeded

Previously, if we have 'package-management' and 'read-only-rootfs'
both in IMAGE_FEATRUES, we would meet the following error at system
start-up.

	rm: can't remove '/etc/rcS.d/S99run-postinsts': Read-only file system

However, what's really expected is that when there's no postinstall
script at system start-up, the /etc/rcS.d/S99run-postinsts should not
even be there.

Whether or not to remove the init script symlinks to run-postinsts should
not depend on whether we have 'package-management' in IMAGE_FEATURES; rather,
it should only depend on whether we have any postinstall script left to run
at system start-up.

This patch changes the _uninstall_unneeded function based on the logic
stated above.

[YOCTO #6257]

(From OE-Core rev: 6c2f7ecee754ff3f29fdde17c0363f5d138057ff)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
texinfo: Use texinfo-replacement-native as an alias for texinfo-native.

If texinfo-native is added to ASSUME_PROVIDED, this will be needed for two
reasons. First, a world build will still build the native texinfo recipe, so
it will still get test coverage and will not rot. Second, when the target
architecture texinfo recipe is built, the native recipe must be built first
so its makedoc binary can be extracted, ASSUME_PROVIDED or no.

(From OE-Core rev: af5cd3ad123f45170d1ba06a8f5c9ee4ce5c082e)

Signed-off-by: Max Eliaser <max.eliaser@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
texinfo-dummy-native: Create recipe w/ scripts to stand in for Texinfo utils.

More work toward eliminating the dependency on the host system's Texinfo--
Python scripts that understand the same command-line options as the Texinfo
utilities, and create blank output files if appropriate, but don't actually
do any of the work done by those utilities.

This will be necessary to avoid circular dependencies when we start explicitly
tracking dependencies on texinfo-native; i.e. texinfo-native ->
autoconf-native -> texinfo-native. If we have all native recipes that inherit
texinfo.bbclass depend on texinfo-dummy-native instead of texinfo-native, the
cycle is broken.

It may also provide a performance gain by skipping the actual work of
formatting and generating documentation files.

(From OE-Core rev: 0d8d5a2d44988d32a5c8b995202a12ac106ba93c)

Signed-off-by: Max Eliaser <max.eliaser@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
texinfo.bbclass: native/cross uses dummy texinfo; target uses host's Texinfo.

To unpack that to more than a single line: -native and -cross recipes are made
to use the dummy Texinfo utilities provided by texinfo-dummy-native if they
invoke those utilities at build time. The target-architecture (cross-compiled)
recipes still use the genuine Texinfo utilites. Right now, they still use
the host system's Texinfo utilities, but could be made to use the
texinfo-native recipe we already ship with some config file changes.

(From OE-Core rev: 160087f754eabf5da90fb51997e19d2e585aac4a)

Signed-off-by: Max Eliaser <max.eliaser@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
v4 cups: Shouldn't link against libgcrypt without using gcrypt functions

Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch

This addresses the cryto dependency seen during build.

(From OE-Core rev: e5f9166302baad837244e5a93bedb2797ab17e57)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sed: enable ptest support

Install sed test suite and run it as ptest.

(From OE-Core rev: de8cc3192eefafa639a9f34fcc35799be3286191)

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
nfs-utils: Do not pass CFLAGS to gcc while building

Do not pass CFLAGS/LDFLAGS to gcc while building, The needed flags has
been passed by xxx_CFLAGS=$(CFLAGS_FOR_BUILD).

(From OE-Core rev: e4b01d651cf94185cfb285a7b64292b26b74c6bb)

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
perf: fix broken shell comparsion in do_install

The patch was sponsored by sysmocom

(From OE-Core rev: 17bf25adad715754de589d2ae54f97c07f5dafde)

Signed-off-by: Henning Heinold <henning@itconsulting-heinold.de>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
perf: split packging

* some fundamental perf commands can work
  without the dependency on perl, python or bash
  make them separate packages and RSUGGEST them

* bump PR

The patch was sponsored by sysmocom

(From OE-Core rev: 6d1c0cde05dbab5ca84b1bbd8abeecf8df49e37b)

Signed-off-by: Henning Heinold <henning@itconsulting-heinold.de>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
oprofile: Determine the root home directory dynamically

This commit detects the root home directory dynamically with changes to
the opcontrol script and the oprofile gui app source.

The commit replaces an earlier fix that detected and adjusted a
'non-standard' root home directory at build time.  The advantage of this
patch is that the oprofile tools are adjusted to the current run-time
path to ~root, not the build time path.

(From OE-Core rev: 4fa57b42aa7ec3f77606ab3d3b5814f638c859d5)

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>