[OE-core] [PATCH] perl/tcl: fix /usr/share/man/man3/Thread.3 conflicts

2019-12-20 Thread Hongxu Jia
While installing perl-doc and tcl-doc to image, there is a file conflicts
at do_rootfs
...
|file /usr/share/man/man3/Thread.3 conflicts between attempted installs of
perl-doc-5.30.1-r0.core2_64 and tcl-doc-8.6.10-r0.core2_64
...

Use update-alternatives to fix

Signed-off-by: Hongxu Jia 
---
 meta/recipes-devtools/perl/perl_5.30.1.bb | 6 +-
 meta/recipes-devtools/tcltk/tcl_8.6.10.bb | 5 -
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/perl/perl_5.30.1.bb 
b/meta/recipes-devtools/perl/perl_5.30.1.bb
index 9b1f1af..6e0b200 100644
--- a/meta/recipes-devtools/perl/perl_5.30.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.30.1.bb
@@ -32,7 +32,7 @@ SRC_URI[perl-cross.sha256sum] = 
"edce0b0c2f725e2db3f203d6d8e9f3f7161256f5d159055
 
 S = "${WORKDIR}/perl-${PV}"
 
-inherit upstream-version-is-even
+inherit upstream-version-is-even update-alternatives
 
 DEPENDS += "zlib virtual/crypt"
 
@@ -240,6 +240,10 @@ FILES_${PN}-module-cpan += "${libdir}/perl5/${PV}/CPAN \
   "
 FILES_${PN}-module-unicore += "${libdir}/perl5/${PV}/unicore"
 
+ALTERNATIVE_PRIORITY = "40"
+ALTERNATIVE_${PN}-doc = "Thread.3"
+ALTERNATIVE_LINK_NAME[Thread.3] = "${mandir}/man3/Thread.3"
+
 # Create a perl-modules package recommending all the other perl
 # packages (actually the non modules packages and not created too)
 ALLOW_EMPTY_${PN}-modules = "1"
diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.10.bb 
b/meta/recipes-devtools/tcltk/tcl_8.6.10.bb
index 284f20e..aedd96b 100644
--- a/meta/recipes-devtools/tcltk/tcl_8.6.10.bb
+++ b/meta/recipes-devtools/tcltk/tcl_8.6.10.bb
@@ -34,7 +34,7 @@ S = "${WORKDIR}/${BPN}${PV}/unix"
 
 VER = "${PV}"
 
-inherit autotools ptest binconfig
+inherit autotools ptest binconfig update-alternatives
 
 EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}"
 
@@ -65,6 +65,9 @@ FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
 FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8"
 FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh"
 
+ALTERNATIVE_${PN}-doc = "Thread.3"
+ALTERNATIVE_LINK_NAME[Thread.3] = "${mandir}/man3/Thread.3"
+
 # isn't getting picked up by shlibs code
 RDEPENDS_${PN} += "tcl-lib"
 RDEPENDS_${PN}_class-native = ""
-- 
2.7.4

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


[OE-core] [PATCH V2] kbd: avoid vlock conflict with busybox

2019-12-13 Thread Hongxu Jia
busybox as well as vlock utility from meta-oe provides vlock utility
which can conflict when with kbd if pam is a enabled distro_feature

Fixes image build errors

update-alternatives: Error: not linking /usr/bin/vlock to 
/bin/busybox.suid since /usr/bin/vlock exists and is not a link

ERROR: yoe-qt5-wayland-image-1.0-r0 do_rootfs: Postinstall scriptlets of 
['busybox'] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget_${PN} ().
Deferring to first boot via 'exit 1' is no longer supported.

Signed-off-by: Khem Raj 

The vlock doesn't exist if PAM isn't enabled.

Signed-off-by: Hongxu Jia 
---
 meta/recipes-core/kbd/kbd_2.2.0.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/kbd/kbd_2.2.0.bb 
b/meta/recipes-core/kbd/kbd_2.2.0.bb
index 9556302..f252161 100644
--- a/meta/recipes-core/kbd/kbd_2.2.0.bb
+++ b/meta/recipes-core/kbd/kbd_2.2.0.bb
@@ -61,7 +61,8 @@ RDEPENDS_${PN}-ptest = "make"
 
 inherit update-alternatives
 
-ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey"
+ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'vlock','', d)}"
 ALTERNATIVE_PRIORITY = "100"
 
 BBCLASSEXTEND = "native"
-- 
2.7.4

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


[OE-core] [PATCH] assimp: fix search library failed on multilib

2019-12-12 Thread Hongxu Jia
While multilib enabled, it builds vulkan-demos failed
...
|CMake Error at tmp-glibc/work/aarch64-wrs-linux/vulkan-demos/git-r0/
recipe-sysroot/usr/lib64/cmake/assimp-5.0/assimpTargets.cmake:85 (message):
|  The imported target "assimp::assimp" references the file
| 
"tmp-glibc/work/aarch64-wrs-linux/vulkan-demos/git-r0/recipe-sysroot/usr/lib/libassimp.so.5"
|  but this file does not exist.  Possible reasons include:
...

Since oe-core set ASSIMP_LIB_INSTALL_DIR to baselib, use it rather than
hardcoded `/lib' to search library

Signed-off-by: Hongxu Jia 
---
 ...MP_LIB_INSTALL_DIR-to-search-library.patch | 70 +++
 meta/recipes-graphics/vulkan/assimp_5.0.0.bb  |  1 +
 2 files changed, 71 insertions(+)
 create mode 100644 
meta/recipes-graphics/vulkan/assimp/0001-Use-ASSIMP_LIB_INSTALL_DIR-to-search-library.patch

diff --git 
a/meta/recipes-graphics/vulkan/assimp/0001-Use-ASSIMP_LIB_INSTALL_DIR-to-search-library.patch
 
b/meta/recipes-graphics/vulkan/assimp/0001-Use-ASSIMP_LIB_INSTALL_DIR-to-search-library.patch
new file mode 100644
index 00..3e9fbec701
--- /dev/null
+++ 
b/meta/recipes-graphics/vulkan/assimp/0001-Use-ASSIMP_LIB_INSTALL_DIR-to-search-library.patch
@@ -0,0 +1,70 @@
+From dd5c10f660716a2fab513714245be1932003306b Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Thu, 12 Dec 2019 22:16:15 -0800
+Subject: [PATCH] Use ASSIMP_LIB_INSTALL_DIR to search library
+
+Use ASSIMP_LIB_INSTALL_DIR rather than hardcoded /lib to search library
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ assimpTargets-release.cmake.in | 16 
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/assimpTargets-release.cmake.in b/assimpTargets-release.cmake.in
+index b09b881f..5c6999fe 100644
+--- a/assimpTargets-release.cmake.in
 b/assimpTargets-release.cmake.in
+@@ -42,11 +42,11 @@ if(MSVC)
+ # Import target "assimp::assimp" for configuration "Release"
+ set_property(TARGET assimp::assimp APPEND PROPERTY 
IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(assimp::assimp PROPERTIES
+-  IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/${importLibraryName}"
++  IMPORTED_IMPLIB_RELEASE 
"${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${importLibraryName}"
+   IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/${sharedLibraryName}"
+ )
+ list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
+-list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
"${_IMPORT_PREFIX}/lib/${importLibraryName}")
++list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
"${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${importLibraryName}")
+ list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
"${_IMPORT_PREFIX}/bin/${sharedLibraryName}" )
+   else()
+ set(staticLibraryName 
"assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@")
+@@ -54,10 +54,10 @@ if(MSVC)
+ # Import target "assimp::assimp" for configuration "Release"
+ set_property(TARGET assimp::assimp APPEND PROPERTY 
IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(assimp::assimp PROPERTIES
+-  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${staticLibraryName}"
++  IMPORTED_LOCATION_RELEASE 
"${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${staticLibraryName}"
+ )
+ list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
+-list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
"${_IMPORT_PREFIX}/lib/${staticLibraryName}")
++list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
"${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${staticLibraryName}")
+   endif()
+ 
+ else()
+@@ -66,17 +66,17 @@ else()
+ set(sharedLibraryName 
"libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_SHARED_LIBRARY_SUFFIX@.@ASSIMP_VERSION_MAJOR@")
+ set_target_properties(assimp::assimp PROPERTIES
+   IMPORTED_SONAME_RELEASE "${sharedLibraryName}"
+-  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${sharedLibraryName}"
++  IMPORTED_LOCATION_RELEASE 
"${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${sharedLibraryName}"
+ )
+ list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
+-list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
"${_IMPORT_PREFIX}/lib/${sharedLibraryName}" )
++list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
"${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${sharedLibraryName}" )
+   else()
+ set(staticLibraryName 
"libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@")
+ set_target_properties(assimp::assimp PROPERTIES
+-  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${staticLibraryName}"
++  IMPORTED_LOCATION_RELEASE 
"${_IMPORT_PREFIX}/@ASSIMP_LIB_INSTALL_DIR@/${staticLibraryName}"
+ )
+ list(APPEND _IMPORT_CHECK_TARGETS assimp:

Re: [OE-core] [PATCH] libpam: drop yylex to static force

2019-12-10 Thread Hongxu Jia

On 12/10/19 6:58 PM, Ross Burton wrote:
+diff --git a/modules/pam_console/sed-static 
b/modules/pam_console/sed-static

+index b9a6fa2..c7a850e 100644
+--- a/modules/pam_console/sed-static
 b/modules/pam_console/sed-static


do_patch fails with:

can't find file to patch at input line 40

I guess your WRL layers are patching pam-console in?


Yes, you are right, sorry for the nosiy

//Hongxu


Ross



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


[OE-core] [PATCH] libpam: drop yylex to static force

2019-12-09 Thread Hongxu Jia
Since flex was upgraded to 2.6.4, there is a build failure
...
In file included from 
../../../Linux-PAM-1.3.1/modules/pam_console/configfile.c:56:
configfile.lex.c:23:15: error: static declaration of '_pc_yylex' follows 
non-static declaration
   23 | #define yyleng _pc_yyleng
  |   ^
configfile.lex.c:1091:28: note: in expansion of macro 'yylex'
 1091 |
  |^
configfile.lex.c::1: note: in expansion of macro 'YY_DECL'
  |  */
  | ^~~
configfile.lex.c:23:15: note: previous declaration of '_pc_yylex' was here
   23 | #define yyleng _pc_yyleng
  |   ^
configfile.lex.c:1089:12: note: in expansion of macro 'yylex'
 1089 |
  |^
...

Google the world and find a similar fix
https://lists.pld-linux.org/mailman/pipermail/pld-cvs-commit/Week-of-Mon-20170703/465181.html

Signed-off-by: Hongxu Jia 
---
 .../0001-drop-yylex-to-static-force.patch | 51 +++
 meta/recipes-extended/pam/libpam_1.3.1.bb |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 
meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch

diff --git 
a/meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch 
b/meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch
new file mode 100644
index 00..1aefa8c761
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/0001-drop-yylex-to-static-force.patch
@@ -0,0 +1,51 @@
+From 53f0fd76d6eb0ba5149d316647f83d3c56d1f9aa Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Mon, 9 Dec 2019 18:31:06 -0800
+Subject: [PATCH] drop yylex to static force
+
+Since flex was upgraded to 2.6.4, there is a build failure
+...
+In file included from 
../../../Linux-PAM-1.3.1/modules/pam_console/configfile.c:56:
+configfile.lex.c:23:15: error: static declaration of '_pc_yylex' follows 
non-static declaration
+   23 | #define yyleng _pc_yyleng
+  |   ^
+configfile.lex.c:1091:28: note: in expansion of macro 'yylex'
+ 1091 |
+  |^
+configfile.lex.c::1: note: in expansion of macro 'YY_DECL'
+  |  */
+  | ^~~
+configfile.lex.c:23:15: note: previous declaration of '_pc_yylex' was here
+   23 | #define yyleng _pc_yyleng
+  |   ^
+configfile.lex.c:1089:12: note: in expansion of macro 'yylex'
+ 1089 |
+  |^
+...
+
+Google the world and find a similar fix
+https://lists.pld-linux.org/mailman/pipermail/pld-cvs-commit/Week-of-Mon-20170703/465181.html
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia 
+---
+ modules/pam_console/sed-static | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/pam_console/sed-static b/modules/pam_console/sed-static
+index b9a6fa2..c7a850e 100644
+--- a/modules/pam_console/sed-static
 b/modules/pam_console/sed-static
+@@ -13,7 +13,7 @@ sed '
+ /^YY_BUFFER_STATE yy_scan_buffer/s/^/STATIC /
+ /^YY_BUFFER_STATE yy_scan_string/s/^/STATIC /
+ /^void yy_switch_to_buffer/s/^/STATIC /
+-/define YY_DECL int yylex/s/YY_DECL /YY_DECL STATIC /
++#/define YY_DECL int yylex/s/YY_DECL /YY_DECL STATIC /
+ /^int yyparse/s/^/STATIC /
+ /^void yyrestart/s/^/STATIC /
+ ' < $1 > sedtmp.$$ && mv sedtmp.$$ $1
+-- 
+2.21.0
+
diff --git a/meta/recipes-extended/pam/libpam_1.3.1.bb 
b/meta/recipes-extended/pam/libpam_1.3.1.bb
index 1194933827..440d77babc 100644
--- a/meta/recipes-extended/pam/libpam_1.3.1.bb
+++ b/meta/recipes-extended/pam/libpam_1.3.1.bb
@@ -24,6 +24,7 @@ SRC_URI = 
"https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux
file://pam-security-abstract-securetty-handling.patch \
file://pam-unix-nullok-secure.patch \
file://crypt_configure.patch \
+   file://0001-drop-yylex-to-static-force.patch \
   "
 
 SRC_URI[md5sum] = "558ff53b0fc0563ca97f79e911822165"
-- 
2.21.0

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


Re: [OE-core] [PATCH V4] gnupg-native: fix GPG homedir path length limit

2019-11-24 Thread Hongxu Jia

Ping

//Hongxu
On 11/11/19 3:43 PM, Hongxu Jia wrote:

The gpg uses unix socket to communicate with its agent, before doing that,
it checks whether the extra socketdir prefix (/tmp/gnupg,/run/,/var/run/gnupg,
/var/run) has proper permissions. If all these checking failed, it will
choose gpg homedir as prefix to create socketdir.

While using gpg in Yocto build, we usually set gpg homedir under build dir,
if homedir is too long (>100chars), gpg will fail due to unix socket path
length limit [1][2][3]

Yocto build usually does not have access permission on /run, /var/run, but it
may have permission on /tmp, so allows to build GnuPG with an extra socketdir
under /tmp/gnupg.

But Yocto build creates gpg socketdir through pseudo which makes the real uid
differs between different build (even different recipes in one build), so apply
fix to not require gpg socketdir to be owned by the user. Then multiple recipes
or builds could use the same socketdir prefix /tmp/gnupg.

Conversely, if /tmp/gnupg does not exist, or Yocto builds do not have permission
on /tmp, gpg uses homedir as usual. In other words, in order to fix GPG homedir
path length limit, the gpg user in Yocto build should not only apply this 
commit,
but also create the socket in the /tmp/gnupg directory: Make sure that
/tmp/gnupg/user/$(id -u) [4]

[1] https://dev.gnupg.org/rG17efcd2a2acdc3b7f00711272aa51e5be2476921
[2] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057444.html
[3] 
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
[4] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057451.html

Signed-off-by: Hongxu Jia 
---
  ...uild-GnuPG-with-an-extra-socketdir-below-.patch | 51 
  ...t-check-socketdir-to-be-owned-by-the-user.patch | 71 ++
  meta/recipes-support/gnupg/gnupg_2.2.17.bb |  5 ++
  3 files changed, 127 insertions(+)
  create mode 100644 
meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
  create mode 100644 
meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch

diff --git 
a/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
 
b/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
new file mode 100644
index 000..e255279
--- /dev/null
+++ 
b/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
@@ -0,0 +1,51 @@
+From 26358e491084f4a546ae1fcb71f0405a7b5cf575 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 9 Nov 2019 00:51:25 -0500
+Subject: [PATCH 1/2] allows to build GnuPG with an extra socketdir below
+ /tmp/gnupg
+
+Since upstream applied commit [17efcd2 build: New configure option
+--enable-run-gnupg-user-socket] [1], it allows to build GnuPG with an
+extra socketdir below /run.
+
+For Yocto build which does not have access permission on /run, it could
+not create the extra socketdir in /run/gnupg and uses homedir to replace.
+
+If homedir is too long(>100chars), gpg connect agent will fail [2][3]
+...
+|gpg: can't connect to the agent: File name too long
+...
+
+Yocto builds may have permission on /tmp on many hosts, so allows to build
+GnuPG with an extra socketdir below /tmp/gnupg.
+
+Conversely, if Yocto builds do not have permission on /tmp, it still uses 
homedir
+as usual;
+
+[1] https://dev.gnupg.org/rG17efcd2a2acdc3b7f00711272aa51e5be2476921
+[2] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057444.html
+[3] 
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ common/homedir.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common/homedir.c b/common/homedir.c
+index e9e75d0..9dd5f6c 100644
+--- a/common/homedir.c
 b/common/homedir.c
+@@ -574,7 +574,7 @@ _gnupg_socketdir_internal (int skip_checks, unsigned 
*r_info)
+
+   static const char * const bases[] = {
+ #ifdef USE_RUN_GNUPG_USER_SOCKET
+-"/run/gnupg",
++"/tmp/gnupg",
+ #endif
+ "/run",
+ #ifdef USE_RUN_GNUPG_USER_SOCKET
+--
+2.23.0
+
diff --git 
a/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
 
b/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
new file mode 100644
index 000..14ddedd
--- /dev/null
+++ 
b/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
@@ -0,0 +1,71 @@
+From 78bf195f85b42cc46ce875c1ae63090ac28cca75 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 9 Nov 2019 16:35:16 +0800
+Subject: [PATCH 2/2] do not check socketdir to be owned by the user
+
+The gpg uses unix socket to communicate with its agent, before doing that,
+it checks whether the extra socketd

[OE-core] [PATCH V4] gnupg-native: fix GPG homedir path length limit

2019-11-10 Thread Hongxu Jia
The gpg uses unix socket to communicate with its agent, before doing that,
it checks whether the extra socketdir prefix (/tmp/gnupg,/run/,/var/run/gnupg,
/var/run) has proper permissions. If all these checking failed, it will
choose gpg homedir as prefix to create socketdir.

While using gpg in Yocto build, we usually set gpg homedir under build dir,
if homedir is too long (>100chars), gpg will fail due to unix socket path
length limit [1][2][3]

Yocto build usually does not have access permission on /run, /var/run, but it
may have permission on /tmp, so allows to build GnuPG with an extra socketdir
under /tmp/gnupg.

But Yocto build creates gpg socketdir through pseudo which makes the real uid
differs between different build (even different recipes in one build), so apply
fix to not require gpg socketdir to be owned by the user. Then multiple recipes
or builds could use the same socketdir prefix /tmp/gnupg.

Conversely, if /tmp/gnupg does not exist, or Yocto builds do not have permission
on /tmp, gpg uses homedir as usual. In other words, in order to fix GPG homedir
path length limit, the gpg user in Yocto build should not only apply this 
commit,
but also create the socket in the /tmp/gnupg directory: Make sure that
/tmp/gnupg/user/$(id -u) [4]

[1] https://dev.gnupg.org/rG17efcd2a2acdc3b7f00711272aa51e5be2476921
[2] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057444.html
[3] 
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
[4] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057451.html

Signed-off-by: Hongxu Jia 
---
 ...uild-GnuPG-with-an-extra-socketdir-below-.patch | 51 
 ...t-check-socketdir-to-be-owned-by-the-user.patch | 71 ++
 meta/recipes-support/gnupg/gnupg_2.2.17.bb |  5 ++
 3 files changed, 127 insertions(+)
 create mode 100644 
meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
 create mode 100644 
meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch

diff --git 
a/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
 
b/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
new file mode 100644
index 000..e255279
--- /dev/null
+++ 
b/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
@@ -0,0 +1,51 @@
+From 26358e491084f4a546ae1fcb71f0405a7b5cf575 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 9 Nov 2019 00:51:25 -0500
+Subject: [PATCH 1/2] allows to build GnuPG with an extra socketdir below
+ /tmp/gnupg
+
+Since upstream applied commit [17efcd2 build: New configure option
+--enable-run-gnupg-user-socket] [1], it allows to build GnuPG with an
+extra socketdir below /run.
+
+For Yocto build which does not have access permission on /run, it could
+not create the extra socketdir in /run/gnupg and uses homedir to replace.
+
+If homedir is too long(>100chars), gpg connect agent will fail [2][3]
+...
+|gpg: can't connect to the agent: File name too long
+...
+
+Yocto builds may have permission on /tmp on many hosts, so allows to build
+GnuPG with an extra socketdir below /tmp/gnupg.
+
+Conversely, if Yocto builds do not have permission on /tmp, it still uses 
homedir
+as usual;
+
+[1] https://dev.gnupg.org/rG17efcd2a2acdc3b7f00711272aa51e5be2476921
+[2] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057444.html
+[3] 
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ common/homedir.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common/homedir.c b/common/homedir.c
+index e9e75d0..9dd5f6c 100644
+--- a/common/homedir.c
 b/common/homedir.c
+@@ -574,7 +574,7 @@ _gnupg_socketdir_internal (int skip_checks, unsigned 
*r_info)
+ 
+   static const char * const bases[] = {
+ #ifdef USE_RUN_GNUPG_USER_SOCKET
+-"/run/gnupg",
++"/tmp/gnupg",
+ #endif
+ "/run",
+ #ifdef USE_RUN_GNUPG_USER_SOCKET
+-- 
+2.23.0
+
diff --git 
a/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
 
b/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
new file mode 100644
index 000..14ddedd
--- /dev/null
+++ 
b/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
@@ -0,0 +1,71 @@
+From 78bf195f85b42cc46ce875c1ae63090ac28cca75 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 9 Nov 2019 16:35:16 +0800
+Subject: [PATCH 2/2] do not check socketdir to be owned by the user
+
+The gpg uses unix socket to communicate with its agent, before doing that,
+it checks whether the extra socketdir prefix (/tmp/gnupg,/run/,/var/run/gnupg,
+/var

[OE-core] [PATCH V3] gnupg-native: fix GPG homedir path length limit

2019-11-10 Thread Hongxu Jia
The gpg uses unix socket to communicate with its agent, before doing that,
it checks whether the extra socketdir prefix (/tmp/gnupg,/run/,/var/run/gnupg,
/var/run) has proper permissions. If all these checking failed, it will
choose gpg homedir as prefix to create socketdir.

While using gpg in Yocto build, we usually set gpg homedir under build dir,
if homedir is too long (>100chars), gpg will fail due to unix socket path
length limit [1][2][3]

Yocto build usually does not have access permission on /run, /var/run, but it
may have permission on /tmp, so allows to build GnuPG with an extra socketdir
under /tmp/gnupg.

But Yocto build creates gpg socketdir through pseudo which makes the real uid
differs between different build (even different recipes in one build), so apply
fix to not require gpg socketdir to be owned by the user. Then multiple recipes
or builds could use the same socketdir prefix /tmp/gnupg.

Conversely, if /tmp/gnupg does not exist, or Yocto builds do not have permission
on /tmp, gpg uses homedir as usual. In other words, in order to fix GPG homedir
path length limit, the gpg user in Yocto build should not only apply this 
commit,
but also create the socket in the /tmp/gnupg directory: Make sure that
/tmp/gnupg/user/$(id -u) [4]

[1] https://dev.gnupg.org/rG17efcd2a2acdc3b7f00711272aa51e5be2476921
[2] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057444.html
[3] 
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
[4] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057451.html

Signed-off-by: Hongxu Jia 
---
 ...uild-GnuPG-with-an-extra-socketdir-below-.patch | 51 
 ...t-check-socketdir-to-be-owned-by-the-user.patch | 71 ++
 meta/recipes-support/gnupg/gnupg_2.2.17.bb |  5 ++
 3 files changed, 127 insertions(+)
 create mode 100644 
meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
 create mode 100644 
meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch

diff --git 
a/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
 
b/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
new file mode 100644
index 000..e255279
--- /dev/null
+++ 
b/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
@@ -0,0 +1,51 @@
+From 26358e491084f4a546ae1fcb71f0405a7b5cf575 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 9 Nov 2019 00:51:25 -0500
+Subject: [PATCH 1/2] allows to build GnuPG with an extra socketdir below
+ /tmp/gnupg
+
+Since upstream applied commit [17efcd2 build: New configure option
+--enable-run-gnupg-user-socket] [1], it allows to build GnuPG with an
+extra socketdir below /run.
+
+For Yocto build which does not have access permission on /run, it could
+not create the extra socketdir in /run/gnupg and uses homedir to replace.
+
+If homedir is too long(>100chars), gpg connect agent will fail [2][3]
+...
+|gpg: can't connect to the agent: File name too long
+...
+
+Yocto builds may have permission on /tmp on many hosts, so allows to build
+GnuPG with an extra socketdir below /tmp/gnupg.
+
+Conversely, if Yocto builds do not have permission on /tmp, it still uses 
homedir
+as usual;
+
+[1] https://dev.gnupg.org/rG17efcd2a2acdc3b7f00711272aa51e5be2476921
+[2] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057444.html
+[3] 
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ common/homedir.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common/homedir.c b/common/homedir.c
+index e9e75d0..9dd5f6c 100644
+--- a/common/homedir.c
 b/common/homedir.c
+@@ -574,7 +574,7 @@ _gnupg_socketdir_internal (int skip_checks, unsigned 
*r_info)
+ 
+   static const char * const bases[] = {
+ #ifdef USE_RUN_GNUPG_USER_SOCKET
+-"/run/gnupg",
++"/tmp/gnupg",
+ #endif
+ "/run",
+ #ifdef USE_RUN_GNUPG_USER_SOCKET
+-- 
+2.23.0
+
diff --git 
a/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
 
b/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
new file mode 100644
index 000..14ddedd
--- /dev/null
+++ 
b/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
@@ -0,0 +1,71 @@
+From 78bf195f85b42cc46ce875c1ae63090ac28cca75 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 9 Nov 2019 16:35:16 +0800
+Subject: [PATCH 2/2] do not check socketdir to be owned by the user
+
+The gpg uses unix socket to communicate with its agent, before doing that,
+it checks whether the extra socketdir prefix (/tmp/gnupg,/run/,/var/run/gnupg,
+/var

Re: [OE-core] [PATCH V2] gnupg-native: fix GPG homedir path length limit

2019-11-10 Thread Hongxu Jia

On 11/11/19 3:36 PM, Hongxu Jia wrote:

The gpg uses unix socket to communicate with its agent, before doing that,
it checks whether the extra socketdir prefix (/tmp/gnupg,/run/,/var/run/gnupg,
/var/run) has proper permissions. If all these checking failed, it will
choose gpg homedir as prefix to create socketdir.

While using gpg in Yocto build, we usually set gpg homedir under build dir,
if homedir is too long (>100chars), gpg will fail due to unix socket path
length limit [1][2][3]

Yocto build usually does not have access permission on /run, /var/run, but it
may have permission on /tmp, so allows to build GnuPG with an extra socketdir
under /tmp/gnupg.

But Yocto build creates gpg socketdir through pseudo which makes the real uid
differs between different build (even different recipes in one build), so apply
fix to not require gpg socketdir to be owned by the user. Then multiple recipes
or builds could use the same socketdir prefix /tmp/gnupg.

Conversely, if /tmp/gnupg does not exist, or Yocto builds do not have permission
on /tmp, gpg uses homedir as usual. In other words, in order to fix GPG homedir
path length limit, the gpg user in Yocto build should not only apply this 
commit,
but also create the socket in the /tmp/gnupg directory: Make sure that
/tmp/gnupg/user/$(id -u) [4]

[1] https://dev.gnupg.org/rG17efcd2a2acdc3b7f00711272aa51e5be2476921
[2] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057444.html
[3] 
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
[4] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057451.html

Signed-off-by: Hongxu Jia 
---
  ...uild-GnuPG-with-an-extra-socketdir-below-.patch | 51 
  ...t-check-socketdir-to-be-owned-by-the-user.patch | 71 ++
  meta/recipes-support/gnupg/gnupg_2.2.17.bb |  5 ++
  3 files changed, 127 insertions(+)
  create mode 100644 
meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
  create mode 100644 
meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch

diff --git 
a/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
 
b/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
new file mode 100644
index 000..e255279
--- /dev/null
+++ 
b/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
@@ -0,0 +1,51 @@
+From 26358e491084f4a546ae1fcb71f0405a7b5cf575 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 9 Nov 2019 00:51:25 -0500
+Subject: [PATCH 1/2] allows to build GnuPG with an extra socketdir below
+ /tmp/gnupg
+
+Since upstream applied commit [17efcd2 build: New configure option
+--enable-run-gnupg-user-socket] [1], it allows to build GnuPG with an
+extra socketdir below /run.
+
+For Yocto build which does not have access permission on /run, it could
+not create the extra socketdir in /run/gnupg and uses homedir to replace.
+
+If homedir is too long(>100chars), gpg connect agent will fail [2][3]
+...
+|gpg: can't connect to the agent: File name too long
+...
+
+Yocto builds may have permission on /tmp on many hosts, so allows to build
+GnuPG with an extra socketdir below /tmp/gnupg.
+
+Conversely, if Yocto builds do not have permission on /tmp, it still uses 
homedir
+as usual;
+
+[1] https://dev.gnupg.org/rG17efcd2a2acdc3b7f00711272aa51e5be2476921
+[2] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057444.html
+[3] 
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ common/homedir.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common/homedir.c b/common/homedir.c
+index e9e75d0..9dd5f6c 100644
+--- a/common/homedir.c
 b/common/homedir.c
+@@ -574,7 +574,7 @@ _gnupg_socketdir_internal (int skip_checks, unsigned 
*r_info)
+
+   static const char * const bases[] = {
+ #ifdef USE_RUN_GNUPG_USER_SOCKET
+-"/run/gnupg",
++"/tmp/gnupg",
+ #endif
+ "/run",
+ #ifdef USE_RUN_GNUPG_USER_SOCKET
+--
+2.23.0
+
diff --git 
a/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
 
b/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
new file mode 100644
index 000..e280603
--- /dev/null
+++ 
b/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
@@ -0,0 +1,71 @@
+From 78bf195f85b42cc46ce875c1ae63090ac28cca75 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 9 Nov 2019 16:35:16 +0800
+Subject: [PATCH 2/2] do not check socketdir to be owned by the user
+
+The gpg uses unix socket to communicate with its agent, before doing that,
+it checks whether the extra socketdir prefix (/tmp/g

[OE-core] [PATCH V2] gnupg-native: fix GPG homedir path length limit

2019-11-10 Thread Hongxu Jia
The gpg uses unix socket to communicate with its agent, before doing that,
it checks whether the extra socketdir prefix (/tmp/gnupg,/run/,/var/run/gnupg,
/var/run) has proper permissions. If all these checking failed, it will
choose gpg homedir as prefix to create socketdir.

While using gpg in Yocto build, we usually set gpg homedir under build dir,
if homedir is too long (>100chars), gpg will fail due to unix socket path
length limit [1][2][3]

Yocto build usually does not have access permission on /run, /var/run, but it
may have permission on /tmp, so allows to build GnuPG with an extra socketdir
under /tmp/gnupg.

But Yocto build creates gpg socketdir through pseudo which makes the real uid
differs between different build (even different recipes in one build), so apply
fix to not require gpg socketdir to be owned by the user. Then multiple recipes
or builds could use the same socketdir prefix /tmp/gnupg.

Conversely, if /tmp/gnupg does not exist, or Yocto builds do not have permission
on /tmp, gpg uses homedir as usual. In other words, in order to fix GPG homedir
path length limit, the gpg user in Yocto build should not only apply this 
commit,
but also create the socket in the /tmp/gnupg directory: Make sure that
/tmp/gnupg/user/$(id -u) [4]

[1] https://dev.gnupg.org/rG17efcd2a2acdc3b7f00711272aa51e5be2476921
[2] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057444.html
[3] 
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
[4] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057451.html

Signed-off-by: Hongxu Jia 
---
 ...uild-GnuPG-with-an-extra-socketdir-below-.patch | 51 
 ...t-check-socketdir-to-be-owned-by-the-user.patch | 71 ++
 meta/recipes-support/gnupg/gnupg_2.2.17.bb |  5 ++
 3 files changed, 127 insertions(+)
 create mode 100644 
meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
 create mode 100644 
meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch

diff --git 
a/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
 
b/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
new file mode 100644
index 000..e255279
--- /dev/null
+++ 
b/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
@@ -0,0 +1,51 @@
+From 26358e491084f4a546ae1fcb71f0405a7b5cf575 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 9 Nov 2019 00:51:25 -0500
+Subject: [PATCH 1/2] allows to build GnuPG with an extra socketdir below
+ /tmp/gnupg
+
+Since upstream applied commit [17efcd2 build: New configure option
+--enable-run-gnupg-user-socket] [1], it allows to build GnuPG with an
+extra socketdir below /run.
+
+For Yocto build which does not have access permission on /run, it could
+not create the extra socketdir in /run/gnupg and uses homedir to replace.
+
+If homedir is too long(>100chars), gpg connect agent will fail [2][3]
+...
+|gpg: can't connect to the agent: File name too long
+...
+
+Yocto builds may have permission on /tmp on many hosts, so allows to build
+GnuPG with an extra socketdir below /tmp/gnupg.
+
+Conversely, if Yocto builds do not have permission on /tmp, it still uses 
homedir
+as usual;
+
+[1] https://dev.gnupg.org/rG17efcd2a2acdc3b7f00711272aa51e5be2476921
+[2] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057444.html
+[3] 
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ common/homedir.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common/homedir.c b/common/homedir.c
+index e9e75d0..9dd5f6c 100644
+--- a/common/homedir.c
 b/common/homedir.c
+@@ -574,7 +574,7 @@ _gnupg_socketdir_internal (int skip_checks, unsigned 
*r_info)
+ 
+   static const char * const bases[] = {
+ #ifdef USE_RUN_GNUPG_USER_SOCKET
+-"/run/gnupg",
++"/tmp/gnupg",
+ #endif
+ "/run",
+ #ifdef USE_RUN_GNUPG_USER_SOCKET
+-- 
+2.23.0
+
diff --git 
a/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
 
b/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
new file mode 100644
index 000..e280603
--- /dev/null
+++ 
b/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
@@ -0,0 +1,71 @@
+From 78bf195f85b42cc46ce875c1ae63090ac28cca75 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 9 Nov 2019 16:35:16 +0800
+Subject: [PATCH 2/2] do not check socketdir to be owned by the user
+
+The gpg uses unix socket to communicate with its agent, before doing that,
+it checks whether the extra socketdir prefix (/tmp/gnupg,/run/,/var/run/gnupg,
+/var

[OE-core] [PATCH] gnupg-native: fix GPG homedir path length limit

2019-11-10 Thread Hongxu Jia
The gpg uses unix socket to communicate with its agent, before doing that,
it checks whether the extra socketdir prefix (/tmp/gnupg,/run/,/var/run/gnupg,
/var/run) has proper permissions. If all these checking failed, it will
choose gpg homedir as prefix to create socketdir.

While using gpg in Yocto build, we usually set gpg homedir under build dir,
if homedir is too long (>100chars), gpg will fail due to unix socket path
length limit [1][2][3]

Yocto build usually does not have access permission on /run, /var/run, but it
may have permission on /tmp, so allows to build GnuPG with an extra socketdir
under /tmp/gnupg.

But Yocto build creates gpg socketdir through pseudo which makes the real uid
differs between different build (even different recipes in one build), so apply
fix to not require gpg socketdir to be owned by the user. Then multiple recipes
or builds could use the same socketdir prefix /tmp/gnupg.

Conversely, if /tmp/gnupg does not exist, or Yocto builds do not have permission
on /tmp, gpg uses homedir as usual. In other words, in order to fix GPG homedir
path length limit, the gpg user in Yocto build should not only apply this 
commit,
but also create the socket in the /tmp/gnupg directory: Make sure that
/tmp/gnupg/user/$(id -u) [4]

[1] https://dev.gnupg.org/rG17efcd2a2acdc3b7f00711272aa51e5be2476921
[2] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057444.html
[3] 
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
[4] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057451.html

Signed-off-by: Hongxu Jia 
---
 ...uild-GnuPG-with-an-extra-socketdir-below-.patch | 51 
 ...t-check-socketdir-to-be-owned-by-the-user.patch | 71 ++
 meta/recipes-support/gnupg/gnupg_2.2.17.bb |  5 ++
 3 files changed, 127 insertions(+)
 create mode 100644 
meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
 create mode 100644 
meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch

diff --git 
a/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
 
b/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
new file mode 100644
index 000..4c7bcad
--- /dev/null
+++ 
b/meta/recipes-support/gnupg/gnupg/0001-allows-to-build-GnuPG-with-an-extra-socketdir-below-.patch
@@ -0,0 +1,51 @@
+From 26358e491084f4a546ae1fcb71f0405a7b5cf575 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 9 Nov 2019 00:51:25 -0500
+Subject: [PATCH 1/2] allows to build GnuPG with an extra socketdir below
+ /tmp/gnupg
+
+Since upstream applied commit [17efcd2 build: New configure option
+--enable-run-gnupg-user-socket] [1], it allows to build GnuPG with an
+extra socketdir below /run.
+
+For Yocto build which does not have access permission on /run, it could
+not create the extra socketdir in /run/gnupg and uses homedir to replace.
+
+If homedir is too long(>100chars), gpg connect agent will fail [2][3]
+...
+|gpg: can't connect to the agent: File name too long
+...
+
+Yocto builds may have permission on /tmp on many hosts, so allows to build
+GnuPG with an extra socketdir below /tmp/gnupg.
+
+Conversely, if Yocto builds do not have permission on /tmp, it still uses 
homedir
+as usual;
+
+[1] https://dev.gnupg.org/rG17efcd2a2acdc3b7f00711272aa51e5be2476921
+[2] https://lists.gnupg.org/pipermail/gnupg-users/2017-January/057444.html
+[3] 
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
+
+Upstream-Status: inappropriate [OE specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ common/homedir.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common/homedir.c b/common/homedir.c
+index e9e75d0..9dd5f6c 100644
+--- a/common/homedir.c
 b/common/homedir.c
+@@ -574,7 +574,7 @@ _gnupg_socketdir_internal (int skip_checks, unsigned 
*r_info)
+ 
+   static const char * const bases[] = {
+ #ifdef USE_RUN_GNUPG_USER_SOCKET
+-"/run/gnupg",
++"/tmp/gnupg",
+ #endif
+ "/run",
+ #ifdef USE_RUN_GNUPG_USER_SOCKET
+-- 
+2.23.0
+
diff --git 
a/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
 
b/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
new file mode 100644
index 000..e280603
--- /dev/null
+++ 
b/meta/recipes-support/gnupg/gnupg/0002-do-not-check-socketdir-to-be-owned-by-the-user.patch
@@ -0,0 +1,71 @@
+From 78bf195f85b42cc46ce875c1ae63090ac28cca75 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 9 Nov 2019 16:35:16 +0800
+Subject: [PATCH 2/2] do not check socketdir to be owned by the user
+
+The gpg uses unix socket to communicate with its agent, before doing that,
+it checks whether the extra socketdir prefix (/tmp/gnupg,/run/,/var/run/gnupg,
+/var

[OE-core] [PATCH V2] go: fix CVE-2019-17596

2019-11-04 Thread Hongxu Jia
https://github.com/golang/go/commit/2017d88dbc096381d4f348d2fb08bfb3c2b7ed73

Signed-off-by: Hongxu Jia 
---
 meta/recipes-devtools/go/go-1.12.inc  |  1 +
 .../go/go-1.12/0010-fix-CVE-2019-17596.patch  | 42 +++
 2 files changed, 43 insertions(+)
 create mode 100644 
meta/recipes-devtools/go/go-1.12/0010-fix-CVE-2019-17596.patch

diff --git a/meta/recipes-devtools/go/go-1.12.inc 
b/meta/recipes-devtools/go/go-1.12.inc
index ed14b175e6..6aecaad75d 100644
--- a/meta/recipes-devtools/go/go-1.12.inc
+++ b/meta/recipes-devtools/go/go-1.12.inc
@@ -17,6 +17,7 @@ SRC_URI += "\
 file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
 file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
 file://0001-release-branch.go1.12-security-net-textproto-don-t-n.patch \
+file://0010-fix-CVE-2019-17596.patch \
 "
 SRC_URI_append_libc-musl = " 
file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
 
diff --git a/meta/recipes-devtools/go/go-1.12/0010-fix-CVE-2019-17596.patch 
b/meta/recipes-devtools/go/go-1.12/0010-fix-CVE-2019-17596.patch
new file mode 100644
index 00..134cfab737
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.12/0010-fix-CVE-2019-17596.patch
@@ -0,0 +1,42 @@
+From f1783e1ce44a86c000a7c380a57a805c89c3efbe Mon Sep 17 00:00:00 2001
+From: Katie Hockman 
+Date: Mon, 14 Oct 2019 16:42:21 -0400
+Subject: [PATCH] crypto/dsa: prevent bad public keys from causing panic
+
+dsa.Verify might currently use a nil s inverse in a
+multiplication if the public key contains a non-prime Q,
+causing a panic. Change this to check that the mod
+inverse exists before using it.
+
+Fixes CVE-2019-17596
+
+Change-Id: I94d5f3cc38f1b5d52d38dcb1d253c71b7fd1cae7
+Reviewed-on: 
https://team-review.git.corp.google.com/c/golang/go-private/+/572809
+Reviewed-by: Filippo Valsorda 
+(cherry picked from commit 9119dfb0511326d4485b248b83d4fde19c95d0f7)
+Reviewed-on: 
https://team-review.git.corp.google.com/c/golang/go-private/+/575232
+
+CVE: CVE-2019-17596
+Upstream-Status: Backport 
[https://github.com/golang/go/commit/2017d88dbc096381d4f348d2fb08bfb3c2b7ed73]
+Signed-off-by: Hongxu Jia 
+---
+ src/crypto/dsa/dsa.go | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/crypto/dsa/dsa.go b/src/crypto/dsa/dsa.go
+index 575314b..2fc4f1f 100644
+--- a/src/crypto/dsa/dsa.go
 b/src/crypto/dsa/dsa.go
+@@ -279,6 +279,9 @@ func Verify(pub *PublicKey, hash []byte, r, s *big.Int) 
bool {
+   }
+ 
+   w := new(big.Int).ModInverse(s, pub.Q)
++  if w == nil {
++  return false
++  }
+ 
+   n := pub.Q.BitLen()
+   if n&7 != 0 {
+-- 
+2.23.0
+
-- 
2.17.1

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


[OE-core] [PATCH] go: fix CVE-2019-17596

2019-11-04 Thread Hongxu Jia
https://github.com/golang/go/commit/2017d88dbc096381d4f348d2fb08bfb3c2b7ed73

Signed-off-by: Hongxu Jia 
---
 meta/recipes-devtools/go/go-1.12.inc  |  1 +
 .../go/go-1.12/0010-fix-CVE-2019-17596.patch  | 42 +++
 2 files changed, 43 insertions(+)
 create mode 100644 
meta/recipes-devtools/go/go-1.12/0010-fix-CVE-2019-17596.patch

diff --git a/meta/recipes-devtools/go/go-1.12.inc 
b/meta/recipes-devtools/go/go-1.12.inc
index 39157ff882..34be06eff3 100644
--- a/meta/recipes-devtools/go/go-1.12.inc
+++ b/meta/recipes-devtools/go/go-1.12.inc
@@ -16,6 +16,7 @@ SRC_URI += "\
 file://0006-cmd-dist-separate-host-and-target-builds.patch \
 file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
 file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
+file://0010-fix-CVE-2019-17596.patch \
 "
 SRC_URI_append_libc-musl = " 
file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
 
diff --git a/meta/recipes-devtools/go/go-1.12/0010-fix-CVE-2019-17596.patch 
b/meta/recipes-devtools/go/go-1.12/0010-fix-CVE-2019-17596.patch
new file mode 100644
index 00..134cfab737
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.12/0010-fix-CVE-2019-17596.patch
@@ -0,0 +1,42 @@
+From f1783e1ce44a86c000a7c380a57a805c89c3efbe Mon Sep 17 00:00:00 2001
+From: Katie Hockman 
+Date: Mon, 14 Oct 2019 16:42:21 -0400
+Subject: [PATCH] crypto/dsa: prevent bad public keys from causing panic
+
+dsa.Verify might currently use a nil s inverse in a
+multiplication if the public key contains a non-prime Q,
+causing a panic. Change this to check that the mod
+inverse exists before using it.
+
+Fixes CVE-2019-17596
+
+Change-Id: I94d5f3cc38f1b5d52d38dcb1d253c71b7fd1cae7
+Reviewed-on: 
https://team-review.git.corp.google.com/c/golang/go-private/+/572809
+Reviewed-by: Filippo Valsorda 
+(cherry picked from commit 9119dfb0511326d4485b248b83d4fde19c95d0f7)
+Reviewed-on: 
https://team-review.git.corp.google.com/c/golang/go-private/+/575232
+
+CVE: CVE-2019-17596
+Upstream-Status: Backport 
[https://github.com/golang/go/commit/2017d88dbc096381d4f348d2fb08bfb3c2b7ed73]
+Signed-off-by: Hongxu Jia 
+---
+ src/crypto/dsa/dsa.go | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/crypto/dsa/dsa.go b/src/crypto/dsa/dsa.go
+index 575314b..2fc4f1f 100644
+--- a/src/crypto/dsa/dsa.go
 b/src/crypto/dsa/dsa.go
+@@ -279,6 +279,9 @@ func Verify(pub *PublicKey, hash []byte, r, s *big.Int) 
bool {
+   }
+ 
+   w := new(big.Int).ModInverse(s, pub.Q)
++  if w == nil {
++  return false
++  }
+ 
+   n := pub.Q.BitLen()
+   if n&7 != 0 {
+-- 
+2.23.0
+
-- 
2.23.0

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


[OE-core] [PATCH V2] python3-git: add python3-nose to RDEPENDS

2019-11-04 Thread Hongxu Jia
$>>> import git.test.lib
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3/dist-packages/git/test/lib/__init__.py", line 9, in 

from .asserts import *
  File "/usr/lib/python3/dist-packages/git/test/lib/asserts.py", line 10, in 

from nose.tools import (
ModuleNotFoundError: No module named 'nose'

Signed-off-by: Hongxu Jia 
---
 meta/recipes-devtools/python/python3-git_3.0.2.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-devtools/python/python3-git_3.0.2.bb 
b/meta/recipes-devtools/python/python3-git_3.0.2.bb
index 9dd753db4f..7c6cda8cd4 100644
--- a/meta/recipes-devtools/python/python3-git_3.0.2.bb
+++ b/meta/recipes-devtools/python/python3-git_3.0.2.bb
@@ -27,6 +27,7 @@ RDEPENDS_${PN} += " \
${PYTHON_PN}-stringold \
${PYTHON_PN}-unittest \
${PYTHON_PN}-unixadmin \
+   ${PYTHON_PN}-nose \
git \
 "
 
-- 
2.17.1

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


[OE-core] [PATCH] add python3-nose to RDEPENDS

2019-11-04 Thread Hongxu Jia
$>>> import git.test.lib
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3/dist-packages/git/test/lib/__init__.py", line 9, in 

from .asserts import *
  File "/usr/lib/python3/dist-packages/git/test/lib/asserts.py", line 10, in 

from nose.tools import (
ModuleNotFoundError: No module named 'nose'

Signed-off-by: Hongxu Jia 
---
 meta/recipes-devtools/python/python3-git_3.0.2.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-devtools/python/python3-git_3.0.2.bb 
b/meta/recipes-devtools/python/python3-git_3.0.2.bb
index 9dd753db4f..7c6cda8cd4 100644
--- a/meta/recipes-devtools/python/python3-git_3.0.2.bb
+++ b/meta/recipes-devtools/python/python3-git_3.0.2.bb
@@ -27,6 +27,7 @@ RDEPENDS_${PN} += " \
${PYTHON_PN}-stringold \
${PYTHON_PN}-unittest \
${PYTHON_PN}-unixadmin \
+   ${PYTHON_PN}-nose \
git \
 "
 
-- 
2.23.0

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


[OE-core] [PATCH] classes/image_types_wic.bbclass: fix racing risk on rootfs

2019-10-28 Thread Hongxu Jia
Since wic image creation will temporarily update rootfs/etc/fstab
(*temporarily* means the fstab will be recovered after wic image creation),
there is still racing risk during the temporarily time for other image
creation (such as tar, ext)

Make a copy of rootfs(as rootfs_wic), and create wic image based on the copy.

Signed-off-by: Hongxu Jia 
---
 meta/classes/image_types_wic.bbclass | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/classes/image_types_wic.bbclass 
b/meta/classes/image_types_wic.bbclass
index f350dc2..2a93143 100644
--- a/meta/classes/image_types_wic.bbclass
+++ b/meta/classes/image_types_wic.bbclass
@@ -26,15 +26,20 @@ def wks_search(files, search_path):
 WIC_CREATE_EXTRA_ARGS ?= ""
 
 IMAGE_CMD_wic () {
+   [ -d "${IMAGE_ROOTFS}_wic" ] && rm -rf "${IMAGE_ROOTFS}_wic"
+   # Refer oe.path.copytree(src, dst): ${WORKDIR}/rootfs -> 
${WORKDIR}/rootfs_wic
+   mkdir -p "${IMAGE_ROOTFS}_wic"
+   tar --xattrs --xattrs-include="*" -cf - -S -C "${IMAGE_ROOTFS}" -p . | 
tar --xattrs --xattrs-include="*" -xf - -C "${IMAGE_ROOTFS}_wic"
+
out="${IMGDEPLOYDIR}/${IMAGE_NAME}"
wks="${WKS_FULL_PATH}"
if [ -z "$wks" ]; then
bbfatal "No kickstart files from WKS_FILES were found: 
${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
fi
 
-   BUILDDIR="${TOPDIR}" wic create "$wks" --vars 
"${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/" 
${WIC_CREATE_EXTRA_ARGS}
+   BUILDDIR="${TOPDIR}" wic create "$wks" --vars 
"${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -r 
"${IMAGE_ROOTFS}_wic" -o "$out/" ${WIC_CREATE_EXTRA_ARGS}
mv "$out/$(basename "${wks%.wks}")"*.direct 
"$out${IMAGE_NAME_SUFFIX}.wic"
-   rm -rf "$out/"
+   rm -rf "$out/" "${IMAGE_ROOTFS}_wic"
 }
 IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES TOPDIR"
 
-- 
2.7.4

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


[OE-core] [PATCH] openssh: fix CVE-2019-16905

2019-10-18 Thread Hongxu Jia
Backport a patch from upstream to fix CVE-2019-16905
https://github.com/openssh/openssh-portable/commit/a546b17bbaeb12beac4c9aeed56f74a42b18a93a

Signed-off-by: Hongxu Jia 
---
 ...x-integer-overflow-in-XMSS-private-key-pa.patch | 40 ++
 meta/recipes-connectivity/openssh/openssh_8.0p1.bb |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 
meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch

diff --git 
a/meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch
 
b/meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch
new file mode 100644
index 000..3265be3
--- /dev/null
+++ 
b/meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch
@@ -0,0 +1,40 @@
+From 2014fad3d28090b59d2f8a0971166c06e5fa6da6 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Fri, 18 Oct 2019 14:56:58 +0800
+Subject: [PATCH] upstream: fix integer overflow in XMSS private key parsing.
+
+Reported by Adam Zabrocki via SecuriTeam's SSH program.
+
+Note that this code is experimental and not compiled by default.
+
+ok markus@
+
+OpenBSD-Commit-ID: cd0361896d15e8a1bac495ac583ff065ffca2be1
+
+Signed-off-by: "d...@openbsd.org" 
+
+Upstream-Status: Backport 
[https://github.com/openssh/openssh-portable/commit/a546b17bbaeb12beac4c9aeed56f74a42b18a93a]
+CVE: CVE-2019-16905
+
+Signed-off-by: Hongxu Jia 
+---
+ sshkey-xmss.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/sshkey-xmss.c b/sshkey-xmss.c
+index aaae702..c57681a 100644
+--- a/sshkey-xmss.c
 b/sshkey-xmss.c
+@@ -977,7 +977,8 @@ sshkey_xmss_decrypt_state(const struct sshkey *k, struct 
sshbuf *encoded,
+   goto out;
+   }
+   /* check that an appropriate amount of auth data is present */
+-  if (sshbuf_len(encoded) < encrypted_len + authlen) {
++  if (sshbuf_len(encoded) < authlen ||
++  sshbuf_len(encoded) - authlen < encrypted_len) {
+   r = SSH_ERR_INVALID_FORMAT;
+   goto out;
+   }
+-- 
+2.7.4
+
diff --git a/meta/recipes-connectivity/openssh/openssh_8.0p1.bb 
b/meta/recipes-connectivity/openssh/openssh_8.0p1.bb
index 01eaecd..2ffbc9a 100644
--- a/meta/recipes-connectivity/openssh/openssh_8.0p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_8.0p1.bb
@@ -24,6 +24,7 @@ SRC_URI = 
"http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
file://sshd_check_keys \
file://add-test-support-for-busybox.patch \
+   
file://0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch \
"
 SRC_URI[md5sum] = "bf050f002fe510e1daecd39044e1122d"
 SRC_URI[sha256sum] = 
"bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68"
-- 
2.7.4

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


Re: [OE-core] [PATCH 3/3] elfutils: 0.176 -> 0.177

2019-08-23 Thread Hongxu Jia

On 8/23/19 10:26 PM, Adrian Bunk wrote:

On Fri, Aug 23, 2019 at 09:28:11AM +0800, Hongxu Jia wrote:

On 8/23/19 1:01 AM, Adrian Bunk wrote:

On Thu, Aug 22, 2019 at 09:40:18AM +0800, Hongxu Jia wrote:

- Update Debian patches

http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz

- Rebase Debian patches to 0.177
debian/hppa_backend.diff
debian/mips_backend.diff
debian/arm_backend.diff
debian/mips_readelf_w.patch
debian/testsuite-ignore-elflint.diff
debian/mips_cfi.patch
...
   ...1-fix-compile-failure-with-debian-patches.patch |  48 
...
   .../elfutils/files/debian/hppa_backend.diff|  57 +
   .../elfutils/files/debian/hurd_path.patch  |  17 +--
...
   .../elfutils/files/debian/kfreebsd_path.patch  |  13 +-
...
   .../elfutils/files/debian/mips_cfi.patch   | 131 
+
...

Why are we following Debian patches in a package with active upstream?

I am afraid no, we need to rebase them (0.176) to 0.177

The part about rebasing existing patches is clear.

But why are we for example adding mips_cfi.patch when this is not upstream?
There might be a good reason for doing so, but "because it is a Debian patch"
is not a good reason.

And the existing hppa/hurd/kfreebsd patches from Debian are unlikely to
make sense in OE.


I just integrate debian patches as a whole, if you are familiar with 
elfutils and


make sure some of them does not make sense, modification on them is welcome

//Hongxu


//Hongxu

cu
Adrian



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


[OE-core] [PATCH V2] elfutils: 0.176 -> 0.177

2019-08-22 Thread Hongxu Jia
- Update Debian patches
  
http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz

- Rebase Debian patches to 0.177
  debian/hppa_backend.diff
  debian/mips_backend.diff
  debian/arm_backend.diff
  debian/mips_readelf_w.patch
  debian/testsuite-ignore-elflint.diff
  debian/mips_cfi.patch

- Fix build failure while applying debian patches
  0001-fix-compile-failure-with-debian-patches.patch

- Rebase musl patches

Signed-off-by: Hongxu Jia 
---
 .../{elfutils_0.176.bb => elfutils_0.177.bb}   |   8 +-
 ...ferences-between-mips-machine-identifiers.patch |  12 +-
 ...1-fix-compile-failure-with-debian-patches.patch |  48 
 ...-support-for-mips64-abis-in-mips_retval.c.patch |  13 +-
 .../0003-Add-mips-n64-relocation-format-hack.patch |  60 +-
 .../elfutils/files/debian/arm_backend.diff |  39 +++---
 .../elfutils/files/debian/disable_werror.patch |  19 +--
 .../elfutils/files/debian/hppa_backend.diff|  57 +
 .../elfutils/files/debian/hurd_path.patch  |  17 +--
 .../elfutils/files/debian/ignore_strmerge.diff |  15 +--
 .../elfutils/files/debian/kfreebsd_path.patch  |  13 +-
 .../elfutils/files/debian/mips_backend.diff|  42 ---
 .../elfutils/files/debian/mips_cfi.patch   | 131 +
 .../elfutils/files/debian/mips_readelf_w.patch |  22 ++--
 .../files/debian/testsuite-ignore-elflint.diff |  20 ++--
 .../elfutils/files/musl-libs.patch |  39 +-
 .../elfutils/files/musl-obstack-fts.patch  |  29 -
 .../elfutils/files/musl-utils.patch|  37 +-
 18 files changed, 431 insertions(+), 190 deletions(-)
 rename meta/recipes-devtools/elfutils/{elfutils_0.176.bb => elfutils_0.177.bb} 
(95%)
 create mode 100644 
meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch
 create mode 100644 meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch

diff --git a/meta/recipes-devtools/elfutils/elfutils_0.176.bb 
b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
similarity index 95%
rename from meta/recipes-devtools/elfutils/elfutils_0.176.bb
rename to meta/recipes-devtools/elfutils/elfutils_0.177.bb
index d98457e..fcebb4b 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.176.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 DEPENDS = "libtool bzip2 zlib virtual/libintl"
 DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack "
 # The Debian patches below are from:
-# 
http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.175-1.debian.tar.xz
+# 
http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz
 SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
file://0001-dso-link-change.patch \
file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
@@ -28,6 +28,8 @@ SRC_URI = 
"https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
file://debian/ignore_strmerge.diff \
file://debian/disable_werror.patch \
file://debian/testsuite-ignore-elflint.diff \
+   file://debian/mips_cfi.patch \
+   file://debian/0001-fix-compile-failure-with-debian-patches.patch \
file://0001-skip-the-test-when-gcc-not-deployed.patch \
file://run-ptest \
file://ptest.patch \
@@ -38,8 +40,8 @@ SRC_URI_append_libc-musl = " \
file://musl-utils.patch \
file://musl-tests.patch \
"
-SRC_URI[md5sum] = "077e4f49320cad82bf17a997068b1db9"
-SRC_URI[sha256sum] = 
"eb5747c371b0af0f71e86215a5ebb88728533c3a104a43d4231963f308cd1023"
+SRC_URI[md5sum] = "0b583722f911e1632544718d502aab87"
+SRC_URI[sha256sum] = 
"fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e"
 
 inherit autotools gettext ptest
 
diff --git 
a/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
 
b/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
index 892b8e8..a2983c5 100644
--- 
a/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
+++ 
b/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
@@ -1,25 +1,25 @@
-From 46d2c2f8fecad85baeed9fe211f5285820220442 Mon Sep 17 00:00:00 2001
+From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001
 From: James Cowgill 
 Date: Mon, 5 Jan 2015 15:16:58 +
-Subject: [PATCH] Ignore differences between mips machine identifiers
+Subject: [PATCH 1/3] Ignore differences between mips machine identifiers
 
 Little endian binaries actually use EM_MIPS so you can't tell the endianness
 from the elf

Re: [OE-core] [PATCH 3/3] elfutils: 0.176 -> 0.177

2019-08-22 Thread Hongxu Jia

On 8/23/19 1:01 AM, Adrian Bunk wrote:

On Thu, Aug 22, 2019 at 09:40:18AM +0800, Hongxu Jia wrote:

- Update Debian patches
   
http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz

- Rebase Debian patches to 0.177
   debian/hppa_backend.diff
   debian/mips_backend.diff
   debian/arm_backend.diff
   debian/mips_readelf_w.patch
   debian/testsuite-ignore-elflint.diff
   debian/mips_cfi.patch
...
  ...1-fix-compile-failure-with-debian-patches.patch |  48 
...
  .../elfutils/files/debian/hppa_backend.diff|  57 +
  .../elfutils/files/debian/hurd_path.patch  |  17 +--
...
  .../elfutils/files/debian/kfreebsd_path.patch  |  13 +-
...
  .../elfutils/files/debian/mips_cfi.patch   | 131 +
...

Why are we following Debian patches in a package with active upstream?


I am afraid no, we need to rebase them (0.176) to 0.177

//Hongxu


cu
Adrian



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


Re: [OE-core] [PATCH 3/3] elfutils: 0.176 -> 0.177

2019-08-22 Thread Hongxu Jia

On 8/22/19 9:27 PM, Richard Purdie wrote:

On Thu, 2019-08-22 at 09:40 +0800, Hongxu Jia wrote:

- Update Debian patches
   
http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz


- Rebase Debian patches to 0.177
   debian/hppa_backend.diff
   debian/mips_backend.diff
   debian/arm_backend.diff
   debian/mips_readelf_w.patch
   debian/testsuite-ignore-elflint.diff
   debian/mips_cfi.patch

- Fix build failure while applying debian patches
   0001-fix-compile-failure-with-debian-patches.patch

Signed-off-by: Hongxu Jia 
---
  .../{elfutils_0.176.bb => elfutils_0.177.bb}   |   8 +-
  ...ferences-between-mips-machine-identifiers.patch |  12 +-
  ...1-fix-compile-failure-with-debian-patches.patch |  48 
  ...-support-for-mips64-abis-in-mips_retval.c.patch |  13 +-
  .../0003-Add-mips-n64-relocation-format-hack.patch |  60 +-
  .../elfutils/files/debian/arm_backend.diff |  39 +++---
  .../elfutils/files/debian/disable_werror.patch |  19 +--
  .../elfutils/files/debian/hppa_backend.diff|  57 +
  .../elfutils/files/debian/hurd_path.patch  |  17 +--
  .../elfutils/files/debian/ignore_strmerge.diff |  15 +--
  .../elfutils/files/debian/kfreebsd_path.patch  |  13 +-
  .../elfutils/files/debian/mips_backend.diff|  42 ---
  .../elfutils/files/debian/mips_cfi.patch   | 131
+
  .../elfutils/files/debian/mips_readelf_w.patch |  22 ++--
  .../files/debian/testsuite-ignore-elflint.diff |  22 ++--
  15 files changed, 340 insertions(+), 178 deletions(-)
  rename meta/recipes-devtools/elfutils/{elfutils_0.176.bb =>
elfutils_0.177.bb} (95%)
  create mode 100644 meta/recipes-devtools/elfutils/files/debian/0001-
fix-compile-failure-with-debian-patches.patch
  create mode 100644 meta/recipes-
devtools/elfutils/files/debian/mips_cfi.patch

I think the musl patches need refreshing as there are warnings:

https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/962
https://autobuilder.yoctoproject.org/typhoon/#/builders/45/builds/963


Sorry, I forget to do it, v2 incoming

//Hongxu



Cheers,

Richard



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


[OE-core] [PATCH V2 2/3] ncurses: upgrade 6.1+20181013 -> 6.1+20190803

2019-08-21 Thread Hongxu Jia
---
 .../ncurses/{ncurses_6.1+20181013.bb => ncurses_6.1+20190803.bb}| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-core/ncurses/{ncurses_6.1+20181013.bb => 
ncurses_6.1+20190803.bb} (87%)

diff --git a/meta/recipes-core/ncurses/ncurses_6.1+20181013.bb 
b/meta/recipes-core/ncurses/ncurses_6.1+20190803.bb
similarity index 87%
rename from meta/recipes-core/ncurses/ncurses_6.1+20181013.bb
rename to meta/recipes-core/ncurses/ncurses_6.1+20190803.bb
index ef6ca98..a44d78e 100644
--- a/meta/recipes-core/ncurses/ncurses_6.1+20181013.bb
+++ b/meta/recipes-core/ncurses/ncurses_6.1+20190803.bb
@@ -5,7 +5,7 @@ SRC_URI += "file://0001-tic-hang.patch \
 file://config.cache \
 "
 # commit id corresponds to the revision in package version
-SRCREV = "7a97a7f937762ba342d5b2fd7cd090885a809835"
+SRCREV = "3c9b2677c96c645496997321bf2fe465a5e7e21f"
 S = "${WORKDIR}/git"
 EXTRA_OECONF += "--with-abi-version=5 --cache-file=${B}/config.cache"
 UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+(\+\d+)*)"
-- 
2.7.4

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


[OE-core] [PATCH V2 1/3] distcc: upgrade 3.3.2 -> 3.3.3

2019-08-21 Thread Hongxu Jia
---
 meta/recipes-devtools/distcc/{distcc_3.3.2.bb => distcc_3.3.3.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/distcc/{distcc_3.3.2.bb => distcc_3.3.3.bb} (98%)

diff --git a/meta/recipes-devtools/distcc/distcc_3.3.2.bb 
b/meta/recipes-devtools/distcc/distcc_3.3.3.bb
similarity index 98%
rename from meta/recipes-devtools/distcc/distcc_3.3.2.bb
rename to meta/recipes-devtools/distcc/distcc_3.3.3.bb
index a93604b..7942deb 100644
--- a/meta/recipes-devtools/distcc/distcc_3.3.2.bb
+++ b/meta/recipes-devtools/distcc/distcc_3.3.3.bb
@@ -20,7 +20,7 @@ SRC_URI = "git://github.com/distcc/distcc.git \
file://distccmon-gnome.desktop \
file://distcc \
file://distcc.service"
-SRCREV = "8600f0857dac55ea393dc11a860948692d215fc8"
+SRCREV = "4cde9bcfbda589abd842e3bbc652ce369085eaae"
 S = "${WORKDIR}/git"
 
 inherit autotools pkgconfig update-rc.d useradd systemd
-- 
2.7.4

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


[OE-core] [PATCH 3/3] elfutils: 0.176 -> 0.177

2019-08-21 Thread Hongxu Jia
- Update Debian patches
  
http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz

- Rebase Debian patches to 0.177
  debian/hppa_backend.diff
  debian/mips_backend.diff
  debian/arm_backend.diff
  debian/mips_readelf_w.patch
  debian/testsuite-ignore-elflint.diff
  debian/mips_cfi.patch

- Fix build failure while applying debian patches
  0001-fix-compile-failure-with-debian-patches.patch

Signed-off-by: Hongxu Jia 
---
 .../{elfutils_0.176.bb => elfutils_0.177.bb}   |   8 +-
 ...ferences-between-mips-machine-identifiers.patch |  12 +-
 ...1-fix-compile-failure-with-debian-patches.patch |  48 
 ...-support-for-mips64-abis-in-mips_retval.c.patch |  13 +-
 .../0003-Add-mips-n64-relocation-format-hack.patch |  60 +-
 .../elfutils/files/debian/arm_backend.diff |  39 +++---
 .../elfutils/files/debian/disable_werror.patch |  19 +--
 .../elfutils/files/debian/hppa_backend.diff|  57 +
 .../elfutils/files/debian/hurd_path.patch  |  17 +--
 .../elfutils/files/debian/ignore_strmerge.diff |  15 +--
 .../elfutils/files/debian/kfreebsd_path.patch  |  13 +-
 .../elfutils/files/debian/mips_backend.diff|  42 ---
 .../elfutils/files/debian/mips_cfi.patch   | 131 +
 .../elfutils/files/debian/mips_readelf_w.patch |  22 ++--
 .../files/debian/testsuite-ignore-elflint.diff |  22 ++--
 15 files changed, 340 insertions(+), 178 deletions(-)
 rename meta/recipes-devtools/elfutils/{elfutils_0.176.bb => elfutils_0.177.bb} 
(95%)
 create mode 100644 
meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch
 create mode 100644 meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch

diff --git a/meta/recipes-devtools/elfutils/elfutils_0.176.bb 
b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
similarity index 95%
rename from meta/recipes-devtools/elfutils/elfutils_0.176.bb
rename to meta/recipes-devtools/elfutils/elfutils_0.177.bb
index d98457e..fcebb4b 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.176.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 DEPENDS = "libtool bzip2 zlib virtual/libintl"
 DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack "
 # The Debian patches below are from:
-# 
http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.175-1.debian.tar.xz
+# 
http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz
 SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
file://0001-dso-link-change.patch \
file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \
@@ -28,6 +28,8 @@ SRC_URI = 
"https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
file://debian/ignore_strmerge.diff \
file://debian/disable_werror.patch \
file://debian/testsuite-ignore-elflint.diff \
+   file://debian/mips_cfi.patch \
+   file://debian/0001-fix-compile-failure-with-debian-patches.patch \
file://0001-skip-the-test-when-gcc-not-deployed.patch \
file://run-ptest \
file://ptest.patch \
@@ -38,8 +40,8 @@ SRC_URI_append_libc-musl = " \
file://musl-utils.patch \
file://musl-tests.patch \
"
-SRC_URI[md5sum] = "077e4f49320cad82bf17a997068b1db9"
-SRC_URI[sha256sum] = 
"eb5747c371b0af0f71e86215a5ebb88728533c3a104a43d4231963f308cd1023"
+SRC_URI[md5sum] = "0b583722f911e1632544718d502aab87"
+SRC_URI[sha256sum] = 
"fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e"
 
 inherit autotools gettext ptest
 
diff --git 
a/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
 
b/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
index 892b8e8..a2983c5 100644
--- 
a/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
+++ 
b/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch
@@ -1,25 +1,25 @@
-From 46d2c2f8fecad85baeed9fe211f5285820220442 Mon Sep 17 00:00:00 2001
+From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001
 From: James Cowgill 
 Date: Mon, 5 Jan 2015 15:16:58 +
-Subject: [PATCH] Ignore differences between mips machine identifiers
+Subject: [PATCH 1/3] Ignore differences between mips machine identifiers
 
 Little endian binaries actually use EM_MIPS so you can't tell the endianness
 from the elf machine id. Also, the EM_MIPS_RS3_LE machine is dead anyway (the
 kernel will not load binaries containing it).
 
 Signed-off-by: James Cowgill 
+
 Upstream-Status: Pending [from debian]
 Signed-off-by: Hongxu Jia 
-

[OE-core] [PATCH 1/3] distcc: upgrade 3.3.2 -> 3.3.3

2019-08-21 Thread Hongxu Jia
From: Upgrade Helper 

---
 meta/recipes-devtools/distcc/{distcc_3.3.2.bb => distcc_3.3.3.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/distcc/{distcc_3.3.2.bb => distcc_3.3.3.bb} (98%)

diff --git a/meta/recipes-devtools/distcc/distcc_3.3.2.bb 
b/meta/recipes-devtools/distcc/distcc_3.3.3.bb
similarity index 98%
rename from meta/recipes-devtools/distcc/distcc_3.3.2.bb
rename to meta/recipes-devtools/distcc/distcc_3.3.3.bb
index a93604b..7942deb 100644
--- a/meta/recipes-devtools/distcc/distcc_3.3.2.bb
+++ b/meta/recipes-devtools/distcc/distcc_3.3.3.bb
@@ -20,7 +20,7 @@ SRC_URI = "git://github.com/distcc/distcc.git \
file://distccmon-gnome.desktop \
file://distcc \
file://distcc.service"
-SRCREV = "8600f0857dac55ea393dc11a860948692d215fc8"
+SRCREV = "4cde9bcfbda589abd842e3bbc652ce369085eaae"
 S = "${WORKDIR}/git"
 
 inherit autotools pkgconfig update-rc.d useradd systemd
-- 
2.7.4

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


[OE-core] [PATCH 2/3] ncurses: upgrade 6.1+20181013 -> 6.1+20190803

2019-08-21 Thread Hongxu Jia
From: Upgrade Helper 

---
 .../ncurses/{ncurses_6.1+20181013.bb => ncurses_6.1+20190803.bb}| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-core/ncurses/{ncurses_6.1+20181013.bb => 
ncurses_6.1+20190803.bb} (87%)

diff --git a/meta/recipes-core/ncurses/ncurses_6.1+20181013.bb 
b/meta/recipes-core/ncurses/ncurses_6.1+20190803.bb
similarity index 87%
rename from meta/recipes-core/ncurses/ncurses_6.1+20181013.bb
rename to meta/recipes-core/ncurses/ncurses_6.1+20190803.bb
index ef6ca98..a44d78e 100644
--- a/meta/recipes-core/ncurses/ncurses_6.1+20181013.bb
+++ b/meta/recipes-core/ncurses/ncurses_6.1+20190803.bb
@@ -5,7 +5,7 @@ SRC_URI += "file://0001-tic-hang.patch \
 file://config.cache \
 "
 # commit id corresponds to the revision in package version
-SRCREV = "7a97a7f937762ba342d5b2fd7cd090885a809835"
+SRCREV = "3c9b2677c96c645496997321bf2fe465a5e7e21f"
 S = "${WORKDIR}/git"
 EXTRA_OECONF += "--with-abi-version=5 --cache-file=${B}/config.cache"
 UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+(\+\d+)*)"
-- 
2.7.4

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


[OE-core] [PATCH] util-linux: fix uuidd failed with /run/uuidd not found

2019-08-20 Thread Hongxu Jia
It failed to run uuidd
...
root@qemux86-64:~# uuidd
uuidd: cannot open /run/uuidd/uuidd.pid: No such file or directory
...

Create dir /run/uuidd for both of systemd and sysvinit

Signed-off-by: Hongxu Jia 
---
 meta/recipes-core/util-linux/util-linux.inc | 21 +
 1 file changed, 21 insertions(+)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index 84c7012..90a4750 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -127,6 +127,11 @@ FILES_${PN}-dev += 
"${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
 FILES_${PN}-mount = "${sysconfdir}/default/mountall"
 FILES_${PN}-runuser = "${sysconfdir}/pam.d/runuser*"
 FILES_${PN}-su = "${sysconfdir}/pam.d/su-l"
+FILES_${PN}-uuidd = " \
+/etc/tmpfiles.d/uuidd.conf \
+/etc/default/volatiles/99_uuidd \
+"
+
 CONFFILES_${PN}-su = "${sysconfdir}/pam.d/su-l"
 FILES_${PN}-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
   ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
@@ -155,6 +160,12 @@ SYSTEMD_AUTO_ENABLE_${PN}-uuidd = "disable"
 SYSTEMD_SERVICE_${PN}-fstrim = "fstrim.timer fstrim.service"
 SYSTEMD_AUTO_ENABLE_${PN}-fstrim = "disable"
 
+pkg_postinst_${PN}-uuidd() {
+   if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; 
then
+   ${sysconfdir}/init.d/populate-volatile.sh update
+   fi
+}
+
 do_install () {
# with ccache the timestamps on compiled files may
# end up earlier than on their inputs, this allows
@@ -202,6 +213,16 @@ do_install () {
# and thus prevents the operation.
ln -s su ${D}${sysconfdir}/pam.d/su-l
fi
+
+   if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', 
d)}; then
+   install -d ${D}${sysconfdir}/tmpfiles.d
+   echo "d /run/uuidd 0755 root root - -" > 
${D}${sysconfdir}/tmpfiles.d/uuidd.conf
+   fi
+
+   if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', 
d)}; then
+   install -d ${D}${sysconfdir}/default/volatiles
+   echo "d root root 0755 /run/uuidd none" > 
${D}${sysconfdir}/default/volatiles/99_uuidd
+   fi
 }
 
 # nologin causes a conflict with shadow-native
-- 
2.8.1

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


[OE-core] [PATCH V3] nfs-utils: decrease RLIMIT_NOFILE to 4k for systemd

2019-08-19 Thread Hongxu Jia
On systemd, it set RLIMIT_NOFILE to 512k, since do_testimage
for core-image-sato-sdk has memory limitation (256Mib) which
caused rpc.statd failed with out of memory.
[  531.306146] Out of memory: Kill process 193 (rpc.statd) score 200 or 
sacrifice child

The rpc.statd and rpc.mountd allocates memory according to
RLIMIT_NOFILE, so decrease it to 4k to keep sync with sysvinit

After applying the patch, the memory cost is the same with sysvinit:

root@qemux86-64:~# systemctl status nfs-statd
* nfs-statd.service - NFS status monitor for NFSv2/3 locking.
   Loaded: loaded (/lib/systemd/system/nfs-statd.service; enabled; vendor 
preset: enabled)
   Active: active (running) since Tue 2019-08-20 03:16:18 UTC; 3min 26s ago
 Main PID: 343 (rpc.statd)
Tasks: 1 (limit: 271)
   Memory: 1.0M

root@qemux86-64:~# systemctl status nfs-mountd
* nfs-mountd.service - NFS Mount Daemon
   Loaded: loaded (/etc/systemd/system/nfs-mountd.service; enabled; vendor 
preset: enabled)
   Active: active (running) since Tue 2019-08-20 03:19:01 UTC; 1min 21s ago
 Main PID: 451 (rpc.mountd)
Tasks: 1 (limit: 271)
   Memory: 736.0K

Suggested-by: Chen Qi 
Signed-off-by: Hongxu Jia 
---
 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service | 1 +
 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service  | 1 +
 meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb   | 4 
 3 files changed, 6 insertions(+)

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service 
b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service
index 3c3a802..c01415d 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service
@@ -11,6 +11,7 @@ ConditionPathExists=@SYSCONFDIR@/exports
 [Service]
 EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf
 ExecStart=@SBINDIR@/rpc.mountd -F $MOUNTD_OPTS
+LimitNOFILE=@HIGH_RLIMIT_NOFILE@
 
 [Install]
 WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service 
b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service
index 6e196b8..4fa64e1 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service
@@ -8,6 +8,7 @@ After=network.target nss-lookup.target rpcbind.service
 [Service]
 EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf
 ExecStart=@SBINDIR@/rpc.statd -F $STATD_OPTS
+LimitNOFILE=@HIGH_RLIMIT_NOFILE@
 
 [Install]
 WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb 
b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb
index ac4437b..28f9898 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb
@@ -119,6 +119,9 @@ do_compile_prepend() {
make clean
 }
 
+# Works on systemd only
+HIGH_RLIMIT_NOFILE ??= "4096"
+
 do_install_append () {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
@@ -133,6 +136,7 @@ do_install_append () {
install -m 0644 ${WORKDIR}/nfs-statd.service 
${D}${systemd_unitdir}/system/
sed -i -e 's,@SBINDIR@,${sbindir},g' \
-e 's,@SYSCONFDIR@,${sysconfdir},g' \
+   -e 's,@HIGH_RLIMIT_NOFILE@,${HIGH_RLIMIT_NOFILE},g' \
${D}${systemd_unitdir}/system/*.service
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount 
${D}${systemd_unitdir}/system/
-- 
2.8.1

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


[OE-core] [PATCH V2] systemd: add menson option to decrease RLIMIT_NOFILE on qemu bsp

2019-08-19 Thread Hongxu Jia
Since do_testimage for core-image-sato-sdk has memory limitation (256Mib)
which caused rpc.statd failed with out of memory.
[  531.306146] Out of memory: Kill process 193 (rpc.statd) score 200 or 
sacrifice child

The rpc.statd allocates memory according to RLIMIT_NOFILE,
so decrease RLIMIT_NOFILE to 4k to keep sync with sysvinit

After applying the patch, the memory cost is the same with sysvinit
rpcuser340  0.0  1.0   3212  2588 ?Ss   13:20   0:00 
/usr/sbin/rpc.statd -F
root   473  0.0  0.2   3464   496 ?Ss   13:23   0:00 
/usr/sbin/rpc.mountd

For other bsp, still keep RLIMIT_NOFILE to 512k by default

Signed-off-by: Hongxu Jia 
---
 ...001-meson-add-option-to-set-RLIMIT_NOFILE.patch | 50 ++
 meta/recipes-core/systemd/systemd_242.bb   |  5 +++
 2 files changed, 55 insertions(+)
 create mode 100644 
meta/recipes-core/systemd/systemd/0001-meson-add-option-to-set-RLIMIT_NOFILE.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-meson-add-option-to-set-RLIMIT_NOFILE.patch
 
b/meta/recipes-core/systemd/systemd/0001-meson-add-option-to-set-RLIMIT_NOFILE.patch
new file mode 100644
index 000..e822238
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0001-meson-add-option-to-set-RLIMIT_NOFILE.patch
@@ -0,0 +1,50 @@
+From d42d1512402de0d2249e2d68040c5c3887e7ea99 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Mon, 19 Aug 2019 12:06:59 -0400
+Subject: [PATCH] meson: add option to set RLIMIT_NOFILE
+
+Add option to set RLIMIT_NOFILE and keep 512*1024 by default
+
+It is helpful for embedded device which has memory limitation
+to decrease RLIMIT_NOFILE
+
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/13359]
+
+Signed-off-by: Hongxu Jia 
+---
+ meson.build   | 2 +-
+ meson_options.txt | 5 +
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 18a7cc5..26d9cf0 100644
+--- a/meson.build
 b/meson.build
+@@ -79,7 +79,7 @@ conf.set10('HAVE_SYSV_COMPAT', sysvinit_path != '' and 
sysvrcnd_path != '',
+ 
+ conf.set10('BUMP_PROC_SYS_FS_FILE_MAX', 
get_option('bump-proc-sys-fs-file-max'))
+ conf.set10('BUMP_PROC_SYS_FS_NR_OPEN',  
get_option('bump-proc-sys-fs-nr-open'))
+-conf.set('HIGH_RLIMIT_NOFILE',  512*1024)
++conf.set('HIGH_RLIMIT_NOFILE',  get_option('high-rlimit-nofile'))
+ 
+ # join_paths ignores the preceding arguments if an absolute component is
+ # encountered, so this should canonicalize various paths when they are
+diff --git a/meson_options.txt b/meson_options.txt
+index d4ec37d..5d4ee18 100644
+--- a/meson_options.txt
 b/meson_options.txt
+@@ -56,6 +56,11 @@ option('bump-proc-sys-fs-file-max', type : 'boolean',
+description : 'bump /proc/sys/fs/file-max to ULONG_MAX')
+ option('bump-proc-sys-fs-nr-open', type : 'boolean',
+description : 'bump /proc/sys/fs/nr_open to INT_MAX')
++
++# Default is 512*1024
++option('high-rlimit-nofile', type : 'integer', value : 524288,
++   description : 'set RLIMIT_NOFILE')
++
+ option('valgrind', type : 'boolean', value : false,
+description : 'do extra operations to avoid valgrind warnings')
+ option('log-trace', type : 'boolean', value : false,
+-- 
+2.8.1
+
diff --git a/meta/recipes-core/systemd/systemd_242.bb 
b/meta/recipes-core/systemd/systemd_242.bb
index 1953fef..96a53dc 100644
--- a/meta/recipes-core/systemd/systemd_242.bb
+++ b/meta/recipes-core/systemd/systemd_242.bb
@@ -28,6 +28,7 @@ SRC_URI += "file://touchscreen.rules \

file://0001-core-set-fs.file-max-sysctl-to-LONG_MAX-rather-than-.patch \
file://0001-networkd-fix-link-up.patch \
file://0002-network-do-not-send-ipv6.patch \
+   file://0001-meson-add-option-to-set-RLIMIT_NOFILE.patch \
"
 
 # patches needed by musl
@@ -211,6 +212,10 @@ EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
   -Dsulogin-path=${base_sbindir}/sulogin \
   -Dumount-path=${base_bindir}/umount"
 
+EXTRA_OEMESON += "-Dhigh-rlimit-nofile=${RLIMIT_NOFILE}"
+RLIMIT_NOFILE ??= "524288"
+RLIMIT_NOFILE_qemuall ?= "4096"
+
 do_install() {
meson_do_install
install -d ${D}/${base_sbindir}
-- 
2.8.1

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


Re: [OE-core] [PATCH] systemd: decreasing default RLIMIT_NOFILE on qemu bsp

2019-08-19 Thread Hongxu Jia

On 8/19/19 10:01 PM, Alexander Kanavin wrote:
Should the limit be simply raised? The 256M setup is crumbling on 
several fronts (runtime tests, modernisation of X, various non-x86 
qemu targets). Adding per-image/target exceptions, custom 
non-upstreamable patches, or sticking to deprecated configurations 
isn't the right thing to do, I think.


The modification of set default RLIMIT_NOFILE(4k) just keeps sync with 
the one in sysvinit,


if the fronts you mentioned are working fine on sysvinit, I think it 
should be OK on systemd


but whether it has side effect or not still depends on the result of 
image test



The fix is trying to fix the blocking issue while switching init manager 
from sysvinit to systemd for poky



Hi RP,

Should we make HIGH_RLIMIT_NOFILE configurable from local.conf?

Then we could modify it according to the requirement, such as set it to 
4k at image test


//Hongxu



Alex

On Mon, 19 Aug 2019 at 15:34, Hongxu Jia <mailto:hongxu@windriver.com>> wrote:


Since do_testimage for core-image-sato-sdk has memory limitation
(256Mib)
which caused rpc.statd failed with out of memory.
[  531.306146] Out of memory: Kill process 193 (rpc.statd) score
200 or sacrifice child

The rpc.statd allocates memory according to RLIMIT_NOFILE,
so decrease it to 4k to keep sync with sysvinit

After applying the patch, the memory cost is the same with sysvinit
rpcuser    340  0.0  1.0   3212  2588 ?        Ss   13:20  0:00
/usr/sbin/rpc.statd -F
root       473  0.0  0.2   3464   496 ?        Ss   13:23  0:00
/usr/sbin/rpc.mountd

Signed-off-by: Hongxu Jia mailto:hongxu@windriver.com>>
---
 ...0001-decreasing-the-default-RLIMIT_NOFILE.patch | 35
++
 meta/recipes-core/systemd/systemd_242.bb <http://systemd_242.bb>
         |  4 +++
 2 files changed, 39 insertions(+)
 create mode 100644

meta/recipes-core/systemd/systemd/0001-decreasing-the-default-RLIMIT_NOFILE.patch

diff --git

a/meta/recipes-core/systemd/systemd/0001-decreasing-the-default-RLIMIT_NOFILE.patch

b/meta/recipes-core/systemd/systemd/0001-decreasing-the-default-RLIMIT_NOFILE.patch
new file mode 100644
index 000..fb8e2c9
--- /dev/null
+++

b/meta/recipes-core/systemd/systemd/0001-decreasing-the-default-RLIMIT_NOFILE.patch
@@ -0,0 +1,35 @@
+From 55c7196163e481c508fa708b9b8f5e7bf2d2f007 Mon Sep 17 00:00:00
2001
+From: Hongxu Jia mailto:hongxu@windriver.com>>
+Date: Mon, 19 Aug 2019 07:16:47 -0400
+Subject: [PATCH] decreasing the default RLIMIT_NOFILE
+
+Since do_testimage for core-image-sato-sdk has memory limits (256Mib)
+which caused rpc.statd failed with out of memory.
+[  531.306146] Out of memory: Kill process 193 (rpc.statd) score
200 or sacrifice child
+
+The rpc.statd allocates memory according to RLIMIT_NOFILE,
+so decrease it to 4k which keep sync with sysvinit
+
+Upstream-Status: Inappropriate [oe specific]
+
    +Signed-off-by: Hongxu Jia mailto:hongxu@windriver.com>>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 18a7cc5..e30894b 100644
+--- a/meson.build
 b/meson.build
+@@ -79,7 +79,7 @@ conf.set10('HAVE_SYSV_COMPAT', sysvinit_path !=
'' and sysvrcnd_path != '',
+
+ conf.set10('BUMP_PROC_SYS_FS_FILE_MAX',
get_option('bump-proc-sys-fs-file-max'))
+ conf.set10('BUMP_PROC_SYS_FS_NR_OPEN',
get_option('bump-proc-sys-fs-nr-open'))
+-conf.set('HIGH_RLIMIT_NOFILE',          512*1024)
++conf.set('HIGH_RLIMIT_NOFILE',          4*1024)
+
+ # join_paths ignores the preceding arguments if an absolute
component is
+ # encountered, so this should canonicalize various paths when
they are
+--
+2.8.1
+
diff --git a/meta/recipes-core/systemd/systemd_242.bb
<http://systemd_242.bb> b/meta/recipes-core/systemd/systemd_242.bb
<http://systemd_242.bb>
index 1953fef..ab15ad2 100644
--- a/meta/recipes-core/systemd/systemd_242.bb <http://systemd_242.bb>
+++ b/meta/recipes-core/systemd/systemd_242.bb <http://systemd_242.bb>
@@ -58,6 +58,10 @@ SRC_URI_MUSL =
"file://0001-Use-getenv-when-secure-versions-are-not-available.pa
<http://available.pa>
file://0001-do-not-disable-buffer-in-writing-files.patch \
                "

+SRC_URI_append_qemuall = " \
+  file://0001-decreasing-the-default-RLIMIT_NOFILE.patch \
+"
+
 PAM_PLUGINS = " \
     pam-plugin-unix \
     pam-plugin-loginuid \
-- 
2.8.1


-- 
___

Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
<mailto:Openembedded-core@l

[OE-core] [PATCH] systemd: decreasing default RLIMIT_NOFILE on qemu bsp

2019-08-19 Thread Hongxu Jia
Since do_testimage for core-image-sato-sdk has memory limitation (256Mib)
which caused rpc.statd failed with out of memory.
[  531.306146] Out of memory: Kill process 193 (rpc.statd) score 200 or 
sacrifice child

The rpc.statd allocates memory according to RLIMIT_NOFILE,
so decrease it to 4k to keep sync with sysvinit

After applying the patch, the memory cost is the same with sysvinit
rpcuser340  0.0  1.0   3212  2588 ?Ss   13:20   0:00 
/usr/sbin/rpc.statd -F
root   473  0.0  0.2   3464   496 ?Ss   13:23   0:00 
/usr/sbin/rpc.mountd

Signed-off-by: Hongxu Jia 
---
 ...0001-decreasing-the-default-RLIMIT_NOFILE.patch | 35 ++
 meta/recipes-core/systemd/systemd_242.bb   |  4 +++
 2 files changed, 39 insertions(+)
 create mode 100644 
meta/recipes-core/systemd/systemd/0001-decreasing-the-default-RLIMIT_NOFILE.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-decreasing-the-default-RLIMIT_NOFILE.patch
 
b/meta/recipes-core/systemd/systemd/0001-decreasing-the-default-RLIMIT_NOFILE.patch
new file mode 100644
index 000..fb8e2c9
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0001-decreasing-the-default-RLIMIT_NOFILE.patch
@@ -0,0 +1,35 @@
+From 55c7196163e481c508fa708b9b8f5e7bf2d2f007 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Mon, 19 Aug 2019 07:16:47 -0400
+Subject: [PATCH] decreasing the default RLIMIT_NOFILE
+
+Since do_testimage for core-image-sato-sdk has memory limits (256Mib)
+which caused rpc.statd failed with out of memory.
+[  531.306146] Out of memory: Kill process 193 (rpc.statd) score 200 or 
sacrifice child
+
+The rpc.statd allocates memory according to RLIMIT_NOFILE,
+so decrease it to 4k which keep sync with sysvinit
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 18a7cc5..e30894b 100644
+--- a/meson.build
 b/meson.build
+@@ -79,7 +79,7 @@ conf.set10('HAVE_SYSV_COMPAT', sysvinit_path != '' and 
sysvrcnd_path != '',
+ 
+ conf.set10('BUMP_PROC_SYS_FS_FILE_MAX', 
get_option('bump-proc-sys-fs-file-max'))
+ conf.set10('BUMP_PROC_SYS_FS_NR_OPEN',  
get_option('bump-proc-sys-fs-nr-open'))
+-conf.set('HIGH_RLIMIT_NOFILE',  512*1024)
++conf.set('HIGH_RLIMIT_NOFILE',  4*1024)
+ 
+ # join_paths ignores the preceding arguments if an absolute component is
+ # encountered, so this should canonicalize various paths when they are
+-- 
+2.8.1
+
diff --git a/meta/recipes-core/systemd/systemd_242.bb 
b/meta/recipes-core/systemd/systemd_242.bb
index 1953fef..ab15ad2 100644
--- a/meta/recipes-core/systemd/systemd_242.bb
+++ b/meta/recipes-core/systemd/systemd_242.bb
@@ -58,6 +58,10 @@ SRC_URI_MUSL = 
"file://0001-Use-getenv-when-secure-versions-are-not-available.pa
file://0001-do-not-disable-buffer-in-writing-files.patch \
"
 
+SRC_URI_append_qemuall = " \
+   file://0001-decreasing-the-default-RLIMIT_NOFILE.patch \
+"
+
 PAM_PLUGINS = " \
 pam-plugin-unix \
 pam-plugin-loginuid \
-- 
2.8.1

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


[OE-core] [PATCH] grub: add grub-native

2019-08-07 Thread Hongxu Jia
Not only grub-efi-native, but also add grub-native to provide
grub utilities on host

Signed-off-by: Hongxu Jia 
---
 meta/recipes-bsp/grub/grub-efi_2.04.bb | 2 --
 meta/recipes-bsp/grub/grub2.inc| 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-bsp/grub/grub-efi_2.04.bb 
b/meta/recipes-bsp/grub/grub-efi_2.04.bb
index 0a1f7d1..ea8cda9 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.04.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.04.bb
@@ -107,5 +107,3 @@ INSANE_SKIP_${PN}_append_linux-gnux32 = " arch"
 INSANE_SKIP_${PN}-dbg_append_linux-gnux32 = " arch"
 INSANE_SKIP_${PN}_append_linux-muslx32 = " arch"
 INSANE_SKIP_${PN}-dbg_append_linux-muslx32 = " arch"
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 9544b36..c81def2 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -65,3 +65,5 @@ do_configure_prepend() {
 }
 
 RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native"
-- 
2.7.4

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


[OE-core] [PATCH] archive: fix racing between do_ar_patched and do_kernel_configme

2019-07-25 Thread Hongxu Jia
While archive mode is 'patched', there is a probably racing between
do_ar_patched and do_kernel_configme
[snip]
|File: 'oe-core/meta/classes/archiver.bbclass', lineno: 313, function: 
create_tarball
...
|Exception: FileNotFoundError: [Errno 2] No such file or directory: 'build/
tmp-glibc/work-shared/qemux86-64/kernel-source/.tmp.config.DCUH7mUNe3'
[snip]

Task do_kernel_configme will modify ${S}, and it broke create_tarball in
do_ar_patched.

Order do_kernel_configme and do_ar_patched to avoid racing.

Also improve sstatesig.py to respect commit [fed0ed8 archiver.bbclass: do
not cause kernel rebuilds]

Signed-off-by: Hongxu Jia 
---
 meta/classes/archiver.bbclass | 8 ++--
 meta/lib/oe/sstatesig.py  | 3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index af9f010..72ce34a 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -487,7 +487,11 @@ python () {
 # Add tasks in the correct order, specifically for linux-yocto to avoid 
race condition.
 # sstatesig.py:sstate_rundepfilter has special support that excludes this 
dependency
 # so that do_kernel_configme does not need to run again when 
do_unpack_and_patch
-# gets added or removed (by adding or removing archiver.bbclass).
+# or do_ar_patched gets added or removed (by adding or removing 
archiver.bbclass).
 if bb.data.inherits_class('kernel-yocto', d):
-bb.build.addtask('do_kernel_configme', 'do_configure', 
'do_unpack_and_patch', d)
+ar_src = d.getVarFlag('ARCHIVER_MODE', 'src')
+if ar_src == "patched":
+bb.build.addtask('do_kernel_configme', 'do_configure', 
'do_ar_patched', d)
+else:
+bb.build.addtask('do_kernel_configme', 'do_configure', 
'do_unpack_and_patch', d)
 }
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 13af16e..b1b9c39 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -28,7 +28,8 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, 
depname, dataCache):
 # The exception is the special do_kernel_configme->do_unpack_and_patch
 # dependency from archiver.bbclass.
 if recipename == depname:
-if task == "do_kernel_configme" and 
dep.endswith(".do_unpack_and_patch"):
+if task == "do_kernel_configme" and 
(dep.endswith(".do_unpack_and_patch") or \
+ dep.endswith(".do_ar_patched")):
 return False
 return True
 
-- 
2.8.1

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


Re: [OE-core] [PATCH] xmlto: set CLEANBROKEN = "1"

2019-06-17 Thread Hongxu Jia

Ping

//Hongxu

On 5/21/19 4:49 PM, Hongxu Jia wrote:

While rebuilding xmlto or xmlto-native, `make clean' in do_configure
will remove man/man1/xmlif.1 which triger failure in do_compile

$ bitbake xmlto-native
$ bitbake xmlto-native -cconfigure -f
$ bitbake xmlto-native -ccompile -f
...
|FORMAT_DIR=./format /bin/bash ./xmlto -o man/man1 man doc/xmlif.xml
|xmlto: tmp-glibc/work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/
doc/xmlif.xml does not validate (status 3)
|xmlto: Fix document syntax or use --skip-validation option
I/O error : Attempt to load network entity http://www.oasis-open.org/
docbook/xml/4.2/docbookx.dtd
...

Signed-off-by: Hongxu Jia 
---
  meta/recipes-devtools/xmlto/xmlto_0.0.28.bb | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb 
b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
index df798df..7d27c43 100644
--- a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
+++ b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
@@ -13,6 +13,8 @@ SRC_URI[sha256sum] = 
"2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51f
  
  inherit autotools
  
+CLEANBROKEN = "1"

+
  DEPENDS = "libxml2-native"
  
  RDEPENDS_${PN} = "docbook-xml-dtd4 \



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


Re: [OE-core] [PATCH] openssh: fix potential signed overflow in pointer arithmatic

2019-06-16 Thread Hongxu Jia

On 6/17/19 10:17 AM, Hongxu Jia wrote:

Pointer arithmatic results in implementation defined signed integer
type, so that 'd - dst’ in strlcat may trigger signed overflow if
pointer ‘d’ is near 0x7fff in 32 bits system. In case of ompilation
by gcc or clang with -ftrapv option, the overflow would generate
program abort.

Signed-off-by: hguo3 
Signed-off-by: Hongxu Jia 
---
  ...ial-signed-overflow-in-pointer-arithmatic.patch | 26 --
  1 file changed, 19 insertions(+), 7 deletions(-)

diff --git 
a/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
 
b/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
index 7e043a2..20036da 100644
--- 
a/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
+++ 
b/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
@@ -11,14 +11,17 @@ would lead to program abort.
  Upstream-Status: Submitted [http://bugzilla.mindrot.org/show_bug.cgi?id=2608]
  


BTW, I've submitted the V2 fix to above upstream site

//Hongxu



  Signed-off-by: Yuanjie Huang 
+
+Complete the fix
+Signed-off-by: Hongxu Jia 
  ---
- openbsd-compat/strlcat.c | 8 ++--
- openbsd-compat/strlcpy.c | 8 ++--
- openbsd-compat/strnlen.c | 8 ++--
- 3 files changed, 18 insertions(+), 6 deletions(-)
+ openbsd-compat/strlcat.c | 10 +++---
+ openbsd-compat/strlcpy.c |  8 ++--
+ openbsd-compat/strnlen.c |  8 ++--
+ 3 files changed, 19 insertions(+), 7 deletions(-)
  
  diff --git a/openbsd-compat/strlcat.c b/openbsd-compat/strlcat.c

-index bcc1b61..e758ebf 100644
+index bcc1b61..124e1e3 100644
  --- a/openbsd-compat/strlcat.c
  +++ b/openbsd-compat/strlcat.c
  @@ -23,6 +23,7 @@
@@ -29,6 +32,15 @@ index bcc1b61..e758ebf 100644
   
   /*

* Appends src to string dst of size siz (unlike strncat, siz is the
+@@ -42,7 +43,7 @@ strlcat(char *dst, const char *src, size_t siz)
+   /* Find the end of dst and adjust bytes left but don't go past end */
+   while (n-- != 0 && *d != '\0')
+   d++;
+-  dlen = d - dst;
++  dlen = (uintptr_t)d - (uintptr_t)dst;
+   n = siz - dlen;
+
+   if (n == 0)
  @@ -55,8 +56,11 @@ strlcat(char *dst, const char *src, size_t siz)
s++;
}
@@ -70,7 +82,7 @@ index b4b1b60..b06f374 100644
   
   #endif /* !HAVE_STRLCPY */

  diff --git a/openbsd-compat/strnlen.c b/openbsd-compat/strnlen.c
-index 93d5155..9b8de5d 100644
+index 7ad3573..7040f1f 100644
  --- a/openbsd-compat/strnlen.c
  +++ b/openbsd-compat/strnlen.c
  @@ -23,6 +23,7 @@
@@ -95,5 +107,5 @@ index 93d5155..9b8de5d 100644
   }
   #endif
  --
-1.9.1
+2.17.1
  



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


[OE-core] [PATCH] openssh: fix potential signed overflow in pointer arithmatic

2019-06-16 Thread Hongxu Jia
Pointer arithmatic results in implementation defined signed integer
type, so that 'd - dst’ in strlcat may trigger signed overflow if
pointer ‘d’ is near 0x7fff in 32 bits system. In case of ompilation
by gcc or clang with -ftrapv option, the overflow would generate
program abort.

Signed-off-by: hguo3 
Signed-off-by: Hongxu Jia 
---
 ...ial-signed-overflow-in-pointer-arithmatic.patch | 26 --
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git 
a/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
 
b/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
index 7e043a2..20036da 100644
--- 
a/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
+++ 
b/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
@@ -11,14 +11,17 @@ would lead to program abort.
 Upstream-Status: Submitted [http://bugzilla.mindrot.org/show_bug.cgi?id=2608]
 
 Signed-off-by: Yuanjie Huang 
+
+Complete the fix
+Signed-off-by: Hongxu Jia 
 ---
- openbsd-compat/strlcat.c | 8 ++--
- openbsd-compat/strlcpy.c | 8 ++--
- openbsd-compat/strnlen.c | 8 ++--
- 3 files changed, 18 insertions(+), 6 deletions(-)
+ openbsd-compat/strlcat.c | 10 +++---
+ openbsd-compat/strlcpy.c |  8 ++--
+ openbsd-compat/strnlen.c |  8 ++--
+ 3 files changed, 19 insertions(+), 7 deletions(-)
 
 diff --git a/openbsd-compat/strlcat.c b/openbsd-compat/strlcat.c
-index bcc1b61..e758ebf 100644
+index bcc1b61..124e1e3 100644
 --- a/openbsd-compat/strlcat.c
 +++ b/openbsd-compat/strlcat.c
 @@ -23,6 +23,7 @@
@@ -29,6 +32,15 @@ index bcc1b61..e758ebf 100644
  
  /*
   * Appends src to string dst of size siz (unlike strncat, siz is the
+@@ -42,7 +43,7 @@ strlcat(char *dst, const char *src, size_t siz)
+   /* Find the end of dst and adjust bytes left but don't go past end */
+   while (n-- != 0 && *d != '\0')
+   d++;
+-  dlen = d - dst;
++  dlen = (uintptr_t)d - (uintptr_t)dst;
+   n = siz - dlen;
+ 
+   if (n == 0)
 @@ -55,8 +56,11 @@ strlcat(char *dst, const char *src, size_t siz)
s++;
}
@@ -70,7 +82,7 @@ index b4b1b60..b06f374 100644
  
  #endif /* !HAVE_STRLCPY */
 diff --git a/openbsd-compat/strnlen.c b/openbsd-compat/strnlen.c
-index 93d5155..9b8de5d 100644
+index 7ad3573..7040f1f 100644
 --- a/openbsd-compat/strnlen.c
 +++ b/openbsd-compat/strnlen.c
 @@ -23,6 +23,7 @@
@@ -95,5 +107,5 @@ index 93d5155..9b8de5d 100644
  }
  #endif
 -- 
-1.9.1
+2.17.1
 
-- 
2.8.1

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


Re: [OE-core] [PATCH] diffutils/run-ptest: support to run at arbitrary path

2019-06-13 Thread Hongxu Jia

On 6/13/19 6:07 PM, Burton, Ross wrote:

Are you going to fix all of the other recipes?  Very few recipes let
you run the tests from an arbitrary directory, and assume that you're
in the test directory already.


Only focus on this recipe, my original task is to resolve 2. Fix 
large-subopt.in1 not found,


and 1 is my deeper improvement. I know most of ptest require to run in 
specific dir


//Hongxu



Ross

On Thu, 13 Jun 2019 at 09:08, Hongxu Jia  wrote:

1. Run run-ptest at arbitrary path

2. Fix large-subopt.in1 not found
...
|diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in1:
No such file or directory
|diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in2:
No such file or directory
...

Signed-off-by: Hongxu Jia 
---
  meta/recipes-extended/diffutils/diffutils/run-ptest | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/diffutils/diffutils/run-ptest 
b/meta/recipes-extended/diffutils/diffutils/run-ptest
index 695c5e8a7b..ad467d9bd0 100644
--- a/meta/recipes-extended/diffutils/diffutils/run-ptest
+++ b/meta/recipes-extended/diffutils/diffutils/run-ptest
@@ -1,3 +1,4 @@
  #!/bin/sh

-make -C tests check-TESTS
+abs_ptestdir=`echo "$(cd "$(dirname "$0")"; pwd)"`
+make -C $abs_ptestdir/tests check-TESTS abs_top_srcdir="$abs_ptestdir"
--
2.17.1

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



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


[OE-core] [PATCH] diffutils/run-ptest: support to run at arbitrary path

2019-06-13 Thread Hongxu Jia
1. Run run-ptest at arbitrary path

2. Fix large-subopt.in1 not found
...
|diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in1:
No such file or directory
|diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in2:
No such file or directory
...

Signed-off-by: Hongxu Jia 
---
 meta/recipes-extended/diffutils/diffutils/run-ptest | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/diffutils/diffutils/run-ptest 
b/meta/recipes-extended/diffutils/diffutils/run-ptest
index 695c5e8a7b..ad467d9bd0 100644
--- a/meta/recipes-extended/diffutils/diffutils/run-ptest
+++ b/meta/recipes-extended/diffutils/diffutils/run-ptest
@@ -1,3 +1,4 @@
 #!/bin/sh
 
-make -C tests check-TESTS
+abs_ptestdir=`echo "$(cd "$(dirname "$0")"; pwd)"`
+make -C $abs_ptestdir/tests check-TESTS abs_top_srcdir="$abs_ptestdir"
-- 
2.17.1

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


Re: [OE-core] meta-openembedded git repo in some of the openembedded-core-contrib branches

2019-06-11 Thread Hongxu Jia

On 6/12/19 4:01 AM, Martin Jansa wrote:

Hi,

when accidentally checking for some old meta-oe commit in oe-core
repository I was surprised that it was found in some of the contrib
branches:


Sorry for the mistake


~/openembedded-core $ git branch -a --contains 30bbde3d09e
   remotes/contrib/hongxu/add-recipes-20190215
   remotes/contrib/hongxu/dbg-split
   remotes/contrib/hongxu/misc-fixes

These branches are actually from meta-oe repo, not oe-core.

Please remove old irrelevant branches from -contrib repositories:
https://git.openembedded.org/openembedded-core-contrib/
https://git.openembedded.org/meta-openembedded-contrib/

and make sure you're pushing to the right remote :), it unnecessary
almost doubles the repo size.


I 've already cleaned them up on openembedded-core

//Hongxu


Cheers,



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


[OE-core] [PATCH] groff: improve reproducibility

2019-06-04 Thread Hongxu Jia
As said in ${S}/m4/groff.m4
...
1642 # gdiffmk will attempt to use bash (for option -ef of 'test'). If bash
1643 # is not available it will use /bin/sh.
...

So drop hardcode shebang replacement, and pass variable to configure,
it also remove build path in gdiffmk to improve reproducibility

Signed-off-by: Hongxu Jia 
---
 .../groff/files/0001-fix-shebang-for-taget.patch   | 31 --
 meta/recipes-extended/groff/groff_1.22.4.bb|  3 +--
 2 files changed, 1 insertion(+), 33 deletions(-)
 delete mode 100644 
meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch

diff --git a/meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch 
b/meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch
deleted file mode 100644
index 1b94e8a..000
--- a/meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 54c795c8a3c7356294007b5a4eed1dd47ed6411d Mon Sep 17 00:00:00 2001
-From: Hongxu Jia 
-Date: Sat, 11 May 2019 19:19:27 +0800
-Subject: [PATCH] fix shebang for target
-
-...
-|ERROR: groff-1.22.4-r0 do_package_qa: QA Issue: /usr/bin/gdiffmk contained in
-package groff requires tmp-glibc/hosttools/bash, but no providers found in
-RDEPENDS_groff? [file-rdeps]
-...
-
-Upstream-Status: Inappropriate [oe-core specific]
-
-Signed-off-by: Hongxu Jia 

- contrib/gdiffmk/gdiffmk.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/contrib/gdiffmk/gdiffmk.sh b/contrib/gdiffmk/gdiffmk.sh
-index 5ce931e..10f2300 100644
 a/contrib/gdiffmk/gdiffmk.sh
-+++ b/contrib/gdiffmk/gdiffmk.sh
-@@ -1,4 +1,4 @@
--#!@BASH_PROG@
-+#!/bin/sh
- # Copyright (C) 2004-2018 Free Software Foundation, Inc.
- # Written by Mike Bianchi mailto:mbian...@foveal.com>>
- # Thanks to Peter Bray for debugging.
--- 
-2.7.4
-
diff --git a/meta/recipes-extended/groff/groff_1.22.4.bb 
b/meta/recipes-extended/groff/groff_1.22.4.bb
index 37eee9a..a190230 100644
--- a/meta/recipes-extended/groff/groff_1.22.4.bb
+++ b/meta/recipes-extended/groff/groff_1.22.4.bb
@@ -10,7 +10,6 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
file://0001-replace-perl-w-with-use-warnings.patch \
file://groff-not-search-fonts-on-build-host.patch \
-   file://0001-fix-shebang-for-taget.patch \
file://0001-support-musl.patch \
 "
 
