From 14d78e8f5c8689d11bedbaa0bb8670b7cb4b4b27 Mon Sep 17 00:00:00 2001 From: shine <4771718+shinenelson@users.noreply.github.com> Date: Thu, 1 Jul 2021 00:15:35 +0530 Subject: [PATCH] replace apt-key usage with separate keyring apt-key has been deprecated and it will be supported only till April 2022. this changeset follows https://wiki.debian.org/DebianRepository/UseThirdParty to replace the usage of apt-key with using a separate dedicated keyring specifically for YunoHost. This changeset also adds the 'signed-by' tag for the repository as recommended. Also, the dependency on wget has been eliminated --- install_yunohost | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install_yunohost b/install_yunohost index 5d1caf6..7e6ae77 100755 --- a/install_yunohost +++ b/install_yunohost @@ -300,7 +300,7 @@ function upgrade_system() { function install_script_dependencies() { # dependencies of the install script itself - local DEPENDENCIES="lsb-release wget whiptail gnupg apt-transport-https" + local DEPENDENCIES="lsb-release whiptail gnupg apt-transport-https" if [[ "$AUTOMODE" == "0" ]] ; then @@ -395,7 +395,7 @@ function setup_package_source() { # Debian repository - local CUSTOMDEB="deb http://forge.yunohost.org/debian/ bullseye stable" + local CUSTOMDEB="deb [signed-by=/usr/share/keyrings/yunohost-archive-keyring.gpg] http://forge.yunohost.org/debian/ bullseye stable" if [[ "$DISTRIB" == "stable" ]] ; then echo "$CUSTOMDEB" > $CUSTOMAPT @@ -406,7 +406,8 @@ function setup_package_source() { fi # Add YunoHost repository key to the keyring - wget -O- https://forge.yunohost.org/yunohost.asc -q | apt-key add -qq - >/dev/null 2>&1 + curl --fail --silent https://forge.yunohost.org/yunohost.asc | gpg --dearmor > /usr/share/keyrings/yunohost-archive-keyring.gpg + apt-get -qq update } function register_debconf() {