[OE-core] [PATCH 3/3] mtd-utils: Complement update-alternatives scope

2018-04-20 Thread Niko Mauno
Avoid collision of mtd-utils and mtd-utils-ubifs provided binaries
with identically named BusyBox provided applets in case packages
are installed to same rootfs, by adding relevant binaries to
update-alternatives scope

Signed-off-by: Niko Mauno 
---
 meta/recipes-devtools/mtd/mtd-utils_git.bb | 23 ---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb 
b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index d09d633022..f50a42cf0e 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -28,10 +28,27 @@ CPPFLAGS_append_riscv64  = " -pthread -D_REENTRANT"
 
 EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} 
${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} 
-I${S}/include' 'BUILDDIR=${S}'"
 
-ALTERNATIVE_${PN} = "flash_eraseall"
+# Use higher priority than corresponding BusyBox-provided applets
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump 
nandwrite"
+ALTERNATIVE_${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol 
ubirsvol ubiupdatevol"
+
+ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
+ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite"
+ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump"
+ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
+ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
+ALTERNATIVE_LINK_NAME[ubidetach] = "${sbindir}/ubidetach"
+ALTERNATIVE_LINK_NAME[ubimkvol] = "${sbindir}/ubimkvol"
+ALTERNATIVE_LINK_NAME[ubirename] = "${sbindir}/ubirename"
+ALTERNATIVE_LINK_NAME[ubirmvol] = "${sbindir}/ubirmvol"
+ALTERNATIVE_LINK_NAME[ubirsvol] = "${sbindir}/ubirsvol"
+ALTERNATIVE_LINK_NAME[ubiupdatevol] = "${sbindir}/ubiupdatevol"
 ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
-# Use higher priority than busybox's flash_eraseall (created when built with 
CONFIG_FLASH_ERASEALL)
-ALTERNATIVE_PRIORITY[flash_eraseall] = "100"
+ALTERNATIVE_LINK_NAME[flash_lock] = "${sbindir}/flash_lock"
+ALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock"
+ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp"
 
 do_install () {
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} 
INCLUDEDIR=${includedir}
-- 
2.11.0

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


[OE-core] [PATCH 1/3] procps: Complement update-alternatives scope

2018-04-20 Thread Niko Mauno
Avoid collision of propcs provided w binary with BusyBox-provided
applet in case both are installed to same rootfs, by adding w to
update-alternatives scope via bindir_progs variable

Signed-off-by: Niko Mauno 
---
 meta/recipes-extended/procps/procps_3.3.12.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/procps/procps_3.3.12.bb 
