Compare commits

...

No commits in common. 'c9' and 'i10cs' have entirely different histories.
c9 ... i10cs

2
.gitignore vendored

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

@ -1 +1 @@
6ee4101312b8c2b98ea7d007eccd62918f59c4f3 SOURCES/setroubleshoot-3.3.32.tar.gz
a3bfe767bf3a84e85aa839fc2b1ffcdfe9014916 SOURCES/setroubleshoot-3.3.35.tar.gz

@ -1,71 +0,0 @@
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

@ -1,29 +0,0 @@
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

@ -1,52 +0,0 @@
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,20 +1,19 @@
# 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.32
Version: 3.3.35
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.32
# 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-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
@ -24,9 +23,12 @@ 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
@ -68,7 +70,7 @@ to user preference. The same tools can be run on existing log files.
%prep
%autosetup -p 1
%autosetup -p 1 -S git
%build
./autogen.sh
@ -194,18 +196,70 @@ to user preference. The same tools can be run on existing log files.
%doc AUTHORS COPYING ChangeLog DBUS.md NEWS README TODO
%changelog
* Thu Jul 27 2023 Petr Lautrbach <lautrbach@redhat.com> - 3.3.32-1
* Tue Nov 26 2024 Petr Lautrbach <lautrbach@redhat.com> - 3.3.35-1
- Do not hardcode /var/lib/selinux as store_root
* Fri Nov 15 2024 Petr Lautrbach <lautrbach@redhat.com> - 3.3.34-2
- Do not hardcode /var/lib/selinux as store_root
- Fix icon file name (bz#2300369)
* Mon Nov 04 2024 Petr Lautrbach <lautrbach@redhat.com> - 3.3.34-1
- data: update app icon
- Disable bug reporting, if libreport is not available
- Enable Georgian and Arabic (ar) languages in configure.ac
- Update translations
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 3.3.33-5.1
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 3.3.33-4.1
- Rebuilt for MSVSphere 10
* 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
- 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
* Thu Mar 09 2023 Vit Mojzis <vmojzis@redhat.com> - 3.3.31-2
- Update translations (#2139682)
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.31-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Nov 23 2022 Petr Lautrbach <lautrbach@redhat.com> - 3.3.31-1
- Add a screen reader label to the icon
@ -215,6 +269,9 @@ 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
@ -222,12 +279,16 @@ 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 Mar 09 2022 Vit Mojzis <vmojzis@redhat.com> - 3.3.28-3
- Update translations (#2017386)
* Wed Feb 09 2022 Timothée Ravier <tim@siosm.fr> - 3.3.28-3
- Install systemd-sysusers config
- Remove Requires(pre) useradd & groupadd
* Tue Feb 8 2022 Petr Lautrbach <plautrba@redhat.com> - 3.3.28-2
- Use %sysusers_create_compat instead of useradd
@ -246,22 +307,21 @@ 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
- Improve Python 3.10 compatibility
https://pagure.io/setroubleshoot/issue/58
- Update translations
* 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
* 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
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.26-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jul 2 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3.26-3
- Fix file mode of email_alert_recipients
* 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
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.3.26-2
- Rebuilt for Python 3.10
* Thu Apr 15 2021 Petr Lautrbach <plautrba@redhat.com> - 3.3.26-1
- Fix plugin exception reporting

Loading…
Cancel
Save