From cac9804f316f1954544b0f48d927395037ff24311a14165b48ec7fbeefed7f24 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 8 Jan 2024 13:31:01 +0000 Subject: [PATCH 1/2] Accepting request 1136501 from home:qzhao:branches:X11:wxWidgets Add wxWidgets-3_2-fix-building-fault-S390.patch: Fix wxWidgets-3_2 building check fault on S390 platform: /sys/power/state doesn't exist in SLE S390 platform and certain types of containers, so check the file exist before run the test case. (bsc#1217026) OBS-URL: https://build.opensuse.org/request/show/1136501 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/wxWidgets-3_2?expand=0&rev=117 --- wxWidgets-3_2-fix-building-fault-S390.patch | 53 +++++++++++++++++++++ wxWidgets-3_2.changes | 25 +++++++++- wxWidgets-3_2.spec | 10 ++-- 3 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 wxWidgets-3_2-fix-building-fault-S390.patch diff --git a/wxWidgets-3_2-fix-building-fault-S390.patch b/wxWidgets-3_2-fix-building-fault-S390.patch new file mode 100644 index 0000000..9e12d31 --- /dev/null +++ b/wxWidgets-3_2-fix-building-fault-S390.patch @@ -0,0 +1,53 @@ +diff -Nura wxWidgets-3.2.4/tests/file/filetest.cpp wxWidgets-3.2.4_new/tests/file/filetest.cpp +--- wxWidgets-3.2.4/tests/file/filetest.cpp 2023-11-09 06:53:55.000000000 +0800 ++++ wxWidgets-3.2.4_new/tests/file/filetest.cpp 2024-01-03 16:59:53.793721314 +0800 +@@ -153,6 +153,7 @@ + CHECK( fileProc.ReadAll(&s) ); + CHECK( !s.empty() ); + ++ if ( wxFile::Exists("/sys/power/state") ) { + // All files in /sys have the size of one kernel page, even if they don't + // have that much data in them. + const long pageSize = sysconf(_SC_PAGESIZE); +@@ -163,6 +164,7 @@ + CHECK( fileSys.ReadAll(&s) ); + CHECK( !s.empty() ); + CHECK( s.length() < pageSize ); ++ } + } + + #endif // __LINUX__ +diff -Nura wxWidgets-3.2.4/tests/filename/filenametest.cpp wxWidgets-3.2.4_new/tests/filename/filenametest.cpp +--- wxWidgets-3.2.4/tests/filename/filenametest.cpp 2023-11-09 06:53:55.000000000 +0800 ++++ wxWidgets-3.2.4_new/tests/filename/filenametest.cpp 2024-01-03 17:00:36.881285813 +0800 +@@ -1040,9 +1040,11 @@ + INFO( "size of /proc/kcore=" << size ); + CHECK( size > 0 ); + ++ if ( wxFile::Exists("/sys/power/state") ) { + // All files in /sys are one page in size, irrespectively of the size of + // their actual contents. + CHECK( wxFileName::GetSize("/sys/power/state") == sysconf(_SC_PAGESIZE) ); ++ } + } + + #endif // __LINUX__ +diff -Nura wxWidgets-3.2.4/tests/textfile/textfiletest.cpp wxWidgets-3.2.4_new/tests/textfile/textfiletest.cpp +--- wxWidgets-3.2.4/tests/textfile/textfiletest.cpp 2024-01-03 16:57:28.265814711 +0800 ++++ wxWidgets-3.2.4_new/tests/textfile/textfiletest.cpp 2024-01-03 17:01:18.854835722 +0800 +@@ -348,6 +348,7 @@ + CHECK( f.GetLineCount() > 1 ); + } + ++ if ( wxFile::Exists("/sys/power/state") ) { + SECTION("/sys") + { + if ( wxFile::Exists("/sys/power/state") ) { +@@ -358,6 +359,7 @@ + CHECK( (f[0].find("mem") != wxString::npos || f[0].find("disk") != wxString::npos) ); + } + } ++ } + } + + #endif // __LINUX__ diff --git a/wxWidgets-3_2.changes b/wxWidgets-3_2.changes index 6ce475c..4aed1c7 100644 --- a/wxWidgets-3_2.changes +++ b/wxWidgets-3_2.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Dec 28 08:21:30 UTC 2023 - Cliff Zhao + +- Add wxWidgets-3_2-fix-building-fault-S390.patch: + Fix wxWidgets-3_2 building check fault on S390 platform: + /sys/power/state doesn't exist in SLE S390 platform and certain + types of containers, so check the file exist before run the + test case. + (bsc#1217026) + ------------------------------------------------------------------- Tue Dec 26 14:28:08 UTC 2023 - Jan Engelhardt @@ -177,7 +187,20 @@ Wed Apr 13 16:45:53 UTC 2022 - Ferdinand Thiessen * Fix getting wxPrintData from the print dialog. * Fix wxMediaCtrl support when using Wayland * Generate wxKeyEvents for GDK_KEY_LaunchX keys -- Drop upstream fixed wxWidgets-3.1.5-fix-wxIcon-wxDVC-columns.patch +- Remove wxWidgets-3.1.5-fix-wxIcon-wxDVC-columns.patch: + This update already include the patch. +- Remove wxWidgets-3_2-Create-our-own-socket-file-for-socket-file-test.patch: + This update already include the patch. + (bsc#1217026) + +------------------------------------------------------------------- +Tue Apr 12 12:45:12 UTC 2022 - Cliff Zhao + +- Add wxWidgets-3_2-Create-our-own-socket-file-for-socket-file-test.patch: + Backporting f172f53a from upstream to fix building check fault: + Create our own socket file for socket file test, /dev/log doesn't + exist in certain types of containers. + (bsc#1217026) ------------------------------------------------------------------- Fri Feb 11 14:53:40 UTC 2022 - Bjørn Lie diff --git a/wxWidgets-3_2.spec b/wxWidgets-3_2.spec index 806a66c..e88de5b 100644 --- a/wxWidgets-3_2.spec +++ b/wxWidgets-3_2.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -80,8 +80,12 @@ Source5: wxWidgets-3_2-rpmlintrc # This script is not used during build, but it makes possible to # identify and backport wxPython fixes to wxWidgets. Source6: wxpython-mkdiff.sh -Patch1: soversion.diff -Patch2: autoconf-2_72.diff +# PATCH-FIX-OPENSUSE soversion.diff jengelh@inai.de -- Use the package version, not some incremental integer. +Patch0: soversion.diff +# PATCH-FIX-OPENSUSE autoconf-2_72.diff jengelh@inai.de -- Add autoconf-2_72.diff. +Patch1: autoconf-2_72.diff +# PATCH-FIX-OPENSUSE wxWidgets-3_2-fix-building-fault-S390.patch bsc#1217026 qzhao@suse.com -- Fix wxWidgets-3_2 building check fault on S390 platform. +Patch2: wxWidgets-3_2-fix-building-fault-S390.patch %if "%{flavor}" == "doc" BuildRequires: doxygen BuildRequires: fdupes From cbe26aaed535fe9a82685ad70d5d66112dac867be5fc6d2740d1ca847ef65081 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 8 Jan 2024 13:34:31 +0000 Subject: [PATCH 2/2] forward s390 patch to upstream OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/wxWidgets-3_2?expand=0&rev=118 --- wxWidgets-3_2-fix-building-fault-S390.patch | 67 ++++++++++++++++----- wxWidgets-3_2.spec | 3 - 2 files changed, 51 insertions(+), 19 deletions(-) diff --git a/wxWidgets-3_2-fix-building-fault-S390.patch b/wxWidgets-3_2-fix-building-fault-S390.patch index 9e12d31..4c82ad6 100644 --- a/wxWidgets-3_2-fix-building-fault-S390.patch +++ b/wxWidgets-3_2-fix-building-fault-S390.patch @@ -1,7 +1,37 @@ -diff -Nura wxWidgets-3.2.4/tests/file/filetest.cpp wxWidgets-3.2.4_new/tests/file/filetest.cpp ---- wxWidgets-3.2.4/tests/file/filetest.cpp 2023-11-09 06:53:55.000000000 +0800 -+++ wxWidgets-3.2.4_new/tests/file/filetest.cpp 2024-01-03 16:59:53.793721314 +0800 -@@ -153,6 +153,7 @@ +From 891bfff867b7dc92ed6330ea46ee2dcfa5424ee0 Mon Sep 17 00:00:00 2001 +From: Cliff Zhao +Date: Thu, 4 Jan 2024 08:01:00 +0100 +Subject: [PATCH] Fix testsuite failures on s390x + +``/sys/power/state`` does not exist on s390x platforms and certain +types of containers, so check that the file exist before running the +test case. + +Output from ``make check`` was: + + ./textfile/textfiletest.cpp:351 + ............................................................................... + + ./textfile/textfiletest.cpp:354: FAILED: + CHECK( f.Open("/sys/power/state") ) + with expansion: + false + + ./textfile/textfiletest.cpp:355: FAILED: + REQUIRE( f.GetLineCount() == 1 ) + with expansion: + 0 == 1 +--- + tests/file/filetest.cpp | 2 ++ + tests/filename/filenametest.cpp | 2 ++ + tests/textfile/textfiletest.cpp | 2 ++ + 3 files changed, 6 insertions(+) + +diff --git a/tests/file/filetest.cpp b/tests/file/filetest.cpp +index 8902eb4d66..fc3c905694 100644 +--- a/tests/file/filetest.cpp ++++ b/tests/file/filetest.cpp +@@ -153,6 +153,7 @@ TEST_CASE("wxFile::Special", "[file][linux][special-file]") CHECK( fileProc.ReadAll(&s) ); CHECK( !s.empty() ); @@ -9,7 +39,7 @@ diff -Nura wxWidgets-3.2.4/tests/file/filetest.cpp wxWidgets-3.2.4_new/tests/fil // All files in /sys have the size of one kernel page, even if they don't // have that much data in them. const long pageSize = sysconf(_SC_PAGESIZE); -@@ -163,6 +164,7 @@ +@@ -163,6 +164,7 @@ TEST_CASE("wxFile::Special", "[file][linux][special-file]") CHECK( fileSys.ReadAll(&s) ); CHECK( !s.empty() ); CHECK( s.length() < pageSize ); @@ -17,10 +47,11 @@ diff -Nura wxWidgets-3.2.4/tests/file/filetest.cpp wxWidgets-3.2.4_new/tests/fil } #endif // __LINUX__ -diff -Nura wxWidgets-3.2.4/tests/filename/filenametest.cpp wxWidgets-3.2.4_new/tests/filename/filenametest.cpp ---- wxWidgets-3.2.4/tests/filename/filenametest.cpp 2023-11-09 06:53:55.000000000 +0800 -+++ wxWidgets-3.2.4_new/tests/filename/filenametest.cpp 2024-01-03 17:00:36.881285813 +0800 -@@ -1040,9 +1040,11 @@ +diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp +index 84356b39f7..ce2ec2af27 100644 +--- a/tests/filename/filenametest.cpp ++++ b/tests/filename/filenametest.cpp +@@ -1040,9 +1040,11 @@ TEST_CASE("wxFileName::GetSizeSpecial", "[filename][linux][special-file]") INFO( "size of /proc/kcore=" << size ); CHECK( size > 0 ); @@ -32,22 +63,26 @@ diff -Nura wxWidgets-3.2.4/tests/filename/filenametest.cpp wxWidgets-3.2.4_new/t } #endif // __LINUX__ -diff -Nura wxWidgets-3.2.4/tests/textfile/textfiletest.cpp wxWidgets-3.2.4_new/tests/textfile/textfiletest.cpp ---- wxWidgets-3.2.4/tests/textfile/textfiletest.cpp 2024-01-03 16:57:28.265814711 +0800 -+++ wxWidgets-3.2.4_new/tests/textfile/textfiletest.cpp 2024-01-03 17:01:18.854835722 +0800 -@@ -348,6 +348,7 @@ +diff --git a/tests/textfile/textfiletest.cpp b/tests/textfile/textfiletest.cpp +index f744ffc327..73467be8f8 100644 +--- a/tests/textfile/textfiletest.cpp ++++ b/tests/textfile/textfiletest.cpp +@@ -348,6 +348,7 @@ TEST_CASE("wxTextFile::Special", "[textfile][linux][special-file]") CHECK( f.GetLineCount() > 1 ); } + if ( wxFile::Exists("/sys/power/state") ) { SECTION("/sys") { - if ( wxFile::Exists("/sys/power/state") ) { -@@ -358,6 +359,7 @@ + wxTextFile f; +@@ -356,6 +357,7 @@ TEST_CASE("wxTextFile::Special", "[textfile][linux][special-file]") + INFO( "/sys/power/state contains \"" << f[0] << "\"" ); CHECK( (f[0].find("mem") != wxString::npos || f[0].find("disk") != wxString::npos) ); - } } + } } #endif // __LINUX__ +-- +2.43.0 + diff --git a/wxWidgets-3_2.spec b/wxWidgets-3_2.spec index e88de5b..976876e 100644 --- a/wxWidgets-3_2.spec +++ b/wxWidgets-3_2.spec @@ -80,11 +80,8 @@ Source5: wxWidgets-3_2-rpmlintrc # This script is not used during build, but it makes possible to # identify and backport wxPython fixes to wxWidgets. Source6: wxpython-mkdiff.sh -# PATCH-FIX-OPENSUSE soversion.diff jengelh@inai.de -- Use the package version, not some incremental integer. Patch0: soversion.diff -# PATCH-FIX-OPENSUSE autoconf-2_72.diff jengelh@inai.de -- Add autoconf-2_72.diff. Patch1: autoconf-2_72.diff -# PATCH-FIX-OPENSUSE wxWidgets-3_2-fix-building-fault-S390.patch bsc#1217026 qzhao@suse.com -- Fix wxWidgets-3_2 building check fault on S390 platform. Patch2: wxWidgets-3_2-fix-building-fault-S390.patch %if "%{flavor}" == "doc" BuildRequires: doxygen