Skip to contentSkip to conversation

libx11: remove unused patch and FILESEXTRAPATHS

PATCH In review Martin Jansa 3 participants 9 messages May 24, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 libx11: remove unused patch and FILESEXTRAPATHS

* 0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch was removed from SRC_URI in:
https://git.openembedded.org/openembedded-core/commit/?id=e13f651f73db0f26f4645447ab5fa17e36d1903b

---
 ...ak-in-XRegisterIMInstantiateCallback.patch | 57 -------------------
 .../recipes-graphics/xorg-lib/libx11_1.8.4.bb |  6 +-
 2 files changed, 2 insertions(+), 61 deletions(-)
 delete mode 100644 meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch
meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch deleted +0 -57
deleted file mode 100644
index 722116c07e..0000000000
@@ -1,57 +0,0 @@
-CVE: CVE-2022-3554
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <[email protected]>
-
-From 1d11822601fd24a396b354fa616b04ed3df8b4ef Mon Sep 17 00:00:00 2001
-From: "Thomas E. Dickey" <[email protected]>
-Date: Tue, 4 Oct 2022 18:26:17 -0400
-Subject: [PATCH] fix a memory leak in XRegisterIMInstantiateCallback
-
-Analysis:
-
-    _XimRegisterIMInstantiateCallback() opens an XIM and closes it using
-    the internal function pointers, but the internal close function does
-    not free the pointer to the XIM (this would be done in XCloseIM()).
-
-Report/patch:
-
-    Date: Mon, 03 Oct 2022 18:47:32 +0800
-    From: Po Lu <[email protected]>
-    To: [email protected]
-    Subject: Re: Yet another leak in Xlib
-
-    For reference, here's how I'm calling XRegisterIMInstantiateCallback:
-
-    XSetLocaleModifiers ("");
-    XRegisterIMInstantiateCallback (compositor.display,
-                                    XrmGetDatabase (compositor.display),
-                                    (char *) compositor.resource_name,
-                                    (char *) compositor.app_name,
-                                    IMInstantiateCallback, NULL);
-
-    and XMODIFIERS is:
-
-        @im=ibus
-
-Signed-off-by: Thomas E. Dickey <[email protected]>
----
- modules/im/ximcp/imInsClbk.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/modules/im/ximcp/imInsClbk.c b/modules/im/ximcp/imInsClbk.c
-index 95b379cb..c10e347f 100644
---- a/modules/im/ximcp/imInsClbk.c
-+++ b/modules/im/ximcp/imInsClbk.c
-@@ -212,6 +212,9 @@ _XimRegisterIMInstantiateCallback(
-     if( xim ) {
- 	lock = True;
- 	xim->methods->close( (XIM)xim );
-+	/* XIMs must be freed manually after being opened; close just
-+	   does the protocol to deinitialize the IM.  */
-+	XFree( xim );
- 	lock = False;
- 	icb->call = True;
- 	callback( display, client_data, NULL );
--- 
-2.34.1
-
meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb +2 -4
index 7831b4986a..9058c1844e 100644
@@ -18,14 +18,12 @@ DEPENDS += "xorgproto \
 
 PROVIDES = "virtual/libx11"
 
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/libx11:"
-
 PE = "1"
 
 XORG_PN = "libX11"
 
-SRC_URI += "file://disable_tests.patch \
-            "
+SRC_URI += "file://disable_tests.patch"
+
 SRC_URI[sha256sum] = "c9a287a5aefa9804ce3cfafcf516fe96ed3f7e8e45c0e2ee59e84c86757df518"
 
 inherit gettext
Signature · 1 line
2.40.1
#1 lore raw

PATCH 2/6 qemu: remove unused qemu-7.0.0-glibc-2.36.patch

* it was removed from SRC_URI in:
https://git.openembedded.org/openembedded-core/commit/?id=e94d182889ca3c02df913c59f0b66b228ffe588c

---
 .../qemu/qemu/qemu-7.0.0-glibc-2.36.patch     | 46 -------------------
 1 file changed, 46 deletions(-)
 delete mode 100644 meta/recipes-devtools/qemu/qemu/qemu-7.0.0-glibc-2.36.patch
meta/recipes-devtools/qemu/qemu/qemu-7.0.0-glibc-2.36.patch deleted +0 -46
deleted file mode 100644
index abad1cfeeb..0000000000
@@ -1,46 +0,0 @@
-Avoid conflicts between sys/mount.h and linux/mount.h that are seen
-with glibc 2.36
-
-Source: https://github.com/archlinux/svntogit-packages/blob/packages/qemu/trunk/qemu-7.0.0-glibc-2.36.patch
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <[email protected]>
---- a/linux-user/syscall.c
-+++ b/linux-user/syscall.c
-@@ -95,7 +95,25 @@
- #include <linux/soundcard.h>
- #include <linux/kd.h>
- #include <linux/mtio.h>
-+
-+#ifdef HAVE_SYS_MOUNT_FSCONFIG
-+/*
-+ * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h,
-+ * which in turn prevents use of linux/fs.h. So we have to
-+ * define the constants ourselves for now.
-+ */
-+#define FS_IOC_GETFLAGS                _IOR('f', 1, long)
-+#define FS_IOC_SETFLAGS                _IOW('f', 2, long)
-+#define FS_IOC_GETVERSION              _IOR('v', 1, long)
-+#define FS_IOC_SETVERSION              _IOW('v', 2, long)
-+#define FS_IOC_FIEMAP                  _IOWR('f', 11, struct fiemap)
-+#define FS_IOC32_GETFLAGS              _IOR('f', 1, int)
-+#define FS_IOC32_SETFLAGS              _IOW('f', 2, int)
-+#define FS_IOC32_GETVERSION            _IOR('v', 1, int)
-+#define FS_IOC32_SETVERSION            _IOW('v', 2, int)
-+#else
- #include <linux/fs.h>
-+#endif
- #include <linux/fd.h>
- #if defined(CONFIG_FIEMAP)
- #include <linux/fiemap.h>
---- a/meson.build
-+++ b/meson.build
-@@ -1686,6 +1686,8 @@ config_host_data.set('HAVE_OPTRESET',
-                      cc.has_header_symbol('getopt.h', 'optreset'))
- config_host_data.set('HAVE_IPPROTO_MPTCP',
-                      cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP'))
-+config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG',
-+                     cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG'))
- 
- # has_member
- config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID',
Signature · 1 line
2.40.1
#2 lore raw

PATCH 3/6 minicom: remove unused patch files

In reply to Martin Jansa

* they were removed from SRC_URI in:
https://git.openembedded.org/openembedded-core/commit/?id=41f8760dd8a8ac388389bc17dbc5e0ae0f64bf57

---
 ...erfluous-global-variable-definitions.patch | 35 ----------------
 ...erfluous-global-variable-definitions.patch | 37 ----------------
 ...erfluous-global-variable-definitions.patch | 42 -------------------
 3 files changed, 114 deletions(-)
 delete mode 100644 meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch
 delete mode 100644 meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch
 delete mode 100644 meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch
meta/recipes-extended/minicom/minicom/0001-Drop-superfluous-global-variable-definitions.patch deleted +0 -35
deleted file mode 100644
index 01b23898e7..0000000000
@@ -1,35 +0,0 @@
-From b65152ebc03832972115e6d98e50cb6190d01793 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <[email protected]>
-Date: Mon, 3 Feb 2020 13:18:13 +0100
-Subject: [PATCH 1/3] Drop superfluous global variable definitions
-
-The file minicom.c, by including the minicom.h header, already defines
-the global variables 'dial_user' and 'dial_pass'. The object file
-minicom.o is always linked to dial.o. Thus the definitions in dial.c
-can be dropped.
-
-This fixes linking with gcc 10 which uses -fno-common by default,
-disallowing multiple global variable definitions.
-
-Upstream-Status: Backport [https://salsa.debian.org/minicom-team/minicom/-/commit/db269bba2a68fde03f5df45ac8372a8f1248ca96]
-Signed-off-by: Khem Raj <[email protected]>
----
- src/dial.c | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/src/dial.c b/src/dial.c
-index eada5ee..d9d481f 100644
---- a/src/dial.c
-+++ b/src/dial.c
-@@ -146,8 +146,6 @@ static int newtype;
- /* Access to ".dialdir" denied? */
- static int dendd = 0;
- static char *tagged;
--char *dial_user;
--char *dial_pass;
- 
- /* Change the baud rate.  Treat all characters in the given array as if
-  * they were key presses within the comm parameters dialog (C-A P) and
--- 
-2.24.1
-
meta/recipes-extended/minicom/minicom/0002-Drop-superfluous-global-variable-definitions.patch deleted +0 -37
deleted file mode 100644
index e86b470b7e..0000000000
@@ -1,37 +0,0 @@
-From 924bd2da3a00e030e29d82b74ef82900bd50b475 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <[email protected]>
-Date: Mon, 3 Feb 2020 13:18:33 +0100
-Subject: [PATCH 2/3] Drop superfluous global variable definitions
-
-The only place where the EXTERN macro mechanism is used to define the
-global variables 'vt_outmap' and 'vt_inmap' is minicom.c (by defining
-an empty EXTERN macro and including the minicom.h header). The file
-vt100.c already defines these variables. The vt100.o object file is
-always linked to minicom.o. Thus it is safe not to define the
-variables in minicom.c and only declare them in the minicom.h header.
-
-This fixes linking with gcc 10 which uses -fno-common by default,
-disallowing multiple global variable definitions.
-
-Upstream-Status: Backport [https://salsa.debian.org/minicom-team/minicom/-/commit/c69cad5b5dda85d361a3a0c1fddc65e933f26d11]
-Signed-off-by: Khem Raj <[email protected]>
----
- src/minicom.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/minicom.h b/src/minicom.h
-index 061c013..0f9693b 100644
---- a/src/minicom.h
-+++ b/src/minicom.h
-@@ -141,7 +141,7 @@ EXTERN int sbcolor;     /* Status Bar Background Color */
- EXTERN int st_attr;	/* Status Bar attributes. */
- 
- /* jl 04.09.97 conversion tables */
--EXTERN unsigned char vt_outmap[256], vt_inmap[256];
-+extern unsigned char vt_outmap[256], vt_inmap[256];
- 
- /* MARK updated 02/17/95 - history buffer */
- EXTERN int num_hist_lines;  /* History buffer size */
--- 
-2.24.1
-
meta/recipes-extended/minicom/minicom/0003-Drop-superfluous-global-variable-definitions.patch deleted +0 -42

42 lines not on this page · raw message

Signature · 1 line
2.40.1
#3 lore raw

PATCH 4/6 inetutils: remove unused patch files

In reply to Martin Jansa

* they were removed from SRC_URI in:
https://git.openembedded.org/openembedded-core/commit/?id=a21e8fdf1b66961ddae5929d393daa08800bb748

---
 ...-multiple-definitions-of-errcatch-an.patch | 58 -------------------
 .../inetutils/fix-buffer-fortify-tfpt.patch   | 25 --------
 2 files changed, 83 deletions(-)
 delete mode 100644 meta/recipes-connectivity/inetutils/inetutils/0001-ftpd-telnetd-Fix-multiple-definitions-of-errcatch-an.patch
 delete mode 100644 meta/recipes-connectivity/inetutils/inetutils/fix-buffer-fortify-tfpt.patch
meta/recipes-connectivity/inetutils/inetutils/0001-ftpd-telnetd-Fix-multiple-definitions-of-errcatch-an.patch deleted +0 -58
deleted file mode 100644
index 49d319f59d..0000000000
@@ -1,58 +0,0 @@
-From 7d39930468e272c740b0eed3c7e5b7fb3abf29e8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Wed, 5 Aug 2020 10:36:22 -0700
-Subject: [PATCH] ftpd,telnetd: Fix multiple definitions of errcatch and not42
-
-This helps fix build failures when -fno-common option is used
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <[email protected]>
-
-Signed-off-by: Khem Raj <[email protected]>
----
- ftpd/extern.h     | 2 +-
- ftpd/ftpcmd.c     | 1 +
- telnetd/utility.c | 2 +-
- 3 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/ftpd/extern.h b/ftpd/extern.h
-index ab33cf3..91dbbee 100644
---- a/ftpd/extern.h
-+++ b/ftpd/extern.h
-@@ -90,7 +90,7 @@ extern void user (const char *);
- extern char *sgetsave (const char *);
- 
- /* Exported from ftpd.c.  */
--jmp_buf errcatch;
-+extern jmp_buf errcatch;
- extern struct sockaddr_storage data_dest;
- extern socklen_t data_dest_len;
- extern struct sockaddr_storage his_addr;
-diff --git a/ftpd/ftpcmd.c b/ftpd/ftpcmd.c
-index beb1f06..d272e9d 100644
---- a/ftpd/ftpcmd.c
-+++ b/ftpd/ftpcmd.c
-@@ -106,6 +106,7 @@
- #endif
- 
- off_t restart_point;
-+jmp_buf errcatch;
- 
- static char cbuf[512];           /* Command Buffer.  */
- static char *fromname;
-diff --git a/telnetd/utility.c b/telnetd/utility.c
-index e7ffb8e..46bf91e 100644
---- a/telnetd/utility.c
-+++ b/telnetd/utility.c
-@@ -63,7 +63,7 @@ static int ncc;
- static char ptyibuf[BUFSIZ], *ptyip;
- static int pcc;
- 
--int not42;
-+extern int not42;
- 
- static int
- readstream (int p, char *ibuf, int bufsize)
--- 
-2.28.0
-
meta/recipes-connectivity/inetutils/inetutils/fix-buffer-fortify-tfpt.patch deleted +0 -25
deleted file mode 100644
index a91913cb51..0000000000
@@ -1,25 +0,0 @@
-tftpd: Fix abort on error path
-
-When trying to fetch a non existent file, the app crashes with:
-
-*** buffer overflow detected ***: 
-Aborted
-
-
-Upstream-Status: Submitted [https://www.mail-archive.com/[email protected]/msg03036.html https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91205]
-Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
-diff --git a/src/tftpd.c b/src/tftpd.c
-index 56002a0..144012f 100644
---- a/src/tftpd.c
-+++ b/src/tftpd.c
-@@ -864,9 +864,8 @@ nak (int error)
-       pe->e_msg = strerror (error - 100);
-       tp->th_code = EUNDEF;	/* set 'undef' errorcode */
-     }
--  strcpy (tp->th_msg, pe->e_msg);
-   length = strlen (pe->e_msg);
--  tp->th_msg[length] = '\0';
-+  memcpy(tp->th_msg, pe->e_msg, length + 1);
-   length += 5;
-   if (sendto (peer, buf, length, 0, (struct sockaddr *) &from, fromlen) != length)
-     syslog (LOG_ERR, "nak: %m\n");
Signature · 1 line
2.40.1
#4 lore raw

PATCH 5/6 libgloss: remove unused patch file

In reply to Martin Jansa

* it was removed from SRC_URI in:
https://git.openembedded.org/openembedded-core/commit/?id=1c9cbb27dfe37ca4574c4285fb03ce394dee5ed1

---
 .../libgloss/fix_makefile_include_arm_h.patch | 30 -------------------
 1 file changed, 30 deletions(-)
 delete mode 100644 meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch
meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch deleted +0 -30
deleted file mode 100644
index 7645be7314..0000000000
@@ -1,30 +0,0 @@
-Upstream-Status: Inappropriate  [OE-Specific]
-
-When trying to build libgloss for an arm target, the build system
-complains about missing some include files:
-
-| fatal error: acle-compiat.h: No such file or directory
-|  #include "acle-compat.h"
-|           ^~~~~~~~~~~~~~~
-| compilation terminated.
-
-These include files come from the newlib source, but since we
-are building libgloss separately from newlib, libgloss is unaware
-of where they are, this patch fixes the INCLUDES so the build system
-can find such files.
-
-Signed-off-by: Alejandro Enedino Hernandez Samaniego <[email protected]>
-
-Index: newlib-3.0.0/libgloss/config/default.mh
-===================================================================
---- newlib-3.0.0.orig/libgloss/config/default.mh
-+++ newlib-3.0.0/libgloss/config/default.mh
-@@ -1,7 +1,7 @@
- NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
- NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`
- 
--INCLUDES = -I. -I$(srcdir)/..
-+INCLUDES = -I. -I$(srcdir)/.. -I$(srcdir)/../newlib/libc/machine/arm
- # Note that when building the library, ${MULTILIB} is not the way multilib
- # options are passed; they're passed in $(CFLAGS).
- CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
Signature · 1 line
2.40.1
#5 lore raw

PATCH 6/6 kmod: remove unused ptest.patch

In reply to Martin Jansa

* it was removed from SRC_URI in 2015:
https://git.openembedded.org/openembedded-core/commit/?id=f80d136bdd578468035a88125fa1b84973fd912b

---
 meta/recipes-kernel/kmod/kmod/ptest.patch | 25 -----------------------
 1 file changed, 25 deletions(-)
 delete mode 100644 meta/recipes-kernel/kmod/kmod/ptest.patch
meta/recipes-kernel/kmod/kmod/ptest.patch deleted +0 -25
deleted file mode 100644
index 831dbcb909..0000000000
@@ -1,25 +0,0 @@
-Add 'install-ptest' rule.
-
-Signed-off-by: Tudor Florea <[email protected]>
-Upstream-Status: Pending
-
-diff -ruN a/Makefile.am b/Makefile.am
---- a/Makefile.am	2013-07-12 17:11:05.278331557 +0200
-+++ b/Makefile.am	2013-07-12 17:14:27.033788016 +0200
-@@ -204,6 +204,16 @@
- 
- distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
- 
-+install-ptest:
-+	@$(MKDIR_P) $(DESTDIR)/testsuite
-+	@for file in $(TESTSUITE); do \
-+		install $$file $(DESTDIR)/testsuite; \
-+	done;
-+	@sed -e 's/^Makefile/_Makefile/' < Makefile > $(DESTDIR)/Makefile
-+	@$(MKDIR_P) $(DESTDIR)/tools
-+	@cp $(noinst_SCRIPTS) $(noinst_PROGRAMS) $(DESTDIR)/tools
-+	@cp -r testsuite/rootfs testsuite/.libs $(DESTDIR)/testsuite
-+
- # ------------------------------------------------------------------------------
- # custom release helpers
- # ------------------------------------------------------------------------------
Signature · 1 line
2.40.1
#6 lore raw
In reply to Martin Jansa

Do you have a script to find these patches? Can we get it added to oe-core? :)

Ross

Quoted 109 lines · Martin Jansa via lists.openembedded.org

* 0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch was removed from SRC_URI in:
https://git.openembedded.org/openembedded-core/commit/?id=e13f651f73db0f26f4645447ab5fa17e36d1903b

---
...ak-in-XRegisterIMInstantiateCallback.patch | 57 ------------------- .../recipes-graphics/xorg-lib/libx11_1.8.4.bb | 6 +-

2 files changed, 2 insertions(+), 61 deletions(-)

delete mode 100644 meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch

meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch deleted +0 -57
deleted file mode 100644
index 722116c07e..0000000000
@@ -1,57 +0,0 @@
-CVE: CVE-2022-3554
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <[email protected]>
-
-From 1d11822601fd24a396b354fa616b04ed3df8b4ef Mon Sep 17 00:00:00 2001
-From: "Thomas E. Dickey" <[email protected]>
-Date: Tue, 4 Oct 2022 18:26:17 -0400
-Subject: [PATCH] fix a memory leak in XRegisterIMInstantiateCallback
-
-Analysis:
-
-    _XimRegisterIMInstantiateCallback() opens an XIM and closes it using
-    the internal function pointers, but the internal close function does
-    not free the pointer to the XIM (this would be done in XCloseIM()).
-
-Report/patch:
-
-    Date: Mon, 03 Oct 2022 18:47:32 +0800
-    From: Po Lu <[email protected]>
-    To: [email protected]
-    Subject: Re: Yet another leak in Xlib
-
-    For reference, here's how I'm calling XRegisterIMInstantiateCallback:
-
-    XSetLocaleModifiers ("");
-    XRegisterIMInstantiateCallback (compositor.display,
-                                    XrmGetDatabase (compositor.display),
-                                    (char *) compositor.resource_name,
-                                    (char *) compositor.app_name,
-                                    IMInstantiateCallback, NULL);
-
-    and XMODIFIERS is:
-
-        @im=ibus
-
-Signed-off-by: Thomas E. Dickey <[email protected]>
----
- modules/im/ximcp/imInsClbk.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/modules/im/ximcp/imInsClbk.c b/modules/im/ximcp/imInsClbk.c
-index 95b379cb..c10e347f 100644
---- a/modules/im/ximcp/imInsClbk.c
-+++ b/modules/im/ximcp/imInsClbk.c
-@@ -212,6 +212,9 @@ _XimRegisterIMInstantiateCallback(
-     if( xim ) {
- lock = True;
- xim->methods->close( (XIM)xim );
-+ /* XIMs must be freed manually after being opened; close just
-+   does the protocol to deinitialize the IM.  */
-+ XFree( xim );
- lock = False;
- icb->call = True;
- callback( display, client_data, NULL );
--- 
-2.34.1
-
meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb +0 -0
index 7831b4986a..9058c1844e 100644
@@ -18,14 +18,12 @@ DEPENDS += "xorgproto \
 

PROVIDES = "virtual/libx11"

meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb +0 -2
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/libx11:"
-

PE = "1"

XORG_PN = "libX11"

meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb +2 -2
-SRC_URI += "file://disable_tests.patch \
-            "
+SRC_URI += "file://disable_tests.patch"
+

SRC_URI[sha256sum] = "c9a287a5aefa9804ce3cfafcf516fe96ed3f7e8e45c0e2ee59e84c86757df518"

inherit gettext

Signature · 10 lines
2.40.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181661): https://lists.openembedded.org/g/openembedded-core/message/181661
Mute This Topic: https://lists.openembedded.org/mt/99104244/6875888
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
#7 lore raw

I was using
https://github.com/ros/meta-ros/blob/master/scripts/check-patch-files.sh
which is far from ideal and has many false positives e.g. you have a .bbappend which sets FILESEXTRAPATHS, but doesn't add the .patch files to SRC_URI because they are already there from the main recipe or other .bbappend in upper layer and also if the .patch files are in subdirectorie (e.g. android-tools recipes in meta-oe).

Probably not good enough to include in oe-core, but better than nothing, maybe add something like this to patchreview script?

Quoted 128 lines · Ross Burton

Do you have a script to find these patches? Can we get it added to oe-core? :)

Ross

Quoted 1 line

On 24 May 2023, at 08:53, Martin Jansa via lists.openembedded.org

Quoted 2 lines · <[email protected]> wrote:

* 0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch was

removed

Quoted 2 lines

from SRC_URI in:

https://git.openembedded.org/openembedded-core/commit/?id=e13f651f73db0f26f4645447ab5fa17e36d1903b

Quoted 7 lines

---
...ak-in-XRegisterIMInstantiateCallback.patch | 57 ------------------- .../recipes-graphics/xorg-lib/libx11_1.8.4.bb | 6 +-

2 files changed, 2 insertions(+), 61 deletions(-)

delete mode 100644

meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch

Quoted 2 lines

diff --git

a/meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch b/meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch

Quoted 3 lines

deleted file mode 100644
index 722116c07e..0000000000
---

a/meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch

Quoted 15 lines

+++ /dev/null

meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch deleted +0 -13
@@ -1,57 +0,0 @@
-CVE: CVE-2022-3554
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <[email protected]>
-
-From 1d11822601fd24a396b354fa616b04ed3df8b4ef Mon Sep 17 00:00:00 2001
-From: "Thomas E. Dickey" <[email protected]>
-Date: Tue, 4 Oct 2022 18:26:17 -0400
-Subject: [PATCH] fix a memory leak in XRegisterIMInstantiateCallback
-
-Analysis:
-
-    _XimRegisterIMInstantiateCallback() opens an XIM and closes it using
-    the internal function pointers, but the internal close function does

meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch line 23

Quoted 10 lines
meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch deleted +0 -10
-    not free the pointer to the XIM (this would be done in XCloseIM()).
-
-Report/patch:
-
-    Date: Mon, 03 Oct 2022 18:47:32 +0800
-    From: Po Lu <[email protected]>
-    To: [email protected]
-    Subject: Re: Yet another leak in Xlib
-
-    For reference, here's how I'm calling

XRegisterIMInstantiateCallback:

Review

Quoted 35 lines
meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch deleted +0 -34
-
-    XSetLocaleModifiers ("");
-    XRegisterIMInstantiateCallback (compositor.display,
-                                    XrmGetDatabase (compositor.display),
-                                    (char *) compositor.resource_name,
-                                    (char *) compositor.app_name,
-                                    IMInstantiateCallback, NULL);
-
-    and XMODIFIERS is:
-
-        @im=ibus
-
-Signed-off-by: Thomas E. Dickey <[email protected]>
----
- modules/im/ximcp/imInsClbk.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/modules/im/ximcp/imInsClbk.c b/modules/im/ximcp/imInsClbk.c
-index 95b379cb..c10e347f 100644
---- a/modules/im/ximcp/imInsClbk.c
-+++ b/modules/im/ximcp/imInsClbk.c
-@@ -212,6 +212,9 @@ _XimRegisterIMInstantiateCallback(
-     if( xim ) {
- lock = True;
- xim->methods->close( (XIM)xim );
-+ /* XIMs must be freed manually after being opened; close just
-+   does the protocol to deinitialize the IM.  */
-+ XFree( xim );
- lock = False;
- icb->call = True;
- callback( display, client_data, NULL );
---
-2.34.1
-
(quoted diff) +0 -0

b/meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb

Quoted 17 lines

index 7831b4986a..9058c1844e 100644

meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb +0 -0
@@ -18,14 +18,12 @@ DEPENDS += "xorgproto \
 

PROVIDES = "virtual/libx11"

meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb +0 -2
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/libx11:"
-

PE = "1"

XORG_PN = "libX11"

meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb +2 -2
-SRC_URI += "file://disable_tests.patch \
-            "
+SRC_URI += "file://disable_tests.patch"
+
Quoted 1 line

SRC_URI[sha256sum] =

"c9a287a5aefa9804ce3cfafcf516fe96ed3f7e8e45c0e2ee59e84c86757df518"

Quoted 9 lines

inherit gettext
--
2.40.1

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

https://lists.openembedded.org/g/openembedded-core/message/181661

Quoted 3 lines

Mute This Topic: https://lists.openembedded.org/mt/99104244/6875888
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [

[email protected]]

Quoted 2 lines

-=-=-=-=-=-=-=-=-=-=-=-

#8 lore raw

Nice, love this patch series!

Quoted 148 lines · Martin Jansa

I was using
https://github.com/ros/meta-ros/blob/master/scripts/check-patch-files.sh
which is far from ideal and has many false positives e.g. you have a .bbappend which sets FILESEXTRAPATHS, but doesn't add the .patch files to SRC_URI because they are already there from the main recipe or other .bbappend in upper layer and also if the .patch files are in subdirectorie (e.g. android-tools recipes in meta-oe).

Probably not good enough to include in oe-core, but better than nothing, maybe add something like this to patchreview script?

Quoted 106 lines · Ross Burton

Do you have a script to find these patches? Can we get it added to oe-core? :)

Ross

Quoted 1 line

On 24 May 2023, at 08:53, Martin Jansa via lists.openembedded.org

Quoted 2 lines · <[email protected]> wrote:

* 0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch was

removed

Quoted 2 lines

from SRC_URI in:

https://git.openembedded.org/openembedded-core/commit/?id=e13f651f73db0f26f4645447ab5fa17e36d1903b

Quoted 7 lines

---
...ak-in-XRegisterIMInstantiateCallback.patch | 57 ------------------- .../recipes-graphics/xorg-lib/libx11_1.8.4.bb | 6 +-

2 files changed, 2 insertions(+), 61 deletions(-)

delete mode 100644

meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch

Quoted 2 lines

diff --git

a/meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch b/meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch

Quoted 3 lines

deleted file mode 100644
index 722116c07e..0000000000
---

a/meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch

Quoted 4 lines

+++ /dev/null

meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch deleted +0 -2
@@ -1,57 +0,0 @@
-CVE: CVE-2022-3554
-Upstream-Status: Backport

meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch line 12

Quoted 10 lines
meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch deleted +0 -10
-Signed-off-by: Ross Burton <[email protected]>
-
-From 1d11822601fd24a396b354fa616b04ed3df8b4ef Mon Sep 17 00:00:00 2001
-From: "Thomas E. Dickey" <[email protected]>
-Date: Tue, 4 Oct 2022 18:26:17 -0400
-Subject: [PATCH] fix a memory leak in XRegisterIMInstantiateCallback
-
-Analysis:
-
-    _XimRegisterIMInstantiateCallback() opens an XIM and closes it

using

Review line 13

Quoted 1 line
(quoted diff) +0 -1
-    the internal function pointers, but the internal close function

does

meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch

Quoted 10 lines
meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch deleted +0 -10
-    not free the pointer to the XIM (this would be done in XCloseIM()).
-
-Report/patch:
-
-    Date: Mon, 03 Oct 2022 18:47:32 +0800
-    From: Po Lu <[email protected]>
-    To: [email protected]
-    Subject: Re: Yet another leak in Xlib
-
-    For reference, here's how I'm calling

XRegisterIMInstantiateCallback:

meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch

Quoted 4 lines
meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch deleted +0 -4
-
-    XSetLocaleModifiers ("");
-    XRegisterIMInstantiateCallback (compositor.display,
-                                    XrmGetDatabase

(compositor.display),

Quoted 4 lines
meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch deleted +0 -4
-                                    (char *) compositor.resource_name,
-                                    (char *) compositor.app_name,
-                                    IMInstantiateCallback, NULL);
-

meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch

Quoted 10 lines
meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch deleted +0 -10
-    and XMODIFIERS is:
-
-        @im=ibus
-
-Signed-off-by: Thomas E. Dickey <[email protected]>
----
- modules/im/ximcp/imInsClbk.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/modules/im/ximcp/imInsClbk.c

b/modules/im/ximcp/imInsClbk.c

Review

Quoted 17 lines
meta/recipes-graphics/xorg-lib/libx11/0001-fix-a-memory-leak-in-XRegisterIMInstantiateCallback.patch deleted +0 -16
-index 95b379cb..c10e347f 100644
---- a/modules/im/ximcp/imInsClbk.c
-+++ b/modules/im/ximcp/imInsClbk.c
-@@ -212,6 +212,9 @@ _XimRegisterIMInstantiateCallback(
-     if( xim ) {
- lock = True;
- xim->methods->close( (XIM)xim );
-+ /* XIMs must be freed manually after being opened; close just
-+   does the protocol to deinitialize the IM.  */
-+ XFree( xim );
- lock = False;
- icb->call = True;
- callback( display, client_data, NULL );
---
-2.34.1
-
(quoted diff) +0 -0

b/meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb

Quoted 11 lines

index 7831b4986a..9058c1844e 100644

meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb +0 -0
@@ -18,14 +18,12 @@ DEPENDS += "xorgproto \
 

PROVIDES = "virtual/libx11"

meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb +0 -2
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/libx11:"
-

PE = "1"

Quoted 18 lines
Quoted 7 lines

XORG_PN = "libX11"

meta/recipes-graphics/xorg-lib/libx11_1.8.4.bb +2 -2
-SRC_URI += "file://disable_tests.patch \
-            "
+SRC_URI += "file://disable_tests.patch"
+

SRC_URI[sha256sum] =

"c9a287a5aefa9804ce3cfafcf516fe96ed3f7e8e45c0e2ee59e84c86757df518"

Quoted 8 lines

inherit gettext
--
2.40.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#181681):
https://lists.openembedded.org/g/openembedded-core/message/181681
Mute This Topic: https://lists.openembedded.org/mt/99104244/3617123
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 4 lines
Christopher Larson
[email protected], [email protected], [email protected]
Principal Software Engineer, Embedded Linux Solutions, Siemens Digital
Industries Software