Compare commits

..

No commits in common. 'c10-beta' and 'c9' have entirely different histories.
c10-beta ... c9

2
.gitignore vendored

@ -1 +1 @@
SOURCES/setroubleshoot-3.3.33.tar.gz
SOURCES/setroubleshoot-3.3.32.tar.gz

@ -1 +1 @@
6d26c20ec838350e657eeedfe4b5c82f2b608992 SOURCES/setroubleshoot-3.3.33.tar.gz
6ee4101312b8c2b98ea7d007eccd62918f59c4f3 SOURCES/setroubleshoot-3.3.32.tar.gz

@ -1,36 +0,0 @@
From dce909e06ba1471d5bbc2174bd7672be684bdf64 Mon Sep 17 00:00:00 2001
From: Petr Lautrbach <lautrbach@redhat.com>
Date: Mon, 3 Jun 2024 15:44:28 +0200
Subject: [PATCH] gitlab-ci: fix Fedora and Debian build requirements
Content-type: text/plain
Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
---
.gitlab-ci.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bea5081bb0b9..f316357a9164 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -31,6 +31,7 @@ build:debian:
apt-get -y install autoconf automake libglib2.0-dev libdbus-glib-1-dev libnotify-dev
libgtk-3-dev gcc python3-selinux python3-gi python3-dbus python3-six python3-sepolicy
xdg-utils make intltool libaudit-dev libauparse-dev python3-pip python3-dasbus
+ python3-setuptools
- ./autogen.sh
- make
- make install
@@ -44,7 +45,8 @@ build:fedora:
dnf -y install make gcc automake autoconf libcap-ng-devel intltool gettext
python3 python3-devel desktop-file-utils dbus-glib-devel gtk2-devel libnotify-devel
audit-libs-devel libselinux-devel polkit-devel python3-libselinux python3-dasbus
- python3-gobject gtk3-devel xdg-utils intltool gettext python3 python3-devel
+ python3-gobject gtk3-devel xdg-utils intltool gettext
+ python3-setuptools python3-wheel python3-pip
- ./autogen.sh
- make
- make install
--
2.44.0

@ -0,0 +1,71 @@
From 2f9e575333af7c7798956f211c29a46a338155e5 Mon Sep 17 00:00:00 2001
From: Petr Lautrbach <lautrbach@redhat.com>
Date: Mon, 24 Jul 2023 17:33:17 +0200
Subject: [PATCH] 'imp' module is deprecated in favor of 'importlib'
Content-type: text/plain
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2224393
---
src/setroubleshoot/util.py | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/src/setroubleshoot/util.py b/src/setroubleshoot/util.py
index 0e02f12de682..828a598ef1c2 100755
--- a/src/setroubleshoot/util.py
+++ b/src/setroubleshoot/util.py
@@ -73,6 +73,7 @@ import datetime
from dasbus.connection import SystemMessageBus
import glob
from gi.repository import GObject
+import importlib
import os
import pwd
import re
@@ -771,37 +772,26 @@ def load_plugins(filter_glob=None):
# load the parent (e.g. the package containing the submodules), required for python 2.5 and above
module_name = plugin_base
- plugin_name = '__init__'
if module_name not in sys.modules:
try:
- import imp
- mod_fp, mod_path, mod_description = imp.find_module(plugin_name, [plugin_dir])
- mod = imp.load_module(module_name, mod_fp, mod_path, mod_description)
+ mod_spec = importlib.util.spec_from_file_location(plugin_base, plugin_dir + "/__init__.py")
+ mod = importlib.util.module_from_spec(mod_spec)
+ mod_spec.loader.exec_module(mod)
except Exception as e:
syslog.syslog(syslog.LOG_ERR, "failed to initialize plugins in %s: %s" % (plugin_dir, str(e)))
return []
- if mod_fp:
- mod_fp.close()
-
for plugin_name in plugin_names:
module_name = "%s.%s" % (plugin_base, plugin_name)
- mod = sys.modules.get(module_name)
- if mod is not None:
- log_debug("load_plugins() %s previously imported" % module_name)
- plugins.append(mod.plugin())
- continue
+
try:
- import imp
- mod_fp, mod_path, mod_description = imp.find_module(plugin_name, [plugin_dir])
- mod = imp.load_module(module_name, mod_fp, mod_path, mod_description)
+ mod_spec = importlib.util.spec_from_file_location(module_name, plugin_dir + "/" + plugin_name + ".py")
+ mod = importlib.util.module_from_spec(mod_spec)
+ mod_spec.loader.exec_module(mod)
plugins.append(mod.plugin())
except Exception as e:
syslog.syslog(syslog.LOG_ERR, "failed to load %s plugin: %s" % (plugin_name, str(e)))
- if mod_fp:
- mod_fp.close()
-
plugins.sort(key=cmp_to_key(sort_plugins))
return plugins
--
2.41.0

