[OE-core] [master] meta: scripts - relocation script adapted to support big-endian machines

2022-03-31 Thread Sundeep KOKKONDA
relocate_sdk.py was developed for little-endian architures and when tries
to install SDK for big-endian machines errors like below will be shown.

The changes made in the script to support big-endian architecture.

Signed-off-by: Sundeep KOKKONDA 
---
 scripts/relocate_sdk.py | 45 -
 1 file changed, 35 insertions(+), 10 deletions(-)
 mode change 100755 => 100644 scripts/relocate_sdk.py

diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py
old mode 100755
new mode 100644
index 8c0fdb986a..513b9343d3
--- a/scripts/relocate_sdk.py
+++ b/scripts/relocate_sdk.py
@@ -30,9 +30,10 @@ else:
 old_prefix = re.compile(b("##DEFAULT_INSTALL_DIR##"))
 
 def get_arch():
+global ei_data
 f.seek(0)
 e_ident =f.read(16)
-ei_mag0,ei_mag1_3,ei_class = struct.unpack("16xII16x", sh_hdr)
 else:
-sh_offset, sh_size = struct.unpack("<24xQQ24x", sh_hdr)
+if ei_data == 1:
+sh_offset, sh_size = struct.unpack("<24xQQ24x", sh_hdr)
+else:
+sh_offset, sh_size = struct.unpack(">24xQQ24x", sh_hdr)
 
 f.seek(sh_offset)
 sh_strtab = f.read(sh_size)
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163879): 
https://lists.openembedded.org/g/openembedded-core/message/163879
Mute This Topic: https://lists.openembedded.org/mt/90171088/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 00/20] Pull request

2022-03-31 Thread Anuj Mittal
The following changes since commit bcef80623f015c006778edee5cf40dad063e51db:

  wic: Use custom kernel path if provided (2022-03-15 23:00:09 +0800)

are available in the Git repository at:

  git://push.openembedded.org/openembedded-core-contrib stable/hardknott-next

Alexander Kanavin (1):
  mobile-broadband-provider-info: upgrade 20201225 -> 20210805

Anuj Mittal (1):
  lttng-modules: upgrade 2.12.7 -> 2.12.8

Bruce Ashfield (5):
  linux-yocto: nohz_full boot arg fix
  linux-yocto/5.10: split vtpm for more granular inclusion
  linux-yocto/5.10: cfg/debug: add configs for kcsan
  linux-yocto-rt/5.10: update to -rt61
  linux-yocto/5.10: update to v5.10.107

Changhyeok Bae (1):
  mobile-broadband-provider-info: upgrade 20210805 -> 20220315

Chee Yang Lee (2):
  webkitgtk : update to 2.30.6
  go: update to 1.16.15

Joe Slater (2):
  libxml2: Fix CVE-2022-23308
  zip: modify when match.S is built

Li Wang (1):
  flac: fix CVE-2021-0561

Mingli Yu (2):
  epiphany: fix CVEs
  python3-numpy: fix CVE-2021-41496

Minjae Kim (2):
  gnu-config: update SRC_URI
  virglrenderer: update SRC_URI

Ovidiu Panait (1):
  openssl: upgrade 1.1.1l -> 1.1.1n

Ross Burton (1):
  zlib: backport the fix for CVE-2018-25032

wangmy (1):
  linux-firmware: upgrade 20220209 -> 20220310

 .../mobile-broadband-provider-info_git.bb |   7 +-
 .../{openssl_1.1.1l.bb => openssl_1.1.1n.bb}  |   3 +-
 .../CVE-2022-23308-fix-regression.patch   |  99 +++
 .../libxml/libxml2/CVE-2022-23308.patch   | 209 ++
 meta/recipes-core/libxml/libxml2_2.9.10.bb|   2 +
 .../zlib/zlib/CVE-2018-25032.patch| 347 +
 meta/recipes-core/zlib/zlib_1.2.11.bb |   1 +
 .../gnu-config/gnu-config_git.bb  |   2 +-
 .../go/{go-1.16.14.inc => go-1.16.15.inc} |   4 +-
 ...1.16.14.bb => go-binary-native_1.16.15.bb} |   4 +-
 16.14.bb => go-cross-canadian_1.16.15.bb} |   0
 ...o-cross_1.16.14.bb => go-cross_1.16.15.bb} |   0
 ...ssdk_1.16.14.bb => go-crosssdk_1.16.15.bb} |   0
 ...native_1.16.14.bb => go-native_1.16.15.bb} |   0
 ...ntime_1.16.14.bb => go-runtime_1.16.15.bb} |   0
 .../go/{go_1.16.14.bb => go_1.16.15.bb}   |   0
 .../python-numpy/files/CVE-2021-41496.patch   |  64 ++
 .../python-numpy/python3-numpy_1.20.1.bb  |   1 +
 .../0001-configure-use-correct-CPP.patch  |  47 ++
 ...002-configure-support-PIC-code-build.patch |  34 +
 meta/recipes-extended/zip/zip_3.0.bb  |   2 +
 .../recipes-gnome/epiphany/epiphany_3.38.2.bb |   1 +
 .../files/encode-untrusted-data.patch | 707 ++
 .../virglrenderer/virglrenderer_0.8.2.bb  |   2 +-
 ...20220209.bb => linux-firmware_20220310.bb} |   6 +-
 .../linux/linux-yocto-rt_5.10.bb  |   6 +-
 .../linux/linux-yocto-tiny_5.10.bb|   8 +-
 meta/recipes-kernel/linux/linux-yocto_5.10.bb |  24 +-
 ...ules_2.12.7.bb => lttng-modules_2.12.8.bb} |   2 +-
 .../flac/flac/CVE-2021-0561.patch |  41 +
 meta/recipes-multimedia/flac/flac_1.3.3.bb|   1 +
 ...ebkitgtk_2.30.5.bb => webkitgtk_2.30.6.bb} |   2 +-
 32 files changed, 1592 insertions(+), 34 deletions(-)
 rename meta/recipes-connectivity/openssl/{openssl_1.1.1l.bb => 
openssl_1.1.1n.bb} (98%)
 create mode 100644 
meta/recipes-core/libxml/libxml2/CVE-2022-23308-fix-regression.patch
 create mode 100644 meta/recipes-core/libxml/libxml2/CVE-2022-23308.patch
 create mode 100644 meta/recipes-core/zlib/zlib/CVE-2018-25032.patch
 rename meta/recipes-devtools/go/{go-1.16.14.inc => go-1.16.15.inc} (91%)
 rename meta/recipes-devtools/go/{go-binary-native_1.16.14.bb => 
go-binary-native_1.16.15.bb} (83%)
 rename meta/recipes-devtools/go/{go-cross-canadian_1.16.14.bb => 
go-cross-canadian_1.16.15.bb} (100%)
 rename meta/recipes-devtools/go/{go-cross_1.16.14.bb => go-cross_1.16.15.bb} 
(100%)
 rename meta/recipes-devtools/go/{go-crosssdk_1.16.14.bb => 
go-crosssdk_1.16.15.bb} (100%)
 rename meta/recipes-devtools/go/{go-native_1.16.14.bb => go-native_1.16.15.bb} 
(100%)
 rename meta/recipes-devtools/go/{go-runtime_1.16.14.bb => 
go-runtime_1.16.15.bb} (100%)
 rename meta/recipes-devtools/go/{go_1.16.14.bb => go_1.16.15.bb} (100%)
 create mode 100644 
meta/recipes-devtools/python-numpy/files/CVE-2021-41496.patch
 create mode 100644 
meta/recipes-extended/zip/zip-3.0/0001-configure-use-correct-CPP.patch
 create mode 100644 
meta/recipes-extended/zip/zip-3.0/0002-configure-support-PIC-code-build.patch
 create mode 100644 
meta/recipes-gnome/epiphany/files/encode-untrusted-data.patch
 rename meta/recipes-kernel/linux-firmware/{linux-firmware_20220209.bb => 
linux-firmware_20220310.bb} (99%)
 rename meta/recipes-kernel/lttng/{lttng-modules_2.12.7.bb => 
lttng-modules_2.12.8.bb} (94%)
 create mode 100644 meta/recipes-multimedia/flac/flac/CVE-2021-0561.patch
 rename meta/recipes-sato/webkit/{webkitgtk_2.30.5.bb => webkitgtk_2.30.6.bb} 
(98%)

-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163878): 

[OE-core] [dunfell][PATCH v2] bluez5: fix CVE-2022-0204

2022-03-31 Thread Ralph Siemsen
Fix heap overflow when appending prepare writes

The code shall check if the prepare writes would append more the
allowed maximum attribute length.

Upstream-Status: Backport 
[https://github.com/bluez/bluez/commit/591c546c536b42bef696d027f64aa22434f8c3f0]
CVE: CVE-2022-0204

Signed-off-by: Ralph Siemsen 
---
v2: fix accidental patch damage

Status on other branches:
- master/kirkstone 5.64 includes the fix
- honister 5.61 needs patch
- hardknott5.56 needs patch

 meta/recipes-connectivity/bluez5/bluez5.inc   |  1 +
 .../bluez5/bluez5/CVE-2022-0204.patch | 66 +++
 2 files changed, 67 insertions(+)
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/CVE-2022-0204.patch

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc 
b/meta/recipes-connectivity/bluez5/bluez5.inc
index 7cf061dcf6..4d4348898a 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -55,6 +55,7 @@ SRC_URI = 
"${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
file://CVE-2021-0129.patch \
file://CVE-2021-3588.patch \
   file://CVE-2021-3658.patch \
+   file://CVE-2022-0204.patch \
"
 S = "${WORKDIR}/bluez-${PV}"
 
diff --git a/meta/recipes-connectivity/bluez5/bluez5/CVE-2022-0204.patch 
b/meta/recipes-connectivity/bluez5/bluez5/CVE-2022-0204.patch
new file mode 100644
index 00..646b5ddfc8
--- /dev/null
+++ b/meta/recipes-connectivity/bluez5/bluez5/CVE-2022-0204.patch
@@ -0,0 +1,66 @@
+From 0d328fdf6564b67fc2ec3533e3da201ebabcc9e3 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz 
+Date: Tue, 8 Jun 2021 16:46:49 -0700
+Subject: [PATCH] shared/gatt-server: Fix heap overflow when appending prepare
+ writes
+
+The code shall check if the prepare writes would append more the
+allowed maximum attribute length.
+
+Fixes https://github.com/bluez/bluez/security/advisories/GHSA-479m-xcq5-9g2q
+
+Upstream-Status: Backport 
[https://github.com/bluez/bluez/commit/591c546c536b42bef696d027f64aa22434f8c3f0]
+Signed-off-by: Ralph Siemsen 
+CVE: CVE-2022-0204
+
+---
+ src/shared/gatt-server.c | 22 ++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/src/shared/gatt-server.c b/src/shared/gatt-server.c
+index 0c25a97..20e14bc 100644
+--- a/src/shared/gatt-server.c
 b/src/shared/gatt-server.c
+@@ -816,6 +816,20 @@ static uint8_t authorize_req(struct bt_gatt_server 
*server,
+   server->authorize_data);
+ }
+ 
++static uint8_t check_length(uint16_t length, uint16_t offset)
++{
++  if (length > BT_ATT_MAX_VALUE_LEN)
++  return BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN;
++
++  if (offset > BT_ATT_MAX_VALUE_LEN)
++  return BT_ATT_ERROR_INVALID_OFFSET;
++
++  if (length + offset > BT_ATT_MAX_VALUE_LEN)
++  return BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN;
++
++  return 0;
++}
++
+ static void write_cb(struct bt_att_chan *chan, uint8_t opcode, const void 
*pdu,
+   uint16_t length, void *user_data)
+ {
+@@ -846,6 +860,10 @@ static void write_cb(struct bt_att_chan *chan, uint8_t 
opcode, const void *pdu,
+   (opcode == BT_ATT_OP_WRITE_REQ) ? "Req" : "Cmd",
+   handle);
+ 
++  ecode = check_length(length, 0);
++  if (ecode)
++  goto error;
++
+   ecode = check_permissions(server, attr, BT_ATT_PERM_WRITE_MASK);
+   if (ecode)
+   goto error;
+@@ -1353,6 +1371,10 @@ static void prep_write_cb(struct bt_att_chan *chan, 
uint8_t opcode,
+   util_debug(server->debug_callback, server->debug_data,
+   "Prep Write Req - handle: 0x%04x", handle);
+ 
++  ecode = check_length(length, offset);
++  if (ecode)
++  goto error;
++
+   ecode = check_permissions(server, attr, BT_ATT_PERM_WRITE_MASK);
+   if (ecode)
+   goto error;
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163877): 
https://lists.openembedded.org/g/openembedded-core/message/163877
Mute This Topic: https://lists.openembedded.org/mt/90168805/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 00/17] Pull request (cover letter only)

2022-03-31 Thread Steve Sakoman
Note: this also includes the patches from my previous pull request on Tuesday

The following changes since commit 71015408c60ddf2e9af00cc8574815971e1b689d:

  oeqa/selftest/tinfoil: Improve tinfoil event test debugging (2022-03-21 
04:17:02 -1000)

are available in the Git repository at:

  git://git.openembedded.org/openembedded-core-contrib stable/dunfell-next
  
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=stable/dunfell-next

Davide Gardenal (3):
  qemu: backport patch fix for CVE-2020-13791
  apt: backport patch fix for CVE-2020-3810
  ghostscript: backport patch fix for CVE-2021-3781

Minjae Kim (2):
  gnu-config: update SRC_URI
  virglrenderer: update SRC_URI

Ralph Siemsen (1):
  libxml2: fix CVE-2022-23308 regression

Richard Purdie (1):
  oeqa/selftest/tinfoil: Fix intermittent event loss issue in test

Ross Burton (1):
  python3: ignore CVE-2022-26488

Steve Sakoman (9):
  libsolv: fix CVE: CVE-2021-44568-71 and CVE-2021-44573-77
  ghostscript: fix CVE-2020-15900 and CVE-2021-45949 for -native
  util-linux: fix CVE-2022-0563
  xserver-xorg: update to 1.20.9
  xserver-xorg: update to 1.20.10
  xserver-xorg: update to 1.20.11
  xserver-xorg: update to 1.20.12
  xserver-xorg: update to 1.20.13
  xserver-xorg: update to 1.20.14

 meta/lib/oeqa/selftest/cases/tinfoil.py   |   2 +-
 .../CVE-2022-23308-fix-regression.patch   |  98 
 meta/recipes-core/libxml/libxml2_2.9.10.bb|   1 +
 .../util-linux/util-linux/CVE-2022-0563.patch | 161 
 .../util-linux/util-linux_2.35.1.bb   |   1 +
 meta/recipes-devtools/apt/apt.inc |   1 +
 .../apt/apt/CVE-2020-3810.patch   | 174 +
 .../gnu-config/gnu-config_git.bb  |   2 +-
 .../recipes-devtools/python/python3_3.8.13.bb |   2 +-
 meta/recipes-devtools/qemu/qemu.inc   |   1 +
 .../qemu/qemu/CVE-2020-13791.patch|  44 
 .../ghostscript/CVE-2021-3781_1.patch | 121 +
 .../ghostscript/CVE-2021-3781_2.patch |  37 +++
 .../ghostscript/CVE-2021-3781_3.patch | 238 ++
 .../ghostscript/ghostscript_9.52.bb   |   9 +-
 .../libsolv/files/CVE-2021-3200.patch |  10 +
 .../virglrenderer/virglrenderer_0.8.2.bb  |   2 +-
 .../xorg-xserver/xserver-xorg.inc |   2 +-
 .../xserver-xorg/CVE-2020-14345.patch | 182 --
 .../xserver-xorg/CVE-2020-14346.patch |  36 ---
 .../xserver-xorg/CVE-2020-14347.patch |  38 ---
 .../xserver-xorg/CVE-2020-14360.patch | 132 --
 .../xserver-xorg/CVE-2020-14361.patch |  36 ---
 .../xserver-xorg/CVE-2020-14362.patch |  70 --
 .../xserver-xorg/CVE-2020-25712.patch | 102 
 ...xorg_1.20.8.bb => xserver-xorg_1.20.14.bb} |  11 +-
 26 files changed, 900 insertions(+), 613 deletions(-)
 create mode 100644 
meta/recipes-core/libxml/libxml2/CVE-2022-23308-fix-regression.patch
 create mode 100644 meta/recipes-core/util-linux/util-linux/CVE-2022-0563.patch
 create mode 100644 meta/recipes-devtools/apt/apt/CVE-2020-3810.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-13791.patch
 create mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2021-3781_1.patch
 create mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2021-3781_2.patch
 create mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2021-3781_3.patch
 delete mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2020-14345.patch
 delete mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2020-14346.patch
 delete mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2020-14347.patch
 delete mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2020-14360.patch
 delete mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2020-14361.patch
 delete mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2020-14362.patch
 delete mode 100644 
meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2020-25712.patch
 rename meta/recipes-graphics/xorg-xserver/{xserver-xorg_1.20.8.bb => 
xserver-xorg_1.20.14.bb} (73%)

-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163876): 
https://lists.openembedded.org/g/openembedded-core/message/163876
Mute This Topic: https://lists.openembedded.org/mt/90168178/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] meson: Robustify compiler detection logic

2022-03-31 Thread Khem Raj
meson would fail to detect compiler type in some rare care where
specific substring '-xt' is detected in compiler --version output and
it so happens that this string can be generated by clang --version if
clang is installed into a directory containing 'xt-' in its name. with
recipe specific sysroots, this is quite likely to happen in OE build
system as we are seeing the issue with newly proposed gnome-text-editor
recipe

https://lists.openembedded.org/g/openembedded-devel/topic/90150031#96301

Signed-off-by: Khem Raj 
---
 ...for-clang-before-guessing-gcc-or-lcc.patch | 56 +++
 meta/recipes-devtools/meson/meson_0.61.3.bb   |  1 +
 2 files changed, 57 insertions(+)
 create mode 100644 
meta/recipes-devtools/meson/meson/0001-Check-for-clang-before-guessing-gcc-or-lcc.patch

diff --git 
a/meta/recipes-devtools/meson/meson/0001-Check-for-clang-before-guessing-gcc-or-lcc.patch
 
b/meta/recipes-devtools/meson/meson/0001-Check-for-clang-before-guessing-gcc-or-lcc.patch
new file mode 100644
index 000..58fa1194398
--- /dev/null
+++ 
b/meta/recipes-devtools/meson/meson/0001-Check-for-clang-before-guessing-gcc-or-lcc.patch
@@ -0,0 +1,56 @@
+From 8739e1c3bef653415ad4b9b9c318ccfa76c43da6 Mon Sep 17 00:00:00 2001
+From: Khem Raj 
+Date: Thu, 31 Mar 2022 15:00:24 -0700
+Subject: [PATCH] Check for clang before guessing gcc or lcc
+
+clang --version can yield a string like below when its installed into
+such a directory
+
+clang version 14.0.0 (https://github.com/llvm/llvm-project 
3f43d803382d57e3fc010ca19833077d1023e9c9)
+Target: aarch64-yoe-linux
+Thread model: posix
+InstalledDir: 
/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux/gnome-text-editor/42.0-r0/recipe-sysroot-native/usr/bin/aarch64-yoe-linux
+
+as you can see InstallDir has 'xt-' subtring and this trips the check to
+guess gcc
+
+if 'Free Software Foundation' in out or 'xt-' in out:
+
+Therefore, check if compiler is clang then there is no point of running
+this check anyway.
+
+Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/10218]
+Signed-off-by: Khem Raj 
+---
+ mesonbuild/compilers/detect.py | 15 ---
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py
+index 53948b01a..ba335cf39 100644
+--- a/mesonbuild/compilers/detect.py
 b/mesonbuild/compilers/detect.py
+@@ -427,13 +427,14 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: 
str, for_machine: Machin
+ version = search_version(out)
+ 
+ guess_gcc_or_lcc: T.Optional[str] = None
+-if 'Free Software Foundation' in out or 'xt-' in out:
+-guess_gcc_or_lcc = 'gcc'
+-if 'e2k' in out and 'lcc' in out:
+-guess_gcc_or_lcc = 'lcc'
+-if 'Microchip Technology' in out:
+-# this output has "Free Software Foundation" in its version
+-guess_gcc_or_lcc = None
++if not 'clang' in compiler_name:
++if 'Free Software Foundation' in out or 'xt-' in out:
++guess_gcc_or_lcc = 'gcc'
++if 'e2k' in out and 'lcc' in out:
++guess_gcc_or_lcc = 'lcc'
++if 'Microchip Technology' in out:
++# this output has "Free Software Foundation" in its version
++guess_gcc_or_lcc = None
+ 
+ if guess_gcc_or_lcc:
+ defines = _get_gnu_compiler_defines(compiler)
+-- 
+2.35.1
+
diff --git a/meta/recipes-devtools/meson/meson_0.61.3.bb 
b/meta/recipes-devtools/meson/meson_0.61.3.bb
index 92f99a902d9..1c21493f823 100644
--- a/meta/recipes-devtools/meson/meson_0.61.3.bb
+++ b/meta/recipes-devtools/meson/meson_0.61.3.bb
@@ -15,6 +15,7 @@ SRC_URI = 
"https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
file://0001-Make-CPU-family-warnings-fatal.patch \
file://0002-Support-building-allarch-recipes-again.patch \
file://0001-is_debianlike-always-return-False.patch \
+   file://0001-Check-for-clang-before-guessing-gcc-or-lcc.patch \
"
 SRC_URI[sha256sum] = 
"9c884434469471f3fe0cbbceb9b9ea0c8047f19e792940e1df6595741aae251b"
 
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163875): 
https://lists.openembedded.org/g/openembedded-core/message/163875
Mute This Topic: https://lists.openembedded.org/mt/90166169/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 3/3] depmodwrapper: Use nonarch_base_libdir for depmod.d

2022-03-31 Thread Saul Wold
This ensure that when depmod-native runs we can find the correct
exclude.conf information, in this case adding .debug to ignore
the .debug kernell modules. The kmod utilities like depmod can use
either /etc/depmod.d or /lib/depmod.d. The kmod recipe is installing
the existing search.conf to /lib/depmod.d (nonarch_base_lib)

When the busybox modutils are used, /lib/depmod.d is not used, so
it's safe add the exclude.conf file to /lib/depmod.d.

Signed-off-by: Saul Wold 
---
 meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb 
b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index 04fc14a6d21..65068f02df8 100644
--- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -30,11 +30,16 @@ if [ -r "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" ]; 
then
 kernelabi=\$(cat "${PKGDATA_DIR}/kernel-depmod/kernel-abiversion")
 fi
 
+if [ ! -e "\3${nonarch_base_libdir}/depmod.d/exclude.conf" ]; then
+mkdir -p "\$3${nonarch_base_libdir}/depmod.d"
+echo "exclude .debug" > "\$3${nonarch_base_libdir}/depmod.d/exclude.conf"
+fi
+
 if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ] || [ "\$kernelabi" != 
"\$4" ]; then
 echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2
-exec env depmod -C "\$3${sysconfdir}/depmod.d" "\$1" "\$2" "\$3" "\$4"
+exec env depmod -C "\$3${nonarch_base_libdir}/depmod.d" "\$1" "\$2" "\$3" 
"\$4"
 else
-exec env depmod -C "\$3${sysconfdir}/depmod.d" "\$1" "\$2" "\$3" -F 
"${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
+exec env depmod -C "\$3${nonarch_base_libdir}/depmod.d" "\$1" "\$2" "\$3" 
-F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
 fi
 EOF
chmod +x ${D}${bindir_crossscripts}/depmodwrapper
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163874): 
https://lists.openembedded.org/g/openembedded-core/message/163874
Mute This Topic: https://lists.openembedded.org/mt/90166048/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 2/3] kmod: Add an exclude directive to depmod

2022-03-31 Thread Saul Wold
This adds a new configuration directive to depmod that causes
depmod to exclude a give path entry like .debug.

kernel-dbg provides the modules .debug/.ko files and
when installed either directly or when dbg-pkgs are selected
this can cause depmod to fail.

Signed-off-by: Saul Wold 
---
v2: Updated patch based on upstream comments

 ...dd-support-for-excluding-a-directory.patch | 169 ++
 meta/recipes-kernel/kmod/kmod_29.bb   |   4 +
 2 files changed, 173 insertions(+)
 create mode 100644 
meta/recipes-kernel/kmod/kmod/0001-depmod-Add-support-for-excluding-a-directory.patch

diff --git 
a/meta/recipes-kernel/kmod/kmod/0001-depmod-Add-support-for-excluding-a-directory.patch
 
b/meta/recipes-kernel/kmod/kmod/0001-depmod-Add-support-for-excluding-a-directory.patch
new file mode 100644
index 000..18d97935331
--- /dev/null
+++ 
b/meta/recipes-kernel/kmod/kmod/0001-depmod-Add-support-for-excluding-a-directory.patch
@@ -0,0 +1,169 @@
+From 01f3fe68a7a42b06eb318f3b09fa5e5ea75d46c4 Mon Sep 17 00:00:00 2001
+From: Saul Wold 
+Date: Tue, 22 Mar 2022 12:11:45 -0700
+Subject: [PATCH] depmod: Add support for excluding a directory
+
+This adds support to depmod to enable a new exclude directive in
+the depmod.d/*.conf configuration file. Currently depmod
+already excludes directories named source or build. This change
+will allow additional directories like .debug to be excluded also
+via a new exclude directive.
+
+depmod.d/exclude.conf example:
+exclude.debug
+
+Upstream-Status: Submitted
+
+Signed-off-by: Saul Wold 
+---
+ man/depmod.d.xml | 14 +++
+ tools/depmod.c   | 65 +---
+ 2 files changed, 75 insertions(+), 4 deletions(-)
+
+diff --git a/man/depmod.d.xml b/man/depmod.d.xml
+index b315e93..76548e9 100644
+--- a/man/depmod.d.xml
 b/man/depmod.d.xml
+@@ -131,6 +131,20 @@
+   
+ 
+   
++  
++exclude excludedir
++
++
++  
++This specifies the trailing directories that will be excluded
++during the search for kernel modules.
++  
++  
++  The excludedir is the trailing directory
++  to exclude
++  
++
++  
+ 
+   
+ 
+diff --git a/tools/depmod.c b/tools/depmod.c
+index eb810b8..ac365e9 100644
+--- a/tools/depmod.c
 b/tools/depmod.c
+@@ -458,6 +458,11 @@ struct cfg_external {
+   char path[];
+ };
+ 
++struct cfg_exclude {
++  struct cfg_exclude *next;
++  char exclude_dir[];
++};
++
+ struct cfg {
+   const char *kversion;
+   char dirname[PATH_MAX];
+@@ -469,6 +474,7 @@ struct cfg {
+   struct cfg_override *overrides;
+   struct cfg_search *searches;
+   struct cfg_external *externals;
++  struct cfg_exclude *excludes;
+ };
+ 
+ static enum search_type cfg_define_search_type(const char *path)
+@@ -580,6 +586,30 @@ static void cfg_external_free(struct cfg_external *ext)
+   free(ext);
+ }
+ 
++static int cfg_exclude_add(struct cfg *cfg, const char *path)
++{
++  struct cfg_exclude *exc;
++  size_t len = strlen(path);
++
++  exc = malloc(sizeof(struct cfg_exclude) + len + 1);
++  if (exc == NULL) {
++  ERR("exclude add: out of memory\n");
++  return -ENOMEM;
++  }
++  memcpy(exc->exclude_dir, path, len + 1);
++
++  DBG("exclude add: %s\n", path);
++
++  exc->next = cfg->excludes;
++  cfg->excludes = exc;
++  return 0;
++}
++
++static void cfg_exclude_free(struct cfg_exclude *exc)
++{
++  free(exc);
++}
++
+ static int cfg_kernel_matches(const struct cfg *cfg, const char *pattern)
+ {
+   regex_t re;
+@@ -657,6 +687,11 @@ static int cfg_file_parse(struct cfg *cfg, const char 
*filename)
+   }
+ 
+   cfg_external_add(cfg, dir);
++  } else if (streq(cmd, "exclude")) {
++  const char *sp;
++  while ((sp = strtok_r(NULL, "\t ", )) != NULL) {
++  cfg_exclude_add(cfg, sp);
++  }
+   } else if (streq(cmd, "include")
+   || streq(cmd, "make_map_files")) {
+   INF("%s:%u: command %s not implemented yet\n",
+@@ -857,6 +892,12 @@ static void cfg_free(struct cfg *cfg)
+   cfg->externals = cfg->externals->next;
+   cfg_external_free(tmp);
+   }
++
++  while (cfg->excludes) {
++  struct cfg_exclude *tmp = cfg->excludes;
++  cfg->excludes = cfg->excludes->next;
++  cfg_exclude_free(tmp);
++  }
+ }
+ 
+ 
+@@ -1229,6 +1270,24 @@ add:
+   return 0;
+ }
+ 
++static int should_exclude_dir(struct cfg *cfg, char *name)
++{
++  struct cfg_exclude *exc;
++
++  if (name[0] == '.' && (name[1] == '\0' ||
++  (name[1] == '.' && name[2] == '\0')))
++  return 1;
++  if (streq(name, "build") || 

[OE-core] [PATCH v2 1/3] busybox: Exclude .debug from depmod

2022-03-31 Thread Saul Wold
As with the kmod version of depmod, exclude .debug from being
searched. Since busybox does not use the depmod.d and any 
configuration file option is ignored we just hardcode it.

Signed-off-by: Saul Wold 
---
 ...001-depmod-Ignore-.debug-directories.patch | 32 +++
 meta/recipes-core/busybox/busybox_1.35.0.bb   |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 
meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch

diff --git 
a/meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch 
b/meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch
new file mode 100644
index 000..354f83a4a5f
--- /dev/null
+++ 
b/meta/recipes-core/busybox/busybox/0001-depmod-Ignore-.debug-directories.patch
@@ -0,0 +1,32 @@
+From 5f6ed003f10ee0bd4a508d5f59129a29f0920dfc Mon Sep 17 00:00:00 2001
+From: Saul Wold 
+Date: Thu, 31 Mar 2022 11:21:45 -0700
+Subject: [PATCH] depmod: Ignore .debug directories
+
+The .debug/.ko files do not have the correct symbol information
+since it's split away from the actual .ko file. Just ignore it.
+
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold 
+---
+ modutils/depmod.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/modutils/depmod.c b/modutils/depmod.c
+index bb42bbe..aa5a2de 100644
+--- a/modutils/depmod.c
 b/modutils/depmod.c
+@@ -43,6 +43,9 @@ static int FAST_FUNC parse_module(struct recursive_state 
*state,
+   /* Arbitrary. Was sb->st_size, but that breaks .gz etc */
+   size_t len = (64*1024*1024 - 4096);
+ 
++  if (strstr(fname, ".debug") == NULL)
++  return TRUE;
++
+   if (strrstr(fname, ".ko") == NULL)
+   return TRUE;
+ 
+-- 
+2.31.1
+
diff --git a/meta/recipes-core/busybox/busybox_1.35.0.bb 
b/meta/recipes-core/busybox/busybox_1.35.0.bb
index 7ce17170462..ab11f3d89a8 100644
--- a/meta/recipes-core/busybox/busybox_1.35.0.bb
+++ b/meta/recipes-core/busybox/busybox_1.35.0.bb
@@ -1,6 +1,7 @@
 require busybox.inc
 
 SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
+   file://0001-depmod-Ignore-.debug-directories.patch \
file://busybox-udhcpc-no_deconfig.patch \
file://find-touchscreen.sh \
file://busybox-cron \
-- 
2.31.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163873): 
https://lists.openembedded.org/g/openembedded-core/message/163873
Mute This Topic: https://lists.openembedded.org/mt/90166047/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: update to 3.10.4

