[OE-core] [PATCH 0/2] archiver.bbclass: fix some errors for do_ar_original and do_ar_recipe

2016-12-06 Thread Dengke Du
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.openembedded.org/openembedded-core-contrib 
ddk/fix-some-error-for-archiver-bbclass
  
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ddk/fix-some-error-for-archiver-bbclass

Dengke Du (2):
  archiver.bbclass: fix do_ar_original error for matchbox-desktop
  archiver.bbclass: fix do_ar_recipe error for bonnie++ and
libsigc++-2.0

 meta/classes/archiver.bbclass | 21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

-- 
2.7.4

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


[OE-core] [PATCH 2/2] archiver.bbclass: fix do_ar_recipe error for bonnie++ and libsigc++-2.0

2016-12-06 Thread Dengke Du
When recipes name contains regular expression special characters, such as "++",
in this case, the re.compile function in do_ar_recipe can't recognize it, so we
should associate with re.escape to recognize the special characters in pattern.

Signed-off-by: Dengke Du 
---
 meta/classes/archiver.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index fe8877b..7d89e44 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -359,8 +359,9 @@ python do_ar_recipe () {
 bbappend_files = d.getVar('BBINCLUDED', True).split()
 # If recipe name is aa, we need to match files like aa.bbappend and 
aa_1.1.bbappend
 # Files like aa1.bbappend or aa1_1.1.bbappend must be excluded.
-bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" %pn)
-bbappend_re1 = re.compile( r".*/%s\.bbappend$" %pn)
+# If the "pn" contains regular expression special characters, we should 
use re.escape to recognize it.
+bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" % re.escape(pn))
+bbappend_re1 = re.compile( r".*/%s\.bbappend$" % re.escape(pn))
 for file in bbappend_files:
 if bbappend_re.match(file) or bbappend_re1.match(file):
 shutil.copy(file, outdir)
-- 
2.7.4

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


[OE-core] [PATCH 1/2] archiver.bbclass: fix do_ar_original error for matchbox-desktop

2016-12-06 Thread Dengke Du
Error:
~~~
ERROR: matchbox-desktop-2.1-r0 do_ar_original: Can not determine archive names
for original source because 'name' URL parameter is unset in more than one URL.
Add it to at least one of these: git://git.yoctoproject.org/matchbox-desktop-2
file://vfolders/%2A

ERROR: matchbox-desktop-2.1-r0 do_ar_original: Function failed: do_ar_original
~~~

In function do_ar_original, when recipes have more than one source, it added the
"name" URL parameter as suffix to identify the created tarball.

But the URL type "file://" that we always used to represent a series of patches,
it didn't have "name" parameter, so it failed.

So set "name" to the folder name to identify the created tarball, for example:

In matchbox-desktop bb file, the SRC_URI contains:

file://vfloders/*

We set "name" to "vfolders" to identify the created tarball.

In connman-gnome bb file, the SRC_URI contains:

file://images/*

We set "name" to "images" to identify the created tarball.

Signed-off-by: Dengke Du 
---
 meta/classes/archiver.bbclass | 16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 9239983..fe8877b 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -166,12 +166,18 @@ python do_ar_original() {
 # to be set when using the git fetcher, otherwise SRCREV cannot
 # be set separately for each URL.
 params = bb.fetch2.decodeurl(url)[5]
+type = bb.fetch2.decodeurl(url)[0]
+location = bb.fetch2.decodeurl(url)[2]
 name = params.get('name', '')
-if name in tarball_suffix:
-if not name:
-bb.fatal("Cannot determine archive names for original 
source because 'name' URL parameter is unset in more than one URL. Add it to at 
least one of these: %s %s" % (tarball_suffix[name], url))
-else:
-bb.fatal("Cannot determine archive names for original 
source because 'name=' URL parameter '%s' is used twice. Make it unique in: %s 
%s" % (tarball_suffix[name], url))
+if type.lower() == 'file':
+name_tmp = location.rstrip("*").rstrip("/")
+name = os.path.basename(name_tmp)
+else:
+if name in tarball_suffix:
+if not name:
+bb.fatal("Cannot determine archive names for original 
source because 'name' URL parameter is unset in more than one URL. Add it to at 
least one of these: %s %s" % (tarball_suffix[name], url))
+else:
+bb.fatal("Cannot determine archive names for original 
source because 'name=' URL parameter '%s' is used twice. Make it unique in: %s 
%s" % (tarball_suffix[name], url))
 tarball_suffix[name] = url
 create_tarball(d, tmpdir + '/.', name, ar_outdir)
 
-- 
2.7.4

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


[OE-core] [PATCH 0/1] libarchive: fix ALTERNATIVE_PRIORITY to avoid conflict

2016-12-06 Thread Chen Qi
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 
ChenQi/libarchive-priority
  
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/libarchive-priority

Chen Qi (1):
  libarchive: fix ALTERNATIVE_PRIORITY to avoid conflict

 meta/recipes-extended/libarchive/libarchive_3.2.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1

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


[OE-core] [PATCH 1/1] libarchive: fix ALTERNATIVE_PRIORITY to avoid conflict

2016-12-06 Thread Chen Qi
'tar' utility from tar and bsdtar has the same alternative priority.
'cpio' utility from cpio and bsdcpio has the same alternative priority.

Lower the ALTERNATIVE_PRIORITY to avoid conflict.

Signed-off-by: Chen Qi 
---
 meta/recipes-extended/libarchive/libarchive_3.2.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/libarchive/libarchive_3.2.2.bb 
b/meta/recipes-extended/libarchive/libarchive_3.2.2.bb
index cf66e9d..7917ce7 100644
--- a/meta/recipes-extended/libarchive/libarchive_3.2.2.bb
+++ b/meta/recipes-extended/libarchive/libarchive_3.2.2.bb
@@ -48,7 +48,7 @@ do_configure_prepend() {
cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
 }
 
-ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_PRIORITY = "80"
 
 PACKAGES =+ "bsdtar"
 FILES_bsdtar = "${bindir}/bsdtar"
-- 
1.9.1

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


Re: [OE-core] [PATCH 28/33] dpkg: update packages and files to match Debian more closely

2016-12-06 Thread Andreas Oberritter
On 06.12.2016 21:13, Burton, Ross wrote:
> 
> On 6 December 2016 at 11:49, Andreas Oberritter  > wrote:
> 
> +RRECOMMENDS_dpkg-perl = "gnupg gpgv"
> 
> 
> With plain master this causes a build failure:
> 
> ERROR: Multiple versions of gnupg are due to be built
> (/home/ross/Yocto/poky/meta/recipes-support/gnupg/gnupg_2.1.14.bb
> 
> /home/ross/Yocto/poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb
> ). Only one version of a given PN should be built
> in any given build. You likely need to set PREFERRED_VERSION_gnupg to
> select the correct version or don't depend on multiple versions.
> 
> As gnupg 1.4.7 provides gpgv, but 2.1.14 doesn't.
> 
> No idea where 2.1.14 should, what gpgv is, or what the solution is, as
> it's late and I'm going to crash on the sofa. :)

Version 1.4.7 splits-out gpgv to its own package. It can be used to
verify signatures, but can't encrypt or sign anything. I'm using it in
an initramfs for its small size, unrelated to dpkg though.

I didn't notice this, because I have PREFERRED_VERSION_gnupg set to
1.4.7, which however RDEPENDS on gpgv, so the obvious fix is:

RRECOMMENDS_dpkg-perl = "gnupg"

I don't remember where it came from, maybe I took it from Debian.

Thank you for your review! I'm going to update my branch now (obi/deb on
openembedded-core-contrib) with all your comments addressed, hopefully.
Do you want me to submit v2 to the mailing list, too?

Regards,
Andreas

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


Re: [OE-core] [PATCH 02/33] dpkg: update-alternatives-dpkg should conflict with other providers

2016-12-06 Thread Andreas Oberritter
On 06.12.2016 20:52, Burton, Ross wrote:
> This needs more than just RCONFLICTS:
> 
> ERROR: dpkg-native-1.18.7-r0 do_populate_sysroot: The recipe dpkg-native
> is trying to install files into a shared area when those files already
> exist. Those files and their manifest location are:
>  
>  /data/poky-master/tmp-glibc/sysroots/x86_64-linux/usr/bin/update-alternatives
> 
> I have both package_deb and package_rpm enabled, and have a build from
> master before trying your branch.

I'm going to address this in "dpkg: implement offline mode for update-
alternatives" with the following additions:

+PROVIDES = "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 
'virtual/update-alternatives', '', d)}"

[...]

+UA = "update-alternatives"
+UA_native = "${@['', 
'update-alternatives'][d.getVar('PREFERRED_PROVIDER_virtual/update-alternatives-native',
 True) == 'dpkg-native']}"
+
+PACKAGECONFIG ??= "${UA}"
+PACKAGECONFIG[update-alternatives] = 
"--enable-update-alternatives,--disable-update-alternatives"

Because update-alternative-dpkg and update-alternatives-opkg are using
incompatible databases, I don't think there are much better ways to
avoid this conflict.

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


Re: [OE-core] [PATCH 21/33] package_manager/deb: create Packages.xz

2016-12-06 Thread Andreas Oberritter
On 06.12.2016 19:46, Burton, Ross wrote:
> 
> On 6 December 2016 at 18:41, Andreas Oberritter  > wrote:
> 
> That's a good question. I guess I didn't add anything, because there's
> no direct dependency in place for gzip-native either.
> 
> I don't know if it counts, but there's a dependency on apt-native and
> apt's source tarball, like many others, is compressed with xz. By
> default, apt also depends on xz because of PACKAGECONFIG = "lzma", but
> that may obviously get changed by users.
> 
> 
> I guess the use of xz to create Packages.xz should depend on xz being
> present, and then package_deb should explicitly add dependencies to the
> relevant tasks (as it does for do_package and do_packageindex already).

I'd prefer to be deterministic and cause an error if xz is not available
for whatever reason. I'm going to add the necessary dependency to all
callers of write_index() for deb.

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-06 Thread Paul Barker
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


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

2016-12-06 Thread Randy MacLeod

On 2016-12-06 11:02 AM, Maciej BorzDcki 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).



You could try minicoredumper:

https://linutronix.de/minicoredumper/


   The minicoredumper project provides a program that handles the
   creation of core dump files on Linux. It can produce much smaller
   core dump files by making use of sparse files, compression, and
   allowing the user to configure what parts of the process memory
   image should be dumped.


There's even a slightly out of date meta-oe recipe:

