Re: [OE-core] [PATCH 0/1] mesa: Contain configure search for llvm

2017-06-13 Thread Martin Jansa
On Tue, Jun 13, 2017 at 03:13:01PM -0700, Khem Raj wrote:
> On Tue, Jun 13, 2017 at 2:39 PM, Martin Jansa  wrote:
> > On Sat, Apr 01, 2017 at 08:21:16AM -0700, Khem Raj wrote:
> >> On Fri, Mar 31, 2017 at 10:52 PM, Martin Jansa  
> >> wrote:
> >> > Why is it needed?
> >>
> >> If you have clang/llvm installed on your build host then it defaults to 
> >> that
> >> thats why its needed.
> >
> > And where does meta-clang install it? Because if it doesn't match with
> > the location used by meta-oe's llvm then we cannot have the same flag
> > which suits both providers.
> >
> > As it is now I still have this change reverted in my branches and I've
> > noticed some layers which just use EXTRA_OECONF_remove to just remove
> > this with-llvm-prefix to unblock the builds with Pyro and Rocko.
> >
> >> > Without this change mesa was finding llvm-config correctly, that's why 
> >> > I've
> >> > just reverted this to continue building.
> 
> The problem is mainly when you have clang/llvm installed on build host
> now that we prune hosttools this might not be an issue anymore, although
> this needs to be tested.

I'm not using meta-clang anywhere, can you please answer where
meta-clang installs llvm-config and if it's different path than what
meta-oe recipe does, can we unify them?

Unifying them was also discussed here:
https://www.mail-archive.com/openembedded-core@lists.openembedded.org/msg94412.html
but as I'm using meta-oe's llvm just for mesa I cannot help much with
that.

Regards,

> >> > On Fri, Mar 31, 2017 at 5:57 PM, Khem Raj  wrote:
> >> >>
> >> >> On Fri, Mar 31, 2017 at 8:08 AM, Martin Jansa 
> >> >> wrote:
> >> >> > On Thu, Mar 23, 2017 at 10:31:07AM -0700, Khem Raj wrote:
> >> >> >> On Thu, Mar 23, 2017 at 12:51 AM, Martin Jansa 
> >> >> >> 
> >> >> >> wrote:
> >> >> >> > I'm not sure if this is the root cause, but last qemux86 build 
> >> >> >> > shows:
> >> >> >> >
> >> >> >> >
> >> >> >> > | configure: error: --enable-gallium-llvm selected but llvm-config 
> >> >> >> > is
> >> >> >> > not
> >> >> >> > found
> >> >> >> > | ERROR: Function failed: do_configure (log file is located at
> >> >> >> >
> >> >> >> > /home/jenkins/oe/world/shr-core/tmp-glibc/work/i586-oe-linux/mesa/2_17.0.1-r0/temp/log.do_configure.11359)
> >> >> >> >
> >> >> >>
> >> >> >> can you point where is llvm-config installed in sysroot ? its 
> >> >> >> possible
> >> >> >> its not in native sysroot location ${STAGING_BINDIR_NATIVE}
> >> >> >
> >> >> > OE qemux86@ ~/build/oe-core $ find
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot* -name 
> >> >> > llvm\*
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/bin/crossscripts/llvm-config
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/bin/crossscripts/llvm-config3.3
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/include/llvm3.3
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/include/llvm3.3/llvm-c
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/include/llvm3.3/llvm
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/include/llvm3.3/llvm/Config/llvm-config.h
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/lib/llvm3.3
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/sysroot-providers/llvm-common
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/sysroot-providers/llvm3.3
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm3.3.complete
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm-common.complete
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm-common.6be6a4ae98ee0dff7c2a4c4df17f026a
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm-common
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm3.3.388adaa288ab3b1d35e01a43b6542368
> >> >> >
> >> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm3.3
> >> >> >
> >> >>
> >> >> so it seems it should point to /usr/bin/crossscripts
> >> >> can you try changing -with-llvm-prefix to point to this dir ?
> >> >>
> >> >> >>
> >> >> >> >
> >> >> >> > I've noticed some llvm changes for meta-clang, do we need similar
> >> >> >> > changes
> >> >> >> > for meta-oe version of llvm?
> >> >> >> >
> >> >> >> >
> >> >> >> > On Sun, Mar 12, 2017 at 12:16 AM, Khem Raj 
> >> >> >> > wrote:
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> On 3/11/17 1:30 PM, Khem Raj wrote:
> >> >> >> >> > The following changes since commit
> >> >> >> >> > a47e64d985a610535449730806651f5bfd75d9ec:
> >> >> >> >> >
> >> >> >> >> > 

[OE-core] [PATCH] devtool: deploy-target: Support stripped libs and execs

2017-06-13 Thread Tobias Hagelborn
New devtool deploy-target option --strip which enables deploying
stripped binaries, saving some space on target.

* Copies the files of ${D} into a new directory and strips them in place
* Based on sysroot_strip from staging.bbclass
* Added devtool.conf option "strip" for changing default behavior
* Added .ko strip support compared to original function sysroot_strip

Config example:
[Deploy]
strip = true

