From 6ef8010b6eb08e86403a4f9c50b4b364fab2eaf5 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 11 Feb 2022 16:30:40 -0800 Subject: [PATCH 1/2] Fix deb-build with newer packages that Build-Depends: postgresql-common See https://salsa.debian.org/postgresql/postgresql/-/commit/99f44476e258cae6bf9e919219fa2c5414fa2876 --- 10/bullseye/Dockerfile | 44 ++++++++++++++++++++++---------------- 10/stretch/Dockerfile | 44 ++++++++++++++++++++++---------------- 11/bullseye/Dockerfile | 44 ++++++++++++++++++++++---------------- 11/stretch/Dockerfile | 44 ++++++++++++++++++++++---------------- 12/bullseye/Dockerfile | 44 ++++++++++++++++++++++---------------- 13/bullseye/Dockerfile | 44 ++++++++++++++++++++++---------------- 14/bullseye/Dockerfile | 44 ++++++++++++++++++++++---------------- 9.6/bullseye/Dockerfile | 44 ++++++++++++++++++++++---------------- 9.6/stretch/Dockerfile | 44 ++++++++++++++++++++++---------------- Dockerfile-debian.template | 44 ++++++++++++++++++++++---------------- 10 files changed, 260 insertions(+), 180 deletions(-) diff --git a/10/bullseye/Dockerfile b/10/bullseye/Dockerfile index ec35493915..d4c98ba0e4 100644 --- a/10/bullseye/Dockerfile +++ b/10/bullseye/Dockerfile @@ -115,17 +115,31 @@ RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ \ -# build .deb files from upstream's source packages (which are verified by apt-get) +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ - apt-get build-dep -y \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ - DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \ - apt-get source --compile \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ + apt-get install -y --no-install-recommends dpkg-dev; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ + _update_repo() { \ + dpkg-scanpackages . > Packages; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + }; \ + _update_repo; \ + \ +# build .deb files from upstream's source packages (which are verified by apt-get) + nproc="$(nproc)"; \ + export DEB_BUILD_OPTIONS="nocheck parallel=$nproc"; \ +# we have to build postgresql-common first because postgresql-$PG_MAJOR shares "debian/rules" logic with it: https://salsa.debian.org/postgresql/postgresql/-/commit/99f44476e258cae6bf9e919219fa2c5414fa2876 +# (and it "Depends: pgdg-keyring") + apt-get build-dep -y postgresql-common pgdg-keyring; \ + apt-get source --compile postgresql-common pgdg-keyring; \ + _update_repo; \ + apt-get build-dep -y "postgresql-$PG_MAJOR=$PG_VERSION"; \ + apt-get source --compile "postgresql-$PG_MAJOR=$PG_VERSION"; \ + \ # we don't remove APT lists here because they get re-downloaded and removed later \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies @@ -133,16 +147,10 @@ RUN set -ex; \ apt-mark showmanual | xargs apt-mark auto > /dev/null; \ apt-mark manual $savedAptMark; \ \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) ls -lAFh; \ - dpkg-scanpackages . > Packages; \ + _update_repo; \ grep '^Package: ' Packages; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ + cd /; \ ;; \ esac; \ \ diff --git a/10/stretch/Dockerfile b/10/stretch/Dockerfile index 3774c0c66c..0fd06ac1c0 100644 --- a/10/stretch/Dockerfile +++ b/10/stretch/Dockerfile @@ -115,17 +115,31 @@ RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ \ -# build .deb files from upstream's source packages (which are verified by apt-get) +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ - apt-get build-dep -y \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ - DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \ - apt-get source --compile \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ + apt-get install -y --no-install-recommends dpkg-dev; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ + _update_repo() { \ + dpkg-scanpackages . > Packages; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + }; \ + _update_repo; \ + \ +# build .deb files from upstream's source packages (which are verified by apt-get) + nproc="$(nproc)"; \ + export DEB_BUILD_OPTIONS="nocheck parallel=$nproc"; \ +# we have to build postgresql-common first because postgresql-$PG_MAJOR shares "debian/rules" logic with it: https://salsa.debian.org/postgresql/postgresql/-/commit/99f44476e258cae6bf9e919219fa2c5414fa2876 +# (and it "Depends: pgdg-keyring") + apt-get build-dep -y postgresql-common pgdg-keyring; \ + apt-get source --compile postgresql-common pgdg-keyring; \ + _update_repo; \ + apt-get build-dep -y "postgresql-$PG_MAJOR=$PG_VERSION"; \ + apt-get source --compile "postgresql-$PG_MAJOR=$PG_VERSION"; \ + \ # we don't remove APT lists here because they get re-downloaded and removed later \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies @@ -133,16 +147,10 @@ RUN set -ex; \ apt-mark showmanual | xargs apt-mark auto > /dev/null; \ apt-mark manual $savedAptMark; \ \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) ls -lAFh; \ - dpkg-scanpackages . > Packages; \ + _update_repo; \ grep '^Package: ' Packages; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ + cd /; \ ;; \ esac; \ \ diff --git a/11/bullseye/Dockerfile b/11/bullseye/Dockerfile index 437405d0b5..d7aebb5e45 100644 --- a/11/bullseye/Dockerfile +++ b/11/bullseye/Dockerfile @@ -115,17 +115,31 @@ RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ \ -# build .deb files from upstream's source packages (which are verified by apt-get) +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ - apt-get build-dep -y \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ - DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \ - apt-get source --compile \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ + apt-get install -y --no-install-recommends dpkg-dev; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ + _update_repo() { \ + dpkg-scanpackages . > Packages; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + }; \ + _update_repo; \ + \ +# build .deb files from upstream's source packages (which are verified by apt-get) + nproc="$(nproc)"; \ + export DEB_BUILD_OPTIONS="nocheck parallel=$nproc"; \ +# we have to build postgresql-common first because postgresql-$PG_MAJOR shares "debian/rules" logic with it: https://salsa.debian.org/postgresql/postgresql/-/commit/99f44476e258cae6bf9e919219fa2c5414fa2876 +# (and it "Depends: pgdg-keyring") + apt-get build-dep -y postgresql-common pgdg-keyring; \ + apt-get source --compile postgresql-common pgdg-keyring; \ + _update_repo; \ + apt-get build-dep -y "postgresql-$PG_MAJOR=$PG_VERSION"; \ + apt-get source --compile "postgresql-$PG_MAJOR=$PG_VERSION"; \ + \ # we don't remove APT lists here because they get re-downloaded and removed later \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies @@ -133,16 +147,10 @@ RUN set -ex; \ apt-mark showmanual | xargs apt-mark auto > /dev/null; \ apt-mark manual $savedAptMark; \ \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) ls -lAFh; \ - dpkg-scanpackages . > Packages; \ + _update_repo; \ grep '^Package: ' Packages; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ + cd /; \ ;; \ esac; \ \ diff --git a/11/stretch/Dockerfile b/11/stretch/Dockerfile index ba4ef7d16d..ed859cdda8 100644 --- a/11/stretch/Dockerfile +++ b/11/stretch/Dockerfile @@ -118,17 +118,31 @@ RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ \ -# build .deb files from upstream's source packages (which are verified by apt-get) +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ - apt-get build-dep -y \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ - DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \ - apt-get source --compile \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ + apt-get install -y --no-install-recommends dpkg-dev; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ + _update_repo() { \ + dpkg-scanpackages . > Packages; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + }; \ + _update_repo; \ + \ +# build .deb files from upstream's source packages (which are verified by apt-get) + nproc="$(nproc)"; \ + export DEB_BUILD_OPTIONS="nocheck parallel=$nproc"; \ +# we have to build postgresql-common first because postgresql-$PG_MAJOR shares "debian/rules" logic with it: https://salsa.debian.org/postgresql/postgresql/-/commit/99f44476e258cae6bf9e919219fa2c5414fa2876 +# (and it "Depends: pgdg-keyring") + apt-get build-dep -y postgresql-common pgdg-keyring; \ + apt-get source --compile postgresql-common pgdg-keyring; \ + _update_repo; \ + apt-get build-dep -y "postgresql-$PG_MAJOR=$PG_VERSION"; \ + apt-get source --compile "postgresql-$PG_MAJOR=$PG_VERSION"; \ + \ # we don't remove APT lists here because they get re-downloaded and removed later \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies @@ -136,16 +150,10 @@ RUN set -ex; \ apt-mark showmanual | xargs apt-mark auto > /dev/null; \ apt-mark manual $savedAptMark; \ \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) ls -lAFh; \ - dpkg-scanpackages . > Packages; \ + _update_repo; \ grep '^Package: ' Packages; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ + cd /; \ ;; \ esac; \ \ diff --git a/12/bullseye/Dockerfile b/12/bullseye/Dockerfile index 19e7f2771c..1bf1ae36b2 100644 --- a/12/bullseye/Dockerfile +++ b/12/bullseye/Dockerfile @@ -115,17 +115,31 @@ RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ \ -# build .deb files from upstream's source packages (which are verified by apt-get) +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ - apt-get build-dep -y \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ - DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \ - apt-get source --compile \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ + apt-get install -y --no-install-recommends dpkg-dev; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ + _update_repo() { \ + dpkg-scanpackages . > Packages; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + }; \ + _update_repo; \ + \ +# build .deb files from upstream's source packages (which are verified by apt-get) + nproc="$(nproc)"; \ + export DEB_BUILD_OPTIONS="nocheck parallel=$nproc"; \ +# we have to build postgresql-common first because postgresql-$PG_MAJOR shares "debian/rules" logic with it: https://salsa.debian.org/postgresql/postgresql/-/commit/99f44476e258cae6bf9e919219fa2c5414fa2876 +# (and it "Depends: pgdg-keyring") + apt-get build-dep -y postgresql-common pgdg-keyring; \ + apt-get source --compile postgresql-common pgdg-keyring; \ + _update_repo; \ + apt-get build-dep -y "postgresql-$PG_MAJOR=$PG_VERSION"; \ + apt-get source --compile "postgresql-$PG_MAJOR=$PG_VERSION"; \ + \ # we don't remove APT lists here because they get re-downloaded and removed later \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies @@ -133,16 +147,10 @@ RUN set -ex; \ apt-mark showmanual | xargs apt-mark auto > /dev/null; \ apt-mark manual $savedAptMark; \ \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) ls -lAFh; \ - dpkg-scanpackages . > Packages; \ + _update_repo; \ grep '^Package: ' Packages; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ + cd /; \ ;; \ esac; \ \ diff --git a/13/bullseye/Dockerfile b/13/bullseye/Dockerfile index 97c1e9ad69..b10fdda9e4 100644 --- a/13/bullseye/Dockerfile +++ b/13/bullseye/Dockerfile @@ -115,19 +115,33 @@ RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ \ -# build .deb files from upstream's source packages (which are verified by apt-get) +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ + apt-get install -y --no-install-recommends dpkg-dev; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ + _update_repo() { \ + dpkg-scanpackages . > Packages; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + }; \ + _update_repo; \ + \ +# build .deb files from upstream's source packages (which are verified by apt-get) + nproc="$(nproc)"; \ + export DEB_BUILD_OPTIONS="nocheck parallel=$nproc"; \ +# we have to build postgresql-common first because postgresql-$PG_MAJOR shares "debian/rules" logic with it: https://salsa.debian.org/postgresql/postgresql/-/commit/99f44476e258cae6bf9e919219fa2c5414fa2876 +# (and it "Depends: pgdg-keyring") + apt-get build-dep -y postgresql-common pgdg-keyring; \ + apt-get source --compile postgresql-common pgdg-keyring; \ + _update_repo; \ # we need DEBIAN_FRONTEND on postgresql-13 for slapd ("Please enter the password for the admin entry in your LDAP directory."); see https://bugs.debian.org/929417 DEBIAN_FRONTEND=noninteractive \ - apt-get build-dep -y \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ - DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \ - apt-get source --compile \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ + apt-get build-dep -y "postgresql-$PG_MAJOR=$PG_VERSION"; \ + apt-get source --compile "postgresql-$PG_MAJOR=$PG_VERSION"; \ + \ # we don't remove APT lists here because they get re-downloaded and removed later \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies @@ -135,16 +149,10 @@ RUN set -ex; \ apt-mark showmanual | xargs apt-mark auto > /dev/null; \ apt-mark manual $savedAptMark; \ \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) ls -lAFh; \ - dpkg-scanpackages . > Packages; \ + _update_repo; \ grep '^Package: ' Packages; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ + cd /; \ ;; \ esac; \ \ diff --git a/14/bullseye/Dockerfile b/14/bullseye/Dockerfile index aea484dbd0..0b2ad5fadd 100644 --- a/14/bullseye/Dockerfile +++ b/14/bullseye/Dockerfile @@ -115,17 +115,31 @@ RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ \ -# build .deb files from upstream's source packages (which are verified by apt-get) +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ - apt-get build-dep -y \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ - DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \ - apt-get source --compile \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ + apt-get install -y --no-install-recommends dpkg-dev; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ + _update_repo() { \ + dpkg-scanpackages . > Packages; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + }; \ + _update_repo; \ + \ +# build .deb files from upstream's source packages (which are verified by apt-get) + nproc="$(nproc)"; \ + export DEB_BUILD_OPTIONS="nocheck parallel=$nproc"; \ +# we have to build postgresql-common first because postgresql-$PG_MAJOR shares "debian/rules" logic with it: https://salsa.debian.org/postgresql/postgresql/-/commit/99f44476e258cae6bf9e919219fa2c5414fa2876 +# (and it "Depends: pgdg-keyring") + apt-get build-dep -y postgresql-common pgdg-keyring; \ + apt-get source --compile postgresql-common pgdg-keyring; \ + _update_repo; \ + apt-get build-dep -y "postgresql-$PG_MAJOR=$PG_VERSION"; \ + apt-get source --compile "postgresql-$PG_MAJOR=$PG_VERSION"; \ + \ # we don't remove APT lists here because they get re-downloaded and removed later \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies @@ -133,16 +147,10 @@ RUN set -ex; \ apt-mark showmanual | xargs apt-mark auto > /dev/null; \ apt-mark manual $savedAptMark; \ \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) ls -lAFh; \ - dpkg-scanpackages . > Packages; \ + _update_repo; \ grep '^Package: ' Packages; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ + cd /; \ ;; \ esac; \ \ diff --git a/9.6/bullseye/Dockerfile b/9.6/bullseye/Dockerfile index 975bbda872..ad2776ef0f 100644 --- a/9.6/bullseye/Dockerfile +++ b/9.6/bullseye/Dockerfile @@ -115,17 +115,31 @@ RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ \ -# build .deb files from upstream's source packages (which are verified by apt-get) +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ - apt-get build-dep -y \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ - DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \ - apt-get source --compile \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ + apt-get install -y --no-install-recommends dpkg-dev; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ + _update_repo() { \ + dpkg-scanpackages . > Packages; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + }; \ + _update_repo; \ + \ +# build .deb files from upstream's source packages (which are verified by apt-get) + nproc="$(nproc)"; \ + export DEB_BUILD_OPTIONS="nocheck parallel=$nproc"; \ +# we have to build postgresql-common first because postgresql-$PG_MAJOR shares "debian/rules" logic with it: https://salsa.debian.org/postgresql/postgresql/-/commit/99f44476e258cae6bf9e919219fa2c5414fa2876 +# (and it "Depends: pgdg-keyring") + apt-get build-dep -y postgresql-common pgdg-keyring; \ + apt-get source --compile postgresql-common pgdg-keyring; \ + _update_repo; \ + apt-get build-dep -y "postgresql-$PG_MAJOR=$PG_VERSION"; \ + apt-get source --compile "postgresql-$PG_MAJOR=$PG_VERSION"; \ + \ # we don't remove APT lists here because they get re-downloaded and removed later \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies @@ -133,16 +147,10 @@ RUN set -ex; \ apt-mark showmanual | xargs apt-mark auto > /dev/null; \ apt-mark manual $savedAptMark; \ \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) ls -lAFh; \ - dpkg-scanpackages . > Packages; \ + _update_repo; \ grep '^Package: ' Packages; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ + cd /; \ ;; \ esac; \ \ diff --git a/9.6/stretch/Dockerfile b/9.6/stretch/Dockerfile index ece1e70555..1ae8d9c32f 100644 --- a/9.6/stretch/Dockerfile +++ b/9.6/stretch/Dockerfile @@ -115,17 +115,31 @@ RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ \ -# build .deb files from upstream's source packages (which are verified by apt-get) +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ - apt-get build-dep -y \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ - DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \ - apt-get source --compile \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ + apt-get install -y --no-install-recommends dpkg-dev; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ + _update_repo() { \ + dpkg-scanpackages . > Packages; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + }; \ + _update_repo; \ + \ +# build .deb files from upstream's source packages (which are verified by apt-get) + nproc="$(nproc)"; \ + export DEB_BUILD_OPTIONS="nocheck parallel=$nproc"; \ +# we have to build postgresql-common first because postgresql-$PG_MAJOR shares "debian/rules" logic with it: https://salsa.debian.org/postgresql/postgresql/-/commit/99f44476e258cae6bf9e919219fa2c5414fa2876 +# (and it "Depends: pgdg-keyring") + apt-get build-dep -y postgresql-common pgdg-keyring; \ + apt-get source --compile postgresql-common pgdg-keyring; \ + _update_repo; \ + apt-get build-dep -y "postgresql-$PG_MAJOR=$PG_VERSION"; \ + apt-get source --compile "postgresql-$PG_MAJOR=$PG_VERSION"; \ + \ # we don't remove APT lists here because they get re-downloaded and removed later \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies @@ -133,16 +147,10 @@ RUN set -ex; \ apt-mark showmanual | xargs apt-mark auto > /dev/null; \ apt-mark manual $savedAptMark; \ \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) ls -lAFh; \ - dpkg-scanpackages . > Packages; \ + _update_repo; \ grep '^Package: ' Packages; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ + cd /; \ ;; \ esac; \ \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index e504a6762a..3228be81f3 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -114,21 +114,35 @@ RUN set -ex; \ \ savedAptMark="$(apt-mark showmanual)"; \ \ -# build .deb files from upstream's source packages (which are verified by apt-get) +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ + apt-get install -y --no-install-recommends dpkg-dev; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ + _update_repo() { \ + dpkg-scanpackages . > Packages; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + }; \ + _update_repo; \ + \ +# build .deb files from upstream's source packages (which are verified by apt-get) + nproc="$(nproc)"; \ + export DEB_BUILD_OPTIONS="nocheck parallel=$nproc"; \ +# we have to build postgresql-common first because postgresql-$PG_MAJOR shares "debian/rules" logic with it: https://salsa.debian.org/postgresql/postgresql/-/commit/99f44476e258cae6bf9e919219fa2c5414fa2876 +# (and it "Depends: pgdg-keyring") + apt-get build-dep -y postgresql-common pgdg-keyring; \ + apt-get source --compile postgresql-common pgdg-keyring; \ + _update_repo; \ {{ if .major == 13 then ( -}} # we need DEBIAN_FRONTEND on postgresql-13 for slapd ("Please enter the password for the admin entry in your LDAP directory."); see https://bugs.debian.org/929417 DEBIAN_FRONTEND=noninteractive \ {{ ) else "" end -}} - apt-get build-dep -y \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ - DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" \ - apt-get source --compile \ - postgresql-common pgdg-keyring \ - "postgresql-$PG_MAJOR=$PG_VERSION" \ - ; \ + apt-get build-dep -y "postgresql-$PG_MAJOR=$PG_VERSION"; \ + apt-get source --compile "postgresql-$PG_MAJOR=$PG_VERSION"; \ + \ # we don't remove APT lists here because they get re-downloaded and removed later \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies @@ -136,16 +150,10 @@ RUN set -ex; \ apt-mark showmanual | xargs apt-mark auto > /dev/null; \ apt-mark manual $savedAptMark; \ \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) ls -lAFh; \ - dpkg-scanpackages . > Packages; \ + _update_repo; \ grep '^Package: ' Packages; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ + cd /; \ ;; \ esac; \ \ From 72e336d9d34a9efb69854d7e544fb9343c43a77a Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 11 Feb 2022 16:50:10 -0800 Subject: [PATCH 2/2] Also add "clang-6.0" explicitly on stretch builds of 11+ See https://salsa.debian.org/postgresql/postgresql/-/commit/e914bb060a9b58dae661f1c3439de5ffe4ba62d0 (and the Dockerfile comment). --- 10/bullseye/Dockerfile | 4 ++-- 10/stretch/Dockerfile | 4 ++-- 11/bullseye/Dockerfile | 4 ++-- 11/stretch/Dockerfile | 7 +++++-- 12/bullseye/Dockerfile | 4 ++-- 13/bullseye/Dockerfile | 4 ++-- 14/bullseye/Dockerfile | 4 ++-- 9.6/bullseye/Dockerfile | 4 ++-- 9.6/stretch/Dockerfile | 4 ++-- Dockerfile-debian.template | 7 +++++-- 10 files changed, 26 insertions(+), 20 deletions(-) diff --git a/10/bullseye/Dockerfile b/10/bullseye/Dockerfile index d4c98ba0e4..a30f944695 100644 --- a/10/bullseye/Dockerfile +++ b/10/bullseye/Dockerfile @@ -110,11 +110,11 @@ RUN set -ex; \ # let's build binaries from their published source packages echo "deb-src $aptRepo" > /etc/apt/sources.list.d/pgdg.list; \ \ + savedAptMark="$(apt-mark showmanual)"; \ + \ tempDir="$(mktemp -d)"; \ cd "$tempDir"; \ \ - savedAptMark="$(apt-mark showmanual)"; \ - \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ apt-get install -y --no-install-recommends dpkg-dev; \ diff --git a/10/stretch/Dockerfile b/10/stretch/Dockerfile index 0fd06ac1c0..2e60a4abc1 100644 --- a/10/stretch/Dockerfile +++ b/10/stretch/Dockerfile @@ -110,11 +110,11 @@ RUN set -ex; \ # let's build binaries from their published source packages echo "deb-src $aptRepo" > /etc/apt/sources.list.d/pgdg.list; \ \ + savedAptMark="$(apt-mark showmanual)"; \ + \ tempDir="$(mktemp -d)"; \ cd "$tempDir"; \ \ - savedAptMark="$(apt-mark showmanual)"; \ - \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ apt-get install -y --no-install-recommends dpkg-dev; \ diff --git a/11/bullseye/Dockerfile b/11/bullseye/Dockerfile index d7aebb5e45..5cf480b37d 100644 --- a/11/bullseye/Dockerfile +++ b/11/bullseye/Dockerfile @@ -110,11 +110,11 @@ RUN set -ex; \ # let's build binaries from their published source packages echo "deb-src $aptRepo" > /etc/apt/sources.list.d/pgdg.list; \ \ + savedAptMark="$(apt-mark showmanual)"; \ + \ tempDir="$(mktemp -d)"; \ cd "$tempDir"; \ \ - savedAptMark="$(apt-mark showmanual)"; \ - \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ apt-get install -y --no-install-recommends dpkg-dev; \ diff --git a/11/stretch/Dockerfile b/11/stretch/Dockerfile index ed859cdda8..bd2c0c5a2f 100644 --- a/11/stretch/Dockerfile +++ b/11/stretch/Dockerfile @@ -110,14 +110,17 @@ RUN set -ex; \ # let's build binaries from their published source packages echo "deb-src $aptRepo" > /etc/apt/sources.list.d/pgdg.list; \ \ + savedAptMark="$(apt-mark showmanual)"; \ + \ # https://github.com/docker-library/postgres/issues/484 (clang-6.0 required, only available in stretch-backports) echo 'deb http://deb.debian.org/debian stretch-backports main' >> /etc/apt/sources.list.d/pgdg.list; \ +# ... and thanks to https://salsa.debian.org/postgresql/postgresql/-/commit/e914bb060a9b58dae661f1c3439de5ffe4ba62d0 it doesn't get pulled in automatically any more (but if we install it manually it gets used by the build appropriately 🙈) + apt-get update; \ + apt-get install -y --no-install-recommends clang-6.0; \ \ tempDir="$(mktemp -d)"; \ cd "$tempDir"; \ \ - savedAptMark="$(apt-mark showmanual)"; \ - \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ apt-get install -y --no-install-recommends dpkg-dev; \ diff --git a/12/bullseye/Dockerfile b/12/bullseye/Dockerfile index 1bf1ae36b2..24bdb6fd53 100644 --- a/12/bullseye/Dockerfile +++ b/12/bullseye/Dockerfile @@ -110,11 +110,11 @@ RUN set -ex; \ # let's build binaries from their published source packages echo "deb-src $aptRepo" > /etc/apt/sources.list.d/pgdg.list; \ \ + savedAptMark="$(apt-mark showmanual)"; \ + \ tempDir="$(mktemp -d)"; \ cd "$tempDir"; \ \ - savedAptMark="$(apt-mark showmanual)"; \ - \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ apt-get install -y --no-install-recommends dpkg-dev; \ diff --git a/13/bullseye/Dockerfile b/13/bullseye/Dockerfile index b10fdda9e4..2cc6e62029 100644 --- a/13/bullseye/Dockerfile +++ b/13/bullseye/Dockerfile @@ -110,11 +110,11 @@ RUN set -ex; \ # let's build binaries from their published source packages echo "deb-src $aptRepo" > /etc/apt/sources.list.d/pgdg.list; \ \ + savedAptMark="$(apt-mark showmanual)"; \ + \ tempDir="$(mktemp -d)"; \ cd "$tempDir"; \ \ - savedAptMark="$(apt-mark showmanual)"; \ - \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ apt-get install -y --no-install-recommends dpkg-dev; \ diff --git a/14/bullseye/Dockerfile b/14/bullseye/Dockerfile index 0b2ad5fadd..baff4ca137 100644 --- a/14/bullseye/Dockerfile +++ b/14/bullseye/Dockerfile @@ -110,11 +110,11 @@ RUN set -ex; \ # let's build binaries from their published source packages echo "deb-src $aptRepo" > /etc/apt/sources.list.d/pgdg.list; \ \ + savedAptMark="$(apt-mark showmanual)"; \ + \ tempDir="$(mktemp -d)"; \ cd "$tempDir"; \ \ - savedAptMark="$(apt-mark showmanual)"; \ - \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ apt-get install -y --no-install-recommends dpkg-dev; \ diff --git a/9.6/bullseye/Dockerfile b/9.6/bullseye/Dockerfile index ad2776ef0f..d57ba05c72 100644 --- a/9.6/bullseye/Dockerfile +++ b/9.6/bullseye/Dockerfile @@ -110,11 +110,11 @@ RUN set -ex; \ # let's build binaries from their published source packages echo "deb-src $aptRepo" > /etc/apt/sources.list.d/pgdg.list; \ \ + savedAptMark="$(apt-mark showmanual)"; \ + \ tempDir="$(mktemp -d)"; \ cd "$tempDir"; \ \ - savedAptMark="$(apt-mark showmanual)"; \ - \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ apt-get install -y --no-install-recommends dpkg-dev; \ diff --git a/9.6/stretch/Dockerfile b/9.6/stretch/Dockerfile index 1ae8d9c32f..bd97fed3e5 100644 --- a/9.6/stretch/Dockerfile +++ b/9.6/stretch/Dockerfile @@ -110,11 +110,11 @@ RUN set -ex; \ # let's build binaries from their published source packages echo "deb-src $aptRepo" > /etc/apt/sources.list.d/pgdg.list; \ \ + savedAptMark="$(apt-mark showmanual)"; \ + \ tempDir="$(mktemp -d)"; \ cd "$tempDir"; \ \ - savedAptMark="$(apt-mark showmanual)"; \ - \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ apt-get install -y --no-install-recommends dpkg-dev; \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 3228be81f3..39ae69fbd4 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -104,16 +104,19 @@ RUN set -ex; \ # let's build binaries from their published source packages echo "deb-src $aptRepo" > /etc/apt/sources.list.d/pgdg.list; \ \ + savedAptMark="$(apt-mark showmanual)"; \ + \ {{ if env.variant == "stretch" and .major >= 11 then ( -}} # https://github.com/docker-library/postgres/issues/484 (clang-6.0 required, only available in stretch-backports) echo 'deb http://deb.debian.org/debian {{ env.variant }}-backports main' >> /etc/apt/sources.list.d/pgdg.list; \ +# ... and thanks to https://salsa.debian.org/postgresql/postgresql/-/commit/e914bb060a9b58dae661f1c3439de5ffe4ba62d0 it doesn't get pulled in automatically any more (but if we install it manually it gets used by the build appropriately 🙈) + apt-get update; \ + apt-get install -y --no-install-recommends clang-6.0; \ \ {{ ) else "" end -}} tempDir="$(mktemp -d)"; \ cd "$tempDir"; \ \ - savedAptMark="$(apt-mark showmanual)"; \ - \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) apt-get update; \ apt-get install -y --no-install-recommends dpkg-dev; \