[OE-core] [PATCH v2 0/1] Customize prompt string for SDKs

2021-01-07 Thread kai
From: Kai Kang 

v2:
* set new variable SDK_PS1 in bitbake.conf
* set PS1 for buildtools-tarball too

Kai Kang (1):
  Customize prompt string for SDKs

 meta/classes/toolchain-scripts.bbclass   | 1 +
 meta/conf/bitbake.conf   | 1 +
 meta/recipes-core/meta/buildtools-tarball.bb | 1 +
 3 files changed, 3 insertions(+)

-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#146491): 
https://lists.openembedded.org/g/openembedded-core/message/146491
Mute This Topic: https://lists.openembedded.org/mt/79514186/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2 1/1] Customize prompt string for SDKs

2021-01-07 Thread kai
From: Kai Kang 

Introduce a new variable SDK_PS1 to customize prompt string for SDKs
when source script environment-setup-script. The prompt string of SDKs
is set by default with something looks like:

SDK-poky-glibc-x86_64--cortexa57-qemuarm64$

Signed-off-by: Kai Kang 
---
 meta/classes/toolchain-scripts.bbclass   | 1 +
 meta/conf/bitbake.conf   | 1 +
 meta/recipes-core/meta/buildtools-tarball.bb | 1 +
 3 files changed, 3 insertions(+)

diff --git a/meta/classes/toolchain-scripts.bbclass 
b/meta/classes/toolchain-scripts.bbclass
index db1d3215ef..88df373d0b 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -45,6 +45,7 @@ toolchain_create_sdk_env_script () {

EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${TARGET_ARCH}${TARGET_VENDOR}-$i"
done
echo "export 
PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH'
 >> $script
+   echo 'export PS1="${SDK_PS1}"' >>$script
echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script
echo 'export 
PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig'
 >> $script
echo 'export 
CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index a04005b0f5..93687f9950 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -424,6 +424,7 @@ PKGDATA_DIR = "${TMPDIR}/pkgdata/${MACHINE}"
 
 SDK_NAME_PREFIX ?= "oecore"
 SDK_NAME = "${SDK_NAME_PREFIX}-${SDK_ARCH}-${TUNE_PKGARCH}"
+SDK_PS1 ?= "SDK-${SDK_NAME}:$ "
 SDKPATH = "/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"
 SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"
 
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb 
b/meta/recipes-core/meta/buildtools-tarball.bb
index 9da81d5523..59cfc64ce8 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -71,6 +71,7 @@ create_sdk_files_append () {
echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
echo 'export 
GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' 
>>$script
echo 'export 
SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' 
>>$script
+   echo 'export PS1="${SDK_PS1}"' >>$script
 
toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#146492): 
https://lists.openembedded.org/g/openembedded-core/message/146492
Mute This Topic: https://lists.openembedded.org/mt/79514187/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] adwaita-icon-theme: add version 3.34.3 back

2021-01-20 Thread kai
From: Kai Kang 

Newer versions of adwaita-icon-theme can't work well with librsvg 2.40.
Boot up the core-image-sato image, and start "Media Player", most of the
icons are not showed properly.

The source code of librsvg has been adapted to rust, so it is impossible
to update librsvg in oe core for now. Then add adwaita-icon-theme 3.34.3
back and set as preferred version.

Duplicate one patch as well to fix patch fuzz issue.

Ref:
1. https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/issues/84
2. https://people.gnome.org/~federico/blog/do-not-use-librsvg-2.40.x.html

Signed-off-by: Kai Kang 
---
 meta/conf/distro/include/default-versions.inc |  1 +
 ...1-Don-t-use-AC_CANONICAL_HOST-3.34.3.patch | 27 
 .../gnome/adwaita-icon-theme_3.34.3.bb| 43 +++
 3 files changed, 71 insertions(+)
 create mode 100644 
meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST-3.34.3.patch
 create mode 100644 meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb

diff --git a/meta/conf/distro/include/default-versions.inc 
b/meta/conf/distro/include/default-versions.inc
index a6f331350e..5e6fd8a267 100644
--- a/meta/conf/distro/include/default-versions.inc
+++ b/meta/conf/distro/include/default-versions.inc
@@ -2,3 +2,4 @@
 # Default preferred versions
 #
 
+PREFERRED_VERSION_adwaita-icon-theme ?= "3.34.3"
diff --git 
a/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST-3.34.3.patch
 
b/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST-3.34.3.patch
new file mode 100644
index 00..4ed5e151ee
--- /dev/null
+++ 
b/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST-3.34.3.patch
@@ -0,0 +1,27 @@
+From 8b3b153b6b95662316528ef083365b46cf5f7841 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen 
+Date: Tue, 30 May 2017 14:55:49 +0300
+Subject: [PATCH] Don't use AC_CANONICAL_HOST
+
+This won't work when building allarch (and is only used to find out if
+target is windows).
+
+Upstream-Status: Inappropriate [embedded specific]
+Signed-off-by: Jussi Kukkonen 
+
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 449865d..888649e 100644
+--- a/configure.ac
 b/configure.ac
+@@ -3,7 +3,6 @@ AC_PREREQ(2.53)
+ 
+ AC_INIT([adwaita-icon-theme], [3.34.3],
+ [http://bugzilla.gnome.org/enter_bug.cgi?product=adwaita-icon-theme])
+-AC_CANONICAL_HOST
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_SRCDIR([index.theme.in])
+ 
diff --git a/meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb 
b/meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb
new file mode 100644
index 00..6cde6fffa3
--- /dev/null
+++ b/meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb
@@ -0,0 +1,43 @@
+SUMMARY = "GTK+ icon theme"
+HOMEPAGE = "https://gitlab.gnome.org/GNOME/adwaita-icon-theme";
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/adwaita-icon-theme/issues";
+SECTION = "x11/gnome"
+
+LICENSE = "LGPL-3.0 | CC-BY-SA-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c \
+
file://COPYING_CCBYSA3;md5=96143d33de3a79321b1006c4e8ed07e7 \
+file://COPYING_LGPL;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+inherit allarch autotools pkgconfig gettext gtk-icon-cache 
upstream-version-is-even
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+   file://0001-Don-t-use-AC_CANONICAL_HOST-3.34.3.patch \
+   file://0001-Run-installation-commands-as-shell-jobs.patch \
+   "
+
+SRC_URI[md5sum] = "9aea4ad9bc002aacad155ee0748b357f"
+SRC_URI[sha256sum] = 
"e7c2d8c259125d5f35ec09522b88c8fe7ecf625224ab0811213ef0a95d90b908"
+
+DEPENDS += "librsvg-native"
+
+PACKAGES = "${PN}-cursors ${PN}-symbolic-hires ${PN}-symbolic ${PN}-hires 
${PN}"
+
+RREPLACES_${PN} = "gnome-icon-theme"
+RCONFLICTS_${PN} = "gnome-icon-theme"
+RPROVIDES_${PN} = "gnome-icon-theme"
+
+FILES_${PN}-cursors = "${prefix}/share/icons/Adwaita/cursors/"
+FILES_${PN}-symbolic-hires = 
"${prefix}/share/icons/Adwaita/96x96/*/*.symbolic.png \
+  
${prefix}/share/icons/Adwaita/64x64/*/*.symbolic.png \
+  
${prefix}/share/icons/Adwaita/48x48/*/*.symbolic.png \
+  
${prefix}/share/icons/Adwaita/32x32/*/*.symbolic.png"
+FILES_${PN}-symbolic = "${prefix}/share/icons/Adwaita/16x16/*/*.symbolic.png \
+${prefix}/share/icons/Adwaita/24x24/*/*.symbolic.png \
+
${prefix}/share/icons/Adwaita/scalable/*/*-symbolic*.svg"
+FILES_${PN}-hires = "${prefix}/share/icons/Adwaita/256x256/ \
+ ${prefix}/share/icons

Re: [OE-core] [PATCH] gcr: depends on gnupg-native

2020-05-14 Thread kai

On 2020/5/15 上午1:29, Alexander Kanavin wrote:
Looking gcr's autotools and meson build files, gpg executable is 
required in both. Gcr is needed only by epiphany, so I don't think 
build performance will suffer much.


It seems gcr requires command gpg long long time ago(about 8 years). But 
I don't know why just exposed recently.


https://gitlab.gnome.org/GNOME/gcr/-/commit/c6691faa0348ab087e99ab9bd9914e1d5e81fa14

Regards,
Kai



Alex

On Thu, 14 May 2020 at 15:26, Richard Purdie 
<mailto:richard.pur...@linuxfoundation.org>> wrote:


On Thu, 2020-05-14 at 09:59 +0800, kai wrote:
> On 2020/5/11 下午5:23, kai.k...@windriver.com
<mailto:kai.k...@windriver.com> wrote:
> > From: Kai Kang mailto:kai.k...@windriver.com>>
> >
> > It fails to build gcr if no commmand gpg on build host:
> >
> > > meson.build:44:0: ERROR: Program(s) ['gpg2', 'gpg'] not found or
> > > not executable
> >
> > Add dependency gnupg-native to fix the error.
> >
> > Signed-off-by: Kai Kang mailto:kai.k...@windriver.com>>
> > ---
> >   meta/recipes-gnome/gcr/gcr_3.36.0.bb <http://gcr_3.36.0.bb>
| 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-gnome/gcr/gcr_3.36.0.bb
<http://gcr_3.36.0.bb> b/meta/recipes-
> > gnome/gcr/gcr_3.36.0.bb <http://gcr_3.36.0.bb>
> > index 4fe3b2fff3..458dc8e6c4 100644
> > --- a/meta/recipes-gnome/gcr/gcr_3.36.0.bb <http://gcr_3.36.0.bb>
> > +++ b/meta/recipes-gnome/gcr/gcr_3.36.0.bb <http://gcr_3.36.0.bb>
> > @@ -8,7 +8,7 @@ BUGTRACKER = "
> > https://gitlab.gnome.org/GNOME/gcr/issues";
> >   LICENSE = "GPLv2"
> >   LIC_FILES_CHKSUM =
> > "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
> >
> > -DEPENDS = "gtk+3 p11-kit glib-2.0 libgcrypt \
> > +DEPENDS = "gtk+3 p11-kit glib-2.0 libgcrypt gnupg-native \
> >              ${@bb.utils.contains('GI_DATA_ENABLED', 'True',
> > 'libxslt-native', '', d)}"
> >
> >   GNOMEBASEBUILDCLASS = "meson"
>
> Any comment, please?

Why did this happen? Was this as a result of the move to meson? Is it
really needed and can we avoid it? native dependencies like this are a
pain from a build performance perspective...

Cheers,

Richard





--
Kai Kang
Wind River Linux

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138308): 
https://lists.openembedded.org/g/openembedded-core/message/138308
Mute This Topic: https://lists.openembedded.org/mt/74132108/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] libsecret: add meson option introspection

2020-05-21 Thread kai
From: Kai Kang 

Add meson option introspection for libsecret. For bsp which doesn't
support qemu usermode, it could disable gobject introspection build.

Signed-off-by: Kai Kang 
---
 .../0001-meson-add-option-introspection.patch | 137 ++
 .../libsecret/libsecret_0.20.3.bb |   2 +
 2 files changed, 139 insertions(+)
 create mode 100644 
meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch

diff --git 
a/meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch 
b/meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch
new file mode 100644
index 00..51ee66f42b
--- /dev/null
+++ 
b/meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch
@@ -0,0 +1,137 @@
+meson: add option introspection
+
+Add an option 'introspection' for meson which could control whether
+build GIR files or not.
+
+Upstream-Status: Submitted 
[https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/53]
+
+Signed-off-by: Kai Kang 
+---
+ libsecret/meson.build | 86 ++-
+ meson.build   |  1 +
+ meson_options.txt |  1 +
+ 3 files changed, 46 insertions(+), 42 deletions(-)
+
+diff --git a/libsecret/meson.build b/libsecret/meson.build
+index 759b5ef..2ee8850 100644
+--- a/libsecret/meson.build
 b/libsecret/meson.build
+@@ -104,50 +104,52 @@ libsecret_dep = declare_dependency(
+ )
+ 
+ # GObject Introspection
+-libsecret_gir_sources = [
+-  'secret-attributes.c',
+-  'secret-attributes.h',
+-  'secret-backend.c',
+-  'secret-backend.h',
+-  'secret-collection.c',
+-  'secret-collection.h',
+-  'secret-item.c',
+-  'secret-item.h',
+-  'secret-methods.c',
+-  'secret-password.c',
+-  'secret-password.h',
+-  'secret-paths.c',
+-  'secret-paths.h',
+-  'secret-prompt.c',
+-  'secret-prompt.h',
+-  'secret-retrievable.c',
+-  'secret-retrievable.h',
+-  'secret-schema.c',
+-  'secret-schema.h',
+-  'secret-schemas.c',
+-  'secret-schemas.h',
+-  'secret-service.c',
+-  'secret-service.h',
+-  'secret-types.h',
+-  'secret-value.c',
+-  'secret-value.h',
+-]
+-libsecret_gir_sources += version_h
+-libsecret_gir_sources += _enums_generated
+-
+-libsecret_gir = gnome.generate_gir(libsecret,
+-  sources: libsecret_gir_sources,
+-  namespace: 'Secret',
+-  nsversion: api_version_major,
+-  export_packages: 'libsecret-@0@'.format(api_version_major),
+-  includes: [ 'GObject-2.0', 'Gio-2.0' ],
+-  header: 'libsecret/secret.h',
+-  extra_args: [ '-D SECRET_COMPILATION'],
+-  install: true,
+-)
++if with_gir
++  libsecret_gir_sources = [
++'secret-attributes.c',
++'secret-attributes.h',
++'secret-backend.c',
++'secret-backend.h',
++'secret-collection.c',
++'secret-collection.h',
++'secret-item.c',
++'secret-item.h',
++'secret-methods.c',
++'secret-password.c',
++'secret-password.h',
++'secret-paths.c',
++'secret-paths.h',
++'secret-prompt.c',
++'secret-prompt.h',
++'secret-retrievable.c',
++'secret-retrievable.h',
++'secret-schema.c',
++'secret-schema.h',
++'secret-schemas.c',
++'secret-schemas.h',
++'secret-service.c',
++'secret-service.h',
++'secret-types.h',
++'secret-value.c',
++'secret-value.h',
++  ]
++  libsecret_gir_sources += version_h
++  libsecret_gir_sources += _enums_generated
++
++  libsecret_gir = gnome.generate_gir(libsecret,
++sources: libsecret_gir_sources,
++namespace: 'Secret',
++nsversion: api_version_major,
++export_packages: 'libsecret-@0@'.format(api_version_major),
++includes: [ 'GObject-2.0', 'Gio-2.0' ],
++header: 'libsecret/secret.h',
++extra_args: [ '-D SECRET_COMPILATION'],
++install: true,
++  )
++endif
+ 
+ # Vapi
+-if with_vapi
++if with_vapi and with_gir
+   libsecret_vapi = 
gnome.generate_vapi('libsecret-@0@'.format(api_version_major),
+ sources: libsecret_gir[0],
+ metadata_dirs: meson.source_root() / 'libsecret',
+diff --git a/meson.build b/meson.build
+index a26d046..d22e008 100644
+--- a/meson.build
 b/meson.build
+@@ -22,6 +22,7 @@ with_gcrypt = get_option('gcrypt')
+ enable_debug = get_option('debugging')
+ with_vapi = get_option('vapi')
+ with_gtkdoc = get_option('gtk_doc')
++with_gir = ge

Re: [OE-core] [PATCH] libsecret: add meson option introspection

2020-05-21 Thread kai

On 2020/5/21 下午6:07, Martin Jansa wrote:

If it's no longer mandatory, then please remove:
https://github.com/openembedded/openembedded-core/commit/08c86406186828dce19e101adfd118ed5d9e947e

together with:
# gobject-introspection is mandatory and cannot be configured
REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
UNKNOWN_CONFIGURE_WHITELIST_append = " introspection"

and revert
https://github.com/openembedded/openembedded-core/commit/cab86a3196ef4fcd2714591597f2503aa8138df0
as well


I'll check these patches and v2 will be sent.

Regards,
Kai





On Thu, May 21, 2020 at 11:23 AM kai <mailto:kai.k...@windriver.com>> wrote:


From: Kai Kang mailto:kai.k...@windriver.com>>

Add meson option introspection for libsecret. For bsp which doesn't
support qemu usermode, it could disable gobject introspection build.

Signed-off-by: Kai Kang mailto:kai.k...@windriver.com>>
---
 .../0001-meson-add-option-introspection.patch | 137
++
 .../libsecret/libsecret_0.20.3.bb <http://libsecret_0.20.3.bb>  
         |   2 +
 2 files changed, 139 insertions(+)
 create mode 100644
meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch

diff --git

a/meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch

b/meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch
new file mode 100644
index 00..51ee66f42b
--- /dev/null
+++

b/meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch
@@ -0,0 +1,137 @@
+meson: add option introspection
+
+Add an option 'introspection' for meson which could control whether
+build GIR files or not.
+
+Upstream-Status: Submitted
[https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/53]
+
+Signed-off-by: Kai Kang mailto:kai.k...@windriver.com>>
+---
+ libsecret/meson.build | 86
++-
+ meson.build           |  1 +
+ meson_options.txt     |  1 +
+ 3 files changed, 46 insertions(+), 42 deletions(-)
+
+diff --git a/libsecret/meson.build b/libsecret/meson.build
+index 759b5ef..2ee8850 100644
+--- a/libsecret/meson.build
 b/libsecret/meson.build
+@@ -104,50 +104,52 @@ libsecret_dep = declare_dependency(
+ )
+
+ # GObject Introspection
+-libsecret_gir_sources = [
+-  'secret-attributes.c',
+-  'secret-attributes.h',
+-  'secret-backend.c',
+-  'secret-backend.h',
+-  'secret-collection.c',
+-  'secret-collection.h',
+-  'secret-item.c',
+-  'secret-item.h',
+-  'secret-methods.c',
+-  'secret-password.c',
+-  'secret-password.h',
+-  'secret-paths.c',
+-  'secret-paths.h',
+-  'secret-prompt.c',
+-  'secret-prompt.h',
+-  'secret-retrievable.c',
+-  'secret-retrievable.h',
+-  'secret-schema.c',
+-  'secret-schema.h',
+-  'secret-schemas.c',
+-  'secret-schemas.h',
+-  'secret-service.c',
+-  'secret-service.h',
+-  'secret-types.h',
+-  'secret-value.c',
+-  'secret-value.h',
+-]
+-libsecret_gir_sources += version_h
+-libsecret_gir_sources += _enums_generated
+-
+-libsecret_gir = gnome.generate_gir(libsecret,
+-  sources: libsecret_gir_sources,
+-  namespace: 'Secret',
+-  nsversion: api_version_major,
+-  export_packages: 'libsecret-@0@'.format(api_version_major),
+-  includes: [ 'GObject-2.0', 'Gio-2.0' ],
+-  header: 'libsecret/secret.h',
+-  extra_args: [ '-D SECRET_COMPILATION'],
+-  install: true,
+-)
++if with_gir
++  libsecret_gir_sources = [
++    'secret-attributes.c',
++    'secret-attributes.h',
++    'secret-backend.c',
++    'secret-backend.h',
++    'secret-collection.c',
++    'secret-collection.h',
++    'secret-item.c',
++    'secret-item.h',
++    'secret-methods.c',
++    'secret-password.c',
++    'secret-password.h',
++    'secret-paths.c',
++    'secret-paths.h',
++    'secret-prompt.c',
++    'secret-prompt.h',
++    'secret-retrievable.c',
++    'secret-retrievable.h',
++    'secret-schema.c',
++    'secret-schema.h',
++    'secret-schemas.c',
++    'secret-schemas.h',
++    'sec

[OE-core] [PATCH v2 2/2] Revert "webkitgtk, pinentry: require gobject-introspection-data in DISTRO_FEATURES when libsecret PACKAGECONFIG is enabled"

2020-05-22 Thread kai
From: Kai Kang 

This reverts commit 91264e5e0ab40b796e214edd84c72bc88b363778.

It adds meson options 'instrospection' to disable gobject introspection
files build. So no need to check distro feature 'gobject-introspection-data'
any longer.

Keep the spaces adjustment and comment removal.

Signed-off-by: Kai Kang 
---
 meta/recipes-sato/webkit/webkitgtk_2.28.2.bb| 6 ++
 meta/recipes-support/pinentry/pinentry_1.1.0.bb | 5 ++---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-sato/webkit/webkitgtk_2.28.2.bb 
b/meta/recipes-sato/webkit/webkitgtk_2.28.2.bb
index 51596077b4..e9941c7a2c 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.28.2.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.28.2.bb
@@ -26,9 +26,7 @@ SRC_URI[sha256sum] = 
"b9d23525cfd8d22c37b5d964a9fe9a8ce7583042a2f8d3922e71e6bbc6
 inherit cmake pkgconfig gobject-introspection perlnative features_check 
upstream-version-is-even gtk-doc
 
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 
'opengl', '', d)} \
-${@bb.utils.contains('PACKAGECONFIG', 'libsecret', 
'gobject-introspection-data', '', d)} \
-"
+REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 
'opengl', '', d)}"
 
 CVE_PRODUCT = "webkitgtk webkitgtk\+"
 
@@ -44,7 +42,7 @@ PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 
'wayland x11', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 
'webgl opengl', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'webgl 
gles2', d)} \
enchant \
-   ${@bb.utils.contains('DISTRO_FEATURES', 
'gobject-introspection-data', 'libsecret', '', d)} \
+   libsecret \
   "
 
 PACKAGECONFIG[wayland] = 
"-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe 
wpebackend-fdo wayland-native"
diff --git a/meta/recipes-support/pinentry/pinentry_1.1.0.bb 
b/meta/recipes-support/pinentry/pinentry_1.1.0.bb
index dc9069b9d5..d9ca0732f7 100644
--- a/meta/recipes-support/pinentry/pinentry_1.1.0.bb
+++ b/meta/recipes-support/pinentry/pinentry_1.1.0.bb
@@ -19,9 +19,7 @@ SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
 SRC_URI[md5sum] = "3829315cb0a1e9cedc05ffe6def7a2c6"
 SRC_URI[sha256sum] = 
"68076686fa724a290ea49cdf0d1c0c1500907d1b759a3bcbfbec0293e8f56570"
 
-inherit autotools pkgconfig features_check
-
-REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'libsecret', 
'gobject-introspection-data', '', d)}"
+inherit autotools pkgconfig
 
 PACKAGECONFIG ??= "ncurses libcap"
 
@@ -29,6 +27,7 @@ PACKAGECONFIG[ncurses] = "--enable-ncurses  
--with-ncurses-include-dir=${STAGING
 PACKAGECONFIG[libcap] = "--with-libcap, --without-libcap, libcap"
 PACKAGECONFIG[qt] = "--enable-pinentry-qt, --disable-pinentry-qt, 
qtbase-native qtbase"
 PACKAGECONFIG[gtk2] = "--enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ 
glib-2.0"
+
 PACKAGECONFIG[secret] = "--enable-libsecret, --disable-libsecret, libsecret"
 
 EXTRA_OECONF = " \
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138578): 
https://lists.openembedded.org/g/openembedded-core/message/138578
Mute This Topic: https://lists.openembedded.org/mt/74394048/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH v2 0/2] Add meson option introspection for libsecret

2020-05-22 Thread kai
From: Kai Kang 

v2:
* revert distro feature check for 'gobject-introspection-data'

Build with/without config

DISTRO_FEATURES_remove = "gobject-introspection-data"

$ bitbake webkitgtk pinentry

Build successfully.

Kai Kang (2):
  libsecret: add meson option introspection
  Revert "webkitgtk, pinentry: require gobject-introspection-data in
DISTRO_FEATURES when libsecret PACKAGECONFIG is enabled"

 .../0001-meson-add-option-introspection.patch | 137 ++
 .../libsecret/libsecret_0.20.3.bb |   8 +-
 meta/recipes-sato/webkit/webkitgtk_2.28.2.bb  |   6 +-
 .../pinentry/pinentry_1.1.0.bb|   5 +-
 4 files changed, 144 insertions(+), 12 deletions(-)
 create mode 100644 
meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch

--
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138579): 
https://lists.openembedded.org/g/openembedded-core/message/138579
Mute This Topic: https://lists.openembedded.org/mt/74394050/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH v2 1/2] libsecret: add meson option introspection

2020-05-22 Thread kai
From: Kai Kang 

Add meson option 'introspection' for libsecret. For bsp which doesn't
support qemu usermode, it could disable gobject introspection build.
Then remove distro feature check for 'gobject-introspection-data' too.

Signed-off-by: Kai Kang 
---
 .../0001-meson-add-option-introspection.patch | 137 ++
 .../libsecret/libsecret_0.20.3.bb |   8 +-
 2 files changed, 140 insertions(+), 5 deletions(-)
 create mode 100644 
meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch

diff --git 
a/meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch 
b/meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch
new file mode 100644
index 00..51ee66f42b
--- /dev/null
+++ 
b/meta/recipes-gnome/libsecret/files/0001-meson-add-option-introspection.patch
@@ -0,0 +1,137 @@
+meson: add option introspection
+
+Add an option 'introspection' for meson which could control whether
+build GIR files or not.
+
+Upstream-Status: Submitted 
[https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/53]
+
+Signed-off-by: Kai Kang 
+---
+ libsecret/meson.build | 86 ++-
+ meson.build   |  1 +
+ meson_options.txt |  1 +
+ 3 files changed, 46 insertions(+), 42 deletions(-)
+
+diff --git a/libsecret/meson.build b/libsecret/meson.build
+index 759b5ef..2ee8850 100644
+--- a/libsecret/meson.build
 b/libsecret/meson.build
+@@ -104,50 +104,52 @@ libsecret_dep = declare_dependency(
+ )
+ 
+ # GObject Introspection
+-libsecret_gir_sources = [
+-  'secret-attributes.c',
+-  'secret-attributes.h',
+-  'secret-backend.c',
+-  'secret-backend.h',
+-  'secret-collection.c',
+-  'secret-collection.h',
+-  'secret-item.c',
+-  'secret-item.h',
+-  'secret-methods.c',
+-  'secret-password.c',
+-  'secret-password.h',
+-  'secret-paths.c',
+-  'secret-paths.h',
+-  'secret-prompt.c',
+-  'secret-prompt.h',
+-  'secret-retrievable.c',
+-  'secret-retrievable.h',
+-  'secret-schema.c',
+-  'secret-schema.h',
+-  'secret-schemas.c',
+-  'secret-schemas.h',
+-  'secret-service.c',
+-  'secret-service.h',
+-  'secret-types.h',
+-  'secret-value.c',
+-  'secret-value.h',
+-]
+-libsecret_gir_sources += version_h
+-libsecret_gir_sources += _enums_generated
+-
+-libsecret_gir = gnome.generate_gir(libsecret,
+-  sources: libsecret_gir_sources,
+-  namespace: 'Secret',
+-  nsversion: api_version_major,
+-  export_packages: 'libsecret-@0@'.format(api_version_major),
+-  includes: [ 'GObject-2.0', 'Gio-2.0' ],
+-  header: 'libsecret/secret.h',
+-  extra_args: [ '-D SECRET_COMPILATION'],
+-  install: true,
+-)
++if with_gir
++  libsecret_gir_sources = [
++'secret-attributes.c',
++'secret-attributes.h',
++'secret-backend.c',
++'secret-backend.h',
++'secret-collection.c',
++'secret-collection.h',
++'secret-item.c',
++'secret-item.h',
++'secret-methods.c',
++'secret-password.c',
++'secret-password.h',
++'secret-paths.c',
++'secret-paths.h',
++'secret-prompt.c',
++'secret-prompt.h',
++'secret-retrievable.c',
++'secret-retrievable.h',
++'secret-schema.c',
++'secret-schema.h',
++'secret-schemas.c',
++'secret-schemas.h',
++'secret-service.c',
++'secret-service.h',
++'secret-types.h',
++'secret-value.c',
++'secret-value.h',
++  ]
++  libsecret_gir_sources += version_h
++  libsecret_gir_sources += _enums_generated
++
++  libsecret_gir = gnome.generate_gir(libsecret,
++sources: libsecret_gir_sources,
++namespace: 'Secret',
++nsversion: api_version_major,
++export_packages: 'libsecret-@0@'.format(api_version_major),
++includes: [ 'GObject-2.0', 'Gio-2.0' ],
++header: 'libsecret/secret.h',
++extra_args: [ '-D SECRET_COMPILATION'],
++install: true,
++  )
++endif
+ 
+ # Vapi
+-if with_vapi
++if with_vapi and with_gir
+   libsecret_vapi = 
gnome.generate_vapi('libsecret-@0@'.format(api_version_major),
+ sources: libsecret_gir[0],
+ metadata_dirs: meson.source_root() / 'libsecret',
+diff --git a/meson.build b/meson.build
+index a26d046..d22e008 100644
+--- a/meson.build
 b/meson.build
+@@ -22,6 +22,7 @@ with_gcrypt = get_option('gcrypt')
+ enable_debug = get_option('debugging')

[OE-core] [PATCH] avahi-dnsconfd: rdepends on avahi-daemon

2020-06-05 Thread kai
From: Kai Kang 

Systemd service avahi-dnsconfd.service requires avahi-daemon.socket
and avahi-daemon.service which are from avahi-daemon. So make
avahi-dnsconfd rdepends on avahi-daemon.

Signed-off-by: Kai Kang 
---
 meta/recipes-connectivity/avahi/avahi_0.8.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-connectivity/avahi/avahi_0.8.bb 
b/meta/recipes-connectivity/avahi/avahi_0.8.bb
index 2b0c71159d..35d0c3ea75 100644
--- a/meta/recipes-connectivity/avahi/avahi_0.8.bb
+++ b/meta/recipes-connectivity/avahi/avahi_0.8.bb
@@ -144,6 +144,7 @@ FILES_avahi-utils = "${bindir}/avahi-* ${bindir}/b* 
${datadir}/applications/b*"
 
 RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= 
${EXTENDPKGV})"
 RDEPENDS_${PN}-dev += "${@["", " libavahi-client (= 
${EXTENDPKGV})"][bb.utils.contains('PACKAGECONFIG', 'dbus', 1, 0, d)]}"
+RDEPENDS_${PN}-dnsconfd = "${PN}-daemon"
 
 RRECOMMENDS_avahi-daemon_append_libc-glibc = " libnss-mdns"
 
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#139254): 
https://lists.openembedded.org/g/openembedded-core/message/139254
Mute This Topic: https://lists.openembedded.org/mt/74689069/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] encodings: rdepends on mkfontscale

