Skip to contentSkip to conversation

pseudo: Backport fixes for glibc 2.33

PATCH New Andrei Gherzan 1 participant 4 messages Feb 20, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 pseudo: Backport fixes for glibc 2.33

From: Andrei Gherzan <[email protected]>

---
 ...h-Fix-pseudo-to-work-with-glibc-2.33.patch | 46 +++++++++++
 ...wrapper-for-fstatat-fstatat64-in-gli.patch | 77 +++++++++++++++++++
 meta/recipes-devtools/pseudo/pseudo_git.bb    |  2 +
 3 files changed, 125 insertions(+)
 create mode 100644 meta/recipes-devtools/pseudo/files/0001-linux-portdefs.h-Fix-pseudo-to-work-with-glibc-2.33.patch
 create mode 100644 meta/recipes-devtools/pseudo/files/0002-ports-linux-Add-wrapper-for-fstatat-fstatat64-in-gli.patch
meta/recipes-devtools/pseudo/files/0001-linux-portdefs.h-Fix-pseudo-to-work-with-glibc-2.33.patch new file +46 -0
new file mode 100644
index 0000000000..7347e13a7d
@@ -0,0 +1,46 @@
+From 3a72456779ff958ab9db274eab665ddb5333d9b2 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <[email protected]>
+Date: Fri, 5 Feb 2021 08:19:01 +0000
+Subject: [PATCH 3/3] linux/portdefs.h: Fix pseudo to work with glibc 2.33
+
+In glibc 2.33, they've removed the _STAT_VER and _MKNOD_VER definitions
+from public headers. They have no plans to add these back so pseudo needs
+to attempt its own definitions. There is some protection as if they were
+wrong and there was a mismatch, we'd get an error art runtime.
+
+Signed-off-by: Richard Purdie <[email protected]>
+Upstream-Status: Backported [oe-core branch]
+---
+ ports/linux/portdefs.h | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/ports/linux/portdefs.h b/ports/linux/portdefs.h
+index a92e969..9545550 100644
+--- a/ports/linux/portdefs.h
++++ b/ports/linux/portdefs.h
+@@ -34,3 +34,22 @@ GLIBC_COMPAT_SYMBOL(memcpy,2.0);
+ #include <sys/syscall.h>
+ #include <sys/prctl.h>
+ #include <linux/seccomp.h>
++
++#ifndef _STAT_VER
++#if defined (__aarch64__)
++#define _STAT_VER 0
++#elif defined (__x86_64__)
++#define _STAT_VER 1
++#else
++#define _STAT_VER 3
++#endif
++#endif
++#ifndef _MKNOD_VER
++#if defined (__aarch64__)
++#define _MKNOD_VER 0
++#elif defined (__x86_64__)
++#define _MKNOD_VER 0
++#else
++#define _MKNOD_VER 1
++#endif
++#endif
+-- 
+2.30.1
+
meta/recipes-devtools/pseudo/files/0002-ports-linux-Add-wrapper-for-fstatat-fstatat64-in-gli.patch new file +77 -0

77 lines not on this page · raw message

meta/recipes-devtools/pseudo/pseudo_git.bb +2 -0
index 0ba7b50355..173c5cfbe3 100644
@@ -4,6 +4,8 @@ SRC_URI = "git://git.yoctoproject.org/pseudo;branch=oe-core \
            file://0001-configure-Prune-PIE-flags.patch \
            file://fallback-passwd \
            file://fallback-group \
+           file://0001-linux-portdefs.h-Fix-pseudo-to-work-with-glibc-2.33.patch \
+           file://0002-ports-linux-Add-wrapper-for-fstatat-fstatat64-in-gli.patch \
            "
 
 SRCREV = "8317c0ab172db47dabcef909bae02cd77b1f1010"
Signature · 1 line
2.30.1
#1 lore raw

PATCH 2/4 oe/recipeutils: Fix copying patches when BBLAYERS entries are not normalised

From: Andrei Gherzan <[email protected]>

devtool uses copy_recipe_files for the upgrade operation when creating the new, workspace recipe. Before handling the copy operations, the function checks the entry in SRC_URI against FILE while in turn uses absolute paths. When BBLAYERS contains entries that are not normalised, this check will fail resulting in having the recipe in the workspace without the initial patches.

---
 meta/lib/oe/recipeutils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/recipeutils.py +1 -1
index fde1ad3ddd..f36a2fb0ac 100644
@@ -409,7 +409,7 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True, all_variants=F
                 fetch.download()
             for pth in fetch.localpaths():
                 if pth not in localpaths:
-                    localpaths.append(pth)
+                    localpaths.append(os.path.abspath(pth))
             uri_values.append(srcuri)
 
     fetch_urls(d)
Signature · 1 line
2.30.1
#2 lore raw

PATCH 3/4 oeqa/commands: Fix compatibility with python 3.9

In reply to Andrei Gherzan

From: Richard Purdie <[email protected]>

Python 3.9 dropped isAlive() so use the preferred is_alive().

(From OE-Core rev: 9bb06428cbb2ac0f3d98a1696f050d3393385503)

---
 meta/lib/oeqa/utils/commands.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/utils/commands.py +2 -2
index 8b3e12038d..a71c16ab14 100644
@@ -125,11 +125,11 @@ class Command(object):
 
     def stop(self):
         for thread in self.threads:
-            if thread.isAlive():
+            if thread.is_alive():
                 self.process.terminate()
             # let's give it more time to terminate gracefully before killing it
             thread.join(5)
-            if thread.isAlive():
+            if thread.is_alive():
                 self.process.kill()
                 thread.join()
 
Signature · 1 line
2.30.1
#3 lore raw

PATCH 4/4 qemu: Backport patch to avoid assertion fails on icache line size

In reply to Andrei Gherzan

From: Andrei Gherzan <[email protected]>

Due to a bug in glibc 2.33, the value of the icache line size is now reported as unsupported option. This breaks qemu at runtime with:

cacheinfo.c:182: init_cache_info: Assertion `(isize & (isize - 1)) == 0' failed.
Aborted (core dumped)

We haven't caught this one yet because we were already on qemu 5.2.0 when we started to play with glibc 2.33 so it was only reproducible on dunfell.

---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 ...fix-crash-when-compiling-with-uClibc.patch | 48 +++++++++++++++++++
 2 files changed, 49 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/0012-util-cacheinfo-fix-crash-when-compiling-with-uClibc.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
index 7a963ad57c..a1a418374f 100644
@@ -28,6 +28,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://0009-Fix-webkitgtk-builds.patch \
            file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \
            file://0011-hw-i386-pc-fix-regression-in-parsing-vga-cmdline-par.patch \
+           file://0012-util-cacheinfo-fix-crash-when-compiling-with-uClibc.patch \
            file://CVE-2019-15890.patch \
            file://CVE-2020-1711.patch \
            file://CVE-2020-7039-1.patch \
meta/recipes-devtools/qemu/qemu/0012-util-cacheinfo-fix-crash-when-compiling-with-uClibc.patch new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
2.30.1