Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
c8cb2a850c
!88 fix broken symbolic link after package remove
From: @sherlock2010 
Reviewed-by: @sunsuwan 
Signed-off-by: @sunsuwan
2024-08-28 09:15:50 +00:00
sherlock2010
e943e1cabb fix broken symbolic link after package remove 2024-08-27 02:41:38 +00:00
openeuler-ci-bot
71f5bcdf17
!74 bugfix sync
From: @sherlock2010 
Reviewed-by: @sunsuwan 
Signed-off-by: @sunsuwan
2024-07-05 07:55:06 +00:00
sherlock2010
f399e875f9 bugfix sync 2024-07-05 07:36:25 +00:00
openeuler-ci-bot
11511fa8a1
!45 sync 22.03 to fix(config):Specify the translation encoding format as UTF-8
From: @yangl777 
Reviewed-by: @zengwefeng 
Signed-off-by: @zengwefeng
2023-01-03 03:39:19 +00:00
yangl777
31ac80f2e3 fix(config) Specify the translation encoding format as UTF-8 2022-12-29 07:40:25 +00:00
openeuler-ci-bot
f7ba85af72
!26 add-Restart-on-failure-on-firewalld.service.patch
Merge pull request !26 from yangl777/openEuler-20.03-LTS-SP3
2022-01-22 09:38:39 +00:00
yangl777
32ae212a4b add-Restart-on-failure-on-firewalld.service.patch 2022-01-22 17:07:48 +08:00
openeuler-ci-bot
8ef34b6fbd !19 drop Requires:kernel
From: @haochenstar
Reviewed-by: @wangxp006
Signed-off-by: @wangxp006
2021-05-21 15:51:50 +08:00
haochenstar
d3d60ad26e drop Requires:kernel 2021-05-21 15:25:51 +08:00
4 changed files with 184 additions and 7 deletions

View File

@ -0,0 +1,23 @@
From 63fe76dfcaad171c1eaa8c13ccae1f5b5c98d110 Mon Sep 17 00:00:00 2001
From: hanzhijun <hanzhijun1@huawei.com>
Date: Fri, 18 Sep 2020 09:46:37 +0800
Subject: [PATCH] add Restart=on-failure on firewalld.service
---
config/firewalld.service.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/config/firewalld.service.in b/config/firewalld.service.in
index b757a08..4cfed7c 100644
--- a/config/firewalld.service.in
+++ b/config/firewalld.service.in
@@ -17,6 +17,7 @@ StandardError=null
Type=dbus
BusName=org.fedoraproject.FirewallD1
KillMode=mixed
+Restart=on-failure
[Install]
WantedBy=multi-user.target
--
2.23.0

View File

