Re: [OE-core] [rocko][PATCH] bind: move libraries to own package

2018-04-10 Thread Andre McCurdy
On Tue, Feb 20, 2018 at 12:49 PM, Andre McCurdy  wrote:
> On Tue, Jan 23, 2018 at 12:25 PM, Andre McCurdy  wrote:
>> On Tue, Dec 5, 2017 at 5:39 PM, Andre McCurdy  wrote:
>>> From: "andreas.kl...@peiker-cee.de" 
>>>
>>> Signed-off-by: Andy Kling 
>>> Signed-off-by: Ross Burton 
>>> (cherry picked from commit d74ebc91388941295a2321a295cdb06ee87fc38b)
>>> Signed-off-by: Andre McCurdy 
>>
>> Ping.
>
> Ping again.

Ping number 3.

>>> ---
>>>  meta/recipes-connectivity/bind/bind_9.10.5-P3.bb | 3 +++
>>>  1 file changed, 3 insertions(+)
>>>
>>> diff --git a/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb 
>>> b/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb
>>> index 13724a8..8309302 100644
>>> --- a/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb
>>> +++ b/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb
>>> @@ -67,6 +67,9 @@ FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
>>>  FILES_${PN}-dev += "${bindir}/isc-config.h"
>>>  FILES_${PN} += "${sbindir}/generate-rndc-key.sh ${PYTHON_SITEPACKAGES_DIR}"
>>>
>>> +PACKAGE_BEFORE_PN += "${PN}-libs"
>>> +FILES_${PN}-libs = "${libdir}/*.so*"
>>> +
>>>  do_install_prepend() {
>>> # clean host path in isc-config.sh before the hardlink created
>>> # by "make install":
>>> --
>>> 1.9.1
>>>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for "[pyro] glibc: add missing TRAP..." and 1 more

2018-04-10 Thread Patchwork
== Series Details ==

Series: "[pyro] glibc: add missing TRAP..." and 1 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/11763/
State : failure

== Summary ==


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



* Issue A patch file has been added, but does not have a 
Signed-off-by tag [test_signed_off_by_presence] 
  Suggested fixSign off the added patch file 
(meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch)



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

---
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] [pyro][PATCH 1/2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions

2018-04-10 Thread Daniel Díaz
From: Fathi Boudra 

Patch submitted upstream, pending to be merged:
https://sourceware.org/bugzilla/show_bug.cgi?id=21286

(From OE-Core rev: 11ebb5054e5ec1171ade90249e3a30ac8174a35a)

Signed-off-by: Fathi Boudra 
Signed-off-by: Daniel Díaz 
Signed-off-by: Ross Burton 
---
 ...o.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch | 68 ++
 meta/recipes-core/glibc/glibc_2.25.bb  |  1 +
 2 files changed, 69 insertions(+)
 create mode 100644 
meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch

diff --git 
a/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch
 
b/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch
new file mode 100644
index 000..bef8887
--- /dev/null
+++ 
b/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch
@@ -0,0 +1,68 @@
+From 297aca56465035dce1f7b91b5cdda54379141957 Mon Sep 17 00:00:00 2001
+From: Pratyush Anand 
+Date: Wed, 22 Mar 2017 17:02:38 +0530
+Subject: [PATCH] bits/siginfo.h: enum definition for TRAP_HWBKPT is missing
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Compile following linux kernel test code with latest glibc:
+
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
+
+and we get following error:
+breakpoint_test_arm64.c: In function ‘run_test’:
+breakpoint_test_arm64.c:171:25: error: ‘TRAP_HWBKPT’ undeclared (first use in 
this function)
+  if (siginfo.si_code != TRAP_HWBKPT) {
+ ^
+I can compile test code by modifying my local
+/usr/include/bits/siginfo.h and test works great. Therefore, this patch
+will be needed in upstream glibc so that issue is fixed there as well.
+
+Signed-off-by: Pratyush Anand 
+
+Upstream-Status: Submitted 
[https://sourceware.org/bugzilla/show_bug.cgi?id=21286]
+---
+ bits/siginfo.h | 6 +-
+ sysdeps/unix/sysv/linux/bits/siginfo.h | 6 +-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/bits/siginfo.h b/bits/siginfo.h
+index 4919df5..6dc714e 100644
+--- a/bits/siginfo.h
 b/bits/siginfo.h
+@@ -140,8 +140,12 @@ enum
+ {
+   TRAP_BRKPT = 1, /* Process breakpoint.  */
+ #  define TRAP_BRKPT  TRAP_BRKPT
+-  TRAP_TRACE  /* Process trace trap.  */
++  TRAP_TRACE, /* Process trace trap.  */
+ #  define TRAP_TRACE  TRAP_TRACE
++  TRAP_BRANCH,/* Process branch trap. */
++# define TRAP_BRANCH  TRAP_BRANCH
++  TRAP_HWBKPT /* hardware breakpoint/watchpoint  */
++# define TRAP_HWBKPT  TRAP_HWBKPT
+ };
+ # endif
+ 
+diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h 
b/sysdeps/unix/sysv/linux/bits/siginfo.h
+index 7b0d4f6..9cdf42a 100644
+--- a/sysdeps/unix/sysv/linux/bits/siginfo.h
 b/sysdeps/unix/sysv/linux/bits/siginfo.h
+@@ -235,8 +235,12 @@ enum
+ {
+   TRAP_BRKPT = 1, /* Process breakpoint.  */
+ #  define TRAP_BRKPT  TRAP_BRKPT
+-  TRAP_TRACE  /* Process trace trap.  */
++  TRAP_TRACE, /* Process trace trap.  */
+ #  define TRAP_TRACE  TRAP_TRACE
++  TRAP_BRANCH,/* Process branch trap. */
++# define TRAP_BRANCH  TRAP_BRANCH
++  TRAP_HWBKPT /* hardware breakpoint/watchpoint  */
++# define TRAP_HWBKPT  TRAP_HWBKPT
+ };
+ # endif
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-core/glibc/glibc_2.25.bb 
b/meta/recipes-core/glibc/glibc_2.25.bb
index 58b90b7..49fcf0c 100644
--- a/meta/recipes-core/glibc/glibc_2.25.bb
+++ b/meta/recipes-core/glibc/glibc_2.25.bb
@@ -43,6 +43,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \

file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
file://0027-locale-fix-hard-coded-reference-to-gcc-E.patch \
file://0028-Rework-fno-omit-frame-pointer-support-on-i386.patch \
+   
file://0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch \
 "
 
 NATIVESDKFIXES ?= ""
-- 
2.7.4

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


[OE-core] [pyro][PATCH 2/2] gdb: fix header ordering for TRAP_HWBKPT

2018-04-10 Thread Daniel Díaz
This error can appear in gdb/nat/linux-ptrace.c because of
the order in which some headers are processed:
| In file included from ../../gdb-7.11.1/gdb/nat/linux-ptrace.c:20:0:
| ../../gdb-7.11.1/gdb/nat/linux-ptrace.h:175:22: error: expected identifier 
before numeric constant
|  # define TRAP_HWBKPT 4
|   ^
| Makefile:2357: recipe for target 'linux-ptrace.o' failed
| make[2]: *** [linux-ptrace.o] Error 1
| make[2]: *** Waiting for unfinished jobs
| make[2]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux/gdb'
| Makefile:8822: recipe for target 'all-gdb' failed
| make[1]: *** [all-gdb] Error 2
| make[1]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux'
| Makefile:846: recipe for target 'all' failed
| make: *** [all] Error 2

A patch from GDB's current master solves the issue.

(From OE-Core rev: 4aaf747099714ec11158571527396ed9e818729e)

Signed-off-by: Daniel Díaz 
Signed-off-by: Ross Burton 
---
 meta/recipes-devtools/gdb/gdb-7.12.1.inc   |  1 +
 ...4-defining-TRAP_HWBKPT-before-including-g.patch | 51 ++
 2 files changed, 52 insertions(+)
 create mode 100644 
meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch

diff --git a/meta/recipes-devtools/gdb/gdb-7.12.1.inc 
b/meta/recipes-devtools/gdb/gdb-7.12.1.inc
index 634756c..1d81185 100644
--- a/meta/recipes-devtools/gdb/gdb-7.12.1.inc
+++ b/meta/recipes-devtools/gdb/gdb-7.12.1.inc
@@ -16,6 +16,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
file://0009-Change-order-of-CFLAGS.patch \
file://0010-resolve-restrict-keyword-conflict.patch \
file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch 
\
+   file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
 "
 SRC_URI[md5sum] = "193453347ddced7acb6b1cd2ee8f2e4b"
 SRC_URI[sha256sum] = 
"4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186"
diff --git 
a/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
new file mode 100644
index 000..cbcc65a
--- /dev/null
+++ 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
@@ -0,0 +1,51 @@
+From 49bd068c3acf376a3018c0ebd849bf7f72a1874d Mon Sep 17 00:00:00 2001
+From: James Clarke 
+Date: Fri, 19 Jan 2018 17:22:49 +
+Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
+ gdb_wait.h
+
+On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
+contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
+define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included
+earlier; include it from linux-ptrace.h so it can never come afterwards.
+
+gdb/ChangeLog:
+
+   * nat/linux-ptrace.c: Remove unnecessary reinclusion of
+   gdb_ptrace.h, and move including gdb_wait.h ...
+   * nat/linux-ptrace.h: ... to here.
+
+Upstream-Status: Accepted 
[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]
+---
+ gdb/nat/linux-ptrace.c | 2 --
+ gdb/nat/linux-ptrace.h | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
+index 3447e07..dd3310e 100644
+--- a/gdb/nat/linux-ptrace.c
 b/gdb/nat/linux-ptrace.c
+@@ -21,8 +21,6 @@
+ #include "linux-procfs.h"
+ #include "linux-waitpid.h"
+ #include "buffer.h"
+-#include "gdb_wait.h"
+-#include "gdb_ptrace.h"
+ #include 
+ 
+ /* Stores the ptrace options supported by the running kernel.
+diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
+index 5954945..6faa89b 100644
+--- a/gdb/nat/linux-ptrace.h
 b/gdb/nat/linux-ptrace.h
+@@ -21,6 +21,7 @@
+ struct buffer;
+ 
+ #include "nat/gdb_ptrace.h"
++#include "gdb_wait.h"
+ 
+ #ifdef __UCLIBC__
+ #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
+-- 
+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] [sumo][PATCH 3/7] icecc-create-env: Fix library interpreter usage

2018-04-10 Thread Joshua Watt
Shared libraries sometimes (frequently?) don't have a program
interpreter specified. The previous code would fail to find the library
dependencies in these cases because no interpreter could be found.
Commonly, this meant that if a library depends on another library, it
might not be included toolchain because dependency scanning stops with
the first one.

Instead, capture the program interpreter from the program or library
that starts the dependency chain and use that interpreter to get all of
the dependencies in the chain, recursively.

Additionally, if no interpreter can be found, fallback to using ldd

Signed-off-by: Joshua Watt 
---
 .../icecc-create-env/icecc-create-env  | 112 ++---
 1 file changed, 77 insertions(+), 35 deletions(-)

diff --git 
a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env 
b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
index 3015f4e2155..b88c53a424b 100755
--- a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
+++ b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
@@ -99,48 +99,90 @@ normalize_path ()
 echo $path
 }
 
-add_file ()
+add_file_common()
+{
+local p="$1"
+local path="$2"
+local alias="$3"
+
+add_alias "$path" "$p"
+if test -n "$alias"; then
+add_alias "$path" "$alias"
+fi
+
+add_path "$path" || return 1
+print_debug "Adding file '$path'"
+
+return 0
+}
+
+add_deps()
+{
+local path="$1"
+local interp="$2"
+
+if test -n "$interp" && test -x "$interp"; then
+# Use the dynamic loaders --list argument to list the
+# dependencies. The program may have a different program
+# interpreter (typical when using uninative tarballs), which is
+# why we can't just call ldd.
+deps="`$interp --list "$path"`"
+else
+deps="`ldd "$path"`"
+fi
+
+print_debug "Dependencies are:"
+print_debug "$deps"
+if test -n "$deps"; then
+for lib in $deps; do
+# ldd now outputs ld as /lib/ld-linux.so.xx on current nptl
+# based glibc this regexp parse the outputs like:
+# ldd /usr/bin/gcc
+# linux-gate.so.1 =>  (0xe000)
+# libc.so.6 => /lib/tls/libc.so.6 (0xb7e81000)
+# /lib/ld-linux.so.2 (0xb7fe8000)
+# covering both situations ( with => and without )
+lib="`echo "$lib" | sed -n 's,^[^/]*\(/[^ ]*\).*,\1,p'`"
+
+test -f "$lib" || continue
+# Check whether the same library also exists in the parent
+# directory, and prefer that on the assumption that it is a
+# more generic one.
+local baselib=`echo "$lib" | sed 
's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`
+test -f "$baselib" && lib=$baselib
+add_dependency "$lib" "$interp"
+done
+fi
+}
+
+add_dependency()
 {
 local p=`normalize_path $1`
 # readlink is required for Yocto, so we can use it
 local path=`readlink -f "$p"`
+local interp="$2"
 
-add_alias "$path" "$p"
-if test -n "$2"; then
-add_alias "$path" "$2"
+add_file_common "$p" "$path" || return
+
+if test -x "$path" && is_dynamic_elf "$path"; then
+add_deps "$path" "$interp"
 fi
+}
 
-add_path "$path" || return
-
-if test -x "$path"; then
-# Only call ldd when it makes sense
-if is_dynamic_elf "$path"; then
-# Request the program interpeter (dynamic loader)
-interp=`readelf -w -l "$path" | grep "Requesting program 
interpreter:" | sed "s/\s*\[Requesting program interpreter:\s*\(.*\)\]/\1/g"`
-
-if test -n "$interp" && test -x "$interp"; then
-# Use the dynamic loaders --list argument to list the
-# depenencies. The program may have a a different program
-# interpeter (typical when using uninative tarballs), which is
-# why we can't just call ldd.
-#
-# ldd now outputs ld as /lib/ld-linux.so.xx on current nptl 
based glibc
-# this regexp parse the outputs like:
-# ldd /usr/bin/gcc
-# linux-gate.so.1 =>  (0xe000)
-# libc.so.6 => /lib/tls/libc.so.6 (0xb7e81000)
-# /lib/ld-linux.so.2 (0xb7fe8000)
-# covering both situations ( with => and without )
-for lib in `$interp --list "$path" | sed -n 's,^[^/]*\(/[^ 
]*\).*,\1,p'`; do
-test -f "$lib" || continue
-# Check wether the same library also exists in the parent 
directory,
-# and prefer that on the assumption that it is a more 
generic one.
-local baselib=`echo "$lib" | sed 
's,\(/[^/]*\)/.*\(/[^/]*\)$,\1\2,'`
-test -f 

[OE-core] [sumo][PATCH 4/7] icecc-create-env: Add extra tools option

2018-04-10 Thread Joshua Watt
It can often be useful to include additional debugging tools the
toolchain such as strace. Add an option to include an arbitrary path.

Signed-off-by: Joshua Watt 
---
 .../icecc-create-env/icecc-create-env/icecc-create-env   | 12 
 1 file changed, 12 insertions(+)

diff --git 
a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env 
b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
index b88c53a424b..64b5e207853 100755
--- a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
+++ b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
@@ -197,6 +197,9 @@ while test -n "$1"; do
 --log)
 do_log=1
 ;;
+--extra=*)
+extra_tools="$extra_tools ${1#--extra=}"
+;;
 *)
 break
 ;;
@@ -284,6 +287,15 @@ else
 exit 1
 fi
 
+for extra in $extra_tools; do
+if test -x "$extra"; then
+add_file "$extra"
+else
+print_output "'$extra' not found"
+exit 1
+fi
+done
+
 link_rel ()
 {
 local target="$1"
-- 
2.14.3

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


[OE-core] [sumo][PATCH 6/7] icecc.bbclass: Improve error reporting

2018-04-10 Thread Joshua Watt
Improve reporting when the icecream environment cannot be created by
assigning the flock call a specific error number when the lock fails so
it can be distinguished from environment creation errors.

Signed-off-by: Joshua Watt 
---
 meta/classes/icecc.bbclass | 20 +---
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index aea1095f5fb..1b58d1f5e52 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -366,14 +366,20 @@ set_icecc_env() {
 
 # the ICECC_VERSION generation step must be locked by a mutex
 # in order to prevent race conditions
-if flock -n "${ICECC_VERSION}.lock" \
-${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" 
"${ICECC_AS}" "${ICECC_VERSION}"
-then
+exit_code=0
+flock -n -E 10 "${ICECC_VERSION}.lock" \
+${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" 
"${ICECC_AS}" "${ICECC_VERSION}" || exit_code=$?
+if [ "$exit_code" -eq 0 ]; then
+touch "${ICECC_VERSION}.done"
+elif [ "$exit_code" -eq "10" ]; then
+if [ ! wait_for_file "${ICECC_VERSION}.done" 30 ]; then
+# locking failed so wait for ${ICECC_VERSION}.done to appear
+bbwarn "Timeout waiting for ${ICECC_VERSION}.done"
+return
+fi
+else
+bbwarn "Could not create icecc environment: $exit_code"
 touch "${ICECC_VERSION}.done"
-elif [ ! wait_for_file "${ICECC_VERSION}.done" 30 ]
-then
-# locking failed so wait for ${ICECC_VERSION}.done to appear
-bbwarn "Timeout waiting for ${ICECC_VERSION}.done"
 return
 fi
 fi
-- 
2.14.3

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


[OE-core] [sumo][PATCH 5/7] icecc.bbclass: Add ICECC_ENV_DEBUG variable

2018-04-10 Thread Joshua Watt
The ICECC_ENV_DEBUG variable can be set in local.conf to pass additional
debugging options to the Icecream toolchain creation script.

Signed-off-by: Joshua Watt 
---
 meta/classes/icecc.bbclass | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index cab64f52703..aea1095f5fb 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -33,6 +33,7 @@ BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED 
ICECC_USER_PACKAGE_
 ICECC_CARET_WORKAROUND ICECC_CFLAGS ICECC_ENV_VERSION \
 ICECC_DEBUG ICECC_LOGFILE ICECC_REPEAT_RATE ICECC_PREFERRED_HOST \
 ICECC_CLANG_REMOTE_CPP ICECC_IGNORE_UNVERIFIED ICECC_TEST_SOCKET \
+ICECC_ENV_DEBUG \
 "
 
 ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
@@ -57,6 +58,9 @@ ICECC_CFLAGS = ""
 CFLAGS += "${ICECC_CFLAGS}"
 CXXFLAGS += "${ICECC_CFLAGS}"
 
+# Debug flags when generating environments
+ICECC_ENV_DEBUG ??= ""
+
 def icecc_dep_prepend(d):
 # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command.  Whether or  not
 # we need that built is the responsibility of the patch function / class, 
not
@@ -363,7 +367,7 @@ set_icecc_env() {
 # the ICECC_VERSION generation step must be locked by a mutex
 # in order to prevent race conditions
 if flock -n "${ICECC_VERSION}.lock" \
-${ICECC_ENV_EXEC} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" 
"${ICECC_VERSION}"
+${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" 
"${ICECC_AS}" "${ICECC_VERSION}"
 then
 touch "${ICECC_VERSION}.done"
 elif [ ! wait_for_file "${ICECC_VERSION}.done" 30 ]
-- 
2.14.3

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


[OE-core] [sumo][PATCH 7/7] icecc.bbclass: Bump version number

2018-04-10 Thread Joshua Watt
Bump the version number for force remotes to use a newly generated
environment, since the old one potentially had a few bugs

Signed-off-by: Joshua Watt 
---
 meta/classes/icecc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 1b58d1f5e52..73eba7a6a96 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -45,7 +45,7 @@ ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
 # A useful thing to do for testing Icecream changes locally is to add a
 # subversion in local.conf:
 #  ICECC_ENV_VERSION_append = "-my-ver-1"
-ICECC_ENV_VERSION = "1"
+ICECC_ENV_VERSION = "2"
 
 # Default to disabling the caret workaround, If set to "1" in local.conf, icecc
 # will locally recompile any files that have warnings, which can adversely
-- 
2.14.3

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


[OE-core] [sumo][PATCH 2/7] icecc-create-env: Fix RUNPATH files

2018-04-10 Thread Joshua Watt
Some newer libraries and programs use RUNPATH to specify the library
search path. These executables were being skipped by the rpath fixup
code because it was grepping the ELF header for RPATH only. A more
correct solution is to ask patchelf to report the rpath, as that tool
will properly report either RPATH or RUNPATH as appropriate.

Signed-off-by: Joshua Watt 
---
 .../icecc-create-env/icecc-create-env/icecc-create-env| 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env 
b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
index 074c7675c0b..3015f4e2155 100755
--- a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
+++ b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
@@ -42,11 +42,13 @@ fix_rpath ()
 if ! is_dynamic_elf "$path"; then
 return
 fi
-local new_rpath="`readelf -w -d "$path" | grep RPATH | \
+local old_rpath="`$PATCHELF --print-rpath "$path"`"
+local new_rpath="`echo "$old_rpath" | \
 sed 's/.*\[\(.*\)\]/\1/g' | \
 sed "s,\\\$ORIGIN,/$origin,g"`"
 
 if test -n "$new_rpath"; then
+print_debug "Converting RPATH '$old_rpath' -> '$new_rpath'"
 $PATCHELF --set-rpath "$new_rpath" "$path"
 fi
 }
-- 
2.14.3

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


[OE-core] [sumo][PATCH 1/7] icecc-create-env: Allow logging to a file

2018-04-10 Thread Joshua Watt
Modifies the icecc-create-env script so that it can log output to a log
file. In addition, a --debug flag is added that allows verbose logging.
Finally, the silent flag was removed since it was never used in
icecc.bbclass

Signed-off-by: Joshua Watt 
---
 .../icecc-create-env/icecc-create-env  | 74 ++
 1 file changed, 49 insertions(+), 25 deletions(-)

diff --git 
a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env 
b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
index 537e38a9ba0..074c7675c0b 100755
--- a/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
+++ b/meta/recipes-devtools/icecc-create-env/icecc-create-env/icecc-create-env
@@ -7,6 +7,24 @@
 target_paths=
 target_aliases=
 
+# Always prints, optionally to a log file
+print_output ()
+{
+if test -n "$log_path"; then
+echo "$@" | tee -a "$log_path"
+else
+echo "$@"
+fi
+}
+
+# Only prints if the debug flag is specified
+print_debug ()
+{
+if test -n "$debug"; then
+print_output "$@"
+fi
+}
+
 is_dynamic_elf ()
 {
 # Is the file an dynamically linked ELF executable?
@@ -54,6 +72,7 @@ add_alias ()
 *" $alias "*)
 ;;
 *)
+print_debug "Adding alias '$2' -> '$1'"
 target_aliases="$target_aliases $alias"
 ;;
 esac
@@ -123,17 +142,23 @@ add_file ()
 fi
 }
 
-# backward compat
-if test "$1" = "--respect-path"; then
-shift
-fi
-
-#add a --silent switch to avoid "broken pipe" errors when calling this scipt 
from within OE
-if test "$1" = "--silent"; then
-silent=1
+while test -n "$1"; do
+case "$1" in
+--respect-path)
+# Ignore for backward compatability
+;;
+--debug)
+debug=1
+;;
+--log)
+do_log=1
+;;
+*)
+break
+;;
+esac
 shift
-fi
-
+done
 
 added_gcc=$1
 shift
@@ -143,6 +168,11 @@ added_as=$1
 shift
 archive_name=$1
 
+if test -n "$do_log"; then
+log_path="$archive_name.log"
+rm -f "$log_path"
+fi
+
 if test -z "$PATCHELF"; then
 PATCHELF=`which patchelf 2> /dev/null`
 fi
@@ -150,22 +180,22 @@ if test -z "$PATCHELF"; then
 PATCHELF=`which patchelf-uninative 2> /dev/null`
 fi
 if test -z "$PATCHELF"; then
-echo "patchelf is required"
+print_output "patchelf is required"
 exit 1
 fi
 
 if test -z "$added_gcc" || test -z "$added_gxx" ; then
-echo "usage: $0  "
+print_output "usage: $0  "
 exit 1
 fi
 
 if ! test -x "$added_gcc" ; then
-echo "'$added_gcc' is no executable."
+print_output "'$added_gcc' is not executable."
 exit 1
 fi
 
 if ! test -x "$added_gxx" ; then
-echo "'$added_gcc' is no executable."
+print_output "'$added_gcc' is not executable."
 exit 1
 fi
 
@@ -178,7 +208,7 @@ if test -z "$added_as" ; then
 add_file /usr/bin/as /usr/bin/as
 else
 if ! test -x "$added_as" ; then
-echo "'$added_as' is no executable."
+print_output "'$added_as' is not executable."
 exit 1
 fi
 
@@ -206,7 +236,7 @@ if test -x /bin/true; then
 elif test -x /usr/bin/true; then
 add_file /usr/bin/true /bin/true
 else
-echo "'true' not found"
+print_output "'true' not found"
 exit 1
 fi
 
@@ -266,9 +296,7 @@ if test -z "$archive_name"; then
 
 #calculate md5 and use it as the archive name
 archive_name=`for i in $target_files; do test -f $tempdir/$i && $md5sum 
$tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'`.tar.gz || {
-if test -z "$silent"; then
-echo "Couldn't compute MD5 sum."
-fi
+print_output "Couldn't compute MD5 sum."
 exit 2
 }
 mydir=`pwd`
@@ -283,9 +311,7 @@ else
 fi
 fi
 
-if test -z "$silent"; then
-echo "creating $archive_name"
-fi
+print_output "creating $archive_name"
 
 cd $tempdir
 # Add everything in the temp directory. Tar doesn't like to be given files with
@@ -293,9 +319,7 @@ cd $tempdir
 # the path prefix past the offending "..". This makes the archive generate
 # incorrectly
 tar -czf "$mydir/$archive_name" . || {
-if test -z "$silent"; then
-echo "Couldn't create archive"
-fi
+print_output "Couldn't create archive"
 exit 3
 }
 cd ..
-- 
2.14.3

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


[OE-core] [sumo][PATCH 0/7] Icecream fixes

2018-04-10 Thread Joshua Watt
Fixes a number of bugs in Icecream toolchain generation

Joshua Watt (7):
  icecc-create-env: Allow logging to a file
  icecc-create-env: Fix RUNPATH files
  icecc-create-env: Fix library interpreter usage
  icecc-create-env: Add extra tools option
  icecc.bbclass: Add ICECC_ENV_DEBUG variable
  icecc.bbclass: Improve error reporting
  icecc.bbclass: Bump version number

 meta/classes/icecc.bbclass |  26 ++-
 .../icecc-create-env/icecc-create-env  | 202 ++---
 2 files changed, 159 insertions(+), 69 deletions(-)

-- 
2.14.3

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


[OE-core] [PATCH] oe-selftest: crosstap: add tests for crosstap script

2018-04-10 Thread Yeoh Ee Peng
QA team were testing crosstap script manually. Add automated
tests and systemtap file to test that crosstap script will
instructs SystemTap to print hello world in qemu. This test
will first built core-image-minimal image with tools-profile
& ssh-server-openssh features and build systemtap-native on
the host machine. Finally this test will boot the image with qemu
and then execute crosstap script to print hello world on qemu.

Signed-off-by: Yeoh Ee Peng 
---
 meta/lib/oeqa/files/trace_begin_hello.stp |  5 +
 meta/lib/oeqa/selftest/cases/crosstap.py  | 25 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta/lib/oeqa/files/trace_begin_hello.stp
 create mode 100644 meta/lib/oeqa/selftest/cases/crosstap.py

diff --git a/meta/lib/oeqa/files/trace_begin_hello.stp 
b/meta/lib/oeqa/files/trace_begin_hello.stp
new file mode 100644
index 000..5ad5f15
--- /dev/null
+++ b/meta/lib/oeqa/files/trace_begin_hello.stp
@@ -0,0 +1,5 @@
+probe begin
+{
+  printf ("hello world\n")
+  exit ()
+}
\ No newline at end of file
diff --git a/meta/lib/oeqa/selftest/cases/crosstap.py 
b/meta/lib/oeqa/selftest/cases/crosstap.py
new file mode 100644
index 000..57523cb
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/crosstap.py
@@ -0,0 +1,25 @@
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, get_bb_vars, runCmd, runqemu
+import os
+
+class CrossTapTest(OESelftestTestCase):
+
+def test_crosstap_can_use_systemtap_on_qemu(self):
+self.write_config('EXTRA_IMAGE_FEATURES += "tools-profile 
ssh-server-openssh"')
+result = bitbake('core-image-minimal')
+self.assertEqual(result.status, 0, msg="Bitbake core-image-minimal 
failed. Bitbake output: %s" % result.output)
+result = bitbake('systemtap-native')
+self.assertEqual(result.status, 0, msg="Bitbake systemtap-native 
failed. Bitbake output: %s" % result.output)
+
+recipe = 'core-image-minimal'
+bb_vars = get_bb_vars(['MACHINE', 'DEPLOY_DIR_IMAGE'])
+machine =  bb_vars['MACHINE']
+deploy_dir_image = bb_vars['DEPLOY_DIR_IMAGE']
+qemuboot_conf = "%s-%s.qemuboot.conf" % (recipe, machine)
+qemuboot_conf = os.path.join(deploy_dir_image, qemuboot_conf)
+cmd_common = "runqemu nographic"
+cmd = "%s %s" % (cmd_common, qemuboot_conf)
+with runqemu(recipe, ssh=True, launch_cmd=cmd) as qemu:
+systap_file = os.path.join(self.tc.files_dir, 
'trace_begin_hello.stp')
+result = runCmd("crosstap root@%s %s" % (qemu.ip, systap_file))
+self.assertTrue('hello world' in result.output, 'Crosstap failed.')
-- 
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/2] weston: upgrade to 4.0.0

2018-04-10 Thread Denys Dmytriyenko
On Wed, Apr 11, 2018 at 12:17:51AM +0100, Burton, Ross wrote:
> Ah presumably this is because the U-S is after the scissors.  Denys,
> when you add it back, can you put it above the ---?

Sure, will do.


> On 11 April 2018 at 00:16, Burton, Ross  wrote:
> > On 10 April 2018 at 20:06, Denys Dmytriyenko  wrote:
> >> diff --git 
> >> a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch 
> >> b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
> >> index 0671a45..6799254 100644
> >> --- a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
> >> +++ b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
> >> @@ -1,26 +1,25 @@
> >> -From c22e90365d89346258394833cbcad03ff32b2e27 Mon Sep 17 00:00:00 2001
> >> +From ad1d2161c811cff25d1684c33611f300adb753bc Mon Sep 17 00:00:00 2001
> >>  From: Khem Raj 
> >>  Date: Fri, 29 May 2015 20:56:00 -0700
> >> -Subject: [PATCH weston] make error() portable
> >> +Subject: [PATCH] make error() portable
> >>
> >>  error() is not posix but gnu extension so may not be available on all
> >>  kind of systemsi e.g. musl.
> >>
> >>  Signed-off-by: Khem Raj 
> >> 
> >> -Upstream-Status: Submitted
> >
> > Ah, I've seen this before and was wondering if it was a genuine
> > mistake or devtool being bad.
> >
> > devtool refresh is doing A Bad Thing and for some reason dropping the
> > Upstream-Status tag.  Alex, can you see why this is?  Denys, can you
> > edit it back in?
> >
> > Ross
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [sumo][PATCH] dhcp: Security Advisory - CVE-2017-3144

2018-04-10 Thread Yi Zhao
From: Yue Tao 

Fix CVE-2017-3144

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-3144
https://kb.isc.org/article/AA-01541

Patch from:
https://source.isc.org/cgi-bin/gitweb.cgi?p=dhcp.git;a=commitdiff;h=5097bc0559f592683faac1f67bf350e1bddf6ed4

Signed-off-by: Yue Tao 
Signed-off-by: Mingli Yu 
Signed-off-by: Yi Zhao 
---
 .../dhcp/dhcp/CVE-2017-3144.patch  | 74 ++
 meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb   |  1 +
 2 files changed, 75 insertions(+)
 create mode 100644 meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch

diff --git a/meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch 
b/meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch
new file mode 100644
index 000..2b2688c
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/CVE-2017-3144.patch
@@ -0,0 +1,74 @@
+From 8cfdedee369c26d2869b6ec4a64460b5f5a30934 Mon Sep 17 00:00:00 2001
+From: Thomas Markwalder 
+Date: Thu, 7 Dec 2017 11:39:30 -0500
+Subject: [PATCH] [v4_3] Plugs a socket descriptor leak in OMAPI
+
+Merges in rt46767.
+
+Upstream-Status: Backport
+[https://source.isc.org/cgi-bin/gitweb.cgi?p=dhcp.git;a=commitdiff;h=5097bc0559f592683faac1f67bf350e1bddf6ed4]
+
+CVE: CVE-2017-3144
+
+Signed-off-by: Mingli Yu 
+Signed-off-by: Yi Zhao 
+---
+ RELNOTES | 7 +++
+ omapip/buffer.c  | 9 +
+ omapip/message.c | 2 +-
+ 3 files changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/RELNOTES b/RELNOTES
+index dd40aaf..3741b80 100644
+--- a/RELNOTES
 b/RELNOTES
+@@ -66,6 +66,13 @@ We welcome comments from DHCP users, about this or anything 
else we do.
+ Email Vicky Risk, Product Manager at vi...@isc.org or discuss on 
+ dhcp-us...@lists.isc.org.
+ 
++- Plugged a socket descriptor leak in OMAPI, that can occur when there is
++  data pending to be written to an OMAPI connection, when the connection
++  is closed by the reader.  Thanks to Pavel Zhukov at RedHat for bringing
++  this issue to our attention and whose patch helped guide us in the right
++  direction.
++  [ISc-Bugs #46767]
++
+   Changes since 4.3.6b1
+ 
+ - None
+diff --git a/omapip/buffer.c b/omapip/buffer.c
+index f7fdc32..809034d 100644
+--- a/omapip/buffer.c
 b/omapip/buffer.c
+@@ -566,6 +566,15 @@ isc_result_t omapi_connection_writer (omapi_object_t *h)
+   omapi_buffer_dereference (, MDL);
+   }
+   }
++
++  /* If we had data left to write when we're told to disconnect,
++  * we need recall disconnect, now that we're done writing.
++  * See rt46767. */
++  if (c->out_bytes == 0 && c->state == omapi_connection_disconnecting) {
++  omapi_disconnect (h, 1);
++  return ISC_R_SHUTTINGDOWN;
++  }
++
+   return ISC_R_SUCCESS;
+ }
+ 
+diff --git a/omapip/message.c b/omapip/message.c
+index 59ccdc2..21bcfc3 100644
+--- a/omapip/message.c
 b/omapip/message.c
+@@ -339,7 +339,7 @@ isc_result_t omapi_message_unregister (omapi_object_t *mo)
+ }
+ 
+ #ifdef DEBUG_PROTOCOL
+-static const char *omapi_message_op_name(int op) {
++const char *omapi_message_op_name(int op) {
+   switch (op) {
+   case OMAPI_OP_OPEN:return "OMAPI_OP_OPEN";
+   case OMAPI_OP_REFRESH: return "OMAPI_OP_REFRESH";
+-- 
+2.7.4
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb 
b/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
index 6615ae2..cc13549 100644
--- a/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.3.6.bb
@@ -12,6 +12,7 @@ SRC_URI += 
"file://0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.pat
 file://0010-build-shared-libs.patch \
 
file://0011-Moved-the-call-to-isc_app_ctxstart-to-not-get-signal.patch \
 file://0012-dhcp-correct-the-intention-for-xml2-lib-search.patch \
+file://CVE-2017-3144.patch \
"
 
 SRC_URI[md5sum] = "afa6e9b3eb7539ea048421a82c668adc"
-- 
2.7.4

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


Re: [OE-core] [PATCH 1/1] python-xcbgen_1.12: improve reproducibility

2018-04-10 Thread Burton, Ross
On 6 April 2018 at 20:57, Juro Bystricky  wrote:
> In order to remove timestamps from all .pyc files we need to recompile
> them with python3-native, as we cannot rely on the host python being
> able to do that. Both python-native and python3-native derive the timestamp
> from SOURCE_DATE_EPOCH if present.
> However, building python3-native can be computationally expensive, so
> we resort to python3-native only when building reproducible packages:
> (BUILD_REPRODUCIBLE_BINARIES = '1'), otherwise we use the host python3.

The logical extension of this is that every recipe that ships .py
needs to depend on python3-native so that it can recompile.

However, there's another solution...

.pyc files are basically a four byte magic number, a four byte
timestamp, and then the byte code.  It won't be that many lines of
Python in a do_package[postfunc] to search for __pycache__/*.pyc files
in the packages and replace the timestamp with SOURCE_DATE_EPOCH if
reproducible builds are enabled.

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


Re: [OE-core] [PATCH 2/2] weston: upgrade to 4.0.0

2018-04-10 Thread Burton, Ross
Ah presumably this is because the U-S is after the scissors.  Denys,
when you add it back, can you put it above the ---?

Ross

On 11 April 2018 at 00:16, Burton, Ross  wrote:
> On 10 April 2018 at 20:06, Denys Dmytriyenko  wrote:
>> diff --git 
>> a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch 
>> b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
>> index 0671a45..6799254 100644
>> --- a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
>> +++ b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
>> @@ -1,26 +1,25 @@
>> -From c22e90365d89346258394833cbcad03ff32b2e27 Mon Sep 17 00:00:00 2001
>> +From ad1d2161c811cff25d1684c33611f300adb753bc Mon Sep 17 00:00:00 2001
>>  From: Khem Raj 
>>  Date: Fri, 29 May 2015 20:56:00 -0700
>> -Subject: [PATCH weston] make error() portable
>> +Subject: [PATCH] make error() portable
>>
>>  error() is not posix but gnu extension so may not be available on all
>>  kind of systemsi e.g. musl.
>>
>>  Signed-off-by: Khem Raj 
>> 
>> -Upstream-Status: Submitted
>
> Ah, I've seen this before and was wondering if it was a genuine
> mistake or devtool being bad.
>
> devtool refresh is doing A Bad Thing and for some reason dropping the
> Upstream-Status tag.  Alex, can you see why this is?  Denys, can you
> edit it back in?
>
> Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/2] weston: upgrade to 4.0.0

2018-04-10 Thread Burton, Ross
On 10 April 2018 at 20:06, Denys Dmytriyenko  wrote:
> diff --git 
> a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch 
> b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
> index 0671a45..6799254 100644
> --- a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
> +++ b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
> @@ -1,26 +1,25 @@
> -From c22e90365d89346258394833cbcad03ff32b2e27 Mon Sep 17 00:00:00 2001
> +From ad1d2161c811cff25d1684c33611f300adb753bc Mon Sep 17 00:00:00 2001
>  From: Khem Raj 
>  Date: Fri, 29 May 2015 20:56:00 -0700
> -Subject: [PATCH weston] make error() portable
> +Subject: [PATCH] make error() portable
>
>  error() is not posix but gnu extension so may not be available on all
>  kind of systemsi e.g. musl.
>
>  Signed-off-by: Khem Raj 
> 
> -Upstream-Status: Submitted

Ah, I've seen this before and was wondering if it was a genuine
mistake or devtool being bad.

devtool refresh is doing A Bad Thing and for some reason dropping the
Upstream-Status tag.  Alex, can you see why this is?  Denys, can you
edit it back in?

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


[OE-core] [oe-core][PATCH] gconf: fix saving of settings when config folder doesnt exist

2018-04-10 Thread Jaewon Lee
In some circumstances, gconf isn't able to save configurations
because ~/.config folder aka root_dir doesn't exist.

For example when saving settings using matchbox-appearance,
the following error is shown:

GConf Error: Configuration server couldn't be contacted: D-BUS error:
Can't overwrite existing read-only value: Value for
`/desktop/poky/interface/font_name' set in a read-only source at the
front of your configuration path

This issue was not seen before because ~/.config directory is shared
between several packages and one of those packages usually creates it
by the time gconf wants to use it.

This patch makes sure that gconf creates the .config directory if it
doesn't exist, along with the gconf directory inside it.

[YOCTO #12632]

Signed-off-by: Alejandro Hernandez 
Signed-off-by: Jaewon Lee 
---
 .../gnome/gconf/create_config_directory.patch  | 28 ++
 meta/recipes-gnome/gnome/gconf_3.2.6.bb|  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 meta/recipes-gnome/gnome/gconf/create_config_directory.patch

diff --git a/meta/recipes-gnome/gnome/gconf/create_config_directory.patch 
b/meta/recipes-gnome/gnome/gconf/create_config_directory.patch
new file mode 100644
index 000..e02932c
--- /dev/null
+++ b/meta/recipes-gnome/gnome/gconf/create_config_directory.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+In some circumstances, gconf isn't able to save configurations
+because ~/.config folder aka root_dir doesn't exist.
+This issue was not seen before because ~/.config directory is shared
+between several packages and one of those packages usually creates it
+by the time gconf wants to use it.
+
+This patch makes sure that gconf creates the .config directory if it
+doesn't exist, along with the gconf directory inside it.
+
+Signed-off-by: Jaewon Lee 
+Signed-off-by: Alejandro Hernandez 
+
+
+Index: GConf-3.2.6/backends/markup-backend.c
+===
+--- GConf-3.2.6.orig/backends/markup-backend.c
 GConf-3.2.6/backends/markup-backend.c
+@@ -276,7 +276,7 @@ resolve_address (const char *address,
+   /* dir_mode without search bits */
+   file_mode = dir_mode & (~0111);
+ }
+-  else if (g_mkdir (root_dir, dir_mode) < 0)
++  else if (g_mkdir_with_parents (root_dir, dir_mode) < 0)
+ {
+   /* Error out even on EEXIST - shouldn't happen anyway */
+   gconf_set_error (err, GCONF_ERROR_FAILED,
diff --git a/meta/recipes-gnome/gnome/gconf_3.2.6.bb 
b/meta/recipes-gnome/gnome/gconf_3.2.6.bb
index 92fd12c..120ae3e 100644
--- a/meta/recipes-gnome/gnome/gconf_3.2.6.bb
+++ b/meta/recipes-gnome/gnome/gconf_3.2.6.bb
@@ -11,6 +11,7 @@ inherit gnomebase gtk-doc gettext gobject-introspection 
gio-module-cache
 SRC_URI = 
"${GNOME_MIRROR}/GConf/${@gnome_verdir("${PV}")}/GConf-${PV}.tar.xz;name=archive
 \
file://remove_plus_from_invalid_characters_list.patch \
file://unable-connect-dbus.patch \
+   file://create_config_directory.patch \
 "

 SRC_URI[archive.md5sum] = "2b16996d0e4b112856ee5c59130e822c"
--
2.7.4

This email and any attachments are intended for the sole use of the named 
recipient(s) and contain(s) confidential information that may be proprietary, 
privileged or copyrighted under applicable law. If you are not the intended 
recipient, do not read, copy, or forward this email message or any attachments. 
Delete this email message and any attachments immediately.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [RFC][PATCH 3/5] openssl: update to 1.1.1

2018-04-10 Thread Andre McCurdy
On Tue, Apr 10, 2018 at 5:07 AM, Alexander Kanavin
 wrote:
> At the moment 1.1.1 is in pre-release stage, however the final release
> should be available within a few weeks. The major selling point is that
> it supports the new TLS 1.3 specification. At the moment it is not clear
> whether this also will be a long term support version of openssl;
> we can make the decision to merge this version once that is made clear
> by upstream. More information:
>
> https://www.openssl.org/policies/releasestrat.html
>
> Signed-off-by: Alexander Kanavin 
> ---
>  ...1-Take-linking-flags-from-LDFLAGS-env-var.patch | 43 
> --
>  .../{openssl_1.1.0h.bb => openssl_1.1.1-pre4.bb}   | 21 +--
>  2 files changed, 10 insertions(+), 54 deletions(-)
>  delete mode 100644 
> meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch
>  rename meta/recipes-connectivity/openssl/{openssl_1.1.0h.bb => 
> openssl_1.1.1-pre4.bb} (83%)
>
> diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb 
> b/meta/recipes-connectivity/openssl/openssl_1.1.1-pre4.bb
> similarity index 83%
> rename from meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
> rename to meta/recipes-connectivity/openssl/openssl_1.1.1-pre4.bb
> index 94b75eb92a8..859362f7afe 100644
> --- a/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
> +++ b/meta/recipes-connectivity/openssl/openssl_1.1.1-pre4.bb
> @@ -10,13 +10,12 @@ LIC_FILES_CHKSUM = 
> "file://LICENSE;md5=d57d511030c9d66ef5f5966bee5a7eff"
>
>  BBCLASSEXTEND = "native nativesdk"
>
> -SRC_URI[md5sum] = "5271477e4d93f4ea032b665ef095ff24"
> -SRC_URI[sha256sum] = 
> "5835626cde9e99656585fc7aaa2302a73a7e1340bf8c14fd635a62c66802a517"
> +SRC_URI[md5sum] = "07c3f6831fb6dfe975795ef7bbbee9fc"
> +SRC_URI[sha256sum] = 
> "df2d5fcc2a878525611c75b9e9116fbcfbce8d9b96419a16eda5fb11ecc428f6"
>
>  SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
> file://run-ptest \
> file://openssl-c_rehash.sh \
> -   file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \
> "
>
>  S = "${WORKDIR}/openssl-${PV}"
> @@ -114,20 +113,20 @@ do_configure () {
>  if [ "x$useprefix" = "x" ]; then
>  useprefix=/
>  fi
> -   libdirleaf="$(echo ${libdir} | sed s:$useprefix::)"
> -   perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix 
> --openssldir=${libdir}/ssl-1.1 --libdir=${libdirleaf} $target
> +# WARNING: do not set compiler/linker flags (-I/-D etc.) in 
> EXTRA_OECONF, as they will fully replace the
> +# environment variables set by bitbake. Adjust the environment 
> variables instead.
> +   perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix 
> --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target
>  }
>
> -#| engines/afalg/e_afalg.c: In function 'eventfd':
> -#| engines/afalg/e_afalg.c:110:20: error: '__NR_eventfd' undeclared (first 
> use in this function)
> -#|  return syscall(__NR_eventfd, n);
> -#| ^~~~
> -EXTRA_OECONF_aarch64 += "no-afalgeng"
> +# This prevents openssl from using getrandom() which is not available on 
> older glibc versions
> +# (native versions can be built with newer glibc, but then relocated onto a 
> system with older glibc)
> +EXTRA_OECONF_class-native += "--with-rand-seed=devrandom"
> +EXTRA_OECONF_class-nativesdk += "--with-rand-seed=devrandom"

Better to avoid += with an over-ride since it doesn't do what most new
users etc expect. Better to use _append instead (or just the over-ride
on it's own, if over-riding the original value is what you intended to
do).

>  #| ./libcrypto.so: undefined reference to `getcontext'
>  #| ./libcrypto.so: undefined reference to `setcontext'
>  #| ./libcrypto.so: undefined reference to `makecontext'
> -EXTRA_OECONF_libc-musl += "-DOPENSSL_NO_ASYNC"
> +CPPFLAGS_libc-musl += "-DOPENSSL_NO_ASYNC"

Same comment here.

>  do_install () {
>  oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install
> --
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] xserver-nodm-init: Respawn service in case of failure

2018-04-10 Thread Nicolas Dechesne
On Tue, Apr 10, 2018 at 1:20 PM, Ramon Fried  wrote:
> From: Ramon Fried 
>
> It appears that sometimes xserver-nodm.service is starting before
> display driver finished loading causing the following failure in
> Xorg log:
> (EE) open /dev/dri/card0: No such file or directory
>
> The introduced by this patch is to restart the service,
> hopefully the display driver will finish loading.
>
> Signed-off-by: Ramon Fried 

we are seeing this issue on Dragonboard with meta-qcom BSP, where all
drivers needed for display/gpu are modules, so the display
initialization comes up 'late' in the boot. I had a discussion with
some upstream gnome folks who indicated that a similar race can be
observed on any hardware, it is not uncommon, and that's why they use
Restart=always in gdm.service as well, so that it keep trying until
the display comes up.

it sounds reasonable change to me.

Reviewed-by: Nicolas Dechesne 

> ---
>  .../x11-common/xserver-nodm-init/xserver-nodm.service.in | 1 
> +
>  1 file changed, 1 insertion(+)
>
> diff --git 
> a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in 
> b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
> index 324a26f549..87dc4f8fcd 100644
> --- 
> a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
> +++ 
> b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
> @@ -5,6 +5,7 @@ Description=Xserver startup without a display manager
>  EnvironmentFile=/etc/default/xserver-nodm
>  User=@USER@
>  ExecStart=/etc/xserver-nodm/Xserver
> +Restart=always
>
>  [Install]
>  Alias=display-manager.service
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [oe][meta-oe][PATCH] pkcs11-helper: 1.11 -> 1.22

2018-04-10 Thread Randy MacLeod

On 2018-03-12 05:56 AM, Huang Qiyu wrote:

Upgrade pkcs11-helper from 1.11 to 1.22.

Signed-off-by: Huang Qiyu 
---
  .../pkcs11-helper/{pkcs11-helper_1.11.bb => pkcs11-helper_1.22.bb}  | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
  rename meta-oe/recipes-crypto/pkcs11-helper/{pkcs11-helper_1.11.bb => 
pkcs11-helper_1.22.bb} (95%)


Huang,

Wrong list, send to:
  openembedded-de...@lists.openembedded.org

Thanks,
../Randy



diff --git a/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.11.bb 
b/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.22.bb
similarity index 95%
rename from meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.11.bb
rename to meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.22.bb
index db71bd0..51ccf37 100644
--- a/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.11.bb
+++ b/meta-oe/recipes-crypto/pkcs11-helper/pkcs11-helper_1.22.bb
@@ -20,7 +20,7 @@ SRC_URI[md5sum] = "9f62af9f475901b89355266141306673"
  SRC_URI[sha256sum] = 
"494ec59c93e7c56c528f335d9353849e2e7c94a6b1b41c89604694e738113386"
  
  S = "${WORKDIR}/git"

-SRCREV = "e7adf8f35be232a4f04c53b4ac409be52792093e"
+SRCREV = "a6e54e9bdd57dd4e98a2fbf984fe7fe4a9d60171"
  
  DEPENDS = "zlib nettle gnutls gmp openssl nss nspr"
  




--
# Randy MacLeod
# Wind River Linux
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] wayland: upgrade to 1.15.0

2018-04-10 Thread Denys Dmytriyenko
From: Denys Dmytriyenko 

Official announcement:
https://lists.freedesktop.org/archives/wayland-devel/2018-April/037767.html

| libwayland-egl is now part of libwayland, and will presumably be removed
| from mesa in the not too distant future.

Update mesa recipe by removing corresponding libwayland-egl entries.

Signed-off-by: Denys Dmytriyenko 
---
 meta/recipes-graphics/mesa/mesa.inc| 7 ---
 .../wayland/{wayland_1.14.0.bb => wayland_1.15.0.bb}   | 4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)
 rename meta/recipes-graphics/wayland/{wayland_1.14.0.bb => wayland_1.15.0.bb} 
(92%)

diff --git a/meta/recipes-graphics/mesa/mesa.inc 
b/meta/recipes-graphics/mesa/mesa.inc
index b501b7e..c3a8e76 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -119,7 +119,6 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \
  libgles1-mesa libgles1-mesa-dev \
  libgles2-mesa libgles2-mesa-dev \
  libgles3-mesa libgles3-mesa-dev \
- libwayland-egl libwayland-egl-dev \
  libxatracker libxatracker-dev \
  mesa-megadriver mesa-vulkan-drivers \
 "
@@ -134,6 +133,10 @@ do_install_append () {
 # it was packaged in libdricore9.1.3-1 and preventing upgrades when 
debian.bbclass was used 
 rm -f ${D}${sysconfdir}/drirc
 chrpath --delete ${D}${libdir}/dri/*_dri.so || true
+
+# libwayland-egl has been moved to wayland 1.15+
+rm -f ${D}${libdir}/libwayland-egl.so*
+rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
 }
 
 # For the packages that make up the OpenGL interfaces, inject variables so that
@@ -204,7 +207,6 @@ FILES_libgles2-mesa = "${libdir}/libGLESv2.so.*"
 FILES_libgl-mesa = "${libdir}/libGL.so.*"
 FILES_libglapi = "${libdir}/libglapi.so.*"
 FILES_libosmesa = "${libdir}/libOSMesa.so.*"
-FILES_libwayland-egl = "${libdir}/libwayland-egl.so.*"
 FILES_libxatracker = "${libdir}/libxatracker.so.*"
 
 FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan"
@@ -216,7 +218,6 @@ FILES_libgles1-mesa-dev = "${libdir}/libGLESv1*.* 
${includedir}/GLES ${libdir}/p
 FILES_libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 
${libdir}/pkgconfig/glesv2.pc"
 FILES_libgles3-mesa-dev = "${includedir}/GLES3"
 FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h 
${libdir}/pkgconfig/osmesa.pc"
-FILES_libwayland-egl-dev = "${libdir}/pkgconfig/wayland-egl.pc 
${libdir}/libwayland-egl.*"
 FILES_libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
   ${includedir}/xa_tracker.h 
${includedir}/xa_composite.h ${includedir}/xa_context.h \
   ${libdir}/pkgconfig/xatracker.pc"
diff --git a/meta/recipes-graphics/wayland/wayland_1.14.0.bb 
b/meta/recipes-graphics/wayland/wayland_1.15.0.bb
similarity index 92%
rename from meta/recipes-graphics/wayland/wayland_1.14.0.bb
rename to meta/recipes-graphics/wayland/wayland_1.15.0.bb
index 1a9ff98..788105b 100644
--- a/meta/recipes-graphics/wayland/wayland_1.14.0.bb
+++ b/meta/recipes-graphics/wayland/wayland_1.15.0.bb
@@ -15,8 +15,8 @@ DEPENDS = "expat libxml2 libffi wayland-native"
 SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
   file://fixpathinpcfiles.patch \
"
-SRC_URI[md5sum] = "0235f6075c32c3be61cff94fa0b9f108"
-SRC_URI[sha256sum] = 
"ed80cabc0961a759a42092e2c39aabfc1ec9a13c86c98bbe2b812f008da27ab8"
+SRC_URI[md5sum] = "b7393c17fdce9a8d383edab656c92fd2"
+SRC_URI[sha256sum] = 
"eb3fbebb8559d56a80ad3753ec3db800f587329067962dbf65e14488b4b7aeb0"
 
 inherit autotools pkgconfig
 
-- 
2.7.4

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


[OE-core] [PATCH 2/2] weston: upgrade to 4.0.0

2018-04-10 Thread Denys Dmytriyenko
From: Denys Dmytriyenko 

Official announcement:
https://lists.freedesktop.org/archives/wayland-devel/2018-April/037768.html

Dropped previously backported fix-missing-header.patch and
weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch

Refresh remaining local patches.

Modify 0001-weston-launch-Provide-a-default-version-that-doesn-t.patch with
changes to apply against the new code base.

Support for libunwind was dropped in bb707dc0fe331c9af112a0552b7aa6fde755dd83:
https://cgit.freedesktop.org/wayland/weston/commit/?id=bb707dc0fe331c9af112a0552b7aa6fde755dd83

Extract major version for referring to libweston-4 helper libraries.

Signed-off-by: Denys Dmytriyenko 
---
 .../wayland/weston/0001-make-error-portable.patch  | 42 -
 ...ch-Provide-a-default-version-that-doesn-t.patch | 47 +-
 .../wayland/weston/fix-missing-header.patch| 30 
 ...t-pitch-correctly-for-subsampled-textures.patch | 55 --
 .../wayland/{weston_3.0.0.bb => weston_4.0.0.bb}   | 20 
 5 files changed, 54 insertions(+), 140 deletions(-)
 delete mode 100644 
meta/recipes-graphics/wayland/weston/fix-missing-header.patch
 delete mode 100644 
meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
 rename meta/recipes-graphics/wayland/{weston_3.0.0.bb => weston_4.0.0.bb} (87%)

diff --git 
a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch 
b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
index 0671a45..6799254 100644
--- a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
+++ b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
@@ -1,26 +1,25 @@
-From c22e90365d89346258394833cbcad03ff32b2e27 Mon Sep 17 00:00:00 2001
+From ad1d2161c811cff25d1684c33611f300adb753bc Mon Sep 17 00:00:00 2001
 From: Khem Raj 
 Date: Fri, 29 May 2015 20:56:00 -0700
-Subject: [PATCH weston] make error() portable
+Subject: [PATCH] make error() portable
 
 error() is not posix but gnu extension so may not be available on all
 kind of systemsi e.g. musl.
 
 Signed-off-by: Khem Raj 

-Upstream-Status: Submitted
 
- configure.ac  |2 ++
- libweston/weston-error.h  |   20 
- libweston/weston-launch.c |2 +-
+---
+ configure.ac  |  2 ++
+ libweston/weston-error.h  | 20 
+ libweston/weston-launch.c |  2 +-
  3 files changed, 23 insertions(+), 1 deletion(-)
- create mode 100644 src/weston-error.h
+ create mode 100644 libweston/weston-error.h
 
-Index: weston-3.0.0/configure.ac
-===
 weston-3.0.0.orig/configure.ac
-+++ weston-3.0.0/configure.ac
-@@ -103,6 +103,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+diff --git a/configure.ac b/configure.ac
+index 7aebbdb..dc9c802 100644
+--- a/configure.ac
 b/configure.ac
+@@ -109,6 +109,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
  [[#include ]])
  AC_CHECK_HEADERS([execinfo.h])
  
@@ -29,10 +28,11 @@ Index: weston-3.0.0/configure.ac
  AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
  
  # check for libdrm as a build-time dependency only
-Index: weston-3.0.0/libweston/weston-error.h
-===
+diff --git a/libweston/weston-error.h b/libweston/weston-error.h
+new file mode 100644
+index 000..2089d02
 --- /dev/null
-+++ weston-3.0.0/libweston/weston-error.h
 b/libweston/weston-error.h
 @@ -0,0 +1,20 @@
 +#ifndef _WESTON_ERROR_H
 +#define _WESTON_ERROR_H
@@ -54,10 +54,10 @@ Index: weston-3.0.0/libweston/weston-error.h
 +
 +#endif
 +
-Index: weston-3.0.0/libweston/weston-launch.c
-===
 weston-3.0.0.orig/libweston/weston-launch.c
-+++ weston-3.0.0/libweston/weston-launch.c
+diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
+index 1adcf21..166bf3b 100644
+--- a/libweston/weston-launch.c
 b/libweston/weston-launch.c
 @@ -33,7 +33,6 @@
  #include 
  #include 
@@ -66,7 +66,7 @@ Index: weston-3.0.0/libweston/weston-launch.c
  #include 
  
  #include 
-@@ -60,6 +59,7 @@
+@@ -59,6 +58,7 @@
  #endif
  
  #include "weston-launch.h"
diff --git 
a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
 
b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
index 70b9888..52eac61 100644
--- 
a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
+++ 
b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
@@ -1,7 +1,8 @@
-From 8ff6ed03ec4079f32e9b34085414e57be4730e04 Mon Sep 17 00:00:00 2001
+From b98b9dbda902225cdd972b5bff6a641c36cc7e90 Mon Sep 17 00:00:00 2001
 From: 

[OE-core] ✗ patchtest: failure for meta-oe/numactl: Enable NUMA in the kernel config

2018-04-10 Thread Patchwork
== Series Details ==

Series: meta-oe/numactl: Enable NUMA in the kernel config
Revision: 1
URL   : https://patchwork.openembedded.org/series/11753/
State : failure

== Summary ==


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



* Issue Series sent to the wrong mailing list or some patches from 
the series correspond to different mailing lists [test_target_mailing_list] 
  Suggested fixSend the series again to the correct mailing list (ML)
  Suggested ML openembedded-de...@lists.openembedded.org 
[http://git.openembedded.org/meta-openembedded/]
  Patch's path:meta-oe/recipes-kernel/linux/linux-yocto.inc

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



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] meta-oe/numactl: Enable NUMA in the kernel config

2018-04-10 Thread Alistair Francis
If a user has specified numa in their DISTRO_FEATURES then they should
have NUMA support enabled in the kernel. Without kernel support the
numactl program is not very useful.

Signed-off-by: Alistair Francis 
---
 meta-oe/recipes-kernel/linux/linux-yocto.inc   | 2 ++
 meta-oe/recipes-kernel/linux/linux-yocto_4.12.bbappend | 1 +
 meta-oe/recipes-kernel/linux/linux-yocto_4.14.bbappend | 1 +
 meta-oe/recipes-kernel/linux/linux-yocto_4.15.bbappend | 1 +
 meta-oe/recipes-support/numactl/numactl/numa.cfg   | 2 ++
 meta-oe/recipes-support/numactl/numactl_git.bb | 1 +
 6 files changed, 8 insertions(+)
 create mode 100644 meta-oe/recipes-kernel/linux/linux-yocto.inc
 create mode 100644 meta-oe/recipes-kernel/linux/linux-yocto_4.12.bbappend
 create mode 100644 meta-oe/recipes-kernel/linux/linux-yocto_4.14.bbappend
 create mode 100644 meta-oe/recipes-kernel/linux/linux-yocto_4.15.bbappend
 create mode 100644 meta-oe/recipes-support/numactl/numactl/numa.cfg

diff --git a/meta-oe/recipes-kernel/linux/linux-yocto.inc 
b/meta-oe/recipes-kernel/linux/linux-yocto.inc
new file mode 100644
index 000..9533eb6
--- /dev/null
+++ b/meta-oe/recipes-kernel/linux/linux-yocto.inc
@@ -0,0 +1,2 @@
+KERNEL_FEATURES_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'numa', 
'features/numa/numa.scc', '', d)}"
+
diff --git a/meta-oe/recipes-kernel/linux/linux-yocto_4.12.bbappend 
b/meta-oe/recipes-kernel/linux/linux-yocto_4.12.bbappend
new file mode 100644
index 000..161f9d3
--- /dev/null
+++ b/meta-oe/recipes-kernel/linux/linux-yocto_4.12.bbappend
@@ -0,0 +1 @@
+require linux-yocto.inc
diff --git a/meta-oe/recipes-kernel/linux/linux-yocto_4.14.bbappend 
b/meta-oe/recipes-kernel/linux/linux-yocto_4.14.bbappend
new file mode 100644
index 000..161f9d3
--- /dev/null
+++ b/meta-oe/recipes-kernel/linux/linux-yocto_4.14.bbappend
@@ -0,0 +1 @@
+require linux-yocto.inc
diff --git a/meta-oe/recipes-kernel/linux/linux-yocto_4.15.bbappend 
b/meta-oe/recipes-kernel/linux/linux-yocto_4.15.bbappend
new file mode 100644
index 000..161f9d3
--- /dev/null
+++ b/meta-oe/recipes-kernel/linux/linux-yocto_4.15.bbappend
@@ -0,0 +1 @@
+require linux-yocto.inc
diff --git a/meta-oe/recipes-support/numactl/numactl/numa.cfg 
b/meta-oe/recipes-support/numactl/numactl/numa.cfg
new file mode 100644
index 000..fe1394d
--- /dev/null
+++ b/meta-oe/recipes-support/numactl/numactl/numa.cfg
@@ -0,0 +1,2 @@
+CONFIG_NUMA=y
+CONFIG_ACPI_NUMA=y
diff --git a/meta-oe/recipes-support/numactl/numactl_git.bb 
b/meta-oe/recipes-support/numactl/numactl_git.bb
index b9cbcf0..ef2dab2 100644
--- a/meta-oe/recipes-support/numactl/numactl_git.bb
+++ b/meta-oe/recipes-support/numactl/numactl_git.bb
@@ -21,6 +21,7 @@ SRC_URI = "git://github.com/numactl/numactl \
 file://run-ptest \
 file://0001-define-run-test-target.patch \
 "
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'numa', ' 
file://numa.cfg', '', d)}"
 
 S = "${WORKDIR}/git"
 
-- 
2.7.4

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


Re: [OE-core] [PATCH 4/4] sstate: Avoid indirect bison/flex-native dependencies

2018-04-10 Thread Denys Dmytriyenko
On Tue, Apr 10, 2018 at 05:36:54PM +0100, Richard Purdie wrote:
> On Tue, 2018-04-10 at 10:33 -0400, Denys Dmytriyenko wrote:
> > Richard,
> > 
> > Was this patch ever merged? I don't see it in master - were there any
> > problems 
> > or concerns?
> 
> There was some kind of failure in testing on the autobuilder which made
> me abandon it, I can't remember what it was though :(

Thanks, do you still want to revisit it at some point or completely drop it?

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


Re: [OE-core] [PATCH 4/4] sstate: Avoid indirect bison/flex-native dependencies

2018-04-10 Thread Richard Purdie
On Tue, 2018-04-10 at 10:33 -0400, Denys Dmytriyenko wrote:
> Richard,
> 
> Was this patch ever merged? I don't see it in master - were there any
> problems 
> or concerns?

There was some kind of failure in testing on the autobuilder which made
me abandon it, I can't remember what it was though :(

Cheers,

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


[OE-core] [PATCH] image_types: use pigz to create .gz files

2018-04-10 Thread Ross Burton
Since pigz is no longer a drop-in replacement for gzip (oe-core 1624b7b) the
image creation has been using gzip instead of pigz, despite still depending on
pigz-native.  Fix this by invoking pigz explicitly.

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

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index e872ae20982..00a00d318f4 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -281,7 +281,7 @@ COMPRESSIONTYPES ?= ""
 
 CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum sha224sum 
sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 ${COMPRESSIONTYPES}"
 CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
-CONVERSION_CMD_gz = "gzip -f -9 -n -c 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
+CONVERSION_CMD_gz = "pigz -f -9 -n -c 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
 CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
 CONVERSION_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} 
--check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz"
 CONVERSION_CMD_lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
-- 
2.11.0

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


Re: [OE-core] [PATCH 4/4] sstate: Avoid indirect bison/flex-native dependencies

2018-04-10 Thread Denys Dmytriyenko
Richard,

Was this patch ever merged? I don't see it in master - were there any problems 
or concerns?


On Thu, Jan 11, 2018 at 05:01:35PM +, Richard Purdie wrote:
> This avoids adding flex-native or bison-native to the sysroot without a 
> specific
> dependency in the recipe and means indirect dependencies (e.g. X -> Y -> 
> binutils-cross -> flex-native)
> no longer met the dependency incidentally. This improves determinism and avoid
> build failures when people switch to external toolchains.
> 
> Signed-off-by: Richard Purdie 
> ---
>  meta/classes/sstate.bbclass | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
> index 6808942..7509561 100644
> --- a/meta/classes/sstate.bbclass
> +++ b/meta/classes/sstate.bbclass
> @@ -921,6 +921,13 @@ def setscene_depvalid(task, taskdependees, notneeded, d, 
> log=None):
>  if taskdependees[task][1] == "do_stash_locale" or taskdependees[task][1] 
> == "do_gcc_stash_builddir":
>  return True
>  
> +# Don't pull in flex-native or bison-native without a specific 
> dependency in the recipe
> +# This improves determinism in the metadata and avoids the dependency 
> being met incidentally,
> +# e.g. from binutils-cross which doesn't happen in the external 
> toolchain case
> +if taskdependees[task][1] == 'do_populate_sysroot':
> +if taskdependees[task][0] == "flex-native" or taskdependees[task][0] 
> == "bison-native":
> +return True
> +
>  # We only need to trigger packagedata through direct dependencies
>  # but need to preserve packagedata on packagedata links
>  if taskdependees[task][1] == "do_packagedata":
> -- 
> 2.7.4
> 
> -- 
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/3] libcap: fix (base_)libdir usage

2018-04-10 Thread Burton, Ross
This is breaking libcap-native:

| mv: cannot stat
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/libcap-native/2.25-r0/image/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/libcap-native/2.25-r0/recipe-sysroot-native/usr/lib/libcap*':
No such file or directory

Ross

On 9 April 2018 at 12:56, Koen Kooi  wrote:
> The recipe wants to install libs into base_libdir, but uses "basename 
> $libdir" to derive that. That breaks in a multiarch setup. Use the proper 
> variable and remove the inline python usage.
>
> Signed-off-by: Koen Kooi 
> ---
>  meta/recipes-support/libcap/libcap_2.25.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/libcap/libcap_2.25.bb 
> b/meta/recipes-support/libcap/libcap_2.25.bb
> index d619a2e..47ecf34 100644
> --- a/meta/recipes-support/libcap/libcap_2.25.bb
> +++ b/meta/recipes-support/libcap/libcap_2.25.bb
> @@ -32,7 +32,7 @@ PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
>
>  EXTRA_OEMAKE = " \
>INDENT=  \
> -  lib=${@os.path.basename('${libdir}')} \
> +  lib='${base_libdir}' \
>RAISE_SETFCAP=no \
>DYNAMIC=yes \
>BUILD_GPERF=yes \
> --
> 2.9.5
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [RFC][PATCH 1/5] openssl: rename openssl 1.0.x to openssl10 and make openssl 1.1.x the default version

2018-04-10 Thread Alexander Kanavin

On 04/10/2018 03:43 PM, Martin Jansa wrote:

On Tue, Apr 10, 2018 at 03:07:43PM +0300, Alexander Kanavin wrote:

Openssl 1.0 can still be utilized by depending on 'openssl10' recipe.


Does this really work now?

I think it will fail again when both openssl versions end up in RSS.


The only known case where this happened was Qt5 (because it also wanted 
python), and Qt5 gained openssl 1.1 support in the latest released version.


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


Re: [OE-core] [RFC][PATCH 1/5] openssl: rename openssl 1.0.x to openssl10 and make openssl 1.1.x the default version

2018-04-10 Thread Martin Jansa
On Tue, Apr 10, 2018 at 03:07:43PM +0300, Alexander Kanavin wrote:
> Openssl 1.0 can still be utilized by depending on 'openssl10' recipe.

Does this really work now?

I think it will fail again when both openssl versions end up in RSS.


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


[OE-core] ✗ patchtest: failure for "[RFC] openssl: rename openssl ..." and 4 more

2018-04-10 Thread Patchwork
== Series Details ==

Series: "[RFC] openssl: rename openssl ..." and 4 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/11748/
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 openssl 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://LICENSE;md5=f475368924827d06d4b416111c8bdb77
  New checksum file://LICENSE;md5=d57d511030c9d66ef5f5966bee5a7eff

* Issue Patches not removed from tree [test_src_uri_left_files] 
  Suggested fixAmend the patch containing the software patch file removal
  Patch
  Patchengines-install-in-libdir-ssl.patch
  Patchptest-deps.patch
  Patchopenssl_fix_for_x32.patch
  Patchc_rehash-compat.patch
  Patchno-symbolic.patch
  Patchoe-ldflags.patch
  Patchptest_makefile_deps.patch
  Patchopenssl-util-perlpath.pl-cwd.patch
  Patchdebian-targets.patch
  Patch0001-openssl-force-soft-link-to-avoid-rare-race.patch
  Patchman-dir.patch
  Patchpic.patch
  Patchblock_diginotar.patch
  Patchparallel.patch
  PatchMakefiles-ptest.patch
  Patchman-section.patch
  Patchblock_digicert_malaysia.patch
  Patchconfigure-targets.patch
  Patch0001-Fix-build-with-clang-using-external-assembler.patch
  Patchreproducible-mkbuildinf.patch
  Patchno-rpath.patch
  Patchsoname.patch
  Patchca.patch
  Patchshared-libs.patch
  PatchUse-SHA256-not-MD5-as-default-digest.patch
  Patchreproducible-cflags.patch
  Patchconfigure-musl-target.patch
  Patchopenssl-fix-des.pod-error.patch
  Patchversion-script.patch



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

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


Re: [OE-core] [PATCH] wic: allow bitbake variables in kickstarter files

2018-04-10 Thread Rasmus Villemoes
On 2018-03-22 14:44, Rasmus Villemoes wrote:
> image_types_wic.bbclass has a mechanism for doing variable substitution
> on .wks files by simply letting the input file be called
> .wks.in. However, that doesn't allow using variables in files included
> via the include directive.
> 
> This adds (somewhat naive) support for variable substitution in all
> files parsed by wic. The user should add all required variables to
> WICVARS to get them exported appropriately.

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


[OE-core] [RFC][PATCH 5/5] openssh: update to 7.7p1 and depend on libressl

2018-04-10 Thread Alexander Kanavin
Please see the previous commit for the libressl rationale.

Signed-off-by: Alexander Kanavin 
---
 .../openssh/{openssh_7.6p1.bb => openssh_7.7p1.bb}  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-connectivity/openssh/{openssh_7.6p1.bb => 
openssh_7.7p1.bb} (97%)

diff --git a/meta/recipes-connectivity/openssh/openssh_7.6p1.bb 
b/meta/recipes-connectivity/openssh/openssh_7.7p1.bb
similarity index 97%
rename from meta/recipes-connectivity/openssh/openssh_7.6p1.bb
rename to meta/recipes-connectivity/openssh/openssh_7.7p1.bb
index a2288dfe08e..78cad4727d4 100644
--- a/meta/recipes-connectivity/openssh/openssh_7.6p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_7.7p1.bb
@@ -9,7 +9,7 @@ LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENCE;md5=429658c6612f3a9b1293782366ab29d8"
 
 # openssl 1.1 patches are proposed at 
https://github.com/openssh/openssh-portable/pull/48
-DEPENDS = "zlib openssl10"
+DEPENDS = "zlib libressl"
 DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SRC_URI = 
"http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
@@ -29,8 +29,8 @@ SRC_URI = 
"http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
 
 PAM_SRC_URI = "file://sshd"
 
-SRC_URI[md5sum] = "06a88699018e5fef13d4655abfed1f63"
-SRC_URI[sha256sum] = 
"a323caeeddfe145baaa0db16e98d784b1fbc7dd436a6bf1f479dfd5cd1d21723"
+SRC_URI[md5sum] = "68ba883aff6958297432e5877e9a0fe2"
+SRC_URI[sha256sum] = 
"d73be7e684e99efcd024be15a30bffcbe41b012b2f7b3c9084aed621775e6b8f"
 
 inherit useradd update-rc.d update-alternatives systemd
 
-- 
2.16.1

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


[OE-core] [RFC][PATCH 2/5] cryptodev-tests: port to openssl 1.1

2018-04-10 Thread Alexander Kanavin
This leaves openssh as the only recipe that requires openssl 1.0 (or libressl).

Signed-off-by: Alexander Kanavin 
---
 .../cryptodev/cryptodev-tests_1.9.bb   |   3 +-
 .../files/0001-Port-tests-to-openssl-1.1.patch | 103 +
 2 files changed, 105 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-kernel/cryptodev/files/0001-Port-tests-to-openssl-1.1.patch

diff --git a/meta/recipes-kernel/cryptodev/cryptodev-tests_1.9.bb 
b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.9.bb
index 9afb3de217e..617db6cdd31 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev-tests_1.9.bb
+++ b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.9.bb
@@ -2,10 +2,11 @@ require cryptodev.inc
 
 SUMMARY = "A test suite for /dev/crypto device driver"
 
-DEPENDS += "openssl10"
+DEPENDS += "openssl"
 
 SRC_URI += " \
 file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \
+file://0001-Port-tests-to-openssl-1.1.patch \
 "
 
 EXTRA_OEMAKE='KERNEL_DIR="${STAGING_EXECPREFIXDIR}" PREFIX="${D}"'
diff --git 
a/meta/recipes-kernel/cryptodev/files/0001-Port-tests-to-openssl-1.1.patch 
b/meta/recipes-kernel/cryptodev/files/0001-Port-tests-to-openssl-1.1.patch
new file mode 100644
index 000..c9691265f6c
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/0001-Port-tests-to-openssl-1.1.patch
@@ -0,0 +1,103 @@
+From 2fe4bdeb8cdd0b0f46d9caed807812855d51ea56 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Wed, 28 Mar 2018 20:11:05 +0300
+Subject: [PATCH] Port tests to openssl 1.1
+
+Upstream-Status: Accepted 
[https://github.com/cryptodev-linux/cryptodev-linux/pull/36]
+Signed-off-by: Alexander Kanavin 
+
+---
+ tests/openssl_wrapper.c | 33 +
+ 1 file changed, 33 insertions(+)
+
+diff --git a/tests/openssl_wrapper.c b/tests/openssl_wrapper.c
+index 038c58f..dea2496 100644
+--- a/tests/openssl_wrapper.c
 b/tests/openssl_wrapper.c
+@@ -4,6 +4,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ //#define DEBUG
+ 
+@@ -23,10 +24,17 @@ enum ctx_type {
+   ctx_type_md,
+ };
+ 
++#if OPENSSL_VERSION_NUMBER >= 0x1010L
++union openssl_ctx {
++  HMAC_CTX *hmac;
++  EVP_MD_CTX *md;
++};
++#else
+ union openssl_ctx {
+   HMAC_CTX hmac;
+   EVP_MD_CTX md;
+ };
++#endif
+ 
+ struct ctx_mapping {
+   __u32 ses;
+@@ -63,6 +71,16 @@ static void remove_mapping(__u32 ses)
+   switch (mapping->type) {
+   case ctx_type_none:
+   break;
++#if OPENSSL_VERSION_NUMBER >= 0x1010L
++  case ctx_type_hmac:
++  dbgp("%s: calling HMAC_CTX_free\n", __func__);
++  HMAC_CTX_free(mapping->ctx.hmac);
++  break;
++  case ctx_type_md:
++  dbgp("%s: calling EVP_MD_CTX_free\n", __func__);
++  EVP_MD_CTX_free(mapping->ctx.md);
++  break;
++#else
+   case ctx_type_hmac:
+   dbgp("%s: calling HMAC_CTX_cleanup\n", __func__);
+   HMAC_CTX_cleanup(>ctx.hmac);
+@@ -71,6 +89,7 @@ static void remove_mapping(__u32 ses)
+   dbgp("%s: calling EVP_MD_CTX_cleanup\n", __func__);
+   EVP_MD_CTX_cleanup(>ctx.md);
+   break;
++#endif
+   }
+   memset(mapping, 0, sizeof(*mapping));
+ }
+@@ -127,10 +146,17 @@ static int openssl_hmac(struct session_op *sess, struct 
crypt_op *cop)
+ 
+   mapping->ses = sess->ses;
+   mapping->type = ctx_type_hmac;
++#if OPENSSL_VERSION_NUMBER >= 0x1010L
++  ctx = mapping->ctx.hmac;
++
++  dbgp("calling HMAC_CTX_new");
++  ctx = HMAC_CTX_new();
++#else
+   ctx = >ctx.hmac;
+ 
+   dbgp("calling HMAC_CTX_init");
+   HMAC_CTX_init(ctx);
++#endif
+   dbgp("calling HMAC_Init_ex");
+   if (!HMAC_Init_ex(ctx, sess->mackey, sess->mackeylen,
+   sess_to_evp_md(sess), NULL)) {
+@@ -172,10 +198,17 @@ static int openssl_md(struct session_op *sess, struct 
crypt_op *cop)
+ 
+   mapping->ses = sess->ses;
+   mapping->type = ctx_type_md;
++#if OPENSSL_VERSION_NUMBER >= 0x1010L
++  ctx = mapping->ctx.md;
++
++  dbgp("calling EVP_MD_CTX_new");
++  ctx = EVP_MD_CTX_new();
++#else
+   ctx = >ctx.md;
+ 
+   dbgp("calling EVP_MD_CTX_init");
+   EVP_MD_CTX_init(ctx);
++#endif
+   dbgp("calling EVP_DigestInit");
+   EVP_DigestInit(ctx, sess_to_evp_md(sess));
+   }
-- 
2.16.1

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


[OE-core] [RFC][PATCH 4/5] libressl: add a recipe to support openssh

2018-04-10 Thread Alexander Kanavin
After reading through this:

https://github.com/openssh/openssh-portable/pull/48

and this thread:

https://lists.mindrot.org/pipermail/openssh-unix-dev/2017-October/036344.html

I've concluded that this is the best of the three not-great options. The 
alternatives:

- bundle libressl inside openssh packages
- keep openssh dependent on openssl 1.0 and wait until upstream does something

are both inferior. Libressl is used with openssh in OpenBSD and in OS X,
so it did get at least some testing in the real world.

Signed-off-by: Alexander Kanavin 
---
 ...c-libraries-with-their-library-dependenci.patch | 74 ++
 .../libressl/libressl_2.7.2.bb | 31 +
 2 files changed, 105 insertions(+)
 create mode 100644 
meta/recipes-connectivity/libressl/libressl/0001-Link-dynamic-libraries-with-their-library-dependenci.patch
 create mode 100644 meta/recipes-connectivity/libressl/libressl_2.7.2.bb

diff --git 
a/meta/recipes-connectivity/libressl/libressl/0001-Link-dynamic-libraries-with-their-library-dependenci.patch
 
b/meta/recipes-connectivity/libressl/libressl/0001-Link-dynamic-libraries-with-their-library-dependenci.patch
new file mode 100644
index 000..977158fb673
--- /dev/null
+++ 
b/meta/recipes-connectivity/libressl/libressl/0001-Link-dynamic-libraries-with-their-library-dependenci.patch
@@ -0,0 +1,74 @@
+From 2e433aa5bb243c608930bdb46fbf55a31231a7bd Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Mon, 9 Apr 2018 18:02:56 +0300
+Subject: [PATCH] Link dynamic libraries with their library dependencies.
+
+It does seem like outside of OpenBSD, no one has actually used libressl yet.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin 
+---
+ CMakeLists.txt| 7 ++-
+ crypto/CMakeLists.txt | 1 +
+ ssl/CMakeLists.txt| 2 +-
+ 3 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1c6bd67..2c1078d 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -265,6 +265,7 @@ endif()
+ set(OPENSSL_LIBS tls ssl crypto)
+ 
+ if(WIN32)
++  set(OPENSSL_LIB_LIBS ws2_32)
+   set(OPENSSL_LIBS ${OPENSSL_LIBS} ws2_32)
+ endif()
+ 
+@@ -274,16 +275,20 @@ if(HAVE_CLOCK_GETTIME)
+ endif()
+ 
+ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
++  set(OPENSSL_LIB_LIBS pthread)
++  set(OPENSSL_LIBS ${OPENSSL_LIBS} pthread)
+   check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
+   if (HAVE_CLOCK_GETTIME)
++  set(OPENSSL_LIB_LIBS ${OPENSSL_LIB_LIBS} rt)
+   set(OPENSSL_LIBS ${OPENSSL_LIBS} rt)
+   endif()
+-  set(OPENSSL_LIBS ${OPENSSL_LIBS} pthread)
+ endif()
+ if(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
++  set(OPENSSL_LIB_LIBS pthread)
+   set(OPENSSL_LIBS ${OPENSSL_LIBS} pthread)
+ endif()
+ if(CMAKE_SYSTEM_NAME MATCHES "SunOS")
++  set(OPENSSL_LIB_LIBS nsl socket)
+   set(OPENSSL_LIBS ${OPENSSL_LIBS} nsl socket)
+ endif()
+ 
+diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
+index 2fa08a5..32ab649 100644
+--- a/crypto/CMakeLists.txt
 b/crypto/CMakeLists.txt
+@@ -811,6 +811,7 @@ endif()
+ 
+ add_library(crypto ${CRYPTO_SRC})
+ if (BUILD_SHARED_LIBS)
++  target_link_libraries(crypto ${OPENSSL_LIB_LIBS})
+   export_symbol(crypto ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym)
+   if (WIN32)
+   target_link_libraries(crypto Ws2_32.lib)
+diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt
+index e87e0f6..e53e5ea 100644
+--- a/ssl/CMakeLists.txt
 b/ssl/CMakeLists.txt
+@@ -50,7 +50,7 @@ set(
+ add_library(ssl ${SSL_SRC})
+ if (BUILD_SHARED_LIBS)
+   export_symbol(ssl ${CMAKE_CURRENT_SOURCE_DIR}/ssl.sym)
+-  target_link_libraries(ssl crypto)
++  target_link_libraries(ssl crypto ${OPENSSL_LIB_LIBS})
+   if (WIN32)
+   target_link_libraries(ssl Ws2_32.lib)
+   set(SSL_POSTFIX -${SSL_MAJOR_VERSION})
diff --git a/meta/recipes-connectivity/libressl/libressl_2.7.2.bb 
b/meta/recipes-connectivity/libressl/libressl_2.7.2.bb
new file mode 100644
index 000..375615a7d1c
--- /dev/null
+++ b/meta/recipes-connectivity/libressl/libressl_2.7.2.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Drop-in replacement for openssl 1.0.x, maintained by OpenBSD"
+DESCRIPTION = "LibreSSL is a version of the TLS/crypto stack forked from \
+   OpenSSL in 2014, with goals of modernizing the codebase, \
+   improving security, and applying best practice development 
processes. "
+HOMEPAGE = "http://www.libressl.org/;
+
+LICENSE = "openssl"
+LIC_FILES_CHKSUM = "file://COPYING;md5=01f9bb4d275f5eeea905377bef3de622"
+
+SRC_URI = "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${PV}.tar.gz \
+   
file://0001-Link-dynamic-libraries-with-their-library-dependenci.patch \
+   "
+SRC_URI[md5sum] = "97aee636dfce1eb6ec6f38687bee0760"
+SRC_URI[sha256sum] = 

[OE-core] [RFC][PATCH 3/5] openssl: update to 1.1.1

2018-04-10 Thread Alexander Kanavin
At the moment 1.1.1 is in pre-release stage, however the final release
should be available within a few weeks. The major selling point is that
it supports the new TLS 1.3 specification. At the moment it is not clear
whether this also will be a long term support version of openssl;
we can make the decision to merge this version once that is made clear
by upstream. More information:

https://www.openssl.org/policies/releasestrat.html

Signed-off-by: Alexander Kanavin 
---
 ...1-Take-linking-flags-from-LDFLAGS-env-var.patch | 43 --
 .../{openssl_1.1.0h.bb => openssl_1.1.1-pre4.bb}   | 21 +--
 2 files changed, 10 insertions(+), 54 deletions(-)
 delete mode 100644 
meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch
 rename meta/recipes-connectivity/openssl/{openssl_1.1.0h.bb => 
openssl_1.1.1-pre4.bb} (83%)

diff --git 
a/meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch
 
b/meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch
deleted file mode 100644
index 6ce4e47d712..000
--- 
a/meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 08face4353d80111973aba9c1304c92158cfad0e Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin 
-Date: Tue, 28 Mar 2017 16:40:12 +0300
-Subject: [PATCH] Take linking flags from LDFLAGS env var
-
-This fixes "No GNU_HASH in the elf binary" issues.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin 

- Configurations/unix-Makefile.tmpl | 2 +-
- Configure | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Configurations/unix-Makefile.tmpl 
b/Configurations/unix-Makefile.tmpl
-index c029817..43b769b 100644
 a/Configurations/unix-Makefile.tmpl
-+++ b/Configurations/unix-Makefile.tmpl
-@@ -173,7 +173,7 @@ CROSS_COMPILE= {- $config{cross_compile_prefix} -}
- CC= $(CROSS_COMPILE){- $target{cc} -}
- CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, 
@{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"")
 -} {- $target{cflags} -} {- $config{cflags} -}
- CFLAGS_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
--LDFLAGS= {- $target{lflags} -}
-+LDFLAGS= {- $target{lflags}." ".$ENV{'LDFLAGS'} -}
- PLIB_LDFLAGS= {- $target{plib_lflags} -}
- EX_LIBS= {- $target{ex_libs} -} {- $config{ex_libs} -}
- LIB_CFLAGS={- $target{shared_cflag} || "" -}
-diff --git a/Configure b/Configure
-index aee7cc3..274d236 100755
 a/Configure
-+++ b/Configure
-@@ -979,7 +979,7 @@ $config{build_file} = $target{build_file};
- $config{defines} = [];
- $config{cflags} = "";
- $config{ex_libs} = "";
--$config{shared_ldflag} = "";
-+$config{shared_ldflag} = $ENV{'LDFLAGS'};
- 
- # Make sure build_scheme is consistent.
- $target{build_scheme} = [ $target{build_scheme} ]
--- 
-2.11.0
-
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb 
b/meta/recipes-connectivity/openssl/openssl_1.1.1-pre4.bb
similarity index 83%
rename from meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
rename to meta/recipes-connectivity/openssl/openssl_1.1.1-pre4.bb
index 94b75eb92a8..859362f7afe 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1-pre4.bb
@@ -10,13 +10,12 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=d57d511030c9d66ef5f5966bee5a7eff"
 
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI[md5sum] = "5271477e4d93f4ea032b665ef095ff24"
-SRC_URI[sha256sum] = 
"5835626cde9e99656585fc7aaa2302a73a7e1340bf8c14fd635a62c66802a517"
+SRC_URI[md5sum] = "07c3f6831fb6dfe975795ef7bbbee9fc"
+SRC_URI[sha256sum] = 
"df2d5fcc2a878525611c75b9e9116fbcfbce8d9b96419a16eda5fb11ecc428f6"
 
 SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
file://run-ptest \
file://openssl-c_rehash.sh \
-   file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \
"
 
 S = "${WORKDIR}/openssl-${PV}"
@@ -114,20 +113,20 @@ do_configure () {
 if [ "x$useprefix" = "x" ]; then
 useprefix=/
 fi
-   libdirleaf="$(echo ${libdir} | sed s:$useprefix::)"
-   perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix 
--openssldir=${libdir}/ssl-1.1 --libdir=${libdirleaf} $target
+# WARNING: do not set compiler/linker flags (-I/-D etc.) in 
EXTRA_OECONF, as they will fully replace the
+# environment variables set by bitbake. Adjust the environment 
variables instead.
+   perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix 
--openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target
 }
 
-#| engines/afalg/e_afalg.c: In function 'eventfd':
-#| engines/afalg/e_afalg.c:110:20: error: '__NR_eventfd' undeclared (first 

[OE-core] [RFC][PATCH 1/5] openssl: rename openssl 1.0.x to openssl10 and make openssl 1.1.x the default version

2018-04-10 Thread Alexander Kanavin
I believe the time has come to do this: openssl 1.0 upstream support stops at 
the end
of 2019, and we do not want a situation where a supported YP release contains an
unsupported version of a critical security component.

Openssl 1.0 can still be utilized by depending on 'openssl10' recipe.

Signed-off-by: Alexander Kanavin 
---
 meta/conf/distro/include/default-versions.inc   |  3 ---
 meta/conf/distro/include/maintainers.inc|  1 +
 meta/recipes-connectivity/openssl/openssl10.inc | 17 +++--
 ...-Fix-build-with-clang-using-external-assembler.patch |  0
 ...001-openssl-force-soft-link-to-avoid-rare-race.patch |  0
 .../{openssl-1.0.2o => openssl10}/Makefiles-ptest.patch |  0
 .../Use-SHA256-not-MD5-as-default-digest.patch  |  0
 .../configure-musl-target.patch |  0
 .../configure-targets.patch |  0
 .../debian/c_rehash-compat.patch|  0
 .../{openssl-1.0.2o => openssl10}/debian/ca.patch   |  0
 .../debian/debian-targets.patch |  0
 .../{openssl-1.0.2o => openssl10}/debian/man-dir.patch  |  0
 .../debian/man-section.patch|  0
 .../{openssl-1.0.2o => openssl10}/debian/no-rpath.patch |  0
 .../debian/no-symbolic.patch|  0
 .../{openssl-1.0.2o => openssl10}/debian/pic.patch  |  0
 .../debian1.0.2/block_digicert_malaysia.patch   |  0
 .../debian1.0.2/block_diginotar.patch   |  0
 .../debian1.0.2/soname.patch|  0
 .../debian1.0.2/version-script.patch|  0
 .../engines-install-in-libdir-ssl.patch |  0
 .../openssl/{openssl-1.0.2o => openssl10}/find.pl   |  0
 .../{openssl-1.0.2o => openssl10}/oe-ldflags.patch  |  0
 .../{openssl-1.0.2o => openssl10}/openssl-c_rehash.sh   |  0
 .../openssl-fix-des.pod-error.patch |  0
 .../openssl-util-perlpath.pl-cwd.patch  |  0
 .../openssl_fix_for_x32.patch   |  0
 .../{openssl-1.0.2o => openssl10}/parallel.patch|  0
 .../{openssl-1.0.2o => openssl10}/ptest-deps.patch  |  0
 .../ptest_makefile_deps.patch   |  0
 .../reproducible-cflags.patch   |  0
 .../reproducible-mkbuildinf.patch   |  0
 .../openssl/{openssl-1.0.2o => openssl10}/run-ptest |  0
 .../{openssl-1.0.2o => openssl10}/shared-libs.patch |  0
 .../openssl/{openssl_1.0.2o.bb => openssl10_1.0.2o.bb}  |  0
 36 files changed, 16 insertions(+), 5 deletions(-)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/0001-Fix-build-with-clang-using-external-assembler.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/0001-openssl-force-soft-link-to-avoid-rare-race.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/Makefiles-ptest.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/Use-SHA256-not-MD5-as-default-digest.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/configure-musl-target.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/configure-targets.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/debian/c_rehash-compat.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/debian/ca.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/debian/debian-targets.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/debian/man-dir.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/debian/man-section.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/debian/no-rpath.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/debian/no-symbolic.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/debian/pic.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/debian1.0.2/block_digicert_malaysia.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/debian1.0.2/block_diginotar.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/debian1.0.2/soname.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/debian1.0.2/version-script.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/engines-install-in-libdir-ssl.patch (100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => openssl10}/find.pl 
(100%)
 rename meta/recipes-connectivity/openssl/{openssl-1.0.2o => 
openssl10}/oe-ldflags.patch (100%)
 rename 

[OE-core] [PATCH] dropbear: update to 2018.76

2018-04-10 Thread Andrej Valek
- update dropbear to version 2018.76
- refresh and drop obsolete patches
- add option to use localoptions.h header file
- do not use harden stuff, which leads to QA warning

Signed-off-by: Andrej Valek 
---
 meta/recipes-core/dropbear/dropbear.inc|   8 +-
 .../0001-urandom-xauth-changes-to-options.h.patch  |  16 +--
 .../dropbear/dropbear/0003-configure.patch |  43 ---
 .../dropbear/0005-dropbear-enable-pam.patch|  40 +++---
 .../dropbear/0007-dropbear-fix-for-x32-abi.patch   | 140 -
 .../0007-fix-localoptions-search-path.patch|  51 
 .../fix-libtomcrypt-libtommath-ordering.patch  |  49 
 meta/recipes-core/dropbear/dropbear_2017.75.bb |   5 -
 meta/recipes-core/dropbear/dropbear_2018.76.bb |   5 +
 9 files changed, 92 insertions(+), 265 deletions(-)
 delete mode 100644 meta/recipes-core/dropbear/dropbear/0003-configure.patch
 delete mode 100644 
meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch
 create mode 100644 
meta/recipes-core/dropbear/dropbear/0007-fix-localoptions-search-path.patch
 delete mode 100644 
meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch
 delete mode 100644 meta/recipes-core/dropbear/dropbear_2017.75.bb
 create mode 100644 meta/recipes-core/dropbear/dropbear_2018.76.bb

diff --git a/meta/recipes-core/dropbear/dropbear.inc 
b/meta/recipes-core/dropbear/dropbear.inc
index b6b436c584..7451d57cf9 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -14,10 +14,8 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'libpam', '', d)}"
 
 SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
file://0001-urandom-xauth-changes-to-options.h.patch \
-   file://0003-configure.patch \
file://0004-fix-2kb-keys.patch \
-   file://0007-dropbear-fix-for-x32-abi.patch \
-   file://fix-libtomcrypt-libtommath-ordering.patch \
+   file://0007-fix-localoptions-search-path.patch \
file://init \
file://dropbearkey.service \
file://dropbear@.service \
@@ -52,6 +50,10 @@ PACKAGECONFIG[system-libtom] = 
"--disable-bundled-libtom,--enable-bundled-libtom
 EXTRA_OECONF += "\
  ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', 
'--disable-pam', d)}"
 
+# This option appends to CFLAGS and LDFGAS from OE
+# This is causing [textrel] QA warning
+EXTRA_OECONF += "--disable-harden"
+
 do_install() {
install -d ${D}${sysconfdir} \
${D}${sysconfdir}/init.d \
diff --git 
a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
 
b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
index dc9d5782e8..684641dcbd 100644
--- 
a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
+++ 
b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
@@ -2,20 +2,20 @@ Subject: [PATCH 1/6] urandom-xauth-changes-to-options.h
 
 Upstream-Status: Inappropriate [configuration]
 ---
- options.h | 2 +-
+ default_options.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/options.h b/options.h
-index 7d06322..71a21c2 100644
 a/options.h
-+++ b/options.h
-@@ -247,7 +247,7 @@ much traffic. */
+diff --git a/default_options.h b/default_options.h
+index 3b75eb8..1fd8082 100644
+--- a/default_options.h
 b/default_options.h
+@@ -243,7 +243,7 @@ Homedir is prepended unless path begins with / */
+ 
  /* The command to invoke for xauth when using X11 forwarding.
   * "-q" for quiet */
- #ifndef XAUTH_COMMAND
 -#define XAUTH_COMMAND "/usr/bin/xauth -q"
 +#define XAUTH_COMMAND "xauth -q"
- #endif
+ 
  
  /* if you want to enable running an sftp server (such as the one included with
 -- 
diff --git a/meta/recipes-core/dropbear/dropbear/0003-configure.patch 
b/meta/recipes-core/dropbear/dropbear/0003-configure.patch
deleted file mode 100644
index 8469a50eff..00
--- a/meta/recipes-core/dropbear/dropbear/0003-configure.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 58dd24a80ca0f400d0761afd9ce2b7f684fc9125 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Eric=20B=C3=A9nard?= 
-Date: Thu, 25 Apr 2013 00:27:25 +0200
-Subject: [PATCH] configure: add a variable to allow openpty check to be cached
-
-Upstream-Status: Submitted [ https://github.com/mkj/dropbear/pull/48 ]
-
-Signed-off-by: Dengke Du 

- configure.ac | 11 ---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 893b904..245408d 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -177,15 +177,20 @@ AC_ARG_ENABLE(openpty,
-   AC_MSG_NOTICE(Not using openpty)
-   else
-   AC_MSG_NOTICE(Using openpty if available)
--  

[OE-core] [PATCH] xserver-nodm-init: Respawn service in case of failure

2018-04-10 Thread Ramon Fried
From: Ramon Fried 

It appears that sometimes xserver-nodm.service is starting before
display driver finished loading causing the following failure in
Xorg log:
(EE) open /dev/dri/card0: No such file or directory

The introduced by this patch is to restart the service,
hopefully the display driver will finish loading.

Signed-off-by: Ramon Fried 
---
 .../x11-common/xserver-nodm-init/xserver-nodm.service.in | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in 
b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
index 324a26f549..87dc4f8fcd 100644
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
@@ -5,6 +5,7 @@ Description=Xserver startup without a display manager
 EnvironmentFile=/etc/default/xserver-nodm
 User=@USER@
 ExecStart=/etc/xserver-nodm/Xserver
+Restart=always
 
 [Install]
 Alias=display-manager.service
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

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


Re: [OE-core] [PATCH] u-boot: Upgrade to 2018.03 release

2018-04-10 Thread Martin Hundebøll

Hi,

I had to patch up our own u-boot recipe as shown in the attached patch 
to make v2018.03 compile for qemu-x86.


The thing is that the build of pylibfdt became unconditional since 
15b97f5c5e ('pylibfdt: move pylibfdt to scripts/dtc/pylibfdt and 
refactor makefile')


In my case u-boot/pylibfdt failed to find the correct (native) headers, 
because python setuptools / distutils looks into STAGING_{LIB,INC}DIR 
when compiling the native extension for libfdt. I didn't find any other 
way to specificy this in either the u-boot Makefile or some other magic 
environment variable.


// Martin

On 2018-04-09 02:54, Khem Raj wrote:


On Sun, Apr 8, 2018 at 4:10 PM Marek Vasut > wrote:


This upgrades the U-Boot from 2018.01 to 2018.03 release and drops
patches accepted upstream, getting the patch count to zero.



It fails for me if I have libfdt installed on build host
It seems build is doing the include dance which goes all the way into 
hosts system include directories




Signed-off-by: Marek Vasut >
Cc: Otavio Salvador >
Cc: Ross Burton >
Cc: Richard Purdie >
---
  .../u-boot/files/MPC8315ERDB-enable-DHCP.patch        | 19
---
  ...t-common_2018.01.inc => u-boot-common_2018.03.inc} |  6 ++
  ...fw-utils_2018.01.bb  =>
u-boot-fw-utils_2018.03.bb } |  0
  ...t-mkimage_2018.01.bb  =>
u-boot-mkimage_2018.03.bb } |  0
  .../u-boot/{u-boot_2018.01.bb  =>
u-boot_2018.03.bb }   |  0
  5 files changed, 2 insertions(+), 23 deletions(-)
  delete mode 100644
meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
  rename meta/recipes-bsp/u-boot/{u-boot-common_2018.01.inc =>
u-boot-common_2018.03.inc} (68%)
  rename meta/recipes-bsp/u-boot/{u-boot-fw-utils_2018.01.bb
 => u-boot-fw-utils_2018.03.bb
} (100%)
  rename meta/recipes-bsp/u-boot/{u-boot-mkimage_2018.01.bb
 => u-boot-mkimage_2018.03.bb
} (100%)
  rename meta/recipes-bsp/u-boot/{u-boot_2018.01.bb
 => u-boot_2018.03.bb
} (100%)

diff --git
a/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
b/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
deleted file mode 100644
index ecaa1796a4..00
--- a/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Enabled dhcp client functionality for Yocto reference
-hardware MPC8315E-RDB.
-
-Upstream-Status: Pending
-
-Signed-off-by: Ed Bartosh >
-
-Index: git/configs/MPC8315ERDB_defconfig
-===
 git.orig/configs/MPC8315ERDB_defconfig
-+++ git/configs/MPC8315ERDB_defconfig
-@@ -12,6 +12,7 @@ CONFIG_CMD_PCI=y
- CONFIG_CMD_SATA=y
- CONFIG_CMD_USB=y
- # CONFIG_CMD_SETEXPR is not set
-+CONFIG_CMD_DHCP=y
- CONFIG_CMD_MII=y
- CONFIG_CMD_PING=y
- CONFIG_CMD_DATE=y
diff --git a/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
b/meta/recipes-bsp/u-boot/u-boot-common_2018.03.inc
similarity index 68%
rename from meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
rename to meta/recipes-bsp/u-boot/u-boot-common_2018.03.inc
index d2073ea0c7..8ffae365a9 100644
--- a/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-common_2018.03.inc
@@ -7,10 +7,8 @@ PE = "1"

  # We use the revision in order to avoid having to fetch it from the
  # repo during parse
-SRCREV = "f3dd87e0b98999a78e500e8c6d2b063ebadf535a"
+SRCREV = "f95ab1fb6e37f0601f397091bb011edf7a98b890"

-SRC_URI = "git://git.denx.de/u-boot.git
 \
-    file://MPC8315ERDB-enable-DHCP.patch \
-"
+SRC_URI = "git://git.denx.de/u-boot.git
"

  S = "${WORKDIR}/git"
diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.01.bb

b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.03.bb

similarity index 100%
rename from meta/recipes-bsp/u-boot/u-boot-fw-utils_2018.01.bb

rename to 

Re: [OE-core] [PATCH] oe-selftest: runqemu: add tests for qemu boot and shutdown

2018-04-10 Thread Yeoh, Ee Peng
Hi Richard,

Yes, we are testing an alternative way to stop qemu here. From my understand, 
the existing testcases stop qemu through killing the qemu process. While this 
testcase was testing that after executing the shutdown command inside qemu, 
qemu will stop as expected. 

Currently, QA team was manually testing the execution of shutdown command on 
various qemu architecture. The team had found an shutdown hung issue on 
qemuarm.  
https://bugzilla.yoctoproject.org/show_bug.cgi?id=12499

Hope this explain the intention of this testcase. Please let me you opinion and 
input. 

Thanks,
Yeoh Ee Peng 

-Original Message-
From: Richard Purdie [mailto:richard.pur...@linuxfoundation.org] 
Sent: Tuesday, April 10, 2018 5:41 PM
To: Yeoh, Ee Peng ; 
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] oe-selftest: runqemu: add tests for qemu boot 
and shutdown

On Mon, 2018-04-09 at 10:43 -0700, Yeoh Ee Peng wrote:
> QA team were testing qemu boot image and shutdown on each qemu 
> architecture manually. Add automated test to test qemu boot on
> ext4 and nfs, finally check that it can shutdown properly.
> 
> Original runqemu tests was dedicated for MACHINE=qemux86-64 and it was 
> testing various live image (iso and hddimg) will be able to boot while 
> live image was not supported on all qemu architecture.
> 
> The new tests were designed as a separate class as this tests focus on 
> testing qemu boot and shutdown on each qemu architecture.
> Furthermore, this tests focus on testing qemu could shutdown as 
> expected.
> 
> Signed-off-by: Yeoh Ee Peng 

I do have one other question about this. There are various other tests which 
boot qemu images. Would we be able to assume that because those tests work, the 
start/stop of qemu is working? Or is there a unique element we need to test 
specifically here?

Cheers,

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


Re: [OE-core] [PATCH] u-boot: Upgrade to 2018.03 release

2018-04-10 Thread Marek Vasut
On 04/10/2018 11:49 AM, Martin Hundebøll wrote:
> Hi,

Hi,

> I had to patch up our own u-boot recipe as shown in the attached patch
> to make v2018.03 compile for qemu-x86.
> 
> The thing is that the build of pylibfdt became unconditional since
> 15b97f5c5e ('pylibfdt: move pylibfdt to scripts/dtc/pylibfdt and
> refactor makefile')
> 
> In my case u-boot/pylibfdt failed to find the correct (native) headers,
> because python setuptools / distutils looks into STAGING_{LIB,INC}DIR
> when compiling the native extension for libfdt. I didn't find any other
> way to specificy this in either the u-boot Makefile or some other magic
> environment variable.

CCing Yamada-san, maybe he has an idea.
Also, do not top post.

> // Martin
> 
> On 2018-04-09 02:54, Khem Raj wrote:
>>
>> On Sun, Apr 8, 2018 at 4:10 PM Marek Vasut > > wrote:
>>
>>     This upgrades the U-Boot from 2018.01 to 2018.03 release and drops
>>     patches accepted upstream, getting the patch count to zero.
>>
>>
>>
>> It fails for me if I have libfdt installed on build host
>> It seems build is doing the include dance which goes all the way into
>> hosts system include directories
>>
>>
>>
>>     Signed-off-by: Marek Vasut >
>>     Cc: Otavio Salvador >     >
>>     Cc: Ross Burton > >
>>     Cc: Richard Purdie >     >
>>     ---
>>   .../u-boot/files/MPC8315ERDB-enable-DHCP.patch        | 19
>>     ---
>>   ...t-common_2018.01.inc => u-boot-common_2018.03.inc} |  6 ++
>>   ...fw-utils_2018.01.bb  =>
>>     u-boot-fw-utils_2018.03.bb } |  0
>>   ...t-mkimage_2018.01.bb  =>
>>     u-boot-mkimage_2018.03.bb } |  0
>>   .../u-boot/{u-boot_2018.01.bb  =>
>>     u-boot_2018.03.bb }   |  0
>>   5 files changed, 2 insertions(+), 23 deletions(-)
>>   delete mode 100644
>>     meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
>>   rename meta/recipes-bsp/u-boot/{u-boot-common_2018.01.inc =>
>>     u-boot-common_2018.03.inc} (68%)
>>   rename meta/recipes-bsp/u-boot/{u-boot-fw-utils_2018.01.bb
>>      => u-boot-fw-utils_2018.03.bb
>>     } (100%)
>>   rename meta/recipes-bsp/u-boot/{u-boot-mkimage_2018.01.bb
>>      => u-boot-mkimage_2018.03.bb
>>     } (100%)
>>   rename meta/recipes-bsp/u-boot/{u-boot_2018.01.bb
>>      => u-boot_2018.03.bb
>>     } (100%)
>>
>>     diff --git
>>     a/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
>>     b/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
>>     deleted file mode 100644
>>     index ecaa1796a4..00
>>     --- a/meta/recipes-bsp/u-boot/files/MPC8315ERDB-enable-DHCP.patch
>>     +++ /dev/null
>>     @@ -1,19 +0,0 @@
>>     -Enabled dhcp client functionality for Yocto reference
>>     -hardware MPC8315E-RDB.
>>     -
>>     -Upstream-Status: Pending
>>     -
>>     -Signed-off-by: Ed Bartosh >     >
>>     -
>>     -Index: git/configs/MPC8315ERDB_defconfig
>>     -===
>>      git.orig/configs/MPC8315ERDB_defconfig
>>     -+++ git/configs/MPC8315ERDB_defconfig
>>     -@@ -12,6 +12,7 @@ CONFIG_CMD_PCI=y
>>     - CONFIG_CMD_SATA=y
>>     - CONFIG_CMD_USB=y
>>     - # CONFIG_CMD_SETEXPR is not set
>>     -+CONFIG_CMD_DHCP=y
>>     - CONFIG_CMD_MII=y
>>     - CONFIG_CMD_PING=y
>>     - CONFIG_CMD_DATE=y
>>     diff --git a/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
>>     b/meta/recipes-bsp/u-boot/u-boot-common_2018.03.inc
>>     similarity index 68%
>>     rename from meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
>>     rename to meta/recipes-bsp/u-boot/u-boot-common_2018.03.inc
>>     index d2073ea0c7..8ffae365a9 100644
>>     --- a/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
>>     +++ b/meta/recipes-bsp/u-boot/u-boot-common_2018.03.inc
>>     @@ -7,10 +7,8 @@ PE = "1"
>>
>>   # We use the revision in order to avoid having to fetch it from the
>>   # repo during parse
>>     -SRCREV = "f3dd87e0b98999a78e500e8c6d2b063ebadf535a"
>>     +SRCREV = "f95ab1fb6e37f0601f397091bb011edf7a98b890"
>>
>>     -SRC_URI = "git://git.denx.de/u-boot.git
>>      \
>>     -    file://MPC8315ERDB-enable-DHCP.patch \
>>     -"
>>     +SRC_URI = "git://git.denx.de/u-boot.git
>>     "
>>
>>    

Re: [OE-core] [PATCH] oe-selftest: runqemu: add tests for qemu boot and shutdown

2018-04-10 Thread Richard Purdie
On Mon, 2018-04-09 at 10:43 -0700, Yeoh Ee Peng wrote:
> QA team were testing qemu boot image and shutdown on each
> qemu architecture manually. Add automated test to test qemu boot on
> ext4 and nfs, finally check that it can shutdown properly.
> 
> Original runqemu tests was dedicated for MACHINE=qemux86-64 and
> it was testing various live image (iso and hddimg) will be able
> to boot while live image was not supported on all qemu architecture.
> 
> The new tests were designed as a separate class as this tests
> focus on testing qemu boot and shutdown on each qemu architecture.
> Furthermore, this tests focus on testing qemu could shutdown
> as expected.
> 
> Signed-off-by: Yeoh Ee Peng 

I do have one other question about this. There are various other tests
which boot qemu images. Would we be able to assume that because those
tests work, the start/stop of qemu is working? Or is there a unique
element we need to test specifically here?

Cheers,

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


[OE-core] [PATCH] oe-selftest: runqemu: add tests for qemu boot and shutdown

2018-04-10 Thread Yeoh Ee Peng
QA team were testing qemu boot image and shutdown on each
qemu architecture manually. Add automated test to test qemu boot on
ext4 and nfs, finally check that it can shutdown properly.

Signed-off-by: Yeoh Ee Peng 
---
 meta/lib/oeqa/selftest/cases/runqemu.py | 70 -
 1 file changed, 68 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py 
b/meta/lib/oeqa/selftest/cases/runqemu.py
index 47d41f5..f3ff015 100644
--- a/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -3,9 +3,10 @@
 #
 
 import re
-
+import tempfile
+import time
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import bitbake, runqemu, get_bb_var
+from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd
 from oeqa.core.decorator.oeid import OETestID
 
 class RunqemuTests(OESelftestTestCase):
@@ -136,3 +137,68 @@ SYSLINUX_TIMEOUT = "10"
 cmd = "%s %s" % (self.cmd_common, rootfs)
 with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
 self.assertTrue(qemu.runner.logged, "Failed: %s" % cmd)
+
+# This test was designed as a separate class to test that shutdown
+# command will shutdown qemu as expected on each qemu architecture
+# based on the MACHINE configuration inside the config file
+# (eg. local.conf).
+#
+# This was different compared to RunqemuTests, where RunqemuTests was
+# dedicated for MACHINE=qemux86-64 where it test that qemux86-64 will
+# bootup various filesystem types, including live image(iso and hddimg)
+# where live image was not supported on all qemu architecture.
+class QemuTest(OESelftestTestCase):
+
+@classmethod
+def setUpClass(cls):
+super(QemuTest, cls).setUpClass()
+cls.recipe = 'core-image-minimal'
+cls.machine =  get_bb_var('MACHINE')
+cls.deploy_dir_image =  get_bb_var('DEPLOY_DIR_IMAGE')
+cls.cmd_common = "runqemu nographic"
+cls.qemuboot_conf = "%s-%s.qemuboot.conf" % (cls.recipe, cls.machine)
+cls.qemuboot_conf = os.path.join(cls.deploy_dir_image, 
cls.qemuboot_conf)
+bitbake(cls.recipe)
+
+def _start_qemu_shutdown_check_if_shutdown_succeeded(self, qemu, timeout):
+qemu.run_serial("shutdown -h now")
+# Stop thread will stop the LoggingThread instance used for logging
+# qemu through serial console, stop thread will prevent this code
+# from facing exception (Console connection closed unexpectedly)
+# when qemu was shutdown by the above shutdown command
+qemu.runner.stop_thread()
+time_track = 0
+while True:
+is_alive = qemu.check()
+if not is_alive:
+return True
+if time_track > timeout:
+return False
+time.sleep(1)
+time_track += 1
+
+def test_qemu_can_shutdown(self):
+self.assertExists(self.qemuboot_conf)
+cmd = "%s %s" % (self.cmd_common, self.qemuboot_conf)
+shutdown_timeout = 120
+with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+qemu_shutdown_succeeded = 
self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
+self.assertTrue(qemu_shutdown_succeeded, 'Failed: %s does not 
shutdown within timeout(%s)' % (self.machine, shutdown_timeout))
+
+def test_qemu_can_boot_nfs_and_shutdown(self):
+self.assertExists(self.qemuboot_conf)
+bitbake('meta-ide-support')
+rootfs_tar = "%s-%s.tar.bz2" % (self.recipe, self.machine)
+rootfs_tar = os.path.join(self.deploy_dir_image, rootfs_tar)
+self.assertExists(rootfs_tar)
+tmpdir = tempfile.mkdtemp(prefix='qemu_nfs')
+tmpdir_nfs = os.path.join(tmpdir, 'nfs')
+cmd_extract_nfs = 'runqemu-extract-sdk %s %s' % (rootfs_tar, 
tmpdir_nfs)
+result = runCmd(cmd_extract_nfs)
+self.assertEqual(0, result.status, "runqemu-extract-sdk didn't run as 
expected. %s" % result.output)
+cmd = "%s nfs %s %s" % (self.cmd_common, self.qemuboot_conf, 
tmpdir_nfs)
+shutdown_timeout = 120
+with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
+qemu_shutdown_succeeded = 
self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
+self.assertTrue(qemu_shutdown_succeeded, 'Failed: %s does not 
shutdown within timeout(%s)' % (self.machine, shutdown_timeout))
+runCmd('rm -rf %s' % tmpdir)
-- 
2.7.4

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


Re: [OE-core] [PATCH] oe-selftest: runqemu: add tests for qemu boot and shutdown

2018-04-10 Thread Yeoh, Ee Peng
Noted, I understood it now. Let me enhance the comment in the source code 
itself. 
It make sense. Thank you for your inputs! 

-Original Message-
From: Alexander Kanavin [mailto:alexander.kana...@linux.intel.com] 
Sent: Tuesday, April 10, 2018 3:30 PM
To: Yeoh, Ee Peng ; 
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] oe-selftest: runqemu: add tests for qemu boot 
and shutdown

On 04/09/2018 08:43 PM, Yeoh Ee Peng wrote:
> QA team were testing qemu boot image and shutdown on each qemu 
> architecture manually. Add automated test to test qemu boot on
> ext4 and nfs, finally check that it can shutdown properly.
> 
> Original runqemu tests was dedicated for MACHINE=qemux86-64 and it was 
> testing various live image (iso and hddimg) will be able to boot while 
> live image was not supported on all qemu architecture.
> 
> The new tests were designed as a separate class as this tests focus on 
> testing qemu boot and shutdown on each qemu architecture.
> Furthermore, this tests focus on testing qemu could shutdown as 
> expected.

1. I believe the clock on the machine that you use to send the patches isn't 
set correctly, it seems to be several hours in the past.

2. What I meant is that you comment the source code itself, not write a longer 
commit message. So that anyone reading the actual file can quickly figure out 
why there are two classes and what they test. 
Basically take the above, and write it down as comments in the actual file; 
take your time to write a nice, clear explanation (similar to what we 
discussed). Then the commit message can be more brief, basically the first 
paragraph above is enough.

The reason for this is that commit history is less obvious or convenient to use 
when you want to find explanations. You can certainly use 'git log ', 
but it comes with lots of irrelevant commits, and if the code was restructured 
in the past, then the history of changes stops there.

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


Re: [OE-core] [PATCH] oe-selftest: runqemu: add tests for qemu boot and shutdown

2018-04-10 Thread Alexander Kanavin

On 04/09/2018 08:43 PM, Yeoh Ee Peng wrote:

QA team were testing qemu boot image and shutdown on each
qemu architecture manually. Add automated test to test qemu boot on
ext4 and nfs, finally check that it can shutdown properly.

Original runqemu tests was dedicated for MACHINE=qemux86-64 and
it was testing various live image (iso and hddimg) will be able
to boot while live image was not supported on all qemu architecture.

The new tests were designed as a separate class as this tests
focus on testing qemu boot and shutdown on each qemu architecture.
Furthermore, this tests focus on testing qemu could shutdown
as expected.


1. I believe the clock on the machine that you use to send the patches 
isn't set correctly, it seems to be several hours in the past.


2. What I meant is that you comment the source code itself, not write a 
longer commit message. So that anyone reading the actual file can 
quickly figure out why there are two classes and what they test. 
Basically take the above, and write it down as comments in the actual 
file; take your time to write a nice, clear explanation (similar to what 
we discussed). Then the commit message can be more brief, basically the 
first paragraph above is enough.


The reason for this is that commit history is less obvious or convenient 
to use when you want to find explanations. You can certainly use 'git 
log ', but it comes with lots of irrelevant commits, and if 
the code was restructured in the past, then the history of changes stops 
there.


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


Re: [OE-core] [PATCH] oe-selftest: runqemu: add tests for qemu boot and shutdown

2018-04-10 Thread Yeoh, Ee Peng
Hi Anuj,

Thanks for your inputs on comment and code that was not used. I shall remove 
the comment and code that was not used. 

For the qemu.runner.stop_thread(), this was trigger to stop an instance of a 
LoggingThread class that was used primary to logging the qemu through serial 
console. Stopping this thread will not stop the qemu itself. In case that this 
logging thread object was not stop, when the qemu finally shutdown by the 
shutdown command, this logging thread will encounter an exception (Exception: 
Console connection closed unexpectedly). From the testing on multiple qemu 
architecture, this testcase was able to catch the shutdown hung error facing by 
existing qemuarm (https://bugzilla.yoctoproject.org/show_bug.cgi?id=12499), 
while it was as expected on qemux86, qemuppc, and other. I shall add comment to 
explain the important of qemu.runner.stop_thread() and the reason behind this. 

For the skipTest, I agreed with you, it shall be replace by assertion to 
highlight environment setup failure. 

Please let me know if you have any more input. Thank you very much!

Thanks,
Yeoh Ee Peng 


-Original Message-
From: Mittal, Anuj 
Sent: Tuesday, April 10, 2018 3:01 PM
To: Yeoh, Ee Peng ; 
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] oe-selftest: runqemu: add tests for qemu boot 
and shutdown

On 04/10/2018 01:43 AM, Yeoh Ee Peng wrote:
> QA team were testing qemu boot image and shutdown on each qemu 
> architecture manually. Add automated test to test qemu boot on
> ext4 and nfs, finally check that it can shutdown properly.
> 
> Original runqemu tests was dedicated for MACHINE=qemux86-64 and it was 
> testing various live image (iso and hddimg) will be able to boot while 
> live image was not supported on all qemu architecture.
> 
> The new tests were designed as a separate class as this tests focus on 
> testing qemu boot and shutdown on each qemu architecture.
> Furthermore, this tests focus on testing qemu could shutdown as 
> expected.
> 
> Signed-off-by: Yeoh Ee Peng 
> ---
>  meta/lib/oeqa/selftest/cases/runqemu.py | 61 
> +++--
>  1 file changed, 59 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py 
> b/meta/lib/oeqa/selftest/cases/runqemu.py
> index 47d41f5..7288ab2 100644
> --- a/meta/lib/oeqa/selftest/cases/runqemu.py
> +++ b/meta/lib/oeqa/selftest/cases/runqemu.py
> @@ -3,9 +3,10 @@
>  #
>  
>  import re
> -
> +import tempfile
> +import time
>  from oeqa.selftest.case import OESelftestTestCase -from 
> oeqa.utils.commands import bitbake, runqemu, get_bb_var
> +from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd
>  from oeqa.core.decorator.oeid import OETestID
>  
>  class RunqemuTests(OESelftestTestCase):
> @@ -136,3 +137,59 @@ SYSLINUX_TIMEOUT = "10"
>  cmd = "%s %s" % (self.cmd_common, rootfs)
>  with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
>  self.assertTrue(qemu.runner.logged, "Failed: %s" % cmd)
> +
> +class QemuTest(OESelftestTestCase):
> +
> +@classmethod
> +def setUpClass(cls):
> +super(QemuTest, cls).setUpClass()
> +cls.recipe = 'core-image-minimal'
> +cls.machine =  get_bb_var('MACHINE')
> +cls.deploy_dir_image =  get_bb_var('DEPLOY_DIR_IMAGE')
> +cls.cmd_common = "runqemu nographic"
> +cls.qemuboot_conf = "%s-%s.qemuboot.conf" % (cls.recipe, cls.machine)
> +cls.qemuboot_conf = os.path.join(cls.deploy_dir_image, 
> cls.qemuboot_conf)
> +result = bitbake(cls.recipe)

This 'result' isn't used.

> +
> +def _start_qemu_shutdown_check_if_shutdown_succeeded(self, qemu, 
> timeout):
> +status, output = qemu.run_serial("shutdown -h now")
> +qemu.runner.stop_thread()

If you call stop_thread like this, this test will probably always pass?
Please check the value of output and then is_alive/check().

> +print('DEBUG: shutdown and stop thread')
> +time_track = 0
> +while True:
> +is_alive = qemu.check()
> +if not is_alive:
> +return True
> +if time_track > timeout:
> +return False
> +time.sleep(1)
> +time_track += 1
> +print(time_track)

We shouldn't be printing these values.

> +
> +def test_qemu_can_shutdown(self):
> +if not os.path.exists(self.qemuboot_conf):
> +self.skipTest("%s not found" % self.qemuboot_conf)
> +cmd = "%s %s" % (self.cmd_common, self.qemuboot_conf)
> +shutdown_timeout = 120
> +with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
> +qemu_shutdown_succeeded = 
> self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
> +self.assertTrue(qemu_shutdown_succeeded, 'Failed: qemu 
> + does not shutdown within timeout(%s)' % shutdown_timeout)
> +

Re: [OE-core] [PATCH] oe-selftest: runqemu: add tests for qemu boot and shutdown

2018-04-10 Thread Anuj Mittal
On 04/10/2018 01:43 AM, Yeoh Ee Peng wrote:
> QA team were testing qemu boot image and shutdown on each
> qemu architecture manually. Add automated test to test qemu boot on
> ext4 and nfs, finally check that it can shutdown properly.
> 
> Original runqemu tests was dedicated for MACHINE=qemux86-64 and
> it was testing various live image (iso and hddimg) will be able
> to boot while live image was not supported on all qemu architecture.
> 
> The new tests were designed as a separate class as this tests
> focus on testing qemu boot and shutdown on each qemu architecture.
> Furthermore, this tests focus on testing qemu could shutdown
> as expected.
> 
> Signed-off-by: Yeoh Ee Peng 
> ---
>  meta/lib/oeqa/selftest/cases/runqemu.py | 61 
> +++--
>  1 file changed, 59 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py 
> b/meta/lib/oeqa/selftest/cases/runqemu.py
> index 47d41f5..7288ab2 100644
> --- a/meta/lib/oeqa/selftest/cases/runqemu.py
> +++ b/meta/lib/oeqa/selftest/cases/runqemu.py
> @@ -3,9 +3,10 @@
>  #
>  
>  import re
> -
> +import tempfile
> +import time
>  from oeqa.selftest.case import OESelftestTestCase
> -from oeqa.utils.commands import bitbake, runqemu, get_bb_var
> +from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd
>  from oeqa.core.decorator.oeid import OETestID
>  
>  class RunqemuTests(OESelftestTestCase):
> @@ -136,3 +137,59 @@ SYSLINUX_TIMEOUT = "10"
>  cmd = "%s %s" % (self.cmd_common, rootfs)
>  with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
>  self.assertTrue(qemu.runner.logged, "Failed: %s" % cmd)
> +
> +class QemuTest(OESelftestTestCase):
> +
> +@classmethod
> +def setUpClass(cls):
> +super(QemuTest, cls).setUpClass()
> +cls.recipe = 'core-image-minimal'
> +cls.machine =  get_bb_var('MACHINE')
> +cls.deploy_dir_image =  get_bb_var('DEPLOY_DIR_IMAGE')
> +cls.cmd_common = "runqemu nographic"
> +cls.qemuboot_conf = "%s-%s.qemuboot.conf" % (cls.recipe, cls.machine)
> +cls.qemuboot_conf = os.path.join(cls.deploy_dir_image, 
> cls.qemuboot_conf)
> +result = bitbake(cls.recipe)

This 'result' isn't used.

> +
> +def _start_qemu_shutdown_check_if_shutdown_succeeded(self, qemu, 
> timeout):
> +status, output = qemu.run_serial("shutdown -h now")
> +qemu.runner.stop_thread()

If you call stop_thread like this, this test will probably always pass?
Please check the value of output and then is_alive/check().

> +print('DEBUG: shutdown and stop thread')
> +time_track = 0
> +while True:
> +is_alive = qemu.check()
> +if not is_alive:
> +return True
> +if time_track > timeout:
> +return False
> +time.sleep(1)
> +time_track += 1
> +print(time_track)

We shouldn't be printing these values.

> +
> +def test_qemu_can_shutdown(self):
> +if not os.path.exists(self.qemuboot_conf):
> +self.skipTest("%s not found" % self.qemuboot_conf)
> +cmd = "%s %s" % (self.cmd_common, self.qemuboot_conf)
> +shutdown_timeout = 120
> +with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
> +qemu_shutdown_succeeded = 
> self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout)
> +self.assertTrue(qemu_shutdown_succeeded, 'Failed: qemu does not 
> shutdown within timeout(%s)' % shutdown_timeout)
> +
> +def test_qemu_can_boot_nfs_and_shutdown(self):
> +bitbake('meta-ide-support')
> +rootfs_tar = "%s-%s.tar.bz2" % (self.recipe, self.machine)
> +rootfs_tar = os.path.join(self.deploy_dir_image, rootfs_tar)
> +if not os.path.exists(rootfs_tar):
> +self.skipTest("%s not found" % rootfs_tar)
> +tmpdir = tempfile.mkdtemp(prefix='qemu_nfs')
> +tmpdir_nfs = os.path.join(tmpdir, 'nfs')
> +cmd_extract_nfs = 'runqemu-extract-sdk %s %s' % (rootfs_tar, 
> tmpdir_nfs)
> +runCmd(cmd_extract_nfs)
> +if not os.path.exists(self.qemuboot_conf):
> +self.skipTest("%s not found" % self.qemuboot_conf)

This and others should be marked failure I think if env wasn't setup
properly after doing bitbake. Does skipTest result in a failure?

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