diff --git a/.github/workflows/check-template-integrity.yml b/.github/workflows/check-template-integrity.yml new file mode 100644 index 000000000..63739b7f8 --- /dev/null +++ b/.github/workflows/check-template-integrity.yml @@ -0,0 +1,16 @@ +name: Check the integrity of files generated from templates + +on: push +jobs: + check-dockerfiles: + name: Check if the dockerfiles are updated using latest templates + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Remove all generated files + run: rm -rf dockerfiles/* + - name: Regenerate all files from templates + run: ./update_dockerfiles + - name: Check if all the files are still the same + run: git diff --exit-code dockerfiles diff --git a/dockerfiles/centos-7-pg14/scripts/determine_email b/dockerfiles/centos-7-pg14/scripts/determine_email old mode 100644 new mode 100755 diff --git a/dockerfiles/centos-7-pg14/scripts/determine_name b/dockerfiles/centos-7-pg14/scripts/determine_name old mode 100644 new mode 100755 diff --git a/dockerfiles/centos-7-pg14/scripts/fetch_and_build_rpm b/dockerfiles/centos-7-pg14/scripts/fetch_and_build_rpm old mode 100644 new mode 100755 diff --git a/dockerfiles/centos-7-pg15/scripts/determine_email b/dockerfiles/centos-7-pg15/scripts/determine_email old mode 100644 new mode 100755 diff --git a/dockerfiles/centos-7-pg15/scripts/determine_name b/dockerfiles/centos-7-pg15/scripts/determine_name old mode 100644 new mode 100755 diff --git a/dockerfiles/centos-7-pg15/scripts/fetch_and_build_rpm b/dockerfiles/centos-7-pg15/scripts/fetch_and_build_rpm old mode 100644 new mode 100755 diff --git a/dockerfiles/centos-8-pg14/scripts/determine_email b/dockerfiles/centos-8-pg14/scripts/determine_email old mode 100644 new mode 100755 diff --git a/dockerfiles/centos-8-pg14/scripts/determine_name b/dockerfiles/centos-8-pg14/scripts/determine_name old mode 100644 new mode 100755 diff --git a/dockerfiles/centos-8-pg14/scripts/fetch_and_build_rpm b/dockerfiles/centos-8-pg14/scripts/fetch_and_build_rpm old mode 100644 new mode 100755 diff --git a/dockerfiles/centos-8-pg15/scripts/determine_email b/dockerfiles/centos-8-pg15/scripts/determine_email old mode 100644 new mode 100755 diff --git a/dockerfiles/centos-8-pg15/scripts/determine_name b/dockerfiles/centos-8-pg15/scripts/determine_name old mode 100644 new mode 100755 diff --git a/dockerfiles/centos-8-pg15/scripts/fetch_and_build_rpm b/dockerfiles/centos-8-pg15/scripts/fetch_and_build_rpm old mode 100644 new mode 100755 diff --git a/dockerfiles/debian-bullseye-all/scripts/determine_email b/dockerfiles/debian-bullseye-all/scripts/determine_email old mode 100644 new mode 100755 diff --git a/dockerfiles/debian-bullseye-all/scripts/determine_name b/dockerfiles/debian-bullseye-all/scripts/determine_name old mode 100644 new mode 100755 diff --git a/dockerfiles/debian-bullseye-all/scripts/fetch_and_build_deb b/dockerfiles/debian-bullseye-all/scripts/fetch_and_build_deb old mode 100644 new mode 100755 diff --git a/dockerfiles/debian-stretch-all/Dockerfile b/dockerfiles/debian-stretch-all/Dockerfile deleted file mode 100644 index 6e6932912..000000000 --- a/dockerfiles/debian-stretch-all/Dockerfile +++ /dev/null @@ -1,128 +0,0 @@ -# vim:set ft=dockerfile: -FROM debian:stretch -ARG DEBIAN_FRONTEND=noninteractive - -# See https://github.com/tianon/docker-brew-debian/issues/49 for discussion of the following -# -# https://bugs.debian.org/830696 (apt uses gpgv by default in newer releases, rather than gpg) -RUN set -x \ - && apt-get update \ -# Fix ipv6 issue on travis: https://github.com/f-secure-foundry/usbarmory-debian-base_image/issues/9#issuecomment-466594168 - && mkdir ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf \ - && { \ - which gpg \ -# prefer gnupg2, to match APT's Recommends - || apt-get install -y --no-install-recommends gnupg2 \ - || apt-get install -y --no-install-recommends gnupg \ - ; } \ -# Ubuntu includes "gnupg" (not "gnupg2", but still 2.x), but not dirmngr, and gnupg 2.x requires dirmngr -# so, if we're not running gnupg 1.x, explicitly install dirmngr too - && { \ - gpg --version | grep -q '^gpg (GnuPG) 1\.' \ - || apt-get install -y --no-install-recommends dirmngr \ - ; } \ - && rm -rf /var/lib/apt/lists/* - -RUN set -ex; \ -# pub 4096R/ACCC4CF8 2011-10-13 [expires: 2019-07-02] -# Key fingerprint = B97B 0AFC AA1A 47F0 44F2 44A0 7FCC 7D46 ACCC 4CF8 -# uid PostgreSQL Debian Repository - key='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8'; \ - export GNUPGHOME="$(mktemp -d)"; \ -# Fix ipv6 issue on travis: https://github.com/f-secure-foundry/usbarmory-debian-base_image/issues/9#issuecomment-466594168 - echo "disable-ipv6" >> $GNUPGHOME/dirmngr.conf; \ - gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys "$key"; \ - gpg --batch --export "$key" > /etc/apt/trusted.gpg.d/postgres.gpg; \ - command -v gpgconf > /dev/null && gpgconf --kill all; \ - rm -rf "$GNUPGHOME"; \ - apt-key list - -# add buster backports repo to be able to download missing packages in buster main repo -RUN ( [ debian != debian ] || [ stretch != buster ] ) || ( \ - echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list \ - ) - -# install build tools and PostgreSQL development files - -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main 15' > /etc/apt/sources.list.d/pgdg.list \ - && apt-get update \ - && apt-get install -y --no-install-recommends \ - autotools-dev \ - build-essential \ - ca-certificates \ - curl \ - debhelper \ - devscripts \ - fakeroot \ - flex \ - libcurl4-openssl-dev \ - libdistro-info-perl \ - libedit-dev \ - libfile-fcntllock-perl \ - libicu-dev \ - libkrb5-dev \ - libpam0g-dev \ - libreadline-dev \ - libselinux1-dev \ - libssl-dev \ - libxslt-dev \ - lintian \ - postgresql-server-dev-all \ - postgresql-server-dev-15 \ - wget \ - zlib1g-dev \ - python3-pip \ - python3-setuptools \ - liblz4-dev \ - liblz4-1 \ - libzstd1 \ - libzstd-dev \ -# below are needed for cmake and pgazure build - checkinstall \ - git \ - libtemplate-perl \ - pkg-config \ - tar \ - unzip \ - uuid \ - uuid-dev \ - zip \ - sudo \ - && rm -rf /var/lib/apt/lists/* - -RUN pip3 install sphinx - -# 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 packagecloud repos for pg_auto_failover -RUN curl -s https://packagecloud.io/install/repositories/citusdata/community/script.deb.sh | bash \ - && rm -rf /var/lib/apt/lists/* - -# patch pg_buildext to use multiple processors -COPY make_pg_buildext_parallel.patch / -RUN patch `which pg_buildext` < /make_pg_buildext_parallel.patch - - -# install cmake from source -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 && \ - rm -f cmake-3.22.2.tar.gz && \ - rm -rf cmake-3.22.2 - - - -# Added for pg15 beta package support. -ENV DEB_PG_SUPPORTED_VERSIONS="10 11 12 13 14 15" - -# place scripts on path and declare output volume -ENV PATH /scripts:$PATH -COPY scripts /scripts -VOLUME /packages - -ENTRYPOINT ["/scripts/fetch_and_build_deb"] diff --git a/dockerfiles/debian-stretch-all/make_pg_buildext_parallel.patch b/dockerfiles/debian-stretch-all/make_pg_buildext_parallel.patch deleted file mode 100644 index fa356fd26..000000000 --- a/dockerfiles/debian-stretch-all/make_pg_buildext_parallel.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- /usr/bin/pg_buildext 2020-11-27 12:41:34.000000000 +0300 -+++ /usr/bin/pg_buildext 2023-03-01 12:51:34.000000000 +0300 -@@ -107,11 +107,13 @@ substvars() { - install() { - prepare_env $1 - package=`echo $opt | sed -e "s:%v:$1:g"` -+ procs="$(nproc)" -+ mjobs="$(expr $procs + 1)" - - mkdir -p $vtarget - # if a Makefile was created by configure, use it, else the top level Makefile - [ -f $vtarget/Makefile ] || makefile="-f $srcdir/Makefile" -- make -C $vtarget ${makefile:-} install DESTDIR="$PWD/debian/$package" PG_CONFIG="$pgc" VPATH="$srcdir" USE_PGXS=1 $MAKEVARS || return $? -+ make -j${mjobs} -C $vtarget ${makefile:-} install DESTDIR="$PWD/debian/$package" PG_CONFIG="$pgc" VPATH="$srcdir" USE_PGXS=1 $MAKEVARS || return $? - substvars "$1" "$package" - } - diff --git a/dockerfiles/debian-stretch-all/scripts/fetch_and_build_deb b/dockerfiles/debian-stretch-all/scripts/fetch_and_build_deb deleted file mode 100755 index 29aca8e8e..000000000 --- a/dockerfiles/debian-stretch-all/scripts/fetch_and_build_deb +++ /dev/null @@ -1,227 +0,0 @@ -#!/bin/bash - -# make bash behave -set -euo pipefail -# In one branch we execute commands inside One Branch steps, since One Branch does not allow executing docker inside -# docker. Additionally, Onebranch needs containers not to close so we make it hang for OneBranch to be able to -# execute commands. -if [ "${CONTAINER_BUILD_RUN_ENABLED:-""}" == "" ]; then - echo "INFO: Image working in waiting mode. Not executing build script" - tail -f /dev/null -fi - -IFS=$'\n\t' - -# constants -stdout=1 -stderr=2 -success=0 -failure=1 -badusage=64 -noinput=66 - -nextversion='0.0.0' -builddir=$(pwd) - -# outputs usage message on specified device before exiting with provided status -usage() { - cat << 'E_O_USAGE' >&"$1" -usage: fetch_and_build_deb build_type - - build_type: 'release', 'nightly', or a valid git reference - -fetch_and_build_deb builds Debian packages using local build files. The build -type 'release' builds the latest release tag, 'nightly' builds a nightly from -the latest 'master' commit, and any other type is interpreted as a git ref to -facilitate building one-off packages for customers. -E_O_USAGE - - exit "${2}"; -} - -# sets the next version variable used during non-release builds -setnextversion() { - baseversion=$(echo "$1" | tr '~' '-' | tr '_' '-' | cut -d- -f1) - baseversion="${baseversion%.citus}" - nextversion=$(echo "$baseversion" | perl -pe 's/^(\d+\.)(\d+)(\.\d+)$/$1.($2+1).".0"/e') -} - -if [ "$#" -ne 1 ]; then - usage $stderr $badusage -fi - -if [ "${1}" = '-h' ]; then - usage $stdout $success -fi - -# populate variables from packaging metadata file -# shellcheck source=/dev/null -source /buildfiles/pkgvars -# Read PostgreSQL versions from file. -# supported-postgres file is derived file from postgres-matrix.yml file by citus_package. -# If file does not exist, skip populating file -[[ -f "/buildfiles/supported-postgres" ]] && source /buildfiles/supported-postgres - -# Fetch pkgname, hubproj, nightlyref, versioning from pkgvars file -declare pkglatest # to make shellcheck happy -pkgname="${deb_pkgname:-${pkgname}}" -hubproj="${hubproj:-${pkgname}}" -nightlyref="${nightlyref:-master}" -versioning="${versioning:-simple}" -if [[ "${pkglatest}" == *"beta"* ]]; then - release_type="beta" -else - release_type="stable" -fi -# Fetch pg release and nightly versions from supported-postgres file which is originated from postgres-matrix.yml file -# If this file is not found, releasepg and nightlypg parameters from pkgvars are used for defining pg versions -pg_release_versions="${release_versions:-${releasepg}}" -pg_nightly_versions="${nightly_versions:-${nightlypg}}" - - -echo "Postgres versions:" -echo "Release Versions: ${pg_release_versions}" -echo "Nightly Versions: ${pg_nightly_versions}" - -if [ -z "${pkglatest}" ]; then - echo "$0: pkgvars file must specify a value for pkglatest" >&2 - exit $noinput -fi - -echo "header=\"Authorization: token ${GITHUB_TOKEN}\"" > ~/.curlrc - -export NAME -NAME=$(determine_name) - -export EMAIL -EMAIL=$(determine_email) - -cp -R /buildfiles/debian "${builddir}" -repopath="citusdata/${hubproj}" - -case "${1}" in - release) - packageversion=${pkglatest%-*} - releasetag="v${packageversion/'~'/-}" - releasetag="${releasetag%.citus}" - - gitsha=$(curl -s "https://api.github.com/repos/${repopath}/git/refs/tags/${releasetag}" | \ - jq -r '.object.sha') - if [ "${gitsha}" == 'null' ]; then - echo "$0: could not determine commit for git tag ${releasetag}" >&2 - exit $failure - fi - - verified=$(curl -sH 'Accept:application/vnd.github.cryptographer-preview+sha' \ - "https://api.github.com/repos/${repopath}/git/tags/${gitsha}" | \ - jq -r '.verification.verified') - if [ "${verified}" != 'true' ]; then - echo "$0: could not verify signature for git tag ${releasetag}" >&2 - exit $failure - fi - - echo "${pg_release_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions" - ;; - *) - if [ "${1}" == 'nightly' ]; then - ref=${nightlyref} - infix='git' - else - ref=${1} - infix='pre' - fi - - setnextversion "${pkglatest}" - - set +e - gitsha=$(curl -sfH 'Accept:application/vnd.github.v3.sha' \ - "https://api.github.com/repos/${repopath}/commits/${ref}") - if [ "${?}" -ne 0 ]; then - echo "$0: could not determine commit for git ref ${ref}" >&2 - exit $failure - fi - set -e - - timestamp=$(date +'%Y%m%d') - - packagesuffix="${infix}.${timestamp}.${gitsha:0:7}" - packageversion="${nextversion}.citus~${packagesuffix}" - export CONF_EXTRA_VERSION="+${packagesuffix}" - - echo "${pg_nightly_versions}" | tr ',' '\n' > "${builddir}/debian/pgversions" - ;; -esac - -tarballpath="${builddir}/${pkgname}_${packageversion}.orig.tar.gz" -packagepath="${builddir}/${packageversion}" - -curl -sL "https://api.github.com/repos/${repopath}/tarball/${gitsha}" \ - -o "${tarballpath}" - -mkdir -p "${packagepath}" -tar xf "${tarballpath}" -C "${packagepath}" --strip-components 1 - -# git metadata needs to be setup to initialize submodules -# in repos which rely on git submodules -if [[ -f "${packagepath}/.gitmodules" ]]; then - setup_submodules "${packagepath}" -fi - -# add our email/name to debian control file as uploader if not a release -if [ "${1}" != 'release' ]; then - sed -i -E "/^Uploaders:/s/ .+$/ ${NAME} <${EMAIL}>/" "${builddir}/debian/control.in" -fi - -cp -R "${builddir}/debian" "${packagepath}/debian" - -cd "${packagepath}" - -case "${1}" in - release) - # add minor/major version to package name if using fancy versioning - if [ "${versioning}" == 'fancy' ]; then - declare release_prefix='' - suffix=$(echo "${packageversion}" | grep -oE '^[0-9]+\.[0-9]+') - if [ "${release_type}" == 'stable' ]; then - release_prefix=${suffix} - else - release_prefix="${release_type}-${suffix}" - fi - sed -i "/^Package:/ s/$/-${release_prefix}/" debian/control.in - sed -i "/postgresql-%v-${pkgname}/ s/$/-${release_prefix}/" debian/rules - fi - ;; - nightly) - msg="Nightly package. Built from ${nightlyref} " - msg+=$(date +'on %l:%M %p (%Z) on %A, %B %Y' | tr -s ' ') - dch -v "${packageversion}-1" -D experimental -u low "${msg}" - ;; - *) - msg="Custom package. Built from ${gitsha:0:7} " - msg+=$(date +'on %l:%M %p (%Z) on %A, %B %Y' | tr -s ' ') - dch -v "${packageversion}-1" -D UNRELEASED -u low "${msg}" - ;; -esac - - -pg_buildext updatecontrol - -procs="$(nproc)" -mjobs="$(expr $procs + 1)" - -DEB_BUILD_OPTIONS="parallel=${mjobs}" debuild --prepend-path /usr/local/bin --preserve-envvar CONF_EXTRA_VERSION --preserve-envvar UNENCRYPTED_PACKAGE --preserve-envvar PACKAGE_ENCRYPTION_KEY -uc -us -B --lintian-opts --profile debian --allow-root - -## Rename all *.ddeb files to *.deb since we upload debug packages with .deb suffix -# .ddeb suffix is automatically chosen when naming debug packages for Ubuntu -# releases. For this reason, we rename all *.ddeb files to *.deb since we upload -# debug packages with .deb suffix. -for file in ../*.ddeb; do - if [ -e "${file}" ]; then - echo "Renaming ${file} to ${file%.ddeb}.deb" - mv "${file}" "${file%.ddeb}.deb"; - else - echo "There are no files with ddeb extension to rename." - fi -done -## Copy all deb packages out of docker image -cp ../*.deb /packages diff --git a/dockerfiles/debsigner/Dockerfile b/dockerfiles/debsigner/Dockerfile deleted file mode 100644 index 2b7faa09f..000000000 --- a/dockerfiles/debsigner/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -# vim:set ft=dockerfile: -FROM ubuntu:xenial - -# install build tools and PostgreSQL development files -RUN apt-get update \ - && apt-get install -y --no-install-recommends debsigs expect \ - && rm -rf /var/lib/apt/lists/* - -# place scripts on path and declare output volume -ENV PATH /scripts:$PATH -COPY scripts /scripts -VOLUME /packages - -ENTRYPOINT ["/scripts/import_and_sign"] diff --git a/dockerfiles/debsigner/scripts/import_and_sign b/dockerfiles/debsigner/scripts/import_and_sign deleted file mode 100755 index 22dfb5090..000000000 --- a/dockerfiles/debsigner/scripts/import_and_sign +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# make bash behave -set -uo pipefail -IFS=$'\n\t' - -# constants -badconfig=78 - -if [ -z "${PACKAGING_PASSPHRASE+x}" ]; then - echo "$0: passphrase not set" >&2 - exit $badconfig -elif [ -z "${PACKAGING_SECRET_KEY+x}" ]; then - echo "$0: secret key not set" >&2 - exit $badconfig -fi - -gpg --batch --no-tty --trust-model always \ - --import <(echo "${PACKAGING_SECRET_KEY}" | base64 -d) - -for deb in /packages/*/*.deb -do - sign_deb "${deb}" -done diff --git a/dockerfiles/debsigner/scripts/sign_deb b/dockerfiles/debsigner/scripts/sign_deb deleted file mode 100755 index 2719ad041..000000000 --- a/dockerfiles/debsigner/scripts/sign_deb +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/expect -- -set timeout -1 - -spawn debsigs --sign=maint {*}$argv - -expect -exact "Enter passphrase" -send -- "$env(PACKAGING_PASSPHRASE)\r" -expect eof diff --git a/dockerfiles/oraclelinux-7-pg14/scripts/determine_email b/dockerfiles/oraclelinux-7-pg14/scripts/determine_email old mode 100644 new mode 100755 diff --git a/dockerfiles/oraclelinux-7-pg14/scripts/determine_name b/dockerfiles/oraclelinux-7-pg14/scripts/determine_name old mode 100644 new mode 100755 diff --git a/dockerfiles/oraclelinux-7-pg14/scripts/fetch_and_build_rpm b/dockerfiles/oraclelinux-7-pg14/scripts/fetch_and_build_rpm old mode 100644 new mode 100755 diff --git a/dockerfiles/oraclelinux-7-pg15/scripts/determine_email b/dockerfiles/oraclelinux-7-pg15/scripts/determine_email old mode 100644 new mode 100755 diff --git a/dockerfiles/oraclelinux-7-pg15/scripts/determine_name b/dockerfiles/oraclelinux-7-pg15/scripts/determine_name old mode 100644 new mode 100755 diff --git a/dockerfiles/oraclelinux-7-pg15/scripts/fetch_and_build_rpm b/dockerfiles/oraclelinux-7-pg15/scripts/fetch_and_build_rpm old mode 100644 new mode 100755 diff --git a/dockerfiles/oraclelinux-8-pg14/scripts/determine_email b/dockerfiles/oraclelinux-8-pg14/scripts/determine_email old mode 100644 new mode 100755 diff --git a/dockerfiles/oraclelinux-8-pg14/scripts/determine_name b/dockerfiles/oraclelinux-8-pg14/scripts/determine_name old mode 100644 new mode 100755 diff --git a/dockerfiles/oraclelinux-8-pg14/scripts/fetch_and_build_rpm b/dockerfiles/oraclelinux-8-pg14/scripts/fetch_and_build_rpm old mode 100644 new mode 100755 diff --git a/dockerfiles/oraclelinux-8-pg15/scripts/determine_email b/dockerfiles/oraclelinux-8-pg15/scripts/determine_email old mode 100644 new mode 100755 diff --git a/dockerfiles/oraclelinux-8-pg15/scripts/determine_name b/dockerfiles/oraclelinux-8-pg15/scripts/determine_name old mode 100644 new mode 100755 diff --git a/dockerfiles/oraclelinux-8-pg15/scripts/fetch_and_build_rpm b/dockerfiles/oraclelinux-8-pg15/scripts/fetch_and_build_rpm old mode 100644 new mode 100755 diff --git a/dockerfiles/oraclelinux-6-pg10/Dockerfile b/dockerfiles/oraclelinux-9-pg10/Dockerfile similarity index 90% rename from dockerfiles/oraclelinux-6-pg10/Dockerfile rename to dockerfiles/oraclelinux-9-pg10/Dockerfile index 936ab9851..7e6f789be 100644 --- a/dockerfiles/oraclelinux-6-pg10/Dockerfile +++ b/dockerfiles/oraclelinux-9-pg10/Dockerfile @@ -1,7 +1,7 @@ # vim:set ft=dockerfile: -FROM oraclelinux:6 +FROM oraclelinux:9 -RUN [[ oraclelinux != centos ]] || [[ 6 != 8 ]] || ( \ +RUN [[ oraclelinux != 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-* \ ) @@ -14,7 +14,7 @@ RUN ( yum install -y yum-plugin-ovl || yum install -y yum-plugin-ovl || touch /v # 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 ]] || ( \ +RUN [[ oraclelinux != 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 \ @@ -31,10 +31,10 @@ RUN [[ oraclelinux != oraclelinux ]] || [[ 6 != 7 ]] || ( \ # 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 \ +RUN if [[ oraclelinux == 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 [[ oraclelinux == oraclelinux ]] && [[ 6 == 6 ]]; then yum install -y wget \ + elif [[ oraclelinux == 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 \ @@ -42,7 +42,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 6 == 7 ]]; then yum install -y w 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 \ +RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ && ( [[ 10 != 15 ]] || sed -i '/\[pgdg15-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' \ @@ -65,8 +65,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6 tar \ libzstd \ libzstd-devel \ - llvm-toolset-7-clang llvm5.0 \ - && ( [[ 6 < 8 ]] || dnf -qy module disable postgresql ) \ + \ + && ( [[ 9 < 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql10-server postgresql10-devel \ && yum clean all @@ -100,7 +100,7 @@ RUN yum -y install perl-IPC-Cmd libuuid-devel cmake3 # 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 ]] || ( \ +RUN [[ oraclelinux != centos ]] || [[ 9 != 7 ]] || ( \ yum -y install perl-IPC-Cmd libuuid-devel cmake3 && \ ln -s /usr/bin/cmake3 /usr/bin/cmake && \ yum -y remove git && \ diff --git a/dockerfiles/debian-stretch-all/scripts/determine_email b/dockerfiles/oraclelinux-9-pg10/scripts/determine_email similarity index 100% rename from dockerfiles/debian-stretch-all/scripts/determine_email rename to dockerfiles/oraclelinux-9-pg10/scripts/determine_email diff --git a/dockerfiles/debian-stretch-all/scripts/determine_name b/dockerfiles/oraclelinux-9-pg10/scripts/determine_name similarity index 100% rename from dockerfiles/debian-stretch-all/scripts/determine_name rename to dockerfiles/oraclelinux-9-pg10/scripts/determine_name diff --git a/dockerfiles/oraclelinux-6-pg10/scripts/fetch_and_build_rpm b/dockerfiles/oraclelinux-9-pg10/scripts/fetch_and_build_rpm similarity index 100% rename from dockerfiles/oraclelinux-6-pg10/scripts/fetch_and_build_rpm rename to dockerfiles/oraclelinux-9-pg10/scripts/fetch_and_build_rpm diff --git a/dockerfiles/debian-stretch-all/scripts/setup_submodules b/dockerfiles/oraclelinux-9-pg10/scripts/setup_submodules similarity index 100% rename from dockerfiles/debian-stretch-all/scripts/setup_submodules rename to dockerfiles/oraclelinux-9-pg10/scripts/setup_submodules diff --git a/dockerfiles/oraclelinux-6-pg11/Dockerfile b/dockerfiles/oraclelinux-9-pg11/Dockerfile similarity index 90% rename from dockerfiles/oraclelinux-6-pg11/Dockerfile rename to dockerfiles/oraclelinux-9-pg11/Dockerfile index c1343b241..93d33d2c1 100644 --- a/dockerfiles/oraclelinux-6-pg11/Dockerfile +++ b/dockerfiles/oraclelinux-9-pg11/Dockerfile @@ -1,7 +1,7 @@ # vim:set ft=dockerfile: -FROM oraclelinux:6 +FROM oraclelinux:9 -RUN [[ oraclelinux != centos ]] || [[ 6 != 8 ]] || ( \ +RUN [[ oraclelinux != 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-* \ ) @@ -14,7 +14,7 @@ RUN ( yum install -y yum-plugin-ovl || yum install -y yum-plugin-ovl || touch /v # 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 ]] || ( \ +RUN [[ oraclelinux != 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 \ @@ -31,10 +31,10 @@ RUN [[ oraclelinux != oraclelinux ]] || [[ 6 != 7 ]] || ( \ # 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 \ +RUN if [[ oraclelinux == 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 [[ oraclelinux == oraclelinux ]] && [[ 6 == 6 ]]; then yum install -y wget \ + elif [[ oraclelinux == 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 \ @@ -42,7 +42,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 6 == 7 ]]; then yum install -y w 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 \ +RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ && ( [[ 11 != 15 ]] || sed -i '/\[pgdg15-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' \ @@ -65,8 +65,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6 tar \ libzstd \ libzstd-devel \ - llvm-toolset-7-clang llvm5.0 \ - && ( [[ 6 < 8 ]] || dnf -qy module disable postgresql ) \ + \ + && ( [[ 9 < 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql11-server postgresql11-devel \ && yum clean all @@ -100,7 +100,7 @@ RUN yum -y install perl-IPC-Cmd libuuid-devel cmake3 # 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 ]] || ( \ +RUN [[ oraclelinux != centos ]] || [[ 9 != 7 ]] || ( \ yum -y install perl-IPC-Cmd libuuid-devel cmake3 && \ ln -s /usr/bin/cmake3 /usr/bin/cmake && \ yum -y remove git && \ diff --git a/dockerfiles/oraclelinux-6-pg10/scripts/determine_email b/dockerfiles/oraclelinux-9-pg11/scripts/determine_email similarity index 100% rename from dockerfiles/oraclelinux-6-pg10/scripts/determine_email rename to dockerfiles/oraclelinux-9-pg11/scripts/determine_email diff --git a/dockerfiles/oraclelinux-6-pg10/scripts/determine_name b/dockerfiles/oraclelinux-9-pg11/scripts/determine_name similarity index 100% rename from dockerfiles/oraclelinux-6-pg10/scripts/determine_name rename to dockerfiles/oraclelinux-9-pg11/scripts/determine_name diff --git a/dockerfiles/oraclelinux-6-pg11/scripts/fetch_and_build_rpm b/dockerfiles/oraclelinux-9-pg11/scripts/fetch_and_build_rpm similarity index 100% rename from dockerfiles/oraclelinux-6-pg11/scripts/fetch_and_build_rpm rename to dockerfiles/oraclelinux-9-pg11/scripts/fetch_and_build_rpm diff --git a/dockerfiles/oraclelinux-6-pg10/scripts/setup_submodules b/dockerfiles/oraclelinux-9-pg11/scripts/setup_submodules similarity index 100% rename from dockerfiles/oraclelinux-6-pg10/scripts/setup_submodules rename to dockerfiles/oraclelinux-9-pg11/scripts/setup_submodules diff --git a/dockerfiles/oraclelinux-6-pg12/Dockerfile b/dockerfiles/oraclelinux-9-pg12/Dockerfile similarity index 90% rename from dockerfiles/oraclelinux-6-pg12/Dockerfile rename to dockerfiles/oraclelinux-9-pg12/Dockerfile index 313875c71..495cabb37 100644 --- a/dockerfiles/oraclelinux-6-pg12/Dockerfile +++ b/dockerfiles/oraclelinux-9-pg12/Dockerfile @@ -1,7 +1,7 @@ # vim:set ft=dockerfile: -FROM oraclelinux:6 +FROM oraclelinux:9 -RUN [[ oraclelinux != centos ]] || [[ 6 != 8 ]] || ( \ +RUN [[ oraclelinux != 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-* \ ) @@ -14,7 +14,7 @@ RUN ( yum install -y yum-plugin-ovl || yum install -y yum-plugin-ovl || touch /v # 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 ]] || ( \ +RUN [[ oraclelinux != 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 \ @@ -31,10 +31,10 @@ RUN [[ oraclelinux != oraclelinux ]] || [[ 6 != 7 ]] || ( \ # 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 \ +RUN if [[ oraclelinux == 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 [[ oraclelinux == oraclelinux ]] && [[ 6 == 6 ]]; then yum install -y wget \ + elif [[ oraclelinux == 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 \ @@ -42,7 +42,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 6 == 7 ]]; then yum install -y w 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 \ +RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ && ( [[ 12 != 15 ]] || sed -i '/\[pgdg15-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' \ @@ -65,8 +65,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6 tar \ libzstd \ libzstd-devel \ - llvm-toolset-7-clang llvm5.0 \ - && ( [[ 6 < 8 ]] || dnf -qy module disable postgresql ) \ + \ + && ( [[ 9 < 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql12-server postgresql12-devel \ && yum clean all @@ -100,7 +100,7 @@ RUN yum -y install perl-IPC-Cmd libuuid-devel cmake3 # 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 ]] || ( \ +RUN [[ oraclelinux != centos ]] || [[ 9 != 7 ]] || ( \ yum -y install perl-IPC-Cmd libuuid-devel cmake3 && \ ln -s /usr/bin/cmake3 /usr/bin/cmake && \ yum -y remove git && \ diff --git a/dockerfiles/oraclelinux-6-pg11/scripts/determine_email b/dockerfiles/oraclelinux-9-pg12/scripts/determine_email similarity index 100% rename from dockerfiles/oraclelinux-6-pg11/scripts/determine_email rename to dockerfiles/oraclelinux-9-pg12/scripts/determine_email diff --git a/dockerfiles/oraclelinux-6-pg11/scripts/determine_name b/dockerfiles/oraclelinux-9-pg12/scripts/determine_name similarity index 100% rename from dockerfiles/oraclelinux-6-pg11/scripts/determine_name rename to dockerfiles/oraclelinux-9-pg12/scripts/determine_name diff --git a/dockerfiles/oraclelinux-6-pg12/scripts/fetch_and_build_rpm b/dockerfiles/oraclelinux-9-pg12/scripts/fetch_and_build_rpm similarity index 100% rename from dockerfiles/oraclelinux-6-pg12/scripts/fetch_and_build_rpm rename to dockerfiles/oraclelinux-9-pg12/scripts/fetch_and_build_rpm diff --git a/dockerfiles/oraclelinux-6-pg11/scripts/setup_submodules b/dockerfiles/oraclelinux-9-pg12/scripts/setup_submodules similarity index 100% rename from dockerfiles/oraclelinux-6-pg11/scripts/setup_submodules rename to dockerfiles/oraclelinux-9-pg12/scripts/setup_submodules diff --git a/dockerfiles/oraclelinux-9-pg13/Dockerfile b/dockerfiles/oraclelinux-9-pg13/Dockerfile new file mode 100644 index 000000000..40cbb9122 --- /dev/null +++ b/dockerfiles/oraclelinux-9-pg13/Dockerfile @@ -0,0 +1,120 @@ +# vim:set ft=dockerfile: +FROM oraclelinux:9 + +RUN [[ oraclelinux != 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 + +# 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 ]] || [[ 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 [[ oraclelinux == 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 [[ oraclelinux == 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 \ + && ( [[ 13 != 15 ]] || sed -i '/\[pgdg15-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 \ + curl \ + flex \ + gcc-c++ \ + hunspell-en \ + libcurl-devel \ + libicu-devel \ + libstdc++-devel \ + libxml2-devel \ + libxslt-devel \ + openssl-devel \ + pam-devel \ + readline-devel \ + rpm-build \ + rpmlint \ + spectool \ + tar \ + libzstd \ + libzstd-devel \ + \ + && ( [[ 9 < 8 ]] || dnf -qy module disable postgresql ) \ + && yum install -y postgresql13-server postgresql13-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 ]] || [[ 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 ) + +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=13 \ + PATH=/scripts:$PATH +COPY scripts /scripts +VOLUME /packages + +ENTRYPOINT ["/scripts/fetch_and_build_rpm"] diff --git a/dockerfiles/oraclelinux-6-pg12/scripts/determine_email b/dockerfiles/oraclelinux-9-pg13/scripts/determine_email similarity index 100% rename from dockerfiles/oraclelinux-6-pg12/scripts/determine_email rename to dockerfiles/oraclelinux-9-pg13/scripts/determine_email diff --git a/dockerfiles/oraclelinux-6-pg12/scripts/determine_name b/dockerfiles/oraclelinux-9-pg13/scripts/determine_name similarity index 100% rename from dockerfiles/oraclelinux-6-pg12/scripts/determine_name rename to dockerfiles/oraclelinux-9-pg13/scripts/determine_name diff --git a/dockerfiles/oraclelinux-6-pg14/scripts/fetch_and_build_rpm b/dockerfiles/oraclelinux-9-pg13/scripts/fetch_and_build_rpm old mode 100644 new mode 100755 similarity index 100% rename from dockerfiles/oraclelinux-6-pg14/scripts/fetch_and_build_rpm rename to dockerfiles/oraclelinux-9-pg13/scripts/fetch_and_build_rpm diff --git a/dockerfiles/oraclelinux-6-pg12/scripts/setup_submodules b/dockerfiles/oraclelinux-9-pg13/scripts/setup_submodules similarity index 100% rename from dockerfiles/oraclelinux-6-pg12/scripts/setup_submodules rename to dockerfiles/oraclelinux-9-pg13/scripts/setup_submodules diff --git a/dockerfiles/oraclelinux-6-pg14/Dockerfile b/dockerfiles/oraclelinux-9-pg14/Dockerfile similarity index 90% rename from dockerfiles/oraclelinux-6-pg14/Dockerfile rename to dockerfiles/oraclelinux-9-pg14/Dockerfile index f91dd92a2..a9f739b75 100644 --- a/dockerfiles/oraclelinux-6-pg14/Dockerfile +++ b/dockerfiles/oraclelinux-9-pg14/Dockerfile @@ -1,7 +1,7 @@ # vim:set ft=dockerfile: -FROM oraclelinux:6 +FROM oraclelinux:9 -RUN [[ oraclelinux != centos ]] || [[ 6 != 8 ]] || ( \ +RUN [[ oraclelinux != 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-* \ ) @@ -14,7 +14,7 @@ RUN ( yum install -y yum-plugin-ovl || yum install -y yum-plugin-ovl || touch /v # 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 ]] || ( \ +RUN [[ oraclelinux != 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 \ @@ -31,10 +31,10 @@ RUN [[ oraclelinux != oraclelinux ]] || [[ 6 != 7 ]] || ( \ # 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 \ +RUN if [[ oraclelinux == 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 [[ oraclelinux == oraclelinux ]] && [[ 6 == 6 ]]; then yum install -y wget \ + elif [[ oraclelinux == 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 \ @@ -42,7 +42,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 6 == 7 ]]; then yum install -y w 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 \ +RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ && ( [[ 14 != 15 ]] || sed -i '/\[pgdg15-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' \ @@ -65,8 +65,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6 tar \ libzstd \ libzstd-devel \ - llvm-toolset-7-clang llvm5.0 \ - && ( [[ 6 < 8 ]] || dnf -qy module disable postgresql ) \ + \ + && ( [[ 9 < 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql14-server postgresql14-devel \ && yum clean all @@ -100,7 +100,7 @@ RUN yum -y install perl-IPC-Cmd libuuid-devel cmake3 # 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 ]] || ( \ +RUN [[ oraclelinux != centos ]] || [[ 9 != 7 ]] || ( \ yum -y install perl-IPC-Cmd libuuid-devel cmake3 && \ ln -s /usr/bin/cmake3 /usr/bin/cmake && \ yum -y remove git && \ diff --git a/dockerfiles/oraclelinux-6-pg14/scripts/determine_email b/dockerfiles/oraclelinux-9-pg14/scripts/determine_email old mode 100644 new mode 100755 similarity index 100% rename from dockerfiles/oraclelinux-6-pg14/scripts/determine_email rename to dockerfiles/oraclelinux-9-pg14/scripts/determine_email diff --git a/dockerfiles/oraclelinux-6-pg14/scripts/determine_name b/dockerfiles/oraclelinux-9-pg14/scripts/determine_name old mode 100644 new mode 100755 similarity index 100% rename from dockerfiles/oraclelinux-6-pg14/scripts/determine_name rename to dockerfiles/oraclelinux-9-pg14/scripts/determine_name diff --git a/dockerfiles/oraclelinux-6-pg15/scripts/fetch_and_build_rpm b/dockerfiles/oraclelinux-9-pg14/scripts/fetch_and_build_rpm old mode 100644 new mode 100755 similarity index 100% rename from dockerfiles/oraclelinux-6-pg15/scripts/fetch_and_build_rpm rename to dockerfiles/oraclelinux-9-pg14/scripts/fetch_and_build_rpm diff --git a/dockerfiles/oraclelinux-6-pg14/scripts/setup_submodules b/dockerfiles/oraclelinux-9-pg14/scripts/setup_submodules similarity index 100% rename from dockerfiles/oraclelinux-6-pg14/scripts/setup_submodules rename to dockerfiles/oraclelinux-9-pg14/scripts/setup_submodules diff --git a/dockerfiles/oraclelinux-6-pg15/Dockerfile b/dockerfiles/oraclelinux-9-pg15/Dockerfile similarity index 90% rename from dockerfiles/oraclelinux-6-pg15/Dockerfile rename to dockerfiles/oraclelinux-9-pg15/Dockerfile index 2a868854c..ff3073722 100644 --- a/dockerfiles/oraclelinux-6-pg15/Dockerfile +++ b/dockerfiles/oraclelinux-9-pg15/Dockerfile @@ -1,7 +1,7 @@ # vim:set ft=dockerfile: -FROM oraclelinux:6 +FROM oraclelinux:9 -RUN [[ oraclelinux != centos ]] || [[ 6 != 8 ]] || ( \ +RUN [[ oraclelinux != 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-* \ ) @@ -14,7 +14,7 @@ RUN ( yum install -y yum-plugin-ovl || yum install -y yum-plugin-ovl || touch /v # 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 ]] || ( \ +RUN [[ oraclelinux != 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 \ @@ -31,10 +31,10 @@ RUN [[ oraclelinux != oraclelinux ]] || [[ 6 != 7 ]] || ( \ # 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 \ +RUN if [[ oraclelinux == 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 [[ oraclelinux == oraclelinux ]] && [[ 6 == 6 ]]; then yum install -y wget \ + elif [[ oraclelinux == 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 \ @@ -42,7 +42,7 @@ RUN if [[ oraclelinux == oraclelinux ]] && [[ 6 == 7 ]]; then yum install -y w 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 \ +RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ && ( [[ 15 != 15 ]] || sed -i '/\[pgdg15-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' \ @@ -65,8 +65,8 @@ RUN ( yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6 tar \ libzstd \ libzstd-devel \ - llvm-toolset-7-clang llvm5.0 \ - && ( [[ 6 < 8 ]] || dnf -qy module disable postgresql ) \ + \ + && ( [[ 9 < 8 ]] || dnf -qy module disable postgresql ) \ && yum install -y postgresql15-server postgresql15-devel \ && yum clean all @@ -100,7 +100,7 @@ RUN yum -y install perl-IPC-Cmd libuuid-devel cmake3 # 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 ]] || ( \ +RUN [[ oraclelinux != centos ]] || [[ 9 != 7 ]] || ( \ yum -y install perl-IPC-Cmd libuuid-devel cmake3 && \ ln -s /usr/bin/cmake3 /usr/bin/cmake && \ yum -y remove git && \ diff --git a/dockerfiles/oraclelinux-6-pg15/scripts/determine_email b/dockerfiles/oraclelinux-9-pg15/scripts/determine_email old mode 100644 new mode 100755 similarity index 100% rename from dockerfiles/oraclelinux-6-pg15/scripts/determine_email rename to dockerfiles/oraclelinux-9-pg15/scripts/determine_email diff --git a/dockerfiles/oraclelinux-6-pg15/scripts/determine_name b/dockerfiles/oraclelinux-9-pg15/scripts/determine_name old mode 100644 new mode 100755 similarity index 100% rename from dockerfiles/oraclelinux-6-pg15/scripts/determine_name rename to dockerfiles/oraclelinux-9-pg15/scripts/determine_name diff --git a/dockerfiles/oraclelinux-9-pg15/scripts/fetch_and_build_rpm b/dockerfiles/oraclelinux-9-pg15/scripts/fetch_and_build_rpm new file mode 100755 index 000000000..eff436d98 --- /dev/null +++ b/dockerfiles/oraclelinux-9-pg15/scripts/fetch_and_build_rpm @@ -0,0 +1,240 @@ +#!/bin/bash + +# make bash behave +set -euo pipefail +# In one branch we execute commands inside One Branch steps, since One Branch does not allow executing docker inside +# docker. Additionally, Onebranch needs containers not to close so we make it hang for OneBranch to be able to +# execute commands. +if [ "${CONTAINER_BUILD_RUN_ENABLED:-""}" == "" ]; then + echo "INFO: Image working in waiting mode. Not executing build script" + tail -f /dev/null +fi + +IFS=$'\n\t' + +# constants +stdout=1 +stderr=2 +success=0 +failure=1 +badusage=64 +noinput=66 + +nextversion='0.0.0' +builddir=$(pwd) + +# outputs usage message on specified device before exiting with provided status +usage() { + cat << 'E_O_USAGE' >&"$1" +usage: fetch_and_build_rpm build_type build_directory + + build_type: 'release', 'nightly', or a valid git reference + +fetch_and_build_rpm builds Red Hat packages using local build files. The build +type 'release' builds the latest release tag, 'nightly' builds a nightly from +the latest 'master' commit, and any other type is interpreted as a git ref to +facilitate building one-off packages for customers. +E_O_USAGE + + exit "${2}"; +} + +# sets the next version variable used during non-release builds +setnextversion() { + # First line replaces '~' and '_' characters and splits the version by '-' and gets the first + # from the array. + # Second line strips '.citus' suffix + # e.g. input->11.0.0_beta-1.citus; output->11.0.0 + baseversion=$(echo "$1" | tr '~' '-' | tr '_' '-' | cut -d- -f1) + baseversion="${baseversion%.citus}" + nextversion=$(echo "$baseversion" | perl -pe 's/^(\d+\.)(\d+)(\.\d+)$/$1.($2+1).".0"/e') +} + +if [ "$#" -ne 1 ]; then + usage $stderr $badusage +fi + +if [ "${1}" = '-h' ]; then + usage $stdout $success +fi + +# populate variables from packaging metadata file +# shellcheck source=/dev/null +source /buildfiles/pkgvars + +# set default values for certain packaging variables +declare pkglatest # to make shellcheck happy +pkgname="${rpm_pkgname:-${pkgname}}" +hubproj="${hubproj:-${pkgname}}" +nightlyref="${nightlyref:-master}" +releasepg="${releasepg:-11,12,13}" +nightlypg="${nightlypg:-${releasepg}}" +versioning="${versioning:-simple}" +if [[ "${pkglatest}" == *"beta"* ]]; then + release_type="beta" +else + release_type="stable" +fi + +if [ -z "${pkglatest}" ]; then + echo "$0: pkgvars file must specify a value for pkglatest" >&2 + exit $noinput +fi + +echo "header=\"Authorization: token ${GITHUB_TOKEN}\"" > ~/.curlrc + +name=$(determine_name) +email=$(determine_email) +export RPM_PACKAGER="${name} <${email}>" + +cp "/buildfiles/${pkgname}.spec" /buildfiles/rpmlintrc "${builddir}" +repopath="citusdata/${hubproj}" + +case "${1}" in + release) + packageversion=${pkglatest%-*} + releasetag="v${packageversion%.citus}" + + # Since the only part of the release version after '-' character is fancy version, package release + # will alwayse be empty string. So the releasetag is always equal to packageversion + packagerelease=$(echo "${pkglatest#*-}" | sed -E 's/^[0-9.]+//') + if [ -n "${packagerelease}" ]; then + releasetag="v${packageversion}-${packagerelease}" + fi + + conf_extra_version="%{nil}" + + gitsha=$(curl -s "https://api.github.com/repos/${repopath}/git/refs/tags/${releasetag}" | \ + jq -r '.object.sha') + if [ "${gitsha}" == 'null' ]; then + echo "$0: could not determine commit for git tag ${releasetag}" >&2 + exit $failure + fi + + verified=$(curl -sH 'Accept:application/vnd.github.cryptographer-preview+sha' \ + "https://api.github.com/repos/${repopath}/git/tags/${gitsha}" | \ + jq -r '.verification.verified') + if [ "${verified}" != 'true' ]; then + echo "$0: could not verify signature for git tag ${releasetag}" >&2 + exit $failure + fi + ;; + *) + if [ "${1}" == 'nightly' ]; then + ref=${nightlyref} + infix='git' + else + ref=${1} + infix='pre' + fi + + setnextversion "${pkglatest}" + + set +e + gitsha=$(curl -sfH 'Accept:application/vnd.github.v3.sha' \ + "https://api.github.com/repos/${repopath}/commits/${ref}") + if [ "${?}" -ne 0 ]; then + echo "$0: could not determine commit for git ref ${ref}" >&2 + exit $failure + fi + set -e + + packageversion="${nextversion}.citus" + timestamp=$(date +'%Y%m%d') + packagesuffix="${infix}.${timestamp}.${gitsha:0:7}" + packagerelease="0.0.${packagesuffix}" + conf_extra_version="+${packagesuffix}" + + sed -i -E -e "/^Version:/s/[^ \\t]*$/${packageversion}/" \ + -e "/^Release:/s/[^ \\t]*$/${packagerelease}%{dist}/" \ + "${builddir}/${pkgname}.spec" + ;; +esac + +# this should all take place in a package-build directory +rpmbuilddir="${builddir}/citus-rpm-build" +mkdir -p "${rpmbuilddir}" + +pkgsrcdir="${builddir}/${pkgname}-${packageversion}" +mkdir "${pkgsrcdir}" + +download=$(mktemp) +tarballurl="https://api.github.com/repos/${repopath}/tarball/${gitsha}" +curl -sL "${tarballurl}" -o "${download}" + +tarballpath="${rpmbuilddir}/${gitsha}" +tar xf "${download}" -C "${pkgsrcdir}" --strip-components 1 + +# git metadata needs to be setup to initialize submodules +# in repos which rely on git submodules +if [[ -f "${pkgsrcdir}/.gitmodules" ]]; then + setup_submodules "${pkgsrcdir}" +fi + +tar czf "${tarballpath}" "${pkgsrcdir}" + +# force our URL and expanded folder names into spec +sed -i -E -e "\\|^Source0:|s|https:.*|${tarballurl}|" \ + -e "/^%global pgmajorversion/s/[0-9]+$/${PGVERSION//'.'/}/" \ + -e "/^%global pgpackageversion/s/[0-9.]+$/${PGVERSION}/" \ + "${builddir}/${pkgname}.spec" + +os_name=$(awk '{print $1}' /etc/system-release) +os_release=$(awk '{print $4}' /etc/system-release) +if [ "${os_name}" == 'Oracle' ]; then + locale='C' +elif [ "${os_name}" == 'Fedora' ] || [[ "${os_name}" == 'CentOS' && "${os_release}" == 8* ]]; then + locale='C.utf8' +else + locale='en_US.utf8' +fi + +# add minor/major version to package name if using fancy versioning +if [ "${versioning}" == 'fancy' ]; then + infix=$(echo "${packageversion}" | grep -oE '^[0-9]+\.[0-9]+' | tr -d '.') + if [ "${release_type}" == "stable" ]; then + package_prefix="${infix}" + else + package_prefix="${infix}_${release_type}" + fi + sed -i -E "1i %global pkginfix ${package_prefix}" "${builddir}/${pkgname}.spec" +fi + +# add a changelog entry into nightly build +case "${1}" in + release) + # Changelogs for release builds are being added by packaging scripts and could not be autogenerated + # Therefore there is nothing to do for release builds + ;; + nightly) + msg="Nightly package. Built from ${nightlyref} " + msg+=$(date +'on %l:%M %p (%Z) on %A, %B %Y' | tr -s ' ') + LC_ALL=${locale} rpmdev-bumpspec -c "${msg}" "${builddir}/${pkgname}.spec" + sed -i -E 's/0.1.git/0.0.git/' "${builddir}/${pkgname}.spec" + sed -i -E "1i %global pkginfix ${package_prefix}" "${builddir}/${pkgname}.spec" + ;; + *) + msg="Custom package. Built from ${gitsha:0:7} " + msg+=$(date +'on %l:%M %p (%Z) on %A, %B %Y' | tr -s ' ') + LC_ALL=${locale} rpmdev-bumpspec -c "${msg}" "${builddir}/${pkgname}.spec" + sed -i -E 's/0.1.pre/0.0.pre/' "${builddir}/${pkgname}.spec" + ;; +esac + +# Enable gcc8 on distros that have it +if [ -f /opt/rh/devtoolset-8/enable ]; then + set +u + # shellcheck source=/dev/null + source /opt/rh/devtoolset-8/enable + set -u +fi + +rpmbuild --define "_sourcedir ${rpmbuilddir}" \ +--define "_specdir ${rpmbuilddir}" \ +--define "_builddir ${rpmbuilddir}" \ +--define "_srcrpmdir ${rpmbuilddir}" \ +--define "_rpmdir ${rpmbuilddir}" \ +--define "conf_extra_version ${conf_extra_version}" \ +-bb "${builddir}/${pkgname}.spec" + +cp /citus-rpm-build/x86_64/*.rpm /packages diff --git a/dockerfiles/oraclelinux-6-pg15/scripts/setup_submodules b/dockerfiles/oraclelinux-9-pg15/scripts/setup_submodules similarity index 100% rename from dockerfiles/oraclelinux-6-pg15/scripts/setup_submodules rename to dockerfiles/oraclelinux-9-pg15/scripts/setup_submodules diff --git a/dockerfiles/rpmsigner/Dockerfile b/dockerfiles/rpmsigner/Dockerfile deleted file mode 100644 index 440338add..000000000 --- a/dockerfiles/rpmsigner/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# vim:set ft=dockerfile: -FROM centos:7 - -# FIXME: Hack around docker/docker#10180 -RUN ( yum install -y yum-plugin-ovl || yum install -y yum-plugin-ovl ) \ - && yum clean all - -# install signing tools -RUN yum install -y expect rpm-sign \ - && yum clean all - - -RUN echo '%_gpg_name Citus Data ' >> /etc/rpm/macros - -# set PostgreSQL version, place scripts on path, and declare output volume -ENV PATH=/scripts:$PATH -COPY scripts /scripts -VOLUME /packages - -ENTRYPOINT ["/scripts/import_and_sign"] diff --git a/dockerfiles/rpmsigner/scripts/import_and_sign b/dockerfiles/rpmsigner/scripts/import_and_sign deleted file mode 100755 index 560eea644..000000000 --- a/dockerfiles/rpmsigner/scripts/import_and_sign +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# make bash behave -set -uo pipefail -IFS=$'\n\t' - -# constants -badconfig=78 - -if [ -z "${PACKAGING_PASSPHRASE+x}" ]; then - echo "$0: passphrase not set" >&2 - exit $badconfig -elif [ -z "${PACKAGING_SECRET_KEY+x}" ]; then - echo "$0: secret key not set" >&2 - exit $badconfig -fi - -gpg2 --batch --no-tty --trust-model always \ - --import <(echo "${PACKAGING_SECRET_KEY}" | base64 -d) - -sign_rpm /packages/*/*.rpm diff --git a/dockerfiles/rpmsigner/scripts/sign_rpm b/dockerfiles/rpmsigner/scripts/sign_rpm deleted file mode 100755 index d77874e78..000000000 --- a/dockerfiles/rpmsigner/scripts/sign_rpm +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/expect -- -set timeout -1 - -spawn rpmsign --addsign {*}$argv - -expect -exact "Enter pass phrase: " -send -- "$env(PACKAGING_PASSPHRASE)\r" -expect eof diff --git a/dockerfiles/ubuntu-jammy-all/scripts/determine_email b/dockerfiles/ubuntu-jammy-all/scripts/determine_email old mode 100644 new mode 100755 diff --git a/dockerfiles/ubuntu-jammy-all/scripts/determine_name b/dockerfiles/ubuntu-jammy-all/scripts/determine_name old mode 100644 new mode 100755 diff --git a/dockerfiles/ubuntu-jammy-all/scripts/fetch_and_build_deb b/dockerfiles/ubuntu-jammy-all/scripts/fetch_and_build_deb old mode 100644 new mode 100755 diff --git a/os-list.csv b/os-list.csv index 7f569da87..020261e31 100644 --- a/os-list.csv +++ b/os-list.csv @@ -1,12 +1,11 @@ centos,8 centos,7 -debian,buster -debian,stretch debian,bullseye +debian,buster +oraclelinux,9 oraclelinux,8 oraclelinux,7 -oraclelinux,6 +ubuntu,jammy ubuntu,focal ubuntu,bionic -ubuntu,jammy pgxn