All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/2] p7zip: refresh patches with devtool to apply cleanly
@ 2021-05-29  9:51 Martin Jansa
  2021-05-29  9:51 ` [meta-oe][PATCH 2/2] gtkwave: set REQUIRED_DISTRO_FEATURES only to wayland Martin Jansa
       [not found] ` <168380C770F967C6.28811@lists.openembedded.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Martin Jansa @ 2021-05-29  9:51 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Martin Jansa

change_numMethods_from_bool_to_unsigned.patch added in:
https://git.openembedded.org/meta-openembedded/commit/?id=3c36a8efe2a964c3aa9bfcd836cee3f80a837fcd
doesn't apply cleanly:

ERROR: p7zip-16.02-r0 do_patch: Fuzz detected:

Applying patch change_numMethods_from_bool_to_unsigned.patch
patching file CPP/7zip/Archive/Wim/WimHandler.cpp
Hunk #1 succeeded at 298 with fuzz 1.

The context lines in the patches can be updated with devtool:

    devtool modify p7zip
    devtool finish --force-patch-refresh p7zip <layer_path>

Don't forget to review changes done by devtool!

ERROR: p7zip-16.02-r0 do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 ...Fix-narrowing-errors-Wc-11-narrowing.patch |  3 ++-
 .../p7zip/files/CVE-2017-17969.patch          | 13 +++++++++--
 ...nge_numMethods_from_bool_to_unsigned.patch | 23 +++++++++++++------
 ...t_override_compiler_and_do_not_strip.patch | 16 +++++++++----
 4 files changed, 41 insertions(+), 14 deletions(-)

diff --git a/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch b/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch
index ae27517458..1f08d1603a 100644
--- a/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch
+++ b/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch
@@ -1,4 +1,4 @@
-From b6b1782af4aa7f9084d32e4144738dc2535c8d6f Mon Sep 17 00:00:00 2001
+From 653674e11872465dd5edf1c1e8413ea813d7e086 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 23 Apr 2018 23:07:21 -0700
 Subject: [PATCH] Fix narrowing errors -Wc++11-narrowing
@@ -17,6 +17,7 @@ also reported here https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224930
 Upstream-Status: Pending
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
  CPP/Windows/ErrorMsg.cpp | 14 +++++++-------
  1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch b/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch
index 177d1455f8..9ba1078071 100644
--- a/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch
+++ b/meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch
@@ -1,4 +1,7 @@
-p7zip: Fix CVE-2017-17969
+From 7f2da4f810b429ddb7afa0e252e3d02ced0eba87 Mon Sep 17 00:00:00 2001
+From: Radovan Scasny <radovan.scasny@siemens.com>
+Date: Tue, 20 Feb 2018 12:08:13 +0100
+Subject: [PATCH] p7zip: Fix CVE-2017-17969
 
 [No upstream tracking] -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888297
 
@@ -8,12 +11,18 @@ Compress/ShrinkDecoder.cpp: Heap-based buffer overflow
 in the NCompress::NShrink::CDecoder::CodeReal method
 in 7-Zip before 18.00 and p7zip allows remote attackers
 to cause a denial of service (out-of-bounds write)