[YOCTO #11227]

Signed-off-by: Tobias Hagelborn 
---
 scripts/lib/devtool/deploy.py | 134 --
 1 file changed, 130 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index 04c34cb..9547018 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -16,12 +16,16 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 """Devtool plugin containing the deploy subcommands"""
 
+import logging
 import os
+import shutil
 import subprocess
-import logging
 import tempfile
-import shutil
+
+import bb.utils
 import argparse_oe
+import oe
+
 from devtool import exec_fakeroot, setup_tinfoil, check_workspace_recipe, 
DevtoolError
 
 logger = logging.getLogger('devtool')
@@ -140,9 +144,114 @@ def _prepare_remote_script(deploy, verbose=False, 
dryrun=False, undeployall=Fals
 return '\n'.join(lines)
 
 
+def strip_execs(dstdir, strip_cmd, libdir, base_libdir):
+"""
+Strip executable code (like executables, shared libraries, kernel modules) 
_in_place_
+- Based on sysroot_strip in staging.bbclass
+:param dstdir: directory in which to strip files
+:param strip_cmd:
+"""
+import stat, errno, mmap
+
+# Detect .ko module by searching for "vermagic=" string
+def is_kernel_module(path):
+with open(path) as f:
+return mmap.mmap(f.fileno(), 0, 
prot=mmap.PROT_READ).find(b"vermagic=") >= 0
+
+# Return type (bits):
+# 0 - not elf
+# 1 - ELF
+# 2 - stripped
+# 4 - executable
+# 8 - shared library
+# 16 - kernel module
+def is_elf(path):
+exec_type = 0
+ret, result = oe.utils.getstatusoutput(
+"file \"%s\"" % path.replace("\"", "\\\""))
+
+if ret:
+logger.error("split_and_strip_files: 'file %s' failed", path)
+return exec_type
+
+# Not stripped
+if "ELF" in result:
+exec_type |= 1
+if "not stripped" not in result:
+exec_type |= 2
+if "executable" in result:
+exec_type |= 4
+if "shared" in result:
+exec_type |= 8
+if "relocatable" in result and is_kernel_module(path):
+exec_type |= 16
+return exec_type
+
+elffiles = {}
+inodes = {}
+libdir = os.path.abspath(os.path.join(dstdir, libdir.lstrip(os.sep)))
+base_libdir = os.path.abspath(os.path.join(dstdir, 
base_libdir.lstrip(os.sep)))
+exec_mask = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
+#
+# First lets figure out all of the files we may have to process
+#
+for root, dirs, files in os.walk(dstdir):
+for f in files:
+file = os.path.join(root, f)
+
+try:
+ltarget = oe.path.realpath(file, dstdir, False)
+s = os.lstat(ltarget)
+except OSError as e:
+(err, strerror) = e.args
+if err != errno.ENOENT:
+raise
+# Skip broken symlinks
+continue
+if not s:
+continue
+# Check its an excutable
+if s[stat.ST_MODE] & exec_mask \
+or ((file.startswith(libdir) or 
file.startswith(base_libdir)) and ".so" in f) \
+or file.endswith('.ko'):
+# If it's a symlink, and points to an ELF file, we capture the 
readlink target
+if os.path.islink(file):
+continue
+
+# It's a file (or hardlink), not a link
+# ...but is it ELF, and is it already stripped?
+elf_file = is_elf(file)
+if elf_file & 1:
+if elf_file & 2:
+logger.warn(
+"File '%s' is unexpectedly already stripped.",
+file[len(dstdir):])
+continue
+
+if s.st_ino in inodes:
+os.unlink(file)
+os.link(inodes[s.st_ino], file)
+else:
+# break hardlinks so that we do not strip the original.
+inodes[s.st_ino] = file
+# break hardlink
+bb.utils.copyfile(file, file)
+elffiles[file] = elf_file
+
+#
+# Now strip them (in parallel)
+#
+sfiles = []
+for file in elffiles:
+elf_file = int(elffiles[file

[OE-core] [PATCH 1/1] staging.bbclass: fix typo

2017-06-13 Thread Chen Qi
The function is "sysroot_strip" instead of "split_and_strip_files".

Signed-off-by: Chen Qi 
---
 meta/classes/staging.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 9c26794..1bb22aa 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -87,7 +87,7 @@ python sysroot_strip () {
 ret, result = oe.utils.getstatusoutput("file \"%s\"" % 
path.replace("\"", "\\\""))
 
 if ret:
-bb.error("split_and_strip_files: 'file %s' failed" % path)
+bb.error("sysroot_strip: 'file %s' failed" % path)
 return type
 
 # Not stripped
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/1] staging.bbclass: fix typo

2017-06-13 Thread Chen Qi
The following changes since commit 2db8f3265e3b253f9e21301661f9fbe102aa595a:

  linux-yocto: include missing description files and conf fragments (2017-06-13 
10:47:09 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/staging_typo
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/staging_typo

Chen Qi (1):
  staging.bbclass: fix typo

 meta/classes/staging.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v9] openssh: Atomically generate host keys

2017-06-13 Thread Joshua Watt
Generating the host keys atomically prevents power interruptions during
the first boot from leaving the key files incomplete, which often
prevents users from being able to ssh into the device.

Signed-off-by: Joshua Watt 
---
 meta/recipes-connectivity/openssh/openssh/init | 25 +++
 .../openssh/openssh/sshd-check-key | 37 ++
 .../openssh/openssh/sshdgenkeys.service| 25 ---
 meta/recipes-connectivity/openssh/openssh_7.5p1.bb |  8 +
 4 files changed, 63 insertions(+), 32 deletions(-)
 create mode 100644 meta/recipes-connectivity/openssh/openssh/sshd-check-key

diff --git a/meta/recipes-connectivity/openssh/openssh/init 
b/meta/recipes-connectivity/openssh/openssh/init
index 386628a..2832e67 100644
--- a/meta/recipes-connectivity/openssh/openssh/init
+++ b/meta/recipes-connectivity/openssh/openssh/init
@@ -80,26 +80,11 @@ check_keys() {
[ -z "${HOST_KEY_ED25519}" ] && 
HOST_KEY_ED25519=$SYSCONFDIR/ssh_host_ed25519_key
 
# create keys if necessary
-   if [ ! -f $HOST_KEY_RSA ]; then
-   echo "  generating ssh RSA key..."
-   mkdir -p $(dirname $HOST_KEY_RSA)
-   ssh-keygen -q -f $HOST_KEY_RSA -N '' -t rsa
-   fi
-   if [ ! -f $HOST_KEY_ECDSA ]; then
-   echo "  generating ssh ECDSA key..."
-   mkdir -p $(dirname $HOST_KEY_ECDSA)
-   ssh-keygen -q -f $HOST_KEY_ECDSA -N '' -t ecdsa
-   fi
-   if [ ! -f $HOST_KEY_DSA ]; then
-   echo "  generating ssh DSA key..."
-   mkdir -p $(dirname $HOST_KEY_DSA)
-   ssh-keygen -q -f $HOST_KEY_DSA -N '' -t dsa
-   fi
-   if [ ! -f $HOST_KEY_ED25519 ]; then
-   echo "  generating ssh ED25519 key..."
-   mkdir -p $(dirname $HOST_KEY_ED25519)
-   ssh-keygen -q -f $HOST_KEY_ED25519 -N '' -t ed25519
-   fi
+   @LIBEXECDIR@/sshd-check-key $HOST_KEY_RSA rsa
+   @LIBEXECDIR@/sshd-check-key $HOST_KEY_ECDSA ecdsa
+   @LIBEXECDIR@/sshd-check-key $HOST_KEY_DSA dsa
+   @LIBEXECDIR@/sshd-check-key $HOST_KEY_ED25519 ed25519
+   @BASE_BINDIR@/sync
 }
 
 export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd-check-key 
b/meta/recipes-connectivity/openssh/openssh/sshd-check-key
new file mode 100644
index 000..56c500d
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh/sshd-check-key
@@ -0,0 +1,37 @@
+#! /bin/sh
+NAME="$1"
+TYPE="$2"
+
+if [ -z "$NAME" ] || [ -z "$TYPE" ]; then
+echo "Usage: $0 NAME TYPE"
+exit 1
+fi
+
+
+if [ ! -f "$NAME" ]; then
+DIR="$(dirname "$NAME")"
+
+mkdir -p "$DIR"
+
+echo "  generating ssh $TYPE key..."
+ssh-keygen -q -f "${NAME}.tmp" -N '' -t $TYPE
+
+# Move (Atomically rename) files
+mv -f "${NAME}.tmp.pub" "${NAME}.pub"
+
+# This sync does double duty: Ensuring that the data in the temporary
+# private key file is on disk before the rename, and ensuring that the
+# public key rename is completed before the private key rename, since we
+# switch on the existence of the private key to trigger key generation.
+# This does mean it is possible for the public key to exist, but be garbage
+# but this is OK because in that case the private key won't exist and the
+# keys will be regenerated.
+#
+# In the event that sync understands arguments that limit what it tries to
+# fsync(), we provided them. If it does not, it will simply call sync()
+# which is just as well
+sync "${NAME}.pub" "$DIR" "${NAME}.tmp"
+
+mv "${NAME}.tmp" "$NAME"
+fi
+
diff --git a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service 
b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
index 148e6ad..23fd351 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
+++ b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
@@ -1,22 +1,23 @@
 [Unit]
 Description=OpenSSH Key Generation
 RequiresMountsFor=/var /run
-ConditionPathExists=!/var/run/ssh/ssh_host_rsa_key
-ConditionPathExists=!/var/run/ssh/ssh_host_dsa_key
-ConditionPathExists=!/var/run/ssh/ssh_host_ecdsa_key
-ConditionPathExists=!/var/run/ssh/ssh_host_ed25519_key
-ConditionPathExists=!/etc/ssh/ssh_host_rsa_key
-ConditionPathExists=!/etc/ssh/ssh_host_dsa_key
-ConditionPathExists=!/etc/ssh/ssh_host_ecdsa_key
-ConditionPathExists=!/etc/ssh/ssh_host_ed25519_key
+ConditionPathExists=|!/var/run/ssh/ssh_host_rsa_key
+ConditionPathExists=|!/var/run/ssh/ssh_host_dsa_key
+ConditionPathExists=|!/var/run/ssh/ssh_host_ecdsa_key
+ConditionPathExists=|!/var/run/ssh/ssh_host_ed25519_key
+ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key
+ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key
+ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key
+ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key
 
 [Service]
 Environment="SYSCONFDIR=/etc/ssh"
 EnvironmentFile=-/etc/default/ssh
 ExecStart=@BAS

Re: [OE-core] [PATCH v8] openssh: Atomically generate host keys

2017-06-13 Thread Joshua Watt
On Tue, Jun 13, 2017 at 10:31 PM, Joshua Watt  wrote:
> Generating the host keys atomically prevents power interruptions during
> the first boot from leaving the key files incomplete, which often
> prevents users from being able to ssh into the device.
>
> Signed-off-by: Joshua Watt 
> ---
>  meta/recipes-connectivity/openssh/openssh/init | 24 +++--
>  .../openssh/openssh/sshd-check-key | 30 
> ++
>  .../openssh/openssh/sshdgenkeys.service| 16 +++-
>  meta/recipes-connectivity/openssh/openssh_7.5p1.bb |  8 ++
>  4 files changed, 46 insertions(+), 32 deletions(-)
>  create mode 100644 meta/recipes-connectivity/openssh/openssh/sshd-check-key
>
> diff --git a/meta/recipes-connectivity/openssh/openssh/init 
> b/meta/recipes-connectivity/openssh/openssh/init
> index 386628a..acb35c3 100644
> --- a/meta/recipes-connectivity/openssh/openssh/init
> +++ b/meta/recipes-connectivity/openssh/openssh/init
> @@ -80,26 +80,10 @@ check_keys() {
> [ -z "${HOST_KEY_ED25519}" ] && 
> HOST_KEY_ED25519=$SYSCONFDIR/ssh_host_ed25519_key
>
> # create keys if necessary
> -   if [ ! -f $HOST_KEY_RSA ]; then
> -   echo "  generating ssh RSA key..."
> -   mkdir -p $(dirname $HOST_KEY_RSA)
> -   ssh-keygen -q -f $HOST_KEY_RSA -N '' -t rsa
> -   fi
> -   if [ ! -f $HOST_KEY_ECDSA ]; then
> -   echo "  generating ssh ECDSA key..."
> -   mkdir -p $(dirname $HOST_KEY_ECDSA)
> -   ssh-keygen -q -f $HOST_KEY_ECDSA -N '' -t ecdsa
> -   fi
> -   if [ ! -f $HOST_KEY_DSA ]; then
> -   echo "  generating ssh DSA key..."
> -   mkdir -p $(dirname $HOST_KEY_DSA)
> -   ssh-keygen -q -f $HOST_KEY_DSA -N '' -t dsa
> -   fi
> -   if [ ! -f $HOST_KEY_ED25519 ]; then
> -   echo "  generating ssh ED25519 key..."
> -   mkdir -p $(dirname $HOST_KEY_ED25519)
> -   ssh-keygen -q -f $HOST_KEY_ED25519 -N '' -t ed25519
> -   fi
> +   @LIBEXECDIR@/sshd-check-key $HOST_KEY_RSA rsa
> +   @LIBEXECDIR@/sshd-check-key $HOST_KEY_ECDSA ecdsa
> +   @LIBEXECDIR@/sshd-check-key $HOST_KEY_DSA dsa
> +   @LIBEXECDIR@/sshd-check-key $HOST_KEY_ED25519 ed25519
>  }
>
>  export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
> diff --git a/meta/recipes-connectivity/openssh/openssh/sshd-check-key 
> b/meta/recipes-connectivity/openssh/openssh/sshd-check-key
> new file mode 100644
> index 000..4999af2
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssh/openssh/sshd-check-key
> @@ -0,0 +1,30 @@
> +#! /bin/sh
> +set -e
> +
> +NAME="$1"
> +TYPE="$2"
> +
> +if [ -z "$NAME" ] || [ -z "$TYPE" ]; then
> +echo "Usage: $0 NAME TYPE"
> +exit 1;
> +fi
> +
> +if [ ! -f "$NAME" ]; then
> +mkdir -p "$(dirname "$NAME")"
> +
> +echo "  generating ssh $TYPE key..."
> +ssh-keygen -q -f "${NAME}.tmp" -N '' -t $TYPE
> +
> +# Sync to ensure data is written to temp file before renaming
> +sync
> +
> +# Move (Atomically rename) files
> +# Rename the .pub file first, since the check that triggers a
> +# key generation is based on the private file.
> +mv -f "${NAME}.tmp.pub" "${NAME}.pub"
> +sync
> +
> +mv -f "${NAME}.tmp" "${NAME}"
> +sync
> +fi
> +
> diff --git a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service 
> b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
> index 148e6ad..af56404 100644
> --- a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
> +++ b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
> @@ -1,22 +1,14 @@
>  [Unit]
>  Description=OpenSSH Key Generation
>  RequiresMountsFor=/var /run
> -ConditionPathExists=!/var/run/ssh/ssh_host_rsa_key
> -ConditionPathExists=!/var/run/ssh/ssh_host_dsa_key
> -ConditionPathExists=!/var/run/ssh/ssh_host_ecdsa_key
> -ConditionPathExists=!/var/run/ssh/ssh_host_ed25519_key
> -ConditionPathExists=!/etc/ssh/ssh_host_rsa_key
> -ConditionPathExists=!/etc/ssh/ssh_host_dsa_key
> -ConditionPathExists=!/etc/ssh/ssh_host_ecdsa_key
> -ConditionPathExists=!/etc/ssh/ssh_host_ed25519_key
>
>  [Service]
>  Environment="SYSCONFDIR=/etc/ssh"
>  EnvironmentFile=-/etc/default/ssh
>  ExecStart=@BASE_BINDIR@/mkdir -p $SYSCONFDIR
> -ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' -t 
> rsa
> -ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' -t 
> dsa
> -ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ecdsa_key -N '' 
> -t ecdsa
> -ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ed25519_key -N '' 
> -t ed25519
> +ExecStart=@LIBEXECDIR@/sshd-check-key ${SYSCONFDIR}/ssh_host_rsa_key rsa
> +ExecStart=@LIBEXECDIR@/sshd-check-key ${SYSCONFDIR}/ssh_host_dsa_key dsa
> +ExecStart=@LIBEXECDIR@/sshd-check-key ${SYSCONFDIR}/ssh_host_ecdsa_key ecdsa
> +ExecStart=@LIBEXECDIR@/sshd-check-key ${SYSCONFDIR}/ssh_host_ed25519_key 
> ed25519

[OE-core] [PATCH v8] openssh: Atomically generate host keys

2017-06-13 Thread Joshua Watt
Generating the host keys atomically prevents power interruptions during
the first boot from leaving the key files incomplete, which often
prevents users from being able to ssh into the device.

Signed-off-by: Joshua Watt 
---
 meta/recipes-connectivity/openssh/openssh/init | 24 +++--
 .../openssh/openssh/sshd-check-key | 30 ++
 .../openssh/openssh/sshdgenkeys.service| 16 +++-
 meta/recipes-connectivity/openssh/openssh_7.5p1.bb |  8 ++
 4 files changed, 46 insertions(+), 32 deletions(-)
 create mode 100644 meta/recipes-connectivity/openssh/openssh/sshd-check-key

diff --git a/meta/recipes-connectivity/openssh/openssh/init 
b/meta/recipes-connectivity/openssh/openssh/init
index 386628a..acb35c3 100644
--- a/meta/recipes-connectivity/openssh/openssh/init
+++ b/meta/recipes-connectivity/openssh/openssh/init
@@ -80,26 +80,10 @@ check_keys() {
[ -z "${HOST_KEY_ED25519}" ] && 
HOST_KEY_ED25519=$SYSCONFDIR/ssh_host_ed25519_key
 
# create keys if necessary
-   if [ ! -f $HOST_KEY_RSA ]; then
-   echo "  generating ssh RSA key..."
-   mkdir -p $(dirname $HOST_KEY_RSA)
-   ssh-keygen -q -f $HOST_KEY_RSA -N '' -t rsa
-   fi
-   if [ ! -f $HOST_KEY_ECDSA ]; then
-   echo "  generating ssh ECDSA key..."
-   mkdir -p $(dirname $HOST_KEY_ECDSA)
-   ssh-keygen -q -f $HOST_KEY_ECDSA -N '' -t ecdsa
-   fi
-   if [ ! -f $HOST_KEY_DSA ]; then
-   echo "  generating ssh DSA key..."
-   mkdir -p $(dirname $HOST_KEY_DSA)
-   ssh-keygen -q -f $HOST_KEY_DSA -N '' -t dsa
-   fi
-   if [ ! -f $HOST_KEY_ED25519 ]; then
-   echo "  generating ssh ED25519 key..."
-   mkdir -p $(dirname $HOST_KEY_ED25519)
-   ssh-keygen -q -f $HOST_KEY_ED25519 -N '' -t ed25519
-   fi
+   @LIBEXECDIR@/sshd-check-key $HOST_KEY_RSA rsa
+   @LIBEXECDIR@/sshd-check-key $HOST_KEY_ECDSA ecdsa
+   @LIBEXECDIR@/sshd-check-key $HOST_KEY_DSA dsa
+   @LIBEXECDIR@/sshd-check-key $HOST_KEY_ED25519 ed25519
 }
 
 export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd-check-key 
b/meta/recipes-connectivity/openssh/openssh/sshd-check-key
new file mode 100644
index 000..4999af2
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh/sshd-check-key
@@ -0,0 +1,30 @@
+#! /bin/sh
+set -e
+
+NAME="$1"
+TYPE="$2"
+
+if [ -z "$NAME" ] || [ -z "$TYPE" ]; then
+echo "Usage: $0 NAME TYPE"
+exit 1;
+fi
+
+if [ ! -f "$NAME" ]; then
+mkdir -p "$(dirname "$NAME")"
+
+echo "  generating ssh $TYPE key..."
+ssh-keygen -q -f "${NAME}.tmp" -N '' -t $TYPE
+
+# Sync to ensure data is written to temp file before renaming
+sync
+
+# Move (Atomically rename) files
+# Rename the .pub file first, since the check that triggers a
+# key generation is based on the private file.
+mv -f "${NAME}.tmp.pub" "${NAME}.pub"
+sync
+
+mv -f "${NAME}.tmp" "${NAME}"
+sync
+fi
+
diff --git a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service 
b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
index 148e6ad..af56404 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
+++ b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
@@ -1,22 +1,14 @@
 [Unit]
 Description=OpenSSH Key Generation
 RequiresMountsFor=/var /run
-ConditionPathExists=!/var/run/ssh/ssh_host_rsa_key
-ConditionPathExists=!/var/run/ssh/ssh_host_dsa_key
-ConditionPathExists=!/var/run/ssh/ssh_host_ecdsa_key
-ConditionPathExists=!/var/run/ssh/ssh_host_ed25519_key
-ConditionPathExists=!/etc/ssh/ssh_host_rsa_key
-ConditionPathExists=!/etc/ssh/ssh_host_dsa_key
-ConditionPathExists=!/etc/ssh/ssh_host_ecdsa_key
-ConditionPathExists=!/etc/ssh/ssh_host_ed25519_key
 
 [Service]
 Environment="SYSCONFDIR=/etc/ssh"
 EnvironmentFile=-/etc/default/ssh
 ExecStart=@BASE_BINDIR@/mkdir -p $SYSCONFDIR
-ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' -t rsa
-ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' -t dsa
-ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ecdsa_key -N '' -t 
ecdsa
-ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ed25519_key -N '' 
-t ed25519
+ExecStart=@LIBEXECDIR@/sshd-check-key ${SYSCONFDIR}/ssh_host_rsa_key rsa
+ExecStart=@LIBEXECDIR@/sshd-check-key ${SYSCONFDIR}/ssh_host_dsa_key dsa
+ExecStart=@LIBEXECDIR@/sshd-check-key ${SYSCONFDIR}/ssh_host_ecdsa_key ecdsa
+ExecStart=@LIBEXECDIR@/sshd-check-key ${SYSCONFDIR}/ssh_host_ed25519_key 
ed25519
 Type=oneshot
 RemainAfterExit=yes
diff --git a/meta/recipes-connectivity/openssh/openssh_7.5p1.bb 
b/meta/recipes-connectivity/openssh/openssh_7.5p1.bb
index 5b96745..ede8823 100644
--- a/meta/recipes-connectivity/openssh/openssh_7.5p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_7.5p1.

Re: [OE-core] [PATCH 0/1] mesa: Contain configure search for llvm

2017-06-13 Thread Khem Raj
On Tue, Jun 13, 2017 at 2:39 PM, Martin Jansa  wrote:
> On Sat, Apr 01, 2017 at 08:21:16AM -0700, Khem Raj wrote:
>> On Fri, Mar 31, 2017 at 10:52 PM, Martin Jansa  
>> wrote:
>> > Why is it needed?
>>
>> If you have clang/llvm installed on your build host then it defaults to that
>> thats why its needed.
>
> And where does meta-clang install it? Because if it doesn't match with
> the location used by meta-oe's llvm then we cannot have the same flag
> which suits both providers.
>
> As it is now I still have this change reverted in my branches and I've
> noticed some layers which just use EXTRA_OECONF_remove to just remove
> this with-llvm-prefix to unblock the builds with Pyro and Rocko.
>
>> > Without this change mesa was finding llvm-config correctly, that's why I've
>> > just reverted this to continue building.

The problem is mainly when you have clang/llvm installed on build host
now that we prune hosttools this might not be an issue anymore, although
this needs to be tested.

>>
>>
>> >
>> > On Fri, Mar 31, 2017 at 5:57 PM, Khem Raj  wrote:
>> >>
>> >> On Fri, Mar 31, 2017 at 8:08 AM, Martin Jansa 
>> >> wrote:
>> >> > On Thu, Mar 23, 2017 at 10:31:07AM -0700, Khem Raj wrote:
>> >> >> On Thu, Mar 23, 2017 at 12:51 AM, Martin Jansa 
>> >> >> wrote:
>> >> >> > I'm not sure if this is the root cause, but last qemux86 build shows:
>> >> >> >
>> >> >> >
>> >> >> > | configure: error: --enable-gallium-llvm selected but llvm-config is
>> >> >> > not
>> >> >> > found
>> >> >> > | ERROR: Function failed: do_configure (log file is located at
>> >> >> >
>> >> >> > /home/jenkins/oe/world/shr-core/tmp-glibc/work/i586-oe-linux/mesa/2_17.0.1-r0/temp/log.do_configure.11359)
>> >> >> >
>> >> >>
>> >> >> can you point where is llvm-config installed in sysroot ? its possible
>> >> >> its not in native sysroot location ${STAGING_BINDIR_NATIVE}
>> >> >
>> >> > OE qemux86@ ~/build/oe-core $ find
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot* -name 
>> >> > llvm\*
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/bin/crossscripts/llvm-config
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/bin/crossscripts/llvm-config3.3
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/include/llvm3.3
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/include/llvm3.3/llvm-c
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/include/llvm3.3/llvm
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/include/llvm3.3/llvm/Config/llvm-config.h
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/lib/llvm3.3
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/sysroot-providers/llvm-common
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/sysroot-providers/llvm3.3
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm3.3.complete
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm-common.complete
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm-common.6be6a4ae98ee0dff7c2a4c4df17f026a
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm-common
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm3.3.388adaa288ab3b1d35e01a43b6542368
>> >> >
>> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm3.3
>> >> >
>> >>
>> >> so it seems it should point to /usr/bin/crossscripts
>> >> can you try changing -with-llvm-prefix to point to this dir ?
>> >>
>> >> >>
>> >> >> >
>> >> >> > I've noticed some llvm changes for meta-clang, do we need similar
>> >> >> > changes
>> >> >> > for meta-oe version of llvm?
>> >> >> >
>> >> >> >
>> >> >> > On Sun, Mar 12, 2017 at 12:16 AM, Khem Raj 
>> >> >> > wrote:
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> On 3/11/17 1:30 PM, Khem Raj wrote:
>> >> >> >> > The following changes since commit
>> >> >> >> > a47e64d985a610535449730806651f5bfd75d9ec:
>> >> >> >> >
>> >> >> >> >   libcomps: add a recipe (2017-03-11 16:08:50 +)
>> >> >> >> >
>> >> >> >> > are available in the git repository at:
>> >> >> >> >
>> >> >> >> >   git://git.openembedded.org/openembedded-core-contrib kraj/pu
>> >> >> >> >
>> >> >> >> > http://cgit.openembedded.org/openembedded-core-contrib/log/?h=kraj/pu
>> >> >> >> >
>> >> >> >> > Khem Raj (1):
>> >> >> >> >   mesa: Contain configure search for llvm
>> >> >> >> >
>> >> >> >>
>> >> >> >> I added another fix for mesa-gl to remove one of obsolete
>> >> >> >> packageconfigs
>> >> >> >> and its on the same pull branch now.
>> >> >> >>
>> >> >> >> >  meta/recipes-graphics/mesa/mesa.inc | 2 +-
>> >> >> >> >  1 file changed, 1 insertion(+

Re: [OE-core] [PATCH 0/1] mesa: Contain configure search for llvm

2017-06-13 Thread Martin Jansa
On Sat, Apr 01, 2017 at 08:21:16AM -0700, Khem Raj wrote:
> On Fri, Mar 31, 2017 at 10:52 PM, Martin Jansa  wrote:
> > Why is it needed?
> 
> If you have clang/llvm installed on your build host then it defaults to that
> thats why its needed.

And where does meta-clang install it? Because if it doesn't match with
the location used by meta-oe's llvm then we cannot have the same flag
which suits both providers.

As it is now I still have this change reverted in my branches and I've
noticed some layers which just use EXTRA_OECONF_remove to just remove
this with-llvm-prefix to unblock the builds with Pyro and Rocko.

> > Without this change mesa was finding llvm-config correctly, that's why I've
> > just reverted this to continue building.
> 
> 
> >
> > On Fri, Mar 31, 2017 at 5:57 PM, Khem Raj  wrote:
> >>
> >> On Fri, Mar 31, 2017 at 8:08 AM, Martin Jansa 
> >> wrote:
> >> > On Thu, Mar 23, 2017 at 10:31:07AM -0700, Khem Raj wrote:
> >> >> On Thu, Mar 23, 2017 at 12:51 AM, Martin Jansa 
> >> >> wrote:
> >> >> > I'm not sure if this is the root cause, but last qemux86 build shows:
> >> >> >
> >> >> >
> >> >> > | configure: error: --enable-gallium-llvm selected but llvm-config is
> >> >> > not
> >> >> > found
> >> >> > | ERROR: Function failed: do_configure (log file is located at
> >> >> >
> >> >> > /home/jenkins/oe/world/shr-core/tmp-glibc/work/i586-oe-linux/mesa/2_17.0.1-r0/temp/log.do_configure.11359)
> >> >> >
> >> >>
> >> >> can you point where is llvm-config installed in sysroot ? its possible
> >> >> its not in native sysroot location ${STAGING_BINDIR_NATIVE}
> >> >
> >> > OE qemux86@ ~/build/oe-core $ find
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot* -name 
> >> > llvm\*
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/bin/crossscripts/llvm-config
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/bin/crossscripts/llvm-config3.3
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/include/llvm3.3
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/include/llvm3.3/llvm-c
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/include/llvm3.3/llvm
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/include/llvm3.3/llvm/Config/llvm-config.h
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/usr/lib/llvm3.3
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/sysroot-providers/llvm-common
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot/sysroot-providers/llvm3.3
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm3.3.complete
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm-common.complete
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm-common.6be6a4ae98ee0dff7c2a4c4df17f026a
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm-common
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm3.3.388adaa288ab3b1d35e01a43b6542368
> >> >
> >> > tmp-glibc/work/i586-oe-linux/mesa/2_17.0.2-r0/recipe-sysroot-native/installeddeps/llvm3.3
> >> >
> >>
> >> so it seems it should point to /usr/bin/crossscripts
> >> can you try changing -with-llvm-prefix to point to this dir ?
> >>
> >> >>
> >> >> >
> >> >> > I've noticed some llvm changes for meta-clang, do we need similar
> >> >> > changes
> >> >> > for meta-oe version of llvm?
> >> >> >
> >> >> >
> >> >> > On Sun, Mar 12, 2017 at 12:16 AM, Khem Raj 
> >> >> > wrote:
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> On 3/11/17 1:30 PM, Khem Raj wrote:
> >> >> >> > The following changes since commit
> >> >> >> > a47e64d985a610535449730806651f5bfd75d9ec:
> >> >> >> >
> >> >> >> >   libcomps: add a recipe (2017-03-11 16:08:50 +)
> >> >> >> >
> >> >> >> > are available in the git repository at:
> >> >> >> >
> >> >> >> >   git://git.openembedded.org/openembedded-core-contrib kraj/pu
> >> >> >> >
> >> >> >> > http://cgit.openembedded.org/openembedded-core-contrib/log/?h=kraj/pu
> >> >> >> >
> >> >> >> > Khem Raj (1):
> >> >> >> >   mesa: Contain configure search for llvm
> >> >> >> >
> >> >> >>
> >> >> >> I added another fix for mesa-gl to remove one of obsolete
> >> >> >> packageconfigs
> >> >> >> and its on the same pull branch now.
> >> >> >>
> >> >> >> >  meta/recipes-graphics/mesa/mesa.inc | 2 +-
> >> >> >> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> >> >> >
> >> >> >> --
> >> >> >> ___
> >> >> >> Openembedded-core mailing list
> >> >> >> Openembedded-core@lists.openembedded.org
> >> >> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core
> >> >> >
> >> >> >
> >> >
> >> > --
> >> > Martin 'JaMa' Jansa jabbe

[OE-core] [PATCH v2] attr: Fix build failure when image includes man-pages pkg

2017-06-13 Thread Mark Asselstine
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 
---

v2: Fixed case in Upstream-Status

 meta/recipes-support/attr/attr_2.4.47.bb   |   2 +
 ...ve-the-attr.5-man-page-moved-to-man-pages.patch | 240 
 .../files/Remove-the-section-2-man-pages.patch | 666 +
 3 files changed, 908 insertions(+)
 create mode 100644 
meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
 create mode 100644 
meta/recipes-support/attr/files/Remove-the-section-2-man-pages.patch

diff --git a/meta/recipes-support/attr/attr_2.4.47.bb 
b/meta/recipes-support/attr/attr_2.4.47.bb
index 556c8e4..2dada7a 100644
--- a/meta/recipes-support/attr/attr_2.4.47.bb
+++ b/meta/recipes-support/attr/attr_2.4.47.bb
@@ -4,6 +4,8 @@ require attr.inc
 # future releases of attr, remove this when updating the recipe.
 SRC_URI += "file://attr-Missing-configure.ac.patch \
 file://dont-use-decl-macros.patch \
+file://Remove-the-section-2-man-pages.patch \
+file://Remove-the-attr.5-man-page-moved-to-man-pages.patch \
"
 
 SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7"
diff --git 
a/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
 
b/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
new file mode 100644
index 000..d5ab83d
--- /dev/null
+++ 
b/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
@@ -0,0 +1,240 @@
+From 6047c8522b91235ad1e835f44f5e36472d9d49b2 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher 
+Date: Wed, 22 Apr 2015 11:46:59 +0200
+Subject: [PATCH 2/2] Remove the attr.5 man page (moved to man-pages)
+
+Commit dce9b4448c7f2b22bd206cd068fb05cb2f3255b9 from
+https://git.savannah.nongnu.org/git/attr.git
+
+The attr.5 page is part of the extended attribute system call documentation,
+which has been moved into the man-pages package. Move the attr.5 page there
+as well.
+
+Upstream-Status: Backport
+
+[MA: updated to apply directly to v2.4.47]
+Signed-off-by: Mark Asselstine 
+---
+ man/Makefile  |   2 +-
+ man/man5/Makefile |  35 -
+ man/man5/attr.5   | 153 --
+ 3 files changed, 1 insertion(+), 189 deletions(-)
+ delete mode 100644 man/man5/Makefile
+ delete mode 100644 man/man5/attr.5
+
+diff --git a/man/Makefile b/man/Makefile
+index 755daed..9301f09 100644
+--- a/man/Makefile
 b/man/Makefile
+@@ -19,7 +19,7 @@
+ TOPDIR = ..
+ include $(TOPDIR)/include/builddefs
+ 
+-SUBDIRS = man1 man3 man5
++SUBDIRS = man1 man3
+ 
+ default : $(SUBDIRS)
+ 
+diff --git a/man/man5/Makefile b/man/man5/Makefile
+deleted file mode 100644
+index 6b70d3d..000
+--- a/man/man5/Makefile
 /dev/null
+@@ -1,35 +0,0 @@
+-#
+-# Copyright (c) 2000, 2002 Silicon Graphics, Inc.  All Rights Reserved.
+-# Copyright (C) 2009  Andreas Gruenbacher 
+-#
+-# This program is free software: you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License as published by
+-# the Free Software Foundation, either version 2 of the License, or
+-# (at your option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program.  If not, see .
+-#
+-
+-TOPDIR = ../..
+-include $(TOPDIR)/include/builddefs
+-
+-MAN_SECTION   = 5
+-
+-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
+-MAN_DEST  = $(PKG_MAN_DIR)/man$(MAN_SECTION)
+-LSRCFILES = $(MAN_PAGES)
+-
+-default : $(MAN_PAGES)
+-
+-include $(BUILDRULES)
+-
+-install : default
+-  $(INSTALL) -m 755 -d $(MAN_DEST)
+-  $(INSTALL_MAN)
+-install-dev install-lib:
+diff --git a/man/man5/attr.5 b/man/man5/attr.5
+deleted file mode 100644
+index a02757d..000
+--- a/man/man5/attr.5
 /dev/null
+@@ -1,153 +0,0 @@
+-.\" Extended attributes manual page
+-.\"
+-.\" Copyright (C) 2000, 2002, 2007  Andreas Gruenbacher 
+-.\" Copyright (C) 2001, 2002, 2004, 2007 Silicon Graphics, Inc.
+-.\" All rights reserved.
+-.\"
+-.\" This is fre

Re: [OE-core] [PATCH] attr: Fix build failure when image includes man-pages pkg

2017-06-13 Thread Mark Asselstine
On Tuesday, June 13, 2017 9:13:28 PM EDT Burton, Ross wrote:
> On 13 June 2017 at 19:46, Mark Asselstine 
> 
> wrote:
> > Yet the 'Upstream-status' is marked in the same way for both patches. So I
> > am
> > ingnoring this unless someone is able to see the issue which I can not.
> 
> The test is picky:
> 
> +Upstream-status: Backport
> 
> The correct string (as machines are stupid) is Upstream-Status.

I notice the case on the wiki pages now. I will send along a v2.

Mark

> 
> Ross


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] attr: Fix build failure when image includes man-pages pkg

2017-06-13 Thread Burton, Ross
On 13 June 2017 at 19:46, Mark Asselstine 
wrote:

> Yet the 'Upstream-status' is marked in the same way for both patches. So I
> am
> ingnoring this unless someone is able to see the issue which I can not.
>

The test is picky:

+Upstream-status: Backport

The correct string (as machines are stupid) is Upstream-Status.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4] runtime/dnf: Add new dnf test cases

2017-06-13 Thread jose . perez . carranza
From: Jose Perez Carranza 

Add test cases to test “exclude” and “installroot“ options, also modify
the logic of filtering packages on the feed to have all the packages
needed by the tests.

[YOCTO #10744]

Signed-off-by: Jose Perez Carranza 
---
 meta/classes/testimage.bbclass | 11 ---
 meta/lib/oeqa/runtime/cases/dnf.py | 22 ++
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 6fa2d6fd9f..d76d64d442 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -329,6 +329,7 @@ def create_index(arg):
 return None
 
 def create_rpm_index(d):
+import glob
 # Index RPMs
 rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c")
 index_cmds = []
@@ -345,9 +346,13 @@ def create_rpm_index(d):
 lf = bb.utils.lockfile(lockfilename, False)
 oe.path.copyhardlinktree(rpm_dir, idx_path)
 # Full indexes overload a 256MB image so reduce the number of rpms
-# in the feed. Filter to r* since we use the run-postinst packages and
-# this leaves some allarch and machine arch packages too.
-bb.utils.remove(idx_path + "*/[a-qs-z]*.rpm")
+# in the feed by filtering to specific packages needed by the tests.
+package_list = glob.glob(idx_path + "*/*.rpm")
+
+for pkg in package_list:
+if not os.path.basename(pkg).startswith(("rpm", "run-postinsts", 
"busybox", "bash", "update-alternatives", "libc6", "curl")):
+bb.utils.remove(pkg)
+
 bb.utils.unlockfile(lf)
 cmd = '%s --update -q %s' % (rpm_createrepo, idx_path)
 
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py 
b/meta/lib/oeqa/runtime/cases/dnf.py
index 2f87296b4e..25db9bacd2 100644
--- a/meta/lib/oeqa/runtime/cases/dnf.py
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -120,4 +120,26 @@ class DnfRepoTest(DnfTest):
 def test_dnf_reinstall(self):
 self.dnf_with_repo('reinstall -y run-postinsts-dev')
 
+@OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+@OETestID(1771)
+def test_dnf_installroot(self):
+rootpath = '/home/root/chroot/test'
+self.target.run('mkdir -p %s/etc' % rootpath, 1500)
+self.target.run('cp -r /etc/rpm %s/etc' % rootpath, 1500)
+self.target.run('cp -r /etc/dnf %s/etc' % rootpath, 1500)
+self.dnf_with_repo('install --installroot=%s -v -y busybox 
run-postinsts' % rootpath)
+status, output = self.target.run('test -e %s/var/cache/dnf' % 
rootpath, 1500)
+self.assertEqual(0, status, output)
+status, output = self.target.run('test -e %s/bin/busybox' % rootpath, 
1500)
+self.assertEqual(0, status, output)
 
+@OETestDepends(['dnf.DnfRepoTest.test_dnf_makecache'])
+@OETestID(1772)
+def test_dnf_exclude(self):
+excludepkg = 'curl-dev'
+self.dnf_with_repo('install -y curl*')
+self.dnf('list %s' % excludepkg, 0)
+self.dnf_with_repo('remove -y curl*')
+self.dnf('list %s' % excludepkg, 1)
+self.dnf_with_repo('install -y --exclude=%s curl*' % excludepkg)
+self.dnf('list %s' % excludepkg, 1)
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [oe-core][v3][PATCH 1/3] ghostscript: move to version 9.21

2017-06-13 Thread Joe Slater
Eliminate CVE patches that are now in source.  Add CVE-2017-7975
patch.

Signed-off-by: Joe Slater 
---
 .../ghostscript/ghostscript/CVE-2016-10219.patch   | 49 ---
 .../ghostscript/ghostscript/CVE-2016-10220.patch   | 55 --
 .../ghostscript/ghostscript/CVE-2016-8602.patch| 47 --
 .../ghostscript/ghostscript/CVE-2017-7975.patch| 23 -
 ...t-9.21-native-fix-disable-system-libtiff.patch} | 22 -
 ... => ghostscript-9.21-prevent_recompiling.patch} | 25 +-
 .../{ghostscript_9.20.bb => ghostscript_9.21.bb}   | 13 ++---
 7 files changed, 39 insertions(+), 195 deletions(-)
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2016-8602.patch
 rename 
meta/recipes-extended/ghostscript/ghostscript/{ghostscript-native-fix-disable-system-libtiff.patch
 => ghostscript-9.21-native-fix-disable-system-libtiff.patch} (67%)
 rename 
meta/recipes-extended/ghostscript/ghostscript/{ghostscript-9.02-prevent_recompiling.patch
 => ghostscript-9.21-prevent_recompiling.patch} (81%)
 rename meta/recipes-extended/ghostscript/{ghostscript_9.20.bb => 
ghostscript_9.21.bb} (89%)

diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch 
b/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch
deleted file mode 100644
index 574abe0..000
--- a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 4bef1a1d32e29b68855616020dbff574b9cda08f Mon Sep 17 00:00:00 2001
-From: Robin Watts 
-Date: Thu, 29 Dec 2016 15:57:43 +
-Subject: [PATCH] Bug 697453: Avoid divide by 0 in scan conversion code.
-
-Arithmetic overflow due to extreme values in the scan conversion
-code can cause a division by 0.
-
-Avoid this with a simple extra check.
-
-  dx_old=cf814d81
-  endp->x_next=b0e859b9
-  alp->x_next=8069a73a
-
-leads to dx_den = 0
-
-Upstream-Status: Backport
-CVE: CVE-2016-10219
-
-Signed-off-by: Catalin Enache 

- base/gxfill.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/base/gxfill.c b/base/gxfill.c
-index 99196c0..2f81bb0 100644
 a/base/gxfill.c
-+++ b/base/gxfill.c
-@@ -1741,7 +1741,7 @@ intersect(active_line *endp, active_line *alp, fixed y, 
fixed y1, fixed *p_y_new
- fixed dx_old = alp->x_current - endp->x_current;
- fixed dx_den = dx_old + endp->x_next - alp->x_next;
- 
--if (dx_den <= dx_old)
-+if (dx_den <= dx_old || dx_den == 0)
- return false; /* Intersection isn't possible. */
- dy = y1 - y;
- if_debug3('F', "[F]cross: dy=%g, dx_old=%g, dx_new=%g\n",
-@@ -1750,7 +1750,7 @@ intersect(active_line *endp, active_line *alp, fixed y, 
fixed y1, fixed *p_y_new
- /* Do the computation in single precision */
- /* if the values are small enough. */
- y_new =
--((dy | dx_old) < 1L << (size_of(fixed) * 4 - 1) ?
-+(((ufixed)(dy | dx_old)) < (1L << (size_of(fixed) * 4 - 1)) ?
-  dy * dx_old / dx_den :
-  (INCR_EXPR(mq_cross), fixed_mult_quo(dy, dx_old, dx_den)))
- + y;
--- 
-2.10.2
-
diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch 
b/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch
deleted file mode 100644
index 5e1e8ba..000
--- a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From daf85701dab05f17e924a48a81edc9195b4a04e8 Mon Sep 17 00:00:00 2001
-From: Ken Sharp 
-Date: Wed, 21 Dec 2016 16:54:14 +
-Subject: [PATCH] fix crash with bad data supplied to makeimagedevice
-
-Bug #697450 "Null pointer dereference in gx_device_finalize()"
-
-The problem here is that the code to finalise a device unconditionally
-frees the icc_struct member of the device structure. However this
-particular (weird) device is not setup as a normal device, probably
-because its very, very ancient. Its possible for the initialisation
-of the device to abort with an error before calling gs_make_mem_device()
-which is where the icc_struct member gets allocated (or set to NULL).
-
-If that happens, then the cleanup code tries to free the device, which
-calls finalize() which tries to free a garbage pointer.
-
-Setting the device memory to 0x00 after we allocate it means that the
-icc_struct member will be NULL< and our memory manager allows for that
-happily enough, which avoids the problem.
-
-Upstream-Status: Backport
-CVE: CVE-2016-10220
-
-Signed-off-by: Catalin Enache 

- base/gsdevmem.c | 12 
- 1 file changed, 12 insertions(+)
-
-diff --git a/base/gsdevmem.c b/base/gsdevmem.c
-index 97b9cf4..fe75bcc 100644
 a/base/gsdevmem.c
-+++ b/base/gsdevmem.c
-@@ -225,6 +225,18 @@ gs_makewordimagedevice(gx_device ** pnew_dev, const 
gs_matrix * pmat,
- 
- if (pnew == 0)
-

[OE-core] [oe-core][v3][PATCH 2/3] ghostscript: add X11 PACKAGECONFIG info

2017-06-13 Thread Joe Slater
Add information necessary to build for x11, but
do not enable that option.

Fix parallel build directory creation issue.

Signed-off-by: Joe Slater 
---
 .../ghostscript/avoid-host-contamination.patch | 19 
 .../ghostscript/ghostscript/mkdir-p.patch  | 36 ++
 .../ghostscript/ghostscript_9.21.bb| 18 ++-
 3 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch

diff --git 
a/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch 
b/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch
new file mode 100644
index 000..c4794e7
--- /dev/null
+++ 
b/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch
@@ -0,0 +1,19 @@
+Remove hardcode path refer to host to avoid host contamination.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Kai Kang 
+---
+diff --git a/devices/devs.mak b/devices/devs.mak
+index 3070d2e..df663f0 100644
+--- a/devices/devs.mak
 b/devices/devs.mak
+@@ -546,7 +546,7 @@ $(DEVOBJ)gdevxalt.$(OBJ) : $(DEVSRC)gdevxalt.c $(GDEVX) 
$(math__h) $(memory__h)\
+ ### NON PORTABLE, ONLY UNIX WITH GCC SUPPORT
+ 
+ $(DEVOBJ)X11.so : $(x11alt_) $(x11_) $(DEVS_MAK) $(MAKEDIRS)
+-  $(CCLD) $(LDFLAGS) -shared -o $(DEVOBJ)X11.so $(x11alt_) $(x11_) 
-L/usr/X11R6/lib -lXt -lSM -lICE -lXext -lX11 $(XLIBDIRS)
++  $(CCLD) $(LDFLAGS) -shared -o $(DEVOBJ)X11.so $(x11alt_) $(x11_) -lXt 
-lSM -lICE -lXext -lX11 $(XLIBDIRS)
+ 
+ ## --- Memory-buffered printer devices --- ##
+ 
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch 
b/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch
new file mode 100644
index 000..5a7eab1
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch
@@ -0,0 +1,36 @@
+ghostscript: allow directories to be created more than once
+
+When doing parallel builds, we might try to create directories
+more than once.  This should not cause an error.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater 
+
+
+--- a/base/unix-end.mak
 b/base/unix-end.mak
+@@ -17,15 +17,14 @@
+ UNIX_END_MAK=$(GLSRC)unix-end.mak $(TOP_MAKEFILES)
+ # Define the rule for building standard configurations.
+ directories: $(UNIX_END_MAK)
+-  @if test "$(BINDIR)"!= "" -a ! -d $(BINDIR);then mkdir 
$(BINDIR);fi
+-  @if test "$(GLGENDIR)"  != "" -a ! -d $(GLGENDIR);  then mkdir 
$(GLGENDIR);  fi
+-  @if test "$(GLOBJDIR)"  != "" -a ! -d $(GLOBJDIR);  then mkdir 
$(GLOBJDIR);  fi
+-  @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir 
$(DEVGENDIR); fi
+-  @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir 
$(DEVOBJDIR); fi
+-  @if test "$(AUXDIR)"!= "" -a ! -d $(AUXDIR);then mkdir 
$(AUXDIR);fi
+-  @if test "$(PSGENDIR)"  != "" -a ! -d $(PSGENDIR);  then mkdir 
$(PSGENDIR);  fi
+-  @if test "$(PSGENDIR)"  != "" -a ! -d $(PSGENDIR)/cups; then mkdir 
$(PSGENDIR)/cups; fi
+-  @if test "$(PSOBJDIR)"  != "" -a ! -d $(PSOBJDIR);  then mkdir 
$(PSOBJDIR);  fi
++  @if test "$(BINDIR)"!= "" -a ! -d $(BINDIR);then mkdir -p 
$(BINDIR);fi
++  @if test "$(GLGENDIR)"  != "" -a ! -d $(GLGENDIR);  then mkdir -p 
$(GLGENDIR);  fi
++  @if test "$(GLOBJDIR)"  != "" -a ! -d $(GLOBJDIR);  then mkdir -p 
$(GLOBJDIR);  fi
++  @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir -p 
$(DEVGENDIR); fi
++  @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir -p 
$(DEVOBJDIR); fi
++  @if test "$(AUXDIR)"!= "" -a ! -d $(AUXDIR);then mkdir -p 
$(AUXDIR);fi
++  @if test "$(PSGENDIR)"  != "" -a ! -d $(PSGENDIR)/cups; then mkdir -p 
$(PSGENDIR)/cups; fi
++  @if test "$(PSOBJDIR)"  != "" -a ! -d $(PSOBJDIR);  then mkdir -p 
$(PSOBJDIR);  fi
+ 
+ 
+ gs: .gssubtarget $(UNIX_END_MAK)
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb 
b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
index 9a2e107..74e7a3f 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
@@ -24,6 +24,8 @@ SRC_URI_BASE = 
"https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
 file://ghostscript-9.16-Werror-return-type.patch \
 file://png_mak.patch \
 file://do-not-check-local-libpng-source.patch \
+file://avoid-host-contamination.patch \
+file://mkdir-p.patch \
 "
 
 SRC_URI = "${SRC_URI_BASE} \
@@ -48,7 +50,21 @@ SRC_URI_class-native = "${SRC_URI_BASE} \
 SRC_URI[md5sum] = "5f213281761d2750fcf27476c404d17f"
 

[OE-core] [oe-core][v3][PATCH 3/3] ghostscript: specify CUPSCONFIG

2017-06-13 Thread Joe Slater
configure for version 9.21 finds, but rejects, pkg-config
and cups-config.  We need cups-config, so we short circuit
the test for it.

Signed-off-by: Joe Slater 
---
 meta/recipes-extended/ghostscript/ghostscript_9.21.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb 
b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
index 74e7a3f..94d4cc6 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
@@ -64,10 +64,14 @@ PACKAGECONFIG[x11] = "--with-x 
--x-includes=${STAGING_INCDIR} --x-libraries=${ST
   --without-x, virtual/libx11 libxext libxt gtk+3\
   "
 
+# For 9.21, configure rejects the pkg-config and cups-config it finds.
+# We can live without pkg-config, but we need cups-config.
+#
 EXTRA_OECONF = "--with-system-libtiff --without-jbig2dec \
 --with-fontpath=${datadir}/fonts \
 --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups 
\
 --with-cups-datadir=${datadir}/cups \
+CUPSCONFIG="${STAGING_BINDIR_CROSS}/cups-config" \
 "
 
 EXTRA_OECONF_append_mipsarcho32 = " --with-large_color_index=0"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v3] python3: make readline and gdbm support conditional.

2017-06-13 Thread Burton, Ross
On 9 June 2017 at 08:43, Ismo Puustinen  wrote:

> +# If readline is not there, don't create python3-readline package and
> +# also do not depend on it. Same goes for gdbm.
> +PACKAGES_remove = " \
> +${@bb.utils.contains('PACKAGECONFIG', 'readline', '',
> '${PN}-readline', d)} \
> +${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '${PN}-gdbm', d)} \
> +"
> +PROVIDES_remove = " \
> +${@bb.utils.contains('PACKAGECONFIG', 'readline', '',
> '${PN}-readline', d)} \
> +${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '${PN}-gdbm', d)} \
> +"
> +RDEPENDS_${PN}-modules_remove = " \
> +${@bb.utils.contains('PACKAGECONFIG', 'readline', '',
> '${PN}-readline', d)} \
> +${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '${PN}-gdbm', d)} \
> +"
>

