Date   

[kirkstone 01/22] meta-oe-image: fix build depends

Armin Kuster
 

add only when various DISTRO_FEATURES are enabled

Signed-off-by: Armin Kuster <akuster808@...>
Signed-off-by: Khem Raj <raj.khem@...>
(cherry picked from commit 73d50d2b4b61b44266e03722db295d0da7866d2d)
Signed-off-by: Armin Kuster <akuster808@...>
---
.../recipes-core/packagegroups/packagegroup-meta-oe.bb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
index bc3d4fefeb..765edc5c5f 100644
--- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
+++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
@@ -96,7 +96,7 @@ RDEPENDS:packagegroup-meta-oe-bsp ="\
acpitool \
cpufrequtils \
edac-utils \
- firmwared \
+ ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "firmwared", "", d)} \
flashrom \
fwupd \
fwupd-efi \
@@ -611,12 +611,12 @@ RDEPENDS:packagegroup-meta-oe-graphics ="\
surf \
tesseract-lang \
tesseract \
- tigervnc \
+ ${@bb.utils.contains("DISTRO_FEATURES", "x11 pam", "tigervnc", "", d)} \
tslib \
unclutter-xfixes \
libvdpau \
xcursorgen \
- xscreensaver \
+ ${@bb.utils.contains("DISTRO_FEATURES", "x11 pam", "xscreensaver", "", d)} \
yad \
parallel-deqp-runner \
${@bb.utils.contains("DISTRO_FEATURES", "opengl", "opengl-es-cts", "", d)} \
@@ -729,7 +729,7 @@ RDEPENDS:packagegroup-meta-oe-support ="\
anthy \
atop \
ace-cloud-editor \
- driverctl \
+ ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "driverctl", "", d)} \
frame \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "geis", "", d)} \
grail \
--
2.25.1


[kirkstone 00/22] Patch review

Armin Kuster
 

Please have comments back by Tuesday.

The following changes since commit 3b4da37a947c6ea244061929e7c457d02f34f748:

boinc-client: Make script install not depend on host install paths (2022-04-29 06:30:11 -0700)

are available in the Git repository at:

git://git.openembedded.org/meta-openembedded-contrib stable/kirkstone-nut
http://cgit.openembedded.org/meta-openembedded-contrib/log/?h=stable/kirkstone-nut

Armin Kuster (3):
meta-oe-image: fix build depends
meta-python-image: Fix build depends
meta-gnome: fix layer depends.

Bassem Boubaker (1):
conntrack-tools: Fix missing capability

Denys Dmytriyenko (2):
devmem2: reinstate previous patches, removed by mistake
devmem2: add support for different page sizes

Gianfranco Costamagna (1):
vboxguestdrivers: upgrade 6.1.32 -> 6.1.34

Jiaqing Zhao (2):
openldap: Remove libgcrypt dependency
openldap: Upgrade 2.5.9 -> 2.5.12

Khem Raj (7):
ufw: Fix packaging errors found with ppc64
libcereal: Enable for glibc/ppc
mimic: Use special rateconv.c license
makedumpfile: Use right TARGET for ppc32
evince: Add dbus to depnedencies on non-x11 builds
evolution-data-server: Do not pass --library-path to gir compiler
python3-wxgtk4: Needs x11 for sip module

Markus Volk (1):
minidlna: fix obsolete license warning

Michael Opdenacker (1):
devmem2: update SRC_URI according to redirect

Mingli Yu (1):
s-nail: Set VAL_MTA

Xu Huan (1):
python3-astroid: upgrade 2.11.2 -> 2.11.3

Yi Zhao (2):
frr: inherit autotools-brokensep instead of autotools
networkmanager: fix parallel build failure

meta-gnome/conf/layer.conf | 2 +-
.../recipes-gnome/evince/evince_42.2.bb | 2 +-
...e-Do-not-export-CC-into-gir-compiler.patch | 14 ++-
.../recipes-multimedia/mimic/mimic_1.3.0.1.bb | 2 +-
.../recipes-multimedia/minidlna/minidlna.inc | 2 +-
...t-add-dependency-libnm_client_public.patch | 34 +++++++
.../networkmanager/networkmanager_1.36.2.bb | 1 +
.../recipes-connectivity/ufw/ufw_0.36.1.bb | 2 +-
.../conntrack-tools/conntrack-tools_1.4.6.bb | 5 +
.../recipes-protocols/frr/frr_8.2.2.bb | 6 +-
meta-oe/licenses/rateconv | 27 ++++++
.../packagegroups/packagegroup-meta-oe.bb | 8 +-
.../files/0001-make.rc-set-VAL_MTA.patch | 48 ++++++++++
.../recipes-extended/s-nail/s-nail_14.9.24.bb | 3 +-
.../makedumpfile/makedumpfile_1.7.1.bb | 6 +-
meta-oe/recipes-support/devmem2/devmem2.bb | 7 +-
...word-is-32-bit-and-add-support-for-6.patch | 70 ++++++++++++++
...ort-different-page-sizes-at-run-time.patch | 35 +++++++
.../devmem2/devmem2/devmem2-fixups-2.patch | 91 +++++++++++++++++++
.../libcereal/libcereal_1.3.2.bb | 6 +-
.../openldap-2.4.28-gnutls-gcrypt.patch | 15 ---
.../{openldap_2.5.9.bb => openldap_2.5.12.bb} | 8 +-
...s_6.1.32.bb => vboxguestdrivers_6.1.34.bb} | 2 +-
.../packagegroups/packagegroup-meta-python.bb | 10 +-
...id_2.11.2.bb => python3-astroid_2.11.3.bb} | 2 +-
.../python3-wxgtk4/python3-wxgtk4_4.1.1.bb | 2 +-
26 files changed, 361 insertions(+), 49 deletions(-)
create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-client-test-add-dependency-libnm_client_public.patch
create mode 100644 meta-oe/licenses/rateconv
create mode 100644 meta-oe/recipes-extended/s-nail/files/0001-make.rc-set-VAL_MTA.patch
create mode 100644 meta-oe/recipes-support/devmem2/devmem2/0001-devmem.c-ensure-word-is-32-bit-and-add-support-for-6.patch
create mode 100644 meta-oe/recipes-support/devmem2/devmem2/0001-devmem2-support-different-page-sizes-at-run-time.patch
create mode 100644 meta-oe/recipes-support/devmem2/devmem2/devmem2-fixups-2.patch
delete mode 100644 meta-oe/recipes-support/openldap/openldap/openldap-2.4.28-gnutls-gcrypt.patch
rename meta-oe/recipes-support/openldap/{openldap_2.5.9.bb => openldap_2.5.12.bb} (96%)
rename meta-oe/recipes-support/vboxguestdrivers/{vboxguestdrivers_6.1.32.bb => vboxguestdrivers_6.1.34.bb} (97%)
rename meta-python/recipes-devtools/python/{python3-astroid_2.11.2.bb => python3-astroid_2.11.3.bb} (89%)

--
2.25.1


Re: [kirkstone][PATCH 1/3] devmem2: reinstate previous patches, removed by mistake

Armin Kuster
 

On 5/12/22 16:43, Denys Dmytriyenko wrote:
This reverts commit 5e8f4720aaa3da7350ead06959cae0492133cd61.

Signed-off-by: Denys Dmytriyenko <denis@...>
Signed-off-by: Khem Raj <raj.khem@...>
Signed-off-by: Denys Dmytriyenko <denis@...>
thanks, I already have this staged in stable/kirtkstone-nut

-armin
---
meta-oe/recipes-support/devmem2/devmem2.bb | 3 +-
...word-is-32-bit-and-add-support-for-6.patch | 70 ++++++++++++++
.../devmem2/devmem2/devmem2-fixups-2.patch | 91 +++++++++++++++++++
3 files changed, 163 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-support/devmem2/devmem2/0001-devmem.c-ensure-word-is-32-bit-and-add-support-for-6.patch
create mode 100644 meta-oe/recipes-support/devmem2/devmem2/devmem2-fixups-2.patch