b/meta/recipes-extended/procps/procps_3.3.12.bb
index 99e43c5349..ecf215fecf 100644
--- a/meta/recipes-extended/procps/procps_3.3.12.bb
+++ b/meta/recipes-extended/procps/procps_3.3.12.bb
@@ -42,7 +42,7 @@ do_install_append () {
 
 CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
 
-bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
+bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w"
 base_bindir_progs += "kill pidof ps watch"
 base_sbindir_progs += "sysctl"
 
-- 
2.11.0

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


Re: [OE-core] State of Sumo

2018-04-20 Thread Peter Kjellerstedt
> -Original Message-
> From: openembedded-core-boun...@lists.openembedded.org
> [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of
> Burton, Ross
> Sent: den 20 april 2018 23:58
> To: OE-core 
> Cc: Marek Vasut ; Otavio Salvador
> 
> Subject: [OE-core] State of Sumo
> 
> Hi,
> 
> We'll hopefully be firing the 2.5 RC build on Monday, so I did a build
> today to see where we stand. As is typical we got two new failures on
> the autobuilder...  My test build included the pseudo bump which
> caused an almost complete rebuild, which is a great way to shake out
> intermittent failures.
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=12704
> Go appears to be using the target CFLAGS when using the host compiler,
> with predictable failures when the host is old and doesn't support new
> flags.
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=12705
> u-boot build failure
> 
> CC'ing the usual maintainers of those two recipes, if you get a moment
> to look at these then that would be much appreciated.
> 
> I'll also say that if you have any outstanding patches that *need* to
> be in 2.5 and can't wait for 2.5.1 then say so now, or forever hold
> your peace (and submit them for master/backport to 2.5.1).

Not sure what the status is for patches for bitbake itself, but I have 
one pending ("lib/bb/utils: prevent movefile from changing dest dir 
permissions" sent to bitbake-devel on April 10), which I was hoping 
would make it into Sumo. The effect when the bug strikes is pretty 
weird, in our case it causes /etc to end up with mode 644 rather than 
755 when building an SDK in a Docker container...

> Regards,
> Ross

//Peter

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


Re: [OE-core] State of Sumo

2018-04-20 Thread Andre McCurdy
On Fri, Apr 20, 2018 at 2:57 PM, Burton, Ross  wrote:
> Hi,
>
> We'll hopefully be firing the 2.5 RC build on Monday, so I did a build
> today to see where we stand. As is typical we got two new failures on
> the autobuilder...  My test build included the pseudo bump which
> caused an almost complete rebuild, which is a great way to shake out
> intermittent failures.
>
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=12704
> Go appears to be using the target CFLAGS when using the host compiler,
> with predictable failures when the host is old and doesn't support new
> flags.

Maybe worth resurrecting something like:

  
http://lists.openembedded.org/pipermail/openembedded-core/2016-February/118212.html

to flush out similar issues?

> https://bugzilla.yoctoproject.org/show_bug.cgi?id=12705
> u-boot build failure
>
> CC'ing the usual maintainers of those two recipes, if you get a moment
> to look at these then that would be much appreciated.
>
> I'll also say that if you have any outstanding patches that *need* to
> be in 2.5 and can't wait for 2.5.1 then say so now, or forever hold
> your peace (and submit them for master/backport to 2.5.1).
>
> Regards,
> Ross
> --
> ___
> 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] State of Sumo

2018-04-20 Thread Marek Vasut
On 04/20/2018 11:57 PM, Burton, Ross wrote:
> Hi,
> 
> We'll hopefully be firing the 2.5 RC build on Monday, so I did a build
> today to see where we stand. As is typical we got two new failures on
> the autobuilder...  My test build included the pseudo bump which
> caused an almost complete rebuild, which is a great way to shake out
> intermittent failures.
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=12704
> Go appears to be using the target CFLAGS when using the host compiler,
> with predictable failures when the host is old and doesn't support new
> flags.
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=12705
> u-boot build failure

Is there any chance you can tar-up the whole U-Boot build dir and make
it available, so it could be debugged ?

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


[OE-core] State of Sumo

2018-04-20 Thread Burton, Ross
Hi,

We'll hopefully be firing the 2.5 RC build on Monday, so I did a build
today to see where we stand. As is typical we got two new failures on
the autobuilder...  My test build included the pseudo bump which
caused an almost complete rebuild, which is a great way to shake out
intermittent failures.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=12704
Go appears to be using the target CFLAGS when using the host compiler,
with predictable failures when the host is old and doesn't support new
flags.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=12705
u-boot build failure

CC'ing the usual maintainers of those two recipes, if you get a moment
to look at these then that would be much appreciated.

I'll also say that if you have any outstanding patches that *need* to
be in 2.5 and can't wait for 2.5.1 then say so now, or forever hold
your peace (and submit them for master/backport to 2.5.1).

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


[OE-core] [PATCH 2/3] e2fsprogs: Complement update-alternatives scope

2018-04-20 Thread Niko Mauno
Avoid collision of e2fsprogs provided tune2fs, mke2fs and mkfs.ext2
commands with corresponding BusyBox provided applets in case both
packages are installed to same rootfs, by adding these commands to
update-alternatives scope

Signed-off-by: Niko Mauno 
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb 
b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
index 56abb3b5d3..cda432460f 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
@@ -100,6 +100,13 @@ ALTERNATIVE_TARGET[chattr] = 
"${base_bindir}/chattr.e2fsprogs"
 ALTERNATIVE_${PN}-doc = "fsck.8"
 ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
 
+ALTERNATIVE_${PN}-tune2fs = "tune2fs"
+ALTERNATIVE_LINK_NAME[tune2fs] = "${base_sbindir}/tune2fs"
+
+ALTERNATIVE_${PN}-mke2fs = "mke2fs mkfs.ext2"
+ALTERNATIVE_LINK_NAME[mke2fs] = "${base_sbindir}/mke2fs"
+ALTERNATIVE_LINK_NAME[mkfs.ext2] = "${base_sbindir}/mkfs.ext2"
+
 RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash"
 
 do_compile_ptest() {
-- 
2.11.0

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


[OE-core] [PATCH] logrotate: Improve configurability of the installed systemd service files

2018-04-20 Thread Peter Kjellerstedt
This makes it possible to add extra options to the logrotate
application (via ${LOGROTATE_OPTIONS}), and it allows the Persistent
option in logrotate.timer to be configured via
${LOGROTATE_SYSTEMD_TIMER_PERSISTENT}.

It also changes the sed expressions to allow for
${LOGROTATE_SYSTEMD_TIMER_BASIS} to contain commas without having to
prefix them with backslahes, e.g.:
LOGROTATE_SYSTEMD_TIMER_BASIS = "*-*-* *:00,30:00"

Signed-off-by: Peter Kjellerstedt 
---
 meta/recipes-extended/logrotate/logrotate_3.13.0.bb | 16 +---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-extended/logrotate/logrotate_3.13.0.bb 
b/meta/recipes-extended/logrotate/logrotate_3.13.0.bb
index 990cf9178b..69d18c9f08 100644
--- a/meta/recipes-extended/logrotate/logrotate_3.13.0.bb
+++ b/meta/recipes-extended/logrotate/logrotate_3.13.0.bb
@@ -34,7 +34,7 @@ PACKAGECONFIG[acl] = ",,acl"
 PACKAGECONFIG[selinux] = ",,libselinux"
 
 CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \
-   ${sysconfdir}/logrotate.conf"
+${sysconfdir}/logrotate.conf"
 
 # If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our
 # optimization variables, so use it rather than EXTRA_CFLAGS.
@@ -60,8 +60,11 @@ SYSTEMD_SERVICE_${PN} = "\
 ${BPN}.timer \
 "
 
+LOGROTATE_OPTIONS ?= ""
+
 LOGROTATE_SYSTEMD_TIMER_BASIS ?= "daily"
 LOGROTATE_SYSTEMD_TIMER_ACCURACY ?= "12h"
+LOGROTATE_SYSTEMD_TIMER_PERSISTENT ?= "true"
 
 do_install(){
 oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir}
@@ -74,8 +77,15 @@ do_install(){
 install -d ${D}${systemd_system_unitdir}
 install -m 0644 ${S}/examples/logrotate.service 
${D}${systemd_system_unitdir}/logrotate.service
 install -m 0644 ${S}/examples/logrotate.timer 
${D}${systemd_system_unitdir}/logrotate.timer
-sed -i -e 
's,OnCalendar=.*$,OnCalendar=${LOGROTATE_SYSTEMD_TIMER_BASIS},g' 
${D}${systemd_system_unitdir}/logrotate.timer
-sed -i -e 
's,AccuracySec=.*$,AccuracySec=${LOGROTATE_SYSTEMD_TIMER_ACCURACY},g' 
${D}${systemd_system_unitdir}/logrotate.timer
+[ -z "${LOGROTATE_OPTIONS}" ] ||
+sed -ri \
+-e 's|(ExecStart=.*/logrotate.*)$|\1 ${LOGROTATE_OPTIONS}|g' \
+${D}${systemd_system_unitdir}/logrotate.service
+sed -ri \
+-e 's|(OnCalendar=).*$|\1${LOGROTATE_SYSTEMD_TIMER_BASIS}|g' \
+-e 's|(AccuracySec=).*$|\1${LOGROTATE_SYSTEMD_TIMER_ACCURACY}|g' \
+-e 's|(Persistent=).*$|\1${LOGROTATE_SYSTEMD_TIMER_PERSISTENT}|g' \
+${D}${systemd_system_unitdir}/logrotate.timer
 fi
 
 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', 
d)}; then
-- 
2.12.0

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


[OE-core] [PATCH] glibc: Check /etc/ld.so.conf.d/*.conf by default

2018-04-20 Thread Tom Rini
The expected modern behavior for dealing with adding ld.so.conf entries
is to add a file to /etc/ld.so.conf.d/.  In order to do this, ld.so.conf
needs to explicitly include that /etc/ld.so.conf.d/*.conf.  Make it so.

Cc: Khem Raj 
Signed-off-by: Tom Rini 
---
There's at least one example in meta-oe today that I suspect doesn't
work correctly today as we're missing this glob.  I'll also admit that
it's possible that we should create this file in do_install instead, in
the case where ldconfig is in DISTRO_FEATURES so that we use
${sysconfdir} rather than 'etc' directly.

My motivation here is to make it cleaner to deal with the nvidia drivers
as they drop stuff into /usr/lib/arm-linux-gnueabi/tegra and today
people have initscripts to whack /etc/ld.so.conf directly.
---
 meta/recipes-core/glibc/glibc/etc/ld.so.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/glibc/glibc/etc/ld.so.conf 
b/meta/recipes-core/glibc/glibc/etc/ld.so.conf
index e69de29bb2d1..83327c01bf52 100644
--- a/meta/recipes-core/glibc/glibc/etc/ld.so.conf
+++ b/meta/recipes-core/glibc/glibc/etc/ld.so.conf
@@ -0,0 +1 @@
+include /etc/ld.so.conf.d/*.conf
-- 
2.7.4

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


[OE-core] [PATCH V2 4/6] libunwind: Drop adding libssp to linker flags

2018-04-20 Thread Khem Raj
This is no longer needed as gcc provided libssp
is not built

Signed-off-by: Khem Raj 
---
Changes since v1:
- Rebased

 meta/recipes-support/libunwind/libunwind.inc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/recipes-support/libunwind/libunwind.inc 
b/meta/recipes-support/libunwind/libunwind.inc
index b9c532d3ad..36851d07ed 100644
--- a/meta/recipes-support/libunwind/libunwind.inc
+++ b/meta/recipes-support/libunwind/libunwind.inc
@@ -14,8 +14,6 @@ PACKAGECONFIG[latexdocs] = "--enable-documentation, 
--disable-documentation, lat
 EXTRA_OECONF_arm = "--enable-debug-frame"
 EXTRA_OECONF_aarch64 = "--enable-debug-frame"
 
-SECURITY_LDFLAGS_append_libc-musl = " -lssp_nonshared -lssp"
-
 do_install_append () {
oe_multilib_header libunwind.h
 }
-- 
2.17.0

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


[OE-core] [PATCH 6/6] llvm: Fix [compile-host-path] QA issue

2018-04-20 Thread Khem Raj
Its trying to build NATIVE llvm-config which is
already built with llvm-native so we do not need
to rebuild it

Drop setting NINJA_STATUS explicitly, its no longer
needed, on the contrary it hinders the task status
update

Signed-off-by: Khem Raj 
---
Changes since v1:
- Rebased

 ...able-generating-a-native-llvm-config.patch | 41 +++
 meta/recipes-devtools/llvm/llvm_git.bb|  7 ++--
 2 files changed, 45 insertions(+), 3 deletions(-)
 create mode 100644 
meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch

diff --git 
a/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch
 
b/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch
new file mode 100644
index 00..2809e4c594
--- /dev/null
+++ 
b/meta/recipes-devtools/llvm/llvm/0001-Disable-generating-a-native-llvm-config.patch
@@ -0,0 +1,41 @@
+From 7f7743ce233fcd735ec580c75270413493658aa6 Mon Sep 17 00:00:00 2001
+From: Khem Raj 
+Date: Thu, 19 Apr 2018 18:08:31 -0700
+Subject: [PATCH] Disable generating a native llvm-config
+
+OpenEmbedded already builds this as part of llvm-native
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj 
+---
+ tools/llvm-config/CMakeLists.txt | 16 
+ 1 file changed, 16 deletions(-)
+
+diff --git a/tools/llvm-config/CMakeLists.txt 
b/tools/llvm-config/CMakeLists.txt
+index 25f99cec978..c45e9b642a8 100644
+--- a/tools/llvm-config/CMakeLists.txt
 b/tools/llvm-config/CMakeLists.txt
+@@ -63,19 +63,3 @@ endif()
+ 
+ # Add the dependency on the generation step.
+ add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp 
${BUILDVARIABLES_OBJPATH})
+-
+-if(CMAKE_CROSSCOMPILING)
+-  set(${project}_LLVM_CONFIG_EXE "${LLVM_NATIVE_BUILD}/bin/llvm-config")
+-  set(${project}_LLVM_CONFIG_EXE ${${project}_LLVM_CONFIG_EXE} PARENT_SCOPE)
+-
+-  add_custom_command(OUTPUT "${${project}_LLVM_CONFIG_EXE}"
+-COMMAND ${CMAKE_COMMAND} --build . --target llvm-config --config 
$
+-DEPENDS ${LLVM_NATIVE_BUILD}/CMakeCache.txt
+-WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
+-COMMENT "Building native llvm-config..."
+-USES_TERMINAL)
+-  add_custom_target(${project}NativeLLVMConfig DEPENDS 
${${project}_LLVM_CONFIG_EXE})
+-  add_dependencies(${project}NativeLLVMConfig CONFIGURE_LLVM_NATIVE)
+-
+-  add_dependencies(llvm-config ${project}NativeLLVMConfig)
+-endif(CMAKE_CROSSCOMPILING)
+-- 
+2.17.0
+
diff --git a/meta/recipes-devtools/llvm/llvm_git.bb 
b/meta/recipes-devtools/llvm/llvm_git.bb
index 77c095d9a3..cb3bba6fab 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -26,6 +26,7 @@ PATCH_VERSION = "0"
 SRC_URI = 
"git://github.com/llvm-mirror/llvm.git;branch=${BRANCH};protocol=http \

file://0001-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch \
file://0002-llvm-allow-env-override-of-exe-path.patch \
+   file://0001-Disable-generating-a-native-llvm-config.patch \
   "
 UPSTREAM_CHECK_COMMITS = "1"
 S = "${WORKDIR}/git"
@@ -85,15 +86,15 @@ do_configure_prepend() {
 }
 
 do_compile() {
-   NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE}
+   ninja -v ${PARALLEL_MAKE}
 }
 
 do_compile_class-native() {
-   NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
+   ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
 }
 
 do_install() {
-   NINJA_STATUS="[%p] " DESTDIR=${LLVM_INSTALL_DIR} ninja -v install
+   DESTDIR=${LLVM_INSTALL_DIR} ninja -v install
install -D -m 0755 ${B}/bin/llvm-config 
${D}${libdir}/${LLVM_DIR}/llvm-config
 
install -d ${D}${bindir}/${LLVM_DIR}
-- 
2.17.0

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


[OE-core] [PATCH V3 5/6] musl: Upgrade to latest

2018-04-20 Thread Khem Raj
Changes are here

https://git.musl-libc.org/cgit/musl/log/?qt=range=55df09bfccbfe21fc9dd7d8f94550c0ff25ace04..618b18c78e33acfe54a4434e91aa57b8e171df89

Signed-off-by: Khem Raj 
---
Changes since v2:
- Rebased

 meta/recipes-core/musl/musl_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/musl/musl_git.bb 
b/meta/recipes-core/musl/musl_git.bb
index a57460ddd2..01fec69aeb 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -3,7 +3,7 @@
 
 require musl.inc
 
-SRCREV = "55df09bfccbfe21fc9dd7d8f94550c0ff25ace04"
+SRCREV = "618b18c78e33acfe54a4434e91aa57b8e171df89"
 
 PV = "1.1.19+git${SRCPV}"
 
-- 
2.17.0

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


[OE-core] [PATCH V2 2/6] musl: Depend on libssp-nonshared

2018-04-20 Thread Khem Raj
libssp-nonshared is required on musl since
it does not implement the gcc runtime piece of
libssp, which actually it a gcc optimization to
reach to __stack_chk_fail

Signed-off-by: Khem Raj 
---
Changes since v1:
- Depend on libssp-noshared-staticdev

 meta/recipes-core/musl/musl_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/musl/musl_git.bb 
b/meta/recipes-core/musl/musl_git.bb
index 9f8c5126e8..a57460ddd2 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -22,6 +22,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}binutils \
libgcc-initial \
linux-libc-headers \
bsd-headers \
+   libssp-nonshared \
   "
 
 export CROSS_COMPILE="${TARGET_PREFIX}"
@@ -65,7 +66,7 @@ do_install() {
done
 }
 
-RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev"
+RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev 
libssp-nonshared-staticdev"
 RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
 RPROVIDES_${PN} += "ldd libsegfault rtld(GNU_HASH)"
 
-- 
2.17.0

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


[OE-core] [PATCH v3 3/6] gcc-runtime: Disable gcc version of libssp

2018-04-20 Thread Khem Raj
libssp is implemented fully in glibc as well as in musl
so we really do not need the gcc version of this library
except may be for mingw, where we keep it enabled anyway
gcc in OE is built with the knowledge that C library
already provides libssp implementation, we should therefore
not need the gcc implementation of same.

libssp_nonshared piece is a detail which is needed when gcc
is the compiler, in glibc this is part of libc_nonshared.a
already and libc_nonshared.a is linked always when linking
with -lc becuase libc.so in glibc is actually a linker script

GROUP ( /usr/lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( 
/usr/lib/ld-linux-x86-64.so.2 ) )

which automatically links in the needed runtime bits, this however
is not the case for musl, where core SSP APIs are implemented in full
but compiler specific runtime isn't, for this we add a new package
called libssp_nonshared which generate the needed runtime stub
and gcc is already carrying patch to link to libssp_nonshared.a
on musl

This should fix a long standing problem where static PIE executable
were not buildable with OE since it was conflicting SSP implementation
one from C library and the other one from gcc and we end up with
duplicate symbol errors during linking.

Backport a patch from trunk which enhances enable|disable-libssp
to not only disable building libssp but also not emit the gcc
specs to use it for subsequent linking when stack-protector options
are used on compiler cmdline

Signed-off-by: Khem Raj 
---
Changes since v2:
- None

 meta/recipes-devtools/gcc/gcc-7.3.inc |   7 +-
 ...cc-override-TARGET_LIBC_PROVIDES_SSP.patch | 204 ++
 meta/recipes-devtools/gcc/gcc-runtime.inc |   4 +-
 3 files changed, 212 insertions(+), 3 deletions(-)
 create mode 100644 
meta/recipes-devtools/gcc/gcc-7.3/0049-gcc-override-TARGET_LIBC_PROVIDES_SSP.patch

diff --git a/meta/recipes-devtools/gcc/gcc-7.3.inc 
b/meta/recipes-devtools/gcc/gcc-7.3.inc
index d968c322d2..98e5383b3c 100644
--- a/meta/recipes-devtools/gcc/gcc-7.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-7.3.inc
@@ -72,6 +72,7 @@ SRC_URI = "\
file://0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
file://0047-sync-gcc-stddef.h-with-musl.patch \
file://0048-gcc-Enable-static-PIE.patch \
+   file://0049-gcc-override-TARGET_LIBC_PROVIDES_SSP.patch \
file://fix-segmentation-fault-precompiled-hdr.patch \
file://no-sse-fix-test-case-failures.patch \
${BACKPORTS} \
@@ -93,10 +94,12 @@ FORTRAN = ""
 JAVA = ""
 
 LTO = "--enable-lto"
+SSP ?= "--disable-libssp"
+SSP_mingw = "--enable-libssp"
 
 EXTRA_OECONF_BASE = "\
 ${LTO} \
---enable-libssp \
+${SSP} \
 --enable-libitm \
 --disable-bootstrap \
 --disable-libmudflap \
@@ -120,7 +123,7 @@ EXTRA_OECONF_INITIAL = "\
 --disable-plugin \
 --enable-decimal-float=no \
 --without-isl \
-gcc_cv_libc_provides_ssp=yes \
+${SSP} \
 "
 
 EXTRA_OECONF_PATHS = "\
diff --git 
a/meta/recipes-devtools/gcc/gcc-7.3/0049-gcc-override-TARGET_LIBC_PROVIDES_SSP.patch
 
b/meta/recipes-devtools/gcc/gcc-7.3/0049-gcc-override-TARGET_LIBC_PROVIDES_SSP.patch
new file mode 100644
index 00..7c53c95c3a
--- /dev/null
+++ 
b/meta/recipes-devtools/gcc/gcc-7.3/0049-gcc-override-TARGET_LIBC_PROVIDES_SSP.patch
@@ -0,0 +1,204 @@
+From 9815bd97561c778ee0bc0c17f245e88e66570111 Mon Sep 17 00:00:00 2001
+From: sandra 
+Date: Wed, 1 Nov 2017 02:14:19 +
+Subject: [PATCH] 2017-10-31  Sandra Loosemore  
+
+   gcc/
+   * configure.ac (--enable-libssp): New.
+   (gcc_cv_libc_provides_ssp): Check for explicit setting before
+   trying to determine target-specific default.  Adjust indentation.
+   * configure: Regenerated.
+   * doc/install.texi (Configuration): Expand --disable-libssp
+   documentation.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254288 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+Signed-off-by: Khem Raj 
+Upstream-Status: Backport [https://patchwork.ozlabs.org/patch/823049/]
+
+ gcc/ChangeLog|  9 +
+ gcc/configure| 26 +++---
+ gcc/configure.ac | 24 
+ gcc/doc/install.texi |  3 ++-
+ 4 files changed, 54 insertions(+), 8 deletions(-)
+
+Index: gcc-7.3.0/gcc/configure.ac
+===
+--- gcc-7.3.0.orig/gcc/configure.ac
 gcc-7.3.0/gcc/configure.ac
+@@ -5719,10 +5719,25 @@ if test x$gcc_cv_solaris_crts = xyes; th
+   [Define if the system-provided CRTs are present on Solaris.])
+ fi
+ 
++AC_ARG_ENABLE(libssp,
++[AS_HELP_STRING([--enable-libssp], [enable linking against libssp])],
++[case "${enableval}" in
++  yes|no)
++;;
++  *)
++AC_MSG_ERROR([unknown libssp setting $enableval])
++;;
++esac], [])
++
+ # Test for stack 

[OE-core] [PATCH V2 1/6] libssp-nonshared: Add recipe

2018-04-20 Thread Khem Raj
libssp-nonshared is a minimal gcc runtime piece which is needed
on non-glibc systems which do implement libssp APIs in libc

Signed-off-by: Khem Raj 
---
Changes since v1:
- Package into staticdev package

 meta/recipes-core/musl/libssp-nonshared.bb| 39 
 .../musl/libssp-nonshared/ssp-local.c | 45 +++
 2 files changed, 84 insertions(+)
 create mode 100644 meta/recipes-core/musl/libssp-nonshared.bb
 create mode 100644 meta/recipes-core/musl/libssp-nonshared/ssp-local.c

diff --git a/meta/recipes-core/musl/libssp-nonshared.bb 
b/meta/recipes-core/musl/libssp-nonshared.bb
new file mode 100644
index 00..00a0a3d411
--- /dev/null
+++ b/meta/recipes-core/musl/libssp-nonshared.bb
@@ -0,0 +1,39 @@
+# Copyright (C) 2018 Khem Raj 
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Minimal libssp_nonshared.a must needed for ssp to work with gcc on 
musl"
+LICENSE = "GPL-3.0-with-GCC-exception"
+LIC_FILES_CHKSUM = 
"file://ssp-local.c;beginline=1;endline=32;md5=c06d391208c0cfcbc541a6728ed65cc4"
+SECTION = "libs"
+
+SRC_URI = "file://ssp-local.c"
+
+PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
+STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils \
+   virtual/${TARGET_PREFIX}gcc-initial \
+"
+
+do_configure[noexec] = "1"
+
+S = "${WORKDIR}"
+
+do_compile() {
+   ${CC} ${CPPFLAGS} ${CFLAGS} -c ssp-local.c -o ssp-local.o
+   ${AR} r libssp_nonshared.a ssp-local.o
+}
+do_install() {
+   install -Dm 0644 ${B}/libssp_nonshared.a 
${D}${base_libdir}/libssp_nonshared.a
+}
+#
+# We will skip parsing for non-musl systems
+#
+COMPATIBLE_HOST = ".*-musl.*"
+RDEPENDS_${PN}-staticdev = ""
+RDEPENDS_${PN}-dev = ""
+RRECOMMENDS_${PN}-dbg = "${PN}-staticdev (= ${EXTENDPKGV})"
diff --git a/meta/recipes-core/musl/libssp-nonshared/ssp-local.c 
b/meta/recipes-core/musl/libssp-nonshared/ssp-local.c
new file mode 100644
index 00..8f51afa2c1
--- /dev/null
+++ b/meta/recipes-core/musl/libssp-nonshared/ssp-local.c
@@ -0,0 +1,45 @@
+/* Stack protector support.
+   Copyright (C) 2005-2018 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+In addition to the permissions in the GNU General Public License, the
+Free Software Foundation gives you unlimited permission to link the
+compiled version of this file into combinations with other programs,
+and to distribute those combinations without any restriction coming
+from the use of this file.  (The General Public License restrictions
+do apply in other respects; for example, they cover modification of
+the file, and distribution when not linked into a combine
+executable.)
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+.  */
+
+extern void __stack_chk_fail (void);
+
+/* Some targets can avoid loading a GP for calls to hidden functions.
+   Using this entry point may avoid the load of a GP entirely for the
+   function, making the overall code smaller.  */
+
+void
+__attribute__((visibility ("hidden")))
+__stack_chk_fail_local (void)
+{
+  __stack_chk_fail ();
+}
-- 
2.17.0

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


[OE-core] [sumo][PATCH] Revert "icecc.bbclass: Improve error reporting"

2018-04-20 Thread Joshua Watt
This reverts commit b28114cf1e58643bd233bc0c83d6d8138952b7ac.

The "-E" option for flock is not ubiquitously supported, so don't use
it.

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

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 73eba7a6a96..0ca8de86c24 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -366,20 +366,14 @@ set_icecc_env() {
 
 # the ICECC_VERSION generation step must be locked by a mutex
 # in order to prevent race conditions
-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"
+if flock -n "${ICECC_VERSION}.lock" \
+${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 ]
+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] [PATCH] mtd-utils: add nanddump and nandwrite to ALTERNATIVE

2018-04-20 Thread liu . ming50
From: Ming Liu 

They are also being provided by busybox when CONFIG_NANDWRITE is
chosen.

Signed-off-by: Ming Liu 
---
 meta/recipes-devtools/mtd/mtd-utils_git.bb | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb 
b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index d09d633..d4ee999 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -28,10 +28,11 @@ CPPFLAGS_append_riscv64  = " -pthread -D_REENTRANT"
 
 EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} 
${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} 
-I${S}/include' 'BUILDDIR=${S}'"
 
-ALTERNATIVE_${PN} = "flash_eraseall"
+ALTERNATIVE_${PN} = "nanddump nandwrite flash_eraseall"
+ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump"
+ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite"
 ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
-# Use higher priority than busybox's flash_eraseall (created when built with 
CONFIG_FLASH_ERASEALL)
-ALTERNATIVE_PRIORITY[flash_eraseall] = "100"
+ALTERNATIVE_PRIORITY = "100"
 
 do_install () {
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} 
INCLUDEDIR=${includedir}
-- 
2.7.4

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