@@ -27,7 +26,7 @@ MULTILIB_SCRIPTS = "${PN}:${bindir}/gpinyin 
${PN}:${bindir}/groffer ${PN}:${bind
 EXTRA_OECONF = "--without-x --without-doc"
 PARALLEL_MAKE = ""
 
-CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
+CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl' 
ac_cv_path_BASH_PROG='no'"
 
 do_install_append() {
# Some distros have both /bin/perl and /usr/bin/perl, but we set perl 
location
-- 
2.7.4

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


Re: [OE-core] [PATCH] grub/grub-efi: fix unrecognized command line option '-pipe-Wno-error' in CFLAGS

2019-06-03 Thread Hongxu Jia

Ping

//Hongxu
On 5/15/19 11:17 AM, Hongxu Jia wrote:

Since commit [330fc83 grub: Use -Wno-error instead of doing this
on a per-warning basis] applied in oe-core, it missed a space
in append.

Signed-off-by: Hongxu Jia 
---
  meta/recipes-bsp/grub/grub2.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 7d8c280..bac2d7d 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -60,7 +60,7 @@ BUILD_CFLAGS = ""
  BUILD_CXXFLAGS = ""
  BUILD_LDFLAGS = ""
  
-CFLAGS_append = "-Wno-error"

+CFLAGS_append = " -Wno-error"
  
  do_configure_prepend() {

# The grub2 configure script uses variables such as TARGET_CFLAGS etc



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


[OE-core] [PATCH] lib/oe/reciputils.py: support character `+' in git pv

2019-06-03 Thread Hongxu Jia
While pv contains char `+' (such as ncurses 6.1+20181013),
it was incorrectly converted to `6.1'

In this commit:
- Convert [^\+]* to .*?
  Support pv to contain char `+' and not greedy match
  (Such as ncurses 6.1+20181013)

- Add [^\+] to sfx match
  Support sfx contains extra chars between `+' and `git'
  (such as asciidoc "8.6.9+py3-gitAUTOINC+618f6e6f6b")

- Make sfx and rev greedy match

Run `devtool check-upgrade-status --all' in poky and compare results,
only one difference on ncurses version:
Without the commit:
INFO: ncurses   6.1 6.1+20181013    Hongxu Jia 
 7a97a7f937762ba342d5b2fd7cd090885a809835

With the commit:
INFO: ncurses   6.1+20181013MATCH       Hongxu Jia 
 7a97a7f937762ba342d5b2fd7cd090885a809835

Signed-off-by: Hongxu Jia 
---
 meta/lib/oe/recipeutils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 1e5b9a49f9..630ae967af 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -934,7 +934,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
 sfx = ''
 
 if uri_type == 'git':
-git_regex = 
re.compile(r"(?Pv?)(?P[^\+]*)((?P\+(git)?r?(AUTOINC\+))(?P.*))?")
+git_regex = 
re.compile(r"(?Pv?)(?P.*?)(?P\+[^\+]*(git)?r?(AUTOINC\+))(?P.*)")
 m = git_regex.match(pv)
 
 if m:
-- 
2.21.0

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


Re: [OE-core] [PATCH 05/10] ncurses: fix incorrect UPSTREAM_CHECK_GITTAGREGEX

2019-06-02 Thread Hongxu Jia

On 6/1/19 4:27 AM, Alexander Kanavin wrote:
On Sun, 12 May 2019 at 10:18, Hongxu Jia <mailto:hongxu@windriver.com>> wrote:


The upstream git tag has a `upstream/' prefix, such as:
>>> import re
>>> pattern = "upstream/(?P\d+(\.\d+)+(\+\d+)*)"
>>> string = "upstream/6.1+20181013"
>>> result = re.match(pattern, string)
>>> result['pver']
'6.1+20181013'


Have you checked with devtool that this actually works?


I am afraid no, I did not run devtool it before



Before this commit:
alexander@alexander-box:~/development/poky$ devtool 
check-upgrade-status ncurses
INFO: ncurses                   6.1             6.1+20181013    Hongxu 
Jia mailto:hongxu@windriver.com>> 
7a97a7f937762ba342d5b2fd7cd090885a809835


Then I know the script, and run it, I am afraid only revert is not 
sufficient.


The current ncurses version is `6.1+20181013' rather than `6.1', since 
upstream latest


version is `6.1+20181013', but auth email incorrect report ncurses 
should be upgraded


(that's why I try to fix UPSTREAM_CHECK_GITTAGREGEX, but it seems a 
wrong try)



Thanks to your mention of devtool, I know how auth works, and trace the 
root cause,


then I found in the following commit, it filters out `+' from git pv, 
but in ncurse case,


`+' is part of version

...

commit ab609c471d85be3248b789c8ab2813957cd97e29
Author: Alexander Kanavin 
Date:   Mon Aug 3 19:29:54 2015 +0300

    recipeutils.py: allow all characters in regexes used to parse 
version strings


    Previously only numeric characters were matches and anything else was
    discarded, so 4.0-rc3, 2005e, 1.0.2a and similar versions got 
truncated.


    Signed-off-by: Alexander Kanavin 
    Signed-off-by: Richard Purdie 

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 9d45b42..cd74213 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -638,7 +638,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
 sfx = ''

 if uri_type == 'git':
-    git_regex = 
re.compile("(?P(v|))(?P((\d+[\.\-_]*)+))(?P(\+|)(git|)(r|)(AUTOINC|)(\+|))(?P.*)")
+    git_regex = 
re.compile("(?Pv?)(?P[^\+]*)((?P\+(git)?r?(AUTOINC\+))(?P.*))?")

 m = git_regex.match(pv)

 if m:

...

I believe the commit is to parse manually  PV in **_git.bb (such as `PV 
= "1.9.0+git${SRCPV}"' ),


which contains `+gitAUTOINC+' in PV, but the regrex is not suitable for 
ncurses version



//Hongxu



After the commit:
alexander@alexander-box:~/development/poky$ devtool 
check-upgrade-status ncurses
INFO: ncurses                   6.1 UNKNOWN_BROKEN  Hongxu Jia 
mailto:hongxu@windriver.com>>


The code in bitbake/lib/bb/fetch2/git.py actually splits each tag with 
'/' as separator and takes only the last part for some reason, so 
those prefixes are never a part of the string that is matched against 
regex.

I'll send a revert in a moment.

Alex




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


Re: [OE-core] [PATCH] xmlto: set CLEANBROKEN = "1"

2019-05-21 Thread Hongxu Jia

On 5/21/19 4:49 PM, Hongxu Jia wrote:

While rebuilding xmlto or xmlto-native, `make clean' in do_configure
will remove man/man1/xmlif.1 which triger failure in do_compile

$ bitbake xmlto-native
$ bitbake xmlto-native -cconfigure -f
$ bitbake xmlto-native -ccompile -f


Clarify two thing someone may ask:

1. The reproduce steps seems a bit weird

It just simplify the problem, the real environment is multiple build

share a common sstate, and the latter one trigger xmlto rebuilt


...
|FORMAT_DIR=./format /bin/bash ./xmlto -o man/man1 man doc/xmlif.xml
|xmlto: tmp-glibc/work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/
doc/xmlif.xml does not validate (status 3)
|xmlto: Fix document syntax or use --skip-validation option
I/O error : Attempt to load network entity http://www.oasis-open.org/
docbook/xml/4.2/docbookx.dtd
...


2. The issue seems upstream problem, why not fix it.

The failure is to regenerate the missing document, I don't think

it worth to take time on it


//Hongxu



Signed-off-by: Hongxu Jia 
---
  meta/recipes-devtools/xmlto/xmlto_0.0.28.bb | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb 
b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
index df798df..7d27c43 100644
--- a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
+++ b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
@@ -13,6 +13,8 @@ SRC_URI[sha256sum] = 
"2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51f
  
  inherit autotools
  
+CLEANBROKEN = "1"

+
  DEPENDS = "libxml2-native"
  
  RDEPENDS_${PN} = "docbook-xml-dtd4 \



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


[OE-core] [PATCH] xmlto: set CLEANBROKEN = "1"

2019-05-21 Thread Hongxu Jia
While rebuilding xmlto or xmlto-native, `make clean' in do_configure
will remove man/man1/xmlif.1 which triger failure in do_compile

$ bitbake xmlto-native
$ bitbake xmlto-native -cconfigure -f
$ bitbake xmlto-native -ccompile -f
...
|FORMAT_DIR=./format /bin/bash ./xmlto -o man/man1 man doc/xmlif.xml
|xmlto: tmp-glibc/work/x86_64-linux/xmlto-native/0.0.28-r0/xmlto-0.0.28/
doc/xmlif.xml does not validate (status 3)
|xmlto: Fix document syntax or use --skip-validation option
I/O error : Attempt to load network entity http://www.oasis-open.org/
docbook/xml/4.2/docbookx.dtd
...

Signed-off-by: Hongxu Jia 
---
 meta/recipes-devtools/xmlto/xmlto_0.0.28.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb 
b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
index df798df..7d27c43 100644
--- a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
+++ b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
@@ -13,6 +13,8 @@ SRC_URI[sha256sum] = 
"2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51f
 
 inherit autotools
 
+CLEANBROKEN = "1"
+
 DEPENDS = "libxml2-native"
 
 RDEPENDS_${PN} = "docbook-xml-dtd4 \
-- 
2.7.4

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


Re: [OE-core] [PATCH] virglrenderer: fix compiling failure with `-fvisibility=default'

2019-05-19 Thread Hongxu Jia

On 5/19/19 10:30 PM, Hongxu Jia wrote:

On 5/19/19 6:10 PM, Alexander Kanavin wrote:
On Sun, 19 May 2019 at 07:01, Hongxu Jia  
wrote:

+Extern global variable `util_cpu_caps' to multiple C source files is
+not a good habit, it caused linking failure when making a shard object
+in some cross compiling circumstance
+...
+|ld: gallium/auxiliary/.libs/libgallium.a(u_cpu_detect.o): relocation
+R_386_GOTOFF against undefined symbol `util_cpu_caps' can not be used
+when making a shared object
+|ld: final link failed: bad value
+...
+
+Covert global variable to static and assign it only in one C source 
file,

+provide get function for other C source files
+
+Upstream-Status: Submitted [virglrenderer-de...@lists.freedesktop.org]

I do not actually see the submission here:
https://lists.freedesktop.org/archives/virglrenderer-devel/2019-May/date.html 



Here is the mailing list reply

...

Your mail to 'virglrenderer-devel' with the subject

    [PATCH] fix symbol `util_cpu_caps' can not be used when making a
shared object

Is being held until the list moderator can review it for approval.

The reason it is being held:

    Post by non-member to a members-only list

Either the message will get posted to the list, or you will receive
notification of the moderator's decision.  If you would like to cancel
this posting, please visit the following URL:

https://lists.freedesktop.org/mailman/confirm/virglrenderer-devel/131d0999373561efdb12c196276096402856dbc7

...
//Hongxu


I think the patch should be submitted as a merge request here:
https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests


I also submit a merge request

https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests/239

//Hongxu


and I would rather wait for upstream to accept it, and then take it in
oe-core as a backport.

Alex





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


Re: [OE-core] [PATCH] virglrenderer: fix compiling failure with `-fvisibility=default'

2019-05-19 Thread Hongxu Jia

On 5/19/19 6:10 PM, Alexander Kanavin wrote:

On Sun, 19 May 2019 at 07:01, Hongxu Jia  wrote:

+Extern global variable `util_cpu_caps' to multiple C source files is
+not a good habit, it caused linking failure when making a shard object
+in some cross compiling circumstance
+...
+|ld: gallium/auxiliary/.libs/libgallium.a(u_cpu_detect.o): relocation
+R_386_GOTOFF against undefined symbol `util_cpu_caps' can not be used
+when making a shared object
+|ld: final link failed: bad value
+...
+
+Covert global variable to static and assign it only in one C source file,
+provide get function for other C source files
+
+Upstream-Status: Submitted [virglrenderer-de...@lists.freedesktop.org]

I do not actually see the submission here:
https://lists.freedesktop.org/archives/virglrenderer-devel/2019-May/date.html


Here is the mailing list reply

...

Your mail to 'virglrenderer-devel' with the subject

[PATCH] fix symbol `util_cpu_caps' can not be used when making a
shared object

Is being held until the list moderator can review it for approval.

The reason it is being held:

Post by non-member to a members-only list

Either the message will get posted to the list, or you will receive
notification of the moderator's decision.  If you would like to cancel
this posting, please visit the following URL:


https://lists.freedesktop.org/mailman/confirm/virglrenderer-devel/131d0999373561efdb12c196276096402856dbc7

...
//Hongxu


I think the patch should be submitted as a merge request here:
https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests

and I would rather wait for upstream to accept it, and then take it in
oe-core as a backport.

Alex



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


Re: [OE-core] [PATCH] virglrenderer: fix compiling failure with `-fvisibility=default'

2019-05-19 Thread Hongxu Jia

On 5/19/19 6:10 PM, Alexander Kanavin wrote:

On Sun, 19 May 2019 at 07:01, Hongxu Jia  wrote:

+Extern global variable `util_cpu_caps' to multiple C source files is
+not a good habit, it caused linking failure when making a shard object
+in some cross compiling circumstance
+...
+|ld: gallium/auxiliary/.libs/libgallium.a(u_cpu_detect.o): relocation
+R_386_GOTOFF against undefined symbol `util_cpu_caps' can not be used
+when making a shared object
+|ld: final link failed: bad value
+...
+
+Covert global variable to static and assign it only in one C source file,
+provide get function for other C source files
+
+Upstream-Status: Submitted [virglrenderer-de...@lists.freedesktop.org]

I do not actually see the submission here:
https://lists.freedesktop.org/archives/virglrenderer-devel/2019-May/date.html


Here is te mailing list reply

...

Your mail to 'virglrenderer-devel' with the subject

[PATCH] fix symbol `util_cpu_caps' can not be used when making a
shared object

Is being held until the list moderator can review it for approval.

The reason it is being held:

Post by non-member to a members-only list

Either the message will get posted to the list, or you will receive
notification of the moderator's decision.  If you would like to cancel
this posting, please visit the following URL:


https://lists.freedesktop.org/mailman/confirm/virglrenderer-devel/131d0999373561efdb12c196276096402856dbc7

...
//Hongxu


I think the patch should be submitted as a merge request here:
https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests

and I would rather wait for upstream to accept it, and then take it in
oe-core as a backport.

Alex



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


[OE-core] [PATCH] virglrenderer: fix compiling failure with `-fvisibility=default'

2019-05-18 Thread Hongxu Jia
Extern global variable `util_cpu_caps' to multiple C source files is
not a good habit, it caused linking failure when making a shard object
in some cross compiling circumstance
...
|ld: gallium/auxiliary/.libs/libgallium.a(u_cpu_detect.o): relocation
R_386_GOTOFF against undefined symbol `util_cpu_caps' can not be used
when making a shared object
|ld: final link failed: bad value
...

Covert global variable to static and assign it only in one C source file,
provide get function for other C source files

Signed-off-by: Hongxu Jia 
---
 ...util_cpu_caps-can-not-be-used-when-making.patch | 97 ++
 .../virglrenderer/virglrenderer_0.7.0.bb   |  1 +
 2 files changed, 98 insertions(+)
 create mode 100644 
meta/recipes-graphics/virglrenderer/virglrenderer/0001-fix-symbol-util_cpu_caps-can-not-be-used-when-making.patch

diff --git 
a/meta/recipes-graphics/virglrenderer/virglrenderer/0001-fix-symbol-util_cpu_caps-can-not-be-used-when-making.patch
 
b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-fix-symbol-util_cpu_caps-can-not-be-used-when-making.patch
new file mode 100644
index 000..e5dc8f9
--- /dev/null
+++ 
b/meta/recipes-graphics/virglrenderer/virglrenderer/0001-fix-symbol-util_cpu_caps-can-not-be-used-when-making.patch
@@ -0,0 +1,97 @@
+From e991050fec102a5fde766226c7f49444c3860c49 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sun, 19 May 2019 00:12:51 -0400
+Subject: [PATCH] fix symbol `util_cpu_caps' can not be used when making a
+ shared object
+
+Extern global variable `util_cpu_caps' to multiple C source files is
+not a good habit, it caused linking failure when making a shard object
+in some cross compiling circumstance
+...
+|ld: gallium/auxiliary/.libs/libgallium.a(u_cpu_detect.o): relocation
+R_386_GOTOFF against undefined symbol `util_cpu_caps' can not be used
+when making a shared object
+|ld: final link failed: bad value
+...
+
+Covert global variable to static and assign it only in one C source file,
+provide get function for other C source files
+
+Upstream-Status: Submitted [virglrenderer-de...@lists.freedesktop.org]
+
+Signed-off-by: Hongxu Jia 
+---
+ src/gallium/auxiliary/util/u_cpu_detect.c | 6 +-
+ src/gallium/auxiliary/util/u_cpu_detect.h | 3 +--
+ src/gallium/auxiliary/util/u_math.c   | 8 
+ 3 files changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c 
b/src/gallium/auxiliary/util/u_cpu_detect.c
+index 0b4b83a..be0cedd 100644
+--- a/src/gallium/auxiliary/util/u_cpu_detect.c
 b/src/gallium/auxiliary/util/u_cpu_detect.c
+@@ -78,7 +78,11 @@ DEBUG_GET_ONCE_BOOL_OPTION(dump_cpu, "GALLIUM_DUMP_CPU", 
FALSE)
+ #endif
+ 
+ 
+-struct util_cpu_caps util_cpu_caps;
++static struct util_cpu_caps util_cpu_caps;
++struct util_cpu_caps* get_util_cpu_caps(void)
++{
++return _cpu_caps;
++}
+ 
+ #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+ static int has_cpuid(void);
+diff --git a/src/gallium/auxiliary/util/u_cpu_detect.h 
b/src/gallium/auxiliary/util/u_cpu_detect.h
+index 01f3896..58134ab 100644
+--- a/src/gallium/auxiliary/util/u_cpu_detect.h
 b/src/gallium/auxiliary/util/u_cpu_detect.h
+@@ -73,8 +73,7 @@ struct util_cpu_caps {
+unsigned has_daz:1;
+ };
+ 
+-extern struct util_cpu_caps
+-util_cpu_caps;
++struct util_cpu_caps* get_util_cpu_caps(void);
+ 
+ void util_cpu_detect(void);
+ 
+diff --git a/src/gallium/auxiliary/util/u_math.c 
b/src/gallium/auxiliary/util/u_math.c
+index e574153..c08ed3b 100644
+--- a/src/gallium/auxiliary/util/u_math.c
 b/src/gallium/auxiliary/util/u_math.c
+@@ -90,7 +90,7 @@ util_fpstate_get(void)
+unsigned mxcsr = 0;
+ 
+ #if defined(PIPE_ARCH_SSE)
+-   if (util_cpu_caps.has_sse) {
++   if (get_util_cpu_caps()->has_sse) {
+   mxcsr = _mm_getcsr();
+}
+ #endif
+@@ -108,10 +108,10 @@ unsigned
+ util_fpstate_set_denorms_to_zero(unsigned current_mxcsr)
+ {
+ #if defined(PIPE_ARCH_SSE)
+-   if (util_cpu_caps.has_sse) {
++   if (get_util_cpu_caps()->has_sse) {
+   /* Enable flush to zero mode */
+   current_mxcsr |= _MM_FLUSH_ZERO_MASK;
+-  if (util_cpu_caps.has_daz) {
++  if (get_util_cpu_caps()->has_daz) {
+  /* Enable denormals are zero mode */
+  current_mxcsr |= _MM_DENORMALS_ZERO_MASK;
+   }
+@@ -130,7 +130,7 @@ void
+ util_fpstate_set(unsigned mxcsr)
+ {
+ #if defined(PIPE_ARCH_SSE)
+-   if (util_cpu_caps.has_sse) {
++   if (get_util_cpu_caps()->has_sse) {
+   _mm_setcsr(mxcsr);
+}
+ #endif
+-- 
+2.8.1
+
diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb 
b/meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb
index 225a0b8..441c692 100644
--- a/meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb
+++ b/meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb
@@ -9,6 +9,7 @@ SRCREV = "402c228861c9893f64cffbbcb4cb23044b8c721c"
 SRC_URI = "git://anongit.freedesktop.org/virglrenderer \
file://

Re: [OE-core] [PATCH V2] autotools.bbclass: output failed config.log

2019-05-15 Thread Hongxu Jia

On 5/15/19 10:01 PM, richard.pur...@linuxfoundation.org wrote:

On Wed, 2019-05-15 at 21:32 +0800, Hongxu Jia wrote:

If do_configure failed, output content of config.log
to configure log, it is helpful to trace the do_configure
failure on the build system which is hard to login.
(such as autobuilder)

Add a knob OUTPUT_CONFIG_LOG to control config.log output

Signed-off-by: Hongxu Jia 
---
  meta/classes/autotools.bbclass | 7 ++-
  1 file changed, 6 insertions(+), 1 deletion(-)


We did used to do this, it was removed:

http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/classes/autotools.bbclass?id=ba837f10555998a8677eb99bfc6698e0cc1f7942


OK, I got it

//Hongxu


Cheers,

Richard



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


Re: [OE-core] [PATCH] autotools.bbclass: output failed config.log

2019-05-15 Thread Hongxu Jia

On 5/15/19 9:50 PM, Hongxu Jia wrote:


The best available option might be to have a knob with default off,
and autobuilders might be configured to dump config.log. 


See my V2 for detail

//Hongxu

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


Re: [OE-core] [PATCH] autotools.bbclass: output failed config.log

2019-05-15 Thread Hongxu Jia

On 5/15/19 9:42 PM, Adrian Bunk wrote:

On Wed, May 15, 2019 at 08:30:03PM +0800, Hongxu Jia wrote:

On 5/15/19 7:08 PM, Adrian Bunk wrote:

The end of config.log often contains expected error messages completely
unrelated to the actual problem.

I am afraid you did not suffer pain from it, the most related message

with do_configure failure is config.log. Take a example, as my previous

commit [grub/grub-efi: fix unrecognized command line option

'-pipe-Wno-error' in CFLAGS]

It takes me hours to reproduce grub/grub-efi build faiure (only
...

I fully understand your pain, and have already suffered it many times.


Debian autobuilders already dump config.log when when configuring failed,
and there it is a common problem that people end up searching for the
problem in the wrong places due to that.

It's another story, it is better that autobuilder provide sufficient and

necessary info and data, not only config.log, but also local.conf,

all available log.do_***, sources in ${B} and ${S}, even data in ${WORKDIR},

result of `bitbake -e'

but before we got there, the fix is best choice for do_configure failure

There is no universal best choice here.

Let me give you an example when building a more recent ofono locally
with and without your patch.

When a configure task fails, the last lines from log.do_configure
are dumped to the shell.

Without your patch I get when building in a shell:
...
| checking whether to build shared libraries... yes
| checking whether to build static libraries... no
| checking for signalfd... yes
| checking for dlopen in -ldl... yes
| checking for glib-2.0 >= 2.32... yes
| checking for dbus-1 >= 1.4... yes
| checking for libudev >= 143... yes
| checking for mobile-broadband-provider-info... yes
| checking for ell >= 0.12... no
| configure: error: Embedded Linux library >= 0.12 is required
...

The problem is immediately visible.

With your patch, one has to scroll up through the whole config.log for
getting this information.

And the config.log contains plenty of other (expected) errors a user
might mistake as cause of the problem.

For autobuilders dumping config.log can be OK if there is no better
option available, but people looking at autobuilder logs should be
aware what to scroll over when starting to look at the log.

For anyone building manually in a shell these should really not be done,
it has a high potential of confuding the user and the config.log is
easily available.

The best available option might be to have a knob with default off,
and autobuilders might be configured to dump config.log.


After applying my fix, here is the sample

...

checking for i586-wrs-linux-gcc... i586-wrs-linux-gcc  -m32 -march=i586 
--sysroot=/buildarea1/hjia/wrlinux-1019/build_master-wr_qemux86_2019051509/build/tmp-glibc/work/i586-wrs-linux/grub/2.02-r0/recipe-sysroot

checking whether the C compiler works... no
configure: error: in 
`/buildarea1/hjia/wrlinux-1019/build_master-wr_qemux86_2019051509/build/tmp-glibc/work/i586-wrs-linux/grub/2.02-r0/build':

configure: error: C compiler cannot create executables
See `config.log' for more details
NOTE: The following config.log files may provide further information.
NOTE: 
/buildarea1/hjia/wrlinux-1019/build_master-wr_qemux86_2019051509/build/tmp-glibc/work/i586-wrs-linux/grub/2.02-r0/build/config.log

NOTE: This file contains any messages produced by compilers while
NOTE: running configure, to aid debugging if configure makes a mistake.

...

The content of config.log has prefix `NOTE:' and also tells user

See `config.log' for more dettails and balabala

//Hongxu


//Hongxu

cu
Adrian



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


[OE-core] [PATCH V2] autotools.bbclass: output failed config.log

2019-05-15 Thread Hongxu Jia
If do_configure failed, output content of config.log
to configure log, it is helpful to trace the do_configure
failure on the build system which is hard to login.
(such as autobuilder)

Add a knob OUTPUT_CONFIG_LOG to control config.log output

Signed-off-by: Hongxu Jia 
---
 meta/classes/autotools.bbclass | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 8768a6a..5fc9d0a 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -82,6 +82,7 @@ CONFIGURE_SCRIPT ?= "${AUTOTOOLS_SCRIPT_PATH}/configure"
 
 AUTOTOOLS_AUXDIR ?= "${AUTOTOOLS_SCRIPT_PATH}"
 
+OUTPUT_CONFIG_LOG ??= ""
 oe_runconf () {
# Use relative path to avoid buildpaths in files
cfgscript_name="`basename ${CONFIGURE_SCRIPT}`"
@@ -90,7 +91,11 @@ oe_runconf () {
bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
if ! ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} 
${EXTRA_OECONF} "$@"; then
bbnote "The following config.log files may provide 
further information."
-   bbnote `find ${B} -ignore_readdir_race -type f -name 
config.log`
+   config_log="`find ${B} -ignore_readdir_race -type f 
-name config.log`"
+   bbnote "$config_log"
+   [ -n "${OUTPUT_CONFIG_LOG}" ] && [ -e "$config_log" ] 
&& while read line; do
+   bbnote "$line"
+   done <"$config_log"
bbfatal_log "configure failed"
fi
else
-- 
2.7.4

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


Re: [OE-core] [PATCH] autotools.bbclass: output failed config.log

2019-05-15 Thread Hongxu Jia

On 5/15/19 7:08 PM, Adrian Bunk wrote:

The end of config.log often contains expected error messages completely
unrelated to the actual problem.


I am afraid you did not suffer pain from it, the most related message

with do_configure failure is config.log. Take a example, as my previous

commit [grub/grub-efi: fix unrecognized command line option

'-pipe-Wno-error' in CFLAGS]

It takes me hours to reproduce grub/grub-efi build faiure (only

happen while DEBUG_BUILD = "1"), and from log.do_configure, I can't

tell the root cause

...

checking for i586-wrs-linux-gcc... i586-wrs-linux-gcc  -m32 -march=i586 
--sysroot=TOPDIR/tmp-glibc/work/i586-wrs-linux/grub/2.02-r0/recipe-sysroot

checking whether the C compiler works... no
configure: error: in 
`TOPDIR/tmp-glibc/work/i586-wrs-linux/grub/2.02-r0/build':

configure: error: C compiler cannot create executables

...


But from config.log, I got more detail '-pipe-Wno-error'

which helps me to locate the issue

...

configure:5094: i586-wrs-linux-gcc  -m32 -march=i586 
--sysroot=/buildarea1/hjia/wrlinux-1019/build_master-wr_qemux86_2019051509/build/tmp-glibc/work/i586-wrs-linux/grub/2.02-r0/recipe-sysroot 
-Og -g -feliminate-unused-debug-types 
-fmacro-prefix-map=/buildarea1/hjia/wrlinux-1019/build_master-wr_qemux86_2019051509/build/tmp-glibc/work/i586-wrs-linux/grub/2.02-r0=/usr/src/debug/grub/2.02-r0 
-fdebug-prefix-map=/buildarea1/hjia/wrlinux-1019/build_master-wr_qemux86_2019051509/build/tmp-glibc/work/i586-wrs-linux/grub/2.02-r0=/usr/src/debug/grub/2.02-r0 
-fdebug-prefix-map=/buildarea1/hjia/wrlinux-1019/build_master-wr_qemux86_2019051509/build/tmp-glibc/work/i586-wrs-linux/grub/2.02-r0/recipe-sysroot= 
-fdebug-prefix-map=/buildarea1/hjia/wrlinux-1019/build_master-wr_qemux86_2019051509/build/tmp-glibc/work/i586-wrs-linux/grub/2.02-r0/recipe-sysroot-native= 
-pipe-Wno-error  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed 
-fstack-protector-strong -Wl,-z,relro,-z,now conftest.c >&5
i586-wrs-linux-gcc: error: unrecognized command line option 
'-pipe-Wno-error'; did you mean '-Wno-error'?

...
configure:5141: error: in 
`/buildarea1/hjia/wrlinux-1019/build_master-wr_qemux86_2019051509/build/tmp-glibc/work/i586-wrs-linux/grub/2.02-r0/build':

configure:5143: error: C compiler cannot create executables

...



Debian autobuilders already dump config.log when when configuring failed,
and there it is a common problem that people end up searching for the
problem in the wrong places due to that.


It's another story, it is better that autobuilder provide sufficient and

necessary info and data, not only config.log, but also local.conf,

all available log.do_***, sources in ${B} and ${S}, even data in ${WORKDIR},

result of `bitbake -e'

but before we got there, the fix is best choice for do_configure failure

//Hongxu

i

//Hongxu


If possible, it would therefore be better to make it accessible separately.



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


Re: [OE-core] [PATCH] autotools.bbclass: output failed config.log

2019-05-15 Thread Hongxu Jia

On 5/15/19 6:54 PM, Andreas Müller wrote:

On Wed, May 15, 2019 at 11:50 AM Hongxu Jia  wrote:

On 5/15/19 5:32 PM, Andreas Müller wrote:

--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -90,7 +90,11 @@ oe_runconf () {
 bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
 if ! ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} 
"$@"; then
 bbnote "The following config.log files may provide further 
information."
-   bbnote `find ${B} -ignore_readdir_race -type f -name 
config.log`
+   config_log="`find ${B} -ignore_readdir_race -type f -name 
config.log`"
+   bbnote "$config_log"
+   [ -e "$config_log" ] && cat "$config_log" | while read 
line; do
+   bbnote "$line"
+   done
 bbfatal_log "configure failed"
 fi
 else
--
2.7.4

That output is useful only sometimes and extremly verbose. I'd suggest
to introduce a switch to enable/disable (even as newbie user I am able
to find config.log). How about making autobuilder's WORKDIR
accessible?

The output only happens while do_configure failure, it does nothing when build 
succeed,

while failure occurs, I believe related message is the more the better.

The autobuilder is just an example, for community development, it is hard to 
login

others build host to debug issue, and we have to take time to reproduce it

if we could trace it with a simple glance from the log, why not


Errors are common at recipe creation. I am asking for a knob to
prevent me from scrolling through endless wallpapers (confg.logs can
be >> 100K) to find simple errors.


I think a knob does make sense, I will add it in V2

//Hongxu


And it just works around an autobuilder hiding useful information,

My 2ct

Andreas



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


Re: [OE-core] [PATCH] autotools.bbclass: output failed config.log

2019-05-15 Thread Hongxu Jia

On 5/15/19 5:32 PM, Andreas Müller wrote:

--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -90,7 +90,11 @@ oe_runconf () {
 bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
 if ! ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} 
"$@"; then
 bbnote "The following config.log files may provide further 
information."
-   bbnote `find ${B} -ignore_readdir_race -type f -name 
config.log`
+   config_log="`find ${B} -ignore_readdir_race -type f -name 
config.log`"
+   bbnote "$config_log"
+   [ -e "$config_log" ] && cat "$config_log" | while read 
line; do
+   bbnote "$line"
+   done
 bbfatal_log "configure failed"
 fi
 else
--
2.7.4


That output is useful only sometimes and extremly verbose. I'd suggest
to introduce a switch to enable/disable (even as newbie user I am able
to find config.log). How about making autobuilder's WORKDIR
accessible?


The output only happens while do_configure failure, it does nothing when 
build succeed,


while failure occurs, I believe related message is the more the better.

The autobuilder is just an example, for community development, it is 
hard to login


others build host to debug issue, and we have to take time to reproduce it

if we could trace it with a simple glance from the log, why not


//Hongxu



Andreas



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


[OE-core] [PATCH] autotools.bbclass: output failed config.log

2019-05-15 Thread Hongxu Jia
If do_configure failed, output content of config.log
to configure log, it is helpful to trace the do_configure
failure on the build system which is hard to login.
(such as autobuilder)

Signed-off-by: Hongxu Jia 
---
 meta/classes/autotools.bbclass | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 8768a6a..03cbe1b 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -90,7 +90,11 @@ oe_runconf () {
bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
if ! ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} 
${EXTRA_OECONF} "$@"; then
bbnote "The following config.log files may provide 
further information."
-   bbnote `find ${B} -ignore_readdir_race -type f -name 
config.log`
+   config_log="`find ${B} -ignore_readdir_race -type f 
-name config.log`"
+   bbnote "$config_log"
+   [ -e "$config_log" ] && cat "$config_log" | while read 
line; do
+   bbnote "$line"
+   done
bbfatal_log "configure failed"
fi
else
-- 
2.7.4

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


[OE-core] [PATCH] grub/grub-efi: fix unrecognized command line option '-pipe-Wno-error' in CFLAGS

2019-05-14 Thread Hongxu Jia
Since commit [330fc83 grub: Use -Wno-error instead of doing this
on a per-warning basis] applied in oe-core, it missed a space
in append.

Signed-off-by: Hongxu Jia 
---
 meta/recipes-bsp/grub/grub2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 7d8c280..bac2d7d 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -60,7 +60,7 @@ BUILD_CFLAGS = ""
 BUILD_CXXFLAGS = ""
 BUILD_LDFLAGS = ""
 
-CFLAGS_append = "-Wno-error"
+CFLAGS_append = " -Wno-error"
 
 do_configure_prepend() {
# The grub2 configure script uses variables such as TARGET_CFLAGS etc
-- 
2.7.4

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


[OE-core] [PATCH] oeqa/targetcontrol.py: fix qemuparams not work in runqemu with launch_cmd

2019-05-13 Thread Hongxu Jia
As runqemu with launch_cmd means directly run the command, don't need set
rootfs or env vars.

Since commit [a847dd7202 runqemu: Let qemuparams override default settings]
applied in oe-core, if launch_cmd contains "qemuparams='***'", it does not
work, which is overridden by latter qemuparams="-serial tcp:127.0.0.1" in
QemuRunner.launch();

So we set qemuparams as a parameter in runqemu, the fix makes it work

Signed-off-by: Hongxu Jia 
---
 meta/lib/oeqa/targetcontrol.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 1868ad3206..b98b183504 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -159,7 +159,7 @@ class QemuTarget(BaseTarget):
 
 def start(self, params=None, ssh=True, extra_bootparams='', 
runqemuparams='', launch_cmd='', discard_writes=True):
 if launch_cmd:
-start = self.runner.launch(get_ip=ssh, launch_cmd=launch_cmd)
+start = self.runner.launch(get_ip=ssh, launch_cmd=launch_cmd, 
qemuparams=params)
 else:
 start = self.runner.start(params, get_ip=ssh, 
extra_bootparams=extra_bootparams, runqemuparams=runqemuparams, 
discard_writes=discard_writes)
 
-- 
2.17.1

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


[OE-core] [PATCH] groff: imporve musl support

2019-05-12 Thread Hongxu Jia
Drop local fix, backport upstream gnulib fix and translate to tarball groff.

Suggested-by: Adrian Bunk 
Signed-off-by: Hongxu Jia 
---
 .../groff/files/0001-support-musl.patch| 39 ++
 1 file changed, 17 insertions(+), 22 deletions(-)

diff --git a/meta/recipes-extended/groff/files/0001-support-musl.patch 
b/meta/recipes-extended/groff/files/0001-support-musl.patch
index e5c817c..a837b11 100644
--- a/meta/recipes-extended/groff/files/0001-support-musl.patch
+++ b/meta/recipes-extended/groff/files/0001-support-musl.patch
@@ -1,6 +1,6 @@
-From f73df5196c35ef9c4531e4b6b26800c41954fd77 Mon Sep 17 00:00:00 2001
+From 695965c27be74acb5968f19d51af86065c4b71a9 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia 
-Date: Sat, 11 May 2019 20:00:29 +0800
+Date: Mon, 13 May 2019 09:48:14 +0800
 Subject: [PATCH] support musl
 
 ...
@@ -16,31 +16,26 @@ Subject: [PATCH] support musl
 |   ^~~
 ...
 
-Upstream-Status: Pending
+Upstream-Status: Backport 
[http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=453ff940449bbbde9ec00f0bbf82a359c5598fc7]
 
 Signed-off-by: Hongxu Jia 
 ---
- lib/math.in.h | 2 ++
+ gnulib_m4/signbit.m4 | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/lib/math.in.h b/lib/math.in.h
-index c30fc20..16e406a 100644
 a/lib/math.in.h
-+++ b/lib/math.in.h
-@@ -2397,11 +2397,13 @@ _GL_EXTERN_C int gl_signbitl (long double arg);
- gl_signbitf (x))
- # endif
- # ifdef __cplusplus
-+#if defined(__GLIBC__)
- #  if defined signbit || defined GNULIB_NAMESPACE
- _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
- #   undef signbit
- _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
- #  endif
-+# endif //if defined(__GLIBC__)
- # endif
- #elif defined GNULIB_POSIXCHECK
- # if defined signbit
+diff --git a/gnulib_m4/signbit.m4 b/gnulib_m4/signbit.m4
+index 9e7884d..8b9c70c 100644
+--- a/gnulib_m4/signbit.m4
 b/gnulib_m4/signbit.m4
+@@ -31,6 +31,8 @@ AC_DEFUN([gl_SIGNBIT],
+ [case "$host_os" in
+   # Guess yes on glibc systems.
+*-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
++  # Guess yes on musl systems.
++   *-musl*)   gl_cv_func_signbit="guessing yes" ;;
+   # Guess yes on native Windows.
+mingw*)gl_cv_func_signbit="guessing yes" ;;
+   # If we don't know, assume the worst.
 -- 
 2.7.4
 
-- 
2.7.4

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


Re: [OE-core] [PATCH V2] groff: upgrade 1.22.3 -> 1.22.4

2019-05-12 Thread Hongxu Jia

It seems the patch has been merged to master,
so I will send a fix rebased on that, please drop this V2,
sorry for the noisy

//Hongxu

On 5/13/19 10:04 AM, Hongxu Jia wrote:

- Drop groff-1.22.2-correct-man.local-install-path.patch and
   0001-Unset-need_charset_alias-when-building-for-musl.patch

- Inherit bbclass pkgcnofig to fix `undefined macro: AC_DEFINE'
   ...
   | configure:20010: error: possibly undefined macro: AC_DEFINE
   ...

- Use autotools-brokensep to replace autotools to workaround failure
   caused by out of tree
   ...
   | rm -f lib/alloca.h-t lib/alloca.h && \
   | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
   |   cat ../groff-1.22.4/lib/alloca.in.h; \
   | } > lib/alloca.h-t && \
   | mv -f lib/alloca.h-t lib/alloca.h
   | /bin/sh: line 4: lib/alloca.h-t: No such file or directory
   | Makefile:10407: recipe for target 'lib/alloca.h' failed
   ...

- Add `--without-doc' to not use target groff to generate doc at build time,
   since upstream commit [cfe916e Support of configure option to build the
   documentation.]

- Remove groff depends groff-native, and add DEPENDS bison-native

- Add 0001-fix-shebang-for-taget.patch

- Add 0001-support-musl.patch

Signed-off-by: Hongxu Jia 
---
  .../groff/files/0001-fix-shebang-for-taget.patch   | 31 
  .../0001-replace-perl-w-with-use-warnings.patch| 34 ++
  .../groff/files/0001-support-musl.patch| 41 ++
  .../groff-not-search-fonts-on-build-host.patch | 20 ---
  ...need_charset_alias-when-building-for-musl.patch | 30 
  ...off-1.22.2-correct-man.local-install-path.patch | 34 --
  .../groff/{groff_1.22.3.bb => groff_1.22.4.bb} | 36 ---
  7 files changed, 114 insertions(+), 112 deletions(-)
  create mode 100644 
meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch
  rename meta/recipes-extended/groff/{groff-1.22.3 => 
files}/0001-replace-perl-w-with-use-warnings.patch (76%)
  create mode 100644 meta/recipes-extended/groff/files/0001-support-musl.patch
  rename meta/recipes-extended/groff/{groff-1.22.3 => 
files}/groff-not-search-fonts-on-build-host.patch (42%)
  delete mode 100644 
meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
  delete mode 100644 
meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch
  rename meta/recipes-extended/groff/{groff_1.22.3.bb => groff_1.22.4.bb} (62%)

diff --git a/meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch 
b/meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch
new file mode 100644
index 000..1b94e8a
--- /dev/null
+++ b/meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch
@@ -0,0 +1,31 @@
+From 54c795c8a3c7356294007b5a4eed1dd47ed6411d Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 11 May 2019 19:19:27 +0800
+Subject: [PATCH] fix shebang for target
+
+...
+|ERROR: groff-1.22.4-r0 do_package_qa: QA Issue: /usr/bin/gdiffmk contained in
+package groff requires tmp-glibc/hosttools/bash, but no providers found in
+RDEPENDS_groff? [file-rdeps]
+...
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ contrib/gdiffmk/gdiffmk.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/contrib/gdiffmk/gdiffmk.sh b/contrib/gdiffmk/gdiffmk.sh
+index 5ce931e..10f2300 100644
+--- a/contrib/gdiffmk/gdiffmk.sh
 b/contrib/gdiffmk/gdiffmk.sh
+@@ -1,4 +1,4 @@
+-#!@BASH_PROG@
++#!/bin/sh
+ # Copyright (C) 2004-2018 Free Software Foundation, Inc.
+ # Written by Mike Bianchi mailto:mbian...@foveal.com>>
+ # Thanks to Peter Bray for debugging.
+--
+2.7.4
+
diff --git 
a/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch
 b/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
similarity index 76%
rename from 
meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch
rename to 
meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
index f1db5b0..eda6a40 100644
--- 
a/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch
+++ 
b/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
@@ -1,7 +1,7 @@
-From 5b574542070db286c89b3827e8f15ed4b3b39034 Mon Sep 17 00:00:00 2001
+From 6821a23e6cf34df37c351b45be413a8da9115f9f Mon Sep 17 00:00:00 2001
  From: Robert Yang 
-Date: Thu, 6 Apr 2017 01:46:00 -0700
-Subject: [PATCH] replace "perl -w" with "use warnings"
+Date: Sat, 11 May 2019 17:03:03 +0800
+Subject: [PATCH 1/2] replace "perl -w" with "use warnings"
  
  The shebang's max length is usually 128 as defined in

  /usr/include/linux/binfmts.h:
@@ -18,6 +18,10 @@ So replace "perl -w" with "use warnings" to make it work

[OE-core] [PATCH V2] groff: upgrade 1.22.3 -> 1.22.4

2019-05-12 Thread Hongxu Jia
- Drop groff-1.22.2-correct-man.local-install-path.patch and
  0001-Unset-need_charset_alias-when-building-for-musl.patch

- Inherit bbclass pkgcnofig to fix `undefined macro: AC_DEFINE'
  ...
  | configure:20010: error: possibly undefined macro: AC_DEFINE
  ...

- Use autotools-brokensep to replace autotools to workaround failure
  caused by out of tree
  ...
  | rm -f lib/alloca.h-t lib/alloca.h && \
  | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  |   cat ../groff-1.22.4/lib/alloca.in.h; \
  | } > lib/alloca.h-t && \
  | mv -f lib/alloca.h-t lib/alloca.h
  | /bin/sh: line 4: lib/alloca.h-t: No such file or directory
  | Makefile:10407: recipe for target 'lib/alloca.h' failed
  ...

- Add `--without-doc' to not use target groff to generate doc at build time,
  since upstream commit [cfe916e Support of configure option to build the
  documentation.]

- Remove groff depends groff-native, and add DEPENDS bison-native

- Add 0001-fix-shebang-for-taget.patch

- Add 0001-support-musl.patch

Signed-off-by: Hongxu Jia 
---
 .../groff/files/0001-fix-shebang-for-taget.patch   | 31 
 .../0001-replace-perl-w-with-use-warnings.patch| 34 ++
 .../groff/files/0001-support-musl.patch| 41 ++
 .../groff-not-search-fonts-on-build-host.patch | 20 ---
 ...need_charset_alias-when-building-for-musl.patch | 30 
 ...off-1.22.2-correct-man.local-install-path.patch | 34 --
 .../groff/{groff_1.22.3.bb => groff_1.22.4.bb} | 36 ---
 7 files changed, 114 insertions(+), 112 deletions(-)
 create mode 100644 
meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch
 rename meta/recipes-extended/groff/{groff-1.22.3 => 
files}/0001-replace-perl-w-with-use-warnings.patch (76%)
 create mode 100644 meta/recipes-extended/groff/files/0001-support-musl.patch
 rename meta/recipes-extended/groff/{groff-1.22.3 => 
files}/groff-not-search-fonts-on-build-host.patch (42%)
 delete mode 100644 
meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
 delete mode 100644 
meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch
 rename meta/recipes-extended/groff/{groff_1.22.3.bb => groff_1.22.4.bb} (62%)

diff --git a/meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch 
b/meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch
new file mode 100644
index 000..1b94e8a
--- /dev/null
+++ b/meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch
@@ -0,0 +1,31 @@
+From 54c795c8a3c7356294007b5a4eed1dd47ed6411d Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 11 May 2019 19:19:27 +0800
+Subject: [PATCH] fix shebang for target
+
+...
+|ERROR: groff-1.22.4-r0 do_package_qa: QA Issue: /usr/bin/gdiffmk contained in
+package groff requires tmp-glibc/hosttools/bash, but no providers found in
+RDEPENDS_groff? [file-rdeps]
+...
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ contrib/gdiffmk/gdiffmk.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/contrib/gdiffmk/gdiffmk.sh b/contrib/gdiffmk/gdiffmk.sh
+index 5ce931e..10f2300 100644
+--- a/contrib/gdiffmk/gdiffmk.sh
 b/contrib/gdiffmk/gdiffmk.sh
+@@ -1,4 +1,4 @@
+-#!@BASH_PROG@
++#!/bin/sh
+ # Copyright (C) 2004-2018 Free Software Foundation, Inc.
+ # Written by Mike Bianchi mailto:mbian...@foveal.com>>
+ # Thanks to Peter Bray for debugging.
+-- 
+2.7.4
+
diff --git 
a/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch
 b/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
similarity index 76%
rename from 
meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch
rename to 
meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
index f1db5b0..eda6a40 100644
--- 
a/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch
+++ 
b/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
@@ -1,7 +1,7 @@
-From 5b574542070db286c89b3827e8f15ed4b3b39034 Mon Sep 17 00:00:00 2001
+From 6821a23e6cf34df37c351b45be413a8da9115f9f Mon Sep 17 00:00:00 2001
 From: Robert Yang 
-Date: Thu, 6 Apr 2017 01:46:00 -0700
-Subject: [PATCH] replace "perl -w" with "use warnings"
+Date: Sat, 11 May 2019 17:03:03 +0800
+Subject: [PATCH 1/2] replace "perl -w" with "use warnings"
 
 The shebang's max length is usually 128 as defined in
 /usr/include/linux/binfmts.h:
@@ -18,6 +18,10 @@ So replace "perl -w" with "use warnings" to make it work.
 Upstream-Status: Pending
 
 Signed-off-by: Robert Yang 
+
+Rebase to 1.22.4.
+
+Signed-off-by: Hongxu Jia 
 ---
  font/devpdf/util/BuildFoundries.pl | 3 ++-
  src/devices/gropdf/gropdf.pl   | 3 ++-
@@ -26,7 +30,

Re: [OE-core] [PATCH 08/10] groff: upgrade 1.22.3 -> 1.22.4

2019-05-12 Thread Hongxu Jia

On 5/13/19 9:36 AM, Hongxu Jia wrote:
It's a long story, the git version groff is using submodule gnulib 
rather than itself


http://git.savannah.gnu.org/cgit/groff.git/commit/?id=5fec19d453983bc3127052e4f100110efda93786 



Your suggestion works in this situation.

But we do not use git groff, we are building from the source as in 
distributed tarball files which


does not require gnulib any more, so your fix is not suitable for us

SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \

But be on the safe side, I am trying to translate the gnulib fix to 
groff tarball,


it works.

Thanks your suggestion, v2 incoming.

//Hongxu



//Hongxu



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


Re: [OE-core] [PATCH 08/10] groff: upgrade 1.22.3 -> 1.22.4

2019-05-12 Thread Hongxu Jia

On 5/13/19 3:20 AM, Adrian Bunk wrote:

On Sun, May 12, 2019 at 04:16:28PM +0800, Hongxu Jia wrote:

..
--- /dev/null
+++ b/meta/recipes-extended/groff/files/0001-support-musl.patch
@@ -0,0 +1,46 @@
+From f73df5196c35ef9c4531e4b6b26800c41954fd77 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 11 May 2019 20:00:29 +0800
+Subject: [PATCH] support musl
+
+...
+|./lib/math.h:2877:1: error: 'int signbit(float)' conflicts with a previous 
declaration
+| _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
+| ^
+|In file included from recipe-sysroot/usr/include/c++/8.3.0/math.h:36,
+| from ./lib/math.h:27,
+| from ./src/include/driver.h:27,
+| from src/devices/grodvi/dvi.cpp:20:
+|recipe-sysroot/usr/include/c++/8.3.0/cmath:661:3: note: previous declaration 
'constexpr bool std::signbit(float)'
+|   signbit(float __x)
+|   ^~~
+...
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia 
+---
+ lib/math.in.h | 2 ++
+ 1 file changed, 2 insertions(+)
...

The upstream fix seems to be different, the signbit.m4 part of
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=453ff940449bbbde9ec00f0bbf82a359c5598fc7


It's a long story, the git version groff is using submodule gnulib 
rather than itself


http://git.savannah.gnu.org/cgit/groff.git/commit/?id=5fec19d453983bc3127052e4f100110efda93786

Your suggestion works in this situation.

But we do not use git groff, we are building from the source as in 
distributed tarball files which


does not require gnulib any more, so your fix is not suitable for us

SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \

//Hongxu



cu
Adrian



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


Re: [OE-core] [PATCH 04/10] bash: upgrade 4.4.18 -> 5.0

2019-05-12 Thread Hongxu Jia

On 5/12/19 4:30 PM, Adrian Bunk wrote:

On Sun, May 12, 2019 at 04:16:24PM +0800, Hongxu Jia wrote:

...
  ...1-help-fix-printf-format-security-warning.patch | 35 -
  meta/recipes-extended/bash/bash/build-tests.patch  |  7 +++-
  meta/recipes-extended/bash/bash/execute_cmd.patch  | 19 ++---
  meta/recipes-extended/bash/bash/pathexp-dep.patch  | 13 ---
  meta/recipes-extended/bash/bash_4.4.18.bb  | 41 
  meta/recipes-extended/bash/bash_5.0.bb | 45 ++
  6 files changed, 64 insertions(+), 96 deletions(-)
  delete mode 100644 
meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch
  delete mode 100644 meta/recipes-extended/bash/bash/pathexp-dep.patch
  delete mode 100644 meta/recipes-extended/bash/bash_4.4.18.bb
  create mode 100644 meta/recipes-extended/bash/bash_5.0.bb
...
-   
${GNU_MIRROR}/bash/bash-4.4-patches/bash44-019;apply=yes;striplevel=0;name=patch019
 \
-   
${GNU_MIRROR}/bash/bash-4.4-patches/bash44-020;apply=yes;striplevel=0;name=patch020
 \
-   
${GNU_MIRROR}/bash/bash-4.4-patches/bash44-021;apply=yes;striplevel=0;name=patch021
 \
-   
${GNU_MIRROR}/bash/bash-4.4-patches/bash44-022;apply=yes;striplevel=0;name=patch022
 \
-   
${GNU_MIRROR}/bash/bash-4.4-patches/bash44-023;apply=yes;striplevel=0;name=patch023
 \
...
+   
${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-001;apply=yes;striplevel=0;name=patch001
 \
+   
${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-002;apply=yes;striplevel=0;name=patch002
 \
+   
${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-003;apply=yes;striplevel=0;name=patch003
 \
+   
${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-004;apply=yes;striplevel=0;name=patch004
 \
+   
${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-005;apply=yes;striplevel=0;name=patch005
 \
+   
${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-006;apply=yes;striplevel=0;name=patch006
 \
+   
${GNU_MIRROR}/bash/bash-${PV}-patches/bash50-007;apply=yes;striplevel=0;name=patch007
 \
...

Some "git add/rm" seems to be missing around these patches.


Do you mean I miss the patches? They should be fetch from remote upstream.

Or do you mean `git mv' rather than `git add/rm'?

I use scripts/create-pull-request to generate patch, it uses `git 
format-patch  -M40' which


seems `git add/rm' rather than `git mv', and `-M10'  will be `git mv' here

//Hongxu


cu
Adrian



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


[OE-core] [PATCH 10/10] ghostscript: 9.26 -> 9.27

2019-05-12 Thread Hongxu Jia
- Rebase ghostscript-9.02-genarch.patch

- Drop backported CVE patches

Signed-off-by: Hongxu Jia 
---
 .../ghostscript/CVE-2019-3835-0001.patch   |  99 
 .../ghostscript/CVE-2019-3835-0002.patch   |  71 ---
 .../ghostscript/CVE-2019-3835-0003.patch   | 295 --
 .../ghostscript/CVE-2019-3835-0004.patch   | 167 --
 .../ghostscript/CVE-2019-3838-0001.patch   |  34 --
 .../ghostscript/CVE-2019-3838-0002.patch   |  30 --
 .../ghostscript/CVE-2019-6116-0001.patch   | 177 --
 .../ghostscript/CVE-2019-6116-0002.patch   | 442 ---
 .../ghostscript/CVE-2019-6116-0003.patch   |  32 --
 .../ghostscript/CVE-2019-6116-0004.patch   | 136 -
 .../ghostscript/CVE-2019-6116-0005.patch   | 250 -
 .../ghostscript/CVE-2019-6116-0006.patch   | 596 -
 .../ghostscript/CVE-2019-6116-0007.patch   | 346 
 .../ghostscript/ghostscript-9.02-genarch.patch |  14 +-
 .../{ghostscript_9.26.bb => ghostscript_9.27.bb}   |  19 +-
 15 files changed, 10 insertions(+), 2698 deletions(-)
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-3835-0001.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-3835-0002.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-3835-0003.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-3835-0004.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-3838-0001.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-3838-0002.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0001.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0002.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0003.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0004.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0005.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0006.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-6116-0007.patch
 rename meta/recipes-extended/ghostscript/{ghostscript_9.26.bb => 
ghostscript_9.27.bb} (85%)

diff --git 
a/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-3835-0001.patch 
b/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-3835-0001.patch
deleted file mode 100644
index 30ce04a..000
--- a/meta/recipes-extended/ghostscript/ghostscript/CVE-2019-3835-0001.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From ad3ad6b389653722507e588c5cb34d8731e49e89 Mon Sep 17 00:00:00 2001
-From: Chris Liddell 
-Date: Mon, 26 Nov 2018 18:01:25 +
-Subject: [PATCH] Have gs_cet.ps run from gs_init.ps
-
-Previously gs_cet.ps was run on the command line, to set up the interpreter
-state so our output more closely matches the example output for the QL CET
-tests.
-
-Allow a -dCETMODE command line switch, which will cause gs_init.ps to run the
-file directly.
-
-This works better for gpdl as it means the changes are made in the intial
-interpreter state, rather than after initialisation is complete.
-
-This also means adding a definition of the default procedure for black
-generation and under color removal (rather it being defined in-line in
-.setdefaultbgucr
-
-Also, add a check so gs_cet.ps only runs once - if we try to run it a second
-time, we'll just skip over the file, flushing through to the end.
-
-CVE: CVE-2019-3835
-Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git]
-
-Signed-off-by: Ovidiu Panait 

- Resource/Init/gs_cet.ps  | 11 ++-
- Resource/Init/gs_init.ps | 13 -
- 2 files changed, 22 insertions(+), 2 deletions(-)
-
-diff --git a/Resource/Init/gs_cet.ps b/Resource/Init/gs_cet.ps
-index d3e1686..75534bb 100644
 a/Resource/Init/gs_cet.ps
-+++ b/Resource/Init/gs_cet.ps
-@@ -1,6 +1,11 @@
- %!PS
- % Set defaults for Ghostscript to match Adobe CPSI behaviour for CET
- 
-+systemdict /product get (PhotoPRINT SE 5.0v2) readonly eq
-+{
-+  (%END GS_CET) .skipeof
-+} if
-+
- % do this in the server level so it is persistent across jobs
- //true 0 startjob not {
-   (*** Warning: CET startup is not in server default) = flush
-@@ -25,7 +30,9 @@ currentglobal //true setglobal
- 
- /UNROLLFORMS true def
- 
--{ } bind dup
-+(%.defaultbgrucrproc) cvn { } bind def
-+
-+(%.defaultbgrucrproc) cvn load dup
- setblackgeneration
- setundercolorremoval
- 0 array cvx readonly dup dup dup setcolortransfer
-@@ -109,3 +116,5 @@ userdict /.smoothness currentsmoothness put
- % end of slightly nasty hack to give consistent cluster results
- 
- //false 0 startjob pop% re-enter encapsulated mode
-+
-+%END GS_CET
-diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps

[OE-core] [PATCH 07/10] subversion: upgrade 1.11.1 -> 1.12.0

2019-05-12 Thread Hongxu Jia
- Backport a patch to fix build failure while APR 1.7.0
...
checking for apr_int64_t Python/C API format string...
configure: error: failed to recognize APR_INT64_T_FMT on this platform
...

- Rebase disable_macos.patch and serfmacro.patch

License-update: no change, declare two new added file
* in build/ac-macros/ax_boost_base.m4
* in build/ac-macros/ax_boost_unit_test_framework.m4

Signed-off-by: Hongxu Jia 
---
 .../subversion/subversion/disable_macos.patch  |  45 +
 .../subversion/subversion/serfmacro.patch  |  27 --
 .../subversion-1.12.0-apr_1.7.0_fix-1.patch| 107 +
 .../{subversion_1.11.1.bb => subversion_1.12.0.bb} |   7 +-
 4 files changed, 153 insertions(+), 33 deletions(-)
 create mode 100644 
meta/recipes-devtools/subversion/subversion/subversion-1.12.0-apr_1.7.0_fix-1.patch
 rename meta/recipes-devtools/subversion/{subversion_1.11.1.bb => 
subversion_1.12.0.bb} (92%)

diff --git a/meta/recipes-devtools/subversion/subversion/disable_macos.patch 
b/meta/recipes-devtools/subversion/subversion/disable_macos.patch
index ec3be49..8d2d635 100644
--- a/meta/recipes-devtools/subversion/subversion/disable_macos.patch
+++ b/meta/recipes-devtools/subversion/subversion/disable_macos.patch
@@ -1,15 +1,25 @@
-These tests don't work in cross compiling, just disable them for now, we don't
-build subversion on OS-X at this time.
+From 9c350c037ca3489dbeece6ecc2d7e2e5dbb177e9 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 11 May 2019 15:21:46 +0800
+Subject: [PATCH] These tests don't work in cross compiling, just disable them
+ for now, we don't build subversion on OS-X at this time.
 
 RP 1014/7/16
 
 Upstream-Status: Pending [needs a rewrite to support a cache value]
 
-Index: subversion-1.8.9/build/ac-macros/macosx.m4
-===
 subversion-1.8.9.orig/build/ac-macros/macosx.m42012-11-26 
03:04:27.0 +
-+++ subversion-1.8.9/build/ac-macros/macosx.m4 2014-07-16 12:28:58.357300403 
+
-@@ -24,21 +24,7 @@
+Rebase to 1.12.0
+
+Signed-off-by: Hongxu Jia 
+---
+ build/ac-macros/macosx.m4 | 31 +--
+ 1 file changed, 1 insertion(+), 30 deletions(-)
+
+diff --git a/build/ac-macros/macosx.m4 b/build/ac-macros/macosx.m4
+index 92fa58e..a568e1c 100644
+--- a/build/ac-macros/macosx.m4
 b/build/ac-macros/macosx.m4
+@@ -24,21 +24,7 @@ dnl Check for _dyld_image_name and _dyld_image_header 
availability
  AC_DEFUN(SVN_LIB_MACHO_ITERATE,
  [
AC_MSG_CHECKING([for Mach-O dynamic module iteration functions])
@@ -31,7 +41,7 @@ Index: subversion-1.8.9/build/ac-macros/macosx.m4
  ])
  
  dnl SVN_LIB_MACOS_PLIST
-@@ -46,34 +32,7 @@
+@@ -46,23 +32,8 @@ dnl Assign variables for Mac OS property list support
  AC_DEFUN(SVN_LIB_MACOS_PLIST,
  [
AC_MSG_CHECKING([for Mac OS property list utilities])
@@ -44,25 +54,18 @@ Index: subversion-1.8.9/build/ac-macros/macosx.m4
 -#error ProperyList API unavailable.
 -#endif
 -  ]],[[]])],[
--dnl ### Hack.  We should only need to pass the -framework options when
--dnl linking libsvn_subr, since it is the only library that uses Keychain.
--dnl
--dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for
--dnl OS X frameworks like it does for normal libraries, so we need to
--dnl explicitly pass the option to all the users of libsvn_subr to allow
--dnl static builds to link successfully.
--dnl
--dnl This does mean that all executables we link will be linked directly
--dnl to these frameworks - even when building shared libraries - but that
--dnl shouldn't cause any problems.
--
--LIBS="$LIBS -framework CoreFoundation"
+-SVN_MACOS_PLIST_LIBS="-framework CoreFoundation"
+-AC_SUBST(SVN_MACOS_PLIST_LIBS)
 -AC_DEFINE([SVN_HAVE_MACOS_PLIST], [1],
 -  [Is Mac OS property list API available?])
 -AC_MSG_RESULT([yes])
 -  ],[
++  AC_SUBST([SVN_MACOS_PLIST_LIBS], [""])
  AC_MSG_RESULT([no])
 -  ])
  ])
  
  dnl SVN_LIB_MACOS_KEYCHAIN
+-- 
+2.7.4
+
diff --git a/meta/recipes-devtools/subversion/subversion/serfmacro.patch 
b/meta/recipes-devtools/subversion/subversion/serfmacro.patch
index 9a45cb9..507de0f 100644
--- a/meta/recipes-devtools/subversion/subversion/serfmacro.patch
+++ b/meta/recipes-devtools/subversion/subversion/serfmacro.patch
@@ -1,22 +1,31 @@
-The existing sed expression can match expressions like 
---sysroot=/some/path/xxx-linux/ which clearly isn't intended and 
-injects incorrect paths into LDFLAGS.
+The existing sed expression can match expressions like
+--sysroot=/some/path/xxx-linux/ which clearly isn't intended and injects
+incorrect paths into LDFLAGS.
 
 Fix this in the same way we address the problem in CFLAGS.
 
 RP 2016/12/7
 Upstream-Status: Pending
 
-Index: subversion-1.9.4/build/ac-macros/serf.m4
-===

[OE-core] [PATCH 09/10] libxml2: upgrade 2.9.8 -> 2.9.9

2019-05-12 Thread Hongxu Jia
- Drop backported fix-CVE-2017-8872.patch,
  fix-CVE-2018-14404.patch and
  0001-Fix-infinite-loop-in-LZMA-decompression.patch

Signed-off-by: Hongxu Jia 
---
 ...1-Fix-infinite-loop-in-LZMA-decompression.patch |  55 --
 .../libxml/libxml2/fix-CVE-2017-8872.patch |  65 ---
 .../libxml/libxml2/fix-CVE-2018-14404.patch|  45 -
 .../libxml/libxml2/fix-execution-of-ptests.patch   |  24 ++-
 .../recipes-core/libxml/libxml2/libxml-64bit.patch |  24 ++-
 .../libxml/libxml2/libxml-m4-use-pkgconfig.patch   |  16 +-
 .../libxml/libxml2/python-sitepackages-dir.patch   |  13 +-
 meta/recipes-core/libxml/libxml2/runtest.patch | 204 -
 .../libxml/{libxml2_2.9.8.bb => libxml2_2.9.9.bb}  |   7 +-
 9 files changed, 172 insertions(+), 281 deletions(-)
 delete mode 100644 
meta/recipes-core/libxml/libxml2/0001-Fix-infinite-loop-in-LZMA-decompression.patch
 delete mode 100644 meta/recipes-core/libxml/libxml2/fix-CVE-2017-8872.patch
 delete mode 100644 meta/recipes-core/libxml/libxml2/fix-CVE-2018-14404.patch
 rename meta/recipes-core/libxml/{libxml2_2.9.8.bb => libxml2_2.9.9.bb} (93%)

diff --git 
a/meta/recipes-core/libxml/libxml2/0001-Fix-infinite-loop-in-LZMA-decompression.patch
 
