diff --git a/.github/workflows/build-citus-community-nightlies.yml b/.github/workflows/build-citus-community-nightlies.yml index d7b55fb7..fca21f5b 100644 --- a/.github/workflows/build-citus-community-nightlies.yml +++ b/.github/workflows/build-citus-community-nightlies.yml @@ -10,9 +10,6 @@ env: DOCKERHUB_USER_NAME: ${{ secrets.DOCKERHUB_USER_NAME }} DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} on: - push: - branches: - - "**" schedule: - cron: "30 1 * * *" workflow_dispatch: diff --git a/.github/workflows/build-package-test.yml b/.github/workflows/build-package-test.yml index 115cd985..b42d84e9 100644 --- a/.github/workflows/build-package-test.yml +++ b/.github/workflows/build-package-test.yml @@ -12,8 +12,8 @@ env: CURRENT_BRANCH: ${GITHUB_REF##*/} TEST: true on: - push: - branches: "**" + pull_request: + types: [opened, reopened,synchronize] workflow_dispatch: concurrency: @@ -40,61 +40,67 @@ jobs: fail-fast: false matrix: TARGET_PLATFORM: - - centos,7 - - oraclelinux,8 - - oraclelinux,7 - - almalinux,8 - - almalinux,9 + - centos-7 + - oraclelinux-8 + - oraclelinux-7 + - almalinux-8 + - almalinux-9 POSTGRES_VERSION: - - 11 - - 12 - - 13 - - 14 - - 15 - - 16 + - pg11 + - pg12 + - pg13 + - pg14 + - pg15 + - pg16 + exclude: + - TARGET_PLATFORM: centos-7 + POSTGRES_VERSION: pg16 + - TARGET_PLATFORM: oraclelinux-7 + POSTGRES_VERSION: pg16 include: - - TARGET_PLATFORM: debian,buster - - TARGET_PLATFORM: debian,bullseye - - TARGET_PLATFORM: debian,bookworm - # 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 + - TARGET_PLATFORM: debian-buster + POSTGRES_VERSION: all + - TARGET_PLATFORM: debian-bullseye + POSTGRES_VERSION: all + - TARGET_PLATFORM: debian-bookworm + POSTGRES_VERSION: all + - TARGET_PLATFORM: ubuntu-bionic + POSTGRES_VERSION: all + - TARGET_PLATFORM: ubuntu-focal + POSTGRES_VERSION: all + - TARGET_PLATFORM: ubuntu-jammy + POSTGRES_VERSION: all + - TARGET_PLATFORM: ubuntu-kinetic + POSTGRES_VERSION: all - TARGET_PLATFORM: pgxn + POSTGRES_VERSION: all steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - name: Install package dependencies - run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev python3-testresources + - name: 'Login to GitHub Container Registry' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} - - name: Install wheel for el/8 - if: matrix.TARGET_PLATFORM == 'centos,8' - run: python -m pip install wheel - - - name: Build image for the target platform - run: | - git checkout -- dockerfiles - ./update_image - env: - TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }} - POSTGRES_VERSION: ${{ matrix.POSTGRES_VERSION }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + file: dockerfiles/${{ matrix.TARGET_PLATFORM }}-${{ matrix.POSTGRES_VERSION }}/Dockerfile + pull: true + push: true + tags: ghcr.io/citusdata/packaging-test:${{ matrix.TARGET_PLATFORM }}-${{ matrix.POSTGRES_VERSION }} + # cache-from: type=gha + # cache-to: type=gha,mode=max - - name: Clone tools repo for test - run: git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools + # - name: Clone tools repo for test + # run: git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools - - name: Execute packaging tests - run: | - python -m pip install -r tools/packaging_automation/requirements.txt - python -m pytest -q tools/packaging_automation/tests/test_citus_package.py -k 'test_build_packages' - env: - PACKAGING_IMAGE_PLATFORM: "${{matrix.TARGET_PLATFORM}}" - - - name: Push images - run: | - export CURRENT_BRANCH=${GITHUB_REF##*/} - ./ci/push_images - env: - TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }} - POSTGRES_VERSION: ${{ matrix.POSTGRES_VERSION }} + # - name: Execute packaging tests + # run: | + # python -m pip install -r tools/packaging_automation/requirements.txt + # python -m pytest -q tools/packaging_automation/tests/test_citus_package.py -k 'test_build_packages' + # env: + # PACKAGING_IMAGE_PLATFORM: "${{matrix.TARGET_PLATFORM}}" diff --git a/.github/workflows/build-package.yml b/.github/workflows/build-package.yml index 4fc9f704..209fbf3d 100644 --- a/.github/workflows/build-package.yml +++ b/.github/workflows/build-package.yml @@ -13,7 +13,7 @@ env: TEST: false on: push: - branches: "**" + branches: "develop" workflow_dispatch: concurrency: diff --git a/.github/workflows/image-health-check.yml b/.github/workflows/image-health-check.yml index a3eaa753..df6c4c10 100644 --- a/.github/workflows/image-health-check.yml +++ b/.github/workflows/image-health-check.yml @@ -12,8 +12,6 @@ env: CURRENT_BRANCH: "${GITHUB_REF##*/}" TEST: false on: - push: - branches: "**" schedule: - cron: "30 2 * * *" workflow_dispatch: @@ -82,13 +80,9 @@ jobs: env: TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }} POSTGRES_VERSION: ${{ matrix.POSTGRES_VERSION }} - - - name: Clone tools repo for test - run: git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools - + # TODO we should probably fold this into the image building thing, to verify if images are built correctly before pushing - name: Execute packaging tests run: | - python -m pip install -r tools/packaging_automation/requirements.txt python -m pytest -q tools/packaging_automation/tests/test_citus_package.py -k 'test_build_packages' env: PACKAGING_IMAGE_PLATFORM: "${{matrix.TARGET_PLATFORM}}" diff --git a/dockerfiles/almalinux-8-pg11/Dockerfile b/dockerfiles/almalinux-8-pg11/Dockerfile index 980544eb..ae9d5d5b 100644 --- a/dockerfiles/almalinux-8-pg11/Dockerfile +++ b/dockerfiles/almalinux-8-pg11/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache spectool curl \ && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql11-server postgresql11-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=11 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 8 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/almalinux-8-pg12/Dockerfile b/dockerfiles/almalinux-8-pg12/Dockerfile index 92ca787f..93e48a35 100644 --- a/dockerfiles/almalinux-8-pg12/Dockerfile +++ b/dockerfiles/almalinux-8-pg12/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache spectool curl \ && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql12-server postgresql12-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=12 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 8 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/almalinux-8-pg13/Dockerfile b/dockerfiles/almalinux-8-pg13/Dockerfile index 5e3a1190..2491263f 100644 --- a/dockerfiles/almalinux-8-pg13/Dockerfile +++ b/dockerfiles/almalinux-8-pg13/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache spectool curl \ && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql13-server postgresql13-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=13 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 8 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/almalinux-8-pg14/Dockerfile b/dockerfiles/almalinux-8-pg14/Dockerfile index f3b977a8..c89d0695 100644 --- a/dockerfiles/almalinux-8-pg14/Dockerfile +++ b/dockerfiles/almalinux-8-pg14/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache spectool curl \ && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql14-server postgresql14-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=14 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 8 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/almalinux-8-pg15/Dockerfile b/dockerfiles/almalinux-8-pg15/Dockerfile index 54c690cb..673bc354 100644 --- a/dockerfiles/almalinux-8-pg15/Dockerfile +++ b/dockerfiles/almalinux-8-pg15/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache spectool curl \ && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql15-server postgresql15-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=15 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 8 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/almalinux-8-pg16/Dockerfile b/dockerfiles/almalinux-8-pg16/Dockerfile index d4f6a2cc..8f20c66a 100644 --- a/dockerfiles/almalinux-8-pg16/Dockerfile +++ b/dockerfiles/almalinux-8-pg16/Dockerfile @@ -75,7 +75,6 @@ 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 \ - && ( [[ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache spectool curl \ && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql16-server postgresql16-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=16 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 8 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/almalinux-9-pg11/Dockerfile b/dockerfiles/almalinux-9-pg11/Dockerfile index 176fac57..a0da9b23 100644 --- a/dockerfiles/almalinux-9-pg11/Dockerfile +++ b/dockerfiles/almalinux-9-pg11/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache rpmdevtools krb5-devel \ && ( [[ 9 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql11-server postgresql11-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=11 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 9 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/almalinux-9-pg12/Dockerfile b/dockerfiles/almalinux-9-pg12/Dockerfile index 90550f5e..310fb176 100644 --- a/dockerfiles/almalinux-9-pg12/Dockerfile +++ b/dockerfiles/almalinux-9-pg12/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache rpmdevtools krb5-devel \ && ( [[ 9 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql12-server postgresql12-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=12 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 9 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/almalinux-9-pg13/Dockerfile b/dockerfiles/almalinux-9-pg13/Dockerfile index 4373e782..a1445dbd 100644 --- a/dockerfiles/almalinux-9-pg13/Dockerfile +++ b/dockerfiles/almalinux-9-pg13/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache rpmdevtools krb5-devel \ && ( [[ 9 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql13-server postgresql13-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=13 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 9 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/almalinux-9-pg14/Dockerfile b/dockerfiles/almalinux-9-pg14/Dockerfile index 2a59d903..96ad0105 100644 --- a/dockerfiles/almalinux-9-pg14/Dockerfile +++ b/dockerfiles/almalinux-9-pg14/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache rpmdevtools krb5-devel \ && ( [[ 9 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql14-server postgresql14-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=14 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 9 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/almalinux-9-pg15/Dockerfile b/dockerfiles/almalinux-9-pg15/Dockerfile index b7e9b4e6..a102126b 100644 --- a/dockerfiles/almalinux-9-pg15/Dockerfile +++ b/dockerfiles/almalinux-9-pg15/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache rpmdevtools krb5-devel \ && ( [[ 9 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql15-server postgresql15-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=15 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 9 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/almalinux-9-pg16/Dockerfile b/dockerfiles/almalinux-9-pg16/Dockerfile index 9549de0e..6a03cd5a 100644 --- a/dockerfiles/almalinux-9-pg16/Dockerfile +++ b/dockerfiles/almalinux-9-pg16/Dockerfile @@ -75,7 +75,6 @@ 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 \ - && ( [[ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache rpmdevtools krb5-devel \ && ( [[ 9 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql16-server postgresql16-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=16 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 9 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/centos-7-pg11/Dockerfile b/dockerfiles/centos-7-pg11/Dockerfile index 1d269f00..b491b412 100644 --- a/dockerfiles/centos-7-pg11/Dockerfile +++ b/dockerfiles/centos-7-pg11/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql11-server postgresql11-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=11 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 7 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/centos-7-pg12/Dockerfile b/dockerfiles/centos-7-pg12/Dockerfile index 45cfbb81..0f7e4b40 100644 --- a/dockerfiles/centos-7-pg12/Dockerfile +++ b/dockerfiles/centos-7-pg12/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql12-server postgresql12-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=12 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 7 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/centos-7-pg13/Dockerfile b/dockerfiles/centos-7-pg13/Dockerfile index 2b727aa8..828ba7ac 100644 --- a/dockerfiles/centos-7-pg13/Dockerfile +++ b/dockerfiles/centos-7-pg13/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql13-server postgresql13-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=13 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 7 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/centos-7-pg14/Dockerfile b/dockerfiles/centos-7-pg14/Dockerfile index f947c2ec..74eca28a 100644 --- a/dockerfiles/centos-7-pg14/Dockerfile +++ b/dockerfiles/centos-7-pg14/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql14-server postgresql14-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=14 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 7 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/centos-7-pg15/Dockerfile b/dockerfiles/centos-7-pg15/Dockerfile index 81ce2c82..bf8d3d36 100644 --- a/dockerfiles/centos-7-pg15/Dockerfile +++ b/dockerfiles/centos-7-pg15/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql15-server postgresql15-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=15 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 7 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/centos-7-pg16/Dockerfile b/dockerfiles/centos-7-pg16/Dockerfile index f7cb4769..53f7f075 100644 --- a/dockerfiles/centos-7-pg16/Dockerfile +++ b/dockerfiles/centos-7-pg16/Dockerfile @@ -75,7 +75,6 @@ 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 \ - && ( [[ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql16-server postgresql16-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=16 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 7 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/debian-bookworm-all/Dockerfile b/dockerfiles/debian-bookworm-all/Dockerfile index 8b3aeb6f..9089bcc9 100644 --- a/dockerfiles/debian-bookworm-all/Dockerfile +++ b/dockerfiles/debian-bookworm-all/Dockerfile @@ -73,6 +73,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main 16' > postgresql-server-dev-16 \ wget \ zlib1g-dev \ + python3-dev \ python3-pip \ python3-sphinx \ python3-setuptools \ @@ -112,8 +113,8 @@ RUN patch `which pg_buildext` < /make_pg_buildext_parallel.patch RUN wget https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2.tar.gz && \ tar -zxvf cmake-3.22.2.tar.gz && \ cd cmake-3.22.2 && ./bootstrap && \ - make && \ - make install && \ + MAKEFLAGS="-j $(nproc)" make && \ + MAKEFLAGS="-j $(nproc)" make install && \ rm -f cmake-3.22.2.tar.gz && \ rm -rf cmake-3.22.2 @@ -139,4 +140,9 @@ ENV PATH /scripts:$PATH COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" + ENTRYPOINT ["/scripts/fetch_and_build_deb"] diff --git a/dockerfiles/debian-bullseye-all/Dockerfile b/dockerfiles/debian-bullseye-all/Dockerfile index a9b7b20e..a84e48a8 100644 --- a/dockerfiles/debian-bullseye-all/Dockerfile +++ b/dockerfiles/debian-bullseye-all/Dockerfile @@ -73,6 +73,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main 16' > postgresql-server-dev-16 \ wget \ zlib1g-dev \ + python3-dev \ python3-pip \ python3-sphinx \ python3-setuptools \ @@ -112,8 +113,8 @@ RUN patch `which pg_buildext` < /make_pg_buildext_parallel.patch RUN wget https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2.tar.gz && \ tar -zxvf cmake-3.22.2.tar.gz && \ cd cmake-3.22.2 && ./bootstrap && \ - make && \ - make install && \ + MAKEFLAGS="-j $(nproc)" make && \ + MAKEFLAGS="-j $(nproc)" make install && \ rm -f cmake-3.22.2.tar.gz && \ rm -rf cmake-3.22.2 @@ -139,4 +140,9 @@ ENV PATH /scripts:$PATH COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" + ENTRYPOINT ["/scripts/fetch_and_build_deb"] diff --git a/dockerfiles/debian-buster-all/Dockerfile b/dockerfiles/debian-buster-all/Dockerfile index 0ccc418f..fd5e30de 100644 --- a/dockerfiles/debian-buster-all/Dockerfile +++ b/dockerfiles/debian-buster-all/Dockerfile @@ -73,6 +73,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main 16' > /e postgresql-server-dev-16 \ wget \ zlib1g-dev \ + python3-dev \ python3-pip \ python3-sphinx \ python3-setuptools \ @@ -112,8 +113,8 @@ RUN patch `which pg_buildext` < /make_pg_buildext_parallel.patch RUN wget https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2.tar.gz && \ tar -zxvf cmake-3.22.2.tar.gz && \ cd cmake-3.22.2 && ./bootstrap && \ - make && \ - make install && \ + MAKEFLAGS="-j $(nproc)" make && \ + MAKEFLAGS="-j $(nproc)" make install && \ rm -f cmake-3.22.2.tar.gz && \ rm -rf cmake-3.22.2 @@ -139,4 +140,9 @@ ENV PATH /scripts:$PATH COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" + ENTRYPOINT ["/scripts/fetch_and_build_deb"] diff --git a/dockerfiles/oraclelinux-6-pg11/Dockerfile b/dockerfiles/oraclelinux-6-pg11/Dockerfile index 767afd0f..44b15b80 100644 --- a/dockerfiles/oraclelinux-6-pg11/Dockerfile +++ b/dockerfiles/oraclelinux-6-pg11/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 6 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql11-server postgresql11-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=11 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 6 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-6-pg12/Dockerfile b/dockerfiles/oraclelinux-6-pg12/Dockerfile index fe1a1c1f..b955f2f6 100644 --- a/dockerfiles/oraclelinux-6-pg12/Dockerfile +++ b/dockerfiles/oraclelinux-6-pg12/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 6 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql12-server postgresql12-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=12 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 6 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-6-pg14/Dockerfile b/dockerfiles/oraclelinux-6-pg14/Dockerfile index c8a325d0..f3958978 100644 --- a/dockerfiles/oraclelinux-6-pg14/Dockerfile +++ b/dockerfiles/oraclelinux-6-pg14/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 6 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql14-server postgresql14-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=14 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 6 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-6-pg15/Dockerfile b/dockerfiles/oraclelinux-6-pg15/Dockerfile index ddf6690d..d8405743 100644 --- a/dockerfiles/oraclelinux-6-pg15/Dockerfile +++ b/dockerfiles/oraclelinux-6-pg15/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 6 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql15-server postgresql15-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=15 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 6 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-6-pg16/Dockerfile b/dockerfiles/oraclelinux-6-pg16/Dockerfile index 30c01b93..f05b2221 100644 --- a/dockerfiles/oraclelinux-6-pg16/Dockerfile +++ b/dockerfiles/oraclelinux-6-pg16/Dockerfile @@ -75,7 +75,6 @@ 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 \ - && ( [[ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 6 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql16-server postgresql16-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=16 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 6 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-7-pg11/Dockerfile b/dockerfiles/oraclelinux-7-pg11/Dockerfile index dc15018a..de15ad66 100644 --- a/dockerfiles/oraclelinux-7-pg11/Dockerfile +++ b/dockerfiles/oraclelinux-7-pg11/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql11-server postgresql11-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=11 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 7 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-7-pg12/Dockerfile b/dockerfiles/oraclelinux-7-pg12/Dockerfile index 38c245b7..c999fc6d 100644 --- a/dockerfiles/oraclelinux-7-pg12/Dockerfile +++ b/dockerfiles/oraclelinux-7-pg12/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql12-server postgresql12-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=12 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 7 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-7-pg13/Dockerfile b/dockerfiles/oraclelinux-7-pg13/Dockerfile index 8b166b9a..e03124d3 100644 --- a/dockerfiles/oraclelinux-7-pg13/Dockerfile +++ b/dockerfiles/oraclelinux-7-pg13/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql13-server postgresql13-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=13 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 7 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-7-pg14/Dockerfile b/dockerfiles/oraclelinux-7-pg14/Dockerfile index 8e81ad28..dab3e975 100644 --- a/dockerfiles/oraclelinux-7-pg14/Dockerfile +++ b/dockerfiles/oraclelinux-7-pg14/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql14-server postgresql14-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=14 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 7 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-7-pg15/Dockerfile b/dockerfiles/oraclelinux-7-pg15/Dockerfile index f45572cf..2524a92e 100644 --- a/dockerfiles/oraclelinux-7-pg15/Dockerfile +++ b/dockerfiles/oraclelinux-7-pg15/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql15-server postgresql15-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=15 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 7 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-7-pg16/Dockerfile b/dockerfiles/oraclelinux-7-pg16/Dockerfile index 19bb6ba9..6396da4c 100644 --- a/dockerfiles/oraclelinux-7-pg16/Dockerfile +++ b/dockerfiles/oraclelinux-7-pg16/Dockerfile @@ -75,7 +75,6 @@ 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 \ - && ( [[ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset-7-clang llvm5.0 spectool curl \ && ( [[ 7 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql16-server postgresql16-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=16 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 7 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-8-pg11/Dockerfile b/dockerfiles/oraclelinux-8-pg11/Dockerfile index 8296f1f4..79741626 100644 --- a/dockerfiles/oraclelinux-8-pg11/Dockerfile +++ b/dockerfiles/oraclelinux-8-pg11/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache spectool curl \ && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql11-server postgresql11-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=11 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 8 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-8-pg12/Dockerfile b/dockerfiles/oraclelinux-8-pg12/Dockerfile index 702d42fd..ac92b7b7 100644 --- a/dockerfiles/oraclelinux-8-pg12/Dockerfile +++ b/dockerfiles/oraclelinux-8-pg12/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache spectool curl \ && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql12-server postgresql12-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=12 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 8 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-8-pg13/Dockerfile b/dockerfiles/oraclelinux-8-pg13/Dockerfile index da12a1a5..69d51e64 100644 --- a/dockerfiles/oraclelinux-8-pg13/Dockerfile +++ b/dockerfiles/oraclelinux-8-pg13/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache spectool curl \ && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql13-server postgresql13-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=13 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 8 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-8-pg14/Dockerfile b/dockerfiles/oraclelinux-8-pg14/Dockerfile index 680cc5a3..6be4ac99 100644 --- a/dockerfiles/oraclelinux-8-pg14/Dockerfile +++ b/dockerfiles/oraclelinux-8-pg14/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache spectool curl \ && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql14-server postgresql14-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=14 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 8 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-8-pg15/Dockerfile b/dockerfiles/oraclelinux-8-pg15/Dockerfile index aa875e9d..d8212e87 100644 --- a/dockerfiles/oraclelinux-8-pg15/Dockerfile +++ b/dockerfiles/oraclelinux-8-pg15/Dockerfile @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache spectool curl \ && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql15-server postgresql15-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=15 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 8 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-8-pg16/Dockerfile b/dockerfiles/oraclelinux-8-pg16/Dockerfile index 2723c68b..69515a34 100644 --- a/dockerfiles/oraclelinux-8-pg16/Dockerfile +++ b/dockerfiles/oraclelinux-8-pg16/Dockerfile @@ -75,7 +75,6 @@ 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 \ - && ( [[ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8 tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ llvm-toolset ccache spectool curl \ && ( [[ 8 != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql16-server postgresql16-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=16 \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ 8 != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/ubuntu-bionic-all/Dockerfile b/dockerfiles/ubuntu-bionic-all/Dockerfile index 3bd8bca5..e01d72fb 100644 --- a/dockerfiles/ubuntu-bionic-all/Dockerfile +++ b/dockerfiles/ubuntu-bionic-all/Dockerfile @@ -73,6 +73,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main 16' > /e postgresql-server-dev-16 \ wget \ zlib1g-dev \ + python3-dev \ python3-pip \ python3-sphinx \ python3-setuptools \ @@ -112,8 +113,8 @@ RUN patch `which pg_buildext` < /make_pg_buildext_parallel.patch RUN wget https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2.tar.gz && \ tar -zxvf cmake-3.22.2.tar.gz && \ cd cmake-3.22.2 && ./bootstrap && \ - make && \ - make install && \ + MAKEFLAGS="-j $(nproc)" make && \ + MAKEFLAGS="-j $(nproc)" make install && \ rm -f cmake-3.22.2.tar.gz && \ rm -rf cmake-3.22.2 @@ -139,4 +140,9 @@ ENV PATH /scripts:$PATH COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" + ENTRYPOINT ["/scripts/fetch_and_build_deb"] diff --git a/dockerfiles/ubuntu-focal-all/Dockerfile b/dockerfiles/ubuntu-focal-all/Dockerfile index 5d5a5190..12e03a97 100644 --- a/dockerfiles/ubuntu-focal-all/Dockerfile +++ b/dockerfiles/ubuntu-focal-all/Dockerfile @@ -73,6 +73,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main 16' > /et postgresql-server-dev-16 \ wget \ zlib1g-dev \ + python3-dev \ python3-pip \ python3-sphinx \ python3-setuptools \ @@ -112,8 +113,8 @@ RUN patch `which pg_buildext` < /make_pg_buildext_parallel.patch RUN wget https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2.tar.gz && \ tar -zxvf cmake-3.22.2.tar.gz && \ cd cmake-3.22.2 && ./bootstrap && \ - make && \ - make install && \ + MAKEFLAGS="-j $(nproc)" make && \ + MAKEFLAGS="-j $(nproc)" make install && \ rm -f cmake-3.22.2.tar.gz && \ rm -rf cmake-3.22.2 @@ -139,4 +140,9 @@ ENV PATH /scripts:$PATH COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" + ENTRYPOINT ["/scripts/fetch_and_build_deb"] diff --git a/dockerfiles/ubuntu-jammy-all/Dockerfile b/dockerfiles/ubuntu-jammy-all/Dockerfile index bb82dc38..62744dd1 100644 --- a/dockerfiles/ubuntu-jammy-all/Dockerfile +++ b/dockerfiles/ubuntu-jammy-all/Dockerfile @@ -73,6 +73,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jammy-pgdg main 16' > /et postgresql-server-dev-16 \ wget \ zlib1g-dev \ + python3-dev \ python3-pip \ python3-sphinx \ python3-setuptools \ @@ -112,8 +113,8 @@ RUN patch `which pg_buildext` < /make_pg_buildext_parallel.patch RUN wget https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2.tar.gz && \ tar -zxvf cmake-3.22.2.tar.gz && \ cd cmake-3.22.2 && ./bootstrap && \ - make && \ - make install && \ + MAKEFLAGS="-j $(nproc)" make && \ + MAKEFLAGS="-j $(nproc)" make install && \ rm -f cmake-3.22.2.tar.gz && \ rm -rf cmake-3.22.2 @@ -139,4 +140,9 @@ ENV PATH /scripts:$PATH COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" + ENTRYPOINT ["/scripts/fetch_and_build_deb"] diff --git a/dockerfiles/ubuntu-kinetic-all/Dockerfile b/dockerfiles/ubuntu-kinetic-all/Dockerfile index 6a1b5fa6..d6ce495e 100644 --- a/dockerfiles/ubuntu-kinetic-all/Dockerfile +++ b/dockerfiles/ubuntu-kinetic-all/Dockerfile @@ -73,6 +73,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ kinetic-pgdg main 16' > / postgresql-server-dev-16 \ wget \ zlib1g-dev \ + python3-dev \ python3-pip \ python3-sphinx \ python3-setuptools \ @@ -112,8 +113,8 @@ RUN patch `which pg_buildext` < /make_pg_buildext_parallel.patch RUN wget https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2.tar.gz && \ tar -zxvf cmake-3.22.2.tar.gz && \ cd cmake-3.22.2 && ./bootstrap && \ - make && \ - make install && \ + MAKEFLAGS="-j $(nproc)" make && \ + MAKEFLAGS="-j $(nproc)" make install && \ rm -f cmake-3.22.2.tar.gz && \ rm -rf cmake-3.22.2 @@ -139,4 +140,9 @@ ENV PATH /scripts:$PATH COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" + ENTRYPOINT ["/scripts/fetch_and_build_deb"] diff --git a/templates/Dockerfile-deb.tmpl b/templates/Dockerfile-deb.tmpl index 663de0b5..79ade27c 100644 --- a/templates/Dockerfile-deb.tmpl +++ b/templates/Dockerfile-deb.tmpl @@ -73,6 +73,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ %%release%%-pgdg main 16' postgresql-server-dev-16 \ wget \ zlib1g-dev \ + python3-dev \ python3-pip \ python3-sphinx \ python3-setuptools \ @@ -112,8 +113,8 @@ RUN patch `which pg_buildext` < /make_pg_buildext_parallel.patch RUN wget https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2.tar.gz && \ tar -zxvf cmake-3.22.2.tar.gz && \ cd cmake-3.22.2 && ./bootstrap && \ - make && \ - make install && \ + MAKEFLAGS="-j $(nproc)" make && \ + MAKEFLAGS="-j $(nproc)" make install && \ rm -f cmake-3.22.2.tar.gz && \ rm -rf cmake-3.22.2 @@ -139,4 +140,9 @@ ENV PATH /scripts:$PATH COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" + ENTRYPOINT ["/scripts/fetch_and_build_deb"] diff --git a/templates/Dockerfile-rpm.tmpl b/templates/Dockerfile-rpm.tmpl index ed5a6179..54e00268 100644 --- a/templates/Dockerfile-rpm.tmpl +++ b/templates/Dockerfile-rpm.tmpl @@ -75,7 +75,6 @@ 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 \ @@ -98,6 +97,8 @@ RUN ( yum install -y https://%%rpm_url%% \ tar \ libzstd \ libzstd-devel \ + python3-pip \ + python3-devel \ %%extra-packages%% \ && ( [[ %%release%% != 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql%%pgshort%%-server postgresql%%pgshort%%-devel \ @@ -171,4 +172,10 @@ ENV PGVERSION=%%pgversion%% \ COPY scripts /scripts VOLUME /packages +# add citus tools +RUN git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools +RUN export PATH="$HOME/.pyenv/bin:$PATH" \ + && bash -l -c "$(pyenv init -) && pyenv virtualenv ${PYTHON_VERSION} packaging_env && pyenv activate packaging_env && pip install -r tools/packaging_automation/requirements.txt" \ + && ([[ %%release%% != 7 ]] || bash -l -c "$(pyenv init -) && pyenv activate packaging_env && pip uninstall -y urllib3 && pip install 'urllib3<2'") + ENTRYPOINT ["/scripts/fetch_and_build_rpm"]