From 18ea57a8cc3c1a5d7b9bcf4c68fd476563b58757 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Aug 2022 15:47:47 +0200 Subject: [PATCH 1/6] Aleks made a gazillion typos 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 84227a475..68f79bacf 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -201,7 +201,7 @@ class MyMigration(Migration): # Another boring fix for the super annoying libc6-dev: Breaks libgcc-8-dev # https://forum.yunohost.org/t/20617 # - if os.system("dpkg --list | grep '^ii' | grep -q ' libgcc-8-dev '") == 0 and os.system("LC_ALL=C apt policy libgcc-8-dev | grep Candidate | grep -q rpi"): + if os.system("dpkg --list | grep '^ii' | grep -q ' libgcc-8-dev'") == 0 and os.system("LC_ALL=C apt policy libgcc-8-dev | grep Candidate | grep -q rpi") == 0: logger.info("Attempting to fix the build-essential / libc6-dev / libgcc-8-dev hell ...") os.system("cp /var/lib/dpkg/status /root/dpkg_status.bkp") # This removes the dependency to build-essential from $app-ynh-deps From d03abcc73c29bc74faad32b73d687579d112a1f5 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Aug 2022 15:49:43 +0200 Subject: [PATCH 2/6] bullseye migration: simplify code, we can suffix packages with '-' to mean that we want to remove them during apt install call --- src/yunohost/data_migrations/0021_migrate_to_bullseye.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 68f79bacf..4734c1d10 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -206,9 +206,9 @@ class MyMigration(Migration): os.system("cp /var/lib/dpkg/status /root/dpkg_status.bkp") # This removes the dependency to build-essential from $app-ynh-deps os.system("perl -i~ -0777 -pe 's/(Package: .*-ynh-deps\\n(.+:.+\\n)+Depends:.*)(build-essential, ?)(.*)/$1$4/g' /var/lib/dpkg/status") - self.apt("build-essential", verb="remove") + 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("gcc-8 libgcc-8-dev", verb="remove") + self.apt_install("gcc-8- libgcc-8-dev-") # Note the '-' suffix to mean that we actually want to remove the packages # # Main upgrade @@ -489,9 +489,6 @@ class MyMigration(Migration): os.system(f"apt-mark unhold {package}") def apt_install(self, cmd): - return self.apt(cmd, verb="install") - - def apt(self, cmd, verb="install"): def is_relevant(line): return "Reading database ..." not in line.rstrip() @@ -505,7 +502,7 @@ class MyMigration(Migration): ) cmd = ( - f"LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt {verb} --quiet -o=Dpkg::Use-Pty=0 --fix-broken --assume-yes " + f"LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt install --quiet -o=Dpkg::Use-Pty=0 --fix-broken --assume-yes " + cmd ) From 75e96a42ff28a0c4a92f09da6130b17e3010bcef Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Aug 2022 15:50:16 +0200 Subject: [PATCH 3/6] Update changelog for 4.4.2.6 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d2d08556b..ff0859878 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -yunohost (4.4.2.5) stable; urgency=low +yunohost (4.4.2.6) stable; urgency=low - [fix] bullseye migration: trash pip freeze stderr because it's confusing users ... (e68fc821) - [fix] bullseye migration: add a check that there's at least 70MB available in /boot ... (02fcbd97) From 87f0eff9558667980aed96d9501d933d9c40221b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Aug 2022 16:42:56 +0200 Subject: [PATCH 4/6] upgrades: ignore boring insserv warnings during apt commands --- src/yunohost/tools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index dbd3af5f5..d39a48f54 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -698,6 +698,8 @@ def _apt_log_line_is_relevant(line): "==> Keeping old config file as default.", "is a disabled or a static unit", " update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults", + "insserv: warning: current stop runlevel", + "insserv: warning: current start runlevel", ] return line.rstrip() and all(i not in line.rstrip() for i in irrelevants) From d283c900f473e6a690a12e064a0faabb37b2a8e1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 17 Aug 2022 01:21:12 +0200 Subject: [PATCH 5/6] bullseye migration: higher treshold for low space detection in /boot/ because some people still experience the issue on 4.4.2.6 --- src/yunohost/data_migrations/0021_migrate_to_bullseye.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 4734c1d10..82187fb88 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -373,8 +373,8 @@ class MyMigration(Migration): if free_space_in_directory("/var/") / (1024**3) < 1.0: raise YunohostError("migration_0021_not_enough_free_space") - if free_space_in_directory("/boot/") / (70**3) < 1.0: - raise YunohostError("/boot/ has less than 70MB available. This will probably trigger a crash during the upgrade because a new kernel needs to be installed. Please look for advice on the forum on how to remove old unused kernels to free some space in /boot/.", raw_msg=True) + if free_space_in_directory("/boot/") / (120**3) < 1.0: + raise YunohostError("/boot/ has less than 120MB available. This will probably trigger a crash during the upgrade because a new kernel needs to be installed. Please look for advice on the forum on how to remove old, unused kernels to free up some space in /boot/.", raw_msg=True) # Check system is up to date # (but we don't if 'bullseye' is already in the sources.list ... From b08a31caeeee806949d21f50e824a28306e22e22 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 17 Aug 2022 01:22:11 +0200 Subject: [PATCH 6/6] Update changelog for 4.4.2.7 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index ff0859878..d8a8b1c19 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +yunohost (4.4.2.7) stable; urgency=low + + - upgrades: ignore boring insserv warnings during apt commands (87f0eff9) + - bullseye migration: higher treshold for low space detection in /boot/ because some people still experience the issue on 4.4.2.6 (d283c900) + + -- Alexandre Aubin Wed, 17 Aug 2022 01:21:36 +0200 + yunohost (4.4.2.6) stable; urgency=low - [fix] bullseye migration: trash pip freeze stderr because it's confusing users ... (e68fc821)