b/meta/recipes-core/libxml/libxml2/0001-Fix-infinite-loop-in-LZMA-decompression.patch
deleted file mode 100644
index 16c2295..000
--- 
a/meta/recipes-core/libxml/libxml2/0001-Fix-infinite-loop-in-LZMA-decompression.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 28a9dc642ffd759df1e48be247a114f440a6c16e Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer 
-Date: Mon, 30 Jul 2018 13:14:11 +0200
-Subject: [PATCH] Fix infinite loop in LZMA decompression
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Check the liblzma error code more thoroughly to avoid infinite loops.
-
-Closes: https://gitlab.gnome.org/GNOME/libxml2/issues/13
-Closes: https://bugzilla.gnome.org/show_bug.cgi?id=794914
-
-This is CVE-2018-9251 and CVE-2018-14567.
-
-Thanks to Dongliang Mu and Simon Wörner for the reports.
-
-CVE: CVE-2018-9251
-CVE: CVE-2018-14567
-Upstream-Status: Backport 
[https://gitlab.gnome.org/GNOME/libxml2/commit/2240fbf5912054af025fb6e01e26375100275e74]
-Signed-off-by: Hongxu Jia 

- xzlib.c | 9 +
- 1 file changed, 9 insertions(+)
-
-diff --git a/xzlib.c b/xzlib.c
-index a839169..0ba88cf 100644
 a/xzlib.c
-+++ b/xzlib.c
-@@ -562,6 +562,10 @@ xz_decomp(xz_statep state)
-  "internal error: inflate stream corrupt");
- return -1;
- }
-+/*
-+ * FIXME: Remapping a couple of error codes and falling through
-+ * to the LZMA error handling looks fragile.
-+ */
- if (ret == Z_MEM_ERROR)
- ret = LZMA_MEM_ERROR;
- if (ret == Z_DATA_ERROR)
-@@ -587,6 +591,11 @@ xz_decomp(xz_statep state)
- xz_error(state, LZMA_PROG_ERROR, "compression error");
- return -1;
- }
-+if ((state->how != GZIP) &&
-+(ret != LZMA_OK) && (ret != LZMA_STREAM_END)) {
-+xz_error(state, ret, "lzma error");
-+return -1;
-+}
- } while (strm->avail_out && ret != LZMA_STREAM_END);
- 
- /* update available output and crc check value */
--- 
-2.7.4
-
diff --git a/meta/recipes-core/libxml/libxml2/fix-CVE-2017-8872.patch 
b/meta/recipes-core/libxml/libxml2/fix-CVE-2017-8872.patch
deleted file mode 100644
index 42a4b0e..000
--- a/meta/recipes-core/libxml/libxml2/fix-CVE-2017-8872.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Upstream-Status: Backport
-CVE: CVE-2017-8872
-Signed-off-by: Ross Burton 
-
-From 123234f2cfcd9e9b9f83047eee1dc17b4c3f4407 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer 
-Date: Tue, 11 Sep 2018 14:52:07 +0200
-Subject: [PATCH] Free input buffer in xmlHaltParser
-
-This avoids miscalculation of available bytes.
-
-Thanks to Yunho Kim for the report.
-
-Closes: #26

- parser.c |  5 +
- result/errors/759573.xml.err | 17 +++--
- 2 files changed, 12 insertions(+), 10 deletions(-)
-
-diff --git a/parser.c b/parser.c
-index ca9fde2c..5813a664 100644
 a/parser.c
-+++ b/parser.c
-@@ -12462,7 +12462,12 @@ xmlHaltParser(xmlParserCtxtPtr ctxt) {
-   ctxt->input->free((xmlChar *) ctxt->input->base);
-   ctxt->input->free = NULL;
-   }
-+if (ctxt->input->buf != NULL) {
-+xmlFreeParserInputBuffer(ctxt->input->buf);
-+ctxt->input->buf = NULL;
-+}
-   ctxt->input->cur = BAD_CAST"";
-+ctxt->input->length = 0;
-   ctxt->input->base = ctxt->input->cur;
- ctxt->input->end = ctxt->input->cur;
- }
-diff --git a/result/errors/759573.xml.err b/result/errors/759573.xml.err
-index 554039f6..38ef5c40 100644

[OE-core] [PATCH 00/10] Upgrade 9 recipes and 1 fix

2019-05-12 Thread Hongxu Jia
The following changes since commit 244f2e5fb545dd40d020811799a6022e14468eeb:

  icu: Added armeb support. (2019-05-09 16:31:06 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib hongxu/upgrade-20190510
  
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=hongxu/upgrade-20190510

Hongxu Jia (10):
  apr: upgrade 1.6.5 -> 1.7.0
  man-pages: upgrade 4.16 -> 5.01
  man-db: upgrade 2.8.4 -> 2.8.5
  bash: upgrade 4.4.18 -> 5.0
  ncurses: fix incorrect UPSTREAM_CHECK_GITTAGREGEX
  gpgme: upgrade 1.12.0 -> 1.13.0
  subversion: upgrade 1.11.1 -> 1.12.0
  groff: upgrade 1.22.3 -> 1.22.4
  libxml2: upgrade 2.9.8 -> 2.9.9
  ghostscript: 9.26 -> 9.27

 ...1-Fix-infinite-loop-in-LZMA-decompression.patch |  55 --
 .../libxml/libxml2/fix-CVE-2017-8872.patch |  65 ---
 .../libxml/libxml2/fix-CVE-2018-14404.patch|  45 --
 .../libxml/libxml2/fix-execution-of-ptests.patch   |  24 +-
 .../recipes-core/libxml/libxml2/libxml-64bit.patch |  24 +-
 .../libxml/libxml2/libxml-m4-use-pkgconfig.patch   |  16 +-
 .../libxml/libxml2/python-sitepackages-dir.patch   |  13 +-
 meta/recipes-core/libxml/libxml2/runtest.patch | 204 +++
 .../libxml/{libxml2_2.9.8.bb => libxml2_2.9.9.bb}  |   7 +-
 meta/recipes-core/ncurses/ncurses_6.1+20181013.bb  |   2 +-
 .../subversion/subversion/disable_macos.patch  |  45 +-
 .../subversion/subversion/serfmacro.patch  |  27 +-
 .../subversion-1.12.0-apr_1.7.0_fix-1.patch| 107 
 .../{subversion_1.11.1.bb => subversion_1.12.0.bb} |   7 +-
 ...1-help-fix-printf-format-security-warning.patch |  35 --
 meta/recipes-extended/bash/bash/build-tests.patch  |   7 +-
 meta/recipes-extended/bash/bash/execute_cmd.patch  |  19 +-
 meta/recipes-extended/bash/bash/pathexp-dep.patch  |  13 -
 meta/recipes-extended/bash/bash_4.4.18.bb  |  41 --
 meta/recipes-extended/bash/bash_5.0.bb |  45 ++
 .../ghostscript/CVE-2019-3835-0001.patch   |  99 
 .../ghostscript/CVE-2019-3835-0002.patch   |  71 ---
 .../ghostscript/CVE-2019-3835-0003.patch   | 295 --
 .../ghostscript/CVE-2019-3835-0004.patch   | 167 --
 .../ghostscript/CVE-2019-3838-0001.patch   |  34 --
 .../ghostscript/CVE-2019-3838-0002.patch   |  30 --
 .../ghostscript/CVE-2019-6116-0001.patch   | 177 --
 .../ghostscript/CVE-2019-6116-0002.patch   | 442 ---
 .../ghostscript/CVE-2019-6116-0003.patch   |  32 --
 .../ghostscript/CVE-2019-6116-0004.patch   | 136 -
 .../ghostscript/CVE-2019-6116-0005.patch   | 250 -
 .../ghostscript/CVE-2019-6116-0006.patch   | 596 -
 .../ghostscript/CVE-2019-6116-0007.patch   | 346 
 .../ghostscript/ghostscript-9.02-genarch.patch |  14 +-
 .../{ghostscript_9.26.bb => ghostscript_9.27.bb}   |  19 +-
 .../groff/files/0001-fix-shebang-for-taget.patch   |  31 ++
 .../0001-replace-perl-w-with-use-warnings.patch|  34 +-
 .../groff/files/0001-support-musl.patch|  46 ++
 .../groff-not-search-fonts-on-build-host.patch |  20 +-
 ...need_charset_alias-when-building-for-musl.patch |  30 --
 ...off-1.22.2-correct-man.local-install-path.patch |  34 --
 .../groff/{groff_1.22.3.bb => groff_1.22.4.bb} |  36 +-
 .../man-db/{man-db_2.8.4.bb => man-db_2.8.5.bb}|   9 +-
 .../{man-pages_4.16.bb => man-pages_5.01.bb}   |   4 +-
 ..._t-size-doesn-t-match-in-glibc-when-cross.patch |  26 +-
 .../apr/{apr_1.6.5.bb => apr_1.7.0.bb} |   4 +-
 ...d-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch | 134 +
 .../gpgme/gpgme/0001-pkgconfig.patch   |  72 ++-
 ...python-gpg-error-config-should-not-be-use.patch |  33 +-
 .../gpgme/0008-do-not-auto-check-var-PYTHON.patch  |  36 ++
 .../gpgme/{gpgme_1.12.0.bb => gpgme_1.13.0.bb} |  12 +-
 51 files changed, 763 insertions(+), 3307 deletions(-)
 delete mode 100644 
meta/recipes-core/libxml/libxml2/0001-Fix-infinite-loop-in-LZMA-decompression.patch
 delete mode 100644 meta/recipes-core/libxml/libxml2/fix-CVE-2017-8872.patch
 delete mode 100644 meta/recipes-core/libxml/libxml2/fix-CVE-2018-14404.patch
 rename meta/recipes-core/libxml/{libxml2_2.9.8.bb => libxml2_2.9.9.bb} (93%)
 create mode 100644 
meta/recipes-devtools/subversion/subversion/subversion-1.12.0-apr_1.7.0_fix-1.patch
 rename meta/recipes-devtools/subversion/{subversion_1.11.1.bb => 
subversion_1.12.0.bb} (92%)
 delete mode 100644 
meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch
 delete mode 100644 meta/recipes-extended/bash/bash/pathexp-dep.patch
 delete mode 100644 meta/recipes-extended/bash/bash_4.4.18.bb
 create mode 100644 meta/recipes-extended/bash/bash_5.0.bb
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2019-3835-0001.patch
 delete mode 100644 
meta/recipes-extended/ghostscript

[OE-core] [PATCH 06/10] gpgme: upgrade 1.12.0 -> 1.13.0

2019-05-12 Thread Hongxu Jia
- Revert gpgrt-config support which oe-core does not support it

- Rebase 0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
  and 0001-pkgconfig.patch

- Tweak LANGUAGES, since upstream auto check the version of python rather
  than specify option
  [ff6ff61 python: Auto-check for all installed python versions.]

License-update: SPDX identifiers site and formats
[8d91c0f Add SPDX identifiers to most source files]
"s/LGPL-2.1+/LGPL-2.1-or-later/"
"s#https://www.gnu.org/licenses#https://gnu.org/licenses#;

Signed-off-by: Hongxu Jia 
---
 ...d-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch | 134 +
 .../gpgme/gpgme/0001-pkgconfig.patch   |  72 +--
 ...python-gpg-error-config-should-not-be-use.patch |  33 +++--
 .../gpgme/0008-do-not-auto-check-var-PYTHON.patch  |  36 ++
 .../gpgme/{gpgme_1.12.0.bb => gpgme_1.13.0.bb} |  12 +-
 5 files changed, 222 insertions(+), 65 deletions(-)
 create mode 100644 
meta/recipes-support/gpgme/gpgme/0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch
 create mode 100644 
meta/recipes-support/gpgme/gpgme/0008-do-not-auto-check-var-PYTHON.patch
 rename meta/recipes-support/gpgme/{gpgme_1.12.0.bb => gpgme_1.13.0.bb} (88%)

diff --git 
a/meta/recipes-support/gpgme/gpgme/0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch
 
b/meta/recipes-support/gpgme/gpgme/0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch
new file mode 100644
index 000..0ed4eb6
--- /dev/null
+++ 
b/meta/recipes-support/gpgme/gpgme/0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch
@@ -0,0 +1,134 @@
+From a001b3c23bf80fd752044615b9bba6b926ff9666 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Fri, 10 May 2019 14:18:04 +0800
+Subject: [PATCH] Revert "build: Make gpgme.m4 use gpgrt-config with *.pc."
+
+This reverts commit 60828a505a1c74fd34476c181df2a588ea6f9c83.
+
+The oe-core does not support gpgrt-config, so revert it
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ src/gpgme.m4 | 58 ++
+ 1 file changed, 10 insertions(+), 48 deletions(-)
+
+diff --git a/src/gpgme.m4 b/src/gpgme.m4
+index 2a72f18..6c2be44 100644
+--- a/src/gpgme.m4
 b/src/gpgme.m4
+@@ -1,5 +1,5 @@
+ # gpgme.m4 - autoconf macro to detect GPGME.
+-# Copyright (C) 2002, 2003, 2004, 2014, 2018 g10 Code GmbH
++# Copyright (C) 2002, 2003, 2004, 2014 g10 Code GmbH
+ #
+ # This file is free software; as a special exception the author gives
+ # unlimited permission to copy and/or distribute it, with or without
+@@ -9,7 +9,7 @@
+ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ #
+-# Last-changed: 2018-11-12
++# Last-changed: 2014-10-02
+ 
+ 
+ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
+@@ -36,24 +36,10 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
+  fi
+   fi
+ 
+-  use_gpgrt_config=""
+-  if test x"${GPGME_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" 
!= "no"; then
+-if $GPGRT_CONFIG gpgme --exists; then
+-  GPGME_CONFIG="$GPGRT_CONFIG gpgme"
+-  AC_MSG_NOTICE([Use gpgrt-config as gpgme-config])
+-  use_gpgrt_config=yes
+-fi
+-  fi
+-  if test -z "$use_gpgrt_config"; then
+-AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
+-  fi
++  AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
+ 
+   if test "$GPGME_CONFIG" != "no" ; then
+-if test -z "$use_gpgrt_config"; then
+-  gpgme_version=`$GPGME_CONFIG --version`
+-else
+-  gpgme_version=`$GPGME_CONFIG --modversion`
+-fi
++gpgme_version=`$GPGME_CONFIG --version`
+   fi
+   gpgme_version_major=`echo $gpgme_version | \
+sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+@@ -66,16 +52,12 @@ AC_DEFUN([_AM_PATH_GPGME_CONFIG],
+ 
+ AC_DEFUN([_AM_PATH_GPGME_CONFIG_HOST_CHECK],
+ [
+-if test -z "$use_gpgrt_config"; then
+-  gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none`
+-else
+-  gpgme_config_host=`$GPGME_CONFIG --variable=host 2>/dev/null || echo 
none`
+-fi
++gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none`
+ if test x"$gpgme_config_host" != xnone ; then
+   if test x"$gpgme_config_host" != x"$host" ; then
+   AC_MSG_WARN([[
+ ***
+-*** The config script "$GPGME_CONFIG" was
++*** The config script $GPGME_CONFIG was
+ *** built for $gpgme_config_host and thus may not match the
+ *** used host $host.
+ *** You may want to use the configure option --with-gpgme-prefix
+@@ -136,11 +118,7 @@ AC_DEFUN([AM_PATH_GPGME],
+  # If we have a recent GPGME, we should also check that the
+  # API is compatible.
+  if test "$req_gpgme_api" -gt 0 ; then
+-if test -

[OE-core] [PATCH 05/10] ncurses: fix incorrect UPSTREAM_CHECK_GITTAGREGEX

2019-05-12 Thread Hongxu Jia
The upstream git tag has a `upstream/' prefix, such as:
>>> import re
>>> pattern = "upstream/(?P\d+(\.\d+)+(\+\d+)*)"
>>> string = "upstream/6.1+20181013"
>>> result = re.match(pattern, string)
>>> result['pver']
'6.1+20181013'

Signed-off-by: Hongxu Jia 
---
 meta/recipes-core/ncurses/ncurses_6.1+20181013.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/ncurses/ncurses_6.1+20181013.bb 
b/meta/recipes-core/ncurses/ncurses_6.1+20181013.bb
index ef6ca98..928c477 100644
--- a/meta/recipes-core/ncurses/ncurses_6.1+20181013.bb
+++ b/meta/recipes-core/ncurses/ncurses_6.1+20181013.bb
@@ -8,4 +8,4 @@ SRC_URI += "file://0001-tic-hang.patch \
 SRCREV = "7a97a7f937762ba342d5b2fd7cd090885a809835"
 S = "${WORKDIR}/git"
 EXTRA_OECONF += "--with-abi-version=5 --cache-file=${B}/config.cache"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+(\+\d+)*)"
+UPSTREAM_CHECK_GITTAGREGEX = "upstream/(?P\d+(\.\d+)+(\+\d+)*)"
-- 
2.7.4

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


[OE-core] [PATCH 04/10] bash: upgrade 4.4.18 -> 5.0

2019-05-12 Thread Hongxu Jia
- Rebase build-tests.patch and execute_cmd.patch to 5.0

- Drop 0001-help-fix-printf-format-security-warning.patch
  and pathexp-dep.patch, upstream has fixed them in commit
  [d233b48 bash-5.0 distribution sources and documentation]

Signed-off-by: Hongxu Jia 
---
 ...1-help-fix-printf-format-security-warning.patch | 35 -
 meta/recipes-extended/bash/bash/build-tests.patch  |  7 +++-
 meta/recipes-extended/bash/bash/execute_cmd.patch  | 19 ++---
 meta/recipes-extended/bash/bash/pathexp-dep.patch  | 13 ---
 meta/recipes-extended/bash/bash_4.4.18.bb  | 41 
 meta/recipes-extended/bash/bash_5.0.bb | 45 ++
 6 files changed, 64 insertions(+), 96 deletions(-)
 delete mode 100644 
meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch
 delete mode 100644 meta/recipes-extended/bash/bash/pathexp-dep.patch
 delete mode 100644 meta/recipes-extended/bash/bash_4.4.18.bb
 create mode 100644 meta/recipes-extended/bash/bash_5.0.bb

diff --git 
a/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch
 
b/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch
deleted file mode 100644
index 5405c84..000
--- 
a/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From e5837a42f8f48a6a721805ff8f7fcd32861d09ca Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= 
-Date: Tue, 26 Jul 2016 13:09:47 +0100
-Subject: [PATCH] help: fix printf() format security warning
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-| ../../bash-4.3.30/builtins/../../bash-4.3.30/builtins/help.def: In function 
'help_builtin':
-| ../../bash-4.3.30/builtins/../../bash-4.3.30/builtins/help.def:130:7: error: 
format not a string literal and no format arguments [-Werror=format-security]
-|printf (ngettext ("Shell commands matching keyword `", "Shell 
commands matching keywords `", (list->next ? 2 : 1)));
-|^~
-
-Signed-off-by: André Draszik 

-Upstream-Status: Pending
- builtins/help.def | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/builtins/help.def b/builtins/help.def
-index 1894f17..cf624c6 100644
 a/builtins/help.def
-+++ b/builtins/help.def
-@@ -127,7 +127,7 @@ help_builtin (list)
- 
-   if (glob_pattern_p (list->word->word))
- {
--  printf (ngettext ("Shell commands matching keyword `", "Shell commands 
matching keywords `", (list->next ? 2 : 1)));
-+  printf ("%s", ngettext ("Shell commands matching keyword `", "Shell 
commands matching keywords `", (list->next ? 2 : 1)));
-   print_word_list (list, ", ");
-   printf ("'\n\n");
- }
--- 
-2.8.1
-
diff --git a/meta/recipes-extended/bash/bash/build-tests.patch 
b/meta/recipes-extended/bash/bash/build-tests.patch
index 73a81b6..5f2dae9 100644
--- a/meta/recipes-extended/bash/bash/build-tests.patch
+++ b/meta/recipes-extended/bash/bash/build-tests.patch
@@ -2,15 +2,18 @@ Add 'ptest' target to Makefile, to run tests without checking 
dependencies.
 
 Upstream-Status: Pending
 Signed-off-by: Anders Roxell 
+
+Rebase to 5.0
 Signed-off-by: Hongxu Jia 
 ---
  Makefile.in | 24 +++-
  1 file changed, 19 insertions(+), 5 deletions(-)
 
 diff --git a/Makefile.in b/Makefile.in
+index 5fcb44b..de1c255 100644
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -848,20 +848,34 @@ maybe-clean:
+@@ -932,20 +932,34 @@ maybe-clean:
fi
  
  recho$(EXEEXT):   $(SUPPORT_SRC)recho.c
@@ -51,5 +54,5 @@ diff --git a/Makefile.in b/Makefile.in
PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) 
${TESTSCRIPT} )
  
 -- 
-1.8.1.2
+2.7.4
 
diff --git a/meta/recipes-extended/bash/bash/execute_cmd.patch 
b/meta/recipes-extended/bash/bash/execute_cmd.patch
index 9970b4d..7a9e9a9 100644
--- a/meta/recipes-extended/bash/bash/execute_cmd.patch
+++ b/meta/recipes-extended/bash/bash/execute_cmd.patch
@@ -1,10 +1,16 @@
 Upstream-Status: Inappropriate [embedded specific]
 
-Index: execute_cmd.c
-===
 execute_cmd.c.orig
-+++ execute_cmd.c
-@@ -2459,7 +2459,11 @@ execute_pipeline (command, asynchronous,
+Rebase to 5.0
+Signed-off-by: Hongxu Jia 
+---
+ execute_cmd.c | 6 +-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/execute_cmd.c b/execute_cmd.c
+index f1d74bf..31674b4 100644
+--- a/execute_cmd.c
 b/execute_cmd.c
+@@ -2567,7 +2567,11 @@ execute_pipeline (command, asynchronous, pipe_in, 
pipe_out, fds_to_close)
/* If the `lastpipe' option is set with shopt, and job control is not
   enabled, execute the last element of non-async pipelines in the
   current shell environment. */
@@ -17,3 +23,6 @@ Index: execute_cmd.c
   

[OE-core] [PATCH 03/10] man-db: upgrade 2.8.4 -> 2.8.5

2019-05-12 Thread Hongxu Jia
Upstream shipped a systemd service in the following commit
[bc52248 Ship a systemd timer for daily DB maintenance]
Backward compatible, disable it by default

Signed-off-by: Hongxu Jia 
---
 .../recipes-extended/man-db/{man-db_2.8.4.bb => man-db_2.8.5.bb} | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)
 rename meta/recipes-extended/man-db/{man-db_2.8.4.bb => man-db_2.8.5.bb} (86%)

diff --git a/meta/recipes-extended/man-db/man-db_2.8.4.bb 
b/meta/recipes-extended/man-db/man-db_2.8.5.bb
similarity index 86%
rename from meta/recipes-extended/man-db/man-db_2.8.4.bb
rename to meta/recipes-extended/man-db/man-db_2.8.5.bb
index aa36465..441e2f4 100644
--- a/meta/recipes-extended/man-db/man-db_2.8.4.bb
+++ b/meta/recipes-extended/man-db/man-db_2.8.5.bb
@@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = 
"file://docs/COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343
 SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz \
file://99_mandb \
file://man_db.conf-avoid-multilib-install-file-conflict.patch"
-SRC_URI[md5sum] = "ab41db551f500e4a595b11203b86c67a"
-SRC_URI[sha256sum] = 
"103c185f9d8269b9ee3b8a4cb27912b3aa393e952731ef96fedc880723472bc3"
+SRC_URI[md5sum] = "c5c6c3434be14a5527d43b5ad0f09a13"
+SRC_URI[sha256sum] = 
"b64d52747534f1fe873b2876eb7f01319985309d5d7da319d2bc52ba1e73f6c1"
 
 DEPENDS = "libpipeline gdbm groff-native base-passwd"
 RDEPENDS_${PN} += "base-passwd"
@@ -16,7 +16,7 @@ RDEPENDS_${PN} += "base-passwd"
 # | /usr/src/debug/man-db/2.8.0-r0/man-db-2.8.0/src/whatis.c:939: undefined 
reference to `_nl_msg_cat_cntr'
 USE_NLS_libc-musl = "no"
 
-inherit gettext pkgconfig autotools
+inherit gettext pkgconfig autotools systemd
 
 EXTRA_OECONF = "--with-pager=less"
 EXTRA_AUTORECONF += "-I ${S}/gl/m4"
@@ -54,3 +54,6 @@ def compress_pkg(d):
 return ""
 
 RDEPENDS_${PN} += "${@compress_pkg(d)}"
+
+SYSTEMD_SERVICE_${PN} = "man-db.timer man-db.service"
+SYSTEMD_AUTO_ENABLE ?= "disable"
-- 
2.7.4

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


[OE-core] [PATCH 08/10] groff: upgrade 1.22.3 -> 1.22.4

2019-05-12 Thread Hongxu Jia
- Drop groff-1.22.2-correct-man.local-install-path.patch and
  0001-Unset-need_charset_alias-when-building-for-musl.patch

- Inherit bbclass pkgcnofig to fix `undefined macro: AC_DEFINE'
  ...
  | configure:20010: error: possibly undefined macro: AC_DEFINE
  ...

- Use autotools-brokensep to replace autotools to workaround failure
  caused by out of tree
  ...
  | rm -f lib/alloca.h-t lib/alloca.h && \
  | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  |   cat ../groff-1.22.4/lib/alloca.in.h; \
  | } > lib/alloca.h-t && \
  | mv -f lib/alloca.h-t lib/alloca.h
  | /bin/sh: line 4: lib/alloca.h-t: No such file or directory
  | Makefile:10407: recipe for target 'lib/alloca.h' failed
  ...

- Add `--without-doc' to not use target groff to generate doc at build time,
  since upstream commit [cfe916e Support of configure option to build the
  documentation.]

- Remove groff depends groff-native, and add DEPENDS bison-native

- Add 0001-fix-shebang-for-taget.patch

- Add 0001-support-musl.patch

Signed-off-by: Hongxu Jia 
---
 .../groff/files/0001-fix-shebang-for-taget.patch   | 31 +++
 .../0001-replace-perl-w-with-use-warnings.patch| 34 +---
 .../groff/files/0001-support-musl.patch| 46 ++
 .../groff-not-search-fonts-on-build-host.patch | 20 --
 ...need_charset_alias-when-building-for-musl.patch | 30 --
 ...off-1.22.2-correct-man.local-install-path.patch | 34 
 .../groff/{groff_1.22.3.bb => groff_1.22.4.bb} | 36 -
 7 files changed, 119 insertions(+), 112 deletions(-)
 create mode 100644 
meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch
 rename meta/recipes-extended/groff/{groff-1.22.3 => 
files}/0001-replace-perl-w-with-use-warnings.patch (76%)
 create mode 100644 meta/recipes-extended/groff/files/0001-support-musl.patch
 rename meta/recipes-extended/groff/{groff-1.22.3 => 
files}/groff-not-search-fonts-on-build-host.patch (42%)
 delete mode 100644 
meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
 delete mode 100644 
meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch
 rename meta/recipes-extended/groff/{groff_1.22.3.bb => groff_1.22.4.bb} (62%)

diff --git a/meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch 
b/meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch
new file mode 100644
index 000..1b94e8a
--- /dev/null
+++ b/meta/recipes-extended/groff/files/0001-fix-shebang-for-taget.patch
@@ -0,0 +1,31 @@
+From 54c795c8a3c7356294007b5a4eed1dd47ed6411d Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 11 May 2019 19:19:27 +0800
+Subject: [PATCH] fix shebang for target
+
+...
+|ERROR: groff-1.22.4-r0 do_package_qa: QA Issue: /usr/bin/gdiffmk contained in
+package groff requires tmp-glibc/hosttools/bash, but no providers found in
+RDEPENDS_groff? [file-rdeps]
+...
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ contrib/gdiffmk/gdiffmk.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/contrib/gdiffmk/gdiffmk.sh b/contrib/gdiffmk/gdiffmk.sh
+index 5ce931e..10f2300 100644
+--- a/contrib/gdiffmk/gdiffmk.sh
 b/contrib/gdiffmk/gdiffmk.sh
+@@ -1,4 +1,4 @@
+-#!@BASH_PROG@
++#!/bin/sh
+ # Copyright (C) 2004-2018 Free Software Foundation, Inc.
+ # Written by Mike Bianchi mailto:mbian...@foveal.com>>
+ # Thanks to Peter Bray for debugging.
+-- 
+2.7.4
+
diff --git 
a/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch
 b/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
similarity index 76%
rename from 
meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch
rename to 
meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
index f1db5b0..eda6a40 100644
--- 
a/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch
+++ 
b/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
@@ -1,7 +1,7 @@
-From 5b574542070db286c89b3827e8f15ed4b3b39034 Mon Sep 17 00:00:00 2001
+From 6821a23e6cf34df37c351b45be413a8da9115f9f Mon Sep 17 00:00:00 2001
 From: Robert Yang 
-Date: Thu, 6 Apr 2017 01:46:00 -0700
-Subject: [PATCH] replace "perl -w" with "use warnings"
+Date: Sat, 11 May 2019 17:03:03 +0800
+Subject: [PATCH 1/2] replace "perl -w" with "use warnings"
 
 The shebang's max length is usually 128 as defined in
 /usr/include/linux/binfmts.h:
@@ -18,6 +18,10 @@ So replace "perl -w" with "use warnings" to make it work.
 Upstream-Status: Pending
 
 Signed-off-by: Robert Yang 
+
+Rebase to 1.22.4.
+
+Signed-off-by: Hongxu Jia 
 ---
  font/devpdf/util/BuildFoundries.pl | 3 ++-
  src/devices/gropdf/gropdf.pl   | 3 ++-
@@ -26,7 +30,7 @@ Si

[OE-core] [PATCH 01/10] apr: upgrade 1.6.5 -> 1.7.0

2019-05-12 Thread Hongxu Jia
Signed-off-by: Hongxu Jia 
---
 ..._t-size-doesn-t-match-in-glibc-when-cross.patch | 26 ++
 .../apr/{apr_1.6.5.bb => apr_1.7.0.bb} |  4 ++--
 2 files changed, 14 insertions(+), 16 deletions(-)
 rename meta/recipes-support/apr/{apr_1.6.5.bb => apr_1.7.0.bb} (96%)

diff --git 
a/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
 
b/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
index 5f5e7ea..d1a2ebe 100644
--- 
a/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
+++ 
b/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
@@ -1,7 +1,7 @@
-From f4d6e45ed5d2ccffd1af4c2ccdf7099ba0dce137 Mon Sep 17 00:00:00 2001
+From 49661ea3858cf8494926cccf57d3e8c6dcb47117 Mon Sep 17 00:00:00 2001
 From: Dengke Du 
 Date: Wed, 14 Dec 2016 18:13:08 +0800
-Subject: [PATCH 6/7] apr: fix off_t size doesn't match in glibc when cross
+Subject: [PATCH] apr: fix off_t size doesn't match in glibc when cross
  compiling
 
 In configure.in, it contains the following:
@@ -29,15 +29,16 @@ Change the above correspondingly.
 Signed-off-by: Dengke Du 
 
 Upstream-Status: Pending
+
 ---
  configure.in | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/configure.in b/configure.in
-index 3b10422..a227e72 100644
+index 27b8539..fb408d1 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -1769,7 +1769,7 @@ else
+@@ -1801,7 +1801,7 @@ else
  socklen_t_value="int"
  fi
  
@@ -46,25 +47,25 @@ index 3b10422..a227e72 100644
  
  if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
  pid_t_fmt='#define APR_PID_T_FMT "hd"'
-@@ -1838,7 +1838,7 @@ APR_CHECK_TYPES_COMPATIBLE(ssize_t, long, 
[ssize_t_fmt="ld"])
- APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned int, [size_t_fmt="u"])
- APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned long, [size_t_fmt="lu"])
+@@ -1873,7 +1873,7 @@ APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned long, 
lu, [size_t_fmt="lu"], [
+ APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned int, u, [size_t_fmt="u"])
+ ])
  
 -APR_CHECK_SIZEOF_EXTENDED([#include ], ssize_t, 8)
 +AC_CHECK_SIZEOF(ssize_t)
  
+ dnl the else cases below should no longer occur;
  AC_MSG_CHECKING([which format to use for apr_ssize_t])
- if test -n "$ssize_t_fmt"; then
-@@ -1855,7 +1855,7 @@ fi
+@@ -1891,7 +1891,7 @@ fi
  
  ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
  
 -APR_CHECK_SIZEOF_EXTENDED([#include ], size_t, 8)
 +AC_CHECK_SIZEOF(size_t)
  
+ # else cases below should no longer occur;
  AC_MSG_CHECKING([which format to use for apr_size_t])
- if test -n "$size_t_fmt"; then
-@@ -1872,7 +1872,7 @@ fi
+@@ -1909,7 +1909,7 @@ fi
  
  size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\""
  
@@ -73,6 +74,3 @@ index 3b10422..a227e72 100644
  
  if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
  # Enable LFS
--- 
-1.8.3.1
-
diff --git a/meta/recipes-support/apr/apr_1.6.5.bb 
b/meta/recipes-support/apr/apr_1.7.0.bb
similarity index 96%
rename from meta/recipes-support/apr/apr_1.6.5.bb
rename to meta/recipes-support/apr/apr_1.7.0.bb
index 432e4ed..a58651d 100644
--- a/meta/recipes-support/apr/apr_1.6.5.bb
+++ b/meta/recipes-support/apr/apr_1.7.0.bb
@@ -20,8 +20,8 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \

file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \
"
 
-SRC_URI[md5sum] = "ad4add8efdfe87330b88e5e788241775"
-SRC_URI[sha256sum] = 
"a67ca9fcf9c4ff59bce7f428a323c8b5e18667fdea7b0ebad47d194371b0a105"
+SRC_URI[md5sum] = "7a14a83d664e87599ea25ff4432e48a7"
+SRC_URI[sha256sum] = 
"e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea"
 
 inherit autotools-brokensep lib_package binconfig multilib_header ptest
 
-- 
2.7.4

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


[OE-core] [PATCH 02/10] man-pages: upgrade 4.16 -> 5.01

2019-05-12 Thread Hongxu Jia
Signed-off-by: Hongxu Jia 
---
 .../man-pages/{man-pages_4.16.bb => man-pages_5.01.bb}| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-extended/man-pages/{man-pages_4.16.bb => 
man-pages_5.01.bb} (87%)

diff --git a/meta/recipes-extended/man-pages/man-pages_4.16.bb 
b/meta/recipes-extended/man-pages/man-pages_5.01.bb
similarity index 87%
rename from meta/recipes-extended/man-pages/man-pages_4.16.bb
rename to meta/recipes-extended/man-pages/man-pages_5.01.bb
index 1f14c89..28525f4 100644
--- a/meta/recipes-extended/man-pages/man-pages_4.16.bb
+++ b/meta/recipes-extended/man-pages/man-pages_5.01.bb
@@ -7,8 +7,8 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://README;md5=794f701617cc03fe50c53257660d8ec4"
 SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
 
-SRC_URI[md5sum] = "d1fb8ba312a1c15e0bfda911a98c5544"
-SRC_URI[sha256sum] = 
"d38b0460bf3f35c95faf7f8cf52dac1216d86a47866f5e5f2fda88c61da04960"
+SRC_URI[md5sum] = "38abead776a506109e128ab96bcbbe58"
+SRC_URI[sha256sum] = 
"070bef794c6826b3fb3965d1a2efdb46c25cb37c06c715987f88a50906cd5b6f"
 
 inherit manpages
 
-- 
2.7.4

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


[OE-core] [PATCH V2] acpica: use update-alternatives for acpidump

2019-05-05 Thread Hongxu Jia
acpidump is both provided by acpica and pmtools, so use
update-alternatives to fix conflicts:
...
|Error: Transaction check error:
|  file /usr/bin/acpidump conflicts between attempted installs of
pmtools-20130209+git0+3ebe0e54c5-r0.i586 and acpica-20190405-r0.i586
...

Signed-off-by: Hongxu Jia 
---
 meta/recipes-extended/acpica/acpica_20190405.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/acpica/acpica_20190405.bb 
b/meta/recipes-extended/acpica/acpica_20190405.bb
index 0cd88d4..25ad7ce 100644
--- a/meta/recipes-extended/acpica/acpica_20190405.bb
+++ b/meta/recipes-extended/acpica/acpica_20190405.bb
@@ -26,7 +26,7 @@ S = "${WORKDIR}/acpica-unix2-${PV}"
 inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "acpixtract"
+ALTERNATIVE_${PN} = "acpixtract acpidump"
 
 EXTRA_OEMAKE = "CC='${CC}' \
 OPT_CFLAGS=-Wall \
-- 
2.7.4

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


Re: [OE-core] [PATCH] acpica: use update-alternatives for acpidump

2019-05-05 Thread Hongxu Jia

On 5/6/19 10:26 AM, Hongxu Jia wrote:

acpixtract is both provided by acpica and pmtools, so use


s/acpixtract/acpica/

Sorry for the typo, V2 incoming

//Hongxu


update-alternatives to fix conflicts:
...
|Error: Transaction check error:
|  file /usr/bin/acpidump conflicts between attempted installs of
pmtools-20130209+git0+3ebe0e54c5-r0.i586 and acpica-20190405-r0.i586
...

Signed-off-by: Hongxu Jia 
---
  meta/recipes-extended/acpica/acpica_20190405.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/acpica/acpica_20190405.bb 
b/meta/recipes-extended/acpica/acpica_20190405.bb
index 0cd88d4e30..25ad7ce31c 100644
--- a/meta/recipes-extended/acpica/acpica_20190405.bb
+++ b/meta/recipes-extended/acpica/acpica_20190405.bb
@@ -26,7 +26,7 @@ S = "${WORKDIR}/acpica-unix2-${PV}"
  inherit update-alternatives
  
  ALTERNATIVE_PRIORITY = "100"

-ALTERNATIVE_${PN} = "acpixtract"
+ALTERNATIVE_${PN} = "acpixtract acpidump"
  
  EXTRA_OEMAKE = "CC='${CC}' \

  OPT_CFLAGS=-Wall \



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


[OE-core] [PATCH] acpica: use update-alternatives for acpidump

2019-05-05 Thread Hongxu Jia
acpixtract is both provided by acpica and pmtools, so use
update-alternatives to fix conflicts:
...
|Error: Transaction check error:
|  file /usr/bin/acpidump conflicts between attempted installs of
pmtools-20130209+git0+3ebe0e54c5-r0.i586 and acpica-20190405-r0.i586
...

Signed-off-by: Hongxu Jia 
---
 meta/recipes-extended/acpica/acpica_20190405.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/acpica/acpica_20190405.bb 
b/meta/recipes-extended/acpica/acpica_20190405.bb
index 0cd88d4e30..25ad7ce31c 100644
--- a/meta/recipes-extended/acpica/acpica_20190405.bb
+++ b/meta/recipes-extended/acpica/acpica_20190405.bb
@@ -26,7 +26,7 @@ S = "${WORKDIR}/acpica-unix2-${PV}"
 inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "acpixtract"
+ALTERNATIVE_${PN} = "acpixtract acpidump"
 
 EXTRA_OEMAKE = "CC='${CC}' \
 OPT_CFLAGS=-Wall \
-- 
2.21.0

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


[OE-core] [PATCH] cpio/tar/native.bbclass: move rmt to sbindir and add a prefix to avoid native clashing

2019-05-05 Thread Hongxu Jia
The rmt in cpio-native and tar-native is clashing, since
tar-native has set var-NATIVE_PACKAGE_PATH_SUFFIX, we move rmt
to sbindir, and add suffix NATIVE_PACKAGE_PATH_SUFFIX to sbindir
could avoid the clashing.

And in Ubuntu, rmt is in sbindir
$ which rmt
/usr/sbin/rmt

Signed-off-by: Hongxu Jia 
---
 meta/classes/native.bbclass | 1 +
 meta/recipes-extended/cpio/cpio_2.12.bb | 6 +++---
 meta/recipes-extended/tar/tar_1.32.bb   | 6 +++---
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index e9f6c74..d5b6f6a 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -89,6 +89,7 @@ export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} 
${base_libdir} /lib /lib64
 
 NATIVE_PACKAGE_PATH_SUFFIX ?= ""
 bindir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
+sbindir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
 base_libdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
 libdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
 libexecdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
diff --git a/meta/recipes-extended/cpio/cpio_2.12.bb 
b/meta/recipes-extended/cpio/cpio_2.12.bb
index cb845c3..3713bf0 100644
--- a/meta/recipes-extended/cpio/cpio_2.12.bb
+++ b/meta/recipes-extended/cpio/cpio_2.12.bb
@@ -18,7 +18,7 @@ SRC_URI[sha256sum] = 
"08a35e92deb3c85d269a0059a27d4140a9667a6369459299d08c17f713
 
 inherit autotools gettext texinfo
 
-EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}"
+EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}"
 
 do_install () {
 autotools_do_install
@@ -34,7 +34,7 @@ do_install () {
 
 PACKAGES =+ "${PN}-rmt"
 
-FILES_${PN}-rmt = "${base_sbindir}/rmt*"
+FILES_${PN}-rmt = "${sbindir}/rmt*"
 
 inherit update-alternatives
 
@@ -46,6 +46,6 @@ ALTERNATIVE_${PN}-rmt = "rmt"
 ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
 
 ALTERNATIVE_PRIORITY[rmt] = "50"
-ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"
+ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt"
 
 BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/tar/tar_1.32.bb 
b/meta/recipes-extended/tar/tar_1.32.bb
index d14aeb8..7240fdb 100644
--- a/meta/recipes-extended/tar/tar_1.32.bb
+++ b/meta/recipes-extended/tar/tar_1.32.bb
@@ -21,7 +21,7 @@ PACKAGECONFIG_append_class-target = " 
${@bb.utils.filter('DISTRO_FEATURES', 'acl
 
 PACKAGECONFIG[acl] = "--with-posix-acls,--without-posix-acls,acl"
 
-EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}"
+EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}"
 
 # Let aclocal use the relative path for the m4 file rather than the
 # absolute since tar has a lot of m4 files, otherwise there might
@@ -45,7 +45,7 @@ do_install_append_class-target() {
 
 PACKAGES =+ "${PN}-rmt"
 
-FILES_${PN}-rmt = "${base_sbindir}/rmt*"
+FILES_${PN}-rmt = "${sbindir}/rmt*"
 
 inherit update-alternatives
 
@@ -57,7 +57,7 @@ ALTERNATIVE_${PN}_class-nativesdk = ""
 ALTERNATIVE_${PN}-rmt_class-nativesdk = ""
 
 ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
-ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"
+ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt"
 
 PROVIDES_append_class-native = " tar-replacement-native"
 NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
-- 
2.7.4

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


[OE-core] [PATCH] image_types.bbclass: fix a race between the ubi and ubifs FSTYPES

2019-04-12 Thread Hongxu Jia
The ubi, ubifs and multiubi FSTYPES calls `mkfs.ubifs' to create UBIFS
images.