@ -0,0 +1,61 @@
From eb76e2a80a43481da7a54ff784edf1c76651db96 Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Wed, 22 Nov 2023 12:10:09 -0500
Subject: [PATCH] fix(nm): release NM client after a timeout
Conflict: NA
Reference: https://github.com/firewalld/firewalld/commit/eb76e2a80a43481da7a54ff784edf1c76651db96
libnm will accumulate a bunch of data, e.g. routes, that is irrelevant
to firewalld. To avoid unbound growth in memory we can destroy the
client and reinitialize it when we query NM.
Fixes: #1232
---
src/firewall/core/fw_nm.py | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/firewall/core/fw_nm.py b/src/firewall/core/fw_nm.py
index 0e38dd4..c1f8e1d 100644
--- a/src/firewall/core/fw_nm.py
+++ b/src/firewall/core/fw_nm.py
@@ -39,6 +39,7 @@ else:
except (ImportError, ValueError, GLib.Error):
_nm_imported = False
_nm_client = None
+_nm_client_timeout = None
from firewall import errors
from firewall.errors import FirewallError
@@ -61,9 +62,28 @@ def nm_get_client():
"""Returns the NM client object or None if the import of NM failed
@return NM.Client instance if import was successful, None otherwise
"""
+
+ def _release():
+ """
+ Release the client to avoid excess memory usage when libnm pushes
+ irrelevant (to firewalld) updates.
+ """
+ global _nm_client
+ global _nm_client_timeout
+ _nm_client = None
+ _nm_client_timeout = None
+
global _nm_client
+ global _nm_client_timeout
+
if not _nm_client:
_nm_client = NM.Client.new(None)
+ else:
+ # refresh timer
+ GLib.source_remove(_nm_client_timeout)
+
+ _nm_client_timeout = GLib.timeout_add_seconds(5, _release)
+
return _nm_client
def nm_get_zone_of_connection(connection):
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: firewalld
Version: 0.6.6
Release: 3
Release: 9
Summary: A firewall daemon with D-Bus interface providing a dynamic firewall
License: GPLv2+
URL: http://www.firewalld.org
@ -9,14 +9,17 @@ Source0: https://github.com/firewalld/firewalld/archive/v%{version}.tar.gz#/%{
Patch0: firewalld-0.2.6-MDNS-default.patch
#backport from Eric Garver <e@erig.me>
Patch1: 0001-fedora-patch-to-default-to-iptables-backend.patch
Patch2: add-Restart-on-failure-on-firewalld.service.patch
Patch3: fix-config-Specify-the-translation-encoding-format-a.patch
Patch4: backport-fix-nm-release-NM-client-after-a-timeout.patch
BuildArch: noarch
BuildRequires: autoconf automake desktop-file-utils gettext intltool glib2 glib2-devel systemd-units docbook-style-xsl
BuildRequires: libxslt iptables ebtables ipset nftables python3-devel
Requires: iptables ebtables ipset systemd hicolor-icon-theme python3-gobject NetworkManager-libnm dbus-x11 gtk3
Requires: nftables >= 0.9.0 kernel >= 4.18.0 python3-firewall = %{version}-%{release} %{name}-doc
Requires: iptables iptables-nft ipset systemd hicolor-icon-theme python3-gobject NetworkManager-libnm dbus-x11 gtk3
Requires: nftables >= 0.9.0 python3-firewall = %{version}-%{release} %{name}-doc
Obsoletes: firewalld-selinux < 0.4.4.2-2
Conflicts: selinux-policy < 3.14.1-28
@ -102,6 +105,11 @@ dd if=/dev/zero of=$RPM_BUILD_ROOT/%{_datadir}/firewalld/firewalld-tmp-mmap bs=4
%postun
%systemd_postun_with_restart firewalld.service
if [ $1 -eq 0 ]; then
if [ -L %{_sysconfdir}/firewalld/firewalld.conf ] && [ ! -e %{_sysconfdir}/firewalld/firewalld.conf ]; then
rm -f %{_sysconfdir}/firewalld/firewalld.conf
fi
fi
%posttrans
# If we don't yet have a symlink or existing file for firewalld.conf,
@ -193,23 +201,57 @@ fi
%changelog
* Wed Dec 23 2020 Anakin Zhang <benjamin93@163.com> - 0.9.6-3
* Tue Aug 27 2024 zhouyihang <zhouyihang3@h-partners.com> - 0.6.6-9
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix broken symbolic link after package remove
* Fri Jul 05 2024 zhouyihang <zhouyihang3@h-partners.com> - 0.6.6-8
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:To reduce unnecessary loading of ebtables-related kernel modules
fix(nm): release NM client after a timeout
* Thu Dec 29 2022 yanglu <yanglu72@h-partners.com> - 0.6.6-7
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Specify the translation encoding format as UTF-8
* Sat Jan 22 2022 yanglu<yanglu72@huawei.com> - 0.6.6-6
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add-Restart-on-failure-on-firewalld.service.patch
* Fri May 21 2021 xihaochen<xihaochen@huawei.com> - 0.6.6-5
- Type:requirement
- ID:NA
- SUG:NA
- DESC:drop Requires:kernel
* Wed Dec 23 2020 Anakin Zhang <benjamin93@163.com> - 0.6.6-4
- Type:requirement
- ID:NA
- SUG:NA
- DESC:create firewalld temporary file
* Tue Nov 10 2020 quanhongfei <quanhongfei@huawei.com> - 0.9.6-2
* Wed Feb 24 2021 hanzhijun <hanzhijun1@huawei.com> - 0.6.6-3
- drop Requires: kernel
* Tue Nov 10 2020 quanhongfei <quanhongfei@huawei.com> - 0.6.6-2
- Type:requirement
- ID:NA
- SUG:NA
- DESC:add firewalld-doc dependency for firewalld
* Fri Aug 28 2020 gaihuiying <gaihuiying1@huawei.com> - 0.9.6-1
* Fri Aug 28 2020 gaihuiying <gaihuiying1@huawei.com> - 0.6.6-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update firewalld version to 0.9.6
- DESC:update firewalld version to 0.6.6
* Wed Jan 15 2020 zhangrui <zhangrui182@huawei.com> - 0.6.2-4
- create firewalld.conf file

View File

@ -0,0 +1,51 @@
From 8e018f450b57f7ab1c0eec258d81816f75cd97de Mon Sep 17 00:00:00 2001
From: luoqing <luoqing@kylinsec.com.cn>
Date: Mon, 14 Nov 2022 16:21:25 +0800
Subject: [PATCH] fix(config):Specify the translation encoding format as UTF-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 指定翻译编码格式为UTF-8
---
src/firewall/config/__init__.py | 2 ++
src/firewall/config/__init__.py.in | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/firewall/config/__init__.py b/src/firewall/config/__init__.py
index 1dc34d5..cf6b63c 100644
--- a/src/firewall/config/__init__.py
+++ b/src/firewall/config/__init__.py
@@ -22,10 +22,12 @@
import locale
try:
locale.setlocale(locale.LC_ALL, "")
+ locale.bind_textdomain_codeset("firewalld","UTF-8")
except locale.Error:
import os
os.environ['LC_ALL'] = 'C'
locale.setlocale(locale.LC_ALL, "")
+ locale.bind_textdomain_codeset("firewalld","UTF-8")
DOMAIN = 'firewalld'
import gettext
diff --git a/src/firewall/config/__init__.py.in b/src/firewall/config/__init__.py.in
index 6322334..0b5804f 100644
--- a/src/firewall/config/__init__.py.in
+++ b/src/firewall/config/__init__.py.in
@@ -22,10 +22,12 @@
import locale
try:
locale.setlocale(locale.LC_ALL, "")
+ locale.bind_textdomain_codeset("firewalld","UTF-8")
except locale.Error:
import os
os.environ['LC_ALL'] = 'C'
locale.setlocale(locale.LC_ALL, "")
+ locale.bind_textdomain_codeset("firewalld","UTF-8")
DOMAIN = 'firewalld'
import gettext
--
2.33.0