[OE-core] [OE-Core][PATCH] perf: Package libperf-jvmti.so as part of ${PN}

2019-01-14 Thread Alex Kiernan
perf's jvmti support builds libperf-jvmti.so that needs to be packaged
as part of the main package, not a developer package. Given there's no
files in the developer package, override FILES_SOLIBSDEV so it's not
gobbled by FILES_${PN}-dev, and then add just that file to FILES_${PN}
so that if in the future there other files which would be added to the
dev package we'll fail then.

Signed-off-by: Alex Kiernan 
---

 meta/recipes-kernel/perf/perf.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index bae494875159..515a78b859d7 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -254,7 +254,8 @@ RDEPENDS_${PN}-tests =+ "python"
 RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', 
'${PN}-perl ${PN}-python', '',d)}"
 RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
 
-FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core 
${libdir}/traceevent"
+FILES_SOLIBSDEV = ""
+FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core 
${libdir}/traceevent ${libdir}/libperf-jvmti.so"
 FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
 FILES_${PN}-tests = "${libdir}/perf/perf-core/tests 
${libexecdir}/perf-core/tests"
 FILES_${PN}-python = " \
-- 
2.7.4

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


[OE-core] [PATCH] libcomps & librepo: fix buildpaths qa warnings

2019-01-14 Thread kai.kang
From: Kai Kang 

Add preprocess option '-fmacro-prefix-map' to TARGET_CPPFLAGS to fix
buildpaths qa warnings of libcomps and librepo.

Signed-off-by: Kai Kang 
---
 meta/recipes-devtools/libcomps/libcomps_git.bb | 2 ++
 meta/recipes-devtools/librepo/librepo_1.9.3.bb | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/meta/recipes-devtools/libcomps/libcomps_git.bb 
b/meta/recipes-devtools/libcomps/libcomps_git.bb
index 500d412340..421b8173bb 100644
--- a/meta/recipes-devtools/libcomps/libcomps_git.bb
+++ b/meta/recipes-devtools/libcomps/libcomps_git.bb
@@ -18,6 +18,8 @@ inherit cmake distutils3-base
 
 DEPENDS += "libxml2 expat libcheck"
 
+TARGET_CPPFLAGS += 
"-fmacro-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} 
-DPYTHON_DESIRED=3"
 OECMAKE_SOURCEPATH = "${S}/libcomps"
 
diff --git a/meta/recipes-devtools/librepo/librepo_1.9.3.bb 
b/meta/recipes-devtools/librepo/librepo_1.9.3.bb
index abfed798f3..4f468b198a 100644
--- a/meta/recipes-devtools/librepo/librepo_1.9.3.bb
+++ b/meta/recipes-devtools/librepo/librepo_1.9.3.bb
@@ -15,6 +15,8 @@ DEPENDS = "curl glib-2.0 openssl attr gpgme libxml2"
 
 inherit cmake distutils3-base pkgconfig
 
+TARGET_CPPFLAGS += 
"-fmacro-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} 
-DPYTHON_DESIRED=3 -DENABLE_TESTS=OFF -DENABLE_DOCS=OFF -DWITH_ZCHUNK=OFF"
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.20.0

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


Re: [OE-core] [PATCH] Added armeb into QEMU_TARGETS.

2019-01-14 Thread Lei, Maohui
ping

> -Original Message-
> From: Hong, Liu/洪 流
> Sent: Wednesday, January 02, 2019 1:18 PM
> To: openembedded-core@lists.openembedded.org
> Cc: Lei, Maohui/雷 茂慧
> Subject: [OE-core] [PATCH] Added armeb into QEMU_TARGETS.
> 
> From: Lei Maohui 
> 
> Signed-off-by: Lei Maohui 
> ---
>  meta-poky/conf/distro/poky.conf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-poky/conf/distro/poky.conf b/meta-poky/conf/distro/poky.conf
> index f5de8f2..e9c2681 100644
> --- a/meta-poky/conf/distro/poky.conf
> +++ b/meta-poky/conf/distro/poky.conf
> @@ -39,7 +39,7 @@ DISTRO_EXTRA_RDEPENDS_append_qemux86-64 = " ${POKYQEMUDEPS}"
> 
>  TCLIBCAPPEND = ""
> 
> -QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el nios2 ppc
> x86_64"
> +QEMU_TARGETS ?= "arm armeb aarch64 i386 mips mipsel mips64 mips64el nios2 ppc
> x86_64"
>  # Other QEMU_TARGETS "sh4"
> 
>  PREMIRRORS ??= "\
> --
> 1.9.1



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


Re: [OE-core] [oe-core] [PATCH] Added armeb into meson.bbclass.

2019-01-14 Thread Lei, Maohui
Hi,

Plesse merge to thud branch.


Best regards
Lei



> -Original Message-
> From: Hong, Liu/洪 流
> Sent: Wednesday, January 02, 2019 1:18 PM
> To: openembedded-core@lists.openembedded.org
> Cc: Lei, Maohui/雷 茂慧
> Subject: [oe-core] [PATCH] Added armeb into meson.bbclass.
> 
> From: Lei Maohui 
> 
> Signed-off-by: Lei Maohui 
> ---
>  meta/classes/meson.bbclass | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
> index 3cbdcf1..a922ae5 100644
> --- a/meta/classes/meson.bbclass
> +++ b/meta/classes/meson.bbclass
> @@ -54,6 +54,8 @@ def meson_cpu_family(var, d):
>  return 'ppc'
>  elif arch == 'powerpc64':
>  return 'ppc64'
> +elif arch == 'armeb':
> +return 'arm'
>  elif arch == 'mipsel':
>  return 'mips'
>  elif re.match(r"i[3-6]86", arch):
> --
> 2.7.4



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


Re: [OE-core] [PATCH 20/23] runqemu: add support for virgl GL acceleration

2019-01-14 Thread Martin Jansa
You're duplicating nographic elif

On Mon, Jan 14, 2019 at 4:06 PM Alexander Kanavin 
wrote:

> Also, do not hardcode -vga option to qemu, set it according to command
> line parameters.
>
> Signed-off-by: Alexander Kanavin 
> ---
>  meta/conf/machine/include/qemuboot-x86.inc |  2 +-
>  scripts/runqemu| 11 +++
>  2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/meta/conf/machine/include/qemuboot-x86.inc
> b/meta/conf/machine/include/qemuboot-x86.inc
> index 5fdbe4df50e..574b7bbfc7d 100644
> --- a/meta/conf/machine/include/qemuboot-x86.inc
> +++ b/meta/conf/machine/include/qemuboot-x86.inc
> @@ -11,7 +11,7 @@ QB_CPU_KVM_x86-64 = "-cpu core2duo"
>  QB_AUDIO_DRV = "alsa"
>  QB_AUDIO_OPT = "-soundhw ac97,es1370"
>  QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=${UVESA_MODE}
> oprofile.timer=1 uvesafb.task_timeout=-1"
> -QB_OPT_APPEND = "-vga vmware -show-cursor -usb -device usb-tablet"
> +QB_OPT_APPEND = "-show-cursor -usb -device usb-tablet"
>  # Add the 'virtio-rng-pci' device otherwise the guest may run out of
> entropy
>  QB_OPT_APPEND += "-object rng-random,filename=/dev/urandom,id=rng0
> -device virtio-rng-pci,rng=rng0"
>
> diff --git a/scripts/runqemu b/scripts/runqemu
> index c4a0ca811d9..fa88dc4583c 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -74,6 +74,8 @@ of the following environment variables (in any order):
>MACHINE - the machine name (optional, autodetected from KERNEL filename
> if unspecified)
>Simplified QEMU command-line options can be passed with:
>  nographic - disable video console
> +gl - enable virgl-based GL acceleration
> +gl-es - enable virgl-based GL acceleration, using OpenGL ES
>  serial - enable a serial console on /dev/ttyS0
>  serialstdio - enable a serial console on the console (regardless of
> graphics mode)
>  slirp - enable user networking, no root privileges is required
> @@ -427,12 +429,21 @@ class BaseConfig(object):
>  sys.argv.remove(quiet)
>
>  unknown_arg = ""
> +if 'gl' not in sys.argv[1:] and 'gl-es' not in sys.argv[1:]:
> +self.qemu_opt_script += ' -vga vmware'
>  for arg in sys.argv[1:]:
>  if arg in self.fstypes + self.vmtypes:
>  self.check_arg_fstype(arg)
>  elif arg == 'nographic':
>  self.qemu_opt_script += ' -nographic'
>  self.kernel_cmdline_script += ' console=ttyS0'
> +elif arg == 'gl':
> +self.qemu_opt_script += ' -vga virtio -display gtk,gl=on'
> +elif arg == 'gl-es':
> +self.qemu_opt_script += ' -vga virtio -display gtk,gl=es'
> +elif arg == 'nographic':
> +self.qemu_opt_script += ' -nographic'
> +self.kernel_cmdline_script += ' console=ttyS0'
>  elif arg == 'serial':
>  self.kernel_cmdline_script += ' console=ttyS0'
>  self.serialconsole = True
> --
> 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 0/2] piglit support build without x11

2019-01-14 Thread changqing.li
Fixes bug: [YOCTO #6077]

To support piglit without x11 by disable PIGLIT_BUILD_GL_TESTS, but
the result is piglit can use without x11, but only small part of it
can be used. Most of testcase will be skipped.


Changqing Li (2):
  waffle: supprt build waffle without x11
  piglit: support build piglit without x11

 meta/recipes-graphics/piglit/piglit_git.bb   | 12 +++-
 meta/recipes-graphics/waffle/waffle_1.5.2.bb |  5 +
 2 files changed, 8 insertions(+), 9 deletions(-)

-- 
2.7.4

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


[OE-core] [PATCH 2/2] piglit: support build piglit without x11

2019-01-14 Thread changqing.li
From: Changqing Li 

1. Only depend on X11_DEPS when DISTRO_FEATURES enabled x11
2. test PIGLIT_BUILD_GL_TESTS depend on glx library, so depend
   on x11, so disable it when x11 is not enabled.
3. mesa-demos depend on libGL.so which is provide by recipe
   mesa, but when x11 is disabled, libGL.so is not generated.
   so we can only depend on this when x11 is enabled

Signed-off-by: Changqing Li 
---
 meta/recipes-graphics/piglit/piglit_git.bb | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-graphics/piglit/piglit_git.bb 
b/meta/recipes-graphics/piglit/piglit_git.bb
index 622e046..fbeca0e 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -17,11 +17,10 @@ PV = "1.0+gitr${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl 
libglu python3-mako-native python3-numpy-native python3-six-native virtual/egl"
+X11_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 
libxrender libglu', '', d)}"
+DEPENDS = "libpng waffle libxkbcommon virtual/libgl python3-mako-native 
python3-numpy-native python3-six-native virtual/egl ${X11_DEPS}"
 
 inherit cmake pkgconfig python3native distro_features_check bash-completion
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
 
 # depends on virtual/libgl
 REQUIRED_DISTRO_FEATURES += "opengl"
@@ -32,8 +31,10 @@ REQUIRED_DISTRO_FEATURES += "opengl"
 export TEMP = "${B}/temp/"
 do_compile[dirs] =+ "${B}/temp/"
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', 
'', d)}"
 PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
+PACKAGECONFIG[opengl] = 
"-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,,"
+
 
 do_configure_prepend() {
if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = 
"no" ]; then
@@ -48,7 +49,8 @@ RDEPENDS_${PN} = "waffle waffle-bin python3 python3-mako 
python3-json \
python3-misc \
python3-unixadmin python3-xml python3-multiprocessing \
python3-six python3-shell python3-io \
-   python3-netserver mesa-demos bash \
+   python3-netserver bash \
+   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d)} \
"
 
 INSANE_SKIP_${PN} += "dev-so already-stripped"
-- 
2.7.4

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


[OE-core] [PATCH 1/2] waffle: supprt build waffle without x11

2019-01-14 Thread changqing.li
From: Changqing Li 

glx depend on x11, so only enable glx when DISTRO_FEATURES enabled
x11. build waffle support gbm platform when x11 is not enabled

Signed-off-by: Changqing Li 
---
 meta/recipes-graphics/waffle/waffle_1.5.2.bb | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/recipes-graphics/waffle/waffle_1.5.2.bb 
b/meta/recipes-graphics/waffle/waffle_1.5.2.bb
index 43c3edc..21ae77a 100644
--- a/meta/recipes-graphics/waffle/waffle_1.5.2.bb
+++ b/meta/recipes-graphics/waffle/waffle_1.5.2.bb
@@ -15,10 +15,7 @@ inherit cmake distro_features_check lib_package
 
 # This should be overridden per-machine to reflect the capabilities of the GL
 # stack.
-PACKAGECONFIG ??= "glx"
-
-# libx11 requires x11 in DISTRO_FEATURES.
-REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'glx', 
'x11', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx', 
'gbm', d)}"
 
 # virtual/libgl requires opengl in DISTRO_FEATURES.
 REQUIRED_DISTRO_FEATURES += "${@bb.utils.contains('DEPENDS', 
'virtual/${MLPREFIX}libgl', 'opengl', '', 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] ltp: Remove admin_tools test

2019-01-14 Thread He Zhe
admin_tools test group has been removed from upstream. Backport to fix the
following failures.

at_deny01 1 TFAIL : ltpapicmd.c:188: At denyed user to execute test job
at_allow01 1 TFAIL : ltpapicmd.c:188: At did not allow user to execute job

Signed-off-by: He Zhe 
---
v2: Add missing SOB and upstream status.

 .../ltp/ltp/0001-Remove-admin_tools-test.patch | 3042 
 meta/recipes-extended/ltp/ltp_20180926.bb  |1 +
 2 files changed, 3043 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-Remove-admin_tools-test.patch

diff --git a/meta/recipes-extended/ltp/ltp/0001-Remove-admin_tools-test.patch 
b/meta/recipes-extended/ltp/ltp/0001-Remove-admin_tools-test.patch
new file mode 100644
index 00..2fc5be82a1
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-Remove-admin_tools-test.patch
@@ -0,0 +1,3042 @@
+From 0fc9b8624bea8acfdb408bf5ff4916b1453e3daa Mon Sep 17 00:00:00 2001
+From: Petr Vorel 
+Date: Thu, 27 Sep 2018 16:57:20 +0200
+Subject: [PATCH] Remove admin_tools test
+
+Removing cron, at, su related tests as they don't really fit into
+"kernel testing", it'd be better to have them in some "LTP userspace"
+project.
+ACL are considered as "kernel tests", but it would be easier to write
+something from scratch, thus remove them as well.
+
+Signed-off-by: Petr Vorel 
+Acked-by: Xiao Yang 
+Acked-by: Jan Stancek 
+Acked-by: Cyril Hrubis https://github.com/linux-test-project/ltp/commit/0fc9b8624bea8acfdb408bf5ff4916b1453e3daa]
+
+Signed-off-by: He Zhe 
+
+---
+ runtest/admin_tools |   9 -
+ runtest/commands|   1 -
+ scenario_groups/default |   1 -
+ testcases/commands/.gitignore   |   1 -
+ testcases/commands/at/Makefile  |  31 --
+ testcases/commands/at/at_allow01| 188 -
+ testcases/commands/at/at_deny01 | 195 --
+ testcases/commands/cron/00_Descriptions.txt |   4 -
+ testcases/commands/cron/Makefile|  29 --
+ testcases/commands/cron/README.tests|  25 --
+ testcases/commands/cron/cron02  |  80 
+ testcases/commands/cron/cron03  |  83 
+ testcases/commands/cron/cron_allow01| 202 --
+ testcases/commands/cron/cron_deny01 | 192 --
+ testcases/commands/cron/cron_dirs_check.c   |  44 ---
+ testcases/commands/cron/cron_dirs_checks01  |  46 ---
+ testcases/commands/cron/cron_illegal_cron_lines |  39 --
+ testcases/commands/cron/cron_neg_tests.sh   | 141 ---
+ testcases/commands/cron/cron_pos_tests.sh   | 118 --
+ testcases/commands/cron/cron_tests.sh   | 276 --
+ testcases/commands/su/Makefile  |  31 --
+ testcases/commands/su/su01  | 181 -
+ testcases/commands/su/su01_s1   | 486 
+ testcases/commands/su/su_set_passwd |  14 -
+ testcases/kernel/fs/acls/.gitignore |   2 -
+ testcases/kernel/fs/acls/Makefile   |  40 --
+ testcases/kernel/fs/acls/acl_file_test.c|  73 
+ testcases/kernel/fs/acls/acl_link_test.c|  56 ---
+ testcases/kernel/fs/acls/acl_test01 | 186 -
+ 29 files changed, 2774 deletions(-)
+ delete mode 100644 runtest/admin_tools
+ delete mode 100644 testcases/commands/at/Makefile
+ delete mode 100755 testcases/commands/at/at_allow01
+ delete mode 100755 testcases/commands/at/at_deny01
+ delete mode 100644 testcases/commands/cron/00_Descriptions.txt
+ delete mode 100644 testcases/commands/cron/Makefile
+ delete mode 100644 testcases/commands/cron/README.tests
+ delete mode 100755 testcases/commands/cron/cron02
+ delete mode 100755 testcases/commands/cron/cron03
+ delete mode 100755 testcases/commands/cron/cron_allow01
+ delete mode 100755 testcases/commands/cron/cron_deny01
+ delete mode 100644 testcases/commands/cron/cron_dirs_check.c
+ delete mode 100755 testcases/commands/cron/cron_dirs_checks01
+ delete mode 100644 testcases/commands/cron/cron_illegal_cron_lines
+ delete mode 100755 testcases/commands/cron/cron_neg_tests.sh
+ delete mode 100755 testcases/commands/cron/cron_pos_tests.sh
+ delete mode 100644 testcases/commands/cron/cron_tests.sh
+ delete mode 100644 testcases/commands/su/Makefile
+ delete mode 100755 testcases/commands/su/su01
+ delete mode 100755 testcases/commands/su/su01_s1
+ delete mode 100755 testcases/commands/su/su_set_passwd
+ delete mode 100644 testcases/kernel/fs/acls/.gitignore
+ delete mode 100644 testcases/kernel/fs/acls/Makefile
+ delete mode 100644 testcases/kernel/fs/acls/acl_file_test.c
+ delete mode 100644 testcases/kernel/fs/acls/acl_link_test.c
+ delete mode 100755 testcases/kernel/fs/acls/acl_test01
+
+diff --git a/runtest/admin_tools b/runtest/admin_tools
+deleted file mode 100644
+index 0a46468c8..0
+--- 

Re: [OE-core] Suggest removing classes/siteconfig.bbclass

2019-01-14 Thread Robert Yang



On 1/12/19 9:34 AM, Khem Raj wrote:



On Wed, Jan 9, 2019 at 11:17 PM Robert Yang > wrote:


Hi,

I reimplemented glibc's site config and did a lot of tests recently, 
finally,
I found that it isn't as useful as I had thought, so I'm leaning to remove
classes/siteconfig.bbclass.

* Here are the test results of with/without glibc's siteconfig:
$ bitbake recipe -cconfigure && bitbake recipe -ccleansstate && time bitbake
recipe -cconfigure
- gettext:
      without: 2m38.382s
      with:    2m33.099s

- coreutils:
      without: 1m19.967s
      with:    1m13.574s

- bison:
      without: 0m56.203s
      with:    0m50.134s

These 3 recipes' do_configure are very time consuming, we can see that it 
saves
about 6s for bison/coreutils/gettext's do_configure, but they need depend on
glibc's site config recipe (glibc-site.bb ), while
glibc-site requires about 30s
to build, so if we count glibc-site's 30s, it seems not worth. And I also 
tested
again and again on core-image-minimal and core-image-sato with/without 
glibc's
siteconfig, there is nearly no difference, about 30s in 30m (1.6%)'s
differences, this maybe because of host rather than siteconfig. So I think 
that
we can remove classes/siteconfig.bbclass since it is not as useful as 
expected.

I've also tested remove siteconfig.bbclass (zlib and ncurses use it), there 
is
no difference when "time bitbake core-image-minimal".

The new implementation for glibc's site config is:
- Add a recipe called glibc-site_2.28.bb , find
out the top 100 used functions
    and headers, and add them to site_config/funcs and site_config/headers.
Please
    see patches' commit message on how to find out the top 100.

- Make target/nativesdk recipes depend on glibc-site when inherit
autotools.bbclass

Here are the 2 patches:
    git://git.openembedded.org/openembedded-core-contrib
 rbt/glibc-site
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/glibc-site


Please feel free to give your comments, and I will remove it if no 
objections.


I think if we cache all values then It probably will be faster but partial 


Cache more values would make glibc-site requires more time to build, and all
autotools recipes depend on glibc-site, so I think that it's not worth to cache
more, so I chose top 100 (the ones which are re-used more than about 20 times)
to cache in a world build.

caching will give results like you see what will be interring to see is world 
build time differences when doing build from scratch

But it indeed sounds a over optimization


I didn't test world's build time since it requires a lot of time, but refer to
core-image-minimal and sato, I think that there is no difference with world
build since we're doing parallel build, and the recipes which require a lot of
time to configure are already covered by sato build (such as gettext, coreutils
and bison).

// Robert




-- 
Thanks


Robert
-- 
___

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

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


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


Re: [OE-core] [PATCH V3 03/11] ccache.bbclass: Refactor it to make it more reliable

2019-01-14 Thread Robert Yang

Hi Randy,

I'm sorry for the types, and thanks for the correction. I found that it has
been merged, I will be more careful.

// Robert

On 1/12/19 4:49 AM, Randy MacLeod wrote:

A couple of typos and grammar improvements, otherwise a good
improvement for iterative development of a package/image where
sstate isn't useful.

On 12/18/18 2:18 AM, Robert Yang wrote:

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

- native/nativesdk/cross/crosssdk recipes use host's ccahe, but target uses

