From 01e28967247e82651315981b06c86e762cadb1f4 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 12 Jan 2022 21:35:50 -0800 Subject: [PATCH] upgrades: Allow matrix's new dependency to be installed matrix-synapse 1.47.0-2 requires python3-frozendict 1.2-3 or higher. This is only available in bullseye-backports, testing and unstable but not bullseye. Allow python3-frozendict to be installed from buster-backports. Further there is no longer any need to allow packages from buster-backports (on the master branch). So, drop all those. Tests: - On stable/testing, without matrix-synapse and its dependencies installed, run matrix-synapse functional tests. - On stable, with older version of matrix-synapse and python3-frozendict, run unattened-upgrade and notice that matrix-synapse upgrades to latest version. - Without this patch, run service. Notice the contents of /etc/apt/preferences.d/51freedombox.pref. When this patch is applied and service is restarted, upgrades app is setup again and the files contents will change as expected. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- actions/upgrades | 50 ++++------------------------- plinth/modules/upgrades/__init__.py | 2 +- 2 files changed, 7 insertions(+), 45 deletions(-) diff --git a/actions/upgrades b/actions/upgrades index 9b5720c37..5f117aa9e 100755 --- a/actions/upgrades +++ b/actions/upgrades @@ -43,50 +43,12 @@ Pin-Priority: 500 # upgrades app. This ensures that setup is run again and the new contents are # overwritten on the old file. APT_PREFERENCES_APPS = '''Explanation: This file is managed by FreedomBox, do not edit. -Explanation: matrix-synapse 0.99.5 introduces room version 4. Older version -Explanation: 0.99.2 in buster won't be able join newly created rooms. -Package: matrix-synapse -Pin: release a=buster-backports -Pin-Priority: 500 - -Explanation: matrix-synapse >= 1.2 requires python3-service-identity >= 18.1 -Package: python3-service-identity -Pin: release a=buster-backports -Pin-Priority: 500 - -Explanation: matrix-synapse >= 1.5 requires python3-typing-extensions >= 3.7.4 -Package: python3-typing-extensions -Pin: release a=buster-backports -Pin-Priority: 500 - -Explanation: matrix-synapse >= 1.11 requires python3-signedjson >= 1.1.0 -Package: python3-signedjson -Pin: release a=buster-backports -Pin-Priority: 500 - -Explanation: matrix-synapse >= 1.12 requires python3-twisted >= 18.9.0-8~ -Package: python3-twisted -Pin: release a=buster-backports -Pin-Priority: 500 - -Explanation: python3-twisted requires matching version of python3-twisted-bin -Package: python3-twisted-bin -Pin: release a=buster-backports -Pin-Priority: 500 - -Explanation: matrix-synapse >= 1.16 requires python3-attr >= 19.1.0~ -Package: python3-attr -Pin: release a=buster-backports -Pin-Priority: 500 - -Explanation: matrix-synapse >= 1.19 requires python3-canonicaljson >= 1.2.0 -Package: python3-canonicaljson -Pin: release a=buster-backports -Pin-Priority: 500 - -Explanation: matrix-synapse >= 1.26 recommends python3-psycopg2 >= 2.8 -Package: python3-psycopg2 -Pin: release a=buster-backports +Explanation: matrix-synapse shall not be available in Debian stable but +Explanation: only in backports. Upgrade priority of packages that have needed +Explanation: versions only in backports. +Explanation: matrix-synapse >= 1.47.0-2 requires python3-frozendict >= 1.2-3 +Package: python3-frozendict +Pin: release a=bullseye-backports Pin-Priority: 500 ''' diff --git a/plinth/modules/upgrades/__init__.py b/plinth/modules/upgrades/__init__.py index 33d0e7b4d..3b2286bda 100644 --- a/plinth/modules/upgrades/__init__.py +++ b/plinth/modules/upgrades/__init__.py @@ -62,7 +62,7 @@ class UpgradesApp(app_module.App): app_id = 'upgrades' - _version = 9 + _version = 10 can_be_disabled = False