http://cgit.openembedded.org/cgit.cgi/meta-openembedded/tree/meta-oe/recipes-kernel/minicoredumper/minicoredumper_1.0.2.bb?h=master


Oh and Ubuntu uses apport:
  https://wiki.ubuntu.com/Apport

--
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON, 
Canada, K2K 2W5

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


Re: [OE-core] oetest.py construction of pkgmanifest is probably wrong

2016-12-06 Thread Slater, Joseph
Hm, I see this whole thing is being re-written.  Maybe that will fix it.  
Joe

From: Burton, Ross [mailto:ross.bur...@intel.com]
Sent: Tuesday, December 06, 2016 1:52 AM
To: Slater, Joseph
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] oetest.py construction of pkgmanifest is probably wrong


On 6 December 2016 at 02:24, Slater, Joseph 
mailto:joe.sla...@windriver.com>> wrote:
This variable is a dictionary with entries based on package, but for multillib 
a package might exist in only some variants.  Perhaps
each entry should be a dictionary of multilib variants?

Yeah, probably.  Got a patch? :)

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


Re: [OE-core] [PATCH 00/32] OEQA Framework Refactor & Improvements

2016-12-06 Thread Aníbal Limón
On 12/06/2016 03:43 PM, Aníbal Limón wrote:
> This patchset is related to OEQA Framework for details read the RFC send to 
> the
> Openembedded architecture ML.

Architecture thread,

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


> 
> 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/uti

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

2016-12-06 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] [PATCH 28/32] oeqa/sdkext: Adds case and context modules.

2016-12-06 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 = OESDKExtTestContextExecutor._get_sdk_envir

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

2016-12-06 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] [PATCH 25/32] oeqa/sdk/cases: Migrate tests to the new OEQA framework

2016-12-06 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 SDKBuildProject
+from oeqa.sdk.case import OESDKTestCase
+from oeq

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

2016-12-06 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
http://lists.openembedded.org/mailma

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

2016-12-06 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 should provide a way to run a 

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

2016-12-06 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] [PATCH 30/32] oeqa/sdkext/cases: Migrate test case to new OEQA framework

2016-12-06 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   | 14 +
 4 files changed, 36 insertions(+), 31 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"
@@ -74,8 +78,8 @@ class DevtoolTest(oe

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

2016-12-06 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] [PATCH 23/32] oeqa/utils: Move targetbuild to buildproject module

2016-12-06 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
+++ b/meta/lib/oeqa/utils/buildproject.py
@@ -1,4 +1,4 @@
-# Copyright (C) 

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

2016-12-06 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] [PATCH 20/32] oeqa/{runtime, sdk}/files: Move testsdkmakefile from runtime to sdk module

2016-12-06 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] [PATCH 21/32] oeqa/sdk: Add case and context modules for the SDK component

2016-12-06 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, logger)
+
+self.sdk_dir = sdk_dir
+self.sdk_env =

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

2016-12-06 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] [PATCH 15/32] classes/populate_sdk_base: Add write_sdk_test_data to postprocess

2016-12-06 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] [PATCH 14/32] classes/rootfs-postcommands: Add write_image_test_data

2016-12-06 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] [PATCH 19/32] oeqa/sdk: Move test cases inside cases directory

2016-12-06 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] [PATCH 18/32] oeqa: Move common files to oeqa/files instead of runtime only

2016-12-06 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] [PATCH 16/32] oeqa/core: Change name of d to td

2016-12-06 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 load, default: %s" % 
self.defa

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

2016-12-06 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] [PATCH 17/32] oeqa/utils/path: Add remove_safe function

2016-12-06 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] [PATCH 13/32] oe/data: Add export2json function

2016-12-06 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] [PATCH 09/32] scripts/oe-test: Add new oe-test script

2016-12-06 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] [PATCH 08/32] oeqa/core: Add tests for the OEQA framework

2016-12-06 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):
+
+def testAnotherIdGood(self):
+self.assertTrue(True, msg='How is this possible?

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

2016-12-06 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] [PATCH 10/32] oeqa/core/context: Add support of OETestContextExecutor

2016-12-06 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] [PATCH 04/32] oeqa/core/decorator: Add support for OETestDepends

2016-12-06 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] [PATCH 03/32] oeqa/core: Add loader, context and decorator modules

2016-12-06 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)
+if m:
+class_name = "%s.%s" % (case.__cla

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

2016-12-06 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] [PATCH 05/32] oeqa/core/decorator: Add support for OETestID and OETestTag

2016-12-06 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] [PATCH 00/32] OEQA Framework Refactor & Improvements

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

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  |   0
 meta/lib/oeqa/{runtime => }/files/test.py  |   0
 meta/lib/oeqa/oetest.py|  92 +---
 meta

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

2016-12-06 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 kwargs.get('output'):
+kwargs['output'] = os.p

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

2016-12-06 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


Re: [OE-core] [PATCH] run-postinsts: Print message before running deferred postinst scripts

2016-12-06 Thread Haris Okanovic



On 12/05/2016 04:51 PM, Burton, Ross wrote:


On 5 December 2016 at 21:48, Haris Okanovic mailto:haris.okano...@ni.com>> wrote:

Opkg can defer running postinst scripts to first boot, which can take
a while on some systems. The output of `opkg configure` (or whatever pm
is used) is redirected to a file when logging is enabled
(I.e. $POSTINST_LOGGING == 1), making the machine appear hung during
this process. This change simply prints a wait message on the console
to inform the user of this potentially long and silent operation so
that they do not mistakenly reboot their machine.


This isn't opkg specific, all backends can do it.


I wrote a more generic commit message in V2.




Why not simply `tee` the output instead?
Tee might be provided by BusyBox in some distros, which may need to run
update-alternatives in the very postinst scripts being executed by this
process. It's therefore not safe to assume Tee (or any other packaged
util) is available until the configure process finishes.


Are the alternatives not configured at rootfs time, so it should be fine
to run tee?  (as if tee isn't safe, then neither is sed).


`tee` wasn't configured in Fido builds of NI Linux RT -- I.e. 
Busybox.postinst got deferred. I'm not sure if that's the OE default or 
the result of some distro-specific tweaks we made, but I decided not to 
rely on it for that reason. It's possible tee might work on some 
configurations.


I'm not sure why sed is significant. The only non-builtins in 
run-postinsts are update-rc.d, rm, and $pm.




Ross

--
___
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-06 Thread Patrick Ohly
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.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



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


Re: [OE-core] [PATCH 28/33] dpkg: update packages and files to match Debian more closely

2016-12-06 Thread Burton, Ross
On 6 December 2016 at 11:49, Andreas Oberritter 
wrote:

> +RRECOMMENDS_dpkg-perl = "gnupg gpgv"
>

With plain master this causes a build failure:

ERROR: Multiple versions of gnupg are due to be built
(/home/ross/Yocto/poky/meta/recipes-support/gnupg/gnupg_2.1.14.bb
/home/ross/Yocto/poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb). Only one
version of a given PN should be built in any given build. You likely need
to set PREFERRED_VERSION_gnupg to select the correct version or don't
depend on multiple versions.

As gnupg 1.4.7 provides gpgv, but 2.1.14 doesn't.

No idea where 2.1.14 should, what gpgv is, or what the solution is, as it's
late and I'm going to crash on the sofa. :)

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


Re: [OE-core] [PATCH 02/33] dpkg: update-alternatives-dpkg should conflict with other providers

2016-12-06 Thread Burton, Ross
This needs more than just RCONFLICTS:

ERROR: dpkg-native-1.18.7-r0 do_populate_sysroot: The recipe dpkg-native is
trying to install files into a shared area when those files already exist.
Those files and their manifest location are:

 /data/poky-master/tmp-glibc/sysroots/x86_64-linux/usr/bin/update-alternatives

I have both package_deb and package_rpm enabled, and have a build from
master before trying your branch.

Ross

On 6 December 2016 at 11:49, Andreas Oberritter 
wrote:

> Signed-off-by: Andreas Oberritter 
> ---
>  meta/recipes-devtools/dpkg/dpkg.inc | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-devtools/dpkg/dpkg.inc
> b/meta/recipes-devtools/dpkg/dpkg.inc
> index ec0117b..f7d9e77 100644
> --- a/meta/recipes-devtools/dpkg/dpkg.inc
> +++ b/meta/recipes-devtools/dpkg/dpkg.inc
> @@ -63,6 +63,7 @@ do_install_append () {
>  PACKAGES =+ "update-alternatives-dpkg"
>  FILES_update-alternatives-dpkg = "${bindir}/update-alternatives
> ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
>  RPROVIDES_update-alternatives-dpkg = "update-alternatives"
> +RCONFLICTS_update-alternatives-dpkg = "update-alternatives"
>
>  PACKAGES += "${PN}-perl"
>  FILES_${PN}-perl = "${libdir}/perl"
> --
> 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 v2] run-postinsts: Print message before running deferred postinst scripts

2016-12-06 Thread Haris Okanovic
Package managers can defer running postinst scripts to first boot, which
can take a while on some systems. E.g. The output of `opkg configure`
(or whatever pm is used) is redirected to a file when logging is enabled
($POSTINST_LOGGING == 1), making the machine appear hung during this
process. This change simply prints a wait message on the console to
inform the user of this potentially long and silent operation so they do
not mistakenly reboot the machine.

Why not simply `tee` the output instead?

Tee might be provided by BusyBox in some distros, which may need to run
update-alternatives in the very postinst scripts being executed by this
process. It's therefore not safe to assume Tee (or any other packaged
util) is available until the configure process finishes.

Signed-off-by: Haris Okanovic 
---
 meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts 
b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 04ba394..660ddc2 100755
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -46,6 +46,9 @@ if [ -z "$pi_dir" ]; then
exit 0
 fi
 
+echo "Configuring packages on first boot"
+echo " (This may take several minutes. Please do not power off the machine.)"
+
 [ -e #SYSCONFDIR#/default/postinst ] && . #SYSCONFDIR#/default/postinst
 
 if [ "$POSTINST_LOGGING" = "1" ]; then
-- 
2.10.1

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


Re: [OE-core] [PATCH 0/4] kernel-yocto: consolidated pull request

2016-12-06 Thread Trevor Woerner
On Fri 2016-12-02 @ 04:09:21 PM, Bruce Ashfield wrote:
> This pull request is mainly to fix a couple of bugs that were reported
> on the mailing list recently, but it also includes some kernel version
> updates that I *think* I sent previously.

Thanks Bruce, I've tested these and they look good.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] sysstat: fixup pkg_postinst to allow SYSTEMD_AUTO_ENABLE to work

2016-12-06 Thread Mark Asselstine
The logic added to the pkg_postinst in commit 6bf82c26f953 has the
side effect of rendering SYSTEMD_AUTO_ENABLE ineffective. The systemd
service will not be configured as 'enabled' either offline(do_rootfs)
or during first boot. Since the volatiles, as used, in the
pkg_postinst are unused with systemd we can simply skip the
pkg_postinst when not using sysvinit.

Signed-off-by: Mark Asselstine 
---
 meta/recipes-extended/sysstat/sysstat.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/sysstat/sysstat.inc 
b/meta/recipes-extended/sysstat/sysstat.inc
index bb5629d..fce2804 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -42,7 +42,9 @@ do_install() {
sed -i -e 's#@LIBDIR@#${libdir}#g' 
${D}${systemd_unitdir}/system/sysstat.service
 }
 
-pkg_postinst_${PN} () {
+OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 
':sysvinit', '', d)}"
+
+pkg_postinst_${PN}_sysvinit () {
 if [ -n "$D" ]; then
 exit 0
 fi
-- 
2.7.4

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


Re: [OE-core] [PATCH 21/33] package_manager/deb: create Packages.xz

2016-12-06 Thread Burton, Ross
On 6 December 2016 at 18:41, Andreas Oberritter 
wrote:

> That's a good question. I guess I didn't add anything, because there's
> no direct dependency in place for gzip-native either.
>
> I don't know if it counts, but there's a dependency on apt-native and
> apt's source tarball, like many others, is compressed with xz. By
> default, apt also depends on xz because of PACKAGECONFIG = "lzma", but
> that may obviously get changed by users.
>

I guess the use of xz to create Packages.xz should depend on xz being
present, and then package_deb should explicitly add dependencies to the
relevant tasks (as it does for do_package and do_packageindex already).

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


Re: [OE-core] [PATCH 21/33] package_manager/deb: create Packages.xz

2016-12-06 Thread Andreas Oberritter
On 06.12.2016 18:22, Burton, Ross wrote:
> 
> On 6 December 2016 at 11:49, Andreas Oberritter  > wrote:
> 
> +xz = bb.utils.which(os.getenv('PATH'), "xz")
> 
> 
> Are the relevant dependencies present to ensure that xz-native has been
> staged?  Is it always present because apt links to a library in xz so
> the binaries get pulled in too?

That's a good question. I guess I didn't add anything, because there's
no direct dependency in place for gzip-native either.

I don't know if it counts, but there's a dependency on apt-native and
apt's source tarball, like many others, is compressed with xz. By
default, apt also depends on xz because of PACKAGECONFIG = "lzma", but
that may obviously get changed by users.

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


Re: [OE-core] [PATCH 01/33] dpkg: implement offline mode for update-alternatives

2016-12-06 Thread Burton, Ross
On 6 December 2016 at 11:49, Andreas Oberritter 
wrote:

> +++ b/meta/recipes-devtools/dpkg/dpkg/0003-update-alternatives-
> Implement-offline-mode.patch
> @@ -0,0 +1,399 @@
> +From b4f0f6ced469095a2b21b01b59c7aded057e Mon Sep 17 00:00:00 2001
> +From: Andreas Oberritter 
> +Date: Thu, 28 Aug 2014 05:20:21 +0200
> +Subject: [PATCH] update-alternatives: Implement offline mode
> +
> +Lets update-alternatives manage symlinks inside a cross-arch root
> +filesystem in a directory specified by DPKG_ROOT.
> +
> +Signed-off-by: Andreas Oberritter 
>

This patch needs an Upstream-Status.

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


Re: [OE-core] [PATCH 20/33] package_manager/deb: let apt-get handle postinst scripts

2016-12-06 Thread Burton, Ross
On 6 December 2016 at 18:20, Andreas Oberritter 
wrote:

> With all required environment variables and configuration options in
> apt.conf in place, apt-get is able to install packages offline, i.e.
> when creating the rootfs, including the execution of postinst scripts
> and updating the package database. This is new behaviour.
>

Can you update the commit with this rationale?

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


Re: [OE-core] [PATCH 20/33] package_manager/deb: let apt-get handle postinst scripts

2016-12-06 Thread Andreas Oberritter
On 06.12.2016 18:26, Burton, Ross wrote:
> Can you elaborate on why the old code can be deleted?

With all required environment variables and configuration options in
apt.conf in place, apt-get is able to install packages offline, i.e.
when creating the rootfs, including the execution of postinst scripts
and updating the package database. This is new behaviour.

At the time the deleted code would have executed, its work was already
done by apt-get.

> 
> Ross
> 
> On 6 December 2016 at 11:49, Andreas Oberritter  > wrote:
> 
> Signed-off-by: Andreas Oberritter  >
> ---
>  meta/lib/oe/package_manager.py | 86
> --
>  meta/lib/oe/rootfs.py  |  6 +--
>  2 files changed, 9 insertions(+), 83 deletions(-)
> 
> diff --git a/meta/lib/oe/package_manager.py
> b/meta/lib/oe/package_manager.py
> index 4ef4f6d..12dff20 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -1959,84 +1959,6 @@ class DpkgPM(OpkgDpkgPM):
> 
>  self.indexer = DpkgIndexer(self.d, self.deploy_dir)
> 
> -"""
> -This function will change a package's status in
> /var/lib/dpkg/status file.
> -If 'packages' is None then the new_status will be applied to all
> -packages
> -"""
> -def mark_packages(self, status_tag, packages=None):
> -status_file = self.target_rootfs + "/var/lib/dpkg/status"
> -
> -with open(status_file, "r") as sf:
> -with open(status_file + ".tmp", "w+") as tmp_sf:
> -if packages is None:
> -tmp_sf.write(re.sub(r"Package:
> (.*?)\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)",
> -r"Package: \1\n\2Status:
> \3%s" % status_tag,
> -sf.read()))
> -else:
> -if type(packages).__name__ != "list":
> -raise TypeError("'packages' should be a
> list object")
> -
> -status = sf.read()
> -for pkg in packages:
> -status = re.sub(r"Package:
> %s\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)" % pkg,
> -r"Package: %s\n\1Status:
> \2%s" % (pkg, status_tag),
> -status)
> -
> -tmp_sf.write(status)
> -
> -os.rename(status_file + ".tmp", status_file)
> -
> -"""
> -Run the pre/post installs for package "package_name". If
> package_name is
> -None, then run all pre/post install scriptlets.
> -"""
> -def run_pre_post_installs(self, package_name=None):
> -info_dir = self.target_rootfs + "/var/lib/dpkg/info"
> -ControlScript = collections.namedtuple("ControlScript",
> ["suffix", "name", "argument"])
> -control_scripts = [
> -ControlScript(".preinst", "Preinstall", "install"),
> -ControlScript(".postinst", "Postinstall", "configure")]
> -status_file = self.target_rootfs + "/var/lib/dpkg/status"
> -installed_pkgs = []
> -
> -with open(status_file, "r") as status:
> -for line in status.read().split('\n'):
> -m = re.match("^Package: (.*)", line)
> -if m is not None:
> -installed_pkgs.append(m.group(1))
> -
> -if package_name is not None and not package_name in
> installed_pkgs:
> -return
> -
> -os.environ['D'] = self.target_rootfs
> -os.environ['OFFLINE_ROOT'] = self.target_rootfs
> -os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
> -os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
> -os.environ['INTERCEPT_DIR'] =
> os.path.join(self.d.getVar('WORKDIR', True),
> -   "intercept_scripts")
> -os.environ['NATIVE_ROOT'] =
> self.d.getVar('STAGING_DIR_NATIVE', True)
> -
> -failed_pkgs = []
> -for pkg_name in installed_pkgs:
> -for control_script in control_scripts:
> -p_full = os.path.join(info_dir, pkg_name +
> control_script.suffix)
> -if os.path.exists(p_full):
> -try:
> -bb.note("Executing %s for package: %s ..." %
> - (control_script.name.lower(),
> pkg_name))
> -subprocess.check_output([p_full,
> control_script.argument],
> -stderr=subprocess.STDOUT)
> -

[OE-core] [master][PATCH 0/2] Resolve gdb-cross-canadian dependency on imp

2016-12-06 Thread George McCollister
Add imp to python3-importlib. Make gdb-cross-canadian depend on
nativesdk-python3-importlib when python is enabled.

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://github.com/gmccollister/openembedded-core master-gdb-cross-canadian
  
https://github.com/gmccollister/openembedded-core/tree/master-gdb-cross-canadian

George McCollister (2):
  python-3.5-manifest: Add imp to importlib
  gdb-cross-canadian: Depend on nativesdk-python3-importlib

 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 3 ++-
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
2.9.3

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


[OE-core] [master][PATCH 2/2] gdb-cross-canadian: Depend on nativesdk-python3-importlib

2016-12-06 Thread George McCollister
Add missing dependency on nativesdk-python3-importlib so the imp Python
module is installed.

Before this patch, running gdb from the sdk would give the following
error:

Python Exception  No module named 'imp':

Signed-off-by: George McCollister 
---
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc 
b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index e53081d..3ff1989 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -14,7 +14,8 @@ GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 PACKAGECONFIG ??= "python readline"
 PACKAGECONFIG[python] = 
"--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
  nativesdk-python3-core nativesdk-python3-lang 
nativesdk-python3-re \
- nativesdk-python3-codecs nativesdk-python3-netclient"
+ nativesdk-python3-codecs nativesdk-python3-netclient \
+ nativesdk-python3-importlib"
 PACKAGECONFIG[readline] = 
"--with-system-readline,--without-system-readline,nativesdk-readline"
 
 SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
-- 
2.9.3

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


[OE-core] [master][PATCH 1/2] python-3.5-manifest: Add imp to importlib

2016-12-06 Thread George McCollister
The imp python module is the forerunner of importlib. Include imp in
the importlib subpackage instead of the misc subpackage so that it can
be depended on without bringing in a bunch of unrelated, unused modules.

Signed-off-by: George McCollister 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 851f12e..7fcd871 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -115,7 +115,7 @@ FILES_${PN}-image="${libdir}/python3.5/colorsys.* 
${libdir}/python3.5/__pycache_
 
 SUMMARY_${PN}-importlib="Python import implementation library"
 RDEPENDS_${PN}-importlib="${PN}-core ${PN}-lang"