2020-06-07 Thread kai
From: Kai Kang 

It runs mkfontdir and mkfontdir during postinst script which are from
package mkfontscale. So make encodings rdepends on mkfontscale.

Signed-off-by: Kai Kang 
---
 meta/recipes-graphics/xorg-font/encodings_1.0.5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb 
b/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
index 4d61aed183..a299bf2fb2 100644
--- a/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
+++ b/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
@@ -10,7 +10,7 @@ PE = "1"
 PR = "r3"
 
 DEPENDS = "mkfontscale-native mkfontdir-native font-util-native"
-RDEPENDS_${PN} = ""
+RDEPENDS_${PN} = "mkfontscale"
 
 SRC_URI += "file://nocompiler.patch"
 SRC_URI[md5sum] = "bbae4f247b88ccde0e85ed6a403da22a"
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#139280): 
https://lists.openembedded.org/g/openembedded-core/message/139280
Mute This Topic: https://lists.openembedded.org/mt/74727412/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH 1/2] mdadm: remove service template from SYSTEMD_SERVICE

2020-06-07 Thread kai
From: Kai Kang 

Remove service template mdmon@.service from SYSTEMD_SERVICE which should
be not started by systemctl directly. It is hanlded by udev rules.

Replace tab with spaces in SRC_URI as well.

Signed-off-by: Kai Kang 
---
 meta/recipes-extended/mdadm/mdadm_4.1.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb 
b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index 40c5273e00..001d3331a7 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -19,8 +19,8 @@ SRC_URI = 
"${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
file://0001-fix-gcc-8-format-truncation-warning.patch \
file://debian-no-Werror.patch \

file://0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch \
-  file://mdadm.init \
-  
file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \
+   file://mdadm.init \
+   
file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \
file://include_sysmacros.patch \
file://0001-mdadm-skip-test-11spare-migration.patch \
"
@@ -30,7 +30,7 @@ SRC_URI[sha256sum] = 
"ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1
 
 inherit autotools-brokensep ptest systemd
 
-SYSTEMD_SERVICE_${PN} = "mdmonitor.service mdmon@.service"
+SYSTEMD_SERVICE_${PN} = "mdmonitor.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
 CFLAGS_append_toolchain-clang = " -Wno-error=address-of-packed-member"
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#139282): 
https://lists.openembedded.org/g/openembedded-core/message/139282
Mute This Topic: https://lists.openembedded.org/mt/74730801/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH 2/2] wpa-supplicant: remove service templates from SYSTEMD_SERVICE

2020-06-07 Thread kai
From: Kai Kang 

Remove service templates wpa_supplicant-nl80211@.service and
wpa_supplicant-wired@.service from SYSTEMD_SERVICE that they should NOT
be started/stopped by calling 'systemctl' in postinst and prerm scripts.

Signed-off-by: Kai Kang 
---
 .../wpa-supplicant/wpa-supplicant_2.9.bb| 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb 
b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb
index 3e92427bb0..2936e89eed 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb
@@ -15,7 +15,7 @@ PACKAGECONFIG[openssl] = ",,openssl"
 
 inherit pkgconfig systemd
 
-SYSTEMD_SERVICE_${PN} = "wpa_supplicant.service 
wpa_supplicant-nl80211@.service wpa_supplicant-wired@.service"
+SYSTEMD_SERVICE_${PN} = "wpa_supplicant.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
 SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz  \
@@ -37,13 +37,13 @@ S = "${WORKDIR}/wpa_supplicant-${PV}"
 PACKAGES_prepend = "wpa-supplicant-passphrase wpa-supplicant-cli "
 FILES_wpa-supplicant-passphrase = "${bindir}/wpa_passphrase"
 FILES_wpa-supplicant-cli = "${sbindir}/wpa_cli"