In do_image_ubi, $vname is empty, the name of UBIFS image conflicts with
the one in do_image_ubifs, and it's a race risk.
[do_image_ubi]
mkfs.ubifs -r ${IMAGE_ROOTFS} -o 
${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args}
[do_image_ubi]

[do_image_ubifs]
mkfs.ubifs -r ${IMAGE_ROOTFS} -o 
${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS}
[do_image_ubifs]

In do_image_multiubi, $vname is not empty, the UBIFS image name does
not conflict with others.

So do not call mkfs.ubifs in do_image_ubi and depend on do_image_ubifs
to create UBIFS images.

The fix does not affect do_image_multiubi which still call mkfs.ubifs to
create multiple UBIFS images and symlinks.

[YOCTO #13272]

Signed-off-by: Hongxu Jia 
---
 meta/classes/image_types.bbclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index f363c42ee5..95aa1674cf 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -170,7 +170,9 @@ multiubi_mkfs() {
echo vol_type=dynamic >> ubinize${vname}-${IMAGE_NAME}.cfg
echo vol_name=${UBI_VOLNAME} >> ubinize${vname}-${IMAGE_NAME}.cfg
echo vol_flags=autoresize >> ubinize${vname}-${IMAGE_NAME}.cfg
-   mkfs.ubifs -r ${IMAGE_ROOTFS} -o 
${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args}
+   if [ -n "$vname" ]; then
+   mkfs.ubifs -r ${IMAGE_ROOTFS} -o 
${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args}
+   fi
ubinize -o 
${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubi ${ubinize_args} 
ubinize${vname}-${IMAGE_NAME}.cfg
 
# Cleanup cfg file
@@ -204,6 +206,7 @@ IMAGE_CMD_multiubi () {
 IMAGE_CMD_ubi () {
multiubi_mkfs "${MKUBIFS_ARGS}" "${UBINIZE_ARGS}"
 }
+IMAGE_TYPEDEP_ubi = "ubifs"
 
 IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o 
${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS}"
 
-- 
2.17.1

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


Re: [OE-core] [PATCH] linux-libc-headers: workaround do_install failure while host gcc version < 4.5

2018-12-14 Thread Hongxu Jia
Talked with Zhe, there is already fix on the thread, so please ignore 
this one
[PATCH v4] linux-libc-headers: Fix build failure by using fixed 
temporary file instead of pip


//Hongxu

On 2018/12/14 下午4:54, Hongxu Jia wrote:

Since kernel commit [e501ce9 x86: Force asm-goto], running
`make menuconfig (bitbake linux-yocto -cmenuconfig)' requires
host gcc support asm-goto which gcc version >= 4.5

It broke linux-libc-headers do_install even though there is no
relation with `make menuconfig'

Set CC_HAVE_ASM_GOTO="1" to workaround the checking

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e501ce957a786ecd076ea0cfb10b114e6e4d0f40
https://unix.stackexchange.com/questions/456767/make-menuconfig-error-while-trying-to-build-kernel

Signed-off-by: Hongxu Jia 
---
  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 be215af..766322e 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -51,7 +51,7 @@ UPSTREAM_CHECK_URI = "https://www.kernel.org/;
  
  S = "${WORKDIR}/linux-${PV}"
  
-EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}""

+EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}" 
CC_HAVE_ASM_GOTO="1""
  
  do_configure[noexec] = "1"
  



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


[OE-core] [PATCH] linux-libc-headers: workaround do_install failure while host gcc version < 4.5

2018-12-14 Thread Hongxu Jia
Since kernel commit [e501ce9 x86: Force asm-goto], running
`make menuconfig (bitbake linux-yocto -cmenuconfig)' requires
host gcc support asm-goto which gcc version >= 4.5

It broke linux-libc-headers do_install even though there is no
relation with `make menuconfig'

Set CC_HAVE_ASM_GOTO="1" to workaround the checking

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e501ce957a786ecd076ea0cfb10b114e6e4d0f40
https://unix.stackexchange.com/questions/456767/make-menuconfig-error-while-trying-to-build-kernel

Signed-off-by: Hongxu Jia 
---
 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 be215af..766322e 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -51,7 +51,7 @@ UPSTREAM_CHECK_URI = "https://www.kernel.org/;
 
 S = "${WORKDIR}/linux-${PV}"
 
-EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}""
+EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}" 
CC_HAVE_ASM_GOTO="1""
 
 do_configure[noexec] = "1"
 
-- 
2.7.4

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


[OE-core] [PATCH] mdadm: fix gcc-8 format-truncation warning

2018-12-13 Thread Hongxu Jia
While compiling with `-Werror=format-truncation=', it failed
[snip]
|super0.c:236:32: error: 'snprintf' output may be truncated
before the last format character [-Werror=format-truncation=]
|   snprintf(nb, sizeof(nb), "%4d", d);
|^
|super0.c:236:3: note: 'snprintf' output between 5 and 12 bytes
into a destination of size 11
|   snprintf(nb, sizeof(nb), "%4d", d);
[snip]

Signed-off-by: Hongxu Jia 
---
 .../0001-fix-gcc-8-format-truncation-warning.patch | 39 ++
 meta/recipes-extended/mdadm/mdadm_4.1.bb   |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 
meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch

diff --git 
a/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch
 
b/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch
new file mode 100644
index 000..fa9c8cc
--- /dev/null
+++ 
b/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch
@@ -0,0 +1,39 @@
+From 3158d3788c2e0fb75ace2c89840bd8a977fb4cb0 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Fri, 14 Dec 2018 15:12:31 +0800
+Subject: [PATCH] fix gcc-8 format-truncation warning
+
+While compiling with `-Werror=format-truncation=', it failed
+[snip]
+|super0.c:236:32: error: 'snprintf' output may be truncated
+before the last format character [-Werror=format-truncation=]
+|   snprintf(nb, sizeof(nb), "%4d", d);
+|^
+|super0.c:236:3: note: 'snprintf' output between 5 and 12 bytes
+into a destination of size 11
+|   snprintf(nb, sizeof(nb), "%4d", d);
+[snip]
+
+Upstream-Status: Submitted [https://github.com/neilbrown/mdadm/pull/34]
+
+Signed-off-by: Hongxu Jia 
+---
+ super0.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/super0.c b/super0.c
+index 756cab5..12c28da 100644
+--- a/super0.c
 b/super0.c
+@@ -229,7 +229,7 @@ static void examine_super0(struct supertype *st, char 
*homehost)
+d++) {
+   mdp_disk_t *dp;
+   char *dv;
+-  char nb[11];
++  char nb[12];
+   int wonly, failfast;
+   if (d>=0) dp = >disks[d];
+   else dp = >this_disk;
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb 
b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index 9118baa..7663a6b 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -16,6 +16,7 @@ SRC_URI = 
"${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \

file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \

file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \
file://0001-Compute-abs-diff-in-a-standard-compliant-way.patch \
+   file://0001-fix-gcc-8-format-truncation-warning.patch \
"
 SRC_URI[md5sum] = "51bf3651bd73a06c413a2f964f299598"
 SRC_URI[sha256sum] = 
"ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a"
-- 
2.7.4

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


[OE-core] [PATCH V3] pulseaudio: improve reproducibility

2018-12-11 Thread Hongxu Jia
There are two fixes, one is sent to upstream,
and another is oe specific.

[YOCTO #12638]

Signed-off-by: Hongxu Jia 
---
 meta/recipes-multimedia/pulseaudio/pulseaudio.inc  |   5 +-
 ...-special-build-flag-to-explicitly-disable.patch | 161 +
 ...lay-CLFAGS-to-improve-reproducibility-bui.patch |  30 
 .../pulseaudio/pulseaudio_12.2.bb  |   2 +
 4 files changed, 196 insertions(+), 2 deletions(-)
 create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/0001-introduce-a-special-build-flag-to-explicitly-disable.patch
 create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch

diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc 
b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index f526690..91d9b8e 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -76,8 +76,9 @@ EXTRA_OECONF = "\
--with-database=simple \
--without-zsh-completion-dir \
--with-udev-rules-dir=`pkg-config --variable=udevdir 
udev`/rules.d \
-ac_cv_header_valgrind_memcheck_h=no \
---disable-tests \
+   ac_cv_header_valgrind_memcheck_h=no \
+   --disable-tests \
+   --disable-running-from-build-tree \
 "
 
 # soxr (the SoX Resampler library) doesn't seem to be currently packaged in
diff --git 
a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-introduce-a-special-build-flag-to-explicitly-disable.patch
 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-introduce-a-special-build-flag-to-explicitly-disable.patch
new file mode 100644
index 000..b7e9cd8
--- /dev/null
+++ 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-introduce-a-special-build-flag-to-explicitly-disable.patch
@@ -0,0 +1,161 @@
+From 36feb98e568221e24286615730888d5f6ff323f0 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Fri, 7 Dec 2018 15:12:38 +0800
+Subject: [PATCH] introduce a special build flag to explicitly disables running
+ from build tree
+
+It is helpful to improve reproducibility build [1] since
+PA_SRCDIR/PA_BUILDDIR contains build path, disable running
+from build tree could drop these macros at precompilation.
+
+[1] https://reproducible-builds.org/
+
+Upstream-Status: Submitted [pulseaudio-disc...@lists.freedesktop.org]
+Signed-off-by: Hongxu Jia 
+Acked-by: Tanu Kaskinen 
+---
+ configure.ac | 10 ++
+ src/daemon/daemon-conf.c |  4 +++-
+ src/daemon/main.c|  6 ++
+ src/modules/alsa/alsa-mixer.c|  4 
+ src/modules/gconf/module-gconf.c |  2 +-
+ src/modules/gsettings/module-gsettings.c |  2 +-
+ src/pulsecore/core-util.c|  4 +++-
+ 7 files changed, 28 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c9c414f..8b345ef 100644
+--- a/configure.ac
 b/configure.ac
+@@ -998,6 +998,16 @@ AS_IF([test "x$enable_asyncns" = "xyes" && test 
"x$HAVE_LIBASYNCNS" = "x0"],
+ AM_CONDITIONAL([HAVE_LIBASYNCNS], [test "x$HAVE_LIBASYNCNS" = x1])
+ AS_IF([test "x$HAVE_LIBASYNCNS" = "x1"], AC_DEFINE([HAVE_LIBASYNCNS], 1, 
[Have libasyncns?]))
+ 
++ Running from build tree (optional) 
++
++AC_ARG_ENABLE([running-from-build-tree],
++AS_HELP_STRING([--disable-running-from-build-tree],[Disable running from 
build tree]))
++
++AS_IF([test "x$enable_running_from_build_tree" != "xno"],
++  AC_DEFINE([HAVE_RUNNING_FROM_BUILD_TREE], 1, [Have running from build 
tree]))
++
++AC_SUBST(HAVE_RUNNING_FROM_BUILD_TREE)
++
+  TCP wrappers (optional) 
+ 
+ AC_ARG_ENABLE([tcpwrap],
+diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
+index 9883126..f01eff4 100644
+--- a/src/daemon/daemon-conf.c
 b/src/daemon/daemon-conf.c
+@@ -155,12 +155,14 @@ pa_daemon_conf *pa_daemon_conf_new(void) {
+ c->dl_search_path = pa_sprintf_malloc("%s" PA_PATH_SEP "lib" PA_PATH_SEP 
"pulse-%d.%d" PA_PATH_SEP "modules",
+   pa_win32_get_toplevel(NULL), 
PA_MAJOR, PA_MINOR);
+ #else
++#ifdef HAVE_RUNNING_FROM_BUILD_TREE
+ if (pa_run_from_build_tree()) {
+ pa_log_notice("Detected that we are run from the build tree, fixing 
search path.");
+ c->dl_search_path = pa_xstrdup(PA_BUILDDIR);
+ } else
+-c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
+ #endif
++c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
++#endif //Endof #ifdef OS_IS_WIN32
+ 
+ return c;
+ }
+diff --git a/src/daemon/main.c b/src/daemon/main.c
+index c80fa94..1e00388 100644
+--- a/src/daemon/main.c
 b/src/daemon/main.c
+@@ -932,6 +932,12 @@ int main(int argc, char *argv[]) {
+ 
+  

Re: [OE-core] [PATCH V2] pulseaudio: improve reproducibility

2018-12-07 Thread Hongxu Jia

On 2018/12/7 上午12:18, Burton, Ross wrote:

Rejecting for the reasons discussed on the pulseaudio list.   Look
forward to a V3 :)


OK, I will send it to upstream first, if they are OK with it, then I 
will send V3


//Hongxu



Ross
On Thu, 6 Dec 2018 at 06:36, Hongxu Jia  wrote:

There are two fixes, one is sent to upstream,
and another is oe specific.

[YOCTO #12638]

Signed-off-by: Hongxu Jia 
---
  .../0001-improve-reproducibility-build.patch   | 97 ++
  ...lay-CLFAGS-to-improve-reproducibility-bui.patch | 30 +++
  .../pulseaudio/pulseaudio_12.2.bb  |  2 +
  3 files changed, 129 insertions(+)
  create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/0001-improve-reproducibility-build.patch
  create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch

diff --git 
a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-improve-reproducibility-build.patch
 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-improve-reproducibility-build.patch
new file mode 100644
index 000..2658100
--- /dev/null
+++ 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-improve-reproducibility-build.patch
@@ -0,0 +1,97 @@
+From 08e2195e9d110323ebeb7bf91dcf8e3f7870423f Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Thu, 6 Dec 2018 11:30:13 +0800
+Subject: [PATCH 1/2] improve reproducibility build
+
+While running pulseaudio out of build dir (especially for cross
+compiling), we should not expose pulseaudio build path[1], it is
+helpful for reproducibility build[2].
+
+As commit introduced [3cae4a0 doc: Add info about running pulseaudio
+from the build dir], run pulseaudio from the build dir, __OPTIMIZE__
+should be diabled, so add macro checking to drop PA_SRCDIR/PA_BUILDDIR
+(in which contains build path) at precompilation.
+
+[1] https://reproducible-builds.org/docs/build-path/
+[2] https://reproducible-builds.org/
+
+Upstream-Status: Submitted [pulseaudio-disc...@lists.freedesktop.org]
+Signed-off-by: Hongxu Jia 
+---
+ src/daemon/daemon-conf.c  | 4 +++-
+ src/modules/alsa/alsa-mixer.c | 4 
+ src/pulsecore/core-util.c | 4 +++-
+ 3 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
+index 9883126..9d40896 100644
+--- a/src/daemon/daemon-conf.c
 b/src/daemon/daemon-conf.c
+@@ -155,12 +155,14 @@ pa_daemon_conf *pa_daemon_conf_new(void) {
+ c->dl_search_path = pa_sprintf_malloc("%s" PA_PATH_SEP "lib" PA_PATH_SEP 
"pulse-%d.%d" PA_PATH_SEP "modules",
+   pa_win32_get_toplevel(NULL), 
PA_MAJOR, PA_MINOR);
+ #else
++#if !defined(__OPTIMIZE__)
+ if (pa_run_from_build_tree()) {
+ pa_log_notice("Detected that we are run from the build tree, fixing search 
path.");
+ c->dl_search_path = pa_xstrdup(PA_BUILDDIR);
+ } else
+-c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
+ #endif
++c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
++#endif // Endof OS_IS_WIN32
+
+ return c;
+ }
+diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
+index a524d6d..a1eae79 100644
+--- a/src/modules/alsa/alsa-mixer.c
 b/src/modules/alsa/alsa-mixer.c
+@@ -2571,9 +2571,11 @@ static int path_verify(pa_alsa_path *p) {
+ }
+
+ static const char *get_default_paths_dir(void) {
++#if defined(__linux__) && !defined(__OPTIMIZE__)
+ if (pa_run_from_build_tree())
+ return PA_SRCDIR "/modules/alsa/mixer/paths/";
+ else
++#endif
+ return PA_ALSA_PATHS_DIR;
+ }
+
+@@ -4455,7 +4457,9 @@ pa_alsa_profile_set* pa_alsa_profile_set_new(const char 
*fname, const pa_channel
+ fname = "default.conf";
+
+ fn = pa_maybe_prefix_path(fname,
++#if defined(__linux__) && !defined(__OPTIMIZE__)
+   pa_run_from_build_tree() ? PA_SRCDIR 
"/modules/alsa/mixer/profile-sets/" :
++#endif
+   PA_ALSA_PROFILE_SETS_DIR);
+
+ r = pa_config_parse(fn, NULL, items, NULL, false, ps);
+diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
+index 64e9f21..3267907 100644
+--- a/src/pulsecore/core-util.c
 b/src/pulsecore/core-util.c
+@@ -3436,15 +3436,17 @@ void pa_reset_personality(void) {
+ }
+
+ bool pa_run_from_build_tree(void) {
+-char *rp;
+ static bool b = false;
+
++#if defined(__linux__) && !defined(__OPTIMIZE__)
++char *rp;
+ PA_ONCE_BEGIN {
+ if ((rp = pa_readlink("/proc/self/exe"))) {
+ b = pa_startswith(rp, PA_BUILDDIR);
+ pa_xfree(rp);
+ }
+ } PA_ONCE_END;
++#endif
+
+ return b;
+ }
+--
+2.7.4
+
diff --git 
a/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch
 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/00

[OE-core] [PATCH V2] glibc: improve reproducibility with multilib

2018-12-06 Thread Hongxu Jia
Multilib builds specify several loaders which will end up embedded in
some binaries or script files. To support reproducible builds, we must
ensure the loaders are always in deterministic order.

[YOCTO #2655]
[YOCTO #12478]
[YOCTO #12480]

Signed-off-by: Juro Bystricky 

Improve the fix and rebase it to 2.28

Here is the log of lib32-glibc
[log.do_compile]
|Adjust ldd script
|ldd "/lib64/ld-linux-x86-64.so.2 /lib/ld-linux.so.2 /lib/ld-linux.so.2
/lib64/ld-linux-x86-64.so.2" -> "/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2"
[log.do_compile]

Signed-off-by: Hongxu Jia 
---
 meta/recipes-core/glibc/glibc-ld.inc  | 4 ++--
 meta/recipes-core/glibc/glibc_2.28.bb | 8 
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-ld.inc 
b/meta/recipes-core/glibc/glibc-ld.inc
index bb167b3..041ffbb 100644
--- a/meta/recipes-core/glibc/glibc-ld.inc
+++ b/meta/recipes-core/glibc/glibc-ld.inc
@@ -10,8 +10,8 @@ def glibc_dl_info(d):
 infos['ldconfig'].add('{"' + loader + '",' + "FLAG_ELF_LIBC6" + ' }')
 infos['lddrewrite'].add(loader)
 
-infos['ldconfig'] = ','.join(infos['ldconfig'])
-infos['lddrewrite'] = ' '.join(infos['lddrewrite'])
+infos['ldconfig'] = ','.join(sorted(infos['ldconfig']))
+infos['lddrewrite'] = ' '.join(sorted(infos['lddrewrite']))
 return infos
 
 EGLIBC_KNOWN_INTERPRETER_NAMES = "${@glibc_dl_info(d)['ldconfig']}"
diff --git a/meta/recipes-core/glibc/glibc_2.28.bb 
b/meta/recipes-core/glibc/glibc_2.28.bb
index d072939..a107c58 100644
--- a/meta/recipes-core/glibc/glibc_2.28.bb
+++ b/meta/recipes-core/glibc/glibc_2.28.bb
@@ -122,10 +122,10 @@ do_compile () {
if [ -n "${RTLDLIST}" ]
then
prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 
's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
-   if [ "${prevrtld}" != "${RTLDLIST}" ]
-   then
-   sed -i ${B}/elf/ldd -e 
"s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
-   fi
+   # remove duplicate entries
+   newrtld=`echo $(printf '%s\n' ${prevrtld} ${RTLDLIST} | 
LC_ALL=C sort -u)`
+   echo "ldd \"${prevrtld} ${RTLDLIST}\" -> \"${newrtld}\""
+   sed -i ${B}/elf/ldd -e 
"s#^RTLDLIST=.*\$#RTLDLIST=\"${newrtld}\"#"
fi
 
 }
-- 
2.7.4

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


[OE-core] [PATCH V2] pulseaudio: improve reproducibility

2018-12-05 Thread Hongxu Jia
There are two fixes, one is sent to upstream,
and another is oe specific.

[YOCTO #12638]

Signed-off-by: Hongxu Jia 
---
 .../0001-improve-reproducibility-build.patch   | 97 ++
 ...lay-CLFAGS-to-improve-reproducibility-bui.patch | 30 +++
 .../pulseaudio/pulseaudio_12.2.bb  |  2 +
 3 files changed, 129 insertions(+)
 create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/0001-improve-reproducibility-build.patch
 create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch

diff --git 
a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-improve-reproducibility-build.patch
 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-improve-reproducibility-build.patch
new file mode 100644
index 000..2658100
--- /dev/null
+++ 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-improve-reproducibility-build.patch
@@ -0,0 +1,97 @@
+From 08e2195e9d110323ebeb7bf91dcf8e3f7870423f Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Thu, 6 Dec 2018 11:30:13 +0800
+Subject: [PATCH 1/2] improve reproducibility build
+
+While running pulseaudio out of build dir (especially for cross
+compiling), we should not expose pulseaudio build path[1], it is
+helpful for reproducibility build[2].
+
+As commit introduced [3cae4a0 doc: Add info about running pulseaudio
+from the build dir], run pulseaudio from the build dir, __OPTIMIZE__
+should be diabled, so add macro checking to drop PA_SRCDIR/PA_BUILDDIR
+(in which contains build path) at precompilation.
+
+[1] https://reproducible-builds.org/docs/build-path/
+[2] https://reproducible-builds.org/
+
+Upstream-Status: Submitted [pulseaudio-disc...@lists.freedesktop.org]
+Signed-off-by: Hongxu Jia 
+---
+ src/daemon/daemon-conf.c  | 4 +++-
+ src/modules/alsa/alsa-mixer.c | 4 
+ src/pulsecore/core-util.c | 4 +++-
+ 3 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
+index 9883126..9d40896 100644
+--- a/src/daemon/daemon-conf.c
 b/src/daemon/daemon-conf.c
+@@ -155,12 +155,14 @@ pa_daemon_conf *pa_daemon_conf_new(void) {
+ c->dl_search_path = pa_sprintf_malloc("%s" PA_PATH_SEP "lib" PA_PATH_SEP 
"pulse-%d.%d" PA_PATH_SEP "modules",
+   pa_win32_get_toplevel(NULL), 
PA_MAJOR, PA_MINOR);
+ #else
++#if !defined(__OPTIMIZE__)
+ if (pa_run_from_build_tree()) {
+ pa_log_notice("Detected that we are run from the build tree, fixing 
search path.");
+ c->dl_search_path = pa_xstrdup(PA_BUILDDIR);
+ } else
+-c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
+ #endif
++c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
++#endif // Endof OS_IS_WIN32
+ 
+ return c;
+ }
+diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
+index a524d6d..a1eae79 100644
+--- a/src/modules/alsa/alsa-mixer.c
 b/src/modules/alsa/alsa-mixer.c
+@@ -2571,9 +2571,11 @@ static int path_verify(pa_alsa_path *p) {
+ }
+ 
+ static const char *get_default_paths_dir(void) {
++#if defined(__linux__) && !defined(__OPTIMIZE__)
+ if (pa_run_from_build_tree())
+ return PA_SRCDIR "/modules/alsa/mixer/paths/";
+ else
++#endif
+ return PA_ALSA_PATHS_DIR;
+ }
+ 
+@@ -4455,7 +4457,9 @@ pa_alsa_profile_set* pa_alsa_profile_set_new(const char 
*fname, const pa_channel
+ fname = "default.conf";
+ 
+ fn = pa_maybe_prefix_path(fname,
++#if defined(__linux__) && !defined(__OPTIMIZE__)
+   pa_run_from_build_tree() ? PA_SRCDIR 
"/modules/alsa/mixer/profile-sets/" :
++#endif
+   PA_ALSA_PROFILE_SETS_DIR);
+ 
+ r = pa_config_parse(fn, NULL, items, NULL, false, ps);
+diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
+index 64e9f21..3267907 100644
+--- a/src/pulsecore/core-util.c
 b/src/pulsecore/core-util.c
+@@ -3436,15 +3436,17 @@ void pa_reset_personality(void) {
+ }
+ 
+ bool pa_run_from_build_tree(void) {
+-char *rp;
+ static bool b = false;
+ 
++#if defined(__linux__) && !defined(__OPTIMIZE__)
++char *rp;
+ PA_ONCE_BEGIN {
+ if ((rp = pa_readlink("/proc/self/exe"))) {
+ b = pa_startswith(rp, PA_BUILDDIR);
+ pa_xfree(rp);
+ }
+ } PA_ONCE_END;
++#endif
+ 
+ return b;
+ }
+-- 
+2.7.4
+
diff --git 
a/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch
 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch
new file mode 100644
index 000..43add75
--- /dev/null
+++ 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch
@@ -0,0 +1,30 @@
+From f0ddd7c36556ad05c

[OE-core] [PATCH 2/2] autoconf-doc: improve reproducibility

2018-12-04 Thread Hongxu Jia
autoconf-doc package contains autoconf.info.
This file contains date when this file was created, i.e:

 "This manual (31 January 2018) .."

Therefore, two builds done on two different days will show different dates for
otherwise identical files, hence breaking reproducibility.
The date is obtained from mtime of "autoconf.texi", unfortunately we patch this
file and change the mtime as a consequence.
We restore reproducibility by removing the patch modifying "autoconf.texi".
As a consequence certain supplemental information will be not added to the 
documentation.
In particular:  more details on usage, and on workarounds for non-updated 
projects.

[YOCTO #12524]

Signed-off-by: Juro Bystricky 

With applying this fix:

"This manual (24 April 2012) .."

Signed-off-by: Hongxu Jia 
---
 .../AC_HEADER_MAJOR-port-to-glibc-2.25.patch   | 89 --
 1 file changed, 14 insertions(+), 75 deletions(-)

diff --git 
a/meta/recipes-devtools/autoconf/autoconf/AC_HEADER_MAJOR-port-to-glibc-2.25.patch
 
b/meta/recipes-devtools/autoconf/autoconf/AC_HEADER_MAJOR-port-to-glibc-2.25.patch
index fc37236..b2d7dc0 100644
--- 
a/meta/recipes-devtools/autoconf/autoconf/AC_HEADER_MAJOR-port-to-glibc-2.25.patch
+++ 
b/meta/recipes-devtools/autoconf/autoconf/AC_HEADER_MAJOR-port-to-glibc-2.25.patch
@@ -1,4 +1,4 @@
-From e17a30e987d7ee695fb4294a82d987ec3dc9b974 Mon Sep 17 00:00:00 2001
+From b859ab1b211d348b46eca9158b7742f050c8115e Mon Sep 17 00:00:00 2001
 From: Eric Blake 
 Date: Wed, 14 Sep 2016 08:17:06 -0500
 Subject: [PATCH] AC_HEADER_MAJOR: port to glibc 2.25
@@ -35,85 +35,21 @@ this patch.
 * lib/autoconf/headers.m4 (AC_HEADER_MAJOR): Drop check for
 major within sys/types.h; it interferes with the need to check
 sysmacros.h first.
-* doc/autoconf.texi (Particular Headers) : Expand
-details on usage, and on workarounds for non-updated projects.
 
 Signed-off-by: Eric Blake 

+
+Remove the documentation change from the patch
 Upstream-Status: Backport
 
- doc/autoconf.texi   |   35 +++
- lib/autoconf/headers.m4 |   30 ++
- 2 files changed, 45 insertions(+), 20 deletions(-)
+Signed-off-by: Hongxu Jia 
+---
+ lib/autoconf/headers.m4 | 30 ++
+ 1 file changed, 14 insertions(+), 16 deletions(-)
 
-Index: autoconf-2.69/doc/autoconf.texi
-===
 autoconf-2.69.orig/doc/autoconf.texi
-+++ autoconf-2.69/doc/autoconf.texi
-@@ -15,7 +15,7 @@
- @c The ARG is an optional argument.  To be used for macro arguments in
- @c their documentation (@defmac).
- @macro ovar{varname}
--@r{[}@var{\varname\}@r{]}@c
-+@r{[}@var{\varname\}@r{]}
- @end macro
- 
- @c @dvar(ARG, DEFAULT)
-@@ -23,7 +23,7 @@
- @c The ARG is an optional argument, defaulting to DEFAULT.  To be used
- @c for macro arguments in their documentation (@defmac).
- @macro dvar{varname, default}
--@r{[}@var{\varname\} = @samp{\default\}@r{]}@c
-+@r{[}@var{\varname\} = @samp{\default\}@r{]}
- @end macro
- 
- @c Handling the indexes with Texinfo yields several different problems.
-@@ -5926,10 +5926,37 @@ Also see @code{AC_STRUCT_DIRENT_D_INO} a
- @cvindex MAJOR_IN_SYSMACROS
- @hdrindex{sys/mkdev.h}
- @hdrindex{sys/sysmacros.h}
--If @file{sys/types.h} does not define @code{major}, @code{minor}, and
--@code{makedev}, but @file{sys/mkdev.h} does, define
--@code{MAJOR_IN_MKDEV}; otherwise, if @file{sys/sysmacros.h} does, define
--@code{MAJOR_IN_SYSMACROS}.
-+Detect the headers required to use @code{makedev}, @code{major}, and
-+@code{minor}.  These functions may be defined by @file{sys/mkdev.h},
-+@code{sys/sysmacros.h}, or @file{sys/types.h}.
-+
-+@code{AC_HEADER_MAJOR} defines @code{MAJOR_IN_MKDEV} if they are in
-+@file{sys/mkdev.h}, or @code{MAJOR_IN_SYSMACROS} if they are in
-+@file{sys/sysmacros.h}.  If neither macro is defined, they are either in
-+@file{sys/types.h} or unavailable.
-+
-+To properly use these functions, your code should contain something
-+like:
-+
-+@verbatim
-+#include 
-+#ifdef MAJOR_IN_MKDEV
-+# include 
-+#elif defined MAJOR_IN_SYSMACROS
-+# include 
-+#endif
-+@end verbatim
-+
-+Note: Configure scripts built with Autoconf 2.69 or earlier will not
-+detect a problem if @file{sys/types.h} contains definitions of
-+@code{major}, @code{minor}, and/or @code{makedev} that trigger compiler
-+warnings upon use.  This is known to occur with GNU libc 2.25, where
-+those definitions are being deprecated to reduce namespace pollution.
-+If it is not practical to use Autoconf 2.70 to regenerate the configure
-+script of affected software, you can work around the problem by setting
-+@samp{ac_cv_header_sys_types_h_makedev=no}, as an argument to
-+@command{configure} or as part of a @file{config.site} site default file
-+(@pxref{Site Defaults}).
- @end defmac
- 
- @defmac AC_HEADER_RESOLV
-Inde

[OE-core] [PATCH 1/2] pulseaudio: improve reproducibility

2018-12-04 Thread Hongxu Jia
Remove build host paths from generated binaries, the modification
is harmless for build time compiling and runtime executing.

[YOCTO #12638]

Signed-off-by: Hongxu Jia 
---
 .../pulseaudio/0001-improve-reproducibility.patch  | 50 ++
 .../pulseaudio/pulseaudio_12.2.bb  |  1 +
 2 files changed, 51 insertions(+)
 create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/0001-improve-reproducibility.patch

diff --git 
a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-improve-reproducibility.patch
 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-improve-reproducibility.patch
new file mode 100644
index 000..b13adb2
--- /dev/null
+++ 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-improve-reproducibility.patch
@@ -0,0 +1,50 @@
+From e03d1d77471ee16c149590dd97085cf54be1e261 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Tue, 4 Dec 2018 16:29:18 +0800
+Subject: [PATCH] improve reproducibility
+
+- Do not define PA_CFLAGS with $CFLAGS which contains build host path,
+  macro PA_CFLAGS is used for debug log, the modification is harmless;
+
+- Tweak definition of PA_BUILDDIR and PA_SRCDIR with relative directory,
+  it is also harmless;
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ configure.ac| 2 +-
+ src/Makefile.am | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c9c414f..94a2167 100644
+--- a/configure.ac
 b/configure.ac
+@@ -1452,7 +1452,7 @@ AS_IF([test "x$ax_pthread_ok" = "xyes"],
+ #Output   #
+ ###
+ 
+-AC_DEFINE_UNQUOTED(PA_CFLAGS, "$CFLAGS", [The CFLAGS used during compilation])
++AC_DEFINE_UNQUOTED(PA_CFLAGS, "***", [The CFLAGS used during compilation])
+ 
+ # Check whether to build tests by default (as compile-test) or not
+ AC_ARG_ENABLE([default-build-tests],
+diff --git a/src/Makefile.am b/src/Makefile.am
+index f4464d2..1ec0bfc 100644
+--- a/src/Makefile.am
 b/src/Makefile.am
+@@ -48,8 +48,8 @@ AM_CPPFLAGS = \
+   -I$(top_builddir)/src/modules \
+   -DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \
+   -DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\" \
+-  -DPA_SRCDIR=\"$(abs_srcdir)\" \
+-  -DPA_BUILDDIR=\"$(abs_builddir)\" \
++  -DPA_SRCDIR=\"$(ac_srcdir)\" \
++  -DPA_BUILDDIR=\"$(ac_builddir)\" \
+   -DPULSE_LOCALEDIR=\"$(localedir)\"
+ AM_CFLAGS = -std=gnu11 \
+   $(PTHREAD_CFLAGS)
+-- 
+2.7.4
+
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_12.2.bb 
b/meta/recipes-multimedia/pulseaudio/pulseaudio_12.2.bb
index 36d92bc..9cda50a 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio_12.2.bb
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_12.2.bb
@@ -2,6 +2,7 @@ require pulseaudio.inc
 
 SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
file://0001-client-conf-Add-allow-autospawn-for-root.patch \
+   file://0001-improve-reproducibility.patch \
file://volatiles.04_pulse \
"
 SRC_URI[md5sum] = "c42f1f1465e8df9859d023dc184734bf"
-- 
2.7.4

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


[OE-core] [PATCH 3/4] initramfs-module-setup-live: add umountfs

2018-12-03 Thread Hongxu Jia
In init-live.sh, due to udev, mount points (/run\/media/**) are available,
except realroot, other mount points are moved to the corresponding directories
under the real root filesystem.

For initramfs-module-setup-live, rather than move them to real root,
just umount these mount points. After switch_root, let udev/fstab in
rootfs to process the partition. It aligns the principle that `Initrd
is used to mount the root file system at boot time'[1]
[1] https://en.wikipedia.org/wiki/Initial_ramdisk

Umount dev rather mount point to avoid `spaces in the mount points to
actual ASCII char'

Signed-off-by: Hongxu Jia 
---
 meta/recipes-core/initrdscripts/initramfs-framework/umountfs   | 10 ++
 .../initrdscripts/initramfs-module-setup-live_1.0.bb   |  3 +++
 2 files changed, 13 insertions(+)
 create mode 100644 meta/recipes-core/initrdscripts/initramfs-framework/umountfs

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/umountfs 
b/meta/recipes-core/initrdscripts/initramfs-framework/umountfs
new file mode 100644
index 000..9d41538
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/umountfs
@@ -0,0 +1,10 @@
+umountfs_enabled() {
+return 0
+}
+
+umountfs_run() {
+# Umount available mount points
+for dev in `awk '/\/dev.* \/run\/media/{print $1}' /proc/mounts`; do
+umount $dev
+done
+}
diff --git a/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb 
b/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
index c0ebd40..c8986cb 100644
--- a/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
@@ -11,6 +11,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/initramfs-framework:"
 SRC_URI = "file://setup-live \
file://union-fs \
file://realroot \
+   file://umountfs \
 "
 
 S = "${WORKDIR}"
@@ -20,9 +21,11 @@ do_install() {
 install -m 0755 ${WORKDIR}/setup-live ${D}/init.d/80-setup-live
 install -m 0755 ${WORKDIR}/union-fs ${D}/init.d/91-union-fs
 install -m 0755 ${WORKDIR}/realroot ${D}/init.d/92-realroot
+install -m 0755 ${WORKDIR}/umountfs ${D}/init.d/93-umountfs
 }
 
 FILES_${PN} = "/init.d/80-setup-live \
/init.d/91-union-fs \
/init.d/92-realroot \
+   /init.d/93-umountfs \
   "
-- 
2.7.4

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


[OE-core] [PATCH 2/4] initramfs-module-setup-live: add realroot

2018-12-03 Thread Hongxu Jia
The setup-live module of initramfs-framework is introduced to integrate
the functionality of init-live.sh, but it missed to create /media/realroot

Refer init-live.sh, add scriptlet named `realroot' after scriptlet `union-fs'

Signed-off-by: Hongxu Jia 
---
 .../initrdscripts/initramfs-framework/realroot | 14 ++
 .../initrdscripts/initramfs-module-setup-live_1.0.bb   |  3 +++
 2 files changed, 17 insertions(+)
 create mode 100644 meta/recipes-core/initrdscripts/initramfs-framework/realroot

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/realroot 
b/meta/recipes-core/initrdscripts/initramfs-framework/realroot
new file mode 100644
index 000..19ff855
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/realroot
@@ -0,0 +1,14 @@
+realroot_enabled() {
+return 0
+}
+
+realroot_run() {
+for i in `ls /run/media 2>/dev/null`; do
+if [ -f /run/media/$i/rootfs.img -o -f 
/run/media/$i/isolinux/rootfs.img ] ; then
+echo "Move /run/media/$i to /media/realroot"
+mkdir -p  $ROOTFS_DIR/media/realroot
+mount -n --move "/run/media/$i" $ROOTFS_DIR/media/realroot
+break
+fi
+done
+}
diff --git a/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb 
b/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
index 30831c2..c0ebd40 100644
--- a/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
@@ -10,6 +10,7 @@ inherit allarch
 FILESEXTRAPATHS_prepend := "${THISDIR}/initramfs-framework:"
 SRC_URI = "file://setup-live \
file://union-fs \
+   file://realroot \
 "
 
 S = "${WORKDIR}"
@@ -18,8 +19,10 @@ do_install() {
 install -d ${D}/init.d
 install -m 0755 ${WORKDIR}/setup-live ${D}/init.d/80-setup-live
 install -m 0755 ${WORKDIR}/union-fs ${D}/init.d/91-union-fs
+install -m 0755 ${WORKDIR}/realroot ${D}/init.d/92-realroot
 }
 
 FILES_${PN} = "/init.d/80-setup-live \
/init.d/91-union-fs \
+   /init.d/92-realroot \
   "
-- 
2.7.4

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


[OE-core] [PATCH 1/4] initramfs-module-setup-live: support union fs

2018-12-03 Thread Hongxu Jia
Since commit [882ae0dc core-image-minimal-initramfs: use initramfs-framework
for initialization] applied. The setup-live module of initramfs-framework is
introduced to integrate the functionality of init-live.sh, but it missed to
setup union filesystem which caused the rootfs is not writable.

Refer init-live.sh, add scriptlet named `union-fs' after scriptlet `rootfs'

Here are test steps:
$ echo 'IMAGE_FSTYPES_pn-core-image-minimal_append = " live"' >> conf/local.conf
$ echo 'KERNEL_FEATURES_append = " features/overlayfs/overlayfs.scc"' >> 
conf/local.conf
$ bitbake core-image-minimal
$ runqemu core-image-minimal slirp iso
qemux86-64 login: root
root@qemux86-64:~# touch /abc

Signed-off-by: Hongxu Jia 
---
 .../initrdscripts/initramfs-framework/union-fs | 55 ++
 .../initramfs-module-setup-live_1.0.bb |  9 +++-
 2 files changed, 62 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/initrdscripts/initramfs-framework/union-fs

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/union-fs 
b/meta/recipes-core/initrdscripts/initramfs-framework/union-fs
new file mode 100644
index 000..2fb6241
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/union-fs
@@ -0,0 +1,55 @@
+union_enabled() {
+if touch $ROOTFS_DIR/bin 2>/dev/null; then
+# The root image is read-write, directly return.
+return 1
+fi
+return 0
+}
+
+union_run() {
+# determine which unification filesystem to use
+union_fs_type=""
+if grep -q -w "overlay" /proc/filesystems; then
+union_fs_type="overlay"
+elif grep -q -w "aufs" /proc/filesystems; then
+union_fs_type="aufs"
+else
+union_fs_type=""
+fi
+
+# make a union mount if possible
+case $union_fs_type in
+"overlay")
+mkdir -p /rootfs.ro /rootfs.rw
+if ! mount -n --move $ROOTFS_DIR /rootfs.ro; then
+rm -rf /rootfs.ro /rootfs.rw
+fatal "overlay: Could not move rootfs mount point to 
/rootfs.ro"
+else
+mount -t tmpfs -o rw,noatime,mode=755 tmpfs /rootfs.rw
+mkdir -p /rootfs.rw/upperdir /rootfs.rw/work
+mount -t overlay overlay -o 
"lowerdir=/rootfs.ro,upperdir=/rootfs.rw/upperdir,workdir=/rootfs.rw/work" 
$ROOTFS_DIR
+mkdir -p $ROOTFS_DIR/rootfs.ro $ROOTFS_DIR/rootfs.rw
+mount --move /rootfs.ro $ROOTFS_DIR/rootfs.ro
+mount --move /rootfs.rw $ROOTFS_DIR/rootfs.rw
+fi
+;;
+"aufs")
+mkdir -p /rootfs.ro /rootfs.rw
+if ! mount -n --move $ROOTFS_DIR /rootfs.ro; then
+rm -rf /rootfs.ro /rootfs.rw
+fatal "aufs: Could not move rootfs mount point to /rootfs.ro"
+else
+mount -t tmpfs -o rw,noatime,mode=755 tmpfs /rootfs.rw
+mount -t aufs -o "dirs=/rootfs.rw=rw:/rootfs.ro=ro" aufs 
$ROOTFS_DIR
+mkdir -p $ROOTFS_DIR/rootfs.ro $ROOTFS_DIR/rootfs.rw
+mount --move /rootfs.ro $ROOTFS_DIR/rootfs.ro
+mount --move /rootfs.rw $ROOTFS_DIR/rootfs.rw
+fi
+;;
+"")
+mount -t tmpfs -o rw,noatime,mode=755 tmpfs $ROOTFS_DIR/media
+;;
+esac
+
+debug "setup union filesystem $union_fs_type"
+}
diff --git a/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb 
b/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
index 4d2fe9d..30831c2 100644
--- a/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb
@@ -8,13 +8,18 @@ PR = "r4"
 inherit allarch
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/initramfs-framework:"
-SRC_URI = "file://setup-live"
+SRC_URI = "file://setup-live \
+   file://union-fs \
+"
 
 S = "${WORKDIR}"
 
 do_install() {
 install -d ${D}/init.d
 install -m 0755 ${WORKDIR}/setup-live ${D}/init.d/80-setup-live
+install -m 0755 ${WORKDIR}/union-fs ${D}/init.d/91-union-fs
 }
 
