p7zip: refresh patches with devtool to apply cleanly
PATCH 1/2 p7zip: refresh patches with devtool to apply cleanly
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]
--- ...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(-)
meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch +2 -1
@@ -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 <[email protected]> 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 <[email protected]> + --- CPP/Windows/ErrorMsg.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
meta-oe/recipes-extended/p7zip/files/CVE-2017-17969.patch +11 -2
@@ -1,4 +1,7 @@ -p7zip: Fix CVE-2017-17969 +From 7f2da4f810b429ddb7afa0e252e3d02ced0eba87 Mon Sep 17 00:00:00 2001 +From: Radovan Scasny <[email protected]> +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 <[email protected]> +--- + 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 *
meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch +16 -7
@@ -1,4 +1,7 @@ -fixes the below error +From 0820ef4b9238c1e39ae5bda32cc08cce3fd3ce89 Mon Sep 17 00:00:00 2001 +From: Nisha Parrakat <[email protected]> +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 <[email protected]> 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))
meta-oe/recipes-extended/p7zip/files/do_not_override_compiler_and_do_not_strip.patch +12 -4
@@ -1,4 +1,7 @@ -do not override compiler and do not strip +From b2aa209dfc5e59d6329b55b9764782334b63dbe8 Mon Sep 17 00:00:00 2001 +From: Raphael Freudiger <[email protected]> +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 <[email protected]> Reviewed-By: Pascal Bach <[email protected]> -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 ...) #
Signature · 1 line
2.30.2
PATCH 2/2 gtkwave: set REQUIRED_DISTRO_FEATURES only to wayland
* 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).
--- meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb +5 -2
@@ -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 \
Signature · 1 line
2.30.2
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [oe] [meta-oe][PATCH 2/2] gtkwave: set REQUIRED_DISTRO_FEATURES only to wayland
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)
Quoted 62 lines · Martin Jansa via lists.openembedded.org
* 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 includesgdk/gdkwayland.hfor gtk-3.22.26 and newer (oe-core
currently has 3.24.29)* restrict
REQUIRED_DISTRO_FEATURESto wayland only (instead of GTK3DISTROFEATURES which includes x11 as well).Signed-off-by Martin Jansa <[email protected]>--- meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)meta-oe/recipes-graphics/gtkwave/gtkwave_3.3.109.bb +3
-2@@ -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}" +# buthttps://github.com/gtkwave/gtkwave/blob/f9d82a82aa3ddc30ca47984278371f62c9a3bd81/gtkwave3-gtk3/src/gtk23compat.h#L10
+# explicitly includesgdk/gdkwayland.hfor gtk-3.22.26 and newer (oe-core currently has 3.24.29)
+REQUIRED_DISTRO_FEATURES = "wayland"EXTRA_OECONF = " \ --enable-gtk3 \--
2.30.2