From 1a675b2b56e48d42b6a400d017cc68fc454fb7cd Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 26 Aug 2020 17:22:50 +0200 Subject: [PATCH] Make sure that openssl is not from sury before continuing the migration --- src/yunohost/data_migrations/0015_migrate_to_buster.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/yunohost/data_migrations/0015_migrate_to_buster.py b/src/yunohost/data_migrations/0015_migrate_to_buster.py index bb0e3f401..7fd6ff89d 100644 --- a/src/yunohost/data_migrations/0015_migrate_to_buster.py +++ b/src/yunohost/data_migrations/0015_migrate_to_buster.py @@ -99,7 +99,12 @@ class MyMigration(Migration): logger.info("Downgrading openssl version from %s to %s ..." % (openssl_version, new_version)) self.apt_install('openssl=%s --allow-downgrades' % new_version) else: - logger.warning("Could not identify which version of openssl to install") + logger.error("Could not identify which version of openssl to install") + + # Validate that openssl's version is not from sury anymore + openssl_version = check_output('dpkg -s openssl | grep "^Version: " | cut -d " " -f 2') + if "gbp" in openssl_version: + raise YunohostError("Openssl version is from sury's repository and needs to be downgraded to a version from the official debian's repositories.") # # Yunohost upgrade