From 36f910ed2885ddc16b356feeb9f6b7ac176ad619 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 27 Aug 2022 19:38:05 +0200 Subject: [PATCH 1/7] Aaaaand i managed to make a typo again --- src/yunohost/data_migrations/0021_migrate_to_bullseye.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 444306b8e..ee4ba65ea 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -369,7 +369,7 @@ class MyMigration(Migration): ): try: # Here we try to find the previous migration log, which should be somewhat recent and be at least 10k (we keep the biggest one) - maybe_previous_migration_log_id = check_output("cd /var/log/yunohost/categories/operation && find -name '*migrate*.log -size +10k -mtime -100 -exec ls -s {} \\; | sort -n | tr './' ' ' | awk '{print $2}' | tail -n 1") + maybe_previous_migration_log_id = check_output("cd /var/log/yunohost/categories/operation && find -name '*migrate*.log' -size +10k -mtime -100 -exec ls -s {} \\; | sort -n | tr './' ' ' | awk '{print $2}' | tail -n 1") if maybe_previous_migration_log_id: logger.info(f"NB: the previous migration log id seems to be {maybe_previous_migration_log_id}. You can share it with the support team with : sudo yunohost log share {maybe_previous_migration_log_id}") except Exception: From b9bb2e4de508c197986cc63acaf8e1083bc7224c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 28 Aug 2022 14:47:29 +0200 Subject: [PATCH 2/7] Update changelog for 4.4.2.12 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 404493b7a..b0d69cb05 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -yunohost (4.4.2.11) stable; urgency=low +yunohost (4.4.2.12) stable; urgency=low - bullseye migration: add trick to automagically find the likely log of a previously failed migration to ease support (f5d94509) From b5fabc871bf0825e0acae16392c74bd593de86a4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 29 Aug 2022 15:36:24 +0200 Subject: [PATCH 3/7] [fix] bullseye migration: a few annoying issues related to Sury --- .../data_migrations/0021_migrate_to_bullseye.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index ee4ba65ea..94778f10d 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -104,9 +104,17 @@ class MyMigration(Migration): open("/etc/apt/sources.list.d/extra_php_version.list", "w").write( "deb https://packages.sury.org/php/ bullseye main" ) - os.system( - 'wget --timeout 900 --quiet "https://packages.sury.org/php/apt.gpg" --output-document=- | gpg --dearmor >"/etc/apt/trusted.gpg.d/extra_php_version.gpg"' - ) + + # Add Sury key even if extra_php_version.list was already there, + # because some old system may be using an outdated key not valid for Bullseye + # and that'll block the migration + os.system( + 'wget --timeout 900 --quiet "https://packages.sury.org/php/apt.gpg" --output-document=- | gpg --dearmor >"/etc/apt/trusted.gpg.d/extra_php_version.gpg"' + ) + + # Remove legacy, duplicated sury entry if it exists + if os.path.exists("/etc/apt/sources.list.d/sury.list"): + os.system("rm -rf /etc/apt/sources.list.d/sury.list") # # Get requirements of the different venvs from python apps From f4219791a12c765a2add717f4a7a91c324a2d3af Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 29 Aug 2022 15:40:46 +0200 Subject: [PATCH 4/7] Update changelog for 4.4.2.13 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index b0d69cb05..0dec25c43 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +yunohost (4.4.2.13) stable; urgency=low + + - [fix] bullseye migration: a few annoying issues related to Sury (b5fabc87) + + -- Alexandre Aubin Mon, 29 Aug 2022 15:40:03 +0200 + yunohost (4.4.2.12) stable; urgency=low - bullseye migration: add trick to automagically find the likely log of a previously failed migration to ease support (f5d94509) From 7601492081ecea2b39ed21cc4f6c0ba94dd6cc03 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 30 Aug 2022 18:41:00 +0200 Subject: [PATCH 5/7] bullseye migration: remove derpy OVH repo... --- src/yunohost/data_migrations/0021_migrate_to_bullseye.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 94778f10d..f287182d8 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -94,6 +94,9 @@ class MyMigration(Migration): logger.info(m18n.n("migration_0021_patching_sources_list")) self.patch_apt_sources_list() + # Stupid OVH has some repo configured which dont work with bullseye and break apt ... + os.system("sudo rm -f /etc/apt/sources.list.d/ovh-*.list") + # Force add sury if it's not there yet # This is to solve some weird issue with php-common breaking php7.3-common, # hence breaking many php7.3-deps From 02b3a138b6eec6f3bc9dc10133dd98dd75658694 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 3 Sep 2022 12:41:09 +0200 Subject: [PATCH 6/7] bullseye migration: improve autofix procedure for the libc6 hell --- src/yunohost/data_migrations/0021_migrate_to_bullseye.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index f287182d8..de9de481a 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -219,7 +219,7 @@ class MyMigration(Migration): os.system("perl -i~ -0777 -pe 's/(Package: .*-ynh-deps\\n(.+:.+\\n)+Depends:.*)(build-essential, ?)(.*)/$1$4/g' /var/lib/dpkg/status") self.apt_install("build-essential-") # Note the '-' suffix to mean that we actually want to remove the packages os.system("LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt autoremove --assume-yes") - self.apt_install("gcc-8- libgcc-8-dev-") # Note the '-' suffix to mean that we actually want to remove the packages + self.apt_install("gcc-8- libgcc-8-dev- equivs") # Note the '-' suffix to mean that we actually want to remove the packages .. we also explicitly add 'equivs' to the list because sometimes apt is dumb and will derp about it # # Main upgrade From 3c586159d29c9443f49a2a3d5d33bf2667011e9e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 3 Sep 2022 23:20:20 +0200 Subject: [PATCH 7/7] Update changelog for 4.4.2.14 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0dec25c43..d52ba8d52 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +yunohost (4.4.2.14) stable; urgency=low + + - bullseye migration: remove derpy OVH repo... (76014920) + - bullseye migration: improve autofix procedure for the libc6 hell (02b3a138) + + -- Alexandre Aubin Sat, 03 Sep 2022 23:19:08 +0200 + yunohost (4.4.2.13) stable; urgency=low - [fix] bullseye migration: a few annoying issues related to Sury (b5fabc87)