From 77a1f06fb41943a99d3daeca67bdc5dbff28314d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 04 2022 18:09:42 +0000 Subject: import python-slip-0.6.4-13.el8 --- diff --git a/SOURCES/fix-firewalld-logging.patch b/SOURCES/fix-firewalld-logging.patch new file mode 100644 index 0000000..5f82481 --- /dev/null +++ b/SOURCES/fix-firewalld-logging.patch @@ -0,0 +1,39 @@ +diff --git a/slip/dbus/polkit.py b/slip/dbus/polkit.py +index e92db4d..cc3dbd8 100644 +--- a/slip/dbus/polkit.py ++++ b/slip/dbus/polkit.py +@@ -206,17 +206,17 @@ class PolKit(object): + @property + def _interface(self): + if not PolKit.__interface: +- PolKit.__interface = dbus.Interface(self._bus.get_object( +- self._dbus_name, self._dbus_path), +- self._dbus_interface) ++ try: ++ PolKit.__interface = dbus.Interface(self._bus.get_object( ++ self._dbus_name, self._dbus_path), ++ self._dbus_interface) ++ except dbus.DBusException: ++ pass + return PolKit.__interface + + @property + def _polkit_present(self): +- try: +- return bool(self._interface) +- except dbus.DBusException: +- return False ++ return bool(self._interface) + + def __dbus_system_bus_name_uid(self, system_bus_name): + bus_object = self._bus.get_object( +@@ -258,8 +258,7 @@ class PolKit(object): + challenge=True, details={}): + + if not self._polkit_present: +- reply_handler( +- action_id is None or ++ return reply_handler(action_id is None or + self.__dbus_system_bus_name_uid(system_bus_name) == 0) + + flags = 0 diff --git a/SPECS/python-slip.spec b/SPECS/python-slip.spec index c89d1cc..1067b0c 100644 --- a/SPECS/python-slip.spec +++ b/SPECS/python-slip.spec @@ -1,6 +1,6 @@ Name: python-slip Version: 0.6.4 -Release: 11%{?dist} +Release: 13%{?dist} Summary: Convenience, extension and workaround code for Python Group: System Environment/Libraries @@ -9,6 +9,12 @@ URL: https://github.com/nphilipp/python-slip Source0: https://github.com/nphilipp/python-slip/releases/download/python-slip-%{version}/python-slip-%{version}.tar.bz2 BuildArch: noarch +# Make firewalld to not log errors when running commands as root, +# when polkitd is not present +# Fixed upstream: https://github.com/nphilipp/python-slip/commit/39787d6773f628119876dd88bb0106e77a65201e +# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2076606 +Patch0: fix-firewalld-logging.patch + BuildRequires: python3 BuildRequires: python3-devel @@ -60,6 +66,7 @@ functions and decorators for integrating a dbus service with PolicyKit. %prep %setup -q +%patch0 -p1 find . -name '*.py' -o -name '*.py.in' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' @@ -88,6 +95,14 @@ make install PYTHON=%{__python3} DESTDIR=%buildroot %{python3_sitelib}/slip.dbus-%{version}-py%{python3_version}.egg-info %changelog +* Tue May 03 2022 Charalampos Stratakis - 0.6.4-13 +- Release bump + +* Tue Apr 26 2022 Charalampos Stratakis - 0.6.4-12 +- Make firewalld to not log errors when running commands as root + in the absence of polkitd. +Resolves: rhbz#2076606 + * Tue Jun 05 2018 Petr Viktorin - 0.6.4-11 - Remove the Python 2 subpackages https://bugzilla.redhat.com/show_bug.cgi?id=1566681