]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
9 years agoqemurunner: Drop error to a warning to improve user feedback
Richard Purdie [Mon, 7 Sep 2015 14:36:49 +0000 (15:36 +0100)]
qemurunner: Drop error to a warning to improve user feedback

If a task shows an error, the full log is surpressed since bitbake assumes
the user has been shown what is wrong. In this code path that isn't the
case and its much more helpful to show the user the full error. Therefore
show a warning instead to aid usability.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoqemu: Add fixes for smc91c11 qemu segfaults on arm
Richard Purdie [Mon, 7 Sep 2015 14:35:49 +0000 (15:35 +0100)]
qemu: Add fixes for smc91c11 qemu segfaults on arm

The smc91c111.c driver appears to have several issues. The can_receive()
function can return that the driver is ready when rx_fifo has not been
freed yet. There is also no sanity check of rx_fifo() in _receive() which
can lead to corruption of the rx_fifo array.

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

This patch therefore:

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

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

[YOCTO #8234]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: add mechanism for updating extensible SDK
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:27 +0000 (13:42 +0100)]
devtool: add mechanism for updating extensible SDK

Enable updating the installed extensible SDK from a local or remote
server, avoiding the need to install it again from scratch when
updating. (This assumes that the updated SDK has been built and then
published somewhere using the oe-publish-sdk script beforehand.)

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

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

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooe-publish-sdk: add script
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:26 +0000 (13:42 +0100)]
oe-publish-sdk: add script

Add a script to publish an extensible SDK that has previously been built
to a specified destination. This published SDK is intended to be
accessed by the devtool sdk-update command from an installed copy of the
extensible SDK.

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

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoExtensible SDK: allow for installation without preparing build system
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:25 +0000 (13:42 +0100)]
Extensible SDK: allow for installation without preparing build system

When publishing SDK, what we want is basically its metadata and sstate
cache objects. We don't want the SDK to be prepared with running bitbake
as it takes time which reproduces meaningless output for the published SDK.

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

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopopulate_sdk_ext: don't remove the native qemu dependencies
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:24 +0000 (13:42 +0100)]
populate_sdk_ext: don't remove the native qemu dependencies

These dependencies were deliberately removed because it was assumed that
they were provided by nativesdk packages. On the one hand, nativesdk packages
in extensible SDK don't have these packages; on the other hand, even if we
add these nativesdk packages, they are still not useful because we we need
runqemu to run correctly.

So we don't remove these native qemu dependencies.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopopulate_sdk_ext: consider custom configuration in local.conf
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:23 +0000 (13:42 +0100)]
populate_sdk_ext: consider custom configuration in local.conf

Copy the contents of local.conf under TOPDIR into the final generated
local.conf. In this way, custom settings are also made into the final
local.conf like IMAGE_INSTALL, DISTRO_FEATURES, VIRTUAL-RUNTIME_xxx,
etc. Comments and blank lines are filtered out.

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

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

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

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

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

[YOCTO #7616]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocopy_buildsystem: make sure bitbake directory is copied
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:22 +0000 (13:42 +0100)]
copy_buildsystem: make sure bitbake directory is copied

The previous code assumes that bitbake/ directory is under the core layer.
This is the case for Yocto project. But users might clone oe-core and bitbake
separately. So we use bb.__file__ to locate the bitbake directory to make sure
it's copied into the extensible SDK.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopopulate_sdk_ext: install the latest buildtools-tarball
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:21 +0000 (13:42 +0100)]
populate_sdk_ext: install the latest buildtools-tarball

If we do `bitbake buildtools-tarball' and then after one day do `bitbake
core-image-minimal -c populate_sdk_ext', we would meet errors like below.

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

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

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