Re: [OE-core] [PATCH 07/22] glib-2.0: update to 2.56.0

2018-04-20 Thread Burton, Ross
This breaks when building for mingw, but 2.56.1 has the fixes so should work.

Ross

On 4 April 2018 at 12:13, Alexander Kanavin
 wrote:
> Remove upstreamed ptest-paths.patch
>
> Signed-off-by: Alexander Kanavin 
> ---
>  .../0001-Do-not-ignore-return-value-of-write.patch | 17 +---
>  .../glib-2.0/glib-2.0/ptest-paths.patch| 30 
> --
>  .../glib-2.0/glib-2.0/relocate-modules.patch   | 13 ++
>  .../{glib-2.0_2.54.3.bb => glib-2.0_2.56.0.bb} |  5 ++--
>  4 files changed, 17 insertions(+), 48 deletions(-)
>  delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch
>  rename meta/recipes-core/glib-2.0/{glib-2.0_2.54.3.bb => glib-2.0_2.56.0.bb} 
> (82%)
>
> diff --git 
> a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
>  
> b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
> index aee96aaa6e7..0ebf138d60a 100644
> --- 
> a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
> +++ 
> b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
> @@ -1,30 +1,30 @@
> -From d6501b107940e9f548c89236d773c6d33c15a5c9 Mon Sep 17 00:00:00 2001
> +From d250652782b65b071b7cc8f01f2db833df104e0e Mon Sep 17 00:00:00 2001
>  From: Khem Raj 
>  Date: Sat, 16 Apr 2016 13:28:59 -0700
> -Subject: [PATCH 1/2] Do not ignore return value of write()
> +Subject: [PATCH] Do not ignore return value of write()
>
>  gcc warns about ignoring return value when compiling
>  with fortify turned on.
>
>  assert when write() fails
>
> -Signed-off-by: Khem Raj 
> 
>  Upstream-Status: Submitted
> +Signed-off-by: Khem Raj 
>
> +---
>   glib/tests/unix.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
>  diff --git a/glib/tests/unix.c b/glib/tests/unix.c
> -index 3543458..4e7ed85 100644
> +index 9d55a6c..a07f945 100644
>  --- a/glib/tests/unix.c
>  +++ b/glib/tests/unix.c
>  @@ -32,14 +32,15 @@ test_pipe (void)
> GError *error = NULL;
> int pipefd[2];
> char buf[1024];
> --  ssize_t bytes_read;
> -+  ssize_t bytes_read, bytes_written;
> +-  gssize bytes_read;
> ++  gssize bytes_read, bytes_written;
> gboolean res;
>
> res = g_unix_open_pipe (pipefd, FD_CLOEXEC, );
> @@ -37,6 +37,3 @@ index 3543458..4e7ed85 100644
> memset (buf, 0, sizeof (buf));
> bytes_read = read (pipefd[0], buf, sizeof(buf) - 1);
> g_assert_cmpint (bytes_read, >, 0);
> ---
> -2.8.0
> -
> diff --git a/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch 
> b/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch
> deleted file mode 100644
> index f3be02770cb..000
> --- a/meta/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -Instead of writing the temporary mapping files in the mappedfile test to the
> -user runtime directory, write them to $TMP.  The runtime directory may not
> -currently exist if the test is executed on a non-desktop system and the test
> -doesn't attempt to create the directory structure.
> -
> -Upstream-Status: Pending
> -Signed-off-by: Ross Burton 
> -
> -diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c
> -index 40e0e60..27a24be 100644
>  a/glib/tests/mappedfile.c
> -+++ b/glib/tests/mappedfile.c
> -@@ -81,7 +81,7 @@ test_writable (void)
> -   const gchar *new = "abcdefghijklmnopqrstuvxyz";
> -   gchar *tmp_copy_path;
> -
> --  tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), 
> "glib-test-4096-random-bytes", NULL);
> -+  tmp_copy_path = g_build_filename (g_get_tmp_dir (), 
> "glib-test-4096-random-bytes", NULL);
> -
> -   g_file_get_contents (g_test_get_filename (G_TEST_DIST, 
> "4096-random-bytes", NULL), , , );
> -   g_assert_no_error (error);
> -@@ -125,7 +125,7 @@ test_writable_fd (void)
> -   int fd;
> -   gchar *tmp_copy_path;
> -
> --  tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), 
> "glib-test-4096-random-bytes", NULL);
> -+  tmp_copy_path = g_build_filename (g_get_tmp_dir (), 
> "glib-test-4096-random-bytes", NULL);
> -
> -   g_file_get_contents (g_test_get_filename (G_TEST_DIST, 
> "4096-random-bytes", NULL), , , );
> -   g_assert_no_error (error);
> diff --git a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch 
> b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
> index 65d5b43f9b6..d3d63b2cd15 100644
> --- a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
> +++ b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
> @@ -1,3 +1,8 @@
> +From 3edc9a063ceaf27129e0dd96a8be3942e3dd5e96 Mon Sep 17 00:00:00 2001
> +From: Ross Burton 
> +Date: Fri, 11 Mar 2016 15:35:55 +
> +Subject: [PATCH] glib-2.0: relocate the GIO module directory for native 
> builds
> +
>  Instead of hard-coding GIO_MODULE_PATH when 