diff --git a/meta-oe/recipes-support/devmem2/devmem2.bb b/meta-oe/recipes-support/devmem2/devmem2.bb
index 92c05fe06..c6b8df5e4 100644
--- a/meta-oe/recipes-support/devmem2/devmem2.bb
+++ b/meta-oe/recipes-support/devmem2/devmem2.bb
@@ -4,7 +4,8 @@ LIC_FILES_CHKSUM = "file://devmem2.c;endline=38;md5=a9eb9f3890384519f435aedf9862
PR = "r7"
SRC_URI = "http://www.free-electrons.com/pub/mirror/devmem2.c;downloadfilename=devmem2-new.c \
- "
+ file://devmem2-fixups-2.patch;apply=yes;striplevel=0 \
+ file://0001-devmem.c-ensure-word-is-32-bit-and-add-support-for-6.patch"
S = "${WORKDIR}"
diff --git a/meta-oe/recipes-support/devmem2/devmem2/0001-devmem.c-ensure-word-is-32-bit-and-add-support-for-6.patch b/meta-oe/recipes-support/devmem2/devmem2/0001-devmem.c-ensure-word-is-32-bit-and-add-support-for-6.patch
new file mode 100644
index 000000000..2a57f2989
--- /dev/null
+++ b/meta-oe/recipes-support/devmem2/devmem2/0001-devmem.c-ensure-word-is-32-bit-and-add-support-for-6.patch
@@ -0,0 +1,70 @@
+From 1360a907879dd24041797a3b709d49aeac2ab444 Mon Sep 17 00:00:00 2001
+From: Denys Dmytriyenko <denys@...>
+Date: Tue, 29 May 2018 16:55:42 -0400
+Subject: [PATCH] devmem.c: ensure word is 32-bit and add support for 64-bit
+ long
+
+Signed-off-by: Denys Dmytriyenko <denys@...>
+---
+ devmem2.c | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/devmem2.c b/devmem2.c
+index 5845381..68131b2 100644
+--- a/devmem2.c
++++ b/devmem2.c
+@@ -39,6 +39,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <unistd.h>
+ #include <string.h>
+ #include <errno.h>
+@@ -69,7 +70,7 @@ int main(int argc, char **argv) {
+ if(argc < 2) {
+ fprintf(stderr, "\nUsage:\t%s { address } [ type [ data ] ]\n"
+ "\taddress : memory address to act upon\n"
+- "\ttype : access operation type : [b]yte, [h]alfword, [w]ord\n"
++ "\ttype : access operation type : [b]yte, [h]alfword, [w]ord, [l]ong\n"
+ "\tdata : data to be written\n\n",
+ argv[0]);
+ exit(1);
+@@ -103,9 +104,14 @@ int main(int argc, char **argv) {
+ read_result = *((unsigned short *) virt_addr);
+ break;
+ case 'w':
+- data_size = sizeof(unsigned long);
++ data_size = sizeof(uint32_t);
+ virt_addr = fixup_addr(virt_addr, data_size);
+- read_result = *((unsigned long *) virt_addr);
++ read_result = *((uint32_t *) virt_addr);
++ break;
++ case 'l':
++ data_size = sizeof(uint64_t);
++ virt_addr = fixup_addr(virt_addr, data_size);
++ read_result = *((uint64_t *) virt_addr);
+ break;
+ default:
+ fprintf(stderr, "Illegal data type '%c'.\n", access_type);
+@@ -129,9 +135,14 @@ int main(int argc, char **argv) {
+ read_result = *((unsigned short *) virt_addr);
+ break;
+ case 'w':
+- virt_addr = fixup_addr(virt_addr, sizeof(unsigned long));
+- *((unsigned long *) virt_addr) = write_val;
+- read_result = *((unsigned long *) virt_addr);
++ virt_addr = fixup_addr(virt_addr, sizeof(uint32_t));
++ *((uint32_t *) virt_addr) = write_val;
++ read_result = *((uint32_t *) virt_addr);
++ break;
++ case 'l':
++ virt_addr = fixup_addr(virt_addr, sizeof(uint64_t));
++ *((uint64_t *) virt_addr) = write_val;
++ read_result = *((uint64_t *) virt_addr);
+ break;
+ }
+ sprintf(fmt_str, "Write at address 0x%%08lX (%%p): 0x%%0%dlX, "
+--
+2.7.4
+
diff --git a/meta-oe/recipes-support/devmem2/devmem2/devmem2-fixups-2.patch b/meta-oe/recipes-support/devmem2/devmem2/devmem2-fixups-2.patch
new file mode 100644
index 000000000..4517797fc
--- /dev/null
+++ b/meta-oe/recipes-support/devmem2/devmem2/devmem2-fixups-2.patch
@@ -0,0 +1,91 @@
+--- devmem2.c 2004-08-05 01:55:25.000000000 +0200
++++ devmem2_modif.c 2011-01-13 15:48:37.798799784 +0100
+@@ -45,12 +45,16 @@
+ #define MAP_SIZE 4096UL
+ #define MAP_MASK (MAP_SIZE - 1)
+
++static inline void *fixup_addr(void *addr, size_t size);
++
+ int main(int argc, char **argv) {
+ int fd;
+ void *map_base, *virt_addr;
+- unsigned long read_result, writeval;
++ unsigned long read_result, write_val;
+ off_t target;
+ int access_type = 'w';
++ char fmt_str[128];
++ size_t data_size;
+
+ if(argc < 2) {
+ fprintf(stderr, "\nUsage:\t%s { address } [ type [ data ] ]\n"
+@@ -79,38 +83,51 @@
+ virt_addr = map_base + (target & MAP_MASK);
+ switch(access_type) {
+ case 'b':
++ data_size = sizeof(unsigned char);
++ virt_addr = fixup_addr(virt_addr, data_size);
+ read_result = *((unsigned char *) virt_addr);
+ break;
+ case 'h':
++ data_size = sizeof(unsigned short);
++ virt_addr = fixup_addr(virt_addr, data_size);
+ read_result = *((unsigned short *) virt_addr);
+ break;
+ case 'w':
++ data_size = sizeof(unsigned long);
++ virt_addr = fixup_addr(virt_addr, data_size);
+ read_result = *((unsigned long *) virt_addr);
+ break;
+ default:
+ fprintf(stderr, "Illegal data type '%c'.\n", access_type);
+ exit(2);
+ }
+- printf("Value at address 0x%X (%p): 0x%X\n", target, virt_addr, read_result);
++ sprintf(fmt_str, "Read at address 0x%%08lX (%%p): 0x%%0%dlX\n", 2*data_size);
++ printf(fmt_str, (unsigned long)target, virt_addr, read_result);
+ fflush(stdout);
+
+ if(argc > 3) {
+- writeval = strtoul(argv[3], 0, 0);
++ write_val = strtoul(argv[3], 0, 0);
+ switch(access_type) {
+ case 'b':
+- *((unsigned char *) virt_addr) = writeval;
++ virt_addr = fixup_addr(virt_addr, sizeof(unsigned char));
++ *((unsigned char *) virt_addr) = write_val;
+ read_result = *((unsigned char *) virt_addr);
+ break;
+ case 'h':
+- *((unsigned short *) virt_addr) = writeval;
++ virt_addr = fixup_addr(virt_addr, sizeof(unsigned short));
++ *((unsigned short *) virt_addr) = write_val;
+ read_result = *((unsigned short *) virt_addr);
+ break;
+ case 'w':
+- *((unsigned long *) virt_addr) = writeval;
++ virt_addr = fixup_addr(virt_addr, sizeof(unsigned long));
++ *((unsigned long *) virt_addr) = write_val;
+ read_result = *((unsigned long *) virt_addr);
+ break;
+ }
+- printf("Written 0x%X; readback 0x%X\n", writeval, read_result);
++ sprintf(fmt_str, "Write at address 0x%%08lX (%%p): 0x%%0%dlX, "
++ "readback 0x%%0%dlX\n", 2*data_size, 2*data_size);
++ printf(fmt_str, (unsigned long)target, virt_addr,
++ write_val, read_result);
+ fflush(stdout);
+ }
+
+@@ -119,3 +136,12 @@
+ return 0;
+ }
+
++static inline void *fixup_addr(void *addr, size_t size)
++{
++#ifdef FORCE_STRICT_ALIGNMENT
++ unsigned long aligned_addr = (unsigned long)addr;
++ aligned_addr &= ~(size - 1);
++ addr = (void *)aligned_addr;
++#endif
++ return addr;
++}


[dunfell][PATCH] ostree: prevent ostree-native depending on target virtual/kernel to provide kernel-module-overlay

Martin Jansa
 

Signed-off-by: Martin Jansa <Martin.Jansa@...>
---
meta-oe/recipes-extended/ostree/ostree_2020.3.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-extended/ostree/ostree_2020.3.bb b/meta-oe/recipes-extended/ostree/ostree_2020.3.bb
index b8b86ed5a9..5b0171d8c8 100644
--- a/meta-oe/recipes-extended/ostree/ostree_2020.3.bb
+++ b/meta-oe/recipes-extended/ostree/ostree_2020.3.bb
@@ -181,7 +181,7 @@ RDEPENDS_${PN}-ptest += " \
"
RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils glibc-localedata-en-us"

-RRECOMMENDS_${PN} += "kernel-module-overlay"
+RRECOMMENDS_${PN}_append_class-target = " kernel-module-overlay"

SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path"
SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service"
--
2.35.1


[PATCH] ostree: prevent ostree-native depending on target virtual/kernel to provide kernel-module-overlay

Martin Jansa
 

Signed-off-by: Martin Jansa <Martin.Jansa@...>
---
meta-oe/recipes-extended/ostree/ostree_2022.2.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-extended/ostree/ostree_2022.2.bb b/meta-oe/recipes-extended/ostree/ostree_2022.2.bb
index 24a7513188..50d0548cc7 100644
--- a/meta-oe/recipes-extended/ostree/ostree_2022.2.bb
+++ b/meta-oe/recipes-extended/ostree/ostree_2022.2.bb
@@ -201,7 +201,7 @@ RDEPENDS:${PN}-ptest += " \
"
RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-localedata-en-us"

-RRECOMMENDS:${PN} += "kernel-module-overlay"
+RRECOMMENDS:${PN}:append:class-target = " kernel-module-overlay"

SYSTEMD_SERVICE:${PN} = "ostree-remount.service ostree-finalize-staged.path"
SYSTEMD_SERVICE:${PN}-switchroot = "ostree-prepare-root.service"
--
2.35.1


[meta-oe][PATCH] image_types_sparse: Generate "don't care" chunks

Sean Anderson <sean.anderson@...>
 

By default, img2simg will only generate raw and fill chunks. This adds
support for "don't care" chunks, based on file holes. This is similar to
how bmaptool works. "don't care" chunks do not need to be written,
speeding up flashing time.

Signed-off-by: Sean Anderson <sean.anderson@...>
---

meta-oe/classes/image_types_sparse.bbclass | 4 +-
...off-most-of-sparse_file_read_normal-.patch | 60 ++++++
...se-Add-hole-mode-to-sparse_file_read.patch | 188 ++++++++++++++++++
...port-for-converting-holes-to-don-t-c.patch | 114 +++++++++++
.../android-tools/android-tools_5.1.1.r37.bb | 3 +
5 files changed, 367 insertions(+), 2 deletions(-)
create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch
create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools/core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch
create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools/core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch

diff --git a/meta-oe/classes/image_types_sparse.bbclass b/meta-oe/classes/image_types_sparse.bbclass
index 4263593a8d..d9983c721c 100644
--- a/meta-oe/classes/image_types_sparse.bbclass
+++ b/meta-oe/classes/image_types_sparse.bbclass
@@ -2,7 +2,7 @@ inherit image_types

CONVERSIONTYPES += "sparse"
CONVERSION_CMD:sparse = " \
- img2simg "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \
- "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" \
+ img2simg -s "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \
+ "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" \
"
CONVERSION_DEPENDS_sparse = "android-tools-native"
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch
new file mode 100644
index 0000000000..b3893f0c80
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch
@@ -0,0 +1,60 @@
+From 7b74d23ed955206a789a96bdc3288593e702afac Mon Sep 17 00:00:00 2001
+From: Sean Anderson <sean.anderson@...>
+Date: Thu, 30 Dec 2021 15:16:08 -0500
+Subject: [PATCH] libsparse: Split off most of sparse_file_read_normal into a
+ helper function
+
+This carves out the core of sparse_file_read_normal and splits it off so
+it can be reused in the next patch. No functional change intended.
+
+Change-Id: Id00491fd7e5bb6fa28c517a0bb32b8b506539d4d
+Upstream-status: Backport [95657f3e5976d96073f7bbfe3a49192509999d1d]
+Signed-off-by: Sean Anderson <sean.anderson@...>
+---
+ libsparse/sparse_read.c | 21 ++++++++++++++++-----
+ 1 file changed, 16 insertions(+), 5 deletions(-)
+
+diff --git a/libsparse/sparse_read.c b/libsparse/sparse_read.c
+index 8e188e9a4..ee4abd86a 100644
+--- a/libsparse/sparse_read.c
++++ b/libsparse/sparse_read.c
+@@ -353,13 +353,11 @@ static int sparse_file_read_sparse(struct sparse_file *s, int fd, bool crc)
+ return 0;
+ }
+
+-static int sparse_file_read_normal(struct sparse_file *s, int fd)
++static int do_sparse_file_read_normal(struct sparse_file *s, int fd, uint32_t* buf, int64_t offset,
++ int64_t remain)
+ {
+ int ret;
+- uint32_t *buf = malloc(s->block_size);
+- unsigned int block = 0;
+- int64_t remain = s->len;
+- int64_t offset = 0;
++ unsigned int block = offset / s->block_size;
+ unsigned int to_read;
+ unsigned int i;
+ bool sparse_block;
+@@ -403,6 +401,19 @@ static int sparse_file_read_normal(struct sparse_file *s, int fd)
+ return 0;
+ }
+
++static int sparse_file_read_normal(struct sparse_file* s, int fd)
++{
++ int ret;
++ uint32_t* buf = (uint32_t*)malloc(s->block_size);
++
++ if (!buf)
++ return -ENOMEM;
++
++ ret = do_sparse_file_read_normal(s, fd, buf, 0, s->len);
++ free(buf);
++ return ret;
++}
++
+ int sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc)
+ {
+ if (crc && !sparse) {
+--
+2.35.1.1320.gc452695387.dirty
+
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch
new file mode 100644
index 0000000000..e5221d2b4c
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch
@@ -0,0 +1,188 @@
+From 41574b628ec4229c24dfe289af7b6978edcca4ed Mon Sep 17 00:00:00 2001
+From: Sean Anderson <sean.anderson@...>
+Date: Thu, 30 Dec 2021 15:19:41 -0500
+Subject: [PATCH] libsparse: Add "hole" mode to sparse_file_read
+
+This adds support for filesystem-level sparse files. These files have
+holes which are not stored in the filesystem and when read are full of
+zeros. While these zeros may be significant in some types of files,
+other types of files may not care about the contents of holes. For
+example, most filesystem creation tools write to all the blocks they
+care about. Those blocks not written to will remain holes, and can be
+safely represented by "don't care" chunks. Using "don't care" chunks
+instead of fill chunks can result in a substantial reduction of the time
+it takes to program a sparse image.
+
+To accomplish this, we extend the existing "sparse" boolean parameter to
+be an enum of mode types. This enum represents the strategy we take when
+reading in a file. For the most part the implementation is
+straightforward. We use lseek to determine where the holes in the file
+are, and then use do_sparse_file_read_normal to create chunks for the
+data section. Note that every file has an implicit hole at its end.
+
+Change-Id: I0cfbf08886fca9a91cb753ec8734c84fcbe52c9f
+Upstream-Status: Backport [f96466b05543b984ef7315d830bab4a409228d35]
+Signed-off-by: Sean Anderson <sean.anderson@...>
+---
+ libsparse/img2simg.c | 2 +-
+ libsparse/include/sparse/sparse.h | 32 +++++++++++---
+ libsparse/sparse_read.c | 71 +++++++++++++++++++++++++++++--
+ 3 files changed, 93 insertions(+), 12 deletions(-)
+
+diff --git a/libsparse/img2simg.c b/libsparse/img2simg.c
+index a0db36f45..2e171b613 100644
+--- a/libsparse/img2simg.c
++++ b/libsparse/img2simg.c
+@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
+ }
+
+ sparse_file_verbose(s);
+- ret = sparse_file_read(s, in, false, false);
++ ret = sparse_file_read(s, in, SPARSE_READ_MODE_NORMAL, false);
+ if (ret) {
+ fprintf(stderr, "Failed to read file\n");
+ exit(-1);
+diff --git a/libsparse/include/sparse/sparse.h b/libsparse/include/sparse/sparse.h
+index 8b757d22a..b68aa21a8 100644
+--- a/libsparse/include/sparse/sparse.h
++++ b/libsparse/include/sparse/sparse.h
+@@ -196,23 +196,41 @@ int64_t sparse_file_len(struct sparse_file *s, bool sparse, bool crc);
+ int sparse_file_callback(struct sparse_file *s, bool sparse, bool crc,
+ int (*write)(void *priv, const void *data, int len), void *priv);
+
++/**
++ * enum sparse_read_mode - The method to use when reading in files
++ * @SPARSE_READ_MODE_NORMAL: The input is a regular file. Constant chunks of
++ * data (including holes) will be be converted to
++ * fill chunks.
++ * @SPARSE_READ_MODE_SPARSE: The input is an Android sparse file.
++ * @SPARSE_READ_MODE_HOLE: The input is a regular file. Holes will be converted
++ * to "don't care" chunks. Other constant chunks will
++ * be converted to fill chunks.
++ */
++enum sparse_read_mode {
++ SPARSE_READ_MODE_NORMAL = false,
++ SPARSE_READ_MODE_SPARSE = true,
++ SPARSE_READ_MODE_HOLE,
++};
++
+ /**
+ * sparse_file_read - read a file into a sparse file cookie
+ *
+ * @s - sparse file cookie
+ * @fd - file descriptor to read from
+- * @sparse - read a file in the Android sparse file format
++ * @mode - mode to use when reading the input file
+ * @crc - verify the crc of a file in the Android sparse file format
+ *
+- * Reads a file into a sparse file cookie. If sparse is true, the file is
+- * assumed to be in the Android sparse file format. If sparse is false, the
+- * file will be sparsed by looking for block aligned chunks of all zeros or
+- * another 32 bit value. If crc is true, the crc of the sparse file will be
+- * verified.
++ * Reads a file into a sparse file cookie. If @mode is
++ * %SPARSE_READ_MODE_SPARSE, the file is assumed to be in the Android sparse
++ * file format. If @mode is %SPARSE_READ_MODE_NORMAL, the file will be sparsed
++ * by looking for block aligned chunks of all zeros or another 32 bit value. If
++ * @mode is %SPARSE_READ_MODE_HOLE, the file will be sparsed like
++ * %SPARSE_READ_MODE_NORMAL, but holes in the file will be converted to "don't
++ * care" chunks. If crc is true, the crc of the sparse file will be verified.
+ *
+ * Returns 0 on success, negative errno on error.
+ */
+-int sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc);
++int sparse_file_read(struct sparse_file *s, int fd, enum sparse_read_mode mode, bool crc);
+
+ /**
+ * sparse_file_import - import an existing sparse file
+diff --git a/libsparse/sparse_read.c b/libsparse/sparse_read.c
+index ee4abd86a..81f48cc13 100644
+--- a/libsparse/sparse_read.c
++++ b/libsparse/sparse_read.c
+@@ -414,16 +414,79 @@ static int sparse_file_read_normal(struct sparse_file* s, int fd)
+ return ret;
+ }
+
+-int sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc)
++#ifdef __linux__
++static int sparse_file_read_hole(struct sparse_file* s, int fd)
+ {
+- if (crc && !sparse) {
++ int ret;
++ uint32_t* buf = (uint32_t*)malloc(s->block_size);
++ int64_t end = 0;
++ int64_t start = 0;
++
++ if (!buf) {
++ return -ENOMEM;
++ }
++
++ do {
++ start = lseek(fd, end, SEEK_DATA);
++ if (start < 0) {
++ if (errno == ENXIO)
++ /* The rest of the file is a hole */
++ break;
++
++ error("could not seek to data");
++ free(buf);
++ return -errno;
++ } else if (start > s->len) {
++ break;
++ }
++
++ end = lseek(fd, start, SEEK_HOLE);
++ if (end < 0) {
++ error("could not seek to end");
++ free(buf);
++ return -errno;
++ }
++ end = min(end, s->len);
++
++ start = ALIGN_DOWN(start, s->block_size);
++ end = ALIGN(end, s->block_size);
++ if (lseek(fd, start, SEEK_SET) < 0) {
++ free(buf);
++ return -errno;
++ }
++
++ ret = do_sparse_file_read_normal(s, fd, buf, start, end - start);
++ if (ret) {
++ free(buf);
++ return ret;
++ }
++ } while (end < s->len);
++
++ free(buf);
++ return 0;
++}
++#else
++static int sparse_file_read_hole(struct sparse_file* s __unused, int fd __unused)
++{
++ return -ENOTSUP;
++}
++#endif
++
++int sparse_file_read(struct sparse_file *s, int fd, enum sparse_read_mode mode, bool crc)
++{
++ if (crc && mode != SPARSE_READ_MODE_SPARSE) {
+ return -EINVAL;
+ }
+
+- if (sparse) {
++ switch (mode) {
++ case SPARSE_READ_MODE_SPARSE:
+ return sparse_file_read_sparse(s, fd, crc);
+- } else {
++ case SPARSE_READ_MODE_NORMAL:
+ return sparse_file_read_normal(s, fd);
++ case SPARSE_READ_MODE_HOLE:
++ return sparse_file_read_hole(s, fd);
++ default:
++ return -EINVAL;
+ }
+ }
+
+--
+2.35.1.1320.gc452695387.dirty
+
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch
new file mode 100644
index 0000000000..9d19f58095
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch
@@ -0,0 +1,114 @@
+From 00cce57eff1a0de3b93efa5da225e9eb33d19659 Mon Sep 17 00:00:00 2001
+From: Sean Anderson <sean.anderson@...>
+Date: Thu, 30 Dec 2021 15:34:28 -0500
+Subject: [PATCH] img2simg: Add support for converting holes to "don't care"
+ chunks
+
+This adds support for converting files with holes to "don't care"
+chunks. This can result in a substantial reduction in the time it takes
+to program an image if it has many holes.
+
+Generally, constants compared to argc have been reduced by one, since we
+no longer have the program name as the first argument.
+
+Change-Id: I00750edc07d6415dcc07ae0351e9397b0222b7ba
+Upstream-Status: Backport [6150b00b6025918da8c28e5c2f929ecdf480a9d6]
+Signed-off-by: Sean Anderson <sean.anderson@...>
+---
+ libsparse/img2simg.c | 41 ++++++++++++++++++++++++++++++-----------
+ 1 file changed, 30 insertions(+), 11 deletions(-)
+
+diff --git a/libsparse/img2simg.c b/libsparse/img2simg.c
+index 2e171b613..c985d5449 100644
+--- a/libsparse/img2simg.c
++++ b/libsparse/img2simg.c
+@@ -40,25 +40,42 @@
+
+ void usage()
+ {
+- fprintf(stderr, "Usage: img2simg <raw_image_file> <sparse_image_file> [<block_size>]\n");
++ fprintf(stderr, "Usage: img2simg [-s] <raw_image_file> <sparse_image_file> [<block_size>]\n");
+ }
+
+ int main(int argc, char *argv[])
+ {
++ char *arg_in;
++ char *arg_out;
++ enum sparse_read_mode mode = SPARSE_READ_MODE_NORMAL;
++ int extra;
+ int in;
++ int opt;
+ int out;
+ int ret;
+ struct sparse_file *s;
+ unsigned int block_size = 4096;
+ off64_t len;
+
+- if (argc < 3 || argc > 4) {
++ while ((opt = getopt(argc, argv, "s")) != -1) {
++ switch (opt) {
++ case 's':
++ mode = SPARSE_READ_MODE_HOLE;
++ break;
++ default:
++ usage();
++ exit(-1);
++ }
++ }
++
++ extra = argc - optind;
++ if (extra < 2 || extra > 3) {
+ usage();
+ exit(-1);
+ }
+
+- if (argc == 4) {
+- block_size = atoi(argv[3]);
++ if (extra == 3) {
++ block_size = atoi(argv[optind + 2]);
+ }
+
+ if (block_size < 1024 || block_size % 4 != 0) {
+@@ -66,22 +83,24 @@ int main(int argc, char *argv[])
+ exit(-1);
+ }
+
+- if (strcmp(argv[1], "-") == 0) {
++ arg_in = argv[optind];
++ if (strcmp(arg_in, "-") == 0) {
+ in = STDIN_FILENO;
+ } else {
+- in = open(argv[1], O_RDONLY | O_BINARY);
++ in = open(arg_in, O_RDONLY | O_BINARY);
+ if (in < 0) {
+- fprintf(stderr, "Cannot open input file %s\n", argv[1]);
++ fprintf(stderr, "Cannot open input file %s\n", arg_in);
+ exit(-1);
+ }
+ }
+
+- if (strcmp(argv[2], "-") == 0) {
++ arg_out = argv[optind + 1];
++ if (strcmp(arg_out, "-") == 0) {
+ out = STDOUT_FILENO;
+ } else {
+- out = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0664);
++ out = open(arg_out, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0664);
+ if (out < 0) {
+- fprintf(stderr, "Cannot open output file %s\n", argv[2]);
++ fprintf(stderr, "Cannot open output file %s\n", arg_out);
+ exit(-1);
+ }
+ }
+@@ -96,7 +115,7 @@ int main(int argc, char *argv[])
+ }
+
+ sparse_file_verbose(s);
+- ret = sparse_file_read(s, in, SPARSE_READ_MODE_NORMAL, false);
++ ret = sparse_file_read(s, in, mode, false);
+ if (ret) {
+ fprintf(stderr, "Failed to read file\n");
+ exit(-1);
+--
+2.35.1.1320.gc452695387.dirty
+
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
index 8f28abbd19..26393605d4 100644
--- a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
+++ b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
@@ -41,6 +41,9 @@ SRC_URI = " \
file://core/adb_libssl_11.diff;patchdir=system/core \
file://core/0013-adb-Support-riscv64.patch;patchdir=system/core \
file://core/0014-add-u3-ss-descriptor-support-for-adb.patch;patchdir=system/core \
+ file://core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch;patchdir=system/core \
+ file://core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch;patchdir=system/core \
+ file://core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch;patchdir=system/core \
file://extras/0001-ext4_utils-remove-selinux-extensions.patch;patchdir=system/extras \
file://extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch;patchdir=system/extras \
file://libselinux/0001-Remove-bionic-specific-calls.patch;patchdir=external/libselinux \
--
2.35.1.1320.gc452695387.dirty


[meta-oe][PATCH v2 3/3] nodejs: Add /usr/lib/node -> node_modules symlink

Zoltan Boszormenyi
 

From: Zoltán Böszörményi <zboszor@...>

While /usr/lib/node_modules and all npm-related modules are
shipped in the npm subpackage, keep the symlink in the main
package because 3rd party modules that don't need npm are
also installed into /usr/lib/node_modules.

Signed-off-by: Zoltán Böszörményi <zboszor@...>
---
meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb b/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb
index 62188f94a..be68afd4c 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb
@@ -159,6 +159,10 @@ do_compile () {

do_install () {
oe_runmake install DESTDIR=${D}
+
+ # node(1) is using /usr/lib/node as default include directory and npm(1) is
+ # using /usr/lib/node_modules as install directory. Let's make both happy.
+ ln -fs node_modules ${D}/${nonarch_libdir}/node
}

BINARIES = " \
@@ -176,6 +180,7 @@ do_install:append:class-native() {
}

PACKAGES =+ "${PN}-npm"
+FILES:${PN} += "${nonarch_libdir}/node"
FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx"
RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \
python3-misc python3-multiprocessing"
--
2.36.1


Re: [meta-oe][PATCH v2] wxwidgets: enable to use private fonts

kai
 

On 5/13/22 12:15 AM, Khem Raj wrote:
On Wed, May 11, 2022 at 11:23 PM Kai <kai.kang@...> wrote:
On 5/11/22 11:21 PM, Khem Raj wrote:
On Wed, May 11, 2022 at 12:45 AM kai <kai.kang@...> wrote:
From: Kai Kang <kai.kang@...>

Enable option wxUSE_PRIVATE_FONTS of wxwidgets if build with gtk. It
allows application to use the font from the given file even if it is
not globally installed on the system.

Signed-off-by: Kai Kang <kai.kang@...>
---
v2:
* use upper case 'ON' to align with others in oe

meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb | 1 +
1 file changed, 1 insertion(+)

diff --git a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
index 6b57cb54c..b9b1dcf0d 100644
--- a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
+++ b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
@@ -39,6 +39,7 @@ EXTRA_OECMAKE += " \
-DwxUSE_LIBTIFF=sys \
-DwxUSE_REGEX=builtin \
-DwxPLATFORM_LIB_DIR=${@d.getVar('baselib').replace('lib', '')} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'gtk', '-DwxUSE_PRIVATE_FONTS=ON', '', d)} \
why not add it to the packageconfig setting itself ?
It is an useful feature for wxwidgets with gui, so I want it to be
enabled by default. And it requires pango to make it work.

I can see gtk3 depends on pango but qtbase doesn't. So only check 'gtk'
I meant to do something like below instead of this patch.

PACKAGECONFIG[gtk] = "-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_GUI=ON
-DwxUSE_PRIVATE_FONTS=ON,,gtk+3,,,no_gui qt"
OK. v3 will be sent.

Thanks,
Kai


here.

Regards,
Kai

"
EXTRA_OECMAKE:append:libc-musl = " \
-DHAVE_LOCALE_T=OFF \
--
2.17.1


--
Kai Kang
Wind River Linux
--
Kai Kang
Wind River Linux


[meta-python] [PATCH] python3-pychromecast: upgrade 11.0.0 -> 12.1.1

xuhuan.fnst@fujitsu.com
 

From: Xu Huan <xuhuan.fnst@...>

Changelog:
=========
Add load_media_failed callback to MediaStatusListener
Tweak media status
Lookup known cast models in mDNS discovery
Fix default value for fetching model name in discovery

Signed-off-by: Xu Huan <xuhuan.fnst@...>
---
...n3-pychromecast_11.0.0.bb => python3-pychromecast_12.1.1.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-python/recipes-devtools/python/{python3-pychromecast_11.0.0.bb => python3-pychromecast_12.1.1.bb} (83%)

diff --git a/meta-python/recipes-devtools/python/python3-pychromecast_11.0.0.bb b/meta-python/recipes-devtools/python/python3-pychromecast_12.1.1.bb
similarity index 83%
rename from meta-python/recipes-devtools/python/python3-pychromecast_11.0.0.bb
rename to meta-python/recipes-devtools/python/python3-pychromecast_12.1.1.bb
index f55696373..b34c78eb8 100644
--- a/meta-python/recipes-devtools/python/python3-pychromecast_11.0.0.bb
+++ b/meta-python/recipes-devtools/python/python3-pychromecast_12.1.1.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/balloob/pychromecast"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b1dbd4e85f47b389bdadee9c694669f5"

-SRC_URI[sha256sum] = "151723b178110052b673b8765a120c85d16eae8c22d75575dceebe2be1eb1ef6"
+SRC_URI[sha256sum] = "9545a22acdadc96603f76d7878c6ea17baf1328260cf560c887c8c12aad4c82c"

PYPI_PACKAGE = "PyChromecast"

--
2.25.1


[meta-python] [PATCH] python3-grpcio-tools: upgrade 1.45.0 -> 1.46.0

xuhuan.fnst@fujitsu.com
 

From: Xu Huan <xuhuan.fnst@...>

Signed-off-by: Xu Huan <xuhuan.fnst@...>
---
...n3-grpcio-tools_1.45.0.bb => python3-grpcio-tools_1.46.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-python/recipes-devtools/python/{python3-grpcio-tools_1.45.0.bb => python3-grpcio-tools_1.46.0.bb} (82%)

diff --git a/meta-python/recipes-devtools/python/python3-grpcio-tools_1.45.0.bb b/meta-python/recipes-devtools/python/python3-grpcio-tools_1.46.0.bb
similarity index 82%
rename from meta-python/recipes-devtools/python/python3-grpcio-tools_1.45.0.bb
rename to meta-python/recipes-devtools/python/python3-grpcio-tools_1.46.0.bb
index 1e919dd3a..9569e8ec9 100644
--- a/meta-python/recipes-devtools/python/python3-grpcio-tools_1.45.0.bb
+++ b/meta-python/recipes-devtools/python/python3-grpcio-tools_1.46.0.bb
@@ -10,7 +10,7 @@ inherit pypi setuptools3
DEPENDS += "${PYTHON_PN}-grpcio"

SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch"
-SRC_URI[sha256sum] = "a016cfc21e0d91b3b036d3d4f968d1fdea865dfa03524cb1fbeca84719fd45a2"
+SRC_URI[sha256sum] = "9295bf9b1e6dd5bcb260d594745fa3d6a089daade28f3a80cb2bc976b5359b7d"

RDEPENDS:${PN} = "${PYTHON_PN}-grpcio"

--
2.25.1


[meta-python] [PATCH] python3-pyalsaaudio: upgrade 0.9.0 -> 0.9.2

xuhuan.fnst@fujitsu.com
 

From: Xu Huan <xuhuan.fnst@...>

Signed-off-by: Xu Huan <xuhuan.fnst@...>
---
...thon3-pyalsaaudio_0.9.0.bb => python3-pyalsaaudio_0.9.2.bb} | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
rename meta-python/recipes-devtools/python/{python3-pyalsaaudio_0.9.0.bb => python3-pyalsaaudio_0.9.2.bb} (61%)

diff --git a/meta-python/recipes-devtools/python/python3-pyalsaaudio_0.9.0.bb b/meta-python/recipes-devtools/python/python3-pyalsaaudio_0.9.2.bb
similarity index 61%
rename from meta-python/recipes-devtools/python/python3-pyalsaaudio_0.9.0.bb
rename to meta-python/recipes-devtools/python/python3-pyalsaaudio_0.9.2.bb
index 862c3d594..e7e706c6c 100644
--- a/meta-python/recipes-devtools/python/python3-pyalsaaudio_0.9.0.bb
+++ b/meta-python/recipes-devtools/python/python3-pyalsaaudio_0.9.2.bb
@@ -5,8 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1a3b161aa0fcec32a0c8907a2219ad9d"

inherit pypi setuptools3

-SRC_URI[md5sum] = "48c40424a79c2568676a41643d93f1f7"
-SRC_URI[sha256sum] = "3ca069c736c8ad2a3047b5033468d983a2480f94fad4feb0169c056060e01e69"
+SRC_URI[sha256sum] = "e74a66d6c7a6bcceb990df66d3ebc0fe382fc9d765f35f050f9d98c695304b36"

DEPENDS += "alsa-lib"

--
2.25.1


[meta-python] [PATCH] python3-mypy: upgrade 0.942 -> 0.950

xuhuan.fnst@fujitsu.com
 

From: Xu Huan <xuhuan.fnst@...>

Signed-off-by: Xu Huan <xuhuan.fnst@...>
---
.../python/{python3-mypy_0.942.bb => python3-mypy_0.950.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-python/recipes-devtools/python/{python3-mypy_0.942.bb => python3-mypy_0.950.bb} (86%)

diff --git a/meta-python/recipes-devtools/python/python3-mypy_0.942.bb b/meta-python/recipes-devtools/python/python3-mypy_0.950.bb
similarity index 86%
rename from meta-python/recipes-devtools/python/python3-mypy_0.942.bb
rename to meta-python/recipes-devtools/python/python3-mypy_0.950.bb
index 5b4b6d5ba..c268adebe 100644
--- a/meta-python/recipes-devtools/python/python3-mypy_0.942.bb
+++ b/meta-python/recipes-devtools/python/python3-mypy_0.950.bb
@@ -7,7 +7,7 @@ PYPI_PACKAGE = "mypy"

inherit pypi python_setuptools_build_meta

-SRC_URI[sha256sum] = "17e44649fec92e9f82102b48a3bf7b4a5510ad0cd22fa21a104826b5db4903e2"
+SRC_URI[sha256sum] = "1b333cfbca1762ff15808a0ef4f71b5d3eed8528b23ea1c3fb50543c867d68de"

BBCLASSEXTEND = "native"

--
2.25.1


[meta-python] [PATCH] python3-google-auth: upgrade 2.6.3 -> 2.6.6

xuhuan.fnst@fujitsu.com
 

From: Xu Huan <xuhuan.fnst@...>

Changelog:
==========
fix missing import in _default.py
add additional missing import in _default.py
silence TypeError during tear down stage

Signed-off-by: Xu Huan <xuhuan.fnst@...>
---
...ython3-google-auth_2.6.3.bb => python3-google-auth_2.6.6.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-python/recipes-devtools/python/{python3-google-auth_2.6.3.bb => python3-google-auth_2.6.6.bb} (87%)

diff --git a/meta-python/recipes-devtools/python/python3-google-auth_2.6.3.bb b/meta-python/recipes-devtools/python/python3-google-auth_2.6.6.bb
similarity index 87%
rename from meta-python/recipes-devtools/python/python3-google-auth_2.6.3.bb
rename to meta-python/recipes-devtools/python/python3-google-auth_2.6.6.bb
index ee5311f4f..d51790f36 100644
--- a/meta-python/recipes-devtools/python/python3-google-auth_2.6.3.bb
+++ b/meta-python/recipes-devtools/python/python3-google-auth_2.6.6.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"

inherit pypi setuptools3

-SRC_URI[sha256sum] = "d65bb0e3701eaaa64fd2aa85e1325580524b0bddc6dc5db3ab89c481b6a20141"
+SRC_URI[sha256sum] = "1ba4938e032b73deb51e59c4656a00e0939cf0b1112575099f136babb4563312"

RDEPENDS:${PN} += "\
${PYTHON_PN}-asyncio \
--
2.25.1


[kirkstone][PATCH 3/3] devmem2: update SRC_URI according to redirect

Denys Dmytriyenko
 

From: Michael Opdenacker <michael.opdenacker@...>

http://www.free-electrons.com now redirects to https://bootlin.com

Signed-off-by: Michael Opdenacker <michael.opdenacker@...>
Signed-off-by: Khem Raj <raj.khem@...>
Signed-off-by: Denys Dmytriyenko <denis@...>
---
meta-oe/recipes-support/devmem2/devmem2.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/devmem2/devmem2.bb b/meta-oe/recipes=
-support/devmem2/devmem2.bb
index ba7aad8ab..70d413521 100644
--- a/meta-oe/recipes-support/devmem2/devmem2.bb
+++ b/meta-oe/recipes-support/devmem2/devmem2.bb
@@ -3,7 +3,7 @@ LICENSE =3D "GPL-2.0-or-later"
LIC_FILES_CHKSUM =3D "file://devmem2.c;endline=3D38;md5=3Da9eb9f38903845=
19f435aedf986297cf"
PR =3D "r7"
=20
-SRC_URI =3D "http://www.free-electrons.com/pub/mirror/devmem2.c;download=
filename=3Ddevmem2-new.c \
+SRC_URI =3D "https://bootlin.com/pub/mirror/devmem2.c;downloadfilename=3D=
devmem2-new.c \
file://devmem2-fixups-2.patch;apply=3Dyes;striplevel=3D0 \
file://0001-devmem.c-ensure-word-is-32-bit-and-add-support-fo=
r-6.patch \
file://0001-devmem2-support-different-page-sizes-at-run-time.=
patch \
--=20
2.25.1


[kirkstone][PATCH 2/3] devmem2: add support for different page sizes

Denys Dmytriyenko
 

Instead of hardcoding 4K page size, query the system and use the value fo=
r
memory mapping.

Signed-off-by: Denys Dmytriyenko <denis@...>
Signed-off-by: Khem Raj <raj.khem@...>
Signed-off-by: Denys Dmytriyenko <denis@...>
---
meta-oe/recipes-support/devmem2/devmem2.bb | 4 ++-
...ort-different-page-sizes-at-run-time.patch | 35 +++++++++++++++++++
2 files changed, 38 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-support/devmem2/devmem2/0001-devmem2-=
support-different-page-sizes-at-run-time.patch

diff --git a/meta-oe/recipes-support/devmem2/devmem2.bb b/meta-oe/recipes=
-support/devmem2/devmem2.bb
index c6b8df5e4..ba7aad8ab 100644
--- a/meta-oe/recipes-support/devmem2/devmem2.bb
+++ b/meta-oe/recipes-support/devmem2/devmem2.bb
@@ -5,7 +5,9 @@ PR =3D "r7"
=20
SRC_URI =3D "http://www.free-electrons.com/pub/mirror/devmem2.c;download=
filename=3Ddevmem2-new.c \
file://devmem2-fixups-2.patch;apply=3Dyes;striplevel=3D0 \
- file://0001-devmem.c-ensure-word-is-32-bit-and-add-support-fo=
r-6.patch"
+ file://0001-devmem.c-ensure-word-is-32-bit-and-add-support-fo=
r-6.patch \
+ file://0001-devmem2-support-different-page-sizes-at-run-time.=
patch \
+"
=20
S =3D "${WORKDIR}"
=20
diff --git a/meta-oe/recipes-support/devmem2/devmem2/0001-devmem2-support=
-different-page-sizes-at-run-time.patch b/meta-oe/recipes-support/devmem2=
/devmem2/0001-devmem2-support-different-page-sizes-at-run-time.patch
new file mode 100644
index 000000000..0da0732c5
--- /dev/null
+++ b/meta-oe/recipes-support/devmem2/devmem2/0001-devmem2-support-differ=
ent-page-sizes-at-run-time.patch
@@ -0,0 +1,35 @@
+From 0f6af48b2fbc71ec8abe862d3e9eb6da7b03538b Mon Sep 17 00:00:00 2001
+From: Denys Dmytriyenko <denys@...>
+Date: Wed, 8 Aug 2018 14:38:00 -0400
+Subject: [PATCH] devmem2: support different page sizes at run-time
+
+Signed-off-by: Denys Dmytriyenko <denys@...>
+---
+ devmem2.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/devmem2.c b/devmem2.c
+index 68131b2..76af2d6 100644
+--- a/devmem2.c
++++ b/devmem2.c
+@@ -53,8 +53,6 @@
+ #define FATAL do { fprintf(stderr, "Error at line %d, file %s (%d) [%s]=
\n", \
+ __LINE__, __FILE__, errno, strerror(errno)); exit(1); } while(0)
+ =20
+-#define MAP_SIZE 4096UL
+-#define MAP_MASK (MAP_SIZE - 1)
+=20
+ static inline void *fixup_addr(void *addr, size_t size);
+=20
+@@ -66,6 +64,8 @@ int main(int argc, char **argv) {
+ int access_type =3D 'w';
+ char fmt_str[128];
+ size_t data_size;
++ unsigned long MAP_SIZE =3D sysconf(_SC_PAGE_SIZE);
++ unsigned long MAP_MASK =3D (MAP_SIZE - 1);
+ =09
+ if(argc < 2) {
+ fprintf(stderr, "\nUsage:\t%s { address } [ type [ data ] ]\n"
+--=20
+2.7.4
+
--=20
2.25.1


[kirkstone][PATCH 1/3] devmem2: reinstate previous patches, removed by mistake

Denys Dmytriyenko
 

This reverts commit 5e8f4720aaa3da7350ead06959cae0492133cd61.

Signed-off-by: Denys Dmytriyenko <denis@...>
Signed-off-by: Khem Raj <raj.khem@...>
Signed-off-by: Denys Dmytriyenko <denis@...>
---
meta-oe/recipes-support/devmem2/devmem2.bb | 3 +-
...word-is-32-bit-and-add-support-for-6.patch | 70 ++++++++++++++
.../devmem2/devmem2/devmem2-fixups-2.patch | 91 +++++++++++++++++++
3 files changed, 163 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-support/devmem2/devmem2/0001-devmem.c=
-ensure-word-is-32-bit-and-add-support-for-6.patch
create mode 100644 meta-oe/recipes-support/devmem2/devmem2/devmem2-fixup=
s-2.patch

diff --git a/meta-oe/recipes-support/devmem2/devmem2.bb b/meta-oe/recipes=
-support/devmem2/devmem2.bb
index 92c05fe06..c6b8df5e4 100644
--- a/meta-oe/recipes-support/devmem2/devmem2.bb
+++ b/meta-oe/recipes-support/devmem2/devmem2.bb
@@ -4,7 +4,8 @@ LIC_FILES_CHKSUM =3D "file://devmem2.c;endline=3D38;md5=3D=
a9eb9f3890384519f435aedf9862
PR =3D "r7"
=20
SRC_URI =3D "http://www.free-electrons.com/pub/mirror/devmem2.c;download=
filename=3Ddevmem2-new.c \
- "=20
+ file://devmem2-fixups-2.patch;apply=3Dyes;striplevel=3D0 \
+ file://0001-devmem.c-ensure-word-is-32-bit-and-add-support-fo=
r-6.patch"
=20
S =3D "${WORKDIR}"
=20
diff --git a/meta-oe/recipes-support/devmem2/devmem2/0001-devmem.c-ensure=
-word-is-32-bit-and-add-support-for-6.patch b/meta-oe/recipes-support/dev=
mem2/devmem2/0001-devmem.c-ensure-word-is-32-bit-and-add-support-for-6.pa=
tch
new file mode 100644
index 000000000..2a57f2989
--- /dev/null
+++ b/meta-oe/recipes-support/devmem2/devmem2/0001-devmem.c-ensure-word-i=
s-32-bit-and-add-support-for-6.patch
@@ -0,0 +1,70 @@
+From 1360a907879dd24041797a3b709d49aeac2ab444 Mon Sep 17 00:00:00 2001
+From: Denys Dmytriyenko <denys@...>
+Date: Tue, 29 May 2018 16:55:42 -0400
+Subject: [PATCH] devmem.c: ensure word is 32-bit and add support for 64-=
bit
+ long
+
+Signed-off-by: Denys Dmytriyenko <denys@...>
+---
+ devmem2.c | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/devmem2.c b/devmem2.c
+index 5845381..68131b2 100644
+--- a/devmem2.c
++++ b/devmem2.c
+@@ -39,6 +39,7 @@
+=20
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <unistd.h>
+ #include <string.h>
+ #include <errno.h>
+@@ -69,7 +70,7 @@ int main(int argc, char **argv) {
+ if(argc < 2) {
+ fprintf(stderr, "\nUsage:\t%s { address } [ type [ data ] ]\n"
+ "\taddress : memory address to act upon\n"
+- "\ttype : access operation type : [b]yte, [h]alfword, [w]ord\n"
++ "\ttype : access operation type : [b]yte, [h]alfword, [w]ord, [l]=
ong\n"
+ "\tdata : data to be written\n\n",
+ argv[0]);
+ exit(1);
+@@ -103,9 +104,14 @@ int main(int argc, char **argv) {
+ read_result =3D *((unsigned short *) virt_addr);
+ break;
+ case 'w':
+- data_size =3D sizeof(unsigned long);
++ data_size =3D sizeof(uint32_t);
+ virt_addr =3D fixup_addr(virt_addr, data_size);
+- read_result =3D *((unsigned long *) virt_addr);
++ read_result =3D *((uint32_t *) virt_addr);
++ break;
++ case 'l':
++ data_size =3D sizeof(uint64_t);
++ virt_addr =3D fixup_addr(virt_addr, data_size);
++ read_result =3D *((uint64_t *) virt_addr);
+ break;
+ default:
+ fprintf(stderr, "Illegal data type '%c'.\n", access_type);
+@@ -129,9 +135,14 @@ int main(int argc, char **argv) {
+ read_result =3D *((unsigned short *) virt_addr);
+ break;
+ case 'w':
+- virt_addr =3D fixup_addr(virt_addr, sizeof(unsigned long));
+- *((unsigned long *) virt_addr) =3D write_val;
+- read_result =3D *((unsigned long *) virt_addr);
++ virt_addr =3D fixup_addr(virt_addr, sizeof(uint32_t));
++ *((uint32_t *) virt_addr) =3D write_val;
++ read_result =3D *((uint32_t *) virt_addr);
++ break;
++ case 'l':
++ virt_addr =3D fixup_addr(virt_addr, sizeof(uint64_t));
++ *((uint64_t *) virt_addr) =3D write_val;
++ read_result =3D *((uint64_t *) virt_addr);
+ break;
+ }
+ sprintf(fmt_str, "Write at address 0x%%08lX (%%p): 0x%%0%dlX, "
+--=20
+2.7.4
+
diff --git a/meta-oe/recipes-support/devmem2/devmem2/devmem2-fixups-2.pat=
ch b/meta-oe/recipes-support/devmem2/devmem2/devmem2-fixups-2.patch
new file mode 100644
index 000000000..4517797fc
--- /dev/null
+++ b/meta-oe/recipes-support/devmem2/devmem2/devmem2-fixups-2.patch
@@ -0,0 +1,91 @@
+--- devmem2.c 2004-08-05 01:55:25.000000000 +0200
++++ devmem2_modif.c 2011-01-13 15:48:37.798799784 +0100
+@@ -45,12 +45,16 @@
+ #define MAP_SIZE 4096UL
+ #define MAP_MASK (MAP_SIZE - 1)
+=20
++static inline void *fixup_addr(void *addr, size_t size);
++
+ int main(int argc, char **argv) {
+ int fd;
+ void *map_base, *virt_addr;=20
+- unsigned long read_result, writeval;
++ unsigned long read_result, write_val;
+ off_t target;
+ int access_type =3D 'w';
++ char fmt_str[128];
++ size_t data_size;
+ =09
+ if(argc < 2) {
+ fprintf(stderr, "\nUsage:\t%s { address } [ type [ data ] ]\n"
+@@ -79,38 +83,51 @@
+ virt_addr =3D map_base + (target & MAP_MASK);
+ switch(access_type) {
+ case 'b':
++ data_size =3D sizeof(unsigned char);
++ virt_addr =3D fixup_addr(virt_addr, data_size);
+ read_result =3D *((unsigned char *) virt_addr);
+ break;
+ case 'h':
++ data_size =3D sizeof(unsigned short);
++ virt_addr =3D fixup_addr(virt_addr, data_size);
+ read_result =3D *((unsigned short *) virt_addr);
+ break;
+ case 'w':
++ data_size =3D sizeof(unsigned long);
++ virt_addr =3D fixup_addr(virt_addr, data_size);
+ read_result =3D *((unsigned long *) virt_addr);
+ break;
+ default:
+ fprintf(stderr, "Illegal data type '%c'.\n", access_type);
+ exit(2);
+ }
+- printf("Value at address 0x%X (%p): 0x%X\n", target, virt_addr, rea=
d_result);=20
++ sprintf(fmt_str, "Read at address 0x%%08lX (%%p): 0x%%0%dlX\n", 2*dat=
a_size);
++ printf(fmt_str, (unsigned long)target, virt_addr, read_result);
+ fflush(stdout);
+=20
+ if(argc > 3) {
+- writeval =3D strtoul(argv[3], 0, 0);
++ write_val =3D strtoul(argv[3], 0, 0);
+ switch(access_type) {
+ case 'b':
+- *((unsigned char *) virt_addr) =3D writeval;
++ virt_addr =3D fixup_addr(virt_addr, sizeof(unsigned char));
++ *((unsigned char *) virt_addr) =3D write_val;
+ read_result =3D *((unsigned char *) virt_addr);
+ break;
+ case 'h':
+- *((unsigned short *) virt_addr) =3D writeval;
++ virt_addr =3D fixup_addr(virt_addr, sizeof(unsigned short));
++ *((unsigned short *) virt_addr) =3D write_val;
+ read_result =3D *((unsigned short *) virt_addr);
+ break;
+ case 'w':
+- *((unsigned long *) virt_addr) =3D writeval;
++ virt_addr =3D fixup_addr(virt_addr, sizeof(unsigned long));
++ *((unsigned long *) virt_addr) =3D write_val;
+ read_result =3D *((unsigned long *) virt_addr);
+ break;
+ }
+- printf("Written 0x%X; readback 0x%X\n", writeval, read_result);=20
++ sprintf(fmt_str, "Write at address 0x%%08lX (%%p): 0x%%0%dlX, "
++ "readback 0x%%0%dlX\n", 2*data_size, 2*data_size);
++ printf(fmt_str, (unsigned long)target, virt_addr,
++ write_val, read_result);
+ fflush(stdout);
+ }
+ =09
+@@ -119,3 +136,12 @@
+ return 0;
+ }
+=20
++static inline void *fixup_addr(void *addr, size_t size)
++{
++#ifdef FORCE_STRICT_ALIGNMENT
++ unsigned long aligned_addr =3D (unsigned long)addr;
++ aligned_addr &=3D ~(size - 1);
++ addr =3D (void *)aligned_addr;
++#endif
++ return addr;
++}
--=20
2.25.1


Re: [meta-oe][PATCH v2] wxwidgets: enable to use private fonts

Khem Raj
 

On Wed, May 11, 2022 at 11:23 PM Kai <kai.kang@...> wrote:

On 5/11/22 11:21 PM, Khem Raj wrote:
On Wed, May 11, 2022 at 12:45 AM kai <kai.kang@...> wrote:
From: Kai Kang <kai.kang@...>

Enable option wxUSE_PRIVATE_FONTS of wxwidgets if build with gtk. It
allows application to use the font from the given file even if it is
not globally installed on the system.

Signed-off-by: Kai Kang <kai.kang@...>
---
v2:
* use upper case 'ON' to align with others in oe

meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb | 1 +
1 file changed, 1 insertion(+)

diff --git a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
index 6b57cb54c..b9b1dcf0d 100644
--- a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
+++ b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
@@ -39,6 +39,7 @@ EXTRA_OECMAKE += " \
-DwxUSE_LIBTIFF=sys \
-DwxUSE_REGEX=builtin \
-DwxPLATFORM_LIB_DIR=${@d.getVar('baselib').replace('lib', '')} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'gtk', '-DwxUSE_PRIVATE_FONTS=ON', '', d)} \
why not add it to the packageconfig setting itself ?
It is an useful feature for wxwidgets with gui, so I want it to be
enabled by default. And it requires pango to make it work.

I can see gtk3 depends on pango but qtbase doesn't. So only check 'gtk'
I meant to do something like below instead of this patch.

PACKAGECONFIG[gtk] = "-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_GUI=ON
-DwxUSE_PRIVATE_FONTS=ON,,gtk+3,,,no_gui qt"

here.

Regards,
Kai


"
EXTRA_OECMAKE:append:libc-musl = " \
-DHAVE_LOCALE_T=OFF \
--
2.17.1



--
Kai Kang
Wind River Linux


ntp: prerm script is removing link to ntpd prior to stopping ntpd

Bryan Evenson
 

All,

I'm on the dunfell branch and I am switching my ntp client from ntp to chrony. I noticed after I upgraded that ntp was still running even though it had been removed from my system. After checking in with opkg, I started checking the prerm scripts. Here is the prerm script as it was generated when I was using the morty branch:

#!/bin/sh
# Begin section update-rc.d
if [ -z "$D" -a -x "/etc/init.d/ntpd" ]; then
/etc/init.d/ntpd stop || :
fi
# End section update-rc.d
# Begin section update-alternatives
update-alternatives --remove ntpd /usr/sbin/ntpd.ntp
# End section update-alternatives

and here is the prerm script generated by the dunfell branch:

#!/bin/sh
set -e
update-alternatives --remove ntpd /usr/sbin/ntpd.ntp
if true && [ -z "$D" -a -x "/etc/init.d/ntpd" ]; then
/etc/init.d/ntpd stop || :
Fi

As you can see, now ntpd cannot be stopped because the link is removed before attempting to stop ntpd. I'm assuming this is related to this commit? https://git.openembedded.org/openembedded-core/commit/?h=dunfell&id=7cb951a803deca151344d905bf2fab038e72e0d0 I checked all the prerm scripts on my image, and ntp was the only one in which the init script name was also the alternative link name. The only script that I saw that added something different was busybox-syslog, which adds a section to stop syslog in the beginning of the prerm script. Is ntp a corner case, or are there more packages which might have the same problem?

Thanks,
Bryan


[meta-oe][kirkstone][PATCH] bats: Add patch to fix false-negatives caused by teardown code

Richard Neill
 

BATS v1.6.0 has a regression which can result in test case failures being
ignored when teardown code executes successfully. This patch applies the
accepted bug-fix until the next BATS release.

Also, fix a comment that wasn't updated during the BATS upgrade, to match=
the
correct release (v1.6.0) associated with the SRCREV.

Signed-off-by: Richard Neill <richard.neill@...>
---
meta-oe/recipes-test/bats/bats_1.6.0.bb | 8 +-
...tus-in-teardown-overriding-exit-code.patch | 150 ++++++++++++++++++
2 files changed, 156 insertions(+), 2 deletions(-)
create mode 100644 meta-oe/recipes-test/bats/files/0001-Fix-status-in-te=
ardown-overriding-exit-code.patch

diff --git a/meta-oe/recipes-test/bats/bats_1.6.0.bb b/meta-oe/recipes-te=
st/bats/bats_1.6.0.bb
index 7ea1aa8f3..df81595c9 100644
--- a/meta-oe/recipes-test/bats/bats_1.6.0.bb
+++ b/meta-oe/recipes-test/bats/bats_1.6.0.bb
@@ -6,8 +6,12 @@ HOMEPAGE =3D "https://github.com/bats-core/bats-core"
LICENSE =3D "MIT"
LIC_FILES_CHKSUM =3D "file://LICENSE.md;md5=3D2970203aedf9e829edb96a137a=
4fe81b"
=20
-SRC_URI =3D "git://github.com/bats-core/bats-core.git;branch=3Dmaster;pr=
otocol=3Dhttps"
-# v1.4.1
+SRC_URI =3D "\
+ git://github.com/bats-core/bats-core.git;branch=3Dmaster;protocol=3Dht=
tps \
+ file://0001-Fix-status-in-teardown-overriding-exit-code.patch \
+ "
+
+# v1.6.0
SRCREV =3D "210acf3a8ed318ddedad3137c15451739beba7d4"
=20
S =3D "${WORKDIR}/git"
diff --git a/meta-oe/recipes-test/bats/files/0001-Fix-status-in-teardown-=
overriding-exit-code.patch b/meta-oe/recipes-test/bats/files/0001-Fix-sta=
tus-in-teardown-overriding-exit-code.patch
new file mode 100644
index 000000000..f4b1db931
--- /dev/null
+++ b/meta-oe/recipes-test/bats/files/0001-Fix-status-in-teardown-overrid=
ing-exit-code.patch
@@ -0,0 +1,150 @@
+From aa628ccdc4dec1c129c1bd98b53ef94d8c2e119a Mon Sep 17 00:00:00 2001
+From: Richard Neill <richard.neill@...>
+Date: Mon, 9 May 2022 12:20:48 +0100
+Subject: [PATCH] Fix status in teardown* overriding exit code
+
+Patch fixes regression which produces false-negatives in v1.6.0, where t=
he
+teardown function can cause BATS to report success even if test cases fa=
il.
+Fixes: https://github.com/bats-core/bats-core/issues/575
+
+Upstream-Status: Backport [Adapted from https://github.com/bats-core/bat=
s-core/commit/5f372058b05f817e4e3a8dab27f83c30fd467504]
+Signed-off-by: Richard Neill <richard.neill@...>
+---
+ libexec/bats-core/bats-exec-file | 18 ++++++++----------
+ libexec/bats-core/bats-exec-suite | 12 ++++++------
+ libexec/bats-core/bats-exec-test | 8 ++++----
+ 3 files changed, 18 insertions(+), 20 deletions(-)
+
+diff --git a/libexec/bats-core/bats-exec-file b/libexec/bats-core/bats-e=
xec-file
+index 298441b..63452c7 100755
+--- a/libexec/bats-core/bats-exec-file
++++ b/libexec/bats-core/bats-exec-file
+@@ -118,7 +118,6 @@ bats_run_teardown_file() {
+
+ bats_file_teardown_trap() {
+ bats_run_teardown_file
+- local status=3D0
+ bats_file_exit_trap
+ }
+
+@@ -144,9 +143,9 @@ bats_file_exit_trap() {
+ bats_print_failed_command "${stack_trace[@]}" >&3
+ bats_prefix_lines_for_tap_output < "$BATS_OUT" | bats_replace_filen=
ame >&3
+ rm -rf "$BATS_OUT"
+- status=3D1
++ bats_exec_file_status=3D1
+ fi
+- exit $status
++ exit $bats_exec_file_status
+ }
+
+ function setup_file() {
+@@ -250,15 +249,15 @@ bats_read_tests_list_file() {
+ }
+
+ bats_run_tests() {
+- status=3D0
++ bats_exec_file_status=3D0
+
+ if [[ "$num_jobs" !=3D 1 && "${BATS_NO_PARALLELIZE_WITHIN_FILE-False}=
" =3D=3D False ]]; then
+ export BATS_SEMAPHORE_NUMBER_OF_SLOTS=3D"$num_jobs"
+- bats_run_tests_in_parallel "$BATS_RUN_TMPDIR/parallel_output" || st=
atus=3D1
++ bats_run_tests_in_parallel "$BATS_RUN_TMPDIR/parallel_output" || ba=
ts_exec_file_status=3D1
+ else
+ for test_name in "${tests_to_run[@]}"; do
+ if [[ "${BATS_INTERRUPTED-NOTSET}" !=3D NOTSET ]]; then
+- status=3D130 # bash's code for SIGINT exits
++ bats_exec_file_status=3D130 # bash's code for SIGINT exits
+ break
+ fi
+ # Only handle non-empty lines
+@@ -267,14 +266,13 @@ bats_run_tests() {
+ ((++test_number_in_file))
+ # deal with empty flags to avoid spurious "unbound variable" er=
rors on Bash 4.3 and lower
+ if [[ "${#flags[@]}" -gt 0 ]]; then
+- "$BATS_LIBEXEC/bats-exec-test" "${flags[@]}" "$filename" "$te=
st_name" "$test_number_in_suite" "$test_number_in_file" || status=3D1
++ "$BATS_LIBEXEC/bats-exec-test" "${flags[@]}" "$filename" "$te=
st_name" "$test_number_in_suite" "$test_number_in_file" || bats_exec_file=
_status=3D1
+ else
+- "$BATS_LIBEXEC/bats-exec-test" "$filename" "$test_name" "$tes=
t_number_in_suite" "$test_number_in_file" || status=3D1
++ "$BATS_LIBEXEC/bats-exec-test" "$filename" "$test_name" "$tes=
t_number_in_suite" "$test_number_in_file" || bats_exec_file_status=3D1
+ fi
+ fi
+ done
+ fi
+- export status
+ }
+
+ bats_create_file_tempdirs() {
+@@ -322,4 +320,4 @@ bats_run_tests
+ trap bats_interrupt_trap INT
+ bats_run_teardown_file
+
+-exit $status
++exit $bats_exec_file_status
+diff --git a/libexec/bats-core/bats-exec-suite b/libexec/bats-core/bats-=
exec-suite
+index 05c66f4..4d440ae 100755
+--- a/libexec/bats-core/bats-exec-suite
++++ b/libexec/bats-core/bats-exec-suite
+@@ -135,10 +135,10 @@ bats_exit_trap() {
+ if [[ ${BATS_INTERRUPTED-NOTSET} !=3D NOTSET ]]; then
+ printf "\n# Received SIGINT, aborting ...\n\n"
+ fi
+- exit "$status"
++ exit "$bats_exec_suite_status"
+ }
+
+-status=3D0
++bats_exec_suite_status=3D0
+ printf '1..%d\n' "${test_count}"
+
+ # No point on continuing if there's no tests.
+@@ -163,15 +163,15 @@ if [[ "$num_jobs" -gt 1 ]] && [[ -z "$bats_no_para=
llelize_across_files" ]]; then
+ # shellcheck disable=3DSC2086,SC2068
+ # we need to handle the quoting of ${flags[@]} ourselves,
+ # because parallel can only quote it as one
+- parallel --keep-order --jobs "$num_jobs" bats-exec-file "$(printf "%q=
" "${flags[@]}")" "{}" "$TESTS_LIST_FILE" ::: "${BATS_UNIQUE_TEST_FILEN=
AMES[@]}" 2>&1 || status=3D1
++ parallel --keep-order --jobs "$num_jobs" bats-exec-file "$(printf "%q=
" "${flags[@]}")" "{}" "$TESTS_LIST_FILE" ::: "${BATS_UNIQUE_TEST_FILEN=
AMES[@]}" 2>&1 || bats_exec_suite_status=3D1
+ else
+ for filename in "${BATS_UNIQUE_TEST_FILENAMES[@]}"; do
+ if [[ "${BATS_INTERRUPTED-NOTSET}" !=3D NOTSET ]]; then
+- status=3D130 # bash's code for SIGINT exits
++ bats_exec_suite_status=3D130 # bash's code for SIGINT exits
+ break
+ fi
+- bats-exec-file "${flags[@]}" "$filename" "${TESTS_LIST_FILE}" || st=
atus=3D1
++ bats-exec-file "${flags[@]}" "$filename" "${TESTS_LIST_FILE}" || ba=
ts_exec_suite_status=3D1
+ done
+ fi
+
+-exit "$status"
++exit "$bats_exec_suite_status"
+diff --git a/libexec/bats-core/bats-exec-test b/libexec/bats-core/bats-e=
xec-test
+index aae4572..57bdf18 100755
+--- a/libexec/bats-core/bats-exec-test
++++ b/libexec/bats-core/bats-exec-test
+@@ -94,18 +94,18 @@ source "$BATS_ROOT/lib/bats-core/tracing.bash"
+
+ bats_teardown_trap() {
+ bats_check_status_from_trap
+- local status=3D0
++ local bats_teardown_trap_status=3D0
+ # mark the start of this function to distinguish where skip is called
+ # parameter 1 will signify the reason why this function was called
+ # this is used to identify when this is called as exit trap function
+ BATS_TEARDOWN_STARTED=3D${1:-1}
+- teardown >>"$BATS_OUT" 2>&1 || status=3D"$?"
++ teardown >>"$BATS_OUT" 2>&1 || bats_teardown_trap_status=3D"$?"
+
+- if [[ $status -eq 0 ]]; then
++ if [[ $bats_teardown_trap_status -eq 0 ]]; then
+ BATS_TEARDOWN_COMPLETED=3D1
+ elif [[ -n "$BATS_TEST_COMPLETED" ]]; then
+ BATS_DEBUG_LAST_STACK_TRACE_IS_VALID=3D1
+- BATS_ERROR_STATUS=3D"$status"
++ BATS_ERROR_STATUS=3D"$bats_teardown_trap_status"
+ fi
+
+ bats_exit_trap
+--
+2.25.1
+
--=20
2.25.1


[meta-oe][dunfell][PATCH] lua: fix CVE-2022-28805

omkar
 

From: Steve Sakoman <steve@...>

singlevar in lparser.c in Lua through 5.4.4 lacks a certain luaK_exp2anyregup
call, leading to a heap-based buffer over-read that might affect a system that
compiles untrusted Lua code.

https://nvd.nist.gov/vuln/detail/CVE-2022-28805

(From OE-Core rev: d2ba3b8850d461bc7b773240cdf15b22b31a3f9e)

Signed-off-by: Sana Kazi <sana.kazi@...>
Signed-off-by: Steve Sakoman <steve@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
(cherry picked from commit 91e14d3a8e6e67267047473f5c449f266b44f354)
Signed-off-by: Omkar Patil <omkar.patil@...>
Signed-off-by: omkar <omkarpatil10.93@...>
---
.../lua/lua/0001-lua-fix-CVE-2022-28805.patch | 73 +++++++++++++++++++
.../lua/lua/CVE-2022-28805.patch | 28 +++++++
meta-oe/recipes-devtools/lua/lua_5.3.6.bb | 1 +
3 files changed, 102 insertions(+)
create mode 100644 meta-oe/recipes-devtools/lua/lua/0001-lua-fix-CVE-2022-28805.patch
create mode 100644 meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch

diff --git a/meta-oe/recipes-devtools/lua/lua/0001-lua-fix-CVE-2022-28805.patch b/meta-oe/recipes-devtools/lua/lua/0001-lua-fix-CVE-2022-28805.patch
new file mode 100644
index 000000000..606c9ea98
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua/0001-lua-fix-CVE-2022-28805.patch
@@ -0,0 +1,73 @@
+From a38684e4cb4e1439e5f2f7370724496d5b363b32 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@...>
+Date: Mon, 18 Apr 2022 09:04:08 -1000
+Subject: [PATCH] lua: fix CVE-2022-28805
+
+singlevar in lparser.c in Lua through 5.4.4 lacks a certain luaK_exp2anyregup
+call, leading to a heap-based buffer over-read that might affect a system that
+compiles untrusted Lua code.
+
+https://nvd.nist.gov/vuln/detail/CVE-2022-28805
+
+(From OE-Core rev: d2ba3b8850d461bc7b773240cdf15b22b31a3f9e)
+
+Signed-off-by: Sana Kazi <sana.kazi@...>
+Signed-off-by: Steve Sakoman <steve@...>
+Signed-off-by: Richard Purdie <richard.purdie@...>
+(cherry picked from commit 91e14d3a8e6e67267047473f5c449f266b44f354)
+Signed-off-by: Omkar Patil <omkar.patil@...>
+---
+ .../lua/lua/CVE-2022-28805.patch | 28 +++++++++++++++++++
+ meta-oe/recipes-devtools/lua/lua_5.3.6.bb | 1 +
+ 2 files changed, 29 insertions(+)
+ create mode 100644 meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch
+
+diff --git a/meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch b/meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch
+new file mode 100644
+index 000000000..0a21d1ce7
+--- /dev/null
++++ b/meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch
+@@ -0,0 +1,28 @@
++From 1f3c6f4534c6411313361697d98d1145a1f030fa Mon Sep 17 00:00:00 2001
++From: Roberto Ierusalimschy <roberto@...>
++Date: Tue, 15 Feb 2022 12:28:46 -0300
++Subject: [PATCH] Bug: Lua can generate wrong code when _ENV is <const>
++
++CVE: CVE-2022-28805
++
++Upstream-Status: Backport [https://github.com/lua/lua/commit/1f3c6f4534c6411313361697d98d1145a1f030fa]
++
++Signed-off-by: Sana Kazi <sana.kazi@...>
++Signed-off-by: Steve Sakoman <steve@...>
++---
++ src/lparser.c | 1 +
++ 1 files changed, 1 insertions(+)
++
++diff --git a/src/lparser.c b/src/lparser.c
++index 3abe3d751..a5cd55257 100644
++--- a/src/lparser.c
+++++ b/src/lparser.c
++@@ -300,6 +300,7 @@
++ expdesc key;
++ singlevaraux(fs, ls->envn, var, 1); /* get environment variable */
++ lua_assert(var->k != VVOID); /* this one must exist */
+++ luaK_exp2anyregup(fs, var); /* but could be a constant */
++ codestring(ls, &key, varname); /* key is variable name */
++ luaK_indexed(fs, var, &key); /* env[varname] */
++ }
++
+diff --git a/meta-oe/recipes-devtools/lua/lua_5.3.6.bb b/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
+index 342ed1b54..0137cc3c5 100644
+--- a/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
++++ b/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
+@@ -10,6 +10,7 @@ SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
+ file://CVE-2020-15888.patch \
+ file://CVE-2020-15945.patch \
+ file://0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch \
++ file://CVE-2022-28805.patch \
+ "
+
+ # if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
+--
+2.17.1
+
diff --git a/meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch b/meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch
new file mode 100644
index 000000000..0a21d1ce7
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua/CVE-2022-28805.patch
@@ -0,0 +1,28 @@
+From 1f3c6f4534c6411313361697d98d1145a1f030fa Mon Sep 17 00:00:00 2001
+From: Roberto Ierusalimschy <roberto@...>
+Date: Tue, 15 Feb 2022 12:28:46 -0300
+Subject: [PATCH] Bug: Lua can generate wrong code when _ENV is <const>
+
+CVE: CVE-2022-28805
+
+Upstream-Status: Backport [https://github.com/lua/lua/commit/1f3c6f4534c6411313361697d98d1145a1f030fa]
+
+Signed-off-by: Sana Kazi <sana.kazi@...>
+Signed-off-by: Steve Sakoman <steve@...>
+---
+ src/lparser.c | 1 +
+ 1 files changed, 1 insertions(+)
+
+diff --git a/src/lparser.c b/src/lparser.c
+index 3abe3d751..a5cd55257 100644
+--- a/src/lparser.c
++++ b/src/lparser.c
+@@ -300,6 +300,7 @@
+ expdesc key;
+ singlevaraux(fs, ls->envn, var, 1); /* get environment variable */
+ lua_assert(var->k != VVOID); /* this one must exist */
++ luaK_exp2anyregup(fs, var); /* but could be a constant */
+ codestring(ls, &key, varname); /* key is variable name */
+ luaK_indexed(fs, var, &key); /* env[varname] */
+ }
+
diff --git a/meta-oe/recipes-devtools/lua/lua_5.3.6.bb b/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
index 342ed1b54..0137cc3c5 100644
--- a/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
+++ b/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
@@ -10,6 +10,7 @@ SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
file://CVE-2020-15888.patch \
file://CVE-2020-15945.patch \
file://0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch \
+ file://CVE-2022-28805.patch \
"

# if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
--
2.17.1

1901 - 1920 of 98996