-or potentially execute arbitrary code via a crafted ZIP archive. 
+or potentially execute arbitrary code via a crafted ZIP archive.
 
 Upstream-Status: Backport [https://sourceforge.net/p/p7zip/bugs/_discuss/thread/0920f369/8316/attachment/CVE-2017-17969.patch]
 CVE: CVE-2017-17969
 Signed-off-by: Radovan Scasny <radovan.scasny@siemens.com>
 
+---
+ CPP/7zip/Compress/ShrinkDecoder.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/CPP/7zip/Compress/ShrinkDecoder.cpp b/CPP/7zip/Compress/ShrinkDecoder.cpp
+index 80b7e67..5bb0559 100644
 --- a/CPP/7zip/Compress/ShrinkDecoder.cpp
 +++ b/CPP/7zip/Compress/ShrinkDecoder.cpp
 @@ -121,7 +121,12 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *
diff --git a/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch b/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch
index edde525933..93eb0588c0 100644
--- a/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch
+++ b/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch
@@ -1,4 +1,7 @@
-fixes the below error
+From 0820ef4b9238c1e39ae5bda32cc08cce3fd3ce89 Mon Sep 17 00:00:00 2001
+From: Nisha Parrakat <Nisha.Parrakat@kpit.com>
+Date: Wed, 26 May 2021 19:59:28 +0000
+Subject: [PATCH] fixes the below error
 
 | ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp: In member function 'virtual LONG NArchive::NWim::CHandler::GetArchiveProperty(PROPID, PROPVARIANT*)':
 | ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:308:11: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
@@ -7,19 +10,25 @@ fixes the below error
 | ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:318:9: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
 |   318 |         numMethods++;
 
-
 use unsigned instead of bool
 Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
 
 Upstream-Status: Pending
---- ./CPP/7zip/Archive/Wim/WimHandler.cpp       2021-05-20 10:51:56.997402701 +0000
-+++ ./CPP/7zip/Archive/Wim/WimHandler.cpp       2021-05-20 10:52:16.665604125 +0000
-@@ -298,7 +298,7 @@
 
-       AString res;
+---
+ CPP/7zip/Archive/Wim/WimHandler.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/CPP/7zip/Archive/Wim/WimHandler.cpp b/CPP/7zip/Archive/Wim/WimHandler.cpp
+index 27d3298..4ff5cfe 100644
+--- a/CPP/7zip/Archive/Wim/WimHandler.cpp
++++ b/CPP/7zip/Archive/Wim/WimHandler.cpp
+@@ -298,7 +298,7 @@ STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value)
+ 
+       AString res;
+ 
 -      bool numMethods = 0;
 +      unsigned numMethods = 0;
        for (unsigned i = 0; i < ARRAY_SIZE(k_Methods); i++)
        {
-         if (methodMask & ((UInt32)1 << i
+         if (methodMask & ((UInt32)1 << i))
diff --git a/meta-oe/recipes-extended/p7zip/files/do_not_override_compiler_and_do_not_strip.patch b/meta-oe/recipes-extended/p7zip/files/do_not_override_compiler_and_do_not_strip.patch
index b0a560fe98..2636e7f6f4 100644
--- a/meta-oe/recipes-extended/p7zip/files/do_not_override_compiler_and_do_not_strip.patch
+++ b/meta-oe/recipes-extended/p7zip/files/do_not_override_compiler_and_do_not_strip.patch
@@ -1,4 +1,7 @@
-do not override compiler and do not strip
+From b2aa209dfc5e59d6329b55b9764782334b63dbe8 Mon Sep 17 00:00:00 2001
+From: Raphael Freudiger <raphael.freudiger@siemens.com>
+Date: Wed, 11 Feb 2015 09:11:47 +0100
+Subject: [PATCH] do not override compiler and do not strip
 
 The default makefile sets the compiler to g++ or gcc. This leads to a wrong architecture when cross-compiling.
 Remove the hardcoded compiler and just append the flags to CXX and CC.
@@ -7,9 +10,14 @@ Upstream-Status: Pending
 Signed-off-by: Raphael Freudiger <raphael.freudiger@siemens.com>
 Reviewed-By: Pascal Bach <pascal.bach@siemens.com>
 
-diff -Nurp p7zip_15.14.1_orig/makefile.machine p7zip_15.14.1/makefile.machine
---- p7zip_15.14.1_orig/makefile.machine	2016-03-23 20:37:47.000000000 +0100
-+++ p7zip_15.14.1/makefile.machine	2016-06-17 15:33:39.720454477 +0200
+---
+ makefile.machine | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/makefile.machine b/makefile.machine
+index 9e34c34..e9244d9 100644
+--- a/makefile.machine
++++ b/makefile.machine
 @@ -2,7 +2,7 @@
  # makefile for Linux (x86, PPC, alpha ...)
  #
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [meta-oe][PATCH 2/2] gtkwave: set REQUIRED_DISTRO_FEATURES only to wayland
  2021-05-29  9:51 [meta-oe][PATCH 1/2] p7zip: refresh patches with devtool to apply cleanly Martin Jansa
@ 2021-05-29  9:51 ` Martin Jansa
       [not found] ` <168380C770F967C6.28811@lists.openembedded.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2021-05-29  9:51 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Martin Jansa

* after the migration to gtk3 in:
  https://git.openembedded.org/meta-openembedded/commit/?id=8221db74e300619d002e2b385d12a5fe13e8999a
  this was now failing with:

| In file included from ../../gtkwave-gtk3-3.3.109/src/debug.h:17,
|                  from ../../gtkwave-gtk3-3.3.109/src/vlist.h:18,
|                  from ../../gtkwave-gtk3-3.3.109/src/analyzer.h:18,
|                  from ../../gtkwave-gtk3-3.3.109/src/symbol.h:20,
|                  from ../../gtkwave-gtk3-3.3.109/src/vcd.h:32,
|                  from ../../gtkwave-gtk3-3.3.109/src/ae2.h:16,
|                  from ../../gtkwave-gtk3-3.3.109/src/globals.h:27,
|                  from ../../gtkwave-gtk3-3.3.109/src/timeentry.c:11:
| ../../gtkwave-gtk3-3.3.109/src/gtk23compat.h:12:10: fatal error: gdk/gdkwayland.h: No such file or directory
|    12 | #include <gdk/gdkwayland.h>
|       |          ^~~~~~~~~~~~~~~~~~

  for distributions without wayland in DISTRO_FEATURES.

* because https://github.com/gtkwave/gtkwave/blob/f9d82a82aa3ddc30ca47984278371f62c9a3bd81/gtkwave3-gtk3/src/gtk23compat.h#L10
  explicitly includes gdk/gdkwayland.h for gtk-3.22.26 and newer (oe-core currently has 3.24.29)

* restrict REQUIRED_DISTRO_FEATURES to wayland only (instead of GTK3DISTROFEATURES which includes x11 as well).

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb b/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb
index 2b572f7e2f..c8d7e959c1 100644
--- a/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb
+++ b/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb
@@ -23,9 +23,12 @@ DEPENDS = " \
 
 inherit pkgconfig autotools gettext texinfo mime mime-xdg
 
-# depends on gtk+3 which has this restriction
 inherit features_check
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+# depends on gtk+3 which has this restriction
+# ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+# but https://github.com/gtkwave/gtkwave/blob/f9d82a82aa3ddc30ca47984278371f62c9a3bd81/gtkwave3-gtk3/src/gtk23compat.h#L10
+# explicitly includes gdk/gdkwayland.h for gtk-3.22.26 and newer (oe-core currently has 3.24.29)
+REQUIRED_DISTRO_FEATURES = "wayland"
 
 EXTRA_OECONF = " \
     --enable-gtk3 \
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [oe] [meta-oe][PATCH 2/2] gtkwave: set REQUIRED_DISTRO_FEATURES only to wayland
       [not found] ` <168380C770F967C6.28811@lists.openembedded.org>
@ 2021-05-29 16:23   ` Martin Jansa
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2021-05-29 16:23 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 3016 bytes --]

v2 coming soon as it actually needs both wayland and x11 (instead of either
one used before), because tk requires x11

ERROR: Nothing PROVIDES 'tk' (but
meta-openembedded/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb
DEPENDS on or otherwise requires it)
tk was skipped: missing required distro feature 'x11' (not in
DISTRO_FEATURES)

On Sat, May 29, 2021 at 11:51 AM Martin Jansa via lists.openembedded.org
<Martin.Jansa=gmail.com@lists.openembedded.org> wrote:

> * after the migration to gtk3 in:
>
> https://git.openembedded.org/meta-openembedded/commit/?id=8221db74e300619d002e2b385d12a5fe13e8999a
>   this was now failing with:
>
> | In file included from ../../gtkwave-gtk3-3.3.109/src/debug.h:17,
> |                  from ../../gtkwave-gtk3-3.3.109/src/vlist.h:18,
> |                  from ../../gtkwave-gtk3-3.3.109/src/analyzer.h:18,
> |                  from ../../gtkwave-gtk3-3.3.109/src/symbol.h:20,
> |                  from ../../gtkwave-gtk3-3.3.109/src/vcd.h:32,
> |                  from ../../gtkwave-gtk3-3.3.109/src/ae2.h:16,
> |                  from ../../gtkwave-gtk3-3.3.109/src/globals.h:27,
> |                  from ../../gtkwave-gtk3-3.3.109/src/timeentry.c:11:
> | ../../gtkwave-gtk3-3.3.109/src/gtk23compat.h:12:10: fatal error:
> gdk/gdkwayland.h: No such file or directory
> |    12 | #include <gdk/gdkwayland.h>
> |       |          ^~~~~~~~~~~~~~~~~~
>
>   for distributions without wayland in DISTRO_FEATURES.
>
> * because
> https://github.com/gtkwave/gtkwave/blob/f9d82a82aa3ddc30ca47984278371f62c9a3bd81/gtkwave3-gtk3/src/gtk23compat.h#L10
>   explicitly includes gdk/gdkwayland.h for gtk-3.22.26 and newer (oe-core
> currently has 3.24.29)
>
> * restrict REQUIRED_DISTRO_FEATURES to wayland only (instead of
> GTK3DISTROFEATURES which includes x11 as well).
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb
> b/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb
> index 2b572f7e2f..c8d7e959c1 100644
> --- a/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb
> +++ b/meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb
> @@ -23,9 +23,12 @@ DEPENDS = " \
>
>  inherit pkgconfig autotools gettext texinfo mime mime-xdg
>
> -# depends on gtk+3 which has this restriction
>  inherit features_check
> -ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
> +# depends on gtk+3 which has this restriction
> +# ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
> +# but
> https://github.com/gtkwave/gtkwave/blob/f9d82a82aa3ddc30ca47984278371f62c9a3bd81/gtkwave3-gtk3/src/gtk23compat.h#L10
> +# explicitly includes gdk/gdkwayland.h for gtk-3.22.26 and newer (oe-core
> currently has 3.24.29)
> +REQUIRED_DISTRO_FEATURES = "wayland"
>
>  EXTRA_OECONF = " \
>      --enable-gtk3 \
> --
> 2.30.2
>
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 4558 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-29 16:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-29  9:51 [meta-oe][PATCH 1/2] p7zip: refresh patches with devtool to apply cleanly Martin Jansa
2021-05-29  9:51 ` [meta-oe][PATCH 2/2] gtkwave: set REQUIRED_DISTRO_FEATURES only to wayland Martin Jansa
     [not found] ` <168380C770F967C6.28811@lists.openembedded.org>
2021-05-29 16:23   ` [oe] " Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.