Skip to content

adding support for ubuntu 22.04 and /etc/apt/trusted.gpg.d#1781

Open
carefreepineapple wants to merge 1 commit into
nodesource:masterfrom
carefreepineapple:master
Open

adding support for ubuntu 22.04 and /etc/apt/trusted.gpg.d#1781
carefreepineapple wants to merge 1 commit into
nodesource:masterfrom
carefreepineapple:master

Conversation

@carefreepineapple

Copy link
Copy Markdown

#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

riosje commented Mar 26, 2024

Copy link
Copy Markdown
Contributor

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

riosje commented Apr 15, 2024

Copy link
Copy Markdown
Contributor

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

@didousoft

Copy link
Copy Markdown

I accidently reviewed the pull request. Please ignore my review

Comment thread scripts/deb/setup_18.x
@@ -52,12 +64,24 @@ install_pre_reqs() {
handle_error "$?" "Failed to install packages"
fi

Copy link
Copy Markdown

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