* [OE-core][dunfell 00/11] Patch review @ 2022-08-10 22:31 Steve Sakoman 2022-08-10 22:31 ` [OE-core][dunfell 01/11] grub2: Fix several security issue of integer underflow Steve Sakoman ` (10 more replies) 0 siblings, 11 replies; 12+ messages in thread From: Steve Sakoman @ 2022-08-10 22:31 UTC (permalink / raw) To: openembedded-core Please review this set of patches for dunfell and have comments back by end of day Friday. Passed a-full on autobuilder: https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/4058 The following changes since commit 73d2b640ad665f6ff3c4fbe8f5da4ef0dbb175f2: libtirpc: CVE-2021-46828 DoS vulnerability with lots of connections (2022-07-28 06:26:48 -1000) are available in the Git repository at: git://git.openembedded.org/openembedded-core-contrib stable/dunfell-nut http://cgit.openembedded.org/openembedded-core-contrib/log/?h=stable/dunfell-nut Alex Kiernan (1): openssh: Add openssh-sftp-server to openssh RDEPENDS Bruce Ashfield (2): linux-yocto/5.4: update to v5.4.208 linux-yocto/5.4: update to v5.4.209 Hitendra Prajapati (2): grub2: Fix several security issue of integer underflow gdk-pixbuf: CVE-2021-46829 a heap-based buffer overflow Jose Quaresma (1): gstreamer1.0: use the correct meson option for the capabilities Khem Raj (1): libmodule-build-perl: Use env utility to find perl interpreter Martin Jansa (1): libxml2: Port gentest.py to Python-3 Richard Purdie (1): insane: Fix buildpaths test to work with special devices Ross Burton (1): cve_check: skip remote patches that haven't been fetched when searching for CVE tags Steve Sakoman (1): selftest: skip virgl test on fedora 36 meta/classes/insane.bbclass | 6 +- meta/lib/oe/cve_check.py | 5 +- meta/lib/oeqa/selftest/cases/runtime_test.py | 2 + .../grub/files/CVE-2022-28733.patch | 60 ++ .../grub/files/CVE-2022-28734.patch | 67 ++ .../grub/files/CVE-2022-28736.patch | 275 ++++++ meta/recipes-bsp/grub/grub2.inc | 3 + .../openssh/openssh_8.2p1.bb | 2 +- .../0001-Port-gentest.py-to-Python-3.patch | 813 ++++++++++++++++++ meta/recipes-core/libxml/libxml2_2.9.10.bb | 11 + .../perl/libmodule-build-perl_0.4231.bb | 1 + .../gdk-pixbuf/CVE-2021-46829.patch | 61 ++ .../gdk-pixbuf/gdk-pixbuf_2.40.0.bb | 1 + .../linux/linux-yocto-rt_5.4.bb | 6 +- .../linux/linux-yocto-tiny_5.4.bb | 8 +- meta/recipes-kernel/linux/linux-yocto_5.4.bb | 22 +- .../gstreamer/gstreamer1.0_1.16.3.bb | 2 +- 17 files changed, 1321 insertions(+), 24 deletions(-) create mode 100644 meta/recipes-bsp/grub/files/CVE-2022-28733.patch create mode 100644 meta/recipes-bsp/grub/files/CVE-2022-28734.patch create mode 100644 meta/recipes-bsp/grub/files/CVE-2022-28736.patch create mode 100644 meta/recipes-core/libxml/libxml2/0001-Port-gentest.py-to-Python-3.patch create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2021-46829.patch -- 2.25.1 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [OE-core][dunfell 01/11] grub2: Fix several security issue of integer underflow 2022-08-10 22:31 [OE-core][dunfell 00/11] Patch review Steve Sakoman @ 2022-08-10 22:31 ` Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 02/11] gdk-pixbuf: CVE-2021-46829 a heap-based buffer overflow Steve Sakoman ` (9 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Steve Sakoman @ 2022-08-10 22:31 UTC (permalink / raw) To: openembedded-core From: Hitendra Prajapati <hprajapati@mvista.com> Source: https://git.savannah.gnu.org/gitweb/?p=grub.git MR: 119763, 119779, 119807 Type: Security Fix Disposition: Backport from https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=3e4817538de828319ba6d59ced2fbb9b5ca13287 && https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=b26b4c08e7119281ff30d0fb4a6169bd2afa8fe4 && https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=04c86e0bb7b58fc2f913f798cdb18934933e532d ChangeID: ef7c28bc7b4eb32550df2cf49082791dac64ef1b Description: Fix CVEs: CVE-2022-28733 CVE-2022-28734 CVE-2022-28736 Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> --- .../grub/files/CVE-2022-28733.patch | 60 ++++ .../grub/files/CVE-2022-28734.patch | 67 +++++ .../grub/files/CVE-2022-28736.patch | 275 ++++++++++++++++++ meta/recipes-bsp/grub/grub2.inc | 3 + 4 files changed, 405 insertions(+) create mode 100644 meta/recipes-bsp/grub/files/CVE-2022-28733.patch create mode 100644 meta/recipes-bsp/grub/files/CVE-2022-28734.patch create mode 100644 meta/recipes-bsp/grub/files/CVE-2022-28736.patch diff --git a/meta/recipes-bsp/grub/files/CVE-2022-28733.patch b/meta/recipes-bsp/grub/files/CVE-2022-28733.patch new file mode 100644 index 0000000000..6cfdf20e2d --- /dev/null +++ b/meta/recipes-bsp/grub/files/CVE-2022-28733.patch @@ -0,0 +1,60 @@ +From 415fb5eb83cbd3b5cfc25ac1290f2de4fe3d231c Mon Sep 17 00:00:00 2001 +From: Hitendra Prajapati <hprajapati@mvista.com> +Date: Mon, 1 Aug 2022 10:48:34 +0530 +Subject: [PATCH] CVE-2022-28733 + +Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=3e4817538de828319ba6d59ced2fbb9b5ca13287] +CVE: CVE-2022-28733 +Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> + +net/ip: Do IP fragment maths safely + +We can receive packets with invalid IP fragmentation information. This +can lead to rsm->total_len underflowing and becoming very large. + +Then, in grub_netbuff_alloc(), we add to this very large number, which can +cause it to overflow and wrap back around to a small positive number. +The allocation then succeeds, but the resulting buffer is too small and +subsequent operations can write past the end of the buffer. + +Catch the underflow here. + +Fixes: CVE-2022-28733 + +Signed-off-by: Daniel Axtens <dja@axtens.net> +Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> +--- + grub-core/net/ip.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c +index ea5edf8..74e4e8b 100644 +--- a/grub-core/net/ip.c ++++ b/grub-core/net/ip.c +@@ -25,6 +25,7 @@ + #include <grub/net/netbuff.h> + #include <grub/mm.h> + #include <grub/priority_queue.h> ++#include <grub/safemath.h> + #include <grub/time.h> + + struct iphdr { +@@ -512,7 +513,14 @@ grub_net_recv_ip4_packets (struct grub_net_buff *nb, + { + rsm->total_len = (8 * (grub_be_to_cpu16 (iph->frags) & OFFSET_MASK) + + (nb->tail - nb->data)); +- rsm->total_len -= ((iph->verhdrlen & 0xf) * sizeof (grub_uint32_t)); ++ ++ if (grub_sub (rsm->total_len, (iph->verhdrlen & 0xf) * sizeof (grub_uint32_t), ++ &rsm->total_len)) ++ { ++ grub_dprintf ("net", "IP reassembly size underflow\n"); ++ return GRUB_ERR_NONE; ++ } ++ + rsm->asm_netbuff = grub_netbuff_alloc (rsm->total_len); + if (!rsm->asm_netbuff) + { +-- +2.25.1 + diff --git a/meta/recipes-bsp/grub/files/CVE-2022-28734.patch b/meta/recipes-bsp/grub/files/CVE-2022-28734.patch new file mode 100644 index 0000000000..577ec10bea --- /dev/null +++ b/meta/recipes-bsp/grub/files/CVE-2022-28734.patch @@ -0,0 +1,67 @@ +From f03f09c2a07eae7f3a4646e33a406ae2689afb9e Mon Sep 17 00:00:00 2001 +From: Hitendra Prajapati <hprajapati@mvista.com> +Date: Mon, 1 Aug 2022 10:59:41 +0530 +Subject: [PATCH] CVE-2022-28734 + +Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=b26b4c08e7119281ff30d0fb4a6169bd2afa8fe4] +CVE: CVE-2022-28734 +Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> + +net/http: Fix OOB write for split http headers + +GRUB has special code for handling an http header that is split +across two packets. + +The code tracks the end of line by looking for a "\n" byte. The +code for split headers has always advanced the pointer just past the +end of the line, whereas the code that handles unsplit headers does +not advance the pointer. This extra advance causes the length to be +one greater, which breaks an assumption in parse_line(), leading to +it writing a NUL byte one byte past the end of the buffer where we +reconstruct the line from the two packets. + +It's conceivable that an attacker controlled set of packets could +cause this to zero out the first byte of the "next" pointer of the +grub_mm_region structure following the current_line buffer. + +Do not advance the pointer in the split header case. + +Fixes: CVE-2022-28734 +--- + grub-core/net/http.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/grub-core/net/http.c b/grub-core/net/http.c +index 5aa4ad3..a220d21 100644 +--- a/grub-core/net/http.c ++++ b/grub-core/net/http.c +@@ -68,7 +68,15 @@ parse_line (grub_file_t file, http_data_t data, char *ptr, grub_size_t len) + char *end = ptr + len; + while (end > ptr && *(end - 1) == '\r') + end--; ++ ++ /* LF without CR. */ ++ if (end == ptr + len) ++ { ++ data->errmsg = grub_strdup (_("invalid HTTP header - LF without CR")); ++ return GRUB_ERR_NONE; ++ } + *end = 0; ++ + /* Trailing CRLF. */ + if (data->in_chunk_len == 1) + { +@@ -190,9 +198,7 @@ http_receive (grub_net_tcp_socket_t sock __attribute__ ((unused)), + int have_line = 1; + char *t; + ptr = grub_memchr (nb->data, '\n', nb->tail - nb->data); +- if (ptr) +- ptr++; +- else ++ if (ptr == NULL) + { + have_line = 0; + ptr = (char *) nb->tail; +-- +2.25.1 + diff --git a/meta/recipes-bsp/grub/files/CVE-2022-28736.patch b/meta/recipes-bsp/grub/files/CVE-2022-28736.patch new file mode 100644 index 0000000000..4fc9fdaf05 --- /dev/null +++ b/meta/recipes-bsp/grub/files/CVE-2022-28736.patch @@ -0,0 +1,275 @@ +From 431a111c60095fc973d83fe9209f26f29ce78784 Mon Sep 17 00:00:00 2001 +From: Hitendra Prajapati <hprajapati@mvista.com> +Date: Mon, 1 Aug 2022 11:17:17 +0530 +Subject: [PATCH] CVE-2022-28736 + +Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=04c86e0bb7b58fc2f913f798cdb18934933e532d] +CVE: CVE-2022-28736 +Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> + +loader/efi/chainloader: Use grub_loader_set_ex() + +This ports the EFI chainloader to use grub_loader_set_ex() in order to fix +a use-after-free bug that occurs when grub_cmd_chainloader() is executed +more than once before a boot attempt is performed. + +Fixes: CVE-2022-28736 + +Signed-off-by: Chris Coulson <chris.coulson@canonical.com> +Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> +--- + grub-core/commands/boot.c | 66 ++++++++++++++++++++++++++---- + grub-core/loader/efi/chainloader.c | 46 +++++++++++---------- + include/grub/loader.h | 5 +++ + 3 files changed, 87 insertions(+), 30 deletions(-) + +diff --git a/grub-core/commands/boot.c b/grub-core/commands/boot.c +index bbca81e..6151478 100644 +--- a/grub-core/commands/boot.c ++++ b/grub-core/commands/boot.c +@@ -27,10 +27,20 @@ + + GRUB_MOD_LICENSE ("GPLv3+"); + +-static grub_err_t (*grub_loader_boot_func) (void); +-static grub_err_t (*grub_loader_unload_func) (void); ++static grub_err_t (*grub_loader_boot_func) (void *context); ++static grub_err_t (*grub_loader_unload_func) (void *context); ++static void *grub_loader_context; + static int grub_loader_flags; + ++struct grub_simple_loader_hooks ++{ ++ grub_err_t (*boot) (void); ++ grub_err_t (*unload) (void); ++}; ++ ++/* Don't heap allocate this to avoid making grub_loader_set() fallible. */ ++static struct grub_simple_loader_hooks simple_loader_hooks; ++ + struct grub_preboot + { + grub_err_t (*preboot_func) (int); +@@ -44,6 +54,29 @@ static int grub_loader_loaded; + static struct grub_preboot *preboots_head = 0, + *preboots_tail = 0; + ++static grub_err_t ++grub_simple_boot_hook (void *context) ++{ ++ struct grub_simple_loader_hooks *hooks; ++ ++ hooks = (struct grub_simple_loader_hooks *) context; ++ return hooks->boot (); ++} ++ ++static grub_err_t ++grub_simple_unload_hook (void *context) ++{ ++ struct grub_simple_loader_hooks *hooks; ++ grub_err_t ret; ++ ++ hooks = (struct grub_simple_loader_hooks *) context; ++ ++ ret = hooks->unload (); ++ grub_memset (hooks, 0, sizeof (*hooks)); ++ ++ return ret; ++} ++ + int + grub_loader_is_loaded (void) + { +@@ -110,28 +143,45 @@ grub_loader_unregister_preboot_hook (struct grub_preboot *hnd) + } + + void +-grub_loader_set (grub_err_t (*boot) (void), +- grub_err_t (*unload) (void), +- int flags) ++grub_loader_set_ex (grub_err_t (*boot) (void *context), ++ grub_err_t (*unload) (void *context), ++ void *context, ++ int flags) + { + if (grub_loader_loaded && grub_loader_unload_func) +- grub_loader_unload_func (); ++ grub_loader_unload_func (grub_loader_context); + + grub_loader_boot_func = boot; + grub_loader_unload_func = unload; ++ grub_loader_context = context; + grub_loader_flags = flags; + + grub_loader_loaded = 1; + } + ++void ++grub_loader_set (grub_err_t (*boot) (void), ++ grub_err_t (*unload) (void), ++ int flags) ++{ ++ grub_loader_set_ex (grub_simple_boot_hook, ++ grub_simple_unload_hook, ++ &simple_loader_hooks, ++ flags); ++ ++ simple_loader_hooks.boot = boot; ++ simple_loader_hooks.unload = unload; ++} ++ + void + grub_loader_unset(void) + { + if (grub_loader_loaded && grub_loader_unload_func) +- grub_loader_unload_func (); ++ grub_loader_unload_func (grub_loader_context); + + grub_loader_boot_func = 0; + grub_loader_unload_func = 0; ++ grub_loader_context = 0; + + grub_loader_loaded = 0; + } +@@ -158,7 +208,7 @@ grub_loader_boot (void) + return err; + } + } +- err = (grub_loader_boot_func) (); ++ err = (grub_loader_boot_func) (grub_loader_context); + + for (cur = preboots_tail; cur; cur = cur->prev) + if (! err) +diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c +index a8d7b91..93a028a 100644 +--- a/grub-core/loader/efi/chainloader.c ++++ b/grub-core/loader/efi/chainloader.c +@@ -44,33 +44,28 @@ GRUB_MOD_LICENSE ("GPLv3+"); + + static grub_dl_t my_mod; + +-static grub_efi_physical_address_t address; +-static grub_efi_uintn_t pages; +-static grub_efi_device_path_t *file_path; +-static grub_efi_handle_t image_handle; +-static grub_efi_char16_t *cmdline; +- + static grub_err_t +-grub_chainloader_unload (void) ++grub_chainloader_unload (void *context) + { ++ grub_efi_handle_t image_handle = (grub_efi_handle_t) context; ++ grub_efi_loaded_image_t *loaded_image; + grub_efi_boot_services_t *b; + ++ loaded_image = grub_efi_get_loaded_image (image_handle); ++ if (loaded_image != NULL) ++ grub_free (loaded_image->load_options); ++ + b = grub_efi_system_table->boot_services; + efi_call_1 (b->unload_image, image_handle); +- efi_call_2 (b->free_pages, address, pages); +- +- grub_free (file_path); +- grub_free (cmdline); +- cmdline = 0; +- file_path = 0; + + grub_dl_unref (my_mod); + return GRUB_ERR_NONE; + } + + static grub_err_t +-grub_chainloader_boot (void) ++grub_chainloader_boot (void *context) + { ++ grub_efi_handle_t image_handle = (grub_efi_handle_t) context; + grub_efi_boot_services_t *b; + grub_efi_status_t status; + grub_efi_uintn_t exit_data_size; +@@ -139,7 +134,7 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename) + char *dir_start; + char *dir_end; + grub_size_t size; +- grub_efi_device_path_t *d; ++ grub_efi_device_path_t *d, *file_path; + + dir_start = grub_strchr (filename, ')'); + if (! dir_start) +@@ -215,11 +210,15 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), + grub_efi_status_t status; + grub_efi_boot_services_t *b; + grub_device_t dev = 0; +- grub_efi_device_path_t *dp = 0; ++ grub_efi_device_path_t *dp = NULL, *file_path = NULL; + grub_efi_loaded_image_t *loaded_image; + char *filename; + void *boot_image = 0; + grub_efi_handle_t dev_handle = 0; ++ grub_efi_physical_address_t address = 0; ++ grub_efi_uintn_t pages = 0; ++ grub_efi_char16_t *cmdline = NULL; ++ grub_efi_handle_t image_handle = NULL; + + if (argc == 0) + return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); +@@ -227,11 +226,6 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), + + grub_dl_ref (my_mod); + +- /* Initialize some global variables. */ +- address = 0; +- image_handle = 0; +- file_path = 0; +- + b = grub_efi_system_table->boot_services; + + file = grub_file_open (filename, GRUB_FILE_TYPE_EFI_CHAINLOADED_IMAGE); +@@ -401,7 +395,11 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), + grub_file_close (file); + grub_device_close (dev); + +- grub_loader_set (grub_chainloader_boot, grub_chainloader_unload, 0); ++ /* We're finished with the source image buffer and file path now. */ ++ efi_call_2 (b->free_pages, address, pages); ++ grub_free (file_path); ++ ++ grub_loader_set_ex (grub_chainloader_boot, grub_chainloader_unload, image_handle, 0); + return 0; + + fail: +@@ -412,11 +410,15 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), + if (file) + grub_file_close (file); + ++ grub_free (cmdline); + grub_free (file_path); + + if (address) + efi_call_2 (b->free_pages, address, pages); + ++ if (image_handle != NULL) ++ efi_call_1 (b->unload_image, image_handle); ++ + grub_dl_unref (my_mod); + + return grub_errno; +diff --git a/include/grub/loader.h b/include/grub/loader.h +index 7f82a49..3071a50 100644 +--- a/include/grub/loader.h ++++ b/include/grub/loader.h +@@ -39,6 +39,11 @@ void EXPORT_FUNC (grub_loader_set) (grub_err_t (*boot) (void), + grub_err_t (*unload) (void), + int flags); + ++void EXPORT_FUNC (grub_loader_set_ex) (grub_err_t (*boot) (void *context), ++ grub_err_t (*unload) (void *context), ++ void *context, ++ int flags); ++ + /* Unset current loader, if any. */ + void EXPORT_FUNC (grub_loader_unset) (void); + +-- +2.25.1 + diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc index 0b7ca6d3d6..a248af0073 100644 --- a/meta/recipes-bsp/grub/grub2.inc +++ b/meta/recipes-bsp/grub/grub2.inc @@ -99,6 +99,9 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \ file://CVE-2021-3695.patch \ file://CVE-2021-3696.patch \ file://CVE-2021-3697.patch \ + file://CVE-2022-28733.patch \ + file://CVE-2022-28734.patch \ + file://CVE-2022-28736.patch \ " SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934" SRC_URI[sha256sum] = "f10c85ae3e204dbaec39ae22fa3c5e99f0665417e91c2cb49b7e5031658ba6ea" -- 2.25.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [OE-core][dunfell 02/11] gdk-pixbuf: CVE-2021-46829 a heap-based buffer overflow 2022-08-10 22:31 [OE-core][dunfell 00/11] Patch review Steve Sakoman 2022-08-10 22:31 ` [OE-core][dunfell 01/11] grub2: Fix several security issue of integer underflow Steve Sakoman @ 2022-08-10 22:32 ` Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 03/11] cve_check: skip remote patches that haven't been fetched when searching for CVE tags Steve Sakoman ` (8 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Steve Sakoman @ 2022-08-10 22:32 UTC (permalink / raw) To: openembedded-core From: Hitendra Prajapati <hprajapati@mvista.com> Source: https://gitlab.gnome.org/GNOME/gdk-pixbuf MR: 120380 Type: Security Fix Disposition: Backport from https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/commit/5398f04d772f7f8baf5265715696ed88db0f0512 ChangeID: d8a843bcf97268ee4f0c6870f1339790a9a908e5 Description: CVE-2021-46829 gdk-pixbuf: a heap-based buffer overflow when compositing or clearing frames in GIF files. Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> --- .../gdk-pixbuf/CVE-2021-46829.patch | 61 +++++++++++++++++++ .../gdk-pixbuf/gdk-pixbuf_2.40.0.bb | 1 + 2 files changed, 62 insertions(+) create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2021-46829.patch diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2021-46829.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2021-46829.patch new file mode 100644 index 0000000000..b29ab209ce --- /dev/null +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2021-46829.patch @@ -0,0 +1,61 @@ +From bdf3a2630c02a63803309cf0ad4b274234c814ce Mon Sep 17 00:00:00 2001 +From: Hitendra Prajapati <hprajapati@mvista.com> +Date: Tue, 9 Aug 2022 09:45:42 +0530 +Subject: [PATCH] CVE-2021-46829 + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/commit/5398f04d772f7f8baf5265715696ed88db0f0512] +CVE: CVE-2021-46829 +Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> +--- + gdk-pixbuf/io-gif-animation.c | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +diff --git a/gdk-pixbuf/io-gif-animation.c b/gdk-pixbuf/io-gif-animation.c +index d742963..9544391 100644 +--- a/gdk-pixbuf/io-gif-animation.c ++++ b/gdk-pixbuf/io-gif-animation.c +@@ -364,7 +364,7 @@ composite_frame (GdkPixbufGifAnim *anim, GdkPixbufFrame *frame) + for (i = 0; i < n_indexes; i++) { + guint8 index = index_buffer[i]; + guint x, y; +- int offset; ++ gsize offset; + + if (index == frame->transparent_index) + continue; +@@ -374,11 +374,13 @@ composite_frame (GdkPixbufGifAnim *anim, GdkPixbufFrame *frame) + if (x >= anim->width || y >= anim->height) + continue; + +- offset = y * gdk_pixbuf_get_rowstride (anim->last_frame_data) + x * 4; +- pixels[offset + 0] = frame->color_map[index * 3 + 0]; +- pixels[offset + 1] = frame->color_map[index * 3 + 1]; +- pixels[offset + 2] = frame->color_map[index * 3 + 2]; +- pixels[offset + 3] = 255; ++ if (g_size_checked_mul (&offset, gdk_pixbuf_get_rowstride (anim->last_frame_data), y) && ++ g_size_checked_add (&offset, offset, x * 4)) { ++ pixels[offset + 0] = frame->color_map[index * 3 + 0]; ++ pixels[offset + 1] = frame->color_map[index * 3 + 1]; ++ pixels[offset + 2] = frame->color_map[index * 3 + 2]; ++ pixels[offset + 3] = 255; ++ } + } + + out: +@@ -443,8 +445,11 @@ gdk_pixbuf_gif_anim_iter_get_pixbuf (GdkPixbufAnimationIter *anim_iter) + x_end = MIN (anim->last_frame->x_offset + anim->last_frame->width, anim->width); + y_end = MIN (anim->last_frame->y_offset + anim->last_frame->height, anim->height); + for (y = anim->last_frame->y_offset; y < y_end; y++) { +- guchar *line = pixels + y * gdk_pixbuf_get_rowstride (anim->last_frame_data) + anim->last_frame->x_offset * 4; +- memset (line, 0, (x_end - anim->last_frame->x_offset) * 4); ++ gsize offset; ++ if (g_size_checked_mul (&offset, gdk_pixbuf_get_rowstride (anim->last_frame_data), y) && ++ g_size_checked_add (&offset, offset, anim->last_frame->x_offset * 4)) { ++ memset (pixels + offset, 0, (x_end - anim->last_frame->x_offset) * 4); ++ } + } + break; + case GDK_PIXBUF_FRAME_REVERT: +-- +2.25.1 + diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb index 60a04c3581..1171e6cc11 100644 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb @@ -26,6 +26,7 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ file://missing-test-data.patch \ file://CVE-2020-29385.patch \ file://CVE-2021-20240.patch \ + file://CVE-2021-46829.patch \ " SRC_URI_append_class-target = " \ -- 2.25.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [OE-core][dunfell 03/11] cve_check: skip remote patches that haven't been fetched when searching for CVE tags 2022-08-10 22:31 [OE-core][dunfell 00/11] Patch review Steve Sakoman 2022-08-10 22:31 ` [OE-core][dunfell 01/11] grub2: Fix several security issue of integer underflow Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 02/11] gdk-pixbuf: CVE-2021-46829 a heap-based buffer overflow Steve Sakoman @ 2022-08-10 22:32 ` Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 04/11] linux-yocto/5.4: update to v5.4.208 Steve Sakoman ` (7 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Steve Sakoman @ 2022-08-10 22:32 UTC (permalink / raw) To: openembedded-core From: Ross Burton <ross.burton@arm.com> If a remote patch is compressed we need to have run the unpack task for the file to exist locally. Currently cve_check only depends on fetch so instead of erroring out, emit a warning that this file won't be scanned for CVE references. Typically, remote compressed patches won't contain our custom tags, so this is unlikely to be an issue. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cefc8741438c91f74264da6b59dece2e31f9e5a5) Signed-off-by: Steve Sakoman <steve@sakoman.com> --- meta/lib/oe/cve_check.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/lib/oe/cve_check.py b/meta/lib/oe/cve_check.py index a4b831831b..30fdc3e3dd 100644 --- a/meta/lib/oe/cve_check.py +++ b/meta/lib/oe/cve_check.py @@ -114,9 +114,10 @@ def get_patched_cves(d): for url in oe.patch.src_patches(d): patch_file = bb.fetch.decodeurl(url)[2] + # Remote compressed patches may not be unpacked, so silently ignore them if not os.path.isfile(patch_file): - bb.error("File Not found: %s" % patch_file) - raise FileNotFoundError + bb.warn("%s does not exist, cannot extract CVE list" % patch_file) + continue # Check patch file name for CVE ID fname_match = cve_file_name_match.search(patch_file) -- 2.25.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [OE-core][dunfell 04/11] linux-yocto/5.4: update to v5.4.208 2022-08-10 22:31 [OE-core][dunfell 00/11] Patch review Steve Sakoman ` (2 preceding siblings ...) 2022-08-10 22:32 ` [OE-core][dunfell 03/11] cve_check: skip remote patches that haven't been fetched when searching for CVE tags Steve Sakoman @ 2022-08-10 22:32 ` Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 05/11] linux-yocto/5.4: update to v5.4.209 Steve Sakoman ` (6 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Steve Sakoman @ 2022-08-10 22:32 UTC (permalink / raw) To: openembedded-core From: Bruce Ashfield <bruce.ashfield@gmail.com> Updating to the latest korg -stable release that comprises the following commits: 77ba2b9b46f8 Linux 5.4.208 ca5762c5896e x86: drop bogus "cc" clobber from __try_cmpxchg_user_asm() f88d8c188229 net: usb: ax88179_178a needs FLAG_SEND_ZLP f7785092cb7f tty: use new tty_insert_flip_string_and_push_buffer() in pty_write() 815d936e92f9 tty: extract tty_flip_buffer_commit() from tty_flip_buffer_push() 2ea77b0b6d22 tty: drop tty_schedule_flip() f20912215c9c tty: the rest, stop using tty_schedule_flip() aa60c0cce8b4 tty: drivers/tty/, stop using tty_schedule_flip() 126137a53d7e Bluetooth: Fix bt_skb_sendmmsg not allocating partial chunks 836b47e6436b Bluetooth: SCO: Fix sco_send_frame returning skb->len aa2d34cab3e6 Bluetooth: Fix passing NULL to PTR_ERR 10bacb891722 Bluetooth: RFCOMM: Replace use of memcpy_from_msg with bt_skb_sendmmsg bf46574d4655 Bluetooth: SCO: Replace use of memcpy_from_msg with bt_skb_sendmsg f00b06003b11 Bluetooth: Add bt_skb_sendmmsg helper 55bf99849be0 Bluetooth: Add bt_skb_sendmsg helper 015af30d373d ALSA: memalloc: Align buffer allocations in page size 352affc31e26 bitfield.h: Fix "type of reg too small for mask" test 0a0fbbd6cb65 x86/mce: Deduplicate exception handling b524137fa1d8 mmap locking API: initial implementation as rwsem wrappers 592a1c6066dd x86/uaccess: Implement macros for CMPXCHG on user addresses 1d778b54a5c0 x86: get rid of small constant size cases in raw_copy_{to,from}_user() d0d583484d2e locking/refcount: Consolidate implementations of refcount_t dab787c73f6e locking/refcount: Consolidate REFCOUNT_{MAX,SATURATED} definitions 0d3182fbe689 locking/refcount: Move saturation warnings out of line 809554147d60 locking/refcount: Improve performance of generic REFCOUNT_FULL code 9c9269977f03 locking/refcount: Move the bulk of the REFCOUNT_FULL implementation into the <linux/refcount.h> header 04bff7d7b808 locking/refcount: Remove unused refcount_*_checked() variants 513b19a43bec locking/refcount: Ensure integer operands are treated as signed 68b4ee68e8c8 locking/refcount: Define constants for saturation and max refcount values 3f71d0e292eb ima: remove the IMA_TEMPLATE Kconfig option bc7581e36d40 dlm: fix pending remove if msg allocation fails 4f1d21c77b15 bpf: Make sure mac_header was set before using it a1f8765f68bc mm/mempolicy: fix uninit-value in mpol_rebind_policy() 76668d2a2f36 spi: bcm2835: bcm2835_spi_handle_err(): fix NULL pointer deref for non DMA transfers 50a1d3d09750 tcp: Fix data-races around sysctl_tcp_max_reordering. c64b99819de4 tcp: Fix a data-race around sysctl_tcp_rfc1337. 6cc566df6806 tcp: Fix a data-race around sysctl_tcp_stdurg. 7f68bed16c7b tcp: Fix a data-race around sysctl_tcp_retrans_collapse. 369d99c2b89f tcp: Fix data-races around sysctl_tcp_slow_start_after_idle. 492f3713b282 tcp: Fix a data-race around sysctl_tcp_thin_linear_timeouts. 92c35113c633 tcp: Fix data-races around sysctl_tcp_recovery. 83767fe800a3 tcp: Fix a data-race around sysctl_tcp_early_retrans. 795aee11fda4 tcp: Fix data-races around sysctl knobs related to SYN option. f39b03bd727a udp: Fix a data-race around sysctl_udp_l3mdev_accept. 6727f39e99e0 ipv4: Fix a data-race around sysctl_fib_multipath_use_neigh. a8569f76df7e be2net: Fix buffer overflow in be_get_module_eeprom 91d6aa19dd72 gpio: pca953x: only use single read/write for No AI mode 031af9e617a6 ixgbe: Add locking to prevent panic when setting sriov_numvfs to zero 55a2a28b3285 i40e: Fix erroneous adapter reinitialization during recovery process d88d59faf4e6 iavf: Fix handling of dummy receive descriptors 25d53d858a6c tcp: Fix data-races around sysctl_tcp_fastopen. 78420d8e46df tcp: Fix data-races around sysctl_max_syn_backlog. dc58e68d1e26 tcp: Fix a data-race around sysctl_tcp_tw_reuse. e9362a993886 tcp: Fix a data-race around sysctl_tcp_notsent_lowat. b0d9f04c870e tcp: Fix data-races around some timeout sysctl knobs. ea309c467dac tcp: Fix data-races around sysctl_tcp_reordering. b222de2560ab tcp: Fix data-races around sysctl_tcp_syncookies. ff55c025e647 igmp: Fix a data-race around sysctl_igmp_max_memberships. 1656ecaddf90 igmp: Fix data-races around sysctl_igmp_llm_reports. 2aad2c5745ec net/tls: Fix race in TLS device down flow 573768dede0e net: stmmac: fix dma queue left shift overflow issue 911b81fca2d7 i2c: cadence: Change large transfer count reset logic to be unconditional 73a11588751a tcp: Fix a data-race around sysctl_tcp_probe_interval. b04817c94fbd tcp: Fix a data-race around sysctl_tcp_probe_threshold. 033963b22063 tcp: Fix a data-race around sysctl_tcp_mtu_probe_floor. fdb96b69f590 tcp: Fix data-races around sysctl_tcp_min_snd_mss. 30b73edc1d24 tcp: Fix data-races around sysctl_tcp_base_mss. f966773e13cd tcp: Fix data-races around sysctl_tcp_mtu_probing. a7386602a2fe tcp/dccp: Fix a data-race around sysctl_tcp_fwmark_accept. 25a635a67c83 ip: Fix a data-race around sysctl_fwmark_reflect. 281de3719986 ip: Fix data-races around sysctl_ip_nonlocal_bind. 7828309df0f8 ip: Fix data-races around sysctl_ip_fwd_use_pmtu. 5af6d9226376 ip: Fix data-races around sysctl_ip_no_pmtu_disc. 16cb6717f4f4 igc: Reinstate IGC_REMOVED logic and implement it properly 98c3c8fd0d4c perf/core: Fix data race between perf_event_set_output() and perf_mmap_close() 6194c021496a pinctrl: ralink: Check for null return of devm_kcalloc 78bdf732cf5d power/reset: arm-versatile: Fix refcount leak in versatile_reboot_probe f4248bdb7d5c xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup() c68f6e2e4fda serial: mvebu-uart: correctly report configured baudrate value 2230428fb866 PCI: hv: Fix interrupt mapping for multi-MSI 7121d7120fd4 PCI: hv: Reuse existing IRTE allocation in compose_msi_msg() 584c9d41800b PCI: hv: Fix hv_arch_irq_unmask() for multi-MSI 8e94cc883011 PCI: hv: Fix multi-MSI to allow more than one MSI vector 3048666143be xen/gntdev: Ignore failure to unmap INVALID_GRANT_HANDLE ed3fea55066b lockdown: Fix kexec lockdown bypass with ima policy c3856fe718ad mlxsw: spectrum_router: Fix IPv4 nexthop gateway indication c3dc75118445 riscv: add as-options for modules with assembly compontents e5a6b05d0c68 pinctrl: stm32: fix optional IRQ support to gpios 002c3bbb4713 Linux 5.4.207 08d90846e438 can: m_can: m_can_tx_handler(): fix use after free of skb 579c8a2e6361 serial: pl011: UPSTAT_AUTORTS requires .throttle/unthrottle 0c8649a49788 serial: stm32: Clear prev values before setting RTS delays f4c7f5028b48 serial: 8250: fix return error code in serial8250_request_std_resource() 07379bd79d86 tty: serial: samsung_tty: set dma burst_size to 1 edcb2612218d usb: dwc3: gadget: Fix event pending check 40034fe6b8a7 usb: typec: add missing uevent when partner support PD 42373b717a3f USB: serial: ftdi_sio: add Belimo device ids cbc98dcc38e2 signal handling: don't use BUG_ON() for debugging 172cd32ada70 ARM: dts: stm32: use the correct clock source for CEC on stm32mp151 c7d4b3ec6306 soc: ixp4xx/npe: Fix unused match warning a3c7c1a726a4 x86: Clear .brk area at early boot 549f70b29953 irqchip: or1k-pic: Undefine mask_ack for level triggered hardware b0f41db50084 ASoC: madera: Fix event generation for rate controls 79067a663247 ASoC: madera: Fix event generation for OUT1 demux 0e7e515a6733 ASoC: cs47l15: Fix event generation for low power mux control 20b921f22a8b ASoC: wm5110: Fix DRE control f298d2e4c60c ASoC: ops: Fix off by one in range control validation ede990cfc427 net: sfp: fix memory leak in sfp_probe() 555cee1bc40b nvme: fix regression when disconnect a recovering ctrl 08082a642aaa NFC: nxp-nci: don't print header length mismatch on i2c error 4919d82f7041 net: tipc: fix possible refcount leak in tipc_sk_create() 70d8aee1de6e platform/x86: hp-wmi: Ignore Sanitization Mode event 8dda30f81c75 cpufreq: pmac32-cpufreq: Fix refcount leak bug b749af1b8f11 netfilter: br_netfilter: do not skip all hooks with 0 priority 0c9203e75dae virtio_mmio: Restore guest page size on resume 569f1ee032c9 virtio_mmio: Add missing PM calls to freeze/restore 70433d9ea6ff mm: sysctl: fix missing numa_stat when !CONFIG_HUGETLB_PAGE da346adcf557 sfc: fix kernel panic when creating VF ba60ca0ed12e seg6: bpf: fix skb checksum in bpf_push_seg6_encap() de7849d9de1d seg6: fix skb checksum in SRv6 End.B6 and End.B6.Encaps behaviors 487f0f77f1cd seg6: fix skb checksum evaluation in SRH encapsulation/insertion bcad880865bf sfc: fix use after free when disabling sriov b8d77f2396d5 net: ftgmac100: Hold reference returned by of_get_child_by_name() 9b61d3f6df1b ipv4: Fix data-races around sysctl_ip_dynaddr. cc9540ba5b36 raw: Fix a data-race around sysctl_raw_l3mdev_accept. df691b991043 icmp: Fix a data-race around sysctl_icmp_ratemask. 8bc1f6871490 icmp: Fix a data-race around sysctl_icmp_ratelimit. 3093a6fe3170 drm/i915/gt: Serialize TLB invalidates with GT resets 40d58aad2f66 ARM: dts: sunxi: Fix SPI NOR campatible on Orange Pi Zero bf676c940865 ARM: dts: at91: sama5d2: Fix typo in i2s1 node 7c1acd98fb22 ipv4: Fix a data-race around sysctl_fib_sync_mem. 0cba7ca667ce icmp: Fix data-races around sysctl. 0e41a0f73ccb cipso: Fix data-races around sysctl. 861f1852af6d net: Fix data-races around sysctl_mem. 8d2daf565f61 inetpeer: Fix data-races around sysctl. 2968830c9b47 net: stmmac: dwc-qos: Disable split header for Tegra194 1273fd5153e8 ASoC: sgtl5000: Fix noise on shutdown/remove 388f3df7c3c8 ima: Fix a potential integer overflow in ima_appraise_measurement 72f231b9a88a drm/i915: fix a possible refcount leak in intel_dp_add_mst_connector() 0f02e7c02bb0 ARM: 9210/1: Mark the FDT_FIXED sections as shareable 41ea241fb3c2 ARM: 9209/1: Spectre-BHB: avoid pr_info() every time a CPU comes out of idle 851730a1989f ARM: dts: imx6qdl-ts7970: Fix ngpio typo and count 18881d7e5171 ext4: fix race condition between ext4_write and ext4_convert_inline_data 423f2695007d sched/rt: Disable RT_RUNTIME_SHARE by default 31e99fa969fd Revert "evm: Fix memleak in init_desc" d85d19f3b664 nilfs2: fix incorrect masking of permission flags for symlinks 393594aad551 drm/panfrost: Fix shrinker list corruption by madvise IOCTL ad44e05f3e01 cgroup: Use separate src/dst nodes when preloading css_sets for migration 444be5a02b77 wifi: mac80211: fix queue selection for mesh/OCB interfaces dba548476909 ARM: 9214/1: alignment: advance IT state after emulating Thumb instruction b4d99aa5ae90 ARM: 9213/1: Print message about disabled Spectre workarounds only once 2c1cc40fb2a1 ip: fix dflt addr selection for connected nexthop fb5a7f1548d6 net: sock: tracing: Fix sock_exceed_buf_limit not to dereference stale pointer ecc6dec12c33 tracing/histograms: Fix memory leak problem 7425479d20f9 xen/netback: avoid entering xenvif_rx_next_skb() with an empty rx queue 9026b280eb7f ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop bbb82d4d9b3d ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc221 7e2fbf2d9b61 ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc671 33d33a66e31c ALSA: hda/conexant: Apply quirk for another HP ProDesk 600 G3 model 5e7cc47ab923 ALSA: hda - Add fixup for Dell Latitidue E5430 658410791556 Linux 5.4.206 15a3adfe7593 Revert "mtd: rawnand: gpmi: Fix setting busy timeout setting" Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> --- .../linux/linux-yocto-rt_5.4.bb | 6 ++--- .../linux/linux-yocto-tiny_5.4.bb | 8 +++---- meta/recipes-kernel/linux/linux-yocto_5.4.bb | 22 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb b/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb index fe75aee4da..91cb68dc8d 100644 --- a/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb +++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb @@ -11,13 +11,13 @@ python () { raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") } -SRCREV_machine ?= "cc478e363cc35064b58a871a4cc535aa973c5891" -SRCREV_meta ?= "aaaf9f090dfb3160154b24fbc2f9a6e669babc87" +SRCREV_machine ?= "0bba5a75ccbb78703197b5c16499733079979425" +SRCREV_meta ?= "028688aaad2b64e353d771ba5505a8666cd01696" 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.4;destsuffix=${KMETA}" -LINUX_VERSION ?= "5.4.205" +LINUX_VERSION ?= "5.4.208" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb index 769743856f..e369770d4b 100644 --- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb @@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig" require recipes-kernel/linux/linux-yocto.inc -LINUX_VERSION ?= "5.4.205" +LINUX_VERSION ?= "5.4.208" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" @@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native" KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" -SRCREV_machine_qemuarm ?= "6a3e65256e24a2ff0e4e9fcd877987fb8afd12f2" -SRCREV_machine ?= "d730b865a7cb7ff89efcf8ac725ca247283f3eeb" -SRCREV_meta ?= "aaaf9f090dfb3160154b24fbc2f9a6e669babc87" +SRCREV_machine_qemuarm ?= "d38a6d65eb92e50dfd0152af4a79978d8df19c50" +SRCREV_machine ?= "550ae0d8908f5f7176b54afd6730b614c1a28ee8" +SRCREV_meta ?= "028688aaad2b64e353d771ba5505a8666cd01696" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/meta/recipes-kernel/linux/linux-yocto_5.4.bb b/meta/recipes-kernel/linux/linux-yocto_5.4.bb index 1043da7208..3b9481af4b 100644 --- a/meta/recipes-kernel/linux/linux-yocto_5.4.bb +++ b/meta/recipes-kernel/linux/linux-yocto_5.4.bb @@ -12,16 +12,16 @@ KBRANCH_qemux86 ?= "v5.4/standard/base" KBRANCH_qemux86-64 ?= "v5.4/standard/base" KBRANCH_qemumips64 ?= "v5.4/standard/mti-malta64" -SRCREV_machine_qemuarm ?= "943e7e1f32e61dc7dd7a7029062e789219d81b14" -SRCREV_machine_qemuarm64 ?= "24d18667d92b460ee33480942306a0d9c80c491b" -SRCREV_machine_qemumips ?= "2d469a0343033962ecea678491852aa9457b8ff6" -SRCREV_machine_qemuppc ?= "85932dee050f49fa824fd9b49af7b8159fe28a8e" -SRCREV_machine_qemuriscv64 ?= "8a59dfded81659402005acfb06fbb00b71c8ce86" -SRCREV_machine_qemux86 ?= "8a59dfded81659402005acfb06fbb00b71c8ce86" -SRCREV_machine_qemux86-64 ?= "8a59dfded81659402005acfb06fbb00b71c8ce86" -SRCREV_machine_qemumips64 ?= "0edbd472c7f0b51994d20d07bb26ead379dc10ed" -SRCREV_machine ?= "8a59dfded81659402005acfb06fbb00b71c8ce86" -SRCREV_meta ?= "aaaf9f090dfb3160154b24fbc2f9a6e669babc87" +SRCREV_machine_qemuarm ?= "a182bd07250f86a80f2eae38a404532f1dfc72e6" +SRCREV_machine_qemuarm64 ?= "e9742104ea2f0af13d5bffb7455759eb648bc615" +SRCREV_machine_qemumips ?= "28fb757496c273f1405ca7fea85ef5b94a5dd7be" +SRCREV_machine_qemuppc ?= "6ec7e0cd9f39bef1aa7c00be4fe91fedc96e64a4" +SRCREV_machine_qemuriscv64 ?= "2abc3740e7891a58015cbfa8f9283785cd498cad" +SRCREV_machine_qemux86 ?= "2abc3740e7891a58015cbfa8f9283785cd498cad" +SRCREV_machine_qemux86-64 ?= "2abc3740e7891a58015cbfa8f9283785cd498cad" +SRCREV_machine_qemumips64 ?= "df50d1958e0eac5cc60a2548e6bfa94e9bc91b9b" +SRCREV_machine ?= "2abc3740e7891a58015cbfa8f9283785cd498cad" +SRCREV_meta ?= "028688aaad2b64e353d771ba5505a8666cd01696" # remap qemuarm to qemuarma15 for the 5.4 kernel # KMACHINE_qemuarm ?= "qemuarma15" @@ -30,7 +30,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" -LINUX_VERSION ?= "5.4.205" +LINUX_VERSION ?= "5.4.208" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" DEPENDS += "openssl-native util-linux-native" -- 2.25.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [OE-core][dunfell 05/11] linux-yocto/5.4: update to v5.4.209 2022-08-10 22:31 [OE-core][dunfell 00/11] Patch review Steve Sakoman ` (3 preceding siblings ...) 2022-08-10 22:32 ` [OE-core][dunfell 04/11] linux-yocto/5.4: update to v5.4.208 Steve Sakoman @ 2022-08-10 22:32 ` Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 06/11] insane: Fix buildpaths test to work with special devices Steve Sakoman ` (5 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Steve Sakoman @ 2022-08-10 22:32 UTC (permalink / raw) To: openembedded-core From: Bruce Ashfield <bruce.ashfield@gmail.com> Updating to the latest korg -stable release that comprises the following commits: 8d8935e76f6f Linux 5.4.209 0b0088e47587 scsi: core: Fix race between handling STS_RESOURCE and completion 85fe8623f061 mt7601u: add USB device ID for some versions of XiaoDu WiFi Dongle. d5a596c148b3 ARM: crypto: comment out gcc warning that breaks clang builds 8d6dab81ee3d sctp: leave the err path free in sctp_stream_init to sctp_stream_free a49282eca8ab sfc: disable softirqs for ptp TX 7799f742f24b perf symbol: Correct address for bss symbols 388b3f14ff60 virtio-net: fix the race between refill work and close 52be29e8b645 netfilter: nf_queue: do not allow packet truncation below transport header offset 8e0ed463dbd5 sctp: fix sleep in atomic context bug in timer handlers bc135e464dee i40e: Fix interface init with MSI interrupts (no MSI-X) 46462e26e65f tcp: Fix a data-race around sysctl_tcp_comp_sack_nr. d42f68a9ceb4 tcp: Fix a data-race around sysctl_tcp_comp_sack_delay_ns. c2b57a4d3ff6 Documentation: fix sctp_wmem in ip-sysctl.rst 2d30375343b6 tcp: Fix a data-race around sysctl_tcp_invalid_ratelimit. 5d235c2fc295 tcp: Fix a data-race around sysctl_tcp_autocorking. e02c7ee5a430 tcp: Fix a data-race around sysctl_tcp_min_rtt_wlen. 558a2949608f tcp: Fix a data-race around sysctl_tcp_min_tso_segs. fb200869eabe net: sungem_phy: Add of_node_put() for reference returned by of_get_parent() e20dd1b0e0ea igmp: Fix data-races around sysctl_igmp_qrv. 73e5a0b59129 ipv6/addrconf: fix a null-ptr-deref bug for ip6_ptr 421e5dd1f12e net: ping6: Fix memleak in ipv6_renew_options(). 3d492b008b3d tcp: Fix a data-race around sysctl_tcp_challenge_ack_limit. dfdc635d55f9 tcp: Fix a data-race around sysctl_tcp_limit_output_bytes. d62e255ecc33 scsi: ufs: host: Hold reference returned by of_parse_phandle() b1343528c7ae ice: do not setup vlan for loopback VSI 15d019860159 ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS) cd23a2ad7b7c tcp: Fix a data-race around sysctl_tcp_nometrics_save. f9a03fd8ed31 tcp: Fix a data-race around sysctl_tcp_frto. 3be498bcf6ea tcp: Fix a data-race around sysctl_tcp_adv_win_scale. f4b83df01105 tcp: Fix a data-race around sysctl_tcp_app_win. f240d0cad26c tcp: Fix data-races around sysctl_tcp_dsack. b9f937d3d54d s390/archrandom: prevent CPACF trng invocations in interrupt context 911904c577e0 ntfs: fix use-after-free in ntfs_ucsncmp() 098e07ef0059 Bluetooth: L2CAP: Fix use-after-free caused by l2cap_chan_put Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> --- .../linux/linux-yocto-rt_5.4.bb | 4 ++-- .../linux/linux-yocto-tiny_5.4.bb | 6 +++--- meta/recipes-kernel/linux/linux-yocto_5.4.bb | 20 +++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb b/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb index 91cb68dc8d..8e8fbb5b12 100644 --- a/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb +++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb @@ -11,13 +11,13 @@ python () { raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") } -SRCREV_machine ?= "0bba5a75ccbb78703197b5c16499733079979425" +SRCREV_machine ?= "f6c9d6db383201a730e8d638995eae82acd4d8e7" SRCREV_meta ?= "028688aaad2b64e353d771ba5505a8666cd01696" 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.4;destsuffix=${KMETA}" -LINUX_VERSION ?= "5.4.208" +LINUX_VERSION ?= "5.4.209" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb index e369770d4b..cdccebeb1c 100644 --- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb @@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig" require recipes-kernel/linux/linux-yocto.inc -LINUX_VERSION ?= "5.4.208" +LINUX_VERSION ?= "5.4.209" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" @@ -15,8 +15,8 @@ DEPENDS += "openssl-native util-linux-native" KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" -SRCREV_machine_qemuarm ?= "d38a6d65eb92e50dfd0152af4a79978d8df19c50" -SRCREV_machine ?= "550ae0d8908f5f7176b54afd6730b614c1a28ee8" +SRCREV_machine_qemuarm ?= "8f087017ff03465fa8d318c06a7e4e072c533daf" +SRCREV_machine ?= "a4b7263158de8713dc85c5171aed99e3424a9f7c" SRCREV_meta ?= "028688aaad2b64e353d771ba5505a8666cd01696" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/meta/recipes-kernel/linux/linux-yocto_5.4.bb b/meta/recipes-kernel/linux/linux-yocto_5.4.bb index 3b9481af4b..0f597fc3d6 100644 --- a/meta/recipes-kernel/linux/linux-yocto_5.4.bb +++ b/meta/recipes-kernel/linux/linux-yocto_5.4.bb @@ -12,15 +12,15 @@ KBRANCH_qemux86 ?= "v5.4/standard/base" KBRANCH_qemux86-64 ?= "v5.4/standard/base" KBRANCH_qemumips64 ?= "v5.4/standard/mti-malta64" -SRCREV_machine_qemuarm ?= "a182bd07250f86a80f2eae38a404532f1dfc72e6" -SRCREV_machine_qemuarm64 ?= "e9742104ea2f0af13d5bffb7455759eb648bc615" -SRCREV_machine_qemumips ?= "28fb757496c273f1405ca7fea85ef5b94a5dd7be" -SRCREV_machine_qemuppc ?= "6ec7e0cd9f39bef1aa7c00be4fe91fedc96e64a4" -SRCREV_machine_qemuriscv64 ?= "2abc3740e7891a58015cbfa8f9283785cd498cad" -SRCREV_machine_qemux86 ?= "2abc3740e7891a58015cbfa8f9283785cd498cad" -SRCREV_machine_qemux86-64 ?= "2abc3740e7891a58015cbfa8f9283785cd498cad" -SRCREV_machine_qemumips64 ?= "df50d1958e0eac5cc60a2548e6bfa94e9bc91b9b" -SRCREV_machine ?= "2abc3740e7891a58015cbfa8f9283785cd498cad" +SRCREV_machine_qemuarm ?= "4fefb5a57ecb9bc5c6aab38319f773b02c894e6b" +SRCREV_machine_qemuarm64 ?= "407b5fa877ca8993a405542fa4c3d73584e8ea98" +SRCREV_machine_qemumips ?= "1bfe5d39c9f954f0ac2480115f4750f39500d4f4" +SRCREV_machine_qemuppc ?= "753def987b630ed41686223b5dc252436757e893" +SRCREV_machine_qemuriscv64 ?= "90d5f03a7c79ccd5c02e0579049d22cf2686da9b" +SRCREV_machine_qemux86 ?= "90d5f03a7c79ccd5c02e0579049d22cf2686da9b" +SRCREV_machine_qemux86-64 ?= "90d5f03a7c79ccd5c02e0579049d22cf2686da9b" +SRCREV_machine_qemumips64 ?= "b391bfc877fe8ae41e579ffd4bcd814b4ad438ea" +SRCREV_machine ?= "90d5f03a7c79ccd5c02e0579049d22cf2686da9b" SRCREV_meta ?= "028688aaad2b64e353d771ba5505a8666cd01696" # remap qemuarm to qemuarma15 for the 5.4 kernel @@ -30,7 +30,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" -LINUX_VERSION ?= "5.4.208" +LINUX_VERSION ?= "5.4.209" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" DEPENDS += "openssl-native util-linux-native" -- 2.25.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [OE-core][dunfell 06/11] insane: Fix buildpaths test to work with special devices 2022-08-10 22:31 [OE-core][dunfell 00/11] Patch review Steve Sakoman ` (4 preceding siblings ...) 2022-08-10 22:32 ` [OE-core][dunfell 05/11] linux-yocto/5.4: update to v5.4.209 Steve Sakoman @ 2022-08-10 22:32 ` Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 07/11] libmodule-build-perl: Use env utility to find perl interpreter Steve Sakoman ` (4 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Steve Sakoman @ 2022-08-10 22:32 UTC (permalink / raw) To: openembedded-core From: Richard Purdie <richard.purdie@linuxfoundation.org> If enabled, the buildpaths test hangs in psplash as it tries to open a fifo and read from it, hanging indefinitely. Tweak the test to ignore fifo/socket/device files. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2567edb7e0a8c5ca9a88d6940491bf33bfe0eff9) Signed-off-by: Steve Sakoman <steve@sakoman.com> --- meta/classes/insane.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 77a2039738..d6da53252f 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -452,12 +452,14 @@ def package_qa_check_buildpaths(path, name, d, elf, messages): """ Check for build paths inside target files and error if not found in the whitelist """ + import stat # Ignore .debug files, not interesting if path.find(".debug") != -1: return - # Ignore symlinks - if os.path.islink(path): + # Ignore symlinks/devs/fifos + mode = os.lstat(path).st_mode + if stat.S_ISLNK(mode) or stat.S_ISBLK(mode) or stat.S_ISFIFO(mode) or stat.S_ISCHR(mode) or stat.S_ISSOCK(mode): return tmpdir = bytes(d.getVar('TMPDIR'), encoding="utf-8") -- 2.25.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [OE-core][dunfell 07/11] libmodule-build-perl: Use env utility to find perl interpreter 2022-08-10 22:31 [OE-core][dunfell 00/11] Patch review Steve Sakoman ` (5 preceding siblings ...) 2022-08-10 22:32 ` [OE-core][dunfell 06/11] insane: Fix buildpaths test to work with special devices Steve Sakoman @ 2022-08-10 22:32 ` Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 08/11] openssh: Add openssh-sftp-server to openssh RDEPENDS Steve Sakoman ` (3 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Steve Sakoman @ 2022-08-10 22:32 UTC (permalink / raw) To: openembedded-core From: Khem Raj <raj.khem@gmail.com> Fixes ERROR: QA Issue: : /work/x86_64-linux/libmodule-build-perl-native/0.4231-r0/sysroot-destdir/work/x86_64-linux/libmodule-build-perl-native/0.4231-r0/recipe-sysroot-native/usr/bin/config_data maximum shebang size exceeded, the maximum size is 128. [shebang-size] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 54ecb2d3f2523293383103cbe590ebdd037ee483) Signed-off-by: Steve Sakoman <steve@sakoman.com> --- meta/recipes-devtools/perl/libmodule-build-perl_0.4231.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-devtools/perl/libmodule-build-perl_0.4231.bb b/meta/recipes-devtools/perl/libmodule-build-perl_0.4231.bb index a6fd7b1c07..c91b44cd6e 100644 --- a/meta/recipes-devtools/perl/libmodule-build-perl_0.4231.bb +++ b/meta/recipes-devtools/perl/libmodule-build-perl_0.4231.bb @@ -37,6 +37,7 @@ EXTRA_CPAN_BUILD_FLAGS = "--create_packlist=0" do_install_append () { rm -rf ${D}${docdir}/perl/html + sed -i "s:^#!.*:#!/usr/bin/env perl:" ${D}${bindir}/config_data } do_install_ptest() { -- 2.25.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [OE-core][dunfell 08/11] openssh: Add openssh-sftp-server to openssh RDEPENDS 2022-08-10 22:31 [OE-core][dunfell 00/11] Patch review Steve Sakoman ` (6 preceding siblings ...) 2022-08-10 22:32 ` [OE-core][dunfell 07/11] libmodule-build-perl: Use env utility to find perl interpreter Steve Sakoman @ 2022-08-10 22:32 ` Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 09/11] selftest: skip virgl test on fedora 36 Steve Sakoman ` (2 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Steve Sakoman @ 2022-08-10 22:32 UTC (permalink / raw) To: openembedded-core From: Alex Kiernan <alex.kiernan@gmail.com> OpenSSH 9.0 uses sftp by default as the transport for scp, add in sftp-server so that this works as expected for users, rather than being left with a confusing "scp: Connection closed" message. Signed-off-by: Alex Kiernan <alexk@zuma.ai> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit be61b9dac78f0d85c870a0d8304fb4b536ec4bc8) Signed-off-by: Steve Sakoman <steve@sakoman.com> --- meta/recipes-connectivity/openssh/openssh_8.2p1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-connectivity/openssh/openssh_8.2p1.bb b/meta/recipes-connectivity/openssh/openssh_8.2p1.bb index c529d1d060..79dba121ff 100644 --- a/meta/recipes-connectivity/openssh/openssh_8.2p1.bb +++ b/meta/recipes-connectivity/openssh/openssh_8.2p1.bb @@ -190,7 +190,7 @@ FILES_${PN}-sftp-server = "${libexecdir}/sftp-server" FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*" FILES_${PN}-keygen = "${bindir}/ssh-keygen" -RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen" +RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen ${PN}-sftp-server" RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}" RRECOMMENDS_${PN}-sshd_append_class-target = "\ ${@bb.utils.filter('PACKAGECONFIG', 'rng-tools', d)} \ -- 2.25.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [OE-core][dunfell 09/11] selftest: skip virgl test on fedora 36 2022-08-10 22:31 [OE-core][dunfell 00/11] Patch review Steve Sakoman ` (7 preceding siblings ...) 2022-08-10 22:32 ` [OE-core][dunfell 08/11] openssh: Add openssh-sftp-server to openssh RDEPENDS Steve Sakoman @ 2022-08-10 22:32 ` Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 10/11] libxml2: Port gentest.py to Python-3 Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 11/11] gstreamer1.0: use the correct meson option for the capabilities Steve Sakoman 10 siblings, 0 replies; 12+ messages in thread From: Steve Sakoman @ 2022-08-10 22:32 UTC (permalink / raw) To: openembedded-core This test will fail any time the host has libdrm > 2.4.107 Signed-off-by: Steve Sakoman <steve@sakoman.com> --- meta/lib/oeqa/selftest/cases/runtime_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index 3f78a18603..df11984713 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -187,6 +187,8 @@ class TestImage(OESelftestTestCase): self.skipTest('virgl isn\'t working with Fedora 34') if distro and distro == 'fedora-35': self.skipTest('virgl isn\'t working with Fedora 35') + if distro and distro == 'fedora-36': + self.skipTest('virgl isn\'t working with Fedora 36') if distro and distro == 'opensuseleap-15.0': self.skipTest('virgl isn\'t working with Opensuse 15.0') -- 2.25.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [OE-core][dunfell 10/11] libxml2: Port gentest.py to Python-3 2022-08-10 22:31 [OE-core][dunfell 00/11] Patch review Steve Sakoman ` (8 preceding siblings ...) 2022-08-10 22:32 ` [OE-core][dunfell 09/11] selftest: skip virgl test on fedora 36 Steve Sakoman @ 2022-08-10 22:32 ` Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 11/11] gstreamer1.0: use the correct meson option for the capabilities Steve Sakoman 10 siblings, 0 replies; 12+ messages in thread From: Steve Sakoman @ 2022-08-10 22:32 UTC (permalink / raw) To: openembedded-core From: Martin Jansa <martin.jansa@gmail.com> * but it still won't work well on hosts without libxml2, make sure to use pre-generated testapi.c in do_compile_ptest * this is reproducible with SOURCE_DATE_EPOCH set to 0 which e.g. meta-updater still sets by default for DISTROs which use it :(, see https://github.com/uptane/meta-updater/pull/35 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> --- .../0001-Port-gentest.py-to-Python-3.patch | 813 ++++++++++++++++++ meta/recipes-core/libxml/libxml2_2.9.10.bb | 11 + 2 files changed, 824 insertions(+) create mode 100644 meta/recipes-core/libxml/libxml2/0001-Port-gentest.py-to-Python-3.patch diff --git a/meta/recipes-core/libxml/libxml2/0001-Port-gentest.py-to-Python-3.patch b/meta/recipes-core/libxml/libxml2/0001-Port-gentest.py-to-Python-3.patch new file mode 100644 index 0000000000..b0d26d1c08 --- /dev/null +++ b/meta/recipes-core/libxml/libxml2/0001-Port-gentest.py-to-Python-3.patch @@ -0,0 +1,813 @@ +From b5125000917810731bc28055c0445d571121f80e Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer <wellnhofer@aevum.de> +Date: Thu, 21 Apr 2022 00:45:58 +0200 +Subject: [PATCH] Port gentest.py to Python 3 + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/343fc1421cdae097fa6c4cffeb1a065a40be6bbb] + +* fixes: + +make[1]: 'testReader' is up to date. + File "../libxml2-2.9.10/gentest.py", line 11 + print "libxml2 python bindings not available, skipping testapi.c generation" + ^ +SyntaxError: Missing parentheses in call to 'print'. Did you mean print("libxml2 python bindings not available, skipping testapi.c generation")? +make[1]: [Makefile:2078: testapi.c] Error 1 (ignored) + +... + +make[1]: 'testReader' is up to date. + File "../libxml2-2.9.10/gentest.py", line 271 + return 1 + ^ +TabError: inconsistent use of tabs and spaces in indentation +make[1]: [Makefile:2078: testapi.c] Error 1 (ignored) + +... + +aarch64-oe-linux-gcc: error: testapi.c: No such file or directory +aarch64-oe-linux-gcc: fatal error: no input files +compilation terminated. +make[1]: *** [Makefile:1275: testapi.o] Error 1 + +But there is still a bit mystery why it worked before, because check-am +calls gentest.py with $(PYTHON), so it ignores the shebang in the script +and libxml2 is using python3native (through python3targetconfig.bbclass) +so something like: + +libxml2/2.9.10-r0/recipe-sysroot-native/usr/bin/python3-native/python3 gentest.py + +But that still fails (now without SyntaxError) with: +libxml2 python bindings not available, skipping testapi.c generation + +because we don't have dependency on libxml2-native (to provide libxml2 +python bindings form python3native) and exported PYTHON_SITE_PACKAGES +might be useless (e.g. /usr/lib/python3.8/site-packages on Ubuntu-22.10 +which uses python 3.10 and there is no site-packages with libxml2) + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +--- + gentest.py | 421 ++++++++++++++++++++++++++--------------------------- + 1 file changed, 209 insertions(+), 212 deletions(-) + +diff --git a/gentest.py b/gentest.py +index b763300..0756706 100755 +--- a/gentest.py ++++ b/gentest.py +@@ -8,7 +8,7 @@ import string + try: + import libxml2 + except: +- print "libxml2 python bindings not available, skipping testapi.c generation" ++ print("libxml2 python bindings not available, skipping testapi.c generation") + sys.exit(0) + + if len(sys.argv) > 1: +@@ -227,7 +227,7 @@ extra_post_call = { + if (old != NULL) { + xmlUnlinkNode(old); + xmlFreeNode(old) ; old = NULL ; } +- ret_val = NULL;""", ++\t ret_val = NULL;""", + "xmlTextMerge": + """if ((first != NULL) && (first->type != XML_TEXT_NODE)) { + xmlUnlinkNode(second); +@@ -236,7 +236,7 @@ extra_post_call = { + """if ((ret_val != NULL) && (ret_val != ncname) && + (ret_val != prefix) && (ret_val != memory)) + xmlFree(ret_val); +- ret_val = NULL;""", ++\t ret_val = NULL;""", + "xmlNewDocElementContent": + """xmlFreeDocElementContent(doc, ret_val); ret_val = NULL;""", + "xmlDictReference": "xmlDictFree(dict);", +@@ -268,29 +268,29 @@ modules = [] + def is_skipped_module(name): + for mod in skipped_modules: + if mod == name: +- return 1 ++ return 1 + return 0 + + def is_skipped_function(name): + for fun in skipped_functions: + if fun == name: +- return 1 ++ return 1 + # Do not test destructors +- if string.find(name, 'Free') != -1: ++ if name.find('Free') != -1: + return 1 + return 0 + + def is_skipped_memcheck(name): + for fun in skipped_memcheck: + if fun == name: +- return 1 ++ return 1 + return 0 + + missing_types = {} + def add_missing_type(name, func): + try: + list = missing_types[name] +- list.append(func) ++ list.append(func) + except: + missing_types[name] = [func] + +@@ -310,7 +310,7 @@ def add_missing_functions(name, module): + missing_functions_nr = missing_functions_nr + 1 + try: + list = missing_functions[module] +- list.append(name) ++ list.append(name) + except: + missing_functions[module] = [name] + +@@ -319,45 +319,45 @@ def add_missing_functions(name, module): + # + + def type_convert(str, name, info, module, function, pos): +-# res = string.replace(str, " ", " ") +-# res = string.replace(str, " ", " ") +-# res = string.replace(str, " ", " ") +- res = string.replace(str, " *", "_ptr") +-# res = string.replace(str, "*", "_ptr") +- res = string.replace(res, " ", "_") ++# res = str.replace(" ", " ") ++# res = str.replace(" ", " ") ++# res = str.replace(" ", " ") ++ res = str.replace(" *", "_ptr") ++# res = str.replace("*", "_ptr") ++ res = res.replace(" ", "_") + if res == 'const_char_ptr': +- if string.find(name, "file") != -1 or \ +- string.find(name, "uri") != -1 or \ +- string.find(name, "URI") != -1 or \ +- string.find(info, "filename") != -1 or \ +- string.find(info, "URI") != -1 or \ +- string.find(info, "URL") != -1: +- if string.find(function, "Save") != -1 or \ +- string.find(function, "Create") != -1 or \ +- string.find(function, "Write") != -1 or \ +- string.find(function, "Fetch") != -1: +- return('fileoutput') +- return('filepath') ++ if name.find("file") != -1 or \ ++ name.find("uri") != -1 or \ ++ name.find("URI") != -1 or \ ++ info.find("filename") != -1 or \ ++ info.find("URI") != -1 or \ ++ info.find("URL") != -1: ++ if function.find("Save") != -1 or \ ++ function.find("Create") != -1 or \ ++ function.find("Write") != -1 or \ ++ function.find("Fetch") != -1: ++ return('fileoutput') ++ return('filepath') + if res == 'void_ptr': + if module == 'nanoftp' and name == 'ctx': +- return('xmlNanoFTPCtxtPtr') ++ return('xmlNanoFTPCtxtPtr') + if function == 'xmlNanoFTPNewCtxt' or \ +- function == 'xmlNanoFTPConnectTo' or \ +- function == 'xmlNanoFTPOpen': +- return('xmlNanoFTPCtxtPtr') ++ function == 'xmlNanoFTPConnectTo' or \ ++ function == 'xmlNanoFTPOpen': ++ return('xmlNanoFTPCtxtPtr') + if module == 'nanohttp' and name == 'ctx': +- return('xmlNanoHTTPCtxtPtr') +- if function == 'xmlNanoHTTPMethod' or \ +- function == 'xmlNanoHTTPMethodRedir' or \ +- function == 'xmlNanoHTTPOpen' or \ +- function == 'xmlNanoHTTPOpenRedir': +- return('xmlNanoHTTPCtxtPtr'); ++ return('xmlNanoHTTPCtxtPtr') ++ if function == 'xmlNanoHTTPMethod' or \ ++ function == 'xmlNanoHTTPMethodRedir' or \ ++ function == 'xmlNanoHTTPOpen' or \ ++ function == 'xmlNanoHTTPOpenRedir': ++ return('xmlNanoHTTPCtxtPtr'); + if function == 'xmlIOHTTPOpen': +- return('xmlNanoHTTPCtxtPtr') +- if string.find(name, "data") != -1: +- return('userdata') +- if string.find(name, "user") != -1: +- return('userdata') ++ return('xmlNanoHTTPCtxtPtr') ++ if name.find("data") != -1: ++ return('userdata') ++ if name.find("user") != -1: ++ return('userdata') + if res == 'xmlDoc_ptr': + res = 'xmlDocPtr' + if res == 'xmlNode_ptr': +@@ -366,18 +366,18 @@ def type_convert(str, name, info, module, function, pos): + res = 'xmlDictPtr' + if res == 'xmlNodePtr' and pos != 0: + if (function == 'xmlAddChild' and pos == 2) or \ +- (function == 'xmlAddChildList' and pos == 2) or \ ++ (function == 'xmlAddChildList' and pos == 2) or \ + (function == 'xmlAddNextSibling' and pos == 2) or \ + (function == 'xmlAddSibling' and pos == 2) or \ + (function == 'xmlDocSetRootElement' and pos == 2) or \ + (function == 'xmlReplaceNode' and pos == 2) or \ + (function == 'xmlTextMerge') or \ +- (function == 'xmlAddPrevSibling' and pos == 2): +- return('xmlNodePtr_in'); ++ (function == 'xmlAddPrevSibling' and pos == 2): ++ return('xmlNodePtr_in'); + if res == 'const xmlBufferPtr': + res = 'xmlBufferPtr' + if res == 'xmlChar_ptr' and name == 'name' and \ +- string.find(function, "EatName") != -1: ++ function.find("EatName") != -1: + return('eaten_name') + if res == 'void_ptr*': + res = 'void_ptr_ptr' +@@ -393,7 +393,7 @@ def type_convert(str, name, info, module, function, pos): + res = 'debug_FILE_ptr'; + if res == 'int' and name == 'options': + if module == 'parser' or module == 'xmlreader': +- res = 'parseroptions' ++ res = 'parseroptions' + + return res + +@@ -402,28 +402,28 @@ known_param_types = [] + def is_known_param_type(name): + for type in known_param_types: + if type == name: +- return 1 ++ return 1 + return name[-3:] == 'Ptr' or name[-4:] == '_ptr' + + def generate_param_type(name, rtype): + global test + for type in known_param_types: + if type == name: +- return ++ return + for type in generated_param_types: + if type == name: +- return ++ return + + if name[-3:] == 'Ptr' or name[-4:] == '_ptr': + if rtype[0:6] == 'const ': +- crtype = rtype[6:] +- else: +- crtype = rtype ++ crtype = rtype[6:] ++ else: ++ crtype = rtype + + define = 0 +- if modules_defines.has_key(module): +- test.write("#ifdef %s\n" % (modules_defines[module])) +- define = 1 ++ if module in modules_defines: ++ test.write("#ifdef %s\n" % (modules_defines[module])) ++ define = 1 + test.write(""" + #define gen_nb_%s 1 + static %s gen_%s(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { +@@ -433,7 +433,7 @@ static void des_%s(int no ATTRIBUTE_UNUSED, %s val ATTRIBUTE_UNUSED, int nr ATTR + } + """ % (name, crtype, name, name, rtype)) + if define == 1: +- test.write("#endif\n\n") ++ test.write("#endif\n\n") + add_generated_param_type(name) + + # +@@ -445,7 +445,7 @@ known_return_types = [] + def is_known_return_type(name): + for type in known_return_types: + if type == name: +- return 1 ++ return 1 + return 0 + + # +@@ -471,7 +471,7 @@ def compare_and_save(): + try: + os.system("rm testapi.c; mv testapi.c.new testapi.c") + except: +- os.system("mv testapi.c.new testapi.c") ++ os.system("mv testapi.c.new testapi.c") + print("Updated testapi.c") + else: + print("Generated testapi.c is identical") +@@ -481,17 +481,17 @@ while line != "": + if line == "/* CUT HERE: everything below that line is generated */\n": + break; + if line[0:15] == "#define gen_nb_": +- type = string.split(line[15:])[0] +- known_param_types.append(type) ++ type = line[15:].split()[0] ++ known_param_types.append(type) + if line[0:19] == "static void desret_": +- type = string.split(line[19:], '(')[0] +- known_return_types.append(type) ++ type = line[19:].split('(')[0] ++ known_return_types.append(type) + test.write(line) + line = input.readline() + input.close() + + if line == "": +- print "Could not find the CUT marker in testapi.c skipping generation" ++ print("Could not find the CUT marker in testapi.c skipping generation") + test.close() + sys.exit(0) + +@@ -505,7 +505,7 @@ test.write("/* CUT HERE: everything below that line is generated */\n") + # + doc = libxml2.readFile(srcPref + 'doc/libxml2-api.xml', None, 0) + if doc == None: +- print "Failed to load doc/libxml2-api.xml" ++ print("Failed to load doc/libxml2-api.xml") + sys.exit(1) + ctxt = doc.xpathNewContext() + +@@ -519,9 +519,9 @@ for arg in args: + mod = arg.xpathEval('string(../@file)') + func = arg.xpathEval('string(../@name)') + if (mod not in skipped_modules) and (func not in skipped_functions): +- type = arg.xpathEval('string(@type)') +- if not argtypes.has_key(type): +- argtypes[type] = func ++ type = arg.xpathEval('string(@type)') ++ if type not in argtypes: ++ argtypes[type] = func + + # similarly for return types + rettypes = {} +@@ -531,8 +531,8 @@ for ret in rets: + func = ret.xpathEval('string(../@name)') + if (mod not in skipped_modules) and (func not in skipped_functions): + type = ret.xpathEval('string(@type)') +- if not rettypes.has_key(type): +- rettypes[type] = func ++ if type not in rettypes: ++ rettypes[type] = func + + # + # Generate constructors and return type handling for all enums +@@ -549,49 +549,49 @@ for enum in enums: + continue; + define = 0 + +- if argtypes.has_key(name) and is_known_param_type(name) == 0: +- values = ctxt.xpathEval("/api/symbols/enum[@type='%s']" % name) +- i = 0 +- vals = [] +- for value in values: +- vname = value.xpathEval('string(@name)') +- if vname == None: +- continue; +- i = i + 1 +- if i >= 5: +- break; +- vals.append(vname) +- if vals == []: +- print "Didn't find any value for enum %s" % (name) +- continue +- if modules_defines.has_key(module): +- test.write("#ifdef %s\n" % (modules_defines[module])) +- define = 1 +- test.write("#define gen_nb_%s %d\n" % (name, len(vals))) +- test.write("""static %s gen_%s(int no, int nr ATTRIBUTE_UNUSED) {\n""" % +- (name, name)) +- i = 1 +- for value in vals: +- test.write(" if (no == %d) return(%s);\n" % (i, value)) +- i = i + 1 +- test.write(""" return(0); ++ if (name in argtypes) and is_known_param_type(name) == 0: ++ values = ctxt.xpathEval("/api/symbols/enum[@type='%s']" % name) ++ i = 0 ++ vals = [] ++ for value in values: ++ vname = value.xpathEval('string(@name)') ++ if vname == None: ++ continue; ++ i = i + 1 ++ if i >= 5: ++ break; ++ vals.append(vname) ++ if vals == []: ++ print("Didn't find any value for enum %s" % (name)) ++ continue ++ if module in modules_defines: ++ test.write("#ifdef %s\n" % (modules_defines[module])) ++ define = 1 ++ test.write("#define gen_nb_%s %d\n" % (name, len(vals))) ++ test.write("""static %s gen_%s(int no, int nr ATTRIBUTE_UNUSED) {\n""" % ++ (name, name)) ++ i = 1 ++ for value in vals: ++ test.write(" if (no == %d) return(%s);\n" % (i, value)) ++ i = i + 1 ++ test.write(""" return(0); + } + + static void des_%s(int no ATTRIBUTE_UNUSED, %s val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { + } + + """ % (name, name)); +- known_param_types.append(name) ++ known_param_types.append(name) + + if (is_known_return_type(name) == 0) and (name in rettypes): +- if define == 0 and modules_defines.has_key(module): +- test.write("#ifdef %s\n" % (modules_defines[module])) +- define = 1 ++ if define == 0 and (module in modules_defines): ++ test.write("#ifdef %s\n" % (modules_defines[module])) ++ define = 1 + test.write("""static void desret_%s(%s val ATTRIBUTE_UNUSED) { + } + + """ % (name, name)) +- known_return_types.append(name) ++ known_return_types.append(name) + if define == 1: + test.write("#endif\n\n") + +@@ -615,9 +615,9 @@ for file in headers: + # do not test deprecated APIs + # + desc = file.xpathEval('string(description)') +- if string.find(desc, 'DEPRECATED') != -1: +- print "Skipping deprecated interface %s" % name +- continue; ++ if desc.find('DEPRECATED') != -1: ++ print("Skipping deprecated interface %s" % name) ++ continue; + + test.write("#include <libxml/%s.h>\n" % name) + modules.append(name) +@@ -679,7 +679,7 @@ def generate_test(module, node): + # and store the informations for the generation + # + try: +- args = node.xpathEval("arg") ++ args = node.xpathEval("arg") + except: + args = [] + t_args = [] +@@ -687,37 +687,37 @@ def generate_test(module, node): + for arg in args: + n = n + 1 + rtype = arg.xpathEval("string(@type)") +- if rtype == 'void': +- break; +- info = arg.xpathEval("string(@info)") +- nam = arg.xpathEval("string(@name)") ++ if rtype == 'void': ++ break; ++ info = arg.xpathEval("string(@info)") ++ nam = arg.xpathEval("string(@name)") + type = type_convert(rtype, nam, info, module, name, n) +- if is_known_param_type(type) == 0: +- add_missing_type(type, name); +- no_gen = 1 ++ if is_known_param_type(type) == 0: ++ add_missing_type(type, name); ++ no_gen = 1 + if (type[-3:] == 'Ptr' or type[-4:] == '_ptr') and \ +- rtype[0:6] == 'const ': +- crtype = rtype[6:] +- else: +- crtype = rtype +- t_args.append((nam, type, rtype, crtype, info)) ++ rtype[0:6] == 'const ': ++ crtype = rtype[6:] ++ else: ++ crtype = rtype ++ t_args.append((nam, type, rtype, crtype, info)) + + try: +- rets = node.xpathEval("return") ++ rets = node.xpathEval("return") + except: + rets = [] + t_ret = None + for ret in rets: + rtype = ret.xpathEval("string(@type)") +- info = ret.xpathEval("string(@info)") ++ info = ret.xpathEval("string(@info)") + type = type_convert(rtype, 'return', info, module, name, 0) +- if rtype == 'void': +- break +- if is_known_return_type(type) == 0: +- add_missing_type(type, name); +- no_gen = 1 +- t_ret = (type, rtype, info) +- break ++ if rtype == 'void': ++ break ++ if is_known_return_type(type) == 0: ++ add_missing_type(type, name); ++ no_gen = 1 ++ t_ret = (type, rtype, info) ++ break + + if no_gen == 0: + for t_arg in t_args: +@@ -733,7 +733,7 @@ test_%s(void) { + + if no_gen == 1: + add_missing_functions(name, module) +- test.write(""" ++ test.write(""" + /* missing type support */ + return(test_ret); + } +@@ -742,22 +742,22 @@ test_%s(void) { + return + + try: +- conds = node.xpathEval("cond") +- for cond in conds: +- test.write("#if %s\n" % (cond.get_content())) +- nb_cond = nb_cond + 1 ++ conds = node.xpathEval("cond") ++ for cond in conds: ++ test.write("#if %s\n" % (cond.get_content())) ++ nb_cond = nb_cond + 1 + except: + pass + + define = 0 +- if function_defines.has_key(name): ++ if name in function_defines: + test.write("#ifdef %s\n" % (function_defines[name])) +- define = 1 ++ define = 1 + + # Declare the memory usage counter + no_mem = is_skipped_memcheck(name) + if no_mem == 0: +- test.write(" int mem_base;\n"); ++ test.write(" int mem_base;\n"); + + # Declare the return value + if t_ret != None: +@@ -766,29 +766,29 @@ test_%s(void) { + # Declare the arguments + for arg in t_args: + (nam, type, rtype, crtype, info) = arg; +- # add declaration +- test.write(" %s %s; /* %s */\n" % (crtype, nam, info)) +- test.write(" int n_%s;\n" % (nam)) ++ # add declaration ++ test.write(" %s %s; /* %s */\n" % (crtype, nam, info)) ++ test.write(" int n_%s;\n" % (nam)) + test.write("\n") + + # Cascade loop on of each argument list of values + for arg in t_args: + (nam, type, rtype, crtype, info) = arg; +- # +- test.write(" for (n_%s = 0;n_%s < gen_nb_%s;n_%s++) {\n" % ( +- nam, nam, type, nam)) ++ # ++ test.write(" for (n_%s = 0;n_%s < gen_nb_%s;n_%s++) {\n" % ( ++ nam, nam, type, nam)) + + # log the memory usage + if no_mem == 0: +- test.write(" mem_base = xmlMemBlocks();\n"); ++ test.write(" mem_base = xmlMemBlocks();\n"); + + # prepare the call + i = 0; + for arg in t_args: + (nam, type, rtype, crtype, info) = arg; +- # +- test.write(" %s = gen_%s(n_%s, %d);\n" % (nam, type, nam, i)) +- i = i + 1; ++ # ++ test.write(" %s = gen_%s(n_%s, %d);\n" % (nam, type, nam, i)) ++ i = i + 1; + + # add checks to avoid out-of-bounds array access + i = 0; +@@ -797,7 +797,7 @@ test_%s(void) { + # assume that "size", "len", and "start" parameters apply to either + # the nearest preceding or following char pointer + if type == "int" and (nam == "size" or nam == "len" or nam == "start"): +- for j in range(i - 1, -1, -1) + range(i + 1, len(t_args)): ++ for j in (*range(i - 1, -1, -1), *range(i + 1, len(t_args))): + (bnam, btype) = t_args[j][:2] + if btype == "const_char_ptr" or btype == "const_xmlChar_ptr": + test.write( +@@ -806,42 +806,42 @@ test_%s(void) { + " continue;\n" + % (bnam, nam, bnam)) + break +- i = i + 1; ++ i = i + 1; + + # do the call, and clanup the result +- if extra_pre_call.has_key(name): +- test.write(" %s\n"% (extra_pre_call[name])) ++ if name in extra_pre_call: ++ test.write(" %s\n"% (extra_pre_call[name])) + if t_ret != None: +- test.write("\n ret_val = %s(" % (name)) +- need = 0 +- for arg in t_args: +- (nam, type, rtype, crtype, info) = arg +- if need: +- test.write(", ") +- else: +- need = 1 +- if rtype != crtype: +- test.write("(%s)" % rtype) +- test.write("%s" % nam); +- test.write(");\n") +- if extra_post_call.has_key(name): +- test.write(" %s\n"% (extra_post_call[name])) +- test.write(" desret_%s(ret_val);\n" % t_ret[0]) ++ test.write("\n ret_val = %s(" % (name)) ++ need = 0 ++ for arg in t_args: ++ (nam, type, rtype, crtype, info) = arg ++ if need: ++ test.write(", ") ++ else: ++ need = 1 ++ if rtype != crtype: ++ test.write("(%s)" % rtype) ++ test.write("%s" % nam); ++ test.write(");\n") ++ if name in extra_post_call: ++ test.write(" %s\n"% (extra_post_call[name])) ++ test.write(" desret_%s(ret_val);\n" % t_ret[0]) + else: +- test.write("\n %s(" % (name)); +- need = 0; +- for arg in t_args: +- (nam, type, rtype, crtype, info) = arg; +- if need: +- test.write(", ") +- else: +- need = 1 +- if rtype != crtype: +- test.write("(%s)" % rtype) +- test.write("%s" % nam) +- test.write(");\n") +- if extra_post_call.has_key(name): +- test.write(" %s\n"% (extra_post_call[name])) ++ test.write("\n %s(" % (name)); ++ need = 0; ++ for arg in t_args: ++ (nam, type, rtype, crtype, info) = arg; ++ if need: ++ test.write(", ") ++ else: ++ need = 1 ++ if rtype != crtype: ++ test.write("(%s)" % rtype) ++ test.write("%s" % nam) ++ test.write(");\n") ++ if name in extra_post_call: ++ test.write(" %s\n"% (extra_post_call[name])) + + test.write(" call_tests++;\n"); + +@@ -849,32 +849,32 @@ test_%s(void) { + i = 0; + for arg in t_args: + (nam, type, rtype, crtype, info) = arg; +- # This is a hack to prevent generating a destructor for the +- # 'input' argument in xmlTextReaderSetup. There should be +- # a better, more generic way to do this! +- if string.find(info, 'destroy') == -1: +- test.write(" des_%s(n_%s, " % (type, nam)) +- if rtype != crtype: +- test.write("(%s)" % rtype) +- test.write("%s, %d);\n" % (nam, i)) +- i = i + 1; ++ # This is a hack to prevent generating a destructor for the ++ # 'input' argument in xmlTextReaderSetup. There should be ++ # a better, more generic way to do this! ++ if info.find('destroy') == -1: ++ test.write(" des_%s(n_%s, " % (type, nam)) ++ if rtype != crtype: ++ test.write("(%s)" % rtype) ++ test.write("%s, %d);\n" % (nam, i)) ++ i = i + 1; + + test.write(" xmlResetLastError();\n"); + # Check the memory usage + if no_mem == 0: +- test.write(""" if (mem_base != xmlMemBlocks()) { ++ test.write(""" if (mem_base != xmlMemBlocks()) { + printf("Leak of %%d blocks found in %s", +- xmlMemBlocks() - mem_base); +- test_ret++; ++\t xmlMemBlocks() - mem_base); ++\t test_ret++; + """ % (name)); +- for arg in t_args: +- (nam, type, rtype, crtype, info) = arg; +- test.write(""" printf(" %%d", n_%s);\n""" % (nam)) +- test.write(""" printf("\\n");\n""") +- test.write(" }\n") ++ for arg in t_args: ++ (nam, type, rtype, crtype, info) = arg; ++ test.write(""" printf(" %%d", n_%s);\n""" % (nam)) ++ test.write(""" printf("\\n");\n""") ++ test.write(" }\n") + + for arg in t_args: +- test.write(" }\n") ++ test.write(" }\n") + + test.write(" function_tests++;\n") + # +@@ -882,7 +882,7 @@ test_%s(void) { + # + while nb_cond > 0: + test.write("#endif\n") +- nb_cond = nb_cond -1 ++ nb_cond = nb_cond -1 + if define == 1: + test.write("#endif\n") + +@@ -900,10 +900,10 @@ test_%s(void) { + for module in modules: + # gather all the functions exported by that module + try: +- functions = ctxt.xpathEval("/api/symbols/function[@file='%s']" % (module)) ++ functions = ctxt.xpathEval("/api/symbols/function[@file='%s']" % (module)) + except: +- print "Failed to gather functions from module %s" % (module) +- continue; ++ print("Failed to gather functions from module %s" % (module)) ++ continue; + + # iterate over all functions in the module generating the test + i = 0 +@@ -923,14 +923,14 @@ test_%s(void) { + # iterate over all functions in the module generating the call + for function in functions: + name = function.xpathEval('string(@name)') +- if is_skipped_function(name): +- continue +- test.write(" test_ret += test_%s();\n" % (name)) ++ if is_skipped_function(name): ++ continue ++ test.write(" test_ret += test_%s();\n" % (name)) + + # footer + test.write(""" + if (test_ret != 0) +- printf("Module %s: %%d errors\\n", test_ret); ++\tprintf("Module %s: %%d errors\\n", test_ret); + return(test_ret); + } + """ % (module)) +@@ -948,7 +948,7 @@ test.write(""" return(0); + } + """); + +-print "Generated test for %d modules and %d functions" %(len(modules), nb_tests) ++print("Generated test for %d modules and %d functions" %(len(modules), nb_tests)) + + compare_and_save() + +@@ -960,11 +960,8 @@ for missing in missing_types.keys(): + n = len(missing_types[missing]) + missing_list.append((n, missing)) + +-def compare_missing(a, b): +- return b[0] - a[0] +- +-missing_list.sort(compare_missing) +-print "Missing support for %d functions and %d types see missing.lst" % (missing_functions_nr, len(missing_list)) ++missing_list.sort(key=lambda a: a[0]) ++print("Missing support for %d functions and %d types see missing.lst" % (missing_functions_nr, len(missing_list))) + lst = open("missing.lst", "w") + lst.write("Missing support for %d types" % (len(missing_list))) + lst.write("\n") +@@ -974,9 +971,9 @@ for miss in missing_list: + for n in missing_types[miss[1]]: + i = i + 1 + if i > 5: +- lst.write(" ...") +- break +- lst.write(" %s" % (n)) ++ lst.write(" ...") ++ break ++ lst.write(" %s" % (n)) + lst.write("\n") + lst.write("\n") + lst.write("\n") diff --git a/meta/recipes-core/libxml/libxml2_2.9.10.bb b/meta/recipes-core/libxml/libxml2_2.9.10.bb index b3ebf15751..d1c1f0884f 100644 --- a/meta/recipes-core/libxml/libxml2_2.9.10.bb +++ b/meta/recipes-core/libxml/libxml2_2.9.10.bb @@ -32,6 +32,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;subdir=${BP};name=te file://CVE-2022-23308-fix-regression.patch \ file://CVE-2022-29824-dependent.patch \ file://CVE-2022-29824.patch \ + file://0001-Port-gentest.py-to-Python-3.patch \ " SRC_URI[archive.sha256sum] = "593b7b751dd18c2d6abcd0c4bcb29efc203d0b4373a6df98e3a455ea74ae2813" @@ -89,6 +90,16 @@ do_configure_prepend () { } do_compile_ptest() { + # Make sure that testapi.c is newer than gentests.py, because + # with reproducible builds, they will both get e.g. Jan 1 1970 + # modification time from SOURCE_DATE_EPOCH and then check-am + # might try to rebuild_testapi, which will fail even with + # 0001-Port-gentest.py-to-Python-3.patch, because it needs + # libxml2 module (libxml2-native dependency and correctly + # set PYTHON_SITE_PACKAGES), it's easier to + # just rely on pre-generated testapi.c from the release + touch ${S}/testapi.c + oe_runmake check-am } -- 2.25.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [OE-core][dunfell 11/11] gstreamer1.0: use the correct meson option for the capabilities 2022-08-10 22:31 [OE-core][dunfell 00/11] Patch review Steve Sakoman ` (9 preceding siblings ...) 2022-08-10 22:32 ` [OE-core][dunfell 10/11] libxml2: Port gentest.py to Python-3 Steve Sakoman @ 2022-08-10 22:32 ` Steve Sakoman 10 siblings, 0 replies; 12+ messages in thread From: Steve Sakoman @ 2022-08-10 22:32 UTC (permalink / raw) To: openembedded-core From: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit baeab0f51ecc19fb85101c4bd472f0650231d0de) Signed-off-by: Steve Sakoman <steve@sakoman.com> --- meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.3.bb index 236d6034d6..966a904eef 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.3.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.3.bb @@ -41,7 +41,7 @@ PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils" PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion" PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled" -PACKAGECONFIG[setcap] = ",,libcap libcap-native" +PACKAGECONFIG[setcap] = "-Dptp-helper-permissions=capabilities,,libcap libcap-native" # TODO: put this in a gettext.bbclass patch def gettext_oemeson(d): -- 2.25.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-08-10 22:32 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-08-10 22:31 [OE-core][dunfell 00/11] Patch review Steve Sakoman 2022-08-10 22:31 ` [OE-core][dunfell 01/11] grub2: Fix several security issue of integer underflow Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 02/11] gdk-pixbuf: CVE-2021-46829 a heap-based buffer overflow Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 03/11] cve_check: skip remote patches that haven't been fetched when searching for CVE tags Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 04/11] linux-yocto/5.4: update to v5.4.208 Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 05/11] linux-yocto/5.4: update to v5.4.209 Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 06/11] insane: Fix buildpaths test to work with special devices Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 07/11] libmodule-build-perl: Use env utility to find perl interpreter Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 08/11] openssh: Add openssh-sftp-server to openssh RDEPENDS Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 09/11] selftest: skip virgl test on fedora 36 Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 10/11] libxml2: Port gentest.py to Python-3 Steve Sakoman 2022-08-10 22:32 ` [OE-core][dunfell 11/11] gstreamer1.0: use the correct meson option for the capabilities Steve Sakoman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).