-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
base: master
Are you sure you want to change the base?
Conversation
I don't see why this change is necessary, it is working properly on ubuntu 22.04
|
Hi @didousoft @carefreepineapple would like to elaborate on why is this change necessary? |
I accidently reviewed the pull request. Please ignore my review |
Resolve conflicts |
1 similar comment
Resolve conflicts |
There was a problem hiding this 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 |
There was a problem hiding this 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
There was a problem hiding this 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
There was a problem hiding this 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
Approved
There was a problem hiding this comment.
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
There was a problem hiding this 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" |
There was a problem hiding this 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
#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