[YOCTO #7674]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoclasses/populate_sdk_ext: avoid poky-specific buildtools naming
Paul Eggleton [Mon, 7 Sep 2015 12:42:20 +0000 (13:42 +0100)]
classes/populate_sdk_ext: avoid poky-specific buildtools naming

Only poky sets SDK_NAME to include ${IMAGE_BASENAME} (i.e. ${PN}), so we
can't assume the buildtools filename will include it here. Change it to
look for a file with "buildtools-nativesdk-standalone" in the name
(the buildtools-tarball recipe itself sets TOOLCHAIN_OUTPUTNAME to
include this.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoolchain-shar-extract.sh: explain why we cannot use sudo in extensible SDK
Brendan Le Foll [Mon, 7 Sep 2015 12:42:19 +0000 (13:42 +0100)]
toolchain-shar-extract.sh: explain why we cannot use sudo in extensible SDK

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoolchain-shar-extract.sh: better default install path for extensible SDK
Brendan Le Foll [Mon, 7 Sep 2015 12:42:18 +0000 (13:42 +0100)]
toolchain-shar-extract.sh: better default install path for extensible SDK

Extensible SDK cannot be installed as root so by default offer to install it in
user's home directory under distro/distro_version replacing the normal SDK
version '+' char with a '_' as that's a restricted character for bitbake

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoolchain-shar-extract.sh: ensure extensible SDK install path obeys restrictions
Brendan Le Foll [Mon, 7 Sep 2015 12:42:17 +0000 (13:42 +0100)]
toolchain-shar-extract.sh: ensure extensible SDK install path obeys restrictions

There are some characters that cannot appear in the installation path, so we
need to check for these

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotestimage: handle SIGTERM to conclude runqemu
Mariano Lopez [Sat, 5 Sep 2015 10:17:26 +0000 (10:17 +0000)]
testimage: handle SIGTERM to conclude runqemu

In the current state if a SIGTERM is sent to
the testimage worker, the worker will exit but
runqemu and qemu won't exit and the processes
need to be killed manually to free the
bitbake lock.

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

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

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

[YOCTO #8239]

Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopostinst_intercept: allow to pass variables with spaces
Martin Jansa [Fri, 4 Sep 2015 12:22:27 +0000 (14:22 +0200)]
postinst_intercept: allow to pass variables with spaces

* trying to pass foo="a b" through postinst_intercept ends
  with the actual script header to containing:
  b
  foo=a
  which fails because "b" command doesn't exist.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorootfs.py: Allow to override postinst-intercepts location
Martin Jansa [Fri, 4 Sep 2015 12:22:26 +0000 (14:22 +0200)]
rootfs.py: Allow to override postinst-intercepts location

* useful when we need to overlay/extend intercept scripts from oe-core

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopseudo_1.7.3.bb: New version of pseudo
Peter Seebach [Fri, 4 Sep 2015 22:16:27 +0000 (17:16 -0500)]
pseudo_1.7.3.bb: New version of pseudo

Pseudo 1.7 adds an experimental feature (which I think needs more testing
before it becomes the default) allowing the pseudo client to store modes
and uid/gid values in extended attributes rather than using the sqlite
database. On most Linux-like systems, this works only if the underlying
file is a plain file or a directory.

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

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

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

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

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

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

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosstate: implement basic signing/validation
Ross Burton [Thu, 3 Sep 2015 18:39:07 +0000 (19:39 +0100)]
sstate: implement basic signing/validation

To provide some element of integrity to sstate archives, allow sstate archives
to be GPG signed with a specified key (detached signature to a sidecar .sig
file), and verify the signatures when sstate archives are unpacked.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolibinput: avoid --enable-event-gui=auto
Joe Slater [Thu, 3 Sep 2015 21:08:02 +0000 (14:08 -0700)]
libinput: avoid --enable-event-gui=auto

Specify a value via PACKAGECONFIG[gui].  The default is
--diable-event-gui.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocross-canadian.bbclass: typo fix in comments (s/repsonsible/responsible/)
Mario Domenech Goulart [Thu, 3 Sep 2015 18:06:35 +0000 (15:06 -0300)]
cross-canadian.bbclass: typo fix in comments (s/repsonsible/responsible/)

Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoboot-directdisk.bbclass: use rootfs UUID by default
Patrick Ohly [Thu, 3 Sep 2015 18:42:33 +0000 (20:42 +0200)]
boot-directdisk.bbclass: use rootfs UUID by default

This changes the default SYSLINUX_ROOTFS such that the rootfs is no
longer expected under a fixed device path. Instead, the UUID is used
to find it. This makes the resulting .hdddirect (and thus also the
vdi/vdmk/qcow2 images derived from that) more flexible.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoboot loader: support root=UUID
Patrick Ohly [Thu, 3 Sep 2015 18:42:32 +0000 (20:42 +0200)]
boot loader: support root=UUID

As mentioned when introducing the VM images
(https://bugzilla.yoctoproject.org/show_bug.cgi?id=7374), the
resulting images only work when the image is mounted as a disk that
results in the hard-coded path (/dev/sda in the current
default). Using the file system UUID to find the rootfs is more
flexible.

To enable this for boot-direct.bbclass and thus image-vm.bbclass (aka
FSTYPEs vdi/vmdk/qcow2), set SYSLINUX_ROOT =
"root=UUID=<<uuid-of-rootfs>>". The rootfs image must use an ext file
system.

The special string will get replaced in the APPEND line with the
actual UUID when the boot loader (grub-efi, syslinux or gummiboot)
writes the boot loader configuration files. At that time, the rootfs
image has already been created and its UUID can be extracted using
"tune2fs -l", which also should be available because the
e2fsprogs-native tools were needed to create the image in the first
place.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoimage-vm.bbclass: support specifying an initramfs
Patrick Ohly [Thu, 3 Sep 2015 18:42:31 +0000 (20:42 +0200)]
image-vm.bbclass: support specifying an initramfs

Set INITRD_IMAGE to automatically add a custom initramfs to the boot
partition.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoimage-vm.bbclass: avoid duplicating syslinux default values
Patrick Ohly [Thu, 3 Sep 2015 18:42:30 +0000 (20:42 +0200)]
image-vm.bbclass: avoid duplicating syslinux default values

Some of the SYSLINUX defaults are the same as in the underlying
syslinux.bbclass. Let's not duplicate them, because that makes
changing the default harder.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoinitramfs-framework: handle kernel parameters with . inside
Patrick Ohly [Thu, 3 Sep 2015 18:42:29 +0000 (20:42 +0200)]
initramfs-framework: handle kernel parameters with . inside

Kernel parameters like "uvesafb.mode_option=640x480-32" were turned
into shell variables named "bootparam_uvesafb.mode_option", which
triggered errors from the shell because the name is not valid. Now
points get replaced with underscores, leading to
bootparam_uvesafb_mode_option in this example.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoinitramfs-live-boot: create /dev/console
Patrick Ohly [Thu, 3 Sep 2015 18:42:28 +0000 (20:42 +0200)]
initramfs-live-boot: create /dev/console

Some kernels, for example linux-yocto 3.19 for qemux86, fail to
execute /init in an initramfs unless there is already a /dev/console
char device in the initramfs. Booting then fails with:
    Kernel panic - not syncing: /dev/console is missing or not a character device!
    Please ensure your rootfs is properly configured

The panic itself comes from a linux-yocto specific patch to
kernel_init_freeable in init/main.c, but even without it, that
function will print an error when /dev/console is missing. The
kernel's Documentation/initrd.txt also mentions creating that device.

It remained unclear why this is not a problem on other machines. On
intel-corei7-64 from meta-intel, something (the kernel?) creates
/dev/console and /dev/[012] before transfering control to the init
script. In that case, creating /dev/console in advance is not
necessary, but does not cause any problem either.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoinitramfs-framework: create /dev/console
Patrick Ohly [Thu, 3 Sep 2015 18:42:27 +0000 (20:42 +0200)]
initramfs-framework: create /dev/console

Some kernels, for example linux-yocto 3.19 for qemux86, fail to
execute /init in an initramfs unless there is already a /dev/console
char device in the initramfs. Booting then fails with:
    Kernel panic - not syncing: /dev/console is missing or not a character device!
    Please ensure your rootfs is properly configured

The panic itself comes from a linux-yocto specific patch to
kernel_init_freeable in init/main.c, but even without it, that
function will print an error when /dev/console is missing. The
kernel's Documentation/initrd.txt also mentions creating that device.

It remained unclear why this is not a problem on other machines. On
intel-corei7-64 from meta-intel, something (the kernel?) creates
/dev/console and /dev/[012] before transfering control to the init
script. In that case, creating /dev/console in advance is not
necessary, but does not cause any problem either.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunqemu: support full-disk images
Patrick Ohly [Thu, 3 Sep 2015 18:42:26 +0000 (20:42 +0200)]
runqemu: support full-disk images

This makes it possible to boot images with multiple partitions (the
ones ending in .hddimg or .hdddirect) in several ways:
   runqemu qemux86 core-image-minimal hddimg
   runqemu tmp/deploy/images/qemux86/core-image-minimal-qemux86.hddimg
   VM=tmp-glibc/deploy/images/qemux86/iot-os-image-qemux86.hddimg FSTYPE=hddimg runqemu

Same for hdddirect.

This is useful for testing initramfs scripts, secure boot (when
switching to UEFI), or boot loaders like syslinux. For testing the
content of the rootfs, the ext4 image is better because that approach
is faster (no need to create another large image during build, rootfs
can be read directly instead of reading boot.img through loop device).

When booting a live image, the kernel, initramfs (if any) and kernel
parameters are taken from the image by the virtual machine's BIOS, so any
additional kernel parameters given to runqemu are ignored. This can be
avoided (already without this change) in a slightly hacky runqemu setup:
   ROOTFS=tmp/deploy/images/qemux86/core-image-minimal-qemux86.hddimg \
   FSTYPE=ext4 \
   KERNEL=tmp/deploy/images/qemux86/bzImage-initramfs-qemux86.bin \
   MACHINE=qemux86 \
   runqemu serial kvm nographic 'bootparams=root=/dev/ram0'

The additional bzImage-initramfs-qemux86.bin kernel here was created
by adding this to local.conf:
   INITRAMFS_IMAGE = "core-image-minimal-initramfs"
   INITRAMFS_IMAGE_BUNDLE = "1"

In the code, the new FSTYPE=hddimg resp. hdddirect behaves almost
exactly like the older vmdk FSTYPE. New types were chosen because it
seemed cleaner than using FSTYPE=vmdk when the actual image pointed to
by VM is not in that format. The downside is that several checks for
FSTYPE=vmdk had to be duplicated for FSTYPE=hddimg.

The VM variable now gets interpreted as "virtual machine disk image"
instead of "vmdk image".

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooprofileui: Use inherit gettext
Saul Wold [Thu, 3 Sep 2015 20:20:35 +0000 (13:20 -0700)]
oprofileui: Use inherit gettext

oprofileui uses gettext during the configuration task so should be inherit
gettext. This issue appears when an older version of gettext is used do to
pinning to the older non-gplv3 version.

[YOCTO #7795]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/decorators: Fixed a problem with tests having the same names.
Lucian Musat [Fri, 4 Sep 2015 13:48:29 +0000 (16:48 +0300)]
oeqa/decorators: Fixed a problem with tests having the same names.

When two or more tests had the same name but different classes then
the decorator log whould have the output all wrong. This was because
a comparison which was made only between method names but now it
compares classes too.

[YOCTO #8029]

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolibunique: remove the recipe
Alexander Kanavin [Thu, 3 Sep 2015 15:34:14 +0000 (18:34 +0300)]
libunique: remove the recipe

It is not used by anything in oe-core and will be moved to meta-oe

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoreport-error: send only last 5242000 characters in error logs
Martin Jansa [Fri, 4 Sep 2015 12:22:09 +0000 (14:22 +0200)]
report-error: send only last 5242000 characters in error logs

* otherwise whole build report submission is rejected because it's too big

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoprocps: fix for base_sbindir == sbindir
Joshua Lock [Fri, 4 Sep 2015 14:59:46 +0000 (15:59 +0100)]
procps: fix for base_sbindir == sbindir

An rmdir call in do_install_append was trying to remove the
sbindir, however in a system with a merged usr this directory
is not empty and therefore failing to rm it causes an ERROR.

Instead check that sbindir != base_sbindir before trying to
remove the directory.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agonfs-utils: don't force use of /sbin as sbindir
Joshua Lock [Fri, 4 Sep 2015 14:59:45 +0000 (15:59 +0100)]
nfs-utils: don't force use of /sbin as sbindir

The Makefile for mount and osd_login utilities forces
/sbin as asbindir, however on a merged /usr system this directory
might not exist. Instead sed in the system sbindir.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopcmciautils: handle udev dir being 2 levels below /
Joshua Lock [Fri, 4 Sep 2015 14:59:44 +0000 (15:59 +0100)]
pcmciautils: handle udev dir being 2 levels below /

When building with a merged /usr dir the udev directory
lives at /usr/lib/udev - update the FILES pattern to also
pick up udev files installed two levels below the / to
ensure a merged /usr works.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobluez: handle udev dir being 2 levels below /
Joshua Lock [Fri, 4 Sep 2015 14:59:43 +0000 (15:59 +0100)]
bluez: handle udev dir being 2 levels below /

When building with a merged /usr dir the udev directory
lives at /usr/lib/udev - update the FILES pattern to also
pick up udev files installed two levels below the / to
ensure a merged /usr works.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopulseaudio: handle udev dir being 2 levels below /
Joshua Lock [Fri, 4 Sep 2015 14:59:42 +0000 (15:59 +0100)]
pulseaudio: handle udev dir being 2 levels below /

When building with a merged /usr dir the udev directory
lives at /usr/lib/udev - update the FILES pattern to also
pick up udev files installed two levels below the / to
ensure a merged /usr works.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoalsa-utils: handle udev dir being 2 levels below /
Joshua Lock [Fri, 4 Sep 2015 14:59:41 +0000 (15:59 +0100)]
alsa-utils: handle udev dir being 2 levels below /

When building with a merged /usr dir the udev directory
lives at /usr/lib/udev - update the FILES pattern to also
pick up udev files installed two levels below the / to
ensure a merged /usr works.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosystemd: remove hard-coded paths in FILES entries
Joshua Lock [Fri, 4 Sep 2015 14:59:40 +0000 (15:59 +0100)]
systemd: remove hard-coded paths in FILES entries

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobusybox: fixes for when base_bindir != /bin
Joshua Lock [Fri, 4 Sep 2015 14:59:39 +0000 (15:59 +0100)]
busybox: fixes for when base_bindir != /bin

* Replace all hard-coded paths with variables
* Run sed over busybox.links.* to replace /bin with ${base_bindir}

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa: Test failure/cleanup improvements
Richard Purdie [Fri, 4 Sep 2015 15:59:38 +0000 (16:59 +0100)]
oeqa: Test failure/cleanup improvements

Currently, if qemu segfaults, the tests merrily continue trying to execute
which takes time for them to timeout and is a bit silly. Worse, no logs about
the segfault are shown to the user, its silent!

This patch tries to unravel the tangled web of issues and ensures that we:

* install a SIGCHLD handler which tells the user qemu exited
* check if qemu is running, if it isn't fail the test outright
* don't leave processes behind in sshcontrol which would hold
  bitbake.lock and block shutdown

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotcmode-default: Set gcc 5.2 as the default
Richard Purdie [Fri, 4 Sep 2015 15:27:41 +0000 (16:27 +0100)]
tcmode-default: Set gcc 5.2 as the default

gcc 5.X is now working in all the places we test it in, its been in
testing for quite some time. Time to make it the default (we have some
room in M4 for any other bugfixes). Its easy to switch back to 4.9, we
should really remove 4.8 at this point (to meta-oe?).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoqemu: Fix qemu_cpu_kick_thread on init
Aníbal Limón [Thu, 3 Sep 2015 20:03:30 +0000 (15:03 -0500)]
qemu: Fix qemu_cpu_kick_thread on init

When QEMU starts the RCU thread executes qemu_mutex_lock_thread
causing error "qemu:qemu_cpu_kick_thread: No such process" and exits.

For detail explanation see upstream patch.

[YOCTO #8143]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopackage_regex.inc: various updates to improve RRS accuracy
Alexander Kanavin [Thu, 3 Sep 2015 15:34:21 +0000 (18:34 +0300)]
package_regex.inc: various updates to improve RRS accuracy

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agovte: add RECIPE_NO_UPDATE_REASON
Alexander Kanavin [Thu, 3 Sep 2015 15:34:20 +0000 (18:34 +0300)]
vte: add RECIPE_NO_UPDATE_REASON

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoremake: update to 4.1+dbg-1.1
Alexander Kanavin [Thu, 3 Sep 2015 15:34:18 +0000 (18:34 +0300)]
remake: update to 4.1+dbg-1.1

remake-remove-errors-about-colophon-and-cygnus-comma.patch has been merged upstream

inherit pkgconfig has been added because m4 macros defined by pkgconfig are now used
in configure.ac

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopython-smmap: update to 0.9.0
Alexander Kanavin [Thu, 3 Sep 2015 15:34:17 +0000 (18:34 +0300)]
python-smmap: update to 0.9.0

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopython-async: update to 0.6.2
Alexander Kanavin [Thu, 3 Sep 2015 15:34:16 +0000 (18:34 +0300)]
python-async: update to 0.6.2

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agomkelfimage: add RECIPE_NO_UPDATE_REASON
Alexander Kanavin [Thu, 3 Sep 2015 15:34:15 +0000 (18:34 +0300)]
mkelfimage: add RECIPE_NO_UPDATE_REASON

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agonet-tools: update to 1.60-25
Alexander Kanavin [Thu, 3 Sep 2015 15:34:12 +0000 (18:34 +0300)]
net-tools: update to 1.60-25

This means fetching a newer Debian patchset which adds a few
bug/security fixes.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agomailx: update to 12.5-5
Alexander Kanavin [Thu, 3 Sep 2015 15:34:11 +0000 (18:34 +0300)]
mailx: update to 12.5-5

This means adding new patches from Debian[1] and tweaking build options
that were previously set by patching Makefile.

[1] ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoccache: update to 3.2.3
Alexander Kanavin [Thu, 3 Sep 2015 15:34:10 +0000 (18:34 +0300)]
ccache: update to 3.2.3

The LICENSE checksum has changed because of updated copyright years.

SRC_URI has been changed to git, because upstream tarball is broken
(includes configure.ac but not .m4 files it depends on).

Add a backported patch that fixes builds with older versions of make
and external zlib.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotestimage: filter proper test cases by tags
zjh [Wed, 2 Sep 2015 07:39:54 +0000 (15:39 +0800)]
testimage: filter proper test cases by tags

If a test case is decorate by oeqa.utils.decorators.tag, this case will
by add a tag, testrunner will filter these tags by TEST_SUITES_TAGS
[YOCTO #7849]

Signed-off-by: zjh <junhuix.zhang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agogcc-target.inc: Remove non-related gcc headers from include_fixed folder
Leonardo Sandoval [Wed, 1 Jul 2015 12:57:48 +0000 (12:57 +0000)]
gcc-target.inc: Remove non-related gcc headers from include_fixed folder

Without this patch, the D's include_fixed folder may change after building it
(due to the gcc's fixinc.sh script, executed on the do_compile task) and changes
depend on the current sysroot headers, making the gcc's builds non-deterministic.

[YOCTO #7882]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: run kernel dependencies
Markus Lehtonen [Wed, 26 Aug 2015 14:13:46 +0000 (17:13 +0300)]
devtool: run kernel dependencies

The kernel package needs "kern-tools-native" in order for it's
do_kernel_metadata. Thus, devtool extract for kernel in a pristine
environment fails. With the current bb.tinfoil implementation it is not
possible to run arbitrary bitbake commands - e.g. run
"bitbake kern-tools-native -c populate_sysroot" in our case. This patch
implements an ugly workaround for that problem, basically by hardcoding
this dependency and running the required bitbake task(s) before tinfoil
is initialized.

[YOCTO #6658]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agodevtool: extract: correct initial rev for kernel packages
Markus Lehtonen [Wed, 26 Aug 2015 12:29:41 +0000 (15:29 +0300)]
devtool: extract: correct initial rev for kernel packages

Change handling of kernel packages so that the "initial rev" is parsed
correctly. Also, the devtool-specific git tags (devtool-base and
devtoo-patched) are now generated for kernel packages as well.

[YOCTO #6658]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agodevtool: make required tasks be run in kernel build
Markus Lehtonen [Tue, 18 Aug 2015 14:13:12 +0000 (17:13 +0300)]
devtool: make required tasks be run in kernel build

Set SRCTREECOVEREDTASKS appropriately in the workspace .bbappend file
for kernel recipes. This tries to ensure that all needed tasks (esp.
configure and patch) are run when building the kernel - tasks which
would normally be disabled by externalsrc.bbclass.

[YOCTO #6658]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agoifupdown: create alternative links
Joe Slater [Tue, 1 Sep 2015 21:34:30 +0000 (14:34 -0700)]
ifupdown: create alternative links

Inherit update-alternatives so links are created.  ifup
and ifdown are higher priority than the versions provided
by busybox.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoifupdown: import recipe
Joe Slater [Tue, 1 Sep 2015 21:34:29 +0000 (14:34 -0700)]
ifupdown: import recipe

Implements ifup and ifdown.

Copied from https://github.com/WindRiver-OpenSourceLabs/meta-overc.git
as of commit aa89eebffe06e4aa04701eae9691cb3049cbaef9.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolib/oe/package_manager: Include PACKAGE_FEED_PREFIX instead of hardcode paths
Leonardo Sandoval [Tue, 11 Aug 2015 21:09:28 +0000 (16:09 -0500)]
lib/oe/package_manager: Include PACKAGE_FEED_PREFIX instead of hardcode paths

Instead of hardcode paths (/rpm/, /ipk/, /deb/), use a user-defined prefix
when creating the URI feeds. URIs now will have the following syntax:

    PACKAGE_FEED_URIS_1/PACKAGE_FEED_PREFIX
    PACKAGE_FEED_URIS_2/PACKAGE_FEED_PREFIX
    .

where PACKAGE_FEED_URIS = "PACKAGE_FEED_URIS_1 PACKAGE_FEED_URIS_2 ...."

[YOCTO #5407]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolibunwind: Security Advisory - libunwind - CVE-2015-3239
Li Zhou [Wed, 2 Sep 2015 03:03:39 +0000 (11:03 +0800)]
libunwind: Security Advisory - libunwind - CVE-2015-3239

libunwind: Invalid dwarf opcodes can cause references beyond the end of
the array

Off-by-one error in the dwarf_to_unw_regnum function in include/dwarf_i.h
 in libunwind 1.1 allows local users to have unspecified impact via
invalid dwarf opcodes.

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosdk.py: fix conflicts of packages
Jian Liu [Tue, 25 Aug 2015 08:29:01 +0000 (16:29 +0800)]
sdk.py: fix conflicts of packages

If packages are conveyed to smart to install at the same time,
conflicts will not happen.
Try to install packages into sdk image at the same time.

This patch is not so perfect. For example,
  IMAGE_INSTALL += "lib32-ncurses"
  IMAGE_INSTALL += "ncurses-dev"
 ncurses-dev and lib32-ncurses-dev will have conflicts during packages installation.

Signed-off-by: Jian Liu <jian.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoimage.bbclass: add rootfs_check_host_user_contaminated
Christopher Larson [Tue, 1 Sep 2015 22:23:04 +0000 (15:23 -0700)]
image.bbclass: add rootfs_check_host_user_contaminated

This function is intended to be used in ROOTFS_POSTPROCESS_COMMAND, and checks
for any paths outside of /home which are owned by the user running bitbake.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoinsane.bbclass: add host-user-contaminated test
Christopher Larson [Tue, 1 Sep 2015 22:23:03 +0000 (15:23 -0700)]
insane.bbclass: add host-user-contaminated test

- Add a test which checks for any paths outside of /home which are owned by
  the user running bitbake.
- Add the test to WARN_QA by default.

This test has been in meta-mentor for some time, and in our ERROR_QA for our
builds, and has caught a number of issues for us.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoinsane.bbclass: handle tests which need fakeroot
Christopher Larson [Tue, 1 Sep 2015 22:23:02 +0000 (15:23 -0700)]
insane.bbclass: handle tests which need fakeroot

If any tests listed in FAKEROOT_QA are enabled (listed in ALL_QA), then
run do_package_qa under fakeroot.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobinutils: Fix symbols with --dynamic-list when using gold linker
Khem Raj [Wed, 2 Sep 2015 23:46:09 +0000 (23:46 +0000)]
binutils: Fix symbols with --dynamic-list when using gold linker

There are random crashes and hangups, seen in libQtCore (QT4) as mentioned
in the binutils bugs as well, the reason is that
gold ignores all other symbols except specified in --dynamic-list which
is different in behavior as compared to bfd linker. The patch is a
backport from upstream master. This patch implements the bfd linker's
behaviour into gold.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodebianutils: create package for run-parts
Joe Slater [Wed, 2 Sep 2015 22:24:20 +0000 (15:24 -0700)]
debianutils: create package for run-parts

Also add an RDEPENDS to dpkg so it will still
pull in run-parts.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoFix recursive mode -st on BUILDDIR setup
Alex Franco [Wed, 2 Sep 2015 22:45:57 +0000 (17:45 -0500)]
Fix recursive mode -st on BUILDDIR setup

Removing recursive option from chmod -st on BUILDDIR as it would
take very long on existing build directories

[YOCTO 7669]

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoqemu: enable alsa only if in DISTRO_FEATURES
Josep Puigdemont [Wed, 2 Sep 2015 14:55:59 +0000 (16:55 +0200)]
qemu: enable alsa only if in DISTRO_FEATURES

Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoqemurunner: Handle lack of data on run serial gracefully
Mariano Lopez [Wed, 2 Sep 2015 13:44:42 +0000 (13:44 +0000)]
qemurunner: Handle lack of data on run serial gracefully

This changes the behavior when data was not received over
the serial console when a command is run. With this the
socket is no longer closed but it throws and exception that
can handled in upper layers. With this the test can continue
without throwing errors for not having the socket anymore.

[YOCTO #8118]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoimage.py: rename _write_env -> _write_wic_env
Ed Bartosh [Wed, 2 Sep 2015 10:58:17 +0000 (13:58 +0300)]
image.py: rename _write_env -> _write_wic_env

Renamed this function as it's too generic name for it.
It writes variables, which are used by wic to .env file,
so _write_wic_env is better name for it.

Thanks Christopher Larson for poining out to this.

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

Made short variable names longer and more readable.

Fixed pylint warnings "Invalid variable name" and
"Invalid argument name".

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 listing properties
Ed Bartosh [Wed, 2 Sep 2015 10:58:15 +0000 (13:58 +0300)]
wic: get rid of listing properties

Functionality of listing and using properties of wic images
does not exist in the wic code. However, there are plenty of
help and usage content about it, which is very confusing.

Removed everything regarding image properties from wic codebase.

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

Renamed variables named as Python builtin functions.

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

Removed or reworked code with unused variables.

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

Fixed pylint warning:
Instance of 'ConfigMgr' has no 'create' member (no-member)

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

cmdln.py https://pypi.python.org/pypi/cmdln was used in
creator.py to parse image plugin options and arguments.

There is no need in such a sofisticated API to do this
simple task. Standard option parser optparse.OptionParser
can do it just fine.

Modified Creator class to work with option parser.
Removed cmdln.py from the wic codebase.

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

Fixed pylint warning:
More than one statement on a single line (multiple-statements)

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 wildcard imports
Ed Bartosh [Wed, 2 Sep 2015 10:58:09 +0000 (13:58 +0300)]
wic: get rid of wildcard imports

Used explicit imports in partitions.py and wicboot.py

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>