]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
9 years agodevtool: modify: make bitbake use local files from srctree
Markus Lehtonen [Tue, 21 Apr 2015 12:30:35 +0000 (15:30 +0300)]
devtool: modify: make bitbake use local files from srctree

This change makes it possible to have local files (non-remote SRC_URI
files, i.e. files that are located in the "recipe space") under the
srctree even if S!=WORKDIR. The files must be placed under the
'local-files' subdirectory.

Complements the previous patch that imports local files into srctree.

[YOCTO #7602]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agodevtool: better support for local source files
Markus Lehtonen [Thu, 23 Apr 2015 14:11:42 +0000 (17:11 +0300)]
devtool: better support for local source files

* extract: Copy all local source files (i.e.  non-compressed/non-arcived
  SRC_URI files that have file:// URI prefix) - excluding patches - to
  the srctree repository. The files will be placed in a subdirectory
  called 'oe-local-files'. The oe-local-files directory is not committed
  to the Git repository, but, marked to be ignored by a .gitignore file.
  The developer can manually add and commit the files to Git if the
  changes to them need to be tracked.

  Before this patch, local source files (were copied (and committed) to
  the srctree repository only in some special cases (basically when
  S=WORKDIR) when doing devtool-extract. For most of the packages local
  files were not copied at all.

* update-recipe: This patch causes the local files to be 'synced' from
  the srctree (i.e. from the 'oe-local-files' subdirectory) to the
  layer.  Being 'synced' means that in addition to copying modified
  files over the original sources, devtool will also handle removing and
  adding local source files and updating the recipe accordingly.  We
  don't want to create patches against the local source files but rather
  update them directly.  Thus, 'oe-local-file' directory is ignored in
  patch generation when doing update-recipe, even if committed to Git.
  This functionality is only enabled if the 'oe-local-files' directory
  is present in srctree.

[YOCTO #7602]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agodevtool: file mover function that creates target dir
Markus Lehtonen [Thu, 24 Sep 2015 10:03:34 +0000 (13:03 +0300)]
devtool: file mover function that creates target dir

Helper function for replacing a pattern like:
  target_dir = os.path.dirname(target)
  bb.utils.mkdirhier(target_dir)
  shutil.move(source, target)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agodevtool: update_recipe: refactor patch generation
Markus Lehtonen [Wed, 23 Sep 2015 12:58:07 +0000 (15:58 +0300)]
devtool: update_recipe: refactor patch generation

Implement new function that handles patch file generation. The new
function also does the discovery of new, updated and deleted patches.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agodevtool: update-recipe: add new patches in correct order
Markus Lehtonen [Wed, 23 Sep 2015 12:04:29 +0000 (15:04 +0300)]
devtool: update-recipe: add new patches in correct order

When adding multiple new patches append them to SRC_URI in correct order
so that they apply correctly.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agooe-selftest: devtool: add method for checking repo status
Markus Lehtonen [Wed, 23 Sep 2015 10:45:07 +0000 (13:45 +0300)]
oe-selftest: devtool: add method for checking repo status

New method for checking the status of the working tree of a repository.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agooe-selftest: devtool: add method for checking srctree repo
Markus Lehtonen [Fri, 29 May 2015 13:35:41 +0000 (16:35 +0300)]
oe-selftest: devtool: add method for checking srctree repo

Removes some code duplication.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agooe-selftest: devtool: add setup() method
Markus Lehtonen [Fri, 29 May 2015 13:03:41 +0000 (16:03 +0300)]
oe-selftest: devtool: add setup() method

In order to remove some code duplication.  The method currently only
does checking of workspace dir.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agooe.patch.GitApplyTree: add paths argument to extractPatches
Markus Lehtonen [Thu, 23 Apr 2015 12:41:04 +0000 (15:41 +0300)]
oe.patch.GitApplyTree: add paths argument to extractPatches

Makes it possible to define which paths are included in the patches.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agorecipeutils: implement get_recipe_local_files()
Markus Lehtonen [Thu, 23 Apr 2015 12:38:52 +0000 (15:38 +0300)]
recipeutils: implement get_recipe_local_files()

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
9 years agomultilib: Add TARGET_VENDOR to saved variables list
Richard Purdie [Fri, 31 Jul 2015 07:18:48 +0000 (07:18 +0000)]
multilib: Add TARGET_VENDOR to saved variables list

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/sdk/gcc: Fix makefile test
Richard Purdie [Sun, 27 Sep 2015 10:07:38 +0000 (11:07 +0100)]
oeqa/sdk/gcc: Fix makefile test

The makefile test was hardcoding a test for gcc. In the SDK context, we
need to use $(CC) to use the cross compiler.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agogdk-pixbuf: Only apply native cleaning in normal task, not setscene
Richard Purdie [Sat, 26 Sep 2015 17:12:17 +0000 (18:12 +0100)]
gdk-pixbuf: Only apply native cleaning in normal task, not setscene

The previous fix works well for normal tasks since the ordering is always
correct and gdk-pixbuf-native comes first. Setscene ordering is reversed
so we can't rely on this there. Remove the fix in that case since
it breaks more than it solves.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunqemu-export-rootfs: update location of unfsd binary
Maxin B. John [Thu, 24 Sep 2015 10:48:12 +0000 (13:48 +0300)]
runqemu-export-rootfs: update location of unfsd binary

Update the location of unfsd binary from "/usr/sbin" to "/usr/bin" in
runqemu-export-rootfs

[YOCTO #8315]

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agorunqemu: don't complain about conflicting machines if they are equal
Pascal Bach [Thu, 24 Sep 2015 16:10:05 +0000 (18:10 +0200)]
runqemu: don't complain about conflicting machines if they are equal

When the MACHINE variable was set as an environment variable, via
"export MACHINE=qemuarm" and runqemu was executed as "runqemu qemuarm"

The confusing error message appears:
Error: conflicting MACHINE types [qemuarm] and [qemuarm]

This checks if the two values are equal, in that case there is no problem
and execution can continue.

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agooeqa/testimage: Remove absolute path to oeqa from json
Lucian Musat [Thu, 24 Sep 2015 09:14:44 +0000 (12:14 +0300)]
oeqa/testimage: Remove absolute path to oeqa from json

In the json file the whole datastore is serialized which contains
absolute path to the oeqa folder. This breaks the functionality
when trying to run the tests from other machines.

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoiproute2: fix the configure process
Chen Qi [Thu, 24 Sep 2015 09:27:31 +0000 (17:27 +0800)]
iproute2: fix the configure process

Previously, the iproute2's configure script is actually run in the
do_compile stage. There's a Makefile rule 'all: Config' which makes
the configure process run to generate the Config file.

However, this makes it hard to fix the dependency problems. We need
to generate the Config file in the do_configure stage.

Add do_configure_append to separate the configure process from the
compile process.

Besides, explicitly disable ATM support for iproute2, otherwise we'll
sometimes meet errors like below when building.

  ld: cannot find -latm
  collect2: error: ld returned 1 exit status
  Makefile:154: recipe for target 'q_atm.so' failed
  make[1]: *** [q_atm.so] Error 1

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agogcc-multilib-config: Expand ccargs variable
Yuanjie Huang [Thu, 24 Sep 2015 06:17:16 +0000 (14:17 +0800)]
gcc-multilib-config: Expand ccargs variable

The ccargs obtained from get_tune_parameters may not be fully expanded,
so that the gcc_multilib_setup function can be confused, and generates
invalid MULTILIB_OPTIONS in GCC Makefile fragment, which will break the
multilib feature of target gcc.

To address problems above, this patch modifies gcc_multilib_setup
function to expand ccargs before use.

Upstream-Status: Inappropriate [configuration]

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoEmpty image: core-image-empty recipe
Alex Franco [Thu, 24 Sep 2015 15:23:15 +0000 (10:23 -0500)]
Empty image: core-image-empty recipe

Added core-image-empty recipe in meta-selftest/recipes-test/images

[YOCTO #7664]

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoEmpty image:rootfs.py:handle empty PACKAGE_INSTALL
Alex Franco [Thu, 24 Sep 2015 15:23:16 +0000 (10:23 -0500)]
Empty image:rootfs.py:handle empty PACKAGE_INSTALL

rootfs.py: added a test in DpkgOpkgRootfs which skips the
get package post installs step (get_pkgs_postinsts), when
PACKAGE_INSTALL is empty.

[YOCTO #7664]

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agogstreamer1.0-plugins-bad: change glimagesink rank to marginal
Alexander Kanavin [Thu, 24 Sep 2015 17:42:06 +0000 (20:42 +0300)]
gstreamer1.0-plugins-bad: change glimagesink rank to marginal

[YOCTO #7787]

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agolinux-yocto/4.1: rt update to 4.1.x-rt8
Bruce Ashfield [Thu, 24 Sep 2015 22:17:54 +0000 (18:17 -0400)]
linux-yocto/4.1: rt update to 4.1.x-rt8

The -rt build suffered the same breakage in master as the standard
kernel builds: due to a bad git history merge, existing patches were
dropped from branches.

This meant that we were missing the -rt changes, which re-introduced
some failures with linux-yocto-rt.

With these SRCREV updates, we have the latest 4.1.x-rt and all
architectures build.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agolinux-yocto/4.1: common-pc-drivers: add CONFIG_PATA_SCH
Bruce Ashfield [Thu, 24 Sep 2015 22:17:53 +0000 (18:17 -0400)]
linux-yocto/4.1: common-pc-drivers: add CONFIG_PATA_SCH

Updating the meta SRCREVs to integrate the following config change:

Author: Saul Wold <sgw@linux.intel.com>
Date:   Tue Sep 22 07:23:06 2015 -0700

    common-pc-drivers: add CONFIG_PATA_SCH

    The NUC uses this hardware and should still operate correctly with a
    genericx86

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoltp: replace 'inline' with 'static inline' for gcc 5.x
Kai Kang [Fri, 25 Sep 2015 04:30:39 +0000 (12:30 +0800)]
ltp: replace 'inline' with 'static inline' for gcc 5.x

gcc 5.x defaults to -std=gnu11 instead of -std=gnu89 which causes
semantics for inline functions changes.

The standalone 'inline' causes error with gcc 5 such as:

git/testcases/kernel/syscalls/kill/kill10.c:355: undefined reference to
`k_sigaction'

Replace inline with static inline to be compatible with both gcc 4 and 5.

Found and test with configure:
SELECTED_OPTIMIZATION="-O0  -fno-omit-frame-pointer -g -pipe"

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agowaffle: Fix build with musl
Khem Raj [Fri, 25 Sep 2015 04:59:17 +0000 (04:59 +0000)]
waffle: Fix build with musl

Backport needed patches for compilation fixes on musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agocups: fix pam configuration file's permission
Chen Qi [Fri, 25 Sep 2015 02:55:32 +0000 (10:55 +0800)]
cups: fix pam configuration file's permission

The files under /etc/pam.d should be 0644. The /etc/pam.d/cups file has
0444 after 'make install'. This patch fixes this problem.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agobusybox: Use CC instead of bare LD to be the Linker
Khem Raj [Fri, 25 Sep 2015 13:28:05 +0000 (13:28 +0000)]
busybox: Use CC instead of bare LD to be the Linker

This patch was on mailing list, another patch to make sure -r is not
passed directly but via -Wl switch is added.

This was exposed when using clang and gold linker, clang does not have
-r switch to do relocatable objects and problem happens specific to OE
becuase we use LD = CC

now what happens is that busybox assumes that linker will be called
directly, and hence sprinkles linkers options in its kbuild system which
aggregate into LDFLAGS, some of these options are happily ignored by gcc
as well but it passes -r options rightly to linker so it all works,
however when using clang, this falls apart since -r is not known option
for clang so it drops this option and all obects which should be
partially linked becomes ET_EXEC and when they are added to final link
then gold starts to get confused

/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-ld:
error: applets/built-in.o: unsupported ELF file type 2
clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agobusybox: Use UTMPX instead of legacy UTMP
Khem Raj [Fri, 25 Sep 2015 13:28:04 +0000 (13:28 +0000)]
busybox: Use UTMPX instead of legacy UTMP

This makes busybox honor UTMPX feature if available in a libc

[YOCTO #8243]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agodistrodata: handle recipes with empty or absent SRC_URI in checkpkg()
Alexander Kanavin [Fri, 25 Sep 2015 11:41:36 +0000 (14:41 +0300)]
distrodata: handle recipes with empty or absent SRC_URI in checkpkg()

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agorecipeutils.py: don't hardcode the upstream version as 1.0 when SRC_URI is empty...
Alexander Kanavin [Fri, 25 Sep 2015 11:41:37 +0000 (14:41 +0300)]
recipeutils.py: don't hardcode the upstream version as 1.0 when SRC_URI is empty or absent

Instead, simply return the version of the recipe, so that the upstream
version checker will declare that they match.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agooeqa/parselogs: Updated log parser whitelist.
Lucian Musat [Fri, 25 Sep 2015 11:31:20 +0000 (14:31 +0300)]
oeqa/parselogs: Updated log parser whitelist.

Added some fixes for meta-intel boards and moved some
errors from specific images to common.

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoconnman: Don't use a blanket "allow" D-Bus policy
Jussi Kukkonen [Fri, 25 Sep 2015 11:14:01 +0000 (14:14 +0300)]
connman: Don't use a blanket "allow" D-Bus policy

There are already "allow" rules for root and conditionally xuser to
send messages to connman: there should be no reason for a default
allow policy.

Also, conditionally add a policy to allow xuser to send to the
connman vpn service (similar to main service).

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoconnman: Depend on xuser-account unconditionally
Jussi Kukkonen [Fri, 25 Sep 2015 11:14:00 +0000 (14:14 +0300)]
connman: Depend on xuser-account unconditionally

This means dragging in xuser-account even when it's not used but
that's a lesser evil than the recipe depending on machine specific
settings.

This also prevents a warning on connman service startup when
ROOTLESS_X is not set:
  Unknown username "xuser" in message bus

[YOCTO #8005]

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agobyacc: add missing patch header
Ross Burton [Fri, 25 Sep 2015 13:35:43 +0000 (14:35 +0100)]
byacc: add missing patch header

9 years agosstate: run recipe-provided hooks outside of ${B}
Ross Burton [Thu, 24 Sep 2015 08:54:33 +0000 (09:54 +0100)]
sstate: run recipe-provided hooks outside of ${B}

To avoid races between the sstate tasks/hooks using ${B} as the cwd, and other
tasks such as cmake_do_configure which deletes and re-creates ${B}, ensure that
all sstate hooks are run in the right directory, and run the prefunc/postfunc in WORKDIR.

(From OE-Core rev: 1d3bde02641f4b40030cf7e305ee3d7c2faabe29)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/decorators: Add timestamp to decorator logs.
Lucian Musat [Thu, 24 Sep 2015 14:21:53 +0000 (17:21 +0300)]
oeqa/decorators: Add timestamp to decorator logs.

To avoid logs being overwriten when running the automated
tests multiple times, log files include timestamps in
their names and a link is created to point to the latest one.

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoimage types: add hdddirect
Patrick Ohly [Thu, 24 Sep 2015 14:53:10 +0000 (16:53 +0200)]
image types: add hdddirect

When image-vm.bbclass was introduced, it indirectly also introduced a
".hdddirect" image type based on boot-directdisk.bbclass. However, one
could only get that image when also enabling at least one of the
virtual machine images.

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

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agopackagegroup-core-standalone-sdk-target: ensure libatomic is in SDK
Ross Burton [Mon, 21 Sep 2015 19:34:16 +0000 (20:34 +0100)]
packagegroup-core-standalone-sdk-target: ensure libatomic is in SDK

Some architectures (such as MIPS) need libatomic from gcc-runtime to perform
atomic operations, so this package should be included in all SDKs.

[ YOCTO #8274 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoglibc/mmc-utils: Rename 'BRANCH' variable to 'SRCBRANCH' for clearness
Otavio Salvador [Thu, 17 Sep 2015 13:21:26 +0000 (10:21 -0300)]
glibc/mmc-utils: Rename 'BRANCH' variable to 'SRCBRANCH' for clearness

The 'BRANCH' variable name has no explicit relation with the
SRC_URI. Using 'SRCBRANCH' makes it more obvious and easier to
identify.

This patch makes the use consistent across the metadata.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agosanity.bbclass: show warning when chmod fails
Alex Franco [Wed, 23 Sep 2015 16:13:56 +0000 (18:13 +0200)]
sanity.bbclass: show warning when chmod fails

* for some reason this part of:
  http://patchwork.openembedded.org/patch/102561/
  wasn't ever merged.

[YOCTO #7669]

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agosystemd: apply persistent storage udev rules also for /dev/hd*
Patrick Ohly [Mon, 21 Sep 2015 14:30:10 +0000 (16:30 +0200)]
systemd: apply persistent storage udev rules also for /dev/hd*

This fixes booting with initramfs and root=UUID on machines with IDE
disks, like "runqemu hdddirect", and kernels which still use the
deprecated CONFIG_IDE.

v2: Rebased against current master-next.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agorpm: search for gpg if gpg2 is not found
Markus Lehtonen [Tue, 15 Sep 2015 12:29:55 +0000 (15:29 +0300)]
rpm: search for gpg if gpg2 is not found

Some (host) systems only have a binary named 'gpg' (e.g. Fedora) while
some only have 'gpg2' (Ubuntu) and others have both of them (openSUSE).
Currently the behavior of rpm-native with regards to GnuPG depends on
the host platform: rpm(-native) is configured to use GnuPG binary of the
host system if 'gpg2' is found in $PATH. Otherwise, rpm(-native) will
default to using '%{_bindir}/gpg2' which will be pointing to a sysroot
binary which usually does not exist.

This patch changes rpm to look for both 'gpg' and 'gpg2' when searching
for the GnuPG binary in PATH. This makes possible to create signed RPM
packages on different host platforms, using the GnuPG binary of the
host, without the need to explicitly define the gpg binary in bitbake
configuration (via GPG_BIN variable).

[YOCTO #8134]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoopenssl: Add mapping for nios2
Marek Vasut [Tue, 22 Sep 2015 00:05:49 +0000 (02:05 +0200)]
openssl: Add mapping for nios2

Map nios2 architecture to linux-generic32 target.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoqemurunner: Handle qemu start failure correctly
Richard Purdie [Sat, 26 Sep 2015 16:49:25 +0000 (17:49 +0100)]
qemurunner: Handle qemu start failure correctly

If qemu didn't start correctly, we may not have registered the child
signal. This results in a nasty traceback which confuses the underlying
issue. Cleanup this code and make the handler cleanup conditional.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agogcc-runtime: Add multilib C++ header mapping
Richard Purdie [Sat, 26 Sep 2015 16:47:39 +0000 (17:47 +0100)]
gcc-runtime: Add multilib C++ header mapping

The SDK was unable to find the C++ header pieces correctly since its
using a generic compiler, not one specifically targeting the multilib
vendor prefix. This adds in the right mapping to ensure multilib SDKs
work as expected. This fixes multilib SDK automated tests.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/oetest: Fix SDK command execution
Richard Purdie [Sat, 26 Sep 2015 16:46:53 +0000 (17:46 +0100)]
oeqa/oetest: Fix SDK command execution

The SDK environment wasn't being sourced when running these test
commands, meaning in some cases the cross compiler was being tested,
not the SDK tools. This is clearly not the intent so fix this by
ensuring the SDK environment is present. This fixes test failures
in multilib SDKs.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agomulitlib: Ensure SDKTARGETSYSROOT is set correctly
Richard Purdie [Sat, 26 Sep 2015 16:44:59 +0000 (17:44 +0100)]
mulitlib: Ensure SDKTARGETSYSROOT is set correctly

When building something like lib32-core-image-minimal -c populate_sdk, we
expect one sysroot with both multilibs installed. We therefore
need a single SDKTARGETSYSROOT value which doesn't change when multilibs
are enabled.

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

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agogtk-icon-cache/pixbufcache: don't set GDK_PIXBUF_MODULEDIR
Ross Burton [Fri, 25 Sep 2015 22:43:55 +0000 (23:43 +0100)]
gtk-icon-cache/pixbufcache: don't set GDK_PIXBUF_MODULEDIR

In normal use gdk-pixbuf knows where to find its own loaders and explicitly
stating this will cause work in the future if the ABI version changes.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolibrsvg: tell configure where gdk-pixbuf-query-loaders is
Ross Burton [Fri, 25 Sep 2015 22:25:13 +0000 (23:25 +0100)]
librsvg: tell configure where gdk-pixbuf-query-loaders is

Now that gdk-pixbuf-query-loaders isn't in the path, tell configure where to
find it.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agogdk-pixbuf: move gdk-pixbuf-query-loaders to $libdir for multilib safety
Ross Burton [Fri, 25 Sep 2015 22:25:12 +0000 (23:25 +0100)]
gdk-pixbuf: move gdk-pixbuf-query-loaders to $libdir for multilib safety

If for example gdk-pixbuf and lib32-gdk-pixbuf are in an image then only one
${bindir}/gdk-pixbuf-query-loaders will be installed, so only one variant will
actually be usable.

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

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agogdk-pixbuf: move gdk-pixbuf-pixdata to gdk-pixbuf-dev
Ross Burton [Fri, 25 Sep 2015 22:25:11 +0000 (23:25 +0100)]
gdk-pixbuf: move gdk-pixbuf-pixdata to gdk-pixbuf-dev

This is a development tool, similar to gdk-pixbuf-csource, so move it to the
-dev package.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agomultilib: Drop populate_sdk variable manipulation
Richard Purdie [Wed, 16 Sep 2015 02:04:12 +0000 (19:04 -0700)]
multilib: Drop populate_sdk variable manipulation

I believe this code dates from previous times when we didn't extend
the TOOLCHAIN_TARGET* variables to cover all multilibs. We now do
this so this code acutally breaks things by removing the non-multilib
variants.

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

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopackage_manager.py: make rpm install mutilib pkgs corectly
Robert Yang [Wed, 16 Sep 2015 02:04:11 +0000 (19:04 -0700)]
package_manager.py: make rpm install mutilib pkgs corectly

When configure multilib, "bitbake <image_bb> -c populate_sdk" should
install all arch toolchains (for example, 32 and 64bit), but rpm not
handle the multilib requires correctly, for example:
lib32-packagegroup-core-standalone-sdk-target requires lib32-libc6, rpm
may pull in libc6 rather than lib32-libc6, there are the similar issue
when:

IMAGE_INSTALL_append += "lib32-packagegroup-foo foo"

Use bitbake to expand the RDEPENDS will fix the problem since bitbake
knows mlprefix and handle it well, but rpm doesn't.

This patch only affects when:
IMAGE_INSTALL = "lib32-foo foo"
Doesn't affect:
IMAGE_INSTALL = "lib32-foo1 lib32-foo2"
Or:
IMAGE_INSTALL = "foo1 foo2"

[YOCTO #8089]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agogdk-pixbuf: Avoid rebuild failures
Richard Purdie [Wed, 23 Sep 2015 22:32:45 +0000 (23:32 +0100)]
gdk-pixbuf: Avoid rebuild failures

If gdkpixbuf-native rebuilds and there are stale (broken) modules lying around,
it can fail to run the postinst. E.g. svg links to harfbuzz and if harfbuzz is
removed from the sysroot but the svg loader isn't, we get a symbol linking issue.

The reproducer is along the lines of build gdk-pixbuf-native along
with harfbuzz-native and librsvg-native, then make a small change to the
gdk-pixbuf recipe that would cause it to rebuild, clean harfbuzz-native
and then build gdk-pixbuf.

To fix this, when we install gdk-pixbuf, we wipe out any previous loaders.
The idea is that gdk would always come first and anything else installing
itself will come later and rerun the postinst if needed. We can therefore
just remove any other loaders.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosystemd: fix tmpfiles location when multilib in use
Reinette Chatre [Wed, 23 Sep 2015 20:49:37 +0000 (13:49 -0700)]
systemd: fix tmpfiles location when multilib in use

Systemd's configuration files for creation, deletion and cleaning
of volatile and temporary files are installed in /usr/lib even when
multilib is in use (when /usr/lib64 is available). In this check the
systemd.conf file will not be found if libdir is /usr/lib64 so we fix the
path to match this file's installation path to look for it in
${exec_prefix}/lib

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agop11-kit: configure without trust-paths
Kai Kang [Wed, 23 Sep 2015 09:04:37 +0000 (17:04 +0800)]
p11-kit: configure without trust-paths

Configure option --with-trust-paths is only used for test scripts
trust/test-extract which is not packaged by default. If the option is
not provided, it checks 4 files on build machine. If the files don't
exist, configure fails.

Add configure option '--without-trust-paths' to fix this issue.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooe-pkgdata-util: avoid returning skipped packages
Robert Yang [Wed, 16 Sep 2015 02:04:10 +0000 (19:04 -0700)]
oe-pkgdata-util: avoid returning skipped packages

The skipped packages may be pulled in by another package, for example,
when libc6-dbg is already installed and should be skipped, but it would
be pulled in by libsegfault, this patch fixes the issue.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoolchain-shar-extract.sh: remove checkbashism
Robert Yang [Wed, 16 Sep 2015 02:04:09 +0000 (19:04 -0700)]
toolchain-shar-extract.sh: remove checkbashism

Fixed when sh is bash:
$ sh ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-1.8+snapshot.sh
Poky (Yocto Project Reference Distro) SDK installer version 1.8+snapshot
===========================================================
./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-1.8+snapshot.sh: 77: read: Illegal option -e
You are about to install the SDK to "/opt/poky/1.8+snapshot". Proceed[Y/n]? ../SDK2
Installation aborted!

There is ony one bashism "read -e" in toolchain-shar-extract.sh, but
'-e' is useless here, so remove it and use /bin/sh.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoarchiver: stamp-base is dead, remove it
Richard Purdie [Wed, 23 Sep 2015 21:36:07 +0000 (22:36 +0100)]
archiver: stamp-base is dead, remove it

stamp-base was only ever used by the shared workdir code in gcc. This
turned out to be problematic and has been replaced by other approaches
which don't need specialist bitbake knowledge.

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

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

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agogcc-shared-source: Set empty SRC_URI
Richard Purdie [Wed, 23 Sep 2015 21:33:17 +0000 (22:33 +0100)]
gcc-shared-source: Set empty SRC_URI

gcc-source is the only gcc recipe meant to handle the fetch/unpack/patch
tasks, the other gcc recipes then depend on this.

This approach has been creating some confusion for tools like the archiver.
The simplest way to signal to these processes that there is no source
is to empty SRC_URI at the same time we disable the other tasks.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolibgcc.inc: package baremetal multilib libraries
Juro Bystricky [Mon, 21 Sep 2015 23:21:20 +0000 (16:21 -0700)]
libgcc.inc: package baremetal multilib libraries

When building libgcc some files and libraries may be built but not packaged.
The original code packaged only some explicitly specified files targeting mostly x86.
This patch does not discriminate between various targets.
It fixes errors such as these:

ERROR: QA Issue: libgcc: Files/directories were installed but not shipped in any package:
  /usr/lib/arm-poky-eabi/4.9.3/thumb
  /usr/lib/arm-poky-eabi/4.9.3/fpu
  /usr/lib/arm-poky-eabi/4.9.3/thumb/libgcov.a
  /usr/lib/arm-poky-eabi/4.9.3/thumb/crtn.o
  /usr/lib/arm-poky-eabi/4.9.3/thumb/crtend.o
  /usr/lib/arm-poky-eabi/4.9.3/thumb/crtbegin.o
  /usr/lib/arm-poky-eabi/4.9.3/thumb/libgcc.a
  /usr/lib/arm-poky-eabi/4.9.3/thumb/crti.o
  /usr/lib/arm-poky-eabi/4.9.3/fpu/libgcov.a
  /usr/lib/arm-poky-eabi/4.9.3/fpu/crtn.o
  /usr/lib/arm-poky-eabi/4.9.3/fpu/crtend.o
  /usr/lib/arm-poky-eabi/4.9.3/fpu/crtbegin.o
  /usr/lib/arm-poky-eabi/4.9.3/fpu/libgcc.a
  /usr/lib/arm-poky-eabi/4.9.3/fpu/crti.o
Please set FILES such that these items are packaged. Alternatively if they are unneeded,
avoid installing them or delete them within do_install. [installed-vs-shipped]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agometa-selftest: add error recipe and error-image
brian avery [Mon, 21 Sep 2015 23:45:55 +0000 (16:45 -0700)]
meta-selftest: add error recipe and error-image

    * The error recipe throws an error during compile

    * The error-image includes the error recipe

    * Initial target is toaster selenium testing

Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolibksba: fix pkgconfig patch
Trevor Woerner [Tue, 22 Sep 2015 01:13:12 +0000 (21:13 -0400)]
libksba: fix pkgconfig patch

Add '$' to fix a patch which adds pkgconfig support to libksba.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosystemd: disable problematic GCC 5.2 optimizations
Jonathan Liu [Mon, 21 Sep 2015 17:56:29 +0000 (03:56 +1000)]
systemd: disable problematic GCC 5.2 optimizations

This fixes systemd failing to start on Raspberry Pi 2 if it is compiled
with GCC 5.2.

It would try to start "Journal Service" and "udev Kernel Device Manager"
but fail repeatedly.

[YOCTO #8291]

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoRevert "systemd: disable problematic GCC 5.2 optimizations"
Ross Burton [Tue, 22 Sep 2015 09:05:23 +0000 (10:05 +0100)]
Revert "systemd: disable problematic GCC 5.2 optimizations"

This reverts commit d347bd8b672fbd614a6267f640133cf399b9645f.

Accidentally merged v1 of this, revert so we can merge v2.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/selftest/archiver: Test that archiver filters on recipe name
Daniel Istrate [Tue, 22 Sep 2015 11:31:50 +0000 (14:31 +0300)]
oeqa/selftest/archiver: Test that archiver filters on recipe name

[YOCTO #6929] this test validates the feature introduced in bug 6929

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/utils/dump: Add default commands and directory
Mariano Lopez [Tue, 22 Sep 2015 11:14:15 +0000 (11:14 +0000)]
oeqa/utils/dump: Add default commands and directory

Currently if qemu fails when running a selftest and
tries to run some commands on the host it will fail
because some variables required by the Dumper class
do not exist because testimage was not included.

This change adds a default parent directory to save
the dumps for the host or target. Also adds default
commands to run if no commands were provided to the
class. With these changes the previous errors using
selftest don't show anymore.

[YOCTO #8306]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowebkitgtk: add REQUIRED_DISTRO_FEATURES
Martin Jansa [Mon, 21 Sep 2015 14:01:36 +0000 (16:01 +0200)]
webkitgtk: add REQUIRED_DISTRO_FEATURES

* original webkit-gtk_1.8.3.bb recipe already had this, I don't know
  why it was removed when upgrading to 2.8.5

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/runexported: Removed DEPLOY_DIR as mandatory.
Lucian Musat [Wed, 23 Sep 2015 15:40:26 +0000 (18:40 +0300)]
oeqa/runexported: Removed DEPLOY_DIR as mandatory.

We don't need DEPLOY_DIR for every runtime test so there is no
need for it to be mandatory.

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/oetest: Remove bb as requirement for oetest.
Lucian Musat [Wed, 23 Sep 2015 15:40:25 +0000 (18:40 +0300)]
oeqa/oetest: Remove bb as requirement for oetest.

In order for the test export runner to work oetest needs to be
separated from bitbake environment. There is no need to use bb
import here so we can use a logger instead.

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agogcc-5.2: disable isl
Richard Tollerton [Wed, 23 Sep 2015 14:36:03 +0000 (09:36 -0500)]
gcc-5.2: disable isl

We presently don't package isl. Unfortunately, if the host is already
using gcc-5.2 (as is presently the case on Arch Linux), configure will
autodetect the host's libisl, and do_compile will break because the
system isl headers aren't pulled in. In lieu of packaging isl, disable
it for now.

[YOCTO #8376]

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agokmod: Change SRCREV to fix return code in error path
Aníbal Limón [Wed, 23 Sep 2015 18:29:26 +0000 (13:29 -0500)]
kmod: Change SRCREV to fix return code in error path

Systemd is failing trying to load kdbus [1] because kmod have
an error in return code when try to insert module [2].

This change of SRCREV is a MINOR one only include the fix
described.

[YOCTO #8377]

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8377#c0
[2] http://lists.freedesktop.org/archives/systemd-devel/2015-July/033549.html

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/runtime/parselogs.py: Fix dmesg log retrieve in sato
Aníbal Limón [Wed, 23 Sep 2015 18:29:25 +0000 (13:29 -0500)]
oeqa/runtime/parselogs.py: Fix dmesg log retrieve in sato

Sato uses busybox that fails to write log using echo "" because
dmesg output can contain special characters.

[YOCTO #8377]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoinsane.bbclass: make package_qa_clean_path return a relative path
Robert Yang [Wed, 16 Sep 2015 02:28:48 +0000 (19:28 -0700)]
insane.bbclass: make package_qa_clean_path return a relative path

Make package_qa_clean_path() return something like "work/path/to/file"
rather than "/work/path/to/file", the relative path is a little clear.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: upgrade: use shutil.move instead of os.rename
Markus Lehtonen [Wed, 23 Sep 2015 10:05:25 +0000 (11:05 +0100)]
devtool: upgrade: use shutil.move instead of os.rename

Rename fails over filesystem boundaries.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: runqemu: avoid recipe parse
Paul Eggleton [Wed, 23 Sep 2015 10:05:24 +0000 (11:05 +0100)]
devtool: runqemu: avoid recipe parse

We only need the base configuration to get the variable values we want
to get here, there's no need to parse recipes / load the cache.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: second fix for running from a different directory
Markus Lehtonen [Wed, 23 Sep 2015 10:05:23 +0000 (11:05 +0100)]
devtool: second fix for running from a different directory

Do not change change current working directory permanently, but, only
for the duration of tinfoil initialization instead. The previous fix
caused very unintuitive behavior where using relative paths were solved
with respect to the builddir instead of the current working directory.
E.g. calling "devtool extract zlib ./zlib" would always create create
srctree in ${TOPDIR}/zlib, independent of the users cwd.

(From OE-Core rev: 4c7f159b0e17a0475a4a4e9dc4dd012e3d2e6a1f)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoguile: cleanup buildpaths and add RDEPENDS on pkgconfig
Jackie Huang [Wed, 23 Sep 2015 08:41:57 +0000 (16:41 +0800)]
guile: cleanup buildpaths and add RDEPENDS on pkgconfig

* fix the path for "define %pkg-config-program" in guile-config
* clean the --sysroot in guile-snarf
* add RDEPENDS on pkgconfig

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agogmp: Use __gnu_inline__ attribute in 4.2.1
Jussi Kukkonen [Wed, 23 Sep 2015 07:34:56 +0000 (10:34 +0300)]
gmp: Use __gnu_inline__ attribute in 4.2.1

gcc 5 defaults to C11 rules about "extern inline": this breaks
any code that includes gmp.h header from gmp 4.2.1 with 'multiple
definition' errors.

disable-stdc patch is no longer required because of this.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopseudo_1.7.4.bb: fix f*open()
Peter Seebach [Tue, 22 Sep 2015 22:59:10 +0000 (17:59 -0500)]
pseudo_1.7.4.bb: fix f*open()

The 0600 modes were coming from fopen/freopen/etc., because those
don't specify a filesystem mode (just an access mode like "r" or
"w"). Use 0666 & ~umask. (And then the PSEUDO_FS_MODE macro masks
in the 0600 bits we want to be sure are present.)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/utils/qemurunner.py: Remove duplicate message on LoggingThread start
Aníbal Limón [Tue, 22 Sep 2015 16:56:23 +0000 (11:56 -0500)]
oeqa/utils/qemurunner.py: Remove duplicate message on LoggingThread start

The Starting logging thread message is also executed on run() inside
LoggingThread class.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/utils/qemurunner.py: Fix HIGH CPU usage on LoggingThread
Aníbal Limón [Tue, 22 Sep 2015 16:56:22 +0000 (11:56 -0500)]
oeqa/utils/qemurunner.py: Fix HIGH CPU usage on LoggingThread

LoggingThread is used for receive console output from QEMU
over TCP, so add filter to only wake poll on read events,
also change the event mask variable name to be more descriptive.

This fixes HIGH CPU consume caused by wake on ready to write
events.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: add search command
Paul Eggleton [Tue, 22 Sep 2015 16:21:41 +0000 (17:21 +0100)]
devtool: add search command

Adds a subcommand to search to find the target recipe name providing
some file or capability. This is implemented by searching on recipe
name, package name, description, package contents (file names), and
runtime file provides. For example:

$ devtool search libGL
mesa

$ devtool search X11
xextproto
libxxf86vm
xf86driproto
xf86vidmodeproto
libxfixes
xproto
libx11
...

$ devtool search /bin/sed
busybox
sed

This is particularly useful within the extensible SDK but is also made
available in devtool alongside the build system.

Note of course that because this searches pkgdata, useful results depend
upon do_packagedata(_setscene) having executed for the recipe being
searched for.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: add basic means of running runqemu within the extensible SDK
Paul Eggleton [Tue, 22 Sep 2015 16:21:40 +0000 (17:21 +0100)]
devtool: add basic means of running runqemu within the extensible SDK

We ship the runqemu script and if we build QEMU itself within the
extensible SDK, then it would be nice to be able to run it. This is a
very thin wrapper around runqemu, supplying the machine and image name
so the user doesn't need to. (This subcommand is only available within
the extensible SDK since it only really makes sense there where it is
otherwise hard to run runqemu directly.)

Implements [YOCTO #6657].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool / recipetool: add handling for binary-only packages
Paul Eggleton [Tue, 22 Sep 2015 16:21:39 +0000 (17:21 +0100)]
devtool / recipetool: add handling for binary-only packages

Add a means of creating recipes for package files or archives that
contain a directory structure to be installed verbatim, for example an
rpm file. (We mostly just re-use bin_package here and skip some of the
normal build system checks.) This support is available in "recipetool
create" and "devtool add" which wraps the former.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: build-image: delete bbappend at end of build
Paul Eggleton [Tue, 22 Sep 2015 16:21:38 +0000 (17:21 +0100)]
devtool: build-image: delete bbappend at end of build

Upon further reflection, it seems to me that this bbappend ought to just
be deleted at the end of the build. This keeps things simple; you never
have to remember to delete any files to get back to where you were
before with the image. This means we can also drop the slightly awkward
message reminding the user how to do that. I've also updated the test to
look at the image manifest to determine if the command has worked
instead of looking for the (now deleted) bbappend.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: build-image: improve image recipe handling
Paul Eggleton [Tue, 22 Sep 2015 16:21:37 +0000 (17:21 +0100)]
devtool: build-image: improve image recipe handling

* Make image optional for the extensible SDK (auto-determine it based on
  the targets the SDK was built for)
* Check that specified recipe is in fact an image

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: build-image: tell user where to find output files
Paul Eggleton [Tue, 22 Sep 2015 16:21:36 +0000 (17:21 +0100)]
devtool: build-image: tell user where to find output files

If the user is running "devtool build-image" within the extensible SDK
then they probably won't know where to find the resulting output files,
so we should tell them explicitly.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: build-image: fix recipe/package terminology
Paul Eggleton [Tue, 22 Sep 2015 16:21:35 +0000 (17:21 +0100)]
devtool: build-image: fix recipe/package terminology

We build recipes and include packages into the image, adjust the
terminology used in code and messages accordingly. Also fix a few typos.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: add: move important "recipe created" message to the end
Paul Eggleton [Tue, 22 Sep 2015 16:21:34 +0000 (17:21 +0100)]
devtool: add: move important "recipe created" message to the end

If we end up printing a message about the build directory being the same
as the source, we should print that first and then print the message
about the recipe file possibly needing to be edited to the end so that
it has slightly more impact.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: add: set up fetched source as a git repository by default
Paul Eggleton [Tue, 22 Sep 2015 16:21:33 +0000 (17:21 +0100)]
devtool: add: set up fetched source as a git repository by default

If the fetched source isn't already a git repository, initialise it as
one and then branch and tag, just as we do with "devtool modify". This
makes it easier to make changes, commit them and then use the
"devtool update-recipe" command to turn those commits into patches
on the recipe.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: better handling for recipes that don't unpack source
Paul Eggleton [Tue, 22 Sep 2015 16:21:32 +0000 (17:21 +0100)]
devtool: better handling for recipes that don't unpack source

Some recipes don't extract any source (for example, opkg-keyrings). We
were producing a traceback in this case because we weren't checking if
the directory existed.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: fix extracting source for work-shared recipes
Paul Eggleton [Tue, 22 Sep 2015 16:21:31 +0000 (17:21 +0100)]
devtool: fix extracting source for work-shared recipes

Recipes that use work-shared (such as libgcc) are capable of unpacking
the source, but it doesn't necessarily unpack to ${WORKDIR}/${BP}. Use
the last part of the actual S value instead which is more likely to
work.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: show proper error when extracting source for recipes with disabled unpack...
Paul Eggleton [Tue, 22 Sep 2015 16:21:30 +0000 (17:21 +0100)]
devtool: show proper error when extracting source for recipes with disabled unpack task

If you try to use "devtool modify -x" or "devtool extract" on a recipe
where do_unpack has been set as noexec (e.g. glibc-locale), then we get
an error because the expected source wasn't ever unpacked. Do a check up
front for noexec being set on do_unpack and error out with a reasonable
message if that's the case.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorecipetool: create: fix handling of URIs containing #
Paul Eggleton [Tue, 22 Sep 2015 16:21:29 +0000 (17:21 +0100)]
recipetool: create: fix handling of URIs containing #

The # character in a URI denotes a fragment; we don't care about this
since it is never supposed to be sent to the server, so remove it from
the URI before actually trying to fetch it or use it in SRC_URI within
the recipe.

(This has come up because download links on pypi.python.org seem to have
a fragment containing the md5sum of the download; without stripping this
off the fetcher will choke on it.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorecipetool: create: fix creating empty shell functions
Paul Eggleton [Tue, 22 Sep 2015 16:21:28 +0000 (17:21 +0100)]
recipetool: create: fix creating empty shell functions

The shell considers empty functions to be a syntax error, so for
template shell functions that contain only comments (or no lines at all)
then add a : to act as a no-op which avoids the syntax error.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: add: properly handle separate build directory
Paul Eggleton [Tue, 22 Sep 2015 16:21:27 +0000 (17:21 +0100)]
devtool: add: properly handle separate build directory

When we were adding a recipe for software that would typically be built
in the same directory as the source, we were always using a separate
build directory unless the user explicitly specified not to, leading to
errors for software that doesn't expect to be built that way (such as
Python modules using distutils). Split out the code that makes this
determination automatically from the "devtool modify" and "devtool
upgrade" code and re-use that here so the behaviour is consistent.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool / lib/oe/recipeutils: ensure we can parse without bbappends
Paul Eggleton [Tue, 22 Sep 2015 16:21:26 +0000 (17:21 +0100)]
devtool / lib/oe/recipeutils: ensure we can parse without bbappends

These functions ostensibly allowed parsing a recipe without bbappends
but this clearly hadn't been tested because a variable was unassigned in
both of them in that case.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: add: ensure --color=never turns off recipetool colour output
Paul Eggleton [Tue, 22 Sep 2015 16:21:25 +0000 (17:21 +0100)]
devtool: add: ensure --color=never turns off recipetool colour output

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: check that source tree still exists
Paul Eggleton [Tue, 22 Sep 2015 16:21:24 +0000 (17:21 +0100)]
devtool: check that source tree still exists

Sometimes, particularly if you extracted the source to /tmp which is on
tmpfs, the external source tree that is being pointed to may no longer
exist when you come to run "devtool build" or "devtool update-recipe"
etc. Make all of the commands that need to check for a recipe being in
the workspace call a single function and have that function additionally
check the source tree still exists where appropriate.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>