Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop deprecated key management support #7524

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions lib/functions/rootfs/distro-specific.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,12 @@ function create_sources_list_and_deploy_repo_key() {
;;
esac

# add armbian key
display_alert "Adding Armbian repository and authentication key" "${when} :: /etc/apt/sources.list.d/armbian.list" "info"

# apt-key add is getting deprecated
APT_VERSION=$(chroot "${basedir}" /bin/bash -c "apt --version | cut -d\" \" -f2")
if linux-version compare "${APT_VERSION}" ge 2.4.1; then
# add armbian key
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] "
else
# use old method for compatibility reasons # @TODO: rpardini: not gonna fix this?
cp "${SRC}"/config/armbian.key "${basedir}"
chroot "${basedir}" /bin/bash -c "cat armbian.key | apt-key add -"
fi
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] "

declare -a components=()
if [[ "${when}" == "image"* ]]; then # only include the 'main' component when deploying to image (early or late)
Expand Down
Loading