[OE-core] [PATCH v2] slang: 2.3.0 -> 2.3.1

2016-12-07 Thread Huang Qiyu
1)Upgrade slang from 2.3.0 to 2.3.1.
2)Delete 0001-Fix-error-conflicting-types-for-posix_close.patch, since it is 
integrated upstream.

Signed-off-by: Huang Qiyu 
---
 ...x-error-conflicting-types-for-posix_close.patch | 39 --
 .../slang/{slang_2.3.0.bb => slang_2.3.1.bb}   |  6 ++--
 2 files changed, 3 insertions(+), 42 deletions(-)
 delete mode 100644 
meta/recipes-extended/slang/slang/0001-Fix-error-conflicting-types-for-posix_close.patch
 rename meta/recipes-extended/slang/{slang_2.3.0.bb => slang_2.3.1.bb} (90%)

diff --git 
a/meta/recipes-extended/slang/slang/0001-Fix-error-conflicting-types-for-posix_close.patch
 
b/meta/recipes-extended/slang/slang/0001-Fix-error-conflicting-types-for-posix_close.patch
deleted file mode 100644
index 57ebfe4..000
--- 
a/meta/recipes-extended/slang/slang/0001-Fix-error-conflicting-types-for-posix_close.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 96eb7e29822151823a66a1eb59f1fa4aead5ae08 Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Mon, 31 Aug 2015 06:33:21 +
-Subject: [PATCH] Fix  error: conflicting types for 'posix_close'
-
-Exposed while compiling on musl
-
-Signed-off-by: Khem Raj 

-Upstream-Status: Pending
-
- src/slposio.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/slposio.c b/src/slposio.c
-index 9ce9697..9ff9bfe 100644
 a/src/slposio.c
-+++ b/src/slposio.c
-@@ -363,7 +363,7 @@ static int posix_close_fd (int *fd)
-return 0;
- }
- 
--static int posix_close (SLFile_FD_Type *f)
-+static int posix_closex (SLFile_FD_Type *f)
- {
-int status = do_close (f);
- 
-@@ -1001,7 +1001,7 @@ static SLang_Intrin_Fun_Type Fd_Name_Table [] =
-MAKE_INTRINSIC_2("write", posix_write, V, F, B),
-MAKE_INTRINSIC_1("dup_fd", posix_dup, V, F),
-MAKE_INTRINSIC_2("dup2_fd", posix_dup2, I, F, I),
--   MAKE_INTRINSIC_1("close", posix_close, I, F),
-+   MAKE_INTRINSIC_1("close", posix_closex, I, F),
-MAKE_INTRINSIC_1("_close", posix_close_fd, I, I),
- #if defined(TTYNAME_R)
-MAKE_INTRINSIC_0("ttyname", posix_ttyname, V),
--- 
-2.5.1
-
diff --git a/meta/recipes-extended/slang/slang_2.3.0.bb 
b/meta/recipes-extended/slang/slang_2.3.1.bb
similarity index 90%
rename from meta/recipes-extended/slang/slang_2.3.0.bb
rename to meta/recipes-extended/slang/slang_2.3.1.bb
index d5967d2..7bf3af6 100644
--- a/meta/recipes-extended/slang/slang_2.3.0.bb
+++ b/meta/recipes-extended/slang/slang_2.3.1.bb
@@ -19,11 +19,11 @@ SRC_URI = 
"http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \
file://rpathfix.patch \
file://fix-check-pcre.patch \
file://slang-fix-the-iconv-existence-checking.patch \
-   file://0001-Fix-error-conflicting-types-for-posix_close.patch \
file://no-x.patch \
   "
-SRC_URI[md5sum] = "3bcc790460d52db1316c20395b7ac2f1"
-SRC_URI[sha256sum] = 
"f95224060f45e0d8212a5039b339afa5f1a94a1bb0298e796104e5b12e926129"
+
+SRC_URI[md5sum] = "bd46d1dc17a50c72004ad842829d7b1f"
+SRC_URI[sha256sum] = 
"a810d5da7b0c0c8c335393c6b4f12884be6fa7696d9ca9521ef21316a4e00f9d"
 
 UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/;
 PREMIRRORS_append = "\n http://www.jedsoft.org/releases/slang/.* 
http://www.jedsoft.org/releases/slang/old/ \n"
-- 
2.7.4



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


[OE-core] [PATCH] mpfr: 3.1.4 -> 3.1.5

2016-12-07 Thread Huang Qiyu
Upgrade mpfr from 3.1.4 to 3.1.5.

Signed-off-by: Huang Qiyu 
---
 meta/recipes-support/mpfr/{mpfr_3.1.4.bb => mpfr_3.1.5.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-support/mpfr/{mpfr_3.1.4.bb => mpfr_3.1.5.bb} (75%)

diff --git a/meta/recipes-support/mpfr/mpfr_3.1.4.bb 
b/meta/recipes-support/mpfr/mpfr_3.1.5.bb
similarity index 75%
rename from meta/recipes-support/mpfr/mpfr_3.1.4.bb
rename to meta/recipes-support/mpfr/mpfr_3.1.5.bb
index 230a862..2d59c4a 100644
--- a/meta/recipes-support/mpfr/mpfr_3.1.4.bb
+++ b/meta/recipes-support/mpfr/mpfr_3.1.5.bb
@@ -8,8 +8,8 @@ DEPENDS = "gmp"
 SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.xz \
file://long-long-thumb.patch \
"
-SRC_URI[md5sum] = "064b2c18185038e404a401b830d59be8"
-SRC_URI[sha256sum] = 
"761413b16d749c53e2bfd2b1dfaa3b027b0e793e404b90b5fbaeef60af6517f5"
+SRC_URI[md5sum] = "c4ac246cf9795a4491e7766002cd528f"
+SRC_URI[sha256sum] = 
"015fde82b3979fbe5f83501986d328331ba8ddf008c1ff3da3c238f49ca062bc"
 
 UPSTREAM_CHECK_URI = "http://www.mpfr.org/mpfr-current/;
 
-- 
2.7.4



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


Re: [OE-core] [PATCH 3/4] kern-tools: fix processing for no branch meta-data

2016-12-07 Thread Bruce Ashfield

On 2016-12-07 6:50 PM, Trevor Woerner wrote:

On Wed, Dec 7, 2016 at 1:05 PM, Trevor Woerner  wrote:

On Wed, Dec 7, 2016 at 11:18 AM, Bruce Ashfield
 wrote:

With the attached patch, I see nothing else that is named  in /tmp/

If you have the cycles, can you give it a try and let me know ?


Yes, I'm giving it a whirl right now. Thanks!


That patch looks good, how soon can it land? ;-)


For my part, I'll send it first thing tomorrow along with some version
bumps to the kernel.



I'm sure there's still something in the build that is creating
temporary files in /tmp. I'm not sure which process is doing it, I
have no reason to suspect it's the kernel tools (in fact I think it
happens too early in the build to be the kernel tools), and the tmp
files that are created are named with temporary names (e.g.
/tmp/tmp.2wavbhTlDU) so they shouldn't interfere with multiple users
building on the same machine. Each build appears to create two such
temp files that aren't cleaned up at the end of the build. Not a big
deal. I don't think it's something new that was introduced recently
(but I'd have to do more investigation to verify).


I noticed one mktemp file leaking when I was fixing the bug at hand
today. I made a note to loop back and have a look for where an early
exit is skipping clean up.

If it is the tools, I'll fix it along with the patch I did today.

Bruce





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


[OE-core] [PATCH] slang: 2.3.0 -> 2.3.1

2016-12-07 Thread Huang Qiyu
1)Upgrade slang from 2.3.0 to 2.3.1.
2)Delete one patch, since it is integrated upstream. 
 0001-Fix-error-conflicting-types-for-posix_close.patch


Signed-off-by: Huang Qiyu 
---
 meta/recipes-extended/slang/{slang_2.3.0.bb => slang_2.3.1.bb} | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-extended/slang/{slang_2.3.0.bb => slang_2.3.1.bb} (90%)

diff --git a/meta/recipes-extended/slang/slang_2.3.0.bb 
b/meta/recipes-extended/slang/slang_2.3.1.bb
similarity index 90%
rename from meta/recipes-extended/slang/slang_2.3.0.bb
rename to meta/recipes-extended/slang/slang_2.3.1.bb
index d5967d2..7bf3af6 100644
--- a/meta/recipes-extended/slang/slang_2.3.0.bb
+++ b/meta/recipes-extended/slang/slang_2.3.1.bb
@@ -19,11 +19,11 @@ SRC_URI = 
"http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \
file://rpathfix.patch \
file://fix-check-pcre.patch \
file://slang-fix-the-iconv-existence-checking.patch \
-   file://0001-Fix-error-conflicting-types-for-posix_close.patch \
file://no-x.patch \
   "
-SRC_URI[md5sum] = "3bcc790460d52db1316c20395b7ac2f1"
-SRC_URI[sha256sum] = 
"f95224060f45e0d8212a5039b339afa5f1a94a1bb0298e796104e5b12e926129"
+
+SRC_URI[md5sum] = "bd46d1dc17a50c72004ad842829d7b1f"
+SRC_URI[sha256sum] = 
"a810d5da7b0c0c8c335393c6b4f12884be6fa7696d9ca9521ef21316a4e00f9d"
 
 UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/;
 PREMIRRORS_append = "\n http://www.jedsoft.org/releases/slang/.* 
http://www.jedsoft.org/releases/slang/old/ \n"
-- 
2.7.4



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


[OE-core] [PATCH v2] xkeyboard-config: 2.18 -> 2.19

2016-12-07 Thread Zheng Ruoqin
Upgrade xkeyboard-config from 2.18 to 2.19

Signed-off-by: zhengruoqin 
---
 .../xorg-lib/{xkeyboard-config_2.18.bb => xkeyboard-config_2.19.bb}   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-graphics/xorg-lib/{xkeyboard-config_2.18.bb => 
xkeyboard-config_2.19.bb} (88%)

diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb 
b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb
similarity index 88%
rename from meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
rename to meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb
index 79fcbd8..d24d93f 100644
--- a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
+++ b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb
@@ -13,8 +13,8 @@ LICENSE = "MIT & MIT-style"
 LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
 
 SRC_URI = 
"${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
-SRC_URI[md5sum] = "c28cf45616bfec276879360bc36c6b27"
-SRC_URI[sha256sum] = 
"c41d917d6c8a59feb7ccbda51c40a6ada824fdd1e9684b52dd48c9530617ddd0"
+SRC_URI[md5sum] = "88cbf55f2f32b80ba9bb872889daf7ff"
+SRC_URI[sha256sum] = 
"83dfd186b9eb9ced69e01d8d8e2f15b6a79b2e30124874ef086f2d3048f45827"
 
 SECTION = "x11/libs"
 DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
-- 
2.7.4



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


[OE-core] [PATCH] libnotify : 0.7.6 -> 0.7.7

2016-12-07 Thread Huang Qiyu
Upgrade libnotify from 0.7.6 to 0.7.7.

Signed-off-by: Huang Qiyu 
---
 .../libnotify/{libnotify_0.7.6.bb => libnotify_0.7.7.bb}  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-gnome/libnotify/{libnotify_0.7.6.bb => libnotify_0.7.7.bb} 
(79%)

diff --git a/meta/recipes-gnome/libnotify/libnotify_0.7.6.bb 
b/meta/recipes-gnome/libnotify/libnotify_0.7.7.bb
similarity index 79%
rename from meta/recipes-gnome/libnotify/libnotify_0.7.6.bb
rename to meta/recipes-gnome/libnotify/libnotify_0.7.7.bb
index ce8e5ae..2ab2f1f 100644
--- a/meta/recipes-gnome/libnotify/libnotify_0.7.6.bb
+++ b/meta/recipes-gnome/libnotify/libnotify_0.7.7.bb
@@ -9,8 +9,8 @@ inherit gnomebase gtk-doc distro_features_check 
gobject-introspection
 # depends on gtk+3
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 
-SRC_URI[archive.md5sum] = "a4997019d08f46f3bf57b78e6f795a59"
-SRC_URI[archive.sha256sum] = 
"0ef61ca400d30e28217979bfa0e73a7406b19c32dd76150654ec5b2bdf47d837"
+SRC_URI[archive.md5sum] = "e9d911f6a22435e0b922f2fe71212b59"
+SRC_URI[archive.sha256sum] = 
"9cb4ce315b2655860c524d46b56010874214ec27e854086c1a1d0260137efc04"
 
 # there were times, we had two versions of libnotify (oe-core libnotify:0.6.x /
 # meta-gnome libnotify3: 0.7.x)
-- 
2.7.4



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


Re: [OE-core] [PATCH 3/4] kern-tools: fix processing for no branch meta-data

2016-12-07 Thread Trevor Woerner
On Wed, Dec 7, 2016 at 1:05 PM, Trevor Woerner  wrote:
> On Wed, Dec 7, 2016 at 11:18 AM, Bruce Ashfield
>  wrote:
>> With the attached patch, I see nothing else that is named  in /tmp/
>>
>> If you have the cycles, can you give it a try and let me know ?
>
> Yes, I'm giving it a whirl right now. Thanks!

That patch looks good, how soon can it land? ;-)

I'm sure there's still something in the build that is creating
temporary files in /tmp. I'm not sure which process is doing it, I
have no reason to suspect it's the kernel tools (in fact I think it
happens too early in the build to be the kernel tools), and the tmp
files that are created are named with temporary names (e.g.
/tmp/tmp.2wavbhTlDU) so they shouldn't interfere with multiple users
building on the same machine. Each build appears to create two such
temp files that aren't cleaned up at the end of the build. Not a big
deal. I don't think it's something new that was introduced recently
(but I'd have to do more investigation to verify).
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 0/4] Load devtool and reciptool plugins in a well-defined manner

2016-12-07 Thread Paul Eggleton
On Tue, 06 Dec 2016 07:37:16 Ola x Nilsson wrote:
> Ping?

I guess Ross / Richard were waiting for my ack - sorry about that.

Acked-by: Paul Eggleton 

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv2 23/32] oeqa/utils: Move targetbuild to buildproject module

2016-12-07 Thread Aníbal Limón
The new buildproject module will contain only BuildProject class
a helper class for build source code.

The remaining classes TargetBuildProject and SDKBuildProject was
move to runtime and sdk respectively.

[YOCTO #10599]

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/runtime/utils/__init__.py|  0
 meta/lib/oeqa/runtime/utils/targetbuildproject.py  | 33 +++
 meta/lib/oeqa/sdk/utils/__init__.py|  0
 meta/lib/oeqa/sdk/utils/sdkbuildproject.py | 45 ++
 .../oeqa/utils/{targetbuild.py => buildproject.py} | 68 +-
 5 files changed, 79 insertions(+), 67 deletions(-)
 create mode 100644 meta/lib/oeqa/runtime/utils/__init__.py
 create mode 100644 meta/lib/oeqa/runtime/utils/targetbuildproject.py
 create mode 100644 meta/lib/oeqa/sdk/utils/__init__.py
 create mode 100644 meta/lib/oeqa/sdk/utils/sdkbuildproject.py
 rename meta/lib/oeqa/utils/{targetbuild.py => buildproject.py} (48%)

diff --git a/meta/lib/oeqa/runtime/utils/__init__.py 
b/meta/lib/oeqa/runtime/utils/__init__.py
new file mode 100644
index 000..e69de29
diff --git a/meta/lib/oeqa/runtime/utils/targetbuildproject.py 
b/meta/lib/oeqa/runtime/utils/targetbuildproject.py
new file mode 100644
index 000..138b5ef
--- /dev/null
+++ b/meta/lib/oeqa/runtime/utils/targetbuildproject.py
@@ -0,0 +1,33 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+from oeqa.utils.buildproject import BuildProject
+
+class TargetBuildProject(BuildProject):
+
+def __init__(self, target, d, uri, foldername=None):
+self.target = target
+self.targetdir = "~/"
+BuildProject.__init__(self, d, uri, foldername, tmpdir="/tmp")
+
+def download_archive(self):
+
+self._download_archive()
+
+(status, output) = self.target.copy_to(self.localarchive, 
self.targetdir)
+if status != 0:
+raise Exception("Failed to copy archive to target, output: %s" % 
output)
+
+(status, output) = self.target.run('tar xf %s%s -C %s' % 
(self.targetdir, self.archive, self.targetdir))
+if status != 0:
+raise Exception("Failed to extract archive, output: %s" % output)
+
+#Change targetdir to project folder
+self.targetdir = self.targetdir + self.fname
+
+# The timeout parameter of target.run is set to 0 to make the ssh command
+# run with no timeout.
+def _run(self, cmd):
+return self.target.run(cmd, 0)[0]
+
+
diff --git a/meta/lib/oeqa/sdk/utils/__init__.py 
b/meta/lib/oeqa/sdk/utils/__init__.py
new file mode 100644
index 000..e69de29
diff --git a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py 
b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
new file mode 100644
index 000..1aa8a69
--- /dev/null
+++ b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
@@ -0,0 +1,45 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+import os
+import subprocess
+
+from oeqa.utils.buildproject import BuildProject
+
+class SDKBuildProject(BuildProject):
+
+def __init__(self, testpath, sdkenv, d, uri, foldername=None):
+self.sdkenv = sdkenv
+self.testdir = testpath
+self.targetdir = testpath
+bb.utils.mkdirhier(testpath)
+self.datetime = d.getVar('DATETIME', True)
+self.testlogdir = d.getVar("TEST_LOG_DIR", True)
+bb.utils.mkdirhier(self.testlogdir)
+self.logfile = os.path.join(self.testlogdir, "sdk_target_log.%s" % 
self.datetime)
+BuildProject.__init__(self, d, uri, foldername, tmpdir=testpath)
+
+def download_archive(self):
+
+self._download_archive()
+
+cmd = 'tar xf %s%s -C %s' % (self.targetdir, self.archive, 
self.targetdir)
+subprocess.check_call(cmd, shell=True)
+
+#Change targetdir to project folder
+self.targetdir = os.path.join(self.targetdir, self.fname)
+
+def run_configure(self, configure_args='', extra_cmds=' gnu-configize; '):
+return super(SDKBuildProject, 
self).run_configure(configure_args=(configure_args or '$CONFIGURE_FLAGS'), 
extra_cmds=extra_cmds)
+
+def run_install(self, install_args=''):
+return super(SDKBuildProject, 
self).run_install(install_args=(install_args or "DESTDIR=%s/../install" % 
self.targetdir))
+
+def log(self, msg):
+if self.logfile:
+with open(self.logfile, "a") as f:
+   f.write("%s\n" % msg)
+
+def _run(self, cmd):
+self.log("Running . %s; " % self.sdkenv + cmd)
+return subprocess.call(". %s; " % self.sdkenv + cmd, shell=True)
diff --git a/meta/lib/oeqa/utils/targetbuild.py 
b/meta/lib/oeqa/utils/buildproject.py
similarity index 48%
rename from meta/lib/oeqa/utils/targetbuild.py
rename to meta/lib/oeqa/utils/buildproject.py
index 59593f5..0e1ed8a 100644
--- a/meta/lib/oeqa/utils/targetbuild.py
+++ 

[OE-core] [PATCHv2 24/32] oeqa/utils: {Target, SDK, }BuildProject remove dependency of bb

2016-12-07 Thread Aníbal Limón
Don't use bitbake references inside utils modules, in order todo
that changes getVar calls for arguments in the __init__ method like
dl_dir for all the classes and testlogdir, builddatetime in
SDKBUildProject.

Also don't export proxies inside _download_archive method, a good
practice is to setup the proxies at init of the process instead of
do it in this helper module.

[YOCTO #10231]
[YOCTO #10599]

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/runtime/utils/targetbuildproject.py |  6 ++---
 meta/lib/oeqa/sdk/utils/sdkbuildproject.py| 14 +-
 meta/lib/oeqa/utils/buildproject.py   | 31 +--
 3 files changed, 17 insertions(+), 34 deletions(-)

diff --git a/meta/lib/oeqa/runtime/utils/targetbuildproject.py 
b/meta/lib/oeqa/runtime/utils/targetbuildproject.py
index 138b5ef..006d4d4 100644
--- a/meta/lib/oeqa/runtime/utils/targetbuildproject.py
+++ b/meta/lib/oeqa/runtime/utils/targetbuildproject.py
@@ -5,13 +5,13 @@ from oeqa.utils.buildproject import BuildProject
 
 class TargetBuildProject(BuildProject):
 
-def __init__(self, target, d, uri, foldername=None):
+def __init__(self, target, uri, foldername=None, dl_dir=None):
 self.target = target
 self.targetdir = "~/"
-BuildProject.__init__(self, d, uri, foldername, tmpdir="/tmp")
+BuildProject.__init__(self, uri, foldername, tmpdir="/tmp",
+dl_dir=dl_dir)
 
 def download_archive(self):
-
 self._download_archive()
 
 (status, output) = self.target.copy_to(self.localarchive, 
self.targetdir)
diff --git a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py 
b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
index 1aa8a69..cc34e0c 100644
--- a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
+++ b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py
@@ -7,17 +7,17 @@ import subprocess
 from oeqa.utils.buildproject import BuildProject
 
 class SDKBuildProject(BuildProject):
-
-def __init__(self, testpath, sdkenv, d, uri, foldername=None):
+def __init__(self, testpath, sdkenv, uri, testlogdir, builddatetime,
+foldername=None, dl_dir=None):
 self.sdkenv = sdkenv
 self.testdir = testpath
 self.targetdir = testpath
-bb.utils.mkdirhier(testpath)
-self.datetime = d.getVar('DATETIME', True)
-self.testlogdir = d.getVar("TEST_LOG_DIR", True)
-bb.utils.mkdirhier(self.testlogdir)
+os.makedirs(testpath, exist_ok=True)
+self.datetime = builddatetime
+self.testlogdir = testlogdir
+os.makedirs(self.testlogdir, exist_ok=True)
 self.logfile = os.path.join(self.testlogdir, "sdk_target_log.%s" % 
self.datetime)
-BuildProject.__init__(self, d, uri, foldername, tmpdir=testpath)
+BuildProject.__init__(self, uri, foldername, tmpdir=testpath, 
dl_dir=dl_dir)
 
 def download_archive(self):
 
diff --git a/meta/lib/oeqa/utils/buildproject.py 
b/meta/lib/oeqa/utils/buildproject.py
index 0e1ed8a..386a927 100644
--- a/meta/lib/oeqa/utils/buildproject.py
+++ b/meta/lib/oeqa/utils/buildproject.py
@@ -6,17 +6,17 @@
 
 import os
 import re
-import bb.utils
 import subprocess
+import shutil
+
 from abc import ABCMeta, abstractmethod
 
 class BuildProject(metaclass=ABCMeta):
-
-def __init__(self, d, uri, foldername=None, tmpdir="/tmp/"):
-self.d = d
+def __init__(self, uri, foldername=None, tmpdir="/tmp/", dl_dir=None):
 self.uri = uri
 self.archive = os.path.basename(uri)
 self.localarchive = os.path.join(tmpdir,self.archive)
+self.dl_dir = dl_dir
 if foldername:
 self.fname = foldername
 else:
@@ -24,27 +24,11 @@ class BuildProject(metaclass=ABCMeta):
 
 # Download self.archive to self.localarchive
 def _download_archive(self):
-
-dl_dir = self.d.getVar("DL_DIR", True)
-if dl_dir and os.path.exists(os.path.join(dl_dir, self.archive)):
-bb.utils.copyfile(os.path.join(dl_dir, self.archive), 
self.localarchive)
+if self.dl_dir and os.path.exists(os.path.join(self.dl_dir, 
self.archive)):
+shutil.copyfile(os.path.join(self.dl_dir, self.archive), 
self.localarchive)
 return
 
-exportvars = ['HTTP_PROXY', 'http_proxy',
-  'HTTPS_PROXY', 'https_proxy',
-  'FTP_PROXY', 'ftp_proxy',
-  'FTPS_PROXY', 'ftps_proxy',
-  'NO_PROXY', 'no_proxy',
-  'ALL_PROXY', 'all_proxy',
-  'SOCKS5_USER', 'SOCKS5_PASSWD']
-
-cmd = ''
-for var in exportvars:
-val = self.d.getVar(var, True)
-if val:
-cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)
-
-cmd = cmd + "wget -O %s %s" % (self.localarchive, self.uri)
+cmd = "wget -O %s %s" % (self.localarchive, self.uri)
 subprocess.check_call(cmd, shell=True)
 
 # This method 

[OE-core] [PATCHv2 32/32] oeqa: Fix files handling on runtime tests.

2016-12-07 Thread Aníbal Limón
Common files was move to oeqa/files from oeqa/runtime/files
because the same files are used across Runtime,SDK,eSDK tests.

Signed-off-by: Aníbal Limón 
---
 meta/classes/testexport.bbclass | 5 +
 meta/lib/oeqa/oetest.py | 1 +
 meta/lib/oeqa/runtime/gcc.py| 4 ++--
 meta/lib/oeqa/runtime/perl.py   | 2 +-
 meta/lib/oeqa/runtime/python.py | 2 +-
 5 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/meta/classes/testexport.bbclass b/meta/classes/testexport.bbclass
index 5147020..a3ccd63 100644
--- a/meta/classes/testexport.bbclass
+++ b/meta/classes/testexport.bbclass
@@ -87,6 +87,7 @@ def exportTests(d,tc):
 #   - the contents of oeqa/utils and oeqa/runtime/files
 #   - oeqa/oetest.py and oeqa/runexport.py (this will get copied to 
exportpath not exportpath/oeqa)
 #   - __init__.py files
+bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/files"))
 bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/runtime/files"))
 bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/utils"))
 # copy test modules, this should cover tests in other layers too
@@ -124,6 +125,10 @@ def exportTests(d,tc):
 for f in files:
 if f.endswith(".py"):
 shutil.copy2(os.path.join(root, f), os.path.join(exportpath, 
"oeqa/utils"))
+# copy oeqa/files/*
+for root, dirs, files in os.walk(os.path.join(oeqadir, "files")):
+for f in files:
+shutil.copy2(os.path.join(root, f), os.path.join(exportpath, 
"oeqa/files"))
 # copy oeqa/runtime/files/*
 for root, dirs, files in os.walk(os.path.join(oeqadir, "runtime/files")):
 for f in files:
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index f9e9025..48bcafc 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -201,6 +201,7 @@ class TestContext(object):
 self.testsrequired = self._get_test_suites_required()
 
 self.filesdir = 
os.path.join(os.path.dirname(os.path.abspath(__file__)), "runtime/files")
+self.corefilesdir = 
os.path.join(os.path.dirname(os.path.abspath(__file__)), "files")
 self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
 self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
 
diff --git a/meta/lib/oeqa/runtime/gcc.py b/meta/lib/oeqa/runtime/gcc.py
index d90cd17..6edb89f 100644
--- a/meta/lib/oeqa/runtime/gcc.py
+++ b/meta/lib/oeqa/runtime/gcc.py
@@ -12,9 +12,9 @@ class GccCompileTest(oeRuntimeTest):
 
 @classmethod
 def setUpClass(self):
-
oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, 
"test.c"), "/tmp/test.c")
+
oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.corefilesdir, 
"test.c"), "/tmp/test.c")
 
oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, 
"testmakefile"), "/tmp/testmakefile")
-
oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, 
"test.cpp"), "/tmp/test.cpp")
+
oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.corefilesdir, 
"test.cpp"), "/tmp/test.cpp")
 
 @testcase(203)
 def test_gcc_compile(self):
diff --git a/meta/lib/oeqa/runtime/perl.py b/meta/lib/oeqa/runtime/perl.py
index e044d0a..6bf98f1 100644
--- a/meta/lib/oeqa/runtime/perl.py
+++ b/meta/lib/oeqa/runtime/perl.py
@@ -12,7 +12,7 @@ class PerlTest(oeRuntimeTest):
 
 @classmethod
 def setUpClass(self):
-
oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, 
"test.pl"), "/tmp/test.pl")
+
oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.corefilesdir, 
"test.pl"), "/tmp/test.pl")
 
 @testcase(1141)
 def test_perl_exists(self):
diff --git a/meta/lib/oeqa/runtime/python.py b/meta/lib/oeqa/runtime/python.py
index 29a231c..93e822c 100644
--- a/meta/lib/oeqa/runtime/python.py
+++ b/meta/lib/oeqa/runtime/python.py
@@ -12,7 +12,7 @@ class PythonTest(oeRuntimeTest):
 
 @classmethod
 def setUpClass(self):
-
oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, 
"test.py"), "/tmp/test.py")
+
oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.corefilesdir, 
"test.py"), "/tmp/test.py")
 
 @testcase(1145)
 def test_python_exists(self):
-- 
2.1.4

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


[OE-core] [PATCHv2 28/32] oeqa/sdkext: Adds case and context modules.

2016-12-07 Thread Aníbal Limón
The extensible sdk context and case modules extends the sdk ones,
this means that the tests from sdk are run also the sdkext tests.

Enables support in context for use oe-test esdk command for run
the test suites, the same options of sdk are required for run esdk tests.

Removes old related to case and context inside oetest.py.

[YOCTO #10599]

Signed-off-by: Aníbal Limón 
---
 meta/classes/testsdk.bbclass| 99 +++--
 meta/lib/oeqa/oetest.py | 40 -
 meta/lib/oeqa/sdkext/case.py| 21 +
 meta/lib/oeqa/sdkext/context.py | 21 +
 4 files changed, 88 insertions(+), 93 deletions(-)
 create mode 100644 meta/lib/oeqa/sdkext/case.py
 create mode 100644 meta/lib/oeqa/sdkext/context.py

diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index 4c4df10..24529ca 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -16,37 +16,6 @@
 
 TESTSDKLOCK = "${TMPDIR}/testsdk.lock"
 
-def run_test_context(CTestContext, d, testdir, tcname, pn, *args):
-import glob
-import time
-
-targets = glob.glob(d.expand(testdir + "/tc/environment-setup-*"))
-for sdkenv in targets:
-bb.plain("Testing %s" % sdkenv)
-tc = CTestContext(d, testdir, sdkenv, tcname, args)
-
-# this is a dummy load of tests
-# we are doing that to find compile errors in the tests themselves
-# before booting the image
-try:
-tc.loadTests()
-except Exception as e:
-import traceback
-bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
-
-starttime = time.time()
-result = tc.runTests()
-stoptime = time.time()
-if result.wasSuccessful():
-bb.plain("%s SDK(%s):%s - Ran %d test%s in %.3fs" % (pn, 
os.path.basename(tcname), os.path.basename(sdkenv),result.testsRun, 
result.testsRun != 1 and "s" or "", stoptime - starttime))
-msg = "%s - OK - All required tests passed" % pn
-skipped = len(result.skipped)
-if skipped:
-msg += " (skipped=%d)" % skipped
-bb.plain(msg)
-else:
-bb.fatal("%s - FAILED - check the task log and the commands log" % 
pn)
-
 def testsdk_main(d):
 import os
 import subprocess
@@ -121,16 +90,20 @@ addtask testsdk
 do_testsdk[nostamp] = "1"
 do_testsdk[lockfiles] += "${TESTSDKLOCK}"
 
-TEST_LOG_SDKEXT_DIR ?= "${WORKDIR}/testsdkext"
 TESTSDKEXTLOCK = "${TMPDIR}/testsdkext.lock"
 
 def testsdkext_main(d):
 import os
-import oeqa.sdkext
+import json
 import subprocess
+import logging
+
 from bb.utils import export_proxies
-from oeqa.oetest import SDKTestContext, SDKExtTestContext
 from oeqa.utils import avoid_paths_in_environ
+from oeqa.sdk.context import OESDKExtTestContext, 
OESDKExtTestContextExecutor
+
+pn = d.getVar("PN", True)
+logger = logging.getLogger("BitBake")
 
 # extensible sdk use network
 export_proxies(d)
@@ -141,20 +114,24 @@ def testsdkext_main(d):
   d.getVar('BASE_WORKDIR', True)]
 os.environ['PATH'] = avoid_paths_in_environ(paths_to_avoid)
 