-FILES_${PN} += "${datadir}/dbus-1/system-services/*"
+FILES_${PN} += "${datadir}/dbus-1/system-services/* 
${systemd_system_unitdir}/*"
 CONFFILES_${PN} += "${sysconfdir}/wpa_supplicant.conf"
 
 do_configure () {
${MAKE} -C wpa_supplicant clean
install -m 0755 ${WORKDIR}/defconfig wpa_supplicant/.config
-   
+
if echo "${PACKAGECONFIG}" | grep -qw "openssl"; then
ssl=openssl
elif echo "${PACKAGECONFIG}" | grep -qw "gnutls"; then
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#139281): 
https://lists.openembedded.org/g/openembedded-core/message/139281
Mute This Topic: https://lists.openembedded.org/mt/74730799/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] encodings: rdepends on mkfontscale

2020-06-08 Thread kai

On 2020/6/9 上午4:40, Richard Purdie wrote:

On Sun, 2020-06-07 at 15:18 +0800, kai wrote:

From: Kai Kang 

It runs mkfontdir and mkfontdir during postinst script which are from
package mkfontscale. So make encodings rdepends on mkfontscale.

Signed-off-by: Kai Kang 
---
  meta/recipes-graphics/xorg-font/encodings_1.0.5.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
b/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
index 4d61aed183..a299bf2fb2 100644
--- a/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
+++ b/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
@@ -10,7 +10,7 @@ PE = "1"
  PR = "r3"
  
  DEPENDS = "mkfontscale-native mkfontdir-native font-util-native"

-RDEPENDS_${PN} = ""
+RDEPENDS_${PN} = "mkfontscale"

I suspect the correct fix is that it shouldn't have these postinsts?

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=b8f089512f65a4a131c8096c281c4f3d9cf23718


OK. I'll send V2 to remove the postinsts.

Regards,
Kai




Cheers,

Richard



--
Kai Kang
Wind River Linux

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#139344): 
https://lists.openembedded.org/g/openembedded-core/message/139344
Mute This Topic: https://lists.openembedded.org/mt/74727412/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] encodings: clear postinst script

2020-06-08 Thread kai
From: Kai Kang 

Postinst script from xorg-font-common.inc doesn't apply to this recipe.
So clear the postinst script of encodings.

Signed-off-by: Kai Kang 
---
 meta/recipes-graphics/xorg-font/encodings_1.0.5.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb 
b/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
index 4d61aed183..713fcfb935 100644
--- a/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
+++ b/meta/recipes-graphics/xorg-font/encodings_1.0.5.bb
@@ -19,3 +19,7 @@ SRC_URI[sha256sum] = 
"bd96e16143a044b19e87f217cf6a3763a70c561d1076aad6f6d862ec41
 inherit allarch
 
 EXTRA_OECONF += "--with-encodingsdir=${datadir}/fonts/X11/encodings"
+
+# postinst from .inc doesn't apply to this recipe
+pkg_postinst_${PN} () {
+}
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#139345): 
https://lists.openembedded.org/g/openembedded-core/message/139345
Mute This Topic: https://lists.openembedded.org/mt/74767652/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH V3 1/3] gcc10: Update to GCC 10.1 Release

2020-06-18 Thread kai

On 6/17/20 11:50 PM, Khem Raj wrote:

On Wed, Jun 17, 2020 at 12:02 AM Kang Kai  wrote:

On 2020/5/12 上午2:28, Khem Raj wrote:

* Package new gomp header acc_prof.h
* Package lto-dump which is a new tool in gcc10
* All Changes are here [1]
* Porting apps to gcc 10 help is here [2]
* Backport a patch to fix CET errors on cross builds
* Add patch to fix mingw libstdc++

Hi Khem,

I found that the size of buildtools-extended-tarball increased a lot after this 
commit. It increases from 47MB to 54MB without recipe update.

Any thought of what may cause that problem, please?

if you are comparing between 9x and 10x then its expected to be larger
since its a major compiler release. But if you can compare the content
of both tarballs
and single out binaries which grew alarmingly may be we can look into them.


OK.  I'll check the single package. Thanks.

Regards,
Kai





Thanks.

Kai




[1] https://gcc.gnu.org/gcc-10/changes.html
[2] https://gcc.gnu.org/gcc-10/porting_to.html

Signed-off-by: Khem Raj 
---
v2: Correct SRC_URI checksums
v3: Drop icu change
 Backport a patch for CET cross compile

  meta/conf/distro/include/maintainers.inc  |   2 +-
  meta/conf/distro/include/tcmode-default.inc   |   2 +-
  .../gcc/{gcc-9.3.inc => gcc-10.1.inc} |  53 +++
  ...0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch |  15 +-
  .../0002-gcc-poison-system-directories.patch  |  47 +++---
  ...-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch |  11 +-
  .../0004-64-bit-multilib-hack.patch   |  15 +-
  .../0005-optional-libstdc.patch   |  29 ++--
  .../0006-COLLECT_GCC_OPTIONS.patch|  11 +-
  ...ts.h-in-B-instead-of-S-and-t-oe-in-B.patch |  20 +--
  .../0008-fortran-cross-compile-hack.patch |  15 +-
  .../0009-cpp-honor-sysroot.patch  |  13 +-
  .../0010-MIPS64-Default-to-N64-ABI.patch  |  11 +-
  ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch |  33 ++--
  ...gcc-Fix-argument-list-too-long-error.patch |  11 +-
  .../0013-Disable-sdt.patch|  23 ++-
  .../{gcc-9.3 => gcc-10.1}/0014-libtool.patch  |   9 +-
  ...s-fix-v4bx-to-linker-to-support-EABI.patch |  11 +-
  ...-config-files-from-B-instead-of-usin.patch |  25 ++-
  ...ir-from-.la-which-usually-points-to-.patch |  11 +-
  .../0018-export-CPP.patch |   9 +-
  ...e-target-gcc-headers-can-be-included.patch |  13 +-
  ...-directory-during-relink-if-inst_pr.patch} |  11 +-
  ...R-replacement-instead-of-hardcoding.patch} |   9 +-
  ...2-aarch64-Add-support-for-musl-ldso.patch} |   9 +-
  ...fix-libcc1-s-install-path-and-rpath.patch} |   9 +-
  ...e-sysroot-support-for-nativesdk-gcc.patch} | 112 ++---
  ...root-gcc-version-specific-dirs-with.patch} |  13 +-
  ...us-_FOR_BUILD-and-related-variables.patch} |  27 ++--
  ...27-nios2-Define-MUSL_DYNAMIC_LINKER.patch} |   9 +-
  ...-to-link-commandline-for-musl-targe.patch} |  15 +-
  ...sing-LDFLAGS-not-just-SHLIB_LDFLAGS.patch} |   9 +-
  .../0030-sync-gcc-stddef.h-with-musl.patch}   |   9 +-
  ...fault-in-precompiled-header-generat.patch} |  11 +-
  .../0032-Fix-for-testsuite-failure.patch} |   9 +-
  ...e-introduce-spe-commandline-options.patch} |  11 +-
  ...s-for-__cpu_indicator_init-instead-.patch} |  29 ++--
  ...-Do-not-use-__LINE__-for-maintainin.patch} |  55 +++
  ...le-CET-in-cross-compiler-if-possible.patch | 150 ++
  ...v3-Include-system_error-for-std-errc.patch |  23 +++
  ...ild-with-disable-dependency-tracking.patch |  54 ---
  .../gcc/gcc-9.3/0030-ldbl128-config.patch |  79 -
  ...heck-zero-value-in-simple_object_elf.patch |  48 --
  ...ands-Don-t-match-user-defined-regs-o.patch | 100 
  ...dian_9.3.bb => gcc-cross-canadian_10.1.bb} |   0
  .../{gcc-cross_9.3.bb => gcc-cross_10.1.bb}   |   0
  ...c-crosssdk_9.3.bb => gcc-crosssdk_10.1.bb} |   0
  meta/recipes-devtools/gcc/gcc-runtime.inc |   1 +
  ...gcc-runtime_9.3.bb => gcc-runtime_10.1.bb} |   0
  ...nitizers_9.3.bb => gcc-sanitizers_10.1.bb} |   0
  .../{gcc-source_9.3.bb => gcc-source_10.1.bb} |   0
  meta/recipes-devtools/gcc/gcc-target.inc  |   1 +
  .../gcc/{gcc_9.3.bb => gcc_10.1.bb}   |   0
  ...-initial_9.3.bb => libgcc-initial_10.1.bb} |   0
  .../gcc/{libgcc_9.3.bb => libgcc_10.1.bb} |   0
  ...libgfortran_9.3.bb => libgfortran_10.1.bb} |   0
  meta/recipes-support/icu/icu/filter.json  |   2 -
  57 files changed, 491 insertions(+), 703 deletions(-)
  rename meta/recipes-devtools/gcc/{gcc-9.3.inc => gcc-10.1.inc} (65%)
  rename meta/recipes-devtools/gcc/{gcc-9.3 => 
gcc-10.1}/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch (79%)
  rename meta/recipes-devtools/gcc/{gcc-9.3 => 
gcc-10.1}/0002-gcc-poison-system-directories.patch (85%)
  rename meta/recipes-devtools/gcc/{gcc-9.3 => 
gcc-10.1}/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch (92%)
  rename meta/recipes-devtools/gcc/{gcc-9.3 => 
gcc-10.1}/0004-64-bit-multilib-hack

[OE-core] [PATCH] dhcpcd: 9.1.4 -> 9.2.0

2020-09-10 Thread kai
From: Kai Kang 

Upgrade dhcpcd from 9.1.4 to 9.2.0. And add systemd services files
dhcpcd.service and dhcpcd@.service from Fedora:

https://src.fedoraproject.org/rpms/dhcpcd/tree/master

Signed-off-by: Kai Kang 
---
 .../{dhcpcd_9.1.4.bb => dhcpcd_9.2.0.bb}  | 20 +++
 1 file changed, 16 insertions(+), 4 deletions(-)
 rename meta/recipes-connectivity/dhcpcd/{dhcpcd_9.1.4.bb => dhcpcd_9.2.0.bb} 
(60%)

diff --git a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.1.4.bb 
b/meta/recipes-connectivity/dhcpcd/dhcpcd_9.2.0.bb
similarity index 60%
rename from meta/recipes-connectivity/dhcpcd/dhcpcd_9.1.4.bb
rename to meta/recipes-connectivity/dhcpcd/dhcpcd_9.2.0.bb
index defd3420f0..151bdf3776 100644
--- a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.1.4.bb
+++ b/meta/recipes-connectivity/dhcpcd/dhcpcd_9.2.0.bb
@@ -11,12 +11,17 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=9674cc803c5d71306941e6e8b5c002f2"
 
 UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/";
 
-SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
-   file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch"
+SRC_URI = "https://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
+   file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \
+   file://dhcpcd.service \
+   file://dhcpcd@.service \
+   "
 
-SRC_URI[sha256sum] = 
"5fe133e5497d8af6d26bd6e6b8dd48ab12d124d6cc4cefe6de6536ff97f76820"
+SRC_URI[sha256sum] = 
"fcb2d19672d445bbfd38678fdee4f556ef967a3ea6bd81092d10545df2cb9666"
 
-inherit pkgconfig autotools-brokensep
+inherit pkgconfig autotools-brokensep systemd
+
+SYSTEMD_SERVICE_${PN} = "dhcpcd.service"
 
 PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 
@@ -25,4 +30,11 @@ PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
 
 EXTRA_OECONF = "--enable-ipv4"
 
+do_install_append () {
+# install systemd unit files
+install -d ${D}${systemd_unitdir}/system
+install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_unitdir}/system
+}
+
+
 FILES_${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#142411): 
https://lists.openembedded.org/g/openembedded-core/message/142411
Mute This Topic: https://lists.openembedded.org/mt/76756851/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH v2 0/1] dhcpcd: 9.1.4 -> 9.2.0

2020-09-10 Thread kai
From: Kai Kang 

v2:
* forgot to add the systemd service files

Kai Kang (1):
  dhcpcd: 9.1.4 -> 9.2.0

 .../{dhcpcd_9.1.4.bb => dhcpcd_9.2.0.bb}  | 19 +++
 .../dhcpcd/files/dhcpcd.service   | 10 ++
 .../dhcpcd/files/dhcpcd@.service  | 15 +++
 3 files changed, 40 insertions(+), 4 deletions(-)
 rename meta/recipes-connectivity/dhcpcd/{dhcpcd_9.1.4.bb => dhcpcd_9.2.0.bb} 
(61%)
 create mode 100644 meta/recipes-connectivity/dhcpcd/files/dhcpcd.service
 create mode 100644 meta/recipes-connectivity/dhcpcd/files/dhcpcd@.service

-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#142428): 
https://lists.openembedded.org/g/openembedded-core/message/142428
Mute This Topic: https://lists.openembedded.org/mt/76771146/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH v2 1/1] dhcpcd: 9.1.4 -> 9.2.0

2020-09-10 Thread kai
From: Kai Kang 

Upgrade dhcpcd from 9.1.4 to 9.2.0. And add systemd services files
dhcpcd.service and dhcpcd@.service from Fedora:

https://src.fedoraproject.org/rpms/dhcpcd/tree/master

Signed-off-by: Kai Kang 
---
 .../{dhcpcd_9.1.4.bb => dhcpcd_9.2.0.bb}  | 19 +++
 .../dhcpcd/files/dhcpcd.service   | 10 ++
 .../dhcpcd/files/dhcpcd@.service  | 15 +++
 3 files changed, 40 insertions(+), 4 deletions(-)
 rename meta/recipes-connectivity/dhcpcd/{dhcpcd_9.1.4.bb => dhcpcd_9.2.0.bb} 
(61%)
 create mode 100644 meta/recipes-connectivity/dhcpcd/files/dhcpcd.service
 create mode 100644 meta/recipes-connectivity/dhcpcd/files/dhcpcd@.service

diff --git a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.1.4.bb 
b/meta/recipes-connectivity/dhcpcd/dhcpcd_9.2.0.bb
similarity index 61%
rename from meta/recipes-connectivity/dhcpcd/dhcpcd_9.1.4.bb
rename to meta/recipes-connectivity/dhcpcd/dhcpcd_9.2.0.bb
index defd3420f0..292cb5b008 100644
--- a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.1.4.bb
+++ b/meta/recipes-connectivity/dhcpcd/dhcpcd_9.2.0.bb
@@ -11,12 +11,17 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=9674cc803c5d71306941e6e8b5c002f2"
 
 UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/";
 
-SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
-   file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch"
+SRC_URI = "https://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
+   file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \
+   file://dhcpcd.service \
+   file://dhcpcd@.service \
+   "
 
-SRC_URI[sha256sum] = 
"5fe133e5497d8af6d26bd6e6b8dd48ab12d124d6cc4cefe6de6536ff97f76820"
+SRC_URI[sha256sum] = 
"fcb2d19672d445bbfd38678fdee4f556ef967a3ea6bd81092d10545df2cb9666"
 
-inherit pkgconfig autotools-brokensep
+inherit pkgconfig autotools-brokensep systemd
+
+SYSTEMD_SERVICE_${PN} = "dhcpcd.service"
 
 PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 
@@ -25,4 +30,10 @@ PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
 
 EXTRA_OECONF = "--enable-ipv4"
 
+do_install_append () {
+# install systemd unit files
+install -d ${D}${systemd_unitdir}/system
+install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_unitdir}/system
+}
+
 FILES_${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"
diff --git a/meta/recipes-connectivity/dhcpcd/files/dhcpcd.service 
b/meta/recipes-connectivity/dhcpcd/files/dhcpcd.service
new file mode 100644
index 00..86b5a43c37
--- /dev/null
+++ b/meta/recipes-connectivity/dhcpcd/files/dhcpcd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=A minimalistic network configuration daemon with DHCPv4, rdisc and 
DHCPv6 support
+Wants=network.target
+Before=network.target
+
+[Service]
+ExecStart=/usr/sbin/dhcpcd -q --nobackground
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/dhcpcd/files/dhcpcd@.service 
b/meta/recipes-connectivity/dhcpcd/files/dhcpcd@.service
new file mode 100644
index 00..c81bb05ea5
--- /dev/null
+++ b/meta/recipes-connectivity/dhcpcd/files/dhcpcd@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=dhcpcd on %I
+Wants=network.target
+Before=network.target
+BindsTo=sys-subsystem-net-devices-%i.device
+After=sys-subsystem-net-devices-%i.device
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd-%I.pid
+ExecStart=/usr/sbin/dhcpcd -q %I
+ExecStop=/usr/sbin/dhcpcd -x %I
+
+[Install]
+WantedBy=multi-user.target
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#142429): 
https://lists.openembedded.org/g/openembedded-core/message/142429
Mute This Topic: https://lists.openembedded.org/mt/76771148/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH 2/2] kea: fix conflict between multilibs

2020-09-22 Thread kai
From: Kai Kang 

There are conflict of config files between kea and lib32-kea:

| Error: Transaction test error:
|  file /etc/kea/kea-ctrl-agent.conf conflicts between attempted installs of
 lib32-kea-1.7.10-r0.core2_32 and kea-1.7.10-r0.core2_64
|  file /etc/kea/kea-dhcp4.conf conflicts between attempted installs of
 lib32-kea-1.7.10-r0.core2_32 and kea-1.7.10-r0.core2_64

Because they are all commented out, replace the expanded libdir path with
'$libdir' in the config files to avoid conflict.

Signed-off-by: Kai Kang 
---
 .../kea/files/fix-multilib-conflict.patch | 55 +++
 meta/recipes-connectivity/kea/kea_1.7.10.bb   |  1 +
 2 files changed, 56 insertions(+)
 create mode 100644 
meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch

diff --git a/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch 
b/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch
new file mode 100644
index 00..733adf5536
--- /dev/null
+++ b/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch
@@ -0,0 +1,55 @@
+There are conflict of config files between kea and lib32-kea:
+
+| Error: Transaction test error:
+|  file /etc/kea/kea-ctrl-agent.conf conflicts between attempted installs of
+ lib32-kea-1.7.10-r0.core2_32 and kea-1.7.10-r0.core2_64
+|  file /etc/kea/kea-dhcp4.conf conflicts between attempted installs of
+ lib32-kea-1.7.10-r0.core2_32 and kea-1.7.10-r0.core2_64
+
+Because they are all commented out, replace the expanded libdir path with
+'$libdir' in the config files to avoid conflict.
+
+Signed-off-by: Kai Kang 
+---
+ src/bin/keactrl/kea-ctrl-agent.conf.pre | 3 ++-
+ src/bin/keactrl/kea-dhcp4.conf.pre  | 6 --
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/bin/keactrl/kea-ctrl-agent.conf.pre 
b/src/bin/keactrl/kea-ctrl-agent.conf.pre
+index 211b7ff..d710ec7 100644
+--- a/src/bin/keactrl/kea-ctrl-agent.conf.pre
 b/src/bin/keactrl/kea-ctrl-agent.conf.pre
+@@ -45,7 +45,8 @@
+ // Agent will fail to start.
+ "hooks-libraries": [
+ //  {
+-//  "library": "@libdir@/kea/hooks/control-agent-commands.so",
++//  // Replace $libdir with real library path /usr/lib or /usr/lib64
++//  "library": "$libdir/kea/hooks/control-agent-commands.so",
+ //  "parameters": {
+ //  "param1": "foo"
+ //  }
+diff --git a/src/bin/keactrl/kea-dhcp4.conf.pre 
b/src/bin/keactrl/kea-dhcp4.conf.pre
+index 5f77a32..70ae3d9 100644
+--- a/src/bin/keactrl/kea-dhcp4.conf.pre
 b/src/bin/keactrl/kea-dhcp4.conf.pre
+@@ -252,7 +252,8 @@
+ //  // of all devices serviced by Kea, including their identifiers
+ //  // (like MAC address), their location in the network, times
+ //  // when they were active etc.
+-//  "library": "@libdir@/kea/hooks/libdhcp_legal_log.so"
++//  // Replace $libdir with real library path /usr/lib or /usr/lib64
++//  "library": "$libdir/kea/hooks/libdhcp_legal_log.so"
+ //  "parameters": {
+ //  "path": "/var/lib/kea",
+ //  "base-name": "kea-forensic4"
+@@ -269,7 +270,8 @@
+ //  // of specific options or perhaps even a combination of several
+ //  // options and fields to uniquely identify a client. Those 
scenarios
+ //  // are addressed by the Flexible Identifiers hook application.
+-//  "library": "@libdir@/kea/hooks/libdhcp_flex_id.so",
++//  // Replace $libdir with real library path /usr/lib or /usr/lib64
++//  "library": "$libdir/kea/hooks/libdhcp_flex_id.so",
+ //  "parameters": {
+ //  "identifier-expression": "substring(relay6[0].option[18],0,8)"
+ //  }
diff --git a/meta/recipes-connectivity/kea/kea_1.7.10.bb 
b/meta/recipes-connectivity/kea/kea_1.7.10.bb
index e2560b2399..061f3a7c26 100644
--- a/meta/recipes-connectivity/kea/kea_1.7.10.bb
+++ b/meta/recipes-connectivity/kea/kea_1.7.10.bb
@@ -12,6 +12,7 @@ SRC_URI = "\
 file://kea-dhcp4.service \
 file://kea-dhcp6.service \
 file://kea-dhcp-ddns.service \
+file://fix-multilib-conflict.patch \
 "
 SRC_URI[sha256sum] = 
"4e121f0e58b175a827581c69cb1d60778647049fa47f142940dddc9ce58f3c82"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142709): 
https://lists.openembedded.org/g/openembedded-core/message/142709
Mute This Topic: https://lists.openembedded.org/mt/77008351/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 1/2] systemd: disable xdg-autostart generator by default

2020-09-22 Thread kai
From: Kai Kang 

xdg-autostart generator is an opt-in feature which is imported by commit:

470c58ba45 systemd: Upgrade v245.6 -> v246

The generator outputs unexpect log info on terminal when log in a image
which includes an X desktop such as Xfce. So add an package config and
disable it by default.

Signed-off-by: Kai Kang 
---
 meta/recipes-core/systemd/systemd_246.2.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/systemd/systemd_246.2.bb 
b/meta/recipes-core/systemd/systemd_246.2.bb
index 238cd4741f..e555a5718a 100644
--- a/meta/recipes-core/systemd/systemd_246.2.bb
+++ b/meta/recipes-core/systemd/systemd_246.2.bb
@@ -185,6 +185,7 @@ PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false"
 PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
 PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind"
 PACKAGECONFIG[vconsole] = 
"-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup"
+PACKAGECONFIG[xdg-autostart] = "-Dxdg-autostart=true,-Dxdg-autostart=false"
 # Verify keymaps on locale change
 PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon"
 PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142708): 
https://lists.openembedded.org/g/openembedded-core/message/142708
Mute This Topic: https://lists.openembedded.org/mt/77008346/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] webkitgtk: remove '-fno-omit-frame-pointer' for x86

2020-11-08 Thread kai
From: Kai Kang 

It fails to compile webkitgtk for qemux86 if compile option
'-fno-omit-frame-pointer' is applied:

| 
TOPDIR/tmp-glibc/work/core2-32-wrsmllib32-linux/lib32-webkitgtk/2.30.1-r0/webkitgtk-2.30.1/
Source/JavaScriptCore/runtime/JSFinalizationRegistry.cpp:47:1:
| internal compiler error: in find_oldest_value_reg, at regcprop.c:438
|47 | }

Signed-off-by: Kai Kang 
---
 meta/recipes-sato/webkit/webkitgtk_2.30.2.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb 
b/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
index 1acba6be1d..11fdb59034 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
@@ -79,6 +79,7 @@ EXTRA_OECMAKE_append_arc = " -DENABLE_JIT=OFF "
 # which is not enough for binaries larger than 32 MiB
 CFLAGS_append_arc = " -mlong-calls"
 CXXFLAGS_append_arc = " -mlong-calls"
+CXXFLAGS_remove_x86 = "-fno-omit-frame-pointer"
 
 # Javascript JIT is not supported on powerpc
 EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF "
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144385): 
https://lists.openembedded.org/g/openembedded-core/message/144385
Mute This Topic: https://lists.openembedded.org/mt/78125973/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] webkitgtk: remove '-fno-omit-frame-pointer' for x86

2020-11-08 Thread kai

On 11/9/20 3:32 PM, Alexander Kanavin wrote:
This is not seen on the autobuilder, which does world builds on 
qemux86. Something might be wrong on your side?


Just the option '-fno-omit-frame-pointer' which is not set by default. 
We have a build with an extra config in local.conf:


SELECTED_OPTIMIZATION = "${PROFILING_OPTIMIZATION}"

which expands to

SELECTED_OPTIMIZATION = "${FULL_OPTIMIZATION} -fno-omit-frame-pointer 
-fvisibility=default"


then it fails to compile webkitgtk. It could be reproduced with upper 
config line.


Regards,
Kai





Alex

On Mon, 9 Nov 2020 at 01:32, kai <mailto:kai.k...@windriver.com>> wrote:


From: Kai Kang mailto:kai.k...@windriver.com>>

It fails to compile webkitgtk for qemux86 if compile option
'-fno-omit-frame-pointer' is applied:

|

TOPDIR/tmp-glibc/work/core2-32-wrsmllib32-linux/lib32-webkitgtk/2.30.1-r0/webkitgtk-2.30.1/
Source/JavaScriptCore/runtime/JSFinalizationRegistry.cpp:47:1:
| internal compiler error: in find_oldest_value_reg, at regcprop.c:438
|    47 | }

Signed-off-by: Kai Kang mailto:kai.k...@windriver.com>>
---
 meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
<http://webkitgtk_2.30.2.bb> | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
<http://webkitgtk_2.30.2.bb>
b/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
<http://webkitgtk_2.30.2.bb>
index 1acba6be1d..11fdb59034 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
<http://webkitgtk_2.30.2.bb>
+++ b/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
<http://webkitgtk_2.30.2.bb>
@@ -79,6 +79,7 @@ EXTRA_OECMAKE_append_arc = " -DENABLE_JIT=OFF "
 # which is not enough for binaries larger than 32 MiB
 CFLAGS_append_arc = " -mlong-calls"
 CXXFLAGS_append_arc = " -mlong-calls"
+CXXFLAGS_remove_x86 = "-fno-omit-frame-pointer"

 # Javascript JIT is not supported on powerpc
 EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF "
-- 
2.17.1











-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144402): 
https://lists.openembedded.org/g/openembedded-core/message/144402
Mute This Topic: https://lists.openembedded.org/mt/78125973/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] webkitgtk: remove '-fno-omit-frame-pointer' for x86

2020-11-09 Thread kai

On 11/9/20 4:07 PM, Alexander Kanavin wrote:
Right, but then adding _remove to the upstream recipe doesn't seem 
right - rather you should use _pn-webkitgtk override in your custom 
config.


I suppose '-fomit-frame-pointer' is common compile flag that other 
people may also meet this error.


Regards,
Kai



Alex

On Mon, 9 Nov 2020 at 08:52, kai <mailto:kai.k...@windriver.com>> wrote:


On 11/9/20 3:32 PM, Alexander Kanavin wrote:

This is not seen on the autobuilder, which does world builds on
qemux86. Something might be wrong on your side?


Just the option '-fno-omit-frame-pointer' which is not set by
default. We have a build with an extra config in local.conf:

SELECTED_OPTIMIZATION = "${PROFILING_OPTIMIZATION}"

which expands to

SELECTED_OPTIMIZATION = "${FULL_OPTIMIZATION}
-fno-omit-frame-pointer -fvisibility=default"

then it fails to compile webkitgtk. It could be reproduced with
upper config line.

Regards,
    Kai





Alex

On Mon, 9 Nov 2020 at 01:32, kai mailto:kai.k...@windriver.com>> wrote:

From: Kai Kang mailto:kai.k...@windriver.com>>

It fails to compile webkitgtk for qemux86 if compile option
'-fno-omit-frame-pointer' is applied:

|

TOPDIR/tmp-glibc/work/core2-32-wrsmllib32-linux/lib32-webkitgtk/2.30.1-r0/webkitgtk-2.30.1/
Source/JavaScriptCore/runtime/JSFinalizationRegistry.cpp:47:1:
| internal compiler error: in find_oldest_value_reg, at
regcprop.c:438
|    47 | }

Signed-off-by: Kai Kang mailto:kai.k...@windriver.com>>
---
 meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
<http://webkitgtk_2.30.2.bb> | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
<http://webkitgtk_2.30.2.bb>
b/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
<http://webkitgtk_2.30.2.bb>
index 1acba6be1d..11fdb59034 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
<http://webkitgtk_2.30.2.bb>
+++ b/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
<http://webkitgtk_2.30.2.bb>
@@ -79,6 +79,7 @@ EXTRA_OECMAKE_append_arc = " -DENABLE_JIT=OFF "
 # which is not enough for binaries larger than 32 MiB
 CFLAGS_append_arc = " -mlong-calls"
 CXXFLAGS_append_arc = " -mlong-calls"
+CXXFLAGS_remove_x86 = "-fno-omit-frame-pointer"

 # Javascript JIT is not supported on powerpc
 EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF "
-- 
2.17.1














-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144404): 
https://lists.openembedded.org/g/openembedded-core/message/144404
Mute This Topic: https://lists.openembedded.org/mt/78125973/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] webkitgtk: remove '-fno-omit-frame-pointer' for x86

2020-11-09 Thread kai

On 11/10/20 2:58 AM, Khem Raj wrote:

On Mon, Nov 9, 2020 at 12:18 AM kai  wrote:

On 11/9/20 4:07 PM, Alexander Kanavin wrote:

Right, but then adding _remove to the upstream recipe doesn't seem right - 
rather you should use _pn-webkitgtk override in your custom config.

I suppose '-fomit-frame-pointer' is common compile flag that other people may 
also meet this error.

Regards,
Kai


Alex

On Mon, 9 Nov 2020 at 08:52, kai  wrote:

On 11/9/20 3:32 PM, Alexander Kanavin wrote:

This is not seen on the autobuilder, which does world builds on qemux86. 
Something might be wrong on your side?

Just the option '-fno-omit-frame-pointer' which is not set by default. We have 
a build with an extra config in local.conf:

SELECTED_OPTIMIZATION = "${PROFILING_OPTIMIZATION}"

which expands to

SELECTED_OPTIMIZATION = "${FULL_OPTIMIZATION} -fno-omit-frame-pointer 
-fvisibility=default"

then it fails to compile webkitgtk. It could be reproduced with upper config 
line.


since we do not have global file to control this its fine if you alter
PROFILING_OPTIMIZATION inside this recipe
something like PROFILING_OPTIMIZATION_remove = "..."


OK. I'll follow the snippet such as:

recipes-devtools/binutils/binutils_2.35.bb:SELECTED_OPTIMIZATION_remove_mipsarch 
= "-O2"


Thanks,
Kai





Regards,
Kai




Alex

On Mon, 9 Nov 2020 at 01:32, kai  wrote:

From: Kai Kang 

It fails to compile webkitgtk for qemux86 if compile option
'-fno-omit-frame-pointer' is applied:

| 
TOPDIR/tmp-glibc/work/core2-32-wrsmllib32-linux/lib32-webkitgtk/2.30.1-r0/webkitgtk-2.30.1/
 Source/JavaScriptCore/runtime/JSFinalizationRegistry.cpp:47:1:
| internal compiler error: in find_oldest_value_reg, at regcprop.c:438
|47 | }

Signed-off-by: Kai Kang 
---
  meta/recipes-sato/webkit/webkitgtk_2.30.2.bb | 1 +
  1 file changed, 1 insertion(+)

diff --git a/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb 
b/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
index 1acba6be1d..11fdb59034 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.30.2.bb
@@ -79,6 +79,7 @@ EXTRA_OECMAKE_append_arc = " -DENABLE_JIT=OFF "
  # which is not enough for binaries larger than 32 MiB
  CFLAGS_append_arc = " -mlong-calls"
  CXXFLAGS_append_arc = " -mlong-calls"
+CXXFLAGS_remove_x86 = "-fno-omit-frame-pointer"

  # Javascript JIT is not supported on powerpc
  EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF "
--
2.17.1



















-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144430): 
https://lists.openembedded.org/g/openembedded-core/message/144430
Mute This Topic: https://lists.openembedded.org/mt/78125973/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] add new extrausers command passwd-expire

2020-11-09 Thread kai
From: Joseph Reynolds 

This enhances extrausers with a new passwd-expire command that causes
a local user's password to be expired as if the `passwd --expire`
command was run, so the password needs to be changed on initial login.

Example: EXTRA_USERS_PARAMS += " useradd ... USER; passwd-expire USER;"

Tested: on useradd accounts
When configured with Linux-PAM, console login prompts for and can
successfully change the password.  OpenSSH server works.  Dropbear
SSH server notes the password must be changed but does not offer a
password change dialog and rejects the login request.

Signed-off-by: Joseph Reynolds 
Signed-off-by: Kai Kang 
---
 meta/classes/extrausers.bbclass   |  3 +++
 meta/classes/useradd_base.bbclass | 18 ++
 2 files changed, 21 insertions(+)

diff --git a/meta/classes/extrausers.bbclass b/meta/classes/extrausers.bbclass
index 32569e97db..90811bfe2a 100644
--- a/meta/classes/extrausers.bbclass
+++ b/meta/classes/extrausers.bbclass
@@ -46,6 +46,9 @@ set_user_group () {
usermod)
perform_usermod "${IMAGE_ROOTFS}" "-R 
${IMAGE_ROOTFS} $opts"
;;
+   passwd-expire)
+   perform_passwd_expire "${IMAGE_ROOTFS}" "$opts"
+   ;;
groupmod)
perform_groupmod "${IMAGE_ROOTFS}" "-R 
${IMAGE_ROOTFS} $opts"
;;
diff --git a/meta/classes/useradd_base.bbclass 
b/meta/classes/useradd_base.bbclass
index 0d0bdb80f5..7f5b9b7219 100644
--- a/meta/classes/useradd_base.bbclass
+++ b/meta/classes/useradd_base.bbclass
@@ -145,3 +145,21 @@ perform_usermod () {
fi
set -e
 }
+
+perform_passwd_expire () {
+   local rootdir="$1"
+   local opts="$2"
+   bbnote "${PN}: Performing equivalent of passwd --expire with [$opts]"
+   # Directly set sp_lstchg to 0 without using the passwd command: Only 
root can do that
+   local username=`echo "$opts" | awk '{ print $NF }'`
+   local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
+   if test "x$user_exists" != "x"; then
+   eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO sed -i 
\''s/^\('$username':[^:]*\):[^:]*:/\1:0:/'\' $rootdir/etc/shadow \" || true
+   local passwd_lastchanged="`grep "^$username:" 
$rootdir/etc/shadow | cut -d: -f3`"
+   if test "x$passwd_lastchanged" != "x0"; then
+   bbfatal "${PN}: passwd --expire operation did not 
succeed."
+   fi
+   else
+   bbnote "${PN}: user $username doesn't exist, not expiring its 
password"
+   fi
+}
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144434): 
https://lists.openembedded.org/g/openembedded-core/message/144434
Mute This Topic: https://lists.openembedded.org/mt/78153261/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 0/1] Resend the patch from Joseph

2020-11-09 Thread kai
From: Kai Kang 

The original patch can't applied with 'git am'. And it is useful for me,
so resend the patch from:

https://github.com/openembedded/openembedded-core/pull/63


Joseph Reynolds (1):
  add new extrausers command passwd-expire

 meta/classes/extrausers.bbclass   |  3 +++
 meta/classes/useradd_base.bbclass | 18 ++
 2 files changed, 21 insertions(+)

-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144433): 
https://lists.openembedded.org/g/openembedded-core/message/144433
Mute This Topic: https://lists.openembedded.org/mt/78153260/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 1/2] systemd-systemctl: capable to call without argument

2020-11-16 Thread kai

Ping.

On 11/2/20 10:17 AM, kai wrote:

From: Kai Kang 

Make systemctl prints help mesages if run without any argument. It helps
to judge whether systemctl works in postscripts in systemd.bbclass.

Remove trailing white spaces as well.

Signed-off-by: Kai Kang 
---
  meta/recipes-core/systemd/systemd-systemctl/systemctl | 10 +++---
  1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl 
b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 990de1ab39..c692b65920 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -30,7 +30,7 @@ class SystemdFile():
  self._parse(root, path)
  dirname = os.path.basename(path.name) + ".d"
  for location in locations:
-for path2 in sorted((root / location / "system" / 
dirname).glob("*.conf")):
+for path2 in sorted((root / location / "system" / 
dirname).glob("*.conf")):
  self._parse(root, path2)
  
  def _parse(self, root, path):

@@ -282,7 +282,7 @@ def main():
  sys.exit("Python 3.4 or greater is required")
  
  parser = argparse.ArgumentParser()

-parser.add_argument('command', nargs=1, choices=['enable', 'mask',
+parser.add_argument('command', nargs='?', choices=['enable', 'mask',
   'preset-all'])
  parser.add_argument('service', nargs=argparse.REMAINDER)
  parser.add_argument('--root')
@@ -300,7 +300,11 @@ def main():
  locations.append(BASE_LIBDIR / "systemd")
  locations.append(LIBDIR / "systemd")
  
-command = args.command[0]

+command = args.command
+if not command:
+parser.print_help()
+return 0
+
  if command == "mask":
  for service in args.service:
  SystemdUnit(root, service).mask()






-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144675): 
https://lists.openembedded.org/g/openembedded-core/message/144675
Mute This Topic: https://lists.openembedded.org/mt/78308345/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 0/1] Fix multilib conflict of sudo

2020-11-16 Thread kai
From: Kai Kang 

Install plugin libraries to ${libdir} rather than ${libexecdir} to fix
multilib conflict.

Test with user foo. Run sudo successfully after add foo to sudoers.

Kai Kang (1):
  sudo: fix multilib conflict

 ...o.conf.in-fix-conflict-with-multilib.patch | 50 +++
 meta/recipes-extended/sudo/sudo_1.9.3p1.bb|  6 ++-
 2 files changed, 54 insertions(+), 2 deletions(-)
 create mode 100644 
meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch

-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144676): 
https://lists.openembedded.org/g/openembedded-core/message/144676
Mute This Topic: https://lists.openembedded.org/mt/78309344/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 1/1] sudo: fix multilib conflict

2020-11-16 Thread kai
From: Kai Kang 

It fails to install sudo and lib32-sudo at same time:

| Error: Transaction test error:
|  file /usr/libexec/sudo/audit_json.so conflicts between attempted
 installs of lib32-sudo-1.9.3p1-r0.core2_32 and sudo-1.9.3p1-r0.core2_64
|  file /usr/libexec/sudo/group_file.so conflicts between attempted
 installs of lib32-sudo-1.9.3p1-r0.core2_32 and sudo-1.9.3p1-r0.core2_64

Pass ${libdir} to configure option --libexecdir of sudo that it installs
plugin libraries to /usr/lib{,64} rather than /usr/libexec/. Then add a
patch to fix multilib conflict of sudo.conf.

Signed-off-by: Kai Kang 
---
 ...o.conf.in-fix-conflict-with-multilib.patch | 50 +++
 meta/recipes-extended/sudo/sudo_1.9.3p1.bb|  6 ++-
 2 files changed, 54 insertions(+), 2 deletions(-)
 create mode 100644 
meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch

diff --git 
a/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
 
b/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
new file mode 100644
index 00..cfac926731
--- /dev/null
+++ 
b/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
@@ -0,0 +1,50 @@
+sudo.conf.in: fix conflict with multilib
+
+When pass ${libdir} to --libexecdir of sudo, it fails to install sudo
+and lib32-sudo at same time:
+
+| Error: Transaction test error:
+|  file /etc/sudo.conf conflicts between attempted installs of
+ sudo-1.9.3p1-r0.core2_64 and lib32-sudo-1.9.3p1-r0.core2_32
+
+Update the comments in sudo.conf.in to avoid the conflict.
+
+Signed-off-by: Kai Kang 
+---
+ examples/sudo.conf.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/examples/sudo.conf.in b/examples/sudo.conf.in
+index 19e33ff..af78235 100644
+--- a/examples/sudo.conf.in
 b/examples/sudo.conf.in
+@@ -4,7 +4,7 @@
+ # Sudo plugins:
+ #   Plugin plugin_name plugin_path plugin_options ...
+ #
+-# The plugin_path is relative to @plugindir@ unless
++# The plugin_path is relative to $plugindir such as /usr/lib/sudo unless
+ #   fully qualified.
+ # The plugin_name corresponds to a global symbol in the plugin
+ #   that contains the plugin interface structure.
+@@ -50,7 +50,7 @@ Plugin sudoers_audit sudoers.so
+ # The compiled-in value is usually sufficient and should only be changed
+ # if you rename or move the sudo_noexec.so file.
+ #
+-#Path noexec @plugindir@/sudo_noexec.so
++#Path noexec $plugindir/sudo_noexec.so
+ 
+ #
+ # Sudo plugin directory:
+@@ -59,7 +59,7 @@ Plugin sudoers_audit sudoers.so
+ # The default directory to use when searching for plugins that are
+ # specified without a fully qualified path name.
+ #
+-#Path plugin_dir @plugindir@
++#Path plugin_dir $plugindir
+ 
+ #
+ # Sudo developer mode:
+--
+2.17.1
+
diff --git a/meta/recipes-extended/sudo/sudo_1.9.3p1.bb 
b/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
index 08a0fa03a3..ba61a7f247 100644
--- a/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
+++ b/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
@@ -2,6 +2,7 @@ require sudo.inc
 
 SRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', 
'', d)} \
+   file://0001-sudo.conf.in-fix-conflict-with-multilib.patch \
"
 
 PAM_SRC_URI = "file://sudo.pam"
@@ -24,6 +25,7 @@ EXTRA_OECONF += " \
  ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 
'--enable-tmpfiles.d=${nonarch_libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} 
\
  --with-rundir=/run/sudo \
  --with-vardir=/var/lib/sudo \
+ --libexecdir=${libdir} \
  "
 
 do_install_append () {
@@ -43,5 +45,5 @@ do_install_append () {
 }
 
 FILES_${PN} += "${nonarch_libdir}/tmpfiles.d"
-FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} 
${libexecdir}/${BPN}/*.la \
-${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
+FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la \
+${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la"
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144677): 
https://lists.openembedded.org/g/openembedded-core/message/144677
Mute This Topic: https://lists.openembedded.org/mt/78309346/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] toolchain-scripts: set PS1

2020-11-17 Thread kai
From: Kai Kang 

Introduce a variable SDK_PS1 to configure PS1 after source
environment-setup-script. The prompt string by default looks like:

SDK-poky-glibc-x86_64--cortexa57-qemuarm64$

Signed-off-by: Kai Kang 
---
 meta/classes/toolchain-scripts.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/toolchain-scripts.bbclass 
b/meta/classes/toolchain-scripts.bbclass
index db1d3215ef..274dfcf7e2 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -8,6 +8,9 @@ TARGET_CC_ARCH_append_libc-musl = " -mmusl"
 # default debug prefix map isn't valid in the SDK
 DEBUG_PREFIX_MAP = ""
 
+# PS1 setting after source the environment-setup-script
+SDK_PS1 ?= "SDK-${SDK_NAME}$ "
+
 # This function creates an environment-setup-script for use in a deployable SDK
 toolchain_create_sdk_env_script () {
# Create environment setup script.  Remember that $SDKTARGETSYSROOT 
should
@@ -45,6 +48,7 @@ toolchain_create_sdk_env_script () {

EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${TARGET_ARCH}${TARGET_VENDOR}-$i"
done
echo "export 
PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH'
 >> $script
+   echo 'export PS1="${SDK_PS1}"' >>$script
echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script
echo 'export 
PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig'
 >> $script
echo 'export 
CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144684): 
https://lists.openembedded.org/g/openembedded-core/message/144684
Mute This Topic: https://lists.openembedded.org/mt/78312366/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 1/2] systemd-systemctl: capable to call without argument

2020-11-19 Thread kai

Any comment, please?

Thanks,
Kai


On 11/2/20 10:17 AM, kai wrote:

From: Kai Kang 

Make systemctl prints help mesages if run without any argument. It helps
to judge whether systemctl works in postscripts in systemd.bbclass.

Remove trailing white spaces as well.

Signed-off-by: Kai Kang 
---
  meta/recipes-core/systemd/systemd-systemctl/systemctl | 10 +++---
  1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl 
b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 990de1ab39..c692b65920 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -30,7 +30,7 @@ class SystemdFile():
  self._parse(root, path)
  dirname = os.path.basename(path.name) + ".d"
  for location in locations:
-for path2 in sorted((root / location / "system" / 
dirname).glob("*.conf")):
+for path2 in sorted((root / location / "system" / 
dirname).glob("*.conf")):
  self._parse(root, path2)
  
  def _parse(self, root, path):

@@ -282,7 +282,7 @@ def main():
  sys.exit("Python 3.4 or greater is required")
  
  parser = argparse.ArgumentParser()

-parser.add_argument('command', nargs=1, choices=['enable', 'mask',
+parser.add_argument('command', nargs='?', choices=['enable', 'mask',
   'preset-all'])
  parser.add_argument('service', nargs=argparse.REMAINDER)
  parser.add_argument('--root')
@@ -300,7 +300,11 @@ def main():
  locations.append(BASE_LIBDIR / "systemd")
  locations.append(LIBDIR / "systemd")
  
-command = args.command[0]

+command = args.command
+if not command:
+parser.print_help()
+return 0
+
  if command == "mask":
  for service in args.service:
  SystemdUnit(root, service).mask()






-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144837): 
https://lists.openembedded.org/g/openembedded-core/message/144837
Mute This Topic: https://lists.openembedded.org/mt/78380911/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 1/2] systemd-systemctl: capable to call without argument

2020-11-23 Thread kai

On 11/17/20 10:14 AM, Kai wrote:

Ping.


Ping...




On 11/2/20 10:17 AM, kai wrote:

From: Kai Kang

Make systemctl prints help mesages if run without any argument. It helps
to judge whether systemctl works in postscripts in systemd.bbclass.

Remove trailing white spaces as well.

Signed-off-by: Kai Kang
---
  meta/recipes-core/systemd/systemd-systemctl/systemctl | 10 +++---
  1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl 
b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 990de1ab39..c692b65920 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -30,7 +30,7 @@ class SystemdFile():
  self._parse(root, path)
  dirname = os.path.basename(path.name) + ".d"
  for location in locations:
-for path2 in sorted((root / location / "system" / 
dirname).glob("*.conf")):
+for path2 in sorted((root / location / "system" / 
dirname).glob("*.conf")):
  self._parse(root, path2)
  
  def _parse(self, root, path):

@@ -282,7 +282,7 @@ def main():
  sys.exit("Python 3.4 or greater is required")
  
  parser = argparse.ArgumentParser()

-parser.add_argument('command', nargs=1, choices=['enable', 'mask',
+parser.add_argument('command', nargs='?', choices=['enable', 'mask',
   'preset-all'])
  parser.add_argument('service', nargs=argparse.REMAINDER)
  parser.add_argument('--root')
@@ -300,7 +300,11 @@ def main():
  locations.append(BASE_LIBDIR / "systemd")
  locations.append(LIBDIR / "systemd")
  
-command = args.command[0]

+command = args.command
+if not command:
+parser.print_help()
+return 0
+
  if command == "mask":
  for service in args.service:
  SystemdUnit(root, service).mask()








-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144908): 
https://lists.openembedded.org/g/openembedded-core/message/144908
Mute This Topic: https://lists.openembedded.org/mt/78308345/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] toolchain-scripts: set PS1

2020-11-24 Thread kai

On 11/17/20 4:33 PM, kai wrote:

From: Kai Kang 

Introduce a variable SDK_PS1 to configure PS1 after source
environment-setup-script. The prompt string by default looks like:

SDK-poky-glibc-x86_64--cortexa57-qemuarm64$

Signed-off-by: Kai Kang 
---
  meta/classes/toolchain-scripts.bbclass | 4 
  1 file changed, 4 insertions(+)

diff --git a/meta/classes/toolchain-scripts.bbclass 
b/meta/classes/toolchain-scripts.bbclass
index db1d3215ef..274dfcf7e2 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -8,6 +8,9 @@ TARGET_CC_ARCH_append_libc-musl = " -mmusl"
  # default debug prefix map isn't valid in the SDK
  DEBUG_PREFIX_MAP = ""
  
+# PS1 setting after source the environment-setup-script

+SDK_PS1 ?= "SDK-${SDK_NAME}$ "


Any comment on the default format of SDK_PS1 or the whole patch, please?

Thanks,
Kai



+
  # This function creates an environment-setup-script for use in a deployable 
SDK
  toolchain_create_sdk_env_script () {
# Create environment setup script.  Remember that $SDKTARGETSYSROOT 
should
@@ -45,6 +48,7 @@ toolchain_create_sdk_env_script () {

EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${TARGET_ARCH}${TARGET_VENDOR}-$i"
done
echo "export 
PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH'
 >> $script
+   echo 'export PS1="${SDK_PS1}"' >>$script
echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script
echo 'export 
PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig'
 >> $script
echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" 
>> $script






-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144965): 
https://lists.openembedded.org/g/openembedded-core/message/144965
Mute This Topic: https://lists.openembedded.org/mt/78312366/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v3 0/2] Update the criterion whether command systemctl available in systemd.bbclass

2020-12-01 Thread kai
From: Kai Kang 

v3:
* update commit messages to make more clearer

Kai Kang (2):
  systemd-systemctl-native: capable to call without argument
  systemd.bbclass: update command to check systemctl available

 meta/classes/systemd.bbclass  | 4 ++--
 meta/recipes-core/systemd/systemd-systemctl/systemctl | 8 ++--
 2 files changed, 8 insertions(+), 4 deletions(-)

-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145169): 
https://lists.openembedded.org/g/openembedded-core/message/145169
Mute This Topic: https://lists.openembedded.org/mt/78651236/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v3 1/2] systemd-systemctl-native: capable to call without argument

2020-12-01 Thread kai
From: Kai Kang 

In systemd.bbclass, it will replace criterion command 'type systemctl'
with 'systemctl' without any argument to judge whether command systemctl
is available. The change is to fix install/remove package error in
container when command systemctl exists but not callable.

Make native systemctl wrapper prints help mesages if called without any
argument to follow the update.

Signed-off-by: Kai Kang 
---
 meta/recipes-core/systemd/systemd-systemctl/systemctl | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl 
b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 990de1ab39..de733e255b 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -282,7 +282,7 @@ def main():
 sys.exit("Python 3.4 or greater is required")
 
 parser = argparse.ArgumentParser()
-parser.add_argument('command', nargs=1, choices=['enable', 'mask',
+parser.add_argument('command', nargs='?', choices=['enable', 'mask',
  'preset-all'])
 parser.add_argument('service', nargs=argparse.REMAINDER)
 parser.add_argument('--root')
@@ -300,7 +300,11 @@ def main():
 locations.append(BASE_LIBDIR / "systemd")
 locations.append(LIBDIR / "systemd")
 
-command = args.command[0]
+command = args.command
+if not command:
+parser.print_help()
+return 0
+
 if command == "mask":
 for service in args.service:
 SystemdUnit(root, service).mask()
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145170): 
https://lists.openembedded.org/g/openembedded-core/message/145170
Mute This Topic: https://lists.openembedded.org/mt/78651237/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v3 2/2] systemd.bbclass: update command to check systemctl available

2020-12-01 Thread kai
From: Kai Kang 

When use a core image with systemd as docker image, it fails to
install/remove package which calls systemctl in post scripts.
It fails to run systemctl in a container:

bash-5.0# systemctl
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

So replace the criterion command 'type systemctl' with 'systemctl' in
package post scripts to check whether systemctl available.

Signed-off-by: Kai Kang 
---
 meta/classes/systemd.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index 9e8a82c9f1..9ec465c759 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -23,7 +23,7 @@ python __anonymous() {
 }
 
 systemd_postinst() {
-if type systemctl >/dev/null 2>/dev/null; then
+if systemctl >/dev/null 2>/dev/null; then
OPTS=""
 
if [ -n "$D" ]; then
@@ -48,7 +48,7 @@ fi
 }
 
 systemd_prerm() {
-if type systemctl >/dev/null 2>/dev/null; then
+if systemctl >/dev/null 2>/dev/null; then
if [ -z "$D" ]; then
systemctl stop ${SYSTEMD_SERVICE_ESCAPED}
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145171): 
https://lists.openembedded.org/g/openembedded-core/message/145171
Mute This Topic: https://lists.openembedded.org/mt/78651238/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 2/2] connman: set service to conflict with systemd-networkd

2020-12-03 Thread kai

On 12/2/20 8:11 PM, Jack Mitchell wrote:

On 02/12/2020 02:20, Yi Zhao wrote:

On 12/1/20 5:02 AM, Jack Mitchell wrote:

On 02/11/2020 09:20, Yi Zhao wrote:

Do not run systemd-networkd and connman simultaneously. These two
network managers may conflict with each other.

Signed-off-by: Yi Zhao 
---
  ...stop-systemd-networkd-when-using-con.patch | 29 +++
  .../connman/connman_1.38.bb   |  1 +
  2 files changed, 30 insertions(+)
  create mode 100644 
meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-networkd-when-using-con.patch

diff --git 
a/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-networkd-when-using-con.patch
 
b/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-networkd-when-using-con.patch
new file mode 100644
index 00..dd012750a4
--- /dev/null
+++ 
b/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-networkd-when-using-con.patch
@@ -0,0 +1,29 @@
+From 9fea099d0a3ece37d80ad70d32ebb8a93f8f3280 Mon Sep 17 00:00:00 2001
+From: Yi Zhao 
+Date: Fri, 30 Oct 2020 13:48:45 +0800
+Subject: [PATCH] connman.service: stop systemd-networkd when using connman
+
+Stop systemd-networkd service when we use connman as network manager.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Yi Zhao 
+---
+ src/connman.service.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/connman.service.in b/src/connman.service.in
+index 79e75d6..014eafe 100644
+--- a/src/connman.service.in
 b/src/connman.service.in
+@@ -6,6 +6,7 @@ RequiresMountsFor=@localstatedir@/lib/connman
+ After=dbus.service network-pre.target systemd-sysusers.service
+ Before=network.target multi-user.target shutdown.target
+ Wants=network.target
++Conflicts=systemd-networkd.service systemd-networkd.socket
+ Conflicts=systemd-resolved.service
+
+ [Service]
+--
+2.17.1
+
diff --git a/meta/recipes-connectivity/connman/connman_1.38.bb 
b/meta/recipes-connectivity/connman/connman_1.38.bb
index 027c41e9af..45c2934dec 100644
--- a/meta/recipes-connectivity/connman/connman_1.38.bb
+++ b/meta/recipes-connectivity/connman/connman_1.38.bb
@@ -3,6 +3,7 @@ require connman.inc
  SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
 
file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
 
file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \
+   
file://0001-connman.service-stop-systemd-networkd-when-using-con.patch \
 file://connman \
 file://no-version-scripts.patch \
 "


Hi Yi,

This breaks our usecase where we have been using connman and
systemd-networkd in tandem for a long time. IMO this should be reverted
as if the two applications are conflicting then the correct fix is that
they should be configured so that they don't both try to configure the
same interfaces. As systemd-networkd doesn't ship with any rules by
default it shouldn't be doing anything to interfere?


Currently, A systemd-networkd configuration file 80-wired.network from
systemd-conf package is also installed by default on HW BSPs. Comman is
the default network-manager in Yocto. It will manage the wired interface
automatically. But with this configuration file, the systemd-networkd
will also try to manage the wired interface as connman does. They may
conflict with each other.In addition to revert this patch, I think we
should consider whether to install this configuration file by default.
Maybe it’s better to install it as an example and users can enable it as
needed.

Thanks,
Yi



Hi Yi,

I see, thank you for pointing that out. I agree that we shouldn't be
shipping custom catch-all networkd snippets. Perhaps it should be
something appended by the Poky distro rather than installed by default?
I assume it is included so that network interfaces come up with a DHCP
address by default so people can ssh into the machine without an extra
config.


Hi Jack,

The original defect is 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13057 . There is no 
network on core-image-small, so I provided
the default config for systemd-networkd. Because systemd-networkd is 
more basic than connman and networkmanager that maybe neither

of them is installed.

The conflict should be resolved but I don't have solution yet right now.

Regards,
Kai



Cc kai.k...@windriver.com as it looks like they were the original author.

Regards,
Jack.


With this patch I can no-longer run both services as it's a hard
conflict with no option to either revert locally, or bbappend this patch
out.

Regards,
Jack.








-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145190): 
https://lists.openembedded.org/g/openembedded-core/message/145190
Mute This Topic: https://lists.openembedded.org/mt/77977444/21656
Group Owner: openembedded-core+ow...@l

[OE-core] [PATCH 1/1] grub2.inc: remove '-O2' from CFLAGS

2021-05-08 Thread kai
From: Kai Kang 

It fails to boot grub after upgrade grub to 2.06. According to
description in

https://bugzilla.yoctoproject.org/show_bug.cgi?id=14367

it is introduced by a commit to fix CVE. So remove option '-O2' from
CFLAGS rather than revert the commit to avoid the failure.

[YOCTO #14367]

CC: Tony Battersby 
Signed-off-by: Kai Kang 
---
 meta/recipes-bsp/grub/grub2.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 590deb8d92..6de683ee1c 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -49,6 +49,8 @@ GRUBPLATFORM ??= "pc"
 
 inherit autotools gettext texinfo pkgconfig
 
+CFLAGS_remove = "-O2"
+
 EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
 --disable-grub-mkfont \
 --program-prefix="" \
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#151473): 
https://lists.openembedded.org/g/openembedded-core/message/151473
Mute This Topic: https://lists.openembedded.org/mt/82673836/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 0/1] Fix grub fails to boot failure

2021-05-08 Thread kai
From: Kai Kang 

Hi Tony,

I met the same failure with you. I tried with removing '-O2' and it works
for me. So I send it out.

Kai Kang (1):
  grub2.inc: remove '-O2' from CFLAGS

 meta/recipes-bsp/grub/grub2.inc | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#151472): 
https://lists.openembedded.org/g/openembedded-core/message/151472
Mute This Topic: https://lists.openembedded.org/mt/82673835/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] valgrind: fix a typo

2021-06-08 Thread kai
From: Kai Kang 

Signed-off-by: Kai Kang 
---
 meta/recipes-devtools/valgrind/valgrind_3.17.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb 
b/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
index d0c60d0a3d..7fcb086789 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.17.0.bb
@@ -120,7 +120,7 @@ VALGRINDARCH_mipsel = "mips32"
 VALGRINDARCH_mips64el = "mips64"
 VALGRINDARCH_powerpc = "ppc"
 VALGRINDARCH_powerpc64 = "ppc64"
-VALGRINDARCH_powerpc64el = "ppc64le"
+VALGRINDARCH_powerpc64le = "ppc64le"
 
 INHIBIT_PACKAGE_STRIP_FILES = 
"${PKGD}${libexecdir}/valgrind/vgpreload_memcheck-${VALGRINDARCH}-linux.so"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152770): 
https://lists.openembedded.org/g/openembedded-core/message/152770
Mute This Topic: https://lists.openembedded.org/mt/83391581/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [hardknott][PATCH] libx11: fix CVE-2021-31535

2021-06-10 Thread kai
From: Kai Kang 

Backport patch to fix CVE-2021-31535 of libx11. Adjust indentation as well.

Signed-off-by: Kai Kang 
---
 .../xorg-lib/libx11/fix-CVE-2021-31535.patch  | 320 ++
 .../recipes-graphics/xorg-lib/libx11_1.7.0.bb |   5 +-
 2 files changed, 323 insertions(+), 2 deletions(-)
 create mode 100644 
meta/recipes-graphics/xorg-lib/libx11/fix-CVE-2021-31535.patch

diff --git a/meta/recipes-graphics/xorg-lib/libx11/fix-CVE-2021-31535.patch 
b/meta/recipes-graphics/xorg-lib/libx11/fix-CVE-2021-31535.patch
new file mode 100644
index 00..2ec5cc1688
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11/fix-CVE-2021-31535.patch
@@ -0,0 +1,320 @@
+From 8d2e02ae650f00c4a53deb625211a0527126c605 Mon Sep 17 00:00:00 2001
+From: Matthieu Herrb 
+Date: Fri, 19 Feb 2021 15:30:39 +0100
+Subject: [PATCH] Reject string longer than USHRT_MAX before sending them on
+ the wire
+
+The X protocol uses CARD16 values to represent the length so
+this would overflow.
+
+CVE-2021-31535
+
+Signed-off-by: Matthieu Herrb 
+
+CVE: CVE-2021-31535
+Upstream-Status: Backport 
[https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/8d2e02a]
+
+Signed-off-by: Kai Kang 
+---
+ src/Font.c  | 4 +++-
+ src/FontInfo.c  | 3 +++
+ src/FontNames.c | 3 +++
+ src/GetColor.c  | 4 
+ src/LoadFont.c  | 4 
+ src/LookupCol.c | 6 --
+ src/ParseCol.c  | 3 +++
+ src/QuExt.c | 5 +
+ src/SetFPath.c  | 6 ++
+ src/SetHints.c  | 7 +++
+ src/StNColor.c  | 3 +++
+ src/StName.c| 7 ++-
+ 12 files changed, 51 insertions(+), 4 deletions(-)
+
+diff --git a/src/Font.c b/src/Font.c
+index d4ebdaca..1cd89cca 100644
+--- a/src/Font.c
 b/src/Font.c
+@@ -102,6 +102,8 @@ XFontStruct *XLoadQueryFont(
+ XF86BigfontCodes *extcodes = _XF86BigfontCodes(dpy);
+ #endif
+ 
++if (strlen(name) >= USHRT_MAX)
++return NULL;
+ if (_XF86LoadQueryLocaleFont(dpy, name, &font_result, (Font *)0))
+   return font_result;
+ LockDisplay(dpy);
+@@ -663,7 +665,7 @@ int _XF86LoadQueryLocaleFont(
+ if (!name)
+   return 0;
+ l = (int) strlen(name);
+-if (l < 2 || name[l - 1] != '*' || name[l - 2] != '-')
++if (l < 2 || name[l - 1] != '*' || name[l - 2] != '-' || l >= USHRT_MAX)
+   return 0;
+ charset = NULL;
+ /* next three lines stolen from _XkbGetCharset() */
+diff --git a/src/FontInfo.c b/src/FontInfo.c
+index 694efa10..6644b3fa 100644
+--- a/src/FontInfo.c
 b/src/FontInfo.c
+@@ -58,6 +58,9 @@ XFontStruct **info)  /* RETURN */
+ register xListFontsReq *req;
+ int j;
+ 
++if (strlen(pattern) >= USHRT_MAX)
++return NULL;
++
+ LockDisplay(dpy);
+ GetReq(ListFontsWithInfo, req);
+ req->maxNames = maxNames;
+diff --git a/src/FontNames.c b/src/FontNames.c
+index 30912925..458d80c9 100644
+--- a/src/FontNames.c
 b/src/FontNames.c
+@@ -51,6 +51,9 @@ int *actualCount)/* RETURN */
+ register xListFontsReq *req;
+ unsigned long rlen = 0;
+ 
++if (strlen(pattern) >= USHRT_MAX)
++return NULL;
++
+ LockDisplay(dpy);
+ GetReq(ListFonts, req);
+ req->maxNames = maxNames;
+diff --git a/src/GetColor.c b/src/GetColor.c
+index d088497f..c8178067 100644
+--- a/src/GetColor.c
 b/src/GetColor.c
+@@ -27,6 +27,7 @@ in this Software without prior written authorization from 
The Open Group.
+ #ifdef HAVE_CONFIG_H
+ #include 
+ #endif
++#include 
+ #include 
+ #include "Xlibint.h"
+ #include "Xcmsint.h"
+@@ -48,6 +49,9 @@ XColor *exact_def) /* RETURN */
+ XcmsColor cmsColor_exact;
+ Status ret;
+ 
++if (strlen(colorname) >= USHRT_MAX)
++return (0);
++
+ #ifdef XCMS
+ /*
+  * Let's Attempt to use Xcms and i18n approach to Parse Color
+diff --git a/src/LoadFont.c b/src/LoadFont.c
+index 0a3809a8..3996436f 100644
+--- a/src/LoadFont.c
 b/src/LoadFont.c
+@@ -27,6 +27,7 @@ in this Software without prior written authorization from 
The Open Group.
+ #ifdef HAVE_CONFIG_H
+ #include 
+ #endif
++#include 
+ #include "Xlibint.h"
+ 
+ Font
+@@ -38,6 +39,9 @@ XLoadFont (
+ Font fid;
+ register xOpenFontReq *req;
+ 
++if (strlen(name) >= USHRT_MAX)
++return (0);
++
+ if (_XF86LoadQueryLocaleFont(dpy, name, (XFontStruct **)0, &fid))
+   return fid;
+ 
+diff --git a/src/LookupCol.c b/src/LookupCol.c
+index 9608d512..cd9b1368 100644
+--- a/src/LookupCol.c
 b/src/LookupCol.c
+@@ -27,6 +27,7 @@ in this Software without prior written authorization from 
The Open Group.
+ #ifdef HAVE_CONFIG_H
+ #include 
+ #endif
++#include 
+ #include 
+ #include "Xlibint.h"
+ #include "Xcmsint.h"
+@@ -46,6 +47,9 @@ XLookupColor (
+   XcmsCCC ccc;
+   XcmsColor cmsColor_exact;
+ 
++  n = (int) strlen (spec);
++  if (n >= USHRT_MAX)
++return 0;
+ #ifdef XCMS
+   /*
+* Let's Attempt to use Xcms and i18n ap

[OE-core] [PATCH] ffmpeg: link in libatomic on 32-bit mips

2021-06-14 Thread kai
From: Kai Kang 

It needs some functions from libatomic on 32-bit mips too:

| libavformat/libavformat.so: undefined reference to `__atomic_fetch_sub_8'

Signed-off-by: Kai Kang 
---
 meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index 3ed009bbb7..f3097f8ebf 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -130,6 +130,7 @@ EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 
'mips32r6', '--disable-mi
 EXTRA_OECONF_append_mips = " --extra-libs=-latomic --disable-mips32r5 
--disable-mipsdsp --disable-mipsdspr2 \
  --disable-loongson2 --disable-loongson3 
--disable-mmi --disable-msa --disable-msa2"
 EXTRA_OECONF_append_riscv32 = " --extra-libs=-latomic"
+EXTRA_OECONF_append_powerpc = " --extra-libs=-latomic"
 
 # gold crashes on x86, another solution is to --disable-asm but thats more 
hacky
 # ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152951): 
https://lists.openembedded.org/g/openembedded-core/message/152951
Mute This Topic: https://lists.openembedded.org/mt/83548820/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] ffmpeg: link in libatomic on 32-bit mips

2021-06-14 Thread kai

On 6/15/21 2:22 PM, Andre McCurdy wrote:

On Mon, Jun 14, 2021 at 8:54 PM kai  wrote:

From: Kai Kang 

It needs some functions from libatomic on 32-bit mips too:

| libavformat/libavformat.so: undefined reference to `__atomic_fetch_sub_8'

Signed-off-by: Kai Kang 
---
  meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb | 1 +
  1 file changed, 1 insertion(+)

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index 3ed009bbb7..f3097f8ebf 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -130,6 +130,7 @@ EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 
'mips32r6', '--disable-mi
  EXTRA_OECONF_append_mips = " --extra-libs=-latomic --disable-mips32r5 
--disable-mipsdsp --disable-mipsdspr2 \
   --disable-loongson2 --disable-loongson3 --disable-mmi 
--disable-msa --disable-msa2"
  EXTRA_OECONF_append_riscv32 = " --extra-libs=-latomic"
+EXTRA_OECONF_append_powerpc = " --extra-libs=-latomic"

Subject mentions mips, not powerpc.


Oooops. v2 will be sent. Many thanks.

Kai




  # gold crashes on x86, another solution is to --disable-asm but thats more 
hacky
  # ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684
--
2.17.1






--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152954): 
https://lists.openembedded.org/g/openembedded-core/message/152954
Mute This Topic: https://lists.openembedded.org/mt/83548820/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] ffmpeg: link in libatomic on 32-bit powerpc

2021-06-14 Thread kai
From: Kai Kang 

It needs some functions from libatomic on 32-bit powerpc too:

| libavformat/libavformat.so: undefined reference to `__atomic_fetch_sub_8'

Signed-off-by: Kai Kang 
---
v2:
* correct the typo of the machine in commit log

 meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index 3ed009bbb7..f3097f8ebf 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -130,6 +130,7 @@ EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 
'mips32r6', '--disable-mi
 EXTRA_OECONF_append_mips = " --extra-libs=-latomic --disable-mips32r5 
--disable-mipsdsp --disable-mipsdspr2 \
  --disable-loongson2 --disable-loongson3 
--disable-mmi --disable-msa --disable-msa2"
 EXTRA_OECONF_append_riscv32 = " --extra-libs=-latomic"
+EXTRA_OECONF_append_powerpc = " --extra-libs=-latomic"
 
 # gold crashes on x86, another solution is to --disable-asm but thats more 
hacky
 # ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152955): 
https://lists.openembedded.org/g/openembedded-core/message/152955
Mute This Topic: https://lists.openembedded.org/mt/83550347/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] ffmpeg: link in libatomic on 32-bit powerpc

2021-06-30 Thread kai

On 6/15/21 2:27 PM, kai wrote:

From: Kai Kang 

It needs some functions from libatomic on 32-bit powerpc too:

| libavformat/libavformat.so: undefined reference to `__atomic_fetch_sub_8'

Signed-off-by: Kai Kang 
---
v2:
* correct the typo of the machine in commit log


Ping.




  meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb | 1 +
  1 file changed, 1 insertion(+)

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index 3ed009bbb7..f3097f8ebf 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -130,6 +130,7 @@ EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 
'mips32r6', '--disable-mi
  EXTRA_OECONF_append_mips = " --extra-libs=-latomic --disable-mips32r5 
--disable-mipsdsp --disable-mipsdspr2 \
   --disable-loongson2 --disable-loongson3 --disable-mmi 
--disable-msa --disable-msa2"
  EXTRA_OECONF_append_riscv32 = " --extra-libs=-latomic"
+EXTRA_OECONF_append_powerpc = " --extra-libs=-latomic"
  
  # gold crashes on x86, another solution is to --disable-asm but thats more hacky

  # ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684





--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#153441): 
https://lists.openembedded.org/g/openembedded-core/message/153441
Mute This Topic: https://lists.openembedded.org/mt/83550347/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] ifupdown: create file interfaces if not exist

2020-03-22 Thread kai
From: Kai Kang 

It fails to run ifup if /etc/network/interfaces doesn't exist:

| ifup: couldn't open interfaces file "/etc/network/interfaces": No such
|   file or directory

Create the config file if not exist.

Signed-off-by: Kai Kang 
---
 meta/recipes-core/ifupdown/ifupdown_0.8.35.bb | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-core/ifupdown/ifupdown_0.8.35.bb 
b/meta/recipes-core/ifupdown/ifupdown_0.8.35.bb
index 53cb971d33..a8913e6e29 100644
--- a/meta/recipes-core/ifupdown/ifupdown_0.8.35.bb
+++ b/meta/recipes-core/ifupdown/ifupdown_0.8.35.bb
@@ -48,6 +48,13 @@ do_install_ptest () {
 cp -r ${S}/tests/linux ${D}${PTEST_PATH}/tests/
 }
 
+pkg_postinst_ontarget_${PN} () {
+if [ ! -f /etc/network/interfaces ]; then
+mkdir -p /etc/network
+touch /etc/network/interfaces
+fi
+}
+
 ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_${PN} = "ifup ifdown"
 
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136593): 
https://lists.openembedded.org/g/openembedded-core/message/136593
Mute This Topic: https://lists.openembedded.org/mt/72483318/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] Revert "ifupdown: create file interfaces if not exist"

2020-03-29 Thread kai

On 2020/3/30 上午10:06, Chen Qi wrote:

This reverts commit 4e692daf66d2c9d51d418706e20f4527505dc0bd.

The patch did not take into consideration of read-only rootfs, causing
the following regression.

   ERROR "The following packages could not be configured offline and rootfs is 
read-only: ['100-ifupdown']"

The original patch was added to resolve problem running `ifup eth1' on
a systemd based rootfs. However, when using systemd, we do not use ifup
to manage our network interfaces.

Signed-off-by: Chen Qi 
---
  meta/recipes-core/ifupdown/ifupdown_0.8.35.bb | 7 ---
  1 file changed, 7 deletions(-)

diff --git a/meta/recipes-core/ifupdown/ifupdown_0.8.35.bb 
b/meta/recipes-core/ifupdown/ifupdown_0.8.35.bb
index a8913e6e29..53cb971d33 100644
--- a/meta/recipes-core/ifupdown/ifupdown_0.8.35.bb
+++ b/meta/recipes-core/ifupdown/ifupdown_0.8.35.bb
@@ -48,13 +48,6 @@ do_install_ptest () {
  cp -r ${S}/tests/linux ${D}${PTEST_PATH}/tests/
  }
  
-pkg_postinst_ontarget_${PN} () {

-if [ ! -f /etc/network/interfaces ]; then
-mkdir -p /etc/network
-touch /etc/network/interfaces
-fi
-}
-
  ALTERNATIVE_PRIORITY = "100"
  ALTERNATIVE_${PN} = "ifup ifdown"


The network configure files used by ifupdown are provided by 
init-ifupdown by default. I once thought to make  ifupdown depends on it.
But init-ifupdown provides a script to configure network and then will 
need 'inherit systemd'. I once thought it is not proper to make a
sysvinit related package to inherit systemd. But if the original patch 
causes readonly rootfs issue,  I'll turn to work with init-ifupdown.


Sorry for the inconvenience.

Kai



  






--
Kai Kang
Wind River Linux

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136845): 
https://lists.openembedded.org/g/openembedded-core/message/136845
Mute This Topic: https://lists.openembedded.org/mt/72644150/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] pseudo: add macro guard for seccomp

2020-04-26 Thread kai
From: Kai Kang 

It fails to compile pseudo-native on centos 7:

| ports/linux/pseudo_wrappers.c: In function ‘prctl’:
| ports/linux/pseudo_wrappers.c:129:14: error: ‘SECCOMP_SET_MODE_FILTER’ 
undeclared (first use in this function)
|if (cmd == SECCOMP_SET_MODE_FILTER) {
|   ^

Add macro guard for seccomp to avoid the failure.

Signed-off-by: Kai Kang 
---
 meta/recipes-devtools/pseudo/files/seccomp.patch | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/pseudo/files/seccomp.patch 
b/meta/recipes-devtools/pseudo/files/seccomp.patch
index be42eaf353..2bad8dae28 100644
--- a/meta/recipes-devtools/pseudo/files/seccomp.patch
+++ b/meta/recipes-devtools/pseudo/files/seccomp.patch
@@ -7,6 +7,17 @@ Upstream-Status: Pending
 RP 2020/4/3
 Signed-off-by: Richard Purdie 
 
+It fails to compile pseudo-native on centos 7:
+
+| ports/linux/pseudo_wrappers.c: In function ‘prctl’:
+| ports/linux/pseudo_wrappers.c:129:14: error: ‘SECCOMP_SET_MODE_FILTER’ 
undeclared (first use in this function)
+|if (cmd == SECCOMP_SET_MODE_FILTER) {
+|   ^
+
+Add macro guard for seccomp to avoid the failure.
+
+Signed-off-by: Kai Kang 
+
 Index: git/ports/linux/pseudo_wrappers.c
 ===
 --- git.orig/ports/linux/pseudo_wrappers.c
@@ -40,7 +51,7 @@ Index: git/ports/linux/pseudo_wrappers.c
/* gcc magic to attempt to just pass these args to syscall. we have to
 * guess about the number of args; the docs discuss calling conventions
 * up to 7, so let's try that?
-@@ -92,3 +108,42 @@ static long wrap_syscall(long nr, va_lis
+@@ -92,3 +108,44 @@ static long wrap_syscall(long nr, va_lis
(void) ap;
return -1;
  }
@@ -56,6 +67,7 @@ Index: git/ports/linux/pseudo_wrappers.c
 +  return rc;
 +  }
 +
++#ifdef SYS_seccomp
 +  /* pseudo and seccomp are incompatible as pseudo uses different syscalls
 +   * so pretend to enable seccomp but really do nothing */
 +  if (option == PR_SET_SECCOMP) {
@@ -67,6 +79,7 @@ Index: git/ports/linux/pseudo_wrappers.c
 +  return 0;
 +  }
 +  }
