From 3743daffa2b1ecab16d3ad232d44eb72cafa146e Mon Sep 17 00:00:00 2001 From: Blieque Mariguan Date: Mon, 3 Feb 2025 20:59:18 +0000 Subject: [PATCH] feat: Use deb822 APT source for armbian-config - Replace creation of `armbian-config.list` with `armbian-config.sources`. This holds the same information in a newer format, deb822. This does not affect `armbian.list`. See also: https://github.com/armbian/configng/pull/407 --- extensions/armbian-config.sh | 10 ++++++++-- lib/functions/rootfs/distro-specific.sh | 5 +++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/extensions/armbian-config.sh b/extensions/armbian-config.sh index f9cbaa21a..51639b6ca 100644 --- a/extensions/armbian-config.sh +++ b/extensions/armbian-config.sh @@ -2,8 +2,14 @@ # and they are moved to main armbian repo periodically -function custom_apt_repo__add_armbian-github-repo(){ - echo "deb ${SIGNED_BY}https://github.armbian.com/configng stable main" > "${SDCARD}"/etc/apt/sources.list.d/armbian-config.list +function custom_apt_repo__add_armbian-github-repo() { + cat <<- EOF > "${SDCARD}"/etc/apt/sources.list.d/armbian-config.sources + Types: deb + URIs: https://github.armbian.com/configng + Suites: stable + Components: main + Signed-By: "${APT_SIGNING_KEY_FILE}" + EOF } diff --git a/lib/functions/rootfs/distro-specific.sh b/lib/functions/rootfs/distro-specific.sh index 010ff4b3c..216b08aef 100644 --- a/lib/functions/rootfs/distro-specific.sh +++ b/lib/functions/rootfs/distro-specific.sh @@ -160,8 +160,9 @@ function create_sources_list_and_deploy_repo_key() { display_alert "Adding Armbian repository and authentication key" "${when} :: /etc/apt/sources.list.d/armbian.list" "info" mkdir -p "${basedir}"/usr/share/keyrings # change to binary form - gpg --dearmor < "${SRC}"/config/armbian.key > "${basedir}"/usr/share/keyrings/armbian.gpg - SIGNED_BY="[signed-by=/usr/share/keyrings/armbian.gpg] " + APT_SIGNING_KEY_FILE="/usr/share/keyrings/armbian.gpg" + gpg --dearmor < "${SRC}"/config/armbian.key > "${basedir}${APT_SIGNING_KEY_FILE}" + SIGNED_BY="[signed-by=${APT_SIGNING_KEY_FILE}] " # lets keep old way for old distributions if [[ "${RELEASE}" =~ (focal|bullseye) ]]; then