2022-03-31 Thread Oleksandr Kravchuk
Signed-off-by: Oleksandr Kravchuk 
---
 .../python/{python3_3.10.3.bb => python3_3.10.4.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3_3.10.3.bb => python3_3.10.4.bb} 
(99%)

diff --git a/meta/recipes-devtools/python/python3_3.10.3.bb 
b/meta/recipes-devtools/python/python3_3.10.4.bb
similarity index 99%
rename from meta/recipes-devtools/python/python3_3.10.3.bb
rename to meta/recipes-devtools/python/python3_3.10.4.bb
index 5c0f0a9eb2..522f0d71ee 100644
--- a/meta/recipes-devtools/python/python3_3.10.3.bb
+++ b/meta/recipes-devtools/python/python3_3.10.4.bb
@@ -40,7 +40,7 @@ SRC_URI:append:class-native = " \
file://12-distutils-prefix-is-inside-staging-area.patch \
file://0001-Don-t-search-system-for-headers-libraries.patch \
"
-SRC_URI[sha256sum] = 
"596c72de998dc39205bc4f70ef0dbf7edec740a306d09b49a9bd0a77806730dc"
+SRC_URI[sha256sum] = 
"80bf925f571da436b35210886cf79f6eb5fa5d6c571316b73568343451f77a19"
 
 # exclude pre-releases for both python 2.x and 3.x
 UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P\d+(\.\d+)+).tar"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163871): 
https://lists.openembedded.org/g/openembedded-core/message/163871
Mute This Topic: https://lists.openembedded.org/mt/90165639/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] bluez5: fix CVE-2022-0204

2022-03-31 Thread Steve Sakoman
On Thu, Mar 31, 2022 at 10:32 AM Ralph Siemsen  wrote:
>
> Yep, I must have fumbled it before sending it out.
> Please ignore this one, I'll do a v2 later.
>
> Any comments on the usefulness/format of the "Status in other
> branches" would be appreciated.

I approve of the location and format.  And it is useful too :-)

Steve

>
> Ralph
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163870): 
https://lists.openembedded.org/g/openembedded-core/message/163870
Mute This Topic: https://lists.openembedded.org/mt/90162847/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] bluez5: fix CVE-2022-0204

2022-03-31 Thread Ralph Siemsen
Yep, I must have fumbled it before sending it out.
Please ignore this one, I'll do a v2 later.

Any comments on the usefulness/format of the "Status in other
branches" would be appreciated.

Ralph

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163869): 
https://lists.openembedded.org/g/openembedded-core/message/163869
Mute This Topic: https://lists.openembedded.org/mt/90162847/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] bluez5: fix CVE-2022-0204

