Skip to content

Conversation

@carefreepineapple
Copy link

#1780

It appears as a result of the update to Ubuntu 22.04 where they transitioned from using /etc/apt/trusted.gpg to using individual .gpg files located in /etc/apt/trusted.gpg.d, apt will no longer read gpg keys from outside of /etc/apt/trusted.gpg.d

@riosje
Copy link
Contributor

riosje commented Mar 26, 2024

I don't see why this change is necessary, it is working properly on ubuntu 22.04

```SHELL
docker run -it ubuntu:22.04 bash

apt-get update -y && apt-get install curl -y
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs

@riosje
Copy link
Contributor

riosje commented Apr 15, 2024

Hi @didousoft @carefreepineapple would like to elaborate on why is this change necessary?

@didousoft
Copy link

I accidently reviewed the pull request. Please ignore my review

# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[40,41]+# Get release version [40,42]+version=$(lsb_release -rs) [40,43]+ [40,44]+# min Ubuntu version for proper gpg key placement [40,45]+ubuntu_min_version="22.04" [40,46]+ [40,47]+if [[ "$(lsb_release -si)" == "Ubuntu" && "$(echo "$version >= $ubuntu_min_version" | bc)" -eq 1 ]]; then [40,48]+ gpgkeypath="/etc/apt/trusted.gpg.d" [40,49]+else [40,50]+ gpgkeypath="/usr/share/keyrings" [40,51]+fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants