]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
9 years agowic: fix errors in partition.py module
Ed Bartosh [Wed, 2 Sep 2015 10:58:08 +0000 (13:58 +0300)]
wic: fix errors in partition.py module

Fixed the followring errors found by pylint in partition.py:

E: 42, 0: class already defined line 33 (function-redefined)
E:429,63: Undefined variable 'fs' (undefined-variable)
E:432,37: Undefined variable 'fs' (undefined-variable)
E:481, 0: class already defined line 33 (function-redefined)
E:488,22: Undefined variable 'OptionValueError' (undefined-variable)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: remove micboot.py
Ed Bartosh [Wed, 2 Sep 2015 10:58:07 +0000 (13:58 +0300)]
wic: remove micboot.py

Moved functionaly of micboot.py Mic_Bootloader class to
Wic_Bootloader class of wicboot.py module.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: remove micpartition.py
Ed Bartosh [Wed, 2 Sep 2015 10:58:06 +0000 (13:58 +0300)]
wic: remove micpartition.py

Moved functionality of Mic_Partition and Mic_PartData classes
from micpartition.py to Wic_Partition and Wic_PartData classes
of partition.py module.

Reduced level of inheritance.
Removed confusing mic legacy names.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: fix typo
Ed Bartosh [Wed, 2 Sep 2015 10:58:05 +0000 (13:58 +0300)]
wic: fix typo

Fixed typo in tool name: mkswqp -> mkswap.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: add test cases for 3 images
Ed Bartosh [Wed, 2 Sep 2015 10:58:04 +0000 (13:58 +0300)]
wic: add test cases for 3 images

Added test cases to build qemux86_directdisk, mkgummidisk and
mkefdisk images.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooe-selftest: wic: configure a build
Ed Bartosh [Wed, 2 Sep 2015 10:58:03 +0000 (13:58 +0300)]
oe-selftest: wic: configure a build

Added MACHINE_FEATURES and IMAGE_FSTYPES variables to the build config
to ensure that bootimg and efi artifacts are built. This is needed to
build canned wic images that are using those artifacts.

Introduced class variable Wic.image_is_ready to avoid building image
more than once. It would be better to build image in setUpClass, which
is called only once, but add_config method can't be called in class method,
so we have to use this trick with class variable in setUp method.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: get rid of scripts/lib/image
Ed Bartosh [Wed, 2 Sep 2015 10:58:02 +0000 (13:58 +0300)]
wic: get rid of scripts/lib/image

Moved content of scripts/lib/image/ to scripts/lib/wic as
one directory with the same name as a tool is self-explanatory
and less confusing than two.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: use ext4 in canned .wks files
Ed Bartosh [Wed, 2 Sep 2015 10:58:01 +0000 (13:58 +0300)]
wic: use ext4 in canned .wks files

Latest kernel doesn't have ext3 compiled in. Wic images produced
from canned .wks can't boot because of that. Switching to ext4
fixes this issue.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosysstat: add systemd service files
Li xin [Fri, 12 Jun 2015 06:13:40 +0000 (14:13 +0800)]
sysstat: add systemd service files

Add sysstat.service to support systemd systems.

Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agovalgrind: enable rt_sigpending syscall on ppc64 linux
Li Zhou [Tue, 25 Aug 2015 06:49:34 +0000 (14:49 +0800)]
valgrind: enable rt_sigpending syscall on ppc64 linux

When running one application under Valgrind on ppc64 arch, we got a
missing syscall error. Get upstream patch from valgrind website to
enable rt_sigpending syscall on ppc64 linux.

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agokernel.bbclass: add the runtime dependency on kernel-vmlinux for kernel-image
Kevin Hao [Tue, 25 Aug 2015 10:36:07 +0000 (18:36 +0800)]
kernel.bbclass: add the runtime dependency on kernel-vmlinux for kernel-image

When a BSP uses vmlinux for boot, the kernel-image package is just
empty. But by default the kernel-vmlinux is not installed. Then the
pkg_postinst_kernel-image() would create a symlink to a non-existent
file. Fix this by adding the runtime dependency on kernel-vmlinux for
kernel-image if the KERNEL_IMAGETYPE is "vmlinux".

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoiproute2: upgrade to 4.1.1
Cristian Iorga [Tue, 25 Aug 2015 13:51:31 +0000 (16:51 +0300)]
iproute2: upgrade to 4.1.1

libelf is now a build dependency.

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoinsane.bbclass: Check for invalid characters (non UTF8) on recipe metadata
Leonardo Sandoval [Mon, 17 Aug 2015 07:10:12 +0000 (07:10 +0000)]
insane.bbclass: Check for invalid characters (non UTF8) on recipe metadata

Check if invalid characters are present on recipe's metadata. Fields
taken into account are: 'DESCRIPTION', 'SUMMARY', 'LICENSE' and 'SECTION'.

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoscreen: fix parallel build failure
Kai Kang [Thu, 27 Aug 2015 09:28:59 +0000 (17:28 +0800)]
screen: fix parallel build failure

Backport patch to fix screen parallel build failure.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolibnotify: add (R)PROVIDES/RCONFLICTS/RREPLACES for meta-gnome's libnotify
Andreas Müller [Thu, 27 Aug 2015 12:39:05 +0000 (14:39 +0200)]
libnotify: add (R)PROVIDES/RCONFLICTS/RREPLACES for meta-gnome's libnotify

