setroubleshoot-3.3.36
- audit_data: include syslog when needed - Rename appdata to metainfo - Replace python-six with python 3 only code Note: https://src.fedoraproject.org/rpms/setroubleshoot/pull-request/63 is not relevant to RHEL 10. Related: https://issues.redhat.com/browse/SELINUX-4950
This commit is contained in:
parent
336cf1a889
commit
36280fa6dd
1
.gitignore
vendored
1
.gitignore
vendored
@ -220,3 +220,4 @@ setroubleshoot-2.2.93.tar.gz
|
||||
/setroubleshoot-3.3.33.tar.gz
|
||||
/setroubleshoot-3.3.34.tar.gz
|
||||
/setroubleshoot-3.3.35.tar.gz
|
||||
/setroubleshoot-3.3.36.tar.gz
|
||||
|
||||
@ -1,43 +0,0 @@
|
||||
From c36a476e64bc695c439ffa691533b395977b6369 Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Mon, 30 Jun 2025 18:04:55 +0200
|
||||
Subject: [PATCH] audit_data: include syslog when needed
|
||||
|
||||
Fixes:
|
||||
setroubleshoot[5450]: Unable to process audit event: cannot access local variable 'syslog' where it is not associated with a value
|
||||
setroubleshoot[5450]: Traceback (most recent call last):
|
||||
setroubleshoot[5450]: File "/usr/lib/python3.12/site-packages/setroubleshoot/audit_data.py", line 1106, in compute_avcs
|
||||
setroubleshoot[5450]: avcs.append(AVC(audit_event, record))
|
||||
setroubleshoot[5450]: ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
setroubleshoot[5450]: File "/usr/lib/python3.12/site-packages/setroubleshoot/audit_data.py", line 675, in __init__
|
||||
setroubleshoot[5450]: self.derive_avc_info_from_audit_event(avc_record)
|
||||
setroubleshoot[5450]: File "/usr/lib/python3.12/site-packages/setroubleshoot/audit_data.py", line 1021, in derive_avc_info_from_audit_event
|
||||
setroubleshoot[5450]: raise AVCError(_("%s \n**** Recorded AVC is allowed in current policy ****\n") % self.avc_record)
|
||||
setroubleshoot[5450]: setroubleshoot.audit_data.AVCError: node=mmalik-1mt-centos-stream-10-10625-2024-06-03-07-41 type=AVC msg=audit(1717400917.313:578): avc: >
|
||||
setroubleshoot[5450]:
|
||||
setroubleshoot[5450]: **** Recorded AVC is allowed in current policy ****
|
||||
setroubleshoot[5450]: During handling of the above exception, another exception occurred:
|
||||
setroubleshoot[5450]: Traceback (most recent call last):
|
||||
setroubleshoot[5450]: File "/usr/lib/python3.12/site-packages/setroubleshoot/audit_data.py", line 1108, in compute_avcs
|
||||
setroubleshoot[5450]: syslog.syslog(syslog.LOG_ERR, "%s" % e)
|
||||
setroubleshoot[5450]: ^^^^^^
|
||||
setroubleshoot[5450]: UnboundLocalError: cannot access local variable 'syslog' where it is not associated with a value
|
||||
---
|
||||
src/setroubleshoot/audit_data.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/setroubleshoot/audit_data.py b/src/setroubleshoot/audit_data.py
|
||||
index de2b0f1..409492a 100644
|
||||
--- a/src/setroubleshoot/audit_data.py
|
||||
+++ b/src/setroubleshoot/audit_data.py
|
||||
@@ -1105,6 +1105,7 @@ def compute_avcs(audit_event):
|
||||
try:
|
||||
avcs.append(AVC(audit_event, record))
|
||||
except AVCError as e:
|
||||
+ import syslog
|
||||
syslog.syslog(syslog.LOG_ERR, "%s" % e)
|
||||
except Exception as e:
|
||||
import syslog
|
||||
--
|
||||
2.49.0
|
||||
|
||||
39
0001-browser-Always-show-Report-Bug-button.patch
Normal file
39
0001-browser-Always-show-Report-Bug-button.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From fb4a884fe6266e664cc886273bad3b2ae761118a Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Thu, 11 Dec 2025 13:50:45 +0100
|
||||
Subject: [PATCH] browser: Always show "Report Bug" button
|
||||
|
||||
Without python3-libreport the "Report Bug" button was not shown at all.
|
||||
After this change the button is always visible, but without libreport it
|
||||
is disabled and the tooltip tells the user how to enable it.
|
||||
|
||||
Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
|
||||
---
|
||||
src/setroubleshoot/browser.py | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/setroubleshoot/browser.py b/src/setroubleshoot/browser.py
|
||||
index 73fc26e..47788a7 100644
|
||||
--- a/src/setroubleshoot/browser.py
|
||||
+++ b/src/setroubleshoot/browser.py
|
||||
@@ -548,11 +548,15 @@ class BrowserApplet:
|
||||
report_button.connect("clicked", self.fix_bug, alert.local_id, plugin.analysis_id)
|
||||
vbox.add(report_button)
|
||||
|
||||
- elif plugin.report_bug and has_libreport:
|
||||
+ elif plugin.report_bug:
|
||||
report_button = Gtk.Button()
|
||||
report_button.set_label(_("Report\nBug"))
|
||||
report_button.show()
|
||||
- report_button.connect("clicked", self.report_bug, alert)
|
||||
+ if has_libreport:
|
||||
+ report_button.connect("clicked", self.report_bug, alert)
|
||||
+ else:
|
||||
+ report_button.set_sensitive(False)
|
||||
+ report_button.set_tooltip_text(_("Please install python3-libreport to enable bug reporting."))
|
||||
vbox.add(report_button)
|
||||
|
||||
vbox.set_sensitive(highlight)
|
||||
--
|
||||
2.52.0
|
||||
|
||||
@ -5,16 +5,16 @@
|
||||
|
||||
Summary: Helps troubleshoot SELinux problems
|
||||
Name: setroubleshoot
|
||||
Version: 3.3.35
|
||||
Release: 4%{?dist}
|
||||
Version: 3.3.36
|
||||
Release: 1%{?dist}
|
||||
License: GPL-2.0-or-later
|
||||
URL: https://gitlab.com/setroubleshoot/setroubleshoot
|
||||
Source0: https://gitlab.com/-/project/24478376/uploads/eade7bc68ab559b9afc00d59644bdee0/setroubleshoot-3.3.35.tar.gz
|
||||
Source0: https://gitlab.com/-/project/24478376/uploads/51a9cda747130f92860720841a7fd9c9/setroubleshoot-3.3.36.tar.gz
|
||||
Source1: %{name}.tmpfiles
|
||||
Source2: %{name}.sysusers
|
||||
# git format-patch -N 3.3.34
|
||||
# i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
|
||||
Patch0001: 0001-audit_data-include-syslog-when-needed.patch
|
||||
# git format-patch -N 3.3.36
|
||||
# for j in 00*patch; do printf "Patch: %s\n" $j; done
|
||||
Patch: 0001-browser-Always-show-Report-Bug-button.patch
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: libcap-ng-devel
|
||||
@ -28,7 +28,7 @@ BuildRequires: git-core
|
||||
Requires: %{name}-server = %{version}-%{release}
|
||||
Requires: gtk3, libnotify
|
||||
%if %{with libreport}
|
||||
Requires: libreport-gtk >= 2.2.1-2, python3-libreport
|
||||
Recommends: libreport-gtk >= 2.2.1-2, python3-libreport
|
||||
%endif
|
||||
Requires: python3-gobject, python3-dasbus
|
||||
Requires(post): desktop-file-utils
|
||||
@ -59,7 +59,7 @@ to user preference. The same tools can be run on existing log files.
|
||||
%{pkgguidir}
|
||||
%config(noreplace) %{_sysconfdir}/xdg/autostart/*
|
||||
%{_datadir}/applications/*.desktop
|
||||
%{_metainfodir}/*.appdata.xml
|
||||
%{_metainfodir}/*.metainfo.xml
|
||||
%{_datadir}/dbus-1/services/org.fedoraproject.sealert.service
|
||||
%{_datadir}/icons/hicolor/*/*/*
|
||||
%dir %attr(0755,root,root) %{pkgpythondir}
|
||||
@ -107,7 +107,7 @@ BuildRequires: python3-devel
|
||||
Requires: systemd-python3 >= 206-1
|
||||
Requires: python3-gobject-base >= 3.11
|
||||
Requires: dbus
|
||||
Requires: python3-dbus python3-dasbus python3-six
|
||||
Requires: python3-dbus python3-dasbus
|
||||
Requires: polkit
|
||||
|
||||
%description server
|
||||
@ -195,6 +195,11 @@ to user preference. The same tools can be run on existing log files.
|
||||
%doc AUTHORS COPYING ChangeLog DBUS.md NEWS README TODO
|
||||
|
||||
%changelog
|
||||
* Mon Dec 15 2025 Vit Mojzis <vmojzis@redhat.com> - 3.3.36-1
|
||||
- Rename appdata to metainfo
|
||||
- Replace python-six with python 3 only code
|
||||
- browser: Always show "Report Bug" button
|
||||
|
||||
* Tue Jul 01 2025 Vit Mojzis <vmojzis@redhat.com> - 3.3.35-4
|
||||
- audit_data: include syslog when needed (RHEL-39700)
|
||||
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (setroubleshoot-3.3.35.tar.gz) = e9483c1da9a17426e26a50ecd025610d7b1bc9e487cf703a7fcf2696a9542f863cec5a1e3299b43b53c86e01182485c5f7ad822c84c197ae5cc27aa4909dbae6
|
||||
SHA512 (setroubleshoot-3.3.36.tar.gz) = 089583970169d4127cf825d8660dc755cb154771b8e48f6b7558f8fa090491ad6ac492f435a8f410c73c46ab1500a203f4123fcda69b1cd7adbf792b5580cb83
|
||||
|
||||
Loading…
Reference in New Issue
Block a user