diff --git a/.github/workflows/build-package-test.yml b/.github/workflows/build-package-test.yml index 4e71c5c3..d8942895 100644 --- a/.github/workflows/build-package-test.yml +++ b/.github/workflows/build-package-test.yml @@ -49,6 +49,8 @@ jobs: - 17 - 18 include: + - TARGET_PLATFORM: almalinux,9 + POSTGRES_VERSION: 19 - TARGET_PLATFORM: debian,bullseye - TARGET_PLATFORM: debian,bookworm - TARGET_PLATFORM: debian,trixie diff --git a/.github/workflows/build-package.yml b/.github/workflows/build-package.yml index d6070c9f..4097cec4 100644 --- a/.github/workflows/build-package.yml +++ b/.github/workflows/build-package.yml @@ -49,6 +49,8 @@ jobs: - 17 - 18 include: + - TARGET_PLATFORM: almalinux,9 + POSTGRES_VERSION: 19 - TARGET_PLATFORM: debian,bullseye - TARGET_PLATFORM: debian,bookworm - TARGET_PLATFORM: debian,trixie diff --git a/.github/workflows/image-health-check.yml b/.github/workflows/image-health-check.yml index fa334ae8..c2866e08 100644 --- a/.github/workflows/image-health-check.yml +++ b/.github/workflows/image-health-check.yml @@ -51,6 +51,8 @@ jobs: - 17 - 18 include: + - TARGET_PLATFORM: almalinux,9 + POSTGRES_VERSION: 19 - TARGET_PLATFORM: debian,bullseye - TARGET_PLATFORM: debian,bookworm - TARGET_PLATFORM: debian,trixie diff --git a/ci/push_images b/ci/push_images index 363936d5..09162b60 100755 --- a/ci/push_images +++ b/ci/push_images @@ -4,7 +4,7 @@ set -euo pipefail IFS=$'\n\t' -pgversions='12 13 14 15 16 17 18' +pgversions='12 13 14 15 16 17 18 19' topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.." dockerfiles_dir="${topdir}/dockerfiles" @@ -32,6 +32,10 @@ while read -r line; do if [ ! -z ${TARGET_PLATFORM} ] && [ ${line} != ${TARGET_PLATFORM} ]; then continue fi + if [[ "${release}" = '8' ]] && [[ "${POSTGRES_VERSION}" = '19' ]]; then + echo "${line} unsupported: PGDG does not publish PostgreSQL 19 packages for EL8" >&2 + exit 1 + fi if [[ "${os}" = 'debian' ]] || [[ "${os}" = 'ubuntu' ]]; then tag="${os}-${release}-all" args+="push citus/${image_name}:${tag}\n" @@ -44,6 +48,10 @@ while read -r line; do if [ -n "${POSTGRES_VERSION}" ] && [ "${pgversion}" != "${POSTGRES_VERSION}" ] ; then continue fi + if [[ "${release}" = '8' ]] && [[ "${pgversion}" = '19' ]]; then + # PGDG does not publish PostgreSQL 19 packages for EL8. + continue + fi if { [[ "${os}" = 'centos' ]] || [[ "${os}" = 'oraclelinux' ]]; } && \ [[ "${release}" = '6' ]] && [[ "${pgversion}" = '13' ]]; then # CentOS and OracleLinux 6 doesn't have pg13 packages yet. diff --git a/dockerfiles/almalinux-9-pg19/Dockerfile b/dockerfiles/almalinux-9-pg19/Dockerfile new file mode 100644 index 00000000..ce84118f --- /dev/null +++ b/dockerfiles/almalinux-9-pg19/Dockerfile @@ -0,0 +1,174 @@ +# vim:set ft=dockerfile: +FROM almalinux:9 +RUN [[ almalinux != centos ]] || [[ 9 != 8 ]] || ( \ + cd /etc/yum.repos.d/ && sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ + && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.epel.cloud|g' /etc/yum.repos.d/CentOS-* \ + ) + +RUN yum -y update + +RUN [[ almalinux != centos ]] || [[ 9 != 8 ]] || ( \ + dnf install epel-release -y && \ + dnf install dnf-plugins-core -y && \ + dnf install epel-release -y && \ + dnf config-manager --set-enabled powertools && \ + dnf install -y perl-IPC-Run \ + ) + +RUN [[ almalinux != almalinux ]] || [[ 9 != 8 ]] || ( \ + dnf install epel-release -y && \ + dnf install dnf-plugins-core -y && \ + dnf install epel-release -y && \ + dnf config-manager --set-enabled powertools && \ + dnf install -y perl-IPC-Run \ + ) + +RUN [[ almalinux != oraclelinux ]] || [[ 9 != 8 ]] || ( \ + curl -sO https://vault.centos.org/centos/8/PowerTools/x86_64/os/Packages/perl-IO-Tty-1.12-11.el8.x86_64.rpm && \ + curl -sO https://vault.centos.org/centos/8/PowerTools/x86_64/os/Packages/perl-IPC-Run-0.99-1.el8.noarch.rpm && \ + dnf install perl-IO-Tty-1.12-11.el8.x86_64.rpm -y && \ + dnf install perl-IPC-Run-0.99-1.el8.noarch.rpm -y && \ + rm -f perl-IPC-Run-0.99-1.el8.noarch.rpm && \ + rm -f perl-IO-Tty-1.12-11.el8.x86_64.rpm \ + ) + +RUN [[ almalinux != almalinux ]] || [[ 9 != 9 ]] || ( \ + dnf install epel-release -y && \ + dnf -y install dnf-plugins-core && \ + dnf config-manager --enable epel && \ + dnf config-manager --set-enabled crb && \ + dnf install -y perl-IPC-Run \ + ) + +# FIXME: Hack around docker/docker#10180 +RUN ( yum install -y yum-plugin-ovl || yum install -y yum-plugin-ovl || touch /var/lib/rpm/* ) \ + && yum clean all + +# Enable some other repos for some dependencies in OL/7 +# see https://yum.oracle.com/getting-started.html#installing-from-oracle-linux-yum-server +RUN [[ almalinux != oraclelinux ]] || [[ 9 != 7 ]] || ( \ + yum install -y oraclelinux-release-el7 oracle-softwarecollection-release-el7 oracle-epel-release-el7 oraclelinux-developer-release-el7 \ + && yum-config-manager --enable \ + ol7_software_collections \ + ol7_developer \ + ol7_developer_EPEL \ + ol7_optional_latest \ + ol7_optional_archive \ + ol7_u9_base \ + ol7_security_validation \ + ol7_addons \ + ) + +# lz4 1.8 is preloaded in oracle 7 however, lz4-devel is not loaded and only 1.7.5 version exists +# in oracle 7 repos. So package from centos repo was used +# There is no package in oracle repos for lz4. Also it is not preloaded. So both lz4 and lz4-devel packages +# were downloaded from centos el/6 repos +RUN if [[ almalinux == oraclelinux ]] && [[ 9 == 7 ]]; then yum install -y wget \ + && wget http://mirror.centos.org/centos/7/os/x86_64/Packages/lz4-devel-1.8.3-1.el7.x86_64.rpm \ + && rpm -ivh lz4-devel-1.8.3-1.el7.x86_64.rpm ; \ + elif [[ almalinux == oraclelinux ]] && [[ 9 == 6 ]]; then yum install -y wget \ + && wget https://cbs.centos.org/kojifiles/packages/lz4/r131/1.el6/x86_64/lz4-r131-1.el6.x86_64.rpm \ + && rpm -ivh lz4-r131-1.el6.x86_64.rpm \ + && wget https://cbs.centos.org/kojifiles/packages/lz4/r131/1.el6/x86_64/lz4-devel-r131-1.el6.x86_64.rpm \ + && rpm -ivh lz4-devel-r131-1.el6.x86_64.rpm; \ + else yum install -y lz4 lz4-devel; fi + +# install build tools and PostgreSQL development files +RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 19 != 19 ]] || sed -i '/\[pgdg19-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ + && [[ -z "epel-release" ]] || yum install -y epel-release) \ + && yum groupinstall -y 'Development Tools' \ + && yum install -y \ + bzip2-devel \ + libffi-devel \ + xz-devel \ + flex \ + gcc-c++ \ + hunspell-en \ + libcurl-devel \ + libicu-devel \ + libstdc++-devel \ + libxml2-devel \ + libxslt-devel \ + openssl-devel \ + pam-devel \ + readline-devel \ + rpm-build \ + rpmlint \ + tar \ + libzstd \ + libzstd-devel \ + llvm-toolset ccache rpmdevtools krb5-devel \ + && ( [[ 9 != 8 ]] || dnf -qy module disable postgresql ) \ + && yum install -y postgresql19-server postgresql19-devel \ + && yum clean all + +# install jq to process JSON API responses +RUN curl -sL https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 \ + -o /usr/bin/jq \ + && chmod +x /usr/bin/jq + +# install devtoolset-8-gcc on distros where it is available +RUN { \ + { yum search devtoolset-8-gcc 2>&1 | grep 'No matches found' ; } \ + || yum install -y devtoolset-8-gcc devtoolset-8-libstdc++-devel; \ + } \ + && yum clean all + +# install sphinx on distros with python3 +RUN { \ + { yum search python3-pip 2>&1 | grep 'No matches found' ; } \ + || { \ + yum install -y python3-pip && \ + pip3 install sphinx==1.8 \ + ; \ + } \ + } \ + && yum clean all + +# install cmake, devtoolset and its dependencies to build azure sdk +RUN yum -y install perl-IPC-Cmd libuuid-devel cmake3 + +# by default git 1.8.x is being installed in centos 7 +# Git 2.7.1 is minimum requirement for cmake so we remove and reinstall latests git from an up-to-date repo +# Symbolic link is not being created for cmake from cmake3 by default. Therefore, we need to create the link as well. +# devtoolset-8-gcc-c++ is required to compile azure sdk in pg azure storage project +RUN [[ almalinux != centos ]] || [[ 9 != 7 ]] || ( \ + yum -y install perl-IPC-Cmd libuuid-devel cmake3 && \ + ln -s /usr/bin/cmake3 /usr/bin/cmake && \ + yum -y remove git && \ + yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm && \ + yum -y install git && \ + yum -y install devtoolset-8-gcc-c++ && scl enable devtoolset-8 bash && \ + yum -y install llvm-toolset-7 && \ + yum clean all \ + ) + +# install python 3.8 to be able to execute tools scripts +ARG PYTHON_VERSION=3.8.16 +RUN set -ex \ + && curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash \ + && export PATH="$HOME/.pyenv/bin:$PATH" \ + && pyenv update \ + && pyenv install $PYTHON_VERSION \ + && pyenv global $PYTHON_VERSION \ + && pyenv rehash \ + && echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc \ + && echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc \ + && echo 'eval "$(pyenv init -)"' >> ~/.bashrc + +# install llvm-toolset-7 to be able to install clang 5.0 +# clang 5.0 is required to build pg_azure_storage project +ENV LD_LIBRARY_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64/:$LD_LIBRARY_PATH +ENV PATH=/opt/rh/llvm-toolset-7/root/usr/bin:$PATH + +RUN touch /rpmlintrc \ + && echo '%_build_pkgcheck %{_bindir}/rpmlint -f /rpmlintrc' >> /etc/rpm/macros + +# set PostgreSQL version, place scripts on path, and declare output volume +ENV PGVERSION=19 \ + PATH=/scripts:$PATH +COPY scripts /scripts +VOLUME /packages + +ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/debian-bookworm-all/Dockerfile b/dockerfiles/debian-bookworm-all/Dockerfile index e9e56b73..cb0089ec 100644 --- a/dockerfiles/debian-bookworm-all/Dockerfile +++ b/dockerfiles/debian-bookworm-all/Dockerfile @@ -44,7 +44,7 @@ RUN ( [ debian != debian ] || [ bookworm != buster ] ) || ( \ # install build tools and PostgreSQL development files -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main 19' > /etc/apt/sources.list.d/pgdg.list \ && apt-get update \ && apt-get install -y --no-install-recommends \ autotools-dev \ @@ -70,7 +70,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main' > /et libxslt-dev \ lintian \ postgresql-server-dev-all \ - postgresql-server-dev-18 \ + postgresql-server-dev-19 \ wget \ zlib1g-dev \ python3-pip \ @@ -127,8 +127,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg18 package support. -ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18" +# Added for pg19 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18 19" # place scripts on path and declare output volume ENV PATH /scripts:$PATH diff --git a/dockerfiles/debian-bullseye-all/Dockerfile b/dockerfiles/debian-bullseye-all/Dockerfile index 9ca53ceb..7f1e225a 100644 --- a/dockerfiles/debian-bullseye-all/Dockerfile +++ b/dockerfiles/debian-bullseye-all/Dockerfile @@ -44,7 +44,7 @@ RUN ( [ debian != debian ] || [ bullseye != buster ] ) || ( \ # install build tools and PostgreSQL development files -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main 19' > /etc/apt/sources.list.d/pgdg.list \ && apt-get update \ && apt-get install -y --no-install-recommends \ autotools-dev \ @@ -70,7 +70,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main' > /et libxslt-dev \ lintian \ postgresql-server-dev-all \ - postgresql-server-dev-18 \ + postgresql-server-dev-19 \ wget \ zlib1g-dev \ python3-pip \ @@ -127,8 +127,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg18 package support. -ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18" +# Added for pg19 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18 19" # place scripts on path and declare output volume ENV PATH /scripts:$PATH diff --git a/dockerfiles/debian-trixie-all/Dockerfile b/dockerfiles/debian-trixie-all/Dockerfile index fc1215ef..0fed394e 100644 --- a/dockerfiles/debian-trixie-all/Dockerfile +++ b/dockerfiles/debian-trixie-all/Dockerfile @@ -44,7 +44,7 @@ RUN ( [ debian != debian ] || [ trixie != buster ] ) || ( \ # install build tools and PostgreSQL development files -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ trixie-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ trixie-pgdg main 19' > /etc/apt/sources.list.d/pgdg.list \ && apt-get update \ && apt-get install -y --no-install-recommends \ autotools-dev \ @@ -70,7 +70,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ trixie-pgdg main' > /etc/ libxslt-dev \ lintian \ postgresql-server-dev-all \ - postgresql-server-dev-18 \ + postgresql-server-dev-19 \ wget \ zlib1g-dev \ python3-pip \ @@ -127,8 +127,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg18 package support. -ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18" +# Added for pg19 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18 19" # place scripts on path and declare output volume ENV PATH /scripts:$PATH diff --git a/dockerfiles/ubuntu-jammy-all/Dockerfile b/dockerfiles/ubuntu-jammy-all/Dockerfile index 02306314..cad6b08f 100644 --- a/dockerfiles/ubuntu-jammy-all/Dockerfile +++ b/dockerfiles/ubuntu-jammy-all/Dockerfile @@ -44,7 +44,7 @@ RUN ( [ ubuntu != debian ] || [ jammy != buster ] ) || ( \ # install build tools and PostgreSQL development files -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jammy-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jammy-pgdg main 19' > /etc/apt/sources.list.d/pgdg.list \ && apt-get update \ && apt-get install -y --no-install-recommends \ autotools-dev \ @@ -70,7 +70,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jammy-pgdg main' > /etc/a libxslt-dev \ lintian \ postgresql-server-dev-all \ - postgresql-server-dev-18 \ + postgresql-server-dev-19 \ wget \ zlib1g-dev \ python3-pip \ @@ -127,8 +127,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg18 package support. -ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18" +# Added for pg19 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18 19" # place scripts on path and declare output volume ENV PATH /scripts:$PATH diff --git a/dockerfiles/ubuntu-noble-all/Dockerfile b/dockerfiles/ubuntu-noble-all/Dockerfile index e65f225b..38d09275 100644 --- a/dockerfiles/ubuntu-noble-all/Dockerfile +++ b/dockerfiles/ubuntu-noble-all/Dockerfile @@ -44,7 +44,7 @@ RUN ( [ ubuntu != debian ] || [ noble != buster ] ) || ( \ # install build tools and PostgreSQL development files -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ noble-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ noble-pgdg main 19' > /etc/apt/sources.list.d/pgdg.list \ && apt-get update \ && apt-get install -y --no-install-recommends \ autotools-dev \ @@ -70,7 +70,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ noble-pgdg main' > /etc/a libxslt-dev \ lintian \ postgresql-server-dev-all \ - postgresql-server-dev-18 \ + postgresql-server-dev-19 \ wget \ zlib1g-dev \ python3-pip \ @@ -127,8 +127,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg18 package support. -ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18" +# Added for pg19 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18 19" # place scripts on path and declare output volume ENV PATH /scripts:$PATH diff --git a/dockerfiles/ubuntu-resolute-all/Dockerfile b/dockerfiles/ubuntu-resolute-all/Dockerfile index 6dea218f..d8ca586f 100644 --- a/dockerfiles/ubuntu-resolute-all/Dockerfile +++ b/dockerfiles/ubuntu-resolute-all/Dockerfile @@ -44,7 +44,7 @@ RUN ( [ ubuntu != debian ] || [ resolute != buster ] ) || ( \ # install build tools and PostgreSQL development files -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ resolute-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ resolute-pgdg main 19' > /etc/apt/sources.list.d/pgdg.list \ && apt-get update \ && apt-get install -y --no-install-recommends \ autotools-dev \ @@ -70,7 +70,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ resolute-pgdg main' > /et libxslt-dev \ lintian \ postgresql-server-dev-all \ - postgresql-server-dev-18 \ + postgresql-server-dev-19 \ wget \ zlib1g-dev \ python3-pip \ @@ -127,8 +127,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg18 package support. -ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18" +# Added for pg19 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18 19" # place scripts on path and declare output volume ENV PATH /scripts:$PATH diff --git a/templates/Dockerfile-deb.tmpl b/templates/Dockerfile-deb.tmpl index c616a40d..3a718e85 100644 --- a/templates/Dockerfile-deb.tmpl +++ b/templates/Dockerfile-deb.tmpl @@ -44,7 +44,7 @@ RUN ( [ %%os%% != debian ] || [ %%release%% != buster ] ) || ( \ # install build tools and PostgreSQL development files -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ %%release%%-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ %%release%%-pgdg main 19' > /etc/apt/sources.list.d/pgdg.list \ && apt-get update \ && apt-get install -y --no-install-recommends \ autotools-dev \ @@ -70,7 +70,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ %%release%%-pgdg main' > libxslt-dev \ lintian \ postgresql-server-dev-all \ - postgresql-server-dev-18 \ + postgresql-server-dev-19 \ wget \ zlib1g-dev \ python3-pip \ @@ -127,8 +127,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg18 package support. -ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18" +# Added for pg19 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="14 15 16 17 18 19" # place scripts on path and declare output volume ENV PATH /scripts:$PATH diff --git a/templates/Dockerfile-rpm.tmpl b/templates/Dockerfile-rpm.tmpl index 2d99d78c..5ab2de7e 100644 --- a/templates/Dockerfile-rpm.tmpl +++ b/templates/Dockerfile-rpm.tmpl @@ -75,6 +75,7 @@ RUN if [[ %%os%% == oraclelinux ]] && [[ %%release%% == 7 ]]; then yum install # install build tools and PostgreSQL development files RUN ( yum install -y https://%%rpm_url%% \ + && ( [[ %%pgshort%% != 19 ]] || sed -i '/\[pgdg19-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "%%extra-repositories%%" ]] || yum install -y %%extra-repositories%%) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/update_dockerfiles b/update_dockerfiles index 791c3a6b..aff205c8 100755 --- a/update_dockerfiles +++ b/update_dockerfiles @@ -4,7 +4,7 @@ set -euo pipefail IFS=$'\n\t' -pgversions='14 15 16 17 18' +pgversions='14 15 16 17 18 19' topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" dockerfiles_dir="${topdir}/dockerfiles" templates_dir="${topdir}"/templates @@ -61,7 +61,11 @@ function update_rpm_dockerfile { mkdir -p "${target_subdir}" template="${templates_dir}"/Dockerfile-rpm.tmpl - sed "$sed_cmd; s#%%rpm_url%%#${rpm_url}#g; s/%%pgshort%%/${pgshort}/g; s/%%pgversion%%/${pgversion}/g" \ + pg19_sed_cmd='' + if [[ "${pgversion}" != '19' ]]; then + pg19_sed_cmd='/pgdg19-updates-testing/d;' + fi + sed "$sed_cmd; ${pg19_sed_cmd} s#%%rpm_url%%#${rpm_url}#g; s/%%pgshort%%/${pgshort}/g; s/%%pgversion%%/${pgversion}/g" \ "${template}" > "${target_subdir}/Dockerfile" @@ -92,6 +96,10 @@ while read -r line; do # redhat variants need a Dockerfile for each PostgreSQL version IFS=' ' for pgversion in ${pgversions}; do + if [[ "${release}" = '8' ]] && [[ "${pgversion}" = '19' ]]; then + # PGDG does not publish PostgreSQL 19 packages for EL8. + continue + fi if { [[ "${os}" = 'centos' ]] || [[ "${os}" = 'oraclelinux' ]]; } && \ [[ "${release}" = '6' ]] && [[ "${pgversion}" = '13' ]]; then # CentOS and OracleLinux 6 doesn't have pg13 packages yet. diff --git a/update_image b/update_image index 79446e50..950cf736 100755 --- a/update_image +++ b/update_image @@ -9,7 +9,7 @@ set -euo pipefail IFS=$'\n\t' -pgversions='14 15 16 17 18' +pgversions='14 15 16 17 18 19' topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" dockerfiles_dir="${topdir}/dockerfiles" @@ -27,6 +27,11 @@ fi IFS=',' read -r os release <<< "${TARGET_PLATFORM}" +if [[ "${release}" = '8' ]] && [[ "${POSTGRES_VERSION}" = '19' ]]; then + echo "${TARGET_PLATFORM} unsupported: PGDG does not publish PostgreSQL 19 packages for EL8" >&2 + exit 1 +fi + if [[ "${os},${release}" =~ ^ubuntu,(focal|bionic)$ ]]; then echo "${TARGET_PLATFORM} unsupported: PGDG apt repo for ${release} is no longer available" >&2 exit 1 @@ -43,6 +48,10 @@ elif [[ "${os}" = 'centos' ]] || [[ "${os}" = 'oraclelinux' ]] || [[ "${os}" = ' if [ -n "${POSTGRES_VERSION}" ] && [ "${pgversion}" != "${POSTGRES_VERSION}" ] ; then continue fi + if [[ "${release}" = '8' ]] && [[ "${pgversion}" = '19' ]]; then + # PGDG does not publish PostgreSQL 19 packages for EL8. + continue + fi if { [[ "${os}" = 'centos' ]] || [[ "${os}" = 'oraclelinux' ]]; } && \ [[ "${release}" = '6' ]] && [[ "${pgversion}" = '13' ]]; then # CentOS and OracleLinux 6 doesn't have pg13 packages yet.