Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Heroku-24: Stop using deprecated
apt-key add
(#259)
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: ``` W: http://apt.postgresql.org/pub/repos/apt/dists/noble-pgdg/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. ``` 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` the `gnupg` package no longer needs to be installed earlier than the other packages, so has been moved to the main package install step. We do need `ca-certificates` installed early however, so that `apt-get update` can pull the HTTPS Postgres source (whilst `apt.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.
- Loading branch information