setroubleshoot-3.3.33-1
- Check that SELinux is enabled before running (rhbz#2178950) - Improve limiting RAM utilization
This commit is contained in:
parent
6a4fd9320c
commit
1a11b3af0a
1
.gitignore
vendored
1
.gitignore
vendored
@ -217,3 +217,4 @@ setroubleshoot-2.2.93.tar.gz
|
||||
/setroubleshoot-3.3.30.tar.gz
|
||||
/setroubleshoot-3.3.31.tar.gz
|
||||
/setroubleshoot-3.3.32.tar.gz
|
||||
/setroubleshoot-3.3.33.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
|
||||
|
@ -3,18 +3,15 @@
|
||||
|
||||
Summary: Helps troubleshoot SELinux problems
|
||||
Name: setroubleshoot
|
||||
Version: 3.3.32
|
||||
Release: 8%{?dist}
|
||||
Version: 3.3.33
|
||||
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.33
|
||||
# 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
|
||||
@ -194,6 +191,10 @@ to user preference. The same tools can be run on existing log files.
|
||||
%doc AUTHORS COPYING ChangeLog DBUS.md NEWS README TODO
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (setroubleshoot-3.3.32.tar.gz) = 49199181d56e8e24b80a5931eb2e9484a045740eccbc0b3dae1cecc1041126e5f71e670367bf5ed6baf197181d217b5435f9cb04aae5ad6e6b1298ac143007f4
|
||||
SHA512 (setroubleshoot-3.3.33.tar.gz) = d70af05d1259b2b5c48f15a47e656865f2c0eb1d09a2441e651089914128340a0ac56cb5d40bd2b66bf64a25bf630086b7b11ae726d9e152257bc2e4a47b9c45
|
||||
|
Loading…
Reference in New Issue
Block a user