From 045dfa5c6ad3d2c974455c9e43d14726e3b8e3aa Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Tue, 22 Jan 2013 17:17:55 +0100 Subject: [PATCH] Default zone in firewalld.conf was reseted with every restart (RHBZ#902845) - Add icon cache related scriptlets for firewall-config (RHBZ#902680) - Fix typo in firewall-config (RHBZ#895812) --- firewalld-0.2.12-conf.patch | 26 +++++++++++++++++++++++++ firewalld-0.2.12-gtk.patch | 26 +++++++++++++++++++++++++ firewalld.spec | 38 +++++++++++++++++++++++++++---------- 3 files changed, 80 insertions(+), 10 deletions(-) create mode 100644 firewalld-0.2.12-conf.patch create mode 100644 firewalld-0.2.12-gtk.patch diff --git a/firewalld-0.2.12-conf.patch b/firewalld-0.2.12-conf.patch new file mode 100644 index 0000000..0a4f4cc --- /dev/null +++ b/firewalld-0.2.12-conf.patch @@ -0,0 +1,26 @@ +From 0a9017067bd04a1370faa461ceede31316f1caaa Mon Sep 17 00:00:00 2001 +From: Jiri Popelka +Date: Tue, 22 Jan 2013 16:27:56 +0100 +Subject: [PATCH 4/5] default zone in firewalld.conf was set to public with + every restart (#902845) + +--- + src/firewall/core/io/firewalld_conf.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/firewall/core/io/firewalld_conf.py b/src/firewall/core/io/firewalld_conf.py +index 159df99..911f8bf 100644 +--- a/src/firewall/core/io/firewalld_conf.py ++++ b/src/firewall/core/io/firewalld_conf.py +@@ -37,7 +37,7 @@ class firewalld_conf: + self._deleted = [ ] + + def get(self, key): +- self._config.get(key.strip()) ++ return self._config.get(key.strip()) + + def set(self, key, value): + _key = key.strip() +-- +1.8.1 + diff --git a/firewalld-0.2.12-gtk.patch b/firewalld-0.2.12-gtk.patch new file mode 100644 index 0000000..312fe92 --- /dev/null +++ b/firewalld-0.2.12-gtk.patch @@ -0,0 +1,26 @@ +From 964bd061f00c9e90935430ba3036b228800cd5ed Mon Sep 17 00:00:00 2001 +From: Jiri Popelka +Date: Wed, 16 Jan 2013 14:17:10 +0100 +Subject: [PATCH 2/5] firewall-config: fix typo gtk -> Gtk + +Fixes: RHBZ#895812 +--- + src/firewall-config | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/firewall-config b/src/firewall-config +index b783268..1f0b5dc 100755 +--- a/src/firewall-config ++++ b/src/firewall-config +@@ -839,7 +839,7 @@ class FirewallConfig(object): + if default_zone in zones: + selection.select_path(zones.index(default_zone)) + else: +- selection.set_mode(gtk.SelectionMode.NONE) ++ selection.set_mode(Gtk.SelectionMode.NONE) + + self.defaultZoneDialog.set_position(Gtk.WindowPosition.CENTER_ON_PARENT) + self.defaultZoneDialog.set_transient_for(self.mainWindow) +-- +1.8.1 + diff --git a/firewalld.spec b/firewalld.spec index 21e4fd2..e4bcf77 100644 --- a/firewalld.spec +++ b/firewalld.spec @@ -1,7 +1,7 @@ Summary: A firewall daemon with D-BUS interface providing a dynamic firewall Name: firewalld Version: 0.2.12 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://fedorahosted.org/firewalld License: GPLv2+ ExclusiveOS: Linux @@ -11,6 +11,8 @@ Source0: https://fedorahosted.org/released/firewalld/%{name}-%{version}.tar.bz2 %if 0%{?fedora} > 17 Patch0: firewalld-0.2.6-MDNS-default.patch %endif +Patch1: firewalld-0.2.12-conf.patch +Patch2: firewalld-0.2.12-gtk.patch BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: intltool @@ -76,6 +78,9 @@ firewalld. %patch0 -p1 %endif +%patch1 -p1 +%patch2 -p1 + %build %configure --with-systemd-unitdir=%{_unitdir} @@ -112,24 +117,32 @@ desktop-file-install --delete-original \ /bin/systemctl try-restart firewalld.service >/dev/null 2>&1 || : %post -n firewall-applet -touch --no-create %{_datadir}/icons/hicolor -if [ -x /usr/bin/gtk-update-icon-cache ]; then - gtk-update-icon-cache -q %{_datadir}/icons/hicolor -fi +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun -n firewall-applet -touch --no-create %{_datadir}/icons/hicolor -if [ -x /usr/bin/gtk-update-icon-cache ]; then - gtk-update-icon-cache -q %{_datadir}/icons/hicolor -fi if [ $1 -eq 0 ] ; then - /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : fi %posttrans -n firewall-applet +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +%post -n firewall-config +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun -n firewall-config +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans -n firewall-config +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + %files -f %{name}.lang %doc COPYING %{_sbindir}/firewalld @@ -183,6 +196,11 @@ fi %{_datadir}/icons/hicolor/*/apps/firewall-config*.* %changelog +* Tue Jan 22 2013 Jiri Popelka - 0.2.12-2 +- Default zone in firewalld.conf was reseted with every restart (RHBZ#902845) +- Add icon cache related scriptlets for firewall-config (RHBZ#902680) +- Fix typo in firewall-config (RHBZ#895812) + * Mon Jan 14 2013 Thomas Woerner 0.2.12-1 - firewall-cmd: use -V instead of -v for version info (RHBZ#886477) - firewall-cmd: don't check reload()'s return value (RHBZ#886461)