diff --git a/0001-Search-in-usr-local-sbin-usr-sbin-as-fallback.patch b/0001-Search-in-usr-local-sbin-usr-sbin-sbin-as-fallback.patch similarity index 71% rename from 0001-Search-in-usr-local-sbin-usr-sbin-as-fallback.patch rename to 0001-Search-in-usr-local-sbin-usr-sbin-sbin-as-fallback.patch index 02df722..05d3917 100644 --- a/0001-Search-in-usr-local-sbin-usr-sbin-as-fallback.patch +++ b/0001-Search-in-usr-local-sbin-usr-sbin-sbin-as-fallback.patch @@ -1,7 +1,7 @@ -From daf4d56177c1cdfeb22b975d38181d483dc6d3ae Mon Sep 17 00:00:00 2001 +From da706d27bb4663e584725926ed144b6089bc6c3e Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Tue, 8 Feb 2022 18:55:49 +0100 -Subject: [PATCH 1/2] Search in /usr/local/sbin:/usr/sbin as fallback +Subject: [PATCH 1/2] Search in /usr/local/sbin:/usr/sbin:/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 @@ -9,21 +9,22 @@ supeuser privileges, so just look there as well as a fallback. BUG: 449792 --- - src/CommandOutputContext.cpp | 5 +++++ + src/CommandOutputContext.cpp | 6 ++++++ src/CommandOutputContext.h | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/CommandOutputContext.cpp b/src/CommandOutputContext.cpp -index 4808b45..30c33a9 100644 +index 4808b45..ec3cd3d 100644 --- a/src/CommandOutputContext.cpp +++ b/src/CommandOutputContext.cpp -@@ -19,6 +19,11 @@ CommandOutputContext::CommandOutputContext(const QString &executable, const QStr +@@ -19,6 +19,12 @@ 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")}); ++ m_executablePath = ++ QStandardPaths::findExecutable(m_executableName, {QStringLiteral("/usr/local/sbin"), QStringLiteral("/usr/sbin"), QStringLiteral("/sbin")}); + } + metaObject()->invokeMethod(this, &CommandOutputContext::load); diff --git a/0002-Look-for-binaries-in-Mesa-demos-path-as-well.patch b/0002-Look-for-binaries-in-Mesa-demos-path-as-well.patch index 411e6fe..a0bdb0f 100644 --- a/0002-Look-for-binaries-in-Mesa-demos-path-as-well.patch +++ b/0002-Look-for-binaries-in-Mesa-demos-path-as-well.patch @@ -1,4 +1,4 @@ -From 00664f06d83ae7995864675719b5da8bca41eccf Mon Sep 17 00:00:00 2001 +From 63940ad9bb5eb3bd8c0eefcf20c4b14d68f9c5c2 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Tue, 8 Feb 2022 19:06:23 +0100 Subject: [PATCH 2/2] Look for binaries in Mesa-demos path as well @@ -9,11 +9,11 @@ eglinfo is not in $PATH (yet, boo#1195695) 1 file changed, 7 insertions(+) diff --git a/src/CommandOutputContext.cpp b/src/CommandOutputContext.cpp -index 30c33a9..a2b754f 100644 +index ec3cd3d..96e11ce 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")}); +@@ -25,6 +25,13 @@ CommandOutputContext::CommandOutputContext(const QString &executable, const QStr + QStandardPaths::findExecutable(m_executableName, {QStringLiteral("/usr/local/sbin"), QStringLiteral("/usr/sbin"), QStringLiteral("/sbin")}); } + // boo#1195695 diff --git a/kinfocenter5.changes b/kinfocenter5.changes index a476049..337c142 100644 --- a/kinfocenter5.changes +++ b/kinfocenter5.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Feb 9 16:09:01 UTC 2022 - Fabian Vogt + +- Change patch to also search in /sbin: + * Add 0001-Search-in-usr-local-sbin-usr-sbin-sbin-as-fallback.patch + * Drop 0001-Search-in-usr-local-sbin-usr-sbin-as-fallback.patch + * Rebase 0002-Look-for-binaries-in-Mesa-demos-path-as-well.patch + ------------------------------------------------------------------- Tue Feb 8 18:09:01 UTC 2022 - Fabian Vogt diff --git a/kinfocenter5.spec b/kinfocenter5.spec index a88df29..6a57052 100644 --- a/kinfocenter5.spec +++ b/kinfocenter5.spec @@ -39,7 +39,7 @@ Source1: kinfocenter-%{version}.tar.xz.sig Source2: plasma.keyring %endif # PATCH-FIX-UPSTREAM -Patch1: 0001-Search-in-usr-local-sbin-usr-sbin-as-fallback.patch +Patch1: 0001-Search-in-usr-local-sbin-usr-sbin-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}