From 944a54ae4b827409a4ac18e2cf23876d48b4ab769760b3de4b830a586a8c60fc Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Fri, 18 Jun 2021 09:32:19 +0000 Subject: [PATCH 1/2] Accepting request 900649 from home:Vogtinator:branches:KDE:Frameworks5 - Add patches to enable the PCI module on ARM: * 0001-Handle-libpci-errors-gracefully.patch * 0002-Enable-the-PCI-module-everywhere.patch OBS-URL: https://build.opensuse.org/request/show/900649 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kinfocenter5?expand=0&rev=322 --- 0001-Handle-libpci-errors-gracefully.patch | 67 +++++++++++++++++++++ 0002-Enable-the-PCI-module-everywhere.patch | 37 ++++++++++++ kinfocenter5.changes | 7 +++ kinfocenter5.spec | 7 ++- 4 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 0001-Handle-libpci-errors-gracefully.patch create mode 100644 0002-Enable-the-PCI-module-everywhere.patch diff --git a/0001-Handle-libpci-errors-gracefully.patch b/0001-Handle-libpci-errors-gracefully.patch new file mode 100644 index 0000000..e8690b2 --- /dev/null +++ b/0001-Handle-libpci-errors-gracefully.patch @@ -0,0 +1,67 @@ +From f497e7757d33cf363a75f7e723cb0d8f3a78b52f Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Thu, 17 Jun 2021 20:07:50 +0200 +Subject: [PATCH 1/2] Handle libpci errors gracefully + +libpci expects that the error callback does not return, but pci_warning +previously did. Throwing exceptions through C code without -fexceptions is not +safe, so resort to plain setjmp/longjmp. + +Also format the message properly. +--- + Modules/pci/kpci.cpp | 21 ++++++++++++++++----- + 1 file changed, 16 insertions(+), 5 deletions(-) + +diff --git a/Modules/pci/kpci.cpp b/Modules/pci/kpci.cpp +index 528252d..886cc8f 100644 +--- a/Modules/pci/kpci.cpp ++++ b/Modules/pci/kpci.cpp +@@ -15,6 +15,7 @@ + extern "C" { + #include + } ++#include + #include + #include //getuid + #include //isxdigit +@@ -698,12 +699,18 @@ static QTreeWidgetItem* addCaps(QTreeWidgetItem *parent, QTreeWidgetItem *after, + return after; + }//addCaps + +-static void pci_warning(char *msg, ...) ++static jmp_buf pci_error_jmp_buf; ++ ++// This callback must not return, but we don't want to call exit. ++// Exceptions across C code aren't safe, so the only option is longjmp. ++static void pci_error(char *msg, ...) + { + va_list args; + va_start(args, msg); +- qWarning(msg, args); ++ qWarning() << QString::vasprintf(msg, args); + va_end(args); ++ ++ longjmp(pci_error_jmp_buf, 1); + } + + bool GetInfo_PCIUtils(QTreeWidget* tree) { +@@ -721,9 +728,13 @@ bool GetInfo_PCIUtils(QTreeWidget* tree) { + if (PCIAccess==nullptr) { + return false; + }//if +- // Use warnings for errors, they are decidely not fatal for us! +- // https://bugs.kde.org/show_bug.cgi?id=382979 +- PCIAccess->error = pci_warning; ++ ++ if (setjmp(pci_error_jmp_buf)) { ++ // Got a fatal error. Cleanup might be unsafe, just return. ++ return false; ++ } ++ ++ PCIAccess->error = pci_error; + + pci_init(PCIAccess); + pci_scan_bus(PCIAccess); +-- +2.25.1 + diff --git a/0002-Enable-the-PCI-module-everywhere.patch b/0002-Enable-the-PCI-module-everywhere.patch new file mode 100644 index 0000000..36cfd3b --- /dev/null +++ b/0002-Enable-the-PCI-module-everywhere.patch @@ -0,0 +1,37 @@ +From b3cffbad3503572e942ee41c168e245a651375cf Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Thu, 17 Jun 2021 17:46:15 +0200 +Subject: [PATCH 2/2] Enable the PCI module everywhere + +Not sure why it's disabled on non-BSD ARM, it works fine here on Linux too. +--- + Modules/CMakeLists.txt | 13 +------------ + 1 file changed, 1 insertion(+), 12 deletions(-) + +diff --git a/Modules/CMakeLists.txt b/Modules/CMakeLists.txt +index 020b430..859a00c 100644 +--- a/Modules/CMakeLists.txt ++++ b/Modules/CMakeLists.txt +@@ -40,18 +40,7 @@ set_package_properties(PCIUTILS PROPERTIES DESCRIPTION "PciUtils is a library fo + PURPOSE "View PCI details in kinfocenter." + ) + +-# PCI module doesn't work on Linux arm64, nor on MacOS, but does on +-# FreeBSD arm64, so this is a bit of a tangle of what-is-supported. +-set(_want_pci ON) +-if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64") +- if (${CMAKE_SYSTEM} MATCHES "FreeBSD") +- message(STATUS "FreeBSD arm64 pci support enabled.") +- else() +- set(_want_pci OFF) +- endif() +-endif() +- +-if(_want_pci) ++if(PCIUTILS_FOUND) + add_subdirectory( pci ) + endif() + +-- +2.25.1 + diff --git a/kinfocenter5.changes b/kinfocenter5.changes index 76489a9..005449f 100644 --- a/kinfocenter5.changes +++ b/kinfocenter5.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 17 15:47:38 UTC 2021 - Fabian Vogt + +- Add patches to enable the PCI module on ARM: + * 0001-Handle-libpci-errors-gracefully.patch + * 0002-Enable-the-PCI-module-everywhere.patch + ------------------------------------------------------------------- Tue Jun 15 15:33:05 UTC 2021 - Fabian Vogt diff --git a/kinfocenter5.spec b/kinfocenter5.spec index a0ac868..e264864 100644 --- a/kinfocenter5.spec +++ b/kinfocenter5.spec @@ -40,6 +40,9 @@ Source2: plasma.keyring %endif # PATCH-FIX-OPENSUSE plasma-session-name.patch Patch0: plasma-session-name.patch +# PATCH-FIX-UPSTREAM +Patch1: 0001-Handle-libpci-errors-gracefully.patch +Patch2: 0002-Enable-the-PCI-module-everywhere.patch BuildRequires: extra-cmake-modules >= 1.2.0 BuildRequires: kf5-filesystem BuildRequires: libraw1394-devel @@ -89,9 +92,9 @@ Requires: systemsettings5 KDE Utility that provides information about a computer system. %lang_package + %prep -%setup -q -n kinfocenter-%{version} -%patch0 -p1 +%autosetup -p1 -n kinfocenter-%{version} %build %cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir} From f90fb651f4ae01c161bff45e2f25d686c938101c112a86cd06bb910e04d72bb3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bauer Date: Wed, 23 Jun 2021 12:39:56 +0000 Subject: [PATCH 2/2] Plasma 5.22.2.1. The .1 needed overwriting of _plasma5_bugfix for now OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kinfocenter5?expand=0&rev=323 --- kinfocenter-5.22.1.tar.xz | 3 --- kinfocenter-5.22.1.tar.xz.sig | 11 ----------- kinfocenter-5.22.2.1.tar.xz | 3 +++ kinfocenter-5.22.2.1.tar.xz.sig | 11 +++++++++++ kinfocenter5.changes | 9 +++++++++ kinfocenter5.spec | 8 ++++---- 6 files changed, 27 insertions(+), 18 deletions(-) delete mode 100644 kinfocenter-5.22.1.tar.xz delete mode 100644 kinfocenter-5.22.1.tar.xz.sig create mode 100644 kinfocenter-5.22.2.1.tar.xz create mode 100644 kinfocenter-5.22.2.1.tar.xz.sig diff --git a/kinfocenter-5.22.1.tar.xz b/kinfocenter-5.22.1.tar.xz deleted file mode 100644 index fdd676c..0000000 --- a/kinfocenter-5.22.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ae2ce89549af7e096d663a04c1eb22383c0e8c71bf2699f1bc9697ee2019854d -size 1163660 diff --git a/kinfocenter-5.22.1.tar.xz.sig b/kinfocenter-5.22.1.tar.xz.sig deleted file mode 100644 index 21f4d81..0000000 --- a/kinfocenter-5.22.1.tar.xz.sig +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQEzBAABCgAdFiEELR1bBYg1d4fenuIl7JTRj38FmX4FAmDIeYMACgkQ7JTRj38F -mX4rpQgAllKOCS4RYYhlvTimXbEDim06dr9OF3GogZI3xtzh51TDFMuVQHqKy4Ek -Cpd8ODVN4GZCIXnyAZFttsE9qFVXmFdC5BiUYz3TtvJP918PXGbD0HdoN31MODHZ -jmalcDoToBvS76sIZ+NqOQZCnzpyKflUcVruW0s0OO9eXmq3kITKqz797il2zdAO -rMmBiWqN0kzpUKszE/C+YYV2wk1NfukOSUQNWoE3sfwFWhe7xq0VkeBOUxKt3u5U -jPpU0OUb9QI8Z2PYlE4UnQYqDEZXG7ezCyqtP5d14W0mriMnPSe8Bnqwl02T53c2 -SbjrdKJVsvzYfIO3W628T+M+2Al7qg== -=au8V ------END PGP SIGNATURE----- diff --git a/kinfocenter-5.22.2.1.tar.xz b/kinfocenter-5.22.2.1.tar.xz new file mode 100644 index 0000000..7e1adb8 --- /dev/null +++ b/kinfocenter-5.22.2.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34c630cb096700c5c77cbdf73b36de47dbaaf02719416896ac16fd2591ac1a50 +size 1163044 diff --git a/kinfocenter-5.22.2.1.tar.xz.sig b/kinfocenter-5.22.2.1.tar.xz.sig new file mode 100644 index 0000000..6e990a9 --- /dev/null +++ b/kinfocenter-5.22.2.1.tar.xz.sig @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCgAdFiEELR1bBYg1d4fenuIl7JTRj38FmX4FAmDSMvEACgkQ7JTRj38F +mX6wOgf/Z7e3y+jspzrIw+nw9ox4NYA0UObYcjx4DRV87vsxIptMFOTQii5HasvZ +5yGPtGHbwgYxs9Xi7guXYigWWLitME9XmdQjryyMnKHeWAtzE71Q9vyvRY7tk4oV +FLcBpy2WBgDp6uiCfOkzyLdKxd3NnScLJeKndveffkfsqKKX5Mc2+oIs7pXbBzc1 +1c3qbqv74WaD7uhHr2iYMStXP5TGBQG90e5/re6pIps5p3OZCw4PMqU3Hw3P8TAJ +4fHcNGmqVnfLKbQqWNNbwwWI8Z+tFn0whG6RrFzrmzki/926Zbp5rZMfmqOhB1pQ +8nAjQyHqDBL+1AnntytQI+S1RHgU0w== +=1PPe +-----END PGP SIGNATURE----- diff --git a/kinfocenter5.changes b/kinfocenter5.changes index 005449f..653cb02 100644 --- a/kinfocenter5.changes +++ b/kinfocenter5.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Jun 23 08:24:40 UTC 2021 - Fabian Vogt + +- Update to 5.22.2.1 + * New bugfix release + * For more details please see: + * https://kde.org/announcements/plasma/5/5.22.2 +- No code changes since 5.22.1 + ------------------------------------------------------------------- Thu Jun 17 15:47:38 UTC 2021 - Fabian Vogt diff --git a/kinfocenter5.spec b/kinfocenter5.spec index e264864..f28fac4 100644 --- a/kinfocenter5.spec +++ b/kinfocenter5.spec @@ -23,19 +23,19 @@ %bcond_without lang Name: kinfocenter5 -Version: 5.22.1 +Version: 5.22.2.1 Release: 0 # Full Plasma 5 version (e.g. 5.8.95) -%{!?_plasma5_bugfix: %define _plasma5_bugfix %{version}} +%{!?_plasma5_bugfix: %define _plasma5_bugfix 5.22.2} # Latest ABI-stable Plasma (e.g. 5.8 in KF5, but 5.8.95 in KUF) %{!?_plasma5_version: %define _plasma5_version %(echo %{_plasma5_bugfix} | awk -F. '{print $1"."$2}')} Summary: Utility that provides information about a computer system License: GPL-2.0-or-later Group: System/GUI/KDE URL: http://www.kde.org/ -Source: https://download.kde.org/stable/plasma/%{version}/kinfocenter-%{version}.tar.xz +Source: https://download.kde.org/stable/plasma/5.22.2/kinfocenter-%{version}.tar.xz %if %{with lang} -Source1: https://download.kde.org/stable/plasma/%{version}/kinfocenter-%{version}.tar.xz.sig +Source1: https://download.kde.org/stable/plasma/5.22.2/kinfocenter-%{version}.tar.xz.sig Source2: plasma.keyring %endif # PATCH-FIX-OPENSUSE plasma-session-name.patch