From 5e10b2d4ae62966680f67e811a9bdc289a98d57a Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 14 Feb 2024 16:50:09 -0800 Subject: [PATCH] firewalld: Implement force upgrading to any 2.x versions Closes: #2396. New configuration options were introduced from 1.3.x to 2.1.x. This cause configuration file prompt due to our existing changes to the configuration file. Changes to the configuration file were investigated in #2396. Tests: - Install firewalld 1.3.x. Ensure that firewalld configuration changes are present as intended by FreedomBox. Change priority of the .deb package to allow installing 2.1.x. Run apt update and notice that force upgrade has been performed to 2.1.x. - firewalld upgrade has also been tested as part of this patch series. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/firewall/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plinth/modules/firewall/__init__.py b/plinth/modules/firewall/__init__.py index df49e8876..3cd45ea7c 100644 --- a/plinth/modules/firewall/__init__.py +++ b/plinth/modules/firewall/__init__.py @@ -87,9 +87,9 @@ class FirewallApp(app_module.App): if 'firewalld' not in packages: return False - # Allow upgrade from any version to any version below 2.0 + # Allow upgrade from any version to any version below 3.0 package = packages['firewalld'] - if Version(package['new_version']) > Version('2~'): + if Version(package['new_version']) > Version('3~'): return False install(['firewalld'], force_configuration='new')