public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/setroubleshoot] rawhide: setroubleshoot-3.3.37-7
@ 2026-10-30 23:13 Vit Mojzis
0 siblings, 0 replies; only message in thread
From: Vit Mojzis @ 2026-10-30 23:13 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/setroubleshoot
Branch : rawhide
Commit : c239ce987b55bf7af05417012870e481c91ddbc7
Author : Vit Mojzis <vmojzis@redhat.com>
Date : 2026-10-30T18:07:07+01:00
Stats : +70/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/setroubleshoot/c/c239ce987b55bf7af05417012870e481c91ddbc7?branch=rawhide
Log:
setroubleshoot-3.3.37-7
- Use default module store path when searching for package of origin
---
diff --git a/0009-Use-default-module-store-path-when-searching-for-pac.patch b/0009-Use-default-module-store-path-when-searching-for-pac.patch
new file mode 100644
index 0000000..f614af4
--- /dev/null
+++ b/0009-Use-default-module-store-path-when-searching-for-pac.patch
@@ -0,0 +1,65 @@
+From ee47f121d605a891c7e09d68b523d2a1c82f60cb Mon Sep 17 00:00:00 2001
+From: Vit Mojzis <vmojzis@redhat.com>
+Date: Thu, 8 Oct 2026 21:07:14 +0200
+Subject: [PATCH] Use default module store path when searching for package of
+ origin
+
+On systems with a non-default SELinux module store root
+(e.g. /etc/selinux on Fedora Silverblue / RHEL image mode),
+the rpm database only knows about the default store-root
+path, so retry there before giving up.
+
+Fixes:
+ SetroubleshootPrivileged.py[1403]: failed to retrieve rpm info for path '/etc/selinux/targeted/active/modules/100/bootupd':
+ SetroubleshootPrivileged.py[2882]: failed to retrieve rpm info for path '/etc/selinux/targeted/active/modules/200/usbguard':
+ SetroubleshootPrivileged.py[4456]: failed to retrieve rpm info for path '/etc/selinux/targeted/active/modules/100/systemd':
+---
+ src/setroubleshoot/util.py | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/src/setroubleshoot/util.py b/src/setroubleshoot/util.py
+index dd331b7..2b380bb 100755
+--- a/src/setroubleshoot/util.py
++++ b/src/setroubleshoot/util.py
+@@ -101,6 +101,8 @@ def is_type(obj):
+ DATABASE_MAJOR_VERSION = 3
+ DATABASE_MINOR_VERSION = 0
+
++DEFAULT_STORE_ROOT = "/var/lib/selinux"
++
+ PACKAGE_MANAGER = None
+ if shutil.which('rpm'):
+ PACKAGE_MANAGER = 'rpm'
+@@ -428,7 +430,19 @@ def get_package_nvr_by_file_path(name):
+ nvr = None
+ try:
+ if PACKAGE_MANAGER == 'rpm':
+- nvr = subprocess.check_output(["rpm", "-qf", name], universal_newlines=True, stderr=subprocess.PIPE).rstrip()
++ try:
++ nvr = subprocess.check_output(["rpm", "-qf", name], universal_newlines=True, stderr=subprocess.PIPE).rstrip()
++ except subprocess.CalledProcessError:
++ # on systems with a non-default SELinux module store-root
++ # (e.g. /etc/selinux on Fedora Silverblue / RHEL image mode),
++ # the rpm database only knows about the default store-root
++ # path, so retry there before giving up
++ store_root = get_store_root()
++ if store_root != DEFAULT_STORE_ROOT and name.startswith(store_root):
++ def_name = DEFAULT_STORE_ROOT + name[len(store_root):]
++ nvr = subprocess.check_output(["rpm", "-qf", def_name], universal_newlines=True, stderr=subprocess.PIPE).rstrip()
++ else:
++ raise
+ if PACKAGE_MANAGER == 'deb':
+ # dpkg-query -S foo |cut -d: -f1
+ try:
+@@ -910,7 +924,7 @@ def get_store_root():
+ return value.strip()
+ except:
+ pass
+- return "/var/lib/selinux"
++ return DEFAULT_STORE_ROOT
+ #------------------------------------------------------------------------------
+
+ STDOFFSET = datetime.timedelta(seconds=-time.timezone)
+--
+2.55.0
+
diff --git a/setroubleshoot.spec b/setroubleshoot.spec
index a1ad19c..e2b4385 100644
--- a/setroubleshoot.spec
+++ b/setroubleshoot.spec
@@ -6,7 +6,7 @@
Summary: Helps troubleshoot SELinux problems
Name: setroubleshoot
Version: 3.3.37
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPL-2.0-or-later
URL: https://gitlab.com/setroubleshoot/setroubleshoot
VCS: git:https://gitlab.com/setroubleshoot/setroubleshoot.git
@@ -23,6 +23,7 @@ Patch: 0005-Fix-port-handling.patch
Patch: 0006-Require-root-to-delete-alerts-via-D-Bus.patch
Patch: 0007-Protect-against-malicious-socket-blocking.patch
Patch: 0008-Require-privileged-access-to-change-email-alert-reci.patch
+Patch: 0009-Use-default-module-store-path-when-searching-for-pac.patch
BuildRequires: gcc
BuildRequires: make
BuildRequires: libcap-ng-devel
@@ -201,6 +202,9 @@ to user preference. The same tools can be run on existing log files.
%doc AUTHORS COPYING ChangeLog DBUS.md NEWS README TODO
%changelog
+* Wed Oct 21 2026 Vit Mojzis <vmojzis@redhat.com> - 3.3.37-7
+- Use default module store path when searching for package of origin
+
* Fri Aug 07 2026 Vit Mojzis <vmojzis@redhat.com> - 3.3.37-6
- Require privileged access to change email alert recipients
- Protect against malicious socket blocking
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-30 23:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30 23:13 [rpms/setroubleshoot] rawhide: setroubleshoot-3.3.37-7 Vit Mojzis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox