From 37d2941ba2409460c304acaccaf36c1025d5e673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrkan=20=C4=B0ndibay?= Date: Wed, 23 Aug 2023 18:12:33 +0300 Subject: [PATCH] Adds pg 16 support (#1068) * Adds pg 16 support * Adds concurrency check to cancel previous run --- .../build-citus-community-nightlies.yml | 10 +- .github/workflows/build-package-test.yml | 9 +- .github/workflows/build-package.yml | 9 +- .github/workflows/build-pgazure-nightlies.yml | 5 +- .github/workflows/image-health-check.yml | 9 +- ci/push_images | 2 +- dockerfiles/almalinux-8-pg11/Dockerfile | 1 + dockerfiles/almalinux-8-pg12/Dockerfile | 1 + dockerfiles/almalinux-8-pg13/Dockerfile | 1 + dockerfiles/almalinux-8-pg14/Dockerfile | 1 + dockerfiles/almalinux-8-pg15/Dockerfile | 1 + dockerfiles/almalinux-8-pg16/Dockerfile | 174 ++++++++++++++++++ dockerfiles/almalinux-9-pg11/Dockerfile | 1 + dockerfiles/almalinux-9-pg12/Dockerfile | 1 + dockerfiles/almalinux-9-pg13/Dockerfile | 1 + dockerfiles/almalinux-9-pg14/Dockerfile | 1 + dockerfiles/almalinux-9-pg15/Dockerfile | 1 + dockerfiles/almalinux-9-pg16/Dockerfile | 174 ++++++++++++++++++ dockerfiles/centos-7-pg11/Dockerfile | 1 + dockerfiles/centos-7-pg12/Dockerfile | 1 + dockerfiles/centos-7-pg13/Dockerfile | 1 + dockerfiles/centos-7-pg14/Dockerfile | 1 + dockerfiles/centos-7-pg15/Dockerfile | 1 + dockerfiles/centos-7-pg16/Dockerfile | 174 ++++++++++++++++++ dockerfiles/centos-8-pg11/Dockerfile | 1 + dockerfiles/centos-8-pg12/Dockerfile | 1 + dockerfiles/centos-8-pg13/Dockerfile | 1 + dockerfiles/centos-8-pg14/Dockerfile | 1 + dockerfiles/centos-8-pg15/Dockerfile | 1 + dockerfiles/centos-8-pg16/Dockerfile | 174 ++++++++++++++++++ dockerfiles/debian-bookworm-all/Dockerfile | 8 +- dockerfiles/debian-bullseye-all/Dockerfile | 8 +- dockerfiles/debian-buster-all/Dockerfile | 8 +- dockerfiles/oraclelinux-6-pg11/Dockerfile | 1 + dockerfiles/oraclelinux-6-pg12/Dockerfile | 1 + dockerfiles/oraclelinux-6-pg14/Dockerfile | 1 + dockerfiles/oraclelinux-6-pg15/Dockerfile | 1 + dockerfiles/oraclelinux-6-pg16/Dockerfile | 174 ++++++++++++++++++ dockerfiles/oraclelinux-7-pg11/Dockerfile | 1 + dockerfiles/oraclelinux-7-pg12/Dockerfile | 1 + dockerfiles/oraclelinux-7-pg13/Dockerfile | 1 + dockerfiles/oraclelinux-7-pg14/Dockerfile | 1 + dockerfiles/oraclelinux-7-pg15/Dockerfile | 1 + dockerfiles/oraclelinux-7-pg16/Dockerfile | 174 ++++++++++++++++++ dockerfiles/oraclelinux-8-pg11/Dockerfile | 1 + dockerfiles/oraclelinux-8-pg12/Dockerfile | 1 + dockerfiles/oraclelinux-8-pg13/Dockerfile | 1 + dockerfiles/oraclelinux-8-pg14/Dockerfile | 1 + dockerfiles/oraclelinux-8-pg15/Dockerfile | 1 + dockerfiles/oraclelinux-8-pg16/Dockerfile | 174 ++++++++++++++++++ dockerfiles/ubuntu-bionic-all/Dockerfile | 8 +- dockerfiles/ubuntu-focal-all/Dockerfile | 8 +- dockerfiles/ubuntu-jammy-all/Dockerfile | 8 +- dockerfiles/ubuntu-kinetic-all/Dockerfile | 8 +- os-list.csv | 1 - templates/Dockerfile-deb.tmpl | 8 +- templates/Dockerfile-rpm.tmpl | 1 + update_dockerfiles | 2 +- update_image | 2 +- 59 files changed, 1322 insertions(+), 44 deletions(-) create mode 100644 dockerfiles/almalinux-8-pg16/Dockerfile create mode 100644 dockerfiles/almalinux-9-pg16/Dockerfile create mode 100644 dockerfiles/centos-7-pg16/Dockerfile create mode 100644 dockerfiles/centos-8-pg16/Dockerfile create mode 100644 dockerfiles/oraclelinux-6-pg16/Dockerfile create mode 100644 dockerfiles/oraclelinux-7-pg16/Dockerfile create mode 100644 dockerfiles/oraclelinux-8-pg16/Dockerfile diff --git a/.github/workflows/build-citus-community-nightlies.yml b/.github/workflows/build-citus-community-nightlies.yml index 81efdeab7..d7b55fb73 100644 --- a/.github/workflows/build-citus-community-nightlies.yml +++ b/.github/workflows/build-citus-community-nightlies.yml @@ -17,6 +17,10 @@ on: - cron: "30 1 * * *" workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build_package: name: Build package @@ -31,7 +35,8 @@ jobs: - debian/buster - debian/bullseye - debian/bookworm - - ubuntu/bionic + # removing temporarily since postgres 16 packages does not exist for ubuntu bionic + # - ubuntu/bionic - ubuntu/focal - ubuntu/jammy - ubuntu/kinetic @@ -68,7 +73,8 @@ jobs: --secret_key "${PACKAGING_SECRET_KEY}" \ --passphrase "${PACKAGING_PASSPHRASE}" \ --output_dir "$(pwd)/packages/" \ - --input_files_dir "$(pwd)/packaging" + --input_files_dir "$(pwd)/packaging" \ + --is_test - name: Publish packages run: | diff --git a/.github/workflows/build-package-test.yml b/.github/workflows/build-package-test.yml index b8a28d8a8..115cd9854 100644 --- a/.github/workflows/build-package-test.yml +++ b/.github/workflows/build-package-test.yml @@ -16,6 +16,10 @@ on: branches: "**" workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check_docker_files_integrity: name: Check if docker files are compliant with templates @@ -39,6 +43,7 @@ jobs: - centos,7 - oraclelinux,8 - oraclelinux,7 + - almalinux,8 - almalinux,9 POSTGRES_VERSION: - 11 @@ -46,11 +51,13 @@ jobs: - 13 - 14 - 15 + - 16 include: - TARGET_PLATFORM: debian,buster - TARGET_PLATFORM: debian,bullseye - TARGET_PLATFORM: debian,bookworm - - TARGET_PLATFORM: ubuntu,bionic + # removing temporarily since postgres 16 packages does not exist for ubuntu bionic + # - TARGET_PLATFORM: ubuntu,bionic - TARGET_PLATFORM: ubuntu,focal - TARGET_PLATFORM: ubuntu,jammy - TARGET_PLATFORM: ubuntu,kinetic diff --git a/.github/workflows/build-package.yml b/.github/workflows/build-package.yml index f16a277cb..4fc9f7047 100644 --- a/.github/workflows/build-package.yml +++ b/.github/workflows/build-package.yml @@ -14,9 +14,12 @@ env: on: push: branches: "**" - workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check_docker_files_integrity: name: Check if docker files are compliant with templates @@ -48,11 +51,13 @@ jobs: - 13 - 14 - 15 + - 16 include: - TARGET_PLATFORM: debian,buster - TARGET_PLATFORM: debian,bullseye - TARGET_PLATFORM: debian,bookworm - - TARGET_PLATFORM: ubuntu,bionic + # removing temporarily since postgres 16 packages does not exist for ubuntu bionic + # - TARGET_PLATFORM: ubuntu,bionic - TARGET_PLATFORM: ubuntu,focal - TARGET_PLATFORM: ubuntu,jammy - TARGET_PLATFORM: ubuntu,kinetic diff --git a/.github/workflows/build-pgazure-nightlies.yml b/.github/workflows/build-pgazure-nightlies.yml index 8a1488447..c9fbd3ad0 100644 --- a/.github/workflows/build-pgazure-nightlies.yml +++ b/.github/workflows/build-pgazure-nightlies.yml @@ -10,11 +10,14 @@ env: DOCKERHUB_USER_NAME: ${{ secrets.DOCKERHUB_USER_NAME }} DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} on: - schedule: - cron: "30 1 * * *" workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build_package: name: Build package diff --git a/.github/workflows/image-health-check.yml b/.github/workflows/image-health-check.yml index 445867531..a3eaa753a 100644 --- a/.github/workflows/image-health-check.yml +++ b/.github/workflows/image-health-check.yml @@ -16,9 +16,12 @@ on: branches: "**" schedule: - cron: "30 2 * * *" - workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check_docker_files_integrity: name: Check if docker files are compliant with templates @@ -50,11 +53,13 @@ jobs: - 13 - 14 - 15 + - 16 include: - TARGET_PLATFORM: debian,buster - TARGET_PLATFORM: debian,bullseye - TARGET_PLATFORM: debian,bookworm - - TARGET_PLATFORM: ubuntu,bionic + # removing temporarily since postgres 16 packages does not exist for ubuntu bionic + # - TARGET_PLATFORM: ubuntu,bionic - TARGET_PLATFORM: ubuntu,focal - TARGET_PLATFORM: ubuntu,jammy - TARGET_PLATFORM: ubuntu,kinetic diff --git a/ci/push_images b/ci/push_images index dca0e398b..5b4d1d705 100755 --- a/ci/push_images +++ b/ci/push_images @@ -4,7 +4,7 @@ set -euo pipefail IFS=$'\n\t' -pgversions='10 11 12 13 14 15' +pgversions='10 11 12 13 14 15 16' topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.." dockerfiles_dir="${topdir}/dockerfiles" diff --git a/dockerfiles/almalinux-8-pg11/Dockerfile b/dockerfiles/almalinux-8-pg11/Dockerfile index 9d09540eb..980544eb6 100644 --- a/dockerfiles/almalinux-8-pg11/Dockerfile +++ b/dockerfiles/almalinux-8-pg11/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ almalinux == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y wge # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 11 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/almalinux-8-pg12/Dockerfile b/dockerfiles/almalinux-8-pg12/Dockerfile index dbfabfa83..92ca787f6 100644 --- a/dockerfiles/almalinux-8-pg12/Dockerfile +++ b/dockerfiles/almalinux-8-pg12/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ almalinux == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y wge # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 12 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/almalinux-8-pg13/Dockerfile b/dockerfiles/almalinux-8-pg13/Dockerfile index 2d258e6a3..5e3a11902 100644 --- a/dockerfiles/almalinux-8-pg13/Dockerfile +++ b/dockerfiles/almalinux-8-pg13/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ almalinux == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y wge # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 13 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/almalinux-8-pg14/Dockerfile b/dockerfiles/almalinux-8-pg14/Dockerfile index 1240880a1..f3b977a88 100644 --- a/dockerfiles/almalinux-8-pg14/Dockerfile +++ b/dockerfiles/almalinux-8-pg14/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ almalinux == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y wge # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 14 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/almalinux-8-pg15/Dockerfile b/dockerfiles/almalinux-8-pg15/Dockerfile index 40c7f67a2..54c690cb8 100644 --- a/dockerfiles/almalinux-8-pg15/Dockerfile +++ b/dockerfiles/almalinux-8-pg15/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ almalinux == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y wge # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 15 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/almalinux-8-pg16/Dockerfile b/dockerfiles/almalinux-8-pg16/Dockerfile new file mode 100644 index 000000000..d4f6a2cc0 --- /dev/null +++ b/dockerfiles/almalinux-8-pg16/Dockerfile @@ -0,0 +1,174 @@ +# vim:set ft=dockerfile: +FROM almalinux:8 +RUN [[ almalinux != centos ]] || [[ 8 != 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 ]] || [[ 8 != 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 ]] || [[ 8 != 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 ]] || [[ 8 != 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 ]] || [[ 8 != 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 ]] || [[ 8 != 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 ]] && [[ 8 == 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 ]] && [[ 8 == 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-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 16 != 16 ]] || sed -i '/\[pgdg16-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 spectool curl \ + && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ + && yum install -y postgresql16-server postgresql16-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 ]] || [[ 8 != 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=16 \ + PATH=/scripts:$PATH +COPY scripts /scripts +VOLUME /packages + +ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/almalinux-9-pg11/Dockerfile b/dockerfiles/almalinux-9-pg11/Dockerfile index 6907b5e34..176fac574 100644 --- a/dockerfiles/almalinux-9-pg11/Dockerfile +++ b/dockerfiles/almalinux-9-pg11/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ almalinux == oraclelinux ]] && [[ 9 == 7 ]]; then yum install -y wge # 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 \ + && ( [[ 11 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/almalinux-9-pg12/Dockerfile b/dockerfiles/almalinux-9-pg12/Dockerfile index 1bce1df2e..90550f5e6 100644 --- a/dockerfiles/almalinux-9-pg12/Dockerfile +++ b/dockerfiles/almalinux-9-pg12/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ almalinux == oraclelinux ]] && [[ 9 == 7 ]]; then yum install -y wge # 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 \ + && ( [[ 12 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/almalinux-9-pg13/Dockerfile b/dockerfiles/almalinux-9-pg13/Dockerfile index 1d401146a..4373e782a 100644 --- a/dockerfiles/almalinux-9-pg13/Dockerfile +++ b/dockerfiles/almalinux-9-pg13/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ almalinux == oraclelinux ]] && [[ 9 == 7 ]]; then yum install -y wge # 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 \ + && ( [[ 13 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/almalinux-9-pg14/Dockerfile b/dockerfiles/almalinux-9-pg14/Dockerfile index 9d5e1a283..2a59d9036 100644 --- a/dockerfiles/almalinux-9-pg14/Dockerfile +++ b/dockerfiles/almalinux-9-pg14/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ almalinux == oraclelinux ]] && [[ 9 == 7 ]]; then yum install -y wge # 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 \ + && ( [[ 14 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/almalinux-9-pg15/Dockerfile b/dockerfiles/almalinux-9-pg15/Dockerfile index ad8816f8b..b7e9b4e63 100644 --- a/dockerfiles/almalinux-9-pg15/Dockerfile +++ b/dockerfiles/almalinux-9-pg15/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ almalinux == oraclelinux ]] && [[ 9 == 7 ]]; then yum install -y wge # 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 \ + && ( [[ 15 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/almalinux-9-pg16/Dockerfile b/dockerfiles/almalinux-9-pg16/Dockerfile new file mode 100644 index 000000000..9549de0e7 --- /dev/null +++ b/dockerfiles/almalinux-9-pg16/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 \ + && ( [[ 16 != 16 ]] || sed -i '/\[pgdg16-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 postgresql16-server postgresql16-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=16 \ + PATH=/scripts:$PATH +COPY scripts /scripts +VOLUME /packages + +ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/centos-7-pg11/Dockerfile b/dockerfiles/centos-7-pg11/Dockerfile index 116072142..1d269f00c 100644 --- a/dockerfiles/centos-7-pg11/Dockerfile +++ b/dockerfiles/centos-7-pg11/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ centos == oraclelinux ]] && [[ 7 == 7 ]]; then yum install -y wget \ # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 11 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "epel-release centos-release-scl-rh" ]] || yum install -y epel-release centos-release-scl-rh) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/centos-7-pg12/Dockerfile b/dockerfiles/centos-7-pg12/Dockerfile index 7ffe8c927..45cfbb81c 100644 --- a/dockerfiles/centos-7-pg12/Dockerfile +++ b/dockerfiles/centos-7-pg12/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ centos == oraclelinux ]] && [[ 7 == 7 ]]; then yum install -y wget \ # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 12 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "epel-release centos-release-scl-rh" ]] || yum install -y epel-release centos-release-scl-rh) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/centos-7-pg13/Dockerfile b/dockerfiles/centos-7-pg13/Dockerfile index 27b66e211..2b727aa89 100644 --- a/dockerfiles/centos-7-pg13/Dockerfile +++ b/dockerfiles/centos-7-pg13/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ centos == oraclelinux ]] && [[ 7 == 7 ]]; then yum install -y wget \ # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 13 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "epel-release centos-release-scl-rh" ]] || yum install -y epel-release centos-release-scl-rh) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/centos-7-pg14/Dockerfile b/dockerfiles/centos-7-pg14/Dockerfile index 0432dd523..f947c2ec0 100644 --- a/dockerfiles/centos-7-pg14/Dockerfile +++ b/dockerfiles/centos-7-pg14/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ centos == oraclelinux ]] && [[ 7 == 7 ]]; then yum install -y wget \ # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 14 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "epel-release centos-release-scl-rh" ]] || yum install -y epel-release centos-release-scl-rh) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/centos-7-pg15/Dockerfile b/dockerfiles/centos-7-pg15/Dockerfile index 0811a0175..81ce2c828 100644 --- a/dockerfiles/centos-7-pg15/Dockerfile +++ b/dockerfiles/centos-7-pg15/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ centos == oraclelinux ]] && [[ 7 == 7 ]]; then yum install -y wget \ # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 15 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "epel-release centos-release-scl-rh" ]] || yum install -y epel-release centos-release-scl-rh) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/centos-7-pg16/Dockerfile b/dockerfiles/centos-7-pg16/Dockerfile new file mode 100644 index 000000000..f7cb47694 --- /dev/null +++ b/dockerfiles/centos-7-pg16/Dockerfile @@ -0,0 +1,174 @@ +# vim:set ft=dockerfile: +FROM centos:7 +RUN [[ centos != centos ]] || [[ 7 != 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 [[ centos != centos ]] || [[ 7 != 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 [[ centos != almalinux ]] || [[ 7 != 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 [[ centos != oraclelinux ]] || [[ 7 != 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 [[ centos != almalinux ]] || [[ 7 != 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 [[ centos != oraclelinux ]] || [[ 7 != 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 [[ centos == oraclelinux ]] && [[ 7 == 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 [[ centos == oraclelinux ]] && [[ 7 == 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-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 16 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ + && [[ -z "epel-release centos-release-scl-rh" ]] || yum install -y epel-release centos-release-scl-rh) \ + && 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-7-clang llvm5.0 spectool curl \ + && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ + && yum install -y postgresql16-server postgresql16-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 [[ centos != centos ]] || [[ 7 != 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=16 \ + PATH=/scripts:$PATH +COPY scripts /scripts +VOLUME /packages + +ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/centos-8-pg11/Dockerfile b/dockerfiles/centos-8-pg11/Dockerfile index f2c1ed04c..d9b36adab 100644 --- a/dockerfiles/centos-8-pg11/Dockerfile +++ b/dockerfiles/centos-8-pg11/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ centos == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y wget \ # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 16 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/centos-8-pg12/Dockerfile b/dockerfiles/centos-8-pg12/Dockerfile index 865a863f5..826cd0641 100644 --- a/dockerfiles/centos-8-pg12/Dockerfile +++ b/dockerfiles/centos-8-pg12/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ centos == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y wget \ # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 16 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/centos-8-pg13/Dockerfile b/dockerfiles/centos-8-pg13/Dockerfile index af7174e3e..2583c2091 100644 --- a/dockerfiles/centos-8-pg13/Dockerfile +++ b/dockerfiles/centos-8-pg13/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ centos == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y wget \ # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 16 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/centos-8-pg14/Dockerfile b/dockerfiles/centos-8-pg14/Dockerfile index 521676176..15eb8cd44 100644 --- a/dockerfiles/centos-8-pg14/Dockerfile +++ b/dockerfiles/centos-8-pg14/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ centos == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y wget \ # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 16 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/centos-8-pg15/Dockerfile b/dockerfiles/centos-8-pg15/Dockerfile index 25c7248af..677d4c99d 100644 --- a/dockerfiles/centos-8-pg15/Dockerfile +++ b/dockerfiles/centos-8-pg15/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ centos == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y wget \ # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 16 != 16 ]] || sed -i '/\[pgdg16-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 \ diff --git a/dockerfiles/centos-8-pg16/Dockerfile b/dockerfiles/centos-8-pg16/Dockerfile new file mode 100644 index 000000000..7106eb5b6 --- /dev/null +++ b/dockerfiles/centos-8-pg16/Dockerfile @@ -0,0 +1,174 @@ +# vim:set ft=dockerfile: +FROM centos:8 +RUN [[ centos != centos ]] || [[ 8 != 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 [[ centos != centos ]] || [[ 8 != 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 [[ centos != almalinux ]] || [[ 8 != 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 [[ centos != oraclelinux ]] || [[ 8 != 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 [[ centos != almalinux ]] || [[ 8 != 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 [[ centos != oraclelinux ]] || [[ 8 != 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 [[ centos == oraclelinux ]] && [[ 8 == 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 [[ centos == oraclelinux ]] && [[ 8 == 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-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 16 != 16 ]] || sed -i '/\[pgdg16-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 spectool curl \ + && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ + && yum install -y postgresql16-server postgresql16-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 [[ centos != centos ]] || [[ 8 != 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=16 \ + 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 4d90a738e..8b3aeb6f1 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 16' > /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-15 \ + postgresql-server-dev-16 \ wget \ zlib1g-dev \ python3-pip \ @@ -131,8 +131,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg15 beta package support. -ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15" +# Added for pg16 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15 16" # 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 93bbd8dd2..a9b7b20e5 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 16' > /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-15 \ + postgresql-server-dev-16 \ wget \ zlib1g-dev \ python3-pip \ @@ -131,8 +131,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg15 beta package support. -ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15" +# Added for pg16 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15 16" # place scripts on path and declare output volume ENV PATH /scripts:$PATH diff --git a/dockerfiles/debian-buster-all/Dockerfile b/dockerfiles/debian-buster-all/Dockerfile index 3ee420e92..0ccc418fd 100644 --- a/dockerfiles/debian-buster-all/Dockerfile +++ b/dockerfiles/debian-buster-all/Dockerfile @@ -44,7 +44,7 @@ RUN ( [ debian != debian ] || [ buster != buster ] ) || ( \ # install build tools and PostgreSQL development files -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main 16' > /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/ buster-pgdg main' > /etc/ libxslt-dev \ lintian \ postgresql-server-dev-all \ - postgresql-server-dev-15 \ + postgresql-server-dev-16 \ wget \ zlib1g-dev \ python3-pip \ @@ -131,8 +131,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg15 beta package support. -ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15" +# Added for pg16 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15 16" # place scripts on path and declare output volume ENV PATH /scripts:$PATH diff --git a/dockerfiles/oraclelinux-6-pg11/Dockerfile b/dockerfiles/oraclelinux-6-pg11/Dockerfile index 99a5c8856..767afd0fe 100644 --- a/dockerfiles/oraclelinux-6-pg11/Dockerfile +++ b/dockerfiles/oraclelinux-6-pg11/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 6 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 11 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "" ]] || yum install -y ) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-6-pg12/Dockerfile b/dockerfiles/oraclelinux-6-pg12/Dockerfile index d2f5584bd..fe1a1c1f3 100644 --- a/dockerfiles/oraclelinux-6-pg12/Dockerfile +++ b/dockerfiles/oraclelinux-6-pg12/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 6 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 12 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "" ]] || yum install -y ) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-6-pg14/Dockerfile b/dockerfiles/oraclelinux-6-pg14/Dockerfile index 06797ab97..c8a325d02 100644 --- a/dockerfiles/oraclelinux-6-pg14/Dockerfile +++ b/dockerfiles/oraclelinux-6-pg14/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 6 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 14 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "" ]] || yum install -y ) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-6-pg15/Dockerfile b/dockerfiles/oraclelinux-6-pg15/Dockerfile index 9a6274f3e..ddf6690d1 100644 --- a/dockerfiles/oraclelinux-6-pg15/Dockerfile +++ b/dockerfiles/oraclelinux-6-pg15/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 6 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 15 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "" ]] || yum install -y ) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-6-pg16/Dockerfile b/dockerfiles/oraclelinux-6-pg16/Dockerfile new file mode 100644 index 000000000..30c01b93e --- /dev/null +++ b/dockerfiles/oraclelinux-6-pg16/Dockerfile @@ -0,0 +1,174 @@ +# vim:set ft=dockerfile: +FROM oraclelinux:6 +RUN [[ oraclelinux != centos ]] || [[ 6 != 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 [[ oraclelinux != centos ]] || [[ 6 != 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 [[ oraclelinux != almalinux ]] || [[ 6 != 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 [[ oraclelinux != oraclelinux ]] || [[ 6 != 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 [[ oraclelinux != almalinux ]] || [[ 6 != 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 [[ oraclelinux != oraclelinux ]] || [[ 6 != 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 [[ oraclelinux == oraclelinux ]] && [[ 6 == 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 [[ oraclelinux == oraclelinux ]] && [[ 6 == 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-6-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 16 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ + && [[ -z "" ]] || yum install -y ) \ + && 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-7-clang llvm5.0 spectool curl \ + && ( [[ 6 != 8 ]] || dnf -qy module disable postgresql ) \ + && yum install -y postgresql16-server postgresql16-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 [[ oraclelinux != centos ]] || [[ 6 != 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=16 \ + PATH=/scripts:$PATH +COPY scripts /scripts +VOLUME /packages + +ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-7-pg11/Dockerfile b/dockerfiles/oraclelinux-7-pg11/Dockerfile index 4438c4e05..dc15018a9 100644 --- a/dockerfiles/oraclelinux-7-pg11/Dockerfile +++ b/dockerfiles/oraclelinux-7-pg11/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 7 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 11 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "" ]] || yum install -y ) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-7-pg12/Dockerfile b/dockerfiles/oraclelinux-7-pg12/Dockerfile index 9c96749a5..38c245b7a 100644 --- a/dockerfiles/oraclelinux-7-pg12/Dockerfile +++ b/dockerfiles/oraclelinux-7-pg12/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 7 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 12 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "" ]] || yum install -y ) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-7-pg13/Dockerfile b/dockerfiles/oraclelinux-7-pg13/Dockerfile index ff9a9b2fd..8b166b9a8 100644 --- a/dockerfiles/oraclelinux-7-pg13/Dockerfile +++ b/dockerfiles/oraclelinux-7-pg13/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 7 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 13 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "" ]] || yum install -y ) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-7-pg14/Dockerfile b/dockerfiles/oraclelinux-7-pg14/Dockerfile index 28ff28e1e..8e81ad282 100644 --- a/dockerfiles/oraclelinux-7-pg14/Dockerfile +++ b/dockerfiles/oraclelinux-7-pg14/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 7 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 14 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "" ]] || yum install -y ) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-7-pg15/Dockerfile b/dockerfiles/oraclelinux-7-pg15/Dockerfile index 02bd0812a..f45572cfe 100644 --- a/dockerfiles/oraclelinux-7-pg15/Dockerfile +++ b/dockerfiles/oraclelinux-7-pg15/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 7 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 15 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "" ]] || yum install -y ) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-7-pg16/Dockerfile b/dockerfiles/oraclelinux-7-pg16/Dockerfile new file mode 100644 index 000000000..19bb6ba9b --- /dev/null +++ b/dockerfiles/oraclelinux-7-pg16/Dockerfile @@ -0,0 +1,174 @@ +# vim:set ft=dockerfile: +FROM oraclelinux:7 +RUN [[ oraclelinux != centos ]] || [[ 7 != 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 [[ oraclelinux != centos ]] || [[ 7 != 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 [[ oraclelinux != almalinux ]] || [[ 7 != 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 [[ oraclelinux != oraclelinux ]] || [[ 7 != 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 [[ oraclelinux != almalinux ]] || [[ 7 != 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 [[ oraclelinux != oraclelinux ]] || [[ 7 != 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 [[ oraclelinux == oraclelinux ]] && [[ 7 == 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 [[ oraclelinux == oraclelinux ]] && [[ 7 == 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-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 16 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ + && [[ -z "" ]] || yum install -y ) \ + && 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-7-clang llvm5.0 spectool curl \ + && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ + && yum install -y postgresql16-server postgresql16-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 [[ oraclelinux != centos ]] || [[ 7 != 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=16 \ + PATH=/scripts:$PATH +COPY scripts /scripts +VOLUME /packages + +ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-8-pg11/Dockerfile b/dockerfiles/oraclelinux-8-pg11/Dockerfile index 2f285b129..8296f1f40 100644 --- a/dockerfiles/oraclelinux-8-pg11/Dockerfile +++ b/dockerfiles/oraclelinux-8-pg11/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 11 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "oracle-epel-release-el8" ]] || yum install -y oracle-epel-release-el8) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-8-pg12/Dockerfile b/dockerfiles/oraclelinux-8-pg12/Dockerfile index 00b6b63d9..702d42fda 100644 --- a/dockerfiles/oraclelinux-8-pg12/Dockerfile +++ b/dockerfiles/oraclelinux-8-pg12/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 12 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "oracle-epel-release-el8" ]] || yum install -y oracle-epel-release-el8) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-8-pg13/Dockerfile b/dockerfiles/oraclelinux-8-pg13/Dockerfile index c93e21c8e..da12a1a5e 100644 --- a/dockerfiles/oraclelinux-8-pg13/Dockerfile +++ b/dockerfiles/oraclelinux-8-pg13/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 13 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "oracle-epel-release-el8" ]] || yum install -y oracle-epel-release-el8) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-8-pg14/Dockerfile b/dockerfiles/oraclelinux-8-pg14/Dockerfile index 4a4636700..680cc5a34 100644 --- a/dockerfiles/oraclelinux-8-pg14/Dockerfile +++ b/dockerfiles/oraclelinux-8-pg14/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 14 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "oracle-epel-release-el8" ]] || yum install -y oracle-epel-release-el8) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-8-pg15/Dockerfile b/dockerfiles/oraclelinux-8-pg15/Dockerfile index 0e5b273e1..aa875e9d6 100644 --- a/dockerfiles/oraclelinux-8-pg15/Dockerfile +++ b/dockerfiles/oraclelinux-8-pg15/Dockerfile @@ -75,6 +75,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 8 == 7 ]]; then yum install -y w # install build tools and PostgreSQL development files RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 15 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ && [[ -z "oracle-epel-release-el8" ]] || yum install -y oracle-epel-release-el8) \ && yum groupinstall -y 'Development Tools' \ && yum install -y \ diff --git a/dockerfiles/oraclelinux-8-pg16/Dockerfile b/dockerfiles/oraclelinux-8-pg16/Dockerfile new file mode 100644 index 000000000..2723c68b8 --- /dev/null +++ b/dockerfiles/oraclelinux-8-pg16/Dockerfile @@ -0,0 +1,174 @@ +# vim:set ft=dockerfile: +FROM oraclelinux:8 +RUN [[ oraclelinux != centos ]] || [[ 8 != 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 [[ oraclelinux != centos ]] || [[ 8 != 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 [[ oraclelinux != almalinux ]] || [[ 8 != 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 [[ oraclelinux != oraclelinux ]] || [[ 8 != 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 [[ oraclelinux != almalinux ]] || [[ 8 != 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 [[ oraclelinux != oraclelinux ]] || [[ 8 != 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 [[ oraclelinux == oraclelinux ]] && [[ 8 == 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 [[ oraclelinux == oraclelinux ]] && [[ 8 == 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-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && ( [[ 16 != 16 ]] || sed -i '/\[pgdg16-updates-testing\]/{n;n;n;s/.*/enabled=1/}' /etc/yum.repos.d/pgdg-redhat-all.repo ) \ + && [[ -z "oracle-epel-release-el8" ]] || yum install -y oracle-epel-release-el8) \ + && 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 spectool curl \ + && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ + && yum install -y postgresql16-server postgresql16-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 [[ oraclelinux != centos ]] || [[ 8 != 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=16 \ + PATH=/scripts:$PATH +COPY scripts /scripts +VOLUME /packages + +ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/ubuntu-bionic-all/Dockerfile b/dockerfiles/ubuntu-bionic-all/Dockerfile index 3d854dba3..3bd8bca5e 100644 --- a/dockerfiles/ubuntu-bionic-all/Dockerfile +++ b/dockerfiles/ubuntu-bionic-all/Dockerfile @@ -44,7 +44,7 @@ RUN ( [ ubuntu != debian ] || [ bionic != buster ] ) || ( \ # install build tools and PostgreSQL development files -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main 16' > /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/ bionic-pgdg main' > /etc/ libxslt-dev \ lintian \ postgresql-server-dev-all \ - postgresql-server-dev-15 \ + postgresql-server-dev-16 \ wget \ zlib1g-dev \ python3-pip \ @@ -131,8 +131,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg15 beta package support. -ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15" +# Added for pg16 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15 16" # place scripts on path and declare output volume ENV PATH /scripts:$PATH diff --git a/dockerfiles/ubuntu-focal-all/Dockerfile b/dockerfiles/ubuntu-focal-all/Dockerfile index 9d4f6a29a..5d5a51902 100644 --- a/dockerfiles/ubuntu-focal-all/Dockerfile +++ b/dockerfiles/ubuntu-focal-all/Dockerfile @@ -44,7 +44,7 @@ RUN ( [ ubuntu != debian ] || [ focal != buster ] ) || ( \ # install build tools and PostgreSQL development files -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main 16' > /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/ focal-pgdg main' > /etc/a libxslt-dev \ lintian \ postgresql-server-dev-all \ - postgresql-server-dev-15 \ + postgresql-server-dev-16 \ wget \ zlib1g-dev \ python3-pip \ @@ -131,8 +131,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg15 beta package support. -ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15" +# Added for pg16 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15 16" # 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 4d04a8169..bb82dc388 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 16' > /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-15 \ + postgresql-server-dev-16 \ wget \ zlib1g-dev \ python3-pip \ @@ -131,8 +131,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg15 beta package support. -ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15" +# Added for pg16 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15 16" # place scripts on path and declare output volume ENV PATH /scripts:$PATH diff --git a/dockerfiles/ubuntu-kinetic-all/Dockerfile b/dockerfiles/ubuntu-kinetic-all/Dockerfile index 868213c76..6a1b5fa64 100644 --- a/dockerfiles/ubuntu-kinetic-all/Dockerfile +++ b/dockerfiles/ubuntu-kinetic-all/Dockerfile @@ -44,7 +44,7 @@ RUN ( [ ubuntu != debian ] || [ kinetic != buster ] ) || ( \ # install build tools and PostgreSQL development files -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ kinetic-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ kinetic-pgdg main 16' > /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/ kinetic-pgdg main' > /etc libxslt-dev \ lintian \ postgresql-server-dev-all \ - postgresql-server-dev-15 \ + postgresql-server-dev-16 \ wget \ zlib1g-dev \ python3-pip \ @@ -131,8 +131,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg15 beta package support. -ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15" +# Added for pg16 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15 16" # place scripts on path and declare output volume ENV PATH /scripts:$PATH diff --git a/os-list.csv b/os-list.csv index ed51e5866..2957824fc 100644 --- a/os-list.csv +++ b/os-list.csv @@ -1,6 +1,5 @@ almalinux,8 almalinux,9 -centos,8 centos,7 debian,buster debian,bullseye diff --git a/templates/Dockerfile-deb.tmpl b/templates/Dockerfile-deb.tmpl index 03f756778..663de0b51 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 16' > /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-15 \ + postgresql-server-dev-16 \ wget \ zlib1g-dev \ python3-pip \ @@ -131,8 +131,8 @@ RUN set -ex \ && echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# Added for pg15 beta package support. -ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15" +# Added for pg16 beta package support. +ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15 16" # 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 2d99d78ce..ed5a61794 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%% != 16 ]] || sed -i '/\[pgdg16-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 5ca0e7802..8f04818be 100755 --- a/update_dockerfiles +++ b/update_dockerfiles @@ -4,7 +4,7 @@ set -euo pipefail IFS=$'\n\t' -pgversions='11 12 13 14 15' +pgversions='11 12 13 14 15 16' topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" dockerfiles_dir="${topdir}/dockerfiles" templates_dir="${topdir}"/templates diff --git a/update_image b/update_image index a0d757ce6..ae3c37f9e 100755 --- a/update_image +++ b/update_image @@ -9,7 +9,7 @@ set -euo pipefail IFS=$'\n\t' -pgversions='11 12 13 14 15' +pgversions='11 12 13 14 15 16' topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" dockerfiles_dir="${topdir}/dockerfiles"