Skip to content

Commit

Permalink
Remove usage of deprecated apt-key
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Nov 4, 2024
1 parent 301c6ea commit 04afed0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions linux/step01_ubuntu2204_pg_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ if [ "$PGVER" = "pg14" ]; then
service postgresql start
elif [ "$PGVER" = "pg15" ]; then
#start-recommended
apt-get install -y gnupg
echo "deb http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
apt-get install -y curl ca-certificates
install -d /usr/share/postgresql-common/pgdg
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

apt-get update
apt-get -y install postgresql-15
service postgresql start
#end-recommended
elif [ "$PGVER" = "pg16" ]; then
apt-get install -y gnupg
echo "deb http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
apt-get install -y curl ca-certificates
install -d /usr/share/postgresql-common/pgdg
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
apt-get update
apt-get -y install postgresql-16
service postgresql start
Expand Down

0 comments on commit 04afed0

Please sign in to comment.