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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

@ste9ph
Copy link

ste9ph commented Mar 13, 2025

Resolve conflicts

1 similar comment
@ste9ph
Copy link

ste9ph commented Mar 13, 2025

Resolve conflicts

Copy link

@ste9ph ste9ph left a comment

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

@@ -52,12 +64,24 @@ install_pre_reqs() {
handle_error "$?" "Failed to install packages"
fi
Copy link

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

Copy link

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

Copy link

Choose a reason for hiding this comment

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

Approved

Copy link

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

Approved

Copy link

Choose a reason for hiding this comment

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

Approved

[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

Copy link

@ste9ph ste9ph left a comment

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

else
gpgkeypath="/usr/share/keyrings"
fi

# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"
Copy link

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