-FILES_${PN}-importlib="${libdir}/python3.5/importlib 
${libdir}/python3.5/importlib/__pycache__ "
+FILES_${PN}-importlib="${libdir}/python3.5/importlib 
${libdir}/python3.5/importlib/__pycache__ ${libdir}/python3.5/imp.* 
${libdir}/python3.5/__pycache__/imp.* "
 
 SUMMARY_${PN}-io="Python low-level I/O"
 RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
-- 
2.9.3

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


[OE-core] [morty][PATCH 2/2] gdb-cross-canadian: Depend on nativesdk-python3-importlib

2016-12-06 Thread George McCollister
Add missing dependency on nativesdk-python3-importlib so the imp Python
module is installed.

Before this patch, running gdb from the sdk would give the following
error:

Python Exception  No module named 'imp':

Signed-off-by: George McCollister 
---
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc 
b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index e53081d..3ff1989 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -14,7 +14,8 @@ GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 PACKAGECONFIG ??= "python readline"
 PACKAGECONFIG[python] = 
"--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
  nativesdk-python3-core nativesdk-python3-lang 
nativesdk-python3-re \
- nativesdk-python3-codecs nativesdk-python3-netclient"
+ nativesdk-python3-codecs nativesdk-python3-netclient \
+ nativesdk-python3-importlib"
 PACKAGECONFIG[readline] = 
"--with-system-readline,--without-system-readline,nativesdk-readline"
 
 SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
-- 
2.9.3

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


[OE-core] [morty][PATCH 1/2] python-3.5-manifest: Add imp to importlib

2016-12-06 Thread George McCollister
The imp python module is the forerunner of importlib. Include imp in
the importlib subpackage instead of the misc subpackage so that it can
be depended on without bringing in a bunch of unrelated, unused modules.

Signed-off-by: George McCollister 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 3046114..6c690db 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -115,7 +115,7 @@ FILES_${PN}-image="${libdir}/python3.5/colorsys.* 
${libdir}/python3.5/imghdr.* $
 
 SUMMARY_${PN}-importlib="Python import implementation library"
 RDEPENDS_${PN}-importlib="${PN}-core ${PN}-lang"
-FILES_${PN}-importlib="${libdir}/python3.5/importlib "
+FILES_${PN}-importlib="${libdir}/python3.5/importlib ${libdir}/python3.5/imp.* 
"
 
 SUMMARY_${PN}-io="Python low-level I/O"
 RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
-- 
2.9.3

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


[OE-core] [morty][PATCH 0/2] Resolve gdb-cross-canadian dependency on imp

2016-12-06 Thread George McCollister
Add imp to python3-importlib. Make gdb-cross-canadian depend on
nativesdk-python3-importlib when python is enabled.

The following changes since commit c8d96b10ee3bc2eae0fd269d2564286fd0bc82ed:

  rm_work: Ensure we don't remove sigbasedata files (2016-11-16 10:34:34 +)

are available in the git repository at:

  git://github.com/gmccollister/openembedded-core morty-gdb-cross-canadian
  
https://github.com/gmccollister/openembedded-core/tree/morty-gdb-cross-canadian

George McCollister (2):
  python-3.5-manifest: Add imp to importlib
  gdb-cross-canadian: Depend on nativesdk-python3-importlib

 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 3 ++-
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
2.9.3

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


Re: [OE-core] [PATCH 20/33] package_manager/deb: let apt-get handle postinst scripts

2016-12-06 Thread Burton, Ross
Can you elaborate on why the old code can be deleted?

Ross

On 6 December 2016 at 11:49, Andreas Oberritter 
wrote:

> Signed-off-by: Andreas Oberritter 
> ---
>  meta/lib/oe/package_manager.py | 86 --
> 
>  meta/lib/oe/rootfs.py  |  6 +--
>  2 files changed, 9 insertions(+), 83 deletions(-)
>
> diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.
> py
> index 4ef4f6d..12dff20 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -1959,84 +1959,6 @@ class DpkgPM(OpkgDpkgPM):
>
>  self.indexer = DpkgIndexer(self.d, self.deploy_dir)
>
> -"""
> -This function will change a package's status in /var/lib/dpkg/status
> file.
> -If 'packages' is None then the new_status will be applied to all
> -packages
> -"""
> -def mark_packages(self, status_tag, packages=None):
> -status_file = self.target_rootfs + "/var/lib/dpkg/status"
> -
> -with open(status_file, "r") as sf:
> -with open(status_file + ".tmp", "w+") as tmp_sf:
> -if packages is None:
> -tmp_sf.write(re.sub(r"Package:
> (.*?)\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)",
> -r"Package: \1\n\2Status: \3%s" %
> status_tag,
> -sf.read()))
> -else:
> -if type(packages).__name__ != "list":
> -raise TypeError("'packages' should be a list
> object")
> -
> -status = sf.read()
> -for pkg in packages:
> -status = re.sub(r"Package:
> %s\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)" % pkg,
> -r"Package: %s\n\1Status: \2%s" %
> (pkg, status_tag),
> -status)
> -
> -tmp_sf.write(status)
> -
> -os.rename(status_file + ".tmp", status_file)
> -
> -"""
> -Run the pre/post installs for package "package_name". If package_name
> is
> -None, then run all pre/post install scriptlets.
> -"""
> -def run_pre_post_installs(self, package_name=None):
> -info_dir = self.target_rootfs + "/var/lib/dpkg/info"
> -ControlScript = collections.namedtuple("ControlScript",
> ["suffix", "name", "argument"])
> -control_scripts = [
> -ControlScript(".preinst", "Preinstall", "install"),
> -ControlScript(".postinst", "Postinstall", "configure")]
> -status_file = self.target_rootfs + "/var/lib/dpkg/status"
> -installed_pkgs = []
> -
> -with open(status_file, "r") as status:
> -for line in status.read().split('\n'):
> -m = re.match("^Package: (.*)", line)
> -if m is not None:
> -installed_pkgs.append(m.group(1))
> -
> -if package_name is not None and not package_name in
> installed_pkgs:
> -return
> -
> -os.environ['D'] = self.target_rootfs
> -os.environ['OFFLINE_ROOT'] = self.target_rootfs
> -os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
> -os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
> -os.environ['INTERCEPT_DIR'] = os.path.join(self.d.getVar('WORKDIR',
> True),
> -   "intercept_scripts")
> -os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE',
> True)
> -
> -failed_pkgs = []
> -for pkg_name in installed_pkgs:
> -for control_script in control_scripts:
> -p_full = os.path.join(info_dir, pkg_name +
> control_script.suffix)
> -if os.path.exists(p_full):
> -try:
> -bb.note("Executing %s for package: %s ..." %
> - (control_script.name.lower(), pkg_name))
> -subprocess.check_output([p_full,
> control_script.argument],
> -stderr=subprocess.STDOUT)
> -except subprocess.CalledProcessError as e:
> -bb.note("%s for package %s failed with %d:\n%s" %
> -(control_script.name, pkg_name,
> e.returncode,
> -e.output.decode("utf-8")))
> -failed_pkgs.append(pkg_name)
> -break
> -
> -if len(failed_pkgs):
> -self.mark_packages("unpacked", failed_pkgs)
> -
>  def update(self):
>  os.environ['APT_CONFIG'] = self.apt_conf_file
>
> @@ -2058,6 +1980,14 @@ class DpkgPM(OpkgDpkgPM):
>
>  os.environ['APT_CONFIG'] = self.apt_conf_file
>
> +os.environ['D'] = self.target_rootfs
> +os.environ['OFFLINE_ROOT'] = self.target_rootfs
> +os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
> +os.environ['OP

Re: [OE-core] [PATCH 21/33] package_manager/deb: create Packages.xz

2016-12-06 Thread Burton, Ross
On 6 December 2016 at 11:49, Andreas Oberritter 
wrote:

> +xz = bb.utils.which(os.getenv('PATH'), "xz")
>

Are the relevant dependencies present to ensure that xz-native has been
staged?  Is it always present because apt links to a library in xz so the
binaries get pulled in too?

Ross
-- 
___
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-06 Thread Burton, Ross
On 5 December 2016 at 19:08, Khem Raj  wrote:

> 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.
>

Funnily enough this just failed in multilib on the AB (
http://errors.yoctoproject.org/Errors/Details/111361/)

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


[OE-core] [PATCH] postinst: Add a test case to verify postinst scripts behavior

2016-12-06 Thread jose . perez . carranza
From: Jose Perez Carranza 

Add test case that verify behavior of postinst scripts at
roofts time and when is delayed to the first boot directly
on the target.

Signed-off-by: Jose Perez Carranza 
---
 .../recipes-test/postinst/postinst_1.0.bb  |  2 +
 meta/lib/oeqa/selftest/runtime-test.py | 61 ++
 2 files changed, 63 insertions(+)

diff --git a/meta-selftest/recipes-test/postinst/postinst_1.0.bb 
b/meta-selftest/recipes-test/postinst/postinst_1.0.bb
index 97a1987..6d49734 100644
--- a/meta-selftest/recipes-test/postinst/postinst_1.0.bb
+++ b/meta-selftest/recipes-test/postinst/postinst_1.0.bb
@@ -24,6 +24,7 @@ RDEPENDS_${PN}-delayed-t = "${PN}-delayed-p"
 # Main recipe post-install
 pkg_postinst_${PN}-at-rootfs () {
 tfile="/etc/postinsta-test"
+touch "$D"/this-was-created-at-rootfstime
 if test "x$D" != "x" then
 # Need to run on first boot
 exit 1
@@ -42,6 +43,7 @@ pkg_postinst_${PN}-delayed-a () {
   # Need to run on first boot
   exit 1
 else
+  touch /etc/this-was-created-at-first-boot
   if test -e $efile ; then
 echo 'success' > $tfile
   else
diff --git a/meta/lib/oeqa/selftest/runtime-test.py 
b/meta/lib/oeqa/selftest/runtime-test.py
index 1dbfae1..20caa97 100644
--- a/meta/lib/oeqa/selftest/runtime-test.py
+++ b/meta/lib/oeqa/selftest/runtime-test.py
@@ -155,3 +155,64 @@ postinst-delayed-t \
 elif found:
 self.assertEqual(idx, len(postinst_list), "Not found 
all postinsts")
 break
+
+@testcase(1545)
+def test_postinst_roofs_and_boot(self):
+"""
+Summary:The purpose of this test case is to verify 
Post-installation
+scripts are called when roofs is created and also test
+that script can be delayed to run at first boot.
+Dependencies:   NA
+Steps:  1. Add proper configuration to local.conf file
+2. Build a "core-image-full-cmdline" image
+3. Verify that file created by postinst_rootfs recipe 
is
+   present on rootfs dir.
+4. Boot the image created on qemu and verify that the 
file
+   created by postinst_boot recipe is present on image.
+5. Clean the packages and image created to test with
+   different package managers
+Expected:   The files are successfully created during rootfs and 
boot
+time for 3 different package managers: rpm,ipk,deb and
+for initialization managers: sysvinit and systemd.
+
+"""
+file_rootfs_name = "this-was-created-at-rootfstime"
+fileboot_name = "this-was-created-at-first-boot"
+rootfs_pkg = 'postinst-at-rootfs'
+boot_pkg = 'postinst-delayed-a'
+#Step 1
+features = 'MACHINE = "qemux86"\n'
+features += 'CORE_IMAGE_EXTRA_INSTALL += "%s %s "\n'% (rootfs_pkg, 
boot_pkg)
+for init_manager in ("sysvinit", "systemd"):
+#for sysvinit no extra configuration is needed,
+if (init_manager is "systemd"):
+features += 'DISTRO_FEATURES_append = " systemd"\n'
+features += 'VIRTUAL-RUNTIME_init_manager = "systemd"\n'
+features += 'DISTRO_FEATURES_BACKFILL_CONSIDERED = 
"sysvinit"\n'
+features += 'VIRTUAL-RUNTIME_initscripts = ""\n'
+for classes in ("package_rpm package_deb package_ipk",
+"package_deb package_rpm package_ipk",
+"package_ipk package_deb package_rpm"):
+features += 'PACKAGE_CLASSES = "%s"\n' % classes
+self.write_config(features)
+
+#Step 2
+bitbake('core-image-full-cmdline')
+
+#Step 3
+file_rootfs_created = 
os.path.join(get_bb_var('IMAGE_ROOTFS',"core-image-full-cmdline"),
+   file_rootfs_name)
+found = os.path.isfile(file_rootfs_created)
+self.assertTrue(found, "File %s was not created at rootfs time 
by %s" % \
+(file_rootfs_name, rootfs_pkg))
+
+#Step 4
+testcommand = 'ls /etc/'+fileboot_name
+with runqemu('core-image-full-cmdline') as qemu:
+sshargs = '-o UserKnownHostsFile=/dev/null -o 
StrictHostKeyChecking=no'
+result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, 
testcommand))
+self.assertEqual(result.status, 0, 'File %s was not 
created at firts boot'% fileboot_name)
+
+#Step 5
+bitbake(' %s %s -c cleanall' % (rootfs_pkg, boot_pkg))
+bitbake('core-image-full-cmdline -c cleanall')
-- 
2

Re: [OE-core] [PATCH 03/33] dpkg-native: hardcode SYSCONFDIR to /etc in update-alternatives

2016-12-06 Thread Burton, Ross
On 6 December 2016 at 16:37, Andreas Oberritter 
wrote:

> I was asking because the result after stripping would essentially equal
> ${sysconfdir_native}:
>
> STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"
>
> It wouldn't work if someone set it to "${STAGING_DIR_NATIVE}/foo"
> without adjusting sysconfdir_native, but on the other hand someone could
> just as well use "/path-outside-staging-dir-native/etc", which would
> break attempts to strip the prefix, too. I'd guess the assumption that
> STAGING_ETCDIR_NATIVE doesn't get changed alone should be safe.
>

Ah yes, I misread the order of evaluation.  That should work.

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


[OE-core] [PATCH v2] keyutils: new recipe (version 1.5.9)

2016-12-06 Thread Andreas Oberritter
Used by nfs-utils for nfsidmap, if available. Includes a backported patch for
musl and a description text from meta-ivi.

Signed-off-by: Andreas Oberritter 
---
 .../0001-Include-limits.h-for-UINT_MAX.patch   | 30 ++
 meta/recipes-support/keyutils/keyutils_1.5.9.bb| 37 ++
 2 files changed, 67 insertions(+)
 create mode 100644 
meta/recipes-support/keyutils/keyutils/0001-Include-limits.h-for-UINT_MAX.patch
 create mode 100644 meta/recipes-support/keyutils/keyutils_1.5.9.bb

diff --git 
a/meta/recipes-support/keyutils/keyutils/0001-Include-limits.h-for-UINT_MAX.patch
 
b/meta/recipes-support/keyutils/keyutils/0001-Include-limits.h-for-UINT_MAX.patch
new file mode 100644
index 000..b17153c
--- /dev/null
+++ 
b/meta/recipes-support/keyutils/keyutils/0001-Include-limits.h-for-UINT_MAX.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Backport 
[git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git master]
+
+From ab818a7f5818177a3da09fce6aa064ef648da372 Mon Sep 17 00:00:00 2001
+From: Felix Janda 
+Date: Sat, 4 Apr 2015 00:13:21 +0200
+Subject: [PATCH] Include  for UINT_MAX
+
+Fixes building with musl libc.
+
+Signed-off-by: Felix Janda 
+Signed-off-by: David Howells 
+---
+ key.dns_resolver.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/key.dns_resolver.c b/key.dns_resolver.c
+index c2a9fe5..9c9d458 100644
+--- a/key.dns_resolver.c
 b/key.dns_resolver.c
+@@ -42,6 +42,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+-- 
+1.9.1
+
diff --git a/meta/recipes-support/keyutils/keyutils_1.5.9.bb 
b/meta/recipes-support/keyutils/keyutils_1.5.9.bb
new file mode 100644
index 000..3c746d2
--- /dev/null
+++ b/meta/recipes-support/keyutils/keyutils_1.5.9.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Linux Key Management Utilities"
+DESCRIPTION = "Keyutils is a set of utilities for managing the key retention \
+facility in the kernel, which can be used by filesystems, block devices and \
+more to gain and retain the authorization and encryption keys required to \
+perform secure operations."
+HOMEPAGE = "https://people.redhat.com/~dhowells/keyutils/";
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LICENSE_${PN} = "GPLv2+"
+LICENSE_lib${PN} = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://LICENCE.GPL;md5=5f6e72824f5da505c1f4a7197f004b45 \
+file://LICENCE.LGPL;md5=7d1cacaa3ea752b72ea5e525df54a21f"
+
+SRC_URI = "https://people.redhat.com/~dhowells/keyutils/${BP}.tar.bz2 \
+   file://0001-Include-limits.h-for-UINT_MAX.patch"
+SRC_URI[md5sum] = "7f8ac985c45086b5fbcd12cecd23cf07"
+SRC_URI[sha256sum] = 
"4da2c5552c688b65ab14d4fd40fbdf720c8b396d8ece643e040cf6e707e083ae"
+
+EXTRA_OEMAKE = " \
+DESTDIR=${D} \
+ETCDIR=${sysconfdir} \
+BINDIR=${bindir} \
+SBINDIR=${sbindir} \
+SHAREDIR=${datadir}/${BPN} \
+MANDIR=${mandir} \
+INCLUDEDIR=${includedir} \
+LIBDIR=${base_libdir} \
+USRLIBDIR=${libdir} \
+BUILDFOR= \
+"
+
+do_install() {
+oe_runmake install
+}
+
+PACKAGES =+ "lib${PN}"
+
+FILES_lib${PN} = "${base_libdir}/lib*${SOLIBS}"
-- 
2.7.4

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


Re: [OE-core] [PATCH 03/33] dpkg-native: hardcode SYSCONFDIR to /etc in update-alternatives

2016-12-06 Thread Andreas Oberritter
On 06.12.2016 17:12, Burton, Ross wrote:
> 
> On 6 December 2016 at 16:08, Andreas Oberritter  > wrote:
> 
> I guess ${sysconfdir_native} should work, unless someone overrides
> STAGING_ETCDIR_NATIVE. Would this be ok?
> 
> 
> If the recipe inherits native then the class reassigns:
> 
> sysconfdir = "${STAGING_ETCDIR_NATIVE}"
> 
> So you'll need to take sysconfdir, and strip off the staging directory.

I was asking because the result after stripping would essentially equal
${sysconfdir_native}:

STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"

It wouldn't work if someone set it to "${STAGING_DIR_NATIVE}/foo"
without adjusting sysconfdir_native, but on the other hand someone could
just as well use "/path-outside-staging-dir-native/etc", which would
break attempts to strip the prefix, too. I'd guess the assumption that
STAGING_ETCDIR_NATIVE doesn't get changed alone should be safe.

Regards,
Andreas

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


Re: [OE-core] [PATCH 03/33] dpkg-native: hardcode SYSCONFDIR to /etc in update-alternatives

2016-12-06 Thread Burton, Ross
On 6 December 2016 at 16:08, Andreas Oberritter 
wrote:

> I guess ${sysconfdir_native} should work, unless someone overrides
> STAGING_ETCDIR_NATIVE. Would this be ok?
>

If the recipe inherits native then the class reassigns:

sysconfdir = "${STAGING_ETCDIR_NATIVE}"

So you'll need to take sysconfdir, and strip off the staging directory.

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


Re: [OE-core] [PATCH 03/33] dpkg-native: hardcode SYSCONFDIR to /etc in update-alternatives

2016-12-06 Thread Andreas Oberritter
On 06.12.2016 16:39, Burton, Ross wrote:
> 
> On 6 December 2016 at 11:49, Andreas Oberritter  > wrote:
> 
> +sed -i -e 's|SYSCONFDIR|"/etc"|' ${S}/utils/update-alternatives.c
> 
> 
> Hardcoding /etc is bad, can't you just remove the native sysroot prefix
> from $sysconfdir?

I guess ${sysconfdir_native} should work, unless someone overrides
STAGING_ETCDIR_NATIVE. Would this be ok?

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


Re: [OE-core] [PATCH 3/6] keyutils: new recipe (version 1.5.9)

2016-12-06 Thread Burton, Ross
On 6 December 2016 at 16:03, Andreas Oberritter 
wrote:

> Apparently there's a recipe in meta-ivi which already has a fix. I'm
> going to merge both recipes and resubmit.
>

Thanks Andreas, feel free to just send v2 for just this patch, as the rest
are sitting in my staging branch already.

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


Re: [OE-core] [PATCH 3/6] keyutils: new recipe (version 1.5.9)

2016-12-06 Thread Andreas Oberritter
On 06.12.2016 16:49, Burton, Ross wrote:
> 
> On 30 November 2016 at 22:43, Andreas Oberritter  > wrote:
> 
> Used by nfs-utils for nfsidmap, if available.
> 
> 
> This breaks under musl:
> 
> | key.dns_resolver.c: In function 'afsdb_hosts_to_addrs':
> | key.dns_resolver.c:374:21: error: 'UINT_MAX' undeclared (first use in
> this function)
> |   unsigned int ttl = UINT_MAX, rr_ttl;
> |  ^~~~
> | key.dns_resolver.c:374:21: note: each undeclared identifier is
> reported only once for each function it appears in
> | key.dns_resolver.c: In function 'dns_query_afsdb':
> | key.dns_resolver.c:456:22: error: 'ULONG_MAX' undeclared (first use in
> this function)
> |   unsigned long ttl = ULONG_MAX;
> |   ^

Apparently there's a recipe in meta-ivi which already has a fix. I'm
going to merge both recipes and resubmit.

Regards,
Andreas
-- 
___
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-06 Thread Maciej Borzęcki
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).

-- 
Maciej Borzecki
RnDity
-- 
___
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-06 Thread Andreas Oberritter
On 06.12.2016 15:36, Burton, Ross wrote:
> 
> On 6 December 2016 at 11:49, 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.
> 
> 
> Is this on a branch somewhere?

I just created a new branch here:

http://git.openembedded.org/openembedded-core-contrib/log/?h=obi/deb

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


Re: [OE-core] [PATCH 3/6] keyutils: new recipe (version 1.5.9)

2016-12-06 Thread Burton, Ross
On 30 November 2016 at 22:43, Andreas Oberritter 
wrote:

> Used by nfs-utils for nfsidmap, if available.
>

This breaks under musl:

| key.dns_resolver.c: In function 'afsdb_hosts_to_addrs':
| key.dns_resolver.c:374:21: error: 'UINT_MAX' undeclared (first use in
this function)
|   unsigned int ttl = UINT_MAX, rr_ttl;
|  ^~~~
| key.dns_resolver.c:374:21: note: each undeclared identifier is reported
only once for each function it appears in
| key.dns_resolver.c: In function 'dns_query_afsdb':
| key.dns_resolver.c:456:22: error: 'ULONG_MAX' undeclared (first use in
this function)
|   unsigned long ttl = ULONG_MAX;
|   ^

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


Re: [OE-core] [PATCH 03/33] dpkg-native: hardcode SYSCONFDIR to /etc in update-alternatives

2016-12-06 Thread Burton, Ross
On 6 December 2016 at 11:49, Andreas Oberritter 
wrote:

> +sed -i -e 's|SYSCONFDIR|"/etc"|' ${S}/utils/update-alternatives.c
>

Hardcoding /etc is bad, can't you just remove the native sysroot prefix
from $sysconfdir?

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


[OE-core] [PATCH V6] package_manager: remove strings and migrate to direct arrays

2016-12-06 Thread Stephano Cetola
When using subprocess call and check_output, it is better to use arrays
rather than strings when possible to avoid whitespace and quoting
problems.

[ YOCTO #9342 ]

Signed-off-by: Stephano Cetola 
---
 meta/lib/oe/package.py |  13 +--
 meta/lib/oe/package_manager.py | 233 -
 2 files changed, 121 insertions(+), 125 deletions(-)

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 02642f2..ae60a58 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -18,23 +18,24 @@ def runstrip(arg):
 newmode = origmode | stat.S_IWRITE | stat.S_IREAD
 os.chmod(file, newmode)
 
-extraflags = ""
+stripcmd = [strip]
 
 # kernel module
 if elftype & 16:
-extraflags = "--strip-debug --remove-section=.comment 
--remove-section=.note --preserve-dates"
+stripcmd.extend(["--strip-debug", "--remove-section=.comment",
+"--remove-section=.note", "--preserve-dates"])
 # .so and shared library
 elif ".so" in file and elftype & 8:
-extraflags = "--remove-section=.comment --remove-section=.note 
--strip-unneeded"
+stripcmd.extend(["--remove-section=.comment", 
"--remove-section=.note", "--strip-unneeded"])
 # shared or executable:
 elif elftype & 8 or elftype & 4:
-extraflags = "--remove-section=.comment --remove-section=.note"
+stripcmd.extend(["--remove-section=.comment", 
"--remove-section=.note"])
 
-stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
+stripcmd.append(file)
 bb.debug(1, "runstrip: %s" % stripcmd)
 
 try:
-output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT, 
shell=True)
+output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT)
 except subprocess.CalledProcessError as e:
 bb.error("runstrip: '%s' strip command failed with %s (%s)" % 
(stripcmd, e.returncode, e.output))
 
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 7ba2e4d..e5e3c3b 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -358,12 +358,11 @@ class RpmPkgsList(PkgsList):
 RpmIndexer(d, rootfs_dir).get_ml_prefix_and_os_list(arch_var, 
os_var)
 
 # Determine rpm version
-cmd = "%s --version" % self.rpm_cmd
 try:
-output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, 
shell=True).decode("utf-8")
+output = subprocess.check_output([self.rpm_cmd, "--version"], 
stderr=subprocess.STDOUT).decode("utf-8")
 except subprocess.CalledProcessError as e:
 bb.fatal("Getting rpm version failed. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, 
e.output.decode("utf-8")))
+ "returned %d:\n%s" % (self.rpm_cmd, e.returncode, 
e.output.decode("utf-8")))
 
 '''
 Translate the RPM/Smart format names to the OE multilib format names
@@ -412,16 +411,15 @@ class RpmPkgsList(PkgsList):
 return output
 
 def list_pkgs(self):
-cmd = self.rpm_cmd + ' --root ' + self.rootfs_dir
-cmd += ' -D "_dbpath /var/lib/rpm" -qa'
-cmd += " --qf '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'"
+cmd = [self.rpm_cmd, '--root', self.rootfs_dir]
+cmd.extend(['-D', '_dbpath /var/lib/rpm'])
+cmd.extend(['-qa', '--qf', '[%{NAME} %{ARCH} %{VERSION} 
%{PACKAGEORIGIN}\n]'])
 
 try:
-# bb.note(cmd)
-tmp_output = subprocess.check_output(cmd, 
stderr=subprocess.STDOUT, shell=True).strip().decode("utf-8")
+tmp_output = subprocess.check_output(cmd, 
stderr=subprocess.STDOUT).strip().decode("utf-8")
 except subprocess.CalledProcessError as e:
 bb.fatal("Cannot get the installed packages list. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, 
e.output.decode("utf-8")))
+ "returned %d:\n%s" % (' '.join(cmd), e.returncode, 
e.output.decode("utf-8")))
 
 output = dict()
 deps = dict()
@@ -672,11 +670,11 @@ class RpmPM(PackageManager):
 # 2 = --log-level=debug
 # 3 = --log-level=debug plus dumps of scriplet content and command 
invocation
 self.debug_level = int(d.getVar('ROOTFS_RPM_DEBUG', True) or "0")
-self.smart_opt = "--log-level=%s --data-dir=%s" % \
+self.smart_opt = ["--log-level=%s" %
  ("warning" if self.debug_level == 0 else
   "info" if self.debug_level == 1 else
-  "debug",
-  os.path.join(target_rootfs, 'var/lib/smart'))
+  "debug"), "--data-dir=%s" %
+  os.path.join(target_rootfs, 'var/lib/smart')]
 self.scriptlet_wrapper = self.d.expand('${WORKDIR}/scriptlet_wrapper')
 self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
 

[OE-core] [PATCH V6] cleanup subprocess

2016-12-06 Thread Stephano Cetola
Changed since V5:
Smart needs to dump the installed packages to a file, as this file
is used to detect changes in the install. This was breaking:
test_incremental_image_generation

Stephano Cetola (1):
  package_manager: remove strings and migrate to direct arrays

 meta/lib/oe/package.py |  13 +--
 meta/lib/oe/package_manager.py | 233 -
 2 files changed, 121 insertions(+), 125 deletions(-)

-- 
2.10.2

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


[OE-core] [PATCH] insane: Add SH4 musl mapping to the QA arch tests

2016-12-06 Thread Vladimir Zapolskiy
This change allows to pass QA for packages built with sh4-oe-linux-musl
toolchain, the problem is reproted while building core-image-minimal target:

  ERROR: readline-7.0-r0 do_package_qa:
  Error executing a python function in exec_python_func() autogenerated

Signed-off-by: Vladimir Zapolskiy 
---
 meta/classes/insane.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 5ddb87b..01494e3 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -138,6 +138,7 @@ def package_qa_get_machine_dict(d):
 "microblaze":  (189, 0,0,  False,  
   32),
 "microblazeeb":(189, 0,0,  False,  
   32),
 "microblazeel":(189, 0,0,  True,   
   32),
+"sh4":(  42, 0,0,  True,   
   32),
   },
 "uclinux-uclibc" : {
 "bfin":   ( 106, 0,0,  True,   
  32),
-- 
2.10.2

-- 
___
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-06 Thread Burton, Ross
On 6 December 2016 at 23:05, Huang Qiyu  wrote:

> LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
> -file://LICENSE;md5=48c26a307f91af700e1f00585f215aaf"
> +file://LICENSE;md5=2ef3e4b8dafc85612bc5254b8081e234"
>

Please resend with an explanation in the commit message as to why the
LICENSE has changed (for example, because it was relicensed to GPLv3, or
because the copyright years were updated, or the text was reformatted).

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


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

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

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


Re: [OE-core] [oe-commits] [openembedded-core] 67/76: gnutls: update to 3.5.6

2016-12-06 Thread Martin Jansa
On Tue, Dec 06, 2016 at 02:47:42PM +, Burton, Ross wrote:
> On 6 December 2016 at 14:44, Martin Jansa  wrote:
> 
> > Probably caused by nettle upgrade which no longer enables gmp with older
> > gmp 4.2.1 used in non-GPLv3 builds.
> >
> 
> I was going to say I don't see this.  Clearly we need to extend the
> non-GPL3 testing.
> 
> As you can reproduce this, is there a simple fix?

Restoring nettle-3.2 (which got replaced with 3.3 in this commit:
commit fc37c0787008437d94bccfaa91d0b84180a393c9
Author: Fabio Berton 
Date:   Mon Nov 21 18:17:24 2016 -0200

nettle: Update to version 3.3

Signed-off-by: Fabio Berton 
Signed-off-by: Ross Burton 
)

allows to use gmp-4.2.1 and nettle-3.2 is good enough for
gnutls.do_configure.

Now I need to check if LGPLv3 libnettle or libhogweed end in the image
or not.

-- 
Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com


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


Re: [OE-core] [oe-commits] [openembedded-core] 67/76: gnutls: update to 3.5.6

2016-12-06 Thread Burton, Ross
On 6 December 2016 at 14:44, Martin Jansa  wrote:

> Probably caused by nettle upgrade which no longer enables gmp with older
> gmp 4.2.1 used in non-GPLv3 builds.
>

I was going to say I don't see this.  Clearly we need to extend the
non-GPL3 testing.

As you can reproduce this, is there a simple fix?

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


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

2016-12-06 Thread Robert P. J. Day

  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?

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] [oe-commits] [openembedded-core] 67/76: gnutls: update to 3.5.6

2016-12-06 Thread Martin Jansa
On Tue, Dec 06, 2016 at 02:49:04PM +0100, Martin Jansa wrote:
> On Wed, Nov 30, 2016 at 03:49:52PM +, g...@git.openembedded.org wrote:
> > rpurdie pushed a commit to branch master
> > in repository openembedded-core.
> > 
> > commit 27f306a752d15ec62d2821d0146be4ffa10b7013
> > Author: Alexander Kanavin 
> > AuthorDate: Mon Nov 28 15:34:20 2016 +0200
> > 
> > gnutls: update to 3.5.6
> > 
> > Signed-off-by: Alexander Kanavin 
> > Signed-off-by: Ross Burton 
> 
> Anyone else also seeing this?
> 
> configure:9271: result: no
> configure:9337: checking for NETTLE
> configure:9345: $PKG_CONFIG --exists --print-errors "nettle >= 3.1"
> configure:9348: $? = 0
> configure:9363: $PKG_CONFIG --exists --print-errors "nettle >= 3.1"
> configure:9366: $? = 0
> configure:9412: result: yes
> configure:9418: checking for HOGWEED
> configure:9426: $PKG_CONFIG --exists --print-errors "hogweed >= 3.1"
> Package hogweed was not found in the pkg-config search path.
> Perhaps you should add the directory containing `hogweed.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'hogweed' found
> configure:9429: $? = 1
> configure:9444: $PKG_CONFIG --exists --print-errors "hogweed >= 3.1"
> Package hogweed was not found in the pkg-config search path.
> Perhaps you should add the directory containing `hogweed.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'hogweed' found
> configure:9447: $? = 1
> No package 'hogweed' found
> configure:9475: result: no
> configure:9478: error:
>   ***
>   *** Libhogweed (nettle's companion library) was not found. Note that
> you must compile nettle with gmp support.

Probably caused by nettle upgrade which no longer enables gmp with older
gmp 4.2.1 used in non-GPLv3 builds.

checking for __gmpz_powm_sec in -lgmp... no
configure: WARNING: GNU MP not found, or too old. GMP-5.0 or later is needed, 
see http://gmplib.org/.
Support for public key algorithms will be unavailable.
configure: Looking for assembler files in arm.

switching to older nettle 2.7.1 doesn't help, because nettle 3.1 is required by 
gnutls..

| checking for NETTLE... no
| configure: error:
|   ***
|   *** Libnettle 3.1 was not found.

 nettle 3.1 is required by gnutls..

> >  meta/recipes-support/gnutls/{gnutls_3.5.5.bb => gnutls_3.5.6.bb} | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/meta/recipes-support/gnutls/gnutls_3.5.5.bb 
> > b/meta/recipes-support/gnutls/gnutls_3.5.6.bb
> > similarity index 60%
> > rename from meta/recipes-support/gnutls/gnutls_3.5.5.bb
> > rename to meta/recipes-support/gnutls/gnutls_3.5.6.bb
> > index d255959..2e70734 100644
> > --- a/meta/recipes-support/gnutls/gnutls_3.5.5.bb
> > +++ b/meta/recipes-support/gnutls/gnutls_3.5.6.bb
> > @@ -4,6 +4,6 @@ SRC_URI += "file://correct_rpl_gettimeofday_signature.patch 
> > \
> >  file://0001-configure.ac-fix-sed-command.patch \
> >  file://use-pkg-config-to-locate-zlib.patch \
> > "
> > -SRC_URI[md5sum] = "fb84c4d7922c1545da8dda4dcb9487d4"
> > -SRC_URI[sha256sum] = 
> > "86994fe7804ee16d2811e366b9bf2f75304f8e470ae0e3716d60ffeedac0e529"
> > +SRC_URI[md5sum] = "7a38b23757aae009c3eb5bb12fb0afda"
> > +SRC_URI[sha256sum] = 
> > "6338b715bf31c758606ffa489c7f87ee1beab947114fbd2ffefd73170a8c6b9a"
> >  
> > 
> > -- 
> > To stop receiving notification emails like this one, please contact
> > the administrator of this repository.
> > -- 
> > ___
> > Openembedded-commits mailing list
> > openembedded-comm...@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-commits
> 
> -- 
> Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com



-- 
Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com


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


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

2016-12-06 Thread Burton, Ross
On 6 December 2016 at 22:38, Huang Qiyu  wrote:

> +++ b/meta/recipes-connectivity/dhcp/binutils-gdb
> @@ -0,0 +1 @@
> +Subproject commit 39eeab253474493bc9477dbb2bd9c8041f05764b
>

Can you resend without this bit?

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


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

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

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

diff --git a/meta/recipes-connectivity/dhcp/binutils-gdb 
b/meta/recipes-connectivity/dhcp/binutils-gdb
new file mode 16
index 000..39eeab2
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/binutils-gdb
@@ -0,0 +1 @@
+Subproject commit 39eeab253474493bc9477dbb2bd9c8041f05764b
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


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

2016-12-06 Thread Burton, Ross
On 6 December 2016 at 11:49, 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.
>

Is this on a branch somewhere?

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


[OE-core] [PATCH 00/13] [jethro] Consolidated pull

2016-12-06 Thread Robert Yang
Hi RP,

There are two PULLs, the one on openembedded-core-contrib is for oe-core,
the other one on poky-contrib is for poky, the later one has 2 more commits:
  poky.conf: Bump version for 2.0.3 jethro release
  build-appliance-image: Update to jethro head revision

I can't send them in oe-core's PULL is because poky.conf is not in oe-core,
and build-appliance-image depends on poky.conf, please verify the commit
is correct after merged.

// Robert


The following changes since commit d39e7ca717b67ad9f2f78b83d90d91e410e52965:

  gnupg: fix find-version for beta checking (2016-11-03 17:40:52 +)

== PULL 1 (13 commits for oe-core)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/jethro-next
  
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/jethro-next

Armin Kuster (13):
  gnutils: Security fix CVE-2016-7444
  bind: Security fix CVE-2016-2775
  bind: Security fix CVE-2016-2776
  openssl: Security fix CVE-2016-2179
  openssl: Security fix CVE-2016-8610
  python-2.7: Security fix CVE-2016-0772
  python-2.7: Security fix CVE-2016-5636
  python-2.7: Security fix CVE-2016-5699
  python-2.7: Security fix CVE-2016-1000110
  tzcode-native: update to 2016h
  tzdata: Update to 2016h
  tzcode: update to 2016i
  tzdata: update to 2016i

== PULL 2 (15 commits for poky, includes PULL 1)

  git://git.pokylinux.org/poky-contrib rbt/jethro-next
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=rbt/jethro-next

Armin Kuster (13):
  gnutils: Security fix CVE-2016-7444
  bind: Security fix CVE-2016-2775
  bind: Security fix CVE-2016-2776
  openssl: Security fix CVE-2016-2179
  openssl: Security fix CVE-2016-8610
  python-2.7: Security fix CVE-2016-0772
  python-2.7: Security fix CVE-2016-5636
  python-2.7: Security fix CVE-2016-5699
  python-2.7: Security fix CVE-2016-1000110
  tzcode-native: update to 2016h
  tzdata: Update to 2016h
  tzcode: update to 2016i
  tzdata: update to 2016i

Robert Yang (2):
  poky.conf: Bump version for 2.0.3 jethro release
  build-appliance-image: Update to jethro head revision
-- 
2.10.2

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


Re: [OE-core] [oe-commits] [openembedded-core] 67/76: gnutls: update to 3.5.6

2016-12-06 Thread Martin Jansa
On Wed, Nov 30, 2016 at 03:49:52PM +, g...@git.openembedded.org wrote:
> rpurdie pushed a commit to branch master
> in repository openembedded-core.
> 
> commit 27f306a752d15ec62d2821d0146be4ffa10b7013
> Author: Alexander Kanavin 
> AuthorDate: Mon Nov 28 15:34:20 2016 +0200
> 
> gnutls: update to 3.5.6
> 
> Signed-off-by: Alexander Kanavin 
> Signed-off-by: Ross Burton 

Anyone else also seeing this?

configure:9271: result: no
configure:9337: checking for NETTLE
configure:9345: $PKG_CONFIG --exists --print-errors "nettle >= 3.1"
configure:9348: $? = 0
configure:9363: $PKG_CONFIG --exists --print-errors "nettle >= 3.1"
configure:9366: $? = 0
configure:9412: result: yes
configure:9418: checking for HOGWEED
configure:9426: $PKG_CONFIG --exists --print-errors "hogweed >= 3.1"
Package hogweed was not found in the pkg-config search path.
Perhaps you should add the directory containing `hogweed.pc'
to the PKG_CONFIG_PATH environment variable
No package 'hogweed' found
configure:9429: $? = 1
configure:9444: $PKG_CONFIG --exists --print-errors "hogweed >= 3.1"
Package hogweed was not found in the pkg-config search path.
Perhaps you should add the directory containing `hogweed.pc'
to the PKG_CONFIG_PATH environment variable
No package 'hogweed' found
configure:9447: $? = 1
No package 'hogweed' found
configure:9475: result: no
configure:9478: error:
  ***
  *** Libhogweed (nettle's companion library) was not found. Note that
you must compile nettle with gmp support.


> ---
>  meta/recipes-support/gnutls/{gnutls_3.5.5.bb => gnutls_3.5.6.bb} | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-support/gnutls/gnutls_3.5.5.bb 
> b/meta/recipes-support/gnutls/gnutls_3.5.6.bb
> similarity index 60%
> rename from meta/recipes-support/gnutls/gnutls_3.5.5.bb
> rename to meta/recipes-support/gnutls/gnutls_3.5.6.bb
> index d255959..2e70734 100644
> --- a/meta/recipes-support/gnutls/gnutls_3.5.5.bb
> +++ b/meta/recipes-support/gnutls/gnutls_3.5.6.bb
> @@ -4,6 +4,6 @@ SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
>  file://0001-configure.ac-fix-sed-command.patch \
>  file://use-pkg-config-to-locate-zlib.patch \
> "
> -SRC_URI[md5sum] = "fb84c4d7922c1545da8dda4dcb9487d4"
> -SRC_URI[sha256sum] = 
> "86994fe7804ee16d2811e366b9bf2f75304f8e470ae0e3716d60ffeedac0e529"
> +SRC_URI[md5sum] = "7a38b23757aae009c3eb5bb12fb0afda"
> +SRC_URI[sha256sum] = 
> "6338b715bf31c758606ffa489c7f87ee1beab947114fbd2ffefd73170a8c6b9a"
>  
> 
> -- 
> To stop receiving notification emails like this one, please contact
> the administrator of this repository.
> -- 
> ___
> Openembedded-commits mailing list
> openembedded-comm...@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-commits

-- 
Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com


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


Re: [OE-core] [meta-intel] [PATCH 2/2] gstreamer1.0-vaapi: Import from meta-intel

2016-12-06 Thread Ylinen, Mikko
Hi,

On Tue, Dec 6, 2016 at 12:48 PM, Burton, Ross  wrote:

>
> On 6 December 2016 at 09:57, Ylinen, Mikko  wrote:
>
>> This suggests the versions should be kept in sync with the gstreamer
>> versions:
>> http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/commit/
>> ?id=3f51f61efe93c104ba7996f54f381c6c1a5e6546
>>
>
> Khem sent a GStreamer upgrade a few days ago, so they'll all be merging at
> once.  gst-vaapi 1.8 doesn't build with gst 1.10 anyway.
>
>
OK, I had missed that. I only checked master was still using 1.8.x.

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


[OE-core] [PATCH 31/33] package_deb.bbclass: compress control.tar with the same algorithm as data.tar

2016-12-06 Thread Andreas Oberritter
Yields better compression with xz and fixes a problem invoking gzip.

Signed-off-by: Andreas Oberritter 
---
 meta/classes/package_deb.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index fb6034c..fa327dd 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -308,7 +308,7 @@ python do_package_deb () {
 conffiles.close()
 
 os.chdir(basedir)
-ret = subprocess.call("PATH=\"%s\" dpkg-deb -b %s %s" % 
(localdata.getVar("PATH", True), root, pkgoutdir), shell=True)
+ret = subprocess.call("PATH=\"%s\" dpkg-deb --uniform-compression -b 
%s %s" % (localdata.getVar("PATH", True), root, pkgoutdir), shell=True)
 if ret != 0:
 bb.utils.unlockfile(lf)
 bb.fatal("dpkg-deb execution failed")
-- 
2.7.4

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


[OE-core] [PATCH 33/33] apt: dselect depends on perl

2016-12-06 Thread Andreas Oberritter
Signed-off-by: Andreas Oberritter 
---
 meta/recipes-devtools/apt/apt_1.2.12.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb 
b/meta/recipes-devtools/apt/apt_1.2.12.bb
index 5dc50a4..0b640f9 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -110,7 +110,7 @@ do_install_append_class-target() {
 PACKAGES =+ "${PN}-dselect ${PN}-transport-https ${PN}-utils lib${PN}-inst 
lib${PN}-pkg"
 
 RDEPENDS_${PN} = "dpkg debianutils"
-RDEPENDS_${PN}-dselect = "bash"
+RDEPENDS_${PN}-dselect = "bash perl"
 
 RRECOMMENDS_${PN} = "gnupg"
 RRECOMMENDS_${PN}_class-native = ""
-- 
2.7.4

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


[OE-core] [PATCH 19/33] apt: recommend gnupg

2016-12-06 Thread Andreas Oberritter
Signed-off-by: Andreas Oberritter 
---
 meta/recipes-devtools/apt/apt_1.2.12.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb 
b/meta/recipes-devtools/apt/apt_1.2.12.bb
index 2c4f11d..4d781a2 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -109,6 +109,9 @@ PACKAGES =+ "${PN}-dselect ${PN}-transport-https 
${PN}-utils lib${PN}-inst lib${
 RDEPENDS_${PN} = "dpkg debianutils"
 RDEPENDS_${PN}-dselect = "bash"
 
+RRECOMMENDS_${PN} = "gnupg"
+RRECOMMENDS_${PN}_class-native = ""
+
 FILES_${PN} += "${libdir}/dpkg"
 FILES_${PN}-dselect = "${libdir}/dpkg/methods/apt"
 FILES_${PN}-transport-https = "${libdir}/apt/methods/https"
-- 
2.7.4

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


[OE-core] [PATCH 26/33] dpkg: remove unneeded do_configure override

2016-12-06 Thread Andreas Oberritter
Exporting PERL_LIBDIR is enough, compiler.m4 isn't needed.

Signed-off-by: Andreas Oberritter 
---
 meta/recipes-devtools/dpkg/dpkg.inc | 6 --
 1 file changed, 6 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc 
b/meta/recipes-devtools/dpkg/dpkg.inc
index be8c253..ff59f50 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -41,12 +41,6 @@ do_configure_prepend_class-native() {
 sed -i -e 's|SYSCONFDIR|"/etc"|' ${S}/utils/update-alternatives.c
 }
 
-do_configure () {
-echo >> ${S}/m4/compiler.m4
-sed -i -e 's#PERL_LIBDIR=.*$#PERL_LIBDIR="${libdir}/perl"#' ${S}/configure
-autotools_do_configure
-}
-
 do_install_append () {
if [ "${PN}" = "dpkg-native" ]; then
sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env 
nativeperl|' ${D}${bindir}/dpkg-*
-- 
2.7.4

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


[OE-core] [PATCH 24/33] dpkg: set license field to more common "GPLv2+"

2016-12-06 Thread Andreas Oberritter
Signed-off-by: Andreas Oberritter 
---
 meta/recipes-devtools/dpkg/dpkg.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc 
b/meta/recipes-devtools/dpkg/dpkg.inc
index 5b5ea01..2eabc30 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -1,6 +1,6 @@
 SUMMARY = "Package maintenance system from Debian"
-LICENSE = "GPLv2.0+"
 SECTION = "base"
+LICENSE = "GPLv2+"
 DEPENDS = "perl"
 DEPENDS_append_class-native = " bzip2-replacement-native"
 PROVIDES = "virtual/update-alternatives"
-- 
2.7.4

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


[OE-core] [PATCH 28/33] dpkg: update packages and files to match Debian more closely

2016-12-06 Thread Andreas Oberritter
Signed-off-by: Andreas Oberritter 
---
 meta/recipes-devtools/dpkg/dpkg.inc | 53 +
 1 file changed, 48 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc 
b/meta/recipes-devtools/dpkg/dpkg.inc
index 5e838ed..db37a7b 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -57,20 +57,63 @@ do_install_append () {
fi
 }
 
-PACKAGES =+ "start-stop-daemon update-alternatives-dpkg"
+PACKAGES =+ "dpkg-perl dselect libdpkg-perl start-stop-daemon 
update-alternatives-dpkg"
 
 RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} run-postinsts perl"
 RDEPENDS_${PN}_class-native = ""
 RRECOMMENDS_${PN} = "start-stop-daemon"
 RRECOMMENDS_${PN}_class-native = ""
+RSUGGESTS_${PN} = "apt"
 
-FILES_start-stop-daemon = "${base_sbindir}/start-stop-daemon"
+RDEPENDS_dpkg-perl = "binutils libdpkg-perl make xz"
+RRECOMMENDS_dpkg-perl = "gnupg gpgv"
+
+RDEPENDS_dselect = "dpkg"
+RSUGGESTS_dselect = "perl"
+
+RDEPENDS_libdpkg-perl = "dpkg libtimedate-perl perl"
+RRECOMMENDS_libdpkg-perl = "xz"
+RSUGGESTS_libdpkg-perl = "binutils gnupg gpgv"
 
-FILES_update-alternatives-dpkg = "${bindir}/update-alternatives 
${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
 RPROVIDES_update-alternatives-dpkg = "update-alternatives"
 RCONFLICTS_update-alternatives-dpkg = "update-alternatives"
 
-PACKAGES += "${PN}-perl"
-FILES_${PN}-perl = "${libdir}/perl"
+FILES_dpkg-perl = " \
+${bindir}/dpkg-architecture \
+${bindir}/dpkg-buildflags \
+${bindir}/dpkg-buildpackage \
+${bindir}/dpkg-checkbuilddeps \
+${bindir}/dpkg-distaddfile \
+${bindir}/dpkg-genchanges \
+${bindir}/dpkg-gencontrol \
+${bindir}/dpkg-gensymbols \
+${bindir}/dpkg-mergechangelogs \
+${bindir}/dpkg-name \
+${bindir}/dpkg-parsechangelog \
+${bindir}/dpkg-scanpackages \
+${bindir}/dpkg-scansources \
+${bindir}/dpkg-shlibdeps \
+${bindir}/dpkg-source \
+${bindir}/dpkg-vendor \
+${datadir}/dpkg/*.mk \
+"
+
+FILES_dselect = "${bindir}/dselect"
+
+FILES_libdpkg-perl = " \
+${libdir}/dpkg/parsechangelog \
+${libdir}/perl \
+"
+
+FILES_start-stop-daemon = "${base_sbindir}/start-stop-daemon"
+
+FILES_update-alternatives-dpkg = " \
+${sysconfdir}/alternatives \
+${bindir}/update-alternatives \
+${localstatedir}/lib/dpkg/alternatives \
+"
+
+PKG_dpkg-dev = "libdpkg-dev"
+PKG_dpkg-perl = "dpkg-dev"
 
 BBCLASSEXTEND = "native"
-- 
2.7.4

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


[OE-core] [PATCH 32/33] apt: fix rpath error during configure

2016-12-06 Thread Andreas Oberritter
| checking for shared library run path origin... /bin/sh: 
../apt-1.0.10.1/buildlib/config.rpath: No such file or directory

Signed-off-by: Andreas Oberritter 
---
 meta/recipes-devtools/apt/apt_1.2.12.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb 
b/meta/recipes-devtools/apt/apt_1.2.12.bb
index 4d781a2..5dc50a4 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -28,7 +28,10 @@ UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/"
 
 inherit autotools gettext useradd
 
+AUTOTOOLS_AUXDIR = "${S}/buildlib"
+
 EXTRA_AUTORECONF = "--exclude=autopoint,autoheader"
+EXTRA_OECONF = "--disable-rpath"
 
 PACKAGECONFIG ??= "lzma"
 PACKAGECONFIG[lzma] = 
"ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_easy_encoder=no,xz"
-- 
2.7.4

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


  1   2   >