upgrades: Relax list of packages to hold during dist upgrade

Closes: #2493.

Tests:

- For each of the packages in the list, download the Bookworm version and Trixie
version of the packages. See if the files in /etc/ that were modified were also
files we also modify. If so, keep it in the list. Otherwise, remove it from the
list.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2025-03-04 15:27:05 -08:00 committed by James Valleroy
parent 5a15665b41
commit ac5f778ae8
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
7 changed files with 10 additions and 9 deletions

View File

@ -72,5 +72,6 @@ class BindApp(app_module.App):
def force_upgrade(self, _packages):
"""Force upgrade the managed packages to resolve conffile prompt."""
# Allow upgrades nay new version by keeping old configuration files
install(['bind9'], force_configuration='old')
return True

View File

@ -88,7 +88,7 @@ class FirewallApp(app_module.App):
if 'firewalld' not in packages:
return False
# Allow upgrade from any version to any version below 3.0
# Allow upgrade from 1.3.3 (bookworm) to 2.3.0 (trixie) and beyond 2.x.
package = packages['firewalld']
if Version(package['new_version']) > Version('3~'):
return False

View File

@ -109,7 +109,8 @@ class MiniDLNAApp(app_module.App):
if 'minidlna' not in packages:
return False
# Allow upgrade from 1.2.1+dfsg-1+b1 to 1.3.x
# Allow upgrade from 1.3.0 (bookworm) to 1.3.3 (trixie) and beyond
# 1.3.x.
package = packages['minidlna']
if Version(package['new_version']) > Version('1.4~'):
return False

View File

@ -106,7 +106,8 @@ class MumbleApp(app_module.App):
if 'mumble-server' not in packages:
return False
# Allow upgrades within 1.3.*
# Allow upgrades from 1.3.4-1 (bullseye) to 1.3.4-4 (bookworm) but not
# to 1.5.735 (trixie) and beyond.
package = packages['mumble-server']
if Version(package['new_version']) > Version('1.4~'):
return False

View File

@ -110,7 +110,7 @@ class RadicaleApp(app_module.App):
if 'radicale' not in packages:
return False
# Allow upgrade from 2.* to newer 2.* and 3.*
# Allow upgrade from 3.1.8 (bookworm) to 3.4.1 (trixie) and beyond 3.x.
package = packages['radicale']
if Version(package['new_version']) > Version('4~'):
return False

View File

@ -111,7 +111,8 @@ class RoundcubeApp(app_module.App):
return False
# Allow roundcube any version to upgrade to any version. This is okay
# because there will no longer be conflicting file changes.
# because there will no longer be conflicting file changes after
# upgrade from bullseye to bookworm.
install(['roundcube-core'], force_configuration='new')
if self.get_component('webserver-roundcube').is_enabled():
self.get_component('webserver-roundcube-freedombox').enable()

View File

@ -17,10 +17,7 @@ SOURCES_LIST = '/etc/apt/sources.list'
DIST_UPGRADE_OBSOLETE_PACKAGES: list[str] = []
DIST_UPGRADE_PACKAGES_WITH_PROMPTS = [
'bind9', 'firewalld', 'janus', 'minetest-server', 'minidlna',
'mumble-server', 'radicale', 'roundcube-core', 'tt-rss'
]
DIST_UPGRADE_PACKAGES_WITH_PROMPTS = ['firewalld', 'minidlna', 'radicale']
DIST_UPGRADE_PRE_DEBCONF_SELECTIONS: list[str] = [
# Tell grub-pc to continue without installing grub again.