@ -0,0 +1,29 @@
From 659f10a0ab422251f4d6857fb34ddf1c25b21b37 Mon Sep 17 00:00:00 2001
From: Petr Lautrbach <lautrbach@redhat.com>
Date: Wed, 3 May 2023 09:35:28 +0200
Subject: [PATCH] Always reset pending alarms when alarm(0)
Content-type: text/plain
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2112573
Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
---
src/setroubleshoot/server.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/setroubleshoot/server.py b/src/setroubleshoot/server.py
index fd89a5448912..2b1b0b1c30d0 100755
--- a/src/setroubleshoot/server.py
+++ b/src/setroubleshoot/server.py
@@ -703,7 +703,7 @@ Deletes an alert from the database.
return ""
def alarm(self, timeout=10):
- if self.conn_ctr == 0:
+ if self.conn_ctr == 0 or timeout == 0:
signal.alarm(timeout)
--
2.41.0

File diff suppressed because it is too large Load Diff

@ -1,62 +0,0 @@
From e72f22bac65ed67849d8df28b7119c76df077c67 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Thu, 22 Aug 2024 12:14:53 +0200
Subject: [PATCH] Disable bug reporting, if libreport is not available
libreport doesn't support JIRA, so it won't be in RHEL.
Resolves: RHEL-52902
Signed-off-by: Michal Srb <michal@redhat.com>
---
src/setroubleshoot/browser.py | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/setroubleshoot/browser.py b/src/setroubleshoot/browser.py
index c98b075..33272db 100644
--- a/src/setroubleshoot/browser.py
+++ b/src/setroubleshoot/browser.py
@@ -64,10 +64,17 @@ from setroubleshoot.util import *
from setroubleshoot.html_util import html_to_text
import re
import dbus
-import report
-import report.io
-import report.io.GTKIO
-import report.accountmanager
+
+has_libreport = False
+try:
+ import report
+ import report.io
+ import report.io.GTKIO
+ import report.accountmanager
+ has_libreport = True
+except ImportError:
+ # Bug reporting won't be available
+ pass
from gi.repository import Gio
@@ -278,7 +285,8 @@ class BrowserApplet:
self.make_treeview()
self.troubleshoot_visible = False
self.current_alert = -1
- self.accounts = report.accountmanager.AccountManager()
+ if has_libreport:
+ self.accounts = report.accountmanager.AccountManager()
def get_current_alert(self):
try:
@@ -541,7 +549,7 @@ class BrowserApplet:
report_button.connect("clicked", self.fix_bug, alert.local_id, plugin.analysis_id)
vbox.add(report_button)
- elif plugin.report_bug:
+ elif plugin.report_bug and has_libreport:
report_button = Gtk.Button()
report_button.set_label(_("Report\nBug"))
report_button.show()
--
2.46.0

@ -0,0 +1,52 @@
From 502d06c8fa86b53198a2f4aeb59efdf1203531d6 Mon Sep 17 00:00:00 2001
From: Petr Lautrbach <lautrbach@redhat.com>
Date: Wed, 3 May 2023 10:17:06 +0200
Subject: [PATCH] gitlab-ci: use apt-get to install python3-dbus package
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-type: text/plain
Fixes:
$ pip3 install dasbus
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
---
.gitlab-ci.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e82e12f66737..bea5081bb0b9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,8 +30,7 @@ build:debian:
- >
apt-get -y install autoconf automake libglib2.0-dev libdbus-glib-1-dev libnotify-dev
libgtk-3-dev gcc python3-selinux python3-gi python3-dbus python3-six python3-sepolicy
- xdg-utils make intltool libaudit-dev libauparse-dev python3-pip
- - pip3 install dasbus
+ xdg-utils make intltool libaudit-dev libauparse-dev python3-pip python3-dasbus
- ./autogen.sh
- make
- make install
--
2.41.0