++#endif
 +
 +  /* gcc magic to attempt to just pass these args to prctl. we have to
 +   * guess about the number of args; the docs discuss calling conventions
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#137512): 
https://lists.openembedded.org/g/openembedded-core/message/137512
Mute This Topic: https://lists.openembedded.org/mt/73298568/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] pseudo: add macro guard for seccomp

2020-04-27 Thread kai

On 2020/4/27 下午11:01, Seebs wrote:

On Mon, 27 Apr 2020 14:04:16 +0800
"kai"  wrote:


| ports/linux/pseudo_wrappers.c:129:14: error:
‘SECCOMP_SET_MODE_FILTER’ undeclared (first use in this function)
|if (cmd == SECCOMP_SET_MODE_FILTER) {

Should the test be against this being #defined, rather than the
separate SYS__seccomp?


It keeps compliance with pre-section in this patch. The patch is to deal 
with pseudo and seccomp, I suppose it is better to keep

the same with macro guard in the pre-section.

Regards,
Kai




-s





--
Kai Kang
Wind River Linux

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#137557): 
https://lists.openembedded.org/g/openembedded-core/message/137557
Mute This Topic: https://lists.openembedded.org/mt/73298568/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] buildtools-extended-tarball: add nativesdk-glibc

2020-05-05 Thread kai
From: Kai Kang 

It requires gcc 5.0 via OE-Core rev abc741a. On centos 7, the gcc
version is too low then it has to build with buildtools-extended-tarball
which provides nativesdk-gcc.

But it fails to build nspr-native:

| gcc   abstract.o -Xlinker -L../../dist/lib -lplc4 -L../../dist/lib -lnspr4 
-lpthread -o abstract
| /PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1: undefined 
reference to `__clock_getcpuclockid@GLIBC_PRIVATE'
| /PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1: undefined 
reference to `__clock_nanosleep@GLIBC_PRIVATE'
| /PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1: undefined 
reference to `__clock_settime@GLIBC_PRIVATE'
| /PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1: undefined 
reference to `__clock_getres@GLIBC_PRIVATE'
| collect2: error: ld returned 1 exit status
| make: *** [Makefile:379: abstract] Error 1

Add nativesdk-glibc to buildtools-extended-tarball. And it increases
size of buildtools-extended-tarball about 3K from 48356989 to 48360329.

Signed-off-by: Kai Kang 
---
 meta/recipes-core/meta/buildtools-extended-tarball.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/meta/buildtools-extended-tarball.bb 
b/meta/recipes-core/meta/buildtools-extended-tarball.bb
index c32d0107c3..ab95d62f6f 100644
--- a/meta/recipes-core/meta/buildtools-extended-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-extended-tarball.bb
@@ -27,6 +27,7 @@ TOOLCHAIN_HOST_TASK += "\
 nativesdk-libstdc++-staticdev \
 nativesdk-libtool \
 nativesdk-pkgconfig \
+nativesdk-glibc \
 nativesdk-glibc-utils \
 nativesdk-libxcrypt-dev \
 "
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#137959): 
https://lists.openembedded.org/g/openembedded-core/message/137959
Mute This Topic: https://lists.openembedded.org/mt/74012860/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] python3-git: 3.0.5 -> 3.1.2

2020-05-09 Thread kai
From: Kai Kang 

Signed-off-by: Kai Kang 
---
 .../python/{python3-git_3.0.5.bb => python3-git_3.1.2.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/python/{python3-git_3.0.5.bb => 
python3-git_3.1.2.bb} (88%)

diff --git a/meta/recipes-devtools/python/python3-git_3.0.5.bb 
b/meta/recipes-devtools/python/python3-git_3.1.2.bb
similarity index 88%
rename from meta/recipes-devtools/python/python3-git_3.0.5.bb
rename to meta/recipes-devtools/python/python3-git_3.1.2.bb
index 36313ef8b9..72280ec30d 100644
--- a/meta/recipes-devtools/python/python3-git_3.0.5.bb
+++ b/meta/recipes-devtools/python/python3-git_3.1.2.bb
@@ -12,8 +12,8 @@ PYPI_PACKAGE = "GitPython"
 
 inherit pypi setuptools3
 
-SRC_URI[md5sum] = "7555ad89a22f663c25cced5f623bdef0"
-SRC_URI[sha256sum] = 
"9c2398ffc3dcb3c40b27324b316f08a4f93ad646d5a6328cafbb871aa79f5e42"
+SRC_URI[md5sum] = "2397bea2d7c36ef9f874ab6355abae59"
+SRC_URI[sha256sum] = 
"864a47472548f3ba716ca202e034c1900f197c0fb3a08f641c20c3cafd15ed94"
 
 DEPENDS += " ${PYTHON_PN}-gitdb"
 
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138094): 
https://lists.openembedded.org/g/openembedded-core/message/138094
Mute This Topic: https://lists.openembedded.org/mt/74110694/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] gcr: depends on gnupg-native

2020-05-11 Thread kai
From: Kai Kang 

It fails to build gcr if no commmand gpg on build host:

| meson.build:44:0: ERROR: Program(s) ['gpg2', 'gpg'] not found or not 
executable

Add dependency gnupg-native to fix the error.

Signed-off-by: Kai Kang 
---
 meta/recipes-gnome/gcr/gcr_3.36.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-gnome/gcr/gcr_3.36.0.bb 
b/meta/recipes-gnome/gcr/gcr_3.36.0.bb
index 4fe3b2fff3..458dc8e6c4 100644
--- a/meta/recipes-gnome/gcr/gcr_3.36.0.bb
+++ b/meta/recipes-gnome/gcr/gcr_3.36.0.bb
@@ -8,7 +8,7 @@ BUGTRACKER = "https://gitlab.gnome.org/GNOME/gcr/issues";
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
 
-DEPENDS = "gtk+3 p11-kit glib-2.0 libgcrypt \
+DEPENDS = "gtk+3 p11-kit glib-2.0 libgcrypt gnupg-native \
${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'libxslt-native', 
'', d)}"
 
 GNOMEBASEBUILDCLASS = "meson"
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138113): 
https://lists.openembedded.org/g/openembedded-core/message/138113
Mute This Topic: https://lists.openembedded.org/mt/74132108/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] buildtools-extended-tarball: add nativesdk-glibc

2020-05-11 Thread kai

On 2020/5/10 下午9:40, Richard Purdie wrote:

On Wed, 2020-05-06 at 09:54 +0800, kai wrote:

From: Kai Kang 

It requires gcc 5.0 via OE-Core rev abc741a. On centos 7, the gcc
version is too low then it has to build with buildtools-extended-
tarball
which provides nativesdk-gcc.

But it fails to build nspr-native:


gcc   abstract.o -Xlinker -L../../dist/lib -lplc4 -L../../dist/lib
-lnspr4 -lpthread -o abstract
/PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_getcpuclockid@GLIBC_PRIVATE'
/PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_nanosleep@GLIBC_PRIVATE'
/PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_settime@GLIBC_PRIVATE'
/PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_getres@GLIBC_PRIVATE'
collect2: error: ld returned 1 exit status
make: *** [Makefile:379: abstract] Error 1

Add nativesdk-glibc to buildtools-extended-tarball. And it increases
size of buildtools-extended-tarball about 3K from 48356989 to
48360329.

Signed-off-by: Kai Kang 
---
  meta/recipes-core/meta/buildtools-extended-tarball.bb | 1 +
  1 file changed, 1 insertion(+)

This doesn't make sense. Does it mean we need a new uninative version
instead?

Cheers,

Richard


```This works in dunfell, as of right now. This should have been fixed with:

```https://patchwork.openembedded.org/patch/171584/

Hi Jeremy,

I can't receive mails from maillist for now. So reply here.

I suppose when I build oe-core master on ubunu 16.04, it already 
contains the commit. I'll double  check it.


Thanks a lot.

--
Kai Kang
Wind River Linux

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138146): 
https://lists.openembedded.org/g/openembedded-core/message/138146
Mute This Topic: https://lists.openembedded.org/mt/74012860/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] buildtools-extended-tarball: add nativesdk-glibc

2020-05-11 Thread kai

On 2020/5/12 上午10:47, Jeremy A. Puhlman wrote:



On 5/11/2020 7:30 PM, Kang Kai wrote:

On 2020/5/10 下午9:40, Richard Purdie wrote:

On Wed, 2020-05-06 at 09:54 +0800, kai wrote:

From: Kai Kang 

It requires gcc 5.0 via OE-Core rev abc741a. On centos 7, the gcc
version is too low then it has to build with buildtools-extended-
tarball
which provides nativesdk-gcc.

But it fails to build nspr-native:


gcc   abstract.o -Xlinker -L../../dist/lib -lplc4 -L../../dist/lib
-lnspr4 -lpthread -o abstract
/PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_getcpuclockid@GLIBC_PRIVATE'
/PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_nanosleep@GLIBC_PRIVATE'
/PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_settime@GLIBC_PRIVATE'
/PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_getres@GLIBC_PRIVATE'
collect2: error: ld returned 1 exit status
make: *** [Makefile:379: abstract] Error 1

Add nativesdk-glibc to buildtools-extended-tarball. And it increases
size of buildtools-extended-tarball about 3K from 48356989 to
48360329.

Signed-off-by: Kai Kang 
---
  meta/recipes-core/meta/buildtools-extended-tarball.bb | 1 +
  1 file changed, 1 insertion(+)

This doesn't make sense. Does it mean we need a new uninative version
instead?

Cheers,

Richard

```This works in dunfell, as of right now. This should have been 
fixed with:


```https://patchwork.openembedded.org/patch/171584/

Hi Jeremy,

I can't receive mails from maillist for now. So reply here.

I suppose when I build oe-core master on ubunu 16.04, it already 
contains the commit. I'll double  check it.
Yeah it is in master right now. I am not entirely sure why you would 
be seeing it. There was some discussion on
the list about twiddling with the location of /etc/ld.so.conf and 
relocating it in the generation of sdks in general, but
I have not been able to poke at it today. If that went in, it might 
have caused the issue. Basically what I saw when I was
looking in to it, was the sdk ld.so.conf was not getting loaded(in the 
case of the patch because it was looking for etc/etc), but

if it got moved or something similar, it might cause a similar issue.

If you are still seeing the issue on master, strace the link of the 
file with -f and look at what is going on with the load of ld.so.conf and
that might explain what is going on. Also make sure that ld.so.conf is 
still there and has reasonable content.



Thank you very much for your detailed comment. I'll try it.







--
Kai Kang
Wind River Linux

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138148): 
https://lists.openembedded.org/g/openembedded-core/message/138148
Mute This Topic: https://lists.openembedded.org/mt/74012860/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] gcr: depends on gnupg-native

2020-05-13 Thread kai

On 2020/5/11 下午5:23, kai.k...@windriver.com wrote:

From: Kai Kang 

It fails to build gcr if no commmand gpg on build host:

| meson.build:44:0: ERROR: Program(s) ['gpg2', 'gpg'] not found or not 
executable

Add dependency gnupg-native to fix the error.

Signed-off-by: Kai Kang 
---
  meta/recipes-gnome/gcr/gcr_3.36.0.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-gnome/gcr/gcr_3.36.0.bb 
b/meta/recipes-gnome/gcr/gcr_3.36.0.bb
index 4fe3b2fff3..458dc8e6c4 100644
--- a/meta/recipes-gnome/gcr/gcr_3.36.0.bb
+++ b/meta/recipes-gnome/gcr/gcr_3.36.0.bb
@@ -8,7 +8,7 @@ BUGTRACKER = "https://gitlab.gnome.org/GNOME/gcr/issues";
  LICENSE = "GPLv2"
  LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
  
-DEPENDS = "gtk+3 p11-kit glib-2.0 libgcrypt \

+DEPENDS = "gtk+3 p11-kit glib-2.0 libgcrypt gnupg-native \
 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'libxslt-native', '', 
d)}"
  
  GNOMEBASEBUILDCLASS = "meson"


Any comment, please?

--
Kai Kang
Wind River Linux

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138240): 
https://lists.openembedded.org/g/openembedded-core/message/138240
Mute This Topic: https://lists.openembedded.org/mt/74132108/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] buildtools-extended-tarball: add nativesdk-glibc

2020-05-14 Thread kai

On 2020/5/12 上午10:49, Kang Kai wrote:

On 2020/5/12 上午10:47, Jeremy A. Puhlman wrote:



On 5/11/2020 7:30 PM, Kang Kai wrote:

On 2020/5/10 下午9:40, Richard Purdie wrote:

On Wed, 2020-05-06 at 09:54 +0800, kai wrote:

From: Kai Kang 

It requires gcc 5.0 via OE-Core rev abc741a. On centos 7, the gcc
version is too low then it has to build with buildtools-extended-
tarball
which provides nativesdk-gcc.

But it fails to build nspr-native:


gcc   abstract.o -Xlinker -L../../dist/lib -lplc4 -L../../dist/lib
-lnspr4 -lpthread -o abstract
/PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_getcpuclockid@GLIBC_PRIVATE'
/PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_nanosleep@GLIBC_PRIVATE'
/PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_settime@GLIBC_PRIVATE'
/PATH/TO/x86_64-wrlinuxsdk-linux/bin/ld: /lib64/librt.so.1:
undefined reference to `__clock_getres@GLIBC_PRIVATE'
collect2: error: ld returned 1 exit status
make: *** [Makefile:379: abstract] Error 1

Add nativesdk-glibc to buildtools-extended-tarball. And it increases
size of buildtools-extended-tarball about 3K from 48356989 to
48360329.

Signed-off-by: Kai Kang 
---
  meta/recipes-core/meta/buildtools-extended-tarball.bb | 1 +
  1 file changed, 1 insertion(+)

This doesn't make sense. Does it mean we need a new uninative version
instead?

Cheers,

Richard

```This works in dunfell, as of right now. This should have been 
fixed with:


```https://patchwork.openembedded.org/patch/171584/

Hi Jeremy,

I can't receive mails from maillist for now. So reply here.

I suppose when I build oe-core master on ubunu 16.04, it already 
contains the commit. I'll double  check it.
Yeah it is in master right now. I am not entirely sure why you would 
be seeing it. There was some discussion on
the list about twiddling with the location of /etc/ld.so.conf and 
relocating it in the generation of sdks in general, but
I have not been able to poke at it today. If that went in, it might 
have caused the issue. Basically what I saw when I was
looking in to it, was the sdk ld.so.conf was not getting loaded(in 
the case of the patch because it was looking for etc/etc), but

if it got moved or something similar, it might cause a similar issue.

If you are still seeing the issue on master, strace the link of the 
file with -f and look at what is going on with the load of ld.so.conf 
and
that might explain what is going on. Also make sure that ld.so.conf 
is still there and has reasonable content.



Thank you very much for your detailed comment. I'll try it.


Hi Richard & Jeremy,

I tried buildtools-extended-tarball with latest oe-core repo, and it 
could build nspr-native on both ubuntu 16.04 and centos 7.7. Maybe it is 
fixed along with recent update of buildtools-extend.


Thanks a lot for your replies.

Regards,
Kai












--
Kai Kang
Wind River Linux

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138252): 
https://lists.openembedded.org/g/openembedded-core/message/138252
Mute This Topic: https://lists.openembedded.org/mt/74012860/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] cups: set rundir to /run/cups if systemd is used

2021-02-21 Thread kai

On 2/22/21 12:51 AM, Oleksandr Kravchuk wrote:

Kai -

Could you please verify and confirm the fix is correct?


OK. I'll test the v2 patch.

Regards,
Kai



On 21/02/2021 17:49, Oleksandr Kravchuk wrote:

When running under systemd, cups needs to be configured with
'--with-rundir=/run/cups', as systemd takes an exception to the
activation socket being under /var/run and relocates it.

This leads to fd duplication in cupsd and an inadvertent closure of the
activation socket when the daemon exits due to inactivity, so that the
daemon cannot be activated again.

[YOCTO #14152]

Signed-off-by: Oleksandr Kravchuk 
---
  meta/recipes-extended/cups/cups.inc | 5 +
  1 file changed, 5 insertions(+)

diff --git a/meta/recipes-extended/cups/cups.inc 
b/meta/recipes-extended/cups/cups.inc

index e7a704134c..a8e8d115da 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -56,8 +56,11 @@ EXTRA_OECONF = " \
 --enable-libusb \
 --with-domainsocket=/run/cups/cups.sock \
 DSOFLAGS='${LDFLAGS}' \
+   ${EXTRA_OECONF_SYSTEMD} \
 "
  +EXTRA_OECONF_SYSTEMD = 
"${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-rundir=/run/cups','',d)}"

+
  EXTRA_AUTORECONF += "--exclude=autoheader"
    do_compile () {
@@ -105,6 +108,8 @@ RDEPENDS_${PN} += 
"${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps',

  FILES_${PN} += "${libexecdir}/cups/ \
 "
  +FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 
'/run/cups/certs', '', d)}"

+
  FILES_${PN}-lib = "${libdir}/libcups.so.*"
    FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"



--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148417): 
https://lists.openembedded.org/g/openembedded-core/message/148417
Mute This Topic: https://lists.openembedded.org/mt/80803907/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2 1/1] Customize prompt string for SDKs

2021-02-21 Thread kai

On 1/8/21 9:02 AM, kai wrote:

From: Kai Kang 

Introduce a new variable SDK_PS1 to customize prompt string for SDKs
when source script environment-setup-script. The prompt string of SDKs
is set by default with something looks like:

SDK-poky-glibc-x86_64--cortexa57-qemuarm64$


Hi Richard,

It has been in master-next for a long time. Any concern about it please?

Regards,
Kai



Signed-off-by: Kai Kang 
---
  meta/classes/toolchain-scripts.bbclass   | 1 +
  meta/conf/bitbake.conf   | 1 +
  meta/recipes-core/meta/buildtools-tarball.bb | 1 +
  3 files changed, 3 insertions(+)

diff --git a/meta/classes/toolchain-scripts.bbclass 
b/meta/classes/toolchain-scripts.bbclass
index db1d3215ef..88df373d0b 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -45,6 +45,7 @@ toolchain_create_sdk_env_script () {

EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${TARGET_ARCH}${TARGET_VENDOR}-$i"
done
echo "export 
PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH'
 >> $script
+   echo 'export PS1="${SDK_PS1}"' >>$script
echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script
echo 'export 
PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig'
 >> $script
echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" 
>> $script
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index a04005b0f5..93687f9950 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -424,6 +424,7 @@ PKGDATA_DIR = "${TMPDIR}/pkgdata/${MACHINE}"
  
  SDK_NAME_PREFIX ?= "oecore"

  SDK_NAME = "${SDK_NAME_PREFIX}-${SDK_ARCH}-${TUNE_PKGARCH}"
+SDK_PS1 ?= "SDK-${SDK_NAME}:$ "
  SDKPATH = "/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"
  SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"
  
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb

index 9da81d5523..59cfc64ce8 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -71,6 +71,7 @@ create_sdk_files_append () {
echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
echo 'export 
GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' 
>>$script
echo 'export 
SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' 
>>$script
+   echo 'export PS1="${SDK_PS1}"' >>$script
  
  	toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
  






--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148418): 
https://lists.openembedded.org/g/openembedded-core/message/148418
Mute This Topic: https://lists.openembedded.org/mt/80815399/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] cups: set rundir to /run/cups if systemd is used

2021-02-23 Thread kai

On 2/22/21 4:47 AM, Oleksandr Kravchuk wrote:

When running under systemd, cups needs to be configured with
'--with-rundir=/run/cups', as systemd takes an exception to the
activation socket being under /var/run and relocates it.

This leads to fd duplication in cupsd and an inadvertent closure of the
activation socket when the daemon exits due to inactivity, so that the
daemon cannot be activated again.


Hi Oleksandr,

Did you test it with qemu image? The app "Manage Printing" of the sato 
image could not be launched. And I update the cupsd.conf with


Listen 0.0.0.0:631

But it can not access from outside. Any suggestion please?

Regards,
Kai


[YOCTO #14152]

Signed-off-by: Oleksandr Kravchuk 
---
  meta/recipes-extended/cups/cups.inc | 9 +
  1 file changed, 9 insertions(+)

diff --git a/meta/recipes-extended/cups/cups.inc 
b/meta/recipes-extended/cups/cups.inc
index e7a704134c..ff1ab70be9 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -56,8 +56,11 @@ EXTRA_OECONF = " \
 --enable-libusb \
 --with-domainsocket=/run/cups/cups.sock \
 DSOFLAGS='${LDFLAGS}' \
+   ${EXTRA_OECONF_SYSTEMD} \
 "
  
+EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-rundir=/run/cups','',d)}"

+
  EXTRA_AUTORECONF += "--exclude=autoheader"
  
  do_compile () {

@@ -77,6 +80,7 @@ do_install () {
  
  	# Remove /var/run from package as cupsd will populate it on startup

rm -fr ${D}/${localstatedir}/run
+   rm -rf ${D}/run
rm -fr ${D}/${localstatedir}/log
rmdir ${D}/${libexecdir}/${BPN}/driver
  
@@ -97,6 +101,11 @@ do_install () {

install -m 0644 ${WORKDIR}/volatiles.99_cups \
${D}${sysconfdir}/default/volatiles/99_cups
fi
+
+if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', 
d)}; then
+install -d ${D}${sysconfdir}/tmpfiles.d
+echo "d /run/${BPN}/cert 0755 - - - -" > 
${D}${sysconfdir}/tmpfiles.d/cups.conf
+fi
  }
  
  PACKAGES =+ "${PN}-lib ${PN}-libimage"



--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148516): 
https://lists.openembedded.org/g/openembedded-core/message/148516
Mute This Topic: https://lists.openembedded.org/mt/80809459/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] cups: set rundir to /run/cups if systemd is used

2021-02-23 Thread kai

On 2/22/21 4:47 AM, Oleksandr Kravchuk wrote:

When running under systemd, cups needs to be configured with
'--with-rundir=/run/cups', as systemd takes an exception to the
activation socket being under /var/run and relocates it.

This leads to fd duplication in cupsd and an inadvertent closure of the
activation socket when the daemon exits due to inactivity, so that the
daemon cannot be activated again.

[YOCTO #14152]


Hi Oleksandr,

Thanks for your work. But there is a fix in master alreay:

https://git.openembedded.org/openembedded-core/commit/meta/recipes-extended/cups?id=6c3f56020da7a26c2daea73e39c2f324f1f597db


commit a5b9fa3c450af3beac5f1b68797a1d044091fbbe
Author: Chen Qi 
Date:   Fri Oct 16 12:58:56 2020 +0800

    cups: use /run instead /var/run in systemd's unit file

    /var/run has been deprecated by systemd, so use /run instead,
    as suggested by systemd.

    (From OE-Core rev: 6c3f56020da7a26c2daea73e39c2f324f1f597db)

    Signed-off-by: Chen Qi 
    Signed-off-by: Richard Purdie 


Hi Steve,

Would like to cherry pick that commit for dunfell please? It fixes YOCTO 
#14152.


Thanks.

Kai



Signed-off-by: Oleksandr Kravchuk 
---
  meta/recipes-extended/cups/cups.inc | 9 +
  1 file changed, 9 insertions(+)

diff --git a/meta/recipes-extended/cups/cups.inc 
b/meta/recipes-extended/cups/cups.inc
index e7a704134c..ff1ab70be9 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -56,8 +56,11 @@ EXTRA_OECONF = " \
 --enable-libusb \
 --with-domainsocket=/run/cups/cups.sock \
 DSOFLAGS='${LDFLAGS}' \
+   ${EXTRA_OECONF_SYSTEMD} \
 "
  
+EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-rundir=/run/cups','',d)}"

+
  EXTRA_AUTORECONF += "--exclude=autoheader"
  
  do_compile () {

@@ -77,6 +80,7 @@ do_install () {
  
  	# Remove /var/run from package as cupsd will populate it on startup

rm -fr ${D}/${localstatedir}/run
+   rm -rf ${D}/run
rm -fr ${D}/${localstatedir}/log
rmdir ${D}/${libexecdir}/${BPN}/driver
  
@@ -97,6 +101,11 @@ do_install () {

install -m 0644 ${WORKDIR}/volatiles.99_cups \
${D}${sysconfdir}/default/volatiles/99_cups
fi
+
+if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', 
d)}; then
+install -d ${D}${sysconfdir}/tmpfiles.d
+echo "d /run/${BPN}/cert 0755 - - - -" > 
${D}${sysconfdir}/tmpfiles.d/cups.conf
+fi
  }
  
  PACKAGES =+ "${PN}-lib ${PN}-libimage"



--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148542): 
https://lists.openembedded.org/g/openembedded-core/message/148542
Mute This Topic: https://lists.openembedded.org/mt/80809459/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] toolchain-scripts.bbclass: customize prompt string for SDKs

2021-02-24 Thread kai
From: Kai Kang 

Introduce a new variable SDK_PS1 to customize prompt string for SDKs
when source script environment-setup-script.

The default prompt string of SDKs looks like:

SDK-poky-glibc-x86_64--cortexa57-qemuarm64$

Signed-off-by: Kai Kang 
---
v2: not set PS1 for buildtools-tarball

 meta/classes/toolchain-scripts.bbclass | 1 +
 meta/conf/bitbake.conf | 1 +
 2 files changed, 2 insertions(+)

diff --git a/meta/classes/toolchain-scripts.bbclass 
b/meta/classes/toolchain-scripts.bbclass
index db1d3215ef..88df373d0b 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -45,6 +45,7 @@ toolchain_create_sdk_env_script () {

EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${TARGET_ARCH}${TARGET_VENDOR}-$i"
done
echo "export 
PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH'
 >> $script
+   echo 'export PS1="${SDK_PS1}"' >>$script
echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script
echo 'export 
PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig'
 >> $script
echo 'export 
CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 48af17fbf7..6075749a5e 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -422,6 +422,7 @@ PKGDATA_DIR = "${TMPDIR}/pkgdata/${MACHINE}"
 
 SDK_NAME_PREFIX ?= "oecore"
 SDK_NAME = "${SDK_NAME_PREFIX}-${SDK_ARCH}-${TUNE_PKGARCH}"
+SDK_PS1 ?= "SDK-${SDK_NAME}:$ "
 SDKPATH = "/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"
 SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148592): 
https://lists.openembedded.org/g/openembedded-core/message/148592
Mute This Topic: https://lists.openembedded.org/mt/80896619/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] toolchain-scripts.bbclass: customize prompt string for SDKs

2021-02-25 Thread kai

On 2/25/21 11:29 PM, Christopher Larson wrote:
Are we sure we want to completely override it rather than adding to 
it? I'd be rather irritated if this blows away my prompt without my 
asking for it. I think either it should append or have a variable 
controlling whether this is enabled when building the SDK.
The original requirement is that the PS1 after source sdk environment 
file is as same as the original one. It can not tell whether in a sdk 
environment.


The default assignment of SDK_PS1 is '?=', you can set it in conf file 
to override it.


Regards,
Kai



On Wed, Feb 24, 2021 at 10:59 PM kai <mailto:kai.k...@windriver.com>> wrote:


From: Kai Kang mailto:kai.k...@windriver.com>>

Introduce a new variable SDK_PS1 to customize prompt string for SDKs
when source script environment-setup-script.

The default prompt string of SDKs looks like:

SDK-poky-glibc-x86_64--cortexa57-qemuarm64$

Signed-off-by: Kai Kang mailto:kai.k...@windriver.com>>
---
v2: not set PS1 for buildtools-tarball

 meta/classes/toolchain-scripts.bbclass | 1 +
 meta/conf/bitbake.conf                 | 1 +
 2 files changed, 2 insertions(+)

diff --git a/meta/classes/toolchain-scripts.bbclass
b/meta/classes/toolchain-scripts.bbclass
index db1d3215ef..88df373d0b 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -45,6 +45,7 @@ toolchain_create_sdk_env_script () {

EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${TARGET_ARCH}${TARGET_VENDOR}-$i"
        done
        echo "export

PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH'
>> $script
+       echo 'export PS1="${SDK_PS1}"' >>$script
        echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >>
$script
        echo 'export

PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig'
>> $script
        echo 'export
CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >>
$script
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 48af17fbf7..6075749a5e 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -422,6 +422,7 @@ PKGDATA_DIR = "${TMPDIR}/pkgdata/${MACHINE}"

 SDK_NAME_PREFIX ?= "oecore"
 SDK_NAME = "${SDK_NAME_PREFIX}-${SDK_ARCH}-${TUNE_PKGARCH}"
+SDK_PS1 ?= "SDK-${SDK_NAME}:$ "
 SDKPATH = "/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"
 SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"

-- 
2.17.1








--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics



--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148632): 
https://lists.openembedded.org/g/openembedded-core/message/148632
Mute This Topic: https://lists.openembedded.org/mt/80896619/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] toolchain-scripts.bbclass: customize prompt string for SDKs

2021-02-26 Thread kai

On 2/26/21 7:02 PM, Richard Purdie wrote:

On Fri, 2021-02-26 at 09:57 +0800, Kai wrote:

On 2/25/21 11:29 PM, Christopher Larson wrote:
  

Are we sure we want to completely override it rather than adding
to it? I'd be rather irritated if this blows away my prompt
without my asking for it. I think either it should append or
have a variable controlling whether this is enabled when building
the SDK.

The original requirement is that the PS1 after source sdk environment
file is as same as the original one.
It can not tell whether in a sdk environment.

The default assignment of SDK_PS1 is '?=', you can set it in conf file to 
override it.

I've held off this patch for a while since I think its going to
*really* annoy a subset of users and as Chris says, it can't
be disabled. It would really need to be disablable through configuration
and at runtime when sourcing the script which isn't possible.

I appreciate the usability issue it is trying to improve but
I think it will cause more complaints than issues it solves.
As such I don't think we want to do this...
I have been working on the issue Chiris says by adding a check for 
SDK_PS1. If do not want to change the current behavior,
it could done by not set SDK_PS1 by default. It is better to have a 
chance to modify sdk prompt string.


Regards,
Kai



Cheers,

Richard






--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148703): 
https://lists.openembedded.org/g/openembedded-core/message/148703
Mute This Topic: https://lists.openembedded.org/mt/80896619/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v3 0/2] toolchain-scripts.bbclass: customize prompt

2021-03-01 Thread kai
From: Kai Kang 

v3:
* when SDK_PS1 is empty or not set, no change to PS1 of SDK 
* not set SDK_PS1 by default


Kai Kang (2):
  toolchain-scripts.bbclass: customize prompt string for SDKs
  local.conf.sample.extended: sample value for SDk_PS1

 meta-poky/conf/local.conf.sample.extended | 5 +
 meta/classes/toolchain-scripts.bbclass| 3 +++
 2 files changed, 8 insertions(+)

-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148799): 
https://lists.openembedded.org/g/openembedded-core/message/148799
Mute This Topic: https://lists.openembedded.org/mt/80998141/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v3 1/2] toolchain-scripts.bbclass: customize prompt string for SDKs

2021-03-01 Thread kai
From: Kai Kang 

Introduce a new variable SDK_PS1 to customize prompt string for SDKs
when source script environment-setup-script. If variable SDK_PS1 is not
set or empty, nothing changed. Otherwise new PS1 with the value of
SDK_PS1 is used after source the sdk environment file.

Signed-off-by: Kai Kang 
---
 meta/classes/toolchain-scripts.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/toolchain-scripts.bbclass 
b/meta/classes/toolchain-scripts.bbclass
index db1d3215ef..67a812cb02 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -8,6 +8,8 @@ TARGET_CC_ARCH_append_libc-musl = " -mmusl"
 # default debug prefix map isn't valid in the SDK
 DEBUG_PREFIX_MAP = ""
 
+EXPORT_SDK_PS1 = "${@ 'export PS1=\'%s\'' % d.getVar('SDK_PS1') if 
d.getVar('SDK_PS1') else ''}"
+
 # This function creates an environment-setup-script for use in a deployable SDK
 toolchain_create_sdk_env_script () {
# Create environment setup script.  Remember that $SDKTARGETSYSROOT 
should
@@ -39,6 +41,7 @@ toolchain_create_sdk_env_script () {
echo 'return 1' >> $script
echo 'fi' >> $script
 
+   echo "${EXPORT_SDK_PS1}" >> $script
echo 'export SDKTARGETSYSROOT='"$sysroot" >> $script
EXTRAPATH=""
for i in ${CANADIANEXTRAOS}; do
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148800): 
https://lists.openembedded.org/g/openembedded-core/message/148800
Mute This Topic: https://lists.openembedded.org/mt/80998248/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [meta-poky][PATCH v3 2/2] local.conf.sample.extended: sample value for SDk_PS1

2021-03-01 Thread kai
From: Kai Kang 

Provides a sample default value for SDk_PS1 in
local.conf.sample.extended. It will look like:

poky-glibc-x86_64--cortexa57-qemuarm64-pokysdk:$

Signed-off-by: Kai Kang 
---
 meta-poky/conf/local.conf.sample.extended | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta-poky/conf/local.conf.sample.extended 
b/meta-poky/conf/local.conf.sample.extended
index ba1d0973b5..c241caa869 100644
--- a/meta-poky/conf/local.conf.sample.extended
+++ b/meta-poky/conf/local.conf.sample.extended
@@ -390,3 +390,8 @@ DISTRO_FEATURES_remove = "x11"
 #
 #require conf/distro/include/lto.inc
 #DISTRO_FEATURES_append = " lto"
+
+#
+# Set PS1 for SDK
+#
+#SDK_PS1 ?= "${SDK_NAME}${SDK_VENDOR}:\$ "
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148801): 
https://lists.openembedded.org/g/openembedded-core/message/148801
Mute This Topic: https://lists.openembedded.org/mt/80998255/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [dunfell][PATCH 0/1] Pull request (cover letter only)

2021-03-04 Thread kai
From: Kai Kang 

Hi,

Please cherry pick a commit to fix Yocto #14152:

commit a5b9fa3c450af3beac5f1b68797a1d044091fbbe (HEAD -> dunfell)
Author: Chen Qi 
Date:   Fri Oct 16 12:58:56 2020 +0800

cups: use /run instead /var/run in systemd's unit file

/var/run has been deprecated by systemd, so use /run instead,
as suggested by systemd.

(From OE-Core rev: 6c3f56020da7a26c2daea73e39c2f324f1f597db)

Signed-off-by: Chen Qi 
Signed-off-by: Richard Purdie 


Chen Qi (1):
  cups: use /run instead /var/run in systemd's unit file

 meta/recipes-extended/cups/cups.inc | 1 +
 1 file changed, 1 insertion(+)

-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148952): 
https://lists.openembedded.org/g/openembedded-core/message/148952
Mute This Topic: https://lists.openembedded.org/mt/81095312/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [dunfell][PATCH] cups: use /run instead /var/run in systemd's unit file

2021-03-09 Thread kai
From: Chen Qi 

/var/run has been deprecated by systemd, so use /run instead,
as suggested by systemd.

[Yocto #14152]

Signed-off-by: Chen Qi 
Signed-off-by: Richard Purdie 
(cherry picked from commit 6c3f56020da7a26c2daea73e39c2f324f1f597db)
Signed-off-by: Kai Kang 
---
 meta/recipes-extended/cups/cups.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/cups/cups.inc 
b/meta/recipes-extended/cups/cups.inc
index 12780cf702..acad3c98c1 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -54,6 +54,7 @@ EXTRA_OECONF = " \
--enable-libusb \
--with-system-groups=lpadmin \
--with-cups-group=lp \
+   --with-domainsocket=/run/cups/cups.sock \
DSOFLAGS='${LDFLAGS}' \
"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149205): 
https://lists.openembedded.org/g/openembedded-core/message/149205
Mute This Topic: https://lists.openembedded.org/mt/81219332/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [dunfell][PATCH] cups: use /run instead /var/run in systemd's unit file

2021-03-14 Thread kai

On 3/10/21 11:09 AM, kai wrote:

From: Chen Qi 

/var/run has been deprecated by systemd, so use /run instead,
as suggested by systemd.


Ping.

Kai



[Yocto #14152]

Signed-off-by: Chen Qi 
Signed-off-by: Richard Purdie 
(cherry picked from commit 6c3f56020da7a26c2daea73e39c2f324f1f597db)
Signed-off-by: Kai Kang 
---
  meta/recipes-extended/cups/cups.inc | 1 +
  1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/cups/cups.inc 
b/meta/recipes-extended/cups/cups.inc
index 12780cf702..acad3c98c1 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -54,6 +54,7 @@ EXTRA_OECONF = " \
 --enable-libusb \
 --with-system-groups=lpadmin \
 --with-cups-group=lp \
+   --with-domainsocket=/run/cups/cups.sock \
 DSOFLAGS='${LDFLAGS}' \
 "
  






--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149445): 
https://lists.openembedded.org/g/openembedded-core/message/149445
Mute This Topic: https://lists.openembedded.org/mt/81219332/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [dunfell][PATCH] cups: use /run instead /var/run in systemd's unit file

2021-03-15 Thread kai

On 3/15/21 10:31 PM, Steve Sakoman wrote:

On Sun, Mar 14, 2021 at 3:10 PM kai  wrote:

On 3/10/21 11:09 AM, kai wrote:

From: Chen Qi 

/var/run has been deprecated by systemd, so use /run instead,
as suggested by systemd.

Ping.

This is in the group of patches sent for review on 3/13:

https://lists.openembedded.org/g/openembedded-core/message/149417


Hi Steve,

Thanks.

Kai



Steve



[Yocto #14152]

Signed-off-by: Chen Qi 
Signed-off-by: Richard Purdie 
(cherry picked from commit 6c3f56020da7a26c2daea73e39c2f324f1f597db)
Signed-off-by: Kai Kang 
---
  meta/recipes-extended/cups/cups.inc | 1 +
  1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/cups/cups.inc 
b/meta/recipes-extended/cups/cups.inc
index 12780cf702..acad3c98c1 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -54,6 +54,7 @@ EXTRA_OECONF = " \
 --enable-libusb \
 --with-system-groups=lpadmin \
 --with-cups-group=lp \
+   --with-domainsocket=/run/cups/cups.sock \
 DSOFLAGS='${LDFLAGS}' \
     "






--
Kai Kang
Wind River Linux






--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149548): 
https://lists.openembedded.org/g/openembedded-core/message/149548
Mute This Topic: https://lists.openembedded.org/mt/81219332/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 2/2] kernel-yocto.bbclass: chdir to ${WORKDIR} for do_kernel_checkout

2021-04-22 Thread kai
From: Kai Kang 

It chdirs to ${S} at the beginning of task do_kernel_checkout. Then it
removes ${S} when it still resides in ${S}. It may fail to run the task
do_kernel_checkout when bitbake is called by third-part wrapper script.
So chdir to ${WORKDIR} by default for do_kernel_checkout. And it will
chdir to ${S} afterwards in task do_kernel_checkout.

Signed-off-by: Kai Kang 
---
 meta/classes/kernel-yocto.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-yocto.bbclass 
b/meta/classes/kernel-yocto.bbclass
index 15c8dbb81f..30f07de4ca 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -378,7 +378,7 @@ do_kernel_checkout() {
# checkout and clobber any unimportant files
git checkout -f ${machine_branch}
 }
-do_kernel_checkout[dirs] = "${S}"
+do_kernel_checkout[dirs] = "${S} ${WORKDIR}"
 
 addtask kernel_checkout before do_kernel_metadata after do_symlink_kernsrc
 addtask kernel_metadata after do_validate_branches do_unpack before do_patch
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#150806): 
https://lists.openembedded.org/g/openembedded-core/message/150806
Mute This Topic: https://lists.openembedded.org/mt/82303130/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 1/2] cmake.bbclass: remove ${B} before cmake_do_configure

2021-04-22 Thread kai
From: Kai Kang 

It is fallible to remove ${B} in directory ${B} itself. And it does fail
when call bitbake by third-party wrapper script.

Use flag 'cleandirs' to remove ${B} first if build out of source tree.

Signed-off-by: Kai Kang 
---
 meta/classes/cmake.bbclass | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 8876ce5aa5..f01db7480b 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -149,16 +149,14 @@ addtask generate_toolchain_file after do_patch before 
do_configure
 
 CONFIGURE_FILES = "CMakeLists.txt"
 
+do_configure[cleandirs] = "${@d.getVar('B') if d.getVar('S') != d.getVar('B') 
else ''}"
+
 cmake_do_configure() {
if [ "${OECMAKE_BUILDPATH}" ]; then
bbnote "cmake.bbclass no longer uses OECMAKE_BUILDPATH.  The 
default behaviour is now out-of-tree builds with B=WORKDIR/build."
fi
 
-   if [ "${S}" != "${B}" ]; then
-   rm -rf ${B}
-   mkdir -p ${B}
-   cd ${B}
-   else
+   if [ "${S}" = "${B}" ]; then
find ${B} -name CMakeFiles -or -name Makefile -or -name 
cmake_install.cmake -or -name CMakeCache.txt -delete
fi
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#150805): 
https://lists.openembedded.org/g/openembedded-core/message/150805
Mute This Topic: https://lists.openembedded.org/mt/82303129/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] glibc-tests: not clear BBCLASSEXTEND

2022-06-28 Thread kai
From: Kai Kang 

It clears BBCLASSEXTEND in glibc-tests recipe to remove 'nativesdk'
which is set in glibc recipe. The side effect is that it removes
"${MULTILIBS}" at same time if multilib enabled. Then there will no
multilib version glibc-tests. So only remove 'nativesdk' from
BBCLASSEXTEND rather than clear it.

Signed-off-by: Kai Kang 
---
 meta/recipes-core/glibc/glibc-tests_2.35.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-tests_2.35.bb 
b/meta/recipes-core/glibc/glibc-tests_2.35.bb
index 414f8660de..028e83e865 100644
--- a/meta/recipes-core/glibc/glibc-tests_2.35.bb
+++ b/meta/recipes-core/glibc/glibc-tests_2.35.bb
@@ -18,7 +18,8 @@ python __anonymous() {
d.setVar("PROVIDES", "${PN} ${PN}-ptest")
d.setVar("RPROVIDES", "${PN} ${PN}-ptest")
 
-   d.setVar("BBCLASSEXTEND", "")
+   bbclassextend = d.getVar("BBCLASSEXTEND").replace("nativesdk", 
"").strip()
+   d.setVar("BBCLASSEXTEND", bbclassextend)
d.setVar("RRECOMMENDS", "")
d.setVar("SYSTEMD_SERVICE:nscd", "")
d.setVar("SYSTEMD_PACKAGES", "")
@@ -95,7 +96,7 @@ python populate_packages:prepend () {
 d.setVar('DEBIAN_NAMES', '')
 }
 
-FILES:${PN} = "${PTEST_PATH}/* /usr/src/debug/glibc-tests/*"
+FILES:${PN} = "${PTEST_PATH}/* /usr/src/debug/${PN}/*"
 
 EXCLUDE_FROM_SHLIBS = "1"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167348): 
https://lists.openembedded.org/g/openembedded-core/message/167348
Mute This Topic: https://lists.openembedded.org/mt/92046086/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] glibc-tests: not clear BBCLASSEXTEND

2022-06-30 Thread kai

On 6/29/22 6:23 AM, Randy MacLeod wrote:

On 2022-06-28 12:03, Richard Purdie wrote:

On Tue, 2022-06-28 at 23:22 +0800, kai wrote:

From: Kai Kang 

It clears BBCLASSEXTEND in glibc-tests recipe to remove 'nativesdk'
which is set in glibc recipe. The side effect is that it removes
"${MULTILIBS}" at same time if multilib enabled. Then there will no
multilib version glibc-tests. So only remove 'nativesdk' from
BBCLASSEXTEND rather than clear it.

Signed-off-by: Kai Kang 
---
  meta/recipes-core/glibc/glibc-tests_2.35.bb | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-tests_2.35.bb 
b/meta/recipes-core/glibc/glibc-tests_2.35.bb

index 414f8660de..028e83e865 100644
--- a/meta/recipes-core/glibc/glibc-tests_2.35.bb
+++ b/meta/recipes-core/glibc/glibc-tests_2.35.bb
@@ -18,7 +18,8 @@ python __anonymous() {
 d.setVar("PROVIDES", "${PN} ${PN}-ptest")
 d.setVar("RPROVIDES", "${PN} ${PN}-ptest")
  -   d.setVar("BBCLASSEXTEND", "")
+   bbclassextend = 
d.getVar("BBCLASSEXTEND").replace("nativesdk", "").strip()

+   d.setVar("BBCLASSEXTEND", bbclassextend)
 d.setVar("RRECOMMENDS", "")
 d.setVar("SYSTEMD_SERVICE:nscd", "")
 d.setVar("SYSTEMD_PACKAGES", "")
@@ -95,7 +96,7 @@ python populate_packages:prepend () {
  d.setVar('DEBIAN_NAMES', '')
  }
  -FILES:${PN} = "${PTEST_PATH}/* /usr/src/debug/glibc-tests/*"
+FILES:${PN} = "${PTEST_PATH}/* /usr/src/debug/${PN}/*"
    EXCLUDE_FROM_SHLIBS = "1"


Have you tested the multilib glibc-tests and been able to use it
successfully?



If Kai hasn't Naveen will.


Thanks. I test it on core-image-minimal with multilib enabled.

And 132 test cases of lib32-glibc-tests run, 121 PASS, 10 FAIL and 1 SKIP.

Regards,
Kai



../Randy



Cheers,

Richard








--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167407): 
https://lists.openembedded.org/g/openembedded-core/message/167407
Mute This Topic: https://lists.openembedded.org/mt/92046086/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] mesa: fix with DEBUG_BUILD enabled

2022-07-17 Thread kai
From: Kai Kang 

It fails to compile mesa-native when DEBUG_BUILD is enabled:

../mesa-22.1.3/src/compiler/nir/nir_inline_helpers.h: In function 
‘nir_opt_move_block’:
../mesa-22.1.3/src/compiler/nir/nir_opt_move.c:55:1: error: inlining failed in 
call to
  always_inline ‘src_is_ssa’: indirect function call with a yet undetermined 
callee
 src_is_ssa(nir_src *src, void *state)
 ^~

Remove 'ALWAYS_INLINE' for function src_is_ssa.

Signed-off-by: Kai Kang 
---
 .../mesa/files/0001-nir-fix-build-at-Og.patch | 31 +++
 meta/recipes-graphics/mesa/mesa.inc   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch

diff --git a/meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch 
b/meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch
new file mode 100644
index 00..5b4a5c7231
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch
@@ -0,0 +1,31 @@
+At -Og with gcc 12.1, it fails to compile:
+
+../mesa-22.1.3/src/compiler/nir/nir_inline_helpers.h: In function 
‘nir_opt_move_block’:
+../mesa-22.1.3/src/compiler/nir/nir_opt_move.c:55:1: error: inlining failed in 
call to always_inline ‘src_is_ssa’: indirect function call with a yet 
undetermined callee src_is_ssa(nir_src *src, void *state)
+ ^~
+
+Remove 'ALWAYS_INLINE' for function src_is_ssa.
+
+Upstream-Status: Submitted 
[https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17589]
+
+Signed-off-by: Kai Kang 
+---
+ src/compiler/nir/nir_opt_move.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/compiler/nir/nir_opt_move.c b/src/compiler/nir/nir_opt_move.c
+index 81bcde5c436..09db6717002 100644
+--- a/src/compiler/nir/nir_opt_move.c
 b/src/compiler/nir/nir_opt_move.c
+@@ -51,7 +51,7 @@
+  * lower register pressure.
+  */
+ 
+-static ALWAYS_INLINE bool
++static bool
+ src_is_ssa(nir_src *src, void *state)
+ {
+return src->is_ssa;
+-- 
+2.34.1
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc 
b/meta/recipes-graphics/mesa/mesa.inc
index 710cacb09d..58e662efd4 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -22,6 +22,7 @@ SRC_URI = 
"https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
file://0001-util-format-Check-for-NEON-before-using-it.patch \

file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \

file://0001-swrast_kms-use-swkmsDRI2Extension-instead-of-driDRI2.patch \
+   file://0001-nir-fix-build-at-Og.patch \
"
 
 SRC_URI[sha256sum] = 
"b98f32ba7aa2a1ff5725fb36eb999c693079f0ca16f70aa2f103e2b6c3f093e3"
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168189): 
https://lists.openembedded.org/g/openembedded-core/message/168189
Mute This Topic: https://lists.openembedded.org/mt/92451455/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] mesa: fix with DEBUG_BUILD enabled