Just looked at what happens to the packaging without these lines.

If gdbm isn't present then the gdbm package isn't generated at all, which
is as expected.  python3-readline just contains the rlcompleter package
which is basically an implementation detail and could arguably be deleted
in a do_install_append that checks the PACKAGECONFIG.

The provides/depends will be needed still though, unless we teach the
manifest generator that some packages depend on PACKAGECONFIG flags.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v4 7/8] image: create symlinks needed for merged /usr

2017-06-13 Thread Amarnath Valluri
On Tue, 2017-06-13 at 14:16 +, Peter Kjellerstedt wrote:
> > -Original Message-
> > From: openembedded-core-boun...@lists.openembedded.org
> > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of
> > Amarnath Valluri
> > Sent: den 13 juni 2017 15:24
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH v4 7/8] image: create symlinks needed for
> > merged /usr
> > 
> > Prepare the symlinks required for merged /usr at the time of rootfs
> > creation.
> > 
> > The links created in rootfs are:
> > /bin --> /usr/sbin
> > /sbin --> /usr/sbin
> > /lib --> /usr/lib
> > /lib64 --> /usr/lib64
> > 
> > We cannot make these symlinks as part of 'base-files' or some other
> > package.
> > Because at rootfs creation, installation of the package(say kernel)
> > that depends
> > on these root folders/links fails, if package manager installs this
> > package
> > prior to base-files.
> > 
> > These symbolic links in top level folder should be present as long as
> >  - kernel tools use /lib/{module,firmware}
> >  - shell scripts uses "#!/bin/sh"
> > 
> > Signed-off-by: Amarnath Valluri 
> > ---
> >  meta/classes/image.bbclass | 21 +
> >  1 file changed, 21 insertions(+)
> > 
> > diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> > index 85f6b9a..2a3c1e3 100644
> > --- a/meta/classes/image.bbclass
> > +++ b/meta/classes/image.bbclass
> > @@ -617,3 +617,24 @@ do_bundle_initramfs () {
> > :
> >  }
> >  addtask bundle_initramfs after do_image_complete
> > +
> > +# Prepare the root links to point to the /usr counterparts.
> > +create_merged_usr_symlinks() {
> > +install -d ${IMAGE_ROOTFS}${base_bindir} 
> > ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}${base_libdir}
> > +lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
> > +lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
> > +lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}
> 
> You missed one. Change "/${baselib}" to "${baselib}".
${baselib} is not directory path and does not prefix with '/' unlike
${base_libdir}, so its valid here.

- Amarnath

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for *** ghostscript 9.21 *** (rev2)

2017-06-13 Thread Patchwork
== Series Details ==

Series: *** ghostscript 9.21 *** (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/7226/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Series does not apply on top of target branch 
[test_series_merge_on_head] 
  Suggested fixRebase your series on top of targeted branch
  Targeted branch  master (currently at 9ab20ceb58)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] attr: Fix build failure when image includes man-pages pkg

2017-06-13 Thread Mark Asselstine
On Tuesday, June 13, 2017 2:08:11 PM EDT Mark Asselstine wrote:
> 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 
> ---

The patchwork bot mailed me to complain that
---
 Issue Added patch file is missing Upstream-Status in the header 
[test_upstream_status_presence] 
  Suggested fixAdd Upstream-Status:  to the header of meta/
recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch 
(possible values: Pending, Submitted, Accepted, Backport, Denied, 
Inappropriate)
---
Yet the 'Upstream-status' is marked in the same way for both patches. So I am 
ingnoring this unless someone is able to see the issue which I can not.

Mark

>  meta/recipes-support/attr/attr_2.4.47.bb   |   2 +
>  ...ve-the-attr.5-man-page-moved-to-man-pages.patch | 240 
>  .../files/Remove-the-section-2-man-pages.patch | 666
> + 3 files changed, 908 insertions(+)
>  create mode 100644
> meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pag
> es.patch create mode 100644
> meta/recipes-support/attr/files/Remove-the-section-2-man-pages.patch
> 
> diff --git a/meta/recipes-support/attr/attr_2.4.47.bb
> b/meta/recipes-support/attr/attr_2.4.47.bb index 556c8e4..2dada7a 100644
> --- a/meta/recipes-support/attr/attr_2.4.47.bb
> +++ b/meta/recipes-support/attr/attr_2.4.47.bb
> @@ -4,6 +4,8 @@ require attr.inc
>  # future releases of attr, remove this when updating the recipe.
>  SRC_URI += "file://attr-Missing-configure.ac.patch \
>  file://dont-use-decl-macros.patch \
> +file://Remove-the-section-2-man-pages.patch \
> +file://Remove-the-attr.5-man-page-moved-to-man-pages.patch \
> "
> 
>  SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7"
> diff --git
> a/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-p
> ages.patch
> b/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-p
> ages.patch new file mode 100644
> index 000..7fcb310
> --- /dev/null
> +++
> b/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-p
> ages.patch @@ -0,0 +1,240 @@
> +From 6047c8522b91235ad1e835f44f5e36472d9d49b2 Mon Sep 17 00:00:00 2001
> +From: Andreas Gruenbacher 
> +Date: Wed, 22 Apr 2015 11:46:59 +0200
> +Subject: [PATCH 2/2] Remove the attr.5 man page (moved to man-pages)
> +
> +Commit dce9b4448c7f2b22bd206cd068fb05cb2f3255b9 from
> +https://git.savannah.nongnu.org/git/attr.git
> +
> +The attr.5 page is part of the extended attribute system call
> documentation, +which has been moved into the man-pages package. Move the
> attr.5 page there +as well.
> +
> +Upstream-status: Backport
> +
> +[MA: updated to apply directly to v2.4.47]
> +Signed-off-by: Mark Asselstine 
> +---
> + man/Makefile  |   2 +-
> + man/man5/Makefile |  35 -
> + man/man5/attr.5   | 153
> -- + 3 files changed, 1
> insertion(+), 189 deletions(-)
> + delete mode 100644 man/man5/Makefile
> + delete mode 100644 man/man5/attr.5
> +
> +diff --git a/man/Makefile b/man/Makefile
> +index 755daed..9301f09 100644
> +--- a/man/Makefile
>  b/man/Makefile
> +@@ -19,7 +19,7 @@
> + TOPDIR = ..
> + include $(TOPDIR)/include/builddefs
> +
> +-SUBDIRS = man1 man3 man5
> ++SUBDIRS = man1 man3
> +
> + default : $(SUBDIRS)
> +
> +diff --git a/man/man5/Makefile b/man/man5/Makefile
> +deleted file mode 100644
> +index 6b70d3d..000
> +--- a/man/man5/Makefile
>  /dev/null
> +@@ -1,35 +0,0 @@
> +-#
> +-# Copyright (c) 2000, 2002 Silicon Graphics, Inc.  All Rights Reserved.
> +-# Copyright (C) 2009  Andreas Gruenbacher 
> +-#
> +-# This program is free software: you can redistribute it and/or modify it
> +-# under the terms of the GNU General Public License as published by
> +-# the Free Software Foundation, either version 2 of the License, or
> +-# (at your option) any later version.
> +-#
> +-# This program is distributed in the hope that it will be useful,
> +-# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +-# GNU General Public License for more details.
> +-#
> +-# You should have received a copy of the GNU General Public License
> +-# along with this program.  If not, see 

Re: [OE-core] [PATCH] gcc-cross-canadian: Use ${target_includedir} for compatibility with meta-micro

2017-06-13 Thread Khem Raj
On Tue, Jun 13, 2017 at 2:09 AM, Mike Crowe  wrote:
> On Tuesday 16 May 2017 at 13:40:00 +0100, Mike Crowe wrote:
>> meta-micro puts headers in /include rather than /usr/include in the
>> sysroot. ${target_includedir} means that the correct path will be used
>> automatically.
>>

patch looks ok to me

>> Signed-off-by: Mike Crowe 
>> Acked-by: Phil Blundell 
>> ---
>>  meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc 
>> b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
>> index ec1d281800..91a6fa6994 100644
>> --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
>> @@ -80,7 +80,7 @@ FILES_${PN} = "\
>>  ${includedir}/c++/${BINV} \
>>  ${prefix}/${TARGET_SYS}/bin/* \
>>  ${prefix}/${TARGET_SYS}/lib/* \
>> -${prefix}/${TARGET_SYS}/usr/include/* \
>> +${prefix}/${TARGET_SYS}${target_includedir}/* \
>>  "
>>  INSANE_SKIP_${PN} += "dev-so"
>>
>> @@ -153,7 +153,7 @@ ELFUTILS = "nativesdk-elfutils"
>>  DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} 
>> nativesdk-zlib"
>>  RDEPENDS_${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}"
>>
>> -SYSTEMHEADERS = "/usr/include"
>> +SYSTEMHEADERS = "${target_includedir}/"
>>  SYSTEMLIBS = "${target_base_libdir}/"
>>  SYSTEMLIBS1 = "${target_libdir}/"
>>
>> --
>> 2.11.0
>
> This patch ended up in https://patchwork.openembedded.org/patch/139908/ .
> There don't appear to have been any objections. Is there any chance it
> could go in?
>
> Thanks.
>
> Mike.
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [-oe-core][v2][PATCH 2/3] ghostscript: add X11 PACKAGECONFIG info

2017-06-13 Thread Joe Slater
Add information necessary to build for x11, but
do not enable that option.

Fix parallel build directory creation issue.

Signed-off-by: Joe Slater 
---
 .../ghostscript/avoid-host-contamination.patch | 19 
 .../ghostscript/ghostscript/mkdir-p.patch  | 36 ++
 .../ghostscript/ghostscript_9.21.bb| 18 ++-
 3 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch

diff --git 
a/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch 
b/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch
new file mode 100644
index 000..c4794e7
--- /dev/null
+++ 
b/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch
@@ -0,0 +1,19 @@
+Remove hardcode path refer to host to avoid host contamination.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Kai Kang 
+---
+diff --git a/devices/devs.mak b/devices/devs.mak
+index 3070d2e..df663f0 100644
+--- a/devices/devs.mak
 b/devices/devs.mak
+@@ -546,7 +546,7 @@ $(DEVOBJ)gdevxalt.$(OBJ) : $(DEVSRC)gdevxalt.c $(GDEVX) 
$(math__h) $(memory__h)\
+ ### NON PORTABLE, ONLY UNIX WITH GCC SUPPORT
+ 
+ $(DEVOBJ)X11.so : $(x11alt_) $(x11_) $(DEVS_MAK) $(MAKEDIRS)
+-  $(CCLD) $(LDFLAGS) -shared -o $(DEVOBJ)X11.so $(x11alt_) $(x11_) 
-L/usr/X11R6/lib -lXt -lSM -lICE -lXext -lX11 $(XLIBDIRS)
++  $(CCLD) $(LDFLAGS) -shared -o $(DEVOBJ)X11.so $(x11alt_) $(x11_) -lXt 
-lSM -lICE -lXext -lX11 $(XLIBDIRS)
+ 
+ ## --- Memory-buffered printer devices --- ##
+ 
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch 
b/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch
new file mode 100644
index 000..5a7eab1
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch
@@ -0,0 +1,36 @@
+ghostscript: allow directories to be created more than once
+
+When doing parallel builds, we might try to create directories
+more than once.  This should not cause an error.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater 
+
+
+--- a/base/unix-end.mak
 b/base/unix-end.mak
+@@ -17,15 +17,14 @@
+ UNIX_END_MAK=$(GLSRC)unix-end.mak $(TOP_MAKEFILES)
+ # Define the rule for building standard configurations.
+ directories: $(UNIX_END_MAK)
+-  @if test "$(BINDIR)"!= "" -a ! -d $(BINDIR);then mkdir 
$(BINDIR);fi
+-  @if test "$(GLGENDIR)"  != "" -a ! -d $(GLGENDIR);  then mkdir 
$(GLGENDIR);  fi
+-  @if test "$(GLOBJDIR)"  != "" -a ! -d $(GLOBJDIR);  then mkdir 
$(GLOBJDIR);  fi
+-  @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir 
$(DEVGENDIR); fi
+-  @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir 
$(DEVOBJDIR); fi
+-  @if test "$(AUXDIR)"!= "" -a ! -d $(AUXDIR);then mkdir 
$(AUXDIR);fi
+-  @if test "$(PSGENDIR)"  != "" -a ! -d $(PSGENDIR);  then mkdir 
$(PSGENDIR);  fi
+-  @if test "$(PSGENDIR)"  != "" -a ! -d $(PSGENDIR)/cups; then mkdir 
$(PSGENDIR)/cups; fi
+-  @if test "$(PSOBJDIR)"  != "" -a ! -d $(PSOBJDIR);  then mkdir 
$(PSOBJDIR);  fi
++  @if test "$(BINDIR)"!= "" -a ! -d $(BINDIR);then mkdir -p 
$(BINDIR);fi
++  @if test "$(GLGENDIR)"  != "" -a ! -d $(GLGENDIR);  then mkdir -p 
$(GLGENDIR);  fi
++  @if test "$(GLOBJDIR)"  != "" -a ! -d $(GLOBJDIR);  then mkdir -p 
$(GLOBJDIR);  fi
++  @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir -p 
$(DEVGENDIR); fi
++  @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir -p 
$(DEVOBJDIR); fi
++  @if test "$(AUXDIR)"!= "" -a ! -d $(AUXDIR);then mkdir -p 
$(AUXDIR);fi
++  @if test "$(PSGENDIR)"  != "" -a ! -d $(PSGENDIR)/cups; then mkdir -p 
$(PSGENDIR)/cups; fi
++  @if test "$(PSOBJDIR)"  != "" -a ! -d $(PSOBJDIR);  then mkdir -p 
$(PSOBJDIR);  fi
+ 
+ 
+ gs: .gssubtarget $(UNIX_END_MAK)
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb 
b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
index 9a2e107..74e7a3f 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
@@ -24,6 +24,8 @@ SRC_URI_BASE = 
"https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
 file://ghostscript-9.16-Werror-return-type.patch \
 file://png_mak.patch \
 file://do-not-check-local-libpng-source.patch \
+file://avoid-host-contamination.patch \
+file://mkdir-p.patch \
 "
 
 SRC_URI = "${SRC_URI_BASE} \
@@ -48,7 +50,21 @@ SRC_URI_class-native = "${SRC_URI_BASE} \
 SRC_URI[md5sum] = "5f213281761d2750fcf27476c404d17f"
 

[OE-core] [-oe-core][v2][PATCH 3/3] ghostscript: specify CUPSCONFIG

2017-06-13 Thread Joe Slater
configure for version 9.21 finds, but rejects, pkg-config
and cups-config.  We need cups-config, so we short circuit
the test for it.

Signed-off-by: Joe Slater 
---
 meta/recipes-extended/ghostscript/ghostscript_9.21.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb 
b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
index 74e7a3f..94d4cc6 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
@@ -64,10 +64,14 @@ PACKAGECONFIG[x11] = "--with-x 
--x-includes=${STAGING_INCDIR} --x-libraries=${ST
   --without-x, virtual/libx11 libxext libxt gtk+3\
   "
 
+# For 9.21, configure rejects the pkg-config and cups-config it finds.
+# We can live without pkg-config, but we need cups-config.
+#
 EXTRA_OECONF = "--with-system-libtiff --without-jbig2dec \
 --with-fontpath=${datadir}/fonts \
 --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups 
\
 --with-cups-datadir=${datadir}/cups \
+CUPSCONFIG="${STAGING_BINDIR_CROSS}/cups-config" \
 "
 
 EXTRA_OECONF_append_mipsarcho32 = " --with-large_color_index=0"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [oe-core][PATCH 1/1] ghostscript: specify CUPSCONFIG

2017-06-13 Thread Joe Slater
configure for version 9.21 finds, but rejects, pkg-config
and cups-config.  We need cups-config, so we short circuit
the test for it.

Signed-off-by: Joe Slater 
---
 meta/recipes-extended/ghostscript/ghostscript_9.21.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb 
b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
index 74e7a3f..94d4cc6 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
@@ -64,10 +64,14 @@ PACKAGECONFIG[x11] = "--with-x 
--x-includes=${STAGING_INCDIR} --x-libraries=${ST
   --without-x, virtual/libx11 libxext libxt gtk+3\
   "
 
+# For 9.21, configure rejects the pkg-config and cups-config it finds.
+# We can live without pkg-config, but we need cups-config.
+#
 EXTRA_OECONF = "--with-system-libtiff --without-jbig2dec \
 --with-fontpath=${datadir}/fonts \
 --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups 
\
 --with-cups-datadir=${datadir}/cups \
+CUPSCONFIG="${STAGING_BINDIR_CROSS}/cups-config" \
 "
 
 EXTRA_OECONF_append_mipsarcho32 = " --with-large_color_index=0"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [-oe-core][v2][PATCH 1/3] ghostscript: move to version 9.21

2017-06-13 Thread Joe Slater
Eliminate CVE patches that are now in source.  Add CVE-2017-7975
patch.

Signed-off-by: Joe Slater 
---
 .../ghostscript/ghostscript/CVE-2016-10219.patch   | 49 ---
 .../ghostscript/ghostscript/CVE-2016-10220.patch   | 55 --
 .../ghostscript/ghostscript/CVE-2016-8602.patch| 47 --
 .../ghostscript/ghostscript/CVE-2017-7975.patch| 23 -
 ...t-9.21-native-fix-disable-system-libtiff.patch} | 22 -
 ... => ghostscript-9.21-prevent_recompiling.patch} | 25 +-
 .../{ghostscript_9.20.bb => ghostscript_9.21.bb}   | 13 ++---
 7 files changed, 39 insertions(+), 195 deletions(-)
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2016-8602.patch
 rename 
