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 <jvalleroy@mailbox.org>
[sunil: Update all the way up to 2.0]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy 2023-01-20 14:27:11 -05:00 committed by Sunil Mohan Adapa
parent 25d32d245a
commit 9597654ca8
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -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')