[PATCH] replaced deprecated apt-key usage

Поиск
Список
Период
Сортировка
Искать

[PATCH] replaced deprecated apt-key usage

От:
radu@matasaru.net
Дата:
apt-key was deprecated some Debian versions ago. This change follows the 
first suggestion for the DEPRECATION section of apt-key manpages.
---
  templates/pages/download/linux/debian.html | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/templates/pages/download/linux/debian.html 
b/templates/pages/download/linux/debian.html
index 2cfbd240..e2c36d25 100644
--- a/templates/pages/download/linux/debian.html
+++ b/templates/pages/download/linux/debian.html
@@ -49,7 +49,8 @@ 

PostgreSQL Apt Repository

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' # Import the repository signing key: -wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - +wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.asc + # Update the package lists: sudo apt-get update

Re: [PATCH] replaced deprecated apt-key usage

От:
"Jonathan S. Katz" <jkatz@postgresql.org>
Дата:
Вложения:
On 8/14/23 6:27 AM, radu@matasaru.net wrote:
> apt-key was deprecated some Debian versions ago. This change follows the 
> first suggestion for the DEPRECATION section of apt-key manpages.
> ---
>   templates/pages/download/linux/debian.html | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/templates/pages/download/linux/debian.html 
> b/templates/pages/download/linux/debian.html
> index 2cfbd240..e2c36d25 100644
> --- a/templates/pages/download/linux/debian.html
> +++ b/templates/pages/download/linux/debian.html
> @@ -49,7 +49,8 @@ 

PostgreSQL Apt Repository

>  sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt > $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' > >  # Import the repository signing key: > -wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | > sudo apt-key add - > +wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | > sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.asc > + Good catch! I'd suggest we make it match what's on the apt.postgresql.org[1]: sudo apt install curl ca-certificates gnupg curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null etc. Thoughts? Jonathan

Re: [PATCH] replaced deprecated apt-key usage

От:
Christoph Berg <myon@debian.org>
Дата:
Re: Jonathan S. Katz
> Good catch! I'd suggest we make it match what's on the
> apt.postgresql.org[1]:
> 
> sudo apt install curl ca-certificates gnupg
> curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor |
> sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
> 
> etc. Thoughts?

Actually, there's an even more modern way by telling apt that a
certain repository is signed with a specific key. I've recently taught
apt.postgresql.org.sh to use that and now also updated
https://wiki.postgresql.org/wiki/Apt to use it.

And the yet better way is to not use anything external and just get
it from the distribution:

sudo apt install -y postgresql-common
sudo sh /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh

Christoph


FAQ