Merge branch 'buster' into dev

This commit is contained in:
Alexandre Aubin 2022-08-17 01:26:11 +02:00
commit 3614715c31
3 changed files with 16 additions and 10 deletions

9
debian/changelog vendored
View file

@ -168,7 +168,14 @@ yunohost (11.0.2) testing; urgency=low
-- Alexandre Aubin <alex.aubin@mailoo.org> Wed, 19 Jan 2022 20:52:39 +0100 -- Alexandre Aubin <alex.aubin@mailoo.org> Wed, 19 Jan 2022 20:52:39 +0100
yunohost (4.4.2.5) stable; urgency=low 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 <alex.aubin@mailoo.org> 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) - [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) - [fix] bullseye migration: add a check that there's at least 70MB available in /boot ... (02fcbd97)

View file

@ -201,18 +201,18 @@ class MyMigration(Migration):
# Another boring fix for the super annoying libc6-dev: Breaks libgcc-8-dev # Another boring fix for the super annoying libc6-dev: Breaks libgcc-8-dev
# https://forum.yunohost.org/t/20617 # 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 ...") 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") os.system("cp /var/lib/dpkg/status /root/dpkg_status.bkp")
# This removes the dependency to build-essential from $app-ynh-deps # This removes the dependency to build-essential from $app-ynh-deps
os.system( os.system(
"perl -i~ -0777 -pe 's/(Package: .*-ynh-deps\\n(.+:.+\\n)+Depends:.*)(build-essential, ?)(.*)/$1$4/g' /var/lib/dpkg/status" "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( os.system(
"LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt autoremove --assume-yes" "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 # Main upgrade
@ -379,8 +379,8 @@ class MyMigration(Migration):
if free_space_in_directory("/var/") / (1024**3) < 1.0: if free_space_in_directory("/var/") / (1024**3) < 1.0:
raise YunohostError("migration_0021_not_enough_free_space") raise YunohostError("migration_0021_not_enough_free_space")
if free_space_in_directory("/boot/") / (70**3) < 1.0: if free_space_in_directory("/boot/") / (120**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) 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 # Check system is up to date
# (but we don't if 'bullseye' is already in the sources.list ... # (but we don't if 'bullseye' is already in the sources.list ...
@ -495,9 +495,6 @@ class MyMigration(Migration):
os.system(f"apt-mark unhold {package}") os.system(f"apt-mark unhold {package}")
def apt_install(self, cmd): def apt_install(self, cmd):
return self.apt(cmd, verb="install")
def apt(self, cmd, verb="install"):
def is_relevant(line): def is_relevant(line):
return "Reading database ..." not in line.rstrip() return "Reading database ..." not in line.rstrip()
@ -511,7 +508,7 @@ class MyMigration(Migration):
) )
cmd = ( 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 + cmd
) )

View file

@ -538,6 +538,8 @@ def _apt_log_line_is_relevant(line):
"==> Keeping old config file as default.", "==> Keeping old config file as default.",
"is a disabled or a static unit", "is a disabled or a static unit",
" update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults", " 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) return line.rstrip() and all(i not in line.rstrip() for i in irrelevants)