From 4bfc669b9ebacb28ef904145bf90c765e08c920c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 30 Sep 2021 01:01:18 +0200 Subject: [PATCH] v7.7 + DietPi-Pre-patch | Connecting to apt.armbian.com via plain HTTP until their router handles HTTPS redirects reliably + DietPi-Pre-patch | Re-apply suite change patch on Buster, since it is not accepted by default on "apt" package versions below 1.8.2.3 by default. Use the "-o" option now which allows automated acceptance as well on Stretch. --- .update/pre-patches | 15 +++++++++++---- CHANGELOG.txt | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.update/pre-patches b/.update/pre-patches index 7f960b598f..f336c80189 100644 --- a/.update/pre-patches +++ b/.update/pre-patches @@ -73,11 +73,11 @@ Package: linux-image-* linux-headers-* linux-dtb-* linux-u-boot-* armbian-firmwa \nPackage: *\nPin: origin apt.armbian.com\nPin-Priority: -1' > /etc/apt/preferences.d/dietpi-armbian" fi -# v7.4: On Stretch, allow interactive suite change once, to assure the update does not hang or fail on G_AGUP. From Buster on, the suite change throws a notice only and does not require any confirmation. -if (( $G_DISTRO < 5 )) && (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 4 ) )) && curl -sSfL 'https://deb.debian.org/debian/dists/bullseye/Release' | grep -q '^Suite: stable$' +# v7.5: Perform Debian suite change once, if the installed APT version does not allow it by default yet +if (( $G_DIETPI_VERSION_CORE < 7 || ( $G_DIETPI_VERSION_CORE == 7 && $G_DIETPI_VERSION_SUB < 5 ) )) && dpkg --compare-versions "$(dpkg-query -Wf '${VERSION}' apt)" lt 1.8.2.3 then - G_DIETPI-NOTIFY 2 'Debian Bullseye has been released, so you need to accept the Stretch suite change from "oldstable" to "oldoldstable" once.' - apt-get update + G_DIETPI-NOTIFY 2 'Debian Bullseye has been released, so we accept the repository suite change once.' + G_EXEC apt-get -o 'Acquire::AllowReleaseInfoChange::Suite=true' -q update fi # v7.4 @@ -120,5 +120,12 @@ done _EOF_ fi +# v7.7 +if [[ -f '/etc/apt/sources.list.d/armbian.list' ]] && grep -q 'https://apt.armbian.com' /etc/apt/sources.list.d/armbian.list +then + G_DIETPI-NOTIFY 2 'Connecting to apt.armbian.com via plain HTTP until their router handles HTTPS redirects reliably' + G_EXEC sed -i 's|https://apt.armbian.com|http://apt.armbian.com|' /etc/apt/sources.list.d/armbian.list +fi + exit 0 } diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 360cdb871d..bdc8bcd084 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -8,6 +8,7 @@ Changes: - DietPi-Login | The DietPi banner on login won't be shown anymore if ~/.hushlogin exists, which is a common method to prevent the shell from printing /etc/motd on login and should hence be respected for the DietPi banner as well. Many thanks to @dnknth for doing this suggestion: https://github.com/MichaIng/DietPi/issues/4786 Fixes: +- General | Since the Armbian repository router does not reliably preservers HTTPS on redirects yet, APT by times fails, when detecting a downgrade from HTTPS to HTTP. We hence change the armbian.list to use plain HTTP, until the issues with the router have been resolved. - DietPi-LetsEncrypt | Resolved an issue where the script failed when ownCloud or Nextcloud are were installed. Many thanks to @billouetaudrey for reporting this issue: https://github.com/MichaIng/DietPi/issues/4752 - DietPi-Software | Resolved an issue where software services failed with a cryptic error message, when an expected directory was not present. This was especially reported with Sonarr and Radarr, if their log directory was missing for some reason. When directories are missing, which are explicitly listed to be read-writeable within the systemd service, systemd prints "Failed at step NAMESPACE spawning", while Sonarr and Radarr themselves would print a clearer error message about the missing log directory. Many thanks to @stevewitz for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9463 - DietPi-Software | Lighttpd: Resolved an issue where the upgrade from Buster to Bullseye, following our guide, fails if HTTPS was enabled via DietPi-LetsEncrypt before. Many thanks to @fhals for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=9477