meta/recipes-extended/ghostscript/ghostscript/{ghostscript-native-fix-disable-system-libtiff.patch
 => ghostscript-9.21-native-fix-disable-system-libtiff.patch} (67%)
 rename 
meta/recipes-extended/ghostscript/ghostscript/{ghostscript-9.02-prevent_recompiling.patch
 => ghostscript-9.21-prevent_recompiling.patch} (81%)
 rename meta/recipes-extended/ghostscript/{ghostscript_9.20.bb => 
ghostscript_9.21.bb} (89%)

diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch 
b/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch
deleted file mode 100644
index 574abe0..000
--- a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 4bef1a1d32e29b68855616020dbff574b9cda08f Mon Sep 17 00:00:00 2001
-From: Robin Watts 
-Date: Thu, 29 Dec 2016 15:57:43 +
-Subject: [PATCH] Bug 697453: Avoid divide by 0 in scan conversion code.
-
-Arithmetic overflow due to extreme values in the scan conversion
-code can cause a division by 0.
-
-Avoid this with a simple extra check.
-
-  dx_old=cf814d81
-  endp->x_next=b0e859b9
-  alp->x_next=8069a73a
-
-leads to dx_den = 0
-
-Upstream-Status: Backport
-CVE: CVE-2016-10219
-
-Signed-off-by: Catalin Enache 

- base/gxfill.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/base/gxfill.c b/base/gxfill.c
-index 99196c0..2f81bb0 100644
 a/base/gxfill.c
-+++ b/base/gxfill.c
-@@ -1741,7 +1741,7 @@ intersect(active_line *endp, active_line *alp, fixed y, 
fixed y1, fixed *p_y_new
- fixed dx_old = alp->x_current - endp->x_current;
- fixed dx_den = dx_old + endp->x_next - alp->x_next;
- 
--if (dx_den <= dx_old)
-+if (dx_den <= dx_old || dx_den == 0)
- return false; /* Intersection isn't possible. */
- dy = y1 - y;
- if_debug3('F', "[F]cross: dy=%g, dx_old=%g, dx_new=%g\n",
-@@ -1750,7 +1750,7 @@ intersect(active_line *endp, active_line *alp, fixed y, 
fixed y1, fixed *p_y_new
- /* Do the computation in single precision */
- /* if the values are small enough. */
- y_new =
--((dy | dx_old) < 1L << (size_of(fixed) * 4 - 1) ?
-+(((ufixed)(dy | dx_old)) < (1L << (size_of(fixed) * 4 - 1)) ?
-  dy * dx_old / dx_den :
-  (INCR_EXPR(mq_cross), fixed_mult_quo(dy, dx_old, dx_den)))
- + y;
--- 
-2.10.2
-
diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch 
b/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch
deleted file mode 100644
index 5e1e8ba..000
--- a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From daf85701dab05f17e924a48a81edc9195b4a04e8 Mon Sep 17 00:00:00 2001
-From: Ken Sharp 
-Date: Wed, 21 Dec 2016 16:54:14 +
-Subject: [PATCH] fix crash with bad data supplied to makeimagedevice
-
-Bug #697450 "Null pointer dereference in gx_device_finalize()"
-
-The problem here is that the code to finalise a device unconditionally
-frees the icc_struct member of the device structure. However this
-particular (weird) device is not setup as a normal device, probably
-because its very, very ancient. Its possible for the initialisation
-of the device to abort with an error before calling gs_make_mem_device()
-which is where the icc_struct member gets allocated (or set to NULL).
-
-If that happens, then the cleanup code tries to free the device, which
-calls finalize() which tries to free a garbage pointer.
-
-Setting the device memory to 0x00 after we allocate it means that the
-icc_struct member will be NULL< and our memory manager allows for that
-happily enough, which avoids the problem.
-
-Upstream-Status: Backport
-CVE: CVE-2016-10220
-
-Signed-off-by: Catalin Enache 

- base/gsdevmem.c | 12 
- 1 file changed, 12 insertions(+)
-
-diff --git a/base/gsdevmem.c b/base/gsdevmem.c
-index 97b9cf4..fe75bcc 100644
 a/base/gsdevmem.c
-+++ b/base/gsdevmem.c
-@@ -225,6 +225,18 @@ gs_makewordimagedevice(gx_device ** pnew_dev, const 
gs_matrix * pmat,
- 
- if (pnew == 0)
-

[OE-core] [-oe-core][v2][PATCH 0/3] *** ghostscript 9.21 ***

2017-06-13 Thread Joe Slater
Resolve issue with not using CUPSCONFIG.  Also, set up PACKAGECONFIG
to allow X11 support, but do not enable it.  Use of X11 has been
minimally verified.

Joe Slater (3):
  ghostscript:   move to version 9.21
  ghostscript: add X11 PACKAGECONFIG info
  ghostscript: specify CUPSCONFIG

 .../ghostscript/ghostscript/CVE-2016-10219.patch   | 49 ---
 .../ghostscript/ghostscript/CVE-2016-10220.patch   | 55 --
 .../ghostscript/ghostscript/CVE-2016-8602.patch| 47 --
 .../ghostscript/ghostscript/CVE-2017-7975.patch| 23 -
 .../ghostscript/avoid-host-contamination.patch | 19 
 ...t-9.21-native-fix-disable-system-libtiff.patch} | 22 -
 ... => ghostscript-9.21-prevent_recompiling.patch} | 25 +-
 .../ghostscript/ghostscript/mkdir-p.patch  | 36 ++
 .../{ghostscript_9.20.bb => ghostscript_9.21.bb}   | 37 +++
 9 files changed, 116 insertions(+), 197 deletions(-)
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2016-8602.patch
 create mode 100644 
meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch
 rename 
meta/recipes-extended/ghostscript/ghostscript/{ghostscript-native-fix-disable-system-libtiff.patch
 => ghostscript-9.21-native-fix-disable-system-libtiff.patch} (67%)
 rename 
meta/recipes-extended/ghostscript/ghostscript/{ghostscript-9.02-prevent_recompiling.patch
 => ghostscript-9.21-prevent_recompiling.patch} (81%)
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch
 rename meta/recipes-extended/ghostscript/{ghostscript_9.20.bb => 
ghostscript_9.21.bb} (76%)

-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for attr: Fix build failure when image includes man-pages pkg

2017-06-13 Thread Patchwork
== Series Details ==

Series: attr: Fix build failure when image includes man-pages pkg
Revision: 1
URL   : https://patchwork.openembedded.org/series/7225/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Added patch file is missing Upstream-Status in the header 
[test_upstream_status_presence] 
  Suggested fixAdd Upstream-Status:  to the header of 
meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
 (possible values: Pending, Submitted, Accepted, Backport, Denied, 
Inappropriate)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH resend] qemuboot.conf: make cpus match built artifacts

2017-06-13 Thread Martin Kelly

On 05/22/2017 11:09 AM, Martin Kelly wrote:

On 05/22/2017 10:53 AM, Randy Witt wrote:

On 05/22/2017 10:29 AM, Martin Kelly wrote:

(friendly ping)

On 05/02/2017 12:20 PM, Martin Kelly wrote:

Currently, the qemu CPUs for are specified as generic, but the built
artifacts are not. For example, we build x86-64 artifacts targeting
core2duo but run them in qemu with generic qemu/kvm CPUs. This causes
some packages that take advantage of the host architecture to crash
because they try to use CPU features not advertised by qemu. As an
example, Qt uses ssse3. When artifacts linked against Qt and built
targeting core2duo attempt to run on a generic qemu/kvm CPU, we get
the following crash:

Incompatible processor. This Qt build requires the following features:
 ssse3

We could fix this by making packages like Qt not take advantage of CPU
features. However, we will probably keep facing similar issues over
time, so it's better to resolve them in a more enduring way.


If the MACHINE is a generic qemu, it seems more correct to build without
the extensions. For instance, what happens when core2duo doesn't have
all the necessary instructions that some package decided to use?

I like the idea of being able to exercise the code, but I only see this
fix as pushing the maintenance until the problem appears again later.



Currently, I believe we're passing in all the right flags (e.g. -march)
to specify a core2duo build, so GCC should not issue any instructions
that a core2duo wouldn't support. By passing in these flags, we're
allowing recipes to issue core2duo instructions and then creating a
runtime environment that doesn't support those same instructions (bug).

I don't think we're deferring any maintenance; unless we change the
-march and similar flags to be something other than core2duo, I think
the problems should go away. If we make that change, we should update
the qemu CPUs at the same time.

We can solve the problem in one of two ways:

- Make qemu run as core2duo
- Make recipes build as something even more basic

The second change is much more involved than the first. I don't which
-march (and similar) flags are the closest match to the generic qemu
32/qemu64 CPUs. However, I suspect there may not be a perfect match.
And, core2duo is already quite old and basic by today's standards
anyway, so I think bringing the qemu CPUs up to match is the simplest
and best way to fix the issue.



(ping)



Fix this by making the qemu -cpu arguments match the built artifacts.

Signed-off-by: Martin Kelly 
---

I sent this to p...@yoctoproject.org but it should have gone to
OE-core,
so I'm resending it now to restart the discussion on the right mailing
list. There were some comments about it in a previous mail thread on
the
poky mailing list:

https://lists.yoctoproject.org/pipermail/poky/2017-April/010956.html

 meta/conf/machine/include/qemuboot-x86.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/conf/machine/include/qemuboot-x86.inc
b/meta/conf/machine/include/qemuboot-x86.inc
index 06ac983..acd03a1 100644
--- a/meta/conf/machine/include/qemuboot-x86.inc
+++ b/meta/conf/machine/include/qemuboot-x86.inc
@@ -1,12 +1,12 @@
 # For runqemu
 IMAGE_CLASSES += "qemuboot"
 QB_SYSTEM_NAME_x86 = "qemu-system-i386"
-QB_CPU_x86 = "-cpu qemu32"
-QB_CPU_KVM_x86 = "-cpu kvm32"
+QB_CPU_x86 = "-cpu pentium2"
+QB_CPU_KVM_x86 = "-cpu pentium2"

 QB_SYSTEM_NAME_x86-64 = "qemu-system-x86_64"
 QB_CPU_x86-64 = "-cpu core2duo"
-QB_CPU_KVM_x86-64 = "-cpu kvm64"
+QB_CPU_KVM_x86-64 = "-cpu core2duo"

 QB_AUDIO_DRV = "alsa"
 QB_AUDIO_OPT = "-soundhw ac97,es1370"




--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] attr: Fix build failure when image includes man-pages pkg

2017-06-13 Thread Mark Asselstine
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 
---
 meta/recipes-support/attr/attr_2.4.47.bb   |   2 +
 ...ve-the-attr.5-man-page-moved-to-man-pages.patch | 240 
 .../files/Remove-the-section-2-man-pages.patch | 666 +
 3 files changed, 908 insertions(+)
 create mode 100644 
meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
 create mode 100644 
meta/recipes-support/attr/files/Remove-the-section-2-man-pages.patch

diff --git a/meta/recipes-support/attr/attr_2.4.47.bb 
b/meta/recipes-support/attr/attr_2.4.47.bb
index 556c8e4..2dada7a 100644
--- a/meta/recipes-support/attr/attr_2.4.47.bb
+++ b/meta/recipes-support/attr/attr_2.4.47.bb
@@ -4,6 +4,8 @@ require attr.inc
 # future releases of attr, remove this when updating the recipe.
 SRC_URI += "file://attr-Missing-configure.ac.patch \
 file://dont-use-decl-macros.patch \
+file://Remove-the-section-2-man-pages.patch \
+file://Remove-the-attr.5-man-page-moved-to-man-pages.patch \
"
 
 SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7"
diff --git 
a/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
 
b/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
new file mode 100644
index 000..7fcb310
--- /dev/null
+++ 
b/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
@@ -0,0 +1,240 @@
+From 6047c8522b91235ad1e835f44f5e36472d9d49b2 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher 
+Date: Wed, 22 Apr 2015 11:46:59 +0200
+Subject: [PATCH 2/2] Remove the attr.5 man page (moved to man-pages)
+
+Commit dce9b4448c7f2b22bd206cd068fb05cb2f3255b9 from
+https://git.savannah.nongnu.org/git/attr.git
+
+The attr.5 page is part of the extended attribute system call documentation,
+which has been moved into the man-pages package. Move the attr.5 page there
+as well.
+
+Upstream-status: Backport
+
+[MA: updated to apply directly to v2.4.47]
+Signed-off-by: Mark Asselstine 
+---
+ man/Makefile  |   2 +-
+ man/man5/Makefile |  35 -
+ man/man5/attr.5   | 153 --
+ 3 files changed, 1 insertion(+), 189 deletions(-)
+ delete mode 100644 man/man5/Makefile
+ delete mode 100644 man/man5/attr.5
+
+diff --git a/man/Makefile b/man/Makefile
+index 755daed..9301f09 100644
+--- a/man/Makefile
 b/man/Makefile
+@@ -19,7 +19,7 @@
+ TOPDIR = ..
+ include $(TOPDIR)/include/builddefs
+ 
+-SUBDIRS = man1 man3 man5
++SUBDIRS = man1 man3
+ 
+ default : $(SUBDIRS)
+ 
+diff --git a/man/man5/Makefile b/man/man5/Makefile
+deleted file mode 100644
+index 6b70d3d..000
+--- a/man/man5/Makefile
 /dev/null
+@@ -1,35 +0,0 @@
+-#
+-# Copyright (c) 2000, 2002 Silicon Graphics, Inc.  All Rights Reserved.
+-# Copyright (C) 2009  Andreas Gruenbacher 
+-#
+-# This program is free software: you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License as published by
+-# the Free Software Foundation, either version 2 of the License, or
+-# (at your option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program.  If not, see .
+-#
+-
+-TOPDIR = ../..
+-include $(TOPDIR)/include/builddefs
+-
+-MAN_SECTION   = 5
+-
+-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
+-MAN_DEST  = $(PKG_MAN_DIR)/man$(MAN_SECTION)
+-LSRCFILES = $(MAN_PAGES)
+-
+-default : $(MAN_PAGES)
+-
+-include $(BUILDRULES)
+-
+-install : default
+-  $(INSTALL) -m 755 -d $(MAN_DEST)
+-  $(INSTALL_MAN)
+-install-dev install-lib:
+diff --git a/man/man5/attr.5 b/man/man5/attr.5
+deleted file mode 100644
+index a02757d..000
+--- a/man/man5/attr.5
 /dev/null
+@@ -1,153 +0,0 @@
+-.\" Extended attributes manual page
+-.\"
+-.\" Copyright (C) 2000, 2002, 2007  Andreas Gruenbacher 
+-.\" Copyright (C) 2001, 2002, 2004, 2007 Silicon Graphics, Inc.
+-.\" All rights reserved.
+-.\"
+-.\" This is free documentation; you can redistribut

[OE-core] [PATCH 2/2] bluez5: add more PACKAGECONFIG options

2017-06-13 Thread Marc Ferland
This patch adds missing PACKAGECONFIG options and allow for a more
fine-grained build of bluez5.

I took care of providing a default configuration that matches the
previous default config.

Signed-off-by: Marc Ferland 
---
 meta/recipes-connectivity/bluez5/bluez5.inc | 28 +
 meta/recipes-connectivity/bluez5/bluez5_5.45.bb |  2 +-
 2 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc 
b/meta/recipes-connectivity/bluez5/bluez5.inc
index 5fc49f3..f267c66 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -12,13 +12,35 @@ RPROVIDES_${PN} += "bluez-hcidump"
 
 RCONFLICTS_${PN} = "bluez4"
 
-PACKAGECONFIG ??= "obex-profiles readline 
${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG ??= "obex-profiles \
+readline \
+${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+a2dp-profiles \
+avrcp-profiles \
+network-profiles \
+hid-profiles \
+hog-profiles \
+tools \
+deprecated \
+"
 PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical"
 PACKAGECONFIG[readline] = "--enable-client,--disable-client,readline,"
 PACKAGECONFIG[testing] = "--enable-testing,--disable-testing"
 PACKAGECONFIG[midi] = "--enable-midi,--disable-midi,alsa-lib"
 PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd"
 PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,,cups"
+PACKAGECONFIG[nfc] = "--enable-nfc,--disable-nfc"
+PACKAGECONFIG[sap-profiles] = "--enable-sap,--disable-sap"
+PACKAGECONFIG[a2dp-profiles] = "--enable-a2dp,--disable-a2dp"
+PACKAGECONFIG[avrcp-profiles] = "--enable-avrcp,--disable-avrcp"
+PACKAGECONFIG[network-profiles] = "--enable-network,--disable-network"
+PACKAGECONFIG[hid-profiles] = "--enable-hid,--disable-hid"
+PACKAGECONFIG[hog-profiles] = "--enable-hog,--disable-hog"
+PACKAGECONFIG[health-profiles] = "--enable-health,--disable-health"
+PACKAGECONFIG[sixaxis] = "--enable-sixaxis,--disable-sixaxis"
+PACKAGECONFIG[tools] = "--enable-tools,--disable-tools"
+PACKAGECONFIG[threads] = "--enable-threads,--disable-threads"
+PACKAGECONFIG[deprecated] = "--enable-deprecated,--disable-deprecated"
 
 SRC_URI = "\
 ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
@@ -33,8 +55,6 @@ S = "${WORKDIR}/bluez-${PV}"
 inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest
 
 EXTRA_OECONF = "\
-  --enable-tools \
-  --enable-deprecated \
   --enable-test \
   --enable-datafiles \
   --enable-library \
@@ -48,7 +68,7 @@ NOINST_TOOLS_BT ??= ""
 NOINST_TOOLS = " \
 ${@bb.utils.contains('PACKAGECONFIG', 'readline', 
'${NOINST_TOOLS_READLINE}', '', d)} \
 ${@bb.utils.contains('PACKAGECONFIG', 'testing', 
'${NOINST_TOOLS_TESTING}', '', d)} \
-${NOINST_TOOLS_BT} \
+${@bb.utils.contains('PACKAGECONFIG', 'tools', '${NOINST_TOOLS_BT}', '', 
d)} \
 "
 
 do_install_append() {
diff --git a/meta/recipes-connectivity/bluez5/bluez5_5.45.bb 
b/meta/recipes-connectivity/bluez5/bluez5_5.45.bb
index ee5e88f..d5f516c 100644
--- a/meta/recipes-connectivity/bluez5/bluez5_5.45.bb
+++ b/meta/recipes-connectivity/bluez5/bluez5_5.45.bb
@@ -8,7 +8,7 @@ SRC_URI[sha256sum] = 
"4cacb00703a6bc149cb09502257d321597d43952374a16f3558766ffa8
 # noinst programs in Makefile.tools that are conditional on READLINE
 # support
 NOINST_TOOLS_READLINE ?= " \
-attrib/gatttool \
+${@bb.utils.contains('PACKAGECONFIG', 'deprecated', 'attrib/gatttool', '', 
d)} \
 tools/obex-client-tool \
 tools/obex-server-tool \
 tools/bluetooth-player \
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] bluez5: remove libusb dependency

2017-06-13 Thread Marc Ferland
Not a dependency since version 5.9.

Signed-off-by: Marc Ferland 
---
 meta/recipes-connectivity/bluez5/bluez5.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc 
b/meta/recipes-connectivity/bluez5/bluez5.inc
index 01ade7d..5fc49f3 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -6,7 +6,7 @@ LICENSE = "GPLv2+ & LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
 file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
 
file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e"
-DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck"
+DEPENDS = "udev dbus-glib glib-2.0 libcheck"
 PROVIDES += "bluez-hcidump"
 RPROVIDES_${PN} += "bluez-hcidump"
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] mesa: Upgrade to 17.1.2 release

2017-06-13 Thread Otavio Salvador
Bug fixes

Bug 98833 - [REGRESSION, bisected] Wayland revert commit breaks non-Vsync 
fullscreen frame updates
Bug 100741 - Chromium - Memory leak
Bug 100877 - vulkan/tests/block_pool_no_free regression
Bug 101110 - Build failure in GNOME Continuous

Signed-off-by: Otavio Salvador 
---

 meta/recipes-graphics/mesa/{mesa-gl_17.1.1.bb => mesa-gl_17.1.2.bb} | 0
 meta/recipes-graphics/mesa/{mesa_17.1.1.bb => mesa_17.1.2.bb}   | 4 ++--
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-graphics/mesa/{mesa-gl_17.1.1.bb => mesa-gl_17.1.2.bb} 
(100%)
 rename meta/recipes-graphics/mesa/{mesa_17.1.1.bb => mesa_17.1.2.bb} (85%)

diff --git a/meta/recipes-graphics/mesa/mesa-gl_17.1.1.bb 
b/meta/recipes-graphics/mesa/mesa-gl_17.1.2.bb
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa-gl_17.1.1.bb
rename to meta/recipes-graphics/mesa/mesa-gl_17.1.2.bb
diff --git a/meta/recipes-graphics/mesa/mesa_17.1.1.bb 
b/meta/recipes-graphics/mesa/mesa_17.1.2.bb
similarity index 85%
rename from meta/recipes-graphics/mesa/mesa_17.1.1.bb
rename to meta/recipes-graphics/mesa/mesa_17.1.2.bb
index ff84015aee..5f27020470 100644
--- a/meta/recipes-graphics/mesa/mesa_17.1.1.bb
+++ b/meta/recipes-graphics/mesa/mesa_17.1.2.bb
@@ -8,8 +8,8 @@ SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/mesa-${PV}.tar.xz 
\
file://0002-hardware-gloat.patch \
 "
 
-SRC_URI[md5sum] = "a4844bc6052578574f9629458bcbb749"
-SRC_URI[sha256sum] = 
"aed503f94c0c1630a162a3e276f4ee12a86764cee4cb92338ea2dea99a04e7ef"
+SRC_URI[md5sum] = "4d2eaf5955740b044afd95ed167c906c"
+SRC_URI[sha256sum] = 
"0937804f43746339b1f9540d8f9c8b4a1bb3d3eec0e4020eac283b8799798239"
 
 #because we cannot rely on the fact that all apps will use pkgconfig,
 #make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
-- 
2.13.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 7/7] ovmf: Update to latest

2017-06-13 Thread Khem Raj
On Tue, Jun 13, 2017 at 10:10 AM, Khem Raj  wrote:
> On Tue, Jun 13, 2017 at 9:43 AM, Burton, Ross  wrote:
>>
>> On 12 June 2017 at 15:59, Khem Raj  wrote:
>>>
>>> Fix build with gcc7
>>>
>>> clang can not compile it therefore mark it gcc only recipe
>>
>>
>> This doesn't apply to master, can you rebase?

applied the rebased patch to kraj/pu

>>
>
> ok.
>
>> Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] tcf-agent: Fix daemon termination

2017-06-13 Thread Martin Kelly

On 06/13/2017 09:52 AM, Burton, Ross wrote:


On 13 June 2017 at 17:46, Martin Kelly mailto:mke...@xevo.com>> wrote:

Ah, I was checking meta-openembedded by mistake. Thanks.


The Best Known Method is to have a oe-core clone that you use for
pushing stuff upstream, and then you can just rebase to see what has
been merged or what hasn't yet merged and needs rebasing.



Yep, I normally do that, but I have a few patches in flight between 
OE-core and meta-oe and I had forgotten which went where :).

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 7/7] ovmf: Update to latest

2017-06-13 Thread Khem Raj
On Tue, Jun 13, 2017 at 9:43 AM, Burton, Ross  wrote:
>
> On 12 June 2017 at 15:59, Khem Raj  wrote:
>>
>> Fix build with gcc7
>>
>> clang can not compile it therefore mark it gcc only recipe
>
>
> This doesn't apply to master, can you rebase?
>

ok.

> Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] tcf-agent: Fix daemon termination

2017-06-13 Thread Martin Kelly

On 06/13/2017 09:38 AM, Burton, Ross wrote:


On 13 June 2017 at 17:35, Martin Kelly mailto:mke...@xevo.com>> wrote:

Alright, makes sense. Do the patches look OK to you?


Yes, they're both in master now.



Ah, I was checking meta-openembedded by mistake. Thanks.
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] tcf-agent: Fix daemon termination

2017-06-13 Thread Burton, Ross
On 13 June 2017 at 17:46, Martin Kelly  wrote:

> Ah, I was checking meta-openembedded by mistake. Thanks.
>

The Best Known Method is to have a oe-core clone that you use for pushing
stuff upstream, and then you can just rebase to see what has been merged or
what hasn't yet merged and needs rebasing.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] util-linux: upgrade to 2.30

2017-06-13 Thread Denys Dmytriyenko
On Tue, Jun 13, 2017 at 02:04:02PM +0100, Richard Purdie wrote:
> On Mon, 2017-06-12 at 14:23 -0400, Denys Dmytriyenko wrote:
> > Ping. Any comments, issues?
> 
> https://autobuilder.yocto.io/builders/build-appliance/builds/306/steps/BuildImages_1/logs/stdio
> 
> 
> ERROR: util-linux-2.30-r0 do_install_ptest_base: Function failed: 
> do_install_ptest_base (log file is located at 
> /home/pokybuild/yocto-autobuilder/yocto-worker/build-appliance/build/build/tmp/work/core2-64-poky-linux/util-linux/2.30-r0/temp/log.do_install_ptest_base.48825)
> ERROR: Logfile of failure stored in: 
> /home/pokybuild/yocto-autobuilder/yocto-worker/build-appliance/build/build/tmp/work/core2-64-poky-linux/util-linux/2.30-r0/temp/log.do_install_ptest_base.48825
> Log data follows:
> | DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 
> 'bit-64', 'x86_64-linux', 'common']
> | DEBUG: Executing shell function do_install_ptest_base
> | cp: cannot stat 
> '/home/pokybuild/yocto-autobuilder/yocto-worker/build-appliance/build/build/tmp/work/core2-64-poky-linux/util-linux/2.30-r0/util-linux-2.30/tests/ts/tailf':
>  No such file or directory
> | WARNING: exit code 1 from a shell command.
> | ERROR: Function failed: do_install_ptest_base (log file is located at 
> /home/pokybuild/yocto-autobuilder/yocto-worker/build-appliance/build/build/tmp/work/core2-64-poky-linux/util-linux/2.30-r0/temp/log.do_install_ptest_base.48825)
> NOTE: recipe util-linux-2.30-r0: task do_install_ptest_base: Failed

Thanks. v2 sent.

-- 
Denys
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] util-linux: upgrade to 2.30

2017-06-13 Thread Denys Dmytriyenko
From: Denys Dmytriyenko 

Drop uuid-test-error-api.patch as it's been fixed upstream differently:
https://github.com/karelzak/util-linux/commit/b770b487004778f4425639c7ed1bb6ca22d157bf

Drop ptest for tailf, as it got deprecated and removed:
https://github.com/karelzak/util-linux/commit/70ca1a77721b41f2355eeb00d4e55e13dba3e313

Signed-off-by: Denys Dmytriyenko 
---
v2 - fix ptest breakage

 meta/recipes-core/util-linux/util-linux.inc|  2 +-
 .../util-linux/uuid-test-error-api.patch   | 99 --
 .../{util-linux_2.29.2.bb => util-linux_2.30.bb}   |  7 +-
 3 files changed, 4 insertions(+), 104 deletions(-)
 delete mode 100644 
meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
 rename meta/recipes-core/util-linux/{util-linux_2.29.2.bb => 
util-linux_2.30.bb} (80%)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index 63302a9..1656e92 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -304,7 +304,7 @@ do_install_ptest() {
 cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/
 cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
 
-list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock 
ipcs isosize login look md5 misc more namei paths schedutils script swapon 
tailf"
+list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock 
ipcs isosize login look md5 misc more namei paths schedutils script swapon"
 # The following tests are not installed  yet:
 # blkid scsi_debug module dependent
 # cramfs gcc dependent
diff --git a/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch 
b/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
deleted file mode 100644
index a6fde5d..000
--- a/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-This patch adds error() API implementation for non-glibc system C libs
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj 
-

- misc-utils/test_uuidd.c | 62 -
- 1 file changed, 61 insertions(+), 1 deletion(-)
-
-diff --git a/misc-utils/test_uuidd.c b/misc-utils/test_uuidd.c
-index 36f3b3d..7d579ce 100644
 a/misc-utils/test_uuidd.c
-+++ b/misc-utils/test_uuidd.c
-@@ -23,7 +23,6 @@
-  *
-  *make uuidd uuidgen localstatedir=/var
-  */
--#include 
- #include 
- #include 
- #include 
-@@ -38,6 +37,17 @@
- #include "xalloc.h"
- #include "strutils.h"
- 
-+#ifdef __GLIBC__
-+#include 
-+#else
-+extern void (*error_print_progname)(void);
-+extern unsigned int error_message_count;
-+extern int error_one_per_line;
-+
-+void error(int, int, const char *, ...);
-+void error_at_line(int, int, const char *, unsigned int, const char *, ...);
-+#endif
-+
- #define LOG(level,args) if (loglev >= level) { fprintf args; }
- 
- size_t nprocesses = 4;
-@@ -256,6 +266,56 @@ static void object_dump(size_t idx, object_t *obj)
-   fprintf(stderr, "}\n");
- }
- 
-+#ifndef __GLIBC__
-+extern char *__progname;
-+
-+void (*error_print_progname)(void) = 0;
-+unsigned int error_message_count = 0;
-+int error_one_per_line = 0;
-+
-+static void eprint(int status, int e, const char *file, unsigned int line, 
const char *fmt, va_list ap)
-+{
-+  if (file && error_one_per_line) {
-+  static const char *oldfile;
-+  static unsigned int oldline;
-+  if (line == oldline && strcmp(file, oldfile) == 0)
-+  return;
-+  oldfile = file;
-+  oldline = line;
-+  }
-+  if (error_print_progname)
-+  error_print_progname();
-+  else
-+  fprintf(stderr, "%s: ", __progname);
-+  if (file)
-+  fprintf(stderr, "%s:%u: ", file, line);
-+  vfprintf(stderr, fmt, ap);
-+  if (e)
-+  fprintf(stderr, ": %s", strerror(e));
-+  putc('\n', stderr);
-+  fflush(stderr);
-+  error_message_count++;
-+  if (status)
-+  exit(status);
-+}
-+
-+void error(int status, int e, const char *fmt, ...)
-+{
-+  va_list ap;
-+  va_start(ap,fmt);
-+  eprint(status, e, 0, 0, fmt, ap);
-+  va_end(ap);
-+}
-+
-+void error_at_line(int status, int e, const char *file, unsigned int line, 
const char *fmt, ...)
-+{
-+  va_list ap;
-+  va_start(ap,fmt);
-+  eprint(status, e, file, line, fmt, ap);
-+  va_end(ap);
-+}
-+#endif /* __GLIBC__ */
-+
- int main(int argc, char *argv[])
- {
-   size_t i, nfailed = 0, nignored = 0;
--- 
-2.8.3
-
diff --git a/meta/recipes-core/util-linux/util-linux_2.29.2.bb 
b/meta/recipes-core/util-linux/util-linux_2.30.bb
similarity index 80%
rename from meta/recipes-core/util-linux/util-linux_2.29.2.bb
rename to meta/recipes-core/util-linux/util-linux_2.30.bb
index 11303f8..6b309b5 100644
--- a/meta/recipes-core/util-linux/util-linux_2.29.2.bb
+++ b/meta/recipes-core/util-linux

Re: [OE-core] [PATCH] tcf-agent: Fix daemon termination

2017-06-13 Thread Martin Kelly

On 06/07/2017 12:09 PM, Burton, Ross wrote:


On 7 June 2017 at 17:33, Martin Kelly mailto:mke...@xevo.com>> wrote:

Which patch are you referring to? I used git send-email for the
systemd patch, and it applies just fine for me on OE-core master
(using patch -p1).


Sorry, forgot to trim recipients.  Yes, it was Jan's patch.



Alright, makes sense. Do the patches look OK to you?
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] externalsrc: verify that EXTERNALSRC/EXTERNALSRC_BUILD are absolute paths

2017-06-13 Thread Ross Burton
If these are set to URLs then the errors produced are not helpful.

Signed-off-by: Ross Burton 
---
 meta/classes/externalsrc.bbclass | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index d64af6a..529be49 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -29,6 +29,12 @@ EXTERNALSRC_SYMLINKS ?= "oe-workdir:${WORKDIR} oe-logs:${T}"
 
 python () {
 externalsrc = d.getVar('EXTERNALSRC')
+externalsrcbuild = d.getVar('EXTERNALSRC_BUILD')
+
+if externalsrc and not externalsrc.startswith("/"):
+bb.error("EXTERNALSRC must be an absolute path")
+if externalsrcbuild and not externalsrcbuild.startswith("/"):
+bb.error("EXTERNALSRC_BUILD must be an absolute path")
 
 # If this is the base recipe and EXTERNALSRC is set for it or any of its
 # derivatives, then enable BB_DONT_CACHE to force the recipe to always be
@@ -48,7 +54,6 @@ python () {
 
 if externalsrc:
 d.setVar('S', externalsrc)
-externalsrcbuild = d.getVar('EXTERNALSRC_BUILD')
 if externalsrcbuild:
 d.setVar('B', externalsrcbuild)
 else:
-- 
2.8.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 7/7] ovmf: Update to latest

2017-06-13 Thread Burton, Ross
On 12 June 2017 at 15:59, Khem Raj  wrote:

> Fix build with gcc7
>
> clang can not compile it therefore mark it gcc only recipe
>

This doesn't apply to master, can you rebase?

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] tcf-agent: Fix daemon termination

2017-06-13 Thread Burton, Ross
On 13 June 2017 at 17:35, Martin Kelly  wrote:

> Alright, makes sense. Do the patches look OK to you?
>

Yes, they're both in master now.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] rpm: run binary package generation via thread pools

2017-06-13 Thread Leonardo Sandoval
On Tue, 2017-06-13 at 19:13 +0300, Alexander Kanavin wrote:

> 
> Have you ran these all at once? If so, then the wall times aren't very 
> meaningful: if the CPU is already saturated by having a lot of bitbake 
> tasks running, then adding further threads to these tasks isn't going to 
> make anything finish faster than before.

I ran them serially

> 
> 
> Alex
> 


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] rpm: run binary package generation via thread pools

2017-06-13 Thread Alexander Kanavin

On 06/13/2017 07:15 PM, Leonardo Sandoval wrote:

On Mon, 2017-06-12 at 14:29 -0500, Leonardo Sandoval wrote:

On Mon, 2017-06-12 at 17:58 +0300, Alexander Kanavin wrote:

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.



What is the buildstat value (those from /proc/[PID]) you think this
patch would make a considerable performance burst?

These are the top most consuming recipes just for the task of interested
(do_package_write_rpm)

without this patch:

do_package_write_rpm glibc-locale-2.25-r0 268.87 seconds
do_package_write_rpm perl-5.24.1-r0 85.87 seconds
do_package_write_rpm python3-3.5.3-r1.0 38.01 seconds
do_package_write_rpm gtk+3-3.22.8-r0 30.10 seconds
do_package_write_rpm libxml2-2.9.4-r0 25.97 seconds
do_package_write_rpm glibc-2.25-r0 25.67 seconds
do_package_write_rpm db-1_5.3.28-r1 23.80 seconds
do_package_write_rpm binutils-2.28-r0 22.92 seconds
do_package_write_rpm util-linux-2.29.1-r0 20.86 seconds
do_package_write_rpm mesa-2_17.0.6-r0 20.32 seconds

with this patch:


do_package_write_rpm perl-5.24.1-r0 68.77 seconds
do_package_write_rpm glibc-locale-2.25-r0 53.59 seconds
do_package_write_rpm python3-3.5.3-r1.0 30.88 seconds
do_package_write_rpm libxml2-2.9.4-r0 30.51 seconds
do_package_write_rpm glibc-2.25-r0 29.99 seconds
do_package_write_rpm glib-2.0-1_2.52.2-r0 29.24 seconds
do_package_write_rpm db-1_5.3.28-r1 24.47 seconds
do_package_write_rpm coreutils-8.27-r0 23.93 seconds
do_package_write_rpm gettext-0.19.8.1-r0 23.88 seconds
do_package_write_rpm gtk+3-3.22.15-r0 23.48 seconds

times are not wall-times, these are times coming from the bitbake
scheduler but I believe this provide us some insight.


Just one minor correction after briefly discussing with RP: these are
indeed wall times (real times), which is the delta between the starting
and finishing times for the relevant tasks.


Have you ran these all at once? If so, then the wall times aren't very 
meaningful: if the CPU is already saturated by having a lot of bitbake 
tasks running, then adding further threads to these tasks isn't going to 
make anything finish faster than before.



Alex

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] rpm: run binary package generation via thread pools

2017-06-13 Thread Leonardo Sandoval
On Mon, 2017-06-12 at 14:29 -0500, Leonardo Sandoval wrote:
> On Mon, 2017-06-12 at 17:58 +0300, Alexander Kanavin wrote:
> > 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.
> > 
> 
> What is the buildstat value (those from /proc/[PID]) you think this
> patch would make a considerable performance burst?
> 
> These are the top most consuming recipes just for the task of interested
> (do_package_write_rpm)
> 
> without this patch:
> 
> do_package_write_rpm glibc-locale-2.25-r0 268.87 seconds
> do_package_write_rpm perl-5.24.1-r0 85.87 seconds
> do_package_write_rpm python3-3.5.3-r1.0 38.01 seconds
> do_package_write_rpm gtk+3-3.22.8-r0 30.10 seconds
> do_package_write_rpm libxml2-2.9.4-r0 25.97 seconds
> do_package_write_rpm glibc-2.25-r0 25.67 seconds
> do_package_write_rpm db-1_5.3.28-r1 23.80 seconds
> do_package_write_rpm binutils-2.28-r0 22.92 seconds
> do_package_write_rpm util-linux-2.29.1-r0 20.86 seconds
> do_package_write_rpm mesa-2_17.0.6-r0 20.32 seconds
> 
> with this patch:
> 
> 
> do_package_write_rpm perl-5.24.1-r0 68.77 seconds
> do_package_write_rpm glibc-locale-2.25-r0 53.59 seconds
> do_package_write_rpm python3-3.5.3-r1.0 30.88 seconds
> do_package_write_rpm libxml2-2.9.4-r0 30.51 seconds
> do_package_write_rpm glibc-2.25-r0 29.99 seconds
> do_package_write_rpm glib-2.0-1_2.52.2-r0 29.24 seconds
> do_package_write_rpm db-1_5.3.28-r1 24.47 seconds
> do_package_write_rpm coreutils-8.27-r0 23.93 seconds
> do_package_write_rpm gettext-0.19.8.1-r0 23.88 seconds
> do_package_write_rpm gtk+3-3.22.15-r0 23.48 seconds
> 
> times are not wall-times, these are times coming from the bitbake
> scheduler but I believe this provide us some insight.

Just one minor correction after briefly discussing with RP: these are
indeed wall times (real times), which is the delta between the starting
and finishing times for the relevant tasks.



