forked from pool/kinfocenter5
Accepting request 952788 from home:Vogtinator:plasma5.24
- Add patch to actually find lscpi (kde#449792, boo#1195696): * 0001-Search-in-usr-local-sbin-usr-sbin-as-fallback.patch - ... and eglinfo (boo1195695): * 0002-Look-for-binaries-in-Mesa-demos-path-as-well.patch - Suggest Mesa-demo for eglinfo OBS-URL: https://build.opensuse.org/request/show/952788 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kinfocenter5?expand=0&rev=336
This commit is contained in:
parent
6aa3817a57
commit
0dd199e0c3
47
0001-Search-in-usr-local-sbin-usr-sbin-as-fallback.patch
Normal file
47
0001-Search-in-usr-local-sbin-usr-sbin-as-fallback.patch
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
From daf4d56177c1cdfeb22b975d38181d483dc6d3ae Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||||
|
Date: Tue, 8 Feb 2022 18:55:49 +0100
|
||||||
|
Subject: [PATCH 1/2] Search in /usr/local/sbin:/usr/sbin as fallback
|
||||||
|
|
||||||
|
Utilities such as lspci default to /usr/(local/)sbin/ as install location,
|
||||||
|
but that's not in $PATH for regular user sessions. It still works without
|
||||||
|
supeuser privileges, so just look there as well as a fallback.
|
||||||
|
|
||||||
|
BUG: 449792
|
||||||
|
---
|
||||||
|
src/CommandOutputContext.cpp | 5 +++++
|
||||||
|
src/CommandOutputContext.h | 2 +-
|
||||||
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/CommandOutputContext.cpp b/src/CommandOutputContext.cpp
|
||||||
|
index 4808b45..30c33a9 100644
|
||||||
|
--- a/src/CommandOutputContext.cpp
|
||||||
|
+++ b/src/CommandOutputContext.cpp
|
||||||
|
@@ -19,6 +19,11 @@ CommandOutputContext::CommandOutputContext(const QString &executable, const QStr
|
||||||
|
, m_executablePath(QStandardPaths::findExecutable(m_executableName))
|
||||||
|
, m_arguments(arguments)
|
||||||
|
{
|
||||||
|
+ // Various utilities are installed in sbin, but work without elevated privileges
|
||||||
|
+ if (m_executablePath.isEmpty()) {
|
||||||
|
+ m_executablePath = QStandardPaths::findExecutable(m_executableName, {QStringLiteral("/usr/local/sbin"), QStringLiteral("/usr/sbin")});
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
metaObject()->invokeMethod(this, &CommandOutputContext::load);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/src/CommandOutputContext.h b/src/CommandOutputContext.h
|
||||||
|
index 13fc528..c818b42 100644
|
||||||
|
--- a/src/CommandOutputContext.h
|
||||||
|
+++ b/src/CommandOutputContext.h
|
||||||
|
@@ -44,7 +44,7 @@ private:
|
||||||
|
void setReady();
|
||||||
|
|
||||||
|
const QString m_executableName;
|
||||||
|
- const QString m_executablePath;
|
||||||
|
+ QString m_executablePath;
|
||||||
|
const QStringList m_arguments;
|
||||||
|
|
||||||
|
QStringList m_originalLines;
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
31
0002-Look-for-binaries-in-Mesa-demos-path-as-well.patch
Normal file
31
0002-Look-for-binaries-in-Mesa-demos-path-as-well.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 00664f06d83ae7995864675719b5da8bca41eccf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||||
|
Date: Tue, 8 Feb 2022 19:06:23 +0100
|
||||||
|
Subject: [PATCH 2/2] Look for binaries in Mesa-demos path as well
|
||||||
|
|
||||||
|
eglinfo is not in $PATH (yet, boo#1195695)
|
||||||
|
---
|
||||||
|
src/CommandOutputContext.cpp | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/CommandOutputContext.cpp b/src/CommandOutputContext.cpp
|
||||||
|
index 30c33a9..a2b754f 100644
|
||||||
|
--- a/src/CommandOutputContext.cpp
|
||||||
|
+++ b/src/CommandOutputContext.cpp
|
||||||
|
@@ -24,6 +24,13 @@ CommandOutputContext::CommandOutputContext(const QString &executable, const QStr
|
||||||
|
m_executablePath = QStandardPaths::findExecutable(m_executableName, {QStringLiteral("/usr/local/sbin"), QStringLiteral("/usr/sbin")});
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // boo#1195695
|
||||||
|
+ if (m_executablePath.isEmpty()) {
|
||||||
|
+ m_executablePath =
|
||||||
|
+ QStandardPaths::findExecutable(m_executableName,
|
||||||
|
+ {QStringLiteral("/usr/lib64/mesa-demos/egl/opengl"), QStringLiteral("/usr/lib/mesa-demos/egl/opengl")});
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
metaObject()->invokeMethod(this, &CommandOutputContext::load);
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 8 18:09:01 UTC 2022 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||||
|
|
||||||
|
- Add patch to actually find lscpi (kde#449792, boo#1195696):
|
||||||
|
* 0001-Search-in-usr-local-sbin-usr-sbin-as-fallback.patch
|
||||||
|
- ... and eglinfo (boo1195695):
|
||||||
|
* 0002-Look-for-binaries-in-Mesa-demos-path-as-well.patch
|
||||||
|
- Suggest Mesa-demo for eglinfo
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Feb 5 19:50:56 UTC 2022 - Fabian Vogt <fabian@ritter-vogt.de>
|
Sat Feb 5 19:50:56 UTC 2022 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||||
|
|
||||||
|
@ -38,6 +38,10 @@ Source: kinfocenter-%{version}.tar.xz
|
|||||||
Source1: kinfocenter-%{version}.tar.xz.sig
|
Source1: kinfocenter-%{version}.tar.xz.sig
|
||||||
Source2: plasma.keyring
|
Source2: plasma.keyring
|
||||||
%endif
|
%endif
|
||||||
|
# PATCH-FIX-UPSTREAM
|
||||||
|
Patch1: 0001-Search-in-usr-local-sbin-usr-sbin-as-fallback.patch
|
||||||
|
# PATCH-FIX-OPENSUSE
|
||||||
|
Patch100: 0002-Look-for-binaries-in-Mesa-demos-path-as-well.patch
|
||||||
BuildRequires: extra-cmake-modules >= %{kf5_version}
|
BuildRequires: extra-cmake-modules >= %{kf5_version}
|
||||||
BuildRequires: systemsettings5
|
BuildRequires: systemsettings5
|
||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
@ -75,8 +79,11 @@ Requires: (/usr/bin/vulkaninfo if libvulkan1)
|
|||||||
# Plasma Wayland and X11 sessions are always installed
|
# Plasma Wayland and X11 sessions are always installed
|
||||||
Requires: /usr/bin/wayland-info
|
Requires: /usr/bin/wayland-info
|
||||||
Requires: /usr/bin/xdpyinfo
|
Requires: /usr/bin/xdpyinfo
|
||||||
# Not packaged yet?
|
# Note: Not available as /usr/bin/eglinfo yet (boo#1195695)
|
||||||
Recommends: /usr/bin/eglinfo
|
Recommends: /usr/bin/eglinfo
|
||||||
|
# Mesa-demos includes it, but as a whole it's too fat,
|
||||||
|
# so don't pull it in by default.
|
||||||
|
Suggests: Mesa-demo
|
||||||
|
|
||||||
%description
|
%description
|
||||||
KDE Utility that provides information about a computer system.
|
KDE Utility that provides information about a computer system.
|
||||||
|
Loading…
Reference in New Issue
Block a user