Heroku-24: Stop using deprecated apt-key add
#259
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Switches to the new method for importing/specifying keys:
https://wiki.postgresql.org/wiki/Apt#Manual_Repository_Configuration
This improves security, since now instead of the Postgres key being allowed to sign any package (including those from Ubuntu's APT repo), it's only trusted for packages from
apt.postgresql.org
.This resolves:
We're also using the new
deb822
format, instead of the one-line format, see:https://manpages.ubuntu.com/manpages/noble/man5/sources.list.5.html
Now that we're not using
apt-key add
thegnupg
package no longer needs to be installed earlier than the other packages, so has been moved to the main package install step. We do needca-certificates
installed early however, so thatapt-get update
can pull the HTTPS Postgres source (whilstapt.postgresql.org
supports HTTP too and signing makes HTTPS less important, HTTPS is what's now used in the upstream setup docs, so we've switched to using HTTPS).Fixes #248.
GUS-W-15213125.