> 
> Times where taken with the following cmd line
> 
> > scripts/contrib/bb-perf/buildstats.sh -t package_write_rpm -b  folder> -s 'Elapsed time' | sort -k3 -n -r | head
> 
> Leo
> 
> 
> > Signed-off-by: Alexander Kanavin 
> > ---
> >  ...y-package-building-into-a-separate-functi.patch |  84 +
> >  ...-binary-package-creation-via-thread-pools.patch | 127 
> >  ...c-make-operations-over-string-pools-threa.patch | 207 +
> >  ...c-remove-static-local-variables-from-buil.patch | 337 
> > +
> >  meta/recipes-devtools/rpm/rpm_git.bb   |   4 +
> >  5 files changed, 759 insertions(+)
> >  create mode 100644 
> > meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> >  create mode 100644 
> > meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
> >  create mode 100644 
> > meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
> >  create mode 100644 
> > meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
> > 
> > diff --git 
> > a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> >  
> > b/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> > new file mode 100644
> > index 000..6e44f0b7fc9
> > --- /dev/null
> > +++ 
> > b/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> > @@ -0,0 +1,84 @@
> > +From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001
> > +From: Alexander Kanavin 
> > +Date: Thu, 25 May 2017 18:15:27 +0300
> > +Subject: [PATCH 1/4] Split binary package building into a separate function
> > +
> > +So that it can be run as a thread pool task.
> > +
> > +Upstream-Status: Submitted 
> > [https://github.com/rpm-software-management/rpm/pull/226]
> > +Signed-off-by: Alexander Kanavin 
> > +
> > +---
> > + build/pack.c | 33 +
> > + 1 file changed, 21 insertions(+), 12 deletions(-)
> > +
> > +diff --git a/build/pack.c b/build/pack.c
> > +index 518f4e92a..ccfd614cc 100644
> > +--- a/build/pack.c
> >  b/build/pack.c
> > +@@ -546,18 +546,13 @@ static rpmRC checkPackages(char *pkgcheck)
> > + return RPMRC_OK;
> > + }
> > + 
> > +-rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> > ++static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, 
> > int cheating, char** filename)
> > + {
> > +-rpmRC rc;
> > +-const char *errorString;
> > +-Package pkg;
> > +-char *pkglist = NULL;
> > +-
> > +-for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
> > +-  char *fn;
> > ++  const char *errorString;
> > ++  rpmRC rc = RPMRC_OK;
> > + 
> > +   if (pkg->fileList == NULL)
> > +-  continue;
> > ++  return rc;
> > + 
> > +   if ((rc = processScriptFiles(spec, pkg)))
> > +   ret

Re: [OE-core] [PATCH 4/5] sstatetests: Use higher parallelism value

2017-06-13 Thread Andre McCurdy
On Tue, Jun 13, 2017 at 2:49 AM, Richard Purdie
 wrote:
> 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 
> ---
>  meta/lib/oeqa/selftest/cases/sstatetests.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py 
> b/meta/lib/oeqa/selftest/cases/sstatetests.py
> index 8d05e30..feadf3c 100644
> --- a/meta/lib/oeqa/selftest/cases/sstatetests.py
> +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
> @@ -418,7 +418,7 @@ DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
>
>  self.write_config("""
>  TMPDIR = "${TOPDIR}/tmp-sstatesamehash"
> -BB_NUMBER_THREADS = "1"
> +BB_NUMBER_THREADS = "${@oe.utils.cpu_count()}"
>  PARALLEL_MAKE = "-j 1"
>  DL_DIR = "${TOPDIR}/download1"
>  TIME = "11"
> @@ -431,7 +431,7 @@ http_proxy = ""
>  bitbake("world meta-toolchain -S none")
>  self.write_config("""
>  TMPDIR = "${TOPDIR}/tmp-sstatesamehash2"
> -BB_NUMBER_THREADS = "2"
> +BB_NUMBER_THREADS = "${@oe.utils.cpu_count()-1}"

What happens here if I have one CPU core?

>  PARALLEL_MAKE = "-j 2"
>  DL_DIR = "${TOPDIR}/download2"
>  TIME = "22"
> --
> 2.7.4
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] adwaita-icon-theme: add a patch to speed up the do_install() task

2017-06-13 Thread Alexander Kanavin
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 
---
 ...1-Run-installation-commands-as-shell-jobs.patch | 82 ++
 .../gnome/adwaita-icon-theme_3.24.0.bb |  3 +-
 2 files changed, 84 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch

diff --git 
a/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch
 
b/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch
new file mode 100644
index 000..6c38e237f40
--- /dev/null
+++ 
b/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch
@@ -0,0 +1,82 @@
+From 8dcd73b45a660dbdc560676835ba46f495334f14 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Tue, 13 Jun 2017 18:10:06 +0300
+Subject: [PATCH] Run installation commands as shell jobs
+
+This greatly speeds up installation time on multi-core systems.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin 
+---
+ src/fullcolor/Makefile.am | 3 ++-
+ src/spinner/Makefile.am   | 5 +++--
+ src/symbolic/Makefile.am  | 7 ---
+ 3 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/src/fullcolor/Makefile.am b/src/fullcolor/Makefile.am
+index 1c940a5..3998ee6 100644
+--- a/src/fullcolor/Makefile.am
 b/src/fullcolor/Makefile.am
+@@ -9,9 +9,10 @@ install-data-local:
+   for file in `cd $(top_srcdir)/$(SVGOUTDIR)/$$size && find . 
-name "*.png"`; do \
+   context="`dirname $$file`"; \
+   $(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
+-  $(install_sh_DATA) 
$(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \
++  $(install_sh_DATA) 
$(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \
+   done; \
+   done;
++  wait
+ 
+ ## FIXME we should add a way to remove links generated by icon mapping
+ uninstall-local:
+diff --git a/src/spinner/Makefile.am b/src/spinner/Makefile.am
+index 86f4d7c..3fae8c1 100644
+--- a/src/spinner/Makefile.am
 b/src/spinner/Makefile.am
+@@ -24,13 +24,14 @@ install-data-local:
+ for file in `cd $(top_srcdir)/$(SVGOUTDIR)/$$size; find . -name 
"*.png"`; do \
+ context="`dirname $$file`"; \
+ $(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
+-$(install_sh_DATA) 
$(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \
++$(install_sh_DATA) 
$(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \
+ done; \
+   for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32; find . 
-name "*.svg"`; do \
+   context="`dirname $$file`"; \
+   $(mkdir_p) $(DESTDIR)$(themedir)/scalable-up-to-32/$$context; \
+-  $(install_sh_DATA) 
$(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file 
$(DESTDIR)$(themedir)/scalable-up-to-32/$$file; \
++  $(install_sh_DATA) 
$(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file 
$(DESTDIR)$(themedir)/scalable-up-to-32/$$file & \
+   done
++  wait
+ 
+ uninstall-local:
+ for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32; 
find . -name "*.svg"`; do \
+diff --git a/src/symbolic/Makefile.am b/src/symbolic/Makefile.am
+index 24aac9b..61ba071 100644
+--- a/src/symbolic/Makefile.am
 b/src/symbolic/Makefile.am
+@@ -25,18 +25,19 @@ install-data-local:
+   for file in `cd $(top_srcdir)/$(SVGOUTDIR)/$$size; find . -name 
"*.png"`; do \
+   context="`dirname $$file`"; \
+   $(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
+-  $(install_sh_DATA) 
$(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \
++  $(install_sh_DATA) 
$(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file & \
+   done; \
+   done
+   for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable; find . -name 
"*.svg"`; do \
+   context="`dirname $$file`"; \
+   $(mkdir_p) $(DESTDIR)$(themedir)/scalable/$$context; \
+-  $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file 
$(DESTDIR)$(themedir)/scalable/$$file; \
++  $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable/$$file 
$(DESTDIR)$(themedir)/scalable/$$file & \
+   for size in $(symbolic_encode_sizes); do \
+   $(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
+-  $(GTK_ENCODE_SYMBOLIC_SVG) 
$(top_srcdir)/$

[OE-core] [PATCH] runqemu: change terminal settings for valid tty's

2017-06-13 Thread Mikko Ylinen
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 
---
 scripts/runqemu | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 311fbebdf4..26328e5b51 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -955,8 +955,8 @@ class BaseConfig(object):
 def setup_network(self):
 if self.get('QB_NET') == 'none':
 return
-cmd = "stty -g"
-self.saved_stty = subprocess.Popen(cmd, shell=True, 
stdout=subprocess.PIPE).stdout.read().decode('utf-8')
+if sys.stdin.isatty():
+self.saved_stty = subprocess.check_output("stty -g", 
shell=True).decode('utf-8')
 self.network_device = self.get('QB_NETWORK_DEVICE') or 
self.network_device
 if self.slirp_enabled:
 self.setup_slirp()
@@ -1096,9 +1096,9 @@ class BaseConfig(object):
 self.qemu_opt += " -snapshot"
 
 if self.serialstdio:
-logger.info("Interrupt character is '^]'")
-cmd = "stty intr ^]"
-subprocess.check_call(cmd, shell=True)
+if sys.stdin.isatty():
+subprocess.check_call("stty intr ^]", shell=True)
+logger.info("Interrupt character is '^]'")
 
 first_serial = ""
 if not re.search("-nographic", self.qemu_opt):
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4] mtools-native: disable reading host configs

2017-06-13 Thread Ed Bartosh
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 
---
 .../mtools/mtools/disable-hardcoded-configs.patch  | 23 ++
 meta/recipes-devtools/mtools/mtools_4.0.18.bb  |  1 +
 2 files changed, 24 insertions(+)
 create mode 100644 
meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch

diff --git 
a/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch 
b/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
new file mode 100644
index 000..01455f1
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
@@ -0,0 +1,23 @@
+Disabled reading host configs.
+
+Upstream-Status: Inappropriate [native]
+
+Signed-off-by: Ed Bartosh 
+
+--- mtools-4.0.18/config.c.orig2017-06-13 12:27:38.64400 +0300
 mtools-4.0.18/config.c 2017-06-13 12:28:47.57600 +0300
+@@ -701,14 +701,6 @@
+   memcpy(devices, const_devices,
+  nr_const_devices*sizeof(struct device));
+ 
+-(void) ((parse(CONF_FILE,1) |
+-   parse(LOCAL_CONF_FILE,1) |
+-   parse(SYS_CONF_FILE,1)) ||
+-  (parse(OLD_CONF_FILE,1) |
+-   parse(OLD_LOCAL_CONF_FILE,1)));
+-/* the old-name configuration files only get executed if none of the
+- * new-name config files were used */
+-
+ homedir = get_homedir();
+ if ( homedir ){
+   strncpy(conf_file, homedir, MAXPATHLEN );
diff --git a/meta/recipes-devtools/mtools/mtools_4.0.18.bb 
b/meta/recipes-devtools/mtools/mtools_4.0.18.bb
index b0efc9e..5d84001 100644
--- a/meta/recipes-devtools/mtools/mtools_4.0.18.bb
+++ b/meta/recipes-devtools/mtools/mtools_4.0.18.bb
@@ -33,6 +33,7 @@ SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \

file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \
"
 
+SRC_URI_append_class-native = " file://disable-hardcoded-configs.patch"
 
 inherit autotools texinfo
 
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/7] dhcp: switch from ftp to http

2017-06-13 Thread Maxin B. John
For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John 
---
 meta/recipes-connectivity/dhcp/dhcp.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc 
b/meta/recipes-connectivity/dhcp/dhcp.inc
index 969fdcb..eff3dc5 100644
--- a/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;beginline=4;md5=c5c64d696107f84b56fe337d14da1
 
 DEPENDS = "openssl bind"
 
-SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
+SRC_URI = "http://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
file://define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch \
file://init-relay file://default-relay \
file://init-server file://default-server \
-- 
2.4.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 7/7] grub: switch from ftp to https

2017-06-13 Thread Maxin B. John
For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John 
---
 meta/recipes-bsp/grub/grub2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index bb6ebdd..da6aad2 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -11,7 +11,7 @@ SECTION = "bootloaders"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
+SRC_URI = "https://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
file://autogen.sh-exclude-pc.patch \
-- 
2.4.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 6/7] libid3tag: switch from ftp to http

2017-06-13 Thread Maxin B. John
For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John 
---
 meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb 
b/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
index 05a8a47..cc48bae 100644
--- a/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
+++ b/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb
@@ -9,7 +9,7 @@ SECTION = "libs"
 DEPENDS = "zlib gperf-native"
 PR = "r7"
 
-SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libid3tag-${PV}.tar.gz \
+SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libid3tag-${PV}.tar.gz \
file://addpkgconfig.patch \
file://obsolete_automake_macros.patch \
 "
-- 
2.4.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/7] mesa-demos: switch from ftp to https

2017-06-13 Thread Maxin B. John
For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John 
---
 meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb 
b/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
index e43b9ef..bae3b18 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
@@ -9,7 +9,7 @@ LICENSE = "MIT & PD"
 LIC_FILES_CHKSUM = 
"file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e
 \
 
file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
 
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 
\
+SRC_URI = 
"https://mesa.freedesktop.org/archive/demos/${PV}/${BPN}-${PV}.tar.bz2 \
file://0001-mesa-demos-Add-missing-data-files.patch \

file://0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch \
file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
-- 
2.4.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/7] Moving from ftp to http/https

2017-06-13 Thread Maxin B. John
Reduce the usage of ftp protocol in SRC_URIs:

https://www.debian.org/News/2017/20170425

As part of [YOCTO #11413]


Maxin B. John (7):
  libpcre: switch from ftp to https
  dhcp: switch from ftp to http
  mesa-demos: switch from ftp to https
  mesa: switch from ftp to https
  libglu: switch from ftp to https
  libid3tag: switch from ftp to http
  grub: switch from ftp to https

 meta/recipes-bsp/grub/grub2.inc| 2 +-
 meta/recipes-connectivity/dhcp/dhcp.inc| 2 +-
 meta/recipes-graphics/mesa/libglu_9.0.0.bb | 2 +-
 meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb | 2 +-
 meta/recipes-graphics/mesa/mesa_17.1.1.bb  | 2 +-
 meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb | 2 +-
 meta/recipes-support/libpcre/libpcre_8.40.bb   | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.4.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 5/7] libglu: switch from ftp to https

2017-06-13 Thread Maxin B. John
For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John 
---
 meta/recipes-graphics/mesa/libglu_9.0.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/mesa/libglu_9.0.0.bb 
b/meta/recipes-graphics/mesa/libglu_9.0.0.bb
index 8b94613..eeb898f 100644
--- a/meta/recipes-graphics/mesa/libglu_9.0.0.bb
+++ b/meta/recipes-graphics/mesa/libglu_9.0.0.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = 
"file://include/GL/glu.h;endline=29;md5=6b79c570f644363b35645
 PE = "2"
 PR = "0"
 
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${PV}.tar.bz2";
+SRC_URI = "https://mesa.freedesktop.org/archive/glu/glu-${PV}.tar.bz2";
 
 SRC_URI[md5sum] = "be9249132ff49275461cf92039083030"
 SRC_URI[sha256sum] = 
"1f7ad0d379a722fcbd303aa5650c6d7d5544fde83196b42a73d1193568a4df12"
-- 
2.4.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/7] libpcre: switch from ftp to https

2017-06-13 Thread Maxin B. John
For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John 
---
 meta/recipes-support/libpcre/libpcre_8.40.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/libpcre/libpcre_8.40.bb 
b/meta/recipes-support/libpcre/libpcre_8.40.bb
index 6396872..8563cd1 100644
--- a/meta/recipes-support/libpcre/libpcre_8.40.bb
+++ b/meta/recipes-support/libpcre/libpcre_8.40.bb
@@ -7,7 +7,7 @@ HOMEPAGE = "http://www.pcre.org";
 SECTION = "devel"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENCE;md5=60da32d84d067f53e22071c4ecb4384d"
-SRC_URI = 
"ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PV}.tar.bz2 \
+SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre-${PV}.tar.bz2 \
file://pcre-cross.patch \
file://fix-pcre-name-collision.patch \
file://run-ptest \
-- 
2.4.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 4/7] mesa: switch from ftp to https

2017-06-13 Thread Maxin B. John
For the same reasons as Debian:
https://www.debian.org/News/2017/20170425

Signed-off-by: Maxin B. John 
---
 meta/recipes-graphics/mesa/mesa_17.1.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/mesa/mesa_17.1.1.bb 
b/meta/recipes-graphics/mesa/mesa_17.1.1.bb
index ff84015..55c6f71 100644
--- a/meta/recipes-graphics/mesa/mesa_17.1.1.bb
+++ b/meta/recipes-graphics/mesa/mesa_17.1.1.bb
@@ -1,6 +1,6 @@
 require ${BPN}.inc
 
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/mesa-${PV}.tar.xz \
+SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
file://replace_glibc_check_with_linux.patch \
file://disable-asm-on-non-gcc.patch \
file://0001-Use-wayland-scanner-in-the-path.patch \
-- 
2.4.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v4 7/8] image: create symlinks needed for merged /usr

2017-06-13 Thread Peter Kjellerstedt
> -Original Message-
> From: openembedded-core-boun...@lists.openembedded.org
> [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of
> Amarnath Valluri
> Sent: den 13 juni 2017 15:24
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH v4 7/8] image: create symlinks needed for
> merged /usr
> 
> Prepare the symlinks required for merged /usr at the time of rootfs
> creation.
> 
> The links created in rootfs are:
> /bin --> /usr/sbin
> /sbin --> /usr/sbin
> /lib --> /usr/lib
> /lib64 --> /usr/lib64
> 
> We cannot make these symlinks as part of 'base-files' or some other
> package.
> Because at rootfs creation, installation of the package(say kernel)
> that depends
> on these root folders/links fails, if package manager installs this
> package
> prior to base-files.
> 
> These symbolic links in top level folder should be present as long as
>  - kernel tools use /lib/{module,firmware}
>  - shell scripts uses "#!/bin/sh"
> 
> Signed-off-by: Amarnath Valluri 
> ---
>  meta/classes/image.bbclass | 21 +
>  1 file changed, 21 insertions(+)
> 
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 85f6b9a..2a3c1e3 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -617,3 +617,24 @@ do_bundle_initramfs () {
>   :
>  }
>  addtask bundle_initramfs after do_image_complete
> +
> +# Prepare the root links to point to the /usr counterparts.
> +create_merged_usr_symlinks() {
> +install -d ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}${base_sbindir} 
> ${IMAGE_ROOTFS}${base_libdir}
> +lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
> +lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
> +lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}

You missed one. Change "/${baselib}" to "${baselib}".

> +
> +if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
> +   install -d ${IMAGE_ROOTFS}${nonarch_base_libdir}
> +   lnr ${IMAGE_ROOTFS}${nonarch_base_libdir} ${IMAGE_ROOTFS}/lib
> +fi
> +
> +# create base links for multilibs
> +multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
> +for d in $multi_libdirs; do
> +install -d ${IMAGE_ROOTFS}${exec_prefix}/$d
> +lnr ${IMAGE_ROOTFS}${exec_prefix}/$d ${IMAGE_ROOTFS}/$d
> +done
> +}
> +ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 
> 'usrmerge', 'create_merged_usr_symlinks; ', '',d)}"
> --
> 2.7.4

//Peter

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for automake: Backport perl 5.22 fix (rev3)

2017-06-13 Thread Patchwork
== Series Details ==

Series: automake: Backport perl 5.22 fix (rev3)
Revision: 3
URL   : https://patchwork.openembedded.org/series/6623/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue A patch file has been added, but does not have a 
Signed-off-by tag [test_signed_off_by_presence] 
  Suggested fixSign off the added patch file 
(meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH][pyro] automake: Backport perl 5.22 fix

2017-06-13 Thread Ross Burton
From: Marek Vasut 

Backport 13f00eb4493c "automake: port to Perl 5.22 and later"
from automake upstream to fix build with perl 5.22 .

Signed-off-by: Marek Vasut 
Signed-off-by: Ross Burton 
Signed-off-by: Richard Purdie 
---
 ...0001-automake-port-to-Perl-5.22-and-later.patch | 32 ++
 meta/recipes-devtools/automake/automake_1.15.bb|  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 
meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch

diff --git 
a/meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch
 
b/meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch
new file mode 100644
index 000..0e6895f
--- /dev/null
+++ 
b/meta/recipes-devtools/automake/automake/0001-automake-port-to-Perl-5.22-and-later.patch
@@ -0,0 +1,32 @@
+From 13f00eb4493c217269b76614759e452d8302955e Mon Sep 17 00:00:00 2001
+From: Paul Eggert 
+Date: Thu, 31 Mar 2016 16:35:29 -0700
+Subject: [PATCH] automake: port to Perl 5.22 and later
+
+Without this change, Perl 5.22 complains "Unescaped left brace in
+regex is deprecated" and this is planned to become a hard error in
+Perl 5.26.  See:
+http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
+* bin/automake.in (substitute_ac_subst_variables): Escape left brace.
+
+Upstream-Status: Backport [13f00eb4493c217269b76614759e452d8302955e]
+---
+ bin/automake.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bin/automake.in b/bin/automake.in
+index a3a0aa318..2c8f31e14 100644
+--- a/bin/automake.in
 b/bin/automake.in
+@@ -3878,7 +3878,7 @@ sub substitute_ac_subst_variables_worker
+ sub substitute_ac_subst_variables
+ {
+   my ($text) = @_;
+-  $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
++  $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker 
($1)/ge;
+   return $text;
+ }
+ 
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/automake/automake_1.15.bb 
b/meta/recipes-devtools/automake/automake_1.15.bb
index a6904c8..902dd63 100644
--- a/meta/recipes-devtools/automake/automake_1.15.bb
+++ b/meta/recipes-devtools/automake/automake_1.15.bb
@@ -24,6 +24,7 @@ SRC_URI += "file://python-libdir.patch \
 file://performance.patch \
 file://new_rt_path_for_test-driver.patch \
 
file://automake-replace-w-option-in-shebangs-with-modern-use-warnings.patch \
+file://0001-automake-port-to-Perl-5.22-and-later.patch \
 "
 
 SRC_URI[md5sum] = "716946a105ca228ab545fc37a70df3a3"
-- 
2.8.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4 2/8] cross.bbclass: merged /usr support

2017-06-13 Thread Amarnath Valluri
Use ${root_prefix} instead of ${base_prefix} while setting
${target_base_prefix}, otherwise we might loose the root prefix configuration
change in case of 'usrmerge' distro feature is enabled.

Signed-off-by: Amarnath Valluri 
---
 meta/classes/cross.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index 8757303..4887317 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -50,7 +50,7 @@ SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
 # Path mangling needed by the cross packaging
 # Note that we use := here to ensure that libdir and includedir are
 # target paths.
-target_base_prefix := "${base_prefix}"
+target_base_prefix := "${root_prefix}"
 target_prefix := "${prefix}"
 target_exec_prefix := "${exec_prefix}"
 target_base_libdir = "${target_base_prefix}/${baselib}"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4 3/8] systemd: changes to support merged /usr

2017-06-13 Thread Amarnath Valluri
- Enable/disable the split-usr support in systemd based on 'usrmerge'
  DISTRO_FEATURE.
- Modify rootprefix to point to ${root_prefix}, rather than ${base_prefix}.
- And fixed firmware path to use ${nonarch_base_libdir} instead of hard-coded
  '/lib', because when 'usrmege' distro feature enabled this path would be
  '/usr/lib'.

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-core/systemd/systemd_232.bb | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_232.bb 
b/meta/recipes-core/systemd/systemd_232.bb
index f843c58..d3903a6 100644
--- a/meta/recipes-core/systemd/systemd_232.bb
+++ b/meta/recipes-core/systemd/systemd_232.bb
@@ -41,7 +41,7 @@ SRC_URI_append_libc-uclibc = "\
 SRC_URI_append_qemuall = " 
file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
 
 PACKAGECONFIG ??= "xz \
-   ${@bb.utils.filter('DISTRO_FEATURES', 'efi pam selinux 
ldconfig', d)} \
+   ${@bb.utils.filter('DISTRO_FEATURES', 'efi pam selinux 
ldconfig usrmerge', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', 
'', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', 
'', d)} \
binfmt \
@@ -122,6 +122,7 @@ PACKAGECONFIG[bzip2] = 
"--enable-bzip2,--disable-bzip2,bzip2"
 PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
 PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
 PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+PACKAGECONFIG[usrmerge] = "--disable-split-usr, --enable-split-usr"
 
 CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill"
 CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod"
@@ -131,7 +132,7 @@ CACHED_CONFIGUREVARS += 
"ac_cv_path_SULOGIN=${base_sbindir}/sulogin"
 
 # Helper variables to clarify locations.  This mirrors the logic in systemd's
 # build system.
-rootprefix ?= "${base_prefix}"
+rootprefix ?= "${root_prefix}"
 rootlibdir ?= "${base_libdir}"
 rootlibexecdir = "${rootprefix}/lib"
 
@@ -149,10 +150,9 @@ CACHED_CONFIGUREVARS_class-target = "\
 EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
  --with-rootlibdir=${rootlibdir} \
  --with-roothomedir=${ROOT_HOME} \
- --enable-split-usr \
  --without-python \
  --with-sysvrcnd-path=${sysconfdir} \
- --with-firmware-path=/lib/firmware \
+ --with-firmware-path=${nonarch_base_libdir}/firmware \
  --with-testdir=${PTEST_PATH} \
"
 # per the systemd README, define VALGRIND=1 to run under valgrind
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4 7/8] image: create symlinks needed for merged /usr

2017-06-13 Thread Amarnath Valluri
Prepare the symlinks required for merged /usr at the time of rootfs creation.

The links created in rootfs are:
/bin --> /usr/sbin
/sbin --> /usr/sbin
/lib --> /usr/lib
/lib64 --> /usr/lib64

We cannot make these symlinks as part of 'base-files' or some other package.
Because at rootfs creation, installation of the package(say kernel) that depends
on these root folders/links fails, if package manager installs this package
prior to base-files.

These symbolic links in top level folder should be present as long as
 - kernel tools use /lib/{module,firmware}
 - shell scripts uses "#!/bin/sh"

Signed-off-by: Amarnath Valluri 
---
 meta/classes/image.bbclass | 21 +
 1 file changed, 21 insertions(+)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 85f6b9a..2a3c1e3 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -617,3 +617,24 @@ do_bundle_initramfs () {
:
 }
 addtask bundle_initramfs after do_image_complete
+
+# Prepare the root links to point to the /usr counterparts.
+create_merged_usr_symlinks() {
+install -d ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}${base_sbindir} 
${IMAGE_ROOTFS}${base_libdir}
+lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
+lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
+lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}
+
+if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
+   install -d ${IMAGE_ROOTFS}${nonarch_base_libdir}
+   lnr ${IMAGE_ROOTFS}${nonarch_base_libdir} ${IMAGE_ROOTFS}/lib
+fi
+
+# create base links for multilibs
+multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
+for d in $multi_libdirs; do
+install -d ${IMAGE_ROOTFS}${exec_prefix}/$d
+lnr ${IMAGE_ROOTFS}${exec_prefix}/$d ${IMAGE_ROOTFS}/$d
+done
+}
+ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 
'usrmerge', 'create_merged_usr_symlinks; ', '',d)}"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] buildhistory-diff: exclude paths from the output

2017-06-13 Thread Ed Bartosh
Implemented -e/--exclude-path command line option to
exclude paths from buildhistory-diff output.

[YOCTO #11459]

Signed-off-by: Ed Bartosh 
---
 meta/lib/oe/buildhistory_analysis.py | 51 
 scripts/buildhistory-diff| 12 ++---
 2 files changed, 43 insertions(+), 20 deletions(-)

diff --git a/meta/lib/oe/buildhistory_analysis.py 
b/meta/lib/oe/buildhistory_analysis.py
index 3a5b7b6..3e86a46 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -143,22 +143,25 @@ class ChangeRecord:
 out += '\n  '.join(list(diff)[2:])
 out += '\n  --'
 elif self.fieldname in img_monitor_files or '/image-files/' in 
self.path:
-fieldname = self.fieldname
-if '/image-files/' in self.path:
-fieldname = os.path.join('/' + 
self.path.split('/image-files/')[1], self.fieldname)
-out = 'Changes to %s:\n  ' % fieldname
-else:
-if outer:
-prefix = 'Changes to %s ' % self.path
-out = '(%s):\n  ' % self.fieldname
-if self.filechanges:
-out += '\n  '.join(['%s' % i for i in self.filechanges])
+if self.filechanges or (self.oldvalue and self.newvalue):
+fieldname = self.fieldname
+if '/image-files/' in self.path:
+fieldname = os.path.join('/' + 
self.path.split('/image-files/')[1], self.fieldname)
+out = 'Changes to %s:\n  ' % fieldname
+else:
+if outer:
+prefix = 'Changes to %s ' % self.path
+out = '(%s):\n  ' % self.fieldname
+if self.filechanges:
+out += '\n  '.join(['%s' % i for i in self.filechanges])
+else:
+alines = self.oldvalue.splitlines()
+blines = self.newvalue.splitlines()
+diff = difflib.unified_diff(alines, blines, fieldname, 
fieldname, lineterm='')
+out += '\n  '.join(list(diff))
+out += '\n  --'
 else:
-alines = self.oldvalue.splitlines()
-blines = self.newvalue.splitlines()
-diff = difflib.unified_diff(alines, blines, fieldname, 
fieldname, lineterm='')
-out += '\n  '.join(list(diff))
-out += '\n  --'
+out = ''
 else:
 out = '%s changed from "%s" to "%s"' % (self.fieldname, 
self.oldvalue, self.newvalue)
 
@@ -169,7 +172,7 @@ class ChangeRecord:
 for line in chg._str_internal(False).splitlines():
 out += '\n  * %s' % line
 
-return '%s%s' % (prefix, out)
+return '%s%s' % (prefix, out) if out else ''
 
 class FileChange:
 changetype_add = 'A'
@@ -508,7 +511,8 @@ def compare_siglists(a_blob, b_blob, taskdiff=False):
 return '\n'.join(out)
 
 
-def process_changes(repopath, revision1, revision2='HEAD', report_all=False, 
report_ver=False, sigs=False, sigsdiff=False):
+def process_changes(repopath, revision1, revision2='HEAD', report_all=False, 
report_ver=False,
+sigs=False, sigsdiff=False, exclude_path=None):
 repo = git.Repo(repopath)
 assert repo.bare == False
 commit = repo.commit(revision1)
@@ -601,6 +605,19 @@ def process_changes(repopath, revision1, revision2='HEAD', 
report_all=False, rep
 elif chg.path == chg2.path and 
chg.path.startswith('packages/') and chg2.fieldname in ['PE', 'PV', 'PR']:
 chg.related.append(chg2)
 
+# filter out unwanted paths
+if exclude_path:
+for chg in changes:
+if chg.filechanges:
+fchgs = []
+for fchg in chg.filechanges:
+for epath in exclude_path:
+if fchg.path.startswith(epath):
+   break
+else:
+fchgs.append(fchg)
+chg.filechanges = fchgs
+
 if report_all:
 return changes
 else:
diff --git a/scripts/buildhistory-diff b/scripts/buildhistory-diff
index dd9745e..1b2e0d1 100755
--- a/scripts/buildhistory-diff
+++ b/scripts/buildhistory-diff
@@ -39,6 +39,8 @@ def main():
 parser.add_option("-S", "--signatures-with-diff",
 help = "Report on actual signature differences instead of output 
(requires signature data to have been generated, either by running the actual 
tasks or using bitbake -S)",
 action="store_true", dest="sigsdiff", default=False)
+parser.add_option("-e", "--exclude-path", action="append",
+help = "exclude path from the output")
 
 options, args = parser.parse_args(sys.argv)
 
@@ -75,7 +77,7 @@ def main():
 sys.stderr.write("Unable to find bitbake by searching parent directory 
of 

Re: [OE-core] [PATCH] util-linux: upgrade to 2.30

2017-06-13 Thread Richard Purdie
On Mon, 2017-06-12 at 14:23 -0400, Denys Dmytriyenko wrote:
> Ping. Any comments, issues?

https://autobuilder.yocto.io/builders/build-appliance/builds/306/steps/BuildImages_1/logs/stdio


ERROR: util-linux-2.30-r0 do_install_ptest_base: Function failed: 
do_install_ptest_base (log file is located at 
/home/pokybuild/yocto-autobuilder/yocto-worker/build-appliance/build/build/tmp/work/core2-64-poky-linux/util-linux/2.30-r0/temp/log.do_install_ptest_base.48825)
ERROR: Logfile of failure stored in: 
/home/pokybuild/yocto-autobuilder/yocto-worker/build-appliance/build/build/tmp/work/core2-64-poky-linux/util-linux/2.30-r0/temp/log.do_install_ptest_base.48825
Log data follows:
| DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 
'x86_64-linux', 'common']
| DEBUG: Executing shell function do_install_ptest_base
| cp: cannot stat 
'/home/pokybuild/yocto-autobuilder/yocto-worker/build-appliance/build/build/tmp/work/core2-64-poky-linux/util-linux/2.30-r0/util-linux-2.30/tests/ts/tailf':
 No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_install_ptest_base (log file is located at 
/home/pokybuild/yocto-autobuilder/yocto-worker/build-appliance/build/build/tmp/work/core2-64-poky-linux/util-linux/2.30-r0/temp/log.do_install_ptest_base.48825)
NOTE: recipe util-linux-2.30-r0: task do_install_ptest_base: Failed

Cheers,

Richard
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v3] mtools-native: disable reading host configs

2017-06-13 Thread Burton, Ross
On 13 June 2017 at 12:55, Ed Bartosh  wrote:

> +Upstream-Status: Pending
>

Inappropriate would be the right choice here.

+SRC_URI_append_class-native = "file://disable-hardcoded-configs.patch"

Whilst the leading whitespace isn't required here, it's good form to
include it

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v3 7/8] image: create symlinks needed for merged /usr

2017-06-13 Thread Valluri, Amarnath
On Tue, 2017-06-13 at 08:05 +, Peter Kjellerstedt wrote:
> > 
> > -Original Message-
> > From: openembedded-core-boun...@lists.openembedded.org
> > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf
> > Of
> > Amarnath Valluri
> > Sent: den 13 juni 2017 08:53
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH v3 7/8] image: create symlinks needed for
> > merged /usr
> > 
> > Prepare the symlinks required for merged /usr at the time of rootfs
> > creation.
> > 
> > The links created in rootfs are:
> > /bin --> /usr/sbin
> > /sbin --> /usr/sbin
> > /lib --> /usr/lib
> > /lib64 --> /usr/lib64
> > 
> > We cannot make these symlinks as part of 'base-files' or some other
> > package.
> > Because at rootfs creation, installation of the package(say kernel)
> > that depends
> > on these root folders/links fails, if package manager installs this
> > package
> > prior to base-files.
> > 
> > These symbolic links in top level folder should present as long as
> Change "should" to "should be".
> 
> > 
> >  - kerenl tools use /lib/{module,firmware}
> Change "kerenl" to "kernel".
> 
> > 
> >  - shell scripts uses "#!/bin/sh"
> > 
> > Signed-off-by: Amarnath Valluri 
> > ---
> >  meta/classes/image.bbclass | 23 +++
> >  1 file changed, 23 insertions(+)
> > 
> > diff --git a/meta/classes/image.bbclass
> > b/meta/classes/image.bbclass
> > index 85f6b9a..f08e3e1 100644
> > --- a/meta/classes/image.bbclass
> > +++ b/meta/classes/image.bbclass
> > @@ -617,3 +617,26 @@ do_bundle_initramfs () {
> >     :
> >  }
> >  addtask bundle_initramfs after do_image_complete
> > +
> > +# Prepare the root links to point to the /usr counterparts.
> In the function below:
> * You do not need to specify -m 0755 to install, it is the default.
> * Change all "/${var}" to "${var}".
> 
> > 
> > +create_merged_usr_symlinks() {
> > +install -m 0755 -d ${IMAGE_ROOTFS}/${base_bindir}
> > +install -m 0755 -d ${IMAGE_ROOTFS}/${base_sbindir}
> > +install -m 0755 -d ${IMAGE_ROOTFS}/${base_libdir}
> You can combine these three installs into one. Saves two forks.
> 
> > 
> > +lnr ${IMAGE_ROOTFS}${base_bindir} ${IMAGE_ROOTFS}/bin
> > +lnr ${IMAGE_ROOTFS}${base_sbindir} ${IMAGE_ROOTFS}/sbin
> > +lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}
> > +
> > +if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
> Why do you check "${nonarch_base_libdir}" != "${base_libdir}" when
> you do not check the other three above?
Our intention here is to create /lib -> ${noarch_base_libdir}. This
might already been crated in the previous call : 
    lnr ${IMAGE_ROOTFS}${base_libdir} ${IMAGE_ROOTFS}/${baselib}

because, for non-multilib builds both ${nonarch_base_libdir} and
${base_libdir} points to ${exec_prefix}/lib.

The condition can be rephrased to:
   if [ "${baselib}" != "lib" ]

This case does not apply for other two links., ie., /bin, /sbin.

- Amarnath
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3] mtools-native: disable reading host configs

2017-06-13 Thread Ed Bartosh
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 
---
 .../mtools/mtools/disable-hardcoded-configs.patch  | 23 ++
 meta/recipes-devtools/mtools/mtools_4.0.18.bb  |  1 +
 2 files changed, 24 insertions(+)
 create mode 100644 
meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch

diff --git 
a/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch 
b/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
new file mode 100644
index 000..0688d6e
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
@@ -0,0 +1,23 @@
+Disabled reading host configs.
+
+Upstream-Status: Pending
+
+Signed-off-by: Ed Bartosh 
+
+--- mtools-4.0.18/config.c.orig2017-06-13 12:27:38.64400 +0300
 mtools-4.0.18/config.c 2017-06-13 12:28:47.57600 +0300
+@@ -701,14 +701,6 @@
+   memcpy(devices, const_devices,
+  nr_const_devices*sizeof(struct device));
+ 
+-(void) ((parse(CONF_FILE,1) |
+-   parse(LOCAL_CONF_FILE,1) |
+-   parse(SYS_CONF_FILE,1)) ||
+-  (parse(OLD_CONF_FILE,1) |
+-   parse(OLD_LOCAL_CONF_FILE,1)));
+-/* the old-name configuration files only get executed if none of the
+- * new-name config files were used */
+-
+ homedir = get_homedir();
+ if ( homedir ){
+   strncpy(conf_file, homedir, MAXPATHLEN );
diff --git a/meta/recipes-devtools/mtools/mtools_4.0.18.bb 
b/meta/recipes-devtools/mtools/mtools_4.0.18.bb
index b0efc9e..88d1d96 100644
--- a/meta/recipes-devtools/mtools/mtools_4.0.18.bb
+++ b/meta/recipes-devtools/mtools/mtools_4.0.18.bb
@@ -33,6 +33,7 @@ SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \

file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \
"
 
+SRC_URI_append_class-native = "file://disable-hardcoded-configs.patch"
 
 inherit autotools texinfo
 
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for #11283 wic ls & cp & rm (rev2)

2017-06-13 Thread Patchwork
== Series Details ==

Series: #11283 wic ls & cp & rm (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/7139/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Added patch file is missing Upstream-Status in the header 
[test_upstream_status_presence] 
  Suggested fixAdd Upstream-Status:  to the header of 
meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch (possible 
values: Pending, Submitted, Accepted, Backport, Denied, Inappropriate)

* Issue A patch file has been added, but does not have a 
Signed-off-by tag [test_signed_off_by_presence] 
  Suggested fixSign off the added patch file 
(meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 23/26] wic: add 'wic rm' command

2017-06-13 Thread Ed Bartosh
Added empty 'wic rm' command that does nothing.
The functionality will be added by the next commits.

[YOCTO #11283]

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/engine.py |  7 +++
 scripts/wic   | 14 ++
 2 files changed, 21 insertions(+)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index a48c4ad..9a8055c 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -340,6 +340,13 @@ def wic_cp(args, native_sysroot):
 disk = Disk(args.dest.image, native_sysroot)
 disk.copy(args.src, args.dest.part, args.dest.path)
 
+def wic_rm(args, native_sysroot):
+"""
+Remove files or directories from the vfat partition of
+partitioned image.
+"""
+pass
+
 def find_canned(scripts_path, file_name):
 """
 Find a file either by its path or by name in the canned files dir.
diff --git a/scripts/wic b/scripts/wic
index fc192ec..da14f47 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -248,6 +248,13 @@ def wic_cp_subcommand(args, usage_str):
 """
 engine.wic_cp(args, args.native_sysroot)
 
+def wic_rm_subcommand(args, usage_str):
+"""
+Command-line handling for removing files/dirs from images.
+The real work is done by engine.wic_rm()
+"""
+engine.wic_rm(args, args.native_sysroot)
+
 def wic_help_subcommand(args, usage_str):
 """
 Command-line handling for help subcommand to keep the current
@@ -286,6 +293,9 @@ helptopics = {
 "cp":[wic_help_topic_subcommand,
   wic_help_topic_usage,
   hlp.wic_cp_help],
+"rm":[wic_help_topic_subcommand,
+  wic_help_topic_usage,
+  hlp.wic_rm_help],
 "list":  [wic_help_topic_subcommand,
   wic_help_topic_usage,
   hlp.wic_list_help]
@@ -409,6 +419,10 @@ subcommands = {
   hlp.wic_cp_usage,
   hlp.wic_cp_help,
   wic_init_parser_cp],
+"rm":[wic_rm_subcommand,
+  hlp.wic_rm_usage,
+  hlp.wic_rm_help,
+  wic_init_parser_rm],
 "help":  [wic_help_subcommand,
   wic_help_topic_usage,
   hlp.wic_help_help,
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 25/26] wic: implement removing directories

2017-06-13 Thread Ed Bartosh
Added support for removing directories using mdeltree
utility to Disk.del method

[YOCTO #11283]

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/engine.py | 22 ++
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 6fc8bb7..2c899dd 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -239,6 +239,7 @@ class Disk:
 self._mdir = None
 self._mcopy = None
 self._mdel = None
+self._mdeltree = None
 self._partimages = {}
 
 # find parted
@@ -290,6 +291,10 @@ class Disk:
 def mdel(self):
 return self._prop("mdel")
 
+@property
+def mdeltree(self):
+return self._prop("mdeltree")
+
 def _get_part_image(self, pnum):
 if pnum not in self.partitions:
 raise WicError("Partition %s is not in the image")
@@ -325,10 +330,19 @@ class Disk:
 
 def remove(self, pnum, path):
 """Remove files/dirs from the partition."""
-cmd = "{} -i {} ::{}".format(self.mdel,
- self._get_part_image(pnum),
- path)
-exec_cmd(cmd)
+partimg = self._get_part_image(pnum)
+cmd = "{} -i {} ::{}".format(self.mdel, partimg, path)
+try:
+exec_cmd(cmd)
+except WicError as err:
+if "not found" in str(err) or "non empty" in str(err):
+# mdel outputs 'File ... not found' or 'directory .. non empty"
+# try to use mdeltree as path could be a directory
+cmd = "{} -i {} ::{}".format(self.mdeltree,
+ partimg, path)
+exec_cmd(cmd)
+else:
+raise err
 self._put_part_image(pnum)
 
 def wic_ls(args, native_sysroot):
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 24/26] wic: implement removing files

2017-06-13 Thread Ed Bartosh
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 
---
 scripts/lib/wic/engine.py | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 9a8055c..6fc8bb7 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -238,6 +238,7 @@ class Disk:
 self._partitions = None
 self._mdir = None
 self._mcopy = None
+self._mdel = None
 self._partimages = {}
 
 # find parted
@@ -285,6 +286,10 @@ class Disk:
 def mcopy(self):
 return self._prop("mcopy")
 
+@property
+def mdel(self):
+return self._prop("mdel")
+
 def _get_part_image(self, pnum):
 if pnum not in self.partitions:
 raise WicError("Partition %s is not in the image")
@@ -318,6 +323,14 @@ class Disk:
 exec_cmd(cmd)
 self._put_part_image(pnum)
 
+def remove(self, pnum, path):
+"""Remove files/dirs from the partition."""
+cmd = "{} -i {} ::{}".format(self.mdel,
+ self._get_part_image(pnum),
+ path)
+exec_cmd(cmd)
+self._put_part_image(pnum)
+
 def wic_ls(args, native_sysroot):
 """List contents of partitioned image or vfat partition."""
 disk = Disk(args.path.image, native_sysroot)
@@ -345,7 +358,8 @@ def wic_rm(args, native_sysroot):
 Remove files or directories from the vfat partition of
 partitioned image.
 """
-pass
+disk = Disk(args.path.image, native_sysroot)
+disk.remove(args.path.part, args.path.path)
 
 def find_canned(scripts_path, file_name):
 """
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 26/26] selftest: add test_wic_rm test case

2017-06-13 Thread Ed Bartosh
Added test case for "wic rm" functionality.
- remove file from vfat partition
- remove directory from vfat partition

Signed-off-by: Ed Bartosh 
---
 meta/lib/oeqa/selftest/cases/wic.py | 30 ++
 1 file changed, 30 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index 5034587..ee9ff0f 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -855,3 +855,33 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 
--exclude-path bin/ --r
 self.assertEqual(0, result.status)
 self.assertEqual(8, len(result.output.split('\n')))
 self.assertTrue(os.path.basename(testdir) in result.output)
+
+def test_wic_rm(self):
+"""Test removing files and directories from the the wic image."""
+self.assertEqual(0, runCmd("wic create mkefidisk "
+   "--image-name=core-image-minimal "
+   "-D -o %s" % self.resultdir).status)
+images = glob(self.resultdir + "mkefidisk-*.direct")
+self.assertEqual(1, len(images))
+
+sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
+
+# list directory content of the first partition
+result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot))
+self.assertEqual(0, result.status)
+self.assertIn('\nBZIMAGE', result.output)
+self.assertIn('\nEFI   ', result.output)
+
+# remove file
+result = runCmd("wic rm %s:1/bzimage -n %s" % (images[0], sysroot))
+self.assertEqual(0, result.status)
+
+# remove directory
+result = runCmd("wic rm %s:1/efi -n %s" % (images[0], sysroot))
+self.assertEqual(0, result.status)
+
+# check if they're removed
+result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot))
+self.assertEqual(0, result.status)
+self.assertNotIn('\nBZIMAGE', result.output)
+self.assertNotIn('\nEFI   ', result.output)
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 19/26] wic: fully implement 'wic cp'

2017-06-13 Thread Ed Bartosh
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 
---
 scripts/lib/wic/engine.py | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 6a4f55f..a48c4ad 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -310,6 +310,14 @@ class Disk:
self._get_part_image(pnum),
path))
 
+def copy(self, src, pnum, path):
+"""Copy partition image into wic image."""
+cmd = "{} -i {} -snop {} ::{}".format(self.mcopy,
+  self._get_part_image(pnum),
+  src, path)
+exec_cmd(cmd)
+self._put_part_image(pnum)
+
 def wic_ls(args, native_sysroot):
 """List contents of partitioned image or vfat partition."""
 disk = Disk(args.path.image, native_sysroot)
@@ -329,7 +337,8 @@ def wic_cp(args, native_sysroot):
 Copy local file or directory to the vfat partition of
 partitioned image.
 """
-pass
+disk = Disk(args.dest.image, native_sysroot)
+disk.copy(args.src, args.dest.part, args.dest.path)
 
 def find_canned(scripts_path, file_name):
 """
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 20/26] selftest: add test_wic_cp test case

2017-06-13 Thread Ed Bartosh
Added test case for "wic cp" functionality.
 - copy file to vfat partition
 - copy directory to vfat partition

Signed-off-by: Ed Bartosh 
---
 meta/lib/oeqa/selftest/cases/wic.py | 46 -
 1 file changed, 45 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index 5d67395..5034587 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -28,7 +28,7 @@ import sys
 import unittest
 
 from glob import glob
-from shutil import rmtree
+from shutil import rmtree, copy
 from functools import wraps, lru_cache
 from tempfile import NamedTemporaryFile
 
@@ -811,3 +811,47 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 
--exclude-path bin/ --r
 result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))
 self.assertEqual(0, result.status)
 self.assertEqual(6, len(result.output.split('\n')))
+
+def test_wic_cp(self):
+"""Test copy files and directories to the the wic image."""
+self.assertEqual(0, runCmd("wic create wictestdisk "
+   "--image-name=core-image-minimal "
+   "-D -o %s" % self.resultdir).status)
+images = glob(self.resultdir + "wictestdisk-*.direct")
+self.assertEqual(1, len(images))
+
+sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
+
+# list directory content of the first partition
+result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))
+self.assertEqual(0, result.status)
+self.assertEqual(6, len(result.output.split('\n')))
+
+with NamedTemporaryFile("w", suffix=".wic-cp") as testfile:
+testfile.write("test")
+
+# copy file to the partition
+result = runCmd("wic cp %s %s:1/ -n %s" % (testfile.name, 
images[0], sysroot))
+self.assertEqual(0, result.status)
+
+# check if file is there
+result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))
+self.assertEqual(0, result.status)
+self.assertEqual(7, len(result.output.split('\n')))
+self.assertTrue(os.path.basename(testfile.name) in result.output)
+
+# prepare directory
+testdir = os.path.join(self.resultdir, 'wic-test-cp-dir')
+testsubdir = os.path.join(testdir, 'subdir')
+os.makedirs(os.path.join(testsubdir))
+copy(testfile.name, testdir)
+
+# copy directory to the partition
+result = runCmd("wic cp %s %s:1/ -n %s" % (testdir, images[0], 
sysroot))
+self.assertEqual(0, result.status)
+
+# check if directory is there
+result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))
+self.assertEqual(0, result.status)
+self.assertEqual(8, len(result.output.split('\n')))
+self.assertTrue(os.path.basename(testdir) in result.output)
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 21/26] wic: add wic_init_parser_rm

2017-06-13 Thread Ed Bartosh
Add parser for 'wic rm' subcommand.

Signed-off-by: Ed Bartosh 
---
 scripts/wic | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/scripts/wic b/scripts/wic
index 5e81fad..fc192ec 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -379,6 +379,12 @@ def wic_init_parser_cp(subparser):
 subparser.add_argument("-n", "--native-sysroot",
 help="path to the native sysroot containing the tools")
 
+def wic_init_parser_rm(subparser):
+subparser.add_argument("path", type=imgpathtype,
+help="path: :")
+subparser.add_argument("-n", "--native-sysroot",
+help="path to the native sysroot containing the tools")
+
 def wic_init_parser_help(subparser):
 helpparsers = subparser.add_subparsers(dest='help_topic', 
help=hlp.wic_usage)
 for helptopic in helptopics:
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 22/26] wic: add help and usage content for 'wic rm'

2017-06-13 Thread Ed Bartosh
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 
---
 scripts/lib/wic/help.py | 59 -
 1 file changed, 58 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py
index e93ac4b..23d943c 100644
--- a/scripts/lib/wic/help.py
+++ b/scripts/lib/wic/help.py
@@ -395,7 +395,7 @@ DESCRIPTION
 The second form of the command copies file or directory to the specified 
directory
 on the vfat partition:
$ wic cp test 
tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/efi/
-   $ wic ls 
tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/eti/
+   $ wic ls 
tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/efi/
Volume in drive : is boot
 Volume Serial Number is DB4C-FD4C
Directory for ::/efi
@@ -411,6 +411,63 @@ DESCRIPTION
 containing the tools(parted and mtools) to use.
 """
 
+wic_rm_usage = """
+
+ Remove files or directories from the vfat partitions
+
+ usage: wic rm : [--native-sysroot ]
+
+ This command  removes files or directories from the vfat partitions of 
partitioned
+ image.
+
+ See 'wic help rm' for more detailed instructions.
+
+"""
+
+wic_rm_help = """
+
+NAME
+wic rm - remove files or directories from the vfat partitions
+
+SYNOPSIS
+wic rm  :
+wic rm  : --native-sysroot 
+
+DESCRIPTION
+This command removes files or directories from the vfat partition of the
+wic image:
+
+$ wic ls 
./tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
+Volume in drive : is boot
+ Volume Serial Number is 11D0-DE21
+Directory for ::/
+
+libcom32 c32186500 2017-06-02  15:15
+libutil  c32 24148 2017-06-02  15:15
+syslinux cfg   209 2017-06-02  15:15
+vesamenu c32 27104 2017-06-02  15:15
+vmlinuz6926384 2017-06-02  15:15
+5 files   7 164 345 bytes
+ 16 582 656 bytes free
+
+$ wic rm 
./tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/libutil.c32
+
+$ wic ls 
./tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
+Volume in drive : is boot
+ Volume Serial Number is 11D0-DE21
+Directory for ::/
+
+libcom32 c32186500 2017-06-02  15:15
+syslinux cfg   209 2017-06-02  15:15
+vesamenu c32 27104 2017-06-02  15:15
+vmlinuz6926384 2017-06-02  15:15
+4 files   7 140 197 bytes
+ 16 607 232 bytes free
+
+The -n option is used to specify the path to the native sysroot
+containing the tools(parted and mtools) to use.
+"""
+
 wic_plugins_help = """
 
 NAME
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 12/26] wic: add 'wic cp' command

2017-06-13 Thread Ed Bartosh
Added empty 'wic cp' command that does nothing.
The functionality will be added by the next commits.

[YOCTO #11283]

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/engine.py |  7 +++
 scripts/wic   | 13 +
 2 files changed, 20 insertions(+)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 95c8d1c..f8f2844 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -309,6 +309,13 @@ def wic_ls(args, native_sysroot):
 path = args.path.path or '/'
 print(disk.dir(args.path.part, path))
 
+def wic_cp(args, native_sysroot):
+"""
+Copy local file or directory to the vfat partition of
+partitioned image.
+"""
+pass
+
 def find_canned(scripts_path, file_name):
 """
 Find a file either by its path or by name in the canned files dir.
diff --git a/scripts/wic b/scripts/wic
index 945dda8..5e81fad 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -241,6 +241,12 @@ def wic_ls_subcommand(args, usage_str):
 """
 engine.wic_ls(args, args.native_sysroot)
 
+def wic_cp_subcommand(args, usage_str):
+"""
+Command-line handling for copying files/dirs to images.
+The real work is done by engine.wic_cp()
+"""
+engine.wic_cp(args, args.native_sysroot)
 
 def wic_help_subcommand(args, usage_str):
 """
@@ -277,6 +283,9 @@ helptopics = {
 "ls":[wic_help_topic_subcommand,
   wic_help_topic_usage,
   hlp.wic_ls_help],
+"cp":[wic_help_topic_subcommand,
+  wic_help_topic_usage,
+  hlp.wic_cp_help],
 "list":  [wic_help_topic_subcommand,
   wic_help_topic_usage,
   hlp.wic_list_help]
@@ -390,6 +399,10 @@ subcommands = {
   hlp.wic_ls_usage,
   hlp.wic_ls_help,
   wic_init_parser_ls],
+"cp":[wic_cp_subcommand,
+  hlp.wic_cp_usage,
+  hlp.wic_cp_help,
+  wic_init_parser_cp],
 "help":  [wic_help_subcommand,
   wic_help_topic_usage,
   hlp.wic_help_help,
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 05/26] wic: add wic_init_parser_ls

2017-06-13 Thread Ed Bartosh
Added parser for 'wic ls' command.

Signed-off-by: Ed Bartosh 
---
 scripts/wic | 25 +
 1 file changed, 25 insertions(+)

diff --git a/scripts/wic b/scripts/wic
index 49cad86..6c9a30d 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -35,6 +35,8 @@ import os
 import sys
 import argparse
 import logging
+
+from collections import namedtuple
 from distutils import spawn
 
 # External modules
@@ -317,6 +319,29 @@ def wic_init_parser_list(subparser):
  "defined inside the .wks file")
 return
 
+def imgtype(arg):
+"""
+Custom type for ArgumentParser
+Converts path spec to named tuple: (image, partition, path)
+"""
+image = arg
+part = path = None
+if ':' in image:
+image, part = image.split(':')
+if '/' in part:
+part, path = part.split('/', 1)
+
+if not os.path.isfile(image):
+err = "%s is not a regular file or symlink" % image
+raise argparse.ArgumentTypeError(err)
+
+return namedtuple('ImgType', 'image part path')(image, part, path)
+
+def wic_init_parser_ls(subparser):
+subparser.add_argument("path", type=imgtype,
+help="image spec: [:[]]")
+subparser.add_argument("-n", "--native-sysroot",
+help="path to the native sysroot containing the tools")
 
 def wic_init_parser_help(subparser):
 helpparsers = subparser.add_subparsers(dest='help_topic', 
help=hlp.wic_usage)
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 16/26] filemap: check if dest is written for every block

2017-06-13 Thread Ed Bartosh
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 
---
 scripts/lib/wic/filemap.py | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py
index 8719f44..764dbbe 100644
--- a/scripts/lib/wic/filemap.py
+++ b/scripts/lib/wic/filemap.py
@@ -563,6 +563,13 @@ def sparse_copy(src_fname, dst_fname, skip=0, seek=0,
 start = skip
 
 fmap._f_image.seek(start, os.SEEK_SET)
+
+written += start - skip - written
+if length and written >= length:
+dst_file.seek(seek + length, os.SEEK_SET)
+dst_file.close()
+return
+
 dst_file.seek(seek + start - skip, os.SEEK_SET)
 
 chunk_size = 1024 * 1024
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 15/26] filemap: change signature of sparse_copy function

2017-06-13 Thread Ed Bartosh
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 
---
 scripts/lib/wic/filemap.py   | 15 ---
 scripts/lib/wic/plugins/imager/direct.py |  2 +-
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py
index 8fe302a..8719f44 100644
--- a/scripts/lib/wic/filemap.py
+++ b/scripts/lib/wic/filemap.py
@@ -530,9 +530,18 @@ def filemap(image, log=None):
 except ErrorNotSupp:
 return FilemapSeek(image, log)
 
-def sparse_copy(src_fname, dst_fname, offset=0, skip=0,
+def sparse_copy(src_fname, dst_fname, skip=0, seek=0,
 length=0, api=None):
-"""Efficiently copy sparse file to or into another file."""
+"""
+Efficiently copy sparse file to or into another file.
+
+src_fname: path to source file
+dst_fname: path to destination file
+skip: skip N bytes at thestart of src
+seek: seek N bytes from the start of dst
+length: read N bytes from src and write them to dst
+api: FilemapFiemap or FilemapSeek object
+"""
 if not api:
 api = filemap
 fmap = api(src_fname)
@@ -554,7 +563,7 @@ def sparse_copy(src_fname, dst_fname, offset=0, skip=0,
 start = skip
 
 fmap._f_image.seek(start, os.SEEK_SET)
-dst_file.seek(offset + start - skip, os.SEEK_SET)
+dst_file.seek(seek + start - skip, os.SEEK_SET)
 
 chunk_size = 1024 * 1024
 to_read = end - start
diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index f2e6127..3cdedd1 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -550,7 +550,7 @@ class PartitionedImage():
 source = part.source_file
 if source:
 # install source_file contents into a partition
-sparse_copy(source, self.path, part.start * self.sector_size)
+sparse_copy(source, self.path, seek=part.start * 
self.sector_size)
 
 logger.debug("Installed %s in partition %d, sectors %d-%d, "
  "size %d sectors", source, part.num, part.start,
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 10/26] wic: add wic_init_parser_cp

2017-06-13 Thread Ed Bartosh
Add parser for 'wic cp' subcommand and a custom argument type.

Signed-off-by: Ed Bartosh 
---
 scripts/wic | 16 
 1 file changed, 16 insertions(+)

diff --git a/scripts/wic b/scripts/wic
index 4161f80..945dda8 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -341,6 +341,8 @@ def imgtype(arg):
 image, part = image.split(':')
 if '/' in part:
 part, path = part.split('/', 1)
+if not path:
+path = '/'
 
 if not os.path.isfile(image):
 err = "%s is not a regular file or symlink" % image
@@ -354,6 +356,20 @@ def wic_init_parser_ls(subparser):
 subparser.add_argument("-n", "--native-sysroot",
 help="path to the native sysroot containing the tools")
 
+def imgpathtype(arg):
+img = imgtype(arg)
+if img.part is None:
+raise argparse.ArgumentTypeError("partition number is not specified")
+return img
+
+def wic_init_parser_cp(subparser):
+subparser.add_argument("src",
+help="source spec")
+subparser.add_argument("dest", type=imgpathtype,
+help="image spec: :[]")
+subparser.add_argument("-n", "--native-sysroot",
+help="path to the native sysroot containing the tools")
+
 def wic_init_parser_help(subparser):
 helpparsers = subparser.add_subparsers(dest='help_topic', 
help=hlp.wic_usage)
 for helptopic in helptopics:
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 18/26] wic: add Disk._put_part_image method

2017-06-13 Thread Ed Bartosh
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 
---
 scripts/lib/wic/engine.py | 5 +
 1 file changed, 5 insertions(+)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index f24fb9a..6a4f55f 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -300,6 +300,11 @@ class Disk:
 
 return self._partimages[pnum]
 
+def _put_part_image(self, pnum):
+"""Put partition image into partitioned image."""
+sparse_copy(self._partimages[pnum], self.imagepath,
+seek=self.partitions[pnum].start)
+
 def dir(self, pnum, path):
 return exec_cmd("{} -i {} ::{}".format(self.mdir,
self._get_part_image(pnum),
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 17/26] filemap: calculate dst size correctly

2017-06-13 Thread Ed Bartosh
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 
---
 scripts/lib/wic/filemap.py | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py
index 764dbbe..6d11355 100644
--- a/scripts/lib/wic/filemap.py
+++ b/scripts/lib/wic/filemap.py
@@ -549,7 +549,11 @@ def sparse_copy(src_fname, dst_fname, skip=0, seek=0,
 dst_file = open(dst_fname, 'r+b')
 except IOError:
 dst_file = open(dst_fname, 'wb')
-dst_file.truncate(os.path.getsize(src_fname))
+if length:
+dst_size = length + seek
+else:
+dst_size = os.path.getsize(src_fname) + seek - skip
+dst_file.truncate(dst_size)
 
 written = 0
 for first, last in fmap.get_mapped_ranges(0, fmap.blocks_cnt):
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 09/26] selftest: add new test case test_wic_ls

2017-06-13 Thread Ed Bartosh
Tested 'wic ls' functionality:
 - list of image partitions
 - list of directory content of vfat partition

Signed-off-by: Ed Bartosh 
---
 meta/lib/oeqa/selftest/cases/wic.py | 20 
 1 file changed, 20 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index 4040cf7..5d67395 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -791,3 +791,23 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 
--exclude-path bin/ --r
 # 8 blocks is 4K (physical sector size)
 self.assertEqual(dest_stat.st_blocks, 8)
 os.unlink(dest)
+
+def test_wic_ls(self):
+"""Test listing image content using 'wic ls'"""
+self.assertEqual(0, runCmd("wic create wictestdisk "
+   "--image-name=core-image-minimal "
+   "-D -o %s" % self.resultdir).status)
+images = glob(self.resultdir + "wictestdisk-*.direct")
+self.assertEqual(1, len(images))
+
+sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
+
+# list partitions
+result = runCmd("wic ls %s -n %s" % (images[0], sysroot))
+self.assertEqual(0, result.status)
+self.assertEqual(3, len(result.output.split('\n')))
+
+# list directory content of the first partition
+result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))
+self.assertEqual(0, result.status)
+self.assertEqual(6, len(result.output.split('\n')))
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 08/26] engine: implement listing wic images

2017-06-13 Thread Ed Bartosh
Implemented 'wic ls' functionality:
 - list image partitions
 - list directory content of vfat partitions

[YOCTO #11283]

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/engine.py | 84 +--
 1 file changed, 82 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index e58beb7..95c8d1c 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -30,10 +30,15 @@
 
 import logging
 import os
+import tempfile
+
+from collections import namedtuple, OrderedDict
+from distutils.spawn import find_executable
 
 from wic import WicError
+from wic.filemap import sparse_copy
 from wic.pluginbase import PluginMgr
-from wic.utils.misc import get_bitbake_var
+from wic.utils.misc import get_bitbake_var, exec_cmd
 
 logger = logging.getLogger('wic')
 
@@ -225,9 +230,84 @@ def wic_list(args, scripts_path):
 
 return False
 
+
+class Disk:
+def __init__(self, imagepath, native_sysroot):
+self.imagepath = imagepath
+self.native_sysroot = native_sysroot
+self._partitions = None
+self._mdir = None
+self._partimages = {}
+
+# find parted
+self.paths = "/bin:/usr/bin:/usr/sbin:/sbin/"
+if native_sysroot:
+for path in self.paths.split(':'):
+self.paths = "%s%s:%s" % (native_sysroot, path, self.paths)
+
+self.parted = find_executable("parted", self.paths)
+if not self.parted:
+raise WicError("Can't find executable parted")
+
+def __del__(self):
+for path in self._partimages.values():
+os.unlink(path)
+
+@property
+def partitions(self):
+if self._partitions is None:
+self._partitions = OrderedDict()
+out = exec_cmd("%s -sm %s unit B print" % (self.parted, 
self.imagepath))
+parttype = namedtuple("Part", "pnum start end size fstype")
+for line in out.splitlines()[2:]:
+pnum, start, end, size, fstype = line.split(':')[:5]
+partition = parttype(pnum, int(start[:-1]), int(end[:-1]),
+ int(size[:-1]), fstype)
+self._partitions[pnum] = partition
+
+return self._partitions
+
+@property
+def mdir(self):
+if self._mdir is None:
+self._mdir = find_executable("mdir", self.paths)
+if not self._mdir:
+raise WicError("Can't find executable mdir")
+return self._mdir
+
+def _get_part_image(self, pnum):
+if pnum not in self.partitions:
+raise WicError("Partition %s is not in the image")
+part = self.partitions[pnum]
+if not part.fstype.startswith("fat"):
+raise WicError("Not supported fstype: {}".format(part.fstype))
+if pnum not in self._partimages:
+tmpf = tempfile.NamedTemporaryFile(prefix="wic-part")
+dst_fname = tmpf.name
+tmpf.close()
+sparse_copy(self.imagepath, dst_fname, skip=part.start, 
length=part.size)
+self._partimages[pnum] = dst_fname
+
+return self._partimages[pnum]
+
+def dir(self, pnum, path):
+return exec_cmd("{} -i {} ::{}".format(self.mdir,
+   self._get_part_image(pnum),
+   path))
+
 def wic_ls(args, native_sysroot):
 """List contents of partitioned image or vfat partition."""
-pass
+disk = Disk(args.path.image, native_sysroot)
+if not args.path.part:
+if disk.partitions:
+print('Num StartEnd  Size  Fstype')
+for part in disk.partitions.values():
+print("{:2s}  {:12d} {:12d} {:12d}  {}".format(\
+  part.pnum, part.start, part.end,
+  part.size, part.fstype))
+else:
+path = args.path.path or '/'
+print(disk.dir(args.path.part, path))
 
 def find_canned(scripts_path, file_name):
 """
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 13/26] wic: add Disk._prop helper

2017-06-13 Thread Ed Bartosh
Added generic helper to use in property methods to
access commands in a lazy manner.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/engine.py | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index f8f2844..e3701c4 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -267,13 +267,18 @@ class Disk:
 
 return self._partitions
 
+def _prop(self, name):
+"""Get path to the executable in a lazy way."""
+aname = "_%s" % name
+if getattr(self, aname) is None:
+setattr(self, aname, find_executable(name, self.paths))
+if not getattr(self, aname):
+raise WicError("Can't find executable {}".format(name))
+return getattr(self, aname)
+
 @property
 def mdir(self):
-if self._mdir is None:
-self._mdir = find_executable("mdir", self.paths)
-if not self._mdir:
-raise WicError("Can't find executable mdir")
-return self._mdir
+return self._prop('mdir')
 
 def _get_part_image(self, pnum):
 if pnum not in self.partitions:
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 07/26] wic: add 'wic ls' command

2017-06-13 Thread Ed Bartosh
Added empty 'wic ls' command that does nothing.
The functionality will be added by the next commits.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/engine.py |  4 
 scripts/wic   | 15 +++
 2 files changed, 19 insertions(+)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 6473582..e58beb7 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -225,6 +225,10 @@ def wic_list(args, scripts_path):
 
 return False
 
+def wic_ls(args, native_sysroot):
+"""List contents of partitioned image or vfat partition."""
+pass
+
 def find_canned(scripts_path, file_name):
 """
 Find a file either by its path or by name in the canned files dir.
diff --git a/scripts/wic b/scripts/wic
index 6c9a30d..4161f80 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -234,6 +234,14 @@ def wic_list_subcommand(args, usage_str):
 raise WicError("Bad list arguments, exiting")
 
 
+def wic_ls_subcommand(args, usage_str):
+"""
+Command-line handling for list content of images.
+The real work is done by engine.wic_ls()
+"""
+engine.wic_ls(args, args.native_sysroot)
+
+
 def wic_help_subcommand(args, usage_str):
 """
 Command-line handling for help subcommand to keep the current
@@ -266,6 +274,9 @@ helptopics = {
 "create":[wic_help_topic_subcommand,
   wic_help_topic_usage,
   hlp.wic_create_help],
+"ls":[wic_help_topic_subcommand,
+  wic_help_topic_usage,
+  hlp.wic_ls_help],
 "list":  [wic_help_topic_subcommand,
   wic_help_topic_usage,
   hlp.wic_list_help]
@@ -359,6 +370,10 @@ subcommands = {
   hlp.wic_list_usage,
   hlp.wic_list_help,
   wic_init_parser_list],
+"ls":[wic_ls_subcommand,
+  hlp.wic_ls_usage,
+  hlp.wic_ls_help,
+  wic_init_parser_ls],
 "help":  [wic_help_subcommand,
   wic_help_topic_usage,
   hlp.wic_help_help,
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 14/26] wic: add mcopy property

2017-06-13 Thread Ed Bartosh
Added property that points to the mcopy executable.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/engine.py | 5 +
 1 file changed, 5 insertions(+)

diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index e3701c4..f24fb9a 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -237,6 +237,7 @@ class Disk:
 self.native_sysroot = native_sysroot
 self._partitions = None
 self._mdir = None
+self._mcopy = None
 self._partimages = {}
 
 # find parted
@@ -280,6 +281,10 @@ class Disk:
 def mdir(self):
 return self._prop('mdir')
 
+@property
+def mcopy(self):
+return self._prop("mcopy")
+
 def _get_part_image(self, pnum):
 if pnum not in self.partitions:
 raise WicError("Partition %s is not in the image")
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 11/26] wic: add help and usage content for 'wic cp'

2017-06-13 Thread Ed Bartosh
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 
---
 scripts/lib/wic/help.py | 62 +
 1 file changed, 62 insertions(+)

diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py
index bb3c749..e93ac4b 100644
--- a/scripts/lib/wic/help.py
+++ b/scripts/lib/wic/help.py
@@ -349,6 +349,68 @@ DESCRIPTION
 
 """
 
+wic_cp_usage = """
+
+ Copy files and directories to the vfat partitions
+
+ usage: wic cp  :[] [--native-sysroot ]
+
+ This command  copies local files or directories to the vfat partitions of 
partitioned
+ image.
+
+ See 'wic help cp' for more detailed instructions.
+
+"""
+
+wic_cp_help = """
+
+NAME
+wic cp - copy files and directories to the vfat partitions
+
+SYNOPSIS
+wic cp  :
+wic cp  :
+wic cp  : --native-sysroot 
+
+DESCRIPTION
+This command copies files and directories to the vfat partition of the
+wic image.
+
+The first form of it copies file or directory to the root directory of
+the vfat partition:
+$ wic cp test.wks 
tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
+$ wic ls 
tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
+Volume in drive : is boot
+ Volume Serial Number is DB4C-FD4C
+Directory for ::/
+
+efi   2017-05-24  18:15
+loader2017-05-24  18:15
+startup  nsh26 2017-05-24  18:15
+vmlinuz6926384 2017-05-24  18:15
+test wks   628 2017-05-24  21:22
+5 files   6 927 038 bytes
+ 15 677 440 bytes free
+
+The second form of the command copies file or directory to the specified 
directory
+on the vfat partition:
+   $ wic cp test 
tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/efi/
+   $ wic ls 
tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/eti/
+   Volume in drive : is boot
+Volume Serial Number is DB4C-FD4C
+   Directory for ::/efi
+
+   . 2017-05-24  18:15
+   ..2017-05-24  18:15
+   boot  2017-05-24  18:15
+   test  2017-05-24  21:27
+   4 files   0 bytes
+15 675 392 bytes free
+
+The -n option is used to specify the path to the native sysroot
+containing the tools(parted and mtools) to use.
+"""
+
 wic_plugins_help = """
 
 NAME
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 06/26] wic: add help and usage content for 'wic ls'

2017-06-13 Thread Ed Bartosh
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 
---
 scripts/lib/wic/help.py | 65 +
 1 file changed, 65 insertions(+)

diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py
index f9f7268..bb3c749 100644
--- a/scripts/lib/wic/help.py
+++ b/scripts/lib/wic/help.py
@@ -284,6 +284,71 @@ DESCRIPTION
 details.
 """
 
+wic_ls_usage = """
+
+ List content of a partitioned image
+
+ usage: wic ls [:[]] [--native-sysroot ]
+
+ This command  outputs either list of image partitions or directory contents
+ of vfat partitions.
+
+ See 'wic help ls' for more detailed instructions.
+
+"""
+
+wic_ls_help = """
+
+NAME
+wic ls - List contents of partitioned image or vfat partitions
+
+SYNOPSIS
+wic ls 
+wic ls :
+wic ls :
+wic ls : --native-sysroot 
+
+DESCRIPTION
+This command lists either partitions of the image or directory contents
+of vfat partitions.
+
+The first form it lists partitions of the image.
+For example:
+$ wic ls tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic
+Num StartEnd  Size  Fstype
+11048576 24438783 23390208  fat16
+2   25165824 50315263 25149440  ext4
+
+Second and third form list directory content of vfat partition:
+$ wic ls 
tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1
+Volume in drive : is boot
+ Volume Serial Number is 2DF2-5F02
+Directory for ::/
+
+efi   2017-05-11  10:54
+startup  nsh26 2017-05-11  10:54
+vmlinuz6922288 2017-05-11  10:54
+3 files   6 922 314 bytes
+ 15 818 752 bytes free
+
+
+$ wic ls 
tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/EFI/boot/
+Volume in drive : is boot
+ Volume Serial Number is 2DF2-5F02
+Directory for ::/EFI/boot
+
+. 2017-05-11  10:54
+..2017-05-11  10:54
+grub cfg   679 2017-05-11  10:54
+bootx64  efi571392 2017-05-11  10:54
+4 files 572 071 bytes
+ 15 818 752 bytes free
+
+The -n option is used to specify the path to the native sysroot
+containing the tools(parted and mtools) to use.
+
+"""
+
 wic_plugins_help = """
 
 NAME
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 04/26] bootimg-pcbios: make boot image file unique

2017-06-13 Thread Ed Bartosh
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 
---
 scripts/lib/wic/plugins/source/bootimg-pcbios.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py 
b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 5890c12..98ad88b 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -186,7 +186,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
  extra_blocks, part.mountpoint, blocks)
 
 # dosfs image, created by mkdosfs
-bootimg = "%s/boot.img" % cr_workdir
+bootimg = "%s/boot%s.img" % (cr_workdir, part.lineno)
 
 dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (bootimg, blocks)
 exec_native_cmd(dosfs_cmd, native_sysroot)
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 03/26] filemap: add parameter 'length' to sparse_copy

2017-06-13 Thread Ed Bartosh
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 
---
 scripts/lib/wic/filemap.py | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py
index 585b7ea..8fe302a 100644
--- a/scripts/lib/wic/filemap.py
+++ b/scripts/lib/wic/filemap.py
@@ -530,7 +530,8 @@ def filemap(image, log=None):
 except ErrorNotSupp:
 return FilemapSeek(image, log)
 
-def sparse_copy(src_fname, dst_fname, offset=0, skip=0, api=None):
+def sparse_copy(src_fname, dst_fname, offset=0, skip=0,
+length=0, api=None):
 """Efficiently copy sparse file to or into another file."""
 if not api:
 api = filemap
@@ -541,6 +542,7 @@ def sparse_copy(src_fname, dst_fname, offset=0, skip=0, 
api=None):
 dst_file = open(dst_fname, 'wb')
 dst_file.truncate(os.path.getsize(src_fname))
 
+written = 0
 for first, last in fmap.get_mapped_ranges(0, fmap.blocks_cnt):
 start = first * fmap.block_size
 end = (last + 1) * fmap.block_size
@@ -561,7 +563,14 @@ def sparse_copy(src_fname, dst_fname, offset=0, skip=0, 
api=None):
 while read < to_read:
 if read + chunk_size > to_read:
 chunk_size = to_read - read
-chunk = fmap._f_image.read(chunk_size)
+size = chunk_size
+if length and written + size > length:
+size = length - written
+chunk = fmap._f_image.read(size)
 dst_file.write(chunk)
-read += chunk_size
+read += size
+written += size
+if written == length:
+dst_file.close()
+return
 dst_file.close()
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 01/26] mtools-native: disable reading host configs

2017-06-13 Thread Ed Bartosh
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 
---
 .../mtools/mtools/disable-hardcoded-configs.patch   | 17 +
 meta/recipes-devtools/mtools/mtools_4.0.18.bb   |  1 +
 2 files changed, 18 insertions(+)
 create mode 100644 
meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch

diff --git 
a/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch 
b/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
new file mode 100644
index 000..92755be
--- /dev/null
+++ b/meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch
@@ -0,0 +1,17 @@
+--- mtools-4.0.18/config.c.orig2017-06-13 12:27:38.64400 +0300
 mtools-4.0.18/config.c 2017-06-13 12:28:47.57600 +0300
+@@ -701,14 +701,6 @@
+   memcpy(devices, const_devices,
+  nr_const_devices*sizeof(struct device));
+ 
+-(void) ((parse(CONF_FILE,1) |
+-   parse(LOCAL_CONF_FILE,1) |
+-   parse(SYS_CONF_FILE,1)) ||
+-  (parse(OLD_CONF_FILE,1) |
+-   parse(OLD_LOCAL_CONF_FILE,1)));
+-/* the old-name configuration files only get executed if none of the
+- * new-name config files were used */
+-
+ homedir = get_homedir();
+ if ( homedir ){
+   strncpy(conf_file, homedir, MAXPATHLEN );
diff --git a/meta/recipes-devtools/mtools/mtools_4.0.18.bb 
b/meta/recipes-devtools/mtools/mtools_4.0.18.bb
index b0efc9e..88d1d96 100644
--- a/meta/recipes-devtools/mtools/mtools_4.0.18.bb
+++ b/meta/recipes-devtools/mtools/mtools_4.0.18.bb
@@ -33,6 +33,7 @@ SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \

file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \
"
 
+SRC_URI_append_class-native = "file://disable-hardcoded-configs.patch"
 
 inherit autotools texinfo
 
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 02/26] filemap: fix skip logic

2017-06-13 Thread Ed Bartosh
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 
---
 scripts/lib/wic/filemap.py | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/wic/filemap.py b/scripts/lib/wic/filemap.py
index 1f1aacc..585b7ea 100644
--- a/scripts/lib/wic/filemap.py
+++ b/scripts/lib/wic/filemap.py
@@ -545,11 +545,14 @@ def sparse_copy(src_fname, dst_fname, offset=0, skip=0, 
api=None):
 start = first * fmap.block_size
 end = (last + 1) * fmap.block_size
 
+if skip >= end:
+continue
+
 if start < skip < end:
-fmap._f_image.seek(skip, os.SEEK_SET)
-else:
-fmap._f_image.seek(start, os.SEEK_SET)
-dst_file.seek(offset + start, os.SEEK_SET)
+start = skip
+
+fmap._f_image.seek(start, os.SEEK_SET)
+dst_file.seek(offset + start - skip, os.SEEK_SET)
 
 chunk_size = 1024 * 1024
 to_read = end - start
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 00/26] #11283 wic ls & cp & rm

2017-06-13 Thread Ed Bartosh
Hi,

This is a consolidated patchet made of previously sent 'wic ls' 'wic cp' and
'wic rm' patchset. It doesn't depend on generic efi implementation, which
made these 3 patchsets pending.

Changes in v2:
- Added patch for mtools-native to fix wic tests breakage caused
  by non-deterministic mtools output
- Used assertIn and assertNotIn methods in test_wic_rm test case
  to have more useful output if test case fails.

The following changes since commit 1847d2aa40aa942b14e901634121c1bd3171c9be:

  Revert "package.bbclass: Restore functionality to detect RPM dependencies" 
(2017-06-13 06:18:49 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib ed/wip
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wip

Ed Bartosh (26):
  mtools-native: disable reading host configs
  filemap: fix skip logic
  filemap: add parameter 'length' to sparse_copy
  bootimg-pcbios: make boot image file unique
  wic: add wic_init_parser_ls
  wic: add help and usage content for 'wic ls'
  wic: add 'wic ls' command
  engine: implement listing wic images
  selftest: add new test case test_wic_ls
  wic: add wic_init_parser_cp
  wic: add help and usage content for 'wic cp'
  wic: add 'wic cp' command
  wic: add Disk._prop helper
  wic: add mcopy property
  filemap: change signature of sparse_copy function
  filemap: check if dest is written for every block
  filemap: calculate dst size correctly
  wic: add Disk._put_part_image method
  wic: fully implement 'wic cp'
  selftest: add test_wic_cp test case
  wic: add wic_init_parser_rm
  wic: add help and usage content for 'wic rm'
  wic: add 'wic rm' command
  wic: implement removing files
  wic: implement removing directories
  selftest: add test_wic_rm test case

 meta/lib/oeqa/selftest/cases/wic.py|  96 ++-
 .../mtools/mtools/disable-hardcoded-configs.patch  |  17 ++
 meta/recipes-devtools/mtools/mtools_4.0.18.bb  |   1 +
 scripts/lib/wic/engine.py  | 152 -
 scripts/lib/wic/filemap.py |  50 +-
 scripts/lib/wic/help.py| 184 +
 scripts/lib/wic/plugins/imager/direct.py   |   2 +-
 scripts/lib/wic/plugins/source/bootimg-pcbios.py   |   2 +-
 scripts/wic|  89 ++
 9 files changed, 580 insertions(+), 13 deletions(-)
 create mode 100644 
meta/recipes-devtools/mtools/mtools/disable-hardcoded-configs.patch

-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for "allarch: Append to vardepsexcl..." and 4 more

2017-06-13 Thread Patchwork
== Series Details ==

Series: "allarch: Append to vardepsexcl..." and 4 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/7211/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch[3/5] utils: Exclude OVERRIDES from hashes in multilib 
functions
 Issue Patch is missing Signed-off-by [test_signed_off_by_presence] 
  Suggested fixSign off the patch (either manually or with "git commit 
--amend -s")



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/5] insane: Don't depend on OVERRIDES

2017-06-13 Thread Richard Purdie
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 
---
 meta/classes/insane.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index fa932ef..f6fd7c7 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -973,6 +973,7 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, 
packages, d):
 error_msg = "%s contained in package %s requires %s, but 
no providers found in RDEPENDS_%s?" % \
 (filerdepends[key].replace("_%s" % pkg, 
"").replace("@underscore@", "_"), pkg, key, pkg)
 package_qa_handle_error("file-rdeps", error_msg, d)
+package_qa_check_rdepends[vardepsexclude] = "OVERRIDES"
 
 def package_qa_check_deps(pkg, pkgdest, skip, d):
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 5/5] bitbake.conf: Don't exclude MACHINE/MACHINEOVERRIDES from hashes

2017-06-13 Thread Richard Purdie
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 
---
 meta/conf/bitbake.conf | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index bc438cc..5d5ddec 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -714,11 +714,9 @@ DISTRO_NAME ??= "OpenEmbedded"
 # This works for  functions as well, they are really just environment 
variables.
 # Default OVERRIDES to make compilation fail fast in case of build system 
misconfiguration.
 OVERRIDES = 
"${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}${DISTROFEATURESOVERRIDES}:${CLASSOVERRIDE}:forcevariable"
-OVERRIDES[vardepsexclude] = "MACHINEOVERRIDES"
 CLASSOVERRIDE ?= "class-target"
 DISTROOVERRIDES ?= "${@d.getVar('DISTRO') or ''}"
 MACHINEOVERRIDES ?= "${MACHINE}"
-MACHINEOVERRIDES[vardepsexclude] = "MACHINE"
 
 FILESOVERRIDES = 
"${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


  1   2   >