2022-07-18 Thread kai

On 7/18/22 23:09, Ross Burton wrote:

This patch has been rejected upstream, please switch for 
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439 instead.


OK.

Kai



Ross


On 18 Jul 2022, at 03:21, kai via lists.openembedded.org 
 wrote:

From: Kai Kang 

It fails to compile mesa-native when DEBUG_BUILD is enabled:

../mesa-22.1.3/src/compiler/nir/nir_inline_helpers.h: In function 
‘nir_opt_move_block’:
../mesa-22.1.3/src/compiler/nir/nir_opt_move.c:55:1: error: inlining failed in 
call to
  always_inline ‘src_is_ssa’: indirect function call with a yet undetermined 
callee
src_is_ssa(nir_src *src, void *state)
^~

Remove 'ALWAYS_INLINE' for function src_is_ssa.

Signed-off-by: Kai Kang 
---
.../mesa/files/0001-nir-fix-build-at-Og.patch | 31 +++
meta/recipes-graphics/mesa/mesa.inc   |  1 +
2 files changed, 32 insertions(+)
create mode 100644 
meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch

diff --git a/meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch 
b/meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch
new file mode 100644
index 00..5b4a5c7231
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch
@@ -0,0 +1,31 @@
+At -Og with gcc 12.1, it fails to compile:
+
+../mesa-22.1.3/src/compiler/nir/nir_inline_helpers.h: In function 
‘nir_opt_move_block’:
+../mesa-22.1.3/src/compiler/nir/nir_opt_move.c:55:1: error: inlining failed in 
call to always_inline ‘src_is_ssa’: indirect function call with a yet 
undetermined callee src_is_ssa(nir_src *src, void *state)
+ ^~
+
+Remove 'ALWAYS_INLINE' for function src_is_ssa.
+
+Upstream-Status: Submitted 
[https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17589]
+
+Signed-off-by: Kai Kang 
+---
+ src/compiler/nir/nir_opt_move.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/compiler/nir/nir_opt_move.c b/src/compiler/nir/nir_opt_move.c
+index 81bcde5c436..09db6717002 100644
+--- a/src/compiler/nir/nir_opt_move.c
 b/src/compiler/nir/nir_opt_move.c
+@@ -51,7 +51,7 @@
+  * lower register pressure.
+  */
+
+-static ALWAYS_INLINE bool
++static bool
+ src_is_ssa(nir_src *src, void *state)
+ {
+return src->is_ssa;
+--
+2.34.1
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc 
b/meta/recipes-graphics/mesa/mesa.inc
index 710cacb09d..58e662efd4 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -22,6 +22,7 @@ SRC_URI = 
"https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
file://0001-util-format-Check-for-NEON-before-using-it.patch \

file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \

file://0001-swrast_kms-use-swkmsDRI2Extension-instead-of-driDRI2.patch \
+   file://0001-nir-fix-build-at-Og.patch \
"

SRC_URI[sha256sum] = 
"b98f32ba7aa2a1ff5725fb36eb999c693079f0ca16f70aa2f103e2b6c3f093e3"
--
2.17.1






--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168266): 
https://lists.openembedded.org/g/openembedded-core/message/168266
Mute This Topic: https://lists.openembedded.org/mt/92451455/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] mesa: fix compile error when debug build enabled

2022-07-27 Thread kai
From: Kai Kang 

It fails to compile mesa{,-native} when DEBUG_BUILD is enabled:

../mesa-22.1.3/src/compiler/nir/nir_inline_helpers.h: In function 
‘nir_opt_move_block’:
../mesa-22.1.3/src/compiler/nir/nir_opt_move.c:55:1: error: inlining failed in 
call to
  always_inline ‘src_is_ssa’: indirect function call with a yet undetermined 
callee
 src_is_ssa(nir_src *src, void *state)
 ^~

Backport patch from mesa merge request to fix it.

Signed-off-by: Kai Kang 
---
v2:
* use patch from mesa merge request

 ...ove-fix-ALWAYS_INLINE-compiler-error.patch | 65 +++
 meta/recipes-graphics/mesa/mesa.inc   |  1 +
 2 files changed, 66 insertions(+)
 create mode 100644 
meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch

diff --git 
a/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch
 
b/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch
new file mode 100644
index 00..48fc1e37ff
--- /dev/null
+++ 
b/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch
@@ -0,0 +1,65 @@
+Backport merge request to fix mesa compile error when debug build
+enabled.
+
+Upstream-Status: Submitted 
[https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439]
+
+Signed-off-by: Kai Kang 
+
+From c69c6e7a35205557de73734ad4a1f411c8f99926 Mon Sep 17 00:00:00 2001
+From: t bettler 
+Date: Sat, 9 Jul 2022 09:28:51 +
+Subject: [PATCH] nir/nir_opt_move: fix ALWAYS_INLINE compiler error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fix call to ‘always_inline’ ‘src_is_ssa’
+
+Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6825
+Fixes: f1d20ec67c3f186886b97de94f74484650f8fda1 ("nir/nir_opt_move: handle 
non-SSA defs ")
+---
+ src/compiler/nir/nir_inline_helpers.h | 10 --
+ src/compiler/nir/nir_opt_move.c   |  2 +-
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/src/compiler/nir/nir_inline_helpers.h 
b/src/compiler/nir/nir_inline_helpers.h
+index 125dd8a537c..ec33f0509f7 100644
+--- a/src/compiler/nir/nir_inline_helpers.h
 b/src/compiler/nir/nir_inline_helpers.h
+@@ -73,8 +73,8 @@ nir_foreach_dest(nir_instr *instr, nir_foreach_dest_cb cb, 
void *state)
+return _nir_foreach_dest(instr, cb, state);
+ }
+ 
+-static inline bool
+-nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state)
++static ALWAYS_INLINE bool
++_nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state)
+ {
+switch (instr->type) {
+case nir_instr_type_alu: {
+@@ -162,3 +162,9 @@ nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, 
void *state)
+dest_state.cb = cb;
+return _nir_foreach_dest(instr, _nir_visit_dest_indirect, &dest_state);
+ }
++
++static inline bool
++nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state)
++{
++   return _nir_foreach_src(instr, cb, state);
++}
+diff --git a/src/compiler/nir/nir_opt_move.c b/src/compiler/nir/nir_opt_move.c
+index 81bcde5c436..051c3cc6295 100644
+--- a/src/compiler/nir/nir_opt_move.c
 b/src/compiler/nir/nir_opt_move.c
+@@ -60,7 +60,7 @@ src_is_ssa(nir_src *src, void *state)
+ static ALWAYS_INLINE bool
+ instr_reads_register(nir_instr *instr)
+ {
+-   return !nir_foreach_src(instr, src_is_ssa, NULL);
++   return !_nir_foreach_src(instr, src_is_ssa, NULL);
+ }
+ 
+ static bool
+-- 
+2.34.1
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc 
b/meta/recipes-graphics/mesa/mesa.inc
index 710cacb09d..f02ef2dc2b 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -22,6 +22,7 @@ SRC_URI = 
"https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
file://0001-util-format-Check-for-NEON-before-using-it.patch \

file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \

file://0001-swrast_kms-use-swkmsDRI2Extension-instead-of-driDRI2.patch \
+   file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch 
\
"
 
 SRC_URI[sha256sum] = 
"b98f32ba7aa2a1ff5725fb36eb999c693079f0ca16f70aa2f103e2b6c3f093e3"
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168545): 
https://lists.openembedded.org/g/openembedded-core/message/168545
Mute This Topic: https://lists.openembedded.org/mt/92644854/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] mesa: fix compile error when debug build enabled

2022-08-08 Thread kai

On 8/8/22 01:35, Martin Jansa wrote:

Hi Mark,

Does this still work for you?



Yes, it still works for me. Without that patch, it fails with 
"DEBUG_BUILD = '1'" in local.conf for qemux86-64.





With this change applied (now in master), mesa fails here with:
http://errors.yoctoproject.org/Errors/Details/664881/ 
<https://urldefense.com/v3/__http://errors.yoctoproject.org/Errors/Details/664881/__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUn492GZ4$>


and builds fine with DEBUG_BUILD when I revert this.


Is there any extra config?  I saw the the error is:

../mesa-22.1.3/src/compiler/nir/nir_opt_move.c:55:1: error: inlining 
failed in call to 'always_inline' 'src_is_ssa': function not considered 
for inlining


Without the commit, it fails with:

| ../mesa-22.1.3/src/compiler/nir/nir_opt_move.c:55:1: error: inlining 
failed in call to always_inline ‘src_is_ssa’: indirect function call 
with a yet undetermined callee

|  src_is_ssa(nir_src *src, void *state)

Regards,
Kai



I've reported the same in upstream MR 
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439 
<https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUu70TdHw$>




On Wed, Jul 27, 2022 at 9:30 AM kai  wrote:

From: Kai Kang 

It fails to compile mesa{,-native} when DEBUG_BUILD is enabled:

../mesa-22.1.3/src/compiler/nir/nir_inline_helpers.h: In function
‘nir_opt_move_block’:
../mesa-22.1.3/src/compiler/nir/nir_opt_move.c:55:1: error:
inlining failed in call to
  always_inline ‘src_is_ssa’: indirect function call with a yet
undetermined callee
 src_is_ssa(nir_src *src, void *state)
 ^~

Backport patch from mesa merge request to fix it.

Signed-off-by: Kai Kang 
---
v2:
* use patch from mesa merge request

 ...ove-fix-ALWAYS_INLINE-compiler-error.patch | 65
+++
 meta/recipes-graphics/mesa/mesa.inc           |  1 +
 2 files changed, 66 insertions(+)
 create mode 100644

meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch

diff --git

a/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch

b/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch
new file mode 100644
index 00..48fc1e37ff
--- /dev/null
+++