-FILES_${PN} = "/init.d/80-setup-live"
+FILES_${PN} = "/init.d/80-setup-live \
+   /init.d/91-union-fs \
+  "
-- 
2.7.4

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


[OE-core] [PATCH 4/4] initrdscripts/init-live.sh: umount extra mount points

2018-12-03 Thread Hongxu Jia
Just umount these mount points. After switch_root, let udev/fstab in
rootfs to process these partition. It aligns the principle that `Initrd
is used to mount the root file system at boot time'[1]

[1] https://en.wikipedia.org/wiki/Initial_ramdisk

Umount dev rather mount point to avoid `spaces in the mount points to
actual ASCII char'

Here are test steps:
$ echo 'INITRAMFS_SCRIPTS = "initramfs-live-boot initramfs-live-install \
initramfs-live-install-efi"' >> conf/local.conf
$ echo 'IMAGE_FSTYPES_pn-core-image-minimal_append = " live"' >> conf/local.conf
$ echo 'KERNEL_FEATURES_append = " features/overlayfs/overlayfs.scc"' >> 
conf/local.conf
$ bitbake core-image-minimal
$ runqemu core-image-minimal slirp iso
qemux86-64 login: root
root@qemux86-64:~# touch /abc

Signed-off-by: Hongxu Jia 
---
 meta/recipes-core/initrdscripts/files/init-live.sh | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh 
b/meta/recipes-core/initrdscripts/files/init-live.sh
index 65183d7..068e049 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -92,15 +92,11 @@ boot_live_root() {
 mkdir -p  ${ROOT_MOUNT}/media/realroot
 mount -n --move "/run/media/${ROOT_DISK}" ${ROOT_MOUNT}/media/realroot
 
-# Move the mount points of some filesystems over to
-# the corresponding directories under the real root filesystem.
-for dir in `awk '/\/dev.* \/run\/media/{print $2}' /proc/mounts`; do
-# Parse any OCT or HEX encoded chars such as spaces
-# in the mount points to actual ASCII chars
-dir=`printf $dir`
-mkdir -p "${ROOT_MOUNT}/media/${dir##*/}"
-mount -n --move "$dir" "${ROOT_MOUNT}/media/${dir##*/}"
+# Umount available mount points
+for dev in `awk '/\/dev.* \/run\/media/{print $1}' /proc/mounts`; do
+umount $dev
 done
+
 mount -n --move /proc ${ROOT_MOUNT}/proc
 mount -n --move /sys ${ROOT_MOUNT}/sys
 mount -n --move /dev ${ROOT_MOUNT}/dev
-- 
2.7.4

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


[OE-core] [PATCH] ghostscript: 9.25 -> 9.26

2018-11-27 Thread Hongxu Jia
- Drop backported CVE fixes
  000[1-8]*.patch

Signed-off-by: Hongxu Jia 
---
 ...add-operand-checking-to-.setnativefontmap.patch |  59 ---
 ...Improve-hiding-of-security-critical-custo.patch | 434 -
 ...32-add-control-over-hiding-error-handlers.patch | 172 
 ...operators-pass-a-name-object-to-error-han.patch | 105 -
 ...-699938-.loadfontloop-must-be-an-operator.patch |  31 --
 ...define-some-additional-internal-operators.patch |  42 --
 ...don-t-include-operator-arrays-in-execstac.patch | 197 --
 ...put-unavailable-from-.policyprocs-helper-.patch | 245 
 .../{ghostscript_9.25.bb => ghostscript_9.26.bb}   |  14 +-
 9 files changed, 3 insertions(+), 1296 deletions(-)
 delete mode 100644 
meta/recipes-extended/ghostscript/files/0001-Bug-699795-add-operand-checking-to-.setnativefontmap.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/files/0002-Bug-699816-Improve-hiding-of-security-critical-custo.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/files/0003-Bug-699832-add-control-over-hiding-error-handlers.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/files/0004-For-hidden-operators-pass-a-name-object-to-error-han.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/files/0005-Bug-699938-.loadfontloop-must-be-an-operator.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/files/0006-Undefine-some-additional-internal-operators.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/files/0007-Bug-699927-don-t-include-operator-arrays-in-execstac.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/files/0008-Make-.forceput-unavailable-from-.policyprocs-helper-.patch
 rename meta/recipes-extended/ghostscript/{ghostscript_9.25.bb => 
ghostscript_9.26.bb} (83%)

diff --git 
a/meta/recipes-extended/ghostscript/files/0001-Bug-699795-add-operand-checking-to-.setnativefontmap.patch
 
b/meta/recipes-extended/ghostscript/files/0001-Bug-699795-add-operand-checking-to-.setnativefontmap.patch
deleted file mode 100644
index f175da0..000
--- 
a/meta/recipes-extended/ghostscript/files/0001-Bug-699795-add-operand-checking-to-.setnativefontmap.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 274b2cc08b0d10a4cac3fe8b50022889f22580cb Mon Sep 17 00:00:00 2001
-From: Chris Liddell 
-Date: Thu, 20 Sep 2018 16:35:28 +0100
-Subject: [PATCH 1/5] Bug 699795: add operand checking to
- .setnativefontmapbuilt
-
-.setnativefontmapbuilt .forceputs a value into systemdict - it is intended
-to be a boolean, but in this case was being called with a compound object
-(a dictionary). Such an object, in local VM, being forced into systemdict
-would then confuse the garbager, since it could be restored away with the
-reference remaining.
-
-This adds operand checking, so .setnativefontmapbuilt will simply ignore
-anything other than a boolean value, and also removes the definition of
-.setnativefontmapbuilt after use, since it is only used in two, closely
-related places.
-
-CVE: CVE-2018-17961
-Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git]
-Signed-off-by: Hongxu Jia 

- Resource/Init/gs_fonts.ps | 11 ---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/Resource/Init/gs_fonts.ps b/Resource/Init/gs_fonts.ps
-index 38f0f6c..45b6613 100644
 a/Resource/Init/gs_fonts.ps
-+++ b/Resource/Init/gs_fonts.ps
-@@ -372,9 +372,13 @@ FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if
- % of strings: what the system thinks is the ps name,
- % and the access path.
- /.setnativefontmapbuilt { % set whether we've been run
--  systemdict exch /.nativefontmapbuilt exch .forceput
-+  dup type /booleantype eq {
-+  systemdict exch /.nativefontmapbuilt exch .forceput
-+  }
-+  {pop}
-+  ifelse
- } .bind executeonly def
--systemdict /NONATIVEFONTMAP known .setnativefontmapbuilt
-+systemdict /NONATIVEFONTMAP known //.setnativefontmapbuilt exec
- /.buildnativefontmap {   % - .buildnativefontmap 
-   systemdict /.nativefontmapbuilt .knownget not
-   { //false} if
-@@ -415,9 +419,10 @@ systemdict /NONATIVEFONTMAP known .setnativefontmapbuilt
-   } forall
- } if
- % record that we've been run
--//true .setnativefontmapbuilt
-+//true //.setnativefontmapbuilt exec
-   } ifelse
- } bind def
-+currentdict /.setnativefontmapbuilt .forceundef
- 
- % Create the dictionary that registers the .buildfont procedure
- % (called by definefont) for each FontType.
--- 
-2.7.4
-
diff --git 
a/meta/recipes-extended/ghostscript/files/0002-Bug-699816-Improve-hiding-of-security-critical-custo.patch
 
b/meta/recipes-extended/ghostscript/files/0002-Bug-699816-Improve-hiding-of-security-critical-custo.patch
deleted file mode 100644
index 000f9c9..000
--- 
a/meta/recipes-extended/ghostscript/files/0002-Bug-699816-Improve-hiding-of-security-critical-custo.patch
+++ /dev/null
@@ -1,434 +0,0 @@
-From 0661bf23a5be32973682e17afed4a2f23a8214ba Mon Sep 17 00:00:00 2001
-From: Chris Liddell 
-Date: Sat, 

Re: [OE-core] [PATCH] devshell.bbclass/terminal.bbclass: add a shell check at devshell

2018-11-25 Thread Hongxu Jia

Ping, any comments?

//Hongxu

On 2018/9/3 下午3:09, Hongxu Jia wrote:

While var-SHELL is neither `bash' or `dash', such as
`csh', loading the wrapper script will fail at devshell,
because csh does not support syntax `export'.

Add a shell check at devshell, and use `/bin/sh' to replace
if shell is neither `bash' or `dash'. `/bin/sh' is safe to
use since `ecdfdd7 sanity.bbclass: check /bin/sh is dash
or bash'

Signed-off-by: Hongxu Jia 
---
  meta/classes/devshell.bbclass | 4 
  meta/classes/terminal.bbclass | 4 +++-
  2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
index fdf7dc1..c4765db 100644
--- a/meta/classes/devshell.bbclass
+++ b/meta/classes/devshell.bbclass
@@ -3,6 +3,10 @@ inherit terminal
  DEVSHELL = "${SHELL}"
  
  python do_devshell () {

+devshell = d.getVar('DEVSHELL')
+devshell = devshell if devshell.endswith("bash") or 
devshell.endswith("dash") else '/bin/sh'
+d.setVar('DEVSHELL', devshell)
+
  if d.getVarFlag("do_devshell", "manualfakeroot"):
 d.prependVar("DEVSHELL", "pseudo ")
 fakeenv = d.getVar("FAKEROOTENV").split()
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index 73e765d..f427538 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -25,7 +25,9 @@ def emit_terminal_func(command, envdata, d):
  bb.utils.mkdirhier(os.path.dirname(runfile))
  
  with open(runfile, 'w') as script:

-script.write('#!/usr/bin/env %s\n' % d.getVar('SHELL'))
+shell = d.getVar('SHELL')
+shell = shell if shell.endswith("bash") or shell.endswith("dash") else 
'/bin/sh'
+script.write('#!/usr/bin/env %s\n' % shell)
  script.write('set -e\n')
  bb.data.emit_func(cmd_func, script, envdata)
  script.write(cmd_func)



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


Re: [OE-core] [PATCH] Revert "terminal.bbclass: use var-SHELL as the shebang of wrapper script"

2018-11-25 Thread Hongxu Jia

On 2018/11/25 上午9:11, Peter Kjellerstedt wrote:

The $SHELL environment variable is used for the user's preferred
interactive shell. This shall not be used when executing shell scripts
that expect POSIX shell syntax as there is no guarantee that it is a
POSIX compatible shell.


There is a sanity check to `/bin/sh' to dash or bash

`eaa0dc2 sanity.bbclass: Only verify /bin/sh link if it's a link'

`ecdfdd7 sanity.bbclass: check /bin/sh is dash or bash'



This reverts commit 27e2ede65f1193e49f9483b08a55495d88740a65.

Signed-off-by: Peter Kjellerstedt 
---

In my case, $SHELL is set to /bin/zsh, with the result that devshell
fails to start. If there is some problem with devshell related to
/bin/sh being linked to dash rather than bash (which the original
commit indicates), then that should be adressed instead.

Hongxu: Do you have any additional information related to why you made
the change in the first place?


If revert this patch, we will have the issue which this patch have fixed.

There is another patch in mailing list that fix the issue you report

[OE-core] [PATCH] devshell.bbclass/terminal.bbclass: add a shell check 
at devshell


While var-SHELL is neither `bash' or `dash', such as
`csh', loading the wrapper script will fail at devshell,
because csh does not support syntax `export'.

Add a shell check at devshell, and use `/bin/sh' to replace
if shell is neither `bash' or `dash'. `/bin/sh' is safe to
use since `ecdfdd7 sanity.bbclass: check /bin/sh is dash
or bash'

Signed-off-by: Hongxu Jia 
---
 meta/classes/devshell.bbclass | 4 
 meta/classes/terminal.bbclass | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
index fdf7dc1..c4765db 100644
--- a/meta/classes/devshell.bbclass
+++ b/meta/classes/devshell.bbclass
@@ -3,6 +3,10 @@ inherit terminal
 DEVSHELL = "${SHELL}"

 python do_devshell () {
+    devshell = d.getVar('DEVSHELL')
+    devshell = devshell if devshell.endswith("bash") or 
devshell.endswith("dash") else '/bin/sh'

+    d.setVar('DEVSHELL', devshell)
+
 if d.getVarFlag("do_devshell", "manualfakeroot"):
    d.prependVar("DEVSHELL", "pseudo ")
    fakeenv = d.getVar("FAKEROOTENV").split()
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index 73e765d..f427538 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -25,7 +25,9 @@ def emit_terminal_func(command, envdata, d):
 bb.utils.mkdirhier(os.path.dirname(runfile))

 with open(runfile, 'w') as script:
-    script.write('#!/usr/bin/env %s\n' % d.getVar('SHELL'))
+    shell = d.getVar('SHELL')
+    shell = shell if shell.endswith("bash") or 
shell.endswith("dash") else '/bin/sh'

+    script.write('#!/usr/bin/env %s\n' % shell)
 script.write('set -e\n')
 bb.data.emit_func(cmd_func, script, envdata)
 script.write(cmd_func)

//Hongxu



  meta/classes/terminal.bbclass | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index 73e765d57a..a27e10c6ec 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -25,8 +25,7 @@ def emit_terminal_func(command, envdata, d):
  bb.utils.mkdirhier(os.path.dirname(runfile))
  
  with open(runfile, 'w') as script:

-script.write('#!/usr/bin/env %s\n' % d.getVar('SHELL'))
-script.write('set -e\n')
+script.write('#!/bin/sh -e\n')
  bb.data.emit_func(cmd_func, script, envdata)
  script.write(cmd_func)
  script.write("\n")



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


Re: [OE-core] ✗ patchtest: failure for Upgrade elfutils/gnupg/libgcrypt/ncurses

2018-11-23 Thread Hongxu Jia

On 2018/11/23 下午4:03, Patchwork wrote:

== Series Details ==

Series: Upgrade elfutils/gnupg/libgcrypt/ncurses
Revision: 1
URL   : https://patchwork.openembedded.org/series/15056/
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 Patches not removed from tree [test_src_uri_left_files]
   Suggested fixAmend the patch containing the software patch file removal
   Patch0001-mips_readelf_w.patch
   Patch0001-disable_werror.patch
   Patch0001-arm_backend.patch
   Patch0001-mips_backend.patch
   Patch0001-hppa_backend.patch


Pick these patches from debian as a whole

-#http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz
+#http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.175-1.debian.tar.xz

//Hongxu




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 3/4] libgcrypt: upgrade 1.8.3 -> 1.8.4

2018-11-22 Thread Hongxu Jia
Signed-off-by: Hongxu Jia 
---
 .../libgcrypt/{libgcrypt_1.8.3.bb => libgcrypt_1.8.4.bb}  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-support/libgcrypt/{libgcrypt_1.8.3.bb => 
libgcrypt_1.8.4.bb} (93%)

diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.8.3.bb 
b/meta/recipes-support/libgcrypt/libgcrypt_1.8.4.bb
similarity index 93%
rename from meta/recipes-support/libgcrypt/libgcrypt_1.8.3.bb
rename to meta/recipes-support/libgcrypt/libgcrypt_1.8.4.bb
index cefa836..fda68a2 100644
--- a/meta/recipes-support/libgcrypt/libgcrypt_1.8.3.bb
+++ b/meta/recipes-support/libgcrypt/libgcrypt_1.8.4.bb
@@ -22,8 +22,8 @@ SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \

file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \

file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \
 "
-SRC_URI[md5sum] = "3139c2402e844985a67fb288a930534d"
-SRC_URI[sha256sum] = 
"66ec90be036747602f2b48f98312361a9180c97c68a690a5f376fa0f67d0af7c"
+SRC_URI[md5sum] = "fbfdaebbbc6d7e5fbbf6ffdb3e139573"
+SRC_URI[sha256sum] = 
"f638143a0672628fde0cad745e9b14deb85dffb175709cacc1f4fe24b93f2227"
 
 BINCONFIG = "${bindir}/libgcrypt-config"
 
-- 
2.7.4

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


[OE-core] [PATCH 0/4] Upgrade elfutils/gnupg/libgcrypt/ncurses

2018-11-22 Thread Hongxu Jia
The following changes since commit fc5418e7bbdecfb27bafe595084e0fd0f991a388:

  meta/icecc.bbclass: Update system blacklists (2018-11-21 11:48:18 +)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib hongxu/upgrade-20181109
  
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=hongxu/upgrade-20181109

Hongxu Jia (4):
  elfutils: 0.174 -> 0.175
  gnupg: upgrade 2.2.10 -> 2.2.11
  libgcrypt: upgrade 1.8.3 -> 1.8.4
  ncurses: upgrade 6.1 -> 6.1+20181013

 ...ses_6.1+20180714.bb => ncurses_6.1+20181013.bb} |   2 +-
 .../{elfutils_0.174.bb => elfutils_0.175.bb}   |  24 +-
 ...01-arlib-Check-that-sh_entsize-isn-t-zero.patch |  36 ---
 ...Sanity-check-partial-core-file-data-reads.patch |  60 
 .../0001-size-Handle-recursive-ELF-ar-files.patch  |  40 ---
 .../files/0005-fix-a-stack-usage-warning.patch |  35 ---
 ...de-alternatives-for-glibc-assumptions-hel.patch |  14 +-
 ...ferences-between-mips-machine-identifiers.patch |   5 +-
 .../files/debian/0001-fix-gcc7-ftbfs.patch |  57 
 .../debian/0001-testsuite-ignore-elflint.patch |  57 
 ...-support-for-mips64-abis-in-mips_retval.c.patch |   5 +-
 .../0003-Add-mips-n64-relocation-format-hack.patch |  41 ++-
 .../{0001-arm_backend.patch => arm_backend.diff}   | 342 ++---
 ...1-disable_werror.patch => disable_werror.patch} |  29 +-
 .../{0001-hppa_backend.patch => hppa_backend.diff} | 174 +--
 .../elfutils/files/debian/hurd_path.patch  |  16 +
 .../elfutils/files/debian/kfreebsd_path.patch  |  19 ++
 .../{0001-mips_backend.patch => mips_backend.diff} | 139 -
 ...1-mips_readelf_w.patch => mips_readelf_w.patch} |  26 +-
 ...c-use-a-custom-value-for-the-location-of-.patch |   4 +-
 meta/recipes-support/gnupg/gnupg/relocate.patch|   2 +-
 .../gnupg/{gnupg_2.2.10.bb => gnupg_2.2.11.bb} |   4 +-
 .../{libgcrypt_1.8.3.bb => libgcrypt_1.8.4.bb} |   4 +-
 23 files changed, 379 insertions(+), 756 deletions(-)
 rename meta/recipes-core/ncurses/{ncurses_6.1+20180714.bb => 
ncurses_6.1+20181013.bb} (86%)
 rename meta/recipes-devtools/elfutils/{elfutils_0.174.bb => elfutils_0.175.bb} 
(76%)
 delete mode 100644 
meta/recipes-devtools/elfutils/files/0001-arlib-Check-that-sh_entsize-isn-t-zero.patch
 delete mode 100644 
meta/recipes-devtools/elfutils/files/0001-libdwfl-Sanity-check-partial-core-file-data-reads.patch
 delete mode 100644 
meta/recipes-devtools/elfutils/files/0001-size-Handle-recursive-ELF-ar-files.patch
 delete mode 100644 
meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch
 delete mode 100644 
meta/recipes-devtools/elfutils/files/debian/0001-fix-gcc7-ftbfs.patch
 delete mode 100644 
meta/recipes-devtools/elfutils/files/debian/0001-testsuite-ignore-elflint.patch
 rename meta/recipes-devtools/elfutils/files/debian/{0001-arm_backend.patch => 
arm_backend.diff} (85%)
 rename meta/recipes-devtools/elfutils/files/debian/{0001-disable_werror.patch 
=> disable_werror.patch} (46%)
 rename meta/recipes-devtools/elfutils/files/debian/{0001-hppa_backend.patch => 
hppa_backend.diff} (90%)
 create mode 100644 meta/recipes-devtools/elfutils/files/debian/hurd_path.patch
 create mode 100644 
meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch
 rename meta/recipes-devtools/elfutils/files/debian/{0001-mips_backend.patch => 
mips_backend.diff} (91%)
 rename meta/recipes-devtools/elfutils/files/debian/{0001-mips_readelf_w.patch 
=> mips_readelf_w.patch} (48%)
 rename meta/recipes-support/gnupg/{gnupg_2.2.10.bb => gnupg_2.2.11.bb} (92%)
 rename meta/recipes-support/libgcrypt/{libgcrypt_1.8.3.bb => 
libgcrypt_1.8.4.bb} (93%)

-- 
2.7.4

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


  1   2   3   4   5   6   7   8   9   10   >