-pn = d.getVar("PN", True)
-bb.utils.mkdirhier(d.getVar("TEST_LOG_SDKEXT_DIR", True))
-
 tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.sh")
 if not os.path.exists(tcname):
 bb.fatal("The toolchain ext %s is not built. Build it before running 
the" \
  " tests: 'bitbake  -c populate_sdk_ext' ." % tcname)
 
-testdir = d.expand("${WORKDIR}/testsdkext/")
-bb.utils.remove(testdir, True)
-bb.utils.mkdirhier(testdir)
-sdkdir = os.path.join(testdir, 'tc')
+tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.testdata.json")
+test_data = json.load(open(tdname, "r"))
+
+target_pkg_manifest = OESDKExtTestContextExecutor._load_manifest(
+d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"))
+host_pkg_manifest = OESDKExtTestContextExecutor._load_manifest(
+d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"))
+
+sdk_dir = d.expand("${WORKDIR}/testsdkext/")
+bb.utils.remove(sdk_dir, True)
+bb.utils.mkdirhier(sdk_dir)
 try:
-subprocess.check_output("%s -y -d %s" % (tcname, sdkdir), shell=True)
+subprocess.check_output("%s -y -d %s" % (tcname, sdk_dir), shell=True)
 except subprocess.CalledProcessError as e:
 msg = "Couldn't install the extensible SDK:\n%s" % 
e.output.decode("utf-8")
 logfn = os.path.join(sdkdir, 'preparing_build_system.log')
@@ -165,19 +142,35 @@ def testsdkext_main(d):
 msg += line
 bb.fatal(msg)
 
-try:
-bb.plain("Running SDK Compatibility tests ...")
-run_test_context(SDKExtTestContext, d, testdir, tcname, pn, True)
-finally:
-pass
+fail = False
+sdk_envs = 

[OE-core] [PATCHv2 31/32] oeqa/runtime: Fix TargetBuildProject instances

2016-12-07 Thread Aníbal Limón
TargetBuildProject was refactored to avoid bitbake dependency so
the instance don't allow to pass data store anymore.

classes/testimage: Export proxies before run tests

The TargetBuildProject based tests download archives from network.

Signed-off-by: Aníbal Limón 
---
 meta/classes/testimage.bbclass   | 4 
 meta/lib/oeqa/runtime/buildcvs.py| 9 +
 meta/lib/oeqa/runtime/buildgalculator.py | 8 +---
 meta/lib/oeqa/runtime/buildiptables.py   | 8 +---
 4 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 6b6781d..89ed003 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -129,11 +129,15 @@ def testimage_main(d):
 from oeqa.oetest import ImageTestContext
 from oeqa.targetcontrol import get_target_controller
 from oeqa.utils.dump import get_host_dumper
+from bb.utils import export_proxies
 
 pn = d.getVar("PN", True)
 bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
 test_create_extract_dirs(d)
 
+# runtime use network for download projects for build
+export_proxies(d)
+
 # we need the host dumper in test context
 host_dumper = get_host_dumper(d)
 
diff --git a/meta/lib/oeqa/runtime/buildcvs.py 
b/meta/lib/oeqa/runtime/buildcvs.py
index fe6cbfb..a5ca3a5 100644
--- a/meta/lib/oeqa/runtime/buildcvs.py
+++ b/meta/lib/oeqa/runtime/buildcvs.py
@@ -1,6 +1,6 @@
 from oeqa.oetest import oeRuntimeTest, skipModule
 from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import TargetBuildProject
+from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
 
 def setUpModule():
 if not oeRuntimeTest.hasFeature("tools-sdk"):
@@ -10,9 +10,10 @@ class BuildCvsTest(oeRuntimeTest):
 
 @classmethod
 def setUpClass(self):
-self.project = TargetBuildProject(oeRuntimeTest.tc.target, 
oeRuntimeTest.tc.d,
-
"http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2;)
-self.project.download_archive()
+dl_dir = oeRuntimeTest.tc.d.getVar('DL_DIR', True)
+self.project = TargetBuildProject(oeRuntimeTest.tc.target,
+
"http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2;,
+dl_dir=dl_dir)
 
 @testcase(205)
 @skipUnlessPassed("test_ssh")
diff --git a/meta/lib/oeqa/runtime/buildgalculator.py 
b/meta/lib/oeqa/runtime/buildgalculator.py
index 220101d..20f0a79 100644
--- a/meta/lib/oeqa/runtime/buildgalculator.py
+++ b/meta/lib/oeqa/runtime/buildgalculator.py
@@ -1,6 +1,6 @@
 from oeqa.oetest import oeRuntimeTest, skipModule
 from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import TargetBuildProject
+from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
 
 def setUpModule():
 if not oeRuntimeTest.hasFeature("tools-sdk"):
@@ -10,9 +10,11 @@ class GalculatorTest(oeRuntimeTest):
 @testcase(1526)
 @skipUnlessPassed("test_ssh")
 def test_galculator(self):
+dl_dir = oeRuntimeTest.tc.d.getVar('DL_DIR', True)
 try:
-project = TargetBuildProject(oeRuntimeTest.tc.target, 
oeRuntimeTest.tc.d,
-  
"http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2;)
+project = TargetBuildProject(oeRuntimeTest.tc.target,
+  
"http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2;,
+  dl_dir=dl_dir)
 project.download_archive()
 
 self.assertEqual(project.run_configure(), 0,
diff --git a/meta/lib/oeqa/runtime/buildiptables.py 
b/meta/lib/oeqa/runtime/buildiptables.py
index bc75d0a..a0e82f0 100644
--- a/meta/lib/oeqa/runtime/buildiptables.py
+++ b/meta/lib/oeqa/runtime/buildiptables.py
@@ -1,6 +1,6 @@
 from oeqa.oetest import oeRuntimeTest, skipModule
 from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import TargetBuildProject
+from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
 
 def setUpModule():
 if not oeRuntimeTest.hasFeature("tools-sdk"):
@@ -10,8 +10,10 @@ class BuildIptablesTest(oeRuntimeTest):
 
 @classmethod
 def setUpClass(self):
-self.project = TargetBuildProject(oeRuntimeTest.tc.target, 
oeRuntimeTest.tc.d,
-
"http://downloads.yoctoproject.org/mirror/sources/iptables-1.4.13.tar.bz2;)
+dl_dir = oeRuntimeTest.tc.d.getVar('DL_DIR', True)
+self.project = TargetBuildProject(oeRuntimeTest.tc.target,
+
"http://downloads.yoctoproject.org/mirror/sources/iptables-1.4.13.tar.bz2;,
+dl_dir=dl_dir)
 self.project.download_archive()
 
 @testcase(206)
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org

[OE-core] [PATCHv2 27/32] oeqa/sdkext: Move test cases inside cases directory

2016-12-07 Thread Aníbal Limón
For match with the new structure of the OEQA framework.

In the new framework Test component base directory in this case
sdk module will contain case and context implementations.

[YOCTO #10599]

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/sdkext/__init__.py   | 3 ---
 meta/lib/oeqa/sdkext/{ => cases}/devtool.py| 0
 meta/lib/oeqa/sdkext/{ => cases}/sdk_update.py | 0
 3 files changed, 3 deletions(-)
 rename meta/lib/oeqa/sdkext/{ => cases}/devtool.py (100%)
 rename meta/lib/oeqa/sdkext/{ => cases}/sdk_update.py (100%)

diff --git a/meta/lib/oeqa/sdkext/__init__.py b/meta/lib/oeqa/sdkext/__init__.py
index 4cf3fa7..e69de29 100644
--- a/meta/lib/oeqa/sdkext/__init__.py
+++ b/meta/lib/oeqa/sdkext/__init__.py
@@ -1,3 +0,0 @@
-# Enable other layers to have tests in the same named directory
-from pkgutil import extend_path
-__path__ = extend_path(__path__, __name__)
diff --git a/meta/lib/oeqa/sdkext/devtool.py 
b/meta/lib/oeqa/sdkext/cases/devtool.py
similarity index 100%
rename from meta/lib/oeqa/sdkext/devtool.py
rename to meta/lib/oeqa/sdkext/cases/devtool.py
diff --git a/meta/lib/oeqa/sdkext/sdk_update.py 
b/meta/lib/oeqa/sdkext/cases/sdk_update.py
similarity index 100%
rename from meta/lib/oeqa/sdkext/sdk_update.py
rename to meta/lib/oeqa/sdkext/cases/sdk_update.py
-- 
2.1.4

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


[OE-core] [PATCHv2 30/32] oeqa/sdkext/cases: Migrate test case to new OEQA framework

2016-12-07 Thread Aníbal Limón
Summary,

- Changes base case class to OESDKExtTest.
- Changes decorator classes to new ones.
- Chnages variable names sdktestdir -> sdk_dir.
- Added missing license to MIT.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/sdk/cases/buildgalculator.py |  2 +-
 meta/lib/oeqa/sdk/cases/gcc.py |  2 +-
 meta/lib/oeqa/sdkext/cases/devtool.py  | 49 --
 meta/lib/oeqa/sdkext/cases/sdk_update.py   | 17 ++-
 4 files changed, 38 insertions(+), 32 deletions(-)

diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py 
b/meta/lib/oeqa/sdk/cases/buildgalculator.py
index bdc8b6a..b9b24ee 100644
--- a/meta/lib/oeqa/sdk/cases/buildgalculator.py
+++ b/meta/lib/oeqa/sdk/cases/buildgalculator.py
@@ -10,7 +10,7 @@ class GalculatorTest(OESDKTestCase):
 def setUpClass(self):
 if not (self.tc.hasTargetPackage("gtk+3") or\
 self.tc.hasTargetPackage("libgtk-3.0")):
-raise unittest.SkipTest("%s class: SDK don't support gtk+3" % 
self.__name__)
+raise unittest.SkipTest("%s class: SDK don't support gtk+3" % 
self.__class__.__name__)
 
 def test_galculator(self):
 dl_dir = self.td.get('DL_DIR', None)
diff --git a/meta/lib/oeqa/sdk/cases/gcc.py b/meta/lib/oeqa/sdk/cases/gcc.py
index e06af4c..36725e3 100644
--- a/meta/lib/oeqa/sdk/cases/gcc.py
+++ b/meta/lib/oeqa/sdk/cases/gcc.py
@@ -20,7 +20,7 @@ class GccCompileTest(OESDKTestCase):
 machine = self.td.get("MACHINE")
 if not self.tc.hasHostPackage("packagegroup-cross-canadian-%s" % 
machine):
 raise unittest.SkipTest("%s class: SDK doesn't contain a 
cross-canadian toolchain",
-self.__name__)
+self.__class__.__name__)
 
 def test_gcc_compile(self):
 self._run('$CC %s/test.c -o %s/test -lm' % (self.tc.sdk_dir, 
self.tc.sdk_dir))
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py 
b/meta/lib/oeqa/sdkext/cases/devtool.py
index 65f41f6..da0050c 100644
--- a/meta/lib/oeqa/sdkext/cases/devtool.py
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -1,18 +1,22 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
 import shutil
 import subprocess
-import urllib.request
-from oeqa.oetest import oeSDKExtTest
-from oeqa.utils.decorators import *
 
-class DevtoolTest(oeSDKExtTest):
+from oeqa.sdkext.case import OESDKExtTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.oeid import OETestID
+
+class DevtoolTest(OESDKExtTestCase):
 @classmethod
 def setUpClass(self):
-self.myapp_src = os.path.join(self.tc.sdkextfilesdir, "myapp")
-self.myapp_dst = os.path.join(self.tc.sdktestdir, "myapp")
+self.myapp_src = os.path.join(self.tc.esdk_files_dir, "myapp")
+self.myapp_dst = os.path.join(self.tc.sdk_dir, "myapp")
 shutil.copytree(self.myapp_src, self.myapp_dst)
 
-self.myapp_cmake_src = os.path.join(self.tc.sdkextfilesdir, 
"myapp_cmake")
-self.myapp_cmake_dst = os.path.join(self.tc.sdktestdir, "myapp_cmake")
+self.myapp_cmake_src = os.path.join(self.tc.esdk_files_dir, 
"myapp_cmake")
+self.myapp_cmake_dst = os.path.join(self.tc.sdk_dir, "myapp_cmake")
 shutil.copytree(self.myapp_cmake_src, self.myapp_cmake_dst)
 
 def _test_devtool_build(self, directory):
@@ -37,31 +41,31 @@ class DevtoolTest(oeSDKExtTest):
 
 def test_devtool_location(self):
 output = self._run('which devtool')
-self.assertEqual(output.startswith(self.tc.sdktestdir), True, \
+self.assertEqual(output.startswith(self.tc.sdk_dir), True, \
 msg="Seems that devtool isn't the eSDK one: %s" % output)
 
-@skipUnlessPassed('test_devtool_location')
+@OETestDepends(['test_devtool_location'])
 def test_devtool_add_reset(self):
 self._run('devtool add myapp %s' % self.myapp_dst)
 self._run('devtool reset myapp')
 
-@testcase(1473)
-@skipUnlessPassed('test_devtool_location')
+@OETestID(1473)
+@OETestDepends(['test_devtool_location'])
 def test_devtool_build_make(self):
 self._test_devtool_build(self.myapp_dst)
 
-@testcase(1474)
-@skipUnlessPassed('test_devtool_location')
+@OETestID(1474)
+@OETestDepends(['test_devtool_location'])
 def test_devtool_build_esdk_package(self):
 self._test_devtool_build_package(self.myapp_dst)
 
-@testcase(1479)
-@skipUnlessPassed('test_devtool_location')
+@OETestID(1479)
+@OETestDepends(['test_devtool_location'])
 def test_devtool_build_cmake(self):
 self._test_devtool_build(self.myapp_cmake_dst)
 
-@testcase(1482)
-@skipUnlessPassed('test_devtool_location')
+@OETestID(1482)
+@OETestDepends(['test_devtool_location'])
 def test_extend_autotools_recipe_creation(self):
 req = 'https://github.com/rdfa/librdfa'
 recipe = "bbexample"
@@ 

[OE-core] [PATCHv2 29/32] classes/testsdk: Migrate to use the new OESDKExtTestContext

2016-12-07 Thread Aníbal Limón
Signed-off-by: Aníbal Limón 
---
 meta/classes/testsdk.bbclass | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index 24529ca..1d6547a 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -100,7 +100,7 @@ def testsdkext_main(d):
 
 from bb.utils import export_proxies
 from oeqa.utils import avoid_paths_in_environ
-from oeqa.sdk.context import OESDKExtTestContext, 
OESDKExtTestContextExecutor
+from oeqa.sdkext.context import OESDKExtTestContext, 
OESDKExtTestContextExecutor
 
 pn = d.getVar("PN", True)
 logger = logging.getLogger("BitBake")
@@ -119,13 +119,13 @@ def testsdkext_main(d):
 bb.fatal("The toolchain ext %s is not built. Build it before running 
the" \
  " tests: 'bitbake  -c populate_sdk_ext' ." % tcname)
 
-tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.testdata.json")
+tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.testdata.json")
 test_data = json.load(open(tdname, "r"))
 
 target_pkg_manifest = OESDKExtTestContextExecutor._load_manifest(
-d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"))
+d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"))
 host_pkg_manifest = OESDKExtTestContextExecutor._load_manifest(
-d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"))
+d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"))
 
 sdk_dir = d.expand("${WORKDIR}/testsdkext/")
 bb.utils.remove(sdk_dir, True)
@@ -134,7 +134,7 @@ def testsdkext_main(d):
 subprocess.check_output("%s -y -d %s" % (tcname, sdk_dir), shell=True)
 except subprocess.CalledProcessError as e:
 msg = "Couldn't install the extensible SDK:\n%s" % 
e.output.decode("utf-8")
-logfn = os.path.join(sdkdir, 'preparing_build_system.log')
+logfn = os.path.join(sdk_dir, 'preparing_build_system.log')
 if os.path.exists(logfn):
 msg += '\n\nContents of preparing_build_system.log:\n'
 with open(logfn, 'r') as f:
-- 
2.1.4

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


[OE-core] [PATCHv2 26/32] classes/testsdk: Remove the need of TEST_LOG_DIR variable

2016-12-07 Thread Aníbal Limón
The TEST_LOG_DIR was used for store sdk_target_log this log
contains the output of the run of build commands now that information
could be found also on log.do_testsdk under WORKDIR.

The log will continue to store into SDK_DIR instead of TEST_LOG_DIR.

Signed-off-by: Aníbal Limón 
---
 meta/classes/testsdk.bbclass   | 6 --
 meta/lib/oeqa/sdk/cases/buildcvs.py| 4 ++--
 meta/lib/oeqa/sdk/cases/buildgalculator.py | 4 ++--
 meta/lib/oeqa/sdk/cases/buildiptables.py   | 4 ++--
 4 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index 959fb38..4c4df10 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -14,7 +14,6 @@
 #
 # where "" is an image like core-image-sato.
 
-TEST_LOG_DIR ?= "${WORKDIR}/testimage"
 TESTSDKLOCK = "${TMPDIR}/testsdk.lock"
 
 def run_test_context(CTestContext, d, testdir, tcname, pn, *args):
@@ -64,17 +63,12 @@ def testsdk_main(d):
 # sdk use network for download projects for build
 export_proxies(d)
 
-test_log_dir = d.getVar("TEST_LOG_DIR", True)
-
-bb.utils.mkdirhier(test_log_dir)
-
 tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh")
 if not os.path.exists(tcname):
 bb.fatal("The toolchain %s is not built. Build it before running the 
tests: 'bitbake  -c populate_sdk' ." % tcname)
 
 tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.testdata.json")
 test_data = json.load(open(tdname, "r"))
-test_data['TEST_LOG_DIR'] = test_log_dir
 
 target_pkg_manifest = OESDKTestContextExecutor._load_manifest(
 d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"))
diff --git a/meta/lib/oeqa/sdk/cases/buildcvs.py 
b/meta/lib/oeqa/sdk/cases/buildcvs.py
index ee7fb73..6222a8e 100644
--- a/meta/lib/oeqa/sdk/cases/buildcvs.py
+++ b/meta/lib/oeqa/sdk/cases/buildcvs.py
@@ -2,7 +2,7 @@ from oeqa.sdk.case import OESDKTestCase
 from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
 
 class BuildCvsTest(OESDKTestCase):
-td_vars = ['TEST_LOG_DIR', 'DATETIME']
+td_vars = ['DATETIME']
 
 @classmethod
 def setUpClass(self):
@@ -10,7 +10,7 @@ class BuildCvsTest(OESDKTestCase):
 
 self.project = SDKBuildProject(self.tc.sdk_dir + "/cvs/", 
self.tc.sdk_env,
 
"http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2;,
-self.td['TEST_LOG_DIR'], self.td['DATETIME'], 
dl_dir=dl_dir)
+self.tc.sdk_dir, self.td['DATETIME'], dl_dir=dl_dir)
 self.project.download_archive()
 
 def test_cvs(self):
diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py 
b/meta/lib/oeqa/sdk/cases/buildgalculator.py
index d2c1189..bdc8b6a 100644
--- a/meta/lib/oeqa/sdk/cases/buildgalculator.py
+++ b/meta/lib/oeqa/sdk/cases/buildgalculator.py
@@ -4,7 +4,7 @@ from oeqa.sdk.case import OESDKTestCase
 from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
 
 class GalculatorTest(OESDKTestCase):
-td_vars = ['TEST_LOG_DIR', 'DATETIME']
+td_vars = ['DATETIME']
 
 @classmethod
 def setUpClass(self):
@@ -19,7 +19,7 @@ class GalculatorTest(OESDKTestCase):
 project = SDKBuildProject(self.tc.sdk_dir + "/galculator/",
   self.tc.sdk_env,
   
"http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2;,
-  self.td['TEST_LOG_DIR'], 
self.td['DATETIME'], dl_dir=dl_dir)
+  self.tc.sdk_dir, self.td['DATETIME'], 
dl_dir=dl_dir)
 
 project.download_archive()
 
diff --git a/meta/lib/oeqa/sdk/cases/buildiptables.py 
b/meta/lib/oeqa/sdk/cases/buildiptables.py
index a50fb5d..532b5de 100644
--- a/meta/lib/oeqa/sdk/cases/buildiptables.py
+++ b/meta/lib/oeqa/sdk/cases/buildiptables.py
@@ -2,7 +2,7 @@ from oeqa.sdk.case import OESDKTestCase
 from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
 
 class BuildIptablesTest(OESDKTestCase):
-td_vars = ['TEST_LOG_DIR', 'DATETIME']
+td_vars = ['DATETIME']
 
 @classmethod
 def setUpClass(self):
@@ -10,7 +10,7 @@ class BuildIptablesTest(OESDKTestCase):
 
 self.project = SDKBuildProject(self.tc.sdk_dir + "/iptables/", 
self.tc.sdk_env, 
 
"http://downloads.yoctoproject.org/mirror/sources/iptables-1.4.13.tar.bz2;,
-self.td['TEST_LOG_DIR'], self.td['DATETIME'], 
dl_dir=dl_dir)
+self.tc.sdk_dir, self.td['DATETIME'], dl_dir=dl_dir)
 self.project.download_archive()
 
 def test_iptables(self):
-- 
2.1.4

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


[OE-core] [PATCHv2 25/32] oeqa/sdk/cases: Migrate tests to the new OEQA framework

2016-12-07 Thread Aníbal Limón
Summary of the changes:

- Remove auto extend_path using pkgutil at __init__, is not needed.
- Change base class to OESDKTestCase.
- Add td_vars attr to set dependencies of certain variables in test
data.
- Change skips from module level to class level because Test context
  (tc)
now isn't at module level.
- Variable names changes to be consistent (i.e. sdktestdir ->
  sdk_dir).

[YOCTO #10599]

- Don't use bb.utils functions use instead remove_safe and shutil
  for copy files.
- SDKBuildProject pass test data variables instead of call getVar
  inside.

[YOCTO #10231]

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/sdk/cases/__init__.py|  3 ---
 meta/lib/oeqa/sdk/cases/buildcvs.py| 15 ++-
 meta/lib/oeqa/sdk/cases/buildgalculator.py | 28 
 meta/lib/oeqa/sdk/cases/buildiptables.py   | 16 +++-
 meta/lib/oeqa/sdk/cases/gcc.py | 41 +-
 meta/lib/oeqa/sdk/cases/perl.py| 25 +-
 meta/lib/oeqa/sdk/cases/python.py  | 25 +-
 7 files changed, 84 insertions(+), 69 deletions(-)
 delete mode 100644 meta/lib/oeqa/sdk/cases/__init__.py

diff --git a/meta/lib/oeqa/sdk/cases/__init__.py 
b/meta/lib/oeqa/sdk/cases/__init__.py
deleted file mode 100644
index 4cf3fa7..000
--- a/meta/lib/oeqa/sdk/cases/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-# Enable other layers to have tests in the same named directory
-from pkgutil import extend_path
-__path__ = extend_path(__path__, __name__)
diff --git a/meta/lib/oeqa/sdk/cases/buildcvs.py 
b/meta/lib/oeqa/sdk/cases/buildcvs.py
index c7146fa..ee7fb73 100644
--- a/meta/lib/oeqa/sdk/cases/buildcvs.py
+++ b/meta/lib/oeqa/sdk/cases/buildcvs.py
@@ -1,13 +1,16 @@
-from oeqa.oetest import oeSDKTest, skipModule
-from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import SDKBuildProject
+from oeqa.sdk.case import OESDKTestCase
+from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
 
-class BuildCvsTest(oeSDKTest):
+class BuildCvsTest(OESDKTestCase):
+td_vars = ['TEST_LOG_DIR', 'DATETIME']
 
 @classmethod
 def setUpClass(self):
-self.project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/cvs/", 
oeSDKTest.tc.sdkenv, oeSDKTest.tc.d,
-
"http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2;)
+dl_dir = self.td.get('DL_DIR', None)
+
+self.project = SDKBuildProject(self.tc.sdk_dir + "/cvs/", 
self.tc.sdk_env,
+
"http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2;,
+self.td['TEST_LOG_DIR'], self.td['DATETIME'], 
dl_dir=dl_dir)
 self.project.download_archive()
 
 def test_cvs(self):
diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py 
b/meta/lib/oeqa/sdk/cases/buildgalculator.py
index dc2fa9c..d2c1189 100644
--- a/meta/lib/oeqa/sdk/cases/buildgalculator.py
+++ b/meta/lib/oeqa/sdk/cases/buildgalculator.py
@@ -1,17 +1,25 @@
-from oeqa.oetest import oeSDKTest, skipModule
-from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import SDKBuildProject
+import unittest
 
-def setUpModule():
-if not (oeSDKTest.hasPackage("gtk+3") or 
oeSDKTest.hasPackage("libgtk-3.0")):
-skipModule("Image doesn't have gtk+3 in manifest")
+from oeqa.sdk.case import OESDKTestCase
+from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
+
+class GalculatorTest(OESDKTestCase):
+td_vars = ['TEST_LOG_DIR', 'DATETIME']
+
+@classmethod
+def setUpClass(self):
+if not (self.tc.hasTargetPackage("gtk+3") or\
+self.tc.hasTargetPackage("libgtk-3.0")):
+raise unittest.SkipTest("%s class: SDK don't support gtk+3" % 
self.__name__)
 
-class GalculatorTest(oeSDKTest):
 def test_galculator(self):
+dl_dir = self.td.get('DL_DIR', None)
+project = None
 try:
-project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/galculator/",
-  oeSDKTest.tc.sdkenv, oeSDKTest.tc.d,
-  
"http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2;)
+project = SDKBuildProject(self.tc.sdk_dir + "/galculator/",
+  self.tc.sdk_env,
+  
"http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2;,
+  self.td['TEST_LOG_DIR'], 
self.td['DATETIME'], dl_dir=dl_dir)
 
 project.download_archive()
 
diff --git a/meta/lib/oeqa/sdk/cases/buildiptables.py 
b/meta/lib/oeqa/sdk/cases/buildiptables.py
index f0cb8a4..a50fb5d 100644
--- a/meta/lib/oeqa/sdk/cases/buildiptables.py
+++ b/meta/lib/oeqa/sdk/cases/buildiptables.py
@@ -1,14 +1,16 @@
-from oeqa.oetest import oeSDKTest
-from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import 

[OE-core] [PATCHv2 19/32] oeqa/sdk: Move test cases inside cases directory

2016-12-07 Thread Aníbal Limón
For match with the new structure of the OEQA framework.

In the new framework Test component base directory in this case
sdk module will contain case and context implementations.

[YOCTO #10599]

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/sdk/{ => cases}/__init__.py| 0
 meta/lib/oeqa/sdk/{ => cases}/buildcvs.py| 0
 meta/lib/oeqa/sdk/{ => cases}/buildgalculator.py | 0
 meta/lib/oeqa/sdk/{ => cases}/buildiptables.py   | 0
 meta/lib/oeqa/sdk/{ => cases}/gcc.py | 0
 meta/lib/oeqa/sdk/{ => cases}/perl.py| 0
 meta/lib/oeqa/sdk/{ => cases}/python.py  | 0
 7 files changed, 0 insertions(+), 0 deletions(-)
 rename meta/lib/oeqa/sdk/{ => cases}/__init__.py (100%)
 rename meta/lib/oeqa/sdk/{ => cases}/buildcvs.py (100%)
 rename meta/lib/oeqa/sdk/{ => cases}/buildgalculator.py (100%)
 rename meta/lib/oeqa/sdk/{ => cases}/buildiptables.py (100%)
 rename meta/lib/oeqa/sdk/{ => cases}/gcc.py (100%)
 rename meta/lib/oeqa/sdk/{ => cases}/perl.py (100%)
 rename meta/lib/oeqa/sdk/{ => cases}/python.py (100%)

diff --git a/meta/lib/oeqa/sdk/__init__.py b/meta/lib/oeqa/sdk/cases/__init__.py
similarity index 100%
rename from meta/lib/oeqa/sdk/__init__.py
rename to meta/lib/oeqa/sdk/cases/__init__.py
diff --git a/meta/lib/oeqa/sdk/buildcvs.py b/meta/lib/oeqa/sdk/cases/buildcvs.py
similarity index 100%
rename from meta/lib/oeqa/sdk/buildcvs.py
rename to meta/lib/oeqa/sdk/cases/buildcvs.py
diff --git a/meta/lib/oeqa/sdk/buildgalculator.py 
b/meta/lib/oeqa/sdk/cases/buildgalculator.py
similarity index 100%
rename from meta/lib/oeqa/sdk/buildgalculator.py
rename to meta/lib/oeqa/sdk/cases/buildgalculator.py
diff --git a/meta/lib/oeqa/sdk/buildiptables.py 
b/meta/lib/oeqa/sdk/cases/buildiptables.py
similarity index 100%
rename from meta/lib/oeqa/sdk/buildiptables.py
rename to meta/lib/oeqa/sdk/cases/buildiptables.py
diff --git a/meta/lib/oeqa/sdk/gcc.py b/meta/lib/oeqa/sdk/cases/gcc.py
similarity index 100%
rename from meta/lib/oeqa/sdk/gcc.py
rename to meta/lib/oeqa/sdk/cases/gcc.py
diff --git a/meta/lib/oeqa/sdk/perl.py b/meta/lib/oeqa/sdk/cases/perl.py
similarity index 100%
rename from meta/lib/oeqa/sdk/perl.py
rename to meta/lib/oeqa/sdk/cases/perl.py
diff --git a/meta/lib/oeqa/sdk/python.py b/meta/lib/oeqa/sdk/cases/python.py
similarity index 100%
rename from meta/lib/oeqa/sdk/python.py
rename to meta/lib/oeqa/sdk/cases/python.py
-- 
2.1.4

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


[OE-core] [PATCHv2 22/32] classes/testsdk: Migrates testsdk.bbclass to use new OESDKTestContext

2016-12-07 Thread Aníbal Limón
The functionality provided is the same with imporvements on code
reuse and better interfaces.

Signed-off-by: Aníbal Limón 
---
 meta/classes/testsdk.bbclass | 67 
 1 file changed, 55 insertions(+), 12 deletions(-)

diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index 06b4c50..959fb38 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -50,30 +50,74 @@ def run_test_context(CTestContext, d, testdir, tcname, pn, 
*args):
 
 def testsdk_main(d):
 import os
-import oeqa.sdk
 import subprocess
-from oeqa.oetest import SDKTestContext
+import json
+import logging
+
+from bb.utils import export_proxies
+from oeqa.core.runner import OEStreamLogger
+from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor
 
 pn = d.getVar("PN", True)
-bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
+logger = logging.getLogger("BitBake")
+
+# sdk use network for download projects for build
+export_proxies(d)
+
+test_log_dir = d.getVar("TEST_LOG_DIR", True)
+
+bb.utils.mkdirhier(test_log_dir)
 
 tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh")
 if not os.path.exists(tcname):
 bb.fatal("The toolchain %s is not built. Build it before running the 
tests: 'bitbake  -c populate_sdk' ." % tcname)
 
-sdktestdir = d.expand("${WORKDIR}/testimage-sdk/")
-bb.utils.remove(sdktestdir, True)
-bb.utils.mkdirhier(sdktestdir)
+tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.testdata.json")
+test_data = json.load(open(tdname, "r"))
+test_data['TEST_LOG_DIR'] = test_log_dir
+
+target_pkg_manifest = OESDKTestContextExecutor._load_manifest(
+d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"))
+host_pkg_manifest = OESDKTestContextExecutor._load_manifest(
+d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"))
+
+sdk_dir = d.expand("${WORKDIR}/testimage-sdk/")
+bb.utils.remove(sdk_dir, True)
+bb.utils.mkdirhier(sdk_dir)
 try:
-subprocess.check_output("cd %s; %s <

[OE-core] [PATCHv2 21/32] oeqa/sdk: Add case and context modules for the SDK component

2016-12-07 Thread Aníbal Limón
Adds case and context modules for SDK based on oetest.py old code.

Enables SDK Test component usage with oe-test, the SDK Test component
adds command line options for specify sdk installed dir, sdk environment
and target/hosts maniftest.

[YOCTO #10599]

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/oetest.py   |  51 
 meta/lib/oeqa/sdk/__init__.py |   0
 meta/lib/oeqa/sdk/case.py |  12 
 meta/lib/oeqa/sdk/context.py  | 133 ++
 4 files changed, 145 insertions(+), 51 deletions(-)
 create mode 100644 meta/lib/oeqa/sdk/__init__.py
 create mode 100644 meta/lib/oeqa/sdk/case.py
 create mode 100644 meta/lib/oeqa/sdk/context.py

diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 95d3bf7..4a98b0f1 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -145,20 +145,6 @@ class 
OETestCalledProcessError(subprocess.CalledProcessError):
 
 subprocess.CalledProcessError = OETestCalledProcessError
 
-class oeSDKTest(oeTest):
-def __init__(self, methodName='runTest'):
-self.sdktestdir = oeSDKTest.tc.sdktestdir
-super(oeSDKTest, self).__init__(methodName)
-
-@classmethod
-def hasHostPackage(self, pkg):
-if re.search(pkg, oeTest.tc.hostpkgmanifest):
-return True
-return False
-
-def _run(self, cmd):
-return subprocess.check_output(". %s > /dev/null; %s;" % 
(self.tc.sdkenv, cmd), shell=True, stderr=subprocess.STDOUT).decode("utf-8")
-
 class oeSDKExtTest(oeSDKTest):
 def _run(self, cmd):
 # extensible sdk shows a warning if found bitbake in the path
@@ -657,43 +643,6 @@ class ExportTestContext(RuntimeTestContext):
 pkg_dir = os.path.join(export_dir, extracted_dir)
 super(ExportTestContext, self).install_uninstall_packages(test_id, 
pkg_dir, install)
 
-class SDKTestContext(TestContext):
-def __init__(self, d, sdktestdir, sdkenv, tcname, *args):
-super(SDKTestContext, self).__init__(d)
-
-self.sdktestdir = sdktestdir
-self.sdkenv = sdkenv
-self.tcname = tcname
-
-if not hasattr(self, 'target_manifest'):
-self.target_manifest = d.getVar("SDK_TARGET_MANIFEST", True)
-try:
-self.pkgmanifest = {}
-with open(self.target_manifest) as f:
-for line in f:
-(pkg, arch, version) = line.strip().split()
-self.pkgmanifest[pkg] = (version, arch)
-except IOError as e:
-bb.fatal("No package manifest file found. Did you build the sdk 
image?\n%s" % e)
-
-if not hasattr(self, 'host_manifest'):
-self.host_manifest = d.getVar("SDK_HOST_MANIFEST", True)
-try:
-with open(self.host_manifest) as f:
-self.hostpkgmanifest = f.read()
-except IOError as e:
-bb.fatal("No host package manifest file found. Did you build the 
sdk image?\n%s" % e)
-
-def _get_test_namespace(self):
-return "sdk"
-
-def _get_test_suites(self):
-return (self.d.getVar("TEST_SUITES_SDK", True) or "auto").split()
-
-def _get_test_suites_required(self):
-return [t for t in (self.d.getVar("TEST_SUITES_SDK", True) or \
-"auto").split() if t != "auto"]
-
 class SDKExtTestContext(SDKTestContext):
 def __init__(self, d, sdktestdir, sdkenv, tcname, *args):
 self.target_manifest = d.getVar("SDK_EXT_TARGET_MANIFEST", True)
diff --git a/meta/lib/oeqa/sdk/__init__.py b/meta/lib/oeqa/sdk/__init__.py
new file mode 100644
index 000..e69de29
diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
new file mode 100644
index 000..782db8b
--- /dev/null
+++ b/meta/lib/oeqa/sdk/case.py
@@ -0,0 +1,12 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+import subprocess
+
+from oeqa.core.case import OETestCase
+
+class OESDKTestCase(OETestCase):
+def _run(self, cmd):
+return subprocess.check_output(". %s > /dev/null; %s;" % \
+(self.tc.sdk_env, cmd), shell=True,
+stderr=subprocess.STDOUT).decode("utf-8")
diff --git a/meta/lib/oeqa/sdk/context.py b/meta/lib/oeqa/sdk/context.py
new file mode 100644
index 000..0189ed8
--- /dev/null
+++ b/meta/lib/oeqa/sdk/context.py
@@ -0,0 +1,133 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+import os
+import sys
+import glob
+import re
+
+from oeqa.core.context import OETestContext, OETestContextExecutor
+
+class OESDKTestContext(OETestContext):
+sdk_files_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 
"files")
+
+def __init__(self, td=None, logger=None, sdk_dir=None, sdk_env=None,
+target_pkg_manifest=None, host_pkg_manifest=None):
+super(OESDKTestContext, self).__init__(td, 

[OE-core] [PATCHv2 20/32] oeqa/{runtime, sdk}/files: Move testsdkmakefile from runtime to sdk module

2016-12-07 Thread Aníbal Limón
It doesn't make sense to have files related to sdk module into runtime
module.

[YOCTO #10599]

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/{runtime => sdk}/files/testsdkmakefile | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename meta/lib/oeqa/{runtime => sdk}/files/testsdkmakefile (100%)

diff --git a/meta/lib/oeqa/runtime/files/testsdkmakefile 
b/meta/lib/oeqa/sdk/files/testsdkmakefile
similarity index 100%
rename from meta/lib/oeqa/runtime/files/testsdkmakefile
rename to meta/lib/oeqa/sdk/files/testsdkmakefile
-- 
2.1.4

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


[OE-core] [PATCHv2 18/32] oeqa: Move common files to oeqa/files instead of runtime only

2016-12-07 Thread Aníbal Limón
Those files are used by runtime and sdk test cases, so move to
base directory of oeqa module.

[YOCTO #10599]

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/{runtime => }/files/test.c   | 0
 meta/lib/oeqa/{runtime => }/files/test.cpp | 0
 meta/lib/oeqa/{runtime => }/files/test.pl  | 0
 meta/lib/oeqa/{runtime => }/files/test.py  | 0
 4 files changed, 0 insertions(+), 0 deletions(-)
 rename meta/lib/oeqa/{runtime => }/files/test.c (100%)
 rename meta/lib/oeqa/{runtime => }/files/test.cpp (100%)
 rename meta/lib/oeqa/{runtime => }/files/test.pl (100%)
 rename meta/lib/oeqa/{runtime => }/files/test.py (100%)

diff --git a/meta/lib/oeqa/runtime/files/test.c b/meta/lib/oeqa/files/test.c
similarity index 100%
rename from meta/lib/oeqa/runtime/files/test.c
rename to meta/lib/oeqa/files/test.c
diff --git a/meta/lib/oeqa/runtime/files/test.cpp b/meta/lib/oeqa/files/test.cpp
similarity index 100%
rename from meta/lib/oeqa/runtime/files/test.cpp
rename to meta/lib/oeqa/files/test.cpp
diff --git a/meta/lib/oeqa/runtime/files/test.pl b/meta/lib/oeqa/files/test.pl
similarity index 100%
rename from meta/lib/oeqa/runtime/files/test.pl
rename to meta/lib/oeqa/files/test.pl
diff --git a/meta/lib/oeqa/runtime/files/test.py b/meta/lib/oeqa/files/test.py
similarity index 100%
rename from meta/lib/oeqa/runtime/files/test.py
rename to meta/lib/oeqa/files/test.py
-- 
2.1.4

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


[OE-core] [PATCHv2 17/32] oeqa/utils/path: Add remove_safe function

2016-12-07 Thread Aníbal Limón
Checks if path exists before try to remove of avoid exception.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/core/utils/path.py | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/lib/oeqa/core/utils/path.py b/meta/lib/oeqa/core/utils/path.py
index cb06523..a21caad 100644
--- a/meta/lib/oeqa/core/utils/path.py
+++ b/meta/lib/oeqa/core/utils/path.py
@@ -12,3 +12,8 @@ def findFile(file_name, directory):
 if file_name in f:
 return os.path.join(r, file_name)
 return None
+
+def remove_safe(path):
+if os.path.exists(path):
+os.remove(path)
+
-- 
2.1.4

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


[OE-core] [PATCHv2 15/32] classes/populate_sdk_base: Add write_sdk_test_data to postprocess

2016-12-07 Thread Aníbal Limón
This function will generates testdata.json per SDK type.

[YOCTO #10231]

Signed-off-by: Aníbal Limón 
---
 meta/classes/populate_sdk_base.bbclass | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/classes/populate_sdk_base.bbclass 
b/meta/classes/populate_sdk_base.bbclass
index 220cde6..f0fc089 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -73,6 +73,13 @@ python write_target_sdk_manifest () {
 output.write(format_pkg_list(pkgs, 'ver'))
 }
 
+python write_sdk_test_data() {
+from oe.data import export2json
+testdata = "%s/%s.testdata.json" % (d.getVar('SDKDEPLOYDIR', True), 
d.getVar('TOOLCHAIN_OUTPUTNAME', True))
+bb.utils.mkdirhier(os.path.dirname(testdata))
+export2json(d, testdata)
+}
+
 python write_host_sdk_manifest () {
 from oe.sdk import sdk_list_installed_packages
 from oe.utils import format_pkg_list
@@ -84,7 +91,7 @@ python write_host_sdk_manifest () {
 output.write(format_pkg_list(pkgs, 'ver'))
 }
 
-POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; "
+POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; 
write_sdk_test_data ; "
 POPULATE_SDK_POST_HOST_COMMAND_append = " write_host_sdk_manifest; "
 SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if 
'${SDK_PACKAGING_FUNC}' else ''}"
 SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; 
${SDK_PACKAGING_COMMAND} "
-- 
2.1.4

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


[OE-core] [PATCHv2 14/32] classes/rootfs-postcommands: Add write_image_test_data

2016-12-07 Thread Aníbal Limón
This function will generates testdata.json by image type.

[YOCTO #10231]

Signed-off-by: Aníbal Limón 
---
 meta/classes/rootfs-postcommands.bbclass | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/meta/classes/rootfs-postcommands.bbclass 
b/meta/classes/rootfs-postcommands.bbclass
index 0c7ceea..5cfd2fe 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -14,6 +14,9 @@ ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
 # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is 
enabled
 ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", 
"read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
 
+# Generates test data file with data store variables expanded in json format
+ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; "
+
 # Write manifest
 IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.manifest"
 ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
@@ -278,3 +281,18 @@ rootfs_check_host_user_contaminated () {
 rootfs_sysroot_relativelinks () {
sysroot-relativelinks.py ${SDK_OUTPUT}/${SDKTARGETSYSROOT}
 }
+
+# Generated test data json file
+python write_image_test_data() {
+from oe.data import export2json
+
+testdata = "%s/%s.testdata.json" % (d.getVar('DEPLOY_DIR_IMAGE', True), 
d.getVar('IMAGE_NAME', True))
+testdata_link = "%s/%s.testdata.json" % (d.getVar('DEPLOY_DIR_IMAGE', 
True), d.getVar('IMAGE_LINK_NAME', True))
+
+bb.utils.mkdirhier(os.path.dirname(testdata))
+export2json(d, testdata)
+
+if os.path.lexists(testdata_link):
+   os.remove(testdata_link)
+os.symlink(os.path.basename(testdata), testdata_link)
+}
-- 
2.1.4

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


[OE-core] [PATCHv2 16/32] oeqa/core: Change name of d to td

2016-12-07 Thread Aníbal Limón
The d variable references the test data into a test context, so
makes a more sense to call it: td (test data).

[YOCTO #10231]

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/core/case.py | 22 ++--
 meta/lib/oeqa/core/cases/example/test_basic.py |  8 
 meta/lib/oeqa/core/context.py  | 28 +-
 meta/lib/oeqa/core/decorator/data.py   | 10 -
 meta/lib/oeqa/core/loader.py   |  2 +-
 meta/lib/oeqa/core/tests/cases/data.py |  6 +++---
 6 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/meta/lib/oeqa/core/case.py b/meta/lib/oeqa/core/case.py
index a47cb19..d2dbf20 100644
--- a/meta/lib/oeqa/core/case.py
+++ b/meta/lib/oeqa/core/case.py
@@ -5,30 +5,30 @@ import unittest
 
 from oeqa.core.exception import OEQAMissingVariable
 
-def _validate_data_vars(d, data_vars, type_msg):
-if data_vars:
-for v in data_vars:
-if not v in d:
+def _validate_td_vars(td, td_vars, type_msg):
+if td_vars:
+for v in td_vars:
+if not v in td:
 raise OEQAMissingVariable("Test %s need %s variable but"\
-" isn't into d" % (type_msg, v))
+" isn't into td" % (type_msg, v))
 
 class OETestCase(unittest.TestCase):
 # TestContext and Logger instance set by OETestLoader.
 tc = None
 logger = None
 
-# d has all the variables needed by the test cases
+# td has all the variables needed by the test cases
 # is the same across all the test cases.
-d = None
+td = None
 
-# data_vars has the variables needed by a test class
-# or test case instance, if some var isn't into d a
+# td_vars has the variables needed by a test class
+# or test case instance, if some var isn't into td a
 # OEMissingVariable exception is raised
-data_vars = None
+td_vars = None
 
 @classmethod
 def _oeSetUpClass(clss):
-_validate_data_vars(clss.d, clss.data_vars, "class")
+_validate_td_vars(clss.td, clss.td_vars, "class")
 clss.setUpClassMethod()
 
 @classmethod
diff --git a/meta/lib/oeqa/core/cases/example/test_basic.py 
b/meta/lib/oeqa/core/cases/example/test_basic.py
index 8b404fe..11cf380 100644
--- a/meta/lib/oeqa/core/cases/example/test_basic.py
+++ b/meta/lib/oeqa/core/cases/example/test_basic.py
@@ -6,10 +6,10 @@ from oeqa.core.decorator.depends import OETestDepends
 
 class OETestExample(OETestCase):
 def test_example(self):
-self.logger.info('IMAGE: %s' % self.d.get('IMAGE'))
-self.assertEqual('core-image-minimal', self.d.get('IMAGE'))
-self.logger.info('ARCH: %s' % self.d.get('ARCH'))
-self.assertEqual('x86', self.d.get('ARCH'))
+self.logger.info('IMAGE: %s' % self.td.get('IMAGE'))
+self.assertEqual('core-image-minimal', self.td.get('IMAGE'))
+self.logger.info('ARCH: %s' % self.td.get('ARCH'))
+self.assertEqual('x86', self.td.get('ARCH'))
 
 class OETestExampleDepend(OETestCase):
 @OETestDepends(['OETestExample.test_example'])
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index c7d6db3..316f90f 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -20,11 +20,11 @@ class OETestContext(object):
 files_dir = os.path.abspath(os.path.join(os.path.dirname(
 os.path.abspath(__file__)), "../files"))
 
-def __init__(self, d=None, logger=None):
-if not type(d) is dict:
-raise TypeError("d isn't dictionary type")
+def __init__(self, td=None, logger=None):
+if not type(td) is dict:
+raise TypeError("td isn't dictionary type")
 
-self.d = d
+self.td = td
 self.logger = logger
 self._registry = {}
 self._registry['cases'] = collections.OrderedDict()
@@ -148,7 +148,7 @@ class OETestContextExecutor(object):
 
 default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
 'cases/example')]
-default_data = os.path.join(default_cases[0], 'data.json')
+default_test_data = os.path.join(default_cases[0], 'data.json')
 
 def register_commands(self, logger, subparsers):
 self.parser = subparsers.add_parser(self.name, help=self.help,
@@ -160,12 +160,12 @@ class OETestContextExecutor(object):
 default=self.default_output_log,
 help="results output log, default: %s" % 
self.default_output_log)
 
-if self.default_data:
-self.parser.add_argument('--data-file', action='store',
-default=self.default_data,
-help="data file to load, default: %s" % self.default_data)
+if self.default_test_data:
+self.parser.add_argument('--test-data-file', action='store',
+default=self.default_test_data,
+help="data file to 

[OE-core] [PATCHv2 11/32] oeqa/core/cases: Add example test cases

2016-12-07 Thread Aníbal Limón
Serves as an first input of how to the OEQA framework works.

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/core/cases/__init__.py   |  0
 meta/lib/oeqa/core/cases/example/data.json |  1 +
 meta/lib/oeqa/core/cases/example/test_basic.py | 20 
 3 files changed, 21 insertions(+)
 create mode 100644 meta/lib/oeqa/core/cases/__init__.py
 create mode 100644 meta/lib/oeqa/core/cases/example/data.json
 create mode 100644 meta/lib/oeqa/core/cases/example/test_basic.py

diff --git a/meta/lib/oeqa/core/cases/__init__.py 
b/meta/lib/oeqa/core/cases/__init__.py
new file mode 100644
index 000..e69de29
diff --git a/meta/lib/oeqa/core/cases/example/data.json 
b/meta/lib/oeqa/core/cases/example/data.json
new file mode 100644
index 000..21d6b16
--- /dev/null
+++ b/meta/lib/oeqa/core/cases/example/data.json
@@ -0,0 +1 @@
+{"ARCH": "x86", "IMAGE": "core-image-minimal"}
\ No newline at end of file
diff --git a/meta/lib/oeqa/core/cases/example/test_basic.py 
b/meta/lib/oeqa/core/cases/example/test_basic.py
new file mode 100644
index 000..8b404fe
--- /dev/null
+++ b/meta/lib/oeqa/core/cases/example/test_basic.py
@@ -0,0 +1,20 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+from oeqa.core.case import OETestCase
+from oeqa.core.decorator.depends import OETestDepends
+
+class OETestExample(OETestCase):
+def test_example(self):
+self.logger.info('IMAGE: %s' % self.d.get('IMAGE'))
+self.assertEqual('core-image-minimal', self.d.get('IMAGE'))
+self.logger.info('ARCH: %s' % self.d.get('ARCH'))
+self.assertEqual('x86', self.d.get('ARCH'))
+
+class OETestExampleDepend(OETestCase):
+@OETestDepends(['OETestExample.test_example'])
+def test_example_depends(self):
+pass
+
+def test_example_no_depends(self):
+pass
-- 
2.1.4

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


[OE-core] [PATCHv2 09/32] scripts/oe-test: Add new oe-test script

2016-12-07 Thread Aníbal Limón
The new oe-test script will be use to run test components with
one single script.

The oe-test script search for test components inside meta/lib/oeqa,
the test components needs to implement OETestContextExecutor inside
context module in order to be supported by oe-test.

[YOCTO #10230]

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 scripts/oe-test | 98 +
 1 file changed, 98 insertions(+)
 create mode 100755 scripts/oe-test

diff --git a/scripts/oe-test b/scripts/oe-test
new file mode 100755
index 000..9222dea
--- /dev/null
+++ b/scripts/oe-test
@@ -0,0 +1,98 @@
+#!/usr/bin/env python3
+
+# OpenEmbedded test tool
+#
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+import os
+import sys
+import argparse
+import importlib
+import logging
+
+scripts_path = os.path.dirname(os.path.realpath(__file__))
+lib_path = scripts_path + '/lib'
+sys.path = sys.path + [lib_path]
+import argparse_oe
+import scriptutils
+import scriptpath
+scriptpath.add_oe_lib_path()
+
+from oeqa.core.context import OETestContextExecutor
+
+logger = scriptutils.logger_create('oe-test')
+
+def _load_test_components(logger):
+components = {}
+
+for path in sys.path:
+base_dir = os.path.join(path, 'oeqa')
+if os.path.exists(base_dir) and os.path.isdir(base_dir):
+for file in os.listdir(base_dir):
+comp_name = file
+comp_context = os.path.join(base_dir, file, 'context.py')
+if os.path.exists(comp_context):
+comp_plugin = importlib.import_module('oeqa.%s.%s' % \
+(comp_name, 'context'))
+try:
+if not issubclass(comp_plugin._executor_class,
+OETestContextExecutor):
+raise TypeError("Component %s in %s, 
_executor_class "\
+"isn't derived from OETestContextExecutor."\
+% (comp_name, comp_context))
+
+components[comp_name] = comp_plugin._executor_class()
+except AttributeError:
+raise AttributeError("Component %s in %s don't have "\
+"_executor_class defined." % (comp_name, 
comp_context))
+
+return components
+
+def main():
+parser = argparse_oe.ArgumentParser(description="OpenEmbedded test tool",
+add_help=False,
+epilog="Use %(prog)s  
--help to get help on a specific command")
+parser.add_argument('-d', '--debug', help='Enable debug output', 
action='store_true')
+parser.add_argument('-q', '--quiet', help='Print only errors', 
action='store_true')
+global_args, unparsed_args = parser.parse_known_args()
+
+# Help is added here rather than via add_help=True, as we don't want it to
+# be handled by parse_known_args()
+parser.add_argument('-h', '--help', action='help', 
default=argparse.SUPPRESS,
+help='show this help message and exit')
+
+if global_args.debug:
+logger.setLevel(logging.DEBUG)
+elif global_args.quiet:
+logger.setLevel(logging.ERROR)
+
+components = _load_test_components(logger)
+
+subparsers = parser.add_subparsers(dest="subparser_name", 
title='subcommands', metavar='')
+subparsers.add_subparser_group('components', 'Test components')
+subparsers.required = True
+for comp_name in sorted(components.keys()):
+comp = components[comp_name]
+comp.register_commands(logger, subparsers)
+
+try:
+args = parser.parse_args(unparsed_args, namespace=global_args)
+ret = args.func(logger, args)
+except SystemExit as err:
+if err.code != 0:
+raise err
+ret = err.code
+except argparse_oe.ArgumentUsageError as ae:
+parser.error_subcommand(ae.message, ae.subcommand)
+
+return ret
+
+if __name__ == '__main__':
+try:
+ret = main()
+except Exception:
+ret = 1
+import traceback
+traceback.print_exc()
+sys.exit(ret)
-- 
2.1.4

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


[OE-core] [PATCHv2 10/32] oeqa/core/context: Add support of OETestContextExecutor

2016-12-07 Thread Aníbal Limón
The OETestContextExecutor class supports to use oe-test for run core
test component also is a base class for the other test components
(runtime, sdk, selftest).

Te principal functionality is to support cmdline parsing and execution
of OETestContext, the test components could extend the common options
to provide specific ones. The common options between test components
are test data file, output log and test cases path's to scan.

Also it initializes the logger to be passed to the whole OEQA framework.

[YOCTO #10230]

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/core/context.py | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index d5caf53..c7d6db3 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -148,7 +148,7 @@ class OETestContextExecutor(object):
 
 default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
 'cases/example')]
-default_test_data = os.path.join(default_cases[0], 'data.json')
+default_data = os.path.join(default_cases[0], 'data.json')
 
 def register_commands(self, logger, subparsers):
 self.parser = subparsers.add_parser(self.name, help=self.help,
@@ -160,12 +160,12 @@ class OETestContextExecutor(object):
 default=self.default_output_log,
 help="results output log, default: %s" % 
self.default_output_log)
 
-if self.default_test_data:
-self.parser.add_argument('--test-data-file', action='store',
-default=self.default_test_data,
-help="data file to load, default: %s" % 
self.default_test_data)
+if self.default_data:
+self.parser.add_argument('--data-file', action='store',
+default=self.default_data,
+help="data file to load, default: %s" % self.default_data)
 else:
-self.parser.add_argument('--test-data-file', action='store',
+self.parser.add_argument('--data-file', action='store',
 help="data file to load")
 
 if self.default_cases:
@@ -197,11 +197,11 @@ class OETestContextExecutor(object):
 self.tc_kwargs['run'] = {}
 
 self.tc_kwargs['init']['logger'] = self._setup_logger(logger, args)
-if args.test_data_file:
-self.tc_kwargs['init']['td'] = json.load(
-open(args.test_data_file, "r"))
+if args.data_file:
+self.tc_kwargs['init']['d'] = json.load(
+open(args.data_file, "r"))
 else:
-self.tc_kwargs['init']['td'] = {}
+self.tc_kwargs['init']['d'] = {}
 
 self.module_paths = args.CASES_PATHS
 
-- 
2.1.4

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


[OE-core] [PATCHv2 13/32] oe/data: Add export2json function

2016-12-07 Thread Aníbal Limón
The export2json function export the variables contained in
the data store to JSON format, the main usage for now will be
to provide test data to QA framework.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oe/data.py | 28 
 1 file changed, 28 insertions(+)

diff --git a/meta/lib/oe/data.py b/meta/lib/oe/data.py
index ee48950..db3bd6d 100644
--- a/meta/lib/oe/data.py
+++ b/meta/lib/oe/data.py
@@ -1,3 +1,4 @@
+import json
 import oe.maketype
 
 def typed_value(key, d):
@@ -15,3 +16,30 @@ def typed_value(key, d):
 return oe.maketype.create(d.getVar(key, True) or '', var_type, **flags)
 except (TypeError, ValueError) as exc:
 bb.msg.fatal("Data", "%s: %s" % (key, str(exc)))
+
+def export2json(d, json_file, expand=True):
+data2export = {}
+keys2export = []
+
+for key in d.keys():
+if key.startswith("_"):
+continue
+elif key.startswith("BB"):
+continue
+elif key.startswith("B_pn"):
+continue
+elif key.startswith("do_"):
+continue
+elif d.getVarFlag(key, "func", True):
+continue
+
+keys2export.append(key)
+
+for key in keys2export:
+try:
+data2export[key] = d.getVar(key, expand)
+except bb.data_smart.ExpansionError:
+data2export[key] = ''
+
+with open(json_file, "w") as f:
+json.dump(data2export, f, skipkeys=True, indent=4, sort_keys=True)
-- 
2.1.4

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


[OE-core] [PATCHv2 12/32] oeqa/core: Add README

2016-12-07 Thread Aníbal Limón
The README has an introduction and explains how to run the test suite
and creates a new Test component.

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/core/README | 38 ++
 1 file changed, 38 insertions(+)
 create mode 100644 meta/lib/oeqa/core/README

diff --git a/meta/lib/oeqa/core/README b/meta/lib/oeqa/core/README
new file mode 100644
index 000..0c859fd
--- /dev/null
+++ b/meta/lib/oeqa/core/README
@@ -0,0 +1,38 @@
+= OEQA Framework =
+
+== Introduction ==
+
+This is the new OEQA framework the base clases of the framework
+are in this module oeqa/core the subsequent components needs to
+extend this classes.
+
+A new/unique runner was created called oe-test and is under scripts/
+oe-test, this new runner scans over oeqa module searching for test
+components that supports OETestContextExecutor implemented in context
+module (i.e. oeqa/core/context.py).
+
+For execute an example:
+
+$ source oe-init-build-env
+$ oe-test core
+
+For list supported components:
+
+$ oe-test -h
+
+== Create new Test component ==
+
+Usally for add a new Test component the developer needs to extend
+OETestContext/OETestContextExecutor in context.py and OETestCase in
+case.py.
+
+== How to run the testing of the OEQA framework ==
+
+Run all tests:
+
+$ PATH=$PATH:../../ python3 -m unittest discover -s tests
+
+Run some test:
+
+$ cd tests/
+$ ./test_data.py
-- 
2.1.4

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


[OE-core] [PATCHv2 08/32] oeqa/core: Add tests for the OEQA framework

2016-12-07 Thread Aníbal Limón
From: Mariano Lopez 

This test suite covers the current functionality for the OEQA
framework.

For run certain test suite,

$ cd meta/lib/oeqa/core/tests
$ ./test_data.py

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/core/tests/__init__.py   |   0
 meta/lib/oeqa/core/tests/cases/data.py |  20 +++
 meta/lib/oeqa/core/tests/cases/depends.py  |  38 ++
 .../oeqa/core/tests/cases/loader/invalid/oeid.py   |  15 +++
 .../oeqa/core/tests/cases/loader/valid/another.py  |   9 ++
 meta/lib/oeqa/core/tests/cases/oeid.py |  18 +++
 meta/lib/oeqa/core/tests/cases/oetag.py|  18 +++
 meta/lib/oeqa/core/tests/cases/timeout.py  |  18 +++
 meta/lib/oeqa/core/tests/common.py |  35 ++
 meta/lib/oeqa/core/tests/test_data.py  |  51 
 meta/lib/oeqa/core/tests/test_decorators.py| 135 +
 meta/lib/oeqa/core/tests/test_loader.py|  86 +
 meta/lib/oeqa/core/tests/test_runner.py|  38 ++
 13 files changed, 481 insertions(+)
 create mode 100644 meta/lib/oeqa/core/tests/__init__.py
 create mode 100644 meta/lib/oeqa/core/tests/cases/data.py
 create mode 100644 meta/lib/oeqa/core/tests/cases/depends.py
 create mode 100644 meta/lib/oeqa/core/tests/cases/loader/invalid/oeid.py
 create mode 100644 meta/lib/oeqa/core/tests/cases/loader/valid/another.py
 create mode 100644 meta/lib/oeqa/core/tests/cases/oeid.py
 create mode 100644 meta/lib/oeqa/core/tests/cases/oetag.py
 create mode 100644 meta/lib/oeqa/core/tests/cases/timeout.py
 create mode 100644 meta/lib/oeqa/core/tests/common.py
 create mode 100755 meta/lib/oeqa/core/tests/test_data.py
 create mode 100755 meta/lib/oeqa/core/tests/test_decorators.py
 create mode 100755 meta/lib/oeqa/core/tests/test_loader.py
 create mode 100755 meta/lib/oeqa/core/tests/test_runner.py

diff --git a/meta/lib/oeqa/core/tests/__init__.py 
b/meta/lib/oeqa/core/tests/__init__.py
new file mode 100644
index 000..e69de29
diff --git a/meta/lib/oeqa/core/tests/cases/data.py 
b/meta/lib/oeqa/core/tests/cases/data.py
new file mode 100644
index 000..4d8fad0
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/cases/data.py
@@ -0,0 +1,20 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+from oeqa.core.case import OETestCase
+from oeqa.core.decorator.oetag import OETestTag
+from oeqa.core.decorator.data import OETestDataDepends
+
+class DataTest(OETestCase):
+data_vars = ['IMAGE', 'ARCH']
+
+@OETestDataDepends(['MACHINE',])
+@OETestTag('dataTestOk')
+def testDataOk(self):
+self.assertEqual(self.d.get('IMAGE'), 'core-image-minimal')
+self.assertEqual(self.d.get('ARCH'), 'x86')
+self.assertEqual(self.d.get('MACHINE'), 'qemuarm')
+
+@OETestTag('dataTestFail')
+def testDataFail(self):
+pass
diff --git a/meta/lib/oeqa/core/tests/cases/depends.py 
b/meta/lib/oeqa/core/tests/cases/depends.py
new file mode 100644
index 000..17cdd90
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/cases/depends.py
@@ -0,0 +1,38 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+from oeqa.core.case import OETestCase
+from oeqa.core.decorator.depends import OETestDepends
+
+class DependsTest(OETestCase):
+
+def testDependsFirst(self):
+self.assertTrue(True, msg='How is this possible?')
+
+@OETestDepends(['testDependsFirst'])
+def testDependsSecond(self):
+self.assertTrue(True, msg='How is this possible?')
+
+@OETestDepends(['testDependsSecond'])
+def testDependsThird(self):
+self.assertTrue(True, msg='How is this possible?')
+
+@OETestDepends(['testDependsSecond'])
+def testDependsFourth(self):
+self.assertTrue(True, msg='How is this possible?')
+
+@OETestDepends(['testDependsThird', 'testDependsFourth'])
+def testDependsFifth(self):
+self.assertTrue(True, msg='How is this possible?')
+
+@OETestDepends(['testDependsCircular3'])
+def testDependsCircular1(self):
+self.assertTrue(True, msg='How is this possible?')
+
+@OETestDepends(['testDependsCircular1'])
+def testDependsCircular2(self):
+self.assertTrue(True, msg='How is this possible?')
+
+@OETestDepends(['testDependsCircular2'])
+def testDependsCircular3(self):
+self.assertTrue(True, msg='How is this possible?')
diff --git a/meta/lib/oeqa/core/tests/cases/loader/invalid/oeid.py 
b/meta/lib/oeqa/core/tests/cases/loader/invalid/oeid.py
new file mode 100644
index 000..038d445
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/cases/loader/invalid/oeid.py
@@ -0,0 +1,15 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+from oeqa.core.case import OETestCase
+
+class AnotherIDTest(OETestCase):

[OE-core] [PATCHv2 07/32] oeqa/core/decorator: Add support for OETestDataDepends and skipIfDataVar

2016-12-07 Thread Aníbal Limón
The OETestDataDepends decorator skips a test case if a variable
isn't into test data (d).

The skipIfDataVar decorator skips a test case if a variable
has certain value.

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/core/decorator/data.py | 36 
 1 file changed, 36 insertions(+)
 create mode 100644 meta/lib/oeqa/core/decorator/data.py

diff --git a/meta/lib/oeqa/core/decorator/data.py 
b/meta/lib/oeqa/core/decorator/data.py
new file mode 100644
index 000..51ef6fe
--- /dev/null
+++ b/meta/lib/oeqa/core/decorator/data.py
@@ -0,0 +1,36 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+from oeqa.core.exception import OEQAMissingVariable
+
+from . import OETestDecorator, registerDecorator
+
+@registerDecorator
+class skipIfDataVar(OETestDecorator):
+"""
+Skip test based on value of a data store's variable.
+
+It will get the info of var from the data store and will
+check it against value; if are equal it will skip the test
+with msg as the reason.
+"""
+
+attrs = ('var', 'value', 'msg')
+
+def setUpDecorator(self):
+msg = 'Checking if %r value is %r to skip test' % (self.var, 
self.value)
+self.logger.debug(msg)
+if self.case.tc.d.get(self.var) == self.value:
+self.case.skipTest(self.msg)
+
+@registerDecorator
+class OETestDataDepends(OETestDecorator):
+attrs = ('data_depends',)
+
+def setUpDecorator(self):
+for v in self.data_depends:
+try:
+value = self.case.d[v]
+except KeyError:
+raise OEQAMissingVariable("Test case need %s variable but"\
+" isn't into d" % v)
-- 
2.1.4

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


[OE-core] [PATCHv2 06/32] oeqa/core/decorator: Add support for OETimeout decorator

2016-12-07 Thread Aníbal Limón
From: Mariano Lopez 

The OETimeout provides support for specify certain timeout
in seconds for a test case, if the timeout is reach the SIGALRM
is sent and an exception is raised to notify the timeout.

[YOCTO #10235]

Signed-off-by: Mariano Lopez 
Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/core/decorator/oetimeout.py | 25 +
 1 file changed, 25 insertions(+)
 create mode 100644 meta/lib/oeqa/core/decorator/oetimeout.py

diff --git a/meta/lib/oeqa/core/decorator/oetimeout.py 
b/meta/lib/oeqa/core/decorator/oetimeout.py
new file mode 100644
index 000..a247583
--- /dev/null
+++ b/meta/lib/oeqa/core/decorator/oetimeout.py
@@ -0,0 +1,25 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+import signal
+from . import OETestDecorator, registerDecorator
+from oeqa.core.exception import OEQATimeoutError
+
+@registerDecorator
+class OETimeout(OETestDecorator):
+attrs = ('oetimeout',)
+
+def setUpDecorator(self):
+timeout = self.oetimeout
+def _timeoutHandler(signum, frame):
+raise OEQATimeoutError("Timed out after %s "
+"seconds of execution" % timeout)
+
+self.logger.debug("Setting up a %d second(s) timeout" % self.oetimeout)
+self.alarmSignal = signal.signal(signal.SIGALRM, _timeoutHandler)
+signal.alarm(self.oetimeout)
+
+def tearDownDecorator(self):
+signal.alarm(0)
+signal.signal(signal.SIGALRM, self.alarmSignal)
+self.logger.debug("Removed SIGALRM handler")
-- 
2.1.4

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


[OE-core] [PATCHv2 02/32] oeqa/core: Add utils module for OEQA framework

2016-12-07 Thread Aníbal Limón
From: Mariano Lopez 

misc: Functions for transform object to other types.
path: Functions for path handling.
test: Functions for operations related to test cases and suites.

[YOCTO #10232]

Signed-off-by: Mariano Lopez 
Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/core/utils/__init__.py |  0
 meta/lib/oeqa/core/utils/misc.py | 37 +++
 meta/lib/oeqa/core/utils/path.py | 14 +++
 meta/lib/oeqa/core/utils/test.py | 71 
 4 files changed, 122 insertions(+)
 create mode 100644 meta/lib/oeqa/core/utils/__init__.py
 create mode 100644 meta/lib/oeqa/core/utils/misc.py
 create mode 100644 meta/lib/oeqa/core/utils/path.py
 create mode 100644 meta/lib/oeqa/core/utils/test.py

diff --git a/meta/lib/oeqa/core/utils/__init__.py 
b/meta/lib/oeqa/core/utils/__init__.py
new file mode 100644
index 000..e69de29
diff --git a/meta/lib/oeqa/core/utils/misc.py b/meta/lib/oeqa/core/utils/misc.py
new file mode 100644
index 000..6ae58ad
--- /dev/null
+++ b/meta/lib/oeqa/core/utils/misc.py
@@ -0,0 +1,37 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+def toList(obj, obj_type, obj_name="Object"):
+if isinstance(obj, obj_type):
+return [obj]
+elif isinstance(obj, list):
+return obj
+else:
+raise TypeError("%s must be %s or list" % (obj_name, obj_type))
+
+def toSet(obj, obj_type, obj_name="Object"):
+if isinstance(obj, obj_type):
+return {obj}
+elif isinstance(obj, list):
+return set(obj)
+elif isinstance(obj, set):
+return obj
+else:
+raise TypeError("%s must be %s or set" % (obj_name, obj_type))
+
+def strToList(obj, obj_name="Object"):
+return toList(obj, str, obj_name)
+
+def strToSet(obj, obj_name="Object"):
+return toSet(obj, str, obj_name)
+
+def intToList(obj, obj_name="Object"):
+return toList(obj, int, obj_name)
+
+def dataStoteToDict(d, variables):
+data = {}
+
+for v in variables:
+data[v] = d.getVar(v, True)
+
+return data
diff --git a/meta/lib/oeqa/core/utils/path.py b/meta/lib/oeqa/core/utils/path.py
new file mode 100644
index 000..cb06523
--- /dev/null
+++ b/meta/lib/oeqa/core/utils/path.py
@@ -0,0 +1,14 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+import os
+import sys
+
+def findFile(file_name, directory):
+"""
+Search for a file in directory and returns its complete path.
+"""
+for r, d, f in os.walk(directory):
+if file_name in f:
+return os.path.join(r, file_name)
+return None
diff --git a/meta/lib/oeqa/core/utils/test.py b/meta/lib/oeqa/core/utils/test.py
new file mode 100644
index 000..820b997
--- /dev/null
+++ b/meta/lib/oeqa/core/utils/test.py
@@ -0,0 +1,71 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+import os
+import unittest
+
+def getSuiteCases(suite):
+"""
+Returns individual test from a test suite.
+"""
+tests = []
+for item in suite:
+if isinstance(item, unittest.suite.TestSuite):
+tests.extend(getSuiteCases(item))
+elif isinstance(item, unittest.TestCase):
+tests.append(item)
+return tests
+
+def getSuiteModules(suite):
+"""
+Returns modules in a test suite.
+"""
+modules = set()
+for test in getSuiteCases(suite):
+modules.add(getCaseModule(test))
+return modules
+
+def getSuiteCasesInfo(suite, func):
+"""
+Returns test case info from suite. Info is fetched from func.
+"""
+tests = []
+for test in getSuiteCases(suite):
+tests.append(func(test))
+return tests
+
+def getSuiteCasesNames(suite):
+"""
+Returns test case names from suite.
+"""
+return getSuiteCasesInfo(suite, getCaseMethod)
+
+def getSuiteCasesIDs(suite):
+"""
+Returns test case ids from suite.
+"""
+return getSuiteCasesInfo(suite, getCaseID)
+
+def getCaseModule(test_case):
+"""
+Returns test case module name.
+"""
+return test_case.__module__
+
+def getCaseClass(test_case):
+"""
+Returns test case class name.
+"""
+return test_case.__class__.__name__
+
+def getCaseID(test_case):
+"""
+Returns test case complete id.
+"""
+return test_case.id()
+
+def getCaseMethod(test_case):
+"""
+Returns test case method name.
+"""
+return getCaseID(test_case).split('.')[-1]
-- 
2.1.4

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


[OE-core] [PATCHv2 04/32] oeqa/core/decorator: Add support for OETestDepends

2016-12-07 Thread Aníbal Limón
The OETestDepends decorator could be used over test cases to
define some dependency between them.

At loading time sorting the tests to grauntee that a test case
executes before also raise an exception if found a circular
dependency between test cases.

At before test case run reviews if the dependency if meet, in the
case of don't it skips the test case run.

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/core/decorator/depends.py | 94 +
 1 file changed, 94 insertions(+)
 create mode 100644 meta/lib/oeqa/core/decorator/depends.py

diff --git a/meta/lib/oeqa/core/decorator/depends.py 
b/meta/lib/oeqa/core/decorator/depends.py
new file mode 100644
index 000..195711c
--- /dev/null
+++ b/meta/lib/oeqa/core/decorator/depends.py
@@ -0,0 +1,94 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+from unittest import SkipTest
+
+from oeqa.core.exception import OEQADependency
+
+from . import OETestDiscover, registerDecorator
+
+def _add_depends(registry, case, depends):
+module_name = case.__module__
+class_name = case.__class__.__name__
+
+case_id = case.id()
+
+for depend in depends:
+dparts = depend.split('.')
+
+if len(dparts) == 1:
+depend_id = ".".join((module_name, class_name, dparts[0]))
+elif len(dparts) == 2:
+depend_id = ".".join((module_name, dparts[0], dparts[1]))
+else:
+depend_id = depend
+
+if not case_id in registry:
+registry[case_id] = []
+if not depend_id in registry[case_id]:
+registry[case_id].append(depend_id)
+
+def _validate_test_case_depends(cases, depends):
+for case in depends:
+if not case in cases:
+continue
+for dep in depends[case]:
+if not dep in cases:
+raise OEQADependency("TestCase %s depends on %s and isn't 
available"\
+   ", cases available %s." % (case, dep, 
str(cases.keys(
+
+def _order_test_case_by_depends(cases, depends):
+def _dep_resolve(graph, node, resolved, seen):
+seen.append(node)
+for edge in graph[node]:
+if edge not in resolved:
+if edge in seen:
+raise OEQADependency("Test cases %s and %s have a 
circular" \
+   " dependency." % (node, edge))
+_dep_resolve(graph, edge, resolved, seen)
+resolved.append(node)
+
+dep_graph = {}
+dep_graph['__root__'] = cases.keys()
+for case in cases:
+if case in depends:
+dep_graph[case] = depends[case]
+else:
+dep_graph[case] = []
+
+cases_ordered = []
+_dep_resolve(dep_graph, '__root__', cases_ordered, [])
+cases_ordered.remove('__root__')
+
+return [cases[case_id] for case_id in cases_ordered]
+
+def _skipTestDependency(case, depends):
+results = case.tc._results
+skipReasons = ['errors', 'failures', 'skipped']
+
+for reason in skipReasons:
+for test, _ in results[reason]:
+if test.id() in depends:
+raise SkipTest("Test case %s depends on %s and was in %s." \
+% (case.id(), test.id(), reason))
+
+@registerDecorator
+class OETestDepends(OETestDiscover):
+attrs = ('depends',)
+
+def bind(self, registry, case):
+super(OETestDepends, self).bind(registry, case)
+if not registry.get('depends'):
+registry['depends'] = {}
+_add_depends(registry['depends'], case, self.depends)
+
+@staticmethod
+def discover(registry):
+if registry.get('depends'):
+_validate_test_case_depends(registry['cases'], registry['depends'])
+return _order_test_case_by_depends(registry['cases'], 
registry['depends'])
+else:
+return [registry['cases'][case_id] for case_id in 
registry['cases']]
+
+def setUpDecorator(self):
+_skipTestDependency(self.case, self.depends)
-- 
2.1.4

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


[OE-core] [PATCHv2 05/32] oeqa/core/decorator: Add support for OETestID and OETestTag

2016-12-07 Thread Aníbal Limón
From: Mariano Lopez 

These two decorators stores certain TAG or ID for the test case
also provides support for filtering in loading step.

[YOCTO #10236]

Signed-off-by: Mariano Lopez 
Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/core/decorator/oeid.py  | 23 +++
 meta/lib/oeqa/core/decorator/oetag.py | 24 
 2 files changed, 47 insertions(+)
 create mode 100644 meta/lib/oeqa/core/decorator/oeid.py
 create mode 100644 meta/lib/oeqa/core/decorator/oetag.py

diff --git a/meta/lib/oeqa/core/decorator/oeid.py 
b/meta/lib/oeqa/core/decorator/oeid.py
new file mode 100644
index 000..ea8017a
--- /dev/null
+++ b/meta/lib/oeqa/core/decorator/oeid.py
@@ -0,0 +1,23 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+from . import OETestFilter, registerDecorator
+from oeqa.core.utils.misc import intToList
+
+def _idFilter(oeid, filters):
+ return False if oeid in filters else True
+
+@registerDecorator
+class OETestID(OETestFilter):
+attrs = ('oeid',)
+
+def bind(self, registry, case):
+super(OETestID, self).bind(registry, case)
+
+def filtrate(self, filters):
+if filters.get('oeid'):
+filterx = intToList(filters['oeid'], 'oeid')
+del filters['oeid']
+if _idFilter(self.oeid, filterx):
+return True
+return False
diff --git a/meta/lib/oeqa/core/decorator/oetag.py 
b/meta/lib/oeqa/core/decorator/oetag.py
new file mode 100644
index 000..ad38ab7
--- /dev/null
+++ b/meta/lib/oeqa/core/decorator/oetag.py
@@ -0,0 +1,24 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+from . import OETestFilter, registerDecorator
+from oeqa.core.utils.misc import strToList
+
+def _tagFilter(tags, filters):
+return False if set(tags) & set(filters) else True
+
+@registerDecorator
+class OETestTag(OETestFilter):
+attrs = ('oetag',)
+
+def bind(self, registry, case):
+super(OETestTag, self).bind(registry, case)
+self.oetag = strToList(self.oetag, 'oetag')
+
+def filtrate(self, filters):
+if filters.get('oetag'):
+filterx = strToList(filters['oetag'], 'oetag')
+del filters['oetag']
+if _tagFilter(self.oetag, filterx):
+return True
+return False
-- 
2.1.4

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


[OE-core] [PATCHv2 03/32] oeqa/core: Add loader, context and decorator modules

2016-12-07 Thread Aníbal Limón
loader: Implements OETestLoader handling OETestDecorator
and filtering support when load tests. The OETestLoader is
responsible to set custom methods, attrs of the OEQA
frameowork.

[YOCTO #10231]
[YOCTO #10317]
[YOCTO #10353]

decorator: Add base class OETestDecorator to provide a common
way to define decorators to be used over OETestCase's, every
decorator has a method to be called when loading tests and
before test execution starts. Special decorators could be
implemented for filter tests on loading phase.

context: Provides HIGH level API for loadTests and runTests
of certain test component (i.e. runtime, sdk, selftest).

[YOCTO #10230]

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/core/context.py| 225 +
 meta/lib/oeqa/core/decorator/__init__.py |  71 ++
 meta/lib/oeqa/core/loader.py | 235 +++
 3 files changed, 531 insertions(+)
 create mode 100644 meta/lib/oeqa/core/context.py
 create mode 100644 meta/lib/oeqa/core/decorator/__init__.py
 create mode 100644 meta/lib/oeqa/core/loader.py

diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
new file mode 100644
index 000..d5caf53
--- /dev/null
+++ b/meta/lib/oeqa/core/context.py
@@ -0,0 +1,225 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+import os
+import sys
+import json
+import time
+import logging
+import collections
+import re
+
+from oeqa.core.loader import OETestLoader
+from oeqa.core.runner import OETestRunner, OEStreamLogger, xmlEnabled
+
+class OETestContext(object):
+loaderClass = OETestLoader
+runnerClass = OETestRunner
+streamLoggerClass = OEStreamLogger
+
+files_dir = os.path.abspath(os.path.join(os.path.dirname(
+os.path.abspath(__file__)), "../files"))
+
+def __init__(self, d=None, logger=None):
+if not type(d) is dict:
+raise TypeError("d isn't dictionary type")
+
+self.d = d
+self.logger = logger
+self._registry = {}
+self._registry['cases'] = collections.OrderedDict()
+self._results = {}
+
+def _read_modules_from_manifest(self, manifest):
+if not os.path.exists(manifest):
+raise
+
+modules = []
+for line in open(manifest).readlines():
+line = line.strip()
+if line and not line.startswith("#"):
+modules.append(line)
+
+return modules
+
+def loadTests(self, module_paths, modules=[], tests=[],
+modules_manifest="", modules_required=[], filters={}):
+if modules_manifest:
+modules = self._read_modules_from_manifest(modules_manifest)
+
+self.loader = self.loaderClass(self, module_paths, modules, tests,
+modules_required, filters)
+self.suites = self.loader.discover()
+
+def runTests(self):
+streamLogger = self.streamLoggerClass(self.logger)
+self.runner = self.runnerClass(self, stream=streamLogger, verbosity=2)
+
+self._run_start_time = time.time()
+result = self.runner.run(self.suites)
+self._run_end_time = time.time()
+
+return result
+
+def logSummary(self, result, component, context_msg=''):
+self.logger.info("SUMMARY:")
+self.logger.info("%s (%s) - Ran %d test%s in %.3fs" % (component,
+context_msg, result.testsRun, result.testsRun != 1 and "s" or "",
+(self._run_end_time - self._run_start_time)))
+
+if result.wasSuccessful():
+msg = "%s - OK - All required tests passed" % component
+else:
+msg = "%s - FAIL - Required tests failed" % component
+skipped = len(self._results['skipped'])
+if skipped: 
+msg += " (skipped=%d)" % skipped
+self.logger.info(msg)
+
+def _logDetailsNotPassed(self, case, type, desc):
+found = False
+
+for (scase, msg) in self._results[type]:
+# XXX: When XML reporting is enabled scase is
+# xmlrunner.result._TestInfo instance instead of
+# string.
+if xmlEnabled:
+if case.id() == scase.test_id:
+found = True
+break
+scase_str = scase.test_id
+else:
+if case == scase:
+found = True
+break
+scase_str = str(scase)
+
+# When fails at module or class level the class name is passed as 
string
+# so figure out to see if match
+m = re.search("^setUpModule \((?P.*)\)$", scase_str)
+if m:
+if case.__class__.__module__ == m.group('module_name'):
+found = True
+break
+
+m = re.search("^setUpClass \((?P.*)\)$", scase_str)
+

[OE-core] [PATCHv2 01/32] oeqa/core: Add base OEQA framework

2016-12-07 Thread Aníbal Limón
case: Defines OETestCase base class that provides custom
methods/attrs defined by the framework.
Every OETestCase instance contains a reference to the test
data (d), the test context (tc) and the logger.
Also implements _oe{SetUp,TearDown}Class for make special
handling of OEQA decorators and validations.

runner: Defines OETestRunner/OETestResult with support for RAW
and XML result logs.

exception: Custom exceptions related to the OEQA framework based
on class OEQAException.

[YOCTO #10230]
[YOCTO #10233]

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/core/__init__.py  |  0
 meta/lib/oeqa/core/case.py  | 46 +
 meta/lib/oeqa/core/exception.py | 14 
 meta/lib/oeqa/core/runner.py| 76 +
 4 files changed, 136 insertions(+)
 create mode 100644 meta/lib/oeqa/core/__init__.py
 create mode 100644 meta/lib/oeqa/core/case.py
 create mode 100644 meta/lib/oeqa/core/exception.py
 create mode 100644 meta/lib/oeqa/core/runner.py

diff --git a/meta/lib/oeqa/core/__init__.py b/meta/lib/oeqa/core/__init__.py
new file mode 100644
index 000..e69de29
diff --git a/meta/lib/oeqa/core/case.py b/meta/lib/oeqa/core/case.py
new file mode 100644
index 000..a47cb19
--- /dev/null
+++ b/meta/lib/oeqa/core/case.py
@@ -0,0 +1,46 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+import unittest
+
+from oeqa.core.exception import OEQAMissingVariable
+
+def _validate_data_vars(d, data_vars, type_msg):
+if data_vars:
+for v in data_vars:
+if not v in d:
+raise OEQAMissingVariable("Test %s need %s variable but"\
+" isn't into d" % (type_msg, v))
+
+class OETestCase(unittest.TestCase):
+# TestContext and Logger instance set by OETestLoader.
+tc = None
+logger = None
+
+# d has all the variables needed by the test cases
+# is the same across all the test cases.
+d = None
+
+# data_vars has the variables needed by a test class
+# or test case instance, if some var isn't into d a
+# OEMissingVariable exception is raised
+data_vars = None
+
+@classmethod
+def _oeSetUpClass(clss):
+_validate_data_vars(clss.d, clss.data_vars, "class")
+clss.setUpClassMethod()
+
+@classmethod
+def _oeTearDownClass(clss):
+clss.tearDownClassMethod()
+
+def _oeSetUp(self):
+for d in self.decorators:
+d.setUpDecorator()
+self.setUpMethod()
+
+def _oeTearDown(self):
+for d in self.decorators:
+d.tearDownDecorator()
+self.tearDownMethod()
diff --git a/meta/lib/oeqa/core/exception.py b/meta/lib/oeqa/core/exception.py
new file mode 100644
index 000..2dfd840
--- /dev/null
+++ b/meta/lib/oeqa/core/exception.py
@@ -0,0 +1,14 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+class OEQAException(Exception):
+pass
+
+class OEQATimeoutError(OEQAException):
+pass
+
+class OEQAMissingVariable(OEQAException):
+pass
+
+class OEQADependency(OEQAException):
+pass
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
new file mode 100644
index 000..8f5af57
--- /dev/null
+++ b/meta/lib/oeqa/core/runner.py
@@ -0,0 +1,76 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+import os
+import time
+import unittest
+import logging
+
+xmlEnabled = False
+try:
+import xmlrunner
+from xmlrunner.result import _XMLTestResult as _TestResult
+from xmlrunner.runner import XMLTestRunner as _TestRunner
+xmlEnabled = True
+except ImportError:
+# use the base runner instead
+from unittest import TextTestResult as _TestResult
+from unittest import TextTestRunner as _TestRunner
+
+class OEStreamLogger(object):
+def __init__(self, logger):
+self.logger = logger
+self.buffer = ""
+
+def write(self, msg):
+if msg[-1] != '\n':
+self.buffer += msg
+else:
+self.logger.log(logging.INFO, self.buffer.rstrip("\n"))
+self.buffer = ""
+
+def flush(self):
+for handler in self.logger.handlers:
+handler.flush()
+
+class OETestResult(_TestResult):
+def __init__(self, tc, *args, **kwargs):
+super(OETestResult, self).__init__(*args, **kwargs)
+
+self.tc = tc
+
+self.tc._results['failures'] = self.failures
+self.tc._results['errors'] = self.errors
+self.tc._results['skipped'] = self.skipped
+self.tc._results['expectedFailures'] = self.expectedFailures
+
+def startTest(self, test):
+super(OETestResult, self).startTest(test)
+
+class OETestRunner(_TestRunner):
+def __init__(self, tc, *args, **kwargs):
+if xmlEnabled:
+if not 

[OE-core] [PATCHv2 00/32] OEQA Framework Refactor & Improvements

2016-12-07 Thread Aníbal Limón
This patchset is related to OEQA Framework for details read the RFC send to the
Openembedded architecture ML.

http://lists.openembedded.org/pipermail/openembedded-architecture/2016-December/000351.html

This v2 fixes sdk extensible test case sdk_update.

The following changes since commit 9e63f81c78e284c9b325fe04a1b59e61c7ad8a1a:

  bitbake: ast: remove BBVERSIONS support (2016-11-30 15:48:10 +)

are available in the git repository at:

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

Aníbal Limón (28):
  oeqa/core: Add base OEQA framework
  oeqa/core: Add loader, context and decorator modules
  oeqa/core/decorator: Add support for OETestDepends
  oeqa/core/decorator: Add support for OETestDataDepends and
skipIfDataVar
  scripts/oe-test: Add new oe-test script
  oeqa/core/context: Add support of OETestContextExecutor
  oeqa/core/cases: Add example test cases
  oeqa/core: Add README
  oe/data: Add export2json function
  classes/rootfs-postcommands: Add write_image_test_data
  classes/populate_sdk_base: Add write_sdk_test_data to postprocess
  oeqa/core: Change name of d to td
  oeqa/utils/path: Add remove_safe function
  oeqa: Move common files to oeqa/files instead of runtime only
  oeqa/sdk: Move test cases inside cases directory
  oeqa/{runtime,sdk}/files: Move testsdkmakefile from runtime to sdk
module
  oeqa/sdk: Add case and context modules for the SDK component
  classes/testsdk: Migrates testsdk.bbclass to use new OESDKTestContext
  oeqa/utils: Move targetbuild to buildproject module
  oeqa/utils: {Target,SDK,}BuildProject remove dependency of bb
  oeqa/sdk/cases: Migrate tests to the new OEQA framework
  classes/testsdk: Remove the need of TEST_LOG_DIR variable
  oeqa/sdkext: Move test cases inside cases directory
  oeqa/sdkext: Adds case and context modules.
  classes/testsdk: Migrate to use the new OESDKExtTestContext
  oeqa/sdkext/cases: Migrate test case to new OEQA framework
  oeqa/runtime: Fix TargetBuildProject instances
  oeqa: Fix files handling on runtime tests.

Mariano Lopez (4):
  oeqa/core: Add utils module for OEQA framework
  oeqa/core/decorator: Add support for OETestID and OETestTag
  oeqa/core/decorator: Add support for OETimeout decorator
  oeqa/core: Add tests for the OEQA framework

 meta/classes/populate_sdk_base.bbclass |   9 +-
 meta/classes/rootfs-postcommands.bbclass   |  18 ++
 meta/classes/testexport.bbclass|   5 +
 meta/classes/testimage.bbclass |   4 +
 meta/classes/testsdk.bbclass   | 162 --
 meta/lib/oe/data.py|  28 +++
 meta/lib/oeqa/core/README  |  38 
 meta/lib/oeqa/core/__init__.py |   0
 meta/lib/oeqa/core/case.py |  46 
 meta/lib/oeqa/core/cases/__init__.py   |   0
 meta/lib/oeqa/core/cases/example/data.json |   1 +
 meta/lib/oeqa/core/cases/example/test_basic.py |  20 ++
 meta/lib/oeqa/core/context.py  | 225 
 meta/lib/oeqa/core/decorator/__init__.py   |  71 +++
 meta/lib/oeqa/core/decorator/data.py   |  36 
 meta/lib/oeqa/core/decorator/depends.py|  94 +
 meta/lib/oeqa/core/decorator/oeid.py   |  23 ++
 meta/lib/oeqa/core/decorator/oetag.py  |  24 +++
 meta/lib/oeqa/core/decorator/oetimeout.py  |  25 +++
 meta/lib/oeqa/core/exception.py|  14 ++
 meta/lib/oeqa/core/loader.py   | 235 +
 meta/lib/oeqa/core/runner.py   |  76 +++
 meta/lib/oeqa/core/tests/__init__.py   |   0
 meta/lib/oeqa/core/tests/cases/data.py |  20 ++
 meta/lib/oeqa/core/tests/cases/depends.py  |  38 
 .../oeqa/core/tests/cases/loader/invalid/oeid.py   |  15 ++
 .../oeqa/core/tests/cases/loader/valid/another.py  |   9 +
 meta/lib/oeqa/core/tests/cases/oeid.py |  18 ++
 meta/lib/oeqa/core/tests/cases/oetag.py|  18 ++
 meta/lib/oeqa/core/tests/cases/timeout.py  |  18 ++
 meta/lib/oeqa/core/tests/common.py |  35 +++
 meta/lib/oeqa/core/tests/test_data.py  |  51 +
 meta/lib/oeqa/core/tests/test_decorators.py| 135 
 meta/lib/oeqa/core/tests/test_loader.py|  86 
 meta/lib/oeqa/core/tests/test_runner.py|  38 
 meta/lib/oeqa/core/utils/__init__.py   |   0
 meta/lib/oeqa/core/utils/misc.py   |  37 
 meta/lib/oeqa/core/utils/path.py   |  19 ++
 meta/lib/oeqa/core/utils/test.py   |  71 +++
 meta/lib/oeqa/{runtime => }/files/test.c   |   0
 meta/lib/oeqa/{runtime => }/files/test.cpp |   0
 meta/lib/oeqa/{runtime => }/files/test.pl 

[OE-core] [PATCH] Revert "webkitgtk: drop patch 0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch"

2016-12-07 Thread Carlos Alberto Lopez Perez
This reverts commit 812c52f654c1bccca033163100055e3a8b8cda6e.

Upstream fixed the issue with GCC. But the build still fails with Clang.
Therefore reintroduce this patch until a better solution is found.
Upstream bug: https://bugs.webkit.org/show_bug.cgi?id=161697

Signed-off-by: Carlos Alberto Lopez Perez 
---
 ...bKitMacros-Append-to-I-and-not-to-isystem.patch | 185 +
 meta/recipes-sato/webkit/webkitgtk_2.14.2.bb   |   1 +
 2 files changed, 186 insertions(+)
 create mode 100644 
meta/recipes-sato/webkit/files/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch

diff --git 
a/meta/recipes-sato/webkit/files/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
 
b/meta/recipes-sato/webkit/files/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
new file mode 100644
index 000..a4face2
--- /dev/null
+++ 
b/meta/recipes-sato/webkit/files/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
@@ -0,0 +1,185 @@
+From 20ee11dd188e1538f8cdd17a289dc6f9c63a011e Mon Sep 17 00:00:00 2001
+From: Khem Raj 
+Date: Sun, 17 Apr 2016 12:35:41 -0700
+Subject: [PATCH] WebKitMacros: Append to -I and not to -isystem
+
+gcc-6 has now introduced stdlib.h in libstdc++ for better
+compliance and its including the C library stdlib.h using
+include_next which is sensitive to order of system header
+include paths. Its infact better to not tinker with the
+system header include paths at all. Since adding /usr/include
+to -system is redundant and compiler knows about it moreover
+now with gcc6 it interferes with compiler's functioning
+and ends up with compile errors e.g.
+
+/usr/include/c++/6.0.0/cstdlib:75:25: fatal error: stdlib.h: No such file or 
directory
+
+This is also an issue with clang (when using libstdc++ >= 6)
+
+Upstream bug: https://bugs.webkit.org/show_bug.cgi?id=161697
+
+Signed-off-by: Khem Raj 
+Upstream-Status: Pending
+---
+ Source/JavaScriptCore/shell/CMakeLists.txt | 2 +-
+ Source/WebCore/PlatformGTK.cmake   | 6 +++---
+ Source/WebKit2/PlatformGTK.cmake   | 2 +-
+ Source/cmake/WebKitMacros.cmake| 2 +-
+ Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt | 2 +-
+ Tools/ImageDiff/CMakeLists.txt | 2 +-
+ Tools/MiniBrowser/gtk/CMakeLists.txt   | 2 +-
+ Tools/TestWebKitAPI/PlatformGTK.cmake  | 2 +-
+ Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt| 2 +-
+ Tools/WebKitTestRunner/CMakeLists.txt  | 2 +-
+ 10 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt 
b/Source/JavaScriptCore/shell/CMakeLists.txt
+index 155c797..80fe22b 100644
+--- a/Source/JavaScriptCore/shell/CMakeLists.txt
 b/Source/JavaScriptCore/shell/CMakeLists.txt
+@@ -20,7 +20,7 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
+ 
+ WEBKIT_WRAP_SOURCELIST(${JSC_SOURCES})
+ include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES})
+-include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
++include_directories(${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
+ add_executable(jsc ${JSC_SOURCES})
+ target_link_libraries(jsc ${JSC_LIBRARIES})
+ 
+diff --git a/Source/WebCore/PlatformGTK.cmake 
b/Source/WebCore/PlatformGTK.cmake
+index 567bd79..1fabea8 100644
+--- a/Source/WebCore/PlatformGTK.cmake
 b/Source/WebCore/PlatformGTK.cmake
+@@ -340,7 +340,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2)
+ ${GTK2_INCLUDE_DIRS}
+ ${GDK2_INCLUDE_DIRS}
+ )
+-target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE
++target_include_directories(WebCorePlatformGTK2 PRIVATE
+ ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
+ )
+ target_link_libraries(WebCorePlatformGTK2
+@@ -365,7 +365,7 @@ WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
+ target_include_directories(WebCorePlatformGTK PRIVATE
+ ${WebCore_INCLUDE_DIRECTORIES}
+ )
+-target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
++target_include_directories(WebCorePlatformGTK PRIVATE
+ ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
+ ${GTK_INCLUDE_DIRS}
+ ${GDK_INCLUDE_DIRS}
+@@ -383,7 +383,7 @@ include_directories(
+ "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
+ )
+ 
+-include_directories(SYSTEM
++include_directories(
+ ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
+ )
+ 
+diff --git a/Source/WebKit2/PlatformGTK.cmake 
b/Source/WebKit2/PlatformGTK.cmake
+index e4805a4..c57df5d 100644
+--- a/Source/WebKit2/PlatformGTK.cmake
 b/Source/WebKit2/PlatformGTK.cmake
+@@ -822,7 +822,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2)
+ target_include_directories(WebKitPluginProcess2 PRIVATE
+ ${WebKit2CommonIncludeDirectories}
+ )
+-target_include_directories(WebKitPluginProcess2 SYSTEM PRIVATE
++target_include_directories(WebKitPluginProcess2 PRIVATE
+  ${WebKit2CommonSystemIncludeDirectories}
+  ${GTK2_INCLUDE_DIRS}
+  

Re: [OE-core] [oe-core][PATCH] webkitgtk: drop patch 0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch

2016-12-07 Thread Khem Raj
On Wed, Dec 7, 2016 at 11:46 AM, Carlos Alberto Lopez Perez
 wrote:
> On 05/12/16 23:56, Khem Raj wrote:
>> Carlos
>>
>> webkitgtk fails now e.g. see
>>
>> http://errors.yoctoproject.org/Errors/Details/111221/ 
>> 
>>
>> fatal error: 'stdlib.h' file not found
>> #include_next 
>>
>> This is when building with clang, I think its too early to drop this patch.
>
> Hi,
>
> I thought this was an issue only with GCC ...
>
> Some questions:
>  * Which version of clang is used ?
>  * The clang toolchain used is the one from the
> https://github.com/kraj/meta-clang layer ?
>

yes

>
> I don't have a fix for it at this moment, and investigating it would
> require time. So I think is fine to reintroduce the patch
> 0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch (If possible,
> please change the commit message on the patch to tell that this an issue
> now only when building with clang).

Please send a revert then

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


Re: [OE-core] [oe-core][PATCH] webkitgtk: drop patch 0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch

2016-12-07 Thread Carlos Alberto Lopez Perez
On 05/12/16 23:56, Khem Raj wrote:
> Carlos
> 
> webkitgtk fails now e.g. see
> 
> http://errors.yoctoproject.org/Errors/Details/111221/ 
> 
> 
> fatal error: 'stdlib.h' file not found
> #include_next 
> 
> This is when building with clang, I think its too early to drop this patch. 

Hi,

I thought this was an issue only with GCC ...

Some questions:
 * Which version of clang is used ?
 * The clang toolchain used is the one from the
https://github.com/kraj/meta-clang layer ?


I don't have a fix for it at this moment, and investigating it would
require time. So I think is fine to reintroduce the patch
0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch (If possible,
please change the commit message on the patch to tell that this an issue
now only when building with clang).


Thanks



signature.asc
Description: OpenPGP digital signature
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] gstreamer1.0-plugins-bad: Add PKG_CONFIG_SYSROOT_DIR to output of pkg-config

2016-12-07 Thread Khem Raj
On Wed, Dec 7, 2016 at 4:25 AM, Jussi Kukkonen  wrote:
>
>
> On 5 December 2016 at 21:08, Khem Raj  wrote:
>>
>>
>> On Dec 5, 2016, at 5:20 AM, Jussi Kukkonen 
>> wrote:
>>
>>
>>
>> On 1 December 2016 at 10:37, Khem Raj  wrote:
>>>
>>> When configure pokes for wayland-protocols isntallations it ended up
>>> using the ones from host, which is because it did not account for sysroot
>>> prefix
>>>
>>> Signed-off-by: Khem Raj 
>>> ---
>>>  .../gstreamer/gstreamer1.0-plugins-bad.inc |  2 +-
>>>  ...G_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch | 37
>>> ++
>>>  .../gstreamer/gstreamer1.0-plugins-bad_1.10.1.bb   |  1 +
>>>  3 files changed, 39 insertions(+), 1 deletion(-)
>>>  create mode 100644
>>> meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
>>>
>>> diff --git
>>> a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
>>> b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
>>> index d26a6a9..d3c5326 100644
>>> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
>>> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
>>> @@ -64,7 +64,7 @@ PACKAGECONFIG[srtp]=
>>> "--enable-srtp,--disable-srtp,libsrtp"
>>>  PACKAGECONFIG[uvch264] =
>>> "--enable-uvch264,--disable-uvch264,libusb1 libgudev"
>>>  PACKAGECONFIG[voaacenc]=
>>> "--enable-voaacenc,--disable-voaacenc,vo-aacenc"
>>>  PACKAGECONFIG[voamrwbenc]  =
>>> "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc"
>>> -PACKAGECONFIG[wayland] =
>>> "--enable-wayland,--disable-wayland,wayland-native wayland"
>>> +PACKAGECONFIG[wayland] =
>>> "--enable-wayland,--disable-wayland,wayland-native wayland
>>> wayland-protocols"
>>>  PACKAGECONFIG[webp]= "--enable-webp,--disable-webp,libwebp"
>>>
>>>  # these plugins have not been ported to 1.0 (yet):
>>> diff --git
>>> a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
>>> b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
>>> new file mode 100644
>>> index 000..eb789df
>>> --- /dev/null
>>> +++
>>> b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
>>> @@ -0,0 +1,37 @@
>>> +From c271503d7e233428ac0323c51d6517113e26bef7 Mon Sep 17 00:00:00 2001
>>> +From: Khem Raj 
>>> +Date: Thu, 1 Dec 2016 00:27:13 -0800
>>> +Subject: [PATCH] Prepend PKG_CONFIG_SYSROOT_DIR to pkg-config output
>>> +
>>> +In cross environment we have to prepend the sysroot to the path found by
>>> +pkgconfig since the path returned from pkgconfig does not have sysroot
>>> prefixed
>>> +it ends up using the files from host system. If build host has wayland
>>> installed
>>> +the build will succeed but if you dont have wayland-protocols installed
>>> on build host then
>>> +it wont find the files on build host
>>> +
>>> +This should work ok with non sysrooted builds too since in those cases
>>> PKG_CONFIG_SYSROOT_DIR
>>> +will be empty
>>> +
>>> +Upstream-Status: Pending
>>> +
>>> +Signed-off-by: Khem Raj 
>>> +---
>>> + configure.ac | 2 +-
>>> + 1 file changed, 1 insertion(+), 1 deletion(-)
>>> +
>>> +diff --git a/configure.ac b/configure.ac
>>> +index f8ac96b..dc87b08 100644
>>> +--- a/configure.ac
>>>  b/configure.ac
>>> +@@ -2233,7 +2233,7 @@ AG_GST_CHECK_FEATURE(WAYLAND, [wayland sink],
>>> wayland , [
>>> + PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, wayland-protocols >= 1.4, [
>>> +   if test "x$wayland_scanner" != "x"; then
>>> + HAVE_WAYLAND="yes"
>>> +-AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG
>>> --variable=pkgdatadir wayland-protocols`)
>>> ++AC_SUBST(WAYLAND_PROTOCOLS_DATADIR,
>>> ${PKG_CONFIG_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir
>>> wayland-protocols`)
>>
>>
>> I believe this breaks multilib because wayland-protocols is allarch so
>> PKG_CONFIG_SYSROOT_DIR may then be incorrect.
>>
>>
>> Realized my last reply is too terse. expanding on it a bit more.
>> this is not really the case. Since PKG_CONFIG_SYSROOT_DIR is set to
>> STAGING_DIR_HOST which is then set to ${STAGING_DIR}/${MACHINE} so
>> effectively its just
>> reusing an existing var compared to your case where a new redundant
>> variable is introduced.
>>
>> having said that, there could be a multilib issue if pkgdatadir thats in
>> .pc file from wayland-protocols package is using variables like ${libdir}
>> which then are
>> multilib dependent, if this is the case then we need to fix .pc file.
>> however when I look at the
>> /usr/share/pkgconfig/wayland-protocols.pc it has
>>
>> prefix=/usr
>> datarootdir=${prefix}/share
>> 

Re: [OE-core] [PATCH] liburi-perl: Uprev from 1.60 to 1.71 to pickup bugfixes and compatibilty

2016-12-07 Thread Jason Wessel


Looks like someone beat me to it, but it had not been merged yet, so this can 
be ignored.

Cheers,
Jason.

On 12/07/2016 12:31 PM, Jason Wessel wrote:

The exo recipe from meta-oe no longer compiles and some parts of
URI::Escape no longer work due to changes in perl 5.  The main reason
for the uprev is to pickup the fix for this problem:

ERROR: \C is in regex; marked by <-- HERE in m/(\C <-- HERE )/ at 
/perl5/URI/Escape.pm line 205.

The perl 5.24 transitioned the \C regex from deprecated into a hard
error.

Signed-off-by: Jason Wessel 
---
  .../perl/{liburi-perl_1.60.bb => liburi-perl_1.71.bb} | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)
  rename meta/recipes-devtools/perl/{liburi-perl_1.60.bb => 
liburi-perl_1.71.bb} (66%)

diff --git a/meta/recipes-devtools/perl/liburi-perl_1.60.bb 
b/meta/recipes-devtools/perl/liburi-perl_1.71.bb
similarity index 66%
rename from meta/recipes-devtools/perl/liburi-perl_1.60.bb
rename to meta/recipes-devtools/perl/liburi-perl_1.71.bb
index 8809a44..1806d93 100644
--- a/meta/recipes-devtools/perl/liburi-perl_1.60.bb
+++ b/meta/recipes-devtools/perl/liburi-perl_1.71.bb
@@ -6,14 +6,14 @@ and manipulate the various components that make up these 
strings."
  SECTION = "libs"
  LICENSE = "Artistic-1.0 | GPL-1.0+"
  
-LIC_FILES_CHKSUM = "file://README;beginline=26;endline=30;md5=6c33ae5c87fd1c4897714e122dd9c23d"

+LIC_FILES_CHKSUM = "file://LICENSE;md5=c453e94fae672800f83bc1bd7a38b53f"
  
  DEPENDS += "perl"
  
-SRC_URI = "http://www.cpan.org/authors/id/G/GA/GAAS/URI-${PV}.tar.gz;

+SRC_URI = "http://www.cpan.org/authors/id/E/ET/ETHER/URI-${PV}.tar.gz;
  
-SRC_URI[md5sum] = "70f739be8ce28b8baba7c5920ffee4dc"

-SRC_URI[sha256sum] = 
"1f92d3dc64acb8845e9917c945e22b9a5275aeb9ff924eb7873c3b7a5c0d2377"
+SRC_URI[md5sum] = "247c3da29a794f72730e01aa5a715daf"
+SRC_URI[sha256sum] = 
"9c8eca0d7f39e74bbc14706293e653b699238eeb1a7690cc9c136fb8c2644115"
  
  S = "${WORKDIR}/URI-${PV}"
  



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


[OE-core] [PATCH] liburi-perl: Uprev from 1.60 to 1.71 to pickup bugfixes and compatibilty

2016-12-07 Thread Jason Wessel
The exo recipe from meta-oe no longer compiles and some parts of
URI::Escape no longer work due to changes in perl 5.  The main reason
for the uprev is to pickup the fix for this problem:

ERROR: \C is in regex; marked by <-- HERE in m/(\C <-- HERE )/ at 
/perl5/URI/Escape.pm line 205.

The perl 5.24 transitioned the \C regex from deprecated into a hard
error.

Signed-off-by: Jason Wessel 
---
 .../perl/{liburi-perl_1.60.bb => liburi-perl_1.71.bb} | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-devtools/perl/{liburi-perl_1.60.bb => liburi-perl_1.71.bb} 
(66%)

diff --git a/meta/recipes-devtools/perl/liburi-perl_1.60.bb 
b/meta/recipes-devtools/perl/liburi-perl_1.71.bb
similarity index 66%
rename from meta/recipes-devtools/perl/liburi-perl_1.60.bb
rename to meta/recipes-devtools/perl/liburi-perl_1.71.bb
index 8809a44..1806d93 100644
--- a/meta/recipes-devtools/perl/liburi-perl_1.60.bb
+++ b/meta/recipes-devtools/perl/liburi-perl_1.71.bb
@@ -6,14 +6,14 @@ and manipulate the various components that make up these 
strings."
 SECTION = "libs"
 LICENSE = "Artistic-1.0 | GPL-1.0+"
 
-LIC_FILES_CHKSUM = 
"file://README;beginline=26;endline=30;md5=6c33ae5c87fd1c4897714e122dd9c23d"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c453e94fae672800f83bc1bd7a38b53f"
 
 DEPENDS += "perl"
 
-SRC_URI = "http://www.cpan.org/authors/id/G/GA/GAAS/URI-${PV}.tar.gz;
+SRC_URI = "http://www.cpan.org/authors/id/E/ET/ETHER/URI-${PV}.tar.gz;
 
-SRC_URI[md5sum] = "70f739be8ce28b8baba7c5920ffee4dc"
-SRC_URI[sha256sum] = 
"1f92d3dc64acb8845e9917c945e22b9a5275aeb9ff924eb7873c3b7a5c0d2377"
+SRC_URI[md5sum] = "247c3da29a794f72730e01aa5a715daf"
+SRC_URI[sha256sum] = 
"9c8eca0d7f39e74bbc14706293e653b699238eeb1a7690cc9c136fb8c2644115"
 
 S = "${WORKDIR}/URI-${PV}"
 
-- 
2.10.1

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


Re: [OE-core] [PATCH V2 5/6] runqemu: fixes for slirp, network device and hostfwd

2016-12-07 Thread Randy Witt



 def setup_slirp(self):
 """Setup user networking"""

 if self.fstype == 'nfs':
 self.setup_nfs()
 self.kernel_cmdline_script += ' ip=dhcp'
-self.set('NETWORK_CMD', self.get('QB_SLIRP_OPT'))
+# Port mapping
+hostfwd = ",hostfwd=tcp::-:22,hostfwd=tcp::2323-:23"
+qb_slirp_opt_default = "-netdev user,id=net0%s" % hostfwd
+qb_slirp_opt = self.get('QB_SLIRP_OPT') or qb_slirp_opt_default
+# Figure out the port
+ports = re.findall('hostfwd=[^-]*:([0-9]+)-[^,-]*', qb_slirp_opt)
+ports = [int(i) for i in ports]
+mac = 2
+# Find a free port to avoid conflicts
+for p in ports[:]:
+p_new = p
+while not check_free_port('localhost', p_new):
+p_new += 1
+mac += 1
+while p_new in ports:
+p_new += 1
+mac += 1
+if p != p_new:
+ports.append(p_new)
+qb_slirp_opt = re.sub(':%s-' % p, ':%s-' % p_new, qb_slirp_opt)
+logger.info("Port forward changed: %s -> %s" % (p, p_new))
Regardless if the port is changed or not, so that things like tests have an 
easier time of figuring out the port mappings, would it be good add a flag that 
prints out the entire list of ports used, or always do it? i.e. "Port forwarding 
:22 2333:23 It's not necessary of course, you can  always look at the 
command line and then check to see if anything is remapped. But that's a bit 
more work.



+mac = "%s%02x" % (self.mac_slirp, mac)
+self.set('NETWORK_CMD', '%s %s' % 
(self.network_device.replace('@MAC@', mac), qb_slirp_opt))


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


Re: [OE-core] [PATCH 3/4] kern-tools: fix processing for no branch meta-data

2016-12-07 Thread Trevor Woerner
On Wed, Dec 7, 2016 at 11:18 AM, Bruce Ashfield
 wrote:
> With the attached patch, I see nothing else that is named  in /tmp/
>
> If you have the cycles, can you give it a try and let me know ?

Yes, I'm giving it a whirl right now. Thanks!
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/3] cve-check: allow recipes to override the product name

2016-12-07 Thread Mariano Lopez


On 07/12/16 10:50, Ross Burton wrote:
> Add a new variable CVE_PRODUCT for the product name to look up in the NVD
> database.  Default this to BPN, but allow recipes such as tiff (which is 
> libtiff
> in NVD) to override it.
>
> Signed-off-by: Ross Burton 
>
I like the idea to be able to override the name that cve-check-tool
checks. The only drawback would be the burden of adding these to needed
recipes. This is still better to have to guess the correct name, or to
check PROVIDES or RPROVIDES, there are just too much corner cases. So
this solution has my approval.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/3] tiff: set CVE_PRODUCT

2016-12-07 Thread Ross Burton
This is 'libtiff' in NVD.

Signed-off-by: Ross Burton 
---
 meta/recipes-multimedia/libtiff/tiff_4.0.6.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb 
b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
index 5fccde9..963d4b3 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
@@ -2,6 +2,8 @@ SUMMARY = "Provides support for the Tag Image File Format 
(TIFF)"
 LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
 
+CVE_PRODUCT = "libtiff"
+
 SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
file://libtool2.patch \
file://CVE-2015-8665_8683.patch \
-- 
2.8.1

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


[OE-core] [PATCH 1/3] cve-check: allow recipes to override the product name

2016-12-07 Thread Ross Burton
Add a new variable CVE_PRODUCT for the product name to look up in the NVD
database.  Default this to BPN, but allow recipes such as tiff (which is libtiff
in NVD) to override it.

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

diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index b0febfb..75b8fa9 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -20,6 +20,10 @@
 # the only method to check against CVEs. Running this tool
 # doesn't guarantee your packages are free of CVEs.
 
+# The product name that the CVE database uses.  Defaults to BPN, but may need 
to
+# be overriden per recipe (for example tiff.bb sets CVE_PRODUCT=libtiff).
+CVE_PRODUCT ?= "${BPN}"
+
 CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK"
 CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvd.db"
 
@@ -144,7 +148,7 @@ def check_cves(d, patched_cves):
 
 cves_patched = []
 cves_unpatched = []
-bpn = d.getVar("BPN", True)
+bpn = d.getVar("CVE_PRODUCT")
 pv = d.getVar("PV", True).split("git+")[0]
 cves = " ".join(patched_cves)
 cve_db_dir = d.getVar("CVE_CHECK_DB_DIR", True)
-- 
2.8.1

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


[OE-core] [PATCH 3/3] curl: set CVE_PRODUCT

2016-12-07 Thread Ross Burton
This is 'libcurl' in NVD.

Signed-off-by: Ross Burton 
---
 meta/recipes-support/curl/curl_7.51.0.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-support/curl/curl_7.51.0.bb 
b/meta/recipes-support/curl/curl_7.51.0.bb
index e1a996b..a9589b8 100644
--- a/meta/recipes-support/curl/curl_7.51.0.bb
+++ b/meta/recipes-support/curl/curl_7.51.0.bb
@@ -17,6 +17,7 @@ SRC_URI += " file://configure_ac.patch"
 SRC_URI[md5sum] = "09a7c5769a7eae676d5e2c86d51f167e"
 SRC_URI[sha256sum] = 
"7f8240048907e5030f67be0a6129bc4b333783b9cca1391026d700835a788dde"
 
+CVE_PRODUCT = "libcurl"
 inherit autotools pkgconfig binconfig multilib_header
 
 PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", 
d)} gnutls proxy zlib"
-- 
2.8.1

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


Re: [OE-core] [PATCH V2 0/6] runqemu: fix for slirp, network device and hostfwd

2016-12-07 Thread Nathan Rossi
On 6 December 2016 at 19:01, Robert Yang  wrote:
>
>
> On 12/06/2016 04:55 PM, Robert Yang wrote:
>>
>> * V2
>>   - Add QB_NETWORK_DEVICE to set network device for both slirp and tap,
>> the idea is from Randy and Nathan.
>
>
> Add Randy and Nathan in the loop, I had added them in git send-email,
> but there were not in the CC list, look strange.

Hi Robert

I tested the cpio.gz and network device parts of this series with the
meta-xilinx qemu machines, they work well. Will implement the
QB_NETWORK_DEVICE use in meta-xilinx once this series gets applied.

Thanks,
Nathan

>
> // Robert
>
>
>>   - Use different mac sections for slirp and tap to fix conflicts when
>> running both of them on the same host.
>>
>> * V1
>>   - Initial version
>>
>> The following changes since commit
>> 11063a01d4511b2688ea7ba2d7359e4e07328c66:
>>
>>   ruby: upgrade to 2.3.1 (2016-11-30 15:47:17 +)
>>
>> are available in the git repository at:
>>
>>   git://git.openembedded.org/openembedded-core-contrib rbt/runqemu
>>
>> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/runqemu
>>
>> Robert Yang (6):
>>   scripts/runqemu: fix checking for .cpio.gz
>>   qemuboot.bbclass: use IMGDEPLOYDIR
>>   runqemu-export-rootfs: fix inconsistent var names
>>   runqemu: support mutiple qemus running when nfs
>>   runqemu: fixes for slirp, network device and hostfwd
>>   qemuboot.bbclass: add blank lines in comments
>>
>>  meta/classes/qemuboot.bbclass  |  34 ++--
>>  meta/conf/machine/include/qemuboot-x86.inc |   1 -
>>  meta/conf/machine/qemuarm64.conf   |   1 -
>>  scripts/runqemu| 133
>> ++---
>>  scripts/runqemu-export-rootfs  |  21 ++---
>>  5 files changed, 140 insertions(+), 50 deletions(-)
>>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 3/4] kern-tools: fix processing for no branch meta-data

2016-12-07 Thread Bruce Ashfield

On 2016-12-07 10:11 AM, Trevor Woerner wrote:

This patch does fix the raspberrypi issue, and it has been pushed, thankfully.

But I'm still seeing hard-coded filenames in /tmp that are messing up
the ability for more than one person to use a given build machine.
E.g.:

/tmp/patch.standard.arm-versatile-926ejs.queue
/tmp/patch.standard.mti-malta32.queue
/tmp/patch.standard.mti-malta64.queue
/tmp/patch.standard.preempt-rt.base.queue
/tmp/patch.standard.preempt-rt.queue
/tmp/patch.standard.queue
/tmp/patch.unused.queue

I think the malta ones are used for qemumips64, which is still failing
for this reason (multiple users)


I tracked this down to some of the sub commands using the dirname
of the global patch queue .. and since that is in /tmp/, they are
following along.

With the attached patch, I see nothing else that is named  in /tmp/

If you have the cycles, can you give it a try and let me know ?

Bruce



On Tue, Dec 6, 2016 at 6:02 PM, Paul Barker  wrote:

On Tue, 06 Dec 2016 22:14:41 +0100
Patrick Ohly  wrote:


On Fri, 2016-12-02 at 16:09 -0500, Bruce Ashfield wrote:

Lernel meta-data that has patches, but no branches, can trigger an
error due to no branch specific patch queue.

This error then cascades to more issues since the tools are using
a named file in /tmp to store and display error messages to the
user.

We fix both issues though the following kern tools tweaks:

  commit bd9e1d6c9b0a34ff3e19a06999aaf57ffadfd04c
  Author: Bruce Ashfield 
  Date:   Fri Dec 2 13:09:40 2016 -0500

scc: use mktemp for consolidated output capture

To provide useful error messages the tools dump pre-processed
files and messages to a temporary file. If multiple users are
doing builds, this means they either race, or can have permissions
issues.

By creating the temporary file via mktemp, we avoid both issues.
(We also make sure to clean these up on exit, or /tmp will get
polluted quickly).

  commit a287da4bfe0b4acb8f2b0627bd8e7abd1a1dde26
  Author: Bruce Ashfield 
  Date:   Fri Dec 2 13:08:08 2016 -0500

patch: do not assume a branch specific patch queue is needed

When processing input files per-branch and global patch queues are
generated. If the meta-data has not created any branches in the
repo, no branch specific queue is required.

The tools assumed that one is always valid, and hence would throw a
non-zero exit code and stop processing.

By testing for a named per-branch queue, we avoid this issue.


Ostro OS runs into the problem while trying to use current OE-core
master:

 .../patch.cmd: line 29: : No such file or directory

| ERROR: Function failed: do_kernel_metadata (log file is located ...)

This commit here fixed it for me. I see that it is already in Ross' mut2
branch, so hopefully that'll land in master soon.



Ditto for meta-raspberrypi, the kernel doesn't build with current
oe-core master as discussed on the yocto@ list. This patch is needed
to fix things.

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


>From 707978ff47533c705eac42619988793f07a66b80 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield 
Date: Wed, 7 Dec 2016 11:14:34 -0500
Subject: [PATCH] kern-tools: ensure that no shared directories are used

We need to avoid using shared/common directories for any files that are
part of specific build, since permissions issues in multi user
environments will cause issues.

Integrating the following commit to solve the issue:

   scc: move unused patch queue under output dir

Signed-off-by: Bruce Ashfield 
---
 meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 0f8a786176f9..3ca6ca22ef20 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1b
 
 DEPENDS = "git-native"
 
-SRCREV = "bd9e1d6c9b0a34ff3e19a06999aaf57ffadfd04c"
+SRCREV = "626ceac135fa66277c2fa53197be33cc9d4d7614"
 PR = "r12"
 PV = "0.2+git${SRCPV}"
 
-- 
2.5.0

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


Re: [OE-core] [PATCH 00/33] Accumulated patches for deb packaging

2016-12-07 Thread Alexander Kanavin

On 12/07/2016 05:30 PM, Andreas Oberritter wrote:

These are most of my patches which accumulated since our distro
switched from opkg to dpkg and apt two years ago. They were tested
thoroughly on dora and krogoth and just a little bit on master.


How about updating apt and dpkg to latest upstream releases at the same
time?


I don't see an advantage over updating at a later point in time.


The advantage is that oe-core does not accumulate technical debt that way.

Specifically, it's better to do many incremental version updates than 
few massive updates (or avoid updates altogether until the ongoing 
maintenance becomes unbearable, in the worst case). There is less 
changes in upstream code to deal with, less dependency fixing, and less 
resistance from community. This is actually the preferred mode of 
operation in oe-core. We are constantly fighting back against the 
increase in debt, and you could really help us here a bit.



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


Re: [OE-core] [PATCH 00/33] Accumulated patches for deb packaging

2016-12-07 Thread Andreas Oberritter
Hi Alex,

On 07.12.2016 13:25, Alexander Kanavin wrote:
> On 12/06/2016 01:49 PM, Andreas Oberritter wrote:
>> These are most of my patches which accumulated since our distro
>> switched from opkg to dpkg and apt two years ago. They were tested
>> thoroughly on dora and krogoth and just a little bit on master.
> 
> How about updating apt and dpkg to latest upstream releases at the same
> time?

I don't see an advantage over updating at a later point in time.

Regards,
Andreas

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


Re: [OE-core] [PATCH 3/4] kern-tools: fix processing for no branch meta-data

2016-12-07 Thread Bruce Ashfield

On 2016-12-07 10:11 AM, Trevor Woerner wrote:

This patch does fix the raspberrypi issue, and it has been pushed, thankfully.

But I'm still seeing hard-coded filenames in /tmp that are messing up
the ability for more than one person to use a given build machine.
E.g.:

/tmp/patch.standard.arm-versatile-926ejs.queue
/tmp/patch.standard.mti-malta32.queue
/tmp/patch.standard.mti-malta64.queue
/tmp/patch.standard.preempt-rt.base.queue
/tmp/patch.standard.preempt-rt.queue
/tmp/patch.standard.queue
/tmp/patch.unused.queue

I think the malta ones are used for qemumips64, which is still failing
for this reason (multiple users)


Those are never supposed to go to /tmp/, they are targeted to ${S}
of the kernel build.

It must be a side effect of the change I just did where the branch
isn't defined.

I'll whip up another patch.

Bruce



On Tue, Dec 6, 2016 at 6:02 PM, Paul Barker  wrote:

On Tue, 06 Dec 2016 22:14:41 +0100
Patrick Ohly  wrote:


On Fri, 2016-12-02 at 16:09 -0500, Bruce Ashfield wrote:

Lernel meta-data that has patches, but no branches, can trigger an
error due to no branch specific patch queue.

This error then cascades to more issues since the tools are using
a named file in /tmp to store and display error messages to the
user.

We fix both issues though the following kern tools tweaks:

  commit bd9e1d6c9b0a34ff3e19a06999aaf57ffadfd04c
  Author: Bruce Ashfield 
  Date:   Fri Dec 2 13:09:40 2016 -0500

scc: use mktemp for consolidated output capture

To provide useful error messages the tools dump pre-processed
files and messages to a temporary file. If multiple users are
doing builds, this means they either race, or can have permissions
issues.

By creating the temporary file via mktemp, we avoid both issues.
(We also make sure to clean these up on exit, or /tmp will get
polluted quickly).

  commit a287da4bfe0b4acb8f2b0627bd8e7abd1a1dde26
  Author: Bruce Ashfield 
  Date:   Fri Dec 2 13:08:08 2016 -0500

patch: do not assume a branch specific patch queue is needed

When processing input files per-branch and global patch queues are
generated. If the meta-data has not created any branches in the
repo, no branch specific queue is required.

The tools assumed that one is always valid, and hence would throw a
non-zero exit code and stop processing.

By testing for a named per-branch queue, we avoid this issue.


Ostro OS runs into the problem while trying to use current OE-core
master:

 .../patch.cmd: line 29: : No such file or directory

| ERROR: Function failed: do_kernel_metadata (log file is located ...)

This commit here fixed it for me. I see that it is already in Ross' mut2
branch, so hopefully that'll land in master soon.



Ditto for meta-raspberrypi, the kernel doesn't build with current
oe-core master as discussed on the yocto@ list. This patch is needed
to fix things.

Thanks,
Paul Barker
--
___
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


Re: [OE-core] [PATCH 3/4] kern-tools: fix processing for no branch meta-data

2016-12-07 Thread Trevor Woerner
This patch does fix the raspberrypi issue, and it has been pushed, thankfully.

But I'm still seeing hard-coded filenames in /tmp that are messing up
the ability for more than one person to use a given build machine.
E.g.:

/tmp/patch.standard.arm-versatile-926ejs.queue
/tmp/patch.standard.mti-malta32.queue
/tmp/patch.standard.mti-malta64.queue
/tmp/patch.standard.preempt-rt.base.queue
/tmp/patch.standard.preempt-rt.queue
/tmp/patch.standard.queue
/tmp/patch.unused.queue

I think the malta ones are used for qemumips64, which is still failing
for this reason (multiple users)

On Tue, Dec 6, 2016 at 6:02 PM, Paul Barker  wrote:
> On Tue, 06 Dec 2016 22:14:41 +0100
> Patrick Ohly  wrote:
>
>> On Fri, 2016-12-02 at 16:09 -0500, Bruce Ashfield wrote:
>> > Lernel meta-data that has patches, but no branches, can trigger an
>> > error due to no branch specific patch queue.
>> >
>> > This error then cascades to more issues since the tools are using
>> > a named file in /tmp to store and display error messages to the
>> > user.
>> >
>> > We fix both issues though the following kern tools tweaks:
>> >
>> >   commit bd9e1d6c9b0a34ff3e19a06999aaf57ffadfd04c
>> >   Author: Bruce Ashfield 
>> >   Date:   Fri Dec 2 13:09:40 2016 -0500
>> >
>> > scc: use mktemp for consolidated output capture
>> >
>> > To provide useful error messages the tools dump pre-processed
>> > files and messages to a temporary file. If multiple users are
>> > doing builds, this means they either race, or can have permissions
>> > issues.
>> >
>> > By creating the temporary file via mktemp, we avoid both issues.
>> > (We also make sure to clean these up on exit, or /tmp will get
>> > polluted quickly).
>> >
>> >   commit a287da4bfe0b4acb8f2b0627bd8e7abd1a1dde26
>> >   Author: Bruce Ashfield 
>> >   Date:   Fri Dec 2 13:08:08 2016 -0500
>> >
>> > patch: do not assume a branch specific patch queue is needed
>> >
>> > When processing input files per-branch and global patch queues are
>> > generated. If the meta-data has not created any branches in the
>> > repo, no branch specific queue is required.
>> >
>> > The tools assumed that one is always valid, and hence would throw a
>> > non-zero exit code and stop processing.
>> >
>> > By testing for a named per-branch queue, we avoid this issue.
>>
>> Ostro OS runs into the problem while trying to use current OE-core
>> master:
>>
>>  .../patch.cmd: line 29: : No such file or directory
>>
>> | ERROR: Function failed: do_kernel_metadata (log file is located ...)
>>
>> This commit here fixed it for me. I see that it is already in Ross' mut2
>> branch, so hopefully that'll land in master soon.
>>
>
> Ditto for meta-raspberrypi, the kernel doesn't build with current
> oe-core master as discussed on the yocto@ list. This patch is needed
> to fix things.
>
> Thanks,
> Paul Barker
> --
> ___
> 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] wic: Create a logical partition only when it is really mandatory

2016-12-07 Thread Alessio Igor Bogani
Don't worth bother with logical partition on MBR partition type (aka
msdos) if disk image generated by wic should have 4 partitions.

Signed-off-by: Alessio Igor Bogani 
---
 scripts/lib/wic/utils/partitionedfs.py | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/wic/utils/partitionedfs.py 
b/scripts/lib/wic/utils/partitionedfs.py
index cb03009..ccc9700 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -201,9 +201,10 @@ class Image():
 part['num'] = 0
 
 if disk['ptable_format'] == "msdos":
-if disk['realpart'] > 3:
-part['type'] = 'logical'
-part['num'] = disk['realpart'] + 1
+if len(self.partitions) > 4:
+if disk['realpart'] > 3:
+part['type'] = 'logical'
+part['num'] = disk['realpart'] + 1
 
 disk['partitions'].append(num)
 msger.debug("Assigned %s to %s%d, sectors range %d-%d size %d "
-- 
2.10.2

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


Re: [OE-core] what is the closest alternative to red hat's ABRT in OE?

2016-12-07 Thread Burton, Ross
On 7 December 2016 at 13:37, Robert P. J. Day  wrote:

>   and pretty sure i asked this before ... is there some reasonable
> equivalent to "sosreport" for OE?
>

For people who don't run Fedora, you might have better luck saying what
functionality you're after.

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


Re: [OE-core] what is the closest alternative to red hat's ABRT in OE?

2016-12-07 Thread Robert P. J. Day
On Tue, 6 Dec 2016, Maciej Borzęcki wrote:

> On Tue, Dec 6, 2016 at 3:49 PM, Robert P. J. Day  
> wrote:
> >
> >   as in:
> >
> > https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-abrt.html
> >
> > specifically, to manage core files? i would have thought judicious use
> > of "ulimit" would be the solution. others?
> >
>
> If you're using systemd there is systemd-coredump(8).

  already looking into that ... is it safe to say that RH's "abrt" is,
well, exclusive to RH?

  and pretty sure i asked this before ... is there some reasonable
equivalent to "sosreport" for OE?

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2] less: 481 -> 487

2016-12-07 Thread Alexander Kanavin

On 12/07/2016 08:11 PM, Huang Qiyu wrote:

Upgrade less from 481 to 487.

License checksum changes are not related to license changes.


You should still say what has caused them, however.

Alex

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


Re: [OE-core] [PATCH] less: 481 -> 487

2016-12-07 Thread Alexander Kanavin

On 12/07/2016 01:05 AM, Huang Qiyu wrote:


 LICENSE = "GPLv3+ | BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-file://LICENSE;md5=48c26a307f91af700e1f00585f215aaf"
+file://LICENSE;md5=2ef3e4b8dafc85612bc5254b8081e234"


Why did the LICENSE change? You should explain this in the commit message.

Alex

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


Re: [OE-core] [PATCH] gstreamer1.0-plugins-bad: Add PKG_CONFIG_SYSROOT_DIR to output of pkg-config

2016-12-07 Thread Jussi Kukkonen
On 5 December 2016 at 21:08, Khem Raj  wrote:

>
> On Dec 5, 2016, at 5:20 AM, Jussi Kukkonen 
> wrote:
>
>
>
> On 1 December 2016 at 10:37, Khem Raj  wrote:
>
>> When configure pokes for wayland-protocols isntallations it ended up
>> using the ones from host, which is because it did not account for sysroot
>> prefix
>>
>> Signed-off-by: Khem Raj 
>> ---
>>  .../gstreamer/gstreamer1.0-plugins-bad.inc |  2 +-
>>  ...G_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch | 37
>> ++
>>  .../gstreamer/gstreamer1.0-plugins-bad_1.10.1.bb   |  1 +
>>  3 files changed, 39 insertions(+), 1 deletion(-)
>>  create mode 100644 meta/recipes-multimedia/gstrea
>> mer/gstreamer1.0-plugins-bad/0001-Prepend-PKG_CONFIG_
>> SYSROOT_DIR-to-pkg-config-output.patch
>>
>> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
>> b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
>> index d26a6a9..d3c5326 100644
>> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
>> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
>> @@ -64,7 +64,7 @@ PACKAGECONFIG[srtp]=
>> "--enable-srtp,--disable-srtp,libsrtp"
>>  PACKAGECONFIG[uvch264] = "--enable-uvch264,--disable-uvch264,libusb1
>> libgudev"
>>  PACKAGECONFIG[voaacenc]= "--enable-voaacenc,--disable-v
>> oaacenc,vo-aacenc"
>>  PACKAGECONFIG[voamrwbenc]  = "--enable-voamrwbenc,--disable
>> -voamrwbenc,vo-amrwbenc"
>> -PACKAGECONFIG[wayland] = 
>> "--enable-wayland,--disable-wayland,wayland-native
>> wayland"
>> +PACKAGECONFIG[wayland] = 
>> "--enable-wayland,--disable-wayland,wayland-native
>> wayland wayland-protocols"
>>  PACKAGECONFIG[webp]= "--enable-webp,--disable-webp,libwebp"
>>
>>  # these plugins have not been ported to 1.0 (yet):
>> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-
>> bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
>> b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-
>> bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
>> new file mode 100644
>> index 000..eb789df
>> --- /dev/null
>> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-
>> bad/0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch
>> @@ -0,0 +1,37 @@
>> +From c271503d7e233428ac0323c51d6517113e26bef7 Mon Sep 17 00:00:00 2001
>> +From: Khem Raj 
>> +Date: Thu, 1 Dec 2016 00:27:13 -0800
>> +Subject: [PATCH] Prepend PKG_CONFIG_SYSROOT_DIR to pkg-config output
>> +
>> +In cross environment we have to prepend the sysroot to the path found by
>> +pkgconfig since the path returned from pkgconfig does not have sysroot
>> prefixed
>> +it ends up using the files from host system. If build host has wayland
>> installed
>> +the build will succeed but if you dont have wayland-protocols installed
>> on build host then
>> +it wont find the files on build host
>> +
>> +This should work ok with non sysrooted builds too since in those cases
>> PKG_CONFIG_SYSROOT_DIR
>> +will be empty
>> +
>> +Upstream-Status: Pending
>> +
>> +Signed-off-by: Khem Raj 
>> +---
>> + configure.ac | 2 +-
>> + 1 file changed, 1 insertion(+), 1 deletion(-)
>> +
>> +diff --git a/configure.ac b/configure.ac
>> +index f8ac96b..dc87b08 100644
>> +--- a/configure.ac
>>  b/configure.ac
>> +@@ -2233,7 +2233,7 @@ AG_GST_CHECK_FEATURE(WAYLAND, [wayland sink],
>> wayland , [
>> + PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, wayland-protocols >= 1.4, [
>> +   if test "x$wayland_scanner" != "x"; then
>> + HAVE_WAYLAND="yes"
>> +-AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG
>> --variable=pkgdatadir wayland-protocols`)
>> ++AC_SUBST(WAYLAND_PROTOCOLS_DATADIR,
>> ${PKG_CONFIG_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir
>> wayland-protocols`)
>>
>
> I believe this breaks multilib because wayland-protocols is allarch so
> PKG_CONFIG_SYSROOT_DIR may then be incorrect.
>
>
> Realized my last reply is too terse. expanding on it a bit more.
> this is not really the case. Since PKG_CONFIG_SYSROOT_DIR is set to
>  STAGING_DIR_HOST which is then set to ${STAGING_DIR}/${MACHINE} so
> effectively its just
> reusing an existing var compared to your case where a new redundant
> variable is introduced.
>
> having said that, there could be a multilib issue if pkgdatadir thats in
> .pc file from wayland-protocols package is using variables like ${libdir}
> which then are
> multilib dependent, if this is the case then we need to fix .pc file.
> however when I look at the 
> /usr/share/pkgconfig/wayland-protocols.pc
> it has
>
> prefix=/usr
> datarootdir=${prefix}/share
> pkgdatadir=/usr/share/wayland-protocols
>
> seems to be free of multilib deps.
>
>
It's not about the .pc file, the issue is that if you build
lib32-gstreamer1.0-plugins-bad WAYLAND_PROTOCOLS_DATADIR will end up 

Re: [OE-core] [PATCH 00/33] Accumulated patches for deb packaging

2016-12-07 Thread Alexander Kanavin

On 12/06/2016 01:49 PM, Andreas Oberritter wrote:

These are most of my patches which accumulated since our distro
switched from opkg to dpkg and apt two years ago. They were tested
thoroughly on dora and krogoth and just a little bit on master.


How about updating apt and dpkg to latest upstream releases at the same 
time?


Alex

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


Re: [OE-core] tiff: fix several tiff CVE issues

2016-12-07 Thread Alexander Kanavin

On 12/07/2016 10:01 AM, mingli...@windriver.com wrote:

These commits fix several tiff CVE issues:
CVE-2016-9533, CVE-2016-9534, CVE-2016-9535,
CVE-2016-9536, CVE-2016-9537 and CVE-2016-9538


Please update tiff to latest upstream version (see 
http://packages.yoctoproject.org/), and then apply any CVE fixes which 
are still necessary.


This applies to any other package as well.

Alex

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


Re: [OE-core] [PATCH] xkeyboard-config: 2.18 -> 2.19

2016-12-07 Thread Jussi Kukkonen
Since you're already resending: please set "diff.renames" in your git
configuration to get smaller diffs.
Example from my ~/.gitconfig:

[diff]
renames = true


Thanks,
  Jussi


On 7 December 2016 at 13:05, Burton, Ross  wrote:

> Can you resend with a proper From: address please not just root?
>
> Ross
>
> On 7 December 2016 at 10:33, root  wrote:
>
>> Upgrade xkeyboard-config from 2.18 to 2.19
>>
>> Signed-off-by: zhengruoqin 
>> ---
>>  .../xorg-lib/xkeyboard-config_2.18.bb  | 31
>> --
>>  .../xorg-lib/xkeyboard-config_2.19.bb  | 31
>> ++
>>  2 files changed, 31 insertions(+), 31 deletions(-)
>>  delete mode 100644 meta/recipes-graphics/xorg-lib/
>> xkeyboard-config_2.18.bb
>>  create mode 100644 meta/recipes-graphics/xorg-lib/
>> xkeyboard-config_2.19.bb
>>
>> diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
>> b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
>> deleted file mode 100644
>> index 79fcbd8..000
>> --- a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
>> +++ /dev/null
>> @@ -1,31 +0,0 @@
>> -SUMMARY = "Keyboard configuration database for X Window"
>> -
>> -DESCRIPTION = "The non-arch keyboard configuration database for X \
>> -Window.  The goal is to provide the consistent, well-structured, \
>> -frequently released open source of X keyboard configuration data for X \
>> -Window System implementations.  The project is targeted to XKB-based \
>> -systems."
>> -
>> -HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig;
>> -BUGTRACKER = "https://bugs.freedesktop.org/
>> enter_bug.cgi?product=xkeyboard-config"
>> -
>> -LICENSE = "MIT & MIT-style"
>> -LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
>> -
>> -SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${
>> PV}.tar.bz2"
>> -SRC_URI[md5sum] = "c28cf45616bfec276879360bc36c6b27"
>> -SRC_URI[sha256sum] = "c41d917d6c8a59feb7ccbda51c40a
>> 6ada824fdd1e9684b52dd48c9530617ddd0"
>> -
>> -SECTION = "x11/libs"
>> -DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
>> -
>> -EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
>> -
>> -FILES_${PN} += "${datadir}/X11/xkb"
>> -
>> -inherit autotools pkgconfig gettext
>> -
>> -do_install_append () {
>> -install -d ${D}${datadir}/X11/xkb/compiled
>> -cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
>> -}
>> diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb
>> b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb
>> new file mode 100644
>> index 000..79fcbd8
>> --- /dev/null
>> +++ b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb
>> @@ -0,0 +1,31 @@
>> +SUMMARY = "Keyboard configuration database for X Window"
>> +
>> +DESCRIPTION = "The non-arch keyboard configuration database for X \
>> +Window.  The goal is to provide the consistent, well-structured, \
>> +frequently released open source of X keyboard configuration data for X \
>> +Window System implementations.  The project is targeted to XKB-based \
>> +systems."
>> +
>> +HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig;
>> +BUGTRACKER = "https://bugs.freedesktop.org/
>> enter_bug.cgi?product=xkeyboard-config"
>> +
>> +LICENSE = "MIT & MIT-style"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
>> +
>> +SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${
>> PV}.tar.bz2"
>> +SRC_URI[md5sum] = "c28cf45616bfec276879360bc36c6b27"
>> +SRC_URI[sha256sum] = "c41d917d6c8a59feb7ccbda51c40a
>> 6ada824fdd1e9684b52dd48c9530617ddd0"
>> +
>> +SECTION = "x11/libs"
>> +DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
>> +
>> +EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
>> +
>> +FILES_${PN} += "${datadir}/X11/xkb"
>> +
>> +inherit autotools pkgconfig gettext
>> +
>> +do_install_append () {
>> +install -d ${D}${datadir}/X11/xkb/compiled
>> +cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
>> +}
>> --
>> 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
>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] xkeyboard-config: 2.18 -> 2.19

2016-12-07 Thread Burton, Ross
Can you resend with a proper From: address please not just root?

Ross

On 7 December 2016 at 10:33, root  wrote:

> Upgrade xkeyboard-config from 2.18 to 2.19
>
> Signed-off-by: zhengruoqin 
> ---
>  .../xorg-lib/xkeyboard-config_2.18.bb  | 31
> --
>  .../xorg-lib/xkeyboard-config_2.19.bb  | 31
> ++
>  2 files changed, 31 insertions(+), 31 deletions(-)
>  delete mode 100644 meta/recipes-graphics/xorg-lib/
> xkeyboard-config_2.18.bb
>  create mode 100644 meta/recipes-graphics/xorg-lib/
> xkeyboard-config_2.19.bb
>
> diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
> b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
> deleted file mode 100644
> index 79fcbd8..000
> --- a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -SUMMARY = "Keyboard configuration database for X Window"
> -
> -DESCRIPTION = "The non-arch keyboard configuration database for X \
> -Window.  The goal is to provide the consistent, well-structured, \
> -frequently released open source of X keyboard configuration data for X \
> -Window System implementations.  The project is targeted to XKB-based \
> -systems."
> -
> -HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig;
> -BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=
> xkeyboard-config"
> -
> -LICENSE = "MIT & MIT-style"
> -LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
> -
> -SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-$
> {PV}.tar.bz2"
> -SRC_URI[md5sum] = "c28cf45616bfec276879360bc36c6b27"
> -SRC_URI[sha256sum] = "c41d917d6c8a59feb7ccbda51c40a6
> ada824fdd1e9684b52dd48c9530617ddd0"
> -
> -SECTION = "x11/libs"
> -DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
> -
> -EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
> -
> -FILES_${PN} += "${datadir}/X11/xkb"
> -
> -inherit autotools pkgconfig gettext
> -
> -do_install_append () {
> -install -d ${D}${datadir}/X11/xkb/compiled
> -cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
> -}
> diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb
> b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb
> new file mode 100644
> index 000..79fcbd8
> --- /dev/null
> +++ b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb
> @@ -0,0 +1,31 @@
> +SUMMARY = "Keyboard configuration database for X Window"
> +
> +DESCRIPTION = "The non-arch keyboard configuration database for X \
> +Window.  The goal is to provide the consistent, well-structured, \
> +frequently released open source of X keyboard configuration data for X \
> +Window System implementations.  The project is targeted to XKB-based \
> +systems."
> +
> +HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig;
> +BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=
> xkeyboard-config"
> +
> +LICENSE = "MIT & MIT-style"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
> +
> +SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-$
> {PV}.tar.bz2"
> +SRC_URI[md5sum] = "c28cf45616bfec276879360bc36c6b27"
> +SRC_URI[sha256sum] = "c41d917d6c8a59feb7ccbda51c40a6
> ada824fdd1e9684b52dd48c9530617ddd0"
> +
> +SECTION = "x11/libs"
> +DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
> +
> +EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
> +
> +FILES_${PN} += "${datadir}/X11/xkb"
> +
> +inherit autotools pkgconfig gettext
> +
> +do_install_append () {
> +install -d ${D}${datadir}/X11/xkb/compiled
> +cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
> +}
> --
> 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] xkeyboard-config: 2.18 -> 2.19

2016-12-07 Thread root
Upgrade xkeyboard-config from 2.18 to 2.19

Signed-off-by: zhengruoqin 
---
 .../xorg-lib/xkeyboard-config_2.18.bb  | 31 --
 .../xorg-lib/xkeyboard-config_2.19.bb  | 31 ++
 2 files changed, 31 insertions(+), 31 deletions(-)
 delete mode 100644 meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
 create mode 100644 meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb

diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb 
b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
deleted file mode 100644
index 79fcbd8..000
--- a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Keyboard configuration database for X Window"
-
-DESCRIPTION = "The non-arch keyboard configuration database for X \
-Window.  The goal is to provide the consistent, well-structured, \
-frequently released open source of X keyboard configuration data for X \
-Window System implementations.  The project is targeted to XKB-based \
-systems."
-
-HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig;
-BUGTRACKER = 
"https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config;
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
-
-SRC_URI = 
"${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
-SRC_URI[md5sum] = "c28cf45616bfec276879360bc36c6b27"
-SRC_URI[sha256sum] = 
"c41d917d6c8a59feb7ccbda51c40a6ada824fdd1e9684b52dd48c9530617ddd0"
-
-SECTION = "x11/libs"
-DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
-
-EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
-
-FILES_${PN} += "${datadir}/X11/xkb"
-
-inherit autotools pkgconfig gettext
-
-do_install_append () {
-install -d ${D}${datadir}/X11/xkb/compiled
-cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
-}
diff --git a/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb 
b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb
new file mode 100644
index 000..79fcbd8
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.19.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Keyboard configuration database for X Window"
+
+DESCRIPTION = "The non-arch keyboard configuration database for X \
+Window.  The goal is to provide the consistent, well-structured, \
+frequently released open source of X keyboard configuration data for X \
+Window System implementations.  The project is targeted to XKB-based \
+systems."
+
+HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig;
+BUGTRACKER = 
"https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config;
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
+
+SRC_URI = 
"${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
+SRC_URI[md5sum] = "c28cf45616bfec276879360bc36c6b27"
+SRC_URI[sha256sum] = 
"c41d917d6c8a59feb7ccbda51c40a6ada824fdd1e9684b52dd48c9530617ddd0"
+
+SECTION = "x11/libs"
+DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
+
+EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
+
+FILES_${PN} += "${datadir}/X11/xkb"
+
+inherit autotools pkgconfig gettext
+
+do_install_append () {
+install -d ${D}${datadir}/X11/xkb/compiled
+cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
+}
-- 
2.7.4



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


[OE-core] [PATCH v2] cups: 2.1.4 -> 2.2.1

2016-12-07 Thread Huang Qiyu
Upgrade cups from 2.1.4 to 2.2.1.

License checksum changes are not related to license changes.

Signed-off-by: Huang Qiyu 
---
 meta/recipes-extended/cups/cups.inc  | 2 +-
 meta/recipes-extended/cups/cups_2.1.4.bb | 6 --
 meta/recipes-extended/cups/cups_2.2.1.bb | 6 ++
 3 files changed, 7 insertions(+), 7 deletions(-)
 delete mode 100644 meta/recipes-extended/cups/cups_2.1.4.bb
 create mode 100644 meta/recipes-extended/cups/cups_2.2.1.bb

diff --git a/meta/recipes-extended/cups/cups.inc 
b/meta/recipes-extended/cups/cups.inc
index 02b6358..e18980b 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -3,7 +3,7 @@ SECTION = "console/utils"
 LICENSE = "GPLv2 & LGPLv2"
 DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb"
 
-SRC_URI = 
"https://github.com/apple/cups/releases/download/release-${PV}/${BP}-source.tar.gz
 \
+SRC_URI = 
"https://github.com/apple/cups/releases/download/v${PV}/${BP}-source.tar.gz \
file://use_echo_only_in_init.patch \
file://0001-don-t-try-to-run-generated-binaries.patch \
file://cups_serverbin.patch \
diff --git a/meta/recipes-extended/cups/cups_2.1.4.bb 
b/meta/recipes-extended/cups/cups_2.1.4.bb
deleted file mode 100644
index 0fab806..000
--- a/meta/recipes-extended/cups/cups_2.1.4.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require cups.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0"
-
-SRC_URI[md5sum] = "9f9bf6e3b9c20a3519b4dc409666d6e7"
-SRC_URI[sha256sum] = 
"4b14fd833180ac529ebebea766a09094c2568bf8426e219cb3a1715304ef728d"
diff --git a/meta/recipes-extended/cups/cups_2.2.1.bb 
b/meta/recipes-extended/cups/cups_2.2.1.bb
new file mode 100644
index 000..7c5e776
--- /dev/null
+++ b/meta/recipes-extended/cups/cups_2.2.1.bb
@@ -0,0 +1,6 @@
+require cups.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f212b4338db0da8cb892e94bf2949460"
+
+SRC_URI[md5sum] = "a94da2a1e9dbdccb4f3836a38a431931"
+SRC_URI[sha256sum] = 
"83b8730aa977cc055e7410df6a3a682548994c113994ca630a16513017e419d5"
-- 
2.7.4



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


[OE-core] [PATCH] cups: 2.1.4 -> 2.2.1

2016-12-07 Thread Huang Qiyu
Upgrade cups from 2.1.4 to 2.1.1.

License checksum changes are not related to license changes.

Signed-off-by: Huang Qiyu 
---
 meta/recipes-extended/cups/cups.inc  | 2 +-
 meta/recipes-extended/cups/cups_2.1.4.bb | 6 --
 meta/recipes-extended/cups/cups_2.2.1.bb | 6 ++
 3 files changed, 7 insertions(+), 7 deletions(-)
 delete mode 100644 meta/recipes-extended/cups/cups_2.1.4.bb
 create mode 100644 meta/recipes-extended/cups/cups_2.2.1.bb

diff --git a/meta/recipes-extended/cups/cups.inc 
b/meta/recipes-extended/cups/cups.inc
index 02b6358..e18980b 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -3,7 +3,7 @@ SECTION = "console/utils"
 LICENSE = "GPLv2 & LGPLv2"
 DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb"
 
-SRC_URI = 
"https://github.com/apple/cups/releases/download/release-${PV}/${BP}-source.tar.gz
 \
+SRC_URI = 
"https://github.com/apple/cups/releases/download/v${PV}/${BP}-source.tar.gz \
file://use_echo_only_in_init.patch \
file://0001-don-t-try-to-run-generated-binaries.patch \
file://cups_serverbin.patch \
diff --git a/meta/recipes-extended/cups/cups_2.1.4.bb 
b/meta/recipes-extended/cups/cups_2.1.4.bb
deleted file mode 100644
index 0fab806..000
--- a/meta/recipes-extended/cups/cups_2.1.4.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require cups.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0"
-
-SRC_URI[md5sum] = "9f9bf6e3b9c20a3519b4dc409666d6e7"
-SRC_URI[sha256sum] = 
"4b14fd833180ac529ebebea766a09094c2568bf8426e219cb3a1715304ef728d"
diff --git a/meta/recipes-extended/cups/cups_2.2.1.bb 
b/meta/recipes-extended/cups/cups_2.2.1.bb
new file mode 100644
index 000..7c5e776
--- /dev/null
+++ b/meta/recipes-extended/cups/cups_2.2.1.bb
@@ -0,0 +1,6 @@
+require cups.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f212b4338db0da8cb892e94bf2949460"
+
+SRC_URI[md5sum] = "a94da2a1e9dbdccb4f3836a38a431931"
+SRC_URI[sha256sum] = 
"83b8730aa977cc055e7410df6a3a682548994c113994ca630a16513017e419d5"
-- 
2.7.4



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


Re: [OE-core] [PATCH] kern-tools: update to avoid kernel_metadata failures

2016-12-07 Thread Burton, Ross
Bruce already sent this, and it's in staging now.

Ross

On 7 December 2016 at 09:50, Awais Belal  wrote:

> Update kernel native tools to avoid do_kernel_metadata
> failures. This is mainly to bring in
> https://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/commit/?id=
> a287da4bfe0b4acb8f2b0627bd8e7abd1a1dde26
> but we should pick up whatever enhancements are currently
> available. Without this builds with no specific metadata
> branches fail.
>
> Signed-off-by: Awais Belal 
> ---
>  meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> index 88b1aee..0f8a786 100644
> --- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> +++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
> @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;
> beginline=5;endline=9;md5=a6c2fa8aef1b
>
>  DEPENDS = "git-native"
>
> -SRCREV = "b36f6f9a5695f2084b83823393e13ca42284bed9"
> +SRCREV = "bd9e1d6c9b0a34ff3e19a06999aaf57ffadfd04c"
>  PR = "r12"
>  PV = "0.2+git${SRCPV}"
>
> --
> 1.9.1
>
> --
> ___
> 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 v2] less: 481 -> 487

2016-12-07 Thread Huang Qiyu
Upgrade less from 481 to 487.

License checksum changes are not related to license changes.

Signed-off-by: Huang Qiyu 
---
 meta/recipes-extended/less/{less_481.bb => less_487.bb} | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-extended/less/{less_481.bb => less_487.bb} (83%)

diff --git a/meta/recipes-extended/less/less_481.bb 
b/meta/recipes-extended/less/less_487.bb
similarity index 83%
rename from meta/recipes-extended/less/less_481.bb
rename to meta/recipes-extended/less/less_487.bb
index 0fcd819..23ae484 100644
--- a/meta/recipes-extended/less/less_481.bb
+++ b/meta/recipes-extended/less/less_487.bb
@@ -21,14 +21,14 @@ SECTION = "console/utils"
 
 LICENSE = "GPLv3+ | BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-file://LICENSE;md5=48c26a307f91af700e1f00585f215aaf"
+file://LICENSE;md5=2ef3e4b8dafc85612bc5254b8081e234"
 DEPENDS = "ncurses"
 
 SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
  "
 
-SRC_URI[md5sum] = "50ef46065c65257141a7340123527767"
-SRC_URI[sha256sum] = 
"3fa38f2cf5e9e040bb44fffaa6c76a84506e379e47f5a04686ab78102090dda5"
+SRC_URI[md5sum] = "dcc8bf183a83b362d37fe9ef8df1fb60"
+SRC_URI[sha256sum] = 
"f3dc8455cb0b2b66e0c6b816c00197a71bf6d1787078adeee0bcf2aea4b12706"
 
 UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html;
 
-- 
2.7.4



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


[OE-core] [PATCH] kern-tools: update to avoid kernel_metadata failures

2016-12-07 Thread Awais Belal
Update kernel native tools to avoid do_kernel_metadata
failures. This is mainly to bring in
https://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/commit/?id=a287da4bfe0b4acb8f2b0627bd8e7abd1a1dde26
but we should pick up whatever enhancements are currently
available. Without this builds with no specific metadata
branches fail.

Signed-off-by: Awais Belal 
---
 meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb 
b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 88b1aee..0f8a786 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = 
"file://git/tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1b
 
 DEPENDS = "git-native"
 
-SRCREV = "b36f6f9a5695f2084b83823393e13ca42284bed9"
+SRCREV = "bd9e1d6c9b0a34ff3e19a06999aaf57ffadfd04c"
 PR = "r12"
 PV = "0.2+git${SRCPV}"
 
-- 
1.9.1

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


[OE-core] [PATCH] pciutils: 3.5.1 -> 3.5.2

2016-12-07 Thread Huang Qiyu
Upgrade pciutils from 3.5.1 to 3.5.2.

Signed-off-by: Huang Qiyu 
---
 meta/recipes-bsp/pciutils/{pciutils_3.5.1.bb => pciutils_3.5.2.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-bsp/pciutils/{pciutils_3.5.1.bb => pciutils_3.5.2.bb} (92%)

diff --git a/meta/recipes-bsp/pciutils/pciutils_3.5.1.bb 
b/meta/recipes-bsp/pciutils/pciutils_3.5.2.bb
similarity index 92%
rename from meta/recipes-bsp/pciutils/pciutils_3.5.1.bb
rename to meta/recipes-bsp/pciutils/pciutils_3.5.2.bb
index d32b119..9a7297e 100644
--- a/meta/recipes-bsp/pciutils/pciutils_3.5.1.bb
+++ b/meta/recipes-bsp/pciutils/pciutils_3.5.2.bb
@@ -13,8 +13,8 @@ SRC_URI = 
"${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
file://guess-fix.patch \
file://makefile.patch"
 
-SRC_URI[md5sum] = "0879a8f7ac51f4e874cfc6b3521a13cc"
-SRC_URI[sha256sum] = 
"2bf3a4605a562fb6b8b7673bff85a474a5cf383ed7e4bd8886b4f0939013d42f"
+SRC_URI[md5sum] = "1bf5b068bd9f7512e8c68b060b25a1b2"
+SRC_URI[sha256sum] = 
"3a99141a9f40528d0a0035665a06dc37ddb1ae341658e51b50a76ecf86235efc"
 
 inherit multilib_header
 
-- 
2.7.4



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


[OE-core] [PATCH v2] dhcp: 4.3.4 -> 4.3.5

2016-12-07 Thread Huang Qiyu
Upgrade dhcp from 4.3.4 to 4.3.5.

Signed-off-by: Huang Qiyu 
---
 meta/recipes-connectivity/dhcp/{dhcp_4.3.4.bb => dhcp_4.3.5.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-connectivity/dhcp/{dhcp_4.3.4.bb => dhcp_4.3.5.bb} (81%)

diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb 
b/meta/recipes-connectivity/dhcp/dhcp_4.3.5.bb
similarity index 81%
rename from meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb
rename to meta/recipes-connectivity/dhcp/dhcp_4.3.5.bb
index 4151eb1..678c29a 100644
--- a/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.3.5.bb
@@ -11,8 +11,8 @@ SRC_URI += 
"file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
 file://remove-dhclient-script-bash-dependency.patch \
"
 
-SRC_URI[md5sum] = "0138319fe2b788cf4bdf34fbeaf9ff54"
-SRC_URI[sha256sum] = 
"f5115aee3dd3e6925de4ba47b80ab732ba48b481c8364b6ebade2d43698d607e"
+SRC_URI[md5sum] = "2b5e5b2fa31c2e27e487039d86f83d3f"
+SRC_URI[sha256sum] = 
"eb95936bf15d2393c55dd505bc527d1d4408289cec5a9fa8abb99f7577e7f954"
 
 PACKAGECONFIG ?= ""
 PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2"
-- 
2.7.4



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


[OE-core] [PATCH 2/3] tiff: Security fix CVE-2016-9538

2016-12-07 Thread mingli.yu
From: Mingli Yu 

* tools/tiffcrop.c: fix read of undefined buffer in
readContigStripsIntoBuffer() due to uint16 overflow.

External References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-9538

Patch from:
https://github.com/vadz/libtiff/commit/43c0b81a818640429317c80fea1e66771e85024b#diff-c8b4b355f9b5c06d585b23138e1c185f

Signed-off-by: Mingli Yu 
---
 .../libtiff/files/CVE-2016-9538.patch  | 67 ++
 meta/recipes-multimedia/libtiff/tiff_4.0.6.bb  |  1 +
 2 files changed, 68 insertions(+)
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9538.patch

diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2016-9538.patch 
b/meta/recipes-multimedia/libtiff/files/CVE-2016-9538.patch
new file mode 100644
index 000..e1141df
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/CVE-2016-9538.patch
@@ -0,0 +1,67 @@
+From 43c0b81a818640429317c80fea1e66771e85024b Mon Sep 17 00:00:00 2001
+From: erouault 
+Date: Sat, 8 Oct 2016 15:04:31 +
+Subject: [PATCH] Fix CVE-2016-9538
+* tools/tiffcp.c: fix read of undefined variable in case of
+ missing required tags. Found on test case of MSVR 35100. * tools/tiffcrop.c:
+ fix read of undefined buffer in readContigStripsIntoBuffer() due to uint16
+ overflow. Probably not a security issue but I can be wrong. Reported as MSVR
+ 35100 by Axel Souchet from the MSRC Vulnerabilities & Mitigations team.
+
+CVE: CVE-2016-9538
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/43c0b81a818640429317c80fea1e66771e85024b#diff-c8b4b355f9b5c06d585b23138e1c185f
+
+Signed-off-by: Mingli Yu 
+
+---
+ tools/tiffcp.c   | 4 ++--
+ tools/tiffcrop.c | 9 ++---
+ 2 files changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/tools/tiffcp.c b/tools/tiffcp.c
+index ba2b715..4ad74d3 100644
+--- a/tools/tiffcp.c
 b/tools/tiffcp.c
+@@ -592,8 +592,8 @@ static copyFunc pickCopyFunc(TIFF*, TIFF*, uint16, 
uint16);
+ static int
+ tiffcp(TIFF* in, TIFF* out)
+ {
+-  uint16 bitspersample, samplesperpixel;
+-  uint16 input_compression, input_photometric;
++  uint16 bitspersample, samplesperpixel = 1;
++  uint16 input_compression, input_photometric = PHOTOMETRIC_MINISBLACK;
+   copyFunc cf;
+   uint32 width, length;
+   struct cpTag* p;
+diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
+index 7685566..eb6de77 100644
+--- a/tools/tiffcrop.c
 b/tools/tiffcrop.c
+@@ -3628,7 +3628,7 @@ static int readContigStripsIntoBuffer (TIFF* in, uint8* 
buf)
+ {
+ uint8* bufp = buf;
+ int32  bytes_read = 0;
+-uint16 strip, nstrips   = TIFFNumberOfStrips(in);
++uint32 strip, nstrips   = TIFFNumberOfStrips(in);
+ uint32 stripsize = TIFFStripSize(in);
+ uint32 rows = 0;
+ uint32 rps = TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, );
+@@ -4711,9 +4711,12 @@ static int readSeparateStripsIntoBuffer (TIFF *in, 
uint8 *obuf, uint32 length,
+  uint32 width, uint16 spp,
+  struct dump_opts *dump)
+   {
+-  int i, j, bytes_per_sample, bytes_per_pixel, shift_width, result = 1;
++  int i, bytes_per_sample, bytes_per_pixel, shift_width, result = 1;
++  uint32 j;
+   int32  bytes_read = 0;
+-  uint16 bps, nstrips, planar, strips_per_sample;
++  uint16 bps, planar;
++  uint32 nstrips;
++  uint32 strips_per_sample;
+   uint32 src_rowsize, dst_rowsize, rows_processed, rps;
+   uint32 rows_this_strip = 0;
+   tsample_t s;
+-- 
+2.9.3
+
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb 
b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
index 7b5dd9c..8521fd7 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
@@ -21,6 +21,7 @@ SRC_URI = 
"http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
file://CVE-2016-9539.patch \
file://CVE-2016-9535-1.patch \
file://CVE-2016-9535-2.patch \
+   file://CVE-2016-9538.patch \
   "
 
 SRC_URI[md5sum] = "d1d2e940dea0b5ad435f21f03d96dd72"
-- 
2.8.1

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


[OE-core] [PATCH 3/3] tiff: Fix several CVE issues

2016-12-07 Thread mingli.yu
From: Mingli Yu 

Fix CVE-2016-9533, CVE-2016-9534, CVE-2016-9536 and
CVE-2016-9537

External References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-9533
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-9534
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-9536
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-9537

Patch from:
https://github.com/vadz/libtiff/commit/83a4b92815ea04969d494416eaae3d4c6b338e4a#diff-c8b4b355f9b5c06d585b23138e1c185f

Signed-off-by: Mingli Yu 
---
 .../libtiff/files/Fix_several_CVE_issues.patch | 281 +
 meta/recipes-multimedia/libtiff/tiff_4.0.6.bb  |   1 +
 2 files changed, 282 insertions(+)
 create mode 100644 
meta/recipes-multimedia/libtiff/files/Fix_several_CVE_issues.patch

diff --git a/meta/recipes-multimedia/libtiff/files/Fix_several_CVE_issues.patch 
b/meta/recipes-multimedia/libtiff/files/Fix_several_CVE_issues.patch
new file mode 100644
index 000..bd587e6
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/Fix_several_CVE_issues.patch
@@ -0,0 +1,281 @@
+From 83a4b92815ea04969d494416eaae3d4c6b338e4a Mon Sep 17 00:00:00 2001
+From: erouault 
+Date: Fri, 23 Sep 2016 22:12:18 +
+Subject: [PATCH] Fix several CVE issues
+
+Fix CVE-2016-9533, CVE-2016-9534, CVE-2016-9536 and CVE-2016-9537
+
+* tools/tiffcrop.c: fix various out-of-bounds write
+ vulnerabilities in heap or stack allocated buffers. Reported as MSVR 35093,
+ MSVR 35096 and MSVR 35097. Discovered by Axel Souchet and Vishal Chauhan from
+ the MSRC Vulnerabilities & Mitigations team. * tools/tiff2pdf.c: fix
+ out-of-bounds write vulnerabilities in heap allocate buffer in
+ t2p_process_jpeg_strip(). Reported as MSVR 35098. Discovered by Axel Souchet
+ and Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. *
+ libtiff/tif_pixarlog.c: fix out-of-bounds write vulnerabilities in heap
+ allocated buffers. Reported as MSVR 35094. Discovered by Axel Souchet and
+ Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team. *
+ libtiff/tif_write.c: fix issue in error code path of TIFFFlushData1() that
+ didn't reset the tif_rawcc and tif_rawcp members. I'm not completely sure if
+ that could happen in practice outside of the odd behaviour of t2p_seekproc()
+ of tiff2pdf). The report points that a better fix could be to check the
+ return value of TIFFFlushData1() in places where it isn't done currently, but
+ it seems this patch is enough. Reported as MSVR 35095. Discovered by Axel
+ Souchet & Vishal Chauhan & Suha Can from the MSRC Vulnerabilities &
+ Mitigations team.
+
+CVE: CVE-2016-9533, CVE-2016-9534, CVE-2016-9536, CVE-2016-9537
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/83a4b92815ea04969d494416eaae3d4c6b338e4a#diff-bdc795f6afeb9558c1012b3cfae729ef
+
+Signed-off-by: Mingli Yu 
+
+---
+ libtiff/tif_pixarlog.c | 55 +-
+ libtiff/tif_write.c|  7 +++
+ tools/tiff2pdf.c   | 22 ++--
+ tools/tiffcrop.c   | 20 +-
+ 4 files changed, 92 insertions(+), 35 deletions(-)
+
+diff --git a/libtiff/tif_pixarlog.c b/libtiff/tif_pixarlog.c
+index 1fb8f3b..d1246c3 100644
+--- a/libtiff/tif_pixarlog.c
 b/libtiff/tif_pixarlog.c
+@@ -983,17 +983,14 @@ horizontalDifferenceF(float *ip, int n, int stride, 
uint16 *wp, uint16 *FromLT2)
+   a1 = (int32) CLAMP(ip[3]); wp[3] = (uint16)((a1-a2) & mask); a2 
= a1;
+   }
+   } else {
+-  ip += n - 1;/* point to last one */
+-  wp += n - 1;/* point to last one */
+-  n -= stride;
+-  while (n > 0) {
+-  REPEAT(stride, wp[0] = (uint16) CLAMP(ip[0]);
+-  wp[stride] -= wp[0];
+-  wp[stride] &= mask;
+-  wp--; ip--)
+-  n -= stride;
+-  }
+-  REPEAT(stride, wp[0] = (uint16) CLAMP(ip[0]); wp--; ip--)
++REPEAT(stride, wp[0] = (uint16) CLAMP(ip[0]); wp++; ip++)
++n -= stride;
++while (n > 0) {
++REPEAT(stride,
++wp[0] = 
(uint16)(((int32)CLAMP(ip[0])-(int32)CLAMP(ip[-stride])) & mask);
++wp++; ip++)
++n -= stride;
++}
+   }
+ }
+ }
+@@ -1036,17 +1033,14 @@ horizontalDifference16(unsigned short *ip, int n, int 
stride,
+   a1 = CLAMP(ip[3]); wp[3] = (uint16)((a1-a2) & mask); a2 = a1;
+   }
+   } else {
+-  ip += n - 1;/* point to last one */
+-  wp += n - 1;/* point to last one */
++REPEAT(stride, wp[0] = CLAMP(ip[0]); wp++; ip++)
+   n -= stride;
+   while (n > 0) {
+-  REPEAT(stride, wp[0] = CLAMP(ip[0]);
+-  wp[stride] -= wp[0];
+-  wp[stride] &= mask;
+-  

[OE-core] [PATCH 1/3] tiff: Security fix CVE-2016-9535

2016-12-07 Thread mingli.yu
From: Mingli Yu 

* libtiff/tif_predict.h, libtiff/tif_predict.c:
Replace assertions by runtime checks to avoid assertions in debug mode,
or buffer overflows in release mode. Can happen when dealing with
unusual tile size like YCbCr with subsampling.

External References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-9535

Patch from:
https://github.com/vadz/libtiff/commit/3ca657a8793dd011bf869695d72ad31c779c3cc1
https://github.com/vadz/libtiff/commit/6a984bf7905c6621281588431f384e79d11a2e33

Signed-off-by: Mingli Yu 
---
 .../libtiff/files/CVE-2016-9535-1.patch| 423 +
 .../libtiff/files/CVE-2016-9535-2.patch|  67 
 meta/recipes-multimedia/libtiff/tiff_4.0.6.bb  |   2 +
 3 files changed, 492 insertions(+)
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9535-1.patch
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9535-2.patch

diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2016-9535-1.patch 
b/meta/recipes-multimedia/libtiff/files/CVE-2016-9535-1.patch
new file mode 100644
index 000..26fd0df
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/CVE-2016-9535-1.patch
@@ -0,0 +1,423 @@
+From 3ca657a8793dd011bf869695d72ad31c779c3cc1 Mon Sep 17 00:00:00 2001
+From: erouault 
+Date: Mon, 31 Oct 2016 17:24:26 +
+Subject: [PATCH 1/2] Fix CVE-2016-9535
+
+* libtiff/tif_predict.h, libtiff/tif_predict.c: Replace
+ assertions by runtime checks to avoid assertions in debug mode, or buffer
+ overflows in release mode. Can happen when dealing with unusual tile size
+ like YCbCr with subsampling. Reported as MSVR 35105 by Axel Souchet   &
+ Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.
+
+CVE: CVE-2016-9535
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/3ca657a8793dd011bf869695d72ad31c779c3cc1
+
+Signed-off-by: Mingli Yu 
+
+---
+ libtiff/tif_predict.c | 153 +++---
+ libtiff/tif_predict.h |   6 +-
+ 2 files changed, 121 insertions(+), 47 deletions(-)
+
+diff --git a/libtiff/tif_predict.c b/libtiff/tif_predict.c
+index 555f2f9..b829259 100644
+--- a/libtiff/tif_predict.c
 b/libtiff/tif_predict.c
+@@ -34,18 +34,18 @@
+ 
+ #define   PredictorState(tif) ((TIFFPredictorState*) (tif)->tif_data)
+ 
+-static void horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc);
+-static void horAcc16(TIFF* tif, uint8* cp0, tmsize_t cc);
+-static void horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc);
+-static void swabHorAcc16(TIFF* tif, uint8* cp0, tmsize_t cc);
+-static void swabHorAcc32(TIFF* tif, uint8* cp0, tmsize_t cc);
+-static void horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc);
+-static void horDiff16(TIFF* tif, uint8* cp0, tmsize_t cc);
+-static void horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc);
+-static void swabHorDiff16(TIFF* tif, uint8* cp0, tmsize_t cc);
+-static void swabHorDiff32(TIFF* tif, uint8* cp0, tmsize_t cc);
+-static void fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc);
+-static void fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc);
++static int horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc);
++static int horAcc16(TIFF* tif, uint8* cp0, tmsize_t cc);
++static int horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc);
++static int swabHorAcc16(TIFF* tif, uint8* cp0, tmsize_t cc);
++static int swabHorAcc32(TIFF* tif, uint8* cp0, tmsize_t cc);
++static int horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc);
++static int horDiff16(TIFF* tif, uint8* cp0, tmsize_t cc);
++static int horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc);
++static int swabHorDiff16(TIFF* tif, uint8* cp0, tmsize_t cc);
++static int swabHorDiff32(TIFF* tif, uint8* cp0, tmsize_t cc);
++static int fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc);
++static int fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc);
+ static int PredictorDecodeRow(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s);
+ static int PredictorDecodeTile(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 
s);
+ static int PredictorEncodeRow(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s);
+@@ -273,13 +273,19 @@ PredictorSetupEncode(TIFF* tif)
+ /* - when storing into the byte stream, we explicitly mask with 0xff so */
+ /*   as to make icc -check=conversions happy (not necessary by the standard) 
*/
+ 
+-static void
++static int
+ horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc)
+ {
+   tmsize_t stride = PredictorState(tif)->stride;
+ 
+   unsigned char* cp = (unsigned char*) cp0;
+-  assert((cc%stride)==0);
++if((cc%stride)!=0)
++{
++TIFFErrorExt(tif->tif_clientdata, "horAcc8",
++ "%s", "(cc%stride)!=0");
++return 0;
++}
++
+   if (cc > stride) {
+   /*
+* Pipeline the most common cases.
+@@ -321,26 +327,32 @@ horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc)
+   } while (cc>0);
+   }
+   }
++  return 1;
+ }
+ 
+-static void
++static int
+ 

[OE-core] tiff: fix several tiff CVE issues

2016-12-07 Thread mingli.yu
These commits fix several tiff CVE issues:
CVE-2016-9533, CVE-2016-9534, CVE-2016-9535,
CVE-2016-9536, CVE-2016-9537 and CVE-2016-9538

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