diff --git a/SOURCES/fix-firwalld-logging.patch b/SOURCES/fix-firwalld-logging.patch new file mode 100644 index 0000000..d42d357 --- /dev/null +++ b/SOURCES/fix-firwalld-logging.patch @@ -0,0 +1,38 @@ +diff --git a/slip/dbus/polkit.py b/slip/dbus/polkit.py +index 08aaa51..83b6519 100644 +--- a/slip/dbus/polkit.py ++++ b/slip/dbus/polkit.py +@@ -186,17 +186,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('org.freedesktop.DBus', +@@ -237,7 +237,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 d4bb76f..3d9bbd2 100644 --- a/SPECS/python-slip.spec +++ b/SPECS/python-slip.spec @@ -4,16 +4,22 @@ Name: python-slip Version: 0.4.0 -Release: 2%{?dist} +Release: 4%{?dist} Summary: Miscellaneous convenience, extension and workaround code for Python Group: System Environment/Libraries License: GPLv2+ -URL: http://fedorahosted.org/python-slip -Source0: http://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.bz2 +URL: https://github.com/nphilipp/python-slip +Source0: https://github.com/nphilipp/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 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=1393488 +Patch0: fix-firwalld-logging.patch + BuildRequires: python BuildRequires: python-devel @@ -63,6 +69,7 @@ lets gtk labels be automatically re-wrapped upon resizing. %prep %setup -q +%patch0 -p1 %build make %{?_smp_mflags} @@ -95,6 +102,15 @@ rm -rf %buildroot %{python_sitelib}/slip.gtk-%{version}-py%{python_version}.egg-info %changelog +* Mon Oct 16 2017 Charalampos Stratakis - 0.4.0-4 +- Fix upstream and source URL's +Resolves: rhbz#1502397 + +* Wed Sep 13 2017 Charalampos Stratakis - 0.4.0-3 +- Make firewalld to not log errors when running commands as root +in the absence of polkitd. +Resolves: rhbz#1393488 + * Fri Dec 27 2013 Daniel Mach - 0.4.0-2 - Mass rebuild 2013-12-27