[OE-core] [PATCH 1/1] oe-selftest: distrodata: change test_maintainers() to use tinfoil

2018-12-12 Thread Paul Eggleton
Use tinfoil to enumerate recipes and get the value of RECIPE_MAINTAINER
to make it a bit more reliable in the face of do_checkpkg issues we are
currently seeing on the Yocto Project autobuilder. This also makes it a
little less painful to re-execute test_maintainers() since you don't
have to wait for bitbake -c checkpkg to complete every time.

Note that the new test has been written in such a way that it will still
function if RECIPE_MAINTAINER values are ever moved to the recipes.
Also, the test still currently fails as there are recipes that don't
have an assigned maintainer.

Signed-off-by: Paul Eggleton 
---
 meta/lib/oeqa/selftest/cases/distrodata.py | 81 +-
 1 file changed, 34 insertions(+), 47 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/distrodata.py 
b/meta/lib/oeqa/selftest/cases/distrodata.py
index e7b5e349564..a862d30b10e 100644
--- a/meta/lib/oeqa/selftest/cases/distrodata.py
+++ b/meta/lib/oeqa/selftest/cases/distrodata.py
@@ -6,15 +6,6 @@ from oeqa.core.decorator.oeid import OETestID
 
 class Distrodata(OESelftestTestCase):
 
-@classmethod
-def setUpClass(cls):
-super(Distrodata, cls).setUpClass()
-feature = 'INHERIT += "distrodata"\n'
-feature += 'LICENSE_FLAGS_WHITELIST += " commercial"\n'
-
-cls.write_config(cls, feature)
-bitbake('-c checkpkg world')
-
 @OETestID(1902)
 def test_checkpkg(self):
 """
@@ -23,6 +14,11 @@ class Distrodata(OESelftestTestCase):
 Product: oe-core
 Author:  Alexander Kanavin 
 """
+feature = 'INHERIT += "distrodata"\n'
+feature += 'LICENSE_FLAGS_WHITELIST += " commercial"\n'
+self.write_config(feature)
+bitbake('-c checkpkg world')
+
 checkpkg_result = open(os.path.join(get_bb_var("LOG_DIR"), 
"checkpkg.csv")).readlines()[1:]
 regressed_failures = [pkg_data[0] for pkg_data in 
[pkg_line.split('\t') for pkg_line in checkpkg_result] if pkg_data[11] == 
'UNKNOWN_BROKEN']
 regressed_successes = [pkg_data[0] for pkg_data in 
[pkg_line.split('\t') for pkg_line in checkpkg_result] if pkg_data[11] == 
'KNOWN_BROKEN']
@@ -55,45 +51,36 @@ but their recipes claim otherwise by setting 
UPSTREAM_VERSION_UNKNOWN. Please re
  return True
 return False
 
