Patch review
cover Patch review
Please review this set of changes for scarthgap and have comments back by end of day Thursday, October 17
Passed a-full on autobuilder:
https://valkyrie.yoctoproject.org/#/builders/29/builds/277
The following changes since commit 5ea3ba00532265165e0d30f6d2eed568f5b5867f:
meta-world-pkgdata: Inherit nopackages (2024-10-06 06:07:52 -0700)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/scarthgap-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/scarthgap-nut
Alexander Kanavin (1):
sysvinit: take release tarballs from github
Claus Stovgaard (1):
lib/oe/package-manager: skip processing installed-pkgs with empty
globs
Hitendra Prajapati (2):
cups: Backport fix for CVE-2024-47175
libarchive: fix CVE-2024-48957 & CVE-2024-48958
Jaeyoon Jung (1):
makedevs: Fix matching uid/gid
Jörg Sommer (2):
ptest-runner: Update 2.4.4 -> 2.4.5
runqemu: Fix detection of -serial parameter
Khem Raj (1):
libpcre2: Update base uri PhilipHazel -> PCRE2Project
Louis Rannou (1):
image_qa: fix error handling
Macpaul Lin (1):
linux-firmware: upgrade 20240312 -> 20240909
Paul Barker (1):
meta-ide-support: Mark recipe as MACHINE-specific
Paul Gerber (1):
uboot-sign: fix counters in do_uboot_assemble_fitimage
Peter Marko (1):
rust: ignore CVE-2024-43402
Purushottam Choudhary (1):
virglrenderer: Add patch to fix -int-conversion build issue
Richard Purdie (2):
license: Fix directory layout issues
libsdl2: Fix non-deterministic configure option for libsamplerate
Teresa Remmet (1):
recipes-bsp: usbutils: Fix usb-devices command using busybox
Yogita Urade (1):
ruby: upgrade 3.2.2 -> 3.3.5
meta/classes-global/license.bbclass | 10 +-
meta/classes-recipe/image.bbclass | 11 +-
meta/classes-recipe/uboot-sign.bbclass | 3 +-
meta/lib/oe/package_manager/__init__.py | 76 +++---
meta/lib/oe/utils.py | 2 +-
meta/lib/oeqa/selftest/cases/meta_ide.py | 4 +-
...devices-Fix-usb-devices-with-busybox.patch | 37 +++
meta/recipes-bsp/usbutils/usbutils_017.bb | 1 +
meta/recipes-core/meta/meta-ide-support.bb | 1 +
meta/recipes-core/sysvinit/sysvinit_3.04.bb | 5 +-
.../makedevs/makedevs/makedevs.c | 12 +-
...Alignof-to-define-ALIGN_OF-when-poss.patch | 52 ----
...e.in-do-not-write-host-cross-cc-item.patch | 32 ---
...Obey-LDFLAGS-for-the-link-of-libruby.patch | 25 --
...-Makefile.in-filter-out-f-prefix-map.patch | 42 ---
...eproducible-change-fixing-784225-too.patch | 26 +-
.../0006-Make-gemspecs-reproducible.patch | 18 +-
.../ruby/ruby/CVE-2023-36617_1.patch | 56 ----
.../ruby/ruby/CVE-2023-36617_2.patch | 52 ----
.../ruby/ruby/CVE-2024-27281.patch | 97 -------
.../ruby/ruby/CVE-2024-27282.patch | 28 --
.../ruby/ruby/remove_has_include_macros.patch | 35 ---
.../ruby/{ruby_3.2.2.bb => ruby_3.3.5.bb} | 13 +-
meta/recipes-devtools/rust/rust-source.inc | 1 +
meta/recipes-extended/cups/cups.inc | 5 +
.../cups/cups/CVE-2024-47175-1.patch | 73 +++++
.../cups/cups/CVE-2024-47175-2.patch | 151 +++++++++++
.../cups/cups/CVE-2024-47175-3.patch | 119 +++++++++
.../cups/cups/CVE-2024-47175-4.patch | 249 ++++++++++++++++++
.../cups/cups/CVE-2024-47175-5.patch | 40 +++
.../libarchive/CVE-2024-48957.patch | 36 +++
.../libarchive/CVE-2024-48958.patch | 40 +++
.../libarchive/libarchive_3.7.4.bb | 5 +-
.../libsdl2/libsdl2_2.30.1.bb | 1 +
...nversion-fatal-build-error-with-GCC-.patch | 41 +++
.../virglrenderer/virglrenderer_1.0.1.bb | 1 +
...20240312.bb => linux-firmware_20240909.bb} | 8 +-
.../recipes-support/libpcre/libpcre2_10.43.bb | 2 +-
...-runner_2.4.4.bb => ptest-runner_2.4.5.bb} | 2 +-
scripts/runqemu | 4 +-
40 files changed, 898 insertions(+), 518 deletions(-)
create mode 100755 meta/recipes-bsp/usbutils/usbutils/0001-usb-devices-Fix-usb-devices-with-busybox.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/0001-fiddle-Use-C11-_Alignof-to-define-ALIGN_OF-when-poss.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/0001-template-Makefile.in-do-not-write-host-cross-cc-item.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/0002-template-Makefile.in-filter-out-f-prefix-map.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2023-36617_1.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2023-36617_2.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-27281.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-27282.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch
rename meta/recipes-devtools/ruby/{ruby_3.2.2.bb => ruby_3.3.5.bb} (88%)
create mode 100644 meta/recipes-extended/cups/cups/CVE-2024-47175-1.patch
create mode 100644 meta/recipes-extended/cups/cups/CVE-2024-47175-2.patch
create mode 100644 meta/recipes-extended/cups/cups/CVE-2024-47175-3.patch
create mode 100644 meta/recipes-extended/cups/cups/CVE-2024-47175-4.patch
create mode 100644 meta/recipes-extended/cups/cups/CVE-2024-47175-5.patch
create mode 100644 meta/recipes-extended/libarchive/libarchive/CVE-2024-48957.patch
create mode 100644 meta/recipes-extended/libarchive/libarchive/CVE-2024-48958.patch
create mode 100644 meta/recipes-graphics/virglrenderer/virglrenderer/0001-vrend-Fix-int-conversion-fatal-build-error-with-GCC-.patch
rename meta/recipes-kernel/linux-firmware/{linux-firmware_20240312.bb => linux-firmware_20240909.bb} (99%)
rename meta/recipes-support/ptest-runner/{ptest-runner_2.4.4.bb => ptest-runner_2.4.5.bb} (95%)Signature · 1 line
2.34.1
PATCH 1/18 rust: ignore CVE-2024-43402
From: Peter Marko <[email protected]>
This CVE was created because fix for CVE-2024-24576 was incomplete. Ignore the new CVE in the same way as the old one.
See https://nvd.nist.gov/vuln/detail/CVE-2024-43402
--- meta/recipes-devtools/rust/rust-source.inc | 1 + 1 file changed, 1 insertion(+)
meta/recipes-devtools/rust/rust-source.inc +1 -0
@@ -22,3 +22,4 @@ UPSTREAM_CHECK_URI = "https://forge.rust-lang.org/infra/other-installation-metho UPSTREAM_CHECK_REGEX = "rustc-(?P<pver>\d+(\.\d+)+)-src" CVE_STATUS[CVE-2024-24576] = "not-applicable-platform: Issue only applies on Windows" +CVE_STATUS[CVE-2024-43402] = "not-applicable-platform: Issue only applies on Windows"
Signature · 1 line
2.34.1
PATCH 2/18 cups: Backport fix for CVE-2024-47175
In reply to Steve SakomanFrom: Hitendra Prajapati <[email protected]>
Upstream-Status: Backport from
https://github.com/OpenPrinting/cups/commit/9939a70b750edd9d05270060cc5cf62ca98cfbe5
&
https://github.com/OpenPrinting/cups/commit/04bb2af4521b56c1699a2c2431c56c05a7102e69
&
https://github.com/OpenPrinting/cups/commit/e0630cd18f76340d302000f2bf6516e99602b844
&
https://github.com/OpenPrinting/cups/commit/1e6ca5913eceee906038bc04cc7ccfbe2923bdfd
&
https://github.com/OpenPrinting/cups/commit/2abe1ba8a66864aa82cd9836b37e57103b8e1a3b
Reference: https://security-tracker.debian.org/tracker/CVE-2024-47175
--- meta/recipes-extended/cups/cups.inc | 5 + .../cups/cups/CVE-2024-47175-1.patch | 73 +++++ .../cups/cups/CVE-2024-47175-2.patch | 151 +++++++++++ .../cups/cups/CVE-2024-47175-3.patch | 119 +++++++++ .../cups/cups/CVE-2024-47175-4.patch | 249 ++++++++++++++++++ .../cups/cups/CVE-2024-47175-5.patch | 40 +++ 6 files changed, 637 insertions(+) create mode 100644 meta/recipes-extended/cups/cups/CVE-2024-47175-1.patch create mode 100644 meta/recipes-extended/cups/cups/CVE-2024-47175-2.patch create mode 100644 meta/recipes-extended/cups/cups/CVE-2024-47175-3.patch create mode 100644 meta/recipes-extended/cups/cups/CVE-2024-47175-4.patch create mode 100644 meta/recipes-extended/cups/cups/CVE-2024-47175-5.patch
meta/recipes-extended/cups/cups.inc +5 -0
@@ -15,6 +15,11 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/cups-${PV}-source.tar.gz \ file://0004-cups-fix-multilib-install-file-conflicts.patch \ file://volatiles.99_cups \ file://cups-volatiles.conf \ + file://CVE-2024-47175-1.patch \ + file://CVE-2024-47175-2.patch \ + file://CVE-2024-47175-3.patch \ + file://CVE-2024-47175-4.patch \ + file://CVE-2024-47175-5.patch \ " GITHUB_BASE_URI = "https://github.com/OpenPrinting/cups/releases"
meta/recipes-extended/cups/cups/CVE-2024-47175-1.patch new file +73 -0
73 lines not on this page · raw message
meta/recipes-extended/cups/cups/CVE-2024-47175-2.patch new file +151 -0
151 lines not on this page · raw message
meta/recipes-extended/cups/cups/CVE-2024-47175-3.patch new file +119 -0
119 lines not on this page · raw message
meta/recipes-extended/cups/cups/CVE-2024-47175-4.patch new file +249 -0
249 lines not on this page · raw message
meta/recipes-extended/cups/cups/CVE-2024-47175-5.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 2abe1ba8a66864aa82cd9836b37e57103b8e1a3b Mon Sep 17 00:00:00 2001 +From: Michael R Sweet <[email protected]> +Date: Mon, 23 Sep 2024 10:11:31 -0400 +Subject: [PATCH] Fix warnings for unused vars. + +Upstream-Status: Backport [https://github.com/OpenPrinting/cups/commit/2abe1ba8a66864aa82cd9836b37e57103b8e1a3b] +CVE: CVE-2024-47175 +Signed-off-by: Hitendra Prajapati <[email protected]> +--- + cups/ppd-cache.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c +index f425ac0..d2533b7 100644 +--- a/cups/ppd-cache.c ++++ b/cups/ppd-cache.c +@@ -3223,8 +3223,7 @@ _ppdCreateFromIPP2( + int have_qdraft = 0,/* Have draft quality? */ + have_qhigh = 0; /* Have high quality? */ + char msgid[256]; /* Message identifier (attr.value) */ +- const char *keyword, /* Keyword value */ +- *msgstr; /* Localized string */ ++ const char *keyword; /* Keyword value */ + cups_array_t *strings = NULL;/* Printer strings file */ + struct lconv *loc = localeconv(); + /* Locale data */ +@@ -5010,9 +5009,8 @@ _ppdCreateFromIPP2( + { + ipp_t *preset = ippGetCollection(attr, i); + /* Preset collection */ +- const char *preset_name = ippGetString(ippFindAttribute(preset, "preset-name", IPP_TAG_ZERO), 0, NULL), ++ const char *preset_name = ippGetString(ippFindAttribute(preset, "preset-name", IPP_TAG_ZERO), 0, NULL); + /* Preset name */ +- *localized_name; /* Localized preset name */ + ipp_attribute_t *member; /* Member attribute in preset */ + const char *member_name; /* Member attribute name */ + char member_value[256]; /* Member attribute value */ +-- +2.25.1 +
Signature · 1 line
2.34.1
PATCH 3/18 libarchive: fix CVE-2024-48957 & CVE-2024-48958
In reply to Steve SakomanFrom: Hitendra Prajapati <[email protected]>
Backport fixes for:
* CVE-2024-48957 - Upstream-Status: Backport from https://github.com/libarchive/libarchive/commit/3006bc5d02ad3ae3c4f9274f60c1f9d2d834734b
* CVE-2024-48958 - Upstream-Status: Backport from https://github.com/libarchive/libarchive/commit/a1cb648d52f5b6d3f31184d9b6a7cbca628459b7
--- .../libarchive/CVE-2024-48957.patch | 36 +++++++++++++++++ .../libarchive/CVE-2024-48958.patch | 40 +++++++++++++++++++ .../libarchive/libarchive_3.7.4.bb | 5 ++- 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/libarchive/libarchive/CVE-2024-48957.patch create mode 100644 meta/recipes-extended/libarchive/libarchive/CVE-2024-48958.patch
meta/recipes-extended/libarchive/libarchive/CVE-2024-48957.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 3006bc5d02ad3ae3c4f9274f60c1f9d2d834734b Mon Sep 17 00:00:00 2001 +From: Wei-Cheng Pan <[email protected]> +Date: Mon, 29 Apr 2024 06:53:19 +0900 +Subject: [PATCH] fix: OOB in rar audio filter (#2149) + +This patch ensures that `src` won't move ahead of `dst`, so `src` will +not OOB. Similar situation like in a1cb648. + +Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/3006bc5d02ad3ae3c4f9274f60c1f9d2d834734b] +CVE: CVE-2024-48957 +Signed-off-by: Hitendra Prajapati <[email protected]> +--- + libarchive/archive_read_support_format_rar.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c +index 79669a8..95a91dc 100644 +--- a/libarchive/archive_read_support_format_rar.c ++++ b/libarchive/archive_read_support_format_rar.c +@@ -3714,6 +3714,13 @@ execute_filter_audio(struct rar_filter *filter, struct rar_virtual_machine *vm) + memset(&state, 0, sizeof(state)); + for (j = i; j < length; j += numchannels) + { ++ /* ++ * The src block should not overlap with the dst block. ++ * If so it would be better to consider this archive is broken. ++ */ ++ if (src >= dst) ++ return 0; ++ + int8_t delta = (int8_t)*src++; + uint8_t predbyte, byte; + int prederror; +-- +2.25.1 +
meta/recipes-extended/libarchive/libarchive/CVE-2024-48958.patch new file +40 -0
@@ -0,0 +1,40 @@ +From a1cb648d52f5b6d3f31184d9b6a7cbca628459b7 Mon Sep 17 00:00:00 2001 +From: Wei-Cheng Pan <[email protected]> +Date: Mon, 29 Apr 2024 06:50:22 +0900 +Subject: [PATCH] fix: OOB in rar delta filter (#2148) + +Ensure that `src` won't move ahead of `dst`, so `src` will not OOB. +Since `dst` won't move in this function, and we are only increasing `src` +position, this check should be enough. It should be safe to early return +because this function does not allocate resources. + +Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/a1cb648d52f5b6d3f31184d9b6a7cbca628459b7] +CVE: CVE-2024-48958 +Signed-off-by: Hitendra Prajapati <[email protected]> +--- + libarchive/archive_read_support_format_rar.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c +index 95a91dc..4fc6626 100644 +--- a/libarchive/archive_read_support_format_rar.c ++++ b/libarchive/archive_read_support_format_rar.c +@@ -3612,7 +3612,15 @@ execute_filter_delta(struct rar_filter *filter, struct rar_virtual_machine *vm) + { + uint8_t lastbyte = 0; + for (idx = i; idx < length; idx += numchannels) ++ { ++ /* ++ * The src block should not overlap with the dst block. ++ * If so it would be better to consider this archive is broken. ++ */ ++ if (src >= dst) ++ return 0; + lastbyte = dst[idx] = lastbyte - *src++; ++ } + } + + filter->filteredblockaddress = length; +-- +2.25.1 +
meta/recipes-extended/libarchive/libarchive_3.7.4.bb +4 -1
@@ -30,7 +30,10 @@ PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd," EXTRA_OECONF += "--enable-largefile --without-iconv" SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz" -SRC_URI += "file://configurehack.patch" +SRC_URI += "file://configurehack.patch \ + file://CVE-2024-48957.patch \ + file://CVE-2024-48958.patch \ + " UPSTREAM_CHECK_URI = "http://libarchive.org/" SRC_URI[sha256sum] = "7875d49596286055b52439ed42f044bd8ad426aa4cc5aabd96bfe7abb971d5e8"
Signature · 1 line
2.34.1
PATCH 4/18 linux-firmware: upgrade 20240312 -> 20240909
In reply to Steve SakomanFrom: Macpaul Lin <[email protected]>
License-Update: additional files
---
...ux-firmware_20240312.bb => linux-firmware_20240909.bb} | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
rename meta/recipes-kernel/linux-firmware/{linux-firmware_20240312.bb => linux-firmware_20240909.bb} (99%)meta/recipes-kernel/linux-firmware/linux-firmware_20240909.bb renamed from meta/recipes-kernel/linux-firmware/linux-firmware_20240312.bb +4 -4
@@ -82,7 +82,7 @@ LICENSE = "\ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \ file://LICENCE.adsp_sst;md5=615c45b91a5a4a9fe046d6ab9a2df728 \ file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \ - file://LICENSE.amdgpu;md5=a2589a05ea5b6bd2b7f4f623c7e7a649 \ + file://LICENSE.amdgpu;md5=1433dfea38c97a2e563a248a863dcb94 \ file://LICENSE.amd-ucode;md5=6ca90c57f7b248de1e25c7f68ffc4698 \ file://LICENSE.amlogic_vdec;md5=dc44f59bf64a81643e500ad3f39a468a \ file://LICENSE.amphion_vpu;md5=2bcdc00527b2d0542bd92b52aaec2b60 \
@@ -142,7 +142,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \ file://LICENCE.rtlwifi_firmware.txt;md5=00d06cfd3eddd5a2698948ead2ad54a5 \ file://LICENSE.sdma_firmware;md5=51e8c19ecc2270f4b8ea30341ad63ce9 \ file://LICENCE.siano;md5=4556c1bf830067f12ca151ad953ec2a5 \ - file://LICENCE.ti-connectivity;md5=c5e02be633f1499c109d1652514d85ec \ + file://LICENCE.ti-connectivity;md5=3b1e9cf54aba8146dad4b735777d406f \ file://LICENCE.ti-keystone;md5=3a86335d32864b0bef996bee26cc0f2c \ file://LICENCE.ueagle-atm4-firmware;md5=4ed7ea6b507ccc583b9d594417714118 \ file://LICENCE.via_vt6656;md5=e4159694cba42d4377a912e78a6e850f \
@@ -154,7 +154,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \ " # WHENCE checksum is defined separately to ease overriding it if # class-devupstream is selected. -WHENCE_CHKSUM = "514da1cd8b363373030f0c16749feb8d" +WHENCE_CHKSUM = "6ae5ffd807c84809977286ad0b37acdb" # These are not common licenses, set NO_GENERIC_LICENSE for them # so that the license files will be copied from fetched source
@@ -241,7 +241,7 @@ SRC_URI:class-devupstream = "git://git.kernel.org/pub/scm/linux/kernel/git/firmw # Pin this to the 20220509 release, override this in local.conf SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae" -SRC_URI[sha256sum] = "b2327a54ad1897c828008caf63af5ee15469ba723a5016be58f2b44f07bd4b94" +SRC_URI[sha256sum] = "943fbd19883cf8eadf89e0b22422549db056557b1ecd30a56400615971369671" inherit allarch
Signature · 1 line
2.34.1
PATCH 5/18 ruby: upgrade 3.2.2 -> 3.3.5
In reply to Steve SakomanFrom: Yogita Urade <[email protected]>
Includes fix for CVE-2024-41123 & CVE-2024-41946
Release notes:
https://github.com/ruby/ruby/releases/tag/v3_3_5
Rebase:
0005-Mark-Gemspec-reproducible-change-fixing-784225-too.patch 0006-Make-gemspecs-reproducible.patch
Drop:
0001-fiddle-Use-C11-_Alignof-to-define-ALIGN_OF-when-poss.patch 0002-Obey-LDFLAGS-for-the-link-of-libruby.patch CVE-2023-36617_1.patch
CVE-2023-36617_2.patch
CVE-2024-27281.patch
CVE-2024-27282.patch
(merged upstream)
0001-template-Makefile.in-do-not-write-host-cross-cc-item.patch 0002-template-Makefile.in-filter-out-f-prefix-map.patch remove_has_include_macros.patch
(code rewritten upstream)
License-Update: Updated LEGAL section
---
...Alignof-to-define-ALIGN_OF-when-poss.patch | 52 ----------
...e.in-do-not-write-host-cross-cc-item.patch | 32 ------
...Obey-LDFLAGS-for-the-link-of-libruby.patch | 25 -----
...-Makefile.in-filter-out-f-prefix-map.patch | 42 --------
...eproducible-change-fixing-784225-too.patch | 26 ++---
.../0006-Make-gemspecs-reproducible.patch | 18 ++--
.../ruby/ruby/CVE-2023-36617_1.patch | 56 -----------
.../ruby/ruby/CVE-2023-36617_2.patch | 52 ----------
.../ruby/ruby/CVE-2024-27281.patch | 97 -------------------
.../ruby/ruby/CVE-2024-27282.patch | 28 ------
.../ruby/ruby/remove_has_include_macros.patch | 35 -------
.../ruby/{ruby_3.2.2.bb => ruby_3.3.5.bb} | 13 +--
12 files changed, 25 insertions(+), 451 deletions(-)
delete mode 100644 meta/recipes-devtools/ruby/ruby/0001-fiddle-Use-C11-_Alignof-to-define-ALIGN_OF-when-poss.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/0001-template-Makefile.in-do-not-write-host-cross-cc-item.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/0002-template-Makefile.in-filter-out-f-prefix-map.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2023-36617_1.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2023-36617_2.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-27281.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-27282.patch
delete mode 100644 meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch
rename meta/recipes-devtools/ruby/{ruby_3.2.2.bb => ruby_3.3.5.bb} (88%)meta/recipes-devtools/ruby/ruby/0001-fiddle-Use-C11-_Alignof-to-define-ALIGN_OF-when-poss.patch deleted +0 -52
@@ -1,52 +0,0 @@ -From 6b3c202b46b9312c5bb0789145f13d8086e70948 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sun, 15 Jan 2023 02:34:17 -0800 -Subject: [PATCH] fiddle: Use C11 _Alignof to define ALIGN_OF when possible - -WG14 N2350 made very clear that it is an UB having type definitions -within "offsetof" [1]. This patch enhances the implementation of macro -ALIGN_OF to use builtin "_Alignof" to avoid undefined behavior -when using std=c11 or newer - -clang 16+ has started to flag this [2] - -Fixes build when using -std >= gnu11 and using clang16+ - -Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it -may support C11, exclude those compiler versions - -[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm -[2] https://reviews.llvm.org/D133574 - -Upstream-Status: Submitted [https://github.com/ruby/fiddle/pull/120] -Signed-off-by: Khem Raj <[email protected]> ---- - ext/fiddle/fiddle.h | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/ext/fiddle/fiddle.h b/ext/fiddle/fiddle.h -index 10eb9ce..ffb395e 100644 ---- a/ext/fiddle/fiddle.h -+++ b/ext/fiddle/fiddle.h -@@ -196,7 +196,17 @@ - #endif - #define TYPE_UINTPTR_T (-TYPE_INTPTR_T) - --#define ALIGN_OF(type) offsetof(struct {char align_c; type align_x;}, align_x) -+/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 -+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. -+ clang versions < 8.0.0 have the same bug. */ -+#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ -+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ -+ && !defined __clang__) \ -+ || (defined __clang__ && __clang_major__ < 8)) -+# define ALIGN_OF(type) offsetof(struct {char align_c; type align_x;}, align_x) -+#else -+# define ALIGN_OF(type) _Alignof(type) -+#endif - - #define ALIGN_VOIDP ALIGN_OF(void*) - #define ALIGN_CHAR ALIGN_OF(char) --- -2.39.0 -
meta/recipes-devtools/ruby/ruby/0001-template-Makefile.in-do-not-write-host-cross-cc-item.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From 2368d07660a93a2c41d63f3ab6054ca4daeef820 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Tue, 17 Nov 2020 18:31:40 +0000 -Subject: [PATCH] template/Makefile.in: do not write host cross-cc items into - target config - -This helps reproducibility. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - template/Makefile.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/template/Makefile.in b/template/Makefile.in -index 10dc826..940ee07 100644 ---- a/template/Makefile.in -+++ b/template/Makefile.in -@@ -657,11 +657,11 @@ mjit_config.h: - echo '#endif'; \ - quote MJIT_MIN_HEADER_NAME "$(MJIT_MIN_HEADER_NAME)"; \ - sep=,; \ -- quote "MJIT_CC_COMMON " $(MJIT_CC); \ -+ quote "MJIT_CC_COMMON " ; \ - quote "MJIT_CFLAGS MJIT_ARCHFLAG" $(MJIT_CFLAGS); \ - quote "MJIT_OPTFLAGS " $(MJIT_OPTFLAGS); \ - quote "MJIT_DEBUGFLAGS " $(MJIT_DEBUGFLAGS); \ -- quote "MJIT_LDSHARED " $(MJIT_LDSHARED); \ -+ quote "MJIT_LDSHARED " ; \ - quote "MJIT_DLDFLAGS MJIT_ARCHFLAG" $(MJIT_DLDFLAGS); \ - quote "MJIT_LIBS " $(LIBRUBYARG_SHARED); \ - quote 'PRELOADENV "@PRELOADENV@"'; \
meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch deleted +0 -25
@@ -1,25 +0,0 @@ -From 21d8e7700fa0a9c4bf569dd366134060ae858832 Mon Sep 17 00:00:00 2001 -From: Christopher Larson <[email protected]> -Date: Thu, 5 May 2016 10:59:07 -0700 -Subject: [PATCH] Obey LDFLAGS for the link of libruby - -Signed-off-by: Christopher Larson <[email protected]> -Upstream-Status: Pending - ---- - template/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/template/Makefile.in b/template/Makefile.in -index 1456313..15b98a4 100644 ---- a/template/Makefile.in -+++ b/template/Makefile.in -@@ -127,7 +127,7 @@ ENABLE_SHARED = @ENABLE_SHARED@ - LDSHARED = @LIBRUBY_LDSHARED@ - DLDSHARED = @DLDSHARED@ - XDLDFLAGS = @DLDFLAGS@ --DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG) -+DLDFLAGS = @LIBRUBY_DLDFLAGS@ @LDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG) - SOLIBS = @SOLIBS@ - ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@ - MAINLIBS = $(YJIT_LIBS) @MAINLIBS@
meta/recipes-devtools/ruby/ruby/0002-template-Makefile.in-filter-out-f-prefix-map.patch deleted +0 -42
42 lines not on this page · raw message
meta/recipes-devtools/ruby/ruby/0005-Mark-Gemspec-reproducible-change-fixing-784225-too.patch +13 -13
@@ -12,20 +12,20 @@ Upstream-Status: Backport [debian] 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index 0d72cee..eb7bc25 100644 +index d6eac7f..4b2e95e 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -1691,7 +1691,9 @@ class Gem::Specification < Gem::BasicSpecification - raise(Gem::InvalidSpecificationException, - "invalid date format in specification: #{date.inspect}") - end -- when Time, DateLike then -+ when Time then -+ Time.utc(date.utc.year, date.utc.month, date.utc.day) -+ when DateLike then - Time.utc(date.year, date.month, date.day) - else - TODAY +@@ -1707,7 +1707,9 @@ class Gem::Specification < Gem::BasicSpecification + raise(Gem::InvalidSpecificationException, + "invalid date format in specification: #{date.inspect}") + end +- when Time, DateLike then ++ when Time then ++ Time.utc(date.utc.year, date.utc.month, date.utc.day) ++ when DateLike then + Time.utc(date.year, date.month, date.day) + else + TODAY -- -2.25.1 +2.40.0
meta/recipes-devtools/ruby/ruby/0006-Make-gemspecs-reproducible.patch +10 -8
@@ -7,7 +7,6 @@ Without an explicit date, they will get the current date and make the build unreproducible Upstream-Status: Backport [debian] - --- ext/bigdecimal/bigdecimal.gemspec | 1 + ext/fiddle/fiddle.gemspec | 1 +
@@ -17,12 +16,12 @@ Upstream-Status: Backport [debian] 5 files changed, 5 insertions(+) diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec -index d215757..5148d56 100644 +index f9f3b45..b9a469d 100644 --- a/ext/bigdecimal/bigdecimal.gemspec +++ b/ext/bigdecimal/bigdecimal.gemspec -@@ -4,6 +4,7 @@ Gem::Specification.new do |s| - s.name = "bigdecimal" - s.version = "3.1.3" +@@ -14,6 +14,7 @@ Gem::Specification.new do |s| + s.name = name + s.version = source_version s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"] + s.date = RUBY_RELEASE_DATE s.email = ["[email protected]"]
@@ -41,10 +40,10 @@ index 8781093..efdca32 100644 spec.email = ["[email protected]", "[email protected]"] diff --git a/ext/io/console/io-console.gemspec b/ext/io/console/io-console.gemspec -index d26a757..cc88c55 100644 +index d4f5276..8f89611 100644 --- a/ext/io/console/io-console.gemspec +++ b/ext/io/console/io-console.gemspec -@@ -4,6 +4,7 @@ _VERSION = "0.6.0" +@@ -4,6 +4,7 @@ _VERSION = "0.7.1" Gem::Specification.new do |s| s.name = "io-console" s.version = _VERSION
@@ -65,7 +64,7 @@ index 1f4798e..48743cf 100644 spec.email = ["[email protected]", "[email protected]"] diff --git a/lib/rdoc/rdoc.gemspec b/lib/rdoc/rdoc.gemspec -index 3c96f7d..fec0872 100644 +index 93a281c..cc5c155 100644 --- a/lib/rdoc/rdoc.gemspec +++ b/lib/rdoc/rdoc.gemspec @@ -7,6 +7,7 @@ end
@@ -76,3 +75,6 @@ index 3c96f7d..fec0872 100644 s.version = RDoc::VERSION s.authors = [ +-- +2.40.0 +
meta/recipes-devtools/ruby/ruby/CVE-2023-36617_1.patch deleted +0 -56
56 lines not on this page · raw message
meta/recipes-devtools/ruby/ruby/CVE-2023-36617_2.patch deleted +0 -52
52 lines not on this page · raw message
meta/recipes-devtools/ruby/ruby/CVE-2024-27281.patch deleted +0 -97
97 lines not on this page · raw message
meta/recipes-devtools/ruby/ruby/CVE-2024-27282.patch deleted +0 -28
@@ -1,28 +0,0 @@ -From 989a2355808a63fc45367785c82ffd46d18c900a Mon Sep 17 00:00:00 2001 -From: Hiroshi SHIBATA <[email protected]> -Date: Fri, 12 Apr 2024 15:01:47 +1000 -Subject: [PATCH] Fix Use-After-Free issue for Regexp - -Co-authored-by: Isaac Peka <[email protected]> - -Upstream-Status: Backport [https://github.com/ruby/ruby/commit/989a2355808a63fc45367785c82ffd46d18c900a] -CVE: CVE-2024-27282 -Signed-off-by: Ashish Sharma <[email protected]> - - regexec.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/regexec.c b/regexec.c -index 73694ab14a0b0a..140691ad42489f 100644 ---- a/regexec.c -+++ b/regexec.c -@@ -3449,8 +3449,8 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, - CASE(OP_MEMORY_END_PUSH_REC) MOP_IN(OP_MEMORY_END_PUSH_REC); - GET_MEMNUM_INC(mem, p); - STACK_GET_MEM_START(mem, stkp); /* should be before push mem-end. */ -- STACK_PUSH_MEM_END(mem, s); - mem_start_stk[mem] = GET_STACK_INDEX(stkp); -+ STACK_PUSH_MEM_END(mem, s); - MOP_OUT; - JUMP; -
meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch deleted +0 -35
@@ -1,35 +0,0 @@ -From e74b57febec9bd806e29025e6eeb8091e7021d75 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sun, 26 Jan 2020 11:27:40 -0800 -Subject: [PATCH] Filter out __has_include* compiler defines - -They are internal to compiler and this header is later on includes in C -files, but newer gcc >= 10 complains about it. - -error in initial header file: -| In file included from /tmp/20200124-86625-14hiju4.c:1: -| /tmp/20200124-86625-11y6l6i.h:13849:9: error: "__has_include" cannot be used as a macro name -| 13849 | #define __has_include __has_include -| | ^~~~~~~~~~~~~ -| compilation terminated due to -Wfatal-errors. - -Upstream-Status: Pending -Signed-off-by: Khem Raj <[email protected]> - ---- - common.mk | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/common.mk b/common.mk -index 664f750..3b8fbe6 100644 ---- a/common.mk -+++ b/common.mk -@@ -238,6 +238,8 @@ $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time: probes.h vm.$(OBJE - $(ECHO) building $(@F:.time=.h) - $(Q)$(MINIRUBY) $(tooldir)/mjit_tabs.rb "$(MJIT_TABS)" \ - $(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new -+ $(Q)sed -i -e "/#define __has_include __has_include/d" $(@F:.time=.h).new -+ $(Q)sed -i -e "/#define __has_include_next __has_include_next/d" $(@F:.time=.h).new - $(Q) $(IFCHANGE) "--timestamp=$@" $(@F:.time=.h) $(@F:.time=.h).new - - $(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).h: $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time
meta/recipes-devtools/ruby/ruby_3.3.5.bb renamed from meta/recipes-devtools/ruby/ruby_3.2.2.bb +2 -11
@@ -10,7 +10,7 @@ LICENSE = "Ruby | BSD-2-Clause | BSD-3-Clause | GPL-2.0-only | ISC | MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=5b8c87559868796979806100db3f3805 \ file://BSDL;md5=8b50bc6de8f586dc66790ba11d064d75 \ file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LEGAL;md5=bcd74b47bbaf2051c5e49811a5faa97a \ + file://LEGAL;md5=81e6a4d81533b9263da4c3485a0ad883 \ " DEPENDS = "zlib openssl libyaml gdbm readline libffi"
@@ -20,21 +20,12 @@ DEPENDS:append:class-nativesdk = " ruby-native" SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \ file://0001-extmk-fix-cross-compilation-of-external-gems.patch \ - file://0002-Obey-LDFLAGS-for-the-link-of-libruby.patch \ - file://remove_has_include_macros.patch \ file://run-ptest \ - file://0001-template-Makefile.in-do-not-write-host-cross-cc-item.patch \ - file://0002-template-Makefile.in-filter-out-f-prefix-map.patch \ file://0003-rdoc-build-reproducible-documentation.patch \ file://0004-lib-mkmf.rb-sort-list-of-object-files-in-generated-M.patch \ file://0005-Mark-Gemspec-reproducible-change-fixing-784225-too.patch \ file://0006-Make-gemspecs-reproducible.patch \ file://0001-vm_dump.c-Define-REG_S1-and-REG_S2-for-musl-riscv.patch \ - file://0001-fiddle-Use-C11-_Alignof-to-define-ALIGN_OF-when-poss.patch \ - file://CVE-2023-36617_1.patch \ - file://CVE-2023-36617_2.patch \ - file://CVE-2024-27281.patch \ - file://CVE-2024-27282.patch \ " UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/"
@@ -55,7 +46,7 @@ do_configure:prepend() { DEPENDS:append:libc-musl = " libucontext" -SRC_URI[sha256sum] = "96c57558871a6748de5bc9f274e93f4b5aad06cd8f37befa0e8d94e7b8a423bc" +SRC_URI[sha256sum] = "3781a3504222c2f26cb4b9eb9c1a12dbf4944d366ce24a9ff8cf99ecbce75196" PACKAGECONFIG ??= "" PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
Signature · 1 line
2.34.1
PATCH 6/18 ptest-runner: Update 2.4.4 -> 2.4.5
In reply to Steve SakomanFrom: Jörg Sommer <[email protected]>
Changelog:
aea9f42 ptest_list_remove: Fix pointer adjustment of prev and next
---
.../{ptest-runner_2.4.4.bb => ptest-runner_2.4.5.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-support/ptest-runner/{ptest-runner_2.4.4.bb => ptest-runner_2.4.5.bb} (95%)meta/recipes-support/ptest-runner/ptest-runner_2.4.5.bb renamed from meta/recipes-support/ptest-runner/ptest-runner_2.4.4.bb +1 -1
@@ -7,7 +7,7 @@ HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/" LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" -SRCREV = "95f528cff0bc52903b98c292d4a322fcffa74471" +SRCREV = "aea9f42f87f2a78a973ae22cade8e45259f754e1" PV .= "+git" SRC_URI = "git://git.yoctoproject.org/ptest-runner2;branch=master;protocol=https \
Signature · 1 line
2.34.1
PATCH 7/18 sysvinit: take release tarballs from github
In reply to Steve SakomanFrom: Alexander Kanavin <[email protected]>
Upstream no longer publishes them on savannah, e.g. release announcement for 3.10:
https://lists.gnu.org/archive/html/sysvinit-devel/2024-07/msg00016.html
There's been several new versions since:
https://github.com/slicer69/sysvinit/releases
--- meta/recipes-core/sysvinit/sysvinit_3.04.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-core/sysvinit/sysvinit_3.04.bb +3 -2
@@ -9,7 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ RDEPENDS:${PN} = "${PN}-inittab" -SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.xz \ +GITHUB_BASE_URI = "https://github.com/slicer69/${BPN}/releases/" +SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.xz \ file://install.patch \ file://crypt-lib.patch \ file://pidof-add-m-option.patch \
@@ -27,7 +28,7 @@ SRC_URI[sha256sum] = "2a621fe6e4528bc91308b74867ddaaebbdf7753f02395c0c5bae817bd2 S = "${WORKDIR}/sysvinit-${PV}" -inherit update-alternatives features_check +inherit update-alternatives features_check github-releases DEPENDS:append = " update-rc.d-native base-passwd virtual/crypt" do_package_setscene[depends] = "${MLPREFIX}base-passwd:do_populate_sysroot"
Signature · 1 line
2.34.1
PATCH 8/18 libpcre2: Update base uri PhilipHazel -> PCRE2Project
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
--- meta/recipes-support/libpcre/libpcre2_10.43.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/libpcre/libpcre2_10.43.bb +1 -1
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=321a5eb46acae6b6c1ff2c7a866d836a" SRC_URI = "${GITHUB_BASE_URI}/download/pcre2-${PV}/pcre2-${PV}.tar.bz2" -GITHUB_BASE_URI = "https://github.com/PhilipHazel/pcre2/releases" +GITHUB_BASE_URI = "https://github.com/PCRE2Project/pcre2/releases" UPSTREAM_CHECK_REGEX = "releases/tag/pcre2-(?P<pver>\d+(\.\d+)+)$" SRC_URI[sha256sum] = "e2a53984ff0b07dfdb5ae4486bbb9b21cca8e7df2434096cc9bf1b728c350bcb"
Signature · 1 line
2.34.1
PATCH 9/18 license: Fix directory layout issues
In reply to Steve SakomanFrom: Richard Purdie <[email protected]>
There are several issues:
a) pointless empty directories were being created as a path wasn't fixed in a previous commit
b) SSTATE_PKGARCH wasn't being captured into the task signature since it is in the ignore list by default. We want to capture the absolute value, not the dependencies
c) with those issues fixed, cross/native issues became apparent so those need to be fixed too.
Backport from oe-core master: f68aed302a0e4b86fb8c16a6ef4e7295bed48b86
--- meta/classes-global/license.bbclass | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
meta/classes-global/license.bbclass +8 -2
@@ -18,8 +18,14 @@ LICENSE_CREATE_PACKAGE ??= "0" LICENSE_PACKAGE_SUFFIX ??= "-lic" LICENSE_FILES_DIRECTORY ??= "${datadir}/licenses/" +LICENSE_DEPLOY_PATHCOMPONENT = "${SSTATE_PKGARCH}" +LICENSE_DEPLOY_PATHCOMPONENT:class-cross = "native" +LICENSE_DEPLOY_PATHCOMPONENT:class-native = "native" +# Ensure the *value* of SSTATE_PKGARCH is captured as it is used in the output paths +LICENSE_DEPLOY_PATHCOMPONENT[vardepvalue] += "${LICENSE_DEPLOY_PATHCOMPONENT}" + addtask populate_lic after do_patch before do_build -do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}" +do_populate_lic[dirs] = "${LICSSTATEDIR}/${LICENSE_DEPLOY_PATHCOMPONENT}/${PN}" do_populate_lic[cleandirs] = "${LICSSTATEDIR}" python do_populate_lic() {
@@ -29,7 +35,7 @@ python do_populate_lic() { lic_files_paths = find_license_files(d) # The base directory we wrangle licenses to - destdir = os.path.join(d.getVar('LICSSTATEDIR'), d.getVar('SSTATE_PKGARCH'), d.getVar('PN')) + destdir = os.path.join(d.getVar('LICSSTATEDIR'), d.getVar('LICENSE_DEPLOY_PATHCOMPONENT'), d.getVar('PN')) copy_license_files(lic_files_paths, destdir) info = get_recipe_info(d) with open(os.path.join(destdir, "recipeinfo"), "w") as f:
Signature · 1 line
2.34.1
PATCH 10/18 virglrenderer: Add patch to fix -int-conversion build issue
In reply to Steve SakomanFrom: Purushottam Choudhary <[email protected]>
Fix int conversion related error during compilation as some of the platforms where EGLNativeDisplayType is an int instead of a pointer with GCC-14.
--- ...nversion-fatal-build-error-with-GCC-.patch | 41 +++++++++++++++++++ .../virglrenderer/virglrenderer_1.0.1.bb | 1 + 2 files changed, 42 insertions(+) create mode 100644 meta/recipes-graphics/virglrenderer/virglrenderer/0001-vrend-Fix-int-conversion-fatal-build-error-with-GCC-.patch
meta/recipes-graphics/virglrenderer/virglrenderer/0001-vrend-Fix-int-conversion-fatal-build-error-with-GCC-.patch new file +41 -0
@@ -0,0 +1,41 @@ +From 464deabe4d1bfce6b8f414ab0945d9a62b66ddd4 Mon Sep 17 00:00:00 2001 +From: Purushottam Choudhary <[email protected]> +Date: Tue, 8 Oct 2024 11:47:21 +0530 +Subject: [PATCH] vrend: Fix int-conversion fatal build error with GCC-14 + +Getting below error int conversion during compilation as one the +platforms where EGLNativeDisplayType is an int instead of a pointer. + +| ../git/src/vrend_winsys_egl.c: In function 'virgl_egl_init': +| ../git/src/vrend_winsys_egl.c:364:62: error: passing argument 2 of 'egl->funcs.epoxy_eglGetPlatformDisplay' makes pointer from +| 364 | (EGLNativeDisplayType)egl->gbm->device, NULL); +| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +| | | +| | int +| ../git/src/vrend_winsys_egl.c:364:62: note: expected 'void *' but argument is of type 'int' + +Upstream-Status: Backport [https://gitlab.freedesktop.org/virgl/virglrenderer/-/commit/464deabe4d1bfce6b8f414ab0945d9a62b66ddd4] + +Signed-off-by: Purushottam Choudhary <[email protected]> +Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1440> +--- + + src/vrend_winsys_egl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/vrend_winsys_egl.c b/src/vrend_winsys_egl.c +index 9d9f410c..8750f6b2 100644 +--- a/src/vrend_winsys_egl.c ++++ b/src/vrend_winsys_egl.c +@@ -361,7 +361,7 @@ struct virgl_egl *virgl_egl_init(EGLNativeDisplayType display_id, bool surfacele + #ifdef ENABLE_GBM + else + egl->egl_display = egl->funcs.eglGetPlatformDisplay(EGL_PLATFORM_GBM_KHR, +- (EGLNativeDisplayType)egl->gbm->device, NULL); ++ (EGLNativeDisplayType*)egl->gbm->device, NULL); + #endif + } else { + #ifdef ENABLE_GBM +-- +2.34.1 +
meta/recipes-graphics/virglrenderer/virglrenderer_1.0.1.bb +1 -0
@@ -12,6 +12,7 @@ DEPENDS = "libdrm libepoxy virtual/egl virtual/libgbm" SRCREV = "690680e5f0f952e22424fca1538c1b24457a0868" SRC_URI = "git://gitlab.freedesktop.org/virgl/virglrenderer.git;branch=main;protocol=https \ file://0001-meson.build-use-python3-directly-for-python.patch \ + file://0001-vrend-Fix-int-conversion-fatal-build-error-with-GCC-.patch \ " S = "${WORKDIR}/git"
Signature · 1 line
2.34.1
PATCH 11/18 lib/oe/package-manager: skip processing installed-pkgs with empty globs
In reply to Steve SakomanFrom: Claus Stovgaard <[email protected]>
We can skip processing the installed-pkgs file if globs is empty. This is the case if self.d.getVar for IMAGE_INSTALL_COMPLEMENTARY returns an empty string. If globs is an empty string the result from processing with empty glob in oe-pkgdata-util will always be 0 packages to install.
Instead of return early on this we just skip and still generate the locale archive if needed.
--- meta/lib/oe/package_manager/__init__.py | 76 ++++++++++++------------- 1 file changed, 37 insertions(+), 39 deletions(-)
meta/lib/oe/package_manager/__init__.py +37 -39
@@ -365,45 +365,43 @@ class PackageManager(object, metaclass=ABCMeta): for complementary_linguas in (self.d.getVar('IMAGE_LINGUAS_COMPLEMENTARY') or "").split(): globs += (" " + complementary_linguas) % lang - if globs is None: - return - - # we need to write the list of installed packages to a file because the - # oe-pkgdata-util reads it from a file - with tempfile.NamedTemporaryFile(mode="w+", prefix="installed-pkgs") as installed_pkgs: - pkgs = self.list_installed() - - provided_pkgs = set() - for pkg in pkgs.values(): - provided_pkgs |= set(pkg.get('provs', [])) - - output = oe.utils.format_pkg_list(pkgs, "arch") - installed_pkgs.write(output) - installed_pkgs.flush() - - cmd = ["oe-pkgdata-util", - "-p", self.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs.name, - globs] - exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY') - if exclude: - cmd.extend(['--exclude=' + '|'.join(exclude.split())]) - try: - bb.note('Running %s' % cmd) - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = proc.communicate() - if stderr: bb.note(stderr.decode("utf-8")) - complementary_pkgs = stdout.decode("utf-8") - complementary_pkgs = set(complementary_pkgs.split()) - skip_pkgs = sorted(complementary_pkgs & provided_pkgs) - install_pkgs = sorted(complementary_pkgs - provided_pkgs) - bb.note("Installing complementary packages ... %s (skipped already provided packages %s)" % ( - ' '.join(install_pkgs), - ' '.join(skip_pkgs))) - self.install(install_pkgs, hard_depends_only=True) - except subprocess.CalledProcessError as e: - bb.fatal("Could not compute complementary packages list. Command " - "'%s' returned %d:\n%s" % - (' '.join(cmd), e.returncode, e.output.decode("utf-8"))) + if globs: + # we need to write the list of installed packages to a file because the + # oe-pkgdata-util reads it from a file + with tempfile.NamedTemporaryFile(mode="w+", prefix="installed-pkgs") as installed_pkgs: + pkgs = self.list_installed() + + provided_pkgs = set() + for pkg in pkgs.values(): + provided_pkgs |= set(pkg.get('provs', [])) + + output = oe.utils.format_pkg_list(pkgs, "arch") + installed_pkgs.write(output) + installed_pkgs.flush() + + cmd = ["oe-pkgdata-util", + "-p", self.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs.name, + globs] + exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY') + if exclude: + cmd.extend(['--exclude=' + '|'.join(exclude.split())]) + try: + bb.note('Running %s' % cmd) + proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, stderr = proc.communicate() + if stderr: bb.note(stderr.decode("utf-8")) + complementary_pkgs = stdout.decode("utf-8") + complementary_pkgs = set(complementary_pkgs.split()) + skip_pkgs = sorted(complementary_pkgs & provided_pkgs) + install_pkgs = sorted(complementary_pkgs - provided_pkgs) + bb.note("Installing complementary packages ... %s (skipped already provided packages %s)" % ( + ' '.join(install_pkgs), + ' '.join(skip_pkgs))) + self.install(install_pkgs, hard_depends_only=True) + except subprocess.CalledProcessError as e: + bb.fatal("Could not compute complementary packages list. Command " + "'%s' returned %d:\n%s" % + (' '.join(cmd), e.returncode, e.output.decode("utf-8"))) if self.d.getVar('IMAGE_LOCALES_ARCHIVE') == '1': target_arch = self.d.getVar('TARGET_ARCH')
Signature · 1 line
2.34.1
PATCH 12/18 makedevs: Fix matching uid/gid
In reply to Steve SakomanFrom: Jaeyoon Jung <[email protected]>
Correct the length to compare in convert2guid() to fix an issue where it ends up with returning a wrong id that matches partially. Also fix the length of usr_buf and grp_buf in interpret_table_entry() which are used as arguments of convert2guid().
--- meta/recipes-devtools/makedevs/makedevs/makedevs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
meta/recipes-devtools/makedevs/makedevs/makedevs.c +6 -6
@@ -202,7 +202,7 @@ static unsigned long convert2guid(char *id_buf, struct name_id *search_list)// Check for bad user/group name node = search_list;while (node !=NULL ) { -if (!strncmp (node->name, id_buf,strlen (id_buf))) { +if (!strncmp (node->name, id_buf,MAX_ID_LEN )) {fprintf (stderr,"WARNING: Bad user/group name %s detected\n" , id_buf);break ; }
@@ -212,7 +212,7 @@ static unsigned long convert2guid(char *id_buf, struct name_id *search_list) }else { node = search_list;while (node !=NULL ) { -if (!strncmp (node->name, id_buf,strlen (id_buf))) +if (!strncmp (node->name, id_buf,MAX_ID_LEN ))return node->id; node = node->next; }
@@ -362,13 +362,13 @@ static void add_new_fifo(char *name, char *path, unsigned long uid,static int interpret_table_entry (char *line) {char *name; -char usr_buf[MAX_ID_LEN ]; -char grp_buf[MAX_ID_LEN ]; -char path[4096 ], type; +char usr_buf[MAX_ID_LEN +1 ]; +char grp_buf[MAX_ID_LEN +1 ]; +char path[PATH_MAX ], type;unsigned long mode =0755 , uid =0 , gid =0 , major =0 , minor =0 ;unsigned long start =0 , increment =1 , count =0 ; -if (0 >sscanf (line,"%4095s %c %lo %39s %39s %lu %lu %lu %lu %lu" , path, +if (0 >sscanf (line,"%4095s %c %lo %40s %40s %lu %lu %lu %lu %lu" , path, &type, &mode, usr_buf, grp_buf, &major, &minor, &start, &increment, &count)) {
Signature · 1 line
2.34.1
PATCH 13/18 runqemu: Fix detection of -serial parameter
In reply to Steve SakomanFrom: Jörg Sommer <[email protected]>
The pattern -serial matches also -device usb-serial and virtio-serial which are not the desired parameter. This causes the serial console ttyS1 is missing and Systemd's getty@ttyS1 fails constantly.
--- scripts/runqemu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/runqemu +2 -2
@@ -1487,7 +1487,7 @@ to your build configuration. # If no serial or serialtcp options were specified, only ttyS0 is created # and sysvinit shows an error trying to enable ttyS1: # INIT: Id "S1" respawning too fast: disabled for 5 minutes - serial_num = len(re.findall("-serial", self.qemu_opt)) + serial_num = len(re.findall("(^| )-serial ", self.qemu_opt)) # Assume if the user passed serial options, they know what they want # and pad to two devices
@@ -1507,7 +1507,7 @@ to your build configuration. self.qemu_opt += " %s" % self.get("QB_SERIAL_OPT") - serial_num = len(re.findall("-serial", self.qemu_opt)) + serial_num = len(re.findall("(^| )-serial ", self.qemu_opt)) if serial_num < 2: self.qemu_opt += " -serial null"
Signature · 1 line
2.34.1
PATCH 14/18 uboot-sign: fix counters in do_uboot_assemble_fitimage
In reply to Steve SakomanFrom: Paul Gerber <[email protected]>
Without unsetting j and k for each UBOOT_MACHINE, j and k are incremented in the same frequency as i and therefore $j -eq $i and $k -eq $i is always true for the first type from UBOOT_CONFIG and the first binary from UBOOT_BINARIES.
--- meta/classes-recipe/uboot-sign.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes-recipe/uboot-sign.bbclass +2 -1
@@ -356,8 +356,9 @@ do_uboot_assemble_fitimage() { fi if [ -n "${UBOOT_CONFIG}" ]; then - unset i j k + unset i for config in ${UBOOT_MACHINE}; do + unset j k i=$(expr $i + 1); for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1);
Signature · 1 line
2.34.1
PATCH 15/18 recipes-bsp: usbutils: Fix usb-devices command using busybox
In reply to Steve SakomanFrom: Teresa Remmet <[email protected]>
Unknown find parameter -printf makes usb-devices script unusable with busybox. Replace the parameter to fix this issue.
--- ...devices-Fix-usb-devices-with-busybox.patch | 37 +++++++++++++++++++ meta/recipes-bsp/usbutils/usbutils_017.bb | 1 + 2 files changed, 38 insertions(+) create mode 100755 meta/recipes-bsp/usbutils/usbutils/0001-usb-devices-Fix-usb-devices-with-busybox.patch
meta/recipes-bsp/usbutils/usbutils/0001-usb-devices-Fix-usb-devices-with-busybox.patch new file +37 -0
@@ -0,0 +1,37 @@ +From da155d965a34b5c5770dc30fa52eb7ef405f3a30 Mon Sep 17 00:00:00 2001 +From: Teresa Remmet <[email protected]> +Date: Thu, 5 Sep 2024 08:37:48 +0200 +Subject: [PATCH] usb-devices: Fix usb-devices with busybox + +The busybox find command is missing the -printf parameter leading to +the error: + +find: unrecognized: -printf + +Replace the parameter with sed. + +This patch was originally created by Daniel Fancsali. + +Upstream-Status: Backport [https://github.com/gregkh/usbutils/commit/da155d965a34b5c5770dc30fa52eb7ef405f3a30] + +Signed-off-by: Teresa Remmet <[email protected]> +--- + usb-devices | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usb-devices b/usb-devices +index 5f60ad5a1ed0..51f48b4ad628 100755 +--- a/usb-devices ++++ b/usb-devices +@@ -192,7 +192,7 @@ if [ ! -d /sys/bus ]; then + exit 1 + fi + +-for device in $(find /sys/bus/usb/devices -name 'usb*' -printf '%f\n' | sort -V) ++for device in $(find /sys/bus/usb/devices -name 'usb*' | sed -E 's#^.*/##g' | sort -V) + do + print_device "/sys/bus/usb/devices/$device" 0 0 0 + done +-- +2.34.1 +
meta/recipes-bsp/usbutils/usbutils_017.bb +1 -0
@@ -13,6 +13,7 @@ DEPENDS = "libusb1 virtual/libiconv udev" SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \ file://0001-usbutils.pc.in-Fix-Cflags-entry.patch \ + file://0001-usb-devices-Fix-usb-devices-with-busybox.patch \ " SRC_URI[sha256sum] = "f704c4cb78a060db88b43aac6ebfd3d93c2c5cf1d6dd0e42936faaf00814ab00"
Signature · 1 line
2.34.1
PATCH 16/18 libsdl2: Fix non-deterministic configure option for libsamplerate
In reply to Steve SakomanFrom: Richard Purdie <[email protected]>
The libsamplerate option was floating and being enabled on some systems and not others. Fix this to be deterministic.
--- meta/recipes-graphics/libsdl2/libsdl2_2.30.1.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-graphics/libsdl2/libsdl2_2.30.1.bb +1 -0
@@ -67,6 +67,7 @@ PACKAGECONFIG[directfb] = "-DSDL_DIRECTFB=ON,-DSDL_DIRECTFB=OFF,directfb,direc PACKAGECONFIG[gles2] = "-DSDL_OPENGLES=ON,-DSDL_OPENGLES=OFF,virtual/libgles2" PACKAGECONFIG[jack] = "-DSDL_JACK=ON,-DSDL_JACK=OFF,jack" PACKAGECONFIG[kmsdrm] = "-DSDL_KMSDRM=ON,-DSDL_KMSDRM=OFF,libdrm virtual/libgbm" +PACKAGECONFIG[libsamplerate] = "-DSDL_LIBSAMPLERATE=ON,-DSDL_LIBSAMPLERATE=OFF,libsamplerate0" # The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers, # so we'll just use libusb when it's available. PACKAGECONFIG[libusb] = ",,libusb1"
Signature · 1 line
2.34.1
PATCH 17/18 image_qa: fix error handling
In reply to Steve SakomanFrom: Louis Rannou <[email protected]>
Make ImageQAFailed inherit BBHandledException so exceptions raised in tests are catched when the actual test function is executed by bb.utils.better_exec.
Change the do_image_qa tasks so errors are handled with oe.qa.handle_error. Add some comment to explain this requires to list the test in ERROR_QA or WARN_QA.
[YOCTO #14807]
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14807
--- meta/classes-recipe/image.bbclass | 11 ++++++----- meta/lib/oe/utils.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-)
meta/classes-recipe/image.bbclass +6 -5
@@ -308,23 +308,24 @@ addtask do_image_complete_setscene # # The functions should use ${IMAGE_ROOTFS} to find the unpacked rootfs # directory, which if QA passes will be the basis for the images. +# +# The functions should use oe.utils.ImageQAFailed(description, name) to raise +# errors. The name must be listed in ERROR_QA or WARN_QA to prompt. fakeroot python do_image_qa () { from oe.utils import ImageQAFailed qa_cmds = (d.getVar('IMAGE_QA_COMMANDS') or '').split() - qamsg = "" for cmd in qa_cmds: try: bb.build.exec_func(cmd, d) except oe.utils.ImageQAFailed as e: - qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (e.name, e.description) + qamsg = 'Image QA function %s failed: %s\n' % (e.name, e.description) + oe.qa.handle_error(e.name, qamsg, d) except Exception as e: qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (cmd, e) - if qamsg: - imgname = d.getVar('IMAGE_NAME') - bb.fatal("QA errors found whilst validating image: %s\n%s" % (imgname, qamsg)) + oe.qa.exit_if_errors(d) } addtask do_image_qa after do_rootfs before do_image
meta/lib/oe/utils.py +1 -1
@@ -482,7 +482,7 @@ def get_multilib_datastore(variant, d): localdata.setVar("MLPREFIX", "") return localdata -class ImageQAFailed(Exception): +class ImageQAFailed(bb.BBHandledException): def __init__(self, description, name=None, logfile=None): self.description = description self.name = name
Signature · 1 line
2.34.1
Re: [OE-core][scarthgap 17/18] image_qa: fix error handling
Quoted 64 lines · Steve Sakoman via lists.openembedded.org
From: Louis Rannou <[email protected]>
Make ImageQAFailed inherit BBHandledException so exceptions raised in tests are catched when the actual test function is executed by bb.utils.better_exec.
Change the
do_image_qatasks so errors are handled with oe.qa.handle_error. Add some comment to explain this requires to list the test inERROR_QAorWARN_QA.[YOCTO #14807]
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14807Signed-off-by Louis Rannou <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit 905e224849fbbed1719e0add231b00e2d570b3b4)Signed-off-by Steve Sakoman <[email protected]>---
meta/classes-recipe/image.bbclass | 11 ++++++----- meta/lib/oe/utils.py | 2 +-2 files changed, 7 insertions(+), 6 deletions(-)meta/classes-recipe/image.bbclass +3
-0@@ -308,23 +308,24 @@ addtask do_image_complete_setscene # # The functions should use ${IMAGE_ROOTFS} to find the unpacked rootfs # directory, which if QA passes will be the basis for the images. +# +# The functions should use oe.utils.ImageQAFailed(description, name) to raise +# errors. The name must be listed in ERROR_QA or WARN_QA to prompt. fakeroot python do_image_qa () {from oe.utils import ImageQAFailed
qa_cmds= (d.getVar('IMAGE_QA_COMMANDS')or '').split()
- qamsg = ""
for cmd inqa_cmds:
try:
bb.build.exec_func(cmd, d)
except oe.utils.ImageQAFailed as e:
- qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (e.name, e.description) + qamsg = 'Image QA function %s failed: %s\n' % (e.name, e.description) +oe.qa.handle_error(e.name, qamsg, d)
except Exception as e:
qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (cmd, e)
- if qamsg:
- imgname =d.getVar('IMAGE_NAME')
-bb.fatal("QA errors found whilst validating image: %s\n%s" % (imgname, qamsg))+oe.qa.exit_if_errors(d)
}
addtaskdo_image_qaafterdo_rootfsbeforedo_imagemeta/lib/oe/utils.py +0
-0@@ -482,7 +482,7 @@ def get_multilib_datastore(variant, d): localdata.setVar("MLPREFIX", "")return localdata
meta/lib/oe/utils.py +1
-1-class ImageQAFailed(Exception): +class ImageQAFailed(bb.BBHandledException):
Quoted 4 lines
def
__init__(self, description, name=None, logfile=None):
self.description = description
self.name = name
This caused further issues if I remember correctly.
https://git.yoctoproject.org/poky/commit/?id=b0eb2b9b3660dfda1c4c43cfcca6a2c4a84d6dc8
for example.
Cheers,
Richard
Re: [OE-core][scarthgap 17/18] image_qa: fix error handling
Quoted 73 lines · Richard Purdie
Quoted 60 lines · Steve Sakoman via lists.openembedded.org
From: Louis Rannou <[email protected]>
Make ImageQAFailed inherit BBHandledException so exceptions raised in tests are catched when the actual test function is executed by bb.utils.better_exec.
Change the
do_image_qatasks so errors are handled with oe.qa.handle_error. Add some comment to explain this requires to list the test inERROR_QAorWARN_QA.[YOCTO #14807]
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14807Signed-off-by Louis Rannou <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit 905e224849fbbed1719e0add231b00e2d570b3b4)Signed-off-by Steve Sakoman <[email protected]>--- meta/classes-recipe/image.bbclass | 11 ++++++----- meta/lib/oe/utils.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-)meta/classes-recipe/image.bbclass +6
-5@@ -308,23 +308,24 @@ addtask do_image_complete_setscene # # The functions should use ${IMAGE_ROOTFS} to find the unpacked rootfs # directory, which if QA passes will be the basis for the images. +# +# The functions should use oe.utils.ImageQAFailed(description, name) to raise +# errors. The name must be listed in ERROR_QA or WARN_QA to prompt. fakeroot python do_image_qa () { from oe.utils import ImageQAFailed qa_cmds = (d.getVar('IMAGE_QA_COMMANDS') or '').split() - qamsg = "" for cmd in qa_cmds: try: bb.build.exec_func(cmd, d) except oe.utils.ImageQAFailed as e: - qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (e.name, e.description) + qamsg = 'Image QA function %s failed: %s\n' % (e.name, e.description) + oe.qa.handle_error(e.name, qamsg, d) except Exception as e: qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (cmd, e) - if qamsg: - imgname = d.getVar('IMAGE_NAME') - bb.fatal("QA errors found whilst validating image: %s\n%s" % (imgname, qamsg)) + oe.qa.exit_if_errors(d) } addtask do_image_qa after do_rootfs before do_imagemeta/lib/oe/utils.py +0
-0meta/lib/oe/utils.py def get_multilib_datastore(variant, d): · line 488
Quoted 8 lines
meta/lib/oe/utils.py +1
-1@@ -482,7 +482,7 @@ def get_multilib_datastore(variant, d): localdata.setVar("MLPREFIX", "") return localdata -class ImageQAFailed(Exception): +class ImageQAFailed(bb.BBHandledException): def __init__(self, description, name=None, logfile=None): self.description = description self.name = nameThis caused further issues if I remember correctly.
Quoted 3 lines
https://git.yoctoproject.org/poky/commit/?id=b0eb2b9b3660dfda1c4c43cfcca6a2c4a84d6dc8
for example.
Thanks for reviewing! I've got that one now and will also take it for styhead.
Steve
RE: [OE-core][scarthgap 17/18] image_qa: fix error handling
Quoted 81 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Steve Sakoman
Sent: den 16 oktober 2024 15:27
To: Richard Purdie <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][scarthgap 17/18]image_qa: fix error handlingQuoted 73 lines · Richard Purdie
Quoted 60 lines · Steve Sakoman via lists.openembedded.org
From: Louis Rannou <[email protected]>
Make ImageQAFailed inherit BBHandledException so exceptions raised in tests are catched when the actual test function is executed by bb.utils.better_exec.
Change the
do_image_qatasks so errors are handled with oe.qa.handle_error. Add some comment to explain this requires to list the test inERROR_QAorWARN_QA.[YOCTO #14807]
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14807Signed-off-by Louis Rannou <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit 905e224849fbbed1719e0add231b00e2d570b3b4)Signed-off-by Steve Sakoman <[email protected]>--- meta/classes-recipe/image.bbclass | 11 ++++++----- meta/lib/oe/utils.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-)meta/classes-recipe/image.bbclass +6
-5@@ -308,23 +308,24 @@ addtask do_image_complete_setscene # # The functions should use ${IMAGE_ROOTFS} to find the unpacked rootfs # directory, which if QA passes will be the basis for the images. +# +# The functions should use oe.utils.ImageQAFailed(description, name) to raise +# errors. The name must be listed in ERROR_QA or WARN_QA to prompt. fakeroot python do_image_qa () { from oe.utils import ImageQAFailed qa_cmds = (d.getVar('IMAGE_QA_COMMANDS') or '').split() - qamsg = "" for cmd in qa_cmds: try: bb.build.exec_func(cmd, d) except oe.utils.ImageQAFailed as e: - qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (e.name, e.description) + qamsg = 'Image QA function %s failed: %s\n' % (e.name, e.description) + oe.qa.handle_error(e.name, qamsg, d) except Exception as e: qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (cmd, e) - if qamsg: - imgname = d.getVar('IMAGE_NAME') - bb.fatal("QA errors found whilst validating image: %s\n%s" % (imgname, qamsg)) + oe.qa.exit_if_errors(d) } addtask do_image_qa after do_rootfs before do_imagemeta/lib/oe/utils.py +0
-0meta/lib/oe/utils.py def get_multilib_datastore(variant, d): · line 488
Quoted 8 lines
meta/lib/oe/utils.py +1
-1@@ -482,7 +482,7 @@ def get_multilib_datastore(variant, d): localdata.setVar("MLPREFIX", "") return localdata -class ImageQAFailed(Exception): +class ImageQAFailed(bb.BBHandledException): def __init__(self, description, name=None, logfile=None): self.description = description self.name = nameThis caused further issues if I remember correctly.
Quoted 8 lines
Quoted 3 lines
https://git.yoctoproject.org/poky/commit/?id=b0eb2b9b3660dfda1c4c43cfcca6a2c4a84d6dc8
for example.
Thanks for reviewing! I've got that one now and will also take it for styhead.
Steve
Do note that I sent an alternative patch for Styhead that does not remove the ImageQAFailed exception. While I would be happy to see the version that went into master backported, I assumed that removing the ImageQAFailed exception would be considered as a change in behavior and thus not eligible for backporting.
The alternative version I created for Styhead can be found here:
https://lists.openembedded.org/g/openembedded-core/message/204982
//Peter
Re: [OE-core][scarthgap 17/18] image_qa: fix error handling
Quoted 97 lines · Peter Kjellerstedt
Quoted 82 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Steve Sakoman
Sent: den 16 oktober 2024 15:27
To: Richard Purdie <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][scarthgap 17/18]image_qa: fix error handlingQuoted 73 lines · Richard Purdie
Quoted 60 lines · Steve Sakoman via lists.openembedded.org
From: Louis Rannou <[email protected]>
Make ImageQAFailed inherit BBHandledException so exceptions raised in tests are catched when the actual test function is executed by bb.utils.better_exec.
Change the
do_image_qatasks so errors are handled with oe.qa.handle_error. Add some comment to explain this requires to list the test inERROR_QAorWARN_QA.[YOCTO #14807]
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14807Signed-off-by Louis Rannou <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit 905e224849fbbed1719e0add231b00e2d570b3b4)Signed-off-by Steve Sakoman <[email protected]>--- meta/classes-recipe/image.bbclass | 11 ++++++----- meta/lib/oe/utils.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-)meta/classes-recipe/image.bbclass +6
-5@@ -308,23 +308,24 @@ addtask do_image_complete_setscene # # The functions should use ${IMAGE_ROOTFS} to find the unpacked rootfs # directory, which if QA passes will be the basis for the images. +# +# The functions should use oe.utils.ImageQAFailed(description, name) to raise +# errors. The name must be listed in ERROR_QA or WARN_QA to prompt. fakeroot python do_image_qa () { from oe.utils import ImageQAFailed qa_cmds = (d.getVar('IMAGE_QA_COMMANDS') or '').split() - qamsg = "" for cmd in qa_cmds: try: bb.build.exec_func(cmd, d) except oe.utils.ImageQAFailed as e: - qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (e.name, e.description) + qamsg = 'Image QA function %s failed: %s\n' % (e.name, e.description) + oe.qa.handle_error(e.name, qamsg, d) except Exception as e: qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (cmd, e) - if qamsg: - imgname = d.getVar('IMAGE_NAME') - bb.fatal("QA errors found whilst validating image: %s\n%s" % (imgname, qamsg)) + oe.qa.exit_if_errors(d) } addtask do_image_qa after do_rootfs before do_imagemeta/lib/oe/utils.py +0
-0meta/lib/oe/utils.py def get_multilib_datastore(variant, d): · line 488
Quoted 8 lines
meta/lib/oe/utils.py +1
-1@@ -482,7 +482,7 @@ def get_multilib_datastore(variant, d): localdata.setVar("MLPREFIX", "") return localdata -class ImageQAFailed(Exception): +class ImageQAFailed(bb.BBHandledException): def __init__(self, description, name=None, logfile=None): self.description = description self.name = nameThis caused further issues if I remember correctly.
Quoted 8 lines
Quoted 3 lines
https://git.yoctoproject.org/poky/commit/?id=b0eb2b9b3660dfda1c4c43cfcca6a2c4a84d6dc8
for example.
Thanks for reviewing! I've got that one now and will also take it for styhead.
Steve
Do note that I sent an alternative patch for Styhead that does not remove the ImageQAFailed exception. While I would be happy to see the version that went into master backported, I assumed that removing the ImageQAFailed exception would be considered as a change in behavior and thus not eligible for backporting.
Quoted 3 lines
The alternative version I created for Styhead can be found here:
https://lists.openembedded.org/g/openembedded-core/message/204982
Since I already took the master version for scarthgap, I'm inclined to take that version for styhead too.
Steve
RE: [OE-core][scarthgap 17/18] image_qa: fix error handling
Quoted 123 lines
-----Original Message-----
From: Steve Sakoman <[email protected]>
Sent: den 18 oktober 2024 22:19
To: Peter Kjellerstedt <[email protected]>
Cc: Richard Purdie <[email protected]>; openembedded- [email protected]
Subject: Re: [OE-core][scarthgap 17/18]image_qa: fix error handlingQuoted 3 lines · Peter Kjellerstedt
Quoted 3 lines
-----Original Message-----
From: [email protected] <openembedded-[email protected]> On Behalf Of Steve Sakoman
Quoted 6 lines
Quoted 6 lines
Sent: den 16 oktober 2024 15:27
To: Richard Purdie <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][scarthgap 17/18]image_qa: fix error handlingOn Tue, Oct 15, 2024 at 3:41 PM Richard Purdie
Quoted 2 lines · <[email protected]> wrote:
Quoted 2 lines
Quoted 2 lines
On Tue, 2024-10-15 at 11:50 -0700, Steve Sakoman via
Quoted 3 lines · lists.openembedded.org
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
From: Louis Rannou <[email protected]>
Make ImageQAFailed inherit BBHandledException so exceptions raised
in tests are
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
catched when the actual test function is executed by
bb.utils.better_exec.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Change the
do_image_qatasks so errors are handled withoe.qa.handle_error. Add
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
some comment to explain this requires to list the test in
ERROR_QAor
WARN_QA.Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
[YOCTO #14807]
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14807Signed-off-by Louis Rannou <[email protected]>Signed-off-by Richard Purdie <[email protected]>(cherry picked from commit
905e224849fbbed1719e0add231b00e2d570b3b4)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
meta/classes-
Quoted 7 lines
Signed-off-by Steve Sakoman <[email protected]>--- meta/classes-recipe/image.bbclass | 11 ++++++----- meta/lib/oe/utils.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-)meta/classes- renamed from meta/classes-recipe/image.bbclass +0
-0recipe/image.bbclass
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
meta/classes-recipe/image.bbclass addtask do_image_complete_setscene · line 309
Quoted 6 lines
index
28be6c6362..a682b5f3b2100644meta/classes-recipe/image.bbclass +0
-0@@ -308,23 +308,24 @@ addtask do_image_complete_setscene # # The functions should use ${IMAGE_ROOTFS} to find the unpackedrootfs
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta/classes-recipe/image.bbclass addtask do_image_complete_setscene
Quoted 3 lines
meta/classes-recipe/image.bbclass +2
-0# directory, which if QA passes will be the basis for the images. +# +# The functions should use oe.utils.ImageQAFailed(description,name) to raise
Quoted 1 line
Quoted 1 line
Quoted 1 line
meta/classes-recipe/image.bbclass addtask do_image_complete_setscene · line 313
Quoted 1 line
meta/classes-recipe/image.bbclass +1
-0+# errors. The name must be listed in ERROR_QA or WARN_QA toprompt.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
meta/classes-recipe/image.bbclass addtask do_image_complete_setscene
Quoted 11 lines
meta/classes-recipe/image.bbclass +0
-2fakeroot python do_image_qa () { from oe.utils import ImageQAFailed qa_cmds = (d.getVar('IMAGE_QA_COMMANDS') or '').split() - qamsg = "" for cmd in qa_cmds: try: bb.build.exec_func(cmd, d) except oe.utils.ImageQAFailed as e: - qamsg = qamsg + '\tImage QA function %s failed: %s\n'% (e.name, e.description)
Quoted 1 line
Quoted 1 line
Quoted 1 line
meta/classes-recipe/image.bbclass addtask do_image_complete_setscene · line 323
Quoted 1 line
meta/classes-recipe/image.bbclass +1
-0+ qamsg = 'Image QA function %s failed: %s\n' %(e.name, e.description)
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta/classes-recipe/image.bbclass addtask do_image_complete_setscene
Quoted 3 lines
meta/classes-recipe/image.bbclass +1
-0+ oe.qa.handle_error(e.name, qamsg, d) except Exception as e: qamsg = qamsg + '\tImage QA function %s failed: %s\n'% (cmd, e)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
meta/classes-recipe/image.bbclass addtask do_image_complete_setscene
Quoted 4 lines
meta/classes-recipe/image.bbclass +0
-3- if qamsg: - imgname = d.getVar('IMAGE_NAME') - bb.fatal("QA errors found whilst validating image:%s\n%s" % (imgname, qamsg))
Quoted 36 lines
Quoted 21 lines
Quoted 21 lines
Quoted 10 lines
meta/classes-recipe/image.bbclass +1
-0+ oe.qa.exit_if_errors(d) } addtask do_image_qa after do_rootfs before do_imagemeta/lib/oe/utils.py +0
-0meta/lib/oe/utils.py def get_multilib_datastore(variant, d): · line 488
Quoted 8 lines
meta/lib/oe/utils.py +1
-1@@ -482,7 +482,7 @@ def get_multilib_datastore(variant, d): localdata.setVar("MLPREFIX", "") return localdata -class ImageQAFailed(Exception): +class ImageQAFailed(bb.BBHandledException): def __init__(self, description, name=None, logfile=None): self.description = description self.name = nameThis caused further issues if I remember correctly.
Quoted 8 lines
Quoted 3 lines
https://git.yoctoproject.org/poky/commit/?id=b0eb2b9b3660dfda1c4c43cfcca6a2c4a84d6dc8
for example.
Thanks for reviewing! I've got that one now and will also take it for styhead.
Steve
Do note that I sent an alternative patch for Styhead that does not remove the ImageQAFailed exception. While I would be happy to see the version that went into master backported, I assumed that removing the ImageQAFailed exception would be considered as a change in behavior and thus not eligible for backporting.
Quoted 8 lines
Quoted 3 lines
The alternative version I created for Styhead can be found here:
https://lists.openembedded.org/g/openembedded-core/message/204982
Since I already took the master version for scarthgap, I'm inclined to take that version for styhead too.
Steve
Yes, in that case anything else would probably be weird.
//Peter
PATCH 18/18 meta-ide-support: Mark recipe as MACHINE-specific
In reply to Steve SakomanFrom: Paul Barker <[email protected]>
meta-ide-support:do_write_test_data dumps the bitbake data dictionary to a file using export2json(). As this obviously includes the value of MACHINE, and other MACHINE-specific variables, the recipe needs to be marked as MACHINE-specific.
RP: Note that this patch does change the name of the environment script since it is no longer package arch specific but machine arch specific.
--- meta/lib/oeqa/selftest/cases/meta_ide.py | 4 ++-- meta/recipes-core/meta/meta-ide-support.bb | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/cases/meta_ide.py +2 -2
@@ -20,8 +20,8 @@ class MetaIDE(OESelftestTestCase): bitbake('meta-ide-support') bitbake('build-sysroots -c build_native_sysroot') bitbake('build-sysroots -c build_target_sysroot') - bb_vars = get_bb_vars(['MULTIMACH_TARGET_SYS', 'DEPLOY_DIR_IMAGE', 'COREBASE']) - cls.environment_script = 'environment-setup-%s' % bb_vars['MULTIMACH_TARGET_SYS'] + bb_vars = get_bb_vars(['MACHINE_ARCH', 'TARGET_VENDOR', 'TARGET_OS', 'DEPLOY_DIR_IMAGE', 'COREBASE']) + cls.environment_script = 'environment-setup-%s%s-%s' % (bb_vars['MACHINE_ARCH'], bb_vars['TARGET_VENDOR'], bb_vars['TARGET_OS']) cls.deploydir = bb_vars['DEPLOY_DIR_IMAGE'] cls.environment_script_path = '%s/%s' % (cls.deploydir, cls.environment_script) cls.corebasedir = bb_vars['COREBASE']
meta/recipes-core/meta/meta-ide-support.bb +1 -0
@@ -1,6 +1,7 @@ SUMMARY = "Integrated Development Environment support" DESCRIPTION = "Meta package for ensuring the build directory contains all appropriate toolchain packages for using an IDE" LICENSE = "MIT" +PACKAGE_ARCH = "${MACHINE_ARCH}" DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native cmake-native autoconf-native automake-native meson-native intltool-native pkgconfig-native" RM_WORK_EXCLUDE += "${PN}"
Signature · 1 line
2.34.1