b/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch
@@ -0,0 +1,65 @@
+Backport merge request to fix mesa compile error when debug build
+enabled.
+
+Upstream-Status: Submitted
[https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439

<https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUu70TdHw$>]
+
+Signed-off-by: Kai Kang 
+
+From c69c6e7a35205557de73734ad4a1f411c8f99926 Mon Sep 17 00:00:00
2001
+From: t bettler 
+Date: Sat, 9 Jul 2022 09:28:51 +
+Subject: [PATCH] nir/nir_opt_move: fix ALWAYS_INLINE compiler error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fix call to ‘always_inline’ ‘src_is_ssa’
+
+Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6825

<https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/issues/6825__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUf3T6WDU$>
+Fixes: f1d20ec67c3f186886b97de94f74484650f8fda1
("nir/nir_opt_move: handle non-SSA defs ")
+---
+ src/compiler/nir/nir_inline_helpers.h | 10 --
+ src/compiler/nir/nir_opt_move.c       |  2 +-
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/src/compiler/nir/nir_inline_helpers.h
b/src/compiler/nir/nir_inline_helpers.h
+index 125dd8a537c..ec33f0509f7 100644
+--- a/src/compiler/nir/nir_inline_helpers.h
 b/src/compiler/nir/nir_inline_helpers.h
+@@ -73,8 +73,8 @@ nir_foreach_dest(nir_instr *instr,
nir_foreach_dest_cb cb, void *state)
+    return _nir_foreach_dest(instr, cb, state);
+ }
+
+-static inline bool
+-nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void
*state)
++static ALWAYS_INLINE bool
++_nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void
*state)
+ {
+    switch (instr->type) {
+    case nir_instr_type_alu: {
+@@ -162,3 +162,9 @@ nir_foreach_src(nir_instr *instr,
nir_foreach_src_cb cb, void *state)
+    dest_state.cb = cb;

[OE-core] [PATCH] packagegroup-self-hosted: update for strace

2022-08-14 Thread kai
From: Kai Kang 

strace has been set imcompatible with riscv32, so update in
packagegroup-self-hosted.bb accordingly.

Signed-off-by: Kai Kang 
---
 meta/recipes-core/packagegroups/packagegroup-self-hosted.bb | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb 
b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
index 772b86b39a..a1b0ee2883 100644
--- a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -98,11 +98,14 @@ RDEPENDS:packagegroup-self-hosted-sdk:append:libc-glibc = "\
 glibc-utils \
 rpcsvc-proto \
 "
+
+STRACE = "strace"
+STRACE:riscv32 = ""
 RDEPENDS:packagegroup-self-hosted-debug = " \
 gdb \
 gdbserver \
 rsync \
-strace \
+${STRACE} \
 tcf-agent"
 
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169324): 
https://lists.openembedded.org/g/openembedded-core/message/169324
Mute This Topic: https://lists.openembedded.org/mt/93017686/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] packagegroup-self-hosted: update for strace

2022-08-14 Thread kai

On 8/14/22 23:39, Alexander Kanavin wrote:

Some information or links about how it is incompatible would be
appreciated. Can it be made compatible instead?


Based on previous commit

commit 6749e29082043e4e71849e80e058fa45988c62a5
Author: Mingli Yu 
Date:   Tue Jul 5 15:03:18 2022 +0800

    strace: set COMPATIBLE_HOST for riscv32

    Disable the build on riscv32 as it's not supported on riscv32 [1].

    [1] 
https://github.com/strace/strace/commit/69ff62ea5087506ad36a27599db088096db215da


    (From OE-Core rev: 5276a9a845d0277936e9321ada296818f7bfd84b)

    Signed-off-by: Mingli Yu 
    Signed-off-by: Richard Purdie 


Regards,
Kai



Alex

On Sun, 14 Aug 2022 at 17:18, kai  wrote:

From: Kai Kang 

strace has been set imcompatible with riscv32, so update in
packagegroup-self-hosted.bb accordingly.

Signed-off-by: Kai Kang 
---
  meta/recipes-core/packagegroups/packagegroup-self-hosted.bb | 5 -
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb 
b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
index 772b86b39a..a1b0ee2883 100644
--- a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -98,11 +98,14 @@ RDEPENDS:packagegroup-self-hosted-sdk:append:libc-glibc = "\
  glibc-utils \
  rpcsvc-proto \
  "
+
+STRACE = "strace"
+STRACE:riscv32 = ""
  RDEPENDS:packagegroup-self-hosted-debug = " \
  gdb \
  gdbserver \
  rsync \
-strace \
+${STRACE} \
  tcf-agent"


--
2.17.1






--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169327): 
https://lists.openembedded.org/g/openembedded-core/message/169327
Mute This Topic: https://lists.openembedded.org/mt/93017686/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] distrooverrides.bbclass: use IMAGE_CLASSES

2022-08-16 Thread kai
From: Kai Kang 

Update comment in distrooverrides.bbclass to use IMAGE_CLASSES rather
than globally with INHERIT.

Signed-off-by: Kai Kang 
---
 meta/classes-recipe/distrooverrides.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/distrooverrides.bbclass 
b/meta/classes-recipe/distrooverrides.bbclass
index 8d9d7cda7d..b5346b465e 100644
--- a/meta/classes-recipe/distrooverrides.bbclass
+++ b/meta/classes-recipe/distrooverrides.bbclass
@@ -17,7 +17,7 @@
 #
 # The class is meant to be used in a layer.conf or distro
 # .inc file with:
-# INHERIT += "distrooverrides"
+# IMAGE_CLASSES += "distrooverrides"
 # DISTRO_FEATURES_OVERRIDES += "my-feature"
 #
 # Beware that this part of OVERRIDES changes during parsing, so usage
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169428): 
https://lists.openembedded.org/g/openembedded-core/message/169428
Mute This Topic: https://lists.openembedded.org/mt/93054585/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] distrooverrides.bbclass: use IMAGE_CLASSES

2022-08-17 Thread kai

On 8/16/22 22:55, Christopher Larson wrote:

This class functionality isn't limited to images.


If not, it may need to move to classes-global. Otherwise it fails to parse:

ERROR: ParseError in configuration INHERITs: Could not inherit file 
classes/distrooverrides.bbclass





On Tue, Aug 16, 2022 at 12:54 AM kai  wrote:

From: Kai Kang 

Update comment in distrooverrides.bbclass to use IMAGE_CLASSES rather
than globally with INHERIT.

Signed-off-by: Kai Kang 
---
 meta/classes-recipe/distrooverrides.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/distrooverrides.bbclass
b/meta/classes-recipe/distrooverrides.bbclass
index 8d9d7cda7d..b5346b465e 100644
--- a/meta/classes-recipe/distrooverrides.bbclass
+++ b/meta/classes-recipe/distrooverrides.bbclass
@@ -17,7 +17,7 @@
 #
 # The class is meant to be used in a layer.conf or distro
 # .inc file with:
-# INHERIT += "distrooverrides"
+# IMAGE_CLASSES += "distrooverrides"
 # DISTRO_FEATURES_OVERRIDES += "my-feature"
 #
 # Beware that this part of OVERRIDES changes during parsing, so usage
-- 
2.17.1







--
Christopher Larson
chris_lar...@mentor.com, chris.lar...@siemens.com, kerg...@gmail.com
Principal Software Engineer, Embedded Linux Solutions, Siemens Digital 
Industries Software






--
Kai Kang
Wind River Linux

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169511): 
https://lists.openembedded.org/g/openembedded-core/message/169511
Mute This Topic: https://lists.openembedded.org/mt/93054585/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] sudo: update multilib patch for sudo.conf

2021-10-21 Thread kai
From: Kai Kang 

Update multilib patch for sudo.conf that there is one more replacement
of @plugindir@ to avoid installation conflict.

Signed-off-by: Kai Kang 
---
 ...o.conf.in-fix-conflict-with-multilib.patch | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git 
a/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
 
b/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
index f7ccfdd623..f4fc376bb8 100644
--- 
a/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
+++ 
b/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
@@ -13,11 +13,11 @@ Signed-off-by: Kai Kang 
 
 Upstream-Status: Inappropriate [OE configuration specific]
 ---
- examples/sudo.conf.in | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ examples/sudo.conf.in | 8 
+ 1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/examples/sudo.conf.in b/examples/sudo.conf.in
-index 19e33ff..af78235 100644
+index 6535d3a..50afc8f 100644
 --- a/examples/sudo.conf.in
 +++ b/examples/sudo.conf.in
 @@ -4,7 +4,7 @@
@@ -29,7 +29,16 @@ index 19e33ff..af78235 100644
  #   fully qualified.
  # The plugin_name corresponds to a global symbol in the plugin
  #   that contains the plugin interface structure.
-@@ -50,7 +50,7 @@ Plugin sudoers_audit sudoers.so
+@@ -51,7 +51,7 @@
+ # The compiled-in value is usually sufficient and should only be changed
+ # if you rename or move the sudo_intercept.so file.
+ #
+-#Path intercept @plugindir@/sudo_intercept.so
++#Path intercept $plugindir/sudo_intercept.so
+ 
+ #
+ # Sudo noexec:
+@@ -65,7 +65,7 @@
  # The compiled-in value is usually sufficient and should only be changed
  # if you rename or move the sudo_noexec.so file.
  #
@@ -38,7 +47,7 @@ index 19e33ff..af78235 100644
  
  #
  # Sudo plugin directory:
-@@ -59,7 +59,7 @@ Plugin sudoers_audit sudoers.so
+@@ -74,7 +74,7 @@
  # The default directory to use when searching for plugins that are
  # specified without a fully qualified path name.
  #
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157292): 
https://lists.openembedded.org/g/openembedded-core/message/157292
Mute This Topic: https://lists.openembedded.org/mt/86506375/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [master][honister][PATCH] squashfs-tools: fix CVE-2021-41072

2021-11-02 Thread kai
From: Kai Kang 

Backport patch to fix CVE-2021-41072. And 3 more ancestor commits are
backported too, otherwise it fails to compile.

CVE: CVE-2021-41072

Ref:
* https://nvd.nist.gov/vuln/detail/CVE-2021-41072

Signed-off-by: Kai Kang 
---
 .../CVE-2021-41072-requisite-1.patch  | 135 
 .../CVE-2021-41072-requisite-2.patch  | 108 ++
 .../CVE-2021-41072-requisite-3.patch  | 326 ++
 .../squashfs-tools/CVE-2021-41072.patch   | 325 +
 .../squashfs-tools/squashfs-tools_git.bb  |   4 +
 5 files changed, 898 insertions(+)
 create mode 100644 
meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-1.patch
 create mode 100644 
meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-2.patch
 create mode 100644 
meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-3.patch
 create mode 100644 
meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072.patch

diff --git 
a/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-1.patch
 
