Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .circleci/config.yml

This file was deleted.

9 changes: 9 additions & 0 deletions 14-3.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \
ENV POSTGIS_MAJOR=3
ENV POSTGIS_VERSION=3.5.2+dfsg-1.pgdg110+1

# Archived suite: deb.debian.org and apt.postgresql.org no longer serve it.
RUN set -eux; \
mv /etc/apt/sources.list.d/pgdg.list /tmp/pgdg.list.disabled; \
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
sed 's|http://apt.postgresql.org/pub/repos/apt/|https://apt-archive.postgresql.org/pub/repos/apt/|' /tmp/pgdg.list.disabled > /etc/apt/sources.list.d/pgdg.list; \
rm -f /tmp/pgdg.list.disabled; \
rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
&& apt-get install -y --no-install-recommends \
Expand Down
9 changes: 9 additions & 0 deletions 15-3.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \
ENV POSTGIS_MAJOR=3
ENV POSTGIS_VERSION=3.5.2+dfsg-1.pgdg110+1

# Archived suite: deb.debian.org and apt.postgresql.org no longer serve it.
RUN set -eux; \
mv /etc/apt/sources.list.d/pgdg.list /tmp/pgdg.list.disabled; \
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
sed 's|http://apt.postgresql.org/pub/repos/apt/|https://apt-archive.postgresql.org/pub/repos/apt/|' /tmp/pgdg.list.disabled > /etc/apt/sources.list.d/pgdg.list; \
rm -f /tmp/pgdg.list.disabled; \
rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
&& apt-get install -y --no-install-recommends \
Expand Down
9 changes: 9 additions & 0 deletions 16-3.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \
ENV POSTGIS_MAJOR=3
ENV POSTGIS_VERSION=3.5.2+dfsg-1.pgdg110+1

# Archived suite: deb.debian.org and apt.postgresql.org no longer serve it.
RUN set -eux; \
mv /etc/apt/sources.list.d/pgdg.list /tmp/pgdg.list.disabled; \
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
sed 's|http://apt.postgresql.org/pub/repos/apt/|https://apt-archive.postgresql.org/pub/repos/apt/|' /tmp/pgdg.list.disabled > /etc/apt/sources.list.d/pgdg.list; \
rm -f /tmp/pgdg.list.disabled; \
rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
&& apt-get install -y --no-install-recommends \
Expand Down
9 changes: 9 additions & 0 deletions 17-3.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \
ENV POSTGIS_MAJOR=3
ENV POSTGIS_VERSION=3.5.2+dfsg-1.pgdg110+1

# Archived suite: deb.debian.org and apt.postgresql.org no longer serve it.
RUN set -eux; \
mv /etc/apt/sources.list.d/pgdg.list /tmp/pgdg.list.disabled; \
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
sed 's|http://apt.postgresql.org/pub/repos/apt/|https://apt-archive.postgresql.org/pub/repos/apt/|' /tmp/pgdg.list.disabled > /etc/apt/sources.list.d/pgdg.list; \
rm -f /tmp/pgdg.list.disabled; \
rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
&& apt-get install -y --no-install-recommends \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \
ENV POSTGIS_MAJOR=%%POSTGIS_MAJOR%%
ENV POSTGIS_VERSION=%%POSTGIS_VERSION%%

%%PGDG_APT_FIX%%
RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
&& apt-get install -y --no-install-recommends \
Expand Down
31 changes: 28 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,23 @@ declare -A postgisDebPkgNameVersionSuffixes=(
)