-def is_in_oe_core(recipe, recipes):
-self.assertTrue(recipe in recipes.keys(), "Recipe %s was not in 
'bitbake-layers show-recipes' output" %(recipe))
-self.assertTrue(len(recipes[recipe]) > 0, "'bitbake-layers 
show-recipes' could not determine what layer(s) a recipe %s is in" %(recipe))
-try:
-recipes[recipe].index('meta')
-return True
-except ValueError:
-return False
+feature = 'require conf/distro/include/maintainers.inc\n'
+self.write_config(feature)
 
-def get_recipe_layers():
-import re
+with bb.tinfoil.Tinfoil() as tinfoil:
+tinfoil.prepare(config_only=False)
 
-recipes = {}
-recipe_regex = re.compile('^(?P.*):$')
-layer_regex = re.compile('^  (?P\S*) +')
-output = runCmd('bitbake-layers show-recipes').output
-for line in output.split('\n'):
-recipe_name_obj = recipe_regex.search(line)
-if recipe_name_obj:
-recipe_name = recipe_name_obj.group('name')
-recipes[recipe_name] = []
-recipe_layer_obj = layer_regex.search(line)
-if recipe_layer_obj:
-layer_name = recipe_layer_obj.group('name')
-recipes[recipe_name].append(layer_name)
-return recipes
+with_maintainer_list = []
+no_maintainer_list = []
+# We could have used all_recipes() here, but this method will find
+# every recipe if we ever move to setting RECIPE_MAINTAINER in 
recipe files
+# instead of maintainers.inc
+for fn in tinfoil.all_recipe_files(variants=False):
+if not '/meta/recipes-' in fn:
+# We are only interested in OE-Core
+continue
+rd = tinfoil.parse_recipe_file(fn, appends=False)
+pn = rd.getVar('PN')
+if is_exception(pn):
+continue
+if rd.getVar('RECIPE_MAINTAINER'):
+with_maintainer_list.append((pn, fn))
+else:
+no_maintainer_list.append((pn, fn))
 
-checkpkg_result = open(os.path.join(get_bb_var("LOG_DIR"), 
"checkpkg.csv")).readlines()[1:]
-recipes_layers = get_recipe_layers()
-no_maintainer_list = [pkg_data[0] for pkg_data in 
[pkg_line.split('\t') for pkg_line in checkpkg_result] \
-if pkg_data[14] == '' and is_in_oe_core(pkg_data[0], 
recipes_layers) and not is_excep

[OE-core] [PATCH 0/1] oe-selftest: distrodata: change test_maintainers() to use tinfoil

2018-12-12 Thread Paul Eggleton
The following changes since commit 8bc0d2f2197430723f8b2d0785169e48c883eedb:

  mdadm: Drop redundant patches and fix build with clang (2018-12-09 11:08:07 
+)

are available in the Git repository at:

  git://git.openembedded.org/openembedded-core-contrib 
paule/distrodata-selftest-fix
  
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/distrodata-selftest-fix

Paul Eggleton (1):
  oe-selftest: distrodata: change test_maintainers() to use tinfoil

 meta/lib/oeqa/selftest/cases/distrodata.py | 81 +-
 1 file changed, 34 insertions(+), 47 deletions(-)

-- 
2.17.2

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


Re: [OE-core] [PATCH 1/4] base.bbclass: Remove invalid ccache related code

2018-12-12 Thread Robert Yang



On 12/11/18 6:12 PM, Robert Yang wrote:

Hi RP,

On 12/11/18 5:44 PM, richard.pur...@linuxfoundation.org wrote:

On Tue, 2018-12-11 at 17:24 +0800, Robert Yang wrote:


[snip]


I did a test:

$ ln -s /usr/bin/ccache /folk/lyang1/bin/gcc
I got errors with/without the code:

$ bitbake -p
bb.BBHandledException
ERROR: Error running gcc  --version:


I've sent a patch to fix/explain this problem:

[OE-core] [PATCH 0/1] lib/oe/utils: Set stderr for host_gcc_version()


// Robert



$ ls -l tmp/hosttools/gcc
tmp/hosttools/gcc -> /folk/lyang1/bin/gcc

$ ls -l /folk/lyang1/bin/gcc
/folk/lyang1/bin/gcc -> /usr/bin/ccache

It worked well if I run gcc --version manually:
$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
$ echo $?
0

There must be something wrong in such a case. I will fix this later.

Let's get back to he code:

     srctool = bb.utils.which(path, tool, executable=True)
     if "ccache" in srctool:
     srctool = bb.utils.which(path, tool, executable=True, 
direction=1)
     if srctool:
     os.symlink(srctool, desttool)


* If tool == "gcc", then srctool would be gcc, too.
* If tool == "ccache", then srctool would be ccache, too.

So I think that the code doesn't help when gcc links to ccache ?

// Robert



Cheers,

Richard





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


[OE-core] [PATCH 0/1] lib/oe/utils: Set stderr for host_gcc_version()

2018-12-12 Thread Robert Yang
The following changes since commit 8bc0d2f2197430723f8b2d0785169e48c883eedb:

  mdadm: Drop redundant patches and fix build with clang (2018-12-09 11:08:07 
+)

are available in the git repository at:

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

Robert Yang (1):
  lib/oe/utils: Set stderr for host_gcc_version()

 meta/lib/oe/utils.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.7.4

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


[OE-core] [PATCH 1/1] lib/oe/utils: Set stderr for host_gcc_version()

2018-12-12 Thread Robert Yang
Fixed:
$ ln -s /usr/bin/ccache /folk/lyang1/bin/gcc
$ rm -fr tmp/hosttools/ && bitbake -p
[snip]
ERROR: Error running gcc  --version:

It didn't print the error message, now it is:
ERROR: Error running gcc  --version: ccache: error: Could not find compiler 
"gcc" in PATH

For the error itself, it is because ccache is not in my HOSTTOOLS, so this is
an expected error.

Signed-off-by: Robert Yang 
---
 meta/lib/oe/utils.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 8a584d6..29b4115 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -366,7 +366,8 @@ def host_gcc_version(d, taskcontextonly=False):
 try:
 env = os.environ.copy()
 env["PATH"] = d.getVar("PATH")
-output = subprocess.check_output("%s --version" % compiler, 
shell=True, env=env).decode("utf-8")
+output = subprocess.check_output("%s --version" % compiler, \
+shell=True, env=env, 
stderr=subprocess.STDOUT).decode("utf-8")
 except subprocess.CalledProcessError as e:
 bb.fatal("Error running %s --version: %s" % (compiler, 
e.output.decode("utf-8")))
 
-- 
2.7.4

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


Re: [OE-core] [PATCH 2/4] ccache.bbclass: Refactor it to make it more reliable

2018-12-12 Thread Robert Yang

Hi Martin

On 12/10/18 4:55 PM, Martin Hundebøll wrote:

Hi Robert,

Just a small nit-pick below..

On 10/12/2018 03.24, Robert Yang wrote:

The previous ccache.bbclass has the following problems:
- It uses host's ccache for native recipes, but this may not work on some
   hosts, for example, it nerver works on my Ubuntu 14.04.4, there are always
   build failures (m4-native failed at do_configure, and others will also be
   failed if I disable CCACHE for m4-native)

- native/nativesdk/cross/crosssdk recipes use host's ccahe, but target uses
   ccache-native, this may confuse user.

- The target recipes may use both host's ccache and ccache-native, this may
   cause unexpected problems and hard to debug. This is because ccache-native is
   in SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS, so ccache-native may not be present when
   rebuild target recipes, and then it would use hosttools/ccache, but the
   previous ccache files were generated by ccache-native.

- Target recipes can't use ccache when no ccahe is installed on the host:
   CCACHE = "${@bb.utils.which(d.getVar('PATH'), 'ccache') and 'ccache '}"

After refactored:
All types recipes (native, target and others) will use ccache-native except
ccache-native's dependencies, host's cache won't be used any more. It is more
reliable now, which will work everywhere when ccache-native can be built.

And now we need use "CCACHE_DISABLE = '1'" to disable ccahe for the recipe
rather than "CCACHE = ''" since we set CCACHE in anonymous function, and
d.getVar('CCACHE') works after "CCACHE ??=" which is set in bitbake.conf, so we
can't check whether CCACHE is set or not in anonymous function since it is
always set. Use CCACHE_DISABLE to disable it would be more clear.

Signed-off-by: Robert Yang 
---
  meta/classes/ccache.bbclass | 25 ++---
  meta/conf/bitbake.conf  | 21 -
  meta/conf/layer.conf    |  1 -
  meta/lib/oe/utils.py    |  3 +++
  meta/recipes-devtools/ccache/ccache.inc |  2 ++
  5 files changed, 43 insertions(+), 9 deletions(-)






diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 8a584d6..9c41705 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -363,6 +363,9 @@ def host_gcc_version(d, taskcontextonly=False):
  return
  compiler = d.getVar("BUILD_CC")
+    # Get rid of ccache since it is not present when parsing.
+    if compiler.startswith('ccache '):
+    compiler = compiler[7:]


You can avoid the if-condition and hard-coded 7-value by doing:

   # Get rid of ccache since it is no present when parsing.
   compiler = d.getVar("BUILD_CC").lstrip("ccache-")


I'm afraid that this may not work, lstrip("ccache-") strips any characters
of 'ccache-' (c, a, h e -), which seems dangerous, and not what we want.
I've will revert it in V2's PULL.

// Robert



// Martin


  try:
  env = os.environ.copy()
  env["PATH"] = d.getVar("PATH")
diff --git a/meta/recipes-devtools/ccache/ccache.inc 
b/meta/recipes-devtools/ccache/ccache.inc

index 6566328..259c196 100644
--- a/meta/recipes-devtools/ccache/ccache.inc
+++ b/meta/recipes-devtools/ccache/ccache.inc
@@ -9,6 +9,8 @@ LICENSE = "GPLv3+"
  DEPENDS = "zlib"
+DEPENDS_class-native = "${CCACHE_NATIVE_DEPENDS}"
+
  SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.xz";
  inherit autotools




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


Re: [OE-core] [PATCH 2/6] ccache.bbclass: Refactor it to make it more reliable

2018-12-12 Thread Robert Yang




On 12/12/18 2:59 PM, Robert Yang wrote:

The previous ccache.bbclass has the following problems:
- It uses host's ccache for native recipes, but this may not work on some
   hosts, for example, it nerver works on my Ubuntu 14.04.4, there are always
   build failures (m4-native failed at do_configure, and others will also be
   failed if I disable CCACHE for m4-native)

- native/nativesdk/cross/crosssdk recipes use host's ccahe, but target uses
   ccache-native, this may confuse user.

- The target recipes may use both host's ccache and ccache-native, this may
   cause unexpected problems and hard to debug. This is because ccache-native is
   in SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS, so ccache-native may not be present when
   rebuild target recipes, and then it would use hosttools/ccache, but the
   previous ccache files were generated by ccache-native.

- Target recipes can't use ccache when no ccahe is installed on the host:
   CCACHE = "${@bb.utils.which(d.getVar('PATH'), 'ccache') and 'ccache '}"

After refactored:
All types recipes (native, target and others) will use ccache-native except
ccache-native itself, host's cache won't be used any more. It is more
reliable now, which will work everywhere when ccache-native can be built.

And now we need use "CCACHE_DISABLE = '1'" to disable ccahe for the recipe
rather than "CCACHE = ''" since we set CCACHE in anonymous function, and
d.getVar('CCACHE') works after "CCACHE ??=" which is set in bitbake.conf, so we
can't check whether CCACHE is set or not in anonymous function since it is
always set. Use CCACHE_DISABLE to disable it would be more clear.

Signed-off-by: Robert Yang 
---
  meta/classes/ccache.bbclass | 25 ++---
  meta/conf/bitbake.conf  |  6 +-
  meta/conf/layer.conf|  1 -
  meta/lib/oe/utils.py|  3 ++-
  4 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index 9609020..59e1022 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -1,4 +1,14 @@
-CCACHE = "${@bb.utils.which(d.getVar('PATH'), 'ccache') and 'ccache '}"
+#
+# Usage:
+# - Enable ccache
+#   Add the following line to a conffile such as conf/local.conf:
+#   INHERIT += "ccache"
+#
+# - Disable ccache for a recipe
+#   Add the following line to the recipe if it can't be built with ccache:
+#   CCACHE_DISABLE = '1'
+#
+
  export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_TARGET_SYS}/${PN}"
  
  # We need to stop ccache considering the current directory or the

@@ -7,5 +17,14 @@ export CCACHE_DIR ?= 
"${TMPDIR}/ccache/${MULTIMACH_TARGET_SYS}/${PN}"
  # ${PV} or ${PR} change.
  export CCACHE_NOHASHDIR ?= "1"
  
-DEPENDS_append_class-target = " ccache-native"

-DEPENDS[vardepvalueexclude] = " ccache-native"
+python() {
+"""
+Enable ccache for the recipe
+"""
+pn = d.getVar('PN')
+# quilt-native doesn't need ccache since no c files
+if not (pn in ('ccache-native', 'quilt-native') or
+bb.utils.to_boolean(d.getVar('CCACHE_DISABLE'))):
+d.appendVar('DEPENDS', ' ccache-native')
+d.setVar('CCACHE', 'ccache ')
+}
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 6480062..c88d66c 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -492,7 +492,7 @@ HOSTTOOLS += " \
  HOSTTOOLS += "${@'ip ping ps scp ssh stty' if (bb.utils.contains_any('IMAGE_CLASSES', 'testimage testsdk', True, False, d) 
or any(x in (d.getVar("BBINCLUDED") or "") for x in ["testimage.bbclass", 
"testsdk.bbclass"])) else ''}"
  
  # Link to these if present

-HOSTTOOLS_NONFATAL += "aws ccache gcc-ar gpg ld.bfd ld.gold nc pigz sftp socat ssh 
sudo"
+HOSTTOOLS_NONFATAL += "aws gcc-ar gpg ld.bfd ld.gold nc pigz sftp socat ssh 
sudo"
  
  # Temporary add few more detected in bitbake world

  HOSTTOOLS_NONFATAL += "join nl size yes zcat"
@@ -504,10 +504,6 @@ HOSTTOOLS_NONFATAL += "bzr"
  HOSTTOOLS_NONFATAL += "scp"
  
  CCACHE ??= ""

-# ccache < 3.1.10 will create CCACHE_DIR on startup even if disabled, and
-# autogen sets HOME=/dev/null so in certain situations builds can fail.
-# Explicitly export CCACHE_DIR until we can assume ccache >3.1.10 on the host.
-export CCACHE_DIR ??= "${@os.getenv('HOME')}/.ccache"
  
  TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
  
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf

index c67dec4..4141d6c 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -49,7 +49,6 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
*->quilt-native \
*->subversion-native \
*->git-native \
-  *->ccache-native \
*->icecc-create-env-native \
gcc-cross-${TARGET_ARCH}->virtual/${TARGET_PREFIX}libc-for-gcc \
gcc-cross-${TARGET_ARCH}->linux-libc-headers \
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 8a584d6..a64f16c 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -362,7 +362,8 @@ def host_gcc_version(d, taskcontextonly=False):
  

Re: [OE-core] [PATCH 5/6] base.bbclass: Add comments for gcc links to ccache

2018-12-12 Thread Robert Yang

Hi Christopher,

On 12/12/18 11:50 PM, Christopher Larson wrote:
This should probably remove the dirname srctool from path and check again with 
the same direction, rather than reversing it, in case the toolchain is in 
multiple locations in PATH, as  you’re flipping the PATH priority order doing it 
this way. I realize you’re just updating the description, not the code, so just 
a random th ought for the future here..


The problem is I don't know whether the code is also used for fixing other
cases. So I'm leaning to keep it as the current status since it works.

// Robert



On Tue, Dec 11, 2018 at 11:44 PM Robert Yang > wrote:


Signed-off-by: Robert Yang mailto:liezhi.y...@windriver.com>>
---
  meta/classes/base.bbclass | 4 
  1 file changed, 4 insertions(+)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e715ffa..e6af673 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -122,6 +122,10 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True):
          desttool = os.path.join(dest, tool)
          if not os.path.exists(desttool):
              srctool = bb.utils.which(path, tool, executable=True)
+            # gcc/g++ may link to ccache on some hosts, e.g.,
+            # /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then which(gcc)
+            # would return /usr/local/bin/ccache/gcc, but what we need is
+            # /usr/bin/gcc, this code can check and fix that.
              if "ccache" in srctool:
                  srctool = bb.utils.which(path, tool, executable=True,
direction=1)
              if srctool:
-- 
2.7.4


-- 
___

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

http://lists.openembedded.org/mailman/listinfo/openembedded-core



--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

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


Re: [OE-core] [PATCH V3] dbus: fix ptest failure

2018-12-12 Thread Changqing Li

Ping

On 11/22/18 3:29 PM, Changqing Li wrote:

Ping

On 11/5/18 11:28 AM, changqing...@windriver.com wrote:

From: Changqing Li 

1. since one bug in run-ptest, testcase test-bus have never been
actually run (althrough it's result is PASS).

After commit 0828850, test-bus can actually run but it
did not install:
   test-service, test-shell-service, test-segfault, and
   dbus-daemon-launch-helper-test
Add the configure flag:
   --enable-embedded-tests
to generate binary dbus-daemon-launch-helper-test, then install
them so that test-bus will now pass.

2. fix testcase test-dbus-daemon failed
we enable --enable-verbose-mode in recipe dbus-test, and don't
enable it in recipe dbus. This will make below test code get
unexpect result of have_verbose and assert.
disable --enable-verbose-mode for recipe dbus-test to fix it.

  #ifdef DBUS_ENABLE_STATS
   g_assert_true (have_stats);
  #else
   g_assert_false (have_stats);
  #endif

Signed-off-by: Changqing Li 
---
  meta/recipes-core/dbus/dbus-test_1.12.10.bb | 12 +---
  meta/recipes-core/dbus/dbus/run-ptest   | 16 
  2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus-test_1.12.10.bb 
b/meta/recipes-core/dbus/dbus-test_1.12.10.bb

index 25b9395..ec9b9e2 100644
--- a/meta/recipes-core/dbus/dbus-test_1.12.10.bb
+++ b/meta/recipes-core/dbus/dbus-test_1.12.10.bb
@@ -33,13 +33,13 @@ EXTRA_OECONF = "--enable-tests \
  --enable-installed-tests \
  --enable-checks \
  --enable-asserts \
-    --enable-verbose-mode \
  --enable-largefile \
  --disable-xml-docs \
  --disable-doxygen-docs \
  --disable-libaudit \
  --with-dbus-test-dir=${PTEST_PATH} \
-    ${EXTRA_OECONF_X}"
+    ${EXTRA_OECONF_X} \
+    --enable-embedded-tests"
    EXTRA_OECONF_append_class-target = " 
SYSTEMCTL=${base_bindir}/systemctl"

  @@ -50,6 +50,7 @@ PACKAGECONFIG_class-nativesdk = ""
  PACKAGECONFIG[systemd] = "--enable-systemd 
--with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd 
--without-systemdsystemunitdir,systemd"
  PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x 
--disable-x11-autolaunch, virtual/libx11 libsm"
  PACKAGECONFIG[user-session] = "--enable-user-session 
--with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"

+PACKAGECONFIG[verbose-mode] = "--enable-verbose-mode,,,"
    do_install() {
  :
@@ -58,9 +59,14 @@ do_install() {
  do_install_ptest() {
  install -d ${D}${PTEST_PATH}/test
  l="shell printf refs syslog marshal syntax corrupt dbus-daemon 
dbus-daemon-eavesdrop loopback relay \
-   variant uid-permissions syntax spawn sd-activation names 
monitor message fdpass "
+   variant uid-permissions syntax spawn sd-activation names 
monitor message fdpass service shell-service"
  for i in $l; do install ${B}/test/.libs/test-$i 
${D}${PTEST_PATH}/test; done

  +    install -d ${D}${PTEST_PATH}/bus
+    install ${B}/bus/.libs/dbus-daemon-launch-helper-test 
${D}${PTEST_PATH}/bus

+
+    install ${B}/test/test-segfault ${D}${PTEST_PATH}/test
+
  l="bus bus-system bus-launch-helper"
  for i in $l; do install ${B}/bus/.libs/test-$i 
${D}${PTEST_PATH}/test; done
  diff --git a/meta/recipes-core/dbus/dbus/run-ptest 
b/meta/recipes-core/dbus/dbus/run-ptest

index 353ba1e..e7e1c1e 100755
--- a/meta/recipes-core/dbus/dbus/run-ptest
+++ b/meta/recipes-core/dbus/dbus/run-ptest
@@ -17,8 +17,16 @@ export LD_LIBRARY_PATH=@PTEST_PATH@/test/.libs
  files=`ls test/test-*`
    for i in $files
-    do
-    ./$i ./test/data >/dev/null
-    output
-    done
+do
+ #these programs are used by testcase test-bus, don't run here
+ if [ $i = "test/test-service" ] \
+    || [ $i = "test/test-shell-service" ] \
+    || [ $i = "test/test-segfault" ]
+ then
+ continue
+ fi
+
+ ./$i ./test/data >/dev/null 2>&1
+ output
+done



--
BRs

Sandy(Li Changqing)

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


[OE-core] [OE-Core][PATCH] uboot-sign.bbclass: silence warnings when UBOOT_DTB_BINARY is empty

2018-12-12 Thread Alex Kiernan
When UBOOT_DTB_BINARY is set to "", the keys for signed booting are
expected to be already present in U-Boot's DTB, so don't issue warnings
for this.

Signed-off-by: Alex Kiernan 
---

 meta/classes/uboot-sign.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass
index 03100b8a5fa1..9e3d1d6fc1ad 100644
--- a/meta/classes/uboot-sign.bbclass
+++ b/meta/classes/uboot-sign.bbclass
@@ -70,7 +70,7 @@ concat_dtb() {
elif [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e 
"$deployed_uboot_dtb_binary" ]; then
cd ${DEPLOYDIR}
cat ${UBOOT_NODTB_IMAGE} $deployed_uboot_dtb_binary | 
tee ${B}/${UBOOT_BINARY} > ${UBOOT_IMAGE}
-   else
+   elif [ -n "${UBOOT_DTB_BINARY}" ]; then
bbwarn "Failure while adding public key to u-boot 
binary. Verified boot won't be available."
fi
fi
@@ -86,7 +86,7 @@ do_install_append() {
# need both of them.
install ${B}/${UBOOT_DTB_BINARY} 
${D}${datadir}/${UBOOT_DTB_IMAGE}
ln -sf ${UBOOT_DTB_IMAGE} 
${D}${datadir}/${UBOOT_DTB_BINARY}
-   else
+   elif [ -n "${UBOOT_DTB_BINARY}" ]; then
bbwarn "${B}/${UBOOT_DTB_BINARY} not found"
fi
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 5/6] base.bbclass: Add comments for gcc links to ccache

2018-12-12 Thread Christopher Larson
This should probably remove the dirname srctool from path and check again
with the same direction, rather than reversing it, in case the toolchain is
in multiple locations in PATH, as  you’re flipping the PATH priority order
doing it this way. I realize you’re just updating the description, not the
code, so just a random th ought for the future here..

On Tue, Dec 11, 2018 at 11:44 PM Robert Yang 
wrote:

> Signed-off-by: Robert Yang 
> ---
>  meta/classes/base.bbclass | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index e715ffa..e6af673 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -122,6 +122,10 @@ def setup_hosttools_dir(dest, toolsvar, d,
> fatal=True):
>  desttool = os.path.join(dest, tool)
>  if not os.path.exists(desttool):
>  srctool = bb.utils.which(path, tool, executable=True)
> +# gcc/g++ may link to ccache on some hosts, e.g.,
> +# /usr/local/bin/ccache/gcc -> /usr/bin/ccache, then
> which(gcc)
> +# would return /usr/local/bin/ccache/gcc, but what we need is
> +# /usr/bin/gcc, this code can check and fix that.
>  if "ccache" in srctool:
>  srctool = bb.utils.which(path, tool, executable=True,
> direction=1)
>  if srctool:
> --
> 2.7.4
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] [PATCH] python-setuptools:upgrade to 40.6.2

2018-12-12 Thread Burton, Ross
Upgrade python3-setuptools too as this breaks that recipe.

Ross
On Wed, 12 Dec 2018 at 00:39, Hong Liu  wrote:
>
> 1.Upgrade python-setuptools from 40.0.0 to 40.6.2
>
> Signed-off-by: Hong Liu 
> ---
>  meta/recipes-devtools/python/python-setuptools.inc| 4 ++--
>  ...ython-setuptools_40.0.0.bb => python-setuptools_40.6.2.bb} | 0
>  2 files changed, 2 insertions(+), 2 deletions(-)
>  rename meta/recipes-devtools/python/{python-setuptools_40.0.0.bb => 
> python-setuptools_40.6.2.bb} (100%)
>
> diff --git a/meta/recipes-devtools/python/python-setuptools.inc 
> b/meta/recipes-devtools/python/python-setuptools.inc
> index 315ba31396..fc89eefffd 100644
> --- a/meta/recipes-devtools/python/python-setuptools.inc
> +++ b/meta/recipes-devtools/python/python-setuptools.inc
> @@ -10,8 +10,8 @@ inherit pypi
>
>  SRC_URI_append_class-native = " 
> file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
>
> -SRC_URI[md5sum] = "260630ae1a64bafa39dcc53404d63829"
> -SRC_URI[sha256sum] = 
> "012adb8e25fbfd64c652e99e7bab58799a3aaf05d39ab38561f69190a909015f"
> +SRC_URI[md5sum] = "1c45c7d66dc84ae4ee36581dc9e5359b"
> +SRC_URI[sha256sum] = 
> "86bb4d8e1b0fabad1f4642b64c335b673e53e7a381de03c9a89fe678152c4c64"
>
>  DEPENDS += "${PYTHON_PN}"
>
> diff --git a/meta/recipes-devtools/python/python-setuptools_40.0.0.bb 
> b/meta/recipes-devtools/python/python-setuptools_40.6.2.bb
> similarity index 100%
> rename from meta/recipes-devtools/python/python-setuptools_40.0.0.bb
> rename to meta/recipes-devtools/python/python-setuptools_40.6.2.bb
> --
> 2.17.2
>
>
>
> --
> ___
> 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] kern-tools: modify grep pattern for tools/kconf_check

2018-12-12 Thread Hongzhi.Song
The cmd line, , can't
match all expect config options.

This is because that it is not always space after 'config'
in kernel-source/*/.../Kconfig.
e.g. "config  IP_VS_IPV6" in net/netfilter/ipvs/Kconfig
^^
These are not spaces.

So we should change the cmd to grep '^[  ]*\(menu\)*config\s'.

License-Update: 

Signed-off-by: Hongzhi.Song 
---
 ...0001-tool-kconf_check-modify-grep-pattern.patch | 37 ++
 .../kern-tools/kern-tools-native_git.bb| 13 +---
 2 files changed, 46 insertions(+), 4 deletions(-)
 create mode 100644 
meta/recipes-kernel/kern-tools/files/0001-tool-kconf_check-modify-grep-pattern.patch

diff --git 
a/meta/recipes-kernel/kern-tools/files/0001-tool-kconf_check-modify-grep-pattern.patch
 
b/meta/recipes-kernel/kern-tools/files/0001-tool-kconf_check-modify-grep-pattern.patch
new file mode 100644
index 000..7f9c5a2
--- /dev/null
+++ 
b/meta/recipes-kernel/kern-tools/files/0001-tool-kconf_check-modify-grep-pattern.patch
@@ -0,0 +1,37 @@
+From 080a0662e235bb359ef06f6ba922f56a6040078f Mon Sep 17 00:00:00 2001
+From: "Hongzhi.Song" 
+Date: Tue, 11 Dec 2018 04:54:59 -0500
+Subject: [PATCH] tool/kconf_check: modify grep pattern
+
+The cmd line, , can't
+match all expect config options.
+
+This is because that it is not always space after 'config'
+in kernel-source/*/.../Kconfig.
+e.g. "config  IP_VS_IPV6" in net/netfilter/ipvs/Kconfig
+
+So we should change the cmd to grep '^[  ]*\(menu\)*config\s'.
+
+Upstream-Status: Submitted 
[https://lists.yoctoproject.org/pipermail/yocto/2018-December/043564.html]
+
+Signed-off-by: Hongzhi.Song 
+---
+ tools/kconf_check | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/kconf_check b/tools/kconf_check
+index aa86180..20b49cd 100755
+--- a/tools/kconf_check
 b/tools/kconf_check
+@@ -241,7 +241,7 @@ find ${kernel_source} \
+ # known list of all Kconfig* files.  Again, must filter dups.
+ rm -f ${LOGDIR}/all.cfg
+ for i in `cat ${LOGDIR}/all.kcf` ; do
+-cat ${kernel_source}/$i | grep '^[]*\(menu\)*config ' | \
++cat ${kernel_source}/$i | grep '^[]*\(menu\)*config\s' | \
+   awk '{print "CONFIG_"$2}' >> ${LOGDIR}/all.cfg
+ done
+ mv -f ${LOGDIR}/all.cfg ${LOGDIR}/all.cfg~
+-- 
+2.8.1
+
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb 
b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index b353c21..682c726 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -1,6 +1,6 @@
 SUMMARY = "Tools for managing Yocto Project style branched kernels"
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = 
"file://git/tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1bda400e2828845ba0d06c"
+LIC_FILES_CHKSUM = 
"file://tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1bda400e2828845ba0d06c"
 
 DEPENDS = "git-native"
 
@@ -10,8 +10,11 @@ PV = "0.2+git${SRCPV}"
 
 inherit native
 
-SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git"
-S = "${WORKDIR}"
+SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git \
+   file://0001-tool-kconf_check-modify-grep-pattern.patch \
+"
+
+S = "${WORKDIR}/git"
 UPSTREAM_CHECK_COMMITS = "1"
 
 do_compile() { 
@@ -19,6 +22,8 @@ do_compile() {
 }
 
 do_install() {
-   cd ${S}/git
+   cd ${S}
make DESTDIR=${D}${bindir} install
 }
+
+FILESEXTRAPATH = "${THISDIR}/files"
-- 
2.8.1

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


[OE-core] ✗ patchtest: failure for kern-tools: modify grep pattern for tools/kconf_check

2018-12-12 Thread Patchwork
== Series Details ==

Series: kern-tools: modify grep pattern for tools/kconf_check
Revision: 1
URL   : https://patchwork.openembedded.org/series/15309/
State : failure

== Summary ==


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



* Issue LIC_FILES_CHKSUM changed on target kern-tools-native but 
there is no "License-Update" tag in commit message 
[test_lic_files_chksum_modified_not_mentioned] 
  Suggested fixInclude "License-Update: " into the commit 
message with a brief description
  Current checksum 
file://git/tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1bda400e2828845ba0d06c
  New checksum 
file://tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1bda400e2828845ba0d06c

* Issue Upstream-Status is Submitted, but it is not mentioned where 
[test_upstream_status_presence_format] 
  Suggested fixInclude where 
0001-tool-kconf_check-modify-grep-pattern.patch was submitted
  Current  Upstream-Status: Submitted
  Standard format  Upstream-Status: Submitted [where]



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

---
Guidelines: 
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

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


[OE-core] [PATCH] kern-tools: modify grep pattern for tools/kconf_check

2018-12-12 Thread Hongzhi.Song
The cmd line, , can't
match all expect config options.

This is because that it is not always space after 'config'
in kernel-source/*/.../Kconfig.
e.g. "config  IP_VS_IPV6" in net/netfilter/ipvs/Kconfig
^^
These are not spaces.

So we should change the cmd to grep '^[  ]*\(menu\)*config\s'.

Signed-off-by: Hongzhi.Song 
---
 ...0001-tool-kconf_check-modify-grep-pattern.patch | 38 ++
 .../kern-tools/kern-tools-native_git.bb| 13 +---
 2 files changed, 47 insertions(+), 4 deletions(-)
 create mode 100644 
meta/recipes-kernel/kern-tools/files/0001-tool-kconf_check-modify-grep-pattern.patch

diff --git 
a/meta/recipes-kernel/kern-tools/files/0001-tool-kconf_check-modify-grep-pattern.patch
 
b/meta/recipes-kernel/kern-tools/files/0001-tool-kconf_check-modify-grep-pattern.patch
new file mode 100644
index 000..a2b110f
--- /dev/null
+++ 
b/meta/recipes-kernel/kern-tools/files/0001-tool-kconf_check-modify-grep-pattern.patch
@@ -0,0 +1,38 @@
+From 080a0662e235bb359ef06f6ba922f56a6040078f Mon Sep 17 00:00:00 2001
+From: "Hongzhi.Song" 
+Date: Tue, 11 Dec 2018 04:54:59 -0500
+Subject: [PATCH] tool/kconf_check: modify grep pattern
+
+The cmd line, , can't
+match all expect config options.
+
+This is because that it is not always space after 'config'
+in kernel-source/*/.../Kconfig.
+e.g. "config  IP_VS_IPV6" in net/netfilter/ipvs/Kconfig
+
+So we should change the cmd to grep '^[  ]*\(menu\)*config\s'.
+
+Upstream-Status: Submitted
+https://lists.yoctoproject.org/pipermail/yocto/2018-December/043564.html
+
+Signed-off-by: Hongzhi.Song 
+---
+ tools/kconf_check | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/kconf_check b/tools/kconf_check
+index aa86180..20b49cd 100755
+--- a/tools/kconf_check
 b/tools/kconf_check
+@@ -241,7 +241,7 @@ find ${kernel_source} \
+ # known list of all Kconfig* files.  Again, must filter dups.
+ rm -f ${LOGDIR}/all.cfg
+ for i in `cat ${LOGDIR}/all.kcf` ; do
+-cat ${kernel_source}/$i | grep '^[]*\(menu\)*config ' | \
++cat ${kernel_source}/$i | grep '^[]*\(menu\)*config\s' | \
+   awk '{print "CONFIG_"$2}' >> ${LOGDIR}/all.cfg
+ done
+ mv -f ${LOGDIR}/all.cfg ${LOGDIR}/all.cfg~
+-- 
+2.8.1
+
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb 
b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index b353c21..682c726 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -1,6 +1,6 @@
 SUMMARY = "Tools for managing Yocto Project style branched kernels"
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = 
"file://git/tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1bda400e2828845ba0d06c"
+LIC_FILES_CHKSUM = 
"file://tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1bda400e2828845ba0d06c"
 
 DEPENDS = "git-native"
 
@@ -10,8 +10,11 @@ PV = "0.2+git${SRCPV}"
 
 inherit native
 
-SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git"
-S = "${WORKDIR}"
+SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git \
+   file://0001-tool-kconf_check-modify-grep-pattern.patch \
+"
+
+S = "${WORKDIR}/git"
 UPSTREAM_CHECK_COMMITS = "1"
 
 do_compile() { 
@@ -19,6 +22,8 @@ do_compile() {
 }
 
 do_install() {
-   cd ${S}/git
+   cd ${S}
make DESTDIR=${D}${bindir} install
 }
+
+FILESEXTRAPATH = "${THISDIR}/files"
-- 
2.8.1

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