import python-slip-0.6.4-13.el8
This commit is contained in:
parent
967f923b32
commit
faa861065d
39
SOURCES/fix-firewalld-logging.patch
Normal file
39
SOURCES/fix-firewalld-logging.patch
Normal file
@ -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
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: python-slip
|
Name: python-slip
|
||||||
Version: 0.6.4
|
Version: 0.6.4
|
||||||
Release: 11%{?dist}
|
Release: 13%{?dist}
|
||||||
Summary: Convenience, extension and workaround code for Python
|
Summary: Convenience, extension and workaround code for Python
|
||||||
|
|
||||||
Group: System Environment/Libraries
|
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
|
Source0: https://github.com/nphilipp/python-slip/releases/download/python-slip-%{version}/python-slip-%{version}.tar.bz2
|
||||||
BuildArch: noarch
|
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
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
|
||||||
@ -60,6 +66,7 @@ functions and decorators for integrating a dbus service with PolicyKit.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
find . -name '*.py' -o -name '*.py.in' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
|
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
|
%{python3_sitelib}/slip.dbus-%{version}-py%{python3_version}.egg-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 03 2022 Charalampos Stratakis <cstratak@redhat.com> - 0.6.4-13
|
||||||
|
- Release bump
|
||||||
|
|
||||||
|
* Tue Apr 26 2022 Charalampos Stratakis <cstratak@redhat.com> - 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 <pviktori@redhat.com> - 0.6.4-11
|
* Tue Jun 05 2018 Petr Viktorin <pviktori@redhat.com> - 0.6.4-11
|
||||||
- Remove the Python 2 subpackages
|
- Remove the Python 2 subpackages
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1566681
|
https://bugzilla.redhat.com/show_bug.cgi?id=1566681
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user