* host's ccache

   ccache-native, this may confuse user.

- The target recipes may use both host's ccache and ccache-native, this may
   cause unexpected problems and hard to debug. This is because ccache-native is

* and be hard to debug

   in SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS, so ccache-native may not be present when
   rebuild target recipes, and then it would use hosttools/ccache, but the
   previous ccache files were generated by ccache-native.

- Target recipes can't use ccache when no ccahe is installed on the host:

* no ccache


   CCACHE = "${@bb.utils.which(d.getVar('PATH'), 'ccache') and 'ccache '}"

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

And now we need use "CCACHE_DISABLE = '1'" to disable ccahe for the recipe

* disable ccache

../Randy



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

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

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

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

  # Link to these if present
-HOSTTOOLS_NONFATAL += "aws ccache gcc-ar gpg ld.bfd ld.gold nc pigz sftp 
socat ssh sudo"
+HOSTTOOLS_NONFATAL += "aws gcc-ar gpg ld.bfd ld.gold nc pigz sftp socat ssh 
sudo"

  # Temporary add few more detected in bitbake world
  HOSTTOOLS_NONFATAL += "join nl size yes zcat"
@@ -504,10 +504,6 @@ HOSTTOOLS_NONFATAL += "bzr"
  HOSTTOOLS_NONFATAL += "scp"
  CCACHE ??= ""
-# ccache < 3.1.10 will create CCACHE_DIR on startup even if disabled, and
-# autogen sets HOME=/dev/null so in certain situations builds can fail.
-# Explicitly export CCACHE_DIR until we can assume ccache >3.1.10 on the host.
-export CCACHE_DIR ??= "${@os.getenv('HOME')}/.ccache"
  TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index c67dec4..4141d6c 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -49,7 +49,6 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
    *->quilt-native \
    *->subversion-native \
    *->git-native \
-  

[OE-core] [PATCH] tune-cortexa5.inc: Add tune options for vfpv4

2019-01-14 Thread Khem Raj
Signed-off-by: Khem Raj 
---
 meta/conf/machine/include/tune-cortexa5.inc | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/meta/conf/machine/include/tune-cortexa5.inc 
b/meta/conf/machine/include/tune-cortexa5.inc
index 1f0cda6640..e9eddb407f 100644
--- a/meta/conf/machine/include/tune-cortexa5.inc
+++ b/meta/conf/machine/include/tune-cortexa5.inc
@@ -6,31 +6,43 @@ TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor 
optimizations"
 TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' 
-mcpu=cortex-a5', '', d)}"
 
 # Little Endian base configs
-AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon"
+AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon 
cortexa5-neon-vfpv4 cortexa5t-neon-vfpv4"
 ARMPKGARCH_tune-cortexa5 = "cortexa5"
 ARMPKGARCH_tune-cortexa5t= "cortexa5"
 ARMPKGARCH_tune-cortexa5-neon= "cortexa5"
 ARMPKGARCH_tune-cortexa5t-neon   = "cortexa5"
+ARMPKGARCH_tune-cortexa5-neon-vfpv4  = "cortexa5"
+ARMPKGARCH_tune-cortexa5t-neon-vfpv4 = "cortexa5"
 TUNE_FEATURES_tune-cortexa5 = "${TUNE_FEATURES_tune-armv7a} 
cortexa5"
 TUNE_FEATURES_tune-cortexa5t= "${TUNE_FEATURES_tune-armv7at} 
cortexa5"
 TUNE_FEATURES_tune-cortexa5-neon= "${TUNE_FEATURES_tune-armv7a-neon} 
cortexa5"
 TUNE_FEATURES_tune-cortexa5t-neon   = "${TUNE_FEATURES_tune-armv7at-neon} 
cortexa5"
+TUNE_FEATURES_tune-cortexa5-neon-vfpv4  = 
"${TUNE_FEATURES_tune-armv7a-neon-vfpv4} cortexa5"
+TUNE_FEATURES_tune-cortexa5t-neon-vfpv4 = 
"${TUNE_FEATURES_tune-armv7at-neon-vfpv4} cortexa5"
 PACKAGE_EXTRA_ARCHS_tune-cortexa5 = 
"${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa5-vfp"
 PACKAGE_EXTRA_ARCHS_tune-cortexa5t= 
"${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa5-vfp cortexa5t2-vfp"
 PACKAGE_EXTRA_ARCHS_tune-cortexa5-neon= 
"${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa5-vfp cortexa5-neon"
 PACKAGE_EXTRA_ARCHS_tune-cortexa5t-neon   = 
"${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa5-vfp cortexa5-neon 
cortexa5t2-vfp cortexa5t2-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5-neon-vfpv4  = 
"${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon-vfpv4} cortexa5-vfp cortexa5-neon 
cortexa5-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5t-neon-vfpv4 = 
"${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon-vfpv4} cortexa5-vfp cortexa5-neon 
cortexa5-neon-vfpv4 cortexa5t2-vfp cortexa5t2-neon cortexa5t2-neon-vfpv4"
 
 # HF Tunes
-AVAILTUNES += "cortexa5hf cortexa5thf cortexa5hf-neon cortexa5thf-neon"
+AVAILTUNES += "cortexa5hf cortexa5thf cortexa5hf-neon cortexa5thf-neon 
cortexa5hf-neon-vfpv4 cortexa5thf-neon-vfpv4"
 ARMPKGARCH_tune-cortexa5hf = "cortexa5"
 ARMPKGARCH_tune-cortexa5thf= "cortexa5"
 ARMPKGARCH_tune-cortexa5hf-neon= "cortexa5"
 ARMPKGARCH_tune-cortexa5thf-neon   = "cortexa5"
+ARMPKGARCH_tune-cortexa5hf-neon-vfpv4  = "cortexa5"
+ARMPKGARCH_tune-cortexa5thf-neon-vfpv4 = "cortexa5"
 TUNE_FEATURES_tune-cortexa5hf = "${TUNE_FEATURES_tune-armv7ahf} 
cortexa5"
 TUNE_FEATURES_tune-cortexa5thf= "${TUNE_FEATURES_tune-armv7athf} 
cortexa5"
 TUNE_FEATURES_tune-cortexa5hf-neon= 
"${TUNE_FEATURES_tune-armv7ahf-neon} cortexa5"
 TUNE_FEATURES_tune-cortexa5thf-neon   = 
"${TUNE_FEATURES_tune-armv7athf-neon} cortexa5"
+TUNE_FEATURES_tune-cortexa5hf-neon-vfpv4  = 
"${TUNE_FEATURES_tune-armv7ahf-neon-vfpv4} cortexa5"
+TUNE_FEATURES_tune-cortexa5thf-neon-vfpv4 = 
"${TUNE_FEATURES_tune-armv7athf-neon-vfpv4} cortexa5"
 PACKAGE_EXTRA_ARCHS_tune-cortexa5hf = 
"${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa5hf-vfp"
 PACKAGE_EXTRA_ARCHS_tune-cortexa5thf= 
"${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa5hf-vfp cortexa5t2hf-vfp"
 PACKAGE_EXTRA_ARCHS_tune-cortexa5hf-neon= 
"${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa5hf-vfp cortexa5hf-neon"
 PACKAGE_EXTRA_ARCHS_tune-cortexa5thf-neon   = 
"${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa5hf-vfp cortexa5hf-neon 
cortexa5t2hf-vfp cortexa5t2hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5hf-neon-vfpv4  = 
"${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon-vfpv4} cortexa5hf-vfp cortexa5hf-neon 
cortexa5hf-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5thf-neon-vfpv4 = 
"${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon-vfpv4} cortexa5hf-vfp 
cortexa5hf-neon cortexa5hf-neon-vfpv4 cortexa5t2hf-vfp cortexa5t2hf-neon 
cortexa5t2hf-neon-vfpv4"
-- 
2.20.1

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


Re: [OE-core] [PATCH 1/2] systemd: Correct and clean up user/group definitions

2019-01-14 Thread Peter Kjellerstedt
> -Original Message-
> From: openembedded-core-boun...@lists.openembedded.org  core-boun...@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> Sent: den 15 januari 2019 01:49
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 1/2] systemd: Correct and clean up user/group
> definitions
> 
> This makes sure that packages are only added to USERADD_PACKAGES if
> they will create users/groups. This avoids the following error:
> 
>   ERROR: systemd_239.bb: meta/recipes-core/systemd/systemd_239.bb
>   inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or
>   GROUPMEMS_PARAM for package systemd-journal-gateway
> 
> Normally this problem is not triggered even if the conditional code
> that
> expands in, e.g., USERADD_PARAM_${PN}-journal-gateway is empty because
> it is assigned with += and thus ends up as " ", which fools the check
> in
> useradd.bbclass.
> 
> However, if USERADDEXTENSION += "useradd-staticids" and
> INHERIT += "extrausers" are used, they cause the problem to occur. The
> reason for this is because when useradd-staticids is used, it rewrites
> USERADD_PARAM_${PN}-journal-gateway, which strips unnecessary
> whitespace
> and thus USERADD_PARAM_${PN}-journal-gateway becomes empty. And
> extrausers is needed, because otherwise the test in useradd.bbclass is
> triggered before useradd-staticids has rewritten the variables...
> 
> Signed-off-by: Peter Kjellerstedt 
> ---
>  meta/recipes-core/systemd/systemd_239.bb | 22 +-
>  1 file changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/meta/recipes-core/systemd/systemd_239.bb b/meta/recipes-
> core/systemd/systemd_239.bb
> index be836ffa42..aa05af3beb 100644
> --- a/meta/recipes-core/systemd/systemd_239.bb
> +++ b/meta/recipes-core/systemd/systemd_239.bb
> @@ -343,17 +343,21 @@ SYSTEMD_PACKAGES =
> "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfm
>  "
>  SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
> 
> -USERADD_PACKAGES = "${PN} ${PN}-extra-utils ${PN}-journal-gateway
> ${PN}-journal-upload ${PN}-journal-remote"
> -USERADD_PARAM_${PN}-journal-gateway +=
> "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M
> --shell /bin/nologin systemd-journal-gateway;', '', d)}"
> -USERADD_PARAM_${PN}-journal-remote +=
> "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M
> --shell /bin/nologin systemd-journal-remote;', '', d)}"
> -USERADD_PARAM_${PN}-journal-upload +=
> "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d /
> -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
> -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
> 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;',
> '', d)}"
> -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
> 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;',
> '', d)}"
> +USERADD_PACKAGES = "${PN} ${PN}-extra-utils \
> +${@bb.utils.contains('PACKAGECONFIG',
> 'microhttpd', '${PN}-journal-gateway', '', d)} \
> +${@bb.utils.contains('PACKAGECONFIG',
> 'microhttpd', '${PN}-journal-remote', '', d)} \
> +${@bb.utils.contains('PACKAGECONFIG', 'journal-
> upload', '${PN}-journal-upload', '', d)} \
> +"
> +GROUPADD_PARAM_${PN} = "-r systemd-journal"
>  USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
> 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;',
> '', d)}"
> -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
> 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;',
> '', d)}"
> +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
> 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;',
> '', d)}"
>  USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
> 'polkit', '--system --no-create-home --user-group --home-dir
> ${sysconfdir}/polkit-1 polkitd;', '', d)}"
> -GROUPADD_PARAM_${PN} = "-r systemd-journal"
> -USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell
> /bin/nologin systemd-bus-proxy;"
> +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
> 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;',
> '', d)}"
> +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
> 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;',
> '', d)}"
> +USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell
> /bin/nologin systemd-bus-proxy"
> +USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell
> /bin/nologin systemd-journal-gateway"
> +USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell
> /bin/nologin systemd-journal-remote"
> +USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell
> /bin/nologin systemd-journal-upload"
> 
>  FILES_${PN}-analyze = "${bindir}/systemd-analyze"
> 
> --
> 2.12.0

This also needs to be cherry-picked to Thud once it has been accepted for 
master. I 

[OE-core] [PATCH 1/2] systemd: Correct and clean up user/group definitions

2019-01-14 Thread Peter Kjellerstedt
This makes sure that packages are only added to USERADD_PACKAGES if
they will create users/groups. This avoids the following error:

  ERROR: systemd_239.bb: meta/recipes-core/systemd/systemd_239.bb
  inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or
  GROUPMEMS_PARAM for package systemd-journal-gateway

Normally this problem is not triggered even if the conditional code that
expands in, e.g., USERADD_PARAM_${PN}-journal-gateway is empty because
it is assigned with += and thus ends up as " ", which fools the check in
useradd.bbclass.

However, if USERADDEXTENSION += "useradd-staticids" and
INHERIT += "extrausers" are used, they cause the problem to occur. The
reason for this is because when useradd-staticids is used, it rewrites
USERADD_PARAM_${PN}-journal-gateway, which strips unnecessary whitespace
and thus USERADD_PARAM_${PN}-journal-gateway becomes empty. And
extrausers is needed, because otherwise the test in useradd.bbclass is
triggered before useradd-staticids has rewritten the variables...

Signed-off-by: Peter Kjellerstedt 
---
 meta/recipes-core/systemd/systemd_239.bb | 22 +-
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_239.bb 
b/meta/recipes-core/systemd/systemd_239.bb
index be836ffa42..aa05af3beb 100644
--- a/meta/recipes-core/systemd/systemd_239.bb
+++ b/meta/recipes-core/systemd/systemd_239.bb
@@ -343,17 +343,21 @@ SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 
'binfmt', '${PN}-binfm
 "
 SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
 
-USERADD_PACKAGES = "${PN} ${PN}-extra-utils ${PN}-journal-gateway 
${PN}-journal-upload ${PN}-journal-remote"
-USERADD_PARAM_${PN}-journal-gateway += "${@bb.utils.contains('PACKAGECONFIG', 
'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', 
'', d)}"
-USERADD_PARAM_${PN}-journal-remote += "${@bb.utils.contains('PACKAGECONFIG', 
'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', 
'', d)}"
-USERADD_PARAM_${PN}-journal-upload += "${@bb.utils.contains('PACKAGECONFIG', 
'journal-upload', '--system -d / -M --shell /bin/nologin 
systemd-journal-upload;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', 
'--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', 
'--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
+USERADD_PACKAGES = "${PN} ${PN}-extra-utils \
+${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', 
'${PN}-journal-gateway', '', d)} \
+${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', 
'${PN}-journal-remote', '', d)} \
+${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', 
'${PN}-journal-upload', '', d)} \
+"
+GROUPADD_PARAM_${PN} = "-r systemd-journal"
 USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', 
'--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', 
'--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', 
'--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
 USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', 
'--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 
polkitd;', '', d)}"
-GROUPADD_PARAM_${PN} = "-r systemd-journal"
-USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin 
systemd-bus-proxy;"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', 
'--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', 
'--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
+USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /bin/nologin 
systemd-bus-proxy"
+USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /bin/nologin 
systemd-journal-gateway"
+USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /bin/nologin 
systemd-journal-remote"
+USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /bin/nologin 
systemd-journal-upload"
 
 FILES_${PN}-analyze = "${bindir}/systemd-analyze"
 
-- 
2.12.0

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


[OE-core] [PATCH 2/2] systemd: Correct a conditional add to SYSTEMD_PACKAGES

2019-01-14 Thread Peter Kjellerstedt
The code conditionally adding ${PN}-journal-remote to SYSTEMD_PACKAGE
checked PACKAGECONFIG for an empty string rather than 'microhttpd'...

Signed-off-by: Peter Kjellerstedt 
---
 meta/recipes-core/systemd/systemd_239.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_239.bb 
b/meta/recipes-core/systemd/systemd_239.bb
index aa05af3beb..832257992d 100644
--- a/meta/recipes-core/systemd/systemd_239.bb
+++ b/meta/recipes-core/systemd/systemd_239.bb
@@ -338,8 +338,8 @@ DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote 
is a command to recei
 
 SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', 
'${PN}-binfmt', '', d)} \
 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', 
'${PN}-journal-gatewayd', '', d)} \
+${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', 
'${PN}-journal-remote', '', d)} \
 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', 
'${PN}-journal-upload', '', d)} \
-${@bb.utils.contains('PACKAGECONFIG', '', 
'${PN}-journal-remote', '', d)} \
 "
 SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
 
-- 
2.12.0

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


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

2019-01-14 Thread Rasmus Villemoes
ping ping

On 29/12/2018 01.06, Rasmus Villemoes wrote:
> image_types_wic.bbclass has a mechanism for doing variable substitution
> on .wks files by simply letting the input file be called
> .wks.in. However, that doesn't allow using variables in files included
> via the include directive. This is unfortunate, because lacking either
> the ability to include other files or variable substitution leads to
> fragile and error-prone duplication between kickstarter files and
> recipes/configuration files used for various boards.
> 
> This adds (somewhat naive) support for variable substitution in all
> files parsed by wic. The user should add all required variables to
> WICVARS to get them exported appropriately.
> 
> Signed-off-by: Rasmus Villemoes 
> ---
> scripts/lib/wic/ksparser.py | 17 +
>  1 file changed, 17 insertions(+)
> 
> diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
> index 7e5a9c5092..08baf76123 100644
> --- a/scripts/lib/wic/ksparser.py
> +++ b/scripts/lib/wic/ksparser.py
> @@ -28,14 +28,30 @@
>  import os
>  import shlex
>  import logging
> +import re
>  
>  from argparse import ArgumentParser, ArgumentError, ArgumentTypeError
>  
>  from wic.engine import find_canned
>  from wic.partition import Partition
> +from wic.misc import get_bitbake_var
>  
>  logger = logging.getLogger('wic')
>  
> +__expand_var_regexp__ = re.compile(r"\${[^{}@\n\t :]+}")
> +
> +def expand_line(line):
> +while True:
> +m = __expand_var_regexp__.search(line)
> +if not m:
> +return line
> +key = m.group()[2:-1]
> +val = get_bitbake_var(key)
> +if val is None:
> +logger.warning("cannot expand variable %s" % key)
> +return line
> +line = line[:m.start()] + val + line[m.end():]
> +
>  class KickStartError(Exception):
>  """Custom exception."""
>  pass
> @@ -190,6 +206,7 @@ class KickStart():
>  line = line.strip()
>  lineno += 1
>  if line and line[0] != '#':
> +line = expand_line(line)
>  try:
>  line_args = shlex.split(line)
>  parsed = parser.parse_args(line_args)
> 


-- 
Rasmus Villemoes
Software Developer
Prevas A/S
Hedeager 3
DK-8200 Aarhus N
+45 51210274
rasmus.villem...@prevas.dk
www.prevas.dk
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/2 v2] meta: Fix Deprecated warnings from regexs

2019-01-14 Thread Richard Purdie
On Mon, 2019-01-14 at 23:04 +, Richard Purdie wrote:
> Fix handling of escape characters in regexs and hence fix python
> Deprecation warnings which will be problematic in python 3.8.
> 
> Note that some show up as:
> 
> """
> meta/classes/package.bbclass:1293: DeprecationWarning: invalid escape
> sequence \.  
> 
> """
> 
> where the problem isn't on 1293 in package.bbclass but in some
> _prepend to a
> package.bbclass function in a different file like mesa.inc, often
> from
> do_package_split() calls.

meta-oe and other layers are likely going to need this kind of cleanup
at some point.

A tip when trying to debug this is to remove the cache, tmp/cache and
all __pycache__ directories so that you force everything to get re-
parsed when debugging/fixing them.

Cheers,

Richard



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


Re: [OE-core] [PATCH 2/2] meta: Fix python code quoting issues