packagesBase='http://apt.postgresql.org/pub/repos/apt/dists/'
# Suites whose Debian and PGDG packages upstream moved to the archive mirrors
# after EOL; images generated for them must resolve apt from the archive hosts.
declare -A archivedSuitePdgDists=(
[bullseye]='https://apt-archive.postgresql.org/pub/repos/apt/dists/'
)
archivedSuiteAptFix="$(cat <<'ARCHIVED_APT_FIX_EOF'
# Archived suite: deb.debian.org and apt.postgresql.org no longer serve it.
RUN set -eux; \
mv /etc/apt/sources.list.d/pgdg.list /tmp/pgdg.list.disabled; \
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
sed 's|http://apt.postgresql.org/pub/repos/apt/|https://apt-archive.postgresql.org/pub/repos/apt/|' /tmp/pgdg.list.disabled > /etc/apt/sources.list.d/pgdg.list; \
rm -f /tmp/pgdg.list.disabled; \
rm -rf /var/lib/apt/lists/*
ARCHIVED_APT_FIX_EOF
)"

cgalGitBranch='6.2.x-branch'
cgalGitHash="$(git ls-remote https://github.com/CGAL/cgal.git "heads/${cgalGitBranch}" | awk '{ print $1}')"
Expand Down Expand Up @@ -157,15 +174,16 @@ for version in "${versions[@]}"; do
tag="${debianSuite[$postgresVersionMain]:-$defaultDebianSuite}"
fi
suite="${tag%%-slim}"
pdgDists="${archivedSuitePdgDists[$suite]:-$packagesBase}"

if [ -z "${suitePackageList["$suite"]:+isset}" ]; then
suitePackageList["$suite"]="$(curl -fsSL "${packagesBase}/${suite}-pgdg/main/binary-amd64/Packages.bz2" | bunzip2)"
suitePackageList["$suite"]="$(curl -fsSL "${pdgDists%/}/${suite}-pgdg/main/binary-amd64/Packages.bz2" | bunzip2)"
fi
if [ -z "${suiteArches["$suite"]:+isset}" ]; then
suiteArches["$suite"]="$(curl -fsSL "${packagesBase}/${suite}-pgdg/Release" | awk -F ':[[:space:]]+' '$1 == "Architectures" { gsub(/[[:space:]]+/, "|", $2); print $2 }')"
suiteArches["$suite"]="$(curl -fsSL "${pdgDists%/}/${suite}-pgdg/Release" | awk -F ':[[:space:]]+' '$1 == "Architectures" { gsub(/[[:space:]]+/, "|", $2); print $2 }')"
fi

versionList="$(echo "${suitePackageList["$suite"]}"; curl -fsSL "${packagesBase}/${suite}-pgdg/${postgresVersionMain}/binary-amd64/Packages.bz2" | bunzip2)"
versionList="$(echo "${suitePackageList["$suite"]}"; curl -fsSL "${pdgDists%/}/${suite}-pgdg/${postgresVersionMain}/binary-amd64/Packages.bz2" | bunzip2)"
fullVersion="$(echo "$versionList" | awk -F ': ' '$1 == "Package" { pkg = $2 } $1 == "Version" && pkg == "postgresql-'"$postgresVersionMain"'" { print $2; exit }' || true)"

if [ "$suite" = "bullseye" ]; then
Expand Down Expand Up @@ -249,6 +267,13 @@ for version in "${versions[@]}"; do
fi
sed -i 's/%%TXT_AUTOGENERATED%%/'"$autogenerated"'/g; s/%%PG_MAJOR%%/'$postgresVersion'/g; s/%%POSTGIS_MAJOR%%/'$postgisMajor'/g; s/%%POSTGIS_VERSION%%/'$postgisFullVersion'/g; s/%%CGAL_GIT_BRANCH%%/'"$cgalGitBranch"'/g; s/%%POSTGIS_GIT_HASH%%/'$postgisGitHash'/g; s/%%H3_PG_GIT_HASH%%/'$h3PgGitHash'/g; s/%%ADDRESS_STANDARDIZER_GIT_HASH%%/'$addressStandardizerGitHash'/g; s/%%CGAL_GIT_HASH%%/'$cgalGitHash'/g; s/%%SFCGAL_GIT_HASH%%/'$sfcgalGitHash'/g; s/%%PROJ_GIT_HASH%%/'$projGitHash'/g; s/%%GDAL_GIT_HASH%%/'$gdalGitHash'/g; s/%%GEOS_GIT_HASH%%/'$geosGitHash'/g; s/%%BOOST_VERSION%%/'"$boostVersion"'/g; s/%%BOOST_CHRONO_VERSION%%/'"$boostChronoVersion"'/g; s/%%DEBIAN_VERSION%%/'"$suite"'/g;' "$version/Dockerfile"

if [ -n "${archivedSuitePdgDists[$suite]:-}" ]; then
PGDG_APT_FIX="$archivedSuiteAptFix" awk 'BEGIN { fix = ENVIRON["PGDG_APT_FIX"] } $0 == "%%PGDG_APT_FIX%%" { print fix; next } { print }' "$version/Dockerfile" > "$version/Dockerfile.tmp"
mv "$version/Dockerfile.tmp" "$version/Dockerfile"
else
sed -i '/%%PGDG_APT_FIX%%/d' "$version/Dockerfile"
fi

echo "| [postgis/postgis:${version}](${dockerhublink}${version}) | [Dockerfile](${githubrepolink}/${version}/Dockerfile) | debian:${suite} | ${postgresVersion} | ${postgisDocSrc} |" >> _dockerlists_${optimized}.md
)
fi
Expand Down
Loading