Avoid package feed issues caused by removing meta-gnome's libnotify3

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agomtd-utils: add xattr PACKAGECONFIG and fix acl dependency
Patrick Ohly [Wed, 26 Aug 2015 16:10:45 +0000 (18:10 +0200)]
mtd-utils: add xattr PACKAGECONFIG and fix acl dependency

The unconditional removal of -DWITHOUT_XATTR accidentally introduced a
compile-time dependency on "acl", because "sys/acl.h" gets
included. This caused random compile failures.

To fix this, we introduce a proper PACKAGECONFIG for the "xattr"
support, with the distro's "xattr" feature determining the
default. Setting the define must be done with custom code because
PACKAGECONFIG can only influence configure parameters.

The "acl" distro feature is not checked because although enabling
"xattr" support now triggers a build of acl, nothing from it will not
get included in the resulting target image. This seems more suitable
than not enabling xattr support in mtd-utils when acl support in the
distro is disabled.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolibvorbis: remove legacy options
Stefan Müller-Klieser [Thu, 27 Aug 2015 14:46:37 +0000 (16:46 +0200)]
libvorbis: remove legacy options

Those code fragments date back to ancient times. EXTRA_OECONF is not
required anymore and we should give gcc another try to do it right.
Testing on cortex-a8 with thumb and -O2 reveals a performance boost of
82 percent during encoding in comparison to -O0. -O4 gives another 7
percent.

Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopackage_manager: support for signed RPM package feeds
Markus Lehtonen [Tue, 25 Aug 2015 13:48:32 +0000 (16:48 +0300)]
package_manager: support for signed RPM package feeds

This change makes it possible to create GPG signed RPM package feeds -
i.e. package feed with GPG signed metadata (repodata). All deployed RPM
repositories will be signed and the GPG public key is copied to the rpm
deployment directory.

In order to enable the new feature one needs to define four variables in
bitbake configuration.
1. 'PACKAGE_FEED_SIGN = "1"' enabling the feature
2. 'PACKAGE_FEED_GPG_NAME = "<key_id>"' defining the GPG key to use for
   signing
3. 'PACKAGE_FEED_GPG_PASSPHRASE_FILE = "<path_to_file>"' pointing to a
   file containing the passphrase for the secret signing key
4. 'PACKAGE_FEED_GPG_PUBKEY = "<path_to_pubkey>"' pointing to the
   corresponding public key (in "armor" format)
The user may define "GPG_BIN" in the bitbake configuration in order to
specify a specific the gpg binary/wrapper to use for signing.