2019-01-14 Thread Richard Purdie
On Mon, 2019-01-14 at 23:06 +, Burton, Ross wrote:
> On Mon, 14 Jan 2019 at 23:04, Richard Purdie <
> richard.pur...@linuxfoundation.org> wrote:
> > -oe_terminal("${SHELL} -c \"make %s; if [ \$? -ne 0 ]; then
> > echo 'Command failed.'; printf 'Press any key to continue... ';
> > read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
> > +oe_terminal("${SHELL} -c \"make %s; if [ \\$? -ne 0 ]; then
> > echo 'Command failed.'; printf 'Press any key to continue... ';
> > read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
> 
> Would it be neater to use r"" here?

Yes, but it doesn't show what the problem is as clearly. We should
probably clean it up as a follow up.

Cheers,

Richard

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


Re: [OE-core] [PATCH 2/2] meta: Fix python code quoting issues

2019-01-14 Thread Burton, Ross
On Mon, 14 Jan 2019 at 23:04, Richard Purdie <
richard.pur...@linuxfoundation.org> wrote:

> -oe_terminal("${SHELL} -c \"make %s; if [ \$? -ne 0 ]; then echo
> 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" %
> d.getVar('KCONFIG_CONFIG_COMMAND'),
> +oe_terminal("${SHELL} -c \"make %s; if [ \\$? -ne 0 ]; then echo
> 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" %
> d.getVar('KCONFIG_CONFIG_COMMAND'),
>

Would it be neater to use r"" here?

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


[OE-core] [PATCH 1/2 v2] meta: Fix Deprecated warnings from regexs

2019-01-14 Thread Richard Purdie
Fix handling of escape characters in regexs and hence fix python
Deprecation warnings which will be problematic in python 3.8.

Note that some show up as:

"""
meta/classes/package.bbclass:1293: DeprecationWarning: invalid escape sequence 
\.  

"""

where the problem isn't on 1293 in package.bbclass but in some _prepend to a
package.bbclass function in a different file like mesa.inc, often from
do_package_split() calls.

Signed-off-by: Richard Purdie 
---
 meta/classes/debian.bbclass   |  6 ++---
 meta/classes/gconf.bbclass|  2 +-
 meta/classes/kernel-module-split.bbclass  |  2 +-
 meta/classes/kernel.bbclass   |  2 +-
 meta/classes/libc-package.bbclass | 26 +--
 meta/classes/package.bbclass  | 22 
 meta/lib/oe/license.py|  8 +++---
 meta/lib/oe/package.py|  2 +-
 meta/lib/oe/package_manager.py| 24 -
 meta/lib/oe/patch.py  |  4 +--
 meta/lib/oe/rootfs.py | 16 ++--
 meta/lib/oe/utils.py  |  4 +--
 meta/recipes-connectivity/connman/connman.inc |  4 +--
 meta/recipes-core/ncurses/ncurses.inc |  4 +--
 meta/recipes-core/util-linux/util-linux.inc   |  2 +-
 meta/recipes-devtools/llvm/llvm_git.bb| 20 +++---
 meta/recipes-devtools/orc/orc_0.4.28.bb   |  2 +-
 .../perl-sanity/perl-ptest.inc|  2 +-
 .../perl-sanity/perl_5.28.1.bb| 12 -
 .../iptables/iptables_1.6.2.bb|  2 +-
 .../lighttpd/lighttpd_1.4.52.bb   |  2 +-
 meta/recipes-extended/pam/libpam_1.3.0.bb |  4 +--
 .../gdk-pixbuf/gdk-pixbuf_2.36.11.bb  |  2 +-
 meta/recipes-gnome/gtk+/gtk+3.inc |  4 +--
 meta/recipes-gnome/gtk+/gtk+_2.24.32.bb   |  4 +--
 meta/recipes-graphics/mesa/mesa.inc   |  4 +--
 .../xorg-lib/libxcb_1.13.1.bb |  2 +-
 .../alsa/alsa-plugins_1.1.6.bb|  2 +-
 .../gstreamer/gst-plugins-package.inc | 10 +++
 .../pulseaudio/pulseaudio.inc |  4 +--
 30 files changed, 102 insertions(+), 102 deletions(-)

diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index 989ea8f8d28..6f8a599ccb6 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -29,11 +29,11 @@ python debian_package_name_hook () {
 
 pkgdest = d.getVar("PKGDEST")
 packages = d.getVar('PACKAGES')
-so_re = re.compile("lib.*\.so")
+so_re = re.compile(r"lib.*\.so")
 
 def socrunch(s):
 s = s.lower().replace('_', '-')
-m = re.match("^(.*)(.)\.so\.(.*)$", s)
+m = re.match(r"^(.*)(.)\.so\.(.*)$", s)
 if m is None:
 return None
 if m.group(2) in '0123456789':
@@ -79,7 +79,7 @@ python debian_package_name_hook () {
 try:
 cmd = [d.expand("${TARGET_PREFIX}objdump"), "-p", f]
 output = subprocess.check_output(cmd).decode("utf-8")
-for m in re.finditer("\s+SONAME\s+([^\s]+)", output):
+for m in re.finditer(r"\s+SONAME\s+([^\s]+)", output):
 if m.group(1) not in sonames:
 sonames.append(m.group(1))
 except subprocess.CalledProcessError:
diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass
index 4e0ee2e7d59..3e3c509d5ff 100644
--- a/meta/classes/gconf.bbclass
+++ b/meta/classes/gconf.bbclass
@@ -49,7 +49,7 @@ python populate_packages_append () {
 for pkg in packages:
 schema_dir = '%s/%s/etc/gconf/schemas' % (pkgdest, pkg)
 schemas = []
-schema_re = re.compile(".*\.schemas$")
+schema_re = re.compile(r".*\.schemas$")
 if os.path.exists(schema_dir):
 for f in os.listdir(schema_dir):
 if schema_re.match(f):
diff --git a/meta/classes/kernel-module-split.bbclass 
b/meta/classes/kernel-module-split.bbclass
index e8996cf59ba..e8d3eb51057 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -133,7 +133,7 @@ python split_kernel_module_packages () {
 kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel"
 kernel_version = d.getVar("KERNEL_VERSION")
 
-module_regex = '^(.*)\.k?o$'
+module_regex = r'^(.*)\.k?o$'
 
 module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
 module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX')
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 45cb4fabc18..c0889bd3ee4 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -578,7 +578,7 @@ pkg_postinst_${KERNEL_PACKAGE_NAME}-base () {
 PACKAGESPLITFUNCS_prepend = "split_kernel_packages "
 
 python split_kernel_packages () {
-

[OE-core] [PATCH 2/2] meta: Fix python code quoting issues

2019-01-14 Thread Richard Purdie
python 3.8 will be stricter about python quoting. Fix up several misquoted
expressions and fix Deprecation warnings like:

Var :1: DeprecationWarning: invalid escape sequence \$

Signed-off-by: Richard Purdie 
---
 meta/classes/cml1.bbclass   | 2 +-
 meta/classes/gtk-doc.bbclass| 2 +-
 meta/classes/populate_sdk_base.bbclass  | 2 +-
 .../gobject-introspection/gobject-introspection_1.58.2.bb   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index 926747f2ba6..7f6df4011bc 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -26,7 +26,7 @@ python do_menuconfig() {
 except OSError:
 mtime = 0
 
-oe_terminal("${SHELL} -c \"make %s; if [ \$? -ne 0 ]; then echo 'Command 
failed.'; printf 'Press any key to continue... '; read r; fi\"" % 
d.getVar('KCONFIG_CONFIG_COMMAND'),
+oe_terminal("${SHELL} -c \"make %s; if [ \\$? -ne 0 ]; then echo 'Command 
failed.'; printf 'Press any key to continue... '; read r; fi\"" % 
d.getVar('KCONFIG_CONFIG_COMMAND'),
 d.getVar('PN') + ' Configuration', d)
 
 # FIXME this check can be removed when the minimum bitbake version has 
been bumped
diff --git a/meta/classes/gtk-doc.bbclass b/meta/classes/gtk-doc.bbclass
index b4f6754906a..bedb36ec8b7 100644
--- a/meta/classes/gtk-doc.bbclass
+++ b/meta/classes/gtk-doc.bbclass
@@ -41,7 +41,7 @@ do_compile_prepend_class-target () {
 if [ ${GTKDOC_ENABLED} = True ]; then
 # Write out a qemu wrapper that will be given to gtkdoc-scangobj so 
that it
 # can run target helper binaries through that.
-qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', 
['\$GIR_EXTRA_LIBS_PATH','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
+qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', 
['\\$GIR_EXTRA_LIBS_PATH','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
 cat > ${B}/gtkdoc-qemuwrapper << EOF
 #!/bin/sh
 # Use a modules directory which doesn't exist so we don't load random things
diff --git a/meta/classes/populate_sdk_base.bbclass 
b/meta/classes/populate_sdk_base.bbclass
index 677ba3cf12f..a4afc61c465 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -257,7 +257,7 @@ EOF
-e 's#@SDKEXTPATH@#${SDKEXTPATH}#g' \
-e 's#@OLDEST_KERNEL@#${SDK_OLDEST_KERNEL}#g' \
-e 
's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \
-   -e 's#@SDK_TITLE@#${@d.getVar("SDK_TITLE").replace('&', 
'\&')}#g' \
+   -e 's#@SDK_TITLE@#${@d.getVar("SDK_TITLE").replace('&', 
'\\&')}#g' \
-e 's#@SDK_VERSION@#${SDK_VERSION}#g' \
-e '/@SDK_PRE_INSTALL_COMMAND@/d' \
-e '/@SDK_POST_INSTALL_COMMAND@/d' \
diff --git 
a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.58.2.bb 
b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.58.2.bb
index 242899accc4..d00f3bd3441 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.58.2.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.58.2.bb
@@ -76,7 +76,7 @@ do_configure_prepend_class-native() {
 do_configure_prepend_class-target() {
 # Write out a qemu wrapper that will be given to gi-scanner so that it
 # can run target helper binaries through that.
-qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', 
['\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
+qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', 
['\\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
 cat > ${B}/g-ir-scanner-qemuwrapper << EOF
 #!/bin/sh
 # Use a modules directory which doesn't exist so we don't load random things
-- 
2.19.1

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


[OE-core] [OE-Core][PATCH] openssl: move c_rehash pkg to avoid perl dep

2019-01-14 Thread Brad Bishop
Perl and its dependencies have a decent footprint impact.  On my
xz compressed filesystem:

634880: /usr/lib/libperl.so.5.24.4

Put c_rehash in the openssl-misc package so the dependency can be
avoided where it isn't needed.

Change-Id: Iae9bccabfb1c8cfa1401ca6785abc39713d3fdf0
Signed-off-by: Brad Bishop 
---
 meta/recipes-connectivity/openssl/openssl_1.1.1a.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb 
b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
index 5c4e69cfb7..7d26654921 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
@@ -190,14 +190,13 @@ FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}"
 FILES_libssl = "${libdir}/libssl${SOLIBS}"
 FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
 FILES_${PN}-engines = "${libdir}/engines-1.1"
-FILES_${PN}-misc = "${libdir}/ssl-1.1/misc"
+FILES_${PN}-misc = "${libdir}/ssl-1.1/misc ${bindir}/c_rehash"
 FILES_${PN} =+ "${libdir}/ssl-1.1/*"
 FILES_${PN}_append_class-nativesdk = " 
${SDKPATHNATIVE}/environment-setup.d/openssl.sh"
 
 CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
 
 RRECOMMENDS_libcrypto += "openssl-conf"
-RDEPENDS_${PN}-bin = "perl"
 RDEPENDS_${PN}-misc = "perl"
 RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash python"
 
-- 
2.20.1
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] webkitgtk: Enable building for ARC architecture

2019-01-14 Thread Khem Raj
On Mon, Jan 14, 2019 at 12:45 PM Alexey Brodkin
 wrote:
>
> Hi Khem,
>
> > -Original Message-
> > From: Khem Raj [mailto:raj.k...@gmail.com]
> > Sent: Friday, January 11, 2019 6:32 PM
> > To: Alexey Brodkin 
> > Cc: Patches and discussions about the oe-core layer 
> > ;
> > Richard Purdie ; Ross Burton 
> > ; linux-snps-
> > a...@lists.infradead.org; Alexander Kanavin ; 
> > Hongxu Jia
> > 
> > Subject: Re: [PATCH] webkitgtk: Enable building for ARC architecture
> >
> > On Fri, Jan 11, 2019 at 4:50 AM Alexey Brodkin
> >  wrote:
> > >
> > > For that we need 2 things:
> > >  1. Disable JIT in JS as it's not supported for ARC.
> > >
> > >  2. Compile with "-mlong-calls" so relocations with
> > > offsets larger than 25 bits are used, otherwise
> > > linker fails to link final binaries.
> > >
> > > Signed-off-by: Alexey Brodkin 
> > > Cc: Alexander Kanavin 
> > > Cc: Hongxu Jia 
> > > ---
> > >  meta/recipes-sato/webkit/webkitgtk_2.22.5.bb | 7 +++
> > >  1 file changed, 7 insertions(+)
> > >
> > > diff --git a/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb b/meta/recipes-
> > sato/webkit/webkitgtk_2.22.5.bb
> > > index fc56822f7a..56f69c7a30 100644
> > > --- a/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
> > > +++ b/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
> > > @@ -69,6 +69,13 @@ EXTRA_OECMAKE = " \
> > >  EXTRA_OECMAKE_append_x86 = " -DUSE_GSTREAMER_GL=OFF "
> > >  EXTRA_OECMAKE_append_x86-x32 = " -DUSE_GSTREAMER_GL=OFF "
> > >
> > > +# Javascript JIT is not supported on ARC
> > > +EXTRA_OECMAKE_append_arc = " -DENABLE_JIT=OFF "
> > > +# By default 25-bit "medium" calls are used on ARC
> > > +# which is not enough for binaries larger than 32 MiB
> > > +CFLAGS_append_arc = " -mlong-calls"
> > > +CXXFLAGS_append_arc = " -mlong-calls"
> >
> > perhaps adding to CPPFLAGS is going to be enough for both c/c++ cases
>
> Just tried that (only CPPFLAGS_append_arc = " -mlong-calls") and
> I don't see "-mlong-calls" used during compilation at all
> (I'm looking at 
> .../oe/build/tmp-glibc/work/archs-oe-linux/webkitgtk/2.22.5-r0/temp/log.do_compile).
>
> So I may guess webkitgtk doesn't copy CPPFLAGS to CFLAGS and CXXFLAGS.
>

yes its possible. Thanks for additional verifications

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


Re: [OE-core] [PATCH] webkitgtk: Enable building for ARC architecture

2019-01-14 Thread Alexey Brodkin
Hi Khem,

> -Original Message-
> From: Khem Raj [mailto:raj.k...@gmail.com]
> Sent: Friday, January 11, 2019 6:32 PM
> To: Alexey Brodkin 
> Cc: Patches and discussions about the oe-core layer 
> ;
> Richard Purdie ; Ross Burton 
> ; linux-snps-
> a...@lists.infradead.org; Alexander Kanavin ; Hongxu 
> Jia
> 
> Subject: Re: [PATCH] webkitgtk: Enable building for ARC architecture
> 
> On Fri, Jan 11, 2019 at 4:50 AM Alexey Brodkin
>  wrote:
> >
> > For that we need 2 things:
> >  1. Disable JIT in JS as it's not supported for ARC.
> >
> >  2. Compile with "-mlong-calls" so relocations with
> > offsets larger than 25 bits are used, otherwise
> > linker fails to link final binaries.
> >
> > Signed-off-by: Alexey Brodkin 
> > Cc: Alexander Kanavin 
> > Cc: Hongxu Jia 
> > ---
> >  meta/recipes-sato/webkit/webkitgtk_2.22.5.bb | 7 +++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb b/meta/recipes-
> sato/webkit/webkitgtk_2.22.5.bb
> > index fc56822f7a..56f69c7a30 100644
> > --- a/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
> > +++ b/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
> > @@ -69,6 +69,13 @@ EXTRA_OECMAKE = " \
> >  EXTRA_OECMAKE_append_x86 = " -DUSE_GSTREAMER_GL=OFF "
> >  EXTRA_OECMAKE_append_x86-x32 = " -DUSE_GSTREAMER_GL=OFF "
> >
> > +# Javascript JIT is not supported on ARC
> > +EXTRA_OECMAKE_append_arc = " -DENABLE_JIT=OFF "
> > +# By default 25-bit "medium" calls are used on ARC
> > +# which is not enough for binaries larger than 32 MiB
> > +CFLAGS_append_arc = " -mlong-calls"
> > +CXXFLAGS_append_arc = " -mlong-calls"
> 
> perhaps adding to CPPFLAGS is going to be enough for both c/c++ cases

Just tried that (only CPPFLAGS_append_arc = " -mlong-calls") and
I don't see "-mlong-calls" used during compilation at all
(I'm looking at 
.../oe/build/tmp-glibc/work/archs-oe-linux/webkitgtk/2.22.5-r0/temp/log.do_compile).

So I may guess webkitgtk doesn't copy CPPFLAGS to CFLAGS and CXXFLAGS.

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


Re: [OE-core] [PATCH v3] systemd: fix remaining issues with statx and glibc 2.28+

2019-01-14 Thread Ruslan Bilovol via Openembedded-core

Hi Chen,

Will you pick up this fix? Still don't see it in the master-next

Thanks,
Ruslan

On 12/22/18 1:48 AM, Khem Raj wrote:

On Fri, Dec 21, 2018 at 11:45 AM Ruslan Bilovol  wrote:


Commit 776d14db9589 "systemd: Detect if statx struct is
defined in sys/stat.h" did only a part of work, and systemd
build fails on src/basic/chattr-util.c compilation due to
same statx redefinition issue.
Backport additional patch from systemd master




LGTM


Signed-off-by: Ruslan Bilovol 
---

v3: rebased to recent OE master (again)

v2: rebased to recent OE master, added signoff

  ...-linux-stat.h-check-with-other-checks-and.patch | 78 ++
  meta/recipes-core/systemd/systemd_239.bb   |  1 +
  2 files changed, 79 insertions(+)
  create mode 100644 
meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
 
b/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
new file mode 100644
index 000..0db7fce
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch
@@ -0,0 +1,78 @@
+From 9c869d08d82c73f62ab3527567858ce4b0cf1257 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= 
+Date: Wed, 18 Jul 2018 17:26:17 +0200
+Subject: [PATCH] meson: unify linux/stat.h check with other checks and use
+ _GNU_SOURCE
+
+Using _GNU_SOURCE is better because that's how we include the headers in the
+actual build, and some headers define different stuff when it is defined.
+sys/stat.h for example defines 'struct statx' conditionally.
+
+Upstream-Status: Backport
+
+Signed-off-by: Ruslan Bilovol 
+---
+ meson.build | 20 ++--
+ src/basic/missing.h |  2 +-
+ 2 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 68423bd..99035d2 100644
+--- a/meson.build
 b/meson.build
+@@ -421,11 +421,9 @@ decl_headers = '''
+ #include 
+ #include 
+ #include 
+-#include 
+ #include 
+ '''
+ # FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail
+-# FIXME: these should use -D_GNU_SOURCE, since that is defined at build time
+
+ foreach decl : ['char16_t',
+ 'char32_t',
+@@ -436,13 +434,23 @@ foreach decl : ['char16_t',
+]
+
+ # We get -1 if the size cannot be determined
+-have = cc.sizeof(decl, prefix : decl_headers) > 0
++have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') 
> 0
++
++if decl == 'struct statx'
++if have
++want_linux_stat_h = false
++else
++have = cc.sizeof(decl,
++ prefix : decl_headers + '#include 
',
++ args : '-D_GNU_SOURCE') > 0
++want_linux_stat_h = have
++endif
++endif
++
+ conf.set10('HAVE_' + decl.underscorify().to_upper(), have)
+ endforeach
+
+-conf.set10('HAVE_STRUCT_STATX_IN_SYS_STAT_H', cc.sizeof('struct statx', 
prefix : '''
+-#include 
+-''', args : '-D_GNU_SOURCE') > 0)
++conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)
+
+ foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'],
+ ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'],
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 14ad3d4..9044683 100644
+--- a/src/basic/missing.h
 b/src/basic/missing.h
+@@ -24,7 +24,7 @@
+ #include 
+ #include 
+
+-#if !HAVE_STRUCT_STATX_IN_SYS_STAT_H
++#if WANT_LINUX_STAT_H
+ #include 
+ #endif
+
+--
+1.9.1
+
diff --git a/meta/recipes-core/systemd/systemd_239.bb 
b/meta/recipes-core/systemd/systemd_239.bb
index 03acce2..91a026d 100644
--- a/meta/recipes-core/systemd/systemd_239.bb
+++ b/meta/recipes-core/systemd/systemd_239.bb
@@ -37,6 +37,7 @@ SRC_URI += "file://touchscreen.rules \
 file://0001-timesync-changes-type-of-drift_freq-to-int64_t.patch \
 file://0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch \
 file://0002-core-Fix-use-after-free-case-in-load_from_path.patch \
+   
file://0001-meson-unify-linux-stat.h-check-with-other-checks-and.patch \
 "

  # patches made for musl are only applied on TCLIBC is musl
--
1.9.1


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


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

2019-01-14 Thread Jolley, Stephen K
All,



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



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



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



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



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



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


Thanks,

Stephen K. Jolley
Yocto Project Program Manager
INTEL, MS JF1-255, 2111 N.E. 25th Avenue, Hillsboro, OR 97124
*Cell:(208) 244-4460
* Email: stephen.k.jol...@intel.com

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


[OE-core] [PATCH] meta: Fix Deprecated warnings from regexs

2019-01-14 Thread Richard Purdie
Fix handling of escape characters in regexs and hence fix python
Deprecation warnings which will be problematic in python 3.8.

Signed-off-by: Richard Purdie 
---
 meta/classes/debian.bbclass   |  6 ++---
 meta/classes/kernel-module-split.bbclass  |  2 +-
 meta/classes/kernel.bbclass   |  2 +-
 meta/classes/package.bbclass  | 22 -
 meta/lib/oe/license.py|  8 +++
 meta/lib/oe/package.py|  2 +-
 meta/lib/oe/package_manager.py| 24 +--
 meta/lib/oe/patch.py  |  4 ++--
 meta/lib/oe/rootfs.py | 16 ++---
 meta/lib/oe/utils.py  |  4 ++--
 meta/recipes-devtools/llvm/llvm_git.bb| 20 
 .../perl-sanity/perl_5.28.1.bb| 12 +-
 meta/recipes-graphics/mesa/mesa.inc   |  4 ++--
 .../gstreamer/gst-plugins-package.inc | 10 
 14 files changed, 68 insertions(+), 68 deletions(-)

diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index 989ea8f8d28..6f8a599ccb6 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -29,11 +29,11 @@ python debian_package_name_hook () {
 
 pkgdest = d.getVar("PKGDEST")
 packages = d.getVar('PACKAGES')
-so_re = re.compile("lib.*\.so")
+so_re = re.compile(r"lib.*\.so")
 
 def socrunch(s):
 s = s.lower().replace('_', '-')
-m = re.match("^(.*)(.)\.so\.(.*)$", s)
+m = re.match(r"^(.*)(.)\.so\.(.*)$", s)
 if m is None:
 return None
 if m.group(2) in '0123456789':
@@ -79,7 +79,7 @@ python debian_package_name_hook () {
 try:
 cmd = [d.expand("${TARGET_PREFIX}objdump"), "-p", f]
 output = subprocess.check_output(cmd).decode("utf-8")
-for m in re.finditer("\s+SONAME\s+([^\s]+)", output):
+for m in re.finditer(r"\s+SONAME\s+([^\s]+)", output):
 if m.group(1) not in sonames:
 sonames.append(m.group(1))
 except subprocess.CalledProcessError:
diff --git a/meta/classes/kernel-module-split.bbclass 
b/meta/classes/kernel-module-split.bbclass
index e8996cf59ba..e8d3eb51057 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -133,7 +133,7 @@ python split_kernel_module_packages () {
 kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel"
 kernel_version = d.getVar("KERNEL_VERSION")
 
-module_regex = '^(.*)\.k?o$'
+module_regex = r'^(.*)\.k?o$'
 
 module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
 module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX')
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 45cb4fabc18..c0889bd3ee4 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -578,7 +578,7 @@ pkg_postinst_${KERNEL_PACKAGE_NAME}-base () {
 PACKAGESPLITFUNCS_prepend = "split_kernel_packages "
 
 python split_kernel_packages () {
-do_split_packages(d, root='${nonarch_base_libdir}/firmware', 
file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', 
output_pattern='${KERNEL_PACKAGE_NAME}-firmware-%s', description='Firmware for 
%s', recursive=True, extra_depends='')
+do_split_packages(d, root='${nonarch_base_libdir}/firmware', 
file_regex=r'^(.*)\.(bin|fw|cis|csp|dsp)$', 
output_pattern='${KERNEL_PACKAGE_NAME}-firmware-%s', description='Firmware for 
%s', recursive=True, extra_depends='')
 }
 
 # Many scripts want to look in arch/$arch/boot for the bootable
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 7a7bc9e2f05..853735f0c64 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -75,7 +75,7 @@ def legitimize_package_name(s):
 return ('\\u%s' % cp).encode('latin-1').decode('unicode_escape')
 
 # Handle unicode codepoints encoded as , as in glibc locale files.
-s = re.sub('', fixutf, s)
+s = re.sub(r'', fixutf, s)
 
 # Remaining package name validity fixes
 return s.lower().replace('_', '-').replace('@', '+').replace(',', 
'+').replace('/', '-')
@@ -1590,8 +1590,8 @@ python package_do_shlibs() {
 bb.note("not generating shlibs")
 return
 
-lib_re = re.compile("^.*\.so")
-libdir_re = re.compile(".*/%s$" % d.getVar('baselib'))
+lib_re = re.compile(r"^.*\.so")
+libdir_re = re.compile(r".*/%s$" % d.getVar('baselib'))
 
 packages = d.getVar('PACKAGES')
 
@@ -1632,17 +1632,17 @@ python package_do_shlibs() {
 fd.close()
 rpath = tuple()
 for l in lines:
-m = re.match("\s+RPATH\s+([^\s]*)", l)
+m = re.match(r"\s+RPATH\s+([^\s]*)", l)
 if m:
 rpaths = 

Re: [OE-core] [PATCH 12/23] mesa-gl: do not enable nativesdk variant to avoid clashes with main mesa recipe

2019-01-14 Thread Burton, Ross
Wouldn't a preferred provider would sort this?

Ross

On Mon, 14 Jan 2019 at 15:06, Alexander Kanavin 
wrote:

> Signed-off-by: Alexander Kanavin 
> ---
>  meta/recipes-graphics/mesa/mesa-gl_18.1.9.bb | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-graphics/mesa/mesa-gl_18.1.9.bb
> b/meta/recipes-graphics/mesa/mesa-gl_18.1.9.bb
> index 73267eb4f0d..030db6c1440 100644
> --- a/meta/recipes-graphics/mesa/mesa-gl_18.1.9.bb
> +++ b/meta/recipes-graphics/mesa/mesa-gl_18.1.9.bb
> @@ -7,3 +7,5 @@ PROVIDES = "virtual/libgl virtual/mesa"
>  S = "${WORKDIR}/mesa-${PV}"
>
>  PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',
> 'x11', d)}"
> +
> +BBCLASSEXTEND_remove = "nativesdk"
> --
> 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


Re: [OE-core] [PATCH 16/23] atk: disable gobject-introspection for nativesdk

2019-01-14 Thread Burton, Ross
Rationale please.

Ross

On Mon, 14 Jan 2019 at 15:06, Alexander Kanavin 
wrote:

> Signed-off-by: Alexander Kanavin 
> ---
>  meta/recipes-support/atk/atk_2.30.0.bb | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-support/atk/atk_2.30.0.bb
> b/meta/recipes-support/atk/atk_2.30.0.bb
> index 481f8e89a13..4e2dacbc4d8 100644
> --- a/meta/recipes-support/atk/atk_2.30.0.bb
> +++ b/meta/recipes-support/atk/atk_2.30.0.bb
> @@ -20,6 +20,8 @@ GTKDOC_DISABLE_FLAG = "-Ddocs=false"
>  GI_ENABLE_FLAG = "-Dintrospection=true"
>  GI_DISABLE_FLAG = "-Dintrospection=false"
>
> +EXTRA_OEMESON_append_class-nativesdk = " ${GI_DISABLE_FLAG}"
> +
>  EXTRA_OEMESON_append_class-target = "
> ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GI_ENABLE_FLAG}', \
>
>   '${GI_DISABLE_FLAG}', d)} "
>
> --
> 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


Re: [OE-core] [PATCH 08/23] mesa: enable native and nativesdk variants

2019-01-14 Thread Burton, Ross
On Mon, 14 Jan 2019 at 15:05, Alexander Kanavin 
wrote:

> -ANY_OF_DISTRO_FEATURES = "opengl vulkan"
> +ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan"


Sounds like this means we should be fiddling the native DISTRO_FEATURES
instead of making a distro feature check target-only.

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


Re: [OE-core] [PATCH 07/23] libepoxy: enable native/nativesdk variants

2019-01-14 Thread Peter Kjellerstedt
> -Original Message-
> From: openembedded-core-boun...@lists.openembedded.org  core-boun...@lists.openembedded.org> On Behalf Of Alexander Kanavin
> Sent: den 14 januari 2019 16:03
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 07/23] libepoxy: enable native/nativesdk
> variants
> 
> libepoxy is a requirement of virglrenderer. Note that we strip
> RPATH from the library, as this allows fall-through to the host
> GL implementation, instead of attempting (and failing) to use
> mesa-native.
> 
> Signed-off-by: Alexander Kanavin 
> ---
>  meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb | 12 
>  1 file changed, 12 insertions(+)
> 
> diff --git a/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
> b/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
> index 92f644c039d..45995325d2c 100644
> --- a/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
> +++ b/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
> @@ -14,9 +14,21 @@ UPSTREAM_CHECK_URI = 
> "https://github.com/anholt/libepoxy/releases;
>  inherit meson pkgconfig distro_features_check
> 
>  REQUIRED_DISTRO_FEATURES = "opengl"
> +REQUIRED_DISTRO_FEATURES_class-native = ""
> +REQUIRED_DISTRO_FEATURES_class-nativesdk = ""
> 
>  PACKAGECONFIG[egl] = "-Degl=yes, -Degl=no, virtual/egl"
>  PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no, virtual/libx11 virtual/libgl"
>  PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
> 
>  EXTRA_OEMESON += "-Dtests=false"
> +
> +PACKAGECONFIG_class-native = "egl"
> +PACKAGECONFIG_class-nativesdk = "egl"
> +
> +BBCLASSEXTEND = "native nativesdk"
> +
> +# This will ensure that dlopen will attempt only GL libraries provided by 
> host
> +do_install_append () {
> +chrpath --delete ${D}${libdir}/*.so
> +}

Shouldn't this only be done for native/nativesdk? I.e.:

do_install_append_class-native() {
chrpath --delete ${D}${libdir}/*.so
}

do_install_append_class-nativesdk() {
chrpath --delete ${D}${libdir}/*.so
}

(I also changed the indentation to tabs as I believe that is still 
the official OE-Core standard for shell code in recipes.)

> --
> 2.17.1

//Peter

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


Re: [OE-core] [PATCH 00/23] Enable accelerated OpenGL in qemu

2019-01-14 Thread Alexander Kanavin
Oh, I forgot the rationale:

1. I think we are heading towards a reality where some kind of working
GL is a 'must' for any kind of UI work.
2. Typically people build images and then transfer them to the NUC or
even target boards for testing - using qemu would be less awkward.
3. Current qemu configuration is basically useless here.

Alex

On Mon, 14 Jan 2019 at 16:03, Alexander Kanavin  wrote:
>
> 0. TLDR:
>
> $ . oe-init-build-env build-virgl
> $ bitbake core-image-sato-sdk
> $ runqemu kvm gl
> $$ run glxgears or any other GL-capable binary inside qemu
>
> 1. qemu is switched over to use gtk frontend. I simply couldn't get SDL
> frontend to work properly, it only displays a blank black window or doesn't
> start at all. Same thing happens with qemu binaries provided by Fedora and
> opensuse (Ubuntu's qemu lacks virgl support). Seems like SDL support has
> regressed.
>
> 2. While the components are built against the most minimum necessary
> mesa-native set (gbm, egl, dri with no drivers), libepoxy loads and uses the
> host GL implementation (through a chrpath hack). This is both to save build
> times, and because the host is likely to have a set of drivers more
> appropriate for the physical machine (e.g. proprietary nvidia stack,
> although I didn't test that).
>
> 3. I tested this with
> - glamor X server
> - weston compositor with drm backend (build core-image-weston, then edit
>   weston.ini in the image to use drm backed instead of fbdev).
> - kmscube
> - glxgears
> - https://www.geeks3d.com/gputest/
>
> The latter two show FPS that is similar to running them directly on the host.
>
> 4. Some things I am not sure about:
>
>  - how much of a 'default' should this be for running qemu. It works for me,
> but other people might find it less stable compared to the existing
> sdl-vmware-swrast setup.
>
> - what other tests and demos could be run
>
> - how could this be tested on the autobuilder. I wrote an oe-selftest for
> this, but it does require an X session, and ability to create opengl
> contexts on the host.
>
> The following changes since commit 0c9f6e9bb18b2a52b5a5e828772a9619ee4d8515:
>
>   strace: add lost Upstream-Status (2019-01-14 11:49:07 +)
>
> are available in the Git repository at:
>
>   git://git.yoctoproject.org/poky-contrib akanavin/virgl-gtk
>   http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/virgl-gtk
>
> Alexander Kanavin (23):
>   gtk+3: enable native/nativesdk variant
>   gtk+3: remove the gtk-icon-utils-native recipe
>   shared-mime-info: update the database also in native builds
>   gtk+: drop support for choosing between 2.x and 3.x implementations of
> gtk-update-icon-cache
>   pixbufcache.bbclass: remove a dependency loop introduced by enabling
> gtk+3-native
>   meta: add native and nativesdk variants to various recipes to enable
> gtk+3-native/nativesdk
>   libepoxy: enable native/nativesdk variants
>   mesa: enable native and nativesdk variants
>   virglrenderer: add a recipe
>   qemu: enable virglrenderer and glx options for native/nativesdk builds
>   qemu: drop --with-gtkabi option, as it is no longer supported
>   mesa-gl: do not enable nativesdk variant to avoid clashes with main
> mesa recipe
>   local.conf.sample: adjust the qemu config to enable gtk+ instead of
> sdl
>   qemu: build target variant with gtk+, and nativesdk variant without
> sdl
>   qemu: remove support for building against host sdl
>   atk: disable gobject-introspection for nativesdk
>   qemu: add a gettext-native dependency
>   libjpeg-turbo: fix nativesdk build in same way as native builds are
>   qemu: add a patch to avoid a missing include error
>   runqemu: add support for virgl GL acceleration
>   runqemu: do not check for GL libraries
>   qemu: add environment variable wrappers to make qemu look good with
> gtk frontend
>   selftest: add a test for virgl GL acceleration
>
>  meta-poky/conf/local.conf.sample  |  10 +-
>  meta-selftest/lib/oeqa/runtime/cases/virgl.py |  17 +++
>  meta/classes/pixbufcache.bbclass  |   2 +-
>  meta/conf/machine/include/qemuboot-x86.inc|   2 +-
>  meta/lib/oeqa/selftest/cases/runtime_test.py  |  19 
>  meta/recipes-devtools/qemu/qemu.inc   |  40 ---
>  .../qemu/0001-Add-a-missing-X11-include.patch |  23 
>  meta/recipes-devtools/qemu/qemu_3.1.0.bb  |   1 +
>  .../gdk-pixbuf/gdk-pixbuf_2.36.11.bb  |   2 +-
>  .../gnome/adwaita-icon-theme_3.28.0.bb|   2 +
>  meta/recipes-gnome/gtk+/gtk+.inc  |   5 +-
>  meta/recipes-gnome/gtk+/gtk+3.inc |  29 +++--
>  .../gtk+/gtk-icon-utils-native_3.22.30.bb |  63 ---
>  ...endency-from-gtk-encode-symbolic-svg.patch | 102 --
>  .../hicolor-icon-theme_0.17.bb|   2 +
>  meta/recipes-graphics/cairo/cairo_1.14.12.bb  |   2 +-
>  .../harfbuzz/harfbuzz_2.2.0.bb|   2 +-
>  .../jpeg/libjpeg-turbo_2.0.1.bb   |   3 +-
>  

[OE-core] [PATCH 22/23] qemu: add environment variable wrappers to make qemu look good with gtk frontend

2019-01-14 Thread Alexander Kanavin
GTK_THEME instructs gtk to use its built-in theme. Otherwise
gtk attempts to use the theme from the host, which may be from
a totally mismatching gtk version.

On the other hand FONTCONFIG_PATH tells it to use the host fonts,
as providing fonts in the native sysroot and instructing the components
to use them is a lot more tricky.

GDK_PIXBUF_MODULE_FILE is set, because otherwise qemu works but
fills stdout with error messages, which eventually fill the pipe
stdout is redirected to by runqemuscript , which causes the qemu process
to lock up.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/qemu/qemu.inc | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index 6937bbc87b4..23da51b5938 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -48,6 +48,28 @@ do_install () {
oe_runmake 'DESTDIR=${D}' install
 }
 
+do_install_append_class-native() {
+gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file 
gdk-pixbuf-2.0`
+
+for tool in `ls ${D}${bindir}/qemu-system-*`; do
+create_wrapper $tool \
+GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \
+FONTCONFIG_PATH=/etc/fonts \
+GTK_THEME=Adwaita
+done
+}
+
+do_install_append_class-nativesdk() {
+gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file 
gdk-pixbuf-2.0`
+
+for tool in `ls ${D}${bindir}/qemu-system-*`; do
+create_wrapper $tool \
+GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \
+FONTCONFIG_PATH=/etc/fonts \
+GTK_THEME=Adwaita
+done
+}
+
 # The following fragment will create a wrapper for qemu-mips user emulation
 # binary in order to work around a segmentation fault issue. Basically, by
 # default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
-- 
2.17.1

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


[OE-core] [PATCH 23/23] selftest: add a test for virgl GL acceleration

2019-01-14 Thread Alexander Kanavin
Note that the test requires that the host machine has a X display
and is able to create OpenGL contexts.

Signed-off-by: Alexander Kanavin 
---
 meta-selftest/lib/oeqa/runtime/cases/virgl.py | 17 +
 meta/lib/oeqa/selftest/cases/runtime_test.py  | 19 +++
 2 files changed, 36 insertions(+)
 create mode 100644 meta-selftest/lib/oeqa/runtime/cases/virgl.py

diff --git a/meta-selftest/lib/oeqa/runtime/cases/virgl.py 
b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
new file mode 100644
index 000..3894962eaaf
--- /dev/null
+++ b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
@@ -0,0 +1,17 @@
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+import subprocess
+
+class VirglTest(OERuntimeTestCase):
+
+@OETestDepends(['ssh.SSHTest.test_ssh'])
+def test_kernel_driver(self):
+status, output = self.target.run('dmesg|grep virgl')
+self.assertEqual(status, 0, "Checking for virgl driver in dmesg 
returned non-zero: %d\n%s" % (status, output))
+self.assertIn("virgl 3d acceleration enabled", output, "virgl 
acceleration seems to be disabled:\n%s" %(output))
+
+@OETestDepends(['virgl.VirglTest.test_kernel_driver'])
+def test_kmscube(self):
+status, output = self.target.run('kmscube')
+self.assertEqual(status, 0, "kmscube exited with non-zero status %d 
and output:\n%s" %(status, output))
+self.assertIn('renderer: "virgl"', output, "kmscube does not seem to 
use virgl:\n%s" %(output))
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py 
b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 906e460d4f8..14837fcdd68 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -168,6 +168,25 @@ class TestImage(OESelftestTestCase):
 # remove the oeqa-feed-sign temporal directory
 shutil.rmtree(self.gpg_home, ignore_errors=True)
 
+@OETestID(1883)
+def test_testimage_virgl(self):
+"""
+Summary: Check host-assisted accelerate OpenGL functionality in qemu
+Expected: 1. Check that virgl kernel driver is loaded and 3d 
acceleration is enabled
+  2. Check that kmscube demo runs without crashing.
+Product: oe-core
+Author: Alexander Kanavin 
+"""
+features = 'INHERIT += "testimage"\n'
+features += 'PACKAGECONFIG_append_pn-qemu-native = " gtk+"\n'
+features += 'TEST_SUITES = "ping ssh virgl"\n'
+features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n'
+features += 'IMAGE_INSTALL_append = " kmscube"\n'
+features += 'TEST_QEMUPARAMS = "-vga virtio -display gtk,gl=on"\n'
+self.write_config(features)
+bitbake('core-image-minimal')
+bitbake('-c testimage core-image-minimal')
+
 class Postinst(OESelftestTestCase):
 @OETestID(1540)
 @OETestID(1545)
-- 
2.17.1

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


[OE-core] [PATCH 21/23] runqemu: do not check for GL libraries

2019-01-14 Thread Alexander Kanavin
qemu has been using libepoxy for a long time, and libepoxy loads GL via dlopen()
only when instructed to.

Signed-off-by: Alexander Kanavin 
---
 scripts/runqemu | 35 ---
 1 file changed, 35 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index fa88dc4583c..ac45dc78942 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -117,39 +117,6 @@ def check_tun():
 if not os.access(dev_tun, os.W_OK):
 raise RunQemuError("TUN control device %s is not writable, please fix 
(e.g. sudo chmod 666 %s)" % (dev_tun, dev_tun))
 
-def check_libgl(qemu_bin):
-cmd = ('ldd', qemu_bin)
-logger.debug('Running %s...' % str(cmd))
-need_gl = subprocess.check_output(cmd).decode('utf-8')
-if re.search('libGLU', need_gl):
-# We can't run without a libGL.so
-libgl = False
-check_files = (('/usr/lib/libGL.so', '/usr/lib/libGLU.so'), \
-('/usr/lib64/libGL.so', '/usr/lib64/libGLU.so'), \
-('/usr/lib/*-linux-gnu/libGL.so', 
'/usr/lib/*-linux-gnu/libGLU.so'))
-
-for (f1, f2) in check_files:
-if re.search('\*', f1):
-for g1 in glob.glob(f1):
-if libgl:
-break
-if os.path.exists(g1):
-for g2 in glob.glob(f2):
-if os.path.exists(g2):
-libgl = True
-break
-if libgl:
-break
-else:
-if os.path.exists(f1) and os.path.exists(f2):
-libgl = True
-break
-if not libgl:
-logger.error("You need libGL.so and libGLU.so to exist in your 
library path to run the QEMU emulator.")
-logger.error("Ubuntu package names are: libgl1-mesa-dev and 
libglu1-mesa-dev.")
-logger.error("Fedora package names are: mesa-libGL-devel 
mesa-libGLU-devel.")
-raise RunQemuError('%s requires libGLU, but not found' % qemu_bin)
-
 def get_first_file(cmds):
 """Return first file found in wildcard cmds"""
 for cmd in cmds:
@@ -1166,8 +1133,6 @@ class BaseConfig(object):
 if not os.access(qemu_bin, os.X_OK):
 raise OEPathError("No QEMU binary '%s' could be found" % qemu_bin)
 
-check_libgl(qemu_bin)
-
 self.qemu_opt = "%s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), 
self.get('ROOTFS_OPTIONS'), self.get('QB_OPT_APPEND'))
 
 for ovmf in self.ovmf_bios:
-- 
2.17.1

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


[OE-core] [PATCH 20/23] runqemu: add support for virgl GL acceleration

2019-01-14 Thread Alexander Kanavin
Also, do not hardcode -vga option to qemu, set it according to command line 
parameters.

Signed-off-by: Alexander Kanavin 
---
 meta/conf/machine/include/qemuboot-x86.inc |  2 +-
 scripts/runqemu| 11 +++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/meta/conf/machine/include/qemuboot-x86.inc 
b/meta/conf/machine/include/qemuboot-x86.inc
index 5fdbe4df50e..574b7bbfc7d 100644
--- a/meta/conf/machine/include/qemuboot-x86.inc
+++ b/meta/conf/machine/include/qemuboot-x86.inc
@@ -11,7 +11,7 @@ QB_CPU_KVM_x86-64 = "-cpu core2duo"
 QB_AUDIO_DRV = "alsa"
 QB_AUDIO_OPT = "-soundhw ac97,es1370"
 QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=${UVESA_MODE} 
oprofile.timer=1 uvesafb.task_timeout=-1"
-QB_OPT_APPEND = "-vga vmware -show-cursor -usb -device usb-tablet"
+QB_OPT_APPEND = "-show-cursor -usb -device usb-tablet"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND += "-object rng-random,filename=/dev/urandom,id=rng0 -device 
virtio-rng-pci,rng=rng0"
 
diff --git a/scripts/runqemu b/scripts/runqemu
index c4a0ca811d9..fa88dc4583c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -74,6 +74,8 @@ of the following environment variables (in any order):
   MACHINE - the machine name (optional, autodetected from KERNEL filename if 
unspecified)
   Simplified QEMU command-line options can be passed with:
 nographic - disable video console
+gl - enable virgl-based GL acceleration
+gl-es - enable virgl-based GL acceleration, using OpenGL ES
 serial - enable a serial console on /dev/ttyS0
 serialstdio - enable a serial console on the console (regardless of 
graphics mode)
 slirp - enable user networking, no root privileges is required
@@ -427,12 +429,21 @@ class BaseConfig(object):
 sys.argv.remove(quiet)
 
 unknown_arg = ""
+if 'gl' not in sys.argv[1:] and 'gl-es' not in sys.argv[1:]:
+self.qemu_opt_script += ' -vga vmware'
 for arg in sys.argv[1:]:
 if arg in self.fstypes + self.vmtypes:
 self.check_arg_fstype(arg)
 elif arg == 'nographic':
 self.qemu_opt_script += ' -nographic'
 self.kernel_cmdline_script += ' console=ttyS0'
+elif arg == 'gl':
+self.qemu_opt_script += ' -vga virtio -display gtk,gl=on'
+elif arg == 'gl-es':
+self.qemu_opt_script += ' -vga virtio -display gtk,gl=es'
+elif arg == 'nographic':
+self.qemu_opt_script += ' -nographic'
+self.kernel_cmdline_script += ' console=ttyS0'
 elif arg == 'serial':
 self.kernel_cmdline_script += ' console=ttyS0'
 self.serialconsole = True
-- 
2.17.1

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


[OE-core] [PATCH 19/23] qemu: add a patch to avoid a missing include error

2019-01-14 Thread Alexander Kanavin
| In file included from 
/home/alexander/development/poky/build-virgl-gtk-64/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-qemu/3.1.0-r0/qemu-3.1.0/include/ui/egl-context.h:5,
|  from 
/home/alexander/development/poky/build-virgl-gtk-64/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-qemu/3.1.0-r0/qemu-3.1.0/ui/egl-context.c:3:
| 
/home/alexander/development/poky/build-virgl-gtk-64/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-qemu/3.1.0-r0/qemu-3.1.0/include/ui/egl-helpers.h:46:55:
 error: unknown type name 'Window'; did you mean 'minor'?
|  EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win);
|^~
|minor

Signed-off-by: Alexander Kanavin 
---
 .../qemu/0001-Add-a-missing-X11-include.patch | 23 +++
 meta/recipes-devtools/qemu/qemu_3.1.0.bb  |  1 +
 2 files changed, 24 insertions(+)
 create mode 100644 
meta/recipes-devtools/qemu/qemu/0001-Add-a-missing-X11-include.patch

diff --git 
a/meta/recipes-devtools/qemu/qemu/0001-Add-a-missing-X11-include.patch 
b/meta/recipes-devtools/qemu/qemu/0001-Add-a-missing-X11-include.patch
new file mode 100644
index 000..23d3d5cfba3
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0001-Add-a-missing-X11-include.patch
@@ -0,0 +1,23 @@
+From 97aa8f9124b4673d15a7823ef9300ec05def760f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Thu, 20 Dec 2018 18:06:29 +0100
+Subject: [PATCH] Add a missing X11 include
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin 
+---
+ include/ui/egl-helpers.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h
+index 9db7293b..2c32d77e 100644
+--- a/include/ui/egl-helpers.h
 b/include/ui/egl-helpers.h
+@@ -4,6 +4,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ extern EGLDisplay *qemu_egl_display;
+ extern EGLConfig qemu_egl_config;
diff --git a/meta/recipes-devtools/qemu/qemu_3.1.0.bb 
b/meta/recipes-devtools/qemu/qemu_3.1.0.bb
index 67cebcc8308..cd7cd67a3f0 100644
--- a/meta/recipes-devtools/qemu/qemu_3.1.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_3.1.0.bb
@@ -21,6 +21,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
file://0009-apic-fixup-fallthrough-to-PIC.patch \

file://0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \

file://0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \
+   file://0001-Add-a-missing-X11-include.patch \
"
 UPSTREAM_CHECK_REGEX = "qemu-(?P\d+(\.\d+)+)\.tar"
 
-- 
2.17.1

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


[OE-core] [PATCH 18/23] libjpeg-turbo: fix nativesdk build in same way as native builds are

2019-01-14 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.1.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.1.bb 
b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.1.bb
index d9d877dc0df..029847ff5f4 100644
--- a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.1.bb
+++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.1.bb
@@ -31,6 +31,7 @@ inherit cmake pkgconfig
 
 # Add nasm-native dependency consistently for all build arches is hard
 EXTRA_OECMAKE_append_class-native = " -DWITH_SIMD=False"
+EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_SIMD=False"
 
 # Work around missing x32 ABI support
 EXTRA_OECMAKE_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", 
"mx32", "-DWITH_SIMD=False", "", d)}"
-- 
2.17.1

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


[OE-core] [PATCH 17/23] qemu: add a gettext-native dependency

2019-01-14 Thread Alexander Kanavin
xgettext/msgmerge is used during do_install().

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/qemu/qemu.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index db9c2245df9..6937bbc87b4 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -1,7 +1,7 @@
 SUMMARY = "Fast open source processor emulator"
 HOMEPAGE = "http://qemu.org;
 LICENSE = "GPLv2 & LGPLv2.1"
-DEPENDS = "glib-2.0 zlib pixman"
+DEPENDS = "glib-2.0 zlib pixman gettext-native"
 RDEPENDS_${PN}_class-target += "bash"
 
 require qemu-targets.inc
-- 
2.17.1

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


[OE-core] [PATCH 15/23] qemu: remove support for building against host sdl

2019-01-14 Thread Alexander Kanavin
This hasn't been the default for a long time (as some distros don't
support it), and with gtk+ being the new default shouldn't
be needed at all.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/qemu/qemu.inc | 8 
 1 file changed, 8 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index 531f0a04c58..db9c2245df9 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -39,14 +39,6 @@ export LIBTOOL="${HOST_SYS}-libtool"
 
 B = "${WORKDIR}/build"
 
-do_configure_prepend_class-native() {
-   # Append build host pkg-config paths for native target since the host 
may provide sdl
-   BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path 
pkg-config || echo "")
-   if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
-   export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
-   fi
-}
-
 do_configure() {
 ${S}/configure ${EXTRA_OECONF}
 }
-- 
2.17.1

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


[OE-core] [PATCH 14/23] qemu: build target variant with gtk+, and nativesdk variant without sdl

2019-01-14 Thread Alexander Kanavin
As sdl is deprecated in favor of gtk+, it should not be the default.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/qemu/qemu.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index 6db1facc9a5..531f0a04c58 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -71,11 +71,11 @@ do_install_append() {
 # END of qemu-mips workaround
 
 PACKAGECONFIG ??= " \
-fdt sdl kvm \
+fdt gtk+ kvm \
 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
 "
 PACKAGECONFIG_class-native ??= "fdt alsa kvm virglrenderer glx"
-PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm virglrenderer glx"
+PACKAGECONFIG_class-nativesdk ??= "fdt kvm virglrenderer glx"
 
 # Handle distros such as CentOS 5 32-bit that do not have kvm support
 PACKAGECONFIG_class-native_remove = "${@'kvm' if not 
os.path.exists('/usr/include/linux/kvm.h') else ''}"
-- 
2.17.1

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


[OE-core] [PATCH 16/23] atk: disable gobject-introspection for nativesdk

2019-01-14 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-support/atk/atk_2.30.0.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-support/atk/atk_2.30.0.bb 
b/meta/recipes-support/atk/atk_2.30.0.bb
index 481f8e89a13..4e2dacbc4d8 100644
--- a/meta/recipes-support/atk/atk_2.30.0.bb
+++ b/meta/recipes-support/atk/atk_2.30.0.bb
@@ -20,6 +20,8 @@ GTKDOC_DISABLE_FLAG = "-Ddocs=false"
 GI_ENABLE_FLAG = "-Dintrospection=true"
 GI_DISABLE_FLAG = "-Dintrospection=false"
 
+EXTRA_OEMESON_append_class-nativesdk = " ${GI_DISABLE_FLAG}"
+
 EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 
'True', '${GI_ENABLE_FLAG}', \

'${GI_DISABLE_FLAG}', d)} "
 
-- 
2.17.1

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


[OE-core] [PATCH 13/23] local.conf.sample: adjust the qemu config to enable gtk+ instead of sdl

2019-01-14 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta-poky/conf/local.conf.sample | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/meta-poky/conf/local.conf.sample b/meta-poky/conf/local.conf.sample
index cf96598819c..079b7b9945d 100644
--- a/meta-poky/conf/local.conf.sample
+++ b/meta-poky/conf/local.conf.sample
@@ -236,12 +236,10 @@ BB_DISKMON_DIRS ??= "\
 # Qemu configuration
 #
 # By default qemu will build with a builtin VNC server where graphical output 
can be
-# seen. The two lines below enable the SDL backend too. By default 
libsdl2-native will
-# be built, if you want to use your host's libSDL instead of the minimal 
libsdl built
-# by libsdl2-native then uncomment the ASSUME_PROVIDED line below.
-PACKAGECONFIG_append_pn-qemu-native = " sdl"
-PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
-#ASSUME_PROVIDED += "libsdl2-native"
+# seen. The two lines below enable the Gtk backend with virgl-assisted GL 
acceleration
+# support in the guest environment.
+PACKAGECONFIG_append_pn-qemu-native = " gtk+"
+PACKAGECONFIG_append_pn-nativesdk-qemu = " gtk+"
 
 # CONF_VERSION is increased each time build/conf/ changes incompatibly and is 
used to
 # track the version of this file when it was generated. This can safely be 
ignored if
-- 
2.17.1

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


[OE-core] [PATCH 12/23] mesa-gl: do not enable nativesdk variant to avoid clashes with main mesa recipe

2019-01-14 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-graphics/mesa/mesa-gl_18.1.9.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-graphics/mesa/mesa-gl_18.1.9.bb 
b/meta/recipes-graphics/mesa/mesa-gl_18.1.9.bb
index 73267eb4f0d..030db6c1440 100644
--- a/meta/recipes-graphics/mesa/mesa-gl_18.1.9.bb
+++ b/meta/recipes-graphics/mesa/mesa-gl_18.1.9.bb
@@ -7,3 +7,5 @@ PROVIDES = "virtual/libgl virtual/mesa"
 S = "${WORKDIR}/mesa-${PV}"
 
 PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+
+BBCLASSEXTEND_remove = "nativesdk"
-- 
2.17.1

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


[OE-core] [PATCH 09/23] virglrenderer: add a recipe

2019-01-14 Thread Alexander Kanavin
This component enables hardware-accelerated GL inside QEMU guests.
For more information, see here:

https://lwn.net/Articles/767970/
https://www.collabora.com/news-and-blog/blog/2018/02/12/virtualizing-gpu-access/
https://www.collabora.com/news-and-blog/blog/2018/05/09/gpu-virtualization-update/

Signed-off-by: Alexander Kanavin 
---
 .../virglrenderer/virglrenderer_git.bb  | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 meta/recipes-graphics/virglrenderer/virglrenderer_git.bb

diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb 
b/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb
new file mode 100644
index 000..60ab256aae7
--- /dev/null
+++ b/meta/recipes-graphics/virglrenderer/virglrenderer_git.bb
@@ -0,0 +1,17 @@
+SUMMARY = "VirGL virtual OpenGL renderer"
+HOMEPAGE = "https://virgil3d.github.io/;
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c81c08eeefd9418fca8f88309a76db10"
+
+DEPENDS = "libdrm mesa libepoxy"
+PV = "0.7.0"
+SRCREV = "402c228861c9893f64cffbbcb4cb23044b8c721c"
+SRC_URI = "git://anongit.freedesktop.org/virglrenderer"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
+
-- 
2.17.1

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


[OE-core] [PATCH 08/23] mesa: enable native and nativesdk variants

2019-01-14 Thread Alexander Kanavin
Note that only the most minimal necessary subset of mesa is built;
particularly we don't build any drivers as that is offloaded
to the GL implementation provided by the host.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-graphics/mesa/mesa.inc | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc 
b/meta/recipes-graphics/mesa/mesa.inc
index 0cc0a82de49..37ca5e39c2d 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -26,7 +26,9 @@ PROVIDES = " \
 
 inherit autotools pkgconfig python3native gettext distro_features_check
 
-ANY_OF_DISTRO_FEATURES = "opengl vulkan"
+BBCLASSEXTEND = "native nativesdk"
+
+ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan"
 
 PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \
@@ -42,11 +44,13 @@ EXTRA_OECONF = "--enable-shared-glapi \
 --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \
 --with-platforms='${PLATFORMS}'"
 
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} 
\
-   ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl 
egl gles gbm dri', '', d)} \
+PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland 
vulkan', d)} \
+   ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl 
egl gles gbm dri gallium', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 
dri3', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 
'dri3', '', d)} \
   "
+PACKAGECONFIG_class-native ?= "gbm dri-native egl"
+PACKAGECONFIG_class-nativesdk ?= "gbm dri-native egl"
 
 # "gbm" requires "dri", "opengl"
 PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
@@ -62,6 +66,8 @@ DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915"
 DRIDRIVERS_append_x86-64 = ",radeon,r200,nouveau,i965,i915"
 # "dri" requires "opengl"
 PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, 
--disable-dri, xorgproto libdrm"
+# On the native builds we use host's dri drivers
+PACKAGECONFIG[dri-native] = "--enable-dri, , xorgproto libdrm"
 PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence"
 
 # Vulkan drivers need dri3 enabled
-- 
2.17.1

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


[OE-core] [PATCH 11/23] qemu: drop --with-gtkabi option, as it is no longer supported

2019-01-14 Thread Alexander Kanavin
Recent qemu versions support gtk+3 only.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/qemu/qemu.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index f943b9ee5a2..6db1facc9a5 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -95,7 +95,7 @@ PACKAGECONFIG[vnc-png] = "--enable-vnc 
--enable-vnc-png,--disable-vnc-png,libpng
 PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,libcurl,"
 PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss,"
 PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
-PACKAGECONFIG[gtk+] = "--enable-gtk --with-gtkabi=3.0 
--enable-vte,--disable-gtk --disable-vte,gtk+3 vte"
+PACKAGECONFIG[gtk+] = "--enable-gtk --enable-vte,--disable-gtk 
--disable-vte,gtk+3 vte"
 PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
 PACKAGECONFIG[ssh2] = "--enable-libssh2,--disable-libssh2,libssh2,"
 PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt,"
-- 
2.17.1

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


[OE-core] [PATCH 10/23] qemu: enable virglrenderer and glx options for native/nativesdk builds

2019-01-14 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/qemu/qemu.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index b05c1cee9eb..f943b9ee5a2 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -74,8 +74,8 @@ PACKAGECONFIG ??= " \
 fdt sdl kvm \
 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
 "
-PACKAGECONFIG_class-native ??= "fdt alsa kvm"
-PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
+PACKAGECONFIG_class-native ??= "fdt alsa kvm virglrenderer glx"
+PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm virglrenderer glx"
 
 # Handle distros such as CentOS 5 32-bit that do not have kvm support
 PACKAGECONFIG_class-native_remove = "${@'kvm' if not 
os.path.exists('/usr/include/linux/kvm.h') else ''}"
-- 
2.17.1

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


[OE-core] [PATCH 06/23] meta: add native and nativesdk variants to various recipes to enable gtk+3-native/nativesdk

2019-01-14 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb | 2 +-
 meta/recipes-gnome/gnome/adwaita-icon-theme_3.28.0.bb   | 2 ++
 .../recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb | 2 ++
 meta/recipes-graphics/cairo/cairo_1.14.12.bb| 2 +-
 meta/recipes-graphics/harfbuzz/harfbuzz_2.2.0.bb| 2 +-
 meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.1.bb   | 2 +-
 meta/recipes-graphics/pango/pango_1.42.4.bb | 2 +-
 meta/recipes-graphics/ttf-fonts/liberation-fonts_2.00.1.bb  | 2 ++
 meta/recipes-graphics/xorg-lib/libxcomposite_0.4.4.bb   | 2 +-
 meta/recipes-graphics/xorg-lib/libxdamage_1.1.4.bb  | 2 +-
 meta/recipes-graphics/xorg-lib/libxi_1.7.9.bb   | 2 ++
 meta/recipes-graphics/xorg-lib/libxtst_1.2.3.bb | 1 +
 meta/recipes-support/atk/at-spi2-atk_2.30.0.bb  | 2 ++
 meta/recipes-support/atk/at-spi2-core_2.30.0.bb | 1 +
 meta/recipes-support/atk/atk_2.30.0.bb  | 2 +-
 meta/recipes-support/vte/vte_0.52.2.bb  | 2 ++
 16 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb 
b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb
index 99c84c6dda4..bf202ef8609 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.36.11.bb
@@ -99,4 +99,4 @@ do_install_append_class-native() {

GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
 \

GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
 }
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-gnome/gnome/adwaita-icon-theme_3.28.0.bb 
b/meta/recipes-gnome/gnome/adwaita-icon-theme_3.28.0.bb
index 40dd35ba306..7102a895955 100644
--- a/meta/recipes-gnome/gnome/adwaita-icon-theme_3.28.0.bb
+++ b/meta/recipes-gnome/gnome/adwaita-icon-theme_3.28.0.bb
@@ -42,3 +42,5 @@ FILES_${PN}-hires = "${prefix}/share/icons/Adwaita/256x256/ \
  ${prefix}/share/icons/Adwaita/512x512/"
 FILES_${PN} = "${prefix}/share/icons/Adwaita/ \
${prefix}/share/pkgconfig/adwaita-icon-theme.pc"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb 
b/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb
index 7064b1942d4..fb8033448d8 100644
--- a/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb
+++ b/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb
@@ -12,3 +12,5 @@ SRC_URI[sha256sum] = 
"317484352271d18cbbcfac3868eab798d67fff1b8402e740baa6ff41d5
 inherit allarch autotools
 
 FILES_${PN} += "${datadir}/icons"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/cairo/cairo_1.14.12.bb 
b/meta/recipes-graphics/cairo/cairo_1.14.12.bb
index 18b947948a3..ad6745f60dc 100644
--- a/meta/recipes-graphics/cairo/cairo_1.14.12.bb
+++ b/meta/recipes-graphics/cairo/cairo_1.14.12.bb
@@ -84,4 +84,4 @@ FILES_${PN}-script-interpreter = 
"${libdir}/libcairo-script-interpreter.so.*"
 FILES_${PN}-perf-utils = "${bindir}/cairo-trace* ${libdir}/cairo/*.la 
${libdir}/cairo/libcairo-trace.so.*"
 FILES_${PN}-dev += "${libdir}/cairo/*.so"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_2.2.0.bb 
b/meta/recipes-graphics/harfbuzz/harfbuzz_2.2.0.bb
index 3b1e6a8181a..b62082f53d8 100644
--- a/meta/recipes-graphics/harfbuzz/harfbuzz_2.2.0.bb
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz_2.2.0.bb
@@ -37,4 +37,4 @@ FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \
${libdir}/pkgconfig/harfbuzz-icu.pc \
 "
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.1.bb 
b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.1.bb
index 72706be674f..d9d877dc0df 100644
--- a/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.1.bb
+++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.1.bb
@@ -53,4 +53,4 @@ FILES_jpeg-tools = "${bindir}/*"
 DESCRIPTION_libturbojpeg = "A SIMD-accelerated JPEG codec which provides only 
TurboJPEG APIs"
 FILES_libturbojpeg = "${libdir}/libturbojpeg.so.*"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/pango/pango_1.42.4.bb 
b/meta/recipes-graphics/pango/pango_1.42.4.bb
index 22fe3af15d7..a09f7a8e701 100644
--- a/meta/recipes-graphics/pango/pango_1.42.4.bb
+++ b/meta/recipes-graphics/pango/pango_1.42.4.bb
@@ -42,4 +42,4 @@ RDEPENDS_${PN}-ptest += "liberation-fonts cantarell-fonts"
 RPROVIDES_${PN} += "pango-modules pango-module-indic-lang \
 pango-module-basic-fc pango-module-arabic-lang"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native 

[OE-core] [PATCH 07/23] libepoxy: enable native/nativesdk variants

2019-01-14 Thread Alexander Kanavin
libepoxy is a requirement of virglrenderer. Note that we strip
RPATH from the library, as this allows fall-through to the host
GL implementation, instead of attempting (and failing) to use
mesa-native.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb | 12 
 1 file changed, 12 insertions(+)

diff --git a/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb 
b/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
index 92f644c039d..45995325d2c 100644
--- a/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
+++ b/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb
@@ -14,9 +14,21 @@ UPSTREAM_CHECK_URI = 
"https://github.com/anholt/libepoxy/releases;
 inherit meson pkgconfig distro_features_check
 
 REQUIRED_DISTRO_FEATURES = "opengl"
+REQUIRED_DISTRO_FEATURES_class-native = ""
+REQUIRED_DISTRO_FEATURES_class-nativesdk = ""
 
 PACKAGECONFIG[egl] = "-Degl=yes, -Degl=no, virtual/egl"
 PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no, virtual/libx11 virtual/libgl"
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
 
 EXTRA_OEMESON += "-Dtests=false"
+
+PACKAGECONFIG_class-native = "egl"
+PACKAGECONFIG_class-nativesdk = "egl"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# This will ensure that dlopen will attempt only GL libraries provided by host
+do_install_append () {
+chrpath --delete ${D}${libdir}/*.so
+}
-- 
2.17.1

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


[OE-core] [PATCH 05/23] pixbufcache.bbclass: remove a dependency loop introduced by enabling gtk+3-native

2019-01-14 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/classes/pixbufcache.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
index 3378ff2c806..fb50cd49659 100644
--- a/meta/classes/pixbufcache.bbclass
+++ b/meta/classes/pixbufcache.bbclass
@@ -3,7 +3,7 @@
 # packages.
 #
 
-DEPENDS += "qemu-native"
+DEPENDS_append_class-target = " qemu-native"
 inherit qemu
 
 PIXBUF_PACKAGES ??= "${PN}"
-- 
2.17.1

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


[OE-core] [PATCH 01/23] gtk+3: enable native/nativesdk variant

2019-01-14 Thread Alexander Kanavin
Host-assisted GL in Qemu in theory works with both SDL
and GTK; in practice SDL shows an empty screen. This
prepares the switchover of graphical qemu to use
native gtk, which also provides a neat set of menus to
control the emulator.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-gnome/gtk+/gtk+3.inc | 16 
 1 file changed, 16 insertions(+)

diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc 
b/meta/recipes-gnome/gtk+/gtk+3.inc
index 519a9840f42..77e8cb33f94 100644
--- a/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -12,6 +12,8 @@ LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
 
 inherit autotools gettext pkgconfig gtk-doc update-alternatives 
gtk-immodules-cache gsettings distro_features_check gobject-introspection
 
+BBCLASSEXTEND = "native nativesdk"
+
 # versions >= 3.90 are development versions, otherwise like 
upstream-version-is-even
 UPSTREAM_CHECK_REGEX = "[^\d\.](?P3\.([1-8]?[02468])+(\.\d+)+)\.tar"
 
@@ -59,6 +61,11 @@ do_install_append() {
 ln ${D}${bindir}/gtk-query-immodules-3.0 
${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-3.0
 }
 
+do_install_append_class-native() {
+# provided by gtk-icon-utils-native
+rm ${D}${bindir}/gtk-encode-symbolic-svg
+}
+
 PACKAGES =+ "${PN}-demo"
 LIBV = "3.0.0"
 
@@ -104,6 +111,15 @@ GTKBASE_RRECOMMENDS ?= "liberation-fonts \
 shared-mime-info \
 adwaita-icon-theme-symbolic \
 "
+
+GTKBASE_RRECOMMENDS_class-native ?= "\
+gdk-pixbuf-loader-png \
+gdk-pixbuf-loader-jpeg \
+gdk-pixbuf-loader-gif \
+gdk-pixbuf-loader-xpm \
+shared-mime-info \
+"
+
 GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1"
 
 RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}"
-- 
2.17.1

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


[OE-core] [PATCH 03/23] shared-mime-info: update the database also in native builds

2019-01-14 Thread Alexander Kanavin
Otherwise glib-compile-resources fails when building gtk+3-native.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-support/shared-mime-info/shared-mime-info.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info.inc 
b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
index 344da7ea77c..3fe1a445b0c 100644
--- a/meta/recipes-support/shared-mime-info/shared-mime-info.inc
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
@@ -30,6 +30,8 @@ do_install () {
 
 do_install_class-native () {
autotools_do_install
+
+   ${B}/update-mime-database ${D}${datadir}/mime
 }
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.17.1

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


[OE-core] [PATCH 04/23] gtk+: drop support for choosing between 2.x and 3.x implementations of gtk-update-icon-cache

2019-01-14 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-gnome/gtk+/gtk+.inc  |  5 +
 meta/recipes-gnome/gtk+/gtk+3.inc | 10 ++
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-gnome/gtk+/gtk+.inc b/meta/recipes-gnome/gtk+/gtk+.inc
index 14ed8d812ca..eb67db20552 100644
--- a/meta/recipes-gnome/gtk+/gtk+.inc
+++ b/meta/recipes-gnome/gtk+/gtk+.inc
@@ -28,7 +28,7 @@ PACKAGECONFIG[x11] = "--with-x=yes 
--with-gdktarget=x11,--with-x=no,${X11DEPENDS
 PACKAGECONFIG[directfb] = "--with-gdktarget=directfb,,directfb"
 PACKAGECONFIG[manpages] = "--enable-man 
--with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog.xml, --disable-man, 
libxslt-native xmlto-native"
 
-inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache 
gobject-introspection manpages
+inherit autotools gtk-doc pkgconfig gtk-immodules-cache gobject-introspection 
manpages
 
 PACKAGES += "libgail gtk-demo"
 
@@ -70,9 +70,6 @@ GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} 
glibc-gconv-iso8859-1"
 RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}"
 RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}"
 
-ALTERNATIVE_${PN} = "gtk-update-icon-cache"
-ALTERNATIVE_TARGET[gtk-update-icon-cache] = 
"${bindir}/gtk-update-icon-cache-2.0"
-
 do_compile_prepend() {
 export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs"
 }
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc 
b/meta/recipes-gnome/gtk+/gtk+3.inc
index ecb6abe4b5b..93f19e69944 100644
--- a/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -10,7 +10,7 @@ DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \
 
 LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
 
-inherit autotools gettext pkgconfig gtk-doc update-alternatives 
gtk-immodules-cache gsettings distro_features_check gobject-introspection
+inherit autotools gettext pkgconfig gtk-doc gtk-immodules-cache gsettings 
distro_features_check gobject-introspection
 
 BBCLASSEXTEND = "native nativesdk"
 
@@ -54,8 +54,6 @@ PACKAGECONFIG[wayland] = 
"--enable-wayland-backend,--disable-wayland-backend,way
 PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
 
 do_install_append() {
-   mv ${D}${bindir}/gtk-update-icon-cache 
${D}${bindir}/gtk-update-icon-cache-3.0
-
 # duplicate gtk-query-immodules for post install script 
update_gtk_immodules_cache
 mkdir -p ${D}${libexecdir}
 ln ${D}${bindir}/gtk-query-immodules-3.0 
${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-3.0
@@ -83,7 +81,7 @@ FILES_${PN}-demo = "${bindir}/gtk3-demo \
 ${datadir}/icons/hicolor/*/apps/gtk3-demo*.png \
 ${datadir}/icons/hicolor/*/apps/gtk3-widget-factory*.png"
 
-FILES_${PN}_append = " ${bindir}/gtk-update-icon-cache-3.0 \
+FILES_${PN}_append = " ${bindir}/gtk-update-icon-cache \
${bindir}/gtk-query-immodules-3.0 \
${bindir}/gtk-launch \
${datadir}/themes ${sysconfdir} ${datadir}/glib-2.0/schemas/ \
@@ -131,10 +129,6 @@ RDEPENDS_${PN}-dev += 
"${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland
 
 PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*"
 
-ALTERNATIVE_${PN} = "gtk-update-icon-cache"
-ALTERNATIVE_TARGET[gtk-update-icon-cache] = 
"${bindir}/gtk-update-icon-cache-3.0"
-ALTERNATIVE_PRIORITY = "30"
-
 python populate_packages_prepend () {
 import os.path
 
-- 
2.17.1

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


[OE-core] [PATCH 02/23] gtk+3: remove the gtk-icon-utils-native recipe

2019-01-14 Thread Alexander Kanavin
As we are now build native gtk+3, it already provides the necessary utilities.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-gnome/gtk+/gtk+3.inc |   7 +-
 .../gtk+/gtk-icon-utils-native_3.22.30.bb |  63 ---
 ...endency-from-gtk-encode-symbolic-svg.patch | 102 --
 3 files changed, 5 insertions(+), 167 deletions(-)
 delete mode 100644 meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.30.bb
 delete mode 100644 
meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch

diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc 
b/meta/recipes-gnome/gtk+/gtk+3.inc
index 77e8cb33f94..ecb6abe4b5b 100644
--- a/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -62,10 +62,13 @@ do_install_append() {
 }
 
 do_install_append_class-native() {
-# provided by gtk-icon-utils-native
-rm ${D}${bindir}/gtk-encode-symbolic-svg
+create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
+
GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
+
GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
 }
 
+PROVIDES += "gtk-icon-utils"
 PACKAGES =+ "${PN}-demo"
 LIBV = "3.0.0"
 
diff --git a/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.30.bb 
b/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.30.bb
deleted file mode 100644
index 28e7a312d28..000
--- a/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.30.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "Native icon utils for GTK+"
-DESCRIPTION = "gtk-update-icon-cache and gtk-encode-symbolic-svg built from 
GTK+ natively, for build time and on-host postinst script execution."
-SECTION = "libs"
-
-DEPENDS = "glib-2.0-native gdk-pixbuf-native librsvg-native"
-
-LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = 
"http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
-  file://Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch"
-SRC_URI[md5sum] = "61e60dc073e0a6893c72043d20579dc0"
-SRC_URI[sha256sum] = 
"a1a4a5c12703d4e1ccda28333b87ff462741dc365131fbc94c218ae81d9a6567"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
-
file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
-
file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
-
file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
-
-S = "${WORKDIR}/gtk+-${PV}"
-
-inherit pkgconfig native
-
-# versions >= 3.90 are development versions, otherwise like 
upstream-version-is-even
-UPSTREAM_CHECK_REGEX = "[^\d\.](?P3\.([1-8]?[02468])+(\.\d+)+)\.tar"
-
-PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
-
-do_configure() {
-   # Quite ugly but defines enough to compile the tools.
-   if ! test -f gtk/config.h; then
-   echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
-   echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
-   echo "#define HAVE_FTW_H 1" >> gtk/config.h
-   fi
-   if ! test -f gdk/config.h; then
-   touch gdk/config.h
-   fi
-}
-
-do_compile() {
-   ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
-   ${S}/gtk/updateiconcache.c \
-   $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
-   -o gtk-update-icon-cache
-
-   ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
-   ${S}/gtk/encodesymbolic.c \
-   $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gio-2.0 
gdk-pixbuf-2.0) \
-   -o gtk-encode-symbolic-svg
-}
-
-do_install() {
-   install -d ${D}${bindir}
-   install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
-   install -m 0755 ${B}/gtk-encode-symbolic-svg ${D}${bindir}
-
-   create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
-   
GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
-   create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
-   
GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
-}
diff --git 
a/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch
 
b/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch
deleted file mode 100644
index 237f803755f..000
--- 
a/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 4d09ff324419fe4e671233044e424378da53969b Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen 
-Date: Tue, 9 Jun 2015 14:20:30 +0300
-Subject: [PATCH] Remove Gdk-dependency from gtk-encode-symbolic-svg
-
-Building gtk-encode-symbolic-svg without building Gdk 

[OE-core] [PATCH 00/23] Enable accelerated OpenGL in qemu

2019-01-14 Thread Alexander Kanavin
0. TLDR:

$ . oe-init-build-env build-virgl
$ bitbake core-image-sato-sdk
$ runqemu kvm gl
$$ run glxgears or any other GL-capable binary inside qemu

1. qemu is switched over to use gtk frontend. I simply couldn't get SDL 
frontend to work properly, it only displays a blank black window or doesn't 
start at all. Same thing happens with qemu binaries provided by Fedora and 
opensuse (Ubuntu's qemu lacks virgl support). Seems like SDL support has 
regressed.

2. While the components are built against the most minimum necessary 
mesa-native set (gbm, egl, dri with no drivers), libepoxy loads and uses the 
host GL implementation (through a chrpath hack). This is both to save build 
times, and because the host is likely to have a set of drivers more 
appropriate for the physical machine (e.g. proprietary nvidia stack, 
although I didn't test that).

3. I tested this with
- glamor X server
- weston compositor with drm backend (build core-image-weston, then edit 
  weston.ini in the image to use drm backed instead of fbdev).
- kmscube
- glxgears
- https://www.geeks3d.com/gputest/

The latter two show FPS that is similar to running them directly on the host.

4. Some things I am not sure about:

 - how much of a 'default' should this be for running qemu. It works for me, 
but other people might find it less stable compared to the existing 
sdl-vmware-swrast setup.

- what other tests and demos could be run

- how could this be tested on the autobuilder. I wrote an oe-selftest for 
this, but it does require an X session, and ability to create opengl 
contexts on the host.

The following changes since commit 0c9f6e9bb18b2a52b5a5e828772a9619ee4d8515:

  strace: add lost Upstream-Status (2019-01-14 11:49:07 +)

are available in the Git repository at:

  git://git.yoctoproject.org/poky-contrib akanavin/virgl-gtk
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/virgl-gtk

Alexander Kanavin (23):
  gtk+3: enable native/nativesdk variant
  gtk+3: remove the gtk-icon-utils-native recipe
  shared-mime-info: update the database also in native builds
  gtk+: drop support for choosing between 2.x and 3.x implementations of
gtk-update-icon-cache
  pixbufcache.bbclass: remove a dependency loop introduced by enabling
gtk+3-native
  meta: add native and nativesdk variants to various recipes to enable
gtk+3-native/nativesdk
  libepoxy: enable native/nativesdk variants
  mesa: enable native and nativesdk variants
  virglrenderer: add a recipe
  qemu: enable virglrenderer and glx options for native/nativesdk builds
  qemu: drop --with-gtkabi option, as it is no longer supported
  mesa-gl: do not enable nativesdk variant to avoid clashes with main
mesa recipe
  local.conf.sample: adjust the qemu config to enable gtk+ instead of
sdl
  qemu: build target variant with gtk+, and nativesdk variant without
sdl
  qemu: remove support for building against host sdl
  atk: disable gobject-introspection for nativesdk
  qemu: add a gettext-native dependency
  libjpeg-turbo: fix nativesdk build in same way as native builds are
  qemu: add a patch to avoid a missing include error
  runqemu: add support for virgl GL acceleration
  runqemu: do not check for GL libraries
  qemu: add environment variable wrappers to make qemu look good with
gtk frontend
  selftest: add a test for virgl GL acceleration

 meta-poky/conf/local.conf.sample  |  10 +-
 meta-selftest/lib/oeqa/runtime/cases/virgl.py |  17 +++
 meta/classes/pixbufcache.bbclass  |   2 +-
 meta/conf/machine/include/qemuboot-x86.inc|   2 +-
 meta/lib/oeqa/selftest/cases/runtime_test.py  |  19 
 meta/recipes-devtools/qemu/qemu.inc   |  40 ---
 .../qemu/0001-Add-a-missing-X11-include.patch |  23 
 meta/recipes-devtools/qemu/qemu_3.1.0.bb  |   1 +
 .../gdk-pixbuf/gdk-pixbuf_2.36.11.bb  |   2 +-
 .../gnome/adwaita-icon-theme_3.28.0.bb|   2 +
 meta/recipes-gnome/gtk+/gtk+.inc  |   5 +-
 meta/recipes-gnome/gtk+/gtk+3.inc |  29 +++--
 .../gtk+/gtk-icon-utils-native_3.22.30.bb |  63 ---
 ...endency-from-gtk-encode-symbolic-svg.patch | 102 --
 .../hicolor-icon-theme_0.17.bb|   2 +
 meta/recipes-graphics/cairo/cairo_1.14.12.bb  |   2 +-
 .../harfbuzz/harfbuzz_2.2.0.bb|   2 +-
 .../jpeg/libjpeg-turbo_2.0.1.bb   |   3 +-
 .../libepoxy/libepoxy_1.5.3.bb|  12 +++
 meta/recipes-graphics/mesa/mesa-gl_18.1.9.bb  |   2 +
 meta/recipes-graphics/mesa/mesa.inc   |  12 ++-
 meta/recipes-graphics/pango/pango_1.42.4.bb   |   2 +-
 .../ttf-fonts/liberation-fonts_2.00.1.bb  |   2 +
 .../virglrenderer/virglrenderer_git.bb|  17 +++
 .../xorg-lib/libxcomposite_0.4.4.bb   |   2 +-
 .../xorg-lib/libxdamage_1.1.4.bb  |   2 +-
 meta/recipes-graphics/xorg-lib/libxi_1.7.9.bb |   2 +
 .../xorg-lib/libxtst_1.2.3.bb |   1 +
 

Re: [OE-core] [PATCH] sdl2: fix sdl2.pc include paths

2019-01-14 Thread Andreas Müller
My two comments:

1. There is already an upgrade libsdl2 -> 2.09 pending so this patch
needs rebase [1]
2. Removing CFLAGS is easier but potentially a risk of unwanted
effects. My sdl2.pc contains -D_REENTRANT. This should be obsolete but
who guarantees that there isn't some old application still requiring
it (because it is set in other build environments).

[1] 
http://lists.openembedded.org/pipermail/openembedded-core/2019-January/277739.html

Andreas


On Mon, Jan 14, 2019 at 11:52 AM Burton, Ross  wrote:
>
> Would it be easier to just remove @SDL_CFLAGS@ from sdl.pc.in?  Does that 
> contain other values that are needed, or are they all spurious?
>
> Ross
>
> On Sat, 12 Jan 2019 at 08:43, Samuli Piippo  wrote:
>>
>> SDL2 dumps all cflags to the sdl2.pc, which might then contain paths
>> to the recipe sysroot include dirs.
>>
>> Signed-off-by: Samuli Piippo 
>> ---
>>  meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb | 4 
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb 
>> b/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
>> index 812a9abf3c..a9c5d8a443 100644
>> --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
>> +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
>> @@ -64,6 +64,10 @@ do_configure_prepend() {
>>  export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
>>  }
>>
>> +do_install_append() {
>> +sed -i -e "s|${STAGING_INCDIR}|$\{includedir}|g" 
>> ${D}${libdir}/pkgconfig/sdl2.pc
>> +}
>> +
>>  FILES_${PN}-dev += "${libdir}/cmake"
>>
>>  BBCLASSEXTEND = "native nativesdk"
>> --
>> 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
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 12/12] utils-linux: final cleanup

2019-01-14 Thread André Draszik
From: André Draszik 

* use ${PN} instead of util-linux
* use PACKAGESPLITFUNCS for creating util-linux-lib* packages
  rather than an _append OVERRIDE
* sort ALTERNATIVE_LINK_NAME alphabetically

[YOCTO #13058]

Signed-off-by: André Draszik 
---
 meta/recipes-core/util-linux/util-linux.inc | 131 +---
 1 file changed, 58 insertions(+), 73 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index e25ff17098..aad95791e3 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -28,8 +28,8 @@ MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
 SRC_URI = 
"${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \
"
 
-PACKAGES =+ "util-linux-swaponoff"
-PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 
'util-linux-pylibmount', '', d)}"
+PACKAGES =+ "${PN}-swaponoff"
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 
'${PN}-pylibmount', '', d)}"
 
 python apply_update_alternative_renames_prepend () {
 def pkg_hook(f, pkg, file_regex, output_pattern, modulename):
@@ -43,13 +43,22 @@ python apply_update_alternative_renames_prepend () {
 d.appendVar('RRECOMMENDS_%s' % pn, ' %s' % pkg)
 pkg_hook(f, pkg, file_regex, output_pattern, modulename)
 
-do_split_packages(d, root='${base_sbindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', hook=pkg_hook, 
extra_depends='', prepend=True)
-do_split_packages(d, root='${base_bindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', hook=pkg_hook, 
extra_depends='', prepend=True)
-do_split_packages(d, root='${sbindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', 
hook=pkg_hook_with_recommends, extra_depends='', prepend=True)
-do_split_packages(d, root='${bindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', 
hook=pkg_hook_with_recommends, extra_depends='', prepend=True)
+do_split_packages(d, root='${base_sbindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='${PN} %s', hook=pkg_hook, 
extra_depends='', prepend=True)
+do_split_packages(d, root='${base_bindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='${PN} %s', hook=pkg_hook, 
extra_depends='', prepend=True)
+do_split_packages(d, root='${sbindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='${PN} %s', 
hook=pkg_hook_with_recommends, extra_depends='', prepend=True)
+do_split_packages(d, root='${bindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='${PN} %s', 
hook=pkg_hook_with_recommends, extra_depends='', prepend=True)
 }
 
-PACKAGES_DYNAMIC = "^util-linux-.*"
+python util_linux_libpackages() {
+do_split_packages(d, '${base_libdir}', '^lib(.*)\.so\..*$',
+  output_pattern='${PN}-lib%s',
+  description='${PN} lib%s',
+  extra_depends='', prepend=True, allow_links=True)
+}
+
+PACKAGESPLITFUNCS_prepend = "util_linux_libpackages "
+
+PACKAGES_DYNAMIC = "^${PN}-.*"
 
 SHARED_EXTRA_OECONF = "--disable-use-tty-group \
--disable-makeinstall-chown \
@@ -84,21 +93,21 @@ FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
 FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
 
 FILES_${PN}-last = "${bindir}/lastb"
-FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*"
-FILES_util-linux-su = "${sysconfdir}/pam.d/su-l"
-CONFFILES_util-linux-su = "${sysconfdir}/pam.d/su-l"
-FILES_util-linux-pylibmount = 
"${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
-   ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
-   
${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*"
+FILES_${PN}-runuser = "${sysconfdir}/pam.d/runuser*"
+FILES_${PN}-su = "${sysconfdir}/pam.d/su-l"
+CONFFILES_${PN}-su = "${sysconfdir}/pam.d/su-l"
+FILES_${PN}-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
+  ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
+  ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*"
 
 FILES_${PN}-setarch = "${bindir}/linux32 ${bindir}/linux64 ${bindir}/uname26"
 
 # Util-linux' blkid replaces the e2fsprogs one
-RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
-RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
+RCONFLICTS_${PN}-blkid = "e2fsprogs-blkid"
+RREPLACES_${PN}-blkid = "e2fsprogs-blkid"
 
-RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup 
util-linux-sulogin util-linux-lsblk"
-RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'util-linux-runuser util-linux-su', '', d)}"
+RDEPENDS_${PN} = "${PN}-umount ${PN}-swaponoff ${PN}-losetup ${PN}-sulogin 
${PN}-lsblk"
+RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 

[OE-core] [PATCH 11/12] util-linux: one package per binary (pt 4: bindir)

2019-01-14 Thread André Draszik
From: André Draszik 

Similar to the previous patch.

Existing packages (and current dependency by main package):
* ionice <- RRECOMMENDS
* lsblk <- RDEPENDS
* lscpu
* mcookie
* prlimit <- RRECOMMENDS
* unshare
* uuidgen

New packages:
* too many to list

To avoid breaking existing users, all the new packages
are added to the main package as RRECOMMENDS_${PN}, so
they are pulled into existing images etc.

The existing RDEPENDS_${PN} will need some further
clean-up in the future, as it appears a bit random which
packages the main package depends on vs. recommends.

Nevertheless, all existing packages have been added to
RRECOMMENDS this time, even if they weren't in RDEPENDS /
RRECOMMENDS before.

Unfortunately, we need to add explicit ALTERNATIVE_LINK_NAME[]
for a few cases, as previously they were implied using
defaults by being specified in ALTERNATIVE_${PN}. We can't
easily automate that using do_split_packages(), so we
simply add them explicitly.

[YOCTO #13058]

Signed-off-by: André Draszik 
---
 meta/recipes-core/util-linux/util-linux.inc | 41 +
 1 file changed, 18 insertions(+), 23 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index deb000c52f..e25ff17098 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -28,12 +28,7 @@ MAJOR_VERSION = 
"${@'.'.join(d.getVar('PV').split('.')[0:2])}"
 SRC_URI = 
"${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \
"
 
-PACKAGES =+ "util-linux-swaponoff \
- util-linux-uuidgen util-linux-lscpu \
- util-linux-mcookie \
- util-linux-lsblk \
- util-linux-prlimit \
- util-linux-ionice util-linux-unshare"
+PACKAGES =+ "util-linux-swaponoff"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 
'util-linux-pylibmount', '', d)}"
 
 python apply_update_alternative_renames_prepend () {
@@ -51,6 +46,7 @@ python apply_update_alternative_renames_prepend () {
 do_split_packages(d, root='${base_sbindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', hook=pkg_hook, 
extra_depends='', prepend=True)
 do_split_packages(d, root='${base_bindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', hook=pkg_hook, 
extra_depends='', prepend=True)
 do_split_packages(d, root='${sbindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', 
hook=pkg_hook_with_recommends, extra_depends='', prepend=True)
+do_split_packages(d, root='${bindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', 
hook=pkg_hook_with_recommends, extra_depends='', prepend=True)
 }
 
 PACKAGES_DYNAMIC = "^util-linux-.*"
@@ -87,21 +83,15 @@ FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
 
 FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
 
-FILES_util-linux-mcookie = "${bindir}/mcookie"
-FILES_util-linux-uuidgen = "${bindir}/uuidgen"
-FILES_util-linux-prlimit = "${bindir}/prlimit"
-FILES_util-linux-ionice = "${bindir}/ionice.${BPN}"
+FILES_${PN}-last = "${bindir}/lastb"
 FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*"
 FILES_util-linux-su = "${sysconfdir}/pam.d/su-l"
 CONFFILES_util-linux-su = "${sysconfdir}/pam.d/su-l"
-
 FILES_util-linux-pylibmount = 
"${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \

${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*"
-FILES_util-linux-lsblk = "${bindir}/lsblk"
-FILES_util-linux-lscpu = "${bindir}/lscpu"
 
-FILES_util-linux-unshare = "${bindir}/unshare.${BPN}"
+FILES_${PN}-setarch = "${bindir}/linux32 ${bindir}/linux64 ${bindir}/uname26"
 
 # Util-linux' blkid replaces the e2fsprogs one
 RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
@@ -110,7 +100,6 @@ RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
 RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup 
util-linux-sulogin util-linux-lsblk"
 RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'util-linux-runuser util-linux-su', '', d)}"
 
-RRECOMMENDS_${PN} = "util-linux-prlimit util-linux-ionice"
 RRECOMMENDS_${PN} += "${PN}-blockdev ${PN}-cfdisk ${PN}-ctrlaltdel ${PN}-fdisk 
${PN}-mkswap ${PN}-nologin ${PN}-pivot-root ${PN}-switch-root"
 RRECOMMENDS_${PN} += "${PN}-dmesg ${PN}-kill ${PN}-more ${PN}-mount 
${PN}-mountpoint"
 
@@ -194,12 +183,6 @@ do_install_append_class-native () {
 
 ALTERNATIVE_PRIORITY = "80"
 
-ALTERNATIVE_${PN}  = " \
-hexdump last lastb logger mesg renice wall \
-setsid chrt flock utmpdump eject taskset fallocate \
-nsenter cal rev \
-"
-
 ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
 ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
 ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more"
@@ -207,9 +190,23 @@ 

[OE-core] [PATCH 09/12] util-linux: one package per binary (pt 2: base_bindir)

2019-01-14 Thread André Draszik
From: André Draszik 

Similar to the previous patch.

Existing packages (and current dependency by main package):
* mount <- RRECOMMENDS
* umount <- RDEPENDS
* mountpoint <- RRECOMMENDS
* getopt
* su <- RDEPENDS

New packages:
* dmesg
* kill
* more

To avoid breaking existing users, all the new packages
are added to the main package as RRECOMMENDS_${PN}, so
they are pulled into existing images etc.

The existing RDEPENDS_${PN} will need some further
clean-up in the future, as it appears a bit random which
packages the main package depends on vs. recommends.
Existing packages that aren't in RDEPENDS / RRECOMMENDS
haven't been added to RRECOMMENDS for that reason.

[YOCTO #13058]

Signed-off-by: André Draszik 
---
 meta/recipes-core/util-linux/util-linux.inc | 29 +++--
 1 file changed, 9 insertions(+), 20 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index c7d6c3a039..3d97be8c30 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -29,16 +29,16 @@ SRC_URI = 
"${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz
"
 
 PACKAGES =+ "util-linux-blkdiscard util-linux-sfdisk \
- util-linux-swaponoff util-linux-umount \
- util-linux-mount util-linux-readprofile util-linux-uuidd \
+ util-linux-swaponoff \
+ util-linux-readprofile util-linux-uuidd \
  util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs \
  util-linux-mkfs util-linux-mcookie util-linux-rfkill \
  util-linux-lsblk util-linux-mkfs.cramfs \
- util-linux-partx util-linux-mountpoint \
- util-linux-findfs util-linux-getopt util-linux-prlimit \
+ util-linux-partx \
+ util-linux-findfs util-linux-prlimit \
  util-linux-ionice util-linux-unshare"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 
'util-linux-pylibmount', '', d)}"
-PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'util-linux-runuser util-linux-su', '', d)}"
+PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'util-linux-runuser', '', d)}"
 
 python apply_update_alternative_renames_prepend () {
 def pkg_hook(f, pkg, file_regex, output_pattern, modulename):
@@ -48,6 +48,7 @@ python apply_update_alternative_renames_prepend () {
 d.setVar('ALTERNATIVE_' + pkg, modulename)
 
 do_split_packages(d, root='${base_sbindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', hook=pkg_hook, 
extra_depends='', prepend=True)
+do_split_packages(d, root='${base_bindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', hook=pkg_hook, 
extra_depends='', prepend=True)
 }
 
 PACKAGES_DYNAMIC = "^util-linux-.*"
@@ -86,21 +87,18 @@ FILES_${PN}-dev += 
"${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
 
 FILES_util-linux-blkdiscard = "${sbindir}/blkdiscard"
 FILES_util-linux-sfdisk = "${sbindir}/sfdisk"
-FILES_util-linux-mount = "${base_bindir}/mount.${BPN}"
 FILES_util-linux-mcookie = "${bindir}/mcookie"
-FILES_util-linux-umount = "${base_bindir}/umount.${BPN}"
 FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}"
 FILES_util-linux-uuidgen = "${bindir}/uuidgen"
 FILES_util-linux-uuidd = "${sbindir}/uuidd"
 FILES_util-linux-rfkill = "${sbindir}/rfkill.${BPN}"
 FILES_util-linux-partx = "${sbindir}/partx"
 FILES_util-linux-findfs = "${sbindir}/findfs"
-FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}"
 FILES_util-linux-runuser = "${sbindir}/runuser"
 FILES_util-linux-prlimit = "${bindir}/prlimit"
 FILES_util-linux-ionice = "${bindir}/ionice.${BPN}"
 FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*"
-FILES_util-linux-su = "${base_bindir}/su.${BPN} ${sysconfdir}/pam.d/su-l"
+FILES_util-linux-su = "${sysconfdir}/pam.d/su-l"
 CONFFILES_util-linux-su = "${sysconfdir}/pam.d/su-l"
 
 FILES_util-linux-pylibmount = 
"${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
@@ -114,8 +112,6 @@ FILES_util-linux-mkfs = "${sbindir}/mkfs"
 FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
 FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
 
-FILES_util-linux-mountpoint = "${base_bindir}/mountpoint.${BPN}"
-
 FILES_util-linux-unshare = "${bindir}/unshare.${BPN}"
 
 # Util-linux' blkid replaces the e2fsprogs one
@@ -125,8 +121,9 @@ RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
 RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup 
util-linux-sulogin util-linux-lsblk"
 RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'util-linux-runuser util-linux-su', '', d)}"
 
-RRECOMMENDS_${PN} = "util-linux-blkdiscard util-linux-sfdisk util-linux-mount 
util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit 
util-linux-ionice"
+RRECOMMENDS_${PN} = "util-linux-blkdiscard util-linux-sfdisk 
util-linux-readprofile 

[OE-core] [PATCH 07/12] update-alternatives: try to update FILES_${PN} when renaming a file

2019-01-14 Thread André Draszik
From: André Draszik 

When using update-alternatives, FILES_${PN} must be
referencing the new name after update-alternatives has
renamed files.

This is more or less OK when having static lists of files to
be packaged into a package, but makes it quite hard to
dynamically generate FILES_${PN}, e.g. using do_split_packages(),
as in that case we can not easily modify what goes into
FILES_${PN}, because that list is based on filenames as seen
at the time do_split_packages() is executing.

Of couse one could explicitly specify the (renamed) file(s)
in the recipe, but that contradicts the intended usage of
do_split_packages().

Instead, if FILES_${PN} contains the file name as it was pre
renaming, we here modify this to reflect the new name.

This will allow usage of do_split_packages() to populate
FILES_${PN}.

[YOCTO #13058]

Signed-off-by: André Draszik 
---
 meta/classes/update-alternatives.bbclass | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/meta/classes/update-alternatives.bbclass 
b/meta/classes/update-alternatives.bbclass
index ffedada2f6..a204afb060 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -139,6 +139,8 @@ python perform_packagecopy_append () {
 }
 
 python apply_update_alternative_renames () {
+from re import sub
+
 # Check for deprecated usage...
 pn = d.getVar('BPN')
 if d.getVar('ALTERNATIVE_LINKS') != None:
@@ -178,6 +180,10 @@ python apply_update_alternative_renames () {
 else:
 bb.note('%s: Rename %s -> %s' % (pn, alt_target, 
alt_target_rename))
 os.rename(src, dest)
+f = d.getVar('FILES_' + pkg)
+if f:
+f = sub(r'(^|\s)%s(\s|$)' % alt_target, r'\1%s\2' 
% alt_target_rename, f)
+d.setVar('FILES_' + pkg, f)
 else:
 bb.warn("%s: alternative target (%s or %s) does not exist, 
skipping..." % (pn, alt_target, alt_target_rename))
 continue
@@ -204,6 +210,11 @@ python apply_update_alternative_renames () {
 os.unlink(src)
 else:
 bb.warn('%s: Unable to resolve dangling symlink: %s' % 
(pn, alt_target))
+continue
+f = d.getVar('FILES_' + pkg)
+if f:
+f = sub(r'(^|\s)%s(\s|$)' % alt_target, r'\1%s\2' % 
alt_target_rename, f)
+d.setVar('FILES_' + pkg, f)
 }
 
 PACKAGESPLITFUNCS_prepend = "populate_packages_updatealternatives "
-- 
2.20.1

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


[OE-core] [PATCH 10/12] util-linux: one package per binary (pt 3: sbindir)

2019-01-14 Thread André Draszik
From: André Draszik 

Similar to the previous patch.

Existing packages (and current dependency by main package):
* blkdiscard <- RRECOMMENDS
* findfs
* fsck.cramfs
* mkfs <- RRECOMMENDS
* mkfs.cramfs
* partx
* readprofile <- RRECOMMENDS
* rfkill
* runuser <- RDEPENDS
* sfdisk <- RRECOMMENDS
* uuidd

New packages:
* too many to list

To avoid breaking existing users, all the new packages
are added to the main package as RRECOMMENDS_${PN}, so
they are pulled into existing images etc.

The existing RDEPENDS_${PN} will need some further
clean-up in the future, as it appears a bit random which
packages the main package depends on vs. recommends.

Nevertheless, all existing packages have been added to
RRECOMMENDS this time, even if they weren't in RDEPENDS /
RRECOMMENDS before.

[YOCTO #13058]

Signed-off-by: André Draszik 
---
 meta/recipes-core/util-linux/util-linux.inc | 39 +++--
 1 file changed, 13 insertions(+), 26 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index 3d97be8c30..deb000c52f 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -28,17 +28,13 @@ MAJOR_VERSION = 
"${@'.'.join(d.getVar('PV').split('.')[0:2])}"
 SRC_URI = 
"${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \
"
 
-PACKAGES =+ "util-linux-blkdiscard util-linux-sfdisk \
- util-linux-swaponoff \
- util-linux-readprofile util-linux-uuidd \
- util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs \
- util-linux-mkfs util-linux-mcookie util-linux-rfkill \
- util-linux-lsblk util-linux-mkfs.cramfs \
- util-linux-partx \
- util-linux-findfs util-linux-prlimit \
+PACKAGES =+ "util-linux-swaponoff \
+ util-linux-uuidgen util-linux-lscpu \
+ util-linux-mcookie \
+ util-linux-lsblk \
+ util-linux-prlimit \
  util-linux-ionice util-linux-unshare"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 
'util-linux-pylibmount', '', d)}"
-PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'util-linux-runuser', '', d)}"
 
 python apply_update_alternative_renames_prepend () {
 def pkg_hook(f, pkg, file_regex, output_pattern, modulename):
@@ -47,8 +43,14 @@ python apply_update_alternative_renames_prepend () {
 if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename):
 d.setVar('ALTERNATIVE_' + pkg, modulename)
 
+def pkg_hook_with_recommends(f, pkg, file_regex, output_pattern, 
modulename):
+pn = d.getVar('PN')
+d.appendVar('RRECOMMENDS_%s' % pn, ' %s' % pkg)
+pkg_hook(f, pkg, file_regex, output_pattern, modulename)
+
 do_split_packages(d, root='${base_sbindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', hook=pkg_hook, 
extra_depends='', prepend=True)
 do_split_packages(d, root='${base_bindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', hook=pkg_hook, 
extra_depends='', prepend=True)
+do_split_packages(d, root='${sbindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', 
hook=pkg_hook_with_recommends, extra_depends='', prepend=True)
 }
 
 PACKAGES_DYNAMIC = "^util-linux-.*"
@@ -85,16 +87,8 @@ FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
 
 FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
 
-FILES_util-linux-blkdiscard = "${sbindir}/blkdiscard"
-FILES_util-linux-sfdisk = "${sbindir}/sfdisk"
 FILES_util-linux-mcookie = "${bindir}/mcookie"
-FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}"
 FILES_util-linux-uuidgen = "${bindir}/uuidgen"
-FILES_util-linux-uuidd = "${sbindir}/uuidd"
-FILES_util-linux-rfkill = "${sbindir}/rfkill.${BPN}"
-FILES_util-linux-partx = "${sbindir}/partx"
-FILES_util-linux-findfs = "${sbindir}/findfs"
-FILES_util-linux-runuser = "${sbindir}/runuser"
 FILES_util-linux-prlimit = "${bindir}/prlimit"
 FILES_util-linux-ionice = "${bindir}/ionice.${BPN}"
 FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*"
@@ -107,11 +101,6 @@ FILES_util-linux-pylibmount = 
"${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so
 FILES_util-linux-lsblk = "${bindir}/lsblk"
 FILES_util-linux-lscpu = "${bindir}/lscpu"
 
-FILES_util-linux-mkfs = "${sbindir}/mkfs"
-
-FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
-FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
-
 FILES_util-linux-unshare = "${bindir}/unshare.${BPN}"
 
 # Util-linux' blkid replaces the e2fsprogs one
@@ -121,7 +110,7 @@ RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
 RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup 
util-linux-sulogin util-linux-lsblk"
 RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'util-linux-runuser util-linux-su', '', d)}"
 
-RRECOMMENDS_${PN} = "util-linux-blkdiscard 

[OE-core] [PATCH 08/12] util-linux: one package per binary (pt 1: base_sbindir)

2019-01-14 Thread André Draszik
From: André Draszik 

Now that we have required infrastructure in place, we
can start creating one package per binary.

To make this process easier to follow, this is done
in steps, starting with binaries from base_sbindir.

Existing packages (and current dependency by main package):
* agetty
* blkid
* cfdisk <- RRECOMMENDS
* fdisk <- RRECOMMENDS
* fsck
* fstrim
* losetup <- RDEPENDS
* hwclock
* sulogin <- RDEPENDS
* swaponoff <- RDEPENDS
* switch-root <- RRECOMMENDS

New packages:
* blockdev
* ctrlaltdel
* mkswap
* nologin
* pivot-root
* swapon
* swapoff

swaponoff is empty now and simply depends on swapon swapoff

To avoid breaking existing users, all the new packages
are added to the main package as RRECOMMENDS_${PN}, so
they are pulled into existing images etc.

The existing RDEPENDS_${PN} will need some further
clean-up in the future, as it appears a bit random which
packages the main package depends on vs. recommends.
Existing packages that aren't in RDEPENDS / RRECOMMENDS
haven't been added to RRECOMMENDS for that reason.

[YOCTO #13058]

Signed-off-by: André Draszik 
---
 meta/recipes-core/util-linux/util-linux.inc | 58 +
 1 file changed, 26 insertions(+), 32 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index 68534d8744..c7d6c3a039 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -28,19 +28,29 @@ MAJOR_VERSION = 
"${@'.'.join(d.getVar('PV').split('.')[0:2])}"
 SRC_URI = 
"${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \
"
 
-PACKAGES =+ "util-linux-agetty util-linux-blkdiscard util-linux-fdisk 
util-linux-cfdisk util-linux-sfdisk \
- util-linux-swaponoff util-linux-losetup util-linux-umount \
+PACKAGES =+ "util-linux-blkdiscard util-linux-sfdisk \
+ util-linux-swaponoff util-linux-umount \
  util-linux-mount util-linux-readprofile util-linux-uuidd \
- util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs 
util-linux-fsck \
- util-linux-blkid util-linux-mkfs util-linux-mcookie 
util-linux-rfkill \
- util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \
- util-linux-partx util-linux-hwclock util-linux-mountpoint \
- util-linux-findfs util-linux-getopt util-linux-sulogin 
util-linux-prlimit \
- util-linux-ionice util-linux-switch-root util-linux-unshare"
+ util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs \
+ util-linux-mkfs util-linux-mcookie util-linux-rfkill \
+ util-linux-lsblk util-linux-mkfs.cramfs \
+ util-linux-partx util-linux-mountpoint \
+ util-linux-findfs util-linux-getopt util-linux-prlimit \
+ util-linux-ionice util-linux-unshare"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 
'util-linux-pylibmount', '', d)}"
 PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'util-linux-runuser util-linux-su', '', d)}"
 
-PACKAGES_DYNAMIC = "^util-linux-lib.*"
+python apply_update_alternative_renames_prepend () {
+def pkg_hook(f, pkg, file_regex, output_pattern, modulename):
+if d.getVar('ALTERNATIVE_' + pkg):
+return
+if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename):
+d.setVar('ALTERNATIVE_' + pkg, modulename)
+
+do_split_packages(d, root='${base_sbindir}', file_regex='(.*)', 
output_pattern='${BPN}-%s', description='util-linux %s', hook=pkg_hook, 
extra_depends='', prepend=True)
+}
+
+PACKAGES_DYNAMIC = "^util-linux-.*"
 
 SHARED_EXTRA_OECONF = "--disable-use-tty-group \
--disable-makeinstall-chown \
@@ -74,14 +84,8 @@ FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
 
 FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
 
-FILES_util-linux-agetty = "${base_sbindir}/agetty"
 FILES_util-linux-blkdiscard = "${sbindir}/blkdiscard"
-FILES_util-linux-fdisk = "${base_sbindir}/fdisk.${BPN}"
-FILES_util-linux-fstrim = "${base_sbindir}/fstrim.${BPN}"
-FILES_util-linux-cfdisk = "${base_sbindir}/cfdisk"
 FILES_util-linux-sfdisk = "${sbindir}/sfdisk"
-FILES_util-linux-swaponoff = "${base_sbindir}/swapon.${BPN} 
${base_sbindir}/swapoff.${BPN}"
-FILES_util-linux-losetup = "${base_sbindir}/losetup.${BPN}"
 FILES_util-linux-mount = "${base_bindir}/mount.${BPN}"
 FILES_util-linux-mcookie = "${bindir}/mcookie"
 FILES_util-linux-umount = "${base_bindir}/umount.${BPN}"
@@ -90,7 +94,6 @@ FILES_util-linux-uuidgen = "${bindir}/uuidgen"
 FILES_util-linux-uuidd = "${sbindir}/uuidd"
 FILES_util-linux-rfkill = "${sbindir}/rfkill.${BPN}"
 FILES_util-linux-partx = "${sbindir}/partx"
-FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}"
 FILES_util-linux-findfs = "${sbindir}/findfs"
 FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}"
 FILES_util-linux-runuser = "${sbindir}/runuser"
@@ -106,27 +109,24 @@ 

[OE-core] [PATCH 06/12] update-alternatives: allow hooks before renaming files

2019-01-14 Thread André Draszik
From: André Draszik 

At the moment, the update alternatives handling is happening
right after copying into PKGD during packaging time using
an _append OVERRIDE to the copy function. This means that at
this point the PACKAGES variable must have been fully
populated, as that is a prerequisite for update-alternatives.

In other words, this makes it impossible to e.g. populate
PACKAGES dynamically using do_split_packages() and still do
update-alternatives, as do_split_packages() can never
execute early enough in a deterministic way.

By converting the existing python function from a 'def'
type function to a 'python' type function, we now make it
possible for somebody to hook themselves between copying
into PKGD and execution of update-alternatives, via
a _prepend OVERRIDE, which is not possible with 'def' type
functions.

[YOCTO #13058]

Signed-off-by: André Draszik 
---
 meta/classes/update-alternatives.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/update-alternatives.bbclass 
b/meta/classes/update-alternatives.bbclass
index f1250f877b..ffedada2f6 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -135,10 +135,10 @@ populate_packages[vardeps] += "${UPDALTVARS} 
${@gen_updatealternativesvars(d)}"
 # place.
 python perform_packagecopy_append () {
 if update_alternatives_enabled(d):
-apply_update_alternative_renames(d)
+bb.build.exec_func('apply_update_alternative_renames', d)
 }
 
-def apply_update_alternative_renames(d):
+python apply_update_alternative_renames () {
 # Check for deprecated usage...
 pn = d.getVar('BPN')
 if d.getVar('ALTERNATIVE_LINKS') != None:
@@ -204,6 +204,7 @@ def apply_update_alternative_renames(d):
 os.unlink(src)
 else:
 bb.warn('%s: Unable to resolve dangling symlink: %s' % 
(pn, alt_target))
+}
 
 PACKAGESPLITFUNCS_prepend = "populate_packages_updatealternatives "
 
-- 
2.20.1

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


[OE-core] [PATCH 04/12] util-linux: be more explicit about what files go into packages

2019-01-14 Thread André Draszik
From: André Draszik 

Just using a wildcard leaves the reader wondering
what is meant here.

By being explicit we can describe exactly what is
intended, i.e. the file name as resulting from
the ALTERNATIVE and ALTERNATIVE_LINK_NAME mechanism.

Signed-off-by: André Draszik 
---
 meta/recipes-core/util-linux/util-linux.inc | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index 8c8cbde8c2..79ab302e6a 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -88,7 +88,7 @@ FILES_util-linux-umount = "${base_bindir}/umount.${BPN}"
 FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}"
 FILES_util-linux-uuidgen = "${bindir}/uuidgen"
 FILES_util-linux-uuidd = "${sbindir}/uuidd"
-FILES_util-linux-rfkill = "${sbindir}/rfkill*"
+FILES_util-linux-rfkill = "${sbindir}/rfkill.${BPN}"
 FILES_util-linux-partx = "${sbindir}/partx"
 FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}"
 FILES_util-linux-findfs = "${sbindir}/findfs"
@@ -105,20 +105,20 @@ FILES_util-linux-pylibmount = 
"${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so
 FILES_util-linux-lsblk = "${bindir}/lsblk"
 FILES_util-linux-lscpu = "${bindir}/lscpu"
 
-FILES_util-linux-fsck = "${base_sbindir}/fsck*"
+FILES_util-linux-fsck = "${base_sbindir}/fsck.${BPN}"
 FILES_util-linux-mkfs = "${sbindir}/mkfs"
 
 FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
 FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
 
-FILES_util-linux-sulogin = "${base_sbindir}/sulogin*"
+FILES_util-linux-sulogin = "${base_sbindir}/sulogin.${BPN}"
 FILES_util-linux-mountpoint = "${base_bindir}/mountpoint.${BPN}"
 
 FILES_util-linux-switch-root = "${base_sbindir}/switch_root.${BPN}"
 FILES_util-linux-unshare = "${bindir}/unshare.${BPN}"
 
 # Util-linux' blkid replaces the e2fsprogs one
-FILES_util-linux-blkid = "${base_sbindir}/blkid*"
+FILES_util-linux-blkid = "${base_sbindir}/blkid.${BPN}"
 RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
 RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
 
-- 
2.20.1

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


[OE-core] [PATCH 05/12] util-linux: fix the su and runuser packages

2019-01-14 Thread André Draszik
From: André Draszik 

The packages get an automatic RDEPENDS via shlibs, no
need to explicitly state it, so we can drop those
useless explicit assignments.

su is moved into ${base_bindir} in do_install(), so
because of a mismatched FILES specification su is
actually packaged into the main package at the moment,
not into the -su package as likely originally intended.

runuser needs the pam configuration files, so they should
be in the -runuser package, not in the main package.

While fixing this, we can simplify the update alternatives
processing for su.

[YOCTO #13058]

Signed-off-by: André Draszik 
---
 meta/recipes-core/util-linux/util-linux.inc | 20 +++-
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index 79ab302e6a..68534d8744 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -96,7 +96,8 @@ FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}"
 FILES_util-linux-runuser = "${sbindir}/runuser"
 FILES_util-linux-prlimit = "${bindir}/prlimit"
 FILES_util-linux-ionice = "${bindir}/ionice.${BPN}"
-FILES_util-linux-su = "${bindir}/su.util-linux ${sysconfdir}/pam.d/su-l"
+FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*"
+FILES_util-linux-su = "${base_bindir}/su.${BPN} ${sysconfdir}/pam.d/su-l"
 CONFFILES_util-linux-su = "${sysconfdir}/pam.d/su-l"
 
 FILES_util-linux-pylibmount = 
"${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
@@ -122,9 +123,6 @@ FILES_util-linux-blkid = "${base_sbindir}/blkid.${BPN}"
 RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
 RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
 
-RDEPENDS_util-linux-runuser += "libpam"
-RDEPENDS_util-linux-su += "libpam"
-
 RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup 
util-linux-sulogin util-linux-lsblk"
 RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'util-linux-runuser util-linux-su', '', d)}"
 
@@ -228,6 +226,7 @@ ALTERNATIVE_LINK_NAME[fsfreeze] = "${sbindir}/fsfreeze"
 ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
 
 ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 
sulogin.8 utmpdump.1 rfkill.8 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3 
eject.1 logger.1"
+ALTERNATIVE_${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', 
'', d)}"
 
 ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
 ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1"
@@ -235,6 +234,7 @@ ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
 ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
 ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8"
 ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8"
+ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1"
 ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
 ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
 ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
@@ -263,6 +263,9 @@ ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty"
 ALTERNATIVE_util-linux-mount = "mount"
 ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount"
 
+ALTERNATIVE_${PN}-su = "su"
+ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
+
 ALTERNATIVE_util-linux-umount = "umount"
 ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount"
 
@@ -305,15 +308,6 @@ ALTERNATIVE_LINK_NAME[switch_root] = 
"${base_sbindir}/switch_root"
 
 BBCLASSEXTEND = "native nativesdk"
 
-python do_package_prepend () {
-if '--enable-su' in d.getVar('EXTRA_OECONF').split():
-d.appendVar(d.expand('ALTERNATIVE_${PN}'), ' su')
-d.appendVar(d.expand('ALTERNATIVE_${PN}-doc'), ' su.1')
-
-d.setVarFlag('ALTERNATIVE_LINK_NAME', "su", 
d.expand('${base_bindir}/su'))
-d.setVarFlag('ALTERNATIVE_LINK_NAME', "su.1", 
d.expand('${mandir}/man1/su.1'))
-}
-
 python populate_packages_prepend() {
 do_split_packages(d, '${base_libdir}', '^lib(.*)\.so\..*$',
   output_pattern='util-linux-lib%s',
-- 
2.20.1

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


[OE-core] [PATCH 03/12] util-linux: remove minix remnants

2019-01-14 Thread André Draszik
From: André Draszik 

While commit fc66762d7c11 ("util-linux: Disable minix support.")
(or e88cee8cc31d in poky) removed most of the bits, there are
still references to minix remaining.

Remove them.

Signed-off-by: André Draszik 
---
 meta/recipes-core/util-linux/util-linux.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index a1702da5b4..8c8cbde8c2 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -159,7 +159,7 @@ do_install () {
mkdir -p ${D}${base_bindir}
 
 sbinprogs="agetty ctrlaltdel cfdisk vipw vigr"
-sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup 
swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root nologin"
+sbinprogs_a="pivot_root hwclock mkswap losetup swapon swapoff fdisk 
fsck blkid blockdev fstrim sulogin switch_root nologin"
 binprogs_a="dmesg getopt kill more umount mount login su mountpoint"
 
 if [ "${base_sbindir}" != "${sbindir}" ]; then
-- 
2.20.1

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


[OE-core] [PATCH 02/12] util-linux: remove erroneous patch (qsort_r)

2019-01-14 Thread André Draszik
From: André Draszik 

The patch in question is patching the code to use
qsort() instead of qsort_r(), without adopting the
compare function. This is a major issue, because
the compare function as written is evaluating /
accessing a third argument, which is not passed
with this OE patch, causing access to random
memory.

Given this patch was added so as to support (old)
linux (host) distros which might not provide
qsort_r(), according to the git history, and given
these days util-linux detects availability of
qsort_r() during configure phase, and given musl
builds (which doesn't provide qsort_r() either)
work without problem, the right solution is to
simply drop this invalid patch.

Do so.

Signed-off-by: André Draszik 
---
 .../util-linux/util-linux-native-qsort.patch  | 33 ---
 .../util-linux/util-linux_2.32.1.bb   |  6 
 2 files changed, 39 deletions(-)
 delete mode 100644 
meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch

diff --git 
a/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch 
b/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch
deleted file mode 100644
index 68bf22de8c..00
--- a/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From f220d809be1baa654503bf6ff52f3630b0d7015c Mon Sep 17 00:00:00 2001
-From: Robert Yang 
-Date: Wed, 26 Mar 2014 01:30:29 +
-Subject: [PATCH] sun.c: use qsort() to instead of qsort_r()
-
-qsort_r() was added to glibc in version 2.8, so there is no qsort_r() on
-the host like CentOS 5.x.
-
-Upstream-Status: Inappropriate [Other]
-
-Signed-off-by: Robert Yang 

- libfdisk/src/sun.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-Index: util-linux-2.24.2/libfdisk/src/sun.c
-===
 util-linux-2.24.2.orig/libfdisk/src/sun.c
-+++ util-linux-2.24.2/libfdisk/src/sun.c
-@@ -431,10 +431,9 @@ static int sun_verify_disklabel(struct f
- }
- verify_sun_starts = starts;
- 
--qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]),
--(int (*)(const void *,const void *,void *)) verify_sun_cmp,
--verify_sun_starts);
--
-+qsort(array,ARRAY_SIZE(array),sizeof(array[0]),
-+ (int (*)(const void *,const void *)) verify_sun_cmp);
-+ 
- if (array[0] == -1) {
-   fdisk_info(cxt, _("No partitions defined."));
-   return 0;
diff --git a/meta/recipes-core/util-linux/util-linux_2.32.1.bb 
b/meta/recipes-core/util-linux/util-linux_2.32.1.bb
index b0492afff3..0f860c221b 100644
--- a/meta/recipes-core/util-linux/util-linux_2.32.1.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.32.1.bb
@@ -1,14 +1,8 @@
 require util-linux.inc
 
-# To support older hosts, we need to patch and/or revert
-# some upstream changes.  Only do this for native packages.
-OLDHOST = ""
-OLDHOST_class-native = "file://util-linux-native-qsort.patch"
-
 SRC_URI += "file://configure-sbindir.patch \
 file://runuser.pamd \
 file://runuser-l.pamd \
-${OLDHOST} \
 file://ptest.patch \
 file://run-ptest \
 file://display_testname_for_subtest.patch \
-- 
2.20.1

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


[OE-core] [PATCH 01/12] util-linux: simplify version upgrades (MAJOR_VERSION)

2019-01-14 Thread André Draszik
From: André Draszik 

There doesn't appear to be a need to manually and
explicitly specificy the major version (for the
download URL), it can be deduced easily from PV.

Do so.

Signed-off-by: André Draszik 
---
 meta/recipes-core/util-linux/util-linux.inc   | 3 ++-
 meta/recipes-core/util-linux/util-linux_2.32.1.bb | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index b5f77f7b6b..a1702da5b4 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -24,7 +24,8 @@ DEPENDS = "zlib ncurses virtual/crypt"
 DEPENDS_append_class-native = " lzo-native"
 DEPENDS_append_class-nativesdk = " lzo-native"
 
-SRC_URI = 
"${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz
 \
+MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
+SRC_URI = 
"${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \
"
 
 PACKAGES =+ "util-linux-agetty util-linux-blkdiscard util-linux-fdisk 
util-linux-cfdisk util-linux-sfdisk \
diff --git a/meta/recipes-core/util-linux/util-linux_2.32.1.bb 
b/meta/recipes-core/util-linux/util-linux_2.32.1.bb
index c909836cbb..b0492afff3 100644
--- a/meta/recipes-core/util-linux/util-linux_2.32.1.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.32.1.bb
@@ -1,4 +1,3 @@
-MAJOR_VERSION = "2.32"
 require util-linux.inc
 
 # To support older hosts, we need to patch and/or revert
-- 
2.20.1

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


[OE-core] [PATCH 00/12] RFC: util-linux: one package per binary

2019-01-14 Thread André Draszik
This series of patches changes util-linux to splitting into
one package per binary automatically, using do_split_packages()

* the first 5 patches are a general clean-up
* patch 2 could be classed as avoiding a potential crash
* patch 5 is important, as it fixes up some existing packaging
  problems
* the subsequent patches are the actual implementation

The slight 1st problem was that update alternatives was running
right after copying from D to PKGD, and at that point in time
PACKAGES and ALTERNATVE_xxx were expected to be fully populated.
So I changed this slightly, so that util-linux can generate
PACKAGES now right after perform_packagecopy(), but before
update-alternatives processing.

The small 2nd problem was that FILES_${PN} must reference the
renamed file name (after update-alternatives has run). Given
this is quite hard to do automatically when populating packages
using do_split_packages(), I updated update-alternatives to
update the file name in FILES_${PN} if the non-renamed file
was specified in there.
This would also allow updating all recipes to drop knowledge
about that renaming where this is done at the moment.

Finally, I am splitting up the packages, one commit per directory.

Things to note and questions:
* it is unclear to me why util-linux RDEPENDS vs. RRECOMMENDS some
  of the manually splitted packages before this series, and some
  of those pre-existing packages weren't in RRECOMMENDS or RDEPENDS
  at all.
  For that reason, the RDEPENDS on packages from base_sbindir and
  base_bindir that existed before this series, weren't updated,
  only new packages from those two directories have been added
  to RRECOMMENDS of the meta-package.

  I would suggest to drop all RDEPENDS and simply have util-linux
  RRECOMMENDS *all* the packages, but I don't know the origial
  reasoning for that distinction.

* /etc/default/mountall is the only file remaining in the util-linux
  package. I am not sure what to do with it as I coulnd't find any
  user anyway.
  Can it be dropped altogether, should it be moved into the util-linux-mount
  package instead?
  Note that the util-linux-mount and util-linux-umount existed before
  this series, but /etc/default/mountall was still packaged into
  util-linux.

* The pre-existing util-linux-swaponoff is a meta-package now, that
  simply RDEPENDS on -swapon and -swapoff, simply for backwards
  compatibility reasons, but is it really necessary, given people
  can now add -swapon and -swapoff if they want to.
  No harm in keeping it either, though.

* the -dev package RRECOMMENDS some (but not all) of the split -dev
  packages (which don't necessarily exist), e.g. util-linux-losetup-dev
  Should it RPROVIDE those itself instead? Should those be made
  ALLOW_EMPTY? Should the RRECOMMENDS be tweaked?
  What is the preferred approach here?


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


[OE-core] [PATCH] strace: add lost Upstream-Status

2019-01-14 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 .../0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch  | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch
 
b/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch
index b17dcb1d466..becee79d1a2 100644
--- 
a/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch
+++ 
b/meta/recipes-devtools/strace/strace/0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch
@@ -12,6 +12,7 @@ Fixes
 | ../../strace-4.18/tests/sigaction.c:177:36: error: 'struct_set_sa {aka 
struct set_sa}' has no member named 'restorer'
 |  # define SA_RESTORER_ARGS , new_act->restorer
 
+Upstream-Status: Pending
 Signed-off-by: Khem Raj 
 
 ---
-- 
2.11.0

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


[OE-core] [PATCH] perl: fix yet another race failure

2019-01-14 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 ...oader-separately-as-race-failures-ha.patch | 31 +++
 .../perl-sanity/perl_5.28.1.bb|  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
meta/recipes-devtools/perl-sanity/files/0001-Also-build-dynaloader-separately-as-race-failures-ha.patch

diff --git 
a/meta/recipes-devtools/perl-sanity/files/0001-Also-build-dynaloader-separately-as-race-failures-ha.patch
 
b/meta/recipes-devtools/perl-sanity/files/0001-Also-build-dynaloader-separately-as-race-failures-ha.patch
new file mode 100644
index 000..15678b83ba7
--- /dev/null
+++ 
b/meta/recipes-devtools/perl-sanity/files/0001-Also-build-dynaloader-separately-as-race-failures-ha.patch
@@ -0,0 +1,31 @@
+From 9c68cdd1a89f9b944edc804d7c5d000c45de7b85 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Mon, 14 Jan 2019 11:45:20 +0100
+Subject: [PATCH] Also build dynaloader separately as race failures have been
+ observed in Yocto.
+
+Upstream-Status: Submitted [https://github.com/arsv/perl-cross/issues/72]
+Signed-off-by: Alexander Kanavin 
+---
+ Makefile | 5 -
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 7846406..cd8d75f 100644
+--- a/Makefile
 b/Makefile
+@@ -74,10 +74,13 @@ $(CROSSPATCHED): %.applied: %.patch
+ # Force full patching before any building starts. Als, force early building
+ # of miniperl -- not really necessary, but makes the build process more 
logical.
+ # No reason to try CC if HOSTCC fails.
++#
++# Dynaloader is also built separately as race failures have been observed.
+ all:
+   $(MAKE) crosspatch
+   $(MAKE) miniperl$X
+-  $(MAKE) dynaloader perl$x nonxs_ext utilities extensions pods
++  $(MAKE) dynaloader
++  $(MAKE) perl$x nonxs_ext utilities extensions pods
+ 
+ config.h: config.sh config_h.SH
+   CONFIG_H=$@ CONFIG_SH=$< ./config_h.SH
diff --git a/meta/recipes-devtools/perl-sanity/perl_5.28.1.bb 
b/meta/recipes-devtools/perl-sanity/perl_5.28.1.bb
index 4ce158f4f81..0df821d446a 100644
--- a/meta/recipes-devtools/perl-sanity/perl_5.28.1.bb
+++ b/meta/recipes-devtools/perl-sanity/perl_5.28.1.bb
@@ -21,6 +21,7 @@ SRC_URI = 
"https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \

file://0001-configure_path.sh-do-not-hardcode-prefix-lib-as-libr.patch \
file://fix-race-failures.patch \
file://fix-race-failures-2.patch \
+   
file://0001-Also-build-dynaloader-separately-as-race-failures-ha.patch \
"
 
 SRC_URI[perl.md5sum] = "838198c43d4f39d7af797e2f59c2bee5"
-- 
2.17.1

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


Re: [OE-core] [PATCH] sdl2: fix sdl2.pc include paths

2019-01-14 Thread Burton, Ross
Would it be easier to just remove @SDL_CFLAGS@ from sdl.pc.in?  Does that
contain other values that are needed, or are they all spurious?

Ross

On Sat, 12 Jan 2019 at 08:43, Samuli Piippo  wrote:

> SDL2 dumps all cflags to the sdl2.pc, which might then contain paths
> to the recipe sysroot include dirs.
>
> Signed-off-by: Samuli Piippo 
> ---
>  meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
> b/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
> index 812a9abf3c..a9c5d8a443 100644
> --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
> +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
> @@ -64,6 +64,10 @@ do_configure_prepend() {
>  export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
>  }
>
> +do_install_append() {
> +sed -i -e "s|${STAGING_INCDIR}|$\{includedir}|g"
> ${D}${libdir}/pkgconfig/sdl2.pc
> +}
> +
>  FILES_${PN}-dev += "${libdir}/cmake"
>
>  BBCLASSEXTEND = "native nativesdk"
> --
> 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] classes/buildhistory: display modified git branches

2019-01-14 Thread André Draszik
From: André Draszik 

When collecting the git revision of repositories, also take
note of whether or not that repository has uncommited
changes.

This makes it a bit clearer what went on when looking at
diffs.

Signed-off-by: André Draszik 
---
 meta/classes/buildhistory.bbclass | 21 +++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/meta/classes/buildhistory.bbclass 
b/meta/classes/buildhistory.bbclass
index 33eb1b00f6..796f68cf8f 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -672,12 +672,29 @@ def buildhistory_get_build_id(d):
 statusheader = d.getVar('BUILDCFG_HEADER')
 return('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
 
+def buildhistory_get_modified(path):
+# copied from get_layer_git_status() in image-buildinfo.bbclass
+import subprocess
+try:
+subprocess.check_output("""cd %s; export PSEUDO_UNLOAD=1; set -e;
+git diff --quiet --no-ext-diff
+git diff --quiet --no-ext-diff --cached""" % 
path,
+shell=True,
+stderr=subprocess.STDOUT)
+return ""
+except subprocess.CalledProcessError as ex:
+# Silently treat errors as "modified", without checking for the
+# (expected) return code 1 in a modified git repo. For example, we get
+# output and a 129 return code when a layer isn't a git repo at all.
+return " -- modified"
+
 def buildhistory_get_metadata_revs(d):
 # We want an easily machine-readable format here, so get_layers_branch_rev 
isn't quite what we want
 layers = (d.getVar("BBLAYERS") or "").split()
-medadata_revs = ["%-17s = %s:%s" % (os.path.basename(i), \
+medadata_revs = ["%-17s = %s:%s%s" % (os.path.basename(i), \
 base_get_metadata_git_branch(i, None).strip(), \
-base_get_metadata_git_revision(i, None)) \
+base_get_metadata_git_revision(i, None), \
+buildhistory_get_modified(i)) \
 for i in layers]
 return '\n'.join(medadata_revs)
 
-- 
2.20.1

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