[OE-core] [PATCH v4 3/4] util-linux: Use PTEST binary directory

2019-04-08 Thread Mariano Lopez
Some binaries generated by util-linux will be replaced by core-utils
in the final image by update-alternatives, so use a dedicated directory
with symlinks to avoid using a binary generated by another package.

This will solve the issue with the ptest runner timing out when
running the kill ptests for util-linux.

[YOCTO #13238]

Signed-off-by: Mariano Lopez 
---
 meta/recipes-core/util-linux/util-linux.inc   | 5 +++--
 meta/recipes-core/util-linux/util-linux/run-ptest | 4 
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index 18c3af240e..a67318e84e 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -284,6 +284,7 @@ ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
 
 BBCLASSEXTEND = "native nativesdk"
 
+PTEST_BINDIR = "1"
 do_compile_ptest() {
 oe_runmake buildtest-TESTS
 }
@@ -312,8 +313,8 @@ do_install_ptest() {
 
'/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 
2>/dev/null`|g' \
  ${D}${PTEST_PATH}/tests/functions.sh
 
-# "kill -L" behaves differently than "/bin/kill -L" so we need an 
additional fix
+# Running "kill" without the the complete path would use the shell's 
built-in kill
 sed -i -e \
- '/^TS_CMD_KILL/ s|kill|/bin/kill|g' \
+ '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \
  ${D}${PTEST_PATH}/tests/commands.sh
 }
diff --git a/meta/recipes-core/util-linux/util-linux/run-ptest 
b/meta/recipes-core/util-linux/util-linux/run-ptest
index fbc2f9b56a..2178ab8fef 100644
--- a/meta/recipes-core/util-linux/util-linux/run-ptest
+++ b/meta/recipes-core/util-linux/util-linux/run-ptest
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+current_path=$(readlink -f $0)
+export bindir=$(dirname $current_path)
+export PATH=$bindir/bin:$PATH
+
 cd tests || exit 1  
 
 comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" |  sort)
-- 
2.19.2

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


[OE-core] [PATCH v4 2/4] ptest.bbclass: Add feature to populate a binary directory

2019-04-08 Thread Mariano Lopez
This adds the functionality to create a binary directory within
PTEST_PATH directory. This directory will be populated with
symlinks pointing to the binaries installed by the package and
then renamed by update-alternatives. This way the ptest only needs
to source this binary directory in order to use the expected
binaries.

To enable this feature just add PTEST_BINDIR = "1" to the recipe.

[YOCTO #12597]
[YOCTO #13238]

Signed-off-by: Mariano Lopez 
---
 meta/classes/ptest.bbclass | 32 
 1 file changed, 32 insertions(+)

diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 97865c9338..e87a9659cb 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -65,6 +65,38 @@ do_install_ptest_base() {
 done
 }
 
+PTEST_BINDIR_PKGD_PATH = "${PKGD}${PTEST_PATH}/bin"
+
+# This function needs to run after apply_update_alternative_renames because the
+# aforementioned function will update the ALTERNATIVE_LINK_NAME flag. Append is
+# used here to make this function to run as late as possible.
+PACKAGE_PREPROCESS_FUNCS_append = "${@bb.utils.contains('PTEST_BINDIR', '1', \
+bb.utils.contains('PTEST_ENABLED', '1', ' 
ptest_update_alternatives', '', d), '', d)}"
+
+python ptest_update_alternatives() {
+"""
+This function will generate the symlinks in the PTEST_BINDIR_PKGD_PATH
+to match the renamed binaries by update-alternatives.
+"""
+
+if not bb.data.inherits_class('update-alternatives', d) \
+   or not update_alternatives_enabled(d):
+return
+
+bb.note("Generating symlinks for ptest")
+bin_paths = { os.environ["bindir"], os.environ["base_bindir"],
+  os.environ["sbindir"], os.environ["base_sbindir"] }
+ptest_bindir = d.getVar("PTEST_BINDIR_PKGD_PATH")
+os.mkdir(ptest_bindir)
+for pkg in (d.getVar('PACKAGES') or "").split():
+alternatives = update_alternatives_alt_targets(d, pkg)
+for alt_name, alt_link, alt_target, _ in alternatives:
+# Some alternatives are for man pages,
+# check if the alternative is in PATH
+if os.path.dirname(alt_link) in bin_paths:
+os.symlink(alt_target, os.path.join(ptest_bindir, alt_name))
+}
+
 do_configure_ptest_base[dirs] = "${B}"
 do_compile_ptest_base[dirs] = "${B}"
 do_install_ptest_base[dirs] = "${B}"
-- 
2.19.2

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


[OE-core] [PATCH v4 4/4] busybox: Use PTEST binary directory

2019-04-08 Thread Mariano Lopez
This will generate the symlinks in the ptest binary directory using the
ptest class functionality instead of generating them manually. Because
the ptest class uses update-alternatives to get the metadata for the
symlinks it will respect the use of BUSYBOX_SPLIT_SUID automatically.

[YOCTO #12597]

Signed-off-by: Mariano Lopez 
---
 meta/recipes-core/busybox/busybox.inc | 16 ++--
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc 
b/meta/recipes-core/busybox/busybox.inc
index c9d25ff1ca..174ce5a8c0 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -347,24 +347,12 @@ do_install () {
fi
 }
 
+PTEST_BINDIR = "1"
+
 do_install_ptest () {
cp -r ${B}/testsuite ${D}${PTEST_PATH}/
cp ${B}/.config  ${D}${PTEST_PATH}/
ln -s /bin/busybox   ${D}${PTEST_PATH}/busybox
-
-   mkdir ${D}${PTEST_PATH}/bin
-   if [ "${BUSYBOX_SPLIT_SUID}" = "1" ]; then
-   while read link; do
-   ln -s ${base_bindir}/busybox.suid 
${D}${PTEST_PATH}/bin/$(basename $link)
-   done <${D}${sysconfdir}/busybox.links.suid
-   while read link; do
-   ln -s ${base_bindir}/busybox.nosuid 
${D}${PTEST_PATH}/bin/$(basename $link)
-   done <${D}${sysconfdir}/busybox.links.nosuid
-   else
-   while read link; do
-   ln -s ${base_bindir}/busybox 
${D}${PTEST_PATH}/bin/$(basename $link)
-   done <${D}${sysconfdir}/busybox.links
-   fi
 }
 
 inherit update-alternatives
-- 
2.19.2

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


[OE-core] [PATCH v4 1/4] update-alternatives.bbclass: Add function to get metadata

2019-04-08 Thread Mariano Lopez
This adds update_alternatives_alt_targets function to get the metadata
for a package. This is for code reuse because the metadata would help
other classes that needs to be aware of how update-alternatives modify
the final package.

[YOCTO #12597]
[YOCTO #13238]

Signed-off-by: Mariano Lopez 
---
 meta/classes/update-alternatives.bbclass | 70 +++-
 1 file changed, 45 insertions(+), 25 deletions(-)

diff --git a/meta/classes/update-alternatives.bbclass 
b/meta/classes/update-alternatives.bbclass
index 537e85d9a3..b702e77ee5 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -216,42 +216,62 @@ python apply_update_alternative_renames () {
 update_files(alt_target, alt_target_rename, pkg, d)
 }
 
+def update_alternatives_alt_targets(d, pkg):
+"""
+Returns the update-alternatives metadata for a package.
+
+The returned format is a list of tuples where the tuple contains:
+alt_name: The binary name
+alt_link: The path for the binary (Shared by different packages)
+alt_target:   The path for the renamed binary (Unique per package)
+alt_priority: The priority of the alt_target
+
+All the alt_targets will be installed into the sysroot. The alt_link is
+a symlink pointing to the alt_target with the highest priority.
+"""
+
+pn = d.getVar('BPN')
+pkgdest = d.getVar('PKGD')
+updates = list()
+for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split():
+alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name)
+alt_target   = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name) 
or \
+   d.getVarFlag('ALTERNATIVE_TARGET', alt_name) or \
+   d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or \
+   d.getVar('ALTERNATIVE_TARGET') or \
+   alt_link
+alt_priority = d.getVarFlag('ALTERNATIVE_PRIORITY_%s' % pkg,  
alt_name) or \
+   d.getVarFlag('ALTERNATIVE_PRIORITY',  alt_name) or \
+   d.getVar('ALTERNATIVE_PRIORITY_%s' % pkg) or  \
+   d.getVar('ALTERNATIVE_PRIORITY')
+
+# This shouldn't trigger, as it should have been resolved earlier!
+if alt_link == alt_target:
+bb.note('alt_link == alt_target: %s == %s -- correcting, this 
should not happen!' % (alt_link, alt_target))
+alt_target = '%s.%s' % (alt_target, pn)
+
+if not os.path.lexists('%s/%s' % (pkgdest, alt_target)):
+bb.warn('%s: NOT adding alternative provide %s: %s does not exist' 
% (pn, alt_link, alt_target))
+continue
+
+alt_target = os.path.normpath(alt_target)
+updates.append( (alt_name, alt_link, alt_target, alt_priority) )
+
+return updates
+
 PACKAGESPLITFUNCS_prepend = "populate_packages_updatealternatives "
 
 python populate_packages_updatealternatives () {
 if not update_alternatives_enabled(d):
 return
 
-pn = d.getVar('BPN')
-
 # Do actual update alternatives processing
-pkgdest = d.getVar('PKGD')
 for pkg in (d.getVar('PACKAGES') or "").split():
 # Create post install/removal scripts
 alt_setup_links = ""
 alt_remove_links = ""
-for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split():
-alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name)
-alt_target   = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, 
alt_name) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name)
-alt_target   = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % 
pkg) or d.getVar('ALTERNATIVE_TARGET') or alt_link
-# Sometimes alt_target is specified as relative to the link name.
-alt_target   = os.path.join(os.path.dirname(alt_link), alt_target)
-
-alt_priority = d.getVarFlag('ALTERNATIVE_PRIORITY_%s' % pkg,  
alt_name) or d.getVarFlag('ALTERNATIVE_PRIORITY',  alt_name)
-alt_priority = alt_priority or d.getVar('ALTERNATIVE_PRIORITY_%s' 
% pkg) or d.getVar('ALTERNATIVE_PRIORITY')
-
-# This shouldn't trigger, as it should have been resolved earlier!
-if alt_link == alt_target:
-bb.note('alt_link == alt_target: %s == %s -- correcting, this 
should not happen!' % (alt_link, alt_target))
-alt_target = '%s.%s' % (alt_target, pn)
-
-if not os.path.lexists('%s/%s' % (pkgdest, alt_target)):
-bb.warn('%s: NOT adding alternative provide %s: %s does not 
exist' % (pn, alt_link, alt_target))
-continue
-
-# Default to generate shell script.. eventually we may want to 
change this...
-alt_target = os.path.normpath(alt_target)
-
+updates = update_alternatives_alt_targets(d, pkg)
+for alt_name, alt_link, alt_target, alt_priority in updates:
 alt_setup_links  += '\tupdate-alternatives --install %s %s 

[OE-core] [PATCH v4 0/4] Feature to use symbolic links to binaries for ptest

2019-04-08 Thread Mariano Lopez
Some binaries are renamed by update-alternatives class at build time
and some ptest run against a binary belonging to another package. Take
for example busybox or util-linux.

This series adds a directory within the ptest with symlinks to the
binaries produced by the package, so just adding this directory to the
PATH will test the correct binaries.

To use this feature just add PTEST_BINDIR = "1" to the recipe.

v2 changes:

Add busybox recipe to use this method of symlinks generation.

Refactor the way the binary ptest directory is generated. Now the
directory will contain only symlinks to binaries that were renamed by
update-alternatives and not symlinks to all the package's binaries. This
have some advantages:
- Less lines and the code is cleaner.
- There is no need to have symlinks for every binary.
- Reuse existing update-alternatives functionality, don't need to add
  new features to the class.

v3 changes:

Fix white space mismatch

v4 changes:

Check for PTEST_ENABLED to add the functionality, this will solve the
issue when building nativesdk packages

The following changes since commit ffa5a1bda6741f5dc9f1b8db1bb37b0c6f103c99:

  asciidoc: specify XML catalogue to use (2019-04-03 14:56:27 +0100)

are available in the Git repository at:

  git://github.com/justanotherboy/poky bug13238v4
  https://github.com/justanotherboy/poky/tree/bug13238v4

Mariano Lopez (4):
  update-alternatives.bbclass: Add function to get metadata
  ptest.bbclass: Add feature to populate a binary directory
  util-linux: Use PTEST binary directory
  busybox: Use PTEST binary directory

 meta/classes/ptest.bbclass| 32 +
 meta/classes/update-alternatives.bbclass  | 70 ---
 meta/recipes-core/busybox/busybox.inc | 16 +
 meta/recipes-core/util-linux/util-linux.inc   |  5 +-
 .../util-linux/util-linux/run-ptest   |  4 ++
 5 files changed, 86 insertions(+), 41 deletions(-)

-- 
2.19.2

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


Re: [OE-core] [PATCH v3] gcc-sanitizers: fix -Werror=maybe-uninitialized issue

2019-04-08 Thread Khem Raj
On Mon, Apr 8, 2019 at 7:32 PM  wrote:
>
> From: Mingli Yu 
>
> When DEBUG_BUILD = "1" added in local.conf, there
> comes below build error when "bitbake gcc-sanitizers":
> | 
> ./../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:
>  In function 'elf_is_symlink':
> | 
> ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21:
>  error: 'st.st_mode' may be used uninitialized in this function 
> [-Werror=maybe-uninitialized]
> |   return S_ISLNK (st.st_mode);
>
> Per https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00315.html,
> the gcc upstream thinks the warning is a false
> positive and suggests to use -O2 rather than -Og
> or -O1 when compiling that file, so pass -Wno-error
> to compiler when -Og is used to silence the error.
>

Not particular to this change but in general if a package says that it
does not support -Og
then we are just going to get into more and more untested grounds
especially during runtime
so I wonder how useful it will be to use -Og for such packages or any
other non supported
combination for that matter.

> Signed-off-by: Mingli Yu 
> ---
>  meta/recipes-devtools/gcc/gcc-sanitizers.inc | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc 
> b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
> index e5e8452..8b1d1c9 100644
> --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc
> +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
> @@ -45,6 +45,9 @@ INHIBIT_DEFAULT_DEPS = "1"
>  ALLOW_EMPTY_${PN} = "1"
>  DEPENDS = "gcc-runtime virtual/${TARGET_PREFIX}gcc"
>
> +# used to fix 
> ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21:
>  error: 'st.st_mode' may be used uninitialized in this function 
> [-Werror=maybe-uninitialized]
> +DEBUG_OPTIMIZATION_append = " -Wno-error"
> +
>  BBCLASSEXTEND = "nativesdk"
>
>  PACKAGES = "${PN} ${PN}-dbg"
> --
> 2.7.4
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3] gcc-sanitizers: fix -Werror=maybe-uninitialized issue

2019-04-08 Thread mingli.yu
From: Mingli Yu 

When DEBUG_BUILD = "1" added in local.conf, there
comes below build error when "bitbake gcc-sanitizers":
| 
./../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:
 In function 'elf_is_symlink':
| 
../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21:
 error: 'st.st_mode' may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
|   return S_ISLNK (st.st_mode);

Per https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00315.html,
the gcc upstream thinks the warning is a false
positive and suggests to use -O2 rather than -Og
or -O1 when compiling that file, so pass -Wno-error
to compiler when -Og is used to silence the error.

Signed-off-by: Mingli Yu 
---
 meta/recipes-devtools/gcc/gcc-sanitizers.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc 
b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index e5e8452..8b1d1c9 100644
--- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -45,6 +45,9 @@ INHIBIT_DEFAULT_DEPS = "1"
 ALLOW_EMPTY_${PN} = "1"
 DEPENDS = "gcc-runtime virtual/${TARGET_PREFIX}gcc"
 
+# used to fix 
../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21:
 error: 'st.st_mode' may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
+DEBUG_OPTIMIZATION_append = " -Wno-error"
+
 BBCLASSEXTEND = "nativesdk"
 
 PACKAGES = "${PN} ${PN}-dbg"
-- 
2.7.4

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


[OE-core] [PATCH v2] cmake: Support Eclipse and other cmake generators

2019-04-08 Thread Douglas Royds
From: Nikhil Pal Singh 

Support project-file generators such as CodeBlocks, CodeLite,
Eclipse, Sublime, and Kate for both make and Ninja build systems.

The following generators are listed in cmake --help:

  Unix Makefiles   = Generates standard UNIX makefiles.
  Ninja= Generates build.ninja files.
  Watcom WMake = Generates Watcom WMake makefiles.
  CodeBlocks - Ninja   = Generates CodeBlocks project files.
  CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files.
  CodeLite - Ninja = Generates CodeLite project files.
  CodeLite - Unix Makefiles= Generates CodeLite project files.
  Sublime Text 2 - Ninja   = Generates Sublime Text 2 project files.
  Sublime Text 2 - Unix Makefiles
   = Generates Sublime Text 2 project files.
  Kate - Ninja = Generates Kate project files.
  Kate - Unix Makefiles= Generates Kate project files.
  Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.

All but one of these contain one of the strings, "Unix Makefiles" or "Ninja".
In each of these cases, cmake generates the Makefiles (or ninja files 
respectively),
and also the appropriate project files, eg. .project and .cproject for Eclipse.

A user can set OECMAKE_GENERATOR in their local.conf to any
one of these strings, except "Watcom WMake" (not supported).

Signed-off-by: Nikhil Pal Singh 
---
 meta/classes/cmake.bbclass | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index e16630434e..d3f0d70847 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -10,13 +10,14 @@ OECMAKE_GENERATOR ?= "Ninja"
 
 python() {
 generator = d.getVar("OECMAKE_GENERATOR")
-if generator == "Unix Makefiles":
-args = "-G 'Unix Makefiles' -DCMAKE_MAKE_PROGRAM=" + d.getVar("MAKE")
+if "Unix Makefiles" in generator:
+args = "-G '" + generator +  "' -DCMAKE_MAKE_PROGRAM=" + 
d.getVar("MAKE")
 d.setVar("OECMAKE_GENERATOR_ARGS", args)
 d.setVarFlag("do_compile", "progress", "percent")
-elif generator == "Ninja":
+elif "Ninja" in generator:
+args = "-G '" + generator + "' -DCMAKE_MAKE_PROGRAM=ninja"
 d.appendVar("DEPENDS", " ninja-native")
-d.setVar("OECMAKE_GENERATOR_ARGS", "-G Ninja 
-DCMAKE_MAKE_PROGRAM=ninja")
+d.setVar("OECMAKE_GENERATOR_ARGS", args)
 d.setVarFlag("do_compile", "progress", r"outof:^\[(\d+)/(\d+)\]\s+")
 else:
 bb.fatal("Unknown CMake Generator %s" % generator)
-- 
2.17.1

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


Re: [OE-core] [PATCH] cmake: Support Eclipse and other cmake generators

2019-04-08 Thread Burton, Ross
Can you put that in the commit message, because I tried googling and
didn't find that list.  Maybe also expand the comment.

Ross

On Mon, 8 Apr 2019 at 22:12, Douglas Royds  wrote:
>
> On 9/04/19 9:04 AM, Burton, Ross wrote:
>
> On Mon, 8 Apr 2019 at 21:56, Douglas Royds  
> wrote:
>
>  python() {
>  generator = d.getVar("OECMAKE_GENERATOR")
> -if generator == "Unix Makefiles":
> -args = "-G 'Unix Makefiles' -DCMAKE_MAKE_PROGRAM=" + d.getVar("MAKE")
> +if "Unix Makefiles" in generator:
> +args = "-G '" + generator +  "' -DCMAKE_MAKE_PROGRAM=" + 
> d.getVar("MAKE")
>
> So are there other generators such as "Unix Makefiles - Something
> Else" that needs to trigger this code path?  A real world example
> would be useful.
>
>  else:
>  bb.fatal("Unknown CMake Generator %s" % generator)
>
> Because obviously at this point, arbitrary generators are very much
> not supported yet.
>
> Ross
>
>
> Here's the complete list, from cmake --help:
>
> The following generators are available on this platform:
>   Unix Makefiles   = Generates standard UNIX makefiles.
>   Ninja= Generates build.ninja files.
>   Watcom WMake = Generates Watcom WMake makefiles.
>   CodeBlocks - Ninja   = Generates CodeBlocks project files.
>   CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files.
>   CodeLite - Ninja = Generates CodeLite project files.
>   CodeLite - Unix Makefiles= Generates CodeLite project files.
>   Sublime Text 2 - Ninja   = Generates Sublime Text 2 project files.
>   Sublime Text 2 - Unix Makefiles
>= Generates Sublime Text 2 project files.
>   Kate - Ninja = Generates Kate project files.
>   Kate - Unix Makefiles= Generates Kate project files.
>   Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files.
>   Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
>
> All but one of them contain one of the strings, "Unix Makefiles" or "Ninja". 
> In each of these cases, they generate the Makefiles (or ninja files 
> respectively), but also generate the appropriate project files, eg. .project 
> and .cproject for Eclipse.
>
> A user can set their OECMAKE_GENERATOR to any one of these strings, except 
> "Watcom WMake".
>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] cmake: Support Eclipse and other cmake generators

2019-04-08 Thread Douglas Royds

On 9/04/19 9:04 AM, Burton, Ross wrote:


On Mon, 8 Apr 2019 at 21:56, Douglas Royds  wrote:

  python() {
  generator = d.getVar("OECMAKE_GENERATOR")
-if generator == "Unix Makefiles":
-args = "-G 'Unix Makefiles' -DCMAKE_MAKE_PROGRAM=" + d.getVar("MAKE")
+if "Unix Makefiles" in generator:
+args = "-G '" + generator +  "' -DCMAKE_MAKE_PROGRAM=" + 
d.getVar("MAKE")

So are there other generators such as "Unix Makefiles - Something
Else" that needs to trigger this code path?  A real world example
would be useful.


  else:
  bb.fatal("Unknown CMake Generator %s" % generator)

Because obviously at this point, arbitrary generators are very much
not supported yet.

Ross



Here's the complete list, from cmake --help:

   The following generators are available on this platform:
  Unix Makefiles   = Generates standard UNIX makefiles.
  Ninja    = Generates build.ninja files.
  Watcom WMake = Generates Watcom WMake makefiles.
  CodeBlocks - Ninja   = Generates CodeBlocks project files.
  CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files.
  CodeLite - Ninja = Generates CodeLite project files.
  CodeLite - Unix Makefiles    = Generates CodeLite project files.
  Sublime Text 2 - Ninja   = Generates Sublime Text 2 project
   files.
  Sublime Text 2 - Unix Makefiles
   = Generates Sublime Text 2 project
   files.
  Kate - Ninja = Generates Kate project files.
  Kate - Unix Makefiles    = Generates Kate project files.
  Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project
   files.
  Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project
   files.

All but one of them contain one of the strings, "Unix Makefiles" or 
"Ninja". In each of these cases, they generate the Makefiles (or ninja 
files respectively), but also generate the appropriate project files, 
eg. .project and .cproject for Eclipse.


A user can set their OECMAKE_GENERATOR to any one of these strings, 
except "Watcom WMake".



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


Re: [OE-core] [PATCH] cmake: Support Eclipse and other cmake generators

2019-04-08 Thread Burton, Ross
On Mon, 8 Apr 2019 at 21:56, Douglas Royds  wrote:
>  python() {
>  generator = d.getVar("OECMAKE_GENERATOR")
> -if generator == "Unix Makefiles":
> -args = "-G 'Unix Makefiles' -DCMAKE_MAKE_PROGRAM=" + d.getVar("MAKE")
> +if "Unix Makefiles" in generator:
> +args = "-G '" + generator +  "' -DCMAKE_MAKE_PROGRAM=" + 
> d.getVar("MAKE")

So are there other generators such as "Unix Makefiles - Something
Else" that needs to trigger this code path?  A real world example
would be useful.

>  else:
>  bb.fatal("Unknown CMake Generator %s" % generator)

Because obviously at this point, arbitrary generators are very much
not supported yet.

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


[OE-core] [PATCH] cmake: Support Eclipse and other cmake generators

2019-04-08 Thread Douglas Royds
From: Nikhil Pal Singh 

As per Generators information mentioned in the cmake --help file
only "Unix Makefiles" and "Ninja" generators are supported as
standard project files.
With this change generic solution can be created for all the other
supported generators such as CodeBlocks, CodeLite, Eclipse CDT4,
KDevelop3, Kate and others for make or Ninja build systems.
It will also give and option to set OECMAKE_GENERATOR in local.conf
file for configuring any specific generators.

Signed-off-by: Nikhil Pal Singh 
---
 meta/classes/cmake.bbclass | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index e16630434e..d3f0d70847 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -10,13 +10,14 @@ OECMAKE_GENERATOR ?= "Ninja"
 
 python() {
 generator = d.getVar("OECMAKE_GENERATOR")
-if generator == "Unix Makefiles":
-args = "-G 'Unix Makefiles' -DCMAKE_MAKE_PROGRAM=" + d.getVar("MAKE")
+if "Unix Makefiles" in generator:
+args = "-G '" + generator +  "' -DCMAKE_MAKE_PROGRAM=" + 
d.getVar("MAKE")
 d.setVar("OECMAKE_GENERATOR_ARGS", args)
 d.setVarFlag("do_compile", "progress", "percent")
-elif generator == "Ninja":
+elif "Ninja" in generator:
+args = "-G '" + generator + "' -DCMAKE_MAKE_PROGRAM=ninja"
 d.appendVar("DEPENDS", " ninja-native")
-d.setVar("OECMAKE_GENERATOR_ARGS", "-G Ninja 
-DCMAKE_MAKE_PROGRAM=ninja")
+d.setVar("OECMAKE_GENERATOR_ARGS", args)
 d.setVarFlag("do_compile", "progress", r"outof:^\[(\d+)/(\d+)\]\s+")
 else:
 bb.fatal("Unknown CMake Generator %s" % generator)
-- 
2.17.1

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


[OE-core] [PATCH] ell: add recipe

2019-04-08 Thread Oleksandr Kravchuk
ELL has originally been part of meta-openembedded, but newer versions
of some of the poky components depend on it, e.g. ofono.

Signed-off-by: Oleksandr Kravchuk 
---
 meta/recipes-core/ell/ell_0.18.bb | 22 ++
 1 file changed, 22 insertions(+)
 create mode 100644 meta/recipes-core/ell/ell_0.18.bb

diff --git a/meta/recipes-core/ell/ell_0.18.bb 
b/meta/recipes-core/ell/ell_0.18.bb
new file mode 100644
index 00..ca27f4dcda
--- /dev/null
+++ b/meta/recipes-core/ell/ell_0.18.bb
@@ -0,0 +1,22 @@
+SUMMARY  = "Embedded Linux Library"
+DESCRIPTION = "The Embedded Linux Library (ELL) provides core, \
+low-level functionality for system daemons. It typically has no \
+dependencies other than the Linux kernel, C standard library, and \
+libdl (for dynamic linking). While ELL is designed to be efficient \
+and compact enough for use on embedded Linux platforms, it is not \
+limited to resource-constrained systems."
+SECTION = "libs"
+LICENSE  = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09"
+
+DEPENDS = "dbus"
+
+inherit autotools pkgconfig
+
+SRC_URI = 
"https://mirrors.edge.kernel.org/pub/linux/libs/${PN}/${PN}-${PV}.tar.xz;
+SRC_URI[md5sum] = "18e2be697a54811e49bbe34590a13a42"
+SRC_URI[sha256sum] = 
"2c4c1a129f1b697e63ba3f63927dbae1482f6329b48c14a1748d9ab8ac4ee7e3"
+
+do_configure_prepend () {
+mkdir -p ${S}/build-aux
+}
-- 
2.17.1

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


Re: [OE-core] Circular dependency of do_populate_sysroot

2019-04-08 Thread Stefan Herbrechtsmeier

Am 08.04.19 um 08:55 schrieb richard.pur...@linuxfoundation.org:

On Mon, 2019-04-08 at 07:43 +0200, Stefan Herbrechtsmeier wrote:

Am 07.04.2019 23:35 schrieb richard.pur...@linuxfoundation.org:

You're saying A runtime depends on B and B runtime depends on A.


Yes, only the run time depends on each other. This means the
dependency doesn't exist during a native build of a or b.


In which case this is easy, simply set:

RDEPENDS_${PN}_class-native = ""

By default the system assumes that native packages have the same
dependencies as target.


I mean that the build of a-native and b-native don't need b-native or 
a-native to populate the sysroot directory but a-native and b-native 
require b-native or a-native at run time.


I have take a deeper look into the problem and understand that this 
isn't supported by oe because of the native sysroot implementation. The 
implementation evaluates the rdepends during do_populate_sysroot task 
and therefore need to finish all other do_populate_sysroot task before.


It would be nice if the native sysroot uses packages and supports the 
same features as the cross packages which handle dependencies independently.


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


Re: [OE-core] [PATCH] opkg: add ptest

2019-04-08 Thread Burton, Ross
On Mon, 8 Apr 2019 at 20:03, Alejandro del Castillo
 wrote:
> +do_install_ptest() {
> +   install -d ${D}${PTEST_PATH}
> +   install -m 755 ${WORKDIR}/run-ptest ${D}/${PTEST_PATH}/run-ptest
> +   install -m 755 ${B}/Makefile ${D}${PTEST_PATH}/Makefile
> +   sed -i -e 's,^Makefile:,_Makefile:,' ${D}/${PTEST_PATH}/Makefile
> +   cp -r ${S}/tests ${D}${PTEST_PATH}
> +   sed -i -e 's,^opkgcl = 
> os.path.realpath("../src/opkg"),opkgcl="${bindir}/opkg",' 
> ${D}/${PTEST_PATH}/tests/cfg.py
> +}

You're the maintainer of opkg, just add an install target for the test suite ;)

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


[OE-core] [PATCH] opkg: add ptest

2019-04-08 Thread Alejandro del Castillo
Signed-off-by: Alejandro del Castillo 
---
 py-resolve-paths-before-comparision.patch | 31 +++
 meta/recipes-devtools/opkg/opkg/run-ptest |  3 ++
 meta/recipes-devtools/opkg/opkg_0.4.0.bb  | 15 -
 3 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch
 create mode 100644 meta/recipes-devtools/opkg/opkg/run-ptest

diff --git 
a/meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch
 
b/meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch
new file mode 100644
index 00..75ecb5fb42
--- /dev/null
+++ 
b/meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch
@@ -0,0 +1,31 @@
+From 5f005830eea7d03c02107a3a3fc58907b0a037bf Mon Sep 17 00:00:00 2001
+From: Alejandro del Castillo 
+Date: Mon, 8 Apr 2019 11:14:56 -0500
+Subject: [PATCH] regress/issue72.py: resolve paths before comparision
+
+In systems that have a volatile /tmp, the test incorrectly fails since
+it doesn't resolve the real path in all cases.
+
+Signed-off-by: Alejandro del Castillo 
+---
+Upstream-Status: Submitted
+
+ tests/regress/issue72.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/regress/issue72.py b/tests/regress/issue72.py
+index 1626877..2f24dec 100755
+--- a/tests/regress/issue72.py
 b/tests/regress/issue72.py
+@@ -56,7 +56,7 @@ if not os.path.lexists("{}/{}".format(cfg.offline_root, 
long_filename2)):
+   "not created.")
+ 
+ linky = os.path.realpath("{}/{}".format(cfg.offline_root, long_filename2))
+-linky_dst = "{}/{}".format(cfg.offline_root, long_filename)
++linky_dst = os.path.realpath("{}/{}".format(cfg.offline_root, long_filename))
+ if linky != linky_dst:
+   opk.fail("symlink path truncated.")
+ 
+-- 
+2.20.1
+
diff --git a/meta/recipes-devtools/opkg/opkg/run-ptest 
b/meta/recipes-devtools/opkg/opkg/run-ptest
new file mode 100644
index 00..23189c976f
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make run-tests
diff --git a/meta/recipes-devtools/opkg/opkg_0.4.0.bb 
b/meta/recipes-devtools/opkg/opkg_0.4.0.bb
index a2329d3e71..9bb37d9e09 100644
--- a/meta/recipes-devtools/opkg/opkg_0.4.0.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.4.0.bb
@@ -15,12 +15,15 @@ SRC_URI = 
"http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz
file://opkg.conf \

file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
file://0001-libopkg-add-add-ignore-recommends-option.patch \
+   
file://0001-regress-issue72.py-resolve-paths-before-comparision.patch \
+   file://run-ptest \
 "
 
+
 SRC_URI[md5sum] = "ae51d95fee599bb4dce08453529158f5"
 SRC_URI[sha256sum] = 
"f6c00515d8a2ad8f6742a8e73830315d1983ed0459cba77c4d656cfc9e7fe6fe"
 
-inherit autotools pkgconfig systemd
+inherit autotools pkgconfig systemd ptest
 
 target_localstatedir := "${localstatedir}"
 OPKGLIBDIR = "${target_localstatedir}/lib"
@@ -37,6 +40,15 @@ PACKAGECONFIG[libsolv] = 
"--with-libsolv,--without-libsolv,libsolv"
 
 EXTRA_OECONF_class-native = 
"--localstatedir=/${@os.path.relpath('${localstatedir}', 
'${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', 
'${STAGING_DIR_NATIVE}')}"
 
+do_install_ptest() {
+   install -d ${D}${PTEST_PATH}
+   install -m 755 ${WORKDIR}/run-ptest ${D}/${PTEST_PATH}/run-ptest
+   install -m 755 ${B}/Makefile ${D}${PTEST_PATH}/Makefile
+   sed -i -e 's,^Makefile:,_Makefile:,' ${D}/${PTEST_PATH}/Makefile
+   cp -r ${S}/tests ${D}${PTEST_PATH}
+   sed -i -e 's,^opkgcl = 
os.path.realpath("../src/opkg"),opkgcl="${bindir}/opkg",' 
${D}/${PTEST_PATH}/tests/cfg.py
+}
+
 do_install_append () {
install -d ${D}${sysconfdir}/opkg
install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
@@ -49,6 +61,7 @@ do_install_append () {
 RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config 
libarchive"
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
+RDEPENDS_${PN}-ptest += "make binutils python3-core python3-compression"
 RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
 RCONFLICTS_${PN} = "opkg-collateral"
 RPROVIDES_${PN} = "opkg-collateral"
-- 
2.20.1

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


[OE-core] [PATCH V2] Revert "mdadm: fix gcc8 maybe-uninitialized/format-overflow warning"

2019-04-08 Thread Khem Raj
This patch tried to address a gcc problem when -Og is used, but it did
cause regressions on normal compiles when using clang e.g. the real
problem is to fix the compiler until then disable the warning in
DEBUG_FLAGS

This reverts commit 630281663893cdcfa9c4323b717b415d87d5510f.

Signed-off-by: Khem Raj 
---
 ...-uninitialized-format-overflow-warni.patch | 60 ---
 meta/recipes-extended/mdadm/mdadm_4.1.bb  |  1 -
 2 files changed, 61 deletions(-)
 delete mode 100644 
meta/recipes-extended/mdadm/files/0001-mdadm-gcc8-maybe-uninitialized-format-overflow-warni.patch

diff --git 
a/meta/recipes-extended/mdadm/files/0001-mdadm-gcc8-maybe-uninitialized-format-overflow-warni.patch
 
b/meta/recipes-extended/mdadm/files/0001-mdadm-gcc8-maybe-uninitialized-format-overflow-warni.patch
deleted file mode 100644
index 237f83a87e..00
--- 
a/meta/recipes-extended/mdadm/files/0001-mdadm-gcc8-maybe-uninitialized-format-overflow-warni.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From bf457a83834932ba06de3528b8779a023e73fa7b Mon Sep 17 00:00:00 2001
-From: Changqing Li 
-Date: Tue, 12 Mar 2019 16:17:29 +0800
-Subject: [PATCH] mdadm: gcc8 maybe-uninitialized/format-overflow warning
-
-while compiled with -Werror=maybe-uninitialized/-Werror=format-overflow=,
-it failed
-
-[snip]
-| Incremental.c: In function 'Incremental_container':
-| Incremental.c:1593:3: error: 'mdfd' may be used uninitialized in this 
function [-Werror=maybe-uninitialized]
-| close(mdfd);
-| ^~~
-
-[snip]
-super-intel.c: In function 'apply_takeover_update':
-| super-intel.c:9615:15: error: '%d' directive writing between 1 and 11 bytes 
into a region of size 7 [-Werror=format-overflow=]
-| " MISSING_%d", du->index);
-| ^~
-
-Upstream-Status: Submitted [https://github.com/neilbrown/mdadm/pull/36]
-
-Signed-off-by: Changqing Li 

- Incremental.c | 2 +-
- super-intel.c | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Incremental.c b/Incremental.c
-index a4ff7d4..b667868 100644
 a/Incremental.c
-+++ b/Incremental.c
-@@ -1500,7 +1500,7 @@ static int Incremental_container(struct supertype *st, 
char *devname,
-   return 0;
-   }
-   for (ra = list ; ra ; ra = ra->next) {
--  int mdfd;
-+  int mdfd = 0;
-   char chosen_name[1024];
-   struct map_ent *mp;
-   struct mddev_ident *match = NULL;
-diff --git a/super-intel.c b/super-intel.c
-index 10d7218..c3741ea 100644
 a/super-intel.c
-+++ b/super-intel.c
-@@ -9612,9 +9612,9 @@ static int apply_takeover_update(struct 
imsm_update_takeover *u,
-   du->major = 0;
-   du->index = (i * 2) + 1;
-   sprintf((char *)du->disk.serial,
--  " MISSING_%d", du->index);
-+  " MISSING_%hu", du->index);
-   sprintf((char *)du->serial,
--  "MISSING_%d", du->index);
-+  "MISSING_%hu", du->index);
-   du->next = super->missing;
-   super->missing = du;
-   }
--- 
-2.7.4
-
diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb 
b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index 9862a38dc3..947706ff5f 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -19,7 +19,6 @@ SRC_URI = 
"${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
file://0001-fix-gcc-8-format-truncation-warning.patch \
   file://mdadm.init \
   file://mdmonitor.service \
-   
file://0001-mdadm-gcc8-maybe-uninitialized-format-overflow-warni.patch \
"
 SRC_URI[md5sum] = "51bf3651bd73a06c413a2f964f299598"
 SRC_URI[sha256sum] = 
"ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a"
-- 
2.21.0

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


Re: [OE-core] [PATCH] virglrenderer: remove link option -Bsymbolic

2019-04-08 Thread Khem Raj
On Sun, Apr 7, 2019 at 6:59 PM Kang Kai  wrote:
>
> On 2019/4/4 下午3:52, kai.k...@windriver.com wrote:
> > From: Kai Kang 
> >
> > When gcc compile options '-O2 -fvisibility=default' are applied, it
> > fails to compile virglrenderer for x86:
> >
> > | ld: gallium/auxiliary/.libs/libgallium.a(u_cpu_detect.o): relocation
> >R_386_GOTOFF against undefined symbol `util_cpu_caps' can not be used
> >when making a shared object
> > | ld: final link failed: bad value
> > | collect2: error: ld returned 1 exit status
> >
> > Remove link option '-Bsymbolic' to fix the failure.
>
>
> Any comments on this patch? Thank.
>
> Kai
>
>
> >
> > Signed-off-by: Kai Kang 
> > ---
> >   .../0001-Remove-link-option-Bsymbolic.patch   | 34 +++
> >   .../virglrenderer/virglrenderer_0.7.0.bb  |  1 +
> >   2 files changed, 35 insertions(+)
> >   create mode 100644 
> > meta/recipes-graphics/virglrenderer/virglrenderer/0001-Remove-link-option-Bsymbolic.patch
> >
> > diff --git 
> > a/meta/recipes-graphics/virglrenderer/virglrenderer/0001-Remove-link-option-Bsymbolic.patch
> >  
> > b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-Remove-link-option-Bsymbolic.patch
> > new file mode 100644
> > index 00..faefa16aae
> > --- /dev/null
> > +++ 
> > b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-Remove-link-option-Bsymbolic.patch
> > @@ -0,0 +1,34 @@
> > +When gcc compile options '-O2 -fvisibility=default' are applied, it fails 
> > to
> > +compile virglrenderer for x86:
> > +
> > +| ld: gallium/auxiliary/.libs/libgallium.a(u_cpu_detect.o): relocation
> > +  R_386_GOTOFF against undefined symbol `util_cpu_caps' can not be used
> > +  when making a shared object
> > +| ld: final link failed: bad value
> > +| collect2: error: ld returned 1 exit status
> > +
> > +Remove link option '-Bsymbolic' to fix the failure.
> > +

In spite of removing the option can we try replacing it with
-Bsymbolic-functions

> > +Upstream-Status: Submitted 
> > [https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests/213]
> > +
> > +Signed-off-by: Kai Kang 
> > +---
> > + src/Makefile.am | 2 +-
> > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > +
> > +diff --git a/src/Makefile.am b/src/Makefile.am
> > +index 9b668c8..7a421b8 100644
> > +--- a/src/Makefile.am
> >  b/src/Makefile.am
> > +@@ -48,7 +49,7 @@ endif
> > + lib_LTLIBRARIES = libvirglrenderer.la
> > + noinst_LTLIBRARIES = libvrend.la
> > +
> > +-GM_LDFLAGS = -Wl,-Bsymbolic -version-number 0:2 -no-undefined
> > ++GM_LDFLAGS = -version-number 0:2 -no-undefined
> > +
> > + libvirglrenderer_la_SOURCES = virglrenderer.c
> > + libvirglrenderer_ladir = $(libdir)
> > +--
> > +2.20.1
> > +
> > diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb 
> > b/meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb
> > index 225a0b8b0c..afc709bc48 100644
> > --- a/meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb
> > +++ b/meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb
> > @@ -9,6 +9,7 @@ SRCREV = "402c228861c9893f64cffbbcb4cb23044b8c721c"
> >   SRC_URI = "git://anongit.freedesktop.org/virglrenderer \
> >  file://0001-vtest-add-missing-includes.patch \
> >  file://0001-Makefile.am-explicitly-link-with-libdrm.patch \
> > +   file://0001-Remove-link-option-Bsymbolic.patch \
> >  "
> >
> >   S = "${WORKDIR}/git"
>
>
> --
> Kai Kang
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] Yocto Project Unassigned Bugs - Help Needed

2019-04-08 Thread sjolley.yp.pm
All,

 

The triage team meets weekly and does its best to handle the bugs reported
into the Bugzilla. The number of people attending that meeting has fallen,
as have the number of people available to help fix bugs. One of the things
we hear users report is they don't know how to help. We (the triage team)
are therefore going to start reporting out the currently 281 unassigned
bugs.

 

We're hoping people may be able to spare some time now and again to help out
with these.

 

Bugs are split into two types, "true bugs" where things don't work as they
should and "enhancements" which are features we'd want to add to the system.

 

There are also roughly four different "priority" classes right now, "2.7",
"2.8", "2.9', "2.99" and "Future", the more pressing/urgent issues being in
"2.7" and then "2.8".

 

Please review this link and if a bug is something you would be able to help
with either take ownership of the bug, or send me
(stephen.k.jol...@intel.com  ) an e-mail
with the bug number you would like and I will assign it to you (please make
sure you have a Bugzilla account).

 

The list is at:
https://wiki.yoctoproject.org/wiki/Bug_Triage#Unassigned_or_Newcomer_Bugs

 

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

*Cell:(208) 244-4460

* Email:  sjolley.yp...@gmail.com
 

 

 

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


Re: [OE-core] [PATCH] gnutls: upgrade 3.6.5 -> 3.6.7

2019-04-08 Thread Adrian Bunk
On Mon, Apr 08, 2019 at 08:08:08PM +0530, akuster808 wrote:
> 
> 
> On 4/8/19 5:38 PM, Adrian Bunk wrote:
> > This is a new upstream release from the same stable branch
> > bringing new features and bugfixes (including CVE fixes).
> >
> > COPYING changed http -> https.
> >
> > configure no longer has a --without-libunistring-prefix option.
> 
> Here is the same comment post earlier:
> 
> this was regressing when attempted to be removed last time see
> https://git.openembedded.org/openembedded-core/commit/?id=d8d32b5a58eea161711e3539c4530682de551ede
> 
> Does it work when libunstring is installed on build host now ?
>...

Works for me, and the option no longer exists.

This seems to be part of a a change to drop compatibility with
ancient autoconf in gnulib, which might have fixed the original 
cross-building problem?

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

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


Re: [OE-core] [PATCH] gnutls: upgrade 3.6.5 -> 3.6.7

2019-04-08 Thread akuster808



On 4/8/19 5:38 PM, Adrian Bunk wrote:
> This is a new upstream release from the same stable branch
> bringing new features and bugfixes (including CVE fixes).
>
> COPYING changed http -> https.
>
> configure no longer has a --without-libunistring-prefix option.

Here is the same comment post earlier:

this was regressing when attempted to be removed last time see
https://git.openembedded.org/openembedded-core/commit/?id=d8d32b5a58eea161711e3539c4530682de551ede

Does it work when libunstring is installed on build host now ?

>
> Signed-off-by: Adrian Bunk 
> ---
>  .../gnutls/{gnutls_3.6.5.bb => gnutls_3.6.7.bb}| 7 +++
>  1 file changed, 3 insertions(+), 4 deletions(-)
>  rename meta/recipes-support/gnutls/{gnutls_3.6.5.bb => gnutls_3.6.7.bb} (88%)
>
> diff --git a/meta/recipes-support/gnutls/gnutls_3.6.5.bb 
> b/meta/recipes-support/gnutls/gnutls_3.6.7.bb
> similarity index 88%
> rename from meta/recipes-support/gnutls/gnutls_3.6.5.bb
> rename to meta/recipes-support/gnutls/gnutls_3.6.7.bb
> index dfc35079da..e05dc2b57d 100644
> --- a/meta/recipes-support/gnutls/gnutls_3.6.5.bb
> +++ b/meta/recipes-support/gnutls/gnutls_3.6.7.bb
> @@ -9,7 +9,7 @@ LICENSE_${PN}-bin = "GPLv3+"
>  LICENSE_${PN}-openssl = "GPLv3+"
>  
>  LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \
> -file://doc/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
> +file://doc/COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \
>  
> file://doc/COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
>  
>  DEPENDS = "nettle gmp virtual/libiconv libunistring"
> @@ -21,8 +21,8 @@ SRC_URI = 
> "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar
> file://arm_eabi.patch \
>  "
>  
> -SRC_URI[md5sum] = "3474849e1bbd4d16403b82ab2579000b"
> -SRC_URI[sha256sum] = 
> "073eced3acef49a3883e69ffd5f0f0b5f46e2760ad86eddc6c0866df4e7abb35"
> +SRC_URI[md5sum] = "c4ac669c500df939d4fbfea722367929"
> +SRC_URI[sha256sum] = 
> "5b3409ad5aaf239808730d1ee12fdcd148c0be00262c7edf157af655a8a188e2"
>  
>  inherit autotools texinfo pkgconfig gettext lib_package gtk-doc
>  
> @@ -44,7 +44,6 @@ EXTRA_OECONF = " \
>  --enable-local-libopts \
>  --enable-openssl-compatibility \
>  --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
> ---without-libunistring-prefix \
>  "
>  
>  LDFLAGS_append_libc-musl = " -largp"

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


[OE-core] [PATCH] gnutls: upgrade 3.6.5 -> 3.6.7

2019-04-08 Thread Adrian Bunk
This is a new upstream release from the same stable branch
bringing new features and bugfixes (including CVE fixes).

COPYING changed http -> https.

configure no longer has a --without-libunistring-prefix option.

Signed-off-by: Adrian Bunk 
---
 .../gnutls/{gnutls_3.6.5.bb => gnutls_3.6.7.bb}| 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)
 rename meta/recipes-support/gnutls/{gnutls_3.6.5.bb => gnutls_3.6.7.bb} (88%)

diff --git a/meta/recipes-support/gnutls/gnutls_3.6.5.bb 
b/meta/recipes-support/gnutls/gnutls_3.6.7.bb
similarity index 88%
rename from meta/recipes-support/gnutls/gnutls_3.6.5.bb
rename to meta/recipes-support/gnutls/gnutls_3.6.7.bb
index dfc35079da..e05dc2b57d 100644
--- a/meta/recipes-support/gnutls/gnutls_3.6.5.bb
+++ b/meta/recipes-support/gnutls/gnutls_3.6.7.bb
@@ -9,7 +9,7 @@ LICENSE_${PN}-bin = "GPLv3+"
 LICENSE_${PN}-openssl = "GPLv3+"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \
-file://doc/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+file://doc/COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \
 
file://doc/COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
 
 DEPENDS = "nettle gmp virtual/libiconv libunistring"
@@ -21,8 +21,8 @@ SRC_URI = 
"https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar
file://arm_eabi.patch \
 "
 
-SRC_URI[md5sum] = "3474849e1bbd4d16403b82ab2579000b"
-SRC_URI[sha256sum] = 
"073eced3acef49a3883e69ffd5f0f0b5f46e2760ad86eddc6c0866df4e7abb35"
+SRC_URI[md5sum] = "c4ac669c500df939d4fbfea722367929"
+SRC_URI[sha256sum] = 
"5b3409ad5aaf239808730d1ee12fdcd148c0be00262c7edf157af655a8a188e2"
 
 inherit autotools texinfo pkgconfig gettext lib_package gtk-doc
 
@@ -44,7 +44,6 @@ EXTRA_OECONF = " \
 --enable-local-libopts \
 --enable-openssl-compatibility \
 --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
---without-libunistring-prefix \
 "
 
 LDFLAGS_append_libc-musl = " -largp"
-- 
2.17.1

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


[OE-core] [PATCH] bind: upgrade 9.11.5 -> 9.11.5-P4

2019-04-08 Thread Adrian Bunk
Bugfix-only compared to 9.11.5, mostly CVE fixes.

COPYRIGHT checksum changed due to 2018 -> 2019.

Signed-off-by: Adrian Bunk 
---
 .../bind/{bind_9.11.5.bb => bind_9.11.5-P4.bb}  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-connectivity/bind/{bind_9.11.5.bb => bind_9.11.5-P4.bb} 
(96%)

diff --git a/meta/recipes-connectivity/bind/bind_9.11.5.bb 
b/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb
similarity index 96%
rename from meta/recipes-connectivity/bind/bind_9.11.5.bb
rename to meta/recipes-connectivity/bind/bind_9.11.5-P4.bb
index 67672792b1..1355841e6b 100644
--- a/meta/recipes-connectivity/bind/bind_9.11.5.bb
+++ b/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.isc.org/sw/bind/;
 SECTION = "console/network"
 
 LICENSE = "ISC & BSD"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=6ba7c9fe0c888a943c79c93e6de744fb"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8f17f64e47e83b60cd920a1e4b54419e"
 
 DEPENDS = "openssl libcap zlib"
 
@@ -22,8 +22,8 @@ SRC_URI = 
"https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
file://0001-avoid-start-failure-with-bind-user.patch \
 "
 
-SRC_URI[md5sum] = "17a0d02102117c9a221e857cf2cc8157"
-SRC_URI[sha256sum] = 
"a4cae11dad954bdd4eb592178f875bfec09fcc7e29fe0f6b7a4e5b5c6bc61322"
+SRC_URI[md5sum] = "8ddab4b61fa4516fe404679c74e37960"
+SRC_URI[sha256sum] = 
"7e8c08192bcbaeb6e9f2391a70e67583b027b90e8c4bc1605da6eb126edde434"
 
 UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/;
 UPSTREAM_CHECK_REGEX = "(?P9(\.\d+)+(-P\d+)*)/"
-- 
2.17.1

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


[OE-core] [PATCH 3/3] ptest-runner: Add several logging fixes

2019-04-08 Thread Richard Purdie
This change adds three patches to improve the handling of stdout/stderr and 
child
processes to try and improve logging reliability in ptest-runner.

Signed-off-by: Richard Purdie 
---
 ...ils-Ensure-stdout-stderr-are-flushed.patch | 45 +++
 ...002-use-process-groups-when-spawning.patch | 35 +
 ...ils-Ensure-pipes-are-read-after-exit.patch | 76 +++
 .../ptest-runner/ptest-runner_2.3.1.bb|  6 +-
 4 files changed, 161 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-support/ptest-runner/ptest-runner/0001-utils-Ensure-stdout-stderr-are-flushed.patch
 create mode 100644 
meta/recipes-support/ptest-runner/ptest-runner/0002-use-process-groups-when-spawning.patch
 create mode 100644 
meta/recipes-support/ptest-runner/ptest-runner/0003-utils-Ensure-pipes-are-read-after-exit.patch

diff --git 
a/meta/recipes-support/ptest-runner/ptest-runner/0001-utils-Ensure-stdout-stderr-are-flushed.patch
 
b/meta/recipes-support/ptest-runner/ptest-runner/0001-utils-Ensure-stdout-stderr-are-flushed.patch
new file mode 100644
index 000..c9a9dd7cf49
--- /dev/null
+++ 
b/meta/recipes-support/ptest-runner/ptest-runner/0001-utils-Ensure-stdout-stderr-are-flushed.patch
@@ -0,0 +1,45 @@
+From 9b36993794c1de733c521b2477370c874c07b617 Mon Sep 17 00:00:00 2001
+From: Richard Purdie 
+Date: Thu, 4 Apr 2019 14:18:55 +0100
+Subject: [PATCH 1/3] utils: Ensure stdout/stderr are flushed
+
+There is no guarantee that the data written with fwrite will be flushed to the
+buffer. If stdout and stderr are the same thing, this could lead to interleaved
+writes. The common case is stdout output so flush the output pipes when 
writing to
+stderr. Also flush stdout before the function returns.
+
+Signed-off-by: Richard Purdie 
+Upstream-Status: Pending [code being tested]
+---
+ utils.c | 7 +--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/utils.c b/utils.c
+index 504df0b..3ceb342 100644
+--- a/utils.c
 b/utils.c
+@@ -295,8 +295,11 @@ wait_child(const char *ptest_dir, const char *run_ptest, 
pid_t pid,
+   }
+ 
+   if (pfds[1].revents != 0) {
+-  while ((n = read(fds[1], buf, 
WAIT_CHILD_BUF_MAX_SIZE)) > 0)
++  while ((n = read(fds[1], buf, 
WAIT_CHILD_BUF_MAX_SIZE)) > 0) {
++  fflush(fps[0]);
+   fwrite(buf, n, 1, fps[1]);
++  fflush(fps[1]);
++  }
+   }
+ 
+   clock_gettime(clock, );
+@@ -315,7 +318,7 @@ wait_child(const char *ptest_dir, const char *run_ptest, 
pid_t pid,
+   break;
+   }
+ 
+-
++  fflush(fps[0]);
+   return status;
+ }
+ 
+-- 
+2.17.1
+
diff --git 
a/meta/recipes-support/ptest-runner/ptest-runner/0002-use-process-groups-when-spawning.patch
 
b/meta/recipes-support/ptest-runner/ptest-runner/0002-use-process-groups-when-spawning.patch
new file mode 100644
index 000..5436a3340c4
--- /dev/null
+++ 
b/meta/recipes-support/ptest-runner/ptest-runner/0002-use-process-groups-when-spawning.patch
@@ -0,0 +1,35 @@
+From f0c42a65633341ad048718c7a6dbd035818e9eaf Mon Sep 17 00:00:00 2001
+From: Richard Purdie 
+Date: Thu, 4 Apr 2019 14:20:31 +0100
+Subject: [PATCH 2/3] use process groups when spawning
+
+Rather than just killing the process we've swawned, set the process group
+for spawned children and then kill the group of processes.
+
+Signed-off-by: Richard Purdie 
+Upstream-Status: Pending [code being tested]
+---
+ utils.c | 9 +
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/utils.c b/utils.c
+index 3ceb342..c5b3b8d 100644
+--- a/utils.c
 b/utils.c
+@@ -309,7 +309,7 @@ wait_child(const char *ptest_dir, const char *run_ptest, 
pid_t pid,
+   clock_gettime(clock, );
+   if ((time.tv_sec - sentinel.tv_sec) > timeout) {
+   *timeouted = 1;
+-  kill(pid, SIGKILL);
++  kill(-pid, SIGKILL);
+   waitflags = 0;
+   }
+   }
+@@ -371,6 +371,7 @@ run_ptests(struct ptest_list *head, const struct 
ptest_options opts,
+   rc = -1;
+   break;
+   } else if (child == 0) {
++  setsid();
+   run_child(p->run_ptest, pipefd_stdout[1], 
pipefd_stderr[1]);
+   } else {
+   int status;
diff --git 
a/meta/recipes-support/ptest-runner/ptest-runner/0003-utils-Ensure-pipes-are-read-after-exit.patch
 
b/meta/recipes-support/ptest-runner/ptest-runner/0003-utils-Ensure-pipes-are-read-after-exit.patch
new file mode 100644
index 000..f7c3ebe6f2c
--- /dev/null
+++ 

[OE-core] [PATCH 2/3] openssh/util-linux/python*: Ensure ptest output is unbuffered

2019-04-08 Thread Richard Purdie
We need to run sed with the -u option to ensure the output is unbuffered else
ptest-runner may timeout thinkig things were idle. Busybox doesn't have the -u
option so we need to RDEPEND on sed (which is a good thing to do if we use it
anyway).

Alex Kanavin should get credit for discovering the problem.

Signed-off-by: Richard Purdie 
---
 meta/recipes-connectivity/openssh/openssh/run-ptest | 2 +-
 meta/recipes-connectivity/openssh/openssh_7.9p1.bb  | 2 +-
 meta/recipes-core/util-linux/util-linux.inc | 2 +-
 meta/recipes-core/util-linux/util-linux/run-ptest   | 2 +-
 meta/recipes-devtools/python/python/run-ptest   | 2 +-
 meta/recipes-devtools/python/python3/run-ptest  | 2 +-
 meta/recipes-devtools/python/python3_3.7.2.bb   | 2 +-
 meta/recipes-devtools/python/python_2.7.15.bb   | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-connectivity/openssh/openssh/run-ptest 
b/meta/recipes-connectivity/openssh/openssh/run-ptest
index 36a3d2a7b7b..daf62cca5b1 100755
--- a/meta/recipes-connectivity/openssh/openssh/run-ptest
+++ b/meta/recipes-connectivity/openssh/openssh/run-ptest
@@ -5,7 +5,7 @@ export TEST_SHELL=sh
 cd regress
 sed -i "/\t\tagent-ptrace /d" Makefile
 make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \
-| sed -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 
's/^failed/FAIL: /g'
+| sed -u -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 
's/^failed/FAIL: /g'
 
 SSHAGENT=`which ssh-agent`
 GDB=`which gdb`
diff --git a/meta/recipes-connectivity/openssh/openssh_7.9p1.bb 
b/meta/recipes-connectivity/openssh/openssh_7.9p1.bb
index 2a23f64b894..6260135d5b2 100644
--- a/meta/recipes-connectivity/openssh/openssh_7.9p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_7.9p1.bb
@@ -144,7 +144,7 @@ FILES_${PN}-keygen = "${bindir}/ssh-keygen"
 
 RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
 RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 
'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
-RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
+RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make sed"
 
 RPROVIDES_${PN}-ssh = "ssh"
 RPROVIDES_${PN}-sshd = "sshd"
diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index 18c3af240eb..c7ba8c446f1 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -142,7 +142,7 @@ RDEPENDS_${PN}_class-nativesdk = ""
 RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev"
 
 RDEPENDS_${PN}-bash-completion += "${PN}-lsblk"
-RDEPENDS_${PN}-ptest = "bash grep coreutils which btrfs-tools ${PN}"
+RDEPENDS_${PN}-ptest = "bash grep coreutils which btrfs-tools ${PN} sed"
 RDEPENDS_${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff"
 ALLOW_EMPTY_${PN}-swaponoff = "1"
 
diff --git a/meta/recipes-core/util-linux/util-linux/run-ptest 
b/meta/recipes-core/util-linux/util-linux/run-ptest
index fbc2f9b56a9..8c57bd20740 100644
--- a/meta/recipes-core/util-linux/util-linux/run-ptest
+++ b/meta/recipes-core/util-linux/util-linux/run-ptest
@@ -16,7 +16,7 @@ res=0
 count=0
 for ts in $comps; 
 do 
-   $ts | sed '{
+   $ts | sed -u '{
   s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/  
   s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/
   s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/   
diff --git a/meta/recipes-devtools/python/python/run-ptest 
b/meta/recipes-devtools/python/python/run-ptest
index 13dfc99efd5..c7002a4560c 100644
--- a/meta/recipes-devtools/python/python/run-ptest
+++ b/meta/recipes-devtools/python/python/run-ptest
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-python -mtest -W | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ 
s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ 
\.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
+python -mtest -W | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. 
[ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. 
ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
diff --git a/meta/recipes-devtools/python/python3/run-ptest 
b/meta/recipes-devtools/python/python3/run-ptest
index 20c9274dfa7..50f92916eb6 100644
--- a/meta/recipes-devtools/python/python3/run-ptest
+++ b/meta/recipes-devtools/python/python3/run-ptest
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-python3 -m test -W | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. 
[ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. 
ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
+python3 -m test -W | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. 
[ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. 
ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ 

[OE-core] [PATCH 1/3] python3: Avoid hanging test

2019-04-08 Thread Richard Purdie
There is a python test which hangs with recent kernels, 5.0 onwards. This causes
ptest to timeout for python3. Disable the problematic test until we better 
understand
the real cause and fix of the issue (discussions are happening with upstream).

See the patch for details/links.

Signed-off-by: Richard Purdie 
---
 .../python/python3/ptesthack.patch| 49 +++
 meta/recipes-devtools/python/python3_3.7.2.bb |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3/ptesthack.patch

diff --git a/meta/recipes-devtools/python/python3/ptesthack.patch 
b/meta/recipes-devtools/python/python3/ptesthack.patch
new file mode 100644
index 000..3f5589645ed
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/ptesthack.patch
@@ -0,0 +1,49 @@
+This test hangs under 5.0 kernels onwards. It appears to be caused by the 
commit in the kernel:
+
+commit 4f693b55c3d2d2239b8a0094b518a1e533cf75d5 (HEAD, refs/bisect/bad)
+Author: Eric Dumazet 
+Date:   Tue Nov 27 14:42:03 2018 -0800
+
+tcp: implement coalescing on backlog queue
+
+In case GRO is not as efficient as it should be or disabled,
+we might have a user thread trapped in __release_sock() while
+softirq handler flood packets up to the point we have to drop.
+
+This patch balances work done from user thread and softirq,
+to give more chances to __release_sock() to complete its work
+before new packets are added the the backlog.
+
+This also helps if we receive many ACK packets, since GRO
+does not aggregate them.
+
+This patch brings ~60% throughput increase on a receiver
+without GRO, but the spectacular gain is really on
+1000x release_sock() latency reduction I have measured.
+
+Signed-off-by: Eric Dumazet 
+Cc: Neal Cardwell 
+Cc: Yuchung Cheng 
+Acked-by: Neal Cardwell 
+Signed-off-by: David S. Miller 
+
+
+Reported to upstream kernel for advice: 
https://lore.kernel.org/netdev/85aabf9d4f41b6c57629e736993233f80a037e59.ca...@linuxfoundation.org/T/#u
+
+Disable the test for now to stop ptests hanging
+
+Upstream-Status: Inappropriate [real cause of issue still TBD]
+
+Index: Python-3.7.2/Lib/test/test_httplib.py
+===
+--- Python-3.7.2.orig/Lib/test/test_httplib.py
 Python-3.7.2/Lib/test/test_httplib.py
+@@ -1114,7 +1114,7 @@ class BasicTest(TestCase):
+ self.assertEqual(sock.file.read(), extradata) #we read to the end
+ resp.close()
+ 
+-def test_response_fileno(self):
++def atest_response_fileno(self):
+ # Make sure fd returned by fileno is valid.
+ serv = socket.socket(
+ socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
diff --git a/meta/recipes-devtools/python/python3_3.7.2.bb 
b/meta/recipes-devtools/python/python3_3.7.2.bb
index 5c64bc8aa2a..3d44bdca911 100644
--- a/meta/recipes-devtools/python/python3_3.7.2.bb
+++ b/meta/recipes-devtools/python/python3_3.7.2.bb
@@ -21,6 +21,7 @@ SRC_URI = 
"http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \

file://0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch \
file://0002-Don-t-do-runtime-test-to-get-float-byte-order.patch \

file://0003-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \
+   file://ptesthack.patch \
"
 
 SRC_URI_append_class-native = " \
-- 
2.20.1

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


[OE-core] [PATCH] insane: fix gettext dependency warning

2019-04-08 Thread Ross Burton
This message was using %s markers but nothing was being passed in.

Signed-off-by: Ross Burton 
---
 meta/classes/insane.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index c8d18c07f55..43df0046201 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1087,7 +1087,7 @@ Rerun configure task after fixing this."""
 for config in configs:
 gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % 
config
 if subprocess.call(gnu, shell=True) == 0:
-error_msg = "%s required but not in DEPENDS for file %s. 
Missing inherit gettext?"
+error_msg = "AM_GNU_GETTEXT used but no inherit gettext"
 package_qa_handle_error("configure-gettext", error_msg, d)
 
 ###
-- 
2.11.0

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


Re: [OE-core] [PATCH v2 1/4] update-alternatives.bbclass: Add function to get metadata

2019-04-08 Thread richard . purdie
On Sun, 2019-04-07 at 21:23 -0500, Mariano Lopez wrote:
> On 4/7/19 4:32 PM, Richard Purdie wrote:
> > On Sun, 2019-04-07 at 12:15 -0500, Mariano Lopez wrote:
> > > -
> > > -# Default to generate shell script.. eventually we
> > > may want to change this...
> > > -alt_target = os.path.normpath(alt_target)
> > > -
> > > -alt_setup_links  += '\tupdate-alternatives --install 
> > > %s %s %s %s\n' % (alt_link, alt_name, alt_target, alt_priority)
> > > -alt_remove_links += '\tupdate-alternatives --
> > > remove  %s %s\n' % (alt_name, alt_target)
> > > +updates = update_alternatives_alt_targets(d, pkg)
> > > +for alt_name, alt_link, alt_target, alt_priority in
> > > updates:
> > > +   alt_setup_links  += '\tupdate-alternatives --install
> > > %s %s %s %s\n' % (alt_link, alt_name, alt_target, alt_priority)
> > > +   alt_remove_links += '\tupdate-alternatives --
> > > remove  %s %s\n' % (alt_name, alt_target)
> > I think the above is three whitespaces, not four? I know its minor
> > but
> > it jumped out as I was comparing the code before/after!
> > 
> > Cheers,
> > 
> > Richard
> > 
> 
> Good catch! I have sent the the fixed version but I messed up with
> the 
> cover letter, you can find the correct version here:
> https://patchwork.openembedded.org/patch/160236/
> 
> 
> I think I don't even need to put that link there :)

Thanks, unfortunately nativesdk-util-linux fails to build :(

https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/711

Cheers,

Richard

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


Re: [OE-core] Circular dependency of do_populate_sysroot

2019-04-08 Thread richard . purdie
On Mon, 2019-04-08 at 07:43 +0200, Stefan Herbrechtsmeier wrote:
> Am 07.04.2019 23:35 schrieb richard.pur...@linuxfoundation.org:
> > You're saying A runtime depends on B and B runtime depends on A.
> 
> Yes, only the run time depends on each other. This means the
> dependency doesn't exist during a native build of a or b.

In which case this is easy, simply set:

RDEPENDS_${PN}_class-native = ""

By default the system assumes that native packages have the same
dependencies as target.

Its complicated by PACKAGES being empty for native but the code knows
to look at "${PN}" for rdepends.

Cheers,

Richard


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


[OE-core] [PATCH v2] gcc-sanitizers: fix -Werror=maybe-uninitialized issue

2019-04-08 Thread mingli.yu
From: Mingli Yu 

When DEBUG_BUILD = "1" added in local.conf, there
comes below build error when "bitbake gcc-sanitizers":
| 
./../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:
 In function 'elf_is_symlink':
| 
../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21:
 error: 'st.st_mode' may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
|   return S_ISLNK (st.st_mode);

Initialize struct stat to fix the above issue.

Signed-off-by: Mingli Yu 
---
 meta/recipes-devtools/gcc/gcc-8.3.inc  |  1 +
 .../0041-elf.c-initialize-struct-stat.patch| 34 ++
 2 files changed, 35 insertions(+)
 create mode 100644 
meta/recipes-devtools/gcc/gcc-8.3/0041-elf.c-initialize-struct-stat.patch

diff --git a/meta/recipes-devtools/gcc/gcc-8.3.inc 
b/meta/recipes-devtools/gcc/gcc-8.3.inc
index f7bf257..317c6af 100644
--- a/meta/recipes-devtools/gcc/gcc-8.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-8.3.inc
@@ -71,6 +71,7 @@ SRC_URI = "\
file://0038-Re-introduce-spe-commandline-options.patch \
file://0039-riscv-Disable-multilib-for-OE.patch \
file://0040-powerpc-powerpc64-Add-support-for-musl-ldso.patch \
+   file://0041-elf.c-initialize-struct-stat.patch \
 "
 SRC_URI[md5sum] = "65b210b4bfe7e060051f799e0f994896"
 SRC_URI[sha256sum] = 
"64baadfe6cc0f4947a84cb12d7f0dfaf45bb58b7e92461639596c21e02d97d2c"
diff --git 
a/meta/recipes-devtools/gcc/gcc-8.3/0041-elf.c-initialize-struct-stat.patch 
b/meta/recipes-devtools/gcc/gcc-8.3/0041-elf.c-initialize-struct-stat.patch
new file mode 100644
index 000..56d62c9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-8.3/0041-elf.c-initialize-struct-stat.patch
@@ -0,0 +1,34 @@
+From eae259e4722a1c4606a1e6df7ee84a311a91f4a6 Mon Sep 17 00:00:00 2001
+From: Mingli Yu 
+Date: Mon, 8 Apr 2019 14:19:31 +0800
+Subject: [PATCH] elf.c: initialize struct stat
+
+Initialize struct stat to fix the below
+build failure when -Og included in compiler flag.
+| 
./../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:
 In function 'elf_is_symlink':
+| 
../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21:
 error: 'st.st_mode' may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
+   return S_ISLNK (st.st_mode);
+
+Upstream-Status: 
Submitted[https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00261.html]
+
+Signed-off-by: Mingli Yu 
+---
+ libbacktrace/elf.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c
+index f4863f0..8c57047 100644
+--- a/libbacktrace/elf.c
 b/libbacktrace/elf.c
+@@ -765,7 +765,7 @@ elf_syminfo (struct backtrace_state *state, uintptr_t addr,
+ static int
+ elf_is_symlink (const char *filename)
+ {
+-  struct stat st;
++  struct stat st = {0};
+ 
+   if (lstat (filename, ) < 0)
+ return 0;
+-- 
+2.7.4
+
-- 
2.7.4

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


[OE-core] [PATCH V2] cogl: fix compile error with -Werror=maybe-uninitialized

2019-04-08 Thread changqing.li
From: Changqing Li 

fix below compile error with -Werror=maybe-uninitialized
while DEBUG_BUILD is enabled

| ../../cogl-1.22.2/cogl/driver/gl/gles/cogl-driver-gles.c:217:17: error: 
'gltype' may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
|  *out_gltype = gltype;
|  ^~~~
| ../../cogl-1.22.2/cogl/driver/gl/gles/cogl-driver-gles.c:213:22: error: 
'glintformat' may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
|  *out_glintformat = glintformat;
|  ~^

Signed-off-by: Changqing Li 
---
 ...mpile-error-with-Werror-maybe-uninitializ.patch | 40 ++
 meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb  |  4 ++-
 2 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-graphics/cogl/cogl-1.0/0001-cogl-fix-compile-error-with-Werror-maybe-uninitializ.patch

diff --git 
a/meta/recipes-graphics/cogl/cogl-1.0/0001-cogl-fix-compile-error-with-Werror-maybe-uninitializ.patch
 
b/meta/recipes-graphics/cogl/cogl-1.0/0001-cogl-fix-compile-error-with-Werror-maybe-uninitializ.patch
new file mode 100644
index 000..1cfd35c
--- /dev/null
+++ 
b/meta/recipes-graphics/cogl/cogl-1.0/0001-cogl-fix-compile-error-with-Werror-maybe-uninitializ.patch
@@ -0,0 +1,40 @@
+From e05ee89fcc978fceccab3e4724a3a37f7a338499 Mon Sep 17 00:00:00 2001
+From: Changqing Li 
+Date: Tue, 2 Apr 2019 14:48:49 +0800
+Subject: [PATCH] cogl: fix compile error with -Werror=maybe-uninitialized
+
+fix below compile error with -Werror=maybe-uninitialized when DEBUG_BUILD is 
enabled
+
+| ../../cogl-1.22.2/cogl/driver/gl/gles/cogl-driver-gles.c:217:17: error: 
'gltype' may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
+|  *out_gltype = gltype;
+|  ^~~~
+| ../../cogl-1.22.2/cogl/driver/gl/gles/cogl-driver-gles.c:213:22: error: 
'glintformat' may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
+|  *out_glintformat = glintformat;
+|  ~^
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/cogl/issues/6]
+
+Signed-off-by: Changqing Li 
+---
+ cogl/driver/gl/gles/cogl-driver-gles.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cogl/driver/gl/gles/cogl-driver-gles.c 
b/cogl/driver/gl/gles/cogl-driver-gles.c
+index e94449f..a59d815 100644
+--- a/cogl/driver/gl/gles/cogl-driver-gles.c
 b/cogl/driver/gl/gles/cogl-driver-gles.c
+@@ -74,9 +74,9 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
+  GLenum *out_gltype)
+ {
+   CoglPixelFormat required_format;
+-  GLenum glintformat;
++  GLenum glintformat = 0;
+   GLenum glformat = 0;
+-  GLenum gltype;
++  GLenum gltype = 0;
+ 
+   required_format = format;
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb 
b/meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb
index 5901062..5ddeb4a 100644
--- a/meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb
+++ b/meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb
@@ -1,7 +1,9 @@
 require cogl-1.0.inc
 
 SRC_URI += "file://test-backface-culling.c-fix-may-be-used-uninitialize.patch \
-file://0001-Fix-an-incorrect-preprocessor-conditional.patch"
+file://0001-Fix-an-incorrect-preprocessor-conditional.patch \
+
file://0001-cogl-fix-compile-error-with-Werror-maybe-uninitializ.patch \
+   "
 SRC_URI[archive.md5sum] = "d53b708ca7c4af03d7254e46945d6b33"
 SRC_URI[archive.sha256sum] = 
"39a718cdb64ea45225a7e94f88dddec1869ab37a21b339ad058a9d898782c00d"
 
-- 
2.7.4

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