diff --git a/postgres-appliance/build_scripts/base.sh b/postgres-appliance/build_scripts/base.sh index 4a217859..201b0776 100644 --- a/postgres-appliance/build_scripts/base.sh +++ b/postgres-appliance/build_scripts/base.sh @@ -71,12 +71,6 @@ sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/create for version in $DEB_PG_SUPPORTED_VERSIONS; do sed -i "s/ main.*$/ main $version/g" /etc/apt/sources.list.d/pgdg.list - - # add TimescaleDB repository - DISTRIB_CODENAME=$(sed /dev/null - apt-get update if [ "$DEMO" != "true" ]; then @@ -139,9 +133,6 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do else echo "Skipping timescaledb-toolkit-postgresql-$version as it's not found in the repository" fi - - rm /etc/apt/sources.list.d/timescaledb.list - rm /etc/apt/keyrings/timescale_timescaledb-archive-keyring.gpg fi EXTRA_EXTENSIONS=() diff --git a/postgres-appliance/build_scripts/prepare.sh b/postgres-appliance/build_scripts/prepare.sh index 50f32db8..66c2a2cb 100644 --- a/postgres-appliance/build_scripts/prepare.sh +++ b/postgres-appliance/build_scripts/prepare.sh @@ -40,6 +40,10 @@ for t in deb deb-src; do done curl -s -o - https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg +# add TimescaleDB repository +echo "deb [signed-by=/etc/apt/keyrings/timescale_timescaledb-archive-keyring.gpg] https://packagecloud.io/timescale/timescaledb/ubuntu/ ${DISTRIB_CODENAME} main" | tee /etc/apt/sources.list.d/timescaledb.list +curl -fsSL https://packagecloud.io/timescale/timescaledb/gpgkey | gpg --dearmor | tee /etc/apt/keyrings/timescale_timescaledb-archive-keyring.gpg > /dev/null + # Clean up apt-get purge -y libcap2-bin apt-get autoremove -y