b/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-1.patch
new file mode 100644
index 00..d01b5c6871
--- /dev/null
+++ 
b/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072-requisite-1.patch
@@ -0,0 +1,135 @@
+The commit is required by the fix for CVE-2021-41072.
+
+Upstream-Status: Backport 
[https://github.com/plougher/squashfs-tools/commit/80b8441]
+
+Signed-off-by: Kai Kang 
+
+From 80b8441a37fcf8bf07dacf24d9d6c6459a0f6e36 Mon Sep 17 00:00:00 2001
+From: Phillip Lougher 
+Date: Sun, 12 Sep 2021 19:58:19 +0100
+Subject: [PATCH] unsquashfs: use squashfs_closedir() to delete directory
+
+Signed-off-by: Phillip Lougher 
+---
+ squashfs-tools/unsquash-1.c|  3 +--
+ squashfs-tools/unsquash-1234.c | 11 +--
+ squashfs-tools/unsquash-2.c|  3 +--
+ squashfs-tools/unsquash-3.c|  3 +--
+ squashfs-tools/unsquash-4.c|  3 +--
+ squashfs-tools/unsquashfs.c|  7 ---
+ squashfs-tools/unsquashfs.h|  1 +
+ 7 files changed, 14 insertions(+), 17 deletions(-)
+
+diff --git a/squashfs-tools/unsquash-1.c b/squashfs-tools/unsquash-1.c
+index acba821..7598499 100644
+--- a/squashfs-tools/unsquash-1.c
 b/squashfs-tools/unsquash-1.c
+@@ -373,8 +373,7 @@ static struct dir *squashfs_opendir(unsigned int 
block_start, unsigned int offse
+   return dir;
+ 
+ corrupted:
+-  free(dir->dirs);
+-  free(dir);
++  squashfs_closedir(dir);
+   return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-1234.c b/squashfs-tools/unsquash-1234.c
+index c2d4f42..0c8dfbb 100644
+--- a/squashfs-tools/unsquash-1234.c
 b/squashfs-tools/unsquash-1234.c
+@@ -25,8 +25,8 @@
+  * unsquash-4.
+  */
+ 
+-#define TRUE 1
+-#define FALSE 0
++#include "unsquashfs.h"
++
+ /*
+  * Check name for validity, name should not
+  *  - be ".", "./", or
+@@ -56,3 +56,10 @@ int check_name(char *name, int size)
+ 
+   return TRUE;
+ }
++
++
++void squashfs_closedir(struct dir *dir)
++{
++  free(dir->dirs);
++  free(dir);
++}
+diff --git a/squashfs-tools/unsquash-2.c b/squashfs-tools/unsquash-2.c
+index 0746b3d..86f62ba 100644
+--- a/squashfs-tools/unsquash-2.c
 b/squashfs-tools/unsquash-2.c
+@@ -465,8 +465,7 @@ static struct dir *squashfs_opendir(unsigned int 
block_start, unsigned int offse
+   return dir;
+ 
+ corrupted:
+-  free(dir->dirs);
+-  free(dir);
++  squashfs_closedir(dir);
+   return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-3.c b/squashfs-tools/unsquash-3.c
+index 094caaa..c04aa9e 100644
+--- a/squashfs-tools/unsquash-3.c
 b/squashfs-tools/unsquash-3.c
+@@ -499,8 +499,7 @@ static struct dir *squashfs_opendir(unsigned int 
block_start, unsigned int offse
+   return dir;
+ 
+ corrupted:
+-  free(dir->dirs);
+-  free(dir);
++  squashfs_closedir(dir);
+   return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-4.c b/squashfs-tools/unsquash-4.c
+index 3a1b9e1..ff62dcc 100644
+--- a/squashfs-tools/unsquash-4.c
 b/squashfs-tools/unsquash-4.c
+@@ -436,8 +436,7 @@ static struct dir *squashfs_opendir(unsigned int 
block_start, unsigned int offse
+   return dir;
+ 
+ corrupted:
+-  free(dir->dirs);
+-  free(dir);
++  squashfs_closedir(dir);
+   return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
+index 7b590bd..04be53c 100644
+--- a/squashfs-tools/unsquashfs.c
 b/squashfs-tools/unsquashfs.c
+@@ -1350,13 +1350,6 @@ unsigned int *offset, unsigned int *type)
+ }
+ 
+ 
+-void squashfs_closedir(struct dir *dir)
+-{
+-  free(dir->dirs);
+-  free(dir);
+-}
+-
+-
+ char *get_component(char *target, char **targname)
+ {
+   char *start;
+diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h
+index 2e9201c..5ecb2ab 100644
+--- a/squashfs-tools/unsquashfs.h

[OE-core] [PATCH] squashfs-tools: follow-up fix for CVE-2021-41072

2021-11-08 Thread kai
From: Kai Kang 

Squash a follow-up fix for CVE-2021-41072 from upstream:
https://github.com/plougher/squashfs-tools/commit/19fcc93

Signed-off-by: Kai Kang 
---
 .../squashfs-tools/squashfs-tools/CVE-2021-41072.patch  | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072.patch 
b/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072.patch
index 94d6da4b14..f807af60bc 100644
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072.patch
+++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools/CVE-2021-41072.patch
@@ -1,6 +1,10 @@
 CVE: CVE-2021-41072
 Upstream-Status: Backport 
[https://github.com/plougher/squashfs-tools/commit/e048580]
 
+Update on 20211109:
+Squash a follow-up fix for CVE-2021-41072 from upstream:
+https://github.com/plougher/squashfs-tools/commit/19fcc93
+
 Signed-off-by: Kai Kang 
 
 From e0485802ec72996c20026da320650d8362f555bd Mon Sep 17 00:00:00 2001
@@ -65,7 +69,7 @@ index 7262a2e..1b544ed 100755
  
  unsquash-1234.o: unsquash-1234.c unsquashfs_error.h
  
-+unsquash-1234.o: unsquash-12.c
++unsquash-12.o: unsquash-12.c unsquashfs.h
 +
  unsquashfs_xattr.o: unsquashfs_xattr.c unsquashfs.h squashfs_fs.h xattr.h 
unsquashfs_error.h
  
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157997): 
https://lists.openembedded.org/g/openembedded-core/message/157997
Mute This Topic: https://lists.openembedded.org/mt/86923047/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] convert-srcuri.py: remove extra spaces before backslash

2021-11-10 Thread kai
From: Kai Kang 

There may be more than one spaces before backslash in SRC_URI. Strip
them otherwise it forges a malformed uri such as open-iscsi-user in
meta-openstack:

SRC_URI = "git://github.com/open-iscsi/open-iscsi.git;protocol=https  
;branch=master \

Signed-off-by: Kai Kang 
---
 scripts/contrib/convert-srcuri.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/contrib/convert-srcuri.py 
b/scripts/contrib/convert-srcuri.py
index 5b362ea2e8..e7a97fdbd4 100755
--- a/scripts/contrib/convert-srcuri.py
+++ b/scripts/contrib/convert-srcuri.py
@@ -36,7 +36,7 @@ def processfile(fn):
 if line.endswith('"\n'):
 line = line.replace('"\n', ';branch=master"\n')
 elif line.endswith(" \\\n"):
-line = line.replace(' \\\n', ';branch=master \\\n')
+line = line.replace(' \\\n', '').rstrip() + 
';branch=master \\\n'
 modified = True
 if ("git://" in line or "gitsm://" in line) and 
"github.com" in line and "protocol=https" not in line and matchline(line):
 if "protocol=git" in line:
@@ -44,7 +44,7 @@ def processfile(fn):
 elif line.endswith('"\n'):
 line = line.replace('"\n', ';protocol=https"\n')
 elif line.endswith(" \\\n"):
-line = line.replace(' \\\n', ';protocol=https 
\\\n')
+line = line.replace(' \\\n', '').rstrip() + 
';protocol=https \\\n'
 modified = True
 new_file.write(line)
 if modified:
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158131): 
https://lists.openembedded.org/g/openembedded-core/message/158131
Mute This Topic: https://lists.openembedded.org/mt/86974863/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] convert-srcuri.py: use regex to check space in SRC_URI

2021-11-11 Thread kai
From: Kai Kang 

There may be none, one or more spaces including tab before backslash in
SRC_URI. Use regex to check and update. It helps to avoid malformed uri
such as recipe open-iscsi-user in meta-openstack:

SRC_URI = "git://github.com/open-iscsi/open-iscsi.git;protocol=https  
;branch=master \

And help to check more recipes such as concurrent-ruby in the same
layer:

SRC_URI = 
"git://github.com/ruby-concurrency/concurrent-ruby.git;protocol=https;tag=v1.1.6\

Signed-off-by: Kai Kang 
---
v2:
* use re to check and replace

 scripts/contrib/convert-srcuri.py | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/contrib/convert-srcuri.py 
b/scripts/contrib/convert-srcuri.py
index 5b362ea2e8..587392334f 100755
--- a/scripts/contrib/convert-srcuri.py
+++ b/scripts/contrib/convert-srcuri.py
@@ -35,16 +35,16 @@ def processfile(fn):
 if ("git://" in line or "gitsm://" in line) and "branch=" 
not in line and matchline(line):
 if line.endswith('"\n'):
 line = line.replace('"\n', ';branch=master"\n')
-elif line.endswith(" \\\n"):
-line = line.replace(' \\\n', ';branch=master \\\n')
+elif re.search('\s*$', line):
+line = re.sub('\s*$', ';branch=master ', 
line)
 modified = True
 if ("git://" in line or "gitsm://" in line) and 
"github.com" in line and "protocol=https" not in line and matchline(line):
 if "protocol=git" in line:
 line = line.replace('protocol=git', 
'protocol=https')
 elif line.endswith('"\n'):
 line = line.replace('"\n', ';protocol=https"\n')
-elif line.endswith(" \\\n"):
-line = line.replace(' \\\n', ';protocol=https 
\\\n')
+elif re.search('\s*$', line):
+line = re.sub('\s*$', ';protocol=https ', 
line)
 modified = True
 new_file.write(line)
 if modified:
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158150): 
https://lists.openembedded.org/g/openembedded-core/message/158150
Mute This Topic: https://lists.openembedded.org/mt/86978120/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] convert-srcuri.py: remove extra spaces before backslash

2021-11-11 Thread kai

On 11/11/21 4:40 PM, Quentin Schulz wrote:

Hi Kai,

On November 11, 2021 4:48:14 AM GMT+01:00, kai  wrote:

From: Kai Kang 

There may be more than one spaces before backslash in SRC_URI. Strip

There could technically be tabs too and the current code (even after your 
patch) does not seem to handle that (from the git context I see in your patch). 
Maybe a regex would be ok here, using \s* to match as many tabs and spaces as 
needed. Not sure we care that much but I wanted to raise this so it's known at 
least.


Thanks for comment. v2 sent.

Kai



Thanks for the patch,
Cheers
Quentin


them otherwise it forges a malformed uri such as open-iscsi-user in
meta-openstack:

SRC_URI = "git://github.com/open-iscsi/open-iscsi.git;protocol=https  
;branch=master \

Signed-off-by: Kai Kang 
---
scripts/contrib/convert-srcuri.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/contrib/convert-srcuri.py 
b/scripts/contrib/convert-srcuri.py
index 5b362ea2e8..e7a97fdbd4 100755
--- a/scripts/contrib/convert-srcuri.py
+++ b/scripts/contrib/convert-srcuri.py
@@ -36,7 +36,7 @@ def processfile(fn):
 if line.endswith('"\n'):
 line = line.replace('"\n', ';branch=master"\n')
 elif line.endswith(" \\\n"):
-line = line.replace(' \\\n', ';branch=master \\\n')
+line = line.replace(' \\\n', '').rstrip() + 
';branch=master \\\n'
 modified = True
 if ("git://" in line or "gitsm://" in line) and "github.com" in line 
and "protocol=https" not in line and matchline(line):
 if "protocol=git" in line:
@@ -44,7 +44,7 @@ def processfile(fn):
 elif line.endswith('"\n'):
 line = line.replace('"\n', ';protocol=https"\n')
 elif line.endswith(" \\\n"):
-line = line.replace(' \\\n', ';protocol=https 
\\\n')
+line = line.replace(' \\\n', '').rstrip() + 
';protocol=https \\\n'
 modified = True
 new_file.write(line)
 if modified:



--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158151): 
https://lists.openembedded.org/g/openembedded-core/message/158151
Mute This Topic: https://lists.openembedded.org/mt/86974863/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [hardnott][PATCH] squashfs-tools: fix CVE-2021-41072

2021-11-17 Thread kai
From: Kai Kang 

Backport patches to fix CVE-2021-41072. And update context for verison
4.4 at same time.

CVE: CVE-2021-41072

Ref:
* https://nvd.nist.gov/vuln/detail/CVE-2021-41072

Signed-off-by: Kai Kang 
---
 .../files/CVE-2021-41072-requisite-1.patch| 135 +++
 .../files/CVE-2021-41072-requisite-2.patch| 109 ++
 .../files/CVE-2021-41072-requisite-3.patch| 330 ++
 .../squashfs-tools/files/CVE-2021-41072.patch | 316 +
 .../squashfs-tools/squashfs-tools_git.bb  |   4 +
 5 files changed, 894 insertions(+)
 create mode 100644 
meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-1.patch
 create mode 100644 
meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-2.patch
 create mode 100644 
meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-3.patch
 create mode 100644 
meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072.patch

diff --git 
a/meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-1.patch 
b/meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-1.patch
new file mode 100644
index 00..d01b5c6871
--- /dev/null
+++ 
b/meta/recipes-devtools/squashfs-tools/files/CVE-2021-41072-requisite-1.patch
@@ -0,0 +1,135 @@
+The commit is required by the fix for CVE-2021-41072.
+
+Upstream-Status: Backport 
[https://github.com/plougher/squashfs-tools/commit/80b8441]
+
+Signed-off-by: Kai Kang 
+
+From 80b8441a37fcf8bf07dacf24d9d6c6459a0f6e36 Mon Sep 17 00:00:00 2001
+From: Phillip Lougher 
+Date: Sun, 12 Sep 2021 19:58:19 +0100
+Subject: [PATCH] unsquashfs: use squashfs_closedir() to delete directory
+
+Signed-off-by: Phillip Lougher 
+---
+ squashfs-tools/unsquash-1.c|  3 +--
+ squashfs-tools/unsquash-1234.c | 11 +--
+ squashfs-tools/unsquash-2.c|  3 +--
+ squashfs-tools/unsquash-3.c|  3 +--
+ squashfs-tools/unsquash-4.c|  3 +--
+ squashfs-tools/unsquashfs.c|  7 ---
+ squashfs-tools/unsquashfs.h|  1 +
+ 7 files changed, 14 insertions(+), 17 deletions(-)
+
+diff --git a/squashfs-tools/unsquash-1.c b/squashfs-tools/unsquash-1.c
+index acba821..7598499 100644
+--- a/squashfs-tools/unsquash-1.c
 b/squashfs-tools/unsquash-1.c
+@@ -373,8 +373,7 @@ static struct dir *squashfs_opendir(unsigned int 
block_start, unsigned int offse
+   return dir;
+ 
+ corrupted:
+-  free(dir->dirs);
+-  free(dir);
++  squashfs_closedir(dir);
+   return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-1234.c b/squashfs-tools/unsquash-1234.c
+index c2d4f42..0c8dfbb 100644
+--- a/squashfs-tools/unsquash-1234.c
 b/squashfs-tools/unsquash-1234.c
+@@ -25,8 +25,8 @@
+  * unsquash-4.
+  */
+ 
+-#define TRUE 1
+-#define FALSE 0
++#include "unsquashfs.h"
++
+ /*
+  * Check name for validity, name should not
+  *  - be ".", "./", or
+@@ -56,3 +56,10 @@ int check_name(char *name, int size)
+ 
+   return TRUE;
+ }
++
++
++void squashfs_closedir(struct dir *dir)
++{
++  free(dir->dirs);
++  free(dir);
++}
+diff --git a/squashfs-tools/unsquash-2.c b/squashfs-tools/unsquash-2.c
+index 0746b3d..86f62ba 100644
+--- a/squashfs-tools/unsquash-2.c
 b/squashfs-tools/unsquash-2.c
+@@ -465,8 +465,7 @@ static struct dir *squashfs_opendir(unsigned int 
block_start, unsigned int offse
+   return dir;
+ 
+ corrupted:
+-  free(dir->dirs);
+-  free(dir);
++  squashfs_closedir(dir);
+   return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-3.c b/squashfs-tools/unsquash-3.c
+index 094caaa..c04aa9e 100644
+--- a/squashfs-tools/unsquash-3.c
 b/squashfs-tools/unsquash-3.c
+@@ -499,8 +499,7 @@ static struct dir *squashfs_opendir(unsigned int 
block_start, unsigned int offse
+   return dir;
+ 
+ corrupted:
+-  free(dir->dirs);
+-  free(dir);
++  squashfs_closedir(dir);
+   return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquash-4.c b/squashfs-tools/unsquash-4.c
+index 3a1b9e1..ff62dcc 100644
+--- a/squashfs-tools/unsquash-4.c
 b/squashfs-tools/unsquash-4.c
+@@ -436,8 +436,7 @@ static struct dir *squashfs_opendir(unsigned int 
block_start, unsigned int offse
+   return dir;
+ 
+ corrupted:
+-  free(dir->dirs);
+-  free(dir);
++  squashfs_closedir(dir);
+   return NULL;
+ }
+ 
+diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
+index 7b590bd..04be53c 100644
+--- a/squashfs-tools/unsquashfs.c
 b/squashfs-tools/unsquashfs.c
+@@ -1350,13 +1350,6 @@ unsigned int *offset, unsigned int *type)
+ }
+ 
+ 
+-void squashfs_closedir(struct dir *dir)
+-{
+-  free(dir->dirs);
+-  free(dir);
+-}
+-
+-
+ char *get_component(char *target, char **targname)
+ {
+   char *start;
+diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h
+index 2e9201c..5ecb2ab 100644
+--- a/squashfs-tools/unsquashfs.h
 b/squashfs-tools/unsquashfs.h
+@@ -291,4 +291,5 @@ extern long long *alloc_index_table(int);
+ 

[OE-core] [PATCH] packagegroup-core-tools-testapps: clear GOTOOLS for riscv32

2021-12-01 Thread kai
From: Kai Kang 

go-helloworld is not compatible with riscv32 and causes error:

| ERROR: Nothing RPROVIDES 'go-helloworld' (but
meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
RDEPENDS on or otherwise requires it)
| go-helloworld was skipped: Unsupported CPU architecture: riscv32

Clear GOTOOLS for riscv32 in recipe packagegroup-core-tools-testapps.

Signed-off-by: Kai Kang 
---
 .../packagegroups/packagegroup-core-tools-testapps.bb| 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb 
b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
index e8f0811485..1fee1c925d 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
@@ -23,6 +23,7 @@ KEXECTOOLS:riscv32 ?= ""
 # gccgo may do better
 GOTOOLS ?= "go-helloworld"
 GOTOOLS:powerpc ?= ""
+GOTOOLS:riscv32 ?= ""
 
 GSTEXAMPLES ?= "gst-examples"
 GSTEXAMPLES:riscv64 = ""
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159070): 
https://lists.openembedded.org/g/openembedded-core/message/159070
Mute This Topic: https://lists.openembedded.org/mt/87445157/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [hardknott][PATCH 0/4] Fix CVEs of xserver-xorg

2021-12-28 Thread kai
From: Kai Kang 


Kai Kang (4):
  xserver-xorg: fix CVE-2021-4008
  xserver-xorg: fix CVE-2021-4009
  xserver-xorg: fix CVE-2021-4010
  xserver-xorg: fix CVE-2021-4011

 .../xserver-xorg/CVE-2021-4008.patch  | 59 +++
 .../xserver-xorg/CVE-2021-4009.patch  | 50 
 .../xserver-xorg/CVE-2021-4010.patch  | 39 
 .../xserver-xorg/CVE-2021-4011.patch  | 40 +
 .../xorg-xserver/xserver-xorg_1.20.10.bb  |  4 ++
 5 files changed, 192 insertions(+)
 create mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch
 create mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4009.patch
 create mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4010.patch
 create mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4011.patch

-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160040): 
https://lists.openembedded.org/g/openembedded-core/message/160040
Mute This Topic: https://lists.openembedded.org/mt/88007519/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [hardknott][PATCH 2/4] xserver-xorg: fix CVE-2021-4009

2021-12-28 Thread kai
From: Kai Kang 

Backport patch to fix CVE-2021-4009 for xserver-xorg.

CVE: CVE-2021-4009

Signed-off-by: Kai Kang 
---
 .../xserver-xorg/CVE-2021-4009.patch  | 50 +++
 .../xorg-xserver/xserver-xorg_1.20.10.bb  |  1 +
 2 files changed, 51 insertions(+)
 create mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4009.patch

diff --git 
a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4009.patch 
b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4009.patch
new file mode 100644
index 00..ddfbb43ee4
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4009.patch
@@ -0,0 +1,50 @@
+Backport patch to fix CVE-2021-4009.
+
+CVE: CVE-2021-4009
+Upstream-Status: Backport 
[https://gitlab.freedesktop.org/xorg/xserver/-/commit/b519675]
+
+Signed-off-by: Kai Kang 
+
+From b5196750099ae6ae582e1f46bd0a6dad29550e02 Mon Sep 17 00:00:00 2001
+From: Povilas Kanapickas 
+Date: Tue, 14 Dec 2021 15:00:01 +0200
+Subject: [PATCH] xfixes: Fix out of bounds access in
+ *ProcXFixesCreatePointerBarrier()
+
+ZDI-CAN-14950, CVE-2021-4009
+
+This vulnerability was discovered and the fix was suggested by:
+Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+
+Signed-off-by: Povilas Kanapickas 
+---
+ xfixes/cursor.c | 6 --
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/xfixes/cursor.c b/xfixes/cursor.c
+index 60580b88f..c5d4554b2 100644
+--- a/xfixes/cursor.c
 b/xfixes/cursor.c
+@@ -1010,7 +1010,8 @@ ProcXFixesCreatePointerBarrier(ClientPtr client)
+ {
+ REQUEST(xXFixesCreatePointerBarrierReq);
+ 
+-REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, 
pad_to_int32(stuff->num_devices));
++REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq,
++   pad_to_int32(stuff->num_devices * sizeof(CARD16)));
+ LEGAL_NEW_RESOURCE(stuff->barrier, client);
+ 
+ return XICreatePointerBarrier(client, stuff);
+@@ -1027,7 +1028,8 @@ SProcXFixesCreatePointerBarrier(ClientPtr client)
+ 
+ swaps(&stuff->length);
+ swaps(&stuff->num_devices);
+-REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, 
pad_to_int32(stuff->num_devices));
++REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq,
++   pad_to_int32(stuff->num_devices * sizeof(CARD16)));
+ 
+ swapl(&stuff->barrier);
+ swapl(&stuff->window);
+-- 
+GitLab
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb 
b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
index 9a7aa1ed9a..ac32bb25c2 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
@@ -10,6 +10,7 @@ SRC_URI += 
"file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
file://CVE-2021-3472.patch \
file://0001-hw-xwayland-Makefile.am-fix-build-without-glx.patch \
file://CVE-2021-4008.patch \
+   file://CVE-2021-4009.patch \
"
 SRC_URI[sha256sum] = 
"977420c082450dc808de301ef56af4856d653eea71519a973c3490a780cb7c99"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160042): 
https://lists.openembedded.org/g/openembedded-core/message/160042
Mute This Topic: https://lists.openembedded.org/mt/88007523/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [hardknott][PATCH 3/4] xserver-xorg: fix CVE-2021-4010

2021-12-28 Thread kai
From: Kai Kang 

Backport patch to fix CVE-2021-4010 for xserver-xorg.

CVE: CVE-2021-4010

Signed-off-by: Kai Kang 
---
 .../xserver-xorg/CVE-2021-4010.patch  | 39 +++
 .../xorg-xserver/xserver-xorg_1.20.10.bb  |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4010.patch

diff --git 
a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4010.patch 
b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4010.patch
new file mode 100644
index 00..06ebe7d077
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4010.patch
@@ -0,0 +1,39 @@
+Backport patch to fix CVE-2021-4010.
+
+CVE: CVE-2021-4010
+Upstream-Status: Backport 
[https://gitlab.freedesktop.org/xorg/xserver/-/commit/6c4c530]
+
+Signed-off-by: Kai Kang 
+
+From 6c4c53010772e3cb4cb8acd54950c8eec9c00d21 Mon Sep 17 00:00:00 2001
+From: Povilas Kanapickas 
+Date: Tue, 14 Dec 2021 15:00:02 +0200
+Subject: [PATCH] Xext: Fix out of bounds access in SProcScreenSaverSuspend()
+
+ZDI-CAN-14951, CVE-2021-4010
+
+This vulnerability was discovered and the fix was suggested by:
+Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+
+Signed-off-by: Povilas Kanapickas 
+---
+ Xext/saver.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Xext/saver.c b/Xext/saver.c
+index 1d7e3cadf..f813ba08d 100644
+--- a/Xext/saver.c
 b/Xext/saver.c
+@@ -1351,8 +1351,8 @@ SProcScreenSaverSuspend(ClientPtr client)
+ REQUEST(xScreenSaverSuspendReq);
+ 
+ swaps(&stuff->length);
+-swapl(&stuff->suspend);
+ REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
++swapl(&stuff->suspend);
+ return ProcScreenSaverSuspend(client);
+ }
+ 
+-- 
+GitLab
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb 
b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
index ac32bb25c2..84b0acb42f 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
@@ -11,6 +11,7 @@ SRC_URI += 
"file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
file://0001-hw-xwayland-Makefile.am-fix-build-without-glx.patch \
file://CVE-2021-4008.patch \
file://CVE-2021-4009.patch \
+   file://CVE-2021-4010.patch \
"
 SRC_URI[sha256sum] = 
"977420c082450dc808de301ef56af4856d653eea71519a973c3490a780cb7c99"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160041): 
https://lists.openembedded.org/g/openembedded-core/message/160041
Mute This Topic: https://lists.openembedded.org/mt/88007522/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [hardknott][PATCH 1/4] xserver-xorg: fix CVE-2021-4008

2021-12-28 Thread kai
From: Kai Kang 

Backport patch to fix CVE-2021-4008 for xserver-xorg.

CVE: CVE-2021-4008

Signed-off-by: Kai Kang 
---
 .../xserver-xorg/CVE-2021-4008.patch  | 59 +++
 .../xorg-xserver/xserver-xorg_1.20.10.bb  |  1 +
 2 files changed, 60 insertions(+)
 create mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch

diff --git 
a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch 
b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch
new file mode 100644
index 00..3277be0185
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch
@@ -0,0 +1,59 @@
+Backport patch to fix CVE-2021-4008.
+
+CVE: CVE-2021-4008
+Upstream-Status: Backport 
[https://gitlab.freedesktop.org/xorg/xserver/-/commit/ebce7e2]
+
+Signed-off-by: Kai Kang 
+
+From ebce7e2d80e7c80e1dda60f2f0bc886f1106ba60 Mon Sep 17 00:00:00 2001
+From: Povilas Kanapickas 
+Date: Tue, 14 Dec 2021 15:00:03 +0200
+Subject: [PATCH] render: Fix out of bounds access in
+ SProcRenderCompositeGlyphs()
+
+ZDI-CAN-14192, CVE-2021-4008
+
+This vulnerability was discovered and the fix was suggested by:
+Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+
+Signed-off-by: Povilas Kanapickas 
+---
+ render/render.c | 9 +
+ 1 file changed, 9 insertions(+)
+
+diff --git a/render/render.c b/render/render.c
+index c376090ca..456f156d4 100644
+--- a/render/render.c
 b/render/render.c
+@@ -2309,6 +2309,9 @@ SProcRenderCompositeGlyphs(ClientPtr client)
+ 
+ i = elt->len;
+ if (i == 0xff) {
++if (buffer + 4 > end) {
++return BadLength;
++}
+ swapl((int *) buffer);
+ buffer += 4;
+ }
+@@ -2319,12 +2322,18 @@ SProcRenderCompositeGlyphs(ClientPtr client)
+ buffer += i;
+ break;
+ case 2:
++if (buffer + i * 2 > end) {
++return BadLength;
++}
+ while (i--) {
+ swaps((short *) buffer);
+ buffer += 2;
+ }
+ break;
+ case 4:
++if (buffer + i * 4 > end) {
++return BadLength;
++}
+ while (i--) {
+ swapl((int *) buffer);
+ buffer += 4;
+-- 
+GitLab
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb 
b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
index e0551fa999..9a7aa1ed9a 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
@@ -9,6 +9,7 @@ SRC_URI += 
"file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat

file://0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch \
file://CVE-2021-3472.patch \
file://0001-hw-xwayland-Makefile.am-fix-build-without-glx.patch \
+   file://CVE-2021-4008.patch \
"
 SRC_URI[sha256sum] = 
"977420c082450dc808de301ef56af4856d653eea71519a973c3490a780cb7c99"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160043): 
https://lists.openembedded.org/g/openembedded-core/message/160043
Mute This Topic: https://lists.openembedded.org/mt/88007524/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [hardknott][PATCH 4/4] xserver-xorg: fix CVE-2021-4011

2021-12-28 Thread kai
From: Kai Kang 

Backport patch to fix CVE-2021-4011 for xserver-xorg.

CVE: CVE-2021-4011

Signed-off-by: Kai Kang 
---
 .../xserver-xorg/CVE-2021-4011.patch  | 40 +++
 .../xorg-xserver/xserver-xorg_1.20.10.bb  |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4011.patch

diff --git 
a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4011.patch 
b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4011.patch
new file mode 100644
index 00..c7eb03091d
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4011.patch
@@ -0,0 +1,40 @@
+Backport patch to fix CVE-2021-4011.
+
+CVE: CVE-2021-4011
+Upstream-Status: Backport 
[https://gitlab.freedesktop.org/xorg/xserver/-/commit/e56f61c]
+
+Signed-off-by: Kai Kang 
+
+From e56f61c79fc3cee26d83cda0f84ae56d5979f768 Mon Sep 17 00:00:00 2001
+From: Povilas Kanapickas 
+Date: Tue, 14 Dec 2021 15:00:00 +0200
+Subject: [PATCH] record: Fix out of bounds access in SwapCreateRegister()
+
+ZDI-CAN-14952, CVE-2021-4011
+
+This vulnerability was discovered and the fix was suggested by:
+Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+
+Signed-off-by: Povilas Kanapickas 
+---
+ record/record.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/record/record.c b/record/record.c
+index be154525d..e123867a7 100644
+--- a/record/record.c
 b/record/record.c
+@@ -2516,8 +2516,8 @@ SwapCreateRegister(ClientPtr client, 
xRecordRegisterClientsReq * stuff)
+ swapl(pClientID);
+ }
+ if (stuff->nRanges >
+-client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq)
+-- stuff->nClients)
++(client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq)
++- stuff->nClients) / bytes_to_int32(sz_xRecordRange))
+ return BadLength;
+ RecordSwapRanges((xRecordRange *) pClientID, stuff->nRanges);
+ return Success;
+-- 
+GitLab
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb 
b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
index 84b0acb42f..58f1eb328e 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
@@ -12,6 +12,7 @@ SRC_URI += 
"file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
file://CVE-2021-4008.patch \
file://CVE-2021-4009.patch \
file://CVE-2021-4010.patch \
+   file://CVE-2021-4011.patch \
"
 SRC_URI[sha256sum] = 
"977420c082450dc808de301ef56af4856d653eea71519a973c3490a780cb7c99"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160044): 
https://lists.openembedded.org/g/openembedded-core/message/160044
Mute This Topic: https://lists.openembedded.org/mt/88007526/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [hardknott][PATCH 1/4] xserver-xorg: fix CVE-2021-4008

2022-01-06 Thread kai

On 12/29/21 9:30 AM, kai wrote:

From: Kai Kang 

Backport patch to fix CVE-2021-4008 for xserver-xorg.

CVE: CVE-2021-4008


Ping.

Kai



Signed-off-by: Kai Kang 
---
  .../xserver-xorg/CVE-2021-4008.patch  | 59 +++
  .../xorg-xserver/xserver-xorg_1.20.10.bb  |  1 +
  2 files changed, 60 insertions(+)
  create mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch

diff --git 
a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch 
b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch
new file mode 100644
index 00..3277be0185
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch
@@ -0,0 +1,59 @@
+Backport patch to fix CVE-2021-4008.
+
+CVE: CVE-2021-4008
+Upstream-Status: Backport 
[https://gitlab.freedesktop.org/xorg/xserver/-/commit/ebce7e2]
+
+Signed-off-by: Kai Kang 
+
+From ebce7e2d80e7c80e1dda60f2f0bc886f1106ba60 Mon Sep 17 00:00:00 2001
+From: Povilas Kanapickas 
+Date: Tue, 14 Dec 2021 15:00:03 +0200
+Subject: [PATCH] render: Fix out of bounds access in
+ SProcRenderCompositeGlyphs()
+
+ZDI-CAN-14192, CVE-2021-4008
+
+This vulnerability was discovered and the fix was suggested by:
+Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+
+Signed-off-by: Povilas Kanapickas 
+---
+ render/render.c | 9 +
+ 1 file changed, 9 insertions(+)
+
+diff --git a/render/render.c b/render/render.c
+index c376090ca..456f156d4 100644
+--- a/render/render.c
 b/render/render.c
+@@ -2309,6 +2309,9 @@ SProcRenderCompositeGlyphs(ClientPtr client)
+
+ i = elt->len;
+ if (i == 0xff) {
++if (buffer + 4 > end) {
++return BadLength;
++}
+ swapl((int *) buffer);
+ buffer += 4;
+ }
+@@ -2319,12 +2322,18 @@ SProcRenderCompositeGlyphs(ClientPtr client)
+ buffer += i;
+ break;
+ case 2:
++if (buffer + i * 2 > end) {
++return BadLength;
++}
+ while (i--) {
+ swaps((short *) buffer);
+ buffer += 2;
+ }
+ break;
+ case 4:
++if (buffer + i * 4 > end) {
++return BadLength;
++}
+ while (i--) {
+ swapl((int *) buffer);
+ buffer += 4;
+--
+GitLab
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb 
b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
index e0551fa999..9a7aa1ed9a 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
@@ -9,6 +9,7 @@ SRC_URI += 
"file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
 
file://0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch \
 file://CVE-2021-3472.patch \
 file://0001-hw-xwayland-Makefile.am-fix-build-without-glx.patch \
+   file://CVE-2021-4008.patch \
 "
  SRC_URI[sha256sum] = 
"977420c082450dc808de301ef56af4856d653eea71519a973c3490a780cb7c99"
  






--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160247): 
https://lists.openembedded.org/g/openembedded-core/message/160247
Mute This Topic: https://lists.openembedded.org/mt/88254273/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [hardknott][PATCH 1/4] xserver-xorg: fix CVE-2021-4008

2022-01-06 Thread kai

On 1/7/22 3:51 PM, Mittal, Anuj wrote:

On Fri, 2022-01-07 at 10:56 +0800, kai wrote:

On 12/29/21 9:30 AM, kai wrote:
  

From: Kai Kang 

Backport patch to fix CVE-2021-4008 for xserver-xorg.

CVE: CVE-2021-4008

Ping.
Kai
  

This is in this week's pull request and should get merged soon.


Thanks.

Kai



Thanks,

Anuj


Signed-off-by: Kai Kang 
---
  .../xserver-xorg/CVE-2021-4008.patch  | 59
+++
  .../xorg-xserver/xserver-xorg_1.20.10.bb  |  1 +
  2 files changed, 60 insertions(+)
  create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-
xorg/CVE-2021-4008.patch

diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-
2021-4008.patch b/meta/recipes-graphics/xorg-xserver/xserver-
xorg/CVE-2021-4008.patch
new file mode 100644
index 00..3277be0185
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-
4008.patch
@@ -0,0 +1,59 @@
+Backport patch to fix CVE-2021-4008.
+
+CVE: CVE-2021-4008
+Upstream-Status: Backport
[https://gitlab.freedesktop.org/xorg/xserver/-/commit/ebce7e2]
+
+Signed-off-by: Kai Kang 
+
+From ebce7e2d80e7c80e1dda60f2f0bc886f1106ba60 Mon Sep 17 00:00:00
2001
+From: Povilas Kanapickas 
+Date: Tue, 14 Dec 2021 15:00:03 +0200
+Subject: [PATCH] render: Fix out of bounds access in
+ SProcRenderCompositeGlyphs()
+
+ZDI-CAN-14192, CVE-2021-4008
+
+This vulnerability was discovered and the fix was suggested by:
+Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+
+Signed-off-by: Povilas Kanapickas 
+---
+ render/render.c | 9 +
+ 1 file changed, 9 insertions(+)
+
+diff --git a/render/render.c b/render/render.c
+index c376090ca..456f156d4 100644
+--- a/render/render.c
 b/render/render.c
+@@ -2309,6 +2309,9 @@ SProcRenderCompositeGlyphs(ClientPtr client)
+
+ i = elt->len;
+ if (i == 0xff) {
++if (buffer + 4 > end) {
++return BadLength;
++}
+ swapl((int *) buffer);
+ buffer += 4;
+ }
+@@ -2319,12 +2322,18 @@ SProcRenderCompositeGlyphs(ClientPtr
client)
+ buffer += i;
+ break;
+ case 2:
++if (buffer + i * 2 > end) {
++return BadLength;
++}
+ while (i--) {
+ swaps((short *) buffer);
+ buffer += 2;
+ }
+ break;
+ case 4:
++if (buffer + i * 4 > end) {
++return BadLength;
++}
+ while (i--) {
+ swapl((int *) buffer);
+ buffer += 4;
+--
+GitLab
+
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-
xorg_1.20.10.bb b/meta/recipes-graphics/xorg-xserver/xserver-
xorg_1.20.10.bb
index e0551fa999..9a7aa1ed9a 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
@@ -9,6 +9,7 @@ SRC_URI +=
"file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.p
at
 file://0001-Fix-segfault-on-probing-a-non-PCI-platform-
device-on.patch \
 file://CVE-2021-3472.patch \
 
file://0001-hw-xwayland-Makefile.am-fix-build-without-glx.patch \

+   file://CVE-2021-4008.patch \
 "
  SRC_URI[sha256sum] =
"977420c082450dc808de301ef56af4856d653eea71519a973c3490a780cb7c99"
  
  
  









--
Kai Kang
Wind River Linux


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160250): 
https://lists.openembedded.org/g/openembedded-core/message/160250
Mute This Topic: https://lists.openembedded.org/mt/88254273/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [hardknott][PATCH] webkitgtk: fix fix CVE-2021-42762

2022-01-07 Thread kai
From: Kai Kang 

Backport and rebase patch to fix CVE-2021-42762 for webkitgtk 2.30.5.

CVE: CVE-2021-42762

Ref:
* https://bugs.webkit.org/show_bug.cgi?id=231479#c8

Signed-off-by: Kai Kang 
---
 .../webkit/webkitgtk/CVE-2021-42762.patch | 468 ++
 meta/recipes-sato/webkit/webkitgtk_2.30.5.bb  |   1 +
 2 files changed, 469 insertions(+)
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/CVE-2021-42762.patch

diff --git a/meta/recipes-sato/webkit/webkitgtk/CVE-2021-42762.patch 
b/meta/recipes-sato/webkit/webkitgtk/CVE-2021-42762.patch
new file mode 100644
index 00..1d012271cb
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/CVE-2021-42762.patch
@@ -0,0 +1,468 @@
+Backport and rebase patch to fix CVE-2021-42762 for webkitgtk 2.30.5.
+
+CVE: CVE-2021-42762
+Upstream-Status: Backport [https://trac.webkit.org/changeset/284451/webkit]
+
+Ref:
+* https://bugs.webkit.org/show_bug.cgi?id=231479#c8
+
+Signed-off-by: Kai Kang 
+
+From 035ac439855c7bef0a4525897f783121e4a6055c Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro 
+Date: Tue, 19 Oct 2021 14:27:17 +
+Subject: [PATCH] Update seccomp filters with latest changes from flatpak
+ https://bugs.webkit.org/show_bug.cgi?id=231479
+
+Patch by Michael Catanzaro  on 2021-10-19
+Reviewed by Adrian Perez de Castro.
+
+Additionally, let's fix a minor inconsistency in our error-handling code: all 
but one of
+our codepaths carefully free and close resources, but the process is about to 
crash so
+there's not really any reason to do so. The code is slightly simpler if we 
don't bother.
+
+The seemingly-extraneous include order changes are required to placate the 
style checker.
+
+* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
+(WebKit::seccompStrerror):
+(WebKit::setupSeccomp):
+* UIProcess/Launcher/glib/Syscalls.h: Added.
+
+Canonical link: https://commits.webkit.org/243211@main
+git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284451 
268f45cc-cd09-0410-ab3c-d52691b4dbfc
+---
+ .../UIProcess/Launcher/glib/BubblewrapLauncher.cpp | 139 +-
+ Source/WebKit/UIProcess/Launcher/glib/Syscalls.h   | 200 +
+ 2 files changed, 293 insertions(+), 46 deletions(-)
+
+diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp 
b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+index 889388ac..c2f7e502 100644
+--- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
 b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+@@ -25,11 +25,18 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+ #include 
+ 
++#if !defined(MFD_ALLOW_SEALING) && HAVE(LINUX_MEMFD_H)
++#include 
++#endif
++
++#include "Syscalls.h"
++
+ #if PLATFORM(GTK)
+ #include "WaylandCompositor.h"
+ #endif
+@@ -40,13 +47,7 @@
+ #define BASE_DIRECTORY "wpe"
+ #endif
+ 
+-#include 
+-
+-#ifndef MFD_ALLOW_SEALING
+-
+-#if HAVE(LINUX_MEMFD_H)
+-
+-#include 
++#if !defined(MFD_ALLOW_SEALING) && HAVE(LINUX_MEMFD_H)
+ 
+ // These defines were added in glibc 2.27, the same release that added 
memfd_create.
+ // But the kernel added all of this in Linux 3.17. So it's totally safe for 
us to
+@@ -65,9 +66,7 @@ static int memfd_create(const char* name, unsigned flags)
+ {
+ return syscall(__NR_memfd_create, name, flags);
+ }
+-#endif // #if HAVE(LINUX_MEMFD_H)
+-
+-#endif // #ifndef MFD_ALLOW_SEALING
++#endif // #if !defined(MFD_ALLOW_SEALING) && HAVE(LINUX_MEMFD_H)
+ 
+ namespace WebKit {
+ using namespace WebCore;
+@@ -573,6 +572,28 @@ static void bindSymlinksRealPath(Vector& args, 
const char* path)
+ }
+ }
+ 
++// Translate a libseccomp error code into an error message. libseccomp
++// mostly returns negative errno values such as -ENOMEM, but some
++// standard errno values are used for non-standard purposes where their
++// strerror() would be misleading.
++static const char* seccompStrerror(int negativeErrno)
++{
++RELEASE_ASSERT_WITH_MESSAGE(negativeErrno < 0, "Non-negative error value 
from libseccomp?");
++RELEASE_ASSERT_WITH_MESSAGE(negativeErrno > INT_MIN, "Out of range error 
value from libseccomp?");
++
++switch (negativeErrno) {
++case -EDOM:
++return "Architecture-specific failure";
++case -EFAULT:
++return "Internal libseccomp failure (unknown syscall?)";
++case -ECANCELED:
++return "System failure beyond the control of libseccomp";
++}
++
++// e.g. -ENOMEM: the result of strerror() is good enough
++return g_strerror(-negativeErrno);
++}
++
+ static int setupSeccomp()
+ {
+ // NOTE: This is shared code (flatpak-run.c - LGPLv2.1+)
+@@ -600,6 +621,10 @@ static int setupSeccomp()
+ //in common/flatpak-run.c
+ //  https://git.gnome.org/browse/linux-user-chroot
+ //in src/setup-seccomp.c
++//
++// Other useful resources:
++

[OE-core] [PATCH] xserver-xorg: 21.1.1 -> 21.1.3

2022-01-07 Thread kai
From: Kai Kang 

Upgrade xserver-xorg from 21.1.1 to 21.1.3. It fixes CVE-2021-4008,
CVE-2021-4009, CVE-2021-4010, CVE-2021-4011 in 21.1.2.

Adjust indent as well.

Signed-off-by: Kai Kang 
---
 .../{xserver-xorg_21.1.1.bb => xserver-xorg_21.1.3.bb}  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-graphics/xorg-xserver/{xserver-xorg_21.1.1.bb => 
xserver-xorg_21.1.3.bb} (84%)

diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.1.bb 
b/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.3.bb
similarity index 84%
rename from meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.1.bb
rename to meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.3.bb
index 196d1edff5..3e076ecca7 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.1.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.3.bb
@@ -1,9 +1,9 @@
 require xserver-xorg.inc
 
 SRC_URI += 
"file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch \
-   file://0001-Avoid-duplicate-definitions-of-IOPortBase.patch \
-   "
-SRC_URI[sha256sum] = 
"782e7fef2ca0c7cbe60a937b8bf42dac69c904fb841950fd0363e1c2346ea755"
+file://0001-Avoid-duplicate-definitions-of-IOPortBase.patch \
+"
+SRC_URI[sha256sum] = 
"61d6aad5b6b47a116b960bd7f0cba4ee7e6da95d6bb0b127bde75d7d1acdebe5"
 
 # These extensions are now integrated into the server, so declare the migration
 # path for in-place upgrades.
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160264): 
https://lists.openembedded.org/g/openembedded-core/message/160264
Mute This Topic: https://lists.openembedded.org/mt/88262897/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



  1   2   3   4   5   6   7   8   9   10   >