2022-03-31 Thread Khem Raj
On Thu, Mar 31, 2022 at 12:38 PM Ralph Siemsen  wrote:
>
> Fix heap overflow when appending prepare writes
>
> The code shall check if the prepare writes would append more the
> allowed maximum attribute length.
>
> Upstream-Status: Backport 
> [https://github.com/bluez/bluez/commit/591c546c536b42bef696d027f64aa22434f8c3f0]
> CVE: CVE-2022-0204
>
> Signed-off-by: Ralph Siemsen 
> ---
> Status on other branches:
> - master/kirkstone 5.64 includes the fix
> - honister 5.61 needs patch
> - hardknott5.56 needs patch
>
> meta/recipes-connectivity/bluez5/bluez5.inc   |  1 +
> .../bluez5/bluez5/CVE-2022-0204.patch | 66 +++
> 2 files changed, 67 insertions(+)
> create mode 100644 meta/recipes-connectivity/bluez5/bluez5/CVE-2022-0204.patch
>
> diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc 
> b/meta/recipes-connectivity/bluez5/bluez5.inc
> index 7cf061dcf6..4d4348898a 100644
> --- a/meta/recipes-connectivity/bluez5/bluez5.inc
> +++ b/meta/recipes-connectivity/bluez5/bluez5.inc
> @@ -55,6 +55,7 @@ SRC_URI = 
> "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
> file://CVE-2021-0129.patch \
> file://CVE-2021-3588.patch \
>file://CVE-2021-3658.patch \
> +   file://CVE-2022-0204.patch \

seems to have tabs vs spaces problem.

> "
> S = "${WORKDIR}/bluez-${PV}"
>
> diff --git a/meta/recipes-connectivity/bluez5/bluez5/CVE-2022-0204.patch 
> b/meta/recipes-connectivity/bluez5/bluez5/CVE-2022-0204.patch
> new file mode 100644
> index 00..646b5ddfc8
> --- /dev/null
> +++ b/meta/recipes-connectivity/bluez5/bluez5/CVE-2022-0204.patch
> @@ -0,0 +1,66 @@
> +From 0d328fdf6564b67fc2ec3533e3da201ebabcc9e3 Mon Sep 17 00:00:00 2001
> +From: Luiz Augusto von Dentz 
> +Date: Tue, 8 Jun 2021 16:46:49 -0700
> +Subject: [PATCH] shared/gatt-server: Fix heap overflow when appending prepare
> + writes
> +
> +The code shall check if the prepare writes would append more the
> +allowed maximum attribute length.
> +
> +Fixes https://github.com/bluez/bluez/security/advisories/GHSA-479m-xcq5-9g2q
> +
> +Upstream-Status: Backport 
> [https://github.com/bluez/bluez/commit/591c546c536b42bef696d027f64aa22434f8c3f0]
> +Signed-off-by: Ralph Siemsen 
> +CVE: CVE-2022-0204
> +
> +---
> + src/shared/gatt-server.c | 22 ++
> + 1 file changed, 22 insertions(+)
> +
> +diff --git a/src/shared/gatt-server.c b/src/shared/gatt-server.c
> +index 0c25a97..20e14bc 100644
> +--- a/src/shared/gatt-server.c
>  b/src/shared/gatt-server.c
> +@@ -816,6 +816,20 @@ static uint8_t authorize_req(struct bt_gatt_server 
> *server,
> +   server->authorize_data);
> + }
> +
> ++static uint8_t check_length(uint16_t length, uint16_t offset)
> ++{
> ++  if (length > BT_ATT_MAX_VALUE_LEN)
> ++  return BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN;
> ++
> ++  if (offset > BT_ATT_MAX_VALUE_LEN)
> ++  return BT_ATT_ERROR_INVALID_OFFSET;
> ++
> ++  if (length + offset > BT_ATT_MAX_VALUE_LEN)
> ++  return BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN;
> ++
> ++  return 0;
> ++}
> ++
> + static void write_cb(struct bt_att_chan *chan, uint8_t opcode, const void 
> *pdu,
> +   uint16_t length, void *user_data)
> + {
> +@@ -846,6 +860,10 @@ static void write_cb(struct bt_att_chan *chan, uint8_t 
> opcode, const void *pdu,
> +   (opcode == BT_ATT_OP_WRITE_REQ) ? "Req" : 
> "Cmd",
> +   handle);
> +
> ++  ecode = check_length(length, 0);
> ++  if (ecode)
> ++  goto error;
> ++
> +   ecode = check_permissions(server, attr, BT_ATT_PERM_WRITE_MASK);
> +   if (ecode)
> +   goto error;
> +@@ -1353,6 +1371,10 @@ static void prep_write_cb(struct bt_att_chan *chan, 
> uint8_t opcode,
> +   util_debug(server->debug_callback, server->debug_data,
> +   "Prep Write Req - handle: 0x%04x", handle);
> +
> ++  ecode = check_length(length, offset);
> ++  if (ecode)
> ++  goto error;
> ++
> +   ecode = check_permissions(server, attr, BT_ATT_PERM_WRITE_MASK);
> +   if (ecode)
> +   goto error;
> --
> 2.25.1
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163868): 
https://lists.openembedded.org/g/openembedded-core/message/163868
Mute This Topic: https://lists.openembedded.org/mt/90162847/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] bluez5: fix CVE-2022-0204

2022-03-31 Thread Ralph Siemsen
Fix heap overflow when appending prepare writes

The code shall check if the prepare writes would append more the
allowed maximum attribute length.

Upstream-Status: Backport 
[https://github.com/bluez/bluez/commit/591c546c536b42bef696d027f64aa22434f8c3f0]
CVE: CVE-2022-0204

Signed-off-by: Ralph Siemsen 
---
Status on other branches:
- master/kirkstone 5.64 includes the fix
- honister 5.61 needs patch
- hardknott5.56 needs patch

meta/recipes-connectivity/bluez5/bluez5.inc   |  1 +
.../bluez5/bluez5/CVE-2022-0204.patch | 66 +++
2 files changed, 67 insertions(+)
create mode 100644 meta/recipes-connectivity/bluez5/bluez5/CVE-2022-0204.patch

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc 
b/meta/recipes-connectivity/bluez5/bluez5.inc
index 7cf061dcf6..4d4348898a 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -55,6 +55,7 @@ SRC_URI = 
"${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
file://CVE-2021-0129.patch \
file://CVE-2021-3588.patch \
   file://CVE-2021-3658.patch \
+   file://CVE-2022-0204.patch \
"
S = "${WORKDIR}/bluez-${PV}"

diff --git a/meta/recipes-connectivity/bluez5/bluez5/CVE-2022-0204.patch 
b/meta/recipes-connectivity/bluez5/bluez5/CVE-2022-0204.patch
new file mode 100644
index 00..646b5ddfc8
--- /dev/null
+++ b/meta/recipes-connectivity/bluez5/bluez5/CVE-2022-0204.patch
@@ -0,0 +1,66 @@
+From 0d328fdf6564b67fc2ec3533e3da201ebabcc9e3 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz 
+Date: Tue, 8 Jun 2021 16:46:49 -0700
+Subject: [PATCH] shared/gatt-server: Fix heap overflow when appending prepare
+ writes
+
+The code shall check if the prepare writes would append more the
+allowed maximum attribute length.
+
+Fixes https://github.com/bluez/bluez/security/advisories/GHSA-479m-xcq5-9g2q
+
+Upstream-Status: Backport 
[https://github.com/bluez/bluez/commit/591c546c536b42bef696d027f64aa22434f8c3f0]
+Signed-off-by: Ralph Siemsen 
+CVE: CVE-2022-0204
+
+---
+ src/shared/gatt-server.c | 22 ++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/src/shared/gatt-server.c b/src/shared/gatt-server.c
+index 0c25a97..20e14bc 100644
+--- a/src/shared/gatt-server.c
 b/src/shared/gatt-server.c
+@@ -816,6 +816,20 @@ static uint8_t authorize_req(struct bt_gatt_server 
*server,
+   server->authorize_data);
+ }
+ 
++static uint8_t check_length(uint16_t length, uint16_t offset)
++{
++  if (length > BT_ATT_MAX_VALUE_LEN)
++  return BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN;
++
++  if (offset > BT_ATT_MAX_VALUE_LEN)
++  return BT_ATT_ERROR_INVALID_OFFSET;
++
++  if (length + offset > BT_ATT_MAX_VALUE_LEN)
++  return BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN;
++
++  return 0;
++}
++
+ static void write_cb(struct bt_att_chan *chan, uint8_t opcode, const void 
*pdu,
+   uint16_t length, void *user_data)
+ {
+@@ -846,6 +860,10 @@ static void write_cb(struct bt_att_chan *chan, uint8_t 
opcode, const void *pdu,
+   (opcode == BT_ATT_OP_WRITE_REQ) ? "Req" : "Cmd",
+   handle);
+ 
++  ecode = check_length(length, 0);
++  if (ecode)
++  goto error;
++
+   ecode = check_permissions(server, attr, BT_ATT_PERM_WRITE_MASK);
+   if (ecode)
+   goto error;
+@@ -1353,6 +1371,10 @@ static void prep_write_cb(struct bt_att_chan *chan, 
uint8_t opcode,
+   util_debug(server->debug_callback, server->debug_data,
+   "Prep Write Req - handle: 0x%04x", handle);
+ 
++  ecode = check_length(length, offset);
++  if (ecode)
++  goto error;
++
+   ecode = check_permissions(server, attr, BT_ATT_PERM_WRITE_MASK);
+   if (ecode)
+   goto error;
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163867): 
https://lists.openembedded.org/g/openembedded-core/message/163867
Mute This Topic: https://lists.openembedded.org/mt/90162847/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/1] unzip: fix CVE-2021-4217

2022-03-31 Thread Alexander Kanavin
The origin of the patch needs to be better explained, right now it
seems like a random thing off the internet. Upstream-Status is
certainly not inappropriate, as it is a security fix.

Alex

On Thu, 31 Mar 2022 at 20:42, Joe Slater  wrote:
>
> Avoid a null pointer dereference.
>
> Signed-off-by: Joe Slater 
> ---
>  .../unzip/unzip/CVE-2021-4217.patch   | 65 +++
>  meta/recipes-extended/unzip/unzip_6.0.bb  |  1 +
>  2 files changed, 66 insertions(+)
>  create mode 100644 meta/recipes-extended/unzip/unzip/CVE-2021-4217.patch
>
> diff --git a/meta/recipes-extended/unzip/unzip/CVE-2021-4217.patch 
> b/meta/recipes-extended/unzip/unzip/CVE-2021-4217.patch
> new file mode 100644
> index 00..7262d14df4
> --- /dev/null
> +++ b/meta/recipes-extended/unzip/unzip/CVE-2021-4217.patch
> @@ -0,0 +1,65 @@
> +From 731d698377dbd1f5b1b90efeb8094602ed59fc40 Mon Sep 17 00:00:00 2001
> +From: Nils Bars 
> +Date: Mon, 17 Jan 2022 16:53:16 +
> +Subject: [PATCH] Fix null pointer dereference and use of uninitialized data
> +
> +This fixes a bug that causes use of uninitialized heap data if `readbuf` 
> fails
> +to read as many bytes as indicated by the extra field length attribute.
> +Furthermore, this fixes a null pointer dereference if an archive contains an
> +`EF_UNIPATH` extra field but does not have a filename set.
> +---
> + fileio.c  | 5 -
> + process.c | 6 +-
> + 2 files changed, 9 insertions(+), 2 deletions(-)
> +---
> +
> +https://launchpadlibrarian.net/580782282/0001-Fix-null-pointer-dereference-and-use-of-uninitialized-data.patch
> +Regenerated to apply without offsets.
> +
> +CVE: CVE-2021-4217
> +
> +Upstream-Status: Inappropriate [not author]
> +
> +Signed-off-by: Joe Slater 
> +
> +
> +diff --git a/fileio.c b/fileio.c
> +index 14460f3..1dc319e 100644
> +--- a/fileio.c
>  b/fileio.c
> +@@ -2301,8 +2301,11 @@ int do_string(__G__ length, option)   /* return 
> PK-type error code */
> + seek_zipf(__G__ G.cur_zipfile_bufstart - G.extra_bytes +
> +   (G.inptr-G.inbuf) + length);
> + } else {
> +-if (readbuf(__G__ (char *)G.extra_field, length) == 0)
> ++unsigned bytes_read = readbuf(__G__ (char *)G.extra_field, 
> length);
> ++if (bytes_read == 0)
> + return PK_EOF;
> ++if (bytes_read != length)
> ++return PK_ERR;
> + /* Looks like here is where extra fields are read */
> + if (getZip64Data(__G__ G.extra_field, length) != PK_COOL)
> + {
> +diff --git a/process.c b/process.c
> +index 5f8f6c6..de843a5 100644
> +--- a/process.c
>  b/process.c
> +@@ -2058,10 +2058,14 @@ int getUnicodeData(__G__ ef_buf, ef_len)
> +   G.unipath_checksum = makelong(offset + ef_buf);
> +   offset += 4;
> +
> ++  if (!G.filename_full) {
> ++/* Check if we have a unicode extra section but no filename set 
> */
> ++return PK_ERR;
> ++  }
> ++
> +   /*
> +* Compute 32-bit crc
> +*/
> +-
> +   chksum = crc32(chksum, (uch *)(G.filename_full),
> +  strlen(G.filename_full));
> +
> +--
> +2.32.0
> +
> diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb 
> b/meta/recipes-extended/unzip/unzip_6.0.bb
> index af94a39195..c222a684b4 100644
> --- a/meta/recipes-extended/unzip/unzip_6.0.bb
> +++ b/meta/recipes-extended/unzip/unzip_6.0.bb
> @@ -28,6 +28,7 @@ SRC_URI = 
> "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/
> file://CVE-2019-13232_p3.patch \
> file://unzip_optimization.patch \
>  file://0001-configure-Pass-LDFLAGS-to-tests-doing-link-step.patch \
> +file://CVE-2021-4217.patch \
>  "
>  UPSTREAM_VERSION_UNKNOWN = "1"
>
> --
> 2.35.1
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163866): 
https://lists.openembedded.org/g/openembedded-core/message/163866
Mute This Topic: https://lists.openembedded.org/mt/90161682/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] unzip: fix CVE-2021-4217

2022-03-31 Thread Joe Slater
Avoid a null pointer dereference.

Signed-off-by: Joe Slater 
---
 .../unzip/unzip/CVE-2021-4217.patch   | 65 +++
 meta/recipes-extended/unzip/unzip_6.0.bb  |  1 +
 2 files changed, 66 insertions(+)
 create mode 100644 meta/recipes-extended/unzip/unzip/CVE-2021-4217.patch

diff --git a/meta/recipes-extended/unzip/unzip/CVE-2021-4217.patch 
b/meta/recipes-extended/unzip/unzip/CVE-2021-4217.patch
new file mode 100644
index 00..7262d14df4
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/CVE-2021-4217.patch
@@ -0,0 +1,65 @@
+From 731d698377dbd1f5b1b90efeb8094602ed59fc40 Mon Sep 17 00:00:00 2001
+From: Nils Bars 
+Date: Mon, 17 Jan 2022 16:53:16 +
+Subject: [PATCH] Fix null pointer dereference and use of uninitialized data
+
+This fixes a bug that causes use of uninitialized heap data if `readbuf` fails
+to read as many bytes as indicated by the extra field length attribute.
+Furthermore, this fixes a null pointer dereference if an archive contains an
+`EF_UNIPATH` extra field but does not have a filename set.
+---
+ fileio.c  | 5 -
+ process.c | 6 +-
+ 2 files changed, 9 insertions(+), 2 deletions(-) 
+---
+
+https://launchpadlibrarian.net/580782282/0001-Fix-null-pointer-dereference-and-use-of-uninitialized-data.patch
+Regenerated to apply without offsets.
+
+CVE: CVE-2021-4217
+
+Upstream-Status: Inappropriate [not author]
+
+Signed-off-by: Joe Slater 
+
+
+diff --git a/fileio.c b/fileio.c
+index 14460f3..1dc319e 100644
+--- a/fileio.c
 b/fileio.c
+@@ -2301,8 +2301,11 @@ int do_string(__G__ length, option)   /* return PK-type 
error code */
+ seek_zipf(__G__ G.cur_zipfile_bufstart - G.extra_bytes +
+   (G.inptr-G.inbuf) + length);
+ } else {
+-if (readbuf(__G__ (char *)G.extra_field, length) == 0)
++unsigned bytes_read = readbuf(__G__ (char *)G.extra_field, 
length);
++if (bytes_read == 0)
+ return PK_EOF;
++if (bytes_read != length)
++return PK_ERR;
+ /* Looks like here is where extra fields are read */
+ if (getZip64Data(__G__ G.extra_field, length) != PK_COOL)
+ {
+diff --git a/process.c b/process.c
+index 5f8f6c6..de843a5 100644
+--- a/process.c
 b/process.c
+@@ -2058,10 +2058,14 @@ int getUnicodeData(__G__ ef_buf, ef_len)
+   G.unipath_checksum = makelong(offset + ef_buf);
+   offset += 4;
+ 
++  if (!G.filename_full) {
++/* Check if we have a unicode extra section but no filename set */
++return PK_ERR;
++  }
++
+   /*
+* Compute 32-bit crc
+*/
+-
+   chksum = crc32(chksum, (uch *)(G.filename_full),
+  strlen(G.filename_full));
+ 
+-- 
+2.32.0
+
diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb 
b/meta/recipes-extended/unzip/unzip_6.0.bb
index af94a39195..c222a684b4 100644
--- a/meta/recipes-extended/unzip/unzip_6.0.bb
+++ b/meta/recipes-extended/unzip/unzip_6.0.bb
@@ -28,6 +28,7 @@ SRC_URI = 
"${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/
file://CVE-2019-13232_p3.patch \
file://unzip_optimization.patch \
 file://0001-configure-Pass-LDFLAGS-to-tests-doing-link-step.patch \
+file://CVE-2021-4217.patch \
 "
 UPSTREAM_VERSION_UNKNOWN = "1"
 
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163865): 
https://lists.openembedded.org/g/openembedded-core/message/163865
Mute This Topic: https://lists.openembedded.org/mt/90161682/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 23/23] oeqa/selftest: generalise test_devtool_virtual_kernel_modify

2022-03-31 Thread Ross Burton
Generalise this test so that it works on more than qemux86-64:

- Don't edit a file in arch/x86 to cause a rebuild, instead use init/
- Look for the edits in the build tree, as the deployed kernel could be
  of any type (zImage/bzImage/etc) and edits may be in the compressed
  part.

Also remove redundant checks on the result of runCmd(), as this will
raise AssertionError exceptions itself so the explicit asserts will
never trigger.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/devtool.py | 38 +++--
 1 file changed, 17 insertions(+), 21 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index ba5dca0359e..3eea2b1a0ea 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -1875,8 +1875,9 @@ class DevtoolUpgradeTests(DevtoolBase):
  Expected:   devtool modify is able to checkout the source of the 
kernel
  and modification to the source and configurations are 
reflected
  when building the kernel.
- """
-kernel_provider = get_bb_var('PREFERRED_PROVIDER_virtual/kernel')
+"""
+kernel_provider = self.td['PREFERRED_PROVIDER_virtual/kernel']
+
 # Clean up the environment
 bitbake('%s -c clean' % kernel_provider)
 tempdir = tempfile.mkdtemp(prefix='devtoolqa')
@@ -1903,33 +1904,28 @@ class DevtoolUpgradeTests(DevtoolBase):
 self.assertExists(os.path.join(tempdir, 'Makefile'), 'Extracted source 
could not be found')
 #Step 4.2
 configfile = os.path.join(tempdir,'.config')
-diff = runCmd('diff %s %s' % (tmpconfig, configfile))
-self.assertEqual(0,diff.status,'Kernel .config file is not the same 
using bitbake and devtool')
+runCmd('diff %s %s' % (tmpconfig, configfile))
+
 #Step 4.3
 #NOTE: virtual/kernel is mapped to kernel_provider
-result = runCmd('devtool build %s' % kernel_provider)
-self.assertEqual(0,result.status,'Cannot build kernel using `devtool 
build`')
+runCmd('devtool build %s' % kernel_provider)
 kernelfile = os.path.join(get_bb_var('KBUILD_OUTPUT', 
kernel_provider), 'vmlinux')
 self.assertExists(kernelfile, 'Kernel was not build correctly')
 
 #Modify the kernel source
-modfile = os.path.join(tempdir,'arch/x86/boot/header.S')
-modstring = "Use a boot loader. Devtool testing."
-modapplied = runCmd("sed -i 's/Use a boot loader./%s/' %s" % 
(modstring, modfile))
-self.assertEqual(0,modapplied.status,'Modification to %s on kernel 
source failed' % modfile)
+modfile = os.path.join(tempdir, 'init/version.c')
+runCmd("sed -i 's/Linux/LiNuX/g' %s" % (modfile))
+
 #Modify the configuration
-codeconfigfile = os.path.join(tempdir,'.config.new')
+codeconfigfile = os.path.join(tempdir, '.config.new')
 modconfopt = "CONFIG_SG_POOL=n"
-modconf = runCmd("sed -i 's/CONFIG_SG_POOL=y/%s/' %s" % (modconfopt, 
codeconfigfile))
-self.assertEqual(0,modconf.status,'Modification to %s failed' % 
codeconfigfile)
+runCmd("sed -i 's/CONFIG_SG_POOL=y/%s/' %s" % (modconfopt, 
codeconfigfile))
+
 #Build again kernel with devtool
-rebuild = runCmd('devtool build %s' % kernel_provider)
-self.assertEqual(0,rebuild.status,'Fail to build kernel after 
modification of source and config')
+runCmd('devtool build %s' % kernel_provider)
+
 #Step 4.4
-bzimagename = 'bzImage-' + get_bb_var('KERNEL_VERSION_NAME', 
kernel_provider)
-bzimagefile = os.path.join(get_bb_var('D', kernel_provider),'boot', 
bzimagename)
-checkmodcode = runCmd("grep '%s' %s" % (modstring, bzimagefile))
-self.assertEqual(0,checkmodcode.status,'Modification on kernel source 
failed')
+runCmd("grep '%s' %s" % ('LiNuX', kernelfile))
+
 #Step 4.5
-checkmodconfg = runCmd("grep %s %s" % (modconfopt, codeconfigfile))
-self.assertEqual(0,checkmodconfg.status,'Modification to configuration 
file failed')
+runCmd("grep %s %s" % (modconfopt, codeconfigfile))
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163864): 
https://lists.openembedded.org/g/openembedded-core/message/163864
Mute This Topic: https://lists.openembedded.org/mt/90161363/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 22/23] oeqa/selftest/wic: use self.td instead of get_bb_var to save on bitbake calls

2022-03-31 Thread Ross Burton
When a test case starts, self.td is populated with all the variables in
the data store.  Typically this can be used instead of get_bb_var(),
which saves a bitbake call per variable lookup.

The only catch is that in parallel runs the build directory is moved
after td is populated, so paths in the build directory are wrong: these
still need to be fetched in the test.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/wic.py | 28 
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index 5bdd9ae87e3..de74c07a039 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -82,7 +82,7 @@ class WicTestCase(OESelftestTestCase):
 # clean up which can result in the native tools built earlier in
 # setUpClass being unavailable.
 if not WicTestCase.image_is_ready:
-if get_bb_var('USE_NLS') != 'yes':
+if self.td['USE_NLS'] != 'yes':
 self.skipTest('wic-tools needs USE_NLS=yes')
 
 bitbake('wic-tools core-image-minimal core-image-minimal-mtdutils')
@@ -98,9 +98,8 @@ class WicTestCase(OESelftestTestCase):
 """Generate and obtain the path to .env"""
 if image not in WicTestCase.wicenv_cache:
 bitbake('%s -c do_rootfs_wicenv' % image)
-bb_vars = get_bb_vars(['STAGING_DIR', 'MACHINE'], image)
-stdir = bb_vars['STAGING_DIR']
-machine = bb_vars['MACHINE']
+stdir = get_bb_var('STAGING_DIR', image)
+machine = self.td["MACHINE"]
 WicTestCase.wicenv_cache[image] = os.path.join(stdir, machine, 
'imgdata')
 return WicTestCase.wicenv_cache[image]
 
@@ -827,9 +826,8 @@ class Wic2(WicTestCase):
 bitbake('wic-image-minimal')
 self.remove_config(config)
 
-bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'MACHINE'])
-deploy_dir = bb_vars['DEPLOY_DIR_IMAGE']
-machine = bb_vars['MACHINE']
+deploy_dir = get_bb_var('DEPLOY_DIR_IMAGE')
+machine = self.td['MACHINE']
 prefix = os.path.join(deploy_dir, 'wic-image-minimal-%s.' % machine)
 # check if we have result image and manifests symlinks
 # pointing to existing files
@@ -1069,7 +1067,7 @@ class Wic2(WicTestCase):
 def _rawcopy_plugin(self, fstype):
 """Test rawcopy plugin"""
 img = 'core-image-minimal'
-machine = get_bb_var('MACHINE', img)
+machine = self.td["MACHINE"]
 params = ',unpack' if fstype.endswith('.gz') else ''
 with NamedTemporaryFile("w", suffix=".wks") as wks:
 wks.write('part / --source rawcopy 
--sourceparams="file=%s-%s.%s%s"\n'\
@@ -1098,12 +1096,11 @@ class Wic2(WicTestCase):
 self.append_config(config)
 bitbake('core-image-minimal')
 self.remove_config(config)
+deploy_dir = get_bb_var('DEPLOY_DIR_IMAGE')
+machine = self.td['MACHINE']
 
-bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'MACHINE'])
-deploy_dir = bb_vars['DEPLOY_DIR_IMAGE']
-machine = bb_vars['MACHINE']
 image_path = os.path.join(deploy_dir, 'core-image-minimal-%s.wic' % 
machine)
-self.assertEqual(True, os.path.exists(image_path))
+self.assertTrue(os.path.exists(image_path))
 
 sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
 
@@ -1245,7 +1242,7 @@ class Wic2(WicTestCase):
 
 def test_sparse_copy(self):
 """Test sparse_copy with FIEMAP and SEEK_HOLE filemap APIs"""
-libpath = os.path.join(get_bb_var('COREBASE'), 'scripts', 'lib', 'wic')
+libpath = os.path.join(self.td['COREBASE'], 'scripts', 'lib', 'wic')
 sys.path.insert(0, libpath)
 from  filemap import FilemapFiemap, FilemapSeek, sparse_copy, 
ErrorNotSupp
 with NamedTemporaryFile("w", suffix=".wic-sparse") as sparse:
@@ -1300,9 +1297,8 @@ class Wic2(WicTestCase):
 bitbake('core-image-minimal')
 
 # get path to the image
-bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'MACHINE'])
-deploy_dir = bb_vars['DEPLOY_DIR_IMAGE']
-machine = bb_vars['MACHINE']
+deploy_dir = get_bb_var('DEPLOY_DIR_IMAGE')
+machine = self.td['MACHINE']
 image_path = os.path.join(deploy_dir, 'core-image-minimal-%s.wic' % 
machine)
 
 self.remove_config(config)
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163863): 
https://lists.openembedded.org/g/openembedded-core/message/163863
Mute This Topic: https://lists.openembedded.org/mt/90161362/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 19/23] oeqa/selftest/wic: cleanup WicTestCase.setUpLocal

2022-03-31 Thread Ross Burton
Use os.path.join to construct paths, and invoke bitbake once instead of
three times.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/wic.py | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index 2eb80ac1941..6da70b8c287 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -75,22 +75,18 @@ class WicTestCase(OESelftestTestCase):
 
 def setUpLocal(self):
 """This code is executed before each test method."""
-self.resultdir = self.builddir + "/wic-tmp/"
+self.resultdir = os.path.join(self.builddir, "wic-tmp")
 super(WicTestCase, self).setUpLocal()
 
 # Do this here instead of in setUpClass as the base setUp does some
 # clean up which can result in the native tools built earlier in
 # setUpClass being unavailable.
 if not WicTestCase.image_is_ready:
-if get_bb_var('USE_NLS') == 'yes':
-bitbake('wic-tools')
-else:
-self.skipTest('wic-tools cannot be built due its 
(intltool|gettext)-native dependency and NLS disable')
+if get_bb_var('USE_NLS') != 'yes':
+self.skipTest('wic-tools needs USE_NLS=yes')
 
-bitbake('core-image-minimal')
-bitbake('core-image-minimal-mtdutils')
+bitbake('wic-tools core-image-minimal core-image-minimal-mtdutils')
 WicTestCase.image_is_ready = True
-
 rmtree(self.resultdir, ignore_errors=True)
 
 def tearDownLocal(self):
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163860): 
https://lists.openembedded.org/g/openembedded-core/message/163860
Mute This Topic: https://lists.openembedded.org/mt/90161358/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 20/23] oeqa/selftest/wic: rearrange tests

2022-03-31 Thread Ross Burton
Split the tests into further classes: one which exercises the CLI and
doesn't need to build images at all, and another which is just the
tests that manipulate existing images.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/wic.py | 154 ++--
 1 file changed, 77 insertions(+), 77 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index 6da70b8c287..c2496486bc2 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -104,8 +104,7 @@ class WicTestCase(OESelftestTestCase):
 WicTestCase.wicenv_cache[image] = os.path.join(stdir, machine, 
'imgdata')
 return WicTestCase.wicenv_cache[image]
 
-class Wic(WicTestCase):
-
+class CLITests(OESelftestTestCase):
 def test_version(self):
 """Test wic --version"""
 runCmd('wic --version')
@@ -166,6 +165,7 @@ class Wic(WicTestCase):
 """Test wic without command"""
 self.assertEqual(1, runCmd('wic', ignore_status=True).status)
 
+class Wic(WicTestCase):
 def test_build_image_name(self):
 """Test wic create wictestdisk --image-name=core-image-minimal"""
 cmd = "wic create wictestdisk --image-name=core-image-minimal -o %s" % 
self.resultdir
@@ -1271,6 +1271,81 @@ class Wic2(WicTestCase):
 self.assertEqual(dest_stat.st_blocks, 8)
 os.unlink(dest)
 
+def test_mkfs_extraopts(self):
+"""Test wks option --mkfs-extraopts for empty and not empty 
partitions"""
+img = 'core-image-minimal'
+with NamedTemporaryFile("w", suffix=".wks") as wks:
+wks.writelines(
+['part ext2   --fstype ext2 --source rootfs 
--mkfs-extraopts "-D -F -i 8192"\n',
+ "part btrfs  --fstype btrfs--source rootfs --size 40M 
--mkfs-extraopts='--quiet'\n",
+ 'part squash --fstype squashfs --source rootfs 
--mkfs-extraopts "-no-sparse -b 4096"\n',
+ 'part emptyvfat   --fstype vfat   --size 1M --mkfs-extraopts 
"-S 1024 -s 64"\n',
+ 'part emptymsdos  --fstype msdos  --size 1M --mkfs-extraopts 
"-S 1024 -s 64"\n',
+ 'part emptyext2   --fstype ext2   --size 1M --mkfs-extraopts 
"-D -F -i 8192"\n',
+ 'part emptybtrfs  --fstype btrfs  --size 100M 
--mkfs-extraopts "--mixed -K"\n'])
+wks.flush()
+cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir)
+runCmd(cmd)
+wksname = os.path.splitext(os.path.basename(wks.name))[0]
+out = glob(self.resultdir + "%s-*direct" % wksname)
+self.assertEqual(1, len(out))
+
+@only_for_arch(['i586', 'i686', 'x86_64'])
+@OETestTag("runqemu")
+def test_expand_mbr_image(self):
+"""Test wic write --expand command for mbr image"""
+# build an image
+config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "directdisk.wks"\n'
+self.append_config(config)
+bitbake('core-image-minimal')
+
+# get path to the image
+bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'MACHINE'])
+deploy_dir = bb_vars['DEPLOY_DIR_IMAGE']
+machine = bb_vars['MACHINE']
+image_path = os.path.join(deploy_dir, 'core-image-minimal-%s.wic' % 
machine)
+
+self.remove_config(config)
+
+try:
+# expand image to 1G
+new_image_path = None
+with NamedTemporaryFile(mode='wb', suffix='.wic.exp',
+dir=deploy_dir, delete=False) as sparse:
+sparse.truncate(1024 ** 3)
+new_image_path = sparse.name
+
+sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
+cmd = "wic write -n %s --expand 1:0 %s %s" % (sysroot, image_path, 
new_image_path)
+runCmd(cmd)
+
+# check if partitions are expanded
+orig = runCmd("wic ls %s -n %s" % (image_path, sysroot))
+exp = runCmd("wic ls %s -n %s" % (new_image_path, sysroot))
+orig_sizes = [int(line.split()[3]) for line in 
orig.output.split('\n')[1:]]
+exp_sizes = [int(line.split()[3]) for line in 
exp.output.split('\n')[1:]]
+self.assertEqual(orig_sizes[0], exp_sizes[0]) # first partition is 
not resized
+self.assertTrue(orig_sizes[1] < exp_sizes[1])
+
+# Check if all free space is partitioned
+result = runCmd("%s/usr/sbin/sfdisk -F %s" % (sysroot, 
new_image_path))
+self.assertTrue("0 B, 0 bytes, 0 sectors" in result.output)
+
+os.rename(image_path, image_path + '.bak')
+os.rename(new_image_path, image_path)
+
+# Check if it boots in qemu
+with runqemu('core-image-minimal', ssh=False, 
runqemuparams='nographic') as qemu:
+cmd = "ls /etc/"
+status, output = qemu.run_serial('true')
+self.assertEqual(1, 

[OE-core] [PATCH 21/23] oeqa/selftest/wic: use os.path.join to join paths

2022-03-31 Thread Ross Burton
Instead of using string concatenation, use os.path.join.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/wic.py | 92 ++---
 1 file changed, 46 insertions(+), 46 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index c2496486bc2..5bdd9ae87e3 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -170,14 +170,14 @@ class Wic(WicTestCase):
 """Test wic create wictestdisk --image-name=core-image-minimal"""
 cmd = "wic create wictestdisk --image-name=core-image-minimal -o %s" % 
self.resultdir
 runCmd(cmd)
-self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct")))
+self.assertEqual(1, len(glob(os.path.join (self.resultdir, 
"wictestdisk-*.direct"
 
 @only_for_arch(['i586', 'i686', 'x86_64'])
 def test_gpt_image(self):
 """Test creation of core-image-minimal with gpt table and UUID boot"""
 cmd = "wic create directdisk-gpt --image-name core-image-minimal -o 
%s" % self.resultdir
 runCmd(cmd)
-self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
+self.assertEqual(1, len(glob(os.path.join(self.resultdir, 
"directdisk-*.direct"
 
 @only_for_arch(['i586', 'i686', 'x86_64'])
 def test_iso_image(self):
@@ -190,22 +190,22 @@ class Wic(WicTestCase):
 self.remove_config(config)
 cmd = "wic create mkhybridiso --image-name core-image-minimal -o %s" % 
self.resultdir
 runCmd(cmd)
-self.assertEqual(1, len(glob(self.resultdir + 
"HYBRID_ISO_IMG-*.direct")))
-self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.iso")))
+self.assertEqual(1, len(glob(os.path.join(self.resultdir, 
"HYBRID_ISO_IMG-*.direct"
+self.assertEqual(1, len(glob(os.path.join (self.resultdir, 
"HYBRID_ISO_IMG-*.iso"
 
 @only_for_arch(['i586', 'i686', 'x86_64'])
 def test_qemux86_directdisk(self):
 """Test creation of qemux-86-directdisk image"""
 cmd = "wic create qemux86-directdisk -e core-image-minimal -o %s" % 
self.resultdir
 runCmd(cmd)
-self.assertEqual(1, len(glob(self.resultdir + 
"qemux86-directdisk-*direct")))
+self.assertEqual(1, len(glob(os.path.join(self.resultdir, 
"qemux86-directdisk-*direct"
 
 @only_for_arch(['i586', 'i686', 'x86_64', 'aarch64'])
 def test_mkefidisk(self):
 """Test creation of mkefidisk image"""
 cmd = "wic create mkefidisk -e core-image-minimal -o %s" % 
self.resultdir
 runCmd(cmd)
-self.assertEqual(1, len(glob(self.resultdir + "mkefidisk-*direct")))
+self.assertEqual(1, len(glob(os.path.join(self.resultdir, 
"mkefidisk-*direct"
 
 @only_for_arch(['i586', 'i686', 'x86_64'])
 def test_bootloader_config(self):
@@ -216,7 +216,7 @@ class Wic(WicTestCase):
 self.remove_config(config)
 cmd = "wic create directdisk-bootloader-config -e core-image-minimal 
-o %s" % self.resultdir
 runCmd(cmd)
-self.assertEqual(1, len(glob(self.resultdir + 
"directdisk-bootloader-config-*direct")))
+self.assertEqual(1, len(glob(os.path.join(self.resultdir, 
"directdisk-bootloader-config-*direct"
 
 @only_for_arch(['i586', 'i686', 'x86_64', 'aarch64'])
 def test_systemd_bootdisk(self):
@@ -227,7 +227,7 @@ class Wic(WicTestCase):
 self.remove_config(config)
 cmd = "wic create systemd-bootdisk -e core-image-minimal -o %s" % 
self.resultdir
 runCmd(cmd)
-self.assertEqual(1, len(glob(self.resultdir + 
"systemd-bootdisk-*direct")))
+self.assertEqual(1, len(glob(os.path.join(self.resultdir, 
"systemd-bootdisk-*direct"
 
 def test_efi_bootpart(self):
 """Test creation of efi-bootpart image"""
@@ -236,7 +236,7 @@ class Wic(WicTestCase):
 self.append_config('IMAGE_EFI_BOOT_FILES = "%s;kernel"\n' % kimgtype)
 runCmd(cmd)
 sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
-images = glob(self.resultdir + "mkefidisk-*.direct")
+images = glob(os.path.join(self.resultdir, "mkefidisk-*.direct"))
 result = runCmd("wic ls %s:1/ -n %s" % (images[0], sysroot))   
 self.assertIn("kernel",result.output)
 
@@ -246,7 +246,7 @@ class Wic(WicTestCase):
 kimgtype = get_bb_var('KERNEL_IMAGETYPE', 'core-image-minimal')
 self.write_config('IMAGE_BOOT_FILES = "%s"\n' % kimgtype)
 runCmd(cmd)
-self.assertEqual(1, len(glob(self.resultdir + 
"sdimage-bootpart-*direct")))
+self.assertEqual(1, len(glob(os.path.join(self.resultdir, 
"sdimage-bootpart-*direct"
 
 # TODO this doesn't have to be x86-specific
 @only_for_arch(['i586', 'i686', 'x86_64'])
@@ -277,28 +277,28 @@ class Wic(WicTestCase):
 "-n %(recipe_sysroot_native)s "
 "-r %(image_rootfs)s "
   

[OE-core] [PATCH 18/23] oeqa/selftest/oescripts: refactor skipping logic

2022-03-31 Thread Ross Burton
OEScriptTests currently skips if cairo isn't present, and does a build
of core-image-minimal.  This is only required for the
OEPybootchartguyTests tests, so move that logic there so that the
OEListPackageconfigTests run even if cairo isn't available.

This leaves OEScriptTests as a simple class containing the scripts_dir
assignment, which can then be reused by other tests to avoid code
duplication.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/oescripts.py | 14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py 
b/meta/lib/oeqa/selftest/cases/oescripts.py
index b3261e512f5..cd687816c83 100644
--- a/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -34,21 +34,19 @@ class BuildhistoryDiffTests(BuildhistoryBase):
 if expected_endlines:
 self.fail('Missing expected line endings:\n  %s' % '\n  
'.join(expected_endlines))
 
-@unittest.skipUnless(importlib.util.find_spec("cairo"), "Python cairo module 
is not present")
 class OEScriptTests(OESelftestTestCase):
+scripts_dir = os.path.join(get_bb_var('COREBASE'), 'scripts')
+
+@unittest.skipUnless(importlib.util.find_spec("cairo"), "Python cairo module 
is not present")
+class OEPybootchartguyTests(OEScriptTests):
 
 @classmethod
 def setUpClass(cls):
 super(OEScriptTests, cls).setUpClass()
-import cairo
 bitbake("core-image-minimal -c rootfs -f")
 cls.tmpdir = get_bb_var('TMPDIR')
 cls.buildstats = cls.tmpdir + "/buildstats/" + 
sorted(os.listdir(cls.tmpdir + "/buildstats"))[-1]
 
-scripts_dir = os.path.join(get_bb_var('COREBASE'), 'scripts')
-
-class OEPybootchartguyTests(OEScriptTests):
-
 def test_pybootchartguy_help(self):
 runCmd('%s/pybootchartgui/pybootchartgui.py  --help' % 
self.scripts_dir)
 
@@ -65,9 +63,7 @@ class OEPybootchartguyTests(OEScriptTests):
 self.assertTrue(os.path.exists(self.tmpdir + "/charts.pdf"))
 
 
-class OEGitproxyTests(OESelftestTestCase):
-
-scripts_dir = os.path.join(get_bb_var('COREBASE'), 'scripts')
+class OEGitproxyTests(OEScriptTests):
 
 def test_oegitproxy_help(self):
 try:
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163859): 
https://lists.openembedded.org/g/openembedded-core/message/163859
Mute This Topic: https://lists.openembedded.org/mt/90161355/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 15/23] oeqa/core/decorators/data: improve has_* logic

2022-03-31 Thread Ross Burton
has_feature() should be splitting the feature string into substrings and
then looking for membership instead of looking for simple substrings.

has_machine() should be using equality instead of substrings.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/core/decorator/data.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/core/decorator/data.py 
b/meta/lib/oeqa/core/decorator/data.py
index bc4939e87c5..12197be246e 100644
--- a/meta/lib/oeqa/core/decorator/data.py
+++ b/meta/lib/oeqa/core/decorator/data.py
@@ -13,8 +13,8 @@ def has_feature(td, feature):
 Checks for feature in DISTRO_FEATURES or IMAGE_FEATURES.
 """
 
-if (feature in td.get('DISTRO_FEATURES', '') or
-feature in td.get('IMAGE_FEATURES', '')):
+if (feature in td.get('DISTRO_FEATURES', '').split() or
+feature in td.get('IMAGE_FEATURES', '').split()):
 return True
 return False
 
@@ -23,7 +23,7 @@ def has_machine(td, machine):
 Checks for MACHINE.
 """
 
-if (machine in td.get('MACHINE', '')):
+if (machine == td.get('MACHINE', '')):
 return True
 return False
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163856): 
https://lists.openembedded.org/g/openembedded-core/message/163856
Mute This Topic: https://lists.openembedded.org/mt/90161350/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 17/23] oeqa: rationalise skipifqemu decorators

2022-03-31 Thread Ross Burton
Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/core/decorator/data.py  | 44 ---
 meta/lib/oeqa/runtime/cases/boot.py   |  2 +-
 .../oeqa/runtime/cases/ethernet_ip_connman.py |  3 +-
 meta/lib/oeqa/runtime/cases/ltp_stress.py |  3 +-
 meta/lib/oeqa/runtime/cases/storage.py| 16 +++
 meta/lib/oeqa/runtime/cases/suspend.py|  2 +-
 meta/lib/oeqa/runtime/cases/usb_hid.py|  2 +-
 meta/lib/oeqa/selftest/cases/runtime_test.py  |  4 +-
 8 files changed, 25 insertions(+), 51 deletions(-)

diff --git a/meta/lib/oeqa/core/decorator/data.py 
b/meta/lib/oeqa/core/decorator/data.py
index 12197be246e..3ce10e54999 100644
--- a/meta/lib/oeqa/core/decorator/data.py
+++ b/meta/lib/oeqa/core/decorator/data.py
@@ -27,17 +27,6 @@ def has_machine(td, machine):
 return True
 return False
 
-def is_qemu(td, qemu):
-"""
-Checks if MACHINE is qemu.
-"""
-
-machine = td.get('MACHINE', '')
-if (qemu in td.get('MACHINE', '') or
-machine.startswith('qemu')):
-return True
-return False
-
 @registerDecorator
 class skipIfDataVar(OETestDecorator):
 """
@@ -189,34 +178,19 @@ class skipIfMachine(OETestDecorator):
 @registerDecorator
 class skipIfNotQemu(OETestDecorator):
 """
-Skip test based on MACHINE.
-
-value must be a qemu MACHINE or it will skip the test
-with msg as the reason.
+Skip test if MACHINE is not qemu*
 """
-
-attrs = ('value', 'msg')
-
 def setUpDecorator(self):
-msg = ('Checking if %s is not this MACHINE' % self.value)
-self.logger.debug(msg)
-if not is_qemu(self.case.td, self.value):
-self.case.skipTest(self.msg)
+self.logger.debug("Checking if not qemu MACHINE")
+if not self.case.td.get('MACHINE', '').startswith('qemu'):
+self.case.skipTest('Test only runs on qemu machines')
 
 @registerDecorator
 class skipIfQemu(OETestDecorator):
 """
-Skip test based on Qemu Machine.
-
-value must not be a qemu machine or it will skip the test
-with msg as the reason.
-   """
-
-attrs = ('value', 'msg')
-
+Skip test if MACHINE is qemu*
+"""
 def setUpDecorator(self):
-msg = ('Checking if %s is this MACHINE' % self.value)
-self.logger.debug(msg)
-if is_qemu(self.case.td, self.value):
- self.case.skipTest(self.msg)
-
+self.logger.debug("Checking if qemu MACHINE")
+if self.case.td.get('MACHINE', '').startswith('qemu'):
+ self.case.skipTest('Test only runs on real hardware')
diff --git a/meta/lib/oeqa/runtime/cases/boot.py 
b/meta/lib/oeqa/runtime/cases/boot.py
index 2142f400a05..e1ad88a1744 100644
--- a/meta/lib/oeqa/runtime/cases/boot.py
+++ b/meta/lib/oeqa/runtime/cases/boot.py
@@ -13,7 +13,7 @@ from oeqa.core.decorator.data import skipIfQemu
 class BootTest(OERuntimeTestCase):
 
 @OETimeout(120)
-@skipIfQemu('qemuall', 'Test only runs on real hardware')
+@skipIfQemu()
 @OETestDepends(['ssh.SSHTest.test_ssh'])
 def test_reboot(self):
 output = ''
diff --git a/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py 
b/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py
index e0106128389..b93ee299415 100644
--- a/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py
+++ b/meta/lib/oeqa/runtime/cases/ethernet_ip_connman.py
@@ -11,7 +11,7 @@ class Ethernet_Test(OERuntimeTestCase):
 x = '.'.join(x)
 return x
 
-@skipIfQemu('qemuall', 'Test only runs on real hardware')
+@skipIfQemu()
 @OETestDepends(['ssh.SSHTest.test_ssh'])
 def test_set_virtual_ip(self):
 (status, output) = self.target.run("ifconfig eth0 | grep 'inet ' | awk 
'{print $2}'")
@@ -22,6 +22,7 @@ class Ethernet_Test(OERuntimeTestCase):
 (status, output) = self.target.run("ifconfig eth0:1 %s netmask 
255.255.255.0 && sleep 2 && ping -c 5 %s && ifconfig eth0:1 down" % 
(virtual_ip,virtual_ip))
 self.assertEqual(status, 0, msg='Failed to create virtual ip address, 
output: %s' % output)
 
+@skipIfQemu()
 @OETestDepends(['ethernet_ip_connman.Ethernet_Test.test_set_virtual_ip'])  
 def test_get_ip_from_dhcp(self): 
 (status, output) = self.target.run("connmanctl services | grep -E '*AO 
Wired|*AR Wired' | awk '{print $3}'")
diff --git a/meta/lib/oeqa/runtime/cases/ltp_stress.py 
b/meta/lib/oeqa/runtime/cases/ltp_stress.py
index 2445ffbc939..ce6f4bf59d3 100644
--- a/meta/lib/oeqa/runtime/cases/ltp_stress.py
+++ b/meta/lib/oeqa/runtime/cases/ltp_stress.py
@@ -89,8 +89,7 @@ class LtpStressTest(LtpStressBase):
 
 # LTP stress runtime tests
 #
-@skipIfQemu('qemuall', 'Test only runs on real hardware')
-
+@skipIfQemu()
 @OETestDepends(['ssh.SSHTest.test_ssh'])
 @OEHasPackage(["ltp"])
 def test_ltp_stress(self):
diff --git a/meta/lib/oeqa/runtime/cases/storage.py 
b/meta/lib/oeqa/runtime/cases/storage.py
index 

[OE-core] [PATCH 16/23] oeqa/selftest: tag tests that use runqemu

2022-03-31 Thread Ross Burton
There may be environments or machines which don't have working runqemu,
so tag all of the tests which use runqemu() so that they can be skipped.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/devtool.py   | 3 ++-
 meta/lib/oeqa/selftest/cases/gcc.py   | 7 +++
 meta/lib/oeqa/selftest/cases/glibc.py | 1 +
 meta/lib/oeqa/selftest/cases/imagefeatures.py | 3 +++
 meta/lib/oeqa/selftest/cases/overlayfs.py | 6 +-
 meta/lib/oeqa/selftest/cases/runqemu.py   | 2 ++
 meta/lib/oeqa/selftest/cases/runtime_test.py  | 9 +
 meta/lib/oeqa/selftest/cases/wic.py   | 7 +++
 8 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index 9c69585a88c..ba5dca0359e 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -9,10 +9,10 @@ import tempfile
 import glob
 import fnmatch
 
-import oeqa.utils.ftools as ftools
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
 from oeqa.utils.commands import get_bb_vars, runqemu, get_test_layer
+from oeqa.core.decorator import OETestTag
 
 oldmetapath = None
 
@@ -1351,6 +1351,7 @@ class DevtoolExtractTests(DevtoolBase):
 matches2 = glob.glob(stampprefix2 + '*')
 self.assertFalse(matches2, 'Stamp files exist for recipe %s that 
should have been cleaned' % testrecipe2)
 
+@OETestTag("runqemu")
 def test_devtool_deploy_target(self):
 # NOTE: Whilst this test would seemingly be better placed as a runtime 
test,
 # unfortunately the runtime tests run under bitbake and you can't run
diff --git a/meta/lib/oeqa/selftest/cases/gcc.py 
b/meta/lib/oeqa/selftest/cases/gcc.py
index 9308724ce5e..b9ea03ae62d 100644
--- a/meta/lib/oeqa/selftest/cases/gcc.py
+++ b/meta/lib/oeqa/selftest/cases/gcc.py
@@ -114,37 +114,44 @@ class GccLibItmSelfTest(GccSelfTestBase):
 self.run_check("libitm")
 
 @OETestTag("toolchain-system")
+@OETestTag("runqemu")
 class GccCrossSelfTestSystemEmulated(GccSelfTestBase):
 def test_cross_gcc(self):
 self.run_check_emulated("gcc")
 
 @OETestTag("toolchain-system")
+@OETestTag("runqemu")
 class GxxCrossSelfTestSystemEmulated(GccSelfTestBase):
 def test_cross_gxx(self):
 self.run_check_emulated("g++")
 
 @OETestTag("toolchain-system")
+@OETestTag("runqemu")
 class GccLibAtomicSelfTestSystemEmulated(GccSelfTestBase):
 def test_libatomic(self):
 self.run_check_emulated("libatomic")
 
 @OETestTag("toolchain-system")
+@OETestTag("runqemu")
 class GccLibGompSelfTestSystemEmulated(GccSelfTestBase):
 def test_libgomp(self):
 self.run_check_emulated("libgomp")
 
 @OETestTag("toolchain-system")
+@OETestTag("runqemu")
 class GccLibStdCxxSelfTestSystemEmulated(GccSelfTestBase):
 def test_libstdcxx(self):
 self.run_check_emulated("libstdc++-v3")
 
 @OETestTag("toolchain-system")
+@OETestTag("runqemu")
 class GccLibSspSelfTestSystemEmulated(GccSelfTestBase):
 def test_libssp(self):
 self.check_skip("libssp")
 self.run_check_emulated("libssp")
 
 @OETestTag("toolchain-system")
+@OETestTag("runqemu")
 class GccLibItmSelfTestSystemEmulated(GccSelfTestBase):
 def test_libitm(self):
 self.check_skip("libitm")
diff --git a/meta/lib/oeqa/selftest/cases/glibc.py 
b/meta/lib/oeqa/selftest/cases/glibc.py
index 4c149ab7023..6fc98e9cb47 100644
--- a/meta/lib/oeqa/selftest/cases/glibc.py
+++ b/meta/lib/oeqa/selftest/cases/glibc.py
@@ -83,6 +83,7 @@ class GlibcSelfTest(GlibcSelfTestBase):
 self.run_check()
 
 @OETestTag("toolchain-system")
+@OETestTag("runqemu")
 class GlibcSelfTestSystemEmulated(GlibcSelfTestBase):
 def test_glibc(self):
 self.run_check_emulated()
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py 
b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index d36d45c5516..6b94ace4eba 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -3,6 +3,7 @@
 #
 
 from oeqa.selftest.case import OESelftestTestCase
+from oeqa.core.decorator import OETestTag
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
 from oeqa.utils.sshcontrol import SSHControl
 import glob
@@ -14,6 +15,7 @@ class ImageFeatures(OESelftestTestCase):
 test_user = 'tester'
 root_user = 'root'
 
+@OETestTag("runqemu")
 def test_non_root_user_can_connect_via_ssh_without_password(self):
 """
 Summary: Check if non root user can connect via ssh without password
@@ -39,6 +41,7 @@ class ImageFeatures(OESelftestTestCase):
 status, output = ssh.run("true")
 self.assertEqual(status, 0, 'ssh to user %s failed with %s' % 
(user, output))
 
+@OETestTag("runqemu")
 def test_all_users_can_connect_via_ssh_without_password(self):
 """
 

[OE-core] [PATCH 13/23] oeqa/core/utils/misc: remove redundant file

2022-03-31 Thread Ross Burton
This file dates back to 2016. Half of the functions have never been used,
the rest are used in one place and have now been replaced.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/core/utils/misc.py | 47 
 1 file changed, 47 deletions(-)
 delete mode 100644 meta/lib/oeqa/core/utils/misc.py

diff --git a/meta/lib/oeqa/core/utils/misc.py b/meta/lib/oeqa/core/utils/misc.py
deleted file mode 100644
index e1a59588eb6..000
--- a/meta/lib/oeqa/core/utils/misc.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Copyright (C) 2016 Intel Corporation
-#
-# SPDX-License-Identifier: MIT
-#
-
-def toList(obj, obj_type, obj_name="Object"):
-if isinstance(obj, obj_type):
-return [obj]
-elif isinstance(obj, list):
-return obj
-else:
-raise TypeError("%s must be %s or list" % (obj_name, obj_type))
-
-def toSet(obj, obj_type, obj_name="Object"):
-if isinstance(obj, obj_type):
-return {obj}
-elif isinstance(obj, list):
-return set(obj)
-elif isinstance(obj, set):
-return obj
-else:
-raise TypeError("%s must be %s or set" % (obj_name, obj_type))
-
-def strToList(obj, obj_name="Object"):
-return toList(obj, str, obj_name)
-
-def strToSet(obj, obj_name="Object"):
-return toSet(obj, str, obj_name)
-
-def intToList(obj, obj_name="Object"):
-return toList(obj, int, obj_name)
-
-def dataStoteToDict(d, variables):
-data = {}
-
-for v in variables:
-data[v] = d.getVar(v)
-
-return data
-
-def updateTestData(d, td, variables):
-"""
-Updates variables with values of data store to test data.
-"""
-for var in variables:
-td[var] = d.getVar(var)
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163854): 
https://lists.openembedded.org/g/openembedded-core/message/163854
Mute This Topic: https://lists.openembedded.org/mt/90161348/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 12/23] testimage: inline updateTestData()

2022-03-31 Thread Ross Burton
updateTestData() is just a simple loop that is only used here, so just
inline it.

Signed-off-by: Ross Burton 
---
 meta/classes/testimage.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 898248992c8..8ffaeab2844 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -205,7 +205,6 @@ def testimage_main(d):
 import shutil
 
 from bb.utils import export_proxies
-from oeqa.core.utils.misc import updateTestData
 from oeqa.runtime.context import OERuntimeTestContext
 from oeqa.runtime.context import OERuntimeTestContextExecutor
 from oeqa.core.target.qemu import supported_fstypes
@@ -245,7 +244,8 @@ def testimage_main(d):
 
 # Some variables need to be updates (mostly paths) with the
 # ones of the current environment because some tests require them.
-updateTestData(d, td, d.getVar('TESTIMAGE_UPDATE_VARS').split())
+for var in d.getVar('TESTIMAGE_UPDATE_VARS').split():
+td[var] = d.getVar(var)
 
 image_manifest = "%s.manifest" % image_name
 image_packages = 
OERuntimeTestContextExecutor.readPackagesManifest(image_manifest)
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163853): 
https://lists.openembedded.org/g/openembedded-core/message/163853
Mute This Topic: https://lists.openembedded.org/mt/90161347/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 14/23] oeqa/selftest: remove unused imports

2022-03-31 Thread Ross Burton
---
 meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py | 2 +-
 meta/lib/oeqa/selftest/cases/binutils.py| 5 +
 meta/lib/oeqa/selftest/cases/buildoptions.py| 2 +-
 meta/lib/oeqa/selftest/cases/distrodata.py  | 3 ---
 meta/lib/oeqa/selftest/cases/eSDK.py| 2 +-
 meta/lib/oeqa/selftest/cases/fitimage.py| 3 +--
 meta/lib/oeqa/selftest/cases/gcc.py | 2 +-
 meta/lib/oeqa/selftest/cases/glibc.py   | 2 +-
 meta/lib/oeqa/selftest/cases/layerappend.py | 2 +-
 meta/lib/oeqa/selftest/cases/lic_checksum.py| 1 -
 meta/lib/oeqa/selftest/cases/manifest.py| 2 +-
 meta/lib/oeqa/selftest/cases/oescripts.py   | 2 +-
 meta/lib/oeqa/selftest/cases/package.py | 1 -
 meta/lib/oeqa/selftest/cases/recipeutils.py | 6 +-
 meta/lib/oeqa/selftest/cases/reproducible.py| 2 --
 meta/lib/oeqa/selftest/cases/selftest.py| 1 -
 meta/lib/oeqa/selftest/cases/sstate.py  | 5 +
 meta/lib/oeqa/selftest/cases/sstatetests.py | 3 +--
 meta/lib/oeqa/selftest/cases/sysroot.py | 2 +-
 meta/lib/oeqa/selftest/cases/tinfoil.py | 1 -
 20 files changed, 14 insertions(+), 35 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py 
b/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
index 7ac03f0cec6..bff6e7740c5 100644
--- a/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
+++ b/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
@@ -6,7 +6,7 @@ import os
 import shutil
 
 import oeqa.utils.ftools as ftools
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 from oeqa.selftest.cases.sstate import SStateBase
 
 
diff --git a/meta/lib/oeqa/selftest/cases/binutils.py 
b/meta/lib/oeqa/selftest/cases/binutils.py
index 821f52f5a88..3b0b44b3908 100644
--- a/meta/lib/oeqa/selftest/cases/binutils.py
+++ b/meta/lib/oeqa/selftest/cases/binutils.py
@@ -1,12 +1,9 @@
 # SPDX-License-Identifier: MIT
 import os
-import sys
-import re
-import logging
 from oeqa.core.decorator import OETestTag
 from oeqa.core.case import OEPTestResultTestCase
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars
+from oeqa.utils.commands import bitbake, get_bb_vars
 
 def parse_values(content):
 for i in content:
diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py 
b/meta/lib/oeqa/selftest/cases/buildoptions.py
index 135e88e1f06..ad604d6ae26 100644
--- a/meta/lib/oeqa/selftest/cases/buildoptions.py
+++ b/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -9,7 +9,7 @@ import shutil
 import tempfile
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.selftest.cases.buildhistory import BuildhistoryBase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
+from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars
 import oeqa.utils.ftools as ftools
 
 class ImageOptionsTests(OESelftestTestCase):
diff --git a/meta/lib/oeqa/selftest/cases/distrodata.py 
b/meta/lib/oeqa/selftest/cases/distrodata.py
index 03f31e9fcbf..b80d091c1c6 100644
--- a/meta/lib/oeqa/selftest/cases/distrodata.py
+++ b/meta/lib/oeqa/selftest/cases/distrodata.py
@@ -3,9 +3,6 @@
 #
 
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
-from oeqa.utils.decorators import testcase
-from oeqa.utils.ftools import write_file
 
 import oe.recipeutils
 
diff --git a/meta/lib/oeqa/selftest/cases/eSDK.py 
b/meta/lib/oeqa/selftest/cases/eSDK.py
index f7279b32300..3ea0f663575 100644
--- a/meta/lib/oeqa/selftest/cases/eSDK.py
+++ b/meta/lib/oeqa/selftest/cases/eSDK.py
@@ -8,7 +8,7 @@ import os
 import glob
 import time
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
+from oeqa.utils.commands import runCmd, bitbake, get_bb_vars
 
 class oeSDKExtSelfTest(OESelftestTestCase):
 """
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py 
b/meta/lib/oeqa/selftest/cases/fitimage.py
index f6f6a8e7953..e6bfd1257ec 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -3,9 +3,8 @@
 #
 
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 import os
-import json
 import re
 
 class FitImageTests(OESelftestTestCase):
diff --git a/meta/lib/oeqa/selftest/cases/gcc.py 
b/meta/lib/oeqa/selftest/cases/gcc.py
index 3efe15228f0..9308724ce5e 100644
--- a/meta/lib/oeqa/selftest/cases/gcc.py
+++ b/meta/lib/oeqa/selftest/cases/gcc.py
@@ -3,7 +3,7 @@ import os
 from oeqa.core.decorator import OETestTag
 from oeqa.core.case import OEPTestResultTestCase
 from oeqa.selftest.case import OESelftestTestCase
-from 

[OE-core] [PATCH 10/23] oeqa/runtime/decorator/package.py: remove use of strToSet

2022-03-31 Thread Ross Burton
There's no need to use a series of over-generalised functions to just
wrap a string in a tuple.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/runtime/decorator/package.py | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/runtime/decorator/package.py 
b/meta/lib/oeqa/runtime/decorator/package.py
index 2d7e174dbfd..8aba3f325bc 100644
--- a/meta/lib/oeqa/runtime/decorator/package.py
+++ b/meta/lib/oeqa/runtime/decorator/package.py
@@ -5,7 +5,6 @@
 #
 
 from oeqa.core.decorator import OETestDecorator, registerDecorator
-from oeqa.core.utils.misc import strToSet
 
 @registerDecorator
 class OEHasPackage(OETestDecorator):
@@ -34,8 +33,12 @@ class OEHasPackage(OETestDecorator):
 def setUpDecorator(self):
 need_pkgs = set()
 unneed_pkgs = set()
-pkgs = strToSet(self.need_pkgs)
-for pkg in pkgs:
+
+# Turn literal strings into a list so we can just iterate over it
+if isinstance(self.need_pkgs, str):
+self.need_pkgs = [self.need_pkgs,]
+
+for pkg in self.need_pkgs:
 if pkg.startswith('!'):
 unneed_pkgs.add(pkg[1:])
 else:
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163851): 
https://lists.openembedded.org/g/openembedded-core/message/163851
Mute This Topic: https://lists.openembedded.org/mt/90161345/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 11/23] oeqa/core/decorator: remove redundant code

2022-03-31 Thread Ross Burton
There's no need to wrap *tags in a potential list, as *tags will always
be a tuple.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/core/decorator/__init__.py | 11 +++
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/meta/lib/oeqa/core/decorator/__init__.py 
b/meta/lib/oeqa/core/decorator/__init__.py
index 1a82518ab6a..93efd30e1db 100644
--- a/meta/lib/oeqa/core/decorator/__init__.py
+++ b/meta/lib/oeqa/core/decorator/__init__.py
@@ -5,8 +5,7 @@
 #
 
 from functools import wraps
-from abc import abstractmethod, ABCMeta
-from oeqa.core.utils.misc import strToList
+from abc import ABCMeta
 
 decoratorClasses = set()
 
@@ -65,15 +64,11 @@ class OETestDiscover(OETestDecorator):
 return registry['cases']
 
 def OETestTag(*tags):
-expandedtags = []
-for tag in tags:
-expandedtags += strToList(tag)
 def decorator(item):
 if hasattr(item, "__oeqa_testtags"):
 # do not append, create a new list (to handle classes with 
inheritance)
-item.__oeqa_testtags = list(item.__oeqa_testtags) + expandedtags
+item.__oeqa_testtags = list(item.__oeqa_testtags) + list(tags)
 else:
-item.__oeqa_testtags = expandedtags
+item.__oeqa_testtags = tags
 return item
 return decorator
-
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163852): 
https://lists.openembedded.org/g/openembedded-core/message/163852
Mute This Topic: https://lists.openembedded.org/mt/90161346/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 09/23] oeqa/selftest/buildoptions: set PACKAGE_CLASSES in test_arch_work_dir_and_export_source

2022-03-31 Thread Ross Burton
test_arch_work_dir_and_export_source uses the archiver to generate SRPMS,
so explicitly set PACKAGE_CLASSES to ensure that package_rpm is used.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/buildoptions.py | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py 
b/meta/lib/oeqa/selftest/cases/buildoptions.py
index bfe613b847a..135e88e1f06 100644
--- a/meta/lib/oeqa/selftest/cases/buildoptions.py
+++ b/meta/lib/oeqa/selftest/cases/buildoptions.py
@@ -177,7 +177,12 @@ class ArchiverTest(OESelftestTestCase):
 """
 Test for archiving the work directory and exporting the source files.
 """
-self.write_config("INHERIT += \"archiver\"\nARCHIVER_MODE[src] = 
\"original\"\nARCHIVER_MODE[srpm] = \"1\"")
+self.write_config("""
+INHERIT += "archiver"
+PACKAGE_CLASSES = "package_rpm"
+ARCHIVER_MODE[src] = "original"
+ARCHIVER_MODE[srpm] = "1"
+""")
 res = bitbake("xcursor-transparent-theme", ignore_status=True)
 self.assertEqual(res.status, 0, "\nCouldn't build 
xcursortransparenttheme.\nbitbake output %s" % res.output)
 deploy_dir_src = get_bb_var('DEPLOY_DIR_SRC')
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163850): 
https://lists.openembedded.org/g/openembedded-core/message/163850
Mute This Topic: https://lists.openembedded.org/mt/90161344/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 07/23] oeqa/selftest/wic: don't hardcode kernel image type in test_wic_rm

2022-03-31 Thread Ross Burton
Don't assume bzImage, resepct KERNEL_IMAGETYPE.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/wic.py | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index 317b80ea27b..eb376e1e2c5 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -1337,21 +1337,23 @@ class Wic2(WicTestCase):
 self.assertEqual(1, len(images))
 
 sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
+# Not bulletproof but hopefully sufficient
+kerneltype = get_bb_var('KERNEL_IMAGETYPE', 'virtual/kernel')
 
 # list directory content of the first partition
 result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot))
-self.assertIn('\nBZIMAGE', result.output)
+self.assertIn('\n%s' % kerneltype.upper(), result.output)
 self.assertIn('\nEFI   ', result.output)
 
-# remove file
-runCmd("wic rm %s:1/bzimage -n %s" % (images[0], sysroot))
+# remove file. EFI partitions are case-insensitive so exercise that too
+runCmd("wic rm %s:1/%s -n %s" % (images[0], kerneltype.lower(), 
sysroot))
 
 # remove directory
 runCmd("wic rm %s:1/efi -n %s" % (images[0], sysroot))
 
 # check if they're removed
 result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot))
-self.assertNotIn('\nBZIMAGE', result.output)
+self.assertNotIn('\n%s' % kerneltype.upper(), result.output)
 self.assertNotIn('\nEFI   ', result.output)
 
 def test_mkfs_extraopts(self):
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163848): 
https://lists.openembedded.org/g/openembedded-core/message/163848
Mute This Topic: https://lists.openembedded.org/mt/90161342/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 08/23] oeqa/selftest/wic: add more arch-specific annotations

2022-03-31 Thread Ross Burton
Some tests which are marked as x86-specific will actually work on
aarch64 (e.g. use EFI), whilst some other tests really are x86-specific
(e.g. use syslinux).

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/wic.py | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index eb376e1e2c5..325fb7776a8 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -203,7 +203,7 @@ class Wic(WicTestCase):
 runCmd(cmd)
 self.assertEqual(1, len(glob(self.resultdir + 
"qemux86-directdisk-*direct")))
 
-@only_for_arch(['i586', 'i686', 'x86_64'])
+@only_for_arch(['i586', 'i686', 'x86_64', 'aarch64'])
 def test_mkefidisk(self):
 """Test creation of mkefidisk image"""
 cmd = "wic create mkefidisk -e core-image-minimal -o %s" % 
self.resultdir
@@ -221,7 +221,7 @@ class Wic(WicTestCase):
 runCmd(cmd)
 self.assertEqual(1, len(glob(self.resultdir + 
"directdisk-bootloader-config-*direct")))
 
-@only_for_arch(['i586', 'i686', 'x86_64'])
+@only_for_arch(['i586', 'i686', 'x86_64', 'aarch64'])
 def test_systemd_bootdisk(self):
 """Test creation of systemd-bootdisk image"""
 config = 'MACHINE_FEATURES:append = " efi"\n'
@@ -251,6 +251,7 @@ class Wic(WicTestCase):
 runCmd(cmd)
 self.assertEqual(1, len(glob(self.resultdir + 
"sdimage-bootpart-*direct")))
 
+# TODO this doesn't have to be x86-specific
 @only_for_arch(['i586', 'i686', 'x86_64'])
 def test_default_output_dir(self):
 """Test default output location"""
@@ -355,6 +356,7 @@ class Wic(WicTestCase):
"--outdir %s" % self.resultdir)
 self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct")))
 
+# TODO this doesn't have to be x86-specific
 @only_for_arch(['i586', 'i686', 'x86_64'])
 def test_rootfs_indirect_recipes(self):
 """Test usage of rootfs plugin with rootfs recipes"""
@@ -365,6 +367,7 @@ class Wic(WicTestCase):
 "--outdir %s" % self.resultdir)
 self.assertEqual(1, len(glob(self.resultdir + 
"directdisk-multi-rootfs*.direct")))
 
+# TODO this doesn't have to be x86-specific
 @only_for_arch(['i586', 'i686', 'x86_64'])
 def test_rootfs_artifacts(self):
 """Test usage of rootfs plugin with rootfs paths"""
@@ -818,7 +821,7 @@ class Wic2(WicTestCase):
   self.resultdir))
 self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct")))
 
-@only_for_arch(['i586', 'i686', 'x86_64'])
+@only_for_arch(['i586', 'i686', 'x86_64', 'aarch64'])
 def test_wic_image_type(self):
 """Test building wic images by bitbake"""
 config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "wic-image-minimal"\n'\
@@ -838,6 +841,7 @@ class Wic2(WicTestCase):
 self.assertTrue(os.path.islink(path))
 self.assertTrue(os.path.isfile(os.path.realpath(path)))
 
+# TODO this should work on aarch64
 @only_for_arch(['i586', 'i686', 'x86_64'])
 def test_qemu(self):
 """Test wic-image-minimal under qemu"""
@@ -1041,7 +1045,7 @@ class Wic2(WicTestCase):
 size = int(size[:-3])
 self.assertGreaterEqual(size, 204800)
 
-@only_for_arch(['i586', 'i686', 'x86_64'])
+@only_for_arch(['i586', 'i686', 'x86_64', 'aarch64'])
 def test_rawcopy_plugin_qemu(self):
 """Test rawcopy plugin in qemu"""
 # build ext4 and then use it for a wic image
@@ -1166,6 +1170,7 @@ class Wic2(WicTestCase):
 out = glob(self.resultdir + "%s-*.direct" % wksname)
 self.assertEqual(1, len(out))
 
+# TODO this test could also work on aarch64
 @only_for_arch(['i586', 'i686', 'x86_64'])
 def test_efi_plugin_unified_kernel_image_qemu(self):
 """Test efi plugin's Unified Kernel Image feature in qemu"""
@@ -1375,6 +1380,7 @@ class Wic2(WicTestCase):
 out = glob(self.resultdir + "%s-*direct" % wksname)
 self.assertEqual(1, len(out))
 
+@only_for_arch(['i586', 'i686', 'x86_64'])
 def test_expand_mbr_image(self):
 """Test wic write --expand command for mbr image"""
 # build an image
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163849): 
https://lists.openembedded.org/g/openembedded-core/message/163849
Mute This Topic: https://lists.openembedded.org/mt/90161343/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 01/23] buildtools-tarball: include nativesdk-python3-pyyaml

2022-03-31 Thread Ross Burton
BitBake can optionally 'import yaml' if BB_LOGCONFIG specifies a yaml
file.  This is a 3rd party module, so that this works out of the box
when buildtools is used -- either explicitly via buildtools-tarball or
implicitly via eSDK --  we can add pyyaml to the buildtools.

Signed-off-by: Ross Burton 
---
 meta/recipes-core/meta/buildtools-tarball.bb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/meta/buildtools-tarball.bb 
b/meta/recipes-core/meta/buildtools-tarball.bb
index fac91cfc3cf..f9f36e68c4b 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -7,13 +7,12 @@ TOOLCHAIN_TARGET_TASK ?= ""
 
 TOOLCHAIN_HOST_TASK ?= "\
 nativesdk-sdk-provides-dummy \
-nativesdk-python3-core \
-nativesdk-python3-modules \
-nativesdk-python3-misc \
+nativesdk-python3 \
 nativesdk-python3-git \
 nativesdk-python3-jinja2 \
 nativesdk-python3-testtools \
 nativesdk-python3-subunit \
+nativesdk-python3-pyyaml \
 nativesdk-ncurses-terminfo-base \
 nativesdk-chrpath \
 nativesdk-tar \
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163842): 
https://lists.openembedded.org/g/openembedded-core/message/163842
Mute This Topic: https://lists.openembedded.org/mt/90161336/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 05/23] oeqa/selftest/wic: remove redundant asserts

2022-03-31 Thread Ross Burton
By default bitbake() will raise an assertion if it fails, so there's no
need to wrap it in a further assert.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/wic.py | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index 673942fc9cc..5d7f7bf6135 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -104,7 +104,7 @@ class WicTestCase(OESelftestTestCase):
 def _get_image_env_path(self, image):
 """Generate and obtain the path to .env"""
 if image not in WicTestCase.wicenv_cache:
-self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' % 
image).status)
+bitbake('%s -c do_rootfs_wicenv' % image)
 bb_vars = get_bb_vars(['STAGING_DIR', 'MACHINE'], image)
 stdir = bb_vars['STAGING_DIR']
 machine = bb_vars['MACHINE']
@@ -694,7 +694,7 @@ part /etc --source rootfs --fstype=ext4 
--change-directory=etc
 os.environ['PATH'] = get_bb_var("PATH", "wic-tools")
 
 # Get stock fstab from base-files recipe
-self.assertEqual(0, bitbake('base-files -c do_install').status)
+bitbake('base-files -c do_install')
 bf_fstab = os.path.join(get_bb_var('D', 'base-files'), 'etc/fstab')
 self.assertEqual(True, os.path.exists(bf_fstab))
 bf_fstab_md5sum = runCmd('md5sum %s 2>/dev/null' % 
bf_fstab).output.split(" ")[0]
@@ -828,7 +828,7 @@ class Wic2(WicTestCase):
 config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "wic-image-minimal"\n'\
  'MACHINE_FEATURES:append = " efi"\n'
 self.append_config(config)
-self.assertEqual(0, bitbake('wic-image-minimal').status)
+bitbake('wic-image-minimal')
 self.remove_config(config)
 
 bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'MACHINE'])
@@ -848,7 +848,7 @@ class Wic2(WicTestCase):
 config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "wic-image-minimal"\n'\
  'MACHINE_FEATURES:append = " efi"\n'
 self.append_config(config)
-self.assertEqual(0, bitbake('wic-image-minimal').status)
+bitbake('wic-image-minimal')
 self.remove_config(config)
 
 with runqemu('wic-image-minimal', ssh=False, 
runqemuparams='nographic') as qemu:
@@ -867,7 +867,7 @@ class Wic2(WicTestCase):
 """Test core-image-minimal efi image under qemu"""
 config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "mkefidisk.wks"\n'
 self.append_config(config)
-self.assertEqual(0, bitbake('core-image-minimal ovmf').status)
+bitbake('core-image-minimal ovmf')
 self.remove_config(config)
 
 with runqemu('core-image-minimal', ssh=False,
@@ -1051,12 +1051,12 @@ class Wic2(WicTestCase):
 # build ext4 and then use it for a wic image
 config = 'IMAGE_FSTYPES = "ext4"\n'
 self.append_config(config)
-self.assertEqual(0, bitbake('core-image-minimal').status)
+bitbake('core-image-minimal')
 self.remove_config(config)
 
 config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = 
"test_rawcopy_plugin.wks.in"\n'
 self.append_config(config)
-self.assertEqual(0, bitbake('core-image-minimal-mtdutils').status)
+bitbake('core-image-minimal-mtdutils')
 self.remove_config(config)
 
 with runqemu('core-image-minimal-mtdutils', ssh=False,
@@ -1096,7 +1096,7 @@ class Wic2(WicTestCase):
 """Test empty plugin"""
 config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_empty_plugin.wks"\n'
 self.append_config(config)
-self.assertEqual(0, bitbake('core-image-minimal').status)
+bitbake('core-image-minimal')
 self.remove_config(config)
 
 bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'MACHINE'])
@@ -1117,7 +1117,7 @@ class Wic2(WicTestCase):
 """Test biosplusefi plugin in qemu"""
 config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = 
"test_biosplusefi_plugin.wks"\nMACHINE_FEATURES:append = " efi"\n'
 self.append_config(config)
-self.assertEqual(0, bitbake('core-image-minimal').status)
+bitbake('core-image-minimal')
 self.remove_config(config)
 
 with runqemu('core-image-minimal', ssh=False,
@@ -1155,7 +1155,7 @@ class Wic2(WicTestCase):
 # The easiest way to work-around this issue is to make sure we already 
built an image here, hence the bitbake call
 config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = 
"test_biosplusefi_plugin.wks"\nMACHINE_FEATURES:append = " efi"\n'
 self.append_config(config)
-self.assertEqual(0, bitbake('core-image-minimal').status)
+bitbake('core-image-minimal')
 self.remove_config(config)
 
 img = 'core-image-minimal'
@@ -1178,7 +1178,7 @@ class Wic2(WicTestCase):
  'WKS_FILE = "test_efi_plugin.wks"\n'\
  'MACHINE_FEATURES:append = " 

[OE-core] [PATCH 04/23] oeqa/selftest/wic: use os.rename instead of bb.utils.rename

2022-03-31 Thread Ross Burton
bb.utils.rename() only exists to handle moves across filesystems. As
these moves are within the same directory we can just use os.rename().

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/wic.py | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index 6f3dc277439..673942fc9cc 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -1416,8 +1416,8 @@ class Wic2(WicTestCase):
 result = runCmd("%s/usr/sbin/sfdisk -F %s" % (sysroot, 
new_image_path))
 self.assertTrue("0 B, 0 bytes, 0 sectors" in result.output)
 
-bb.utils.rename(image_path, image_path + '.bak')
-bb.utils.rename(new_image_path, image_path)
+os.rename(image_path, image_path + '.bak')
+os.rename(new_image_path, image_path)
 
 # Check if it boots in qemu
 with runqemu('core-image-minimal', ssh=False, 
runqemuparams='nographic') as qemu:
@@ -1428,7 +1428,8 @@ class Wic2(WicTestCase):
 if os.path.exists(new_image_path):
 os.unlink(new_image_path)
 if os.path.exists(image_path + '.bak'):
-bb.utils.rename(image_path + '.bak', image_path)
+os.rename(image_path + '.bak', image_path)
+
 
 def test_wic_ls_ext(self):
 """Test listing content of the ext partition using 'wic ls'"""
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163845): 
https://lists.openembedded.org/g/openembedded-core/message/163845
Mute This Topic: https://lists.openembedded.org/mt/90161339/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 06/23] oeqa/selftest/wic: clean up only_for_arch decorator

2022-03-31 Thread Ross Burton
There's no need to pass a recipe name when determining the target
architecture, there's no need to cap the size of the lru_cache as it
will only have one entry, and __name__ is set by @wraps.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/wic.py | 14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index 5d7f7bf6135..317b80ea27b 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -22,26 +22,22 @@ from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, 
runqemu
 
 
-@lru_cache(maxsize=32)
-def get_host_arch(recipe):
-"""A cached call to get_bb_var('HOST_ARCH', )"""
-return get_bb_var('HOST_ARCH', recipe)
+@lru_cache()
+def get_host_arch():
+return get_bb_var('HOST_ARCH')
 
 
-def only_for_arch(archs, image='core-image-minimal'):
+def only_for_arch(archs):
 """Decorator for wrapping test cases that can be run only for specific 
target
 architectures. A list of compatible architectures is passed in `archs`.
-Current architecture will be determined by parsing bitbake output for
-`image` recipe.
 """
 def wrapper(func):
 @wraps(func)
 def wrapped_f(*args, **kwargs):
-arch = get_host_arch(image)
+arch = get_host_arch()
 if archs and arch not in archs:
 raise unittest.SkipTest("Testcase arch dependency not met: %s" 
% arch)
 return func(*args, **kwargs)
-wrapped_f.__name__ = func.__name__
 return wrapped_f
 return wrapper
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163847): 
https://lists.openembedded.org/g/openembedded-core/message/163847
Mute This Topic: https://lists.openembedded.org/mt/90161341/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 02/23] image_types: hddimg and iso only work on x86

2022-03-31 Thread Ross Burton
These image types use syslinux which is only available on x86, so only
add them to IMAGE_TYPES on x86.

Signed-off-by: Ross Burton 
---
 meta/classes/image_types.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index f643ed3ce7f..960dab1a60e 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -264,8 +264,6 @@ IMAGE_TYPES = " \
 ext3 ext3.gz \
 ext4 ext4.gz \
 btrfs \
-iso \
-hddimg \
 squashfs squashfs-xz squashfs-lzo squashfs-lz4 squashfs-zst \
 ubi ubifs multiubi \
 tar tar.gz tar.bz2 tar.xz tar.lz4 tar.zst \
@@ -275,6 +273,9 @@ IMAGE_TYPES = " \
 f2fs \
 erofs erofs-lz4 erofs-lz4hc \
 "
+# These image types are x86 specific as they need syslinux
+IMAGE_TYPES:append:x86 = " hddimg iso"
+IMAGE_TYPES:append:x86-64 = " hddimg iso"
 
 # Compression is a special case of conversion. The old variable
 # names are still supported for backward-compatibility. When defining
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163844): 
https://lists.openembedded.org/g/openembedded-core/message/163844
Mute This Topic: https://lists.openembedded.org/mt/90161338/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 03/23] oeqa/selftest/devtool: ensure Git username is set before upgrade tests

2022-03-31 Thread Ross Burton
The 'devtool upgrade' tests fail if Git doesn't know the user's name or
email, so verify this before the tests start and skip if it is not.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/selftest/cases/devtool.py | 8 
 1 file changed, 8 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index e910672c314..9c69585a88c 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -1471,6 +1471,14 @@ class DevtoolExtractTests(DevtoolBase):
 
 class DevtoolUpgradeTests(DevtoolBase):
 
+def setUp(self):
+super().setUp()
+try:
+runCmd("git config --global user.name")
+runCmd("git config --global user.email")
+except:
+self.skip("Git user.name and user.email must be set")
+
 def test_devtool_upgrade(self):
 # Check preconditions
 self.assertTrue(not os.path.exists(self.workspacedir), 'This test 
cannot be run with a workspace directory under the build directory')
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163843): 
https://lists.openembedded.org/g/openembedded-core/message/163843
Mute This Topic: https://lists.openembedded.org/mt/90161337/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 RFC] mirrors: Switch glibc and binutils to use shallow mirror tarballs

2022-03-31 Thread Richard Purdie
On Thu, 2022-03-31 at 15:45 +, Peter Kjellerstedt wrote:
> > -Original Message-
> > From: Richard Purdie 
> > Sent: den 31 mars 2022 16:16
> > To: Peter Kjellerstedt ; openembedded-
> > c...@lists.openembedded.org
> > Subject: Re: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to
> > use shallow mirror tarballs
> > 
> > On Thu, 2022-03-31 at 14:09 +, Peter Kjellerstedt wrote:
> > > > -Original Message-
> > > > From: openembedded-core@lists.openembedded.org
> > > >  On Behalf Of Richard Purdie
> > > > Sent: den 30 mars 2022 14:24
> > > > To: openembedded-core@lists.openembedded.org
> > > > Subject: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to use
> > > > shallow mirror tarballs
> > > > 
> > > > These two repositories are large and overload our downloads server as a
> > > > premirror but the recipes are easier to maintain as git urls. Compromise
> > > > and use shallow clones for them.
> > > > 
> > > > In order to be effective, we need premirror entries on where to find
> > > > the shallow mirror tarballs.
> > > > 
> > > > Signed-off-by: Richard Purdie 
> > > > ---
> > > >  meta/classes/mirrors.bbclass | 11 +++
> > > >  1 file changed, 11 insertions(+)
> > > > 
> > > > diff --git a/meta/classes/mirrors.bbclass b/meta/classes/mirrors.bbclass
> > > > index 37dc449ade7..ffdccff5fb4 100644
> > > > --- a/meta/classes/mirrors.bbclass
> > > > +++ b/meta/classes/mirrors.bbclass
> > > > @@ -76,3 +76,14 @@ git://git.gnome.org/.*
> > > > git://gitlab.gnome.org/GNOME/PATH;protocol=https \
> > > >  git://.*/.*   git://HOST/PATH;protocol=https \
> > > >  git://.*/.*   git://HOST/git/PATH;protocol=https \
> > > >  "
> > > > +
> > > > +# Switch glibc and binutils recipes to use shallow clones as they're
> > > > large and this
> > > > +# improves user experience whilst allowing the flexibility of git urls
> > > > in the recipes
> > > > +BB_GIT_SHALLOW:pn-binutils = "1"
> > > > +BB_GIT_SHALLOW:pn-binutils-cross-${TARGET_ARCH} = "1"
> > > > +BB_GIT_SHALLOW:pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} =
> > > > "1"
> > > > +BB_GIT_SHALLOW:pn-binutils-cross-testsuite = "1"
> > > > +BB_GIT_SHALLOW:pn-binutils-crosssdk-${SDK_SYS} = "1"
> > > > +BB_GIT_SHALLOW:pn-glibc = "1"
> > > > +PREMIRRORS += "git://sourceware.org/git/glibc.git
> > > > https://downloads.yoctoproject.org/mirror/sources/ \
> > > > +  git://sourceware.org/git/binutils-gdb.git
> > > > https://downloads.yoctoproject.org/mirror/sources/;
> > > 
> > > Please use PREMIRRORS:append here, or you will wipe away any
> > > default configuration of PREMIRRORS defined using "?=".
> > 
> > No, I'm not using append here since I do want users to be able to reset
> > this.
> 
> That can easily be achieved by instead doing something like:
> 
> SHALLOW_PREMIRRORS = " \
> git://sourceware.org/git/glibc.git 
> https://downloads.yoctoproject.org/mirror/sources/ \
> git://sourceware.org/git/binutils-gdb.git 
> https://downloads.yoctoproject.org/mirror/sources/ \
> "
> PREMIRRORS:append = " ${SHALLOW_PREMIRRORS}"

This implies that any variable alteration should always use indirection via
another variable. I am not going to support moves in that direction as it is
horrible. If our syntax is causing issues we need to resolve that but I'm not
going to compound it with moves like the above, sorry.

I'd also note this matches how MIRRORS is being handled.

> which I think is a far better solution anyway since it is very 
> hard to reset something in PREMIRRORS as one cannot use :remove.
> With this solution it is possible to set SHALLOW_PREMIRRORS = "" 
> in case one do not want the mirrors OE-Core adds by default.
> 
> Otherwise you are effectively saying that one can no longer define 
> a default for PREMIRRORS using ?=, which was possible up until the 
> above change. And unless I can persuade you to switch to :append, 
> then this needs to be mentioned in the migration notes for 4.0.

Lets release note it then.

Cheers,

Richard


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163841): 
https://lists.openembedded.org/g/openembedded-core/message/163841
Mute This Topic: https://lists.openembedded.org/mt/90129861/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 RFC] mirrors: Switch glibc and binutils to use shallow mirror tarballs

2022-03-31 Thread Peter Kjellerstedt
> -Original Message-
> From: Richard Purdie 
> Sent: den 31 mars 2022 16:16
> To: Peter Kjellerstedt ; openembedded-
> c...@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to
> use shallow mirror tarballs
> 
> On Thu, 2022-03-31 at 14:09 +, Peter Kjellerstedt wrote:
> > > -Original Message-
> > > From: openembedded-core@lists.openembedded.org
> > >  On Behalf Of Richard Purdie
> > > Sent: den 30 mars 2022 14:24
> > > To: openembedded-core@lists.openembedded.org
> > > Subject: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to use
> > > shallow mirror tarballs
> > >
> > > These two repositories are large and overload our downloads server as a
> > > premirror but the recipes are easier to maintain as git urls. Compromise
> > > and use shallow clones for them.
> > >
> > > In order to be effective, we need premirror entries on where to find
> > > the shallow mirror tarballs.
> > >
> > > Signed-off-by: Richard Purdie 
> > > ---
> > >  meta/classes/mirrors.bbclass | 11 +++
> > >  1 file changed, 11 insertions(+)
> > >
> > > diff --git a/meta/classes/mirrors.bbclass b/meta/classes/mirrors.bbclass
> > > index 37dc449ade7..ffdccff5fb4 100644
> > > --- a/meta/classes/mirrors.bbclass
> > > +++ b/meta/classes/mirrors.bbclass
> > > @@ -76,3 +76,14 @@ git://git.gnome.org/.* 
> > > git://gitlab.gnome.org/GNOME/PATH;protocol=https \
> > >  git://.*/.*   git://HOST/PATH;protocol=https \
> > >  git://.*/.*   git://HOST/git/PATH;protocol=https \
> > >  "
> > > +
> > > +# Switch glibc and binutils recipes to use shallow clones as they're 
> > > large and this
> > > +# improves user experience whilst allowing the flexibility of git urls 
> > > in the recipes
> > > +BB_GIT_SHALLOW:pn-binutils = "1"
> > > +BB_GIT_SHALLOW:pn-binutils-cross-${TARGET_ARCH} = "1"
> > > +BB_GIT_SHALLOW:pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "1"
> > > +BB_GIT_SHALLOW:pn-binutils-cross-testsuite = "1"
> > > +BB_GIT_SHALLOW:pn-binutils-crosssdk-${SDK_SYS} = "1"
> > > +BB_GIT_SHALLOW:pn-glibc = "1"
> > > +PREMIRRORS += "git://sourceware.org/git/glibc.git 
> > > https://downloads.yoctoproject.org/mirror/sources/ \
> > > +  git://sourceware.org/git/binutils-gdb.git 
> > > https://downloads.yoctoproject.org/mirror/sources/;
> >
> > Please use PREMIRRORS:append here, or you will wipe away any
> > default configuration of PREMIRRORS defined using "?=".
> 
> No, I'm not using append here since I do want users to be able to reset this.

That can easily be achieved by instead doing something like:

SHALLOW_PREMIRRORS = " \
git://sourceware.org/git/glibc.git 
https://downloads.yoctoproject.org/mirror/sources/ \
git://sourceware.org/git/binutils-gdb.git 
https://downloads.yoctoproject.org/mirror/sources/ \
"
PREMIRRORS:append = " ${SHALLOW_PREMIRRORS}"

which I think is a far better solution anyway since it is very 
hard to reset something in PREMIRRORS as one cannot use :remove.
With this solution it is possible to set SHALLOW_PREMIRRORS = "" 
in case one do not want the mirrors OE-Core adds by default.

Otherwise you are effectively saying that one can no longer define 
a default for PREMIRRORS using ?=, which was possible up until the 
above change. And unless I can persuade you to switch to :append, 
then this needs to be mentioned in the migration notes for 4.0.

> We should change the default to "=" if that is causing an issue.

There is no longer any default in OE-Core (there used to be one 
in poky.conf defined using ??=, but you removed it the other day). 
However, due to that preexisting definition, we use PREMIRRORS ?= 
in our site.conf so that it takes precedence over the default from 
OE-Core (if it exists), while it still defines a default 
configuration.

> Cheers,
> 
> Richard

//Peter


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163840): 
https://lists.openembedded.org/g/openembedded-core/message/163840
Mute This Topic: https://lists.openembedded.org/mt/90129861/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] bind: update to 9.11.37

2022-03-31 Thread Ralph Siemsen
Security Fixes

The rules for acceptance of records into the cache have been tightened
to prevent the possibility of poisoning if forwarders send records
outside the configured bailiwick. (CVE-2021-25220)

License-Update: copyright years

Signed-off-by: Ralph Siemsen 
---
 .../bind/{bind_9.11.36.bb => bind_9.11.37.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-connectivity/bind/{bind_9.11.36.bb => bind_9.11.37.bb} 
(97%)

diff --git a/meta/recipes-connectivity/bind/bind_9.11.36.bb 
b/meta/recipes-connectivity/bind/bind_9.11.37.bb
similarity index 97%
rename from meta/recipes-connectivity/bind/bind_9.11.36.bb
rename to meta/recipes-connectivity/bind/bind_9.11.37.bb
index 872baf6d2f..afc8cf0b3b 100644
--- a/meta/recipes-connectivity/bind/bind_9.11.36.bb
+++ b/meta/recipes-connectivity/bind/bind_9.11.37.bb
@@ -4,7 +4,7 @@ DESCRIPTION = "BIND 9 provides a full-featured Domain Name 
Server system"
 SECTION = "console/network"
 
 LICENSE = "ISC & BSD"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=b88e7ca5f21908e1b2720169f6807cf6"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=89a97ebbf713f7125fe5c02223d3ae95"
 
 DEPENDS = "openssl libcap zlib"
 
@@ -21,7 +21,7 @@ SRC_URI = 
"https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
file://0001-avoid-start-failure-with-bind-user.patch \
"
 
-SRC_URI[sha256sum] = 
"c953fcb6703b395aaa53e65ff8b2869b69a5303dd60507cba2201305e1811681"
+SRC_URI[sha256sum] = 
"0d8efbe7ec166ada90e46add4267b7e7c934790cba9bd5af6b8380a4fbfb5aff"
 
 UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/;
 # stay at 9.11 until 9.16, from 9.16 follow the ESV versions divisible by 4
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163839): 
https://lists.openembedded.org/g/openembedded-core/message/163839
Mute This Topic: https://lists.openembedded.org/mt/90156489/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] base: Don't add duplicates to sys.path

2022-03-31 Thread Ross Burton
Oh, this might explain some weird errors I was having.  See the
de-duplication patch last week or so for oeqa.

Ross

On Thu, 31 Mar 2022 at 12:01, Richard Purdie
 wrote:
>
> We can re-trigger this code and there is little point in stacking a ton of 
> duplicate
> paths which just waste time during searches for modules. This could in theory 
> alter
> layer module search order but that seems unlikely in common use.
>
> Signed-off-by: Richard Purdie 
> ---
>  meta/classes/base.bbclass | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index cc81461473f..e51722d945d 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -20,8 +20,8 @@ PACKAGECONFIG_CONFARGS ??= ""
>  def oe_import(d):
>  import sys
>
> -bbpath = d.getVar("BBPATH").split(":")
> -sys.path[0:0] = [os.path.join(dir, "lib") for dir in bbpath]
> +bbpath = [os.path.join(dir, "lib") for dir in 
> d.getVar("BBPATH").split(":")]
> +sys.path[0:0] = [dir for dir in bbpath if dir not in sys.path]
>
>  def inject(name, value):
>  """Make a python object accessible from the metadata"""
> --
> 2.32.0
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163838): 
https://lists.openembedded.org/g/openembedded-core/message/163838
Mute This Topic: https://lists.openembedded.org/mt/90152116/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 v2] go: backport patch fix for CVE-2021-38297

2022-03-31 Thread Davide Gardenal
Patch taken from
https://github.com/golang/go/commit/4548fcc8dfd933c237f29bba6f90040a85922564
from the following issue
https://github.com/golang/go/issues/48797

Original repo
https://go.googlesource.com/go/+/77f2750f4398990eed972186706f160631d7dae4

Signed-off-by: Davide Gardenal 
---
V2 Update:
 Update go-1.14.inc to the latest revision
 Inline isWasm method to solve compile error
 Thanks to Steve Sakoman for the feedback
---
 meta/recipes-devtools/go/go-1.14.inc  |  4 +
 .../go/go-1.14/CVE-2021-38297.patch   | 97 +++
 2 files changed, 101 insertions(+)
 create mode 100644 meta/recipes-devtools/go/go-1.14/CVE-2021-38297.patch

diff --git a/meta/recipes-devtools/go/go-1.14.inc 
b/meta/recipes-devtools/go/go-1.14.inc
index 9b3c3b30a8..f98757d10d 100644
--- a/meta/recipes-devtools/go/go-1.14.inc
+++ b/meta/recipes-devtools/go/go-1.14.inc
@@ -19,9 +19,13 @@ SRC_URI += "\
 file://CVE-2021-34558.patch \
 file://CVE-2021-33196.patch \
 file://CVE-2021-33197.patch \
+file://CVE-2021-38297.patch \
 file://CVE-2022-23806.patch \
 file://CVE-2022-23772.patch \
 "
+
+# file://CVE-2021-38297.patch
+
 SRC_URI_append_libc-musl = " 
file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
 SRC_URI[main.sha256sum] = 
"7ed13b2209e54a451835997f78035530b331c5b6943cdcd68a3d815fdc009149"
 
diff --git a/meta/recipes-devtools/go/go-1.14/CVE-2021-38297.patch 
b/meta/recipes-devtools/go/go-1.14/CVE-2021-38297.patch
new file mode 100644
index 00..24ceabf808
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.14/CVE-2021-38297.patch
@@ -0,0 +1,97 @@
+From 4548fcc8dfd933c237f29bba6f90040a85922564 Mon Sep 17 00:00:00 2001
+From: Michael Knyszek 
+Date: Thu, 2 Sep 2021 16:51:59 -0400
+Subject: [PATCH] [release-branch.go1.16] misc/wasm, cmd/link: do not let
+ command line args overwrite global data
+
+On Wasm, wasm_exec.js puts command line arguments at the beginning
+of the linear memory (following the "zero page"). Currently there
+is no limit for this, and a very long command line can overwrite
+the program's data section. Prevent this by limiting the command
+line to 4096 bytes, and in the linker ensuring the data section
+starts at a high enough address (8192).
+
+(Arguably our address assignment on Wasm is a bit confusing. This
+is the minimum fix I can come up with.)
+
+Thanks to Ben Lubar for reporting this issue.
+
+Change by Cherry Mui .
+
+For #48797
+Fixes #48799
+Fixes CVE-2021-38297
+
+Change-Id: I0f50fbb2a5b6d0d047e3c134a88988d9133e4ab3
+Reviewed-on: 
https://team-review.git.corp.google.com/c/golang/go-private/+/1205933
+Reviewed-by: Roland Shoemaker 
+Reviewed-by: Than McIntosh 
+Reviewed-on: https://go-review.googlesource.com/c/go/+/354591
+Trust: Michael Knyszek 
+Reviewed-by: Heschi Kreinick 
+
+CVE: CVE-2021-38297
+
+Upstream-Status: Backport:
+https://github.com/golang/go/commit/4548fcc8dfd933c237f29bba6f90040a85922564
+
+Inline of ctxt.isWAsm followin this implemetation:
+https://github.com/golang/go/blob/4548fcc8dfd933c237f29bba6f90040a85922564/src/cmd/link/internal/ld/target.go#L127
+
+Signed-off-by: Davide Gardenal 
+---
+ misc/wasm/wasm_exec.js   |  7 +++
+ src/cmd/link/internal/ld/data.go | 11 ++-
+ 2 files changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/misc/wasm/wasm_exec.js b/misc/wasm/wasm_exec.js
+index 82041e6bb901..a0a264278b1b 100644
+--- a/misc/wasm/wasm_exec.js
 b/misc/wasm/wasm_exec.js
+@@ -564,6 +564,13 @@
+   offset += 8;
+   });
+ 
++  // The linker guarantees global data starts from at 
least wasmMinDataAddr.
++  // Keep in sync with 
cmd/link/internal/ld/data.go:wasmMinDataAddr.
++  const wasmMinDataAddr = 4096 + 4096;
++  if (offset >= wasmMinDataAddr) {
++  throw new Error("command line too long");
++  }
++
+   this._inst.exports.run(argc, argv);
+   if (this.exited) {
+   this._resolveExitPromise();
+diff --git a/src/cmd/link/internal/ld/data.go 
b/src/cmd/link/internal/ld/data.go
+index 52035e96301c..54a1d188cdb9 100644
+--- a/src/cmd/link/internal/ld/data.go
 b/src/cmd/link/internal/ld/data.go
+@@ -2330,6 +2330,11 @@ func assignAddress(ctxt *Link, sect *sym.Section, n 
int, s loader.Sym, va uint64
+   return sect, n, va
+ }
+ 
++// On Wasm, we reserve 4096 bytes for zero page, then 4096 bytes for 
wasm_exec.js
++// to store command line args. Data sections starts from at least address 
8192.
++// Keep in sync with wasm_exec.js.
++const wasmMinDataAddr = 4096 + 4096
++
+ // address assigns virtual addresses to all segments and sections and
+ // returns all segments in file order.
+ func (ctxt *Link) address() []*sym.Segment {
+@@ -2339,10 +2344,14 @@ func (ctxt *Link) address() []*sym.Segment {
+   order = append(order, )
+  

Re: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to use shallow mirror tarballs

2022-03-31 Thread Richard Purdie
On Thu, 2022-03-31 at 14:09 +, Peter Kjellerstedt wrote:
> > -Original Message-
> > From: openembedded-core@lists.openembedded.org
> >  On Behalf Of Richard Purdie
> > Sent: den 30 mars 2022 14:24
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to use
> > shallow mirror tarballs
> > 
> > These two repositories are large and overload our downloads server as a
> > premirror but the recipes are easier to maintain as git urls. Compromise
> > and use shallow clones for them.
> > 
> > In order to be effective, we need premirror entries on where to find
> > the shallow mirror tarballs.
> > 
> > Signed-off-by: Richard Purdie 
> > ---
> >  meta/classes/mirrors.bbclass | 11 +++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/meta/classes/mirrors.bbclass b/meta/classes/mirrors.bbclass
> > index 37dc449ade7..ffdccff5fb4 100644
> > --- a/meta/classes/mirrors.bbclass
> > +++ b/meta/classes/mirrors.bbclass
> > @@ -76,3 +76,14 @@ git://git.gnome.org/.*
> > git://gitlab.gnome.org/GNOME/PATH;protocol=https \
> >  git://.*/.*   git://HOST/PATH;protocol=https \
> >  git://.*/.*   git://HOST/git/PATH;protocol=https \
> >  "
> > +
> > +# Switch glibc and binutils recipes to use shallow clones as they're large
> > and this
> > +# improves user experience whilst allowing the flexibility of git urls in
> > the recipes
> > +BB_GIT_SHALLOW:pn-binutils = "1"
> > +BB_GIT_SHALLOW:pn-binutils-cross-${TARGET_ARCH} = "1"
> > +BB_GIT_SHALLOW:pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "1"
> > +BB_GIT_SHALLOW:pn-binutils-cross-testsuite = "1"
> > +BB_GIT_SHALLOW:pn-binutils-crosssdk-${SDK_SYS} = "1"
> > +BB_GIT_SHALLOW:pn-glibc = "1"
> > +PREMIRRORS += "git://sourceware.org/git/glibc.git
> > https://downloads.yoctoproject.org/mirror/sources/ \
> > +  git://sourceware.org/git/binutils-gdb.git
> > https://downloads.yoctoproject.org/mirror/sources/;
> 
> Please use PREMIRRORS:append here, or you will wipe away any 
> default configuration of PREMIRRORS defined using "?=".

No, I'm not using append here since I do want users to be able to reset this. We
should change the default to "=" if that is causing an issue.

Cheers,

Richard


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163836): 
https://lists.openembedded.org/g/openembedded-core/message/163836
Mute This Topic: https://lists.openembedded.org/mt/90129861/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 RFC] mirrors: Switch glibc and binutils to use shallow mirror tarballs

2022-03-31 Thread Peter Kjellerstedt
> -Original Message-
> From: openembedded-core@lists.openembedded.org 
>  On Behalf Of Richard Purdie
> Sent: den 30 mars 2022 14:24
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH RFC] mirrors: Switch glibc and binutils to use 
> shallow mirror tarballs
> 
> These two repositories are large and overload our downloads server as a
> premirror but the recipes are easier to maintain as git urls. Compromise
> and use shallow clones for them.
> 
> In order to be effective, we need premirror entries on where to find
> the shallow mirror tarballs.
> 
> Signed-off-by: Richard Purdie 
> ---
>  meta/classes/mirrors.bbclass | 11 +++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/meta/classes/mirrors.bbclass b/meta/classes/mirrors.bbclass
> index 37dc449ade7..ffdccff5fb4 100644
> --- a/meta/classes/mirrors.bbclass
> +++ b/meta/classes/mirrors.bbclass
> @@ -76,3 +76,14 @@ git://git.gnome.org/.* 
> git://gitlab.gnome.org/GNOME/PATH;protocol=https \
>  git://.*/.*   git://HOST/PATH;protocol=https \
>  git://.*/.*   git://HOST/git/PATH;protocol=https \
>  "
> +
> +# Switch glibc and binutils recipes to use shallow clones as they're large 
> and this
> +# improves user experience whilst allowing the flexibility of git urls in 
> the recipes
> +BB_GIT_SHALLOW:pn-binutils = "1"
> +BB_GIT_SHALLOW:pn-binutils-cross-${TARGET_ARCH} = "1"
> +BB_GIT_SHALLOW:pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "1"
> +BB_GIT_SHALLOW:pn-binutils-cross-testsuite = "1"
> +BB_GIT_SHALLOW:pn-binutils-crosssdk-${SDK_SYS} = "1"
> +BB_GIT_SHALLOW:pn-glibc = "1"
> +PREMIRRORS += "git://sourceware.org/git/glibc.git 
> https://downloads.yoctoproject.org/mirror/sources/ \
> +  git://sourceware.org/git/binutils-gdb.git 
> https://downloads.yoctoproject.org/mirror/sources/;

Please use PREMIRRORS:append here, or you will wipe away any 
default configuration of PREMIRRORS defined using "?=".

> --
> 2.32.0

//Peter


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163835): 
https://lists.openembedded.org/g/openembedded-core/message/163835
Mute This Topic: https://lists.openembedded.org/mt/90129861/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 20/20] lttng-modules: upgrade 2.12.7 -> 2.12.8

2022-03-31 Thread Anuj Mittal
Signed-off-by: Anuj Mittal 
---
 .../lttng/{lttng-modules_2.12.7.bb => lttng-modules_2.12.8.bb}  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-kernel/lttng/{lttng-modules_2.12.7.bb => 
lttng-modules_2.12.8.bb} (94%)

diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.12.7.bb 
b/meta/recipes-kernel/lttng/lttng-modules_2.12.8.bb
similarity index 94%
rename from meta/recipes-kernel/lttng/lttng-modules_2.12.7.bb
rename to meta/recipes-kernel/lttng/lttng-modules_2.12.8.bb
index 5eb3902bb3..eff97f27af 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.12.7.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.12.8.bb
@@ -13,7 +13,7 @@ SRC_URI = 
"https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
"
 
-SRC_URI[sha256sum] = 
"32ab2d17d513cd2f458f8844c66a0d013283301fc7329b55d6503153cf8cb253"
+SRC_URI[sha256sum] = 
"1302005a982fd4a15cc4843866971008546939f65660023d7762aa046d4b9213"
 
 export INSTALL_MOD_DIR="kernel/lttng-modules"
 
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163834): 
https://lists.openembedded.org/g/openembedded-core/message/163834
Mute This Topic: https://lists.openembedded.org/mt/90154705/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 19/20] zlib: backport the fix for CVE-2018-25032

2022-03-31 Thread Anuj Mittal
From: Ross Burton 

Signed-off-by: Ross Burton 
Signed-off-by: Anuj Mittal 
---
 .../zlib/zlib/CVE-2018-25032.patch| 347 ++
 meta/recipes-core/zlib/zlib_1.2.11.bb |   1 +
 2 files changed, 348 insertions(+)
 create mode 100644 meta/recipes-core/zlib/zlib/CVE-2018-25032.patch

diff --git a/meta/recipes-core/zlib/zlib/CVE-2018-25032.patch 
b/meta/recipes-core/zlib/zlib/CVE-2018-25032.patch
new file mode 100644
index 00..5cb6183641
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib/CVE-2018-25032.patch
@@ -0,0 +1,347 @@
+CVE: CVE-2018-25032
+Upstream-Status: Backport
+Signed-off-by: Ross Burton 
+
+From 5c44459c3b28a9bd3283aaceab7c615f8020c531 Mon Sep 17 00:00:00 2001
+From: Mark Adler 
+Date: Tue, 17 Apr 2018 22:09:22 -0700
+Subject: [PATCH] Fix a bug that can crash deflate on some input when using
+ Z_FIXED.
+
+This bug was reported by Danilo Ramos of Eideticom, Inc. It has
+lain in wait 13 years before being found! The bug was introduced
+in zlib 1.2.2.2, with the addition of the Z_FIXED option. That
+option forces the use of fixed Huffman codes. For rare inputs with
+a large number of distant matches, the pending buffer into which
+the compressed data is written can overwrite the distance symbol
+table which it overlays. That results in corrupted output due to
+invalid distances, and can result in out-of-bound accesses,
+crashing the application.
+
+The fix here combines the distance buffer and literal/length
+buffers into a single symbol buffer. Now three bytes of pending
+buffer space are opened up for each literal or length/distance
+pair consumed, instead of the previous two bytes. This assures
+that the pending buffer cannot overwrite the symbol table, since
+the maximum fixed code compressed length/distance is 31 bits, and
+since there are four bytes of pending space for every three bytes
+of symbol space.
+---
+ deflate.c | 74 ---
+ deflate.h | 25 +--
+ trees.c   | 50 +++--
+ 3 files changed, 79 insertions(+), 70 deletions(-)
+
+diff --git a/deflate.c b/deflate.c
+index 425babc00..19cba873a 100644
+--- a/deflate.c
 b/deflate.c
+@@ -255,11 +255,6 @@ int ZEXPORT deflateInit2_(strm, level, method, 
windowBits, memLevel, strategy,
+ int wrap = 1;
+ static const char my_version[] = ZLIB_VERSION;
+ 
+-ushf *overlay;
+-/* We overlay pending_buf and d_buf+l_buf. This works since the average
+- * output size for (length,distance) codes is <= 24 bits.
+- */
+-
+ if (version == Z_NULL || version[0] != my_version[0] ||
+ stream_size != sizeof(z_stream)) {
+ return Z_VERSION_ERROR;
+@@ -329,9 +324,47 @@ int ZEXPORT deflateInit2_(strm, level, method, 
windowBits, memLevel, strategy,
+ 
+ s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
+ 
+-overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
+-s->pending_buf = (uchf *) overlay;
+-s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
++/* We overlay pending_buf and sym_buf. This works since the average size
++ * for length/distance pairs over any compressed block is assured to be 31
++ * bits or less.
++ *
++ * Analysis: The longest fixed codes are a length code of 8 bits plus 5
++ * extra bits, for lengths 131 to 257. The longest fixed distance codes 
are
++ * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest
++ * possible fixed-codes length/distance pair is then 31 bits total.
++ *
++ * sym_buf starts one-fourth of the way into pending_buf. So there are
++ * three bytes in sym_buf for every four bytes in pending_buf. Each symbol
++ * in sym_buf is three bytes -- two for the distance and one for the
++ * literal/length. As each symbol is consumed, the pointer to the next
++ * sym_buf value to read moves forward three bytes. From that symbol, up 
to
++ * 31 bits are written to pending_buf. The closest the written pending_buf
++ * bits gets to the next sym_buf symbol to read is just before the last
++ * code is written. At that time, 31*(n-2) bits have been written, just
++ * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at
++ * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1
++ * symbols are written.) The closest the writing gets to what is unread is
++ * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and
++ * can range from 128 to 32768.
++ *
++ * Therefore, at a minimum, there are 142 bits of space between what is
++ * written and what is read in the overlain buffers, so the symbols cannot
++ * be overwritten by the compressed data. That space is actually 139 bits,
++ * due to the three-bit fixed-code block header.
++ *
++ * That covers the case where either Z_FIXED is specified, forcing fixed
++ * codes, or when the use 

[OE-core] [hardknott][PATCH 18/20] python3-numpy: fix CVE-2021-41496

2022-03-31 Thread Anuj Mittal
From: Mingli Yu 

Backport patch [1] to fix CVE-2021-41496.

[1] 
https://github.com/numpy/numpy/commit/271010f1037150e95017f803f4214b8861e528f2

Signed-off-by: Mingli Yu 
Signed-off-by: Anuj Mittal 
---
 .../python-numpy/files/CVE-2021-41496.patch   | 64 +++
 .../python-numpy/python3-numpy_1.20.1.bb  |  1 +
 2 files changed, 65 insertions(+)
 create mode 100644 
meta/recipes-devtools/python-numpy/files/CVE-2021-41496.patch

diff --git a/meta/recipes-devtools/python-numpy/files/CVE-2021-41496.patch 
b/meta/recipes-devtools/python-numpy/files/CVE-2021-41496.patch
new file mode 100644
index 00..0afc79ae0d
--- /dev/null
+++ b/meta/recipes-devtools/python-numpy/files/CVE-2021-41496.patch
@@ -0,0 +1,64 @@
+From 86d81322c5c0ab67f89d64f56f6e77d4fe185910 Mon Sep 17 00:00:00 2001
+From: Warren Weckesser 
+Date: Tue, 29 Mar 2022 15:58:00 +0800
+Subject: [PATCH] BUG: f2py: Simplify creation of an exception message. Closes
+ gh-19000.
+
+CVE: CVE-2021-41496
+
+Upstream-Status: Backport 
[https://github.com/numpy/numpy/commit/271010f1037150e95017f803f4214b8861e528f2]
+
+Signed-off-by: Mingli Yu 
+---
+ numpy/f2py/src/fortranobject.c | 26 --
+ 1 file changed, 12 insertions(+), 14 deletions(-)
+
+diff --git a/numpy/f2py/src/fortranobject.c b/numpy/f2py/src/fortranobject.c
+index 3275f90..85c9c7f 100644
+--- a/numpy/f2py/src/fortranobject.c
 b/numpy/f2py/src/fortranobject.c
+@@ -637,14 +637,14 @@ static int check_and_fix_dimensions(const PyArrayObject* 
arr,
+ npy_intp *dims);
+ 
+ static int
+-count_negative_dimensions(const int rank,
++find_first_negative_dimension(const int rank,
+   const npy_intp *dims) {
+-int i=0,r=0;
+-while (i 0) {
+-int i;
+-strcpy(mess, "failed to create intent(cache|hide)|optional array"
+-   "-- must have defined dimensions but got (");
+-for(i=0;i= 0) {
++PyErr_Format(PyExc_ValueError,
++ "failed to create intent(cache|hide)|optional array"
++ " -- must have defined dimensions, but dims[%d] = %"
++ NPY_INTP_FMT, i, dims[i]);
+ return NULL;
+ }
+ arr = (PyArrayObject *)
+-- 
+2.25.1
+
diff --git a/meta/recipes-devtools/python-numpy/python3-numpy_1.20.1.bb 
b/meta/recipes-devtools/python-numpy/python3-numpy_1.20.1.bb
index 6c3b886782..9e55e74d2c 100644
--- a/meta/recipes-devtools/python-numpy/python3-numpy_1.20.1.bb
+++ b/meta/recipes-devtools/python-numpy/python3-numpy_1.20.1.bb
@@ -10,6 +10,7 @@ SRCNAME = "numpy"
 SRC_URI = 
"https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz
 \

file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
file://0001-numpy-core-Define-RISCV-32-support.patch \
+   file://CVE-2021-41496.patch \
file://run-ptest \
 "
 SRC_URI[sha256sum] = 
"9bf51d69ebb4ca9239e55bedc2185fe2c0ec222da0adee7ece4125414676846d"
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163832): 
https://lists.openembedded.org/g/openembedded-core/message/163832
Mute This Topic: https://lists.openembedded.org/mt/90154702/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 17/20] epiphany: fix CVEs

2022-03-31 Thread Anuj Mittal
From: Mingli Yu 

Backport patch [1] to fix below CVEs:
 - CVE-2021-45085
 - CVE-2021-45086
 - CVE-2021-45087
 - CVE-2021-45088

[1] 
https://sources.debian.org/data/main/e/epiphany-browser/3.38.2-1+deb11u2/debian/patches/encode-untrusted-data.patch

Signed-off-by: Mingli Yu 
Signed-off-by: Anuj Mittal 
---
 .../recipes-gnome/epiphany/epiphany_3.38.2.bb |   1 +
 .../files/encode-untrusted-data.patch | 707 ++
 2 files changed, 708 insertions(+)
 create mode 100644 
meta/recipes-gnome/epiphany/files/encode-untrusted-data.patch

diff --git a/meta/recipes-gnome/epiphany/epiphany_3.38.2.bb 
b/meta/recipes-gnome/epiphany/epiphany_3.38.2.bb
index 04f340f133..72d116da69 100644
--- a/meta/recipes-gnome/epiphany/epiphany_3.38.2.bb
+++ b/meta/recipes-gnome/epiphany/epiphany_3.38.2.bb
@@ -18,6 +18,7 @@ SRC_URI = 
"${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}
file://0002-help-meson.build-disable-the-use-of-yelp.patch \
file://migrator.patch \
file://distributor.patch \
+   file://encode-untrusted-data.patch \
"
 SRC_URI[archive.sha256sum] = 
"8b05f2bcc1e80ecf4a10f6f01b3285087eb4cbdf5741dffb8c0355715ef5116d"
 
diff --git a/meta/recipes-gnome/epiphany/files/encode-untrusted-data.patch 
b/meta/recipes-gnome/epiphany/files/encode-untrusted-data.patch
new file mode 100644
index 00..4805ee4e6b
--- /dev/null
+++ b/meta/recipes-gnome/epiphany/files/encode-untrusted-data.patch
@@ -0,0 +1,707 @@
+From: Michael Catanzaro 
+Subject: Properly encode untrusted data when injecting into trusted pages
+
+CVE: CVE-2021-45085 CVE-2021-45086 CVE-2021-45087 CVE-2021-45088
+
+Upstream-Status: Backport 
[https://gitlab.gnome.org/GNOME/epiphany/-/compare/c27a8180e12e6ec92292dcf53b9243815ad9aa2e...abac58c5191b7d653fbefa8d44e5c2bd4d002825?from_project_id=1906]
+
+Signed-off-by: Mingli Yu 
+Index: epiphany-browser/embed/ephy-about-handler.c
+===
+--- epiphany-browser.orig/embed/ephy-about-handler.c
 epiphany-browser/embed/ephy-about-handler.c
+@@ -27,6 +27,7 @@
+ #include "ephy-file-helpers.h"
+ #include "ephy-flatpak-utils.h"
+ #include "ephy-history-service.h"
++#include "ephy-output-encoding.h"
+ #include "ephy-prefs.h"
+ #include "ephy-settings.h"
+ #include "ephy-smaps.h"
+@@ -263,16 +264,34 @@ handle_applications_finished_cb (EphyAbo
+ 
+ for (p = applications; p; p = p->next) {
+   EphyWebApplication *app = (EphyWebApplication *)p->data;
+-
++  g_autofree char *html_encoded_id = NULL;
++  g_autofree char *encoded_icon_url = NULL;
++  g_autofree char *encoded_name = NULL;
++  g_autofree char *encoded_url = NULL;
++  g_autofree char *js_encoded_id = NULL;
++  g_autofree char *encoded_install_date = NULL;
++
++  /* Most of these fields are untrusted. The web app suggests its own 
title,
++   * which gets used in the app ID and icon URL. The main URL could 
contain
++   * anything. Install date is the only trusted field here in that it's
++   * constructed by Epiphany, but it's a freeform string and we're 
encoding
++   * everything else here anyway, so might as well encode this too.
++   */
++  html_encoded_id = ephy_encode_for_html_attribute (app->id);
++  encoded_icon_url = ephy_encode_for_html_attribute (app->icon_url);
++  encoded_name = ephy_encode_for_html_entity (app->name);
++  encoded_url = ephy_encode_for_html_entity (app->url);
++  js_encoded_id = ephy_encode_for_javascript (app->id);
++  encoded_install_date = ephy_encode_for_html_entity (app->install_date);
+   g_string_append_printf (data_str,
+   ""
+   ""
+   "%s%s"
+   ""
+   "%s  
%s",
+-  app->id, app->icon_url, app->name, app->url, 
_("Delete"), app->id,
++  html_encoded_id, encoded_icon_url, 
encoded_name, encoded_url, _("Delete"), js_encoded_id,
+   /* Note for translators: this refers to the 
installation date. */
+-  _("Installed on:"), app->install_date);
++  _("Installed on:"), encoded_install_date);
+ }
+ 
+ g_string_append (data_str, "");
+@@ -407,7 +426,9 @@ history_service_query_urls_cb (EphyHisto
+ EphyHistoryURL *url = (EphyHistoryURL *)l->data;
+ const char *snapshot;
+ g_autofree char *thumbnail_style = NULL;
+-g_autofree char *markup = NULL;
++g_autofree char *entity_encoded_title = NULL;
++g_autofree char *attribute_encoded_title = NULL;
++g_autofree char *encoded_url = NULL;
+ 
+ snapshot = ephy_snapshot_service_lookup_cached_snapshot_path 
(snapshot_service, url->url);
+ if (snapshot)
+@@ -415,15 +436,19 @@ history_service_query_urls_cb (EphyHisto
+ else
+   

[OE-core] [hardknott][PATCH 16/20] flac: fix CVE-2021-0561

2022-03-31 Thread Anuj Mittal
From: Li Wang 

In append_to_verify_fifo_interleaved_ of stream_encoder.c, there is
a possible out of bounds write due to a missing bounds check. This
could lead to local information disclosure with no additional
execution privileges needed. User interaction is not needed for
exploitation.Product: AndroidVersions: Android-11Android ID: A-174302683

References:
https://nvd.nist.gov/vuln/detail/CVE-2021-0561

Upstream patches:
https://github.com/xiph/flac/commit/e1575e4a7c5157cbf4e4a16dbd39b74f7174c7be

Signed-off-by: Li Wang 
Signed-off-by: Joe Slater 
Signed-off-by: Anuj Mittal 
---
 .../flac/flac/CVE-2021-0561.patch | 41 +++
 meta/recipes-multimedia/flac/flac_1.3.3.bb|  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta/recipes-multimedia/flac/flac/CVE-2021-0561.patch

diff --git a/meta/recipes-multimedia/flac/flac/CVE-2021-0561.patch 
b/meta/recipes-multimedia/flac/flac/CVE-2021-0561.patch
new file mode 100644
index 00..b48663ae42
--- /dev/null
+++ b/meta/recipes-multimedia/flac/flac/CVE-2021-0561.patch
@@ -0,0 +1,41 @@
+From e1575e4a7c5157cbf4e4a16dbd39b74f7174c7be Mon Sep 17 00:00:00 2001
+From: Neelkamal Semwal 
+Date: Fri, 18 Dec 2020 22:28:36 +0530
+Subject: [PATCH] libFlac: Exit at EOS in verify mode
+
+When verify mode is enabled, once decoder flags end of stream,
+encode processing is considered complete.
+
+CVE-2021-0561
+
+Signed-off-by: Ralph Giles 
+
+Upstream-Status: Backport
+CVE: CVE-2021-0561
+
+Reference to upstream patch:
+https://github.com/xiph/flac/commit/e1575e4a7c5157cbf4e4a16dbd39b74f7174c7be
+
+Signed-off-by: Li Wang 
+---
+ src/libFLAC/stream_encoder.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c
+index 74387ec..8bb0ef3 100644
+--- a/src/libFLAC/stream_encoder.c
 b/src/libFLAC/stream_encoder.c
+@@ -2610,7 +2610,9 @@ FLAC__bool write_bitbuffer_(FLAC__StreamEncoder 
*encoder, uint32_t samples, FLAC
+   encoder->private_->verify.needs_magic_hack = true;
+   }
+   else {
+-  
if(!FLAC__stream_decoder_process_single(encoder->private_->verify.decoder)) {
++  
if(!FLAC__stream_decoder_process_single(encoder->private_->verify.decoder)
++  || (!is_last_block
++  && 
(FLAC__stream_encoder_get_verify_decoder_state(encoder) == 
FLAC__STREAM_DECODER_END_OF_STREAM))) {
+   
FLAC__bitwriter_release_buffer(encoder->private_->frame);
+   FLAC__bitwriter_clear(encoder->private_->frame);
+   if(encoder->protected_->state != 
FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA)
+-- 
+2.23.0
+
diff --git a/meta/recipes-multimedia/flac/flac_1.3.3.bb 
b/meta/recipes-multimedia/flac/flac_1.3.3.bb
index cb6692aedf..d3c352cc44 100644
--- a/meta/recipes-multimedia/flac/flac_1.3.3.bb
+++ b/meta/recipes-multimedia/flac/flac_1.3.3.bb
@@ -15,6 +15,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \
 DEPENDS = "libogg"
 
 SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \
+   file://CVE-2021-0561.patch \
 "
 
 SRC_URI[md5sum] = "26703ed2858c1fc9ffc05136d13daa69"
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163830): 
https://lists.openembedded.org/g/openembedded-core/message/163830
Mute This Topic: https://lists.openembedded.org/mt/90154699/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 13/20] linux-yocto/5.10: cfg/debug: add configs for kcsan

2022-03-31 Thread Anuj Mittal
From: Bruce Ashfield 

Integrating the following commit(s) to linux-yocto/.:

b56db30a7c5 cfg/debug: add scc for syzkaller fuzzing
c4494ad7f23 features/tun: add configs for Universal TUN/TAP device driver 
support
148948c3829 features/bluetooth: add configs for Bluetooth Virtual HCI 
device driver
824a7ba4dda features/usb: add configs for USB raw gadget
0bd038864a5 features/usb: add configs for dummy HCD
e8c765f559f features/ieee802154: add configs for mac802154 hwsim
99aea8bc07b features/mac80211: add configs for mac80211 hwsim
c7bf42227e3 cfg/debug: add configs for fault injection debugfs
ae48b977f61 cfg/debug: add configs for kcsan

Signed-off-by: Ovidiu Panait 
Signed-off-by: Bruce Ashfield 
Signed-off-by: Alexandre Belloni 
(cherry picked from commit 88a761c98d3a4dbf5a8b2b623248b53077717662)
Signed-off-by: Anuj Mittal 
---
 meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb   | 2 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb | 2 +-
 meta/recipes-kernel/linux/linux-yocto_5.10.bb  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
index a35e80940e..804773b0ec 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
@@ -12,7 +12,7 @@ python () {
 }
 
 SRCREV_machine ?= "e0d87d9831a6e0df20a370adc9aba0d032d91661"
-SRCREV_meta ?= "b814c7ebf2a92fc361bcbeaf6efdd40b8cd0816a"
+SRCREV_meta ?= "b56db30a7c5a0d86ccc853ee68be925086318f88"
 
 SRC_URI = 
"git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \

git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb 
b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
index 45cfd90e0a..3b1741322d 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
@@ -17,7 +17,7 @@ KCONF_BSP_AUDIT_LEVEL = "2"
 
 SRCREV_machine_qemuarm ?= "38f8b1b5b87959e6cb9367151e233d27befe015d"
 SRCREV_machine ?= "cc70f051e56005acda2e6ea994cadfb2538e66f6"
-SRCREV_meta ?= "b814c7ebf2a92fc361bcbeaf6efdd40b8cd0816a"
+SRCREV_meta ?= "b56db30a7c5a0d86ccc853ee68be925086318f88"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.10.bb 
b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
index fdc985af13..2b30a92b96 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
@@ -23,7 +23,7 @@ SRCREV_machine_qemux86 ?= 
"e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
 SRCREV_machine_qemux86-64 ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
 SRCREV_machine_qemumips64 ?= "a1b43f69bce61143dd4d6d637f619eadd3fabb6e"
 SRCREV_machine ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
-SRCREV_meta ?= "b814c7ebf2a92fc361bcbeaf6efdd40b8cd0816a"
+SRCREV_meta ?= "b56db30a7c5a0d86ccc853ee68be925086318f88"
 
 # remap qemuarm to qemuarma15 for the 5.8 kernel
 # KMACHINE_qemuarm ?= "qemuarma15"
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163828): 
https://lists.openembedded.org/g/openembedded-core/message/163828
Mute This Topic: https://lists.openembedded.org/mt/90154697/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 15/20] linux-yocto/5.10: update to v5.10.107

2022-03-31 Thread Anuj Mittal
From: Bruce Ashfield 

Updating linux-yocto/5.10 to the latest korg -stable release that comprises
the following commits:

4c8814277b5d Linux 5.10.107
7a0d13ef67a1 arm64: kvm: Fix copy-and-paste error in bhb templates for 
v5.10 stable
dc1163203ae6 io_uring: return back safer resurrect
8fdaab341bad kselftest/vm: fix tests build with old libc
2490695ffdba sfc: extend the locking on mcdi->seqno
2fad5b694896 tcp: make tcp_read_sock() more robust
3f9a8f8a952c nl80211: Update bss channel on channel switch for P2P_CLIENT
0ba557d33094 drm/vrr: Set VRR capable prop only if it is attached to 
connector
9a8e4a5c5b73 iwlwifi: don't advertise TWT support
c5ea0221c816 atm: firestream: check the return value of ioremap() in 
fs_init()
efdd92c18ed4 can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN 
device when fully ready
ebe106eac686 ARM: 9178/1: fix unmet dependency on BITREVERSE for 
HAVE_ARCH_BITREVERSE
e8ad9ecc4069 MIPS: smp: fill in sibling and core maps earlier
8c70b9b47004 mac80211: refuse aggregations sessions before authorized
d687d7559e24 ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
6f0a94931c47 ARM: dts: rockchip: reorder rk322x hmdi clocks
6493c6aa8b44 arm64: dts: agilex: use the compatible 
"intel,socfpga-agilex-hsotg"
c5c8c649fee0 arm64: dts: rockchip: reorder rk3399 hdmi clocks
f7f062919f41 arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal 
integrity
ca142038a54f xfrm: Fix xfrm migrate issues when address family changes
d8889a445b53 xfrm: Check if_id in xfrm_migrate
6056abc99b58 sctp: fix the processing for INIT chunk
bdf0316982f0 Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
327f1e7d813c Linux 5.10.106
648895da69ce watch_queue: Fix filter limit check
8bb5b72dbd9a ARM: fix Thumb2 regression with Spectre BHB
6b1249db9e1c ext4: add check to prevent attempting to resize an fs with 
sparse_super2
b297cf764d8c x86/traps: Mark do_int3() NOKPROBE_SYMBOL
29f6f3500127 x86/boot: Add setup_indirect support in 
early_memremap_is_setup_data()
b3444e5b640a x86/boot: Fix memremap of setup_indirect structures
24d268130e3c watch_queue: Make comment about setting ->defunct more accurate
ec03510e0a77 watch_queue: Fix lack of barrier/sync/lock between post and 
read
06ab8444392a watch_queue: Free the alloc bitmap when the watch_queue is 
torn down
880acbb718e1 watch_queue: Fix the alloc bitmap size to reflect notes 
allocated
e2b52ca4988e watch_queue: Fix to always request a pow-of-2 pipe ring size
2039900aadba watch_queue: Fix to release page in ->release()
d729d4e99fb8 watch_queue, pipe: Free watchqueue state after clearing pipe 
ring
573a3228ca32 virtio: acknowledge all features before access
bf52b627cf47 virtio: unexport virtio_finalize_features
8bfb959ea28d arm64: dts: marvell: armada-37xx: Remap IO space to bus 
address 0x0
1ef5fe3dba2a riscv: Fix auipc+jalr relocation range checks
a69aa422b478 mmc: meson: Fix usage of meson_mmc_post_req()
0c6eeaf8c168 net: macb: Fix lost RX packet wakeup race in NAPI receive
6d9700b44509 staging: gdm724x: fix use after free in gdm_lte_rx()
8c1bc04c8c82 staging: rtl8723bs: Fix access-point mode deadlock
ab5595b45f73 fuse: fix pipe buffer lifetime for direct_io
f2c52a4baf56 ARM: Spectre-BHB: provide empty stub for non-config
f1f5d089fcc6 selftests/memfd: clean up mapping in mfd_fail_write
71013d071b50 selftest/vm: fix map_fixed_noreplace test failure
8d276f10e84a tracing: Ensure trace buffer is at least 4096 bytes large
ae7597b47dda ipv6: prevent a possible race condition with lifetimes
8c0c50e9fcff Revert "xen-netback: Check for hotplug-status existence before 
watching"
625c04b523ca Revert "xen-netback: remove 'hotplug-status' once it has 
served its purpose"
a0e2768fb901 gpio: Return EPROBE_DEFER if gc->to_irq is NULL
65d4e9d130fb hwmon: (pmbus) Clear pmbus fault/warning bits after read
d15c9f6e3335 net-sysfs: add check for netdevice being present to speed_show
8c023c303978 spi: rockchip: terminate dma transmission when slave abort
889254f98e99 spi: rockchip: Fix error in getting num-cs property
4fb9be675be8 selftests/bpf: Add test for bpf_timer overwriting crash
dc1c2b47b539 net: bcmgenet: Don't claim WOL when its not available
b7e4d9ba2ddb sctp: fix kernel-infoleak for SCTP sockets
3cf533f12001 net: phy: DP83822: clear MISR2 register to disable interrupts
21044e679ed5 gianfar: ethtool: Fix refcount leak in gfar_get_ts_info
3a4cd1c51eea gpio: ts4900: Do not set DAT and OE together
7702e7e9e396 selftests: pmtu.sh: Kill tcpdump processes launched by 
subshell.
2b1c85f56512 NFC: port100: fix use-after-free in port100_send_complete
1fdabf2cf42b net/mlx5e: Lag, Only handle events from highest priority 
multipath entry
f3331bc17449 net/mlx5: Fix a race on command flush flow
 

[OE-core] [hardknott][PATCH 14/20] linux-yocto-rt/5.10: update to -rt61

2022-03-31 Thread Anuj Mittal
From: Bruce Ashfield 

Integrating the following commit(s) to linux-yocto-rt/5.10:

48b12b48c110 Linux 5.10.90-rt61
2367f287812f aio: Fix incorrect usage of eventfd_signal_allowed()
640f56f85c08 stop_machine: Remove this_cpu_ptr() from print_stop_info().
38c47ed56da8 eventfd: Make signal recursion protection a task bit
45f3f3c787e3 Linux 5.10.90-rt60
257f82607c82 Linux 5.10.87-rt59
7ff031bb6566 Linux 5.10.83-rt58
03cfb1aadc5e Linux 5.10.80-rt57

Signed-off-by: Bruce Ashfield 
Signed-off-by: Alexandre Belloni 
(cherry picked from commit a201b82e999d2216fc58bd8db405bb06c9f22ff5)
Signed-off-by: Anuj Mittal 
---
 .../linux/linux-yocto-rt_5.10.bb  |  4 ++--
 .../linux/linux-yocto-tiny_5.10.bb|  6 ++---
 meta/recipes-kernel/linux/linux-yocto_5.10.bb | 22 +--
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
index 804773b0ec..a11d0515e3 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
@@ -11,8 +11,8 @@ python () {
 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to 
linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "e0d87d9831a6e0df20a370adc9aba0d032d91661"
-SRCREV_meta ?= "b56db30a7c5a0d86ccc853ee68be925086318f88"
+SRCREV_machine ?= "48b12b48c1103b811263aaed4d81bfb8b24fdfc4"
+SRCREV_meta ?= "cec5f94cd2090d98b2dcfeee7a4258ae6adce506"
 
 SRC_URI = 
"git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \

git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb 
b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
index 3b1741322d..5365301045 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine_qemuarm ?= "38f8b1b5b87959e6cb9367151e233d27befe015d"
-SRCREV_machine ?= "cc70f051e56005acda2e6ea994cadfb2538e66f6"
-SRCREV_meta ?= "b56db30a7c5a0d86ccc853ee68be925086318f88"
+SRCREV_machine_qemuarm ?= "3c9683e7166044d91c0ef900491f2f881a8bd6b7"
+SRCREV_machine ?= "7f3e78220d6510de21d74e3f330f1f93cb635745"
+SRCREV_meta ?= "cec5f94cd2090d98b2dcfeee7a4258ae6adce506"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.10.bb 
b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
index 2b30a92b96..64dbdc826a 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
@@ -13,17 +13,17 @@ KBRANCH_qemux86  ?= "v5.10/standard/base"
 KBRANCH_qemux86-64 ?= "v5.10/standard/base"
 KBRANCH_qemumips64 ?= "v5.10/standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "74469c4b03f62e4b4da066e52785ed74b1d121ae"
-SRCREV_machine_qemuarm64 ?= "69f185342f516efa8a9233e31d2c3f8356b3a388"
-SRCREV_machine_qemumips ?= "d97607700b2fba19af10b2110b99c448ed9a88e9"
-SRCREV_machine_qemuppc ?= "090085d4bb6181c3b972d82c9f8f7ed88c90ad6b"
-SRCREV_machine_qemuriscv64 ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
-SRCREV_machine_qemuriscv32 ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
-SRCREV_machine_qemux86 ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
-SRCREV_machine_qemux86-64 ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
-SRCREV_machine_qemumips64 ?= "a1b43f69bce61143dd4d6d637f619eadd3fabb6e"
-SRCREV_machine ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
-SRCREV_meta ?= "b56db30a7c5a0d86ccc853ee68be925086318f88"
+SRCREV_machine_qemuarm ?= "ed7ac660431f6eb29add763876d7a10b6a6e539e"
+SRCREV_machine_qemuarm64 ?= "9ca22664eb7cd86b7c91770bdaa1c5581a081938"
+SRCREV_machine_qemumips ?= "4d5c2b576ee19c6ede626f2ffdb6a96d06ddd065"
+SRCREV_machine_qemuppc ?= "54e5ceedcce6039a0479eaeea000e3c42cf4e4bc"
+SRCREV_machine_qemuriscv64 ?= "0370165abaa08fa66808c54ed345eb70a558268b"
+SRCREV_machine_qemuriscv32 ?= "0370165abaa08fa66808c54ed345eb70a558268b"
+SRCREV_machine_qemux86 ?= "0370165abaa08fa66808c54ed345eb70a558268b"
+SRCREV_machine_qemux86-64 ?= "0370165abaa08fa66808c54ed345eb70a558268b"
+SRCREV_machine_qemumips64 ?= "012ce81097a4d2d94a7d5cb596fb4ad7d8f438f1"
+SRCREV_machine ?= "0370165abaa08fa66808c54ed345eb70a558268b"
+SRCREV_meta ?= "cec5f94cd2090d98b2dcfeee7a4258ae6adce506"
 
 # remap qemuarm to qemuarma15 for the 5.8 kernel
 # KMACHINE_qemuarm ?= "qemuarma15"
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163827): 
https://lists.openembedded.org/g/openembedded-core/message/163827
Mute This Topic: https://lists.openembedded.org/mt/90154696/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 00/20] Patch review

2022-03-31 Thread Anuj Mittal
Final set of changes before 3.3.6 is built. Please review.

No issues seen while testing on autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/3452

Thanks,

Anuj

The following changes since commit bcef80623f015c006778edee5cf40dad063e51db:

  wic: Use custom kernel path if provided (2022-03-15 23:00:09 +0800)

are available in the Git repository at:

  git://push.openembedded.org/openembedded-core-contrib anujm/hardknott

Alexander Kanavin (1):
  mobile-broadband-provider-info: upgrade 20201225 -> 20210805

Anuj Mittal (1):
  lttng-modules: upgrade 2.12.7 -> 2.12.8

Bruce Ashfield (5):
  linux-yocto: nohz_full boot arg fix
  linux-yocto/5.10: split vtpm for more granular inclusion
  linux-yocto/5.10: cfg/debug: add configs for kcsan
  linux-yocto-rt/5.10: update to -rt61
  linux-yocto/5.10: update to v5.10.107

Changhyeok Bae (1):
  mobile-broadband-provider-info: upgrade 20210805 -> 20220315

Chee Yang Lee (2):
  webkitgtk : update to 2.30.6
  go: update to 1.16.15

Joe Slater (2):
  libxml2: Fix CVE-2022-23308
  zip: modify when match.S is built

Li Wang (1):
  flac: fix CVE-2021-0561

Mingli Yu (2):
  epiphany: fix CVEs
  python3-numpy: fix CVE-2021-41496

Minjae Kim (2):
  gnu-config: update SRC_URI
  virglrenderer: update SRC_URI

Ovidiu Panait (1):
  openssl: upgrade 1.1.1l -> 1.1.1n

Ross Burton (1):
  zlib: backport the fix for CVE-2018-25032

wangmy (1):
  linux-firmware: upgrade 20220209 -> 20220310

 .../mobile-broadband-provider-info_git.bb |   7 +-
 .../{openssl_1.1.1l.bb => openssl_1.1.1n.bb}  |   3 +-
 .../CVE-2022-23308-fix-regression.patch   |  99 +++
 .../libxml/libxml2/CVE-2022-23308.patch   | 209 ++
 meta/recipes-core/libxml/libxml2_2.9.10.bb|   2 +
 .../zlib/zlib/CVE-2018-25032.patch| 347 +
 meta/recipes-core/zlib/zlib_1.2.11.bb |   1 +
 .../gnu-config/gnu-config_git.bb  |   2 +-
 .../go/{go-1.16.14.inc => go-1.16.15.inc} |   4 +-
 ...1.16.14.bb => go-binary-native_1.16.15.bb} |   4 +-
 16.14.bb => go-cross-canadian_1.16.15.bb} |   0
 ...o-cross_1.16.14.bb => go-cross_1.16.15.bb} |   0
 ...ssdk_1.16.14.bb => go-crosssdk_1.16.15.bb} |   0
 ...native_1.16.14.bb => go-native_1.16.15.bb} |   0
 ...ntime_1.16.14.bb => go-runtime_1.16.15.bb} |   0
 .../go/{go_1.16.14.bb => go_1.16.15.bb}   |   0
 .../python-numpy/files/CVE-2021-41496.patch   |  64 ++
 .../python-numpy/python3-numpy_1.20.1.bb  |   1 +
 .../0001-configure-use-correct-CPP.patch  |  47 ++
 ...002-configure-support-PIC-code-build.patch |  34 +
 meta/recipes-extended/zip/zip_3.0.bb  |   2 +
 .../recipes-gnome/epiphany/epiphany_3.38.2.bb |   1 +
 .../files/encode-untrusted-data.patch | 707 ++
 .../virglrenderer/virglrenderer_0.8.2.bb  |   2 +-
 ...20220209.bb => linux-firmware_20220310.bb} |   6 +-
 .../linux/linux-yocto-rt_5.10.bb  |   6 +-
 .../linux/linux-yocto-tiny_5.10.bb|   8 +-
 meta/recipes-kernel/linux/linux-yocto_5.10.bb |  24 +-
 ...ules_2.12.7.bb => lttng-modules_2.12.8.bb} |   2 +-
 .../flac/flac/CVE-2021-0561.patch |  41 +
 meta/recipes-multimedia/flac/flac_1.3.3.bb|   1 +
 ...ebkitgtk_2.30.5.bb => webkitgtk_2.30.6.bb} |   2 +-
 32 files changed, 1592 insertions(+), 34 deletions(-)
 rename meta/recipes-connectivity/openssl/{openssl_1.1.1l.bb => 
openssl_1.1.1n.bb} (98%)
 create mode 100644 
meta/recipes-core/libxml/libxml2/CVE-2022-23308-fix-regression.patch
 create mode 100644 meta/recipes-core/libxml/libxml2/CVE-2022-23308.patch
 create mode 100644 meta/recipes-core/zlib/zlib/CVE-2018-25032.patch
 rename meta/recipes-devtools/go/{go-1.16.14.inc => go-1.16.15.inc} (91%)
 rename meta/recipes-devtools/go/{go-binary-native_1.16.14.bb => 
go-binary-native_1.16.15.bb} (83%)
 rename meta/recipes-devtools/go/{go-cross-canadian_1.16.14.bb => 
go-cross-canadian_1.16.15.bb} (100%)
 rename meta/recipes-devtools/go/{go-cross_1.16.14.bb => go-cross_1.16.15.bb} 
(100%)
 rename meta/recipes-devtools/go/{go-crosssdk_1.16.14.bb => 
go-crosssdk_1.16.15.bb} (100%)
 rename meta/recipes-devtools/go/{go-native_1.16.14.bb => go-native_1.16.15.bb} 
(100%)
 rename meta/recipes-devtools/go/{go-runtime_1.16.14.bb => 
go-runtime_1.16.15.bb} (100%)
 rename meta/recipes-devtools/go/{go_1.16.14.bb => go_1.16.15.bb} (100%)
 create mode 100644 
meta/recipes-devtools/python-numpy/files/CVE-2021-41496.patch
 create mode 100644 
meta/recipes-extended/zip/zip-3.0/0001-configure-use-correct-CPP.patch
 create mode 100644 
meta/recipes-extended/zip/zip-3.0/0002-configure-support-PIC-code-build.patch
 create mode 100644 
meta/recipes-gnome/epiphany/files/encode-untrusted-data.patch
 rename meta/recipes-kernel/linux-firmware/{linux-firmware_20220209.bb => 
linux-firmware_20220310.bb} (99%)
 rename meta/recipes-kernel/lttng/{lttng-modules_2.12.7.bb => 
lttng-modules_2.12.8.bb} (94%)
 create mode 100644 meta/recipes-multimedia/flac/flac/CVE-2021-0561.patch
 rename 

[OE-core] [hardknott][PATCH 12/20] linux-yocto/5.10: split vtpm for more granular inclusion

2022-03-31 Thread Anuj Mittal
From: Bruce Ashfield 

Integrating the following commit(s) to linux-yocto/.:

6ca1d510a03 features/tpm: split into tpm-1.2, tpm-2.0, tpm-2.0-crb and vtpm 
feature

Signed-off-by: Stefan Herbrechtsmeier 
Signed-off-by: Bruce Ashfield 
Signed-off-by: Alexandre Belloni 
(cherry picked from commit b61be908468b1057a9d2baf40c1ebfbbd74732b8)
Signed-off-by: Anuj Mittal 
---
 meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb   | 2 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb | 2 +-
 meta/recipes-kernel/linux/linux-yocto_5.10.bb  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
index 4d75cf1b21..a35e80940e 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
@@ -12,7 +12,7 @@ python () {
 }
 
 SRCREV_machine ?= "e0d87d9831a6e0df20a370adc9aba0d032d91661"
-SRCREV_meta ?= "792f1272dd0d68d5dba0ff35949b2094f818227e"
+SRCREV_meta ?= "b814c7ebf2a92fc361bcbeaf6efdd40b8cd0816a"
 
 SRC_URI = 
"git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \

git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.10;destsuffix=${KMETA}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb 
b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
index 8227d5d8cc..45cfd90e0a 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
@@ -17,7 +17,7 @@ KCONF_BSP_AUDIT_LEVEL = "2"
 
 SRCREV_machine_qemuarm ?= "38f8b1b5b87959e6cb9367151e233d27befe015d"
 SRCREV_machine ?= "cc70f051e56005acda2e6ea994cadfb2538e66f6"
-SRCREV_meta ?= "792f1272dd0d68d5dba0ff35949b2094f818227e"
+SRCREV_meta ?= "b814c7ebf2a92fc361bcbeaf6efdd40b8cd0816a"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.10.bb 
b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
index 5a4939cf36..fdc985af13 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
@@ -23,7 +23,7 @@ SRCREV_machine_qemux86 ?= 
"e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
 SRCREV_machine_qemux86-64 ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
 SRCREV_machine_qemumips64 ?= "a1b43f69bce61143dd4d6d637f619eadd3fabb6e"
 SRCREV_machine ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
-SRCREV_meta ?= "792f1272dd0d68d5dba0ff35949b2094f818227e"
+SRCREV_meta ?= "b814c7ebf2a92fc361bcbeaf6efdd40b8cd0816a"
 
 # remap qemuarm to qemuarma15 for the 5.8 kernel
 # KMACHINE_qemuarm ?= "qemuarma15"
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163826): 
https://lists.openembedded.org/g/openembedded-core/message/163826
Mute This Topic: https://lists.openembedded.org/mt/90154695/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 10/20] mobile-broadband-provider-info: upgrade 20210805 -> 20220315

2022-03-31 Thread Anuj Mittal
From: Changhyeok Bae 

Signed-off-by: Changhyeok Bae 
Signed-off-by: Richard Purdie 
(cherry picked from commit ed02ee8f20094f598448d58875cb7be8a24a019f)
Signed-off-by: Anuj Mittal 
---
 .../mobile-broadband-provider-info_git.bb  | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
 
b/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
index 4246f4dcbd..781b9216c5 100644
--- 
a/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
+++ 
b/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
@@ -4,11 +4,12 @@ DESCRIPTION = "Mobile Broadband Service Provider Database 
stores service provide
 SECTION = "network"
 LICENSE = "PD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=87964579b2a8ece4bc6744d2dc9a8b04"
-SRCREV = "11f2247eccd3c161b8fd9b41143862e9fb81193c"
-PV = "20210805"
+
+SRCREV = "4cbb44a9fe26aa6f0b28beb79f9488b37c097b5e"
+PV = "20220315"
 PE = "1"
 
-SRC_URI = 
"git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=master"
+SRC_URI = 
"git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=main"
 S = "${WORKDIR}/git"
 
 inherit autotools
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163825): 
https://lists.openembedded.org/g/openembedded-core/message/163825
Mute This Topic: https://lists.openembedded.org/mt/90154694/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 04/20] libxml2: Fix CVE-2022-23308

2022-03-31 Thread Anuj Mittal
From: Joe Slater 

The first patch is the fix in version 2.9.13.  The second
patch was added later and fixes a regression introduced
by the first.

Signed-off-by: Joe Slater 
Signed-off-by: Anuj Mittal 
---
 .../CVE-2022-23308-fix-regression.patch   |  99 +
 .../libxml/libxml2/CVE-2022-23308.patch   | 209 ++
 meta/recipes-core/libxml/libxml2_2.9.10.bb|   2 +
 3 files changed, 310 insertions(+)
 create mode 100644 
meta/recipes-core/libxml/libxml2/CVE-2022-23308-fix-regression.patch
 create mode 100644 meta/recipes-core/libxml/libxml2/CVE-2022-23308.patch

diff --git 
a/meta/recipes-core/libxml/libxml2/CVE-2022-23308-fix-regression.patch 
b/meta/recipes-core/libxml/libxml2/CVE-2022-23308-fix-regression.patch
new file mode 100644
index 00..eefecb9adb
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/CVE-2022-23308-fix-regression.patch
@@ -0,0 +1,99 @@
+From 646fe48d1c8a74310c409ddf81fe7df6700052af Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer 
+Date: Tue, 22 Feb 2022 11:51:08 +0100
+Subject: [PATCH] Fix --without-valid build
+
+Regressed in commit 652dd12a.
+---
+ valid.c | 58 -
+ 1 file changed, 29 insertions(+), 29 deletions(-)
+---
+
+From https://github.com/GNOME/libxml2.git
+ commit 646fe48d1c8a74310c409ddf81fe7df6700052af
+
+CVE: CVE-2022-23308
+Upstream-status: Backport
+
+Signed-off-by: Joe Slater 
+
+
+diff --git a/valid.c b/valid.c
+index 8e596f1d..9684683a 100644
+--- a/valid.c
 b/valid.c
+@@ -479,35 +479,6 @@ nodeVPop(xmlValidCtxtPtr ctxt)
+ return (ret);
+ }
+ 
+-/**
+- * xmlValidNormalizeString:
+- * @str: a string
+- *
+- * Normalize a string in-place.
+- */
+-static void
+-xmlValidNormalizeString(xmlChar *str) {
+-xmlChar *dst;
+-const xmlChar *src;
+-
+-if (str == NULL)
+-return;
+-src = str;
+-dst = str;
+-
+-while (*src == 0x20) src++;
+-while (*src != 0) {
+-  if (*src == 0x20) {
+-  while (*src == 0x20) src++;
+-  if (*src != 0)
+-  *dst++ = 0x20;
+-  } else {
+-  *dst++ = *src++;
+-  }
+-}
+-*dst = 0;
+-}
+-
+ #ifdef DEBUG_VALID_ALGO
+ static void
+ xmlValidPrintNode(xmlNodePtr cur) {
+@@ -2636,6 +2607,35 @@ xmlDumpNotationTable(xmlBufferPtr buf, 
xmlNotationTablePtr table) {
+   (xmlDictOwns(dict, (const xmlChar *)(str)) == 0)))  \
+   xmlFree((char *)(str));
+ 
++/**
++ * xmlValidNormalizeString:
++ * @str: a string
++ *
++ * Normalize a string in-place.
++ */
++static void
++xmlValidNormalizeString(xmlChar *str) {
++xmlChar *dst;
++const xmlChar *src;
++
++if (str == NULL)
++return;
++src = str;
++dst = str;
++
++while (*src == 0x20) src++;
++while (*src != 0) {
++  if (*src == 0x20) {
++  while (*src == 0x20) src++;
++  if (*src != 0)
++  *dst++ = 0x20;
++  } else {
++  *dst++ = *src++;
++  }
++}
++*dst = 0;
++}
++
+ static int
+ xmlIsStreaming(xmlValidCtxtPtr ctxt) {
+ xmlParserCtxtPtr pctxt;
+-- 
+2.35.1
+
diff --git a/meta/recipes-core/libxml/libxml2/CVE-2022-23308.patch 
b/meta/recipes-core/libxml/libxml2/CVE-2022-23308.patch
new file mode 100644
index 00..708a98b45a
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/CVE-2022-23308.patch
@@ -0,0 +1,209 @@
+From 652dd12a858989b14eed4e84e453059cd3ba340e Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer 
+Date: Tue, 8 Feb 2022 03:29:24 +0100
+Subject: [PATCH] [CVE-2022-23308] Use-after-free of ID and IDREF attributes
+
+If a document is parsed with XML_PARSE_DTDVALID and without
+XML_PARSE_NOENT, the value of ID attributes has to be normalized after
+potentially expanding entities in xmlRemoveID. Otherwise, later calls
+to xmlGetID can return a pointer to previously freed memory.
+
+ID attributes which are empty or contain only whitespace after
+entity expansion are affected in a similar way. This is fixed by
+not storing such attributes in the ID table.
+
+The test to detect streaming mode when validating against a DTD was
+broken. In connection with the defects above, this could result in a
+use-after-free when using the xmlReader interface with validation.
+Fix detection of streaming mode to avoid similar issues. (This changes
+the expected result of a test case. But as far as I can tell, using the
+XML reader with XIncludes referencing the root document never worked
+properly, anyway.)
+
+All of these issues can result in denial of service. Using xmlReader
+with validation could result in disclosure of memory via the error
+channel, typically stderr. The security impact of xmlGetID returning
+a pointer to freed memory depends on the application. The typical use
+case of calling xmlGetID on an unmodified document is not affected.
+---
+ result/XInclude/ns1.xml.rdr |  2 +-
+ valid.c | 88 +++--
+ 2 files changed, 56 insertions(+), 34 deletions(-)
+ ---
+ 

[OE-core] [hardknott][PATCH 11/20] linux-yocto: nohz_full boot arg fix

2022-03-31 Thread Anuj Mittal
From: Bruce Ashfield 

Integrating the following commit(s) to linux-yocto/5.15:

81bdce5b5876 tick/nohz: WARN_ON --> WARN_ON_ONCE to prevent console 
saturation
97c963889222 sched/isolation: really align nohz_full with rcu_nocbs

Signed-off-by: Bruce Ashfield 
Signed-off-by: Alexandre Belloni 
(cherry picked from commit 11de5ad0cfee5bf8bcdd28da6b27447280add2cf)
Signed-off-by: Anuj Mittal 
---
 .../linux/linux-yocto-rt_5.10.bb  |  2 +-
 .../linux/linux-yocto-tiny_5.10.bb|  4 ++--
 meta/recipes-kernel/linux/linux-yocto_5.10.bb | 20 +--
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb 
b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
index 8b10988438..4d75cf1b21 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.10.bb
@@ -11,7 +11,7 @@ python () {
 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to 
linux-yocto-rt to enable it")
 }
 
-SRCREV_machine ?= "abd24ddc62072fcc5ecf12cf8feadd2e6fda59bd"
+SRCREV_machine ?= "e0d87d9831a6e0df20a370adc9aba0d032d91661"
 SRCREV_meta ?= "792f1272dd0d68d5dba0ff35949b2094f818227e"
 
 SRC_URI = 
"git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb 
b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
index 8564b5becf..8227d5d8cc 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.10.bb
@@ -15,8 +15,8 @@ DEPENDS += "openssl-native util-linux-native"
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine_qemuarm ?= "682b9a24accb1e3a305957dec28f7f565db95369"
-SRCREV_machine ?= "5e844e753c3e1f153af9dfee6b88e5dc1e57f30f"
+SRCREV_machine_qemuarm ?= "38f8b1b5b87959e6cb9367151e233d27befe015d"
+SRCREV_machine ?= "cc70f051e56005acda2e6ea994cadfb2538e66f6"
 SRCREV_meta ?= "792f1272dd0d68d5dba0ff35949b2094f818227e"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.10.bb 
b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
index 2e12654fec..5a4939cf36 100644
--- a/meta/recipes-kernel/linux/linux-yocto_5.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_5.10.bb
@@ -13,16 +13,16 @@ KBRANCH_qemux86  ?= "v5.10/standard/base"
 KBRANCH_qemux86-64 ?= "v5.10/standard/base"
 KBRANCH_qemumips64 ?= "v5.10/standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "56cfcfb12870782355bacaf8bcde9e268f422140"
-SRCREV_machine_qemuarm64 ?= "3aab5bb12bc180d582a6f82e4a085f45a7b0c283"
-SRCREV_machine_qemumips ?= "d76ec4c19a876a3235567ab2cee2e33f2875f79a"
-SRCREV_machine_qemuppc ?= "513a8885de593e8b1f3c24595c015bb9b1d55563"
-SRCREV_machine_qemuriscv64 ?= "de1b3b1aef1a5c3dec0676e152f6801e1cc309e5"
-SRCREV_machine_qemuriscv32 ?= "de1b3b1aef1a5c3dec0676e152f6801e1cc309e5"
-SRCREV_machine_qemux86 ?= "de1b3b1aef1a5c3dec0676e152f6801e1cc309e5"
-SRCREV_machine_qemux86-64 ?= "de1b3b1aef1a5c3dec0676e152f6801e1cc309e5"
-SRCREV_machine_qemumips64 ?= "b63b87635569c07343f25194abf008f1e27c0bca"
-SRCREV_machine ?= "de1b3b1aef1a5c3dec0676e152f6801e1cc309e5"
+SRCREV_machine_qemuarm ?= "74469c4b03f62e4b4da066e52785ed74b1d121ae"
+SRCREV_machine_qemuarm64 ?= "69f185342f516efa8a9233e31d2c3f8356b3a388"
+SRCREV_machine_qemumips ?= "d97607700b2fba19af10b2110b99c448ed9a88e9"
+SRCREV_machine_qemuppc ?= "090085d4bb6181c3b972d82c9f8f7ed88c90ad6b"
+SRCREV_machine_qemuriscv64 ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
+SRCREV_machine_qemuriscv32 ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
+SRCREV_machine_qemux86 ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
+SRCREV_machine_qemux86-64 ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
+SRCREV_machine_qemumips64 ?= "a1b43f69bce61143dd4d6d637f619eadd3fabb6e"
+SRCREV_machine ?= "e6c8ebd210a2ab7817618bb4c518d69d35d16cf7"
 SRCREV_meta ?= "792f1272dd0d68d5dba0ff35949b2094f818227e"
 
 # remap qemuarm to qemuarma15 for the 5.8 kernel
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163824): 
https://lists.openembedded.org/g/openembedded-core/message/163824
Mute This Topic: https://lists.openembedded.org/mt/90154693/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 07/20] go: update to 1.16.15

2022-03-31 Thread Anuj Mittal
From: Chee Yang Lee 

go1.16.15 (released 2022-03-03) includes a security fix to the regexp/syntax 
package, as well as bug fixes to the compiler, runtime, the go command, and to 
the net package. See the Go 1.16.15 milestone on our issue tracker for detai
ls.

Signed-off-by: Chee Yang Lee 
Signed-off-by: Anuj Mittal 
---
 meta/recipes-devtools/go/{go-1.16.14.inc => go-1.16.15.inc}   | 4 ++--
 ...o-binary-native_1.16.14.bb => go-binary-native_1.16.15.bb} | 4 ++--
 ...cross-canadian_1.16.14.bb => go-cross-canadian_1.16.15.bb} | 0
 .../go/{go-cross_1.16.14.bb => go-cross_1.16.15.bb}   | 0
 .../go/{go-crosssdk_1.16.14.bb => go-crosssdk_1.16.15.bb} | 0
 .../go/{go-native_1.16.14.bb => go-native_1.16.15.bb} | 0
 .../go/{go-runtime_1.16.14.bb => go-runtime_1.16.15.bb}   | 0
 meta/recipes-devtools/go/{go_1.16.14.bb => go_1.16.15.bb} | 0
 8 files changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-devtools/go/{go-1.16.14.inc => go-1.16.15.inc} (91%)
 rename meta/recipes-devtools/go/{go-binary-native_1.16.14.bb => 
go-binary-native_1.16.15.bb} (83%)
 rename meta/recipes-devtools/go/{go-cross-canadian_1.16.14.bb => 
go-cross-canadian_1.16.15.bb} (100%)
 rename meta/recipes-devtools/go/{go-cross_1.16.14.bb => go-cross_1.16.15.bb} 
(100%)
 rename meta/recipes-devtools/go/{go-crosssdk_1.16.14.bb => 
go-crosssdk_1.16.15.bb} (100%)
 rename meta/recipes-devtools/go/{go-native_1.16.14.bb => go-native_1.16.15.bb} 
(100%)
 rename meta/recipes-devtools/go/{go-runtime_1.16.14.bb => 
go-runtime_1.16.15.bb} (100%)
 rename meta/recipes-devtools/go/{go_1.16.14.bb => go_1.16.15.bb} (100%)

diff --git a/meta/recipes-devtools/go/go-1.16.14.inc 
b/meta/recipes-devtools/go/go-1.16.15.inc
similarity index 91%
rename from meta/recipes-devtools/go/go-1.16.14.inc
rename to meta/recipes-devtools/go/go-1.16.15.inc
index 6482c6fa7c..8b1ad22bcc 100644
--- a/meta/recipes-devtools/go/go-1.16.14.inc
+++ b/meta/recipes-devtools/go/go-1.16.15.inc
@@ -1,7 +1,7 @@
 require go-common.inc
 
 GO_BASEVERSION = "1.16"
-PV = "1.16.14"
+PV = "1.16.15"
 FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
@@ -18,7 +18,7 @@ SRC_URI += "\
 file://0009-Revert-cmd-go-make-sure-CC-and-CXX-are-absolute.patch \
 file://0001-encoding-xml-handle-leading-trailing-or-double-colon.patch \
 "
-SRC_URI[main.sha256sum] = 
"467898cd3a216de54dcb9014f541efe77e9b79a7154dbc1fd2dd778b0c63fb56"
+SRC_URI[main.sha256sum] = 
"90a08c689279e35f3865ba510998c33a63255c36089b3ec206c912fc0568c3d3"
 
 # Upstream don't believe it is a signifiant real world issue and will only
 # fix in 1.17 onwards where we can drop this.
diff --git a/meta/recipes-devtools/go/go-binary-native_1.16.14.bb 
b/meta/recipes-devtools/go/go-binary-native_1.16.15.bb
similarity index 83%
rename from meta/recipes-devtools/go/go-binary-native_1.16.14.bb
rename to meta/recipes-devtools/go/go-binary-native_1.16.15.bb
index 419fc4ffcf..ba11ee5695 100644
--- a/meta/recipes-devtools/go/go-binary-native_1.16.14.bb
+++ b/meta/recipes-devtools/go/go-binary-native_1.16.15.bb
@@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
 PROVIDES = "go-native"
 
 SRC_URI = 
"https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE};
-SRC_URI[go_linux_amd64.sha256sum] = 
"f4f5f02eb6809ac5bf19b5ad517b23504fd5fc036f6487651968ad36aa7a20e0"
-SRC_URI[go_linux_arm64.sha256sum] = 
"5e59056e36704acb25809bcdb27191f27593cb7aba4d716b523008135a1e764a"
+SRC_URI[go_linux_amd64.sha256sum] = 
"77c782a633186d78c384f972fb113a43c24be0234c42fef22c2d8c4c4c8e7475"
+SRC_URI[go_linux_arm64.sha256sum] = 
"c2f27f0ce5620a9bc2ff3446165d1974ef94e9b885ec12dbfa3c07e0e198b7ce"
 
 UPSTREAM_CHECK_URI = "https://golang.org/dl/;
 UPSTREAM_CHECK_REGEX = "go(?P\d+(\.\d+)+)\.linux"
diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.16.14.bb 
b/meta/recipes-devtools/go/go-cross-canadian_1.16.15.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-cross-canadian_1.16.14.bb
rename to meta/recipes-devtools/go/go-cross-canadian_1.16.15.bb
diff --git a/meta/recipes-devtools/go/go-cross_1.16.14.bb 
b/meta/recipes-devtools/go/go-cross_1.16.15.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-cross_1.16.14.bb
rename to meta/recipes-devtools/go/go-cross_1.16.15.bb
diff --git a/meta/recipes-devtools/go/go-crosssdk_1.16.14.bb 
b/meta/recipes-devtools/go/go-crosssdk_1.16.15.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-crosssdk_1.16.14.bb
rename to meta/recipes-devtools/go/go-crosssdk_1.16.15.bb
diff --git a/meta/recipes-devtools/go/go-native_1.16.14.bb 
b/meta/recipes-devtools/go/go-native_1.16.15.bb
similarity index 100%
rename from meta/recipes-devtools/go/go-native_1.16.14.bb
rename to meta/recipes-devtools/go/go-native_1.16.15.bb
diff --git a/meta/recipes-devtools/go/go-runtime_1.16.14.bb 

[OE-core] [hardknott][PATCH 08/20] linux-firmware: upgrade 20220209 -> 20220310

2022-03-31 Thread Anuj Mittal
From: wangmy 

License-Update:
 year updated to 2022
 Version of some driver files updated
 Added files for some drivers

Signed-off-by: Wang Mingyu 
Signed-off-by: Richard Purdie 
(cherry picked from commit be1b1d204c89035c54a626db46c5054e553b82c2)
Signed-off-by: Anuj Mittal 
---
 ...inux-firmware_20220209.bb => linux-firmware_20220310.bb} | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-kernel/linux-firmware/{linux-firmware_20220209.bb => 
linux-firmware_20220310.bb} (99%)

diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_20220209.bb 
b/meta/recipes-kernel/linux-firmware/linux-firmware_20220310.bb
similarity index 99%
rename from meta/recipes-kernel/linux-firmware/linux-firmware_20220209.bb
rename to meta/recipes-kernel/linux-firmware/linux-firmware_20220310.bb
index 9cb357fa90..7a6cb1903b 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_20220209.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_20220310.bb
@@ -72,7 +72,7 @@ LICENSE = "\
 LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc 
\
 
file://LICENCE.adsp_sst;md5=615c45b91a5a4a9fe046d6ab9a2df728 \
 file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
-file://LICENSE.amdgpu;md5=d357524f5099e2a3db3c1838921c593f 
\
+file://LICENSE.amdgpu;md5=44c1166d052226cb2d6c8d7400090203 
\
 
file://LICENSE.amd-ucode;md5=3c5399dc9148d7f0e1f41e34b69cf14f \
 
file://LICENSE.amlogic_vdec;md5=dc44f59bf64a81643e500ad3f39a468a \
 
file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \
@@ -132,7 +132,7 @@ LIC_FILES_CHKSUM = 
"file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
 file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 
\
 file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 
\
 
file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
-file://WHENCE;md5=ed3d7426e4df06fbadcca24ebf00cc5f \
+file://WHENCE;md5=45a9c4a92d152e9495db81e1192f2bdc \
 "
 
 # These are not common licenses, set NO_GENERIC_LICENSE for them
@@ -205,7 +205,7 @@ PE = "1"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/firmware/${BPN}-${PV}.tar.xz"
 
-SRC_URI[sha256sum] = 
"e2e46fa618414952bbf2f6920cd3abcddbef45bfb7d1352994b4bfc35394d177"
+SRC_URI[sha256sum] = 
"5938ee717b2023b48f6bfcf344b40ddc947e3e22c0bc36d4c3418f90fea68182"
 
 inherit allarch
 
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163820): 
https://lists.openembedded.org/g/openembedded-core/message/163820
Mute This Topic: https://lists.openembedded.org/mt/90154689/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 09/20] mobile-broadband-provider-info: upgrade 20201225 -> 20210805

2022-03-31 Thread Anuj Mittal
From: Alexander Kanavin 

Signed-off-by: Alexander Kanavin 
Signed-off-by: Richard Purdie 
(cherry picked from commit 93a335993ce592a8ee34fc9a490e327f2775e03f)
Signed-off-by: Anuj Mittal 
---
 .../mobile-broadband-provider-info_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
 
b/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
index b4cbc1a76c..4246f4dcbd 100644
--- 
a/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
+++ 
b/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
@@ -4,8 +4,8 @@ DESCRIPTION = "Mobile Broadband Service Provider Database 
stores service provide
 SECTION = "network"
 LICENSE = "PD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=87964579b2a8ece4bc6744d2dc9a8b04"
-SRCREV = "90f3fe28aa25135b7e4a54a7816388913bfd4a2a"
-PV = "20201225"
+SRCREV = "11f2247eccd3c161b8fd9b41143862e9fb81193c"
+PV = "20210805"
 PE = "1"
 
 SRC_URI = 
"git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=master"
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163822): 
https://lists.openembedded.org/g/openembedded-core/message/163822
Mute This Topic: https://lists.openembedded.org/mt/90154691/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 02/20] gnu-config: update SRC_URI

2022-03-31 Thread Anuj Mittal
From: Minjae Kim 

The git repo for gnu-config was changed, so update the
SRC_URI accordingly with the new link.

Signed-off-by:Minjae Kim 
Signed-off-by: Anuj Mittal 
---
 meta/recipes-devtools/gnu-config/gnu-config_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb 
b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index ecbd60e72a..da52c943f5 100644
--- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -12,7 +12,7 @@ INHIBIT_DEFAULT_DEPS = "1"
 SRCREV = "6faca61810d335c7837f320733fe8e15a1431fc2"
 PV = "20210125+git${SRCPV}"
 
-SRC_URI = "git://git.savannah.gnu.org/config.git;branch=master \
+SRC_URI = 
"git://git.savannah.gnu.org/git/config.git;protocol=https;branch=master \
file://gnu-configize.in"
 S = "${WORKDIR}/git"
 UPSTREAM_CHECK_COMMITS = "1"
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163816): 
https://lists.openembedded.org/g/openembedded-core/message/163816
Mute This Topic: https://lists.openembedded.org/mt/90154684/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 05/20] zip: modify when match.S is built

2022-03-31 Thread Anuj Mittal
From: Joe Slater 

Avoid generating non-PIC code.

The patches are taken from master 58b16da805... but we cannot
cherry-pick because zip_3.0.bb context is different.

Signed-off-by: Joe Slater 
Signed-off-by: Anuj Mittal 
---
 .../0001-configure-use-correct-CPP.patch  | 47 +++
 ...002-configure-support-PIC-code-build.patch | 34 ++
 meta/recipes-extended/zip/zip_3.0.bb  |  2 +
 3 files changed, 83 insertions(+)
 create mode 100644 
meta/recipes-extended/zip/zip-3.0/0001-configure-use-correct-CPP.patch
 create mode 100644 
meta/recipes-extended/zip/zip-3.0/0002-configure-support-PIC-code-build.patch

diff --git 
a/meta/recipes-extended/zip/zip-3.0/0001-configure-use-correct-CPP.patch 
b/meta/recipes-extended/zip/zip-3.0/0001-configure-use-correct-CPP.patch
new file mode 100644
index 00..02253f968c
--- /dev/null
+++ b/meta/recipes-extended/zip/zip-3.0/0001-configure-use-correct-CPP.patch
@@ -0,0 +1,47 @@
+From 7a2729ee7f5d9b9d4a0d9b83fe641a2ab03c4ee0 Mon Sep 17 00:00:00 2001
+From: Joe Slater 
+Date: Thu, 24 Feb 2022 17:36:59 -0800
+Subject: [PATCH 1/2] configure: use correct CPP
+
+configure uses CPP to test that two assembler routines
+can be built. Unfortunately, it will use /usr/bin/cpp
+if it exists, invalidating the tests.  We use the $CC
+passed to configure.
+
+Upstream-Status: Inappropriate [openembedded specific]
+
+Signed-off-by: Joe Slater 
+---
+ unix/configure | 15 +--
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/unix/configure b/unix/configure
+index 73ba803..7e21070 100644
+--- a/unix/configure
 b/unix/configure
+@@ -220,13 +220,16 @@ fi
+ echo Check for the C preprocessor
+ # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
+ CPP="${CC} -E"
++
++# We should not change CPP for yocto builds.
++#
+ # solaris as(1) needs -P, maybe others as well ?
+-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
+-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
+-[ -f /lib/cpp ] && CPP=/lib/cpp
+-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
+-[ -f /xenix ] && CPP="${CC} -E"
+-[ -f /lynx.os ] && CPP="${CC} -E"
++# [ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
++# [ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
++# [ -f /lib/cpp ] && CPP=/lib/cpp
++# [ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
++# [ -f /xenix ] && CPP="${CC} -E"
++# [ -f /lynx.os ] && CPP="${CC} -E"
+ 
+ echo "#include " > conftest.c
+ $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E"
+-- 
+2.24.1
+
diff --git 
a/meta/recipes-extended/zip/zip-3.0/0002-configure-support-PIC-code-build.patch 
b/meta/recipes-extended/zip/zip-3.0/0002-configure-support-PIC-code-build.patch
new file mode 100644
index 00..6e0879616a
--- /dev/null
+++ 
b/meta/recipes-extended/zip/zip-3.0/0002-configure-support-PIC-code-build.patch
@@ -0,0 +1,34 @@
+From b0492506d2c28581193906e9d260d4f0451e2c39 Mon Sep 17 00:00:00 2001
+From: Joe Slater 
+Date: Thu, 24 Feb 2022 17:46:03 -0800
+Subject: [PATCH 2/2] configure: support PIC code build
+
+Disable building match.S. The code requires
+relocation in .text.
+
+Upstream-Status: Inappropriate [openembedded specific]
+
+Signed-off-by: Joe Slater 
+---
+ unix/configure | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/unix/configure b/unix/configure
+index 7e21070..1bc698b 100644
+--- a/unix/configure
 b/unix/configure
+@@ -242,8 +242,9 @@ if eval "$CPP match.S > _match.s 2>/dev/null"; then
+   if test ! -s _match.s || grep error < _match.s > /dev/null; then
+ :
+   elif eval "$CC -c _match.s >/dev/null 2>/dev/null" && [ -f _match.o ]; then
+-CFLAGS="${CFLAGS} -DASMV"
+-OBJA="match.o"
++# disable match.S for PIC code
++# CFLAGS="${CFLAGS} -DASMV"
++# OBJA="match.o"
+ echo "int foo() { return 0;}" > conftest.c
+ $CC -c conftest.c >/dev/null 2>/dev/null
+ echo Check if compiler generates underlines
+-- 
+2.24.1
+
diff --git a/meta/recipes-extended/zip/zip_3.0.bb 
b/meta/recipes-extended/zip/zip_3.0.bb
index 18b5d8648e..f8e0b6e259 100644
--- a/meta/recipes-extended/zip/zip_3.0.bb
+++ b/meta/recipes-extended/zip/zip_3.0.bb
@@ -14,6 +14,8 @@ SRC_URI = 
"${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.
file://fix-security-format.patch \
file://10-remove-build-date.patch \
file://zipnote-crashes-with-segfault.patch \
+   file://0001-configure-use-correct-CPP.patch \
+   file://0002-configure-support-PIC-code-build.patch \
"
 UPSTREAM_VERSION_UNKNOWN = "1"
 
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163817): 
https://lists.openembedded.org/g/openembedded-core/message/163817
Mute This Topic: https://lists.openembedded.org/mt/90154685/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 06/20] webkitgtk : update to 2.30.6

2022-03-31 Thread Anuj Mittal
From: Chee Yang Lee 

Signed-off-by: Chee Yang Lee 
Signed-off-by: Anuj Mittal 
---
 .../webkit/{webkitgtk_2.30.5.bb => webkitgtk_2.30.6.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-sato/webkit/{webkitgtk_2.30.5.bb => webkitgtk_2.30.6.bb} 
(98%)

diff --git a/meta/recipes-sato/webkit/webkitgtk_2.30.5.bb 
b/meta/recipes-sato/webkit/webkitgtk_2.30.6.bb
similarity index 98%
rename from meta/recipes-sato/webkit/webkitgtk_2.30.5.bb
rename to meta/recipes-sato/webkit/webkitgtk_2.30.6.bb
index 93cca20d01..1fdba611ea 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.30.5.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.30.6.bb
@@ -25,7 +25,7 @@ SRC_URI = 
"https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
file://CVE-2021-42762.patch \
"
 
-SRC_URI[sha256sum] = 
"7d0dab08e3c5ae07bec80b2822ef42e952765d5724cac86eb23999bfed5a7f1f"
+SRC_URI[sha256sum] = 
"50736ec7a91770b5939d715196e5fe7209b93efcdeef425b24dc51fb8e9d7c1e"
 
 inherit cmake pkgconfig gobject-introspection perlnative features_check 
upstream-version-is-even gtk-doc
 
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163818): 
https://lists.openembedded.org/g/openembedded-core/message/163818
Mute This Topic: https://lists.openembedded.org/mt/90154687/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 03/20] virglrenderer: update SRC_URI

2022-03-31 Thread Anuj Mittal
From: Minjae Kim 

The git repo for virglrenderer was changed, so update the
SRC_URI accordingly with the new link.

Signed-off-by:Minjae Kim 
Signed-off-by: Anuj Mittal 
---
 meta/recipes-graphics/virglrenderer/virglrenderer_0.8.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.2.bb 
b/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.2.bb
index d92359565a..1c32a573b2 100644
--- a/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.2.bb
+++ b/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.2.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=c81c08eeefd9418fca8f88309a76db10"
 
 DEPENDS = "libdrm virtual/libgl libepoxy"
 SRCREV = "7d204f3927be65fb3365dce01dbcd04d447a4985"
-SRC_URI = "git://anongit.freedesktop.org/virglrenderer;branch=master \
+SRC_URI = "git://anongit.freedesktop.org/git/virglrenderer;branch=master \
file://0001-gallium-Expand-libc-check-to-be-platform-OS-check.patch 
\
file://0001-meson.build-use-python3-directly-for-python.patch \
file://cve-2022-0135.patch \
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163815): 
https://lists.openembedded.org/g/openembedded-core/message/163815
Mute This Topic: https://lists.openembedded.org/mt/90154683/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 01/20] openssl: upgrade 1.1.1l -> 1.1.1n

2022-03-31 Thread Anuj Mittal
From: Ovidiu Panait 

Upgrade openssl 1.1.1l -> 1.1.1n to fix CVE-2022-0778:
https://nvd.nist.gov/vuln/detail/CVE-2022-0778
https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=3118eb64934499d93db3230748a452351d1d9a65

This also fixes an evp_extra_test ptest failure introduced by openssl-1.1.1m:
"""
not ok 19 - test_signatures_with_engine
ERROR: (ptr) 'e = ENGINE_by_id(engine_id) != NULL' failed @ 
../openssl-1.1.1m/test/evp_extra_test.c:1890
0x0
not ok 20 - test_cipher_with_engine

"""

The ptest change is already present in Yocto master since oe-core
commit 5cd40648b0ba ("openssl: upgrade to 3.0.1").

Signed-off-by: Ovidiu Panait 
Signed-off-by: Anuj Mittal 
---
 .../openssl/{openssl_1.1.1l.bb => openssl_1.1.1n.bb}   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
 rename meta/recipes-connectivity/openssl/{openssl_1.1.1l.bb => 
openssl_1.1.1n.bb} (98%)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1l.bb 
b/meta/recipes-connectivity/openssl/openssl_1.1.1n.bb
similarity index 98%
rename from meta/recipes-connectivity/openssl/openssl_1.1.1l.bb
rename to meta/recipes-connectivity/openssl/openssl_1.1.1n.bb
index 50500eebc2..df13abf54e 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1l.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1n.bb
@@ -29,7 +29,7 @@ SRC_URI_append_riscv32 = " \
file://0004-Fixup-support-for-io_pgetevents_time64-syscall.patch \
"
 
-SRC_URI[sha256sum] = 
"0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1"
+SRC_URI[sha256sum] = 
"40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a"
 
 inherit lib_package multilib_header multilib_script ptest
 MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
@@ -204,6 +204,7 @@ do_install_ptest () {
install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps
 
install -d ${D}${PTEST_PATH}/engines
+   install -m755 ${B}/engines/dasync.so ${D}${PTEST_PATH}/engines
install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines
 
 # seems to be needed with perl 5.32.1
-- 
2.35.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163814): 
https://lists.openembedded.org/g/openembedded-core/message/163814
Mute This Topic: https://lists.openembedded.org/mt/90154681/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/3] modutils-initscripts: Change license PD -> MIT

2022-03-31 Thread Ross Burton
+1 on this.  Much happier looking code.

Ross

On Thu, 31 Mar 2022 at 12:51, Richard Purdie
 wrote:
>
> The file was originally added to OE here:
> https://git.openembedded.org/openembedded/commit/modutils/files/modutils.sh?id=3b3989442075d0a4c6c32cb187de17d87bf65fbd
>
> and the license added here as "PD":
> https://git.openembedded.org/openembedded/commit/modutils/modutils-initscripts.oe?id=4f7d2b1b63d166e5de146d71e5c942419424446e
>
> As "Public Domain", we can re-license it to MIT, which fits in with the rest 
> of
> our metadata and has an SPDX identifier, so lets do that and try and keep our
> licenses simpler.
>
> This also them removes the need for a weird license patch in SRC_URI.
>
> Signed-off-by: Richard Purdie 
> ---
>  meta/recipes-kernel/modutils-initscripts/files/PD.patch   | 8 
>  .../recipes-kernel/modutils-initscripts/files/modutils.sh | 4 
>  .../modutils-initscripts/modutils-initscripts.bb  | 7 +++
>  3 files changed, 7 insertions(+), 12 deletions(-)
>  delete mode 100644 meta/recipes-kernel/modutils-initscripts/files/PD.patch
>
> diff --git a/meta/recipes-kernel/modutils-initscripts/files/PD.patch 
> b/meta/recipes-kernel/modutils-initscripts/files/PD.patch
> deleted file mode 100644
> index 21ac49cbd8d..000
> --- a/meta/recipes-kernel/modutils-initscripts/files/PD.patch
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -Upstream-Status: Inappropriate [licensing]
> -
> -Index: modutils-initscripts-1.0/LICENSE
> -===
>  /dev/null  1970-01-01 00:00:00.0 +
> -+++ modutils-initscripts-1.0/LICENSE   2010-12-06 14:26:03.570339002 -0800
> -@@ -0,0 +1 @@
> -+Public Domain
> diff --git a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh 
> b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh
> index 67e1dcd9907..e9aaa66cb71 100755
> --- a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh
> +++ b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh
> @@ -1,4 +1,8 @@
>  #!/bin/sh
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
>  ### BEGIN INIT INFO
>  # Provides:  module-init-tools
>  # Required-Start:
> diff --git a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb 
> b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
> index aa71309126f..8f4fdd76bfb 100644
> --- a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
> +++ b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
> @@ -1,9 +1,8 @@
>  SUMMARY = "Initscript for auto-loading kernel modules on boot"
>  SECTION = "base"
> -LICENSE = "PD"
> -LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
> -SRC_URI = "file://modutils.sh \
> -  file://PD.patch"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = 
> "file://modutils.sh;beginline=3;endline=3;md5=b2dccaa94b3629a08bfb4f983cad6f89"
> +SRC_URI = "file://modutils.sh"
>
>  PR = "r7"
>
> --
> 2.32.0
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163813): 
https://lists.openembedded.org/g/openembedded-core/message/163813
Mute This Topic: https://lists.openembedded.org/mt/90152715/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/3] keymaps: Clean up license handling

2022-03-31 Thread Richard Purdie
The license is clear, add an SPDX license identification header to the script
and drop the weird patch, we don't need it.

Signed-off-by: Richard Purdie 
---
 meta/recipes-bsp/keymaps/files/GPLv2.patch | 347 -
 meta/recipes-bsp/keymaps/files/keymap.sh   |   3 +
 meta/recipes-bsp/keymaps/keymaps_1.0.bb|   5 +-
 3 files changed, 5 insertions(+), 350 deletions(-)
 delete mode 100644 meta/recipes-bsp/keymaps/files/GPLv2.patch

diff --git a/meta/recipes-bsp/keymaps/files/GPLv2.patch 
b/meta/recipes-bsp/keymaps/files/GPLv2.patch
deleted file mode 100644
index 1ee8181f128..000
--- a/meta/recipes-bsp/keymaps/files/GPLv2.patch
+++ /dev/null
@@ -1,347 +0,0 @@
-Upstream-Status: Inappropriate [licensing]
-
-diff --git a/COPYING b/COPYING
-new file mode 100644
-index 000..d511905
 /dev/null
-+++ b/COPYING
-@@ -0,0 +1,339 @@
-+  GNU GENERAL PUBLIC LICENSE
-+ Version 2, June 1991
-+
-+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
-+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ Everyone is permitted to copy and distribute verbatim copies
-+ of this license document, but changing it is not allowed.
-+
-+  Preamble
-+
-+  The licenses for most software are designed to take away your
-+freedom to share and change it.  By contrast, the GNU General Public
-+License is intended to guarantee your freedom to share and change free
-+software--to make sure the software is free for all its users.  This
-+General Public License applies to most of the Free Software
-+Foundation's software and to any other program whose authors commit to
-+using it.  (Some other Free Software Foundation software is covered by
-+the GNU Lesser General Public License instead.)  You can apply it to
-+your programs, too.
-+
-+  When we speak of free software, we are referring to freedom, not
-+price.  Our General Public Licenses are designed to make sure that you
-+have the freedom to distribute copies of free software (and charge for
-+this service if you wish), that you receive source code or can get it
-+if you want it, that you can change the software or use pieces of it
-+in new free programs; and that you know you can do these things.
-+
-+  To protect your rights, we need to make restrictions that forbid
-+anyone to deny you these rights or to ask you to surrender the rights.
-+These restrictions translate to certain responsibilities for you if you
-+distribute copies of the software, or if you modify it.
-+
-+  For example, if you distribute copies of such a program, whether
-+gratis or for a fee, you must give the recipients all the rights that
-+you have.  You must make sure that they, too, receive or can get the
-+source code.  And you must show them these terms so they know their
-+rights.
-+
-+  We protect your rights with two steps: (1) copyright the software, and
-+(2) offer you this license which gives you legal permission to copy,
-+distribute and/or modify the software.
-+
-+  Also, for each author's protection and ours, we want to make certain
-+that everyone understands that there is no warranty for this free
-+software.  If the software is modified by someone else and passed on, we
-+want its recipients to know that what they have is not the original, so
-+that any problems introduced by others will not reflect on the original
-+authors' reputations.
-+
-+  Finally, any free program is threatened constantly by software
-+patents.  We wish to avoid the danger that redistributors of a free
-+program will individually obtain patent licenses, in effect making the
-+program proprietary.  To prevent this, we have made it clear that any
-+patent must be licensed for everyone's free use or not licensed at all.
-+
-+  The precise terms and conditions for copying, distribution and
-+modification follow.
-+
-+  GNU GENERAL PUBLIC LICENSE
-+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-+
-+  0. This License applies to any program or other work which contains
-+a notice placed by the copyright holder saying it may be distributed
-+under the terms of this General Public License.  The "Program", below,
-+refers to any such program or work, and a "work based on the Program"
-+means either the Program or any derivative work under copyright law:
-+that is to say, a work containing the Program or a portion of it,
-+either verbatim or with modifications and/or translated into another
-+language.  (Hereinafter, translation is included without limitation in
-+the term "modification".)  Each licensee is addressed as "you".
-+
-+Activities other than copying, distribution and modification are not
-+covered by this License; they are outside its scope.  The act of
-+running the Program is not restricted, and the output from the Program
-+is covered only if its contents constitute a work based on the
-+Program (independent of having been made by running the Program).
-+Whether that is true depends 

[OE-core] [PATCH 3/3] initscripts: Clean up license handling/identifiers

2022-03-31 Thread Richard Purdie
The license is clear, add an SPDX license identification headers to the scripts
and drop the weird patch, we don't need it.

Signed-off-by: Richard Purdie 
---
 .../initscripts/initscripts-1.0/GPLv2.patch   | 347 --
 .../initscripts/initscripts-1.0/alignment.sh  |   4 +
 .../initscripts/initscripts-1.0/banner.sh |   4 +
 .../initscripts/initscripts-1.0/bootmisc.sh   |   4 +
 .../initscripts/initscripts-1.0/checkfs.sh|   4 +
 .../initscripts/initscripts-1.0/checkroot.sh  |   4 +
 .../initscripts/initscripts-1.0/devpts.sh |   4 +
 .../initscripts/initscripts-1.0/dmesg.sh  |   4 +
 .../initscripts/initscripts-1.0/functions |   3 +
 .../initscripts/initscripts-1.0/halt  |   4 +
 .../initscripts/initscripts-1.0/hostname.sh   |   4 +
 .../initscripts/initscripts-1.0/mountall.sh   |   4 +
 .../initscripts/initscripts-1.0/mountnfs.sh   |   4 +
 .../initscripts-1.0/populate-volatile.sh  |   4 +
 .../initscripts-1.0/read-only-rootfs-hook.sh  |   3 +
 .../initscripts/initscripts-1.0/reboot|   4 +
 .../initscripts/initscripts-1.0/rmnologin.sh  |   4 +
 .../initscripts/initscripts-1.0/save-rtc.sh   |   4 +
 .../initscripts/initscripts-1.0/sendsigs  |   4 +
 .../initscripts/initscripts-1.0/single|   4 +
 .../initscripts/initscripts-1.0/sushell   |   3 +
 .../initscripts/initscripts-1.0/sysfs.sh  |   4 +
 .../initscripts/initscripts-1.0/umountfs  |   4 +
 .../initscripts/initscripts-1.0/umountnfs.sh  |   4 +
 .../initscripts/initscripts-1.0/urandom   |   4 +
 .../initscripts/initscripts_1.0.bb|   3 +-
 26 files changed, 94 insertions(+), 349 deletions(-)
 delete mode 100644 meta/recipes-core/initscripts/initscripts-1.0/GPLv2.patch

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/GPLv2.patch 
b/meta/recipes-core/initscripts/initscripts-1.0/GPLv2.patch
deleted file mode 100644
index 1ee8181f128..000
--- a/meta/recipes-core/initscripts/initscripts-1.0/GPLv2.patch
+++ /dev/null
@@ -1,347 +0,0 @@
-Upstream-Status: Inappropriate [licensing]
-
-diff --git a/COPYING b/COPYING
-new file mode 100644
-index 000..d511905
 /dev/null
-+++ b/COPYING
-@@ -0,0 +1,339 @@
-+  GNU GENERAL PUBLIC LICENSE
-+ Version 2, June 1991
-+
-+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
-+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ Everyone is permitted to copy and distribute verbatim copies
-+ of this license document, but changing it is not allowed.
-+
-+  Preamble
-+
-+  The licenses for most software are designed to take away your
-+freedom to share and change it.  By contrast, the GNU General Public
-+License is intended to guarantee your freedom to share and change free
-+software--to make sure the software is free for all its users.  This
-+General Public License applies to most of the Free Software
-+Foundation's software and to any other program whose authors commit to
-+using it.  (Some other Free Software Foundation software is covered by
-+the GNU Lesser General Public License instead.)  You can apply it to
-+your programs, too.
-+
-+  When we speak of free software, we are referring to freedom, not
-+price.  Our General Public Licenses are designed to make sure that you
-+have the freedom to distribute copies of free software (and charge for
-+this service if you wish), that you receive source code or can get it
-+if you want it, that you can change the software or use pieces of it
-+in new free programs; and that you know you can do these things.
-+
-+  To protect your rights, we need to make restrictions that forbid
-+anyone to deny you these rights or to ask you to surrender the rights.
-+These restrictions translate to certain responsibilities for you if you
-+distribute copies of the software, or if you modify it.
-+
-+  For example, if you distribute copies of such a program, whether
-+gratis or for a fee, you must give the recipients all the rights that
-+you have.  You must make sure that they, too, receive or can get the
-+source code.  And you must show them these terms so they know their
-+rights.
-+
-+  We protect your rights with two steps: (1) copyright the software, and
-+(2) offer you this license which gives you legal permission to copy,
-+distribute and/or modify the software.
-+
-+  Also, for each author's protection and ours, we want to make certain
-+that everyone understands that there is no warranty for this free
-+software.  If the software is modified by someone else and passed on, we
-+want its recipients to know that what they have is not the original, so
-+that any problems introduced by others will not reflect on the original
-+authors' reputations.
-+
-+  Finally, any free program is threatened constantly by software
-+patents.  We wish to avoid the danger that redistributors of a free
-+program will individually obtain patent licenses, in effect making the
-+program proprietary.  To prevent this, 

[OE-core] [PATCH 1/3] modutils-initscripts: Change license PD -> MIT

2022-03-31 Thread Richard Purdie
The file was originally added to OE here:
https://git.openembedded.org/openembedded/commit/modutils/files/modutils.sh?id=3b3989442075d0a4c6c32cb187de17d87bf65fbd

and the license added here as "PD":
https://git.openembedded.org/openembedded/commit/modutils/modutils-initscripts.oe?id=4f7d2b1b63d166e5de146d71e5c942419424446e

As "Public Domain", we can re-license it to MIT, which fits in with the rest of
our metadata and has an SPDX identifier, so lets do that and try and keep our
licenses simpler.

This also them removes the need for a weird license patch in SRC_URI.

Signed-off-by: Richard Purdie 
---
 meta/recipes-kernel/modutils-initscripts/files/PD.patch   | 8 
 .../recipes-kernel/modutils-initscripts/files/modutils.sh | 4 
 .../modutils-initscripts/modutils-initscripts.bb  | 7 +++
 3 files changed, 7 insertions(+), 12 deletions(-)
 delete mode 100644 meta/recipes-kernel/modutils-initscripts/files/PD.patch

diff --git a/meta/recipes-kernel/modutils-initscripts/files/PD.patch 
b/meta/recipes-kernel/modutils-initscripts/files/PD.patch
deleted file mode 100644
index 21ac49cbd8d..000
--- a/meta/recipes-kernel/modutils-initscripts/files/PD.patch
+++ /dev/null
@@ -1,8 +0,0 @@
-Upstream-Status: Inappropriate [licensing]
-
-Index: modutils-initscripts-1.0/LICENSE
-===
 /dev/null  1970-01-01 00:00:00.0 +
-+++ modutils-initscripts-1.0/LICENSE   2010-12-06 14:26:03.570339002 -0800
-@@ -0,0 +1 @@
-+Public Domain
diff --git a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh 
b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh
index 67e1dcd9907..e9aaa66cb71 100755
--- a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh
+++ b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh
@@ -1,4 +1,8 @@
 #!/bin/sh
+#
+# SPDX-License-Identifier: MIT
+#
+
 ### BEGIN INIT INFO
 # Provides:  module-init-tools
 # Required-Start:
diff --git a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb 
b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
index aa71309126f..8f4fdd76bfb 100644
--- a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
+++ b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
@@ -1,9 +1,8 @@
 SUMMARY = "Initscript for auto-loading kernel modules on boot"
 SECTION = "base"
-LICENSE = "PD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
-SRC_URI = "file://modutils.sh \
-  file://PD.patch"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 
"file://modutils.sh;beginline=3;endline=3;md5=b2dccaa94b3629a08bfb4f983cad6f89"
+SRC_URI = "file://modutils.sh"
 
 PR = "r7"
 
-- 
2.32.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163810): 
https://lists.openembedded.org/g/openembedded-core/message/163810
Mute This Topic: https://lists.openembedded.org/mt/90152715/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] base: Clean up module import compatibility code

2022-03-31 Thread Richard Purdie
This code was for old versions of bitbake which we're now long past. Drop it
and simplify the code.

Signed-off-by: Richard Purdie 
---
 meta/classes/base.bbclass | 11 ++-
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e51722d945d..3515720bf95 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -23,18 +23,11 @@ def oe_import(d):
 bbpath = [os.path.join(dir, "lib") for dir in 
d.getVar("BBPATH").split(":")]
 sys.path[0:0] = [dir for dir in bbpath if dir not in sys.path]
 
-def inject(name, value):
-"""Make a python object accessible from the metadata"""
-if hasattr(bb.utils, "_context"):
-bb.utils._context[name] = value
-else:
-__builtins__[name] = value
-
 import oe.data
 for toimport in oe.data.typed_value("OE_IMPORTS", d):
 try:
-imported = __import__(toimport)
-inject(toimport.split(".", 1)[0], imported)
+# Make a python object accessible from the metadata
+bb.utils._context[toimport.split(".", 1)[0]] = __import__(toimport)
 except AttributeError as e:
 bb.error("Error importing OE modules: %s" % str(e))
 return ""
-- 
2.32.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163809): 
https://lists.openembedded.org/g/openembedded-core/message/163809
Mute This Topic: https://lists.openembedded.org/mt/90152117/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] base: Don't add duplicates to sys.path

2022-03-31 Thread Richard Purdie
We can re-trigger this code and there is little point in stacking a ton of 
duplicate
paths which just waste time during searches for modules. This could in theory 
alter
layer module search order but that seems unlikely in common use.

Signed-off-by: Richard Purdie 
---
 meta/classes/base.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index cc81461473f..e51722d945d 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -20,8 +20,8 @@ PACKAGECONFIG_CONFARGS ??= ""
 def oe_import(d):
 import sys
 
-bbpath = d.getVar("BBPATH").split(":")
-sys.path[0:0] = [os.path.join(dir, "lib") for dir in bbpath]
+bbpath = [os.path.join(dir, "lib") for dir in 
d.getVar("BBPATH").split(":")]
+sys.path[0:0] = [dir for dir in bbpath if dir not in sys.path]
 
 def inject(name, value):
 """Make a python object accessible from the metadata"""
-- 
2.32.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163808): 
https://lists.openembedded.org/g/openembedded-core/message/163808
Mute This Topic: https://lists.openembedded.org/mt/90152116/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] libsdl2: Disable libunwind dependency in native builds

2022-03-31 Thread Alexander Kanavin
But the autobuilder does have a 21.10 worker, and the problem isn't
happening there, or is it?

Alex

On Thu, 31 Mar 2022 at 10:52, Carlos Rafael Giani  wrote:
>
> I can only report my own host setup, which is Ubuntu 21.10 x86-64. 
> libsdl2-native fails to build 100% of the time on this host.
>
> On 29.03.22 22:35, Alexander Kanavin wrote:
>
> Is this specific to some particular host setup? If so, it needs to be
> said in the commit message, so we know when it is safe to drop this
> patch.
>
> Alex
>
> On Tue, 29 Mar 2022 at 09:52, Carlos Rafael Giani via
> lists.openembedded.org 
> wrote:
>
> libunwind-native currently cannot be added to the class-native DEPENDS
> due to the following problem:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/91/builds/5624/steps/12/logs/stdio
>
> And without libunwind-native, libsdl2-native config fails errors like:
>
> | -- Checking for one of the modules 'libunwind'
> | CMake Error at 
> [...]/build/tmp/work/x86_64-linux/libsdl2-native/2.0.20-r0/recipe-sysroot-native/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:890
>  (message):
> |   None of the required 'libunwind' found
> | Call Stack (most recent call first):
> |   CMakeLists.txt:1367 (pkg_search_module)
>
> Ideally, the libunwind issue would be fixed, and then this could be added
> to the libsdl2 recipe:
>
> DEPENDS:append:class-native = " libunwind-native"
>
> However, the libunwind problem is not trivial to fix, and requires a
> specific setup to reproduce. As an alternative workaround, turn off
> libunwind support in the native SDL2 build by disabling the unwind.h
> check in the CMake script (this subsequently turns off all the other
> libunwind checks). The main user of libsdl2-native is qemu-native, which
> does not need libunwind support in SDL2.
>
> Signed-off-by: Carlos Rafael Giani 
> ---
>  ...d-in-native-OE-builds-by-not-looking.patch | 38 +++
>  .../libsdl2/libsdl2_2.0.20.bb |  1 +
>  2 files changed, 39 insertions(+)
>  create mode 100644 
> meta/recipes-graphics/libsdl2/libsdl2/0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch
>
> diff --git 
> a/meta/recipes-graphics/libsdl2/libsdl2/0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch
>  
> b/meta/recipes-graphics/libsdl2/libsdl2/0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch
> new file mode 100644
> index 00..214664f621
> --- /dev/null
> +++ 
> b/meta/recipes-graphics/libsdl2/libsdl2/0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch
> @@ -0,0 +1,38 @@
> +From 50c691e83f81b235bb96ef996dd4568ffaae256f Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani 
> +Date: Fri, 18 Mar 2022 12:06:23 +0100
> +Subject: [PATCH] Disable libunwind in native OE builds by not looking for
> + libunwind
> +
> +This is a workaround for this build error:
> +
> +| -- Checking for one of the modules 'libunwind'
> +| CMake Error at 
> [...]/build/tmp/work/x86_64-linux/libsdl2-native/2.0.20-r0/recipe-sysroot-native/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:890
>  (message):
> +|   None of the required 'libunwind' found
> +| Call Stack (most recent call first):
> +|   CMakeLists.txt:1367 (pkg_search_module)
> +
> +By not looking for the libunwind header, the rest of the libunwind
> +specific bits in the CMake build script are disabled.
> +
> +Upstream-Status: Inappropriate [OE specific]
> +---
> + CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 64f9fbf..12a4d8f 100644
> +--- a/CMakeLists.txt
>  b/CMakeLists.txt
> +@@ -862,7 +862,7 @@ if(SDL_LIBC)
> + check_include_file(sys/types.h HAVE_SYS_TYPES_H)
> + foreach(_HEADER
> + stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h 
> limits.h float.h
> +-strings.h wchar.h inttypes.h stdint.h ctype.h math.h iconv.h 
> signal.h libunwind.h)
> ++strings.h wchar.h inttypes.h stdint.h ctype.h math.h iconv.h 
> signal.h)
> +   string(TOUPPER "HAVE_${_HEADER}" _UPPER)
> +   string(REPLACE "." "_" _HAVE_H ${_UPPER})
> +   check_include_file("${_HEADER}" ${_HAVE_H})
> +--
> +2.32.0
> +
> diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb 
> b/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
> index 58bc94cc86..4ba22c1fe6 100644
> --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
> +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
> @@ -20,6 +20,7 @@ SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
> file://optional-libunwind-generic.patch \
> 
> file://0001-sdlchecks.cmake-pass-cflags-to-the-appropriate-cmake.patch \
> "
> +SRC_URI:append:class-native = " 
> file://0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch"
>
>  S = "${WORKDIR}/SDL2-${PV}"
>
> --
> 2.32.0
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163807): 

Re: [OE-core] [PATCH] libsdl2: Disable libunwind dependency in native builds

2022-03-31 Thread Carlos Rafael Giani via lists.openembedded.org
I can only report my own host setup, which is Ubuntu 21.10 x86-64. 
libsdl2-native fails to build 100% of the time on this host.


On 29.03.22 22:35, Alexander Kanavin wrote:

Is this specific to some particular host setup? If so, it needs to be
said in the commit message, so we know when it is safe to drop this
patch.

Alex

On Tue, 29 Mar 2022 at 09:52, Carlos Rafael Giani via
lists.openembedded.org
wrote:

libunwind-native currently cannot be added to the class-native DEPENDS
due to the following problem:

https://autobuilder.yoctoproject.org/typhoon/#/builders/91/builds/5624/steps/12/logs/stdio

And without libunwind-native, libsdl2-native config fails errors like:

| -- Checking for one of the modules 'libunwind'
| CMake Error at 
[...]/build/tmp/work/x86_64-linux/libsdl2-native/2.0.20-r0/recipe-sysroot-native/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:890
 (message):
|   None of the required 'libunwind' found
| Call Stack (most recent call first):
|   CMakeLists.txt:1367 (pkg_search_module)

Ideally, the libunwind issue would be fixed, and then this could be added
to the libsdl2 recipe:

DEPENDS:append:class-native = " libunwind-native"

However, the libunwind problem is not trivial to fix, and requires a
specific setup to reproduce. As an alternative workaround, turn off
libunwind support in the native SDL2 build by disabling the unwind.h
check in the CMake script (this subsequently turns off all the other
libunwind checks). The main user of libsdl2-native is qemu-native, which
does not need libunwind support in SDL2.

Signed-off-by: Carlos Rafael Giani
---
  ...d-in-native-OE-builds-by-not-looking.patch | 38 +++
  .../libsdl2/libsdl2_2.0.20.bb |  1 +
  2 files changed, 39 insertions(+)
  create mode 100644 
meta/recipes-graphics/libsdl2/libsdl2/0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch

diff --git 
a/meta/recipes-graphics/libsdl2/libsdl2/0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch
 
b/meta/recipes-graphics/libsdl2/libsdl2/0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch
new file mode 100644
index 00..214664f621
--- /dev/null
+++ 
b/meta/recipes-graphics/libsdl2/libsdl2/0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch
@@ -0,0 +1,38 @@
+From 50c691e83f81b235bb96ef996dd4568ffaae256f Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani
+Date: Fri, 18 Mar 2022 12:06:23 +0100
+Subject: [PATCH] Disable libunwind in native OE builds by not looking for
+ libunwind
+
+This is a workaround for this build error:
+
+| -- Checking for one of the modules 'libunwind'
+| CMake Error at 
[...]/build/tmp/work/x86_64-linux/libsdl2-native/2.0.20-r0/recipe-sysroot-native/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:890
 (message):
+|   None of the required 'libunwind' found
+| Call Stack (most recent call first):
+|   CMakeLists.txt:1367 (pkg_search_module)
+
+By not looking for the libunwind header, the rest of the libunwind
+specific bits in the CMake build script are disabled.
+
+Upstream-Status: Inappropriate [OE specific]
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 64f9fbf..12a4d8f 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -862,7 +862,7 @@ if(SDL_LIBC)
+ check_include_file(sys/types.h HAVE_SYS_TYPES_H)
+ foreach(_HEADER
+ stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h 
limits.h float.h
+-strings.h wchar.h inttypes.h stdint.h ctype.h math.h iconv.h 
signal.h libunwind.h)
++strings.h wchar.h inttypes.h stdint.h ctype.h math.h iconv.h 
signal.h)
+   string(TOUPPER "HAVE_${_HEADER}" _UPPER)
+   string(REPLACE "." "_" _HAVE_H ${_UPPER})
+   check_include_file("${_HEADER}" ${_HAVE_H})
+--
+2.32.0
+
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb 
b/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
index 58bc94cc86..4ba22c1fe6 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
@@ -20,6 +20,7 @@ SRC_URI ="http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ 
file://optional-libunwind-generic.patch \ 
file://0001-sdlchecks.cmake-pass-cflags-to-the-appropriate-cmake.patch 
\ "

+SRC_URI:append:class-native =" 
file://0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch"

  S = "${WORKDIR}/SDL2-${PV}"

--
2.32.0





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163806): 
https://lists.openembedded.org/g/openembedded-core/message/163806
Mute This Topic: https://lists.openembedded.org/mt/90103750/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] kmod: Add an exclude directive to depmod

2022-03-31 Thread Jose Quaresma
Hi Saul,

Saul Wold  escreveu no dia quarta, 30/03/2022 à(s)
23:12:

> This adds a new configuration directive to depmod that causes
> depmod to exclude a give path entry like .debug.
>
> kernel-dbg provides the modules .debug/.ko files and
> when installed either directly or when dbg-pkgs are selected
> this can cause depmod to fail.
>
> This patch will be submitted to upstream kmod.
>
> Signed-off-by: Saul Wold 
> ---
>  .../kmod/depmodwrapper-cross_1.0.bb   |   3 +
>  ...dd-support-for-excluding-a-directory.patch | 158 ++
>  meta/recipes-kernel/kmod/kmod_29.bb   |   4 +
>  3 files changed, 165 insertions(+)
>  create mode 100644
> meta/recipes-kernel/kmod/kmod/0001-depmod-Add-support-for-excluding-a-directory.patch
>
> diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
> b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
> index 04fc14a6d21..aa23ba41276 100644
> --- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
> +++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
> @@ -16,6 +16,9 @@ do_populate_sysroot[depends] = ""
>
>  do_install() {
> install -d ${D}${bindir_crossscripts}/
> +   install -d ${D}${sysconfdir}/depmod.d/
> +
> +   echo "exclude .debug" > ${D}${sysconfdir}/depmod.d/exclude.conf
>
> cat > ${D}${bindir_crossscripts}/depmodwrapper << EOF
>  #!/bin/sh
> diff --git
> a/meta/recipes-kernel/kmod/kmod/0001-depmod-Add-support-for-excluding-a-directory.patch
> b/meta/recipes-kernel/kmod/kmod/0001-depmod-Add-support-for-excluding-a-directory.patch
> new file mode 100644
> index 000..3f16cdf0574
> --- /dev/null
> +++
> b/meta/recipes-kernel/kmod/kmod/0001-depmod-Add-support-for-excluding-a-directory.patch
> @@ -0,0 +1,158 @@
> +From 8bc07c3ba3a412bd6bb94ad8bad0d76801ec2c9f Mon Sep 17 00:00:00 2001
> +From: Saul Wold 
> +Date: Tue, 22 Mar 2022 12:11:45 -0700
> +Subject: [PATCH] depmod: Add support for excluding a directory
> +
> +This adds support to depmod to enable a new exclude directive in
> +the depmod.d/exclude.conf configuration file. Currently depmod
> +already excludes directories named source or build. This change
> +will allow additional directories like .debug to be excluded also
> +via a new exclude directive.
> +
> +depmod.d/exclude.conf example:
> +exclude.debug
> +
> +Upstream-Status: Submitted
> +
> +Signed-off-by: Saul Wold 
> +
> +%% original patch: 0001-depmod-Add-support-for-excluding-a-directory.patch
>

This line comes from devtool but is not needed.

Jose


> +---
> + man/depmod.d.xml | 14 +
> + tools/depmod.c   | 54 
> + 2 files changed, 68 insertions(+)
> +
> +diff --git a/man/depmod.d.xml b/man/depmod.d.xml
> +index b315e93..9ab790a 100644
> +--- a/man/depmod.d.xml
>  b/man/depmod.d.xml
> +@@ -131,6 +131,20 @@
> +   
> + 
> +   
> ++  
> ++external excludedir
> ++
> ++
> ++  
> ++This specifies the trailing directories that will be excluded
> ++during the search for kernel modules.
> ++  
> ++  
> ++  The excludedir the trailing
> directory
> ++  to exclude
> ++  
> ++
> ++  
> + 
> +   
> +
> +diff --git a/tools/depmod.c b/tools/depmod.c
> +index eb810b8..8b19ab6 100644
> +--- a/tools/depmod.c
>  b/tools/depmod.c
> +@@ -458,6 +458,12 @@ struct cfg_external {
> +   char path[];
> + };
> +
> ++struct cfg_exclude {
> ++  struct cfg_exclude *next;
> ++  size_t len;
> ++  char exclude_dir[];
> ++};
> ++
> + struct cfg {
> +   const char *kversion;
> +   char dirname[PATH_MAX];
> +@@ -469,6 +475,7 @@ struct cfg {
> +   struct cfg_override *overrides;
> +   struct cfg_search *searches;
> +   struct cfg_external *externals;
> ++  struct cfg_exclude *excludes;
> + };
> +
> + static enum search_type cfg_define_search_type(const char *path)
> +@@ -580,6 +587,31 @@ static void cfg_external_free(struct cfg_external
> *ext)
> +   free(ext);
> + }
> +
> ++static int cfg_exclude_add(struct cfg *cfg, const char *path)
> ++{
> ++  struct cfg_exclude *exc;
> ++  size_t len = strlen(path);
> ++
> ++  exc = malloc(sizeof(struct cfg_exclude) + len);
> ++  if (exc == NULL) {
> ++  ERR("exclude add: out of memory\n");
> ++  return -ENOMEM;
> ++  }
> ++  exc->len = len;
> ++  memcpy(exc->exclude_dir, path, len);
> ++
> ++  DBG("exclude add: %s\n", path);
> ++
> ++  exc->next = cfg->excludes;
> ++  cfg->excludes = exc;
> ++  return 0;
> ++}
> ++
> ++static void cfg_exclude_free(struct cfg_exclude *exc)
> ++{
> ++  free(exc);
> ++}
> ++
> + static int cfg_kernel_matches(const struct cfg *cfg, const char *pattern)
> + {
> +   regex_t re;
> +@@ -657,6 +689,11 @@ static int cfg_file_parse(struct cfg *cfg, const
> char *filename)
> +   }
> +
> +

Re: [OE-core] [RFC PATCH] bitbake.conf: Add base package version (BPV) variable

2022-03-31 Thread Stefan Herbrechtsmeier

Am 30.03.2022 um 19:32 schrieb Khem Raj:

On Wed, Mar 30, 2022 at 1:16 AM Stefan Herbrechtsmeier
 wrote:


From: Stefan Herbrechtsmeier 

Add a base package version (BPV) variable and use it as default for the
package version (PV) variable. The BPV variable contains the base
package version of the recipe read from the recipe filename.

The base package version variable supports an expansion of the version
from the recipe filename without the need of an immediate variable
expansion:
 PV = "${BPV}+git${SRCPV}"

It allows the inclusion of include files inside a recipe file with the
same version in the recipe and include filename even if the package
version is different to the base package version in the filename:
 require linux-yocto-${BPV}.inc



how many such usecase do we have ?


4x require binutils-${PV}.inc
9x require recipes-devtools/gcc/gcc-${PV}.inc
6x require go-${PV}.inc
4x require libtool-${PV}.inc
2x require m4-${PV}.inc
1x require boost-${PV}.inc

Thereby binutils and gcc set the real PV inside the .inc file.


seems to be quite errorprone too.


The current use cases in oe core is much more error-prone because they 
use ${PV} and set the PV inside the .inc file. This means a second .inc 
file must use the new PV. Furthermore, if somebody in oe-core add a `PV 
.= "+git${SRCPV}"` it breaks includes in other layers.


A MAIN_VERSION (MAJOR.MINOR) and a BPV (MAJOR.MINOR.PATCH) would make 
the use case explicit:


require binutils-${MAIN_VERSION}.inc
require recipes-devtools/gcc/gcc-${MAIN_VERSION}.inc
require go-${BPV}.inc
require libtool-${BPV}.inc
require m4-${BPV}.inc
require boost-${BPV}.inc


At the moment oe-core have recipe specific names and code for the same 
value:


MAJOR.MINOR.PATCH:
MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"

MAJOR.MINOR:
WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
SHRT_VER = 
"${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
VIMDIR = 
"vim${@d.getVar('PV').split('.')[0]}${@d.getVar('PV').split('.')[1]}"

SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
NAMEVER = "${@oe.utils.trim_version("${PV}", 2)}"
SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"

MAJOR:
MAJ_VER = "${@oe.utils.trim_version("${PV}", 2).split('.')[0]}"
ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}"

MINOR:
MIN_VER = "${@oe.utils.trim_version("${PV}", 2).split('.')[1]}"


Sometimes the same name is used for different values:

MAJOR_VERSION = "${@oe.utils.trim_version("${PV}", 1)}"
WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"

Maybe the bitbake.conf isn't the ride place but I think a common name 
for the base / short version (MAJOR.MINOR), base package version 
(MAJOR.MINOR.PATCH) and major, minor and patch would be helpful.



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