From f4650ffd1d5f169620372b6e905c5826ebee27ce Mon Sep 17 00:00:00 2001 From: Lluis Campos Date: Mon, 13 Sep 2021 15:27:49 +0200 Subject: [PATCH] MEN-5057: configs/images/raspberrypi_raspbian_config: Allow APT Suite change As per today, our pre-converted image ships with Debian buster, while Raspberry Pi OS APT repository has moved already to Debian bullseye, moving buster from "stable" to "oldstable". This configuration allows apt to update the information without interaction from the user. This is the default behaviour in newer versions of apt, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931566 Changelog: Title Signed-off-by: Lluis Campos --- configs/images/raspberrypi_raspbian_config | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/configs/images/raspberrypi_raspbian_config b/configs/images/raspberrypi_raspbian_config index d0b4368..0738306 100644 --- a/configs/images/raspberrypi_raspbian_config +++ b/configs/images/raspberrypi_raspbian_config @@ -49,3 +49,18 @@ EOF } PLATFORM_MODIFY_HOOKS+=(grow_data_partition) + +# +# Allow APT Suite change in the release info +# +# Upstream repository http://raspbian.raspberrypi.org/raspbian has changed buster +# release suite from "stable" to "oldstable". The following configuration option +# allows APT to update without user interaction. +# This is the default un newer versions of apt, see: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931566 +# +function apt_allow_release_change_suite() { + run_and_log_cmd "echo 'Acquire::AllowReleaseInfoChange::Suite \"true\";' \ + | sudo tee work/rootfs/etc/apt/apt.conf.d/99release-change-suite" +} +PLATFORM_MODIFY_HOOKS+=(apt_allow_release_change_suite)