diff --git a/postgres-appliance/Dockerfile b/postgres-appliance/Dockerfile index a1db8cb11..b3fb5c72f 100644 --- a/postgres-appliance/Dockerfile +++ b/postgres-appliance/Dockerfile @@ -39,7 +39,7 @@ RUN bash /builddeps/prepare.sh COPY --from=ubuntu-18 /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.18 -COPY cron_unprivileged.c dependencies/src /builddeps/ +COPY cron_unprivileged.c /builddeps/ COPY build_scripts/base.sh /builddeps/ COPY --from=dependencies-builder /builddeps/*.deb /builddeps/ @@ -56,17 +56,14 @@ ARG DEB_PG_SUPPORTED_VERSIONS="$PGOLDVERSIONS $PGVERSION" # Install PostgreSQL, extensions and contribs ENV POSTGIS_VERSION=3.4 \ POSTGIS_LEGACY=3.3 \ - POSTGIS_SUPER_LEGACY=3.2 \ BG_MON_COMMIT=5959310104a11cb3f363bd65f3a4ef01119ca6d6 \ PG_AUTH_MON_COMMIT=3d010e5959285c32b155e8064c9c9b57869aeca7 \ PG_MON_COMMIT=382304bd6fa4804b2bea26c9bd9d420b3a998747 \ SET_USER=REL4_0_1 \ - PLPROFILER=fix/pg15-shmem \ + PLPROFILER=REL4_2_4 \ PG_PROFILE=4.2 \ PAM_OAUTH2=v1.0.1 \ - PLANTUNER_COMMIT=800d81bc85da64ff3ef66e12aed1d4e1e54fc006 \ - PG_PERMISSIONS_COMMIT=314b9359e3d77c0b2ef7dbbde97fa4be80e31925 \ - PG_TM_AUX_COMMIT=51cf42f6043608919802fcc48458471d0ea3a127 + PG_PERMISSIONS_COMMIT=314b9359e3d77c0b2ef7dbbde97fa4be80e31925 WORKDIR /builddeps RUN bash base.sh diff --git a/postgres-appliance/build_scripts/base.sh b/postgres-appliance/build_scripts/base.sh index dd0f660e6..7f25a63a0 100644 --- a/postgres-appliance/build_scripts/base.sh +++ b/postgres-appliance/build_scripts/base.sh @@ -35,8 +35,7 @@ else make -C pam-oauth2 install # prepare 3rd sources - git clone -b "$PLPROFILER" https://github.com/hughcapet/plprofiler.git - tar -xzf "plantuner-${PLANTUNER_COMMIT}.tar.gz" + git clone -b "$PLPROFILER" https://github.com/bigsql/plprofiler.git curl -sL "https://github.com/zalando-pg/pg_mon/archive/$PG_MON_COMMIT.tar.gz" | tar xz for p in python3-keyring python3-docutils ieee-data; do @@ -55,7 +54,6 @@ fi curl -sL "https://github.com/zalando-pg/bg_mon/archive/$BG_MON_COMMIT.tar.gz" | tar xz curl -sL "https://github.com/zalando-pg/pg_auth_mon/archive/$PG_AUTH_MON_COMMIT.tar.gz" | tar xz curl -sL "https://github.com/cybertec-postgresql/pg_permissions/archive/$PG_PERMISSIONS_COMMIT.tar.gz" | tar xz -curl -sL "https://github.com/hughcapet/pg_tm_aux/archive/$PG_TM_AUX_COMMIT.tar.gz" | tar xz curl -sL "https://github.com/zubkov-andrei/pg_profile/archive/$PG_PROFILE.tar.gz" | tar xz git clone -b "$SET_USER" https://github.com/pgaudit/set_user.git git clone https://github.com/timescale/timescaledb.git @@ -91,36 +89,20 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do "postgresql-${version}-pglogical-ticker" "postgresql-${version}-plpgsql-check" "postgresql-${version}-pg-checksums" + "postgresql-${version}-pgl-ddl-deploy" "postgresql-${version}-pgq-node" "postgresql-${version}-postgis-${POSTGIS_VERSION%.*}" "postgresql-${version}-postgis-${POSTGIS_VERSION%.*}-scripts" "postgresql-${version}-repack" - "postgresql-${version}-wal2json") - - if [ "$version" != "16" ]; then - EXTRAS+=("postgresql-${version}-pgl-ddl-deploy") - fi - - if [ "$version" != "15" ]; then - # not yet present for pg15 - EXTRAS+=("postgresql-${version}-pllua") - fi + "postgresql-${version}-wal2json" + "postgresql-${version}-decoderbufs" + "postgresql-${version}-pllua" + "postgresql-${version}-pgvector") if [ "$WITH_PERL" = "true" ]; then EXTRAS+=("postgresql-plperl-${version}") fi - if [ "${version%.*}" -ge 10 ]; then - EXTRAS+=("postgresql-${version}-decoderbufs") - fi - - if [ "${version%.*}" -ge 11 ]; then - EXTRAS+=("postgresql-${version}-pgvector") - fi - - if [ "${version%.*}" -lt 11 ]; then - EXTRAS+=("postgresql-${version}-amcheck") - fi fi # Install PostgreSQL binaries, contrib, plproxy and multiple pl's @@ -139,7 +121,7 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do # use subshell to avoid having to cd back (SC2103) ( cd timescaledb - if [ "$version" != "16 " ]; then + if [ "$version" != "16" ]; then for v in $TIMESCALEDB; do git checkout "$v" sed -i "s/VERSION 3.11/VERSION 3.10/" CMakeLists.txt @@ -173,12 +155,7 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do EXTRA_EXTENSIONS=() if [ "$DEMO" != "true" ]; then - if [ "$version" != "16" ]; then - EXTRA_EXTENSIONS+=("plantuner-${PLANTUNER_COMMIT}" plprofiler "pg_tm_aux-${PG_TM_AUX_COMMIT}") - fi - if [ "${version%.*}" -ge 10 ]; then - EXTRA_EXTENSIONS+=("pg_mon-${PG_MON_COMMIT}") - fi + EXTRA_EXTENSIONS+=("plprofiler") fi for n in bg_mon-${BG_MON_COMMIT} \ @@ -186,6 +163,7 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do set_user \ pg_permissions-${PG_PERMISSIONS_COMMIT} \ pg_profile-${PG_PROFILE} \ + pg_mon-${PG_MON_COMMIT} \ "${EXTRA_EXTENSIONS[@]}"; do make -C "$n" USE_PGXS=1 clean install-strip done @@ -286,17 +264,12 @@ if [ "$DEMO" != "true" ]; then if [ "$v1" = "$v2" ]; then started=1 elif [ $started = 1 ]; then - - used_postgis_version=$POSTGIS_VERSION - if [ "${v1##*/}" = "11" ]; then used_postgis_version=$POSTGIS_LEGACY; fi - - for d1 in extension contrib contrib/postgis-$used_postgis_version; do + for d1 in extension contrib contrib/postgis-$POSTGIS_VERSION; do cd "$v1/$d1" d2="$d1" d1="../../${v1##*/}/$d1" if [ "${d2%-*}" = "contrib/postgis" ]; then - if [ "${v2##*/}" = "11" ]; then d2="${d2%-*}-$POSTGIS_LEGACY" - elif [ "${v2##*/}" = "10" ]; then d2="${d2%-*}-$POSTGIS_SUPER_LEGACY"; fi + if [ "${v2##*/}" = "11" ]; then d2="${d2%-*}-$POSTGIS_LEGACY"; fi d1="../$d1" fi d2="$v2/$d2" diff --git a/postgres-appliance/dependencies/src/plantuner-800d81bc85da64ff3ef66e12aed1d4e1e54fc006.tar.gz b/postgres-appliance/dependencies/src/plantuner-800d81bc85da64ff3ef66e12aed1d4e1e54fc006.tar.gz deleted file mode 100644 index 6c8365d69..000000000 Binary files a/postgres-appliance/dependencies/src/plantuner-800d81bc85da64ff3ef66e12aed1d4e1e54fc006.tar.gz and /dev/null differ