Обсуждение: [PATCH] replaced deprecated apt-key usage
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 @@ <h2>PostgreSQL Apt Repository</h2> 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
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 @@ <h2>PostgreSQL Apt Repository</h2> > 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: 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