From 9597654ca86a70859b150eb94e6e81e7ccff39b7 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Fri, 20 Jan 2023 14:27:11 -0500 Subject: [PATCH] firewalld: Allow upgrade to version 2* Tests: - After a dist-upgrade to Bookworm, install freedombox with this change. Then update apt cache. After a delay, firewalld is upgraded. Then apps can be installed as normal. - On a stable machine, add testing into apt sources list. Run apt update. FreedomBox will receive the apt update hook and upgrade firewall version to 1.3.x. DefaultZone is set to 'external' after that. Signed-off-by: James Valleroy [sunil: Update all the way up to 2.0] Signed-off-by: Sunil Mohan Adapa Reviewed-by: Sunil Mohan Adapa --- 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 2ec3aa70a..1b0340501 100644 --- a/plinth/modules/firewall/__init__.py +++ b/plinth/modules/firewall/__init__.py @@ -85,9 +85,9 @@ class FirewallApp(app_module.App): if 'firewalld' not in packages: return False - # Allow upgrade from any version to 1.2.* + # Allow upgrade from any version to any version below 2.0 package = packages['firewalld'] - if Version(package['new_version']) > Version('1.3~'): + if Version(package['new_version']) > Version('2~'): return False install(['firewalld'], force_configuration='new')