Merge remote-tracking branch 'origin/buster' into dev

This commit is contained in:
Alexandre Aubin 2022-08-14 18:21:37 +02:00
commit df045a56ae
2 changed files with 14 additions and 10 deletions

8
debian/changelog vendored
View file

@ -161,6 +161,14 @@ yunohost (11.0.2) testing; urgency=low
-- Alexandre Aubin <alex.aubin@mailoo.org> Wed, 19 Jan 2022 20:52:39 +0100
yunohost (4.4.2.4) 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)
- [fix] bullseye migration: better detection mechanism for the libc6 / libgcc hell issue (633a1fbf)
-- Alexandre Aubin <alex.aubin@mailoo.org> Sun, 14 Aug 2022 18:18:13 +0200
yunohost (4.4.2.3) stable; urgency=low
- [fix] bullseye migration: add fix for stupid dnsmasq not picking new init script (origin/dev, origin/HEAD, dev)

View file

@ -66,7 +66,7 @@ def _backup_pip_freeze_for_python_app_venvs():
venvs = _get_all_venvs("/opt/") + _get_all_venvs("/var/www/")
for venv in venvs:
# Generate a requirements file from venv
os.system(f"{venv}/bin/pip freeze > {venv}{VENV_REQUIREMENTS_SUFFIX}")
os.system(f"{venv}/bin/pip freeze > {venv}{VENV_REQUIREMENTS_SUFFIX} 2>/dev/null")
class MyMigration(Migration):
@ -201,15 +201,8 @@ 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(
"grep -A10 'ynh-deps' /var/lib/dpkg/status | grep -q 'Depends:.*build-essential'"
)
== 0
):
logger.info(
"Attempting to fix the build-essential / libc6-dev / libgcc-8-dev hell ..."
)
if os.sytem("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"):
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
os.system(
@ -386,6 +379,9 @@ 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)
# Check system is up to date
# (but we don't if 'bullseye' is already in the sources.list ...
# which means maybe a previous upgrade crashed and we're re-running it)