Re: [OE-core] [PATCH] kernel-devsrc: fix cpio randomly hit insane file name

2018-04-20 Thread Bruce Ashfield

On 04/19/2018 11:19 PM, Hongxu Jia wrote:

Occasionally compile kernel-devsrc failed at world build.
...
|0 blocks
|cpio: ./tools/perf/arch/arm/util/sedr7ORqk: Cannot stat:
No such file or directory
|0 blocks
...
cpio tried to find a file at ${S}/tools/perf and failed
if the input list is not valid.

The reason is perf and kernel-devsrc have the same ${S},
Perf sed ${S}/tools/perf/* at do_configure, kernel-devsrc
cpio ${S} at do_install. The former task affects the latter
one, so let the latter depends the former to avoid the conflict.


While I have my devsrc rewrite ready to go for the 2.6 release
window, it would still suffer from this, so I'm making the same
change to the new recipe.

I do have a question though. Why not just add DEPENDS on perf ?
Won't that be the same, since it means the configure of this
recipe depends on the configure of perf ?

Cheers,

Bruce



Signed-off-by: Hongxu Jia 
---
  meta/recipes-kernel/linux/kernel-devsrc.bb | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb 
b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 8bbfa23..5ebeabc 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -18,6 +18,9 @@ inherit module-base
  do_install[depends] += "virtual/kernel:do_shared_workdir"
  # Need the source, not just the output of populate_sysroot
  do_install[depends] += "virtual/kernel:do_install"
+# Perf `sed ${S}/tools/perf/*' at do_configure, make sure it is done
+# before kernel-devsrc `cpio ${S}' at do_install
+do_install[depends] += "virtual/perf:do_configure"
  
  # There's nothing to do here, except install the source where we can package it

  do_fetch[noexec] = "1"



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


Re: [OE-core] 2.6 planning proposals and meeting

2018-04-20 Thread Daniel F. Dickinson

On 2018-04-19 12:17 PM, Richard Purdie wrote:

[Widely cross posted but please reply to openembedded-core only for
want of picking somewhere to discuss this]

The next big question facing us is what would we like to do in 2.6?
What can we do with the resources we have?

I'm proposing to hijack the next monthly Yocto Project technical
call[1] and dedicate it to 2.6 planning. I'm going to detail some high
level 'big' ideas blow in this email from a feature development
perspective. Anyone is welcome to join the call (or reply) and I'm
happy to answer questions about the ideas below and hear suggestions of
others.


Hi,

I'm relatively new to OE; I've written a couple of pre-alpha layers to 
try some idea, and worked on meta-openembedded, but I've not had a 
chance to go in depth on the Yocto documentation, and at the some there 
see to be things (based on the lists) that are out of date, or new 
things that aren't even mentioned, which makes getting up speed somewhat 
difficult.


In any even one thing that I'm wondering if is of interest, is modifying 
the build process to build an eSDK which is used to build everything 
else.  The advantage of this, in my view, is that it makes it easier to 
do things like use GitHub+Travis integration on individual recipes.


The biggest challenge for this type of per-recipe build is dealing with 
dependencies, but I think it would be helpful to get rid of 3-day+ world 
builds.


At the very least having a 'standard' binary eSDK for external layers to 
use for this purpose would helpful in my view.


I'm interested in working on this, but I don't think I've got a good 
enough handle on OE for making this a 2.6 goal from me.


Thoughts?

Daniel



[1] https://www.yoctoproject.org/monthly-technical-call/

Ultimately, ideas will be turned into bugzilla enhancement entries. It
will then be a case of seeing who is willing to step up and help work
on any given feature. We're using the "2.99" target milestone as our
holding area for potential ideas, only moving to 2.6 when we have a
solid commitment for someone to do something.

If nobody steps up for something, chances are it will just get pushed
out as a "Future" idea. In the past, Intel in particular has stepped up
and done a lot of feature work but for various reasons, this is not
likely to happen going forward as they focus more in Intel specific
work.

At the end of the day, we'll process the changes that make it onto the
mailing list by the freeze deadlines for the milestones. If its not
there, it won't be in the release and 2.6 will be what people put into
it.

List of high level 'big' ideas:

- Reference binary package feed (in particular to test upgrade paths)
-
Secure/trusted boot support in OE-Core
- Improved security tools (e.g.
CVE database scanning)
- Provide sstate feed out the box for reference
-
Improve binary output testing (esp. reproducibility, upgrade paths)
-
Widen the scope of our automated testing infrastructure (include
   more
layers)
- Roll processes and tooling into the wider ecosystem (e.g.
meta-
   openembedded)
- Ability to make builds more efficient by output
comparison and
   sstate prebuilt reuse in many more cases. Maybe sstate
equivalence
   server
- Completion of migration to new autobuilder
codebase and
   infrastructure
- Out of box experience/layer setup
tooling
- Improved binary reproducibility

Features aren't all we need to plan for. There are other areas that
need work/help:

Many other smaller features

   There are too many for me to list/call out individually but search
   bugzilla for 2.99 Medium+ items. A good example is adding
   support for inter-multiconfig dependencies which is a small
   remaining multiconfig item which would make a big difference to
   certain workflows.

   Another harder example is parallelisation of oe-selftest. Its
   currently the thing which ends up taking the longest in most of our
   builds, improving its performance would reduce overall testing times.

OE-Core Recipe maintenance: 840 recipes in OE-Core
   
   - General recipe

updates
   - Security fixes
   - Recipe specific bugs/regressions
   - Adapt
to new technologies/upstream changes

General patch review

   ~5000 commits/year which need review, testing, identifying
   regressions, merging

General regressions

   Regressions tests we have are good but don't catch every race
   condition or intermittent problem. We end up having to track
   down several, particularly runtime testing instability

Bug fixing user issues

   Users find new use cases and workflows and identify bugs which then
   need to be addressed

   For example we can't default to mem-res bitbake as there are known
  
issues.


Maintain the tools

   We directly maintain tools like bitbake, pseudo, devtool, recipetool
   opkg, yocto-autobuilder, patchwork+patchtest, wic

Stable release maintenance

   People all want stable releases and security fixes but someone has
   to make these happen.


Help in any and all of these 

Re: [OE-core] [PATCH] pseudo: use latest SRCREV

2018-04-20 Thread Seebs
On Fri, 20 Apr 2018 08:25:26 +
Martin Jansa  wrote:

> * the pseudo.log is significantly shorter with this revision

There's also an actually fairly significant bug fix in here. At one
point, long ago, I made a function that expands paths, and takes a flag
argument which may or may not be AT_SYMLINK_NOFOLLOW.

And then for openat(2), it gets called with "flags", whatever those are.

And it turns out that this means that any flag value other than 0
caused pseudo not to follow a terminal symlink when expanding path,
which caused a number of very strange problems. And mostly those got
corrected, but this should reduce errors.

The change to drop the usually-harmless "path mismatch [%d links]"
messages for N>1 is purely cosmetic, but we're talking about 4MB of
cosmetic messages in a glibc locale build...

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


[OE-core] [PATCH 2/2] linux-libc-headers: multilib_header asm/kvm_para.h and asm/bpf_perf_event.h

2018-04-20 Thread Chen Qi
When building SDK via populate_sdk for qemuarm64 with multilib
enabled, we would have conflict about bits/floatn.h at populate_sdk
time.

  file /usr/include/asm/bpf_perf_event.h conflicts between attempted installs 
of lib32-linux-libc-headers-dev-4.15.7-r0.armv7vehf_vfp and 
linux-libc-headers-dev-4.15.7-r0.aarch64
  file /usr/include/asm/kvm_para.h conflicts between attempted installs of 
lib32-linux-libc-headers-dev-4.15.7-r0.armv7vehf_vfp and 
linux-libc-headers-dev-4.15.7-r0.aarch64

Apply oe_multilib_header on these header files to fix the problem.

Signed-off-by: Chen Qi 
---
 meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc 
b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 1657df6..9903c06 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -78,7 +78,7 @@ do_install_append_arm () {
 }
 
 do_install_armmultilib () {
-   oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h 
asm/fcntl.h asm/hwcap.h asm/ioctls.h asm/kvm.h asm/mman.h asm/param.h 
asm/perf_regs.h
+   oe_multilib_header asm/auxvec.h asm/bitsperlong.h asm/byteorder.h 
asm/fcntl.h asm/hwcap.h asm/ioctls.h asm/kvm.h asm/kvm_para.h asm/mman.h 
asm/param.h asm/perf_regs.h asm/bpf_perf_event.h
oe_multilib_header asm/posix_types.h asm/ptrace.h  asm/setup.h  
asm/sigcontext.h asm/siginfo.h asm/signal.h asm/stat.h  asm/statfs.h asm/swab.h 
 asm/types.h asm/unistd.h
 }
 
-- 
1.9.1

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


[OE-core] [PATCH 1/2] glibc: use oe_multilib_header on bits/floatn.h

2018-04-20 Thread Chen Qi
When building SDK via populate_sdk for qemuarm64 with multilib
enabled, we would have conflict about bits/floatn.h at populate_sdk
time.

  file /usr/include/bits/floatn.h conflicts between attempted ins
talls of libc6-dev-2.27-r0.aarch64 and lib32-libc6-dev-2.27-r0.armv7vehf_vfp

Apply oe_multilib_header on this header file to fix the problem.

Signed-off-by: Chen Qi 
---
 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index ff45dfe..728bc53 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -66,7 +66,7 @@ do_install_append () {
rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
fi
 
-   oe_multilib_header bits/syscall.h bits/long-double.h
+   oe_multilib_header bits/syscall.h bits/long-double.h bits/floatn.h
 
if [ -f ${D}${bindir}/mtrace ]; then
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e 
'2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace
-- 
1.9.1

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


[OE-core] [PATCH 0/2] Use oe_multilib_headers to avoid header file conflicts

2018-04-20 Thread Chen Qi
The following changes since commit 71b4ae25612d6dd3687fdd583ed0077e744899cb:

  glib-2.0/glib.inc: fix broken mingw build (2018-04-20 08:19:46 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/multilib_headers
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/multilib_headers

Chen Qi (2):
  glibc: use oe_multilib_header on bits/floatn.h
  linux-libc-headers: multilib_header asm/kvm_para.h and
asm/bpf_perf_event.h

 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
1.9.1

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


[OE-core] [PATCH 1/1] multilib/bitbake.conf: default to contain MLPREFIX in RECIPE_SYSROOT

2018-04-20 Thread Chen Qi
We set RECIPE_SYSROOT to ${WORKDIR}/recipe-sysroot in bitbake.conf and
${WORKDIR}/${MLPREFIX}recipe-sysroot in multilib.conf.

The problem is about nativesdk recipes. MLPREFIX is set to "nativesdk-"
in nativesdk.bbclass. So if we don't include (or require) multilib.conf,
nativesdk recipe's RECIPE_SYSROOT is 'recipe-sysroot'; if we include (or
require) multilib.conf, its RECIPE_SYSROOT is 'nativesdk-recipe-sysroot'.

Just including multilib.conf or not would affect nativesdk reicpes
RECIPE_SYSROOT value. This is not reasonable. And in fact it sometimes
causes problem for us. When we change configuration about multilib
in the same build directory, we sometimes get the following build failure.

  ld: cannot find crtn.o: No such file or directory

Not only that, sometimes the manifest under sysroot-components of
nativesdk recipes have entries starting with 'recipe-sysroot', but
the actual files that should be removed are under 'nativesdk-recipe-sysroot'.
And that causes problem for prepare_recipe_sysroot task! Errors are like:

  Exception: FileExistsError: [Errno 17] File exists

So change RECIPE_SYSROOT to contain MLPREFIX by default. In this way,
nativesdk recipes would have their RECIPE_SYSROOT set to
nativesdk-recipe-sysroot. After all, changing MULTILIBS should not
affect this value for nativesdk recipe.

Signed-off-by: Chen Qi 
---
 meta/conf/bitbake.conf  | 2 +-
 meta/conf/multilib.conf | 4 
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 92aa944..7e5baec 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -368,7 +368,7 @@ B = "${S}"
 
 STAGING_DIR = "${TMPDIR}/sysroots"
 COMPONENTS_DIR = "${STAGING_DIR}-components"
-RECIPE_SYSROOT = "${WORKDIR}/recipe-sysroot"
+RECIPE_SYSROOT = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
 RECIPE_SYSROOT_NATIVE = "${WORKDIR}/recipe-sysroot-native"
 
 STAGING_DIR_NATIVE = "${RECIPE_SYSROOT_NATIVE}"
diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index e74dec8..fd6a868 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -6,10 +6,6 @@ MULTILIB_SAVE_VARNAME = "DEFAULTTUNE TARGET_ARCH TARGET_SYS 
TARGET_VENDOR"
 
 MULTILIBS ??= "multilib:lib32"
 
-STAGING_DIR_HOST = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
-STAGING_DIR_TARGET = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
-RECIPE_SYSROOT = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
-
 INHERIT += "multilib_global"
 
 BBCLASSEXTEND_append = " ${MULTILIBS}"
-- 
1.9.1

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


[OE-core] [PATCH 0/1] multilib/bitbake.conf: default to contain MLPREFIX in RECIPE_SYSROOT

2018-04-20 Thread Chen Qi
The following changes since commit 71b4ae25612d6dd3687fdd583ed0077e744899cb:

  glib-2.0/glib.inc: fix broken mingw build (2018-04-20 08:19:46 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/recipe-sysroot-mlprefix
  
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/recipe-sysroot-mlprefix

Chen Qi (1):
  multilib/bitbake.conf: default to contain MLPREFIX in RECIPE_SYSROOT

 meta/conf/bitbake.conf  | 2 +-
 meta/conf/multilib.conf | 4 
 2 files changed, 1 insertion(+), 5 deletions(-)

-- 
1.9.1

-- 
___
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-20 Thread Yeoh, Ee Peng
Richard,
Noted, thank you very much!
It was fine, QA team shall be able to manually trigger this selftest, at least 
it was more efficient than manually executing the testcase. 

Cheers,
Yeoh Ee Peng 

-Original Message-
From: Richard Purdie [mailto:richard.pur...@linuxfoundation.org] 
Sent: Friday, April 20, 2018 3:15 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 18:28 -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.
> 
> Signed-off-by: Yeoh Ee Peng 
> ---
>  meta/lib/oeqa/selftest/cases/runqemu.py | 70
> -
>  1 file changed, 68 insertions(+), 2 deletions(-)

The test is good however it fails on our infrastructure since portmap/rpcbind 
aren't running. This is a new dependency for the test infrastructure we'd have 
to document so I don't want to merge this for 2.5. 

Since the code itself is fine, instead I've merged the test but disabled the 
NFS test by default and we'll need to revisit this in 2.6 to enable it.

Cheers,

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


[OE-core] [PATCH] pseudo: use latest SRCREV

2018-04-20 Thread Martin Jansa
* the pseudo.log is significantly shorter with this revision

fddbe85 Fix symlink following errors
3a48dc4 Fix one more stray slash
691a230 Less chatty debugging
0c053e5 Change copyright default.

Signed-off-by: Martin Jansa 
---
 meta/recipes-devtools/pseudo/pseudo_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb 
b/meta/recipes-devtools/pseudo/pseudo_git.bb
index 09a3331d35..9103d49112 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -8,7 +8,7 @@ SRC_URI = "git://git.yoctoproject.org/pseudo \
file://toomanyfiles.patch \
"
 
-SRCREV = "19f18124f16c4c85405b140a1fb8cb3b31d865bf"
+SRCREV = "fddbe854c9db058d5a05830d3bcdd4233d95ee2e"
 S = "${WORKDIR}/git"
 PV = "1.9.0+git${SRCPV}"
 
-- 
2.17.0

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


Re: [OE-core] [PATCH] package: Fix PACKAGELOCK handling

2018-04-20 Thread Martin Jansa
Now with pseudo log files a bit smaller this package-output.lock seems to
be most common "issue" reported with do_qa_pseudo.

e.g.:
libao-1.2.0: This /work/i586-oe-linux-musl/libao/1.2.0-r0/pseudo/pseudo.log
indicates 16 errors [qa-pseudo]
see grep -e '^creat ignored for existing file' -e '^creat for.*replaces
existing'
/home/jenkins/oe/world/shr-core/tmpfs/work/i586-oe-linux-musl/libao/1.2.0-r0/pseudo/pseudo.log
or grep -v '^path mismatch'
/home/jenkins/oe/world/shr-core/tmpfs/work/i586-oe-linux-musl/libao/1.2.0-r0/pseudo/pseudo.log:
debug_logfile: fd 2
pid 4165 [parent 4160], doing new pid setup and server start
Setup complete, sending SIGUSR1 to pid 4160.
db cleanup for server shutdown, 01:43:56.829
memory-to-file backup complete, 01:43:56.830.
db cleanup finished, 01:43:56.830
debug_logfile: fd 2
pid 11266 [parent 11265], doing new pid setup and server start
Setup complete, sending SIGUSR1 to pid 11265.
inode mismatch:
'/home/jenkins/oe/world/shr-core/tmpfs/sysroots/package-output.lock' ino
346594 in db, 347812 in request.
creat ignored for existing file
'/home/jenkins/oe/world/shr-core/tmpfs/sysroots/package-output.lock'.
inode mismatch:
'/home/jenkins/oe/world/shr-core/tmpfs/sysroots/package-output.lock' ino
346594 in db, 347812 in request.
inode mismatch:
'/home/jenkins/oe/world/shr-core/tmpfs/sysroots/package-output.lock' ino
346594 in db, 347812 in request.
inode mismatch:
'/home/jenkins/oe/world/shr-core/tmpfs/sysroots/package-output.lock' ino
346594 in db, 347812 in request.
inode mismatch:
'/home/jenkins/oe/world/shr-core/tmpfs/sysroots/package-output.lock' ino
346594 in db, 347812 in request.
inode mismatch:
'/home/jenkins/oe/world/shr-core/tmpfs/sysroots/package-output.lock' ino
346594 in db, 347812 in request.
 [qa-pseudo]

shown in last world build:
http://jenkins.nas-admin.org/view/OE/job/oe_world_qemux86/760/console

I have no idea how to resolve this one as it needs to be global and shared
between many pseudo databases.

Any idea?

On Fri, Apr 20, 2018 at 9:25 AM, Richard Purdie <
richard.pur...@linuxfoundation.org> wrote:

> PACKAGELOCK is there to protect readers of PKGDATA_DIR from writes and
> files
> changing whilst they're being read. With various changes to the codebase,
> the lock code has become confused as the files are now written by the
> sstate
> code in do_packagedata, not in do_package directly any longer.
>
> This change cleans up the code so read sites take the shared lock
> (anything in
> do_package), write sites take the full lock (do_packagedata sstate).
>
> The lock from do_package sstate is no longer needed since it doesn't write
> outside WORKDIR.
>
> Signed-off-by: Richard Purdie 
> ---
>  meta/classes/package.bbclass | 11 ++-
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 0436d91..e03d450 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1615,7 +1615,7 @@ python package_do_shlibs() {
>  shlibswork_dir = d.getVar('SHLIBSWORKDIR')
>
>  # Take shared lock since we're only reading, not writing
> -lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
> +lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
>
>  def linux_so(file, needed, sonames, renames, pkgver):
>  needs_ldconfig = False
> @@ -1900,7 +1900,7 @@ python package_do_pkgconfig () {
>  pkgconfig_needed[pkg] += exp.replace(',',
> ' ').split()
>
>  # Take shared lock since we're only reading, not writing
> -lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
> +lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
>
>  for pkg in packages.split():
>  pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")
> @@ -2233,11 +2233,9 @@ do_package[dirs] = "${SHLIBSWORKDIR} ${PKGDESTWORK}
> ${D}"
>  do_package[vardeps] += "${PACKAGEBUILDPKGD} ${PACKAGESPLITFUNCS}
> ${PACKAGEFUNCS} ${@gen_packagevar(d)}"
>  addtask package after do_install
>
> -PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
>  SSTATETASKS += "do_package"
>  do_package[cleandirs] = "${PKGDEST} ${PKGDESTWORK}"
>  do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}"
> -do_package[sstate-lockfile-shared] = "${PACKAGELOCK}"
>  do_package_setscene[dirs] = "${STAGING_DIR}"
>
>  python do_package_setscene () {
> @@ -2252,9 +2250,12 @@ do_packagedata () {
>  addtask packagedata before do_build after do_package
>
>  SSTATETASKS += "do_packagedata"
> +# PACKAGELOCK protects readers of PKGDATA_DIR against writes
> +# whilst code is reading in do_package
> +PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
>  do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}"
>  do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}"
> -do_packagedata[sstate-lockfile-shared] = "${PACKAGELOCK}"
> +do_packagedata[sstate-lockfile] = "${PACKAGELOCK}"
>  do_packagedata[stamp-extra-info] = "${MACHINE_ARCH}"
>
>  

Re: [OE-core] [PATCH v3] udev-extraconf: Add systemd-mount to udev-extraconf/mount.sh

2018-04-20 Thread Hongzhi, Song

ping ..

// Hongzhi


On 2018年04月17日 15:03, Hongzhi.Song wrote:

Udev-extraconf works correctly with sysvinit in the aspect of automounting
block devices. But it has a serious problem in case of systemd. Block devices
automounted by udev is unaccessible to host space(out of udevd's private
namespace). For example, we cannot format those block devices.

e.g.
 root@qemux86:~# mkfs.ext4 /dev/sda1
 mke2fs 1.43.8 (1-Jan-2018)
 /dev/sda1 contains a ext4 file system
 last mounted on Tue Apr  3 06:22:41 2018
 Proceed anyway? (y,N) y
 /dev/sda1 is apparently in use by the system; will not make a filesystem 
here!

Other distributions has no such problem, because they use a series of rules to
manager block devices. Different types of block devices match different rules.
But udev-extraconf just use one rule, automount.rules, which results in this
problem.

The 'systemd-mount' command is recommended by the systemd community to solve 
such
problems.

This patch makes use of 'systemd-mount' to solve the above problem.

[YOCTO #12644]

Signed-off-by: Hongzhi.Song 
---
  meta/recipes-core/udev/udev-extraconf/mount.sh | 83 --
  meta/recipes-core/udev/udev-extraconf_1.1.bb   |  3 +
  2 files changed, 69 insertions(+), 17 deletions(-)

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh 
b/meta/recipes-core/udev/udev-extraconf/mount.sh
index d760328..067d4e2 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -4,10 +4,28 @@
  #
  # Attempt to mount any added block devices and umount any removed devices
  
+BASE_INIT="`readlink "@base_sbindir@/init"`"

+INIT_SYSTEMD="@systemd_unitdir@/systemd"
+
+if [ "x$BASE_INIT" = "x$INIT_SYSTEMD" ];then
+# systemd as init uses systemd-mount to mount block devices
+MOUNT="/usr/bin/systemd-mount"
+UMOUNT="/usr/bin/systemd-umount"
+
+if [ -x $MOUNT ] && [ -x $UMOUNT ];
+then
+logger "Using systemd-mount to finish mount"
+else
+logger "Linux init is using systemd, so please install systemd-mount to 
finish mount"
+exit 1
+fi
+else
+MOUNT="/bin/mount"
+UMOUNT="/bin/umount"
+fi
  
-MOUNT="/bin/mount"

  PMOUNT="/usr/bin/pmount"
-UMOUNT="/bin/umount"
+
  for line in `grep -h -v ^# /etc/udev/mount.blacklist 
/etc/udev/mount.blacklist.d/*`
  do
if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ];
@@ -17,7 +35,35 @@ do
fi
  done
  
-automount() {	

+automount_systemd() {
+name="`basename "$DEVNAME"`"
+
+[ -d "/run/media/$name" ] || mkdir -p "/run/media/$name"
+
+MOUNT="$MOUNT -o silent"
+
+# If filesystemtype is vfat, change the ownership group to 'disk', and
+# grant it with  w/r/x permissions.
+case $ID_FS_TYPE in
+vfat|fat)
+MOUNT="$MOUNT -o umask=007,gid=`awk -F':' '/^disk/{print $3}' 
/etc/group`"
+;;
+# TODO
+*)
+;;
+esac
+
+if ! $MOUNT --no-block -t auto $DEVNAME "/run/media/$name"
+then
+#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/run/media/$name\" 
failed!"
+rm_dir "/run/media/$name"
+else
+logger "mount.sh/automount" "Auto-mount of [/run/media/$name] 
successful"
+touch "/tmp/.automount-$name"
+fi
+}
+
+automount() {
name="`basename "$DEVNAME"`"
  
  	! test -d "/run/media/$name" && mkdir -p "/run/media/$name"

@@ -26,7 +72,7 @@ automount() {
then
MOUNT="$MOUNT -o silent"
fi
-   
+
# If filesystem type is vfat, change the ownership group to 'disk', and
# grant it with  w/r/x permissions.
case $ID_FS_TYPE in
@@ -68,23 +114,26 @@ if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n 
"$ID_FS_TYPE" -o "$media_t
elif [ -x $MOUNT ]; then
$MOUNT $DEVNAME 2> /dev/null
fi
-   
+
# If the device isn't mounted at this point, it isn't
# configured in fstab (note the root filesystem can show up as
# /dev/root in /proc/mounts, so check the device number too)
-   if expr $MAJOR "*" 256 + $MINOR != `stat -c %d /`; then
-   grep -q "^$DEVNAME " /proc/mounts || automount
-   fi
+if expr $MAJOR "*" 256 + $MINOR != `stat -c %d /`; then
+if [ "`basename $MOUNT`" = "systemd-mount" ];then
+grep -q "^$DEVNAME " /proc/mounts || automount_systemd
+else
+grep -q "^$DEVNAME " /proc/mounts || automount
+fi
+fi
  fi
  
-

  if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [ -n 
"$DEVNAME" ]; then
-   for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
-   do
-   $UMOUNT $mnt
-   done
-   
-   # Remove empty directories from auto-mounter
-   name="`basename "$DEVNAME"`"
-   test -e "/tmp/.automount-$name" && rm_dir "/run/media/$name"
+for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 

[OE-core] [PATCH] image_types_wic: add do_image_wic before do_image_complete

2018-04-20 Thread liu . ming50
From: Ming Liu 

We have some tasks depending on image's do_image_complete task, and we
are also using WKS files to generate partitioned images, but now there
is lacking a inter dependency between do_image_wic and
do_image_complete, so we have to depend on both of them.

Fixed by adding the dependency.

Signed-off-by: Ming Liu 
---
 meta/classes/image_types_wic.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/image_types_wic.bbclass 
b/meta/classes/image_types_wic.bbclass
index dcf620c..5b40a9e 100644
--- a/meta/classes/image_types_wic.bbclass
+++ b/meta/classes/image_types_wic.bbclass
@@ -102,6 +102,7 @@ python () {
 # a variable and let the metadata deal with the deps.
 d.setVar('_WKS_TEMPLATE', body)
 bb.build.addtask('do_write_wks_template', 'do_image_wic', 
None, d)
+bb.build.addtask('do_image_wic', 'do_image_complete', None, d)
 }
 
 #
-- 
2.7.4

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


[OE-core] [PATCH] package: Fix PACKAGELOCK handling

2018-04-20 Thread Richard Purdie
PACKAGELOCK is there to protect readers of PKGDATA_DIR from writes and files
changing whilst they're being read. With various changes to the codebase,
the lock code has become confused as the files are now written by the sstate
code in do_packagedata, not in do_package directly any longer.

This change cleans up the code so read sites take the shared lock (anything in
do_package), write sites take the full lock (do_packagedata sstate).

The lock from do_package sstate is no longer needed since it doesn't write
outside WORKDIR.

Signed-off-by: Richard Purdie 
---
 meta/classes/package.bbclass | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 0436d91..e03d450 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1615,7 +1615,7 @@ python package_do_shlibs() {
 shlibswork_dir = d.getVar('SHLIBSWORKDIR')
 
 # Take shared lock since we're only reading, not writing
-lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
+lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
 
 def linux_so(file, needed, sonames, renames, pkgver):
 needs_ldconfig = False
@@ -1900,7 +1900,7 @@ python package_do_pkgconfig () {
 pkgconfig_needed[pkg] += exp.replace(',', ' 
').split()
 
 # Take shared lock since we're only reading, not writing
-lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
+lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
 
 for pkg in packages.split():
 pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")
@@ -2233,11 +2233,9 @@ do_package[dirs] = "${SHLIBSWORKDIR} ${PKGDESTWORK} ${D}"
 do_package[vardeps] += "${PACKAGEBUILDPKGD} ${PACKAGESPLITFUNCS} 
${PACKAGEFUNCS} ${@gen_packagevar(d)}"
 addtask package after do_install
 
-PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
 SSTATETASKS += "do_package"
 do_package[cleandirs] = "${PKGDEST} ${PKGDESTWORK}"
 do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}"
-do_package[sstate-lockfile-shared] = "${PACKAGELOCK}"
 do_package_setscene[dirs] = "${STAGING_DIR}"
 
 python do_package_setscene () {
@@ -2252,9 +2250,12 @@ do_packagedata () {
 addtask packagedata before do_build after do_package
 
 SSTATETASKS += "do_packagedata"
+# PACKAGELOCK protects readers of PKGDATA_DIR against writes
+# whilst code is reading in do_package
+PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
 do_packagedata[sstate-inputdirs] = "${PKGDESTWORK}"
 do_packagedata[sstate-outputdirs] = "${PKGDATA_DIR}"
-do_packagedata[sstate-lockfile-shared] = "${PACKAGELOCK}"
+do_packagedata[sstate-lockfile] = "${PACKAGELOCK}"
 do_packagedata[stamp-extra-info] = "${MACHINE_ARCH}"
 
 python do_packagedata_setscene () {
-- 
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-20 Thread Richard Purdie
On Mon, 2018-04-09 at 18:28 -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.
> 
> Signed-off-by: Yeoh Ee Peng 
> ---
>  meta/lib/oeqa/selftest/cases/runqemu.py | 70
> -
>  1 file changed, 68 insertions(+), 2 deletions(-)

The test is good however it fails on our infrastructure since
portmap/rpcbind aren't running. This is a new dependency for the test
infrastructure we'd have to document so I don't want to merge this for
2.5. 

Since the code itself is fine, instead I've merged the test but
disabled the NFS test by default and we'll need to revisit this in 2.6
to enable it.

Cheers,

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


Re: [OE-core] [PATCH v2] package.bbclass: Include dbgsrc for static libs

2018-04-20 Thread Richard Purdie
On Thu, 2018-04-19 at 13:17 +0200, Ola x Nilsson wrote:
> The debugsource must be added from the package providing the static
> lib, because any package using that lib does not have access to the
> source code.
> 
> Fixes [YOCTO #12558]
> 
> Signed-off-by: Ola x Nilsson 
> ---
>  meta/classes/package.bbclass | 44 
> 
>  1 file changed, 32 insertions(+), 12 deletions(-)

I messed up and accidentally merged this onto OE-Core early and then we
had test failures on mingw. 

To resolve that I've added a tweak to disable this on mingw since it
doesn't work there.

Cheers,

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