[YOCTO #8134]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoos-release: add the public package-signing key
Markus Lehtonen [Tue, 25 Aug 2015 11:49:14 +0000 (14:49 +0300)]
os-release: add the public package-signing key

Adds the public package-signing key into this package. It will be
installed under /etc/pki/rpm-gpg if the RPM signing feature is used. The
key file is not currently directly used by anything in the target
system. It is merely there for possible later use.

[YOCTO #8134]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopackage_rpm: support signing of rpm packages
Markus Lehtonen [Fri, 21 Aug 2015 14:21:57 +0000 (17:21 +0300)]
package_rpm: support signing of rpm packages

This patch adds a new bbclass for generating rpm packages that are
signed with a user defined key. The packages are signed as part of the
"package_write_rpm" task.

In order to enable the feature you need to
1. 'INHERIT += " sign_rpm"' in bitbake config (e.g. local or
   distro)
2. Create a file that contains the passphrase to your gpg secret key
3. 'RPM_GPG_PASSPHRASE_FILE = "<path_to_file>" in bitbake config,
   pointing to the passphrase file created in 2.
4. Define GPG key name to use by either defining
   'RPM_GPG_NAME = "<key_id>" in bitbake config OR by defining
   %_gpg_name <key_id> in your ~/.oerpmmacros file
5. 'RPM_GPG_PUBKEY = "<path_to_pubkey>" in bitbake config pointing to
   the public key (in "armor" format)

The user may optionally define "GPG_BIN" variable in the bitbake
configuration in order to specify a specific gpg binary/wrapper to use.

The sign_rpm.bbclass implements a simple scenario of locally signing the
packages. It could be replaced by a more advanced class that would
utilize a separate signing server for signing the packages, for example.

[YOCTO #8134]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocreaterepo: disable RPM signature validation
Markus Lehtonen [Thu, 27 Aug 2015 06:32:47 +0000 (09:32 +0300)]
createrepo: disable RPM signature validation

Disable RPM signature validation so that it is possible to create
package feeds of signed RPM packages without importing the public part
of the signing key into the RPM database. In any case, the signatures
are validated when the packages in the feed are used (e.g. in image
generation of manually installing packages from the feed).

The original idea idea of this patch is from Mark Hatle
<mark.hatle@windriver.com>.

[YOCTO #8134]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopulseaudio: add 'autospawn-for-root' PACKAGECONFIG
Christopher Larson [Mon, 31 Aug 2015 19:12:03 +0000 (12:12 -0700)]
pulseaudio: add 'autospawn-for-root' PACKAGECONFIG

Since many embedded systems don't have non-root users, it's useful to be able
to use pulseaudio autospawn for root as well.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopulseaudio: pass --with-systemduserunitdir
Christopher Larson [Mon, 31 Aug 2015 19:12:02 +0000 (12:12 -0700)]
pulseaudio: pass --with-systemduserunitdir

We want to make sure our path variables are obeyed.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopackagegroup-core-x11-sato: obey the pulseaudio distro feature
Christopher Larson [Mon, 31 Aug 2015 19:12:01 +0000 (12:12 -0700)]
packagegroup-core-x11-sato: obey the pulseaudio distro feature

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunexported: Make it compatible with host dump
Mariano Lopez [Tue, 1 Sep 2015 07:36:30 +0000 (07:36 +0000)]
runexported: Make it compatible with host dump

Currently it is not possible to run a exported test,
but this patch will allow to use the HosDumper class
when running a exported test, otherwise the HostDumper
class will break runexpored test.

[YOCTO #8118]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoqemurunner: Added host dumps when there are errors
Mariano Lopez [Tue, 1 Sep 2015 07:36:29 +0000 (07:36 +0000)]
qemurunner: Added host dumps when there are errors

This adds an instance of HostDumper to qemurunner,
with this instance now is possible to get dumps
from the host when there is an error.

This adds dump points in the next cases:
    - runqemu exits before seeing qemu pid
    - Fail to get qemu process arguments
    - Not reach login banner before timeout
    - qemu pid never appears

This also modifies the constructors of BaseDumper,
HostDumper and TargetDumper, they don't require
the datastore anymore, but the feature to replace
datastore variables has been lost (never used)

[YOCTO #8118]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoglibc: package nscd related files
Roy Li [Wed, 19 Aug 2015 09:25:30 +0000 (17:25 +0800)]
glibc: package nscd related files

install nscd related configuration file, startup files, and package them,
make nscd easy to startup

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake.conf: add MIRROR vars to SRC_URI vardeps
Christopher Larson [Mon, 31 Aug 2015 19:08:01 +0000 (12:08 -0700)]
bitbake.conf: add MIRROR vars to SRC_URI vardeps

Changes to what mirror we happen to fetch from shouldn't cause rebuilds.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopython: Fix python-distutils variables
Ricardo Ribalda Delgado [Tue, 1 Sep 2015 14:28:28 +0000 (16:28 +0200)]
python: Fix python-distutils variables

python-distutils uses the information from this file for setting the
system variables.

Whithout this patch:

root@qt5022:~# pip install pyzmq

...

x86_64-poky-linux-gcc -m64 -march=btver1 -mtune=btver1
--sysroot=/var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/sysroots/qt5022
-fno-strict-aliasing -O2 -pipe -g -feliminate-unused-debug-types
-DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DNATIVE_LITTLE_ENDIAN=1
-Ibundled/libsodium/src/libsodium/include
-Ibundled/libsodium/src/libsodium/include/sodium
-I/usr/include/python2.7 -c buildutils/initlibsodium.c -o
build/temp.linux-x86_64-2.7/buildutils/initlibsodium.o
    In file included from /usr/include/python2.7/Python.h:8:0,
                         from buildutils/initlibsodium.c:10:
    /usr/include/python2.7/pyconfig.h:24:27: fatal error: bits/wordsize.h: No such
file or directory
    #include <bits/wordsize.h>
root@qt5022:~# ls /usr/include/bits/wordsize.h
/usr/include/bits/wordsize.h

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopython3: Fix python-distutils variables
Ricardo Ribalda Delgado [Tue, 1 Sep 2015 14:28:27 +0000 (16:28 +0200)]
python3: Fix python-distutils variables

python-distutils uses the information from this file for setting the
system variables.

Whithout this patch:

root@qt5022:~# pip install pyzmq

...

x86_64-poky-linux-gcc -m64 -march=btver1 -mtune=btver1
--sysroot=/var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/sysroots/qt5022
-fno-strict-aliasing -O2 -pipe -g -feliminate-unused-debug-types
-DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DNATIVE_LITTLE_ENDIAN=1
-Ibundled/libsodium/src/libsodium/include
-Ibundled/libsodium/src/libsodium/include/sodium
-I/usr/include/python2.7 -c buildutils/initlibsodium.c -o
build/temp.linux-x86_64-2.7/buildutils/initlibsodium.o
    In file included from /usr/include/python2.7/Python.h:8:0,
                         from buildutils/initlibsodium.c:10:
    /usr/include/python2.7/pyconfig.h:24:27: fatal error: bits/wordsize.h: No such
file or directory
    #include <bits/wordsize.h>
root@qt5022:~# ls /usr/include/bits/wordsize.h
/usr/include/bits/wordsize.h

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoopkg: upgrade to v0.3.0
Alejandro del Castillo [Tue, 1 Sep 2015 14:17:53 +0000 (09:17 -0500)]
opkg: upgrade to v0.3.0

Changes required:
- Rename opkg-cl to opkg
- Add libarchive dependency
- Drop backport patches
- Drop obsolete directory options
- Add patch to handle empty index files

Based on initial work by Paul Barker.

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
CC: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolibevent_2.0.22.bb: Add native and nativesdk support to the recipe.
Philip Balister [Tue, 1 Sep 2015 13:47:22 +0000 (09:47 -0400)]
libevent_2.0.22.bb: Add native and nativesdk support to the recipe.

Build tested against thrift recipe under development.

Signed-off-by: Philip Balister <philip@balister.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agort-tests: drop unnecessary added-missing-dependencies.patch
Josh Cartwright [Fri, 28 Aug 2015 12:59:45 +0000 (07:59 -0500)]
rt-tests: drop unnecessary added-missing-dependencies.patch

Neither the hackbench target, or the rt-migrate-test target actually
depend on librttest.a; drop this unnecessary patch.

Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoopenssh: Upgrade 7.0p1 -> 7.1p1
Jussi Kukkonen [Fri, 28 Aug 2015 11:12:07 +0000 (14:12 +0300)]
openssh: Upgrade 7.0p1 -> 7.1p1

This is a bugfix release.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodpkg: update to 1.18.2
Alexander Kanavin [Fri, 28 Aug 2015 12:18:51 +0000 (15:18 +0300)]
dpkg: update to 1.18.2

check_snprintf.patch has been dropped, because it seems to fix a problem
that doesn't anymore exist, and doesn't have any description of what the
problem was and how was it fixed.

tarfix.patch has been merged upstream.

The rest of the patches have been rebased to the new upstream release

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocmake: update to 3.3.1
Alexander Kanavin [Fri, 28 Aug 2015 12:18:57 +0000 (15:18 +0300)]
cmake: update to 3.3.1

Share tarball checksums between cmake and cmake-native via cmake.inc.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopackage_regex.inc: updates to improve upstream tracking
Alexander Kanavin [Fri, 28 Aug 2015 12:18:55 +0000 (15:18 +0300)]
package_regex.inc: updates to improve upstream tracking

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoe2fsprogs: explain why there is no update for now
Alexander Kanavin [Fri, 28 Aug 2015 12:18:54 +0000 (15:18 +0300)]
e2fsprogs: explain why there is no update for now

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolibnotify: don't inherit unnecessary distro_features_check
Alexander Kanavin [Fri, 28 Aug 2015 12:18:53 +0000 (15:18 +0300)]
libnotify: don't inherit unnecessary distro_features_check

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodropbear: update to 2015.68
Alexander Kanavin [Fri, 28 Aug 2015 12:18:52 +0000 (15:18 +0300)]
dropbear: update to 2015.68

LICENSE checksum has changed because the copyright year was changed
from 2014 to 2015 in it:
https://github.com/mkj/dropbear/commit/19e1afbd1ca6d306166ce74bcd6c6889f8d196f3

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoupstream_tracking.inc: deprecate and move contents to recipes
Alexander Kanavin [Fri, 28 Aug 2015 12:18:50 +0000 (15:18 +0300)]
upstream_tracking.inc: deprecate and move contents to recipes

No-update reasons and manual version checks should be in the recipes
themselves because otherwise they're prone to getting out of date.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopulseaudio: improve PACKAGECONFIG for dbus/consolekit dependencies
Martin Jansa [Fri, 28 Aug 2015 16:07:16 +0000 (18:07 +0200)]
pulseaudio: improve PACKAGECONFIG for dbus/consolekit dependencies

* the problem is that consolekit module is built whenever dbus is enabled
  and consolekit is available only in distributions with x11 in DISTRO_FEATURES
* many distributions want to enable dbus support (required for bluez support),
  but without consolekit because they aren't using x11
* allow to completely disable dbus (and consolekit)
* add consolekit runtime dependency only for x11 in DISTRO_FEATURES

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agomirrors.bbclass: Update gnutls mirrors
Jussi Kukkonen [Thu, 27 Aug 2015 13:06:03 +0000 (16:06 +0300)]
mirrors.bbclass: Update gnutls mirrors

* Remove mirror sites that no longer exist
* Update the gnutls.org path so the gnupg mirror gets used

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agognutls: Upgrade 3.3.14 -> 3.3.17.1
Jussi Kukkonen [Thu, 27 Aug 2015 13:06:02 +0000 (16:06 +0300)]
gnutls: Upgrade 3.3.14 -> 3.3.17.1

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agonettle: Add ptests
Jussi Kukkonen [Thu, 27 Aug 2015 07:40:22 +0000 (10:40 +0300)]
nettle: Add ptests

Use the nettle testsuite as ptests. Skip "sha1-huge-test" because
it can take 20 minutes to finish.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agonettle: Add (LGPLv3) version 3.1.1
Jussi Kukkonen [Thu, 27 Aug 2015 13:06:00 +0000 (16:06 +0300)]
nettle: Add (LGPLv3) version 3.1.1

Newer nettle versions are "LGPLv3+ | GPLv2+". Add 3.1.1 but also
keep version 2.7.1 since it's LGPLv2.1+

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agogmp: Bring back version 4.2.1 (LGPL 2.1+)
Jussi Kukkonen [Thu, 27 Aug 2015 13:05:59 +0000 (16:05 +0300)]
gmp: Bring back version 4.2.1 (LGPL 2.1+)

gmp 4.2.1 was removed in f181c6ce8b apparently accidentally: It
was not noticed that 4.2.1 is LGPL 2.1 (and not GPL) so provides
a useful alternative to the newer "GPLv2 | LGPLv3" version.

* Reintroduce 4.2.1. The source includes files that are GPL but the
  library package is LGPL 2.1+
* Also reintroduce the two patches removed in f181c6ce8b.
* Refactor gmp.inc: gmp 6.0.0 build should not be affected in any way.
* Update 6.0.0 license from "GPLv2 | LGPLv3" to "GPLv2+ | LGPLv3+".

[YOCTO #8197]

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agonettle: Fix binary license to LGPLv2.1+
Jussi Kukkonen [Thu, 27 Aug 2015 13:05:58 +0000 (16:05 +0300)]
nettle: Fix binary license to LGPLv2.1+

* Set the nettle binary package license to LGPLv2.1+:
  There are GPL files in the sources but none of these are used
  to produce the files we ship.
* Remove the useless package specific licenses: none of the named
  packages are actually produced and the licenses do not affect
  the overall license of either the sources or the binary package.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoFix mode +st on TMPDIR when creating it
Alex Franco [Fri, 28 Aug 2015 22:34:04 +0000 (17:34 -0500)]
Fix mode +st on TMPDIR when creating it

A sanity check fails when TMPDIR has setuid, setgid set. It was
proposed to fix this on TMPDIR creation instead of failing with
a sanity test only. This patch handles removal of those special
bits (and additonally, the sticky bit) from BUILDDIR and TMPDIR
when these directories are created.

[YOCTO #7669]

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopackagegroup-base: pull in iw as well as wireless-tools
Christopher Larson [Fri, 28 Aug 2015 20:23:03 +0000 (13:23 -0700)]
packagegroup-base: pull in iw as well as wireless-tools

As was discussed in the commit which adds iw:

iw uses cfg80211/nl80211, which is the way of the future. wireless-tools uses
WEXT, which uses ioctl, which is in deep maintenance mode. See
http://wireless.kernel.org/en/developers/Documentation/Wireless-Extensions.
Also https://wireless.wiki.kernel.org/en/users/Documentation/iw indicates "The
old tool iwconfing, which uses Wireless Extensions interface, is deprecated
and it's strongly recommended to switch to iw and nl80211."

wireless-tools is kept as well for now for compatibility reasons, until we
have verified that all the network configuration mechanisms are using iw.

This adds VIRTUAL-RUNTIME_wireless-tools as a distro convenience.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoiw: support and enable separate build dir
Christopher Larson [Fri, 28 Aug 2015 20:23:02 +0000 (13:23 -0700)]
iw: support and enable separate build dir

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoiw: obey our target path variables
Christopher Larson [Fri, 28 Aug 2015 20:23:01 +0000 (13:23 -0700)]
iw: obey our target path variables

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoiw: inherit pkgconfig
Christopher Larson [Fri, 28 Aug 2015 20:23:00 +0000 (13:23 -0700)]
iw: inherit pkgconfig

We want the dep on pkgconfig-native, not pkgconfig, and the convention is to
inherit pkgconfig when running pkg-config at build time.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoiw: add recipe from meta-networking
Christopher Larson [Fri, 28 Aug 2015 20:22:59 +0000 (13:22 -0700)]
iw: add recipe from meta-networking

iw uses cfg80211/nl80211, which is the way of the future. wireless-tools uses
WEXT, which uses ioctl, which is in deep maintenance mode. See
http://wireless.kernel.org/en/developers/Documentation/Wireless-Extensions.
Also https://wireless.wiki.kernel.org/en/users/Documentation/iw indicates "The
old tool iwconfing, which uses Wireless Extensions interface, is deprecated
and it's strongly recommended to switch to iw and nl80211."

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooe-selftest: test devtool build-image plugin
Ed Bartosh [Sun, 30 Aug 2015 12:19:27 +0000 (15:19 +0300)]
oe-selftest: test devtool build-image plugin

Added test case to test functionaly of build-image plugin:

Add two packages to workspace and run 'devtool build-image
core-image-minimal'.

Checked if command is successful.

Checked if expected package is added to generated
core-image-minimal.bbappend file.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agodevtool: build-image: add comments
Ed Bartosh [Sun, 30 Aug 2015 15:48:27 +0000 (18:48 +0300)]
devtool: build-image: add comments

Added couple of hopefully useful comments to the code.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agodevtool: build-image: remove <image>.bbappend
Ed Bartosh [Sun, 30 Aug 2015 15:41:38 +0000 (18:41 +0300)]
devtool: build-image: remove <image>.bbappend

Removed <image>.bbappend before generating it again as
it may cause tinfoil to fail due to its wrong content.

It's safe to do as <image>.bbappend is regenerated anyway.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agodevtool: build-image: add extra logging
Ed Bartosh [Sun, 30 Aug 2015 15:37:58 +0000 (18:37 +0300)]
devtool: build-image: add extra logging

Added logger calls to show if image is modified by the
plugin or not.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agodevtool: build-image: generate notification callback
Ed Bartosh [Sun, 30 Aug 2015 15:32:47 +0000 (18:32 +0300)]
devtool: build-image: generate notification callback

Added notification callback to <image>.bbapend to notify
user that image is modified by build-image plugin.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agodevtool: build-image: filter out recipes
Ed Bartosh [Sun, 30 Aug 2015 14:41:29 +0000 (17:41 +0300)]
devtool: build-image: filter out recipes

Filtered out non-target recipes and recipes with
recipe name != package name in build-image plugin.

Isolated all logic of getting recipes in _get_recipes
function.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agodevtool: build-image: improve help and description
Ed Bartosh [Sun, 30 Aug 2015 14:34:08 +0000 (17:34 +0300)]
devtool: build-image: improve help and description

Made parser help message and description more clear in
build-image plugin.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agodevtool: build-image: rename LOG -> logger
Ed Bartosh [Sun, 30 Aug 2015 14:28:38 +0000 (17:28 +0300)]
devtool: build-image: rename LOG -> logger

Used logger variable name instead of LOG as it is used the rest
of the devtool code.
Pylint complains about 'logger' being invalid constant name,
but it's better to be consistent in naming.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agoRevert "devtool: make add_md5 a public API"
Ed Bartosh [Sun, 30 Aug 2015 14:12:50 +0000 (17:12 +0300)]
Revert "devtool: make add_md5 a public API"

This reverts commit 69c63728dae38d5b1cc9874268f235a07e04d3db.

Moved add_md5 back to standard.py as it's not used in
any plugin anymore.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agodevtool: make 2 functions public
Ed Bartosh [Sun, 30 Aug 2015 07:49:10 +0000 (10:49 +0300)]
devtool: make 2 functions public

Moved standard.py:_parse_recipe -> __init__.py:parse_recipe and
      standard.py:_get_recipe_file ->  __init__.py:get_recipe_file
to be able to call them from other modules.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agodevtool: build-image: stop using add_md5
Ed Bartosh [Sun, 30 Aug 2015 14:17:09 +0000 (17:17 +0300)]
devtool: build-image: stop using add_md5

It doesn't make sense to use it as image recipe is not
in workspace. It means that we can't do 'devtool reset'
for the recipe, which is a main point of using add_md5.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agooe-selftest: wic: fix test19_image_env test case
Ed Bartosh [Mon, 31 Aug 2015 08:35:36 +0000 (11:35 +0300)]
oe-selftest: wic: fix test19_image_env test case

This test case fails on qemu machines as not all expected bitbake
variables are present in .env file.

Fixed by filtering out optional variables.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa: Add allarch sstate sig test
Richard Purdie [Tue, 25 Aug 2015 16:56:53 +0000 (17:56 +0100)]
oeqa: Add allarch sstate sig test

"allarch" targets should be MACHINE invariant. This means their sstate
signature should not change regardless of which MACHINE is built.

Errors keep creeping in around this area so automating this as part
of self test seems the best way to maintain this.

The "do_build" stamps are known to differ and are harmless so those
are excluded from the test.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolayer.conf: Add missing dependency for allarch package initramfs-framework
Richard Purdie [Sun, 30 Aug 2015 23:03:26 +0000 (00:03 +0100)]
layer.conf: Add missing dependency for allarch package initramfs-framework

Similiarly to the other previous changes, add a missing allarch package dependency
for initramfs-framework on udev.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: use bitbake variable ROOTFS_SIZE
Ed Bartosh [Sun, 30 Aug 2015 21:14:27 +0000 (00:14 +0300)]
wic: use bitbake variable ROOTFS_SIZE

If bitbake image is referenced in .ks file and --size is not used
there wic uses ROOTFS_SIZE variable to set minimum partition size.

ROOTFS_SIZE is calculated in meta/lib/oe/image.py when rootfs is
created. The calculation is done using other image parameters:
IMAGE_ROOTFS_SIZE, IMAGE_ROOTFS_ALIGNMENT, IMAGE_OVERHEAD_FACTOR
and IMAGE_ROOTFS_EXTRA_SPACE.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooe-selftest: test building wic image by bitbake
Ed Bartosh [Sun, 30 Aug 2015 21:14:26 +0000 (00:14 +0300)]
oe-selftest: test building wic image by bitbake

Added test case to verify building of wic-image-minimal recipe
and produced artifacts: manifest and bzipped partitioned image.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic-image-minimal: add wic image recipe and .wks
Ed Bartosh [Sun, 30 Aug 2015 21:14:25 +0000 (00:14 +0300)]
wic-image-minimal: add wic image recipe and .wks

Added example of recipe and .wks file to create partitioned image.

This image is using quite complex partitioning scheme.
It uses its own rootfs to populate two partitions in two different ways.
It also uses core-image-minimal rootfs to populate another partition.

This is how wic reports about artifacts used to create this image:
  ROOTFS_DIR: tmp/work/qemux86_64-poky-linux/wic-image-minimal/1.0-r0/rootfs
  ROOTFS_DIR["/core"]: tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
  ROOTFS_DIR["/backup"]: tmp/work/qemux86_64-poky-linux/wic-image-minimal/1.0-r0/rootfs
  BOOTIMG_DIR: tmp/sysroots/qemux86-64/usr/share
  KERNEL_DIR: tmp/deploy/images/qemux86-64
  NATIVE_SYSROOT: tmp/sysroots/x86_64-linux

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooe-selftest: test generation of <image>.env
Ed Bartosh [Sun, 30 Aug 2015 21:14:24 +0000 (00:14 +0300)]
oe-selftest: test generation of <image>.env

Added test case to check if <image>.env file is generated
and contains bitbake variables used in wic code.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoimage.py: write bitbake variables to .env file
Ed Bartosh [Sun, 30 Aug 2015 21:14:23 +0000 (00:14 +0300)]
image.py: write bitbake variables to .env file

Write set of bitbake variables used by wic into
build/tmp/sysroots/<machine>/imagedata/<image>.env

List of variables is defined in WICVARS variable in
meta/classes/image_types.bbclass.

This is needed for wic to be able to get bitbake variables without
running 'bitbake -e'.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/utils/dump: Handle empty commandlist gracefully
Richard Purdie [Sun, 30 Aug 2015 22:24:07 +0000 (23:24 +0100)]
oeqa/utils/dump: Handle empty commandlist gracefully

If the commandlist isn't available, the code currently gives a backtrace.
At least stop doing that and return more gracefully.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoimage_types.bbclass: add wic image type
Ed Bartosh [Sun, 30 Aug 2015 17:47:06 +0000 (20:47 +0300)]
image_types.bbclass: add wic image type

wic image type is used to produce partitioned images.

Image configuration should be stored in either <recipe>.<machine>.wks
or <recipe>.wks file.
.wks file should be put to the same location as image recipe
and have the same name.

[YOCTO #7672]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: implement --vars option
Ed Bartosh [Sun, 30 Aug 2015 17:47:05 +0000 (20:47 +0300)]
wic: implement --vars option

This option is used to point wic to the directory with .env
files containing list of bitbake variables and their values.

If this option is used wic will get bitbake variables from
files instead of parsing 'bitbake -e' output.

The main reason for this is to support new mode, when bitbake
runs wic to produce wic images. In this case wic can't run bitbake
again as it's locked, so it will get variables from .env files.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: implement getting variables from .env files
Ed Bartosh [Sun, 30 Aug 2015 17:47:04 +0000 (20:47 +0300)]
wic: implement getting variables from .env files

Added functionality of getting variables from <image>.env files to
BitbakeVars class. env files will be parsed if the directory with
env files is known, i.e. when vars_dir attribute is set.
Otherwise 'bitbake -e' output will be parsed.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: set default image
Ed Bartosh [Sun, 30 Aug 2015 17:47:03 +0000 (20:47 +0300)]
wic: set default image

Set BitbakeVars.default_image when wic is called with -e option.
This makes get_bitbake_var API to use provided image as a default
source of variables.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: add default_image attribute to BitbakeVars
Ed Bartosh [Sun, 30 Aug 2015 17:47:02 +0000 (20:47 +0300)]
wic: add default_image attribute to BitbakeVars

New attribute is used when bitbake variable is requested without
specifying image name. The attribute should be set from outside,
for example when wic is called with '-e <image>' option.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: create new method _parse_line
Ed Bartosh [Sun, 30 Aug 2015 17:47:01 +0000 (20:47 +0300)]
wic: create new method _parse_line

Moved code that parses one line of 'bitbake -e' output
to separate method _parse_line.

This method will be also used later to parse lines of .env files.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: add BitbakeVars class
Ed Bartosh [Sun, 30 Aug 2015 17:47:00 +0000 (20:47 +0300)]
wic: add BitbakeVars class

Moved code of getting bitbake variables into separate class.

Created singleton object of this class in the module namespace.

Preserved existing API get_bitbake_var.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolinux-yocto-3.14: Use a revision thats on the branch for qemuppc
Richard Purdie [Sun, 30 Aug 2015 15:46:14 +0000 (16:46 +0100)]
linux-yocto-3.14: Use a revision thats on the branch for qemuppc

At a guess, Bruce's scripts have mixed up the -rt and on -rt versions
of the qemuppc branches. Set this to a revision on the
standard/qemuppc branch.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolinux-yocto/3.14/4.1: fix ARM boot with gcc 5.x
Bruce Ashfield [Thu, 27 Aug 2015 02:31:38 +0000 (22:31 -0400)]
linux-yocto/3.14/4.1: fix ARM boot with gcc 5.x

Booting qemuarm when the kernel was built with gcc 5.x would result in
a boot hang (or at least no visible output).

Updating the SRCREVs for the following change:

    Author: Jianchuan Wang
    Email: jianchuan.wang@windriver.com
    Subject: Omit to optimize vsprintf.c/kasprintf.c
    Date: Wed, 26 Aug 2015 13:54:57 +0800

    Add "-O0" for vsprintf.c/kasprintf.c

Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
While this may not be the final fix (it still has to go usptream and
be better explained), it gets us booting, so is good enough for the
time being.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/runtime/multilib: add test for libc
Ross Burton [Fri, 28 Aug 2015 23:39:55 +0000 (00:39 +0100)]
oeqa/runtime/multilib: add test for libc

Add a basic test to verify that /lib/libc.so.6 and /lib32/libc.so.6 have the
right ELF class.

Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agooetest: Fix regresion when testing real hardware
Mariano Lopez [Tue, 25 Aug 2015 01:31:08 +0000 (20:31 -0500)]
oetest: Fix regresion when testing real hardware

This fix the regresion introduced in commit
9c72c1a5aa0b49d3895bbefee7a264adfcc6f4ca
when testing with real hardware. This regression
happens when a test in real hardware fails.

[YOCTO #8203]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
9 years agodump: allow to have datastore vars on dump commands
Mariano Lopez [Tue, 25 Aug 2015 01:25:46 +0000 (20:25 -0500)]
dump: allow to have datastore vars on dump commands

This allows to have datastore variables in the dump
commands and will get the data when a new instance
it's created.

Also this remove special cases from the commands.

[YOCTO #8118]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
9 years agodump: Created new classes for dump host and target
Mariano Lopez [Tue, 25 Aug 2015 00:04:02 +0000 (19:04 -0500)]
dump: Created new classes for dump host and target

It makes sense to separate the dump commands from the
oeRuntimeTest class, this way it can be used in all
the test context.

These are the changes included in this patch:

    - Created classes: BaseDumper, HostDumper, TargetDumper
    - Create an instance of HostDumper in imagetest.bbclass
      and add it to TestContext class, this way any class
      that have access to the TestContext would be able
      to dump logs from the host
    - Create an instance of TargetDumper in QemuTarget
      class after get the runner, this way it is
      accessible during the tests.

[YOCTO #8118]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
9 years agoclasses/buildhistory: add build result to commit message
Paul Eggleton [Wed, 26 Aug 2015 10:05:18 +0000 (11:05 +0100)]
classes/buildhistory: add build result to commit message

We have the command in the commit message, we might as well have the
build result as well (succeeded/failed and whether or not it was
interrupted by the user). The interrupted part relies upon a change to
BitBake to extend the BuildCompleted event to include an attribute for
that, but will not fail if the attribute is not present.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoclasses/buildhistory: include metadata revisions in commit message
Paul Eggleton [Wed, 26 Aug 2015 09:54:17 +0000 (10:54 +0100)]
classes/buildhistory: include metadata revisions in commit message

We do already commit these into the repository itself, but have them in
the commit message as well as a reference. As part of this, refactor out
running "git commit" into a separate function so we don't have to
duplicate the code in the two places we call it.

Implements [YOCTO #7966].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoclasses/buildhistory: handle additional files at recipe level
Paul Eggleton [Fri, 21 Aug 2015 12:55:00 +0000 (13:55 +0100)]
classes/buildhistory: handle additional files at recipe level

Avoid an error when attempting to remove previous data if it's not a
subdirectory - we were assuming that anything that wasn't named "latest"
or "latest_srcrev" had to be a directory. This makes it possible to have
a buildhistory_emit_pkghistory_append which writes additional files at
the recipe level.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoclasses/buildhistory: fix permissions in package file listing
Paul Eggleton [Wed, 26 Aug 2015 13:21:40 +0000 (14:21 +0100)]
classes/buildhistory: fix permissions in package file listing

If we want the correct file permissions to show up here as they would on
the target, we need to run the command under pseudo. Normally we'd set
the fakeroot varflag on the function and that would be enough, but it
turns out that setting fakeroot on a non-task function that you execute
using bb.build.exec_func() isn't working at the moment. Work around this
by simply using FAKEROOTENV and FAKEROOTCMD. Unfortunately that means we
have to duplicate the command for the two cases but I couldn't find a
better means of doing that that actually works.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoclasses/buildhistory: tweak buildhistory_list_pkg_files
Paul Eggleton [Fri, 21 Aug 2015 09:50:57 +0000 (10:50 +0100)]
classes/buildhistory: tweak buildhistory_list_pkg_files

* Avoid using ${...} for shell variables (since they could be
  expanded as bitbake variables if present)
* Use files-in-package.txt rather than files-in-<packagename>.txt; the
  file is already in a subdirectory named with the package name and this
  naming is consistent with that of files-in-image.txt.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoclasses/buildhistory: indent recently added function consistently
Paul Eggleton [Thu, 20 Aug 2015 10:55:35 +0000 (11:55 +0100)]
classes/buildhistory: indent recently added function consistently

Shell functions use tabs in this file.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoclasses/buildhistory: exclude . in file listings
Paul Eggleton [Wed, 26 Aug 2015 13:06:35 +0000 (14:06 +0100)]
classes/buildhistory: exclude . in file listings

We don't care about the permissions on the top-level directory in which
the files are contained, just everything under it; this also avoids
lists with just this entry in it for empty packages. Affects file
listings for both images and packages.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoclasses/buildhistory: ensure we push when "no changes" commits are made
Paul Eggleton [Wed, 26 Aug 2015 14:01:45 +0000 (15:01 +0100)]
classes/buildhistory: ensure we push when "no changes" commits are made

If there aren't any changes, we still make a commit to the buildhistory
repo, but this wasn't being pushed if BUILDHISTORY_PUSH_REPO is set.
Move the push to the end to make it unconditional.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoimage.py: add script output to the rootfs log
Ed Bartosh [Thu, 20 Aug 2015 09:10:35 +0000 (12:10 +0300)]
image.py: add script output to the rootfs log

Let's add output of image creation script to the bitbake log
as it can contain useful information.

One good example of such an information is wic report about
artifacts and .wks file used for image creation.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoimage.py: set bitbake variable ROOTFS_SIZE
Ed Bartosh [Wed, 19 Aug 2015 20:21:58 +0000 (23:21 +0300)]
image.py: set bitbake variable ROOTFS_SIZE

This variable is going to be used by wic to set partition
size. Setting it in image.py makes it possible for wic to
use it without calculating it again.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agowic: deferred call of hlp.get_wic_plugins_help()
Ed Bartosh [Thu, 20 Aug 2015 11:10:29 +0000 (14:10 +0300)]
wic: deferred call of hlp.get_wic_plugins_help()

If get_wic_plugins_help is called from wic main module
it calls git_bitbake_var at some point. This fails when
wic is called from bitbake as 'bitbake -e' can't be
run.

Moved call of this method to help.py in order to call it
later, when BitbakeVariables singleton is properly initialized
to get variables from .env files.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agowic: rename variable
Ed Bartosh [Thu, 20 Aug 2015 10:42:22 +0000 (13:42 +0300)]
wic: rename variable

Renamed variable help -> hlp as 'help' is a name of Python
built-in function.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agowic: remove undescore from function name
Ed Bartosh [Tue, 18 Aug 2015 15:41:33 +0000 (18:41 +0300)]
wic: remove undescore from function name

Renamed __exec_cmd -> _exec_cmd as double underscores cause
strange behaviour when function is called in class method.
Python complains that __exec_cmd method(!!!) of the same class
doesn't exist.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>