From 04afed04de8a67027c90ce806bbff59f8bba7f2b Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Mon, 4 Nov 2024 19:35:29 +0000 Subject: [PATCH 1/2] Remove usage of deprecated apt-key --- linux/step01_ubuntu2204_pg_deps.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/linux/step01_ubuntu2204_pg_deps.sh b/linux/step01_ubuntu2204_pg_deps.sh index d07ce679..b2ecd675 100644 --- a/linux/step01_ubuntu2204_pg_deps.sh +++ b/linux/step01_ubuntu2204_pg_deps.sh @@ -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 From 3ed8ef0fd4afc9f4a00c09b0972def7693935ce3 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Mon, 4 Nov 2024 19:44:06 +0000 Subject: [PATCH 2/2] Set name of file --- linux/step01_ubuntu2204_pg_deps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/step01_ubuntu2204_pg_deps.sh b/linux/step01_ubuntu2204_pg_deps.sh index b2ecd675..f546a81b 100644 --- a/linux/step01_ubuntu2204_pg_deps.sh +++ b/linux/step01_ubuntu2204_pg_deps.sh @@ -11,7 +11,7 @@ elif [ "$PGVER" = "pg15" ]; then 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' + sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list' apt-get update apt-get -y install postgresql-15 @@ -21,7 +21,7 @@ elif [ "$PGVER" = "pg16" ]; then 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' + sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list' apt-get update apt-get -y install postgresql-16 service postgresql start