]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
7 years agoattr: Fix build failure when image includes man-pages pkg
Mark Asselstine [Tue, 13 Jun 2017 20:26:45 +0000 (16:26 -0400)]
attr: Fix build failure when image includes man-pages pkg

If you attempt to build an image with both attr(-doc) and man-pages
packages your rootfs might fail to assemble. The error will be
something like:

Error: Transaction check error:
  file /usr/share/man/man2/fgetxattr.2 from install of \
    attr-doc-2.4.47-r0.core2_64 conflicts with file from \
    package man-pages-4.11-r0.core2_64

(the error is usually only seen on builders which don't have manpages
installed, if you have /usr/share/man/man1/man.1.gz your build will
complete but you will have duplicate manpages, just one zipped and one
not)

Backporting changes from upstream attr removes the conflicted files in
favour of those in the man-pages package.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoexternalsrc: verify that EXTERNALSRC/EXTERNALSRC_BUILD are absolute paths
Ross Burton [Tue, 13 Jun 2017 16:44:54 +0000 (17:44 +0100)]
externalsrc: verify that EXTERNALSRC/EXTERNALSRC_BUILD are absolute paths

If these are set to URLs then the errors produced are not helpful.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoadwaita-icon-theme: add a patch to speed up the do_install() task
Alexander Kanavin [Tue, 13 Jun 2017 15:41:40 +0000 (18:41 +0300)]
adwaita-icon-theme: add a patch to speed up the do_install() task

Goes down to 40 seconds from over 4 minutes :)

Note that there is no control over the amount of shell jobs; on my machine
this is not a problem, but if it's a problem on less capable hardware,
we can add some kind of limiter.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorunqemu: change terminal settings for valid tty's
Mikko Ylinen [Tue, 13 Jun 2017 15:39:09 +0000 (18:39 +0300)]
runqemu: change terminal settings for valid tty's

runqemu uses stty to change terminal settings to give users
better control to qemu. However, stty does not work when
runqemu is run directly or indirectly via oe-selftest in
a Docker container (presumably some problems with Docker's
pseudo-tty implementation).

The error reported is:
stty: 'standard input': Inappropriate ioctl for device

As runqemu recently moved to subprocess.check_call() for
stty calls we now get thrown an error and all runqemu
runs fail.

sys.stdin.isatty() does proper job in detecting if the stty
calls can work so we use that check before running the stty
subprocess operations.

Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agogrub: switch from ftp to https
Maxin B. John [Tue, 13 Jun 2017 14:29:53 +0000 (17:29 +0300)]
grub: switch from ftp to https

For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolibid3tag: switch from ftp to http
Maxin B. John [Tue, 13 Jun 2017 14:29:52 +0000 (17:29 +0300)]
libid3tag: switch from ftp to http

For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolibglu: switch from ftp to https
Maxin B. John [Tue, 13 Jun 2017 14:29:51 +0000 (17:29 +0300)]
libglu: switch from ftp to https

For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agomesa: switch from ftp to https
Maxin B. John [Tue, 13 Jun 2017 14:29:50 +0000 (17:29 +0300)]
mesa: switch from ftp to https

For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agomesa-demos: switch from ftp to https
Maxin B. John [Tue, 13 Jun 2017 14:29:49 +0000 (17:29 +0300)]
mesa-demos: switch from ftp to https

For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agodhcp: switch from ftp to http
Maxin B. John [Tue, 13 Jun 2017 14:29:48 +0000 (17:29 +0300)]
dhcp: switch from ftp to http

For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolibpcre: switch from ftp to https
Maxin B. John [Tue, 13 Jun 2017 14:29:47 +0000 (17:29 +0300)]
libpcre: switch from ftp to https

For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoimage.bbclass: fix setting of vardeps flag
Ed Bartosh [Wed, 14 Jun 2017 09:07:06 +0000 (12:07 +0300)]
image.bbclass: fix setting of vardeps flag

Added leading space to vardeps to avoid flag value to be
added to the existing value without a separator.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoimage.bbclass: improve setup of flags
Ed Bartosh [Wed, 14 Jun 2017 09:07:05 +0000 (12:07 +0300)]
image.bbclass: improve setup of flags

Replaced setVarFlag calls to appendVarFlag to allow
modification of prefuncs, postfuncs and subimages flags
in inherited image classes.

[YOCTO #11372]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoimage.bbclass: cleanup: add new variable "task"
Ed Bartosh [Wed, 14 Jun 2017 09:07:04 +0000 (12:07 +0300)]
image.bbclass: cleanup: add new variable "task"

Replaced repeated expression "do_image_%s" % t with
a variable 'task' to simplify the code and increase
readability.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agostaging.bbclass: fix typo
Chen Qi [Wed, 14 Jun 2017 06:20:12 +0000 (14:20 +0800)]
staging.bbclass: fix typo

The function is "sysroot_strip" instead of "split_and_strip_files".

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoconnman: correct the systemd boot in read only rootfs
Maxin B. John [Mon, 12 Jun 2017 15:10:22 +0000 (18:10 +0300)]
connman: correct the systemd boot in read only rootfs

connman fails to start in systemd based read-only images while creating links:

Jun 08 12:53:56 qemux86-64 systemd[1]: Starting Create Volatile Files
and Directories...
Jun 08 12:53:56 qemux86-64 systemd-tmpfiles[366]:
[[0;1;31msymlink(/var/run/connman/resolv.conf, /etc/resolv.conf) failed:
Read-only file system[[0m

Fix this failure and make connman co-exist with systemd-resolved.

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agosystemd: enable resolved and networkd
Maxin B. John [Mon, 12 Jun 2017 15:10:21 +0000 (18:10 +0300)]
systemd: enable resolved and networkd

Enable systemd-resolved and systemd-networkd by default.
Make it co-exist with connman and  Fix associated problems
in read-only rootfs.

Fixes [YOCTO #11331]

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoselftest/sstatetests: Fix potential failure on uniprocessor machines
Richard Purdie [Wed, 14 Jun 2017 10:55:45 +0000 (11:55 +0100)]
selftest/sstatetests: Fix potential failure on uniprocessor machines

It was pointed out +1 is safer than -1 for systems with one processor.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agogcc_7.1.bb: disable thumb on armv5t
Khem Raj [Sat, 10 Jun 2017 18:34:24 +0000 (11:34 -0700)]
gcc_7.1.bb: disable thumb on armv5t

It results in same link errors like armv4t

Signed-off-by: Khem Raj <raj.khem@gmail.com>
7 years agogcc: Add recipes for gcc-7
Khem Raj [Sat, 15 Apr 2017 01:10:45 +0000 (18:10 -0700)]
gcc: Add recipes for gcc-7

Switch default compiler to gcc 7

Signed-off-by: Khem Raj <raj.khem@gmail.com>
7 years agoovmf: Update to latest
Khem Raj [Sat, 10 Jun 2017 08:39:36 +0000 (01:39 -0700)]
ovmf: Update to latest

Fix build with gcc7

clang can not compile it therefore mark it gcc only recipe

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agouboot-config: check UBOOT_CONFIG variable, not flags, for error conditions
Denys Dmytriyenko [Mon, 12 Jun 2017 18:47:49 +0000 (14:47 -0400)]
uboot-config: check UBOOT_CONFIG variable, not flags, for error conditions

Sometimes there's a need to change existing UBOOT_CONFIG setting from a recipe,
distro or local config, such as an override or even switch back to UBOOT_MACHINE.
Unfortunately, there's no easy way to override or unset flags, so using them as
an error condition is rather heavy-handed. Change those conditions to check the
UBOOT_CONFIG variable itself, not its flags.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agosed: changes to support merged /usr
Amarnath Valluri [Tue, 13 Jun 2017 06:52:38 +0000 (09:52 +0300)]
sed: changes to support merged /usr

Few of the perl scripts referring '#!/bin/sed' inside the script. But when
'usrmerge' feature is enabled this path would be /usr/bin/sed. So to satisfy
build dependency add '/bin/sed' to it's providers list.

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobusybox: changes to support merged /usr
Amarnath Valluri [Tue, 13 Jun 2017 06:52:37 +0000 (09:52 +0300)]
busybox: changes to support merged /usr

Most of the shell scripts refer to /bin/sh inside the script. When 'usrmege'
feature is enabled, this path would be /usr/bin/sh. Hence, to satisfy build
dependency add '/bin/sh' to it's providers list.

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobash: changes to support merged /usr
Amarnath Valluri [Tue, 13 Jun 2017 06:52:36 +0000 (09:52 +0300)]
bash: changes to support merged /usr

Most of shell scripts refer to '#!/bin/{sh,bash}' inside the script. But when
'usrmege' feature is enabled this path will be /usr/bin/{sh, bash}.

so to satisify build dependency add '/bin/{sh,bash}' to its providers list.

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agogcc-cross-canadian: Use ${target_includedir} for compatibility with meta-micro
Mike Crowe [Tue, 16 May 2017 12:40:00 +0000 (13:40 +0100)]
gcc-cross-canadian: Use ${target_includedir} for compatibility with meta-micro

meta-micro puts headers in /include rather than /usr/include in the
sysroot. ${target_includedir} means that the correct path will be used
automatically.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Acked-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoselftest: add test_wic_rm test case
Ed Bartosh [Tue, 13 Jun 2017 11:22:14 +0000 (14:22 +0300)]
selftest: add test_wic_rm test case

Added test case for "wic rm" functionality.
    - remove file from vfat partition
    - remove directory from vfat partition

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: implement removing directories
Ed Bartosh [Tue, 13 Jun 2017 11:22:13 +0000 (14:22 +0300)]
wic: implement removing directories

Added support for removing directories using mdeltree
utility to Disk.del method

[YOCTO #11283]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: implement removing files
Ed Bartosh [Tue, 13 Jun 2017 11:22:12 +0000 (14:22 +0300)]
wic: implement removing files

Added implementation of Disk.del method and wic_r
function that removes files from the vfat partition
using mdel utility.

[YOCTO #11283]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: add 'wic rm' command
Ed Bartosh [Tue, 13 Jun 2017 11:22:11 +0000 (14:22 +0300)]
wic: add 'wic rm' command

Added empty 'wic rm' command that does nothing.
The functionality will be added by the next commits.

[YOCTO #11283]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: add help and usage content for 'wic rm'
Ed Bartosh [Tue, 13 Jun 2017 11:22:10 +0000 (14:22 +0300)]
wic: add help and usage content for 'wic rm'

Added wic_rm_help and wic_rm_usage variables to help.py.
These variables contain help content that will be used in
'wic rm help' and 'wic rm --help' output.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: add wic_init_parser_rm
Ed Bartosh [Tue, 13 Jun 2017 11:22:09 +0000 (14:22 +0300)]
wic: add wic_init_parser_rm

Add parser for 'wic rm' subcommand.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoselftest: add test_wic_cp test case
Ed Bartosh [Tue, 13 Jun 2017 11:22:08 +0000 (14:22 +0300)]
selftest: add test_wic_cp test case

Added test case for "wic cp" functionality.
     - copy file to vfat partition
     - copy directory to vfat partition

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: fully implement 'wic cp'
Ed Bartosh [Tue, 13 Jun 2017 11:22:07 +0000 (14:22 +0300)]
wic: fully implement 'wic cp'

Added implementation of Disk.copy method and wic_cp
function that copies files/directories to the vfat partition
of the partitioned image.

[YOCTO #11283]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: add Disk._put_part_image method
Ed Bartosh [Tue, 13 Jun 2017 11:22:06 +0000 (14:22 +0300)]
wic: add Disk._put_part_image method

This method copies partition image into the wic image.
It will be used in 'wic cp' and 'wic rm' subcommands
to copy changed partition back into wic image.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofilemap: calculate dst size correctly
Ed Bartosh [Tue, 13 Jun 2017 11:22:05 +0000 (14:22 +0300)]
filemap: calculate dst size correctly

Fixed calculation of the dst file size using skip, seek and
length parameters. Current code does it incorrectly which
causes sparse_copy API to create unnecessary big output files.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofilemap: check if dest is written for every block
Ed Bartosh [Tue, 13 Jun 2017 11:22:04 +0000 (14:22 +0300)]
filemap: check if dest is written for every block

If lenght parameter is provided to sparse_copy call
it's mandatory to check if the output file is fully
written after reading unmapped block from input file.

If it's not done then sparse_copy can write more data
than specified length.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofilemap: change signature of sparse_copy function
Ed Bartosh [Tue, 13 Jun 2017 11:22:03 +0000 (14:22 +0300)]
filemap: change signature of sparse_copy function

Renamed parameter offset->skip to match names of dd
parameters.

Changed affected sparse_copy calls.

Added explanation of the parameters to docstring.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: add mcopy property
Ed Bartosh [Tue, 13 Jun 2017 11:22:02 +0000 (14:22 +0300)]
wic: add mcopy property

Added property that points to the mcopy executable.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: add Disk._prop helper
Ed Bartosh [Tue, 13 Jun 2017 11:22:01 +0000 (14:22 +0300)]
wic: add Disk._prop helper

Added generic helper to use in property methods to
access commands in a lazy manner.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: add 'wic cp' command
Ed Bartosh [Tue, 13 Jun 2017 11:22:00 +0000 (14:22 +0300)]
wic: add 'wic cp' command

Added empty 'wic cp' command that does nothing.
The functionality will be added by the next commits.

[YOCTO #11283]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: add help and usage content for 'wic cp'
Ed Bartosh [Tue, 13 Jun 2017 11:21:59 +0000 (14:21 +0300)]
wic: add help and usage content for 'wic cp'

Added wic_cp_help and wic_cp_usage variables to
help.py. These variables contain help content that
will be used in 'wic cp help' and 'wic cp --help'
output.

[YOCTO #11283]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: add wic_init_parser_cp
Ed Bartosh [Tue, 13 Jun 2017 11:21:58 +0000 (14:21 +0300)]
wic: add wic_init_parser_cp

Add parser for 'wic cp' subcommand and a custom argument type.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoselftest: add new test case test_wic_ls
Ed Bartosh [Tue, 13 Jun 2017 11:21:57 +0000 (14:21 +0300)]
selftest: add new test case test_wic_ls

Tested 'wic ls' functionality:
 - list of image partitions
 - list of directory content of vfat partition

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoengine: implement listing wic images
Ed Bartosh [Tue, 13 Jun 2017 11:21:56 +0000 (14:21 +0300)]
engine: implement listing wic images

Implemented 'wic ls' functionality:
 - list image partitions
 - list directory content of vfat partitions

[YOCTO #11283]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: add 'wic ls' command
Ed Bartosh [Tue, 13 Jun 2017 11:21:55 +0000 (14:21 +0300)]
wic: add 'wic ls' command

Added empty 'wic ls' command that does nothing.
The functionality will be added by the next commits.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: add help and usage content for 'wic ls'
Ed Bartosh [Tue, 13 Jun 2017 11:21:54 +0000 (14:21 +0300)]
wic: add help and usage content for 'wic ls'

Added wic_ls_help and wic_ls_usage variables to
help.py. These variables contain help content that
will be used in 'wic ls help' and 'wic ls --help'
output.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agowic: add wic_init_parser_ls
Ed Bartosh [Tue, 13 Jun 2017 11:21:53 +0000 (14:21 +0300)]
wic: add wic_init_parser_ls

Added parser for 'wic ls' command.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobootimg-pcbios: make boot image file unique
Ed Bartosh [Tue, 13 Jun 2017 11:21:52 +0000 (14:21 +0300)]
bootimg-pcbios: make boot image file unique

Plugin code uses boot.img file name for an image file. If there are
two partitions that use bootimg-pcbios wic breaks with an error
"file already exists: boot.img"

Made image file name unique by adding wks like number to it to fix
the issue.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofilemap: add parameter 'length' to sparse_copy
Ed Bartosh [Tue, 13 Jun 2017 11:21:51 +0000 (14:21 +0300)]
filemap: add parameter 'length' to sparse_copy

Added parameter 'length' to specify amount of data
to write into destination file. This is useful when only
part of source file should be written into destination file.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofilemap: fix skip logic
Ed Bartosh [Tue, 13 Jun 2017 11:21:50 +0000 (14:21 +0300)]
filemap: fix skip logic

Fixed bug in processing 'skip' parameter:
   don't read input file if end of bmap block is less than skip

Simplified logic of positioning to the start of data inside a
partially skipped bmap block.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agomtools-native: disable reading host configs
Ed Bartosh [Tue, 13 Jun 2017 11:55:52 +0000 (14:55 +0300)]
mtools-native: disable reading host configs

Removed code that reads /etc/mtools.conf, /etc/default/mtools.conf,
/etc/mtools and /etc/default/mtools to ensure that mtools output
doesn't depend on the global host configs.

It's still possible to use ~/.mtoolsrc config or point MTOOLSRC
environment variable to any configuration file if user want
to configure mtools.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake.conf: Don't exclude MACHINE/MACHINEOVERRIDES from hashes
Richard Purdie [Tue, 13 Jun 2017 09:22:28 +0000 (10:22 +0100)]
bitbake.conf: Don't exclude MACHINE/MACHINEOVERRIDES from hashes

A long time ago (6 years), this seemed like a good idea. The reality is
that OVERRIDES should not be being added to hashes and if it is, it likely
needs excluding in its own right. This was a nice workaround but we need
to fix the real underlying issues now. In some cases this means excluding
OVERRIDES from the variables dependency using the vardepsexclude flag however
caution is needed to ensure this is safe.

Variable values used to construct hashes are unexpanded but the values used
are computed after the application of OVERRIDES. The important detail is if
the end resulting unexpanded value changes, not the value of the OVERRIDES
used in the construction of that unexpanded value. This is why dependencies
on OVERRIDES itself shouldn't be in the hashes in general.

The recent DISTRO_FEATURES changes adding in override mappings for them
highlighted this issue. We have some good sstate tests which are effective
at highlighting where potential issues arrive with OVERRIDES contamination
(oe-selftest -r sstatetests.SStateTests).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agosstatetests: Use higher parallelism value
Richard Purdie [Tue, 13 Jun 2017 09:21:46 +0000 (10:21 +0100)]
sstatetests: Use higher parallelism value

Since the processing code for signature generation is now threaded,
use higher thread values as examples in this code for better performance.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoutils: Exclude OVERRIDES from hashes in multilib functions
Richard Purdie [Tue, 13 Jun 2017 09:17:21 +0000 (10:17 +0100)]
utils: Exclude OVERRIDES from hashes in multilib functions

7 years agoinsane: Don't depend on OVERRIDES
Richard Purdie [Tue, 13 Jun 2017 09:14:15 +0000 (10:14 +0100)]
insane: Don't depend on OVERRIDES

In common with the other package handling functions, don't depend on the
value of OVERRIDES. This means when we change MACHINE, we don't have to
repackage everything.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoallarch: Append to vardepsexclude, not overwrite
Richard Purdie [Tue, 13 Jun 2017 09:09:29 +0000 (10:09 +0100)]
allarch: Append to vardepsexclude, not overwrite

These have values set elsewhere and this code was overwriting them leading
to odd signature issues. Append instead preserving the original values.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agooeqa/core/loader: Use full and small module name on filtering
Aníbal Limón [Mon, 12 Jun 2017 21:41:18 +0000 (16:41 -0500)]
oeqa/core/loader: Use full and small module name on filtering

The small module name was added to support run a whole suite that
has more that 3 levels in the test case name, but this broke the
behaviour for use a full test case name.

[YOCTO #11632]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agooeqa/core/runner: Don't log details twice if test fails
Aníbal Limón [Mon, 12 Jun 2017 21:41:17 +0000 (16:41 -0500)]
oeqa/core/runner: Don't log details twice if test fails

The details of a test failure is upper on the unittest output
so don't log twice the actual failure.

[YOCTO #11622]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoiproute2: Upgrade 4.10.0 -> 4.11.0
Changhyeok Bae [Mon, 12 Jun 2017 05:44:30 +0000 (05:44 +0000)]
iproute2: Upgrade 4.10.0 -> 4.11.0

0001-ip-Remove-unneed-header.patch is to fix build error
built with musl.

Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorpm: add explicit dependency on bzip2-replacement-native for native builds
Ming Liu [Mon, 12 Jun 2017 07:25:52 +0000 (09:25 +0200)]
rpm: add explicit dependency on bzip2-replacement-native for native builds

This fixes a following error:
| recipe-sysroot-native/usr/lib/rpm/debugedit: error while loading shared libraries: \
| libbz2.so.1: cannot open shared object file: No such file or directory

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agokexec-tools: Pass -no-pie to linker
Khem Raj [Mon, 12 Jun 2017 14:59:06 +0000 (07:59 -0700)]
kexec-tools: Pass -no-pie to linker

- This matches the linker flags to compiler flags in purgatory
- Compile arm64 without PIC

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agovalgrind: Fix ptest build with musl
Khem Raj [Mon, 12 Jun 2017 14:59:05 +0000 (07:59 -0700)]
valgrind: Fix ptest build with musl

musl unearthed a problem when building out of tree, config.h was being
used from $(srcdir) instead of generated config.h in $(builddir)
this assumed functions e.g. mallinfo() and more which are not in musl
as a result tests broke.

Also add fixes to build remaining tests when building on musl

pass -fno-pie as it cant use PIE especially in ptests/x86_64

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolibnsl2: Include stdint.h
Khem Raj [Mon, 12 Jun 2017 14:59:04 +0000 (07:59 -0700)]
libnsl2: Include stdint.h

uintptr_t is defined in stdint.h

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoltp: Include stdint.h for uintptr_t
Khem Raj [Mon, 12 Jun 2017 14:59:03 +0000 (07:59 -0700)]
ltp: Include stdint.h for uintptr_t

Fixes build with musl and upcoming glibc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobinutils-2.28: Update to latest on release branch
Khem Raj [Mon, 12 Jun 2017 14:59:02 +0000 (07:59 -0700)]
binutils-2.28: Update to latest on release branch

Drop patches to ChangeLog, they are in patch
header anyway

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agompg123: Upgrade to 1.25.0
Khem Raj [Mon, 12 Jun 2017 14:59:01 +0000 (07:59 -0700)]
mpg123: Upgrade to 1.25.0

No need to skip textrel QA for x86 as it has
been fixed in 1.25.0

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorpm: run binary package generation via thread pools
Alexander Kanavin [Mon, 12 Jun 2017 14:58:05 +0000 (17:58 +0300)]
rpm: run binary package generation via thread pools

This greatly reduces build times when there is a large amount of small
rpm packages to produce. The patches are rather invasive,
and so will be submitted upstream.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoRevert "package.bbclass: Restore functionality to detect RPM dependencies"
Richard Purdie [Mon, 12 Jun 2017 22:01:34 +0000 (23:01 +0100)]
Revert "package.bbclass: Restore functionality to detect RPM dependencies"

This reverts commit aea90e9ee6f34e7c1c08307080b1e29646668df6.

RP hadn't meant to merge this yet and its causing problems so delay it until its
ready.

7 years agopackage.bbclass: Restore functionality to detect RPM dependencies
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:35 +0000 (21:34 +0200)]
package.bbclass: Restore functionality to detect RPM dependencies

During the transition to dnf and rpm4, the functionality to
automatically make RPM determine dependencies was lost.

Before the transition, an OE specific tool called rpmdeps-oecore had
been added to the rpm suit. It was based on the rpmdeps tool that is
part of rpm. For each file specified on its command line, it would
output the provides and requires that RPM could determine.

During the transition to rpm4, rpmdeps-oecore was replaced with the
standard rpmdeps. However, what no one noticed was that unless rpmdeps
is given options, e.g., -P or -R, to tell it what it should output, it
will not output anything. Thus, it would do all the work to determine
the requirements, but would keep silent about it. And since no output
from rpmdeps is expected unless there are requirements, there were no
warnings indicating that everything was not working as expected.

Porting the old rpmdeps-oecore to work with rpm4 is not really
possible since it relied on being able to access internals of RPM that
are no longer available. However, it turned out that rpmdeps had a
debug option, --rpmfcdebug, that would output exactly the information
that we need, albeit in a different format and to stderr. To make this
usable, rpmdeps has now received a new option, --alldeps, which sends
the information we need to stdout.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorpm: Add a new option --alldeps to rpmdeps
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:34 +0000 (21:34 +0200)]
rpm: Add a new option --alldeps to rpmdeps

This will send the output from rpmfcPrint() to stdout. This is an
alternative to using the --rpmfcdebug option, which will send the same
output to stderr. The two options have totally different use cases
though. While --alldeps is used when the output from rpmfcPrint() is
what is wanted, --rpmfcdebug can be used together with the other
output options, e.g., --requires, without affecting their output.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agooeqa/sdk/cases: Fix skip of buildgcalculator test
Aníbal Limón [Fri, 9 Jun 2017 17:01:28 +0000 (12:01 -0500)]
oeqa/sdk/cases: Fix skip of buildgcalculator test

The tc.hasTargetPackage uses a re.search to see if gtk+3 is on
the manifest but + in regex means 1 or more causing the test
to be skipped.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agooeqa/sdk/cases: Added validation for SDK compatibility tests with eSDK
Francisco Pedraza [Fri, 9 Jun 2017 17:01:27 +0000 (12:01 -0500)]
oeqa/sdk/cases: Added validation for SDK compatibility tests with eSDK

The manifests for eSDK are generated using shared states so there is a
need to validate to different "packages names" into the test cases.

For example for perl:

SDK provides nativesdk-perl
eSDK provides perl-native

[YOCTO #9090]

Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agometa/classes/populate_sdk: Adds support for generating eSDK manifest files
Francisco Pedraza [Fri, 9 Jun 2017 17:01:26 +0000 (12:01 -0500)]
meta/classes/populate_sdk: Adds support for generating eSDK manifest files

Add get_extra_sdk_info to reuse code in buildhistory

The functionalities to generate SDK and eSDK manifest files are different,
the SDK comes from package information and the eSDK comes from sstate artifacts.
Only execute write_sdk_{host, target}_manifest when is on populate_sdk class.

Adds new functions write_sdk{host, target}_ext_manifest to execute on postprocess
in populate_sdk_ext because at the end we have all the sstate artifacts to
generate the manifest.

[YOCTO #9038]

Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolib/oe/sdk: Adds get_extra_sdk_info to reuse code in buildhistory
Francisco Pedraza [Fri, 9 Jun 2017 17:01:25 +0000 (12:01 -0500)]
lib/oe/sdk: Adds get_extra_sdk_info to reuse code in buildhistory

This function is going to be used for generating the target and host
manifest files packages for eSDK. Added some fixes for buildhistory.bblclass,
and docstring for get_extra_sdkinfo at oe.sdk

[YOCTO #9038]

Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorpm: Use conditional to access %{_docdir} in macros.in
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:33 +0000 (21:34 +0200)]
rpm: Use conditional to access %{_docdir} in macros.in

This avoids the following warning:

warning: Ignoring invalid regex %{_docdir}

when runing `rpmdeps -R <file>`, since %{_docdir} is only defined when
parsing a spec file.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorpm: Do not require that ELF binaries are executable to be identifiable
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:32 +0000 (21:34 +0200)]
rpm: Do not require that ELF binaries are executable to be identifiable

There is nothing that requires, e.g., a DSO to be executable, but it
is still an ELF binary and should be identified as such.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorpm: Create a wrapper for the native rpmdeps tool
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:31 +0000 (21:34 +0200)]
rpm: Create a wrapper for the native rpmdeps tool

Rather than trying to call rpmdeps with the correct arguments to work
with the sysroot as was done in package.bbclass, create a wrapper for
it like all the other native tools already had.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorpm: Simplify the creation of wrappers for the native tools
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:30 +0000 (21:34 +0200)]
rpm: Simplify the creation of wrappers for the native tools

Use a loop rather than calling create_wrapper for each individual
tool.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agotoaster.bbclass: Ignore some dependencies in toaster_buildhistory_dump()
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:29 +0000 (21:34 +0200)]
toaster.bbclass: Ignore some dependencies in toaster_buildhistory_dump()

When using RPM, depends.dot may contain dependencies such as
"/bin/sh", which will confuse _toaster_load_pkgdatafile(). Ignore
them. While at it, also ignore dependencies that contain parentheses,
e.g., "libc.so.6(GLIBC_2.7)".

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agotoaster.bbclass: Simplify parsing of depends.dot
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:28 +0000 (21:34 +0200)]
toaster.bbclass: Simplify parsing of depends.dot

By using a single regular expression, the parsing of the depends.dot
file can be simplified a lot. This should also make it less
susceptible to formatting changes in that file.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobuildhistory.bbclass: Improve the generated depends.dot file
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:27 +0000 (21:34 +0200)]
buildhistory.bbclass: Improve the generated depends.dot file

* Convert incorrectly formatted dependencies such as:
    "bar -> "foo" ">=" "1.2.3"
  into dependencies with edge labels:
    "bar -> "foo" [label=">= 1.2.3"]
* Remove rpmlib() and config() dependencies such as:
    "foo" -> "rpmlib(CompressedFileNames)" [label="<= 3.0.4-1"]
  and:
    "base-files" -> "config(base-files)" [label="= 3.0.14-r89.49"]
* Remove the trailing semicolon that was added to each line. It fills
  no purpose.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoinsane.bbclass: Improve the handling of runtime file dependencies
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:26 +0000 (21:34 +0200)]
insane.bbclass: Improve the handling of runtime file dependencies

This makes the file-rdeps test support:
* versioned dependencies, e.g., "perl (>= 5.000)", and
* package dependencies among the file dependencies, e.g., "perl".

It also ignores all "perl(...)" dependencies since it is expected that
these are generated and handled by rpm itself and there is no reason
to second guess what it is doing.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoinsane.bbclass: Report all file-rdeps errors, not just the first
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:25 +0000 (21:34 +0200)]
insane.bbclass: Report all file-rdeps errors, not just the first

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolibxml2: Make ptest run the Python tests if Python support is enabled
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:24 +0000 (21:34 +0200)]
libxml2: Make ptest run the Python tests if Python support is enabled

Since we go through the trouble of copying the Python tests, we may as
well actually run them...

This also avoids the following QA issue:

  ERROR: libxml2-2.9.4-r0 do_package_qa: QA Issue:
  /usr/lib/libxml2/ptest/python/tests/push.py contained in package
  libxml2-ptest requires /usr/bin/python, but no providers found in
  RDEPENDS_libxml2-ptest? [file-rdeps]

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agopackage_manager.py: Generate correct RPM package names again
Peter Kjellerstedt [Fri, 9 Jun 2017 19:34:23 +0000 (21:34 +0200)]
package_manager.py: Generate correct RPM package names again

During the transition to RPM4, the package names returned by
RpmPM.list_installed() changed from the expected names of the packages
that were installed into the image to some fictitious source RPM
names.

This restores the original functionality so that the
installed-packages.txt files produced by inheriting buildhistory yet
again contains a list of the names of the installed packages.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobuildhistory: force writing SRCREV values
Ed Bartosh [Mon, 12 Jun 2017 08:11:54 +0000 (11:11 +0300)]
buildhistory: force writing SRCREV values

Enabling SSTATE_MIRRORS sometimes causes SRCREV values not
to be written/updated in the build history. This happens more
often if SRCREV is set to ${AUTOREV}

Explicitly writing SRCREVs when recipe history is being written
should fix this.

[YOCTO #10948]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agonative/nativesdk: Ensure DISTRO_FEATURES is determistic
Richard Purdie [Mon, 12 Jun 2017 10:03:55 +0000 (11:03 +0100)]
native/nativesdk: Ensure DISTRO_FEATURES is determistic

set() order is random and hence the filtered native/nativesdk DISTRO_FEATURES
could be set to random ordering. We've been lucky so far this tended not to
cause issues but some queued changes highedlighted this. Thrown in a sorted()
so the order is deterministic and we get consistent hash checksums between runs
and between machines.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agomesa.inc: enable texture float for gallium
Trevor Woerner [Sun, 11 Jun 2017 19:43:50 +0000 (15:43 -0400)]
mesa.inc: enable texture float for gallium

Following the lead from Fedora (as suggested by Rob Clark) always enable
--enable-texture-float for all gallium drivers, but then modify the code to
not enable it, at runtime, where the implementation isn't backed by hardware.

The patch comes from unpacking fedora-25's mesa-17.0.5-3.fc25.src.rpm from
https://dl.fedoraproject.org/pub/fedora/linux/updates/25/SRPMS/m/

Somewhere along the path from OpenGL ES 2.0 to OpenGL ES 3.0 are some
algorithms that are encumbered by patents. These algorithms are enabled
with mesa's --enable-texture-float configure flag. However, if hardware
acceleration is being used and the hardware supports --enable-texture-float,
it means the hardware vendor has paid for the patents.

Note that with this solution, non-hardware gallium drivers (e.g. swrast) can't
--enable-texture-float, which might cause issues with some piglit tests.

This solution was discussed and agreed-to on the mailing list:
http://lists.openembedded.org/pipermail/openembedded-core/2017-May/137233.html

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoutils.py: helper function for optional include files
Patrick Ohly [Fri, 9 Jun 2017 13:04:04 +0000 (15:04 +0200)]
utils.py: helper function for optional include files

The main intention is to provide easy-to-use and read helper functions
for including files only when certain distro features are
set. Functionally they are the same as bb.utils.contains and
bb.utils.contains_any.

Distro features are part of the base configuration and thus safe to
use for conditional inclusion in recipes and bbappends, in contrast to
recipe variables which might still change during parsing. Therefore
the check is limited to DISTRO_FEATURES. This is the reason for having
this in OE-core instead of bitbake.

Default values are set so that no redundant parameters have to be
passed for conditional includes. As a secondary usage, the functions
can also be used in boolean checks.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake.conf: DISTRO_FEATURES as overrides
Patrick Ohly [Fri, 9 Jun 2017 13:04:03 +0000 (15:04 +0200)]
bitbake.conf: DISTRO_FEATURES as overrides

As discussed in "[Openembedded-architecture] Yocto Compatible 2.0 +
signature changes", changes in .bbappend must depend on some explicit
configuration change, typically selecting a distro feature.

For _append and _remove, adding an override that is set only when the
corresponding entry is in DISTRO_FEATURES achieves that:

In local.conf:
  DISTRO_FEATURES_append = " my-distro-feature"

In layer.conf:
  DISTRO_FEATURES_OVERRIDES += "my-distro-feature"

In a .bbappend:
  do_install_append_df-my-distro-feature () {
       ...
  }

The subset of DISTRO_FEATURES that are made available as overrides
must be configured explicitly because using them this way should
be a conscious decision.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorunqemu-export-rootfs: don't change RPC ports
Cody P Schafer [Tue, 6 Jun 2017 22:30:49 +0000 (18:30 -0400)]
runqemu-export-rootfs: don't change RPC ports

RPC ports (also known as rpc program numbers) are values:

 - given to rpcbind (aka portmapper) to allow nfsv3 clients that don't
   know the tcp/udp port number of nfsd and mountd to look it up the
   tcp/udp port number, and to

 - allow a single transport (ie: tcp/udp port) to provide multiple
   sunrpc services.

OE has carried patches to nfsutils & linux for some time to support the
mountprog & nfsprog options.

In the case of runqemu-export-rootfs, we don't need to use custom rpc
program numbers because runqemu-export-rootfs tells unfsd not to
register with the portmapper, and unfsd runs the nfs and mount rpc
services on tcp/udp ports unfsd binds itself (iow: the tcp/udp ports are
not shared in the sunrpc sense).

Linux's nfs client does not query rpcbind when tcp/udp port numbers are
specified (in net/sunrpc/clnt.c, call_bind checks for the tcp/udp port
with xprt_bound() and skips the call to rpcbind if xprtsock.c's
xs_setup_udp() or xs_setup_tcp() has found a non-zero tcp/udp port).

The program numbers _are_ sent over the mount & nfs protocol (really,
over sunrpc), and checked to match at both ends. As a result, even when
rpcbind is unused, using different program numbers in unfsd vs linux
nfs client causes mounts to fail (and nfsroot mounts to timeout).

The result is that specifying custom program numbers in
runqemu-export-rootfs doesn't solve any conflicts, it simply requires
that users of runqemu-export-rootfs carry a kernel patch & adds 2 extra
parameters to the kernel command line unnecessarily.

Change runqemu-export-rootfs to use the default program numbers.

For now, I have not dropped the custom program number patches to linux,
nfs-utils, and unfsd just in case someone is using them in a
non-runqemu-export-rootfs context.

CC: Bruce Ashfield <bruce.ashfield@gmail.com>
CC: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Cody P Schafer <dev@codyps.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agotestimage.bbclass: Correct the comment to state right dir for test cases
Khem Raj [Fri, 9 Jun 2017 03:41:33 +0000 (20:41 -0700)]
testimage.bbclass: Correct the comment to state right dir for test cases

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agorng-tools: Fix textrels on 32bit x86
Khem Raj [Fri, 9 Jun 2017 03:41:35 +0000 (20:41 -0700)]
rng-tools: Fix textrels on 32bit x86

When testing core-image-sato with hardening flags, it fails with
SIGSEGV in libc.so during relocation time

This is due to relocations in .text [textrel]
build QA points it out clearly during qemux86 build as well

AssertionError: 2 != 0 : Log: /mnt/a/oe/build/tmp/work/qemux86-bec-linux-musl/core-image-sato/1.0-r0/dmesg_output.log
-----------------------
Central error: [   19.043597] rngd[525]: segfault at 80098bb7 ip b77b14fc sp bfe9b380 error 7 in libc.so[b774c000+97000]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agognutls: Upgrade to 3.5.13
Fan Xin [Fri, 9 Jun 2017 06:49:18 +0000 (15:49 +0900)]
gnutls: Upgrade to 3.5.13

1. Upgrade gnutls from 3.5.9 to 3.5.13

2. Rebase the following patch file.
   use-pkg-config-to-locate-zlib.patch

Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agodiffutils: prevent host path leaks, set pr path
Jussi Kukkonen [Fri, 9 Jun 2017 07:36:18 +0000 (10:36 +0300)]
diffutils: prevent host path leaks, set pr path

Note that this just removes a host path leakage: diffutils still
doesn't depend on coreutils so 'pr' might not actually be there
on image (this only breaks "diff -l" so no big deal).

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agolibrepo: Fix typo: correct LRO_SSLVERIFYHOST with CURLOPT_SSL_VERIFYHOST
Hongxu Jia [Fri, 9 Jun 2017 09:24:42 +0000 (05:24 -0400)]
librepo: Fix typo: correct LRO_SSLVERIFYHOST with CURLOPT_SSL_VERIFYHOST

The commit 51d32c6cd88ba0139c32793183fd6a236c1ef456 in
git://github.com/rpm-software-management/librepo.git
...
Author: Tomas Mlcoch <tmlcoch@redhat.com>
Date:   Mon May 5 14:31:35 2014 +0200

    Add LRO_SSLVERIFYPEER and LRO_SSLVERIFYHOST options (RhBug: 1093014)
...

It incorrectly setopt CURLOPT_SSL_VERIFYPEER for LRO_SSLVERIFYHOST.
Use CURLOPT_SSL_VERIFYHOST to correct.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agoclasses/buildhistory: use BB_CMDLINE to get bitbake command line
Paul Eggleton [Fri, 9 Jun 2017 13:50:40 +0000 (15:50 +0200)]
classes/buildhistory: use BB_CMDLINE to get bitbake command line

We put the bitbake command line in the buildhistory commit message for
informational purposes, but calling sys.argv to get that as we were
previously doesn't really work in memory resident mode - that gives you
the command used to start the bitbake server which is much less
interesting. Use the just-introduced BB_CMDLINE variable instead.

Part of the fix for [YOCTO #11634].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agobitbake.conf: add BB_CMDLINE to BB_HASHCONFIG_WHITELIST
Paul Eggleton [Fri, 9 Jun 2017 13:50:39 +0000 (15:50 +0200)]
bitbake.conf: add BB_CMDLINE to BB_HASHCONFIG_WHITELIST

We really don't want the just-introduced BB_CMDLINE influencing the
config hash.

Part of the fix for [YOCTO #11634].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
7 years agodpkg: Add missing RDEPENDS for dpkg-perl
Tom Rini [Fri, 9 Jun 2017 00:00:41 +0000 (20:00 -0400)]
dpkg: Add missing RDEPENDS for dpkg-perl

In order to be able to use dpkg-perl on a system various stock perl
modules must also be installed on the system.  Create the list of
required modules based on a read of the code and testing with additional
utilities and list them in RDEPENDS_${PN}-perl.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>