@ -1,22 +1,20 @@
# Disable automatic compilation of Python files in extra directories
%global _python_bytecompile_extra 0
%bcond libreport %{undefined rhel}
Summary: Helps troubleshoot SELinux problems
Name: setroubleshoot
Version: 3.3.33
Release: 4.1%{?dist}
Version: 3.3.32
Release: 1%{?dist}
License: GPL-2.0-or-later
URL: https://gitlab.com/setroubleshoot/setroubleshoot
Source0: https://gitlab.com/setroubleshoot/setroubleshoot/-/archive/%{version}/setroubleshoot-%{version}.tar.gz
Source1: %{name}.tmpfiles
Source2: %{name}.sysusers
# git format-patch -N 3.3.33
# git format-patch -N 3.3.32
# i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
Patch0001: 0001-gitlab-ci-fix-Fedora-and-Debian-build-requirements.patch
Patch0002: 0002-data-update-app-icon.patch
Patch0003: 0003-disable-bug-reporting-if-libreport-is-not-available.patch
Patch0001: 0001-imp-module-is-deprecated-in-favor-of-importlib.patch
Patch0002: 0002-Always-reset-pending-alarms-when-alarm-0.patch
Patch0003: 0003-gitlab-ci-use-apt-get-to-install-python3-dbus-packag.patch
BuildRequires: gcc
BuildRequires: make
BuildRequires: libcap-ng-devel
@ -26,12 +24,9 @@ BuildRequires: audit-libs-devel >= 3.0.1
BuildRequires: python3-libselinux python3-dasbus python3-gobject gtk3-devel
# for the _tmpfilesdir macro
BuildRequires: systemd-rpm-macros
BuildRequires: git-core
Requires: %{name}-server = %{version}-%{release}
Requires: gtk3, libnotify
%if %{with libreport}
Requires: libreport-gtk >= 2.2.1-2, python3-libreport
%endif
Requires: python3-gobject, python3-dasbus
Requires(post): desktop-file-utils
Requires(post): dbus
@ -73,7 +68,7 @@ to user preference. The same tools can be run on existing log files.
%prep
%autosetup -p 1 -S git
%autosetup -p 1
%build
./autogen.sh
@ -199,50 +194,18 @@ to user preference. The same tools can be run on existing log files.
%doc AUTHORS COPYING ChangeLog DBUS.md NEWS README TODO
%changelog
* Wed Aug 21 2024 Michal Srb <michal@redhat.com> - 3.3.33-4.1
- Disable bug reporting, if libreport is not available
- Resolves: RHEL-52902
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.3.33-3.1
- Bump release for June 2024 mass rebuild
* Tue Jun 11 2024 Petr Lautrbach <lautrbach@redhat.com> - 3.3.33-2.1
- Ship with contemporary app icon
* Wed Jan 31 2024 Vit Mojzis <vmojzis@redhat.com> - 3.3.33-1
- Check that SELinux is enabled before running (rhbz#2178950)
- Improve limiting RAM utilization
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.32-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Jul 25 2023 Petr Lautrbach <lautrbach@redhat.com> - 3.3.32-7
* Thu Jul 27 2023 Petr Lautrbach <lautrbach@redhat.com> - 3.3.32-1
- Always reset pending alarms when alarm(0) (rhbz#2112573)
* Tue Jul 25 2023 Petr Lautrbach <lautrbach@redhat.com> - 3.3.32-6
- 'imp' module is deprecated in favor of 'importlib' (rhbz#2224393)
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.32-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 3.3.32-4
- Rebuilt for Python 3.12
* Fri May 26 2023 Miro Hrončok <mhroncok@redhat.com> - 3.3.32-3
- Fix build with pip 23.1.2+
- Fixes: rhbz#2209022
* Mon May 15 2023 Tomas Popela <tpopela@redhat.com> - 3.3.32-2
- Remove dbus-glib-devel BR as it's only needed when compiled with seappletlegacy
* Wed Feb 15 2023 Petr Lautrbach <lautrbach@redhat.com> - 3.3.32-1
- Rename session bus name to org.fedoraproject.sealert
- seapplet: wrap SEApplet() to try except
- util.py: Add doctext test for build_module_type_cache()
- Update translations
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.31-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Mar 09 2023 Vit Mojzis <vmojzis@redhat.com> - 3.3.31-2
- Update translations (#2139682)
* Wed Nov 23 2022 Petr Lautrbach <lautrbach@redhat.com> - 3.3.31-1
- Add a screen reader label to the icon
@ -252,9 +215,6 @@ to user preference. The same tools can be run on existing log files.
- Use setup from setuptools
- Use `pip install` instead of `setup.py install`
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.30-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jun 28 2022 Petr Lautrbach <plautrba@redhat.com> - 3.3.30-1
- Miscellaneous python and build system changes
- Fix couple of typos
@ -262,16 +222,12 @@ to user preference. The same tools can be run on existing log files.
- Use inspect.signature() instead of instead.getargspec()
- Update translations
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 3.3.29-2
- Rebuilt for Python 3.11
* Wed Mar 30 2022 Petr Lautrbach <plautrba@redhat.com> - 3.3.29-1
- Introduce email.use_sendmail option
- Update translations
* Wed Feb 09 2022 Timothée Ravier <tim@siosm.fr> - 3.3.28-3
- Install systemd-sysusers config
- Remove Requires(pre) useradd & groupadd
* Wed Mar 09 2022 Vit Mojzis <vmojzis@redhat.com> - 3.3.28-3
- Update translations (#2017386)
* Tue Feb 8 2022 Petr Lautrbach <plautrba@redhat.com> - 3.3.28-2
- Use %sysusers_create_compat instead of useradd
@ -290,21 +246,22 @@ to user preference. The same tools can be run on existing log files.
- sedispatch: check read_size
- SafeConfigParser is deprecated and will be dropped
- Fix typos in --help, man pages and developer's guide
- Update translations
* Tue Jul 27 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3.26-5
- Improve sedispatch performance
- Improve Python 3.10 compatibility
https://pagure.io/setroubleshoot/issue/58
- Update translations
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.26-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.3.26-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Jul 16 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3.26-4
- Improve sedispatch performance
* Fri Jul 2 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3.26-3
- Fix file mode of email_alert_recipients
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.3.26-2
- Rebuilt for Python 3.10
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.3.26-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Apr 15 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3.26-1
- Fix plugin exception reporting

Loading…
Cancel
Save