diff --git a/10/Dockerfile b/10/Dockerfile index c2a841772f..56f52bcf3b 100644 --- a/10/Dockerfile +++ b/10/Dockerfile @@ -90,6 +90,18 @@ RUN set -ex; \ # see note below about "*.pyc" files export PYTHONDONTWRITEBYTECODE=1; \ \ + { \ + echo 'Explanation: block installation of the "postgresql" metapackage, since it will almost always pull in something different than we expect'; \ + echo 'Package: postgresql'; \ + echo 'Pin: version *'; \ + echo 'Pin-Priority: -10'; \ + echo; \ + echo 'Explanation: block installation of Debian postgresql packages, since we only want upstream'; \ + echo 'Package: postgresql* libpq*'; \ + echo 'Pin: release o=Debian'; \ + echo 'Pin-Priority: -10'; \ + } > /etc/apt/preferences.d/postgres.pref; \ + \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ amd64 | i386 | ppc64el) \ diff --git a/11/Dockerfile b/11/Dockerfile index 792bc262ea..686777ae51 100644 --- a/11/Dockerfile +++ b/11/Dockerfile @@ -90,6 +90,18 @@ RUN set -ex; \ # see note below about "*.pyc" files export PYTHONDONTWRITEBYTECODE=1; \ \ + { \ + echo 'Explanation: block installation of the "postgresql" metapackage, since it will almost always pull in something different than we expect'; \ + echo 'Package: postgresql'; \ + echo 'Pin: version *'; \ + echo 'Pin-Priority: -10'; \ + echo; \ + echo 'Explanation: block installation of Debian postgresql packages, since we only want upstream'; \ + echo 'Package: postgresql* libpq*'; \ + echo 'Pin: release o=Debian'; \ + echo 'Pin-Priority: -10'; \ + } > /etc/apt/preferences.d/postgres.pref; \ + \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ amd64 | i386 | ppc64el) \ diff --git a/12/Dockerfile b/12/Dockerfile index e8d188449e..9ba8573188 100644 --- a/12/Dockerfile +++ b/12/Dockerfile @@ -90,6 +90,18 @@ RUN set -ex; \ # see note below about "*.pyc" files export PYTHONDONTWRITEBYTECODE=1; \ \ + { \ + echo 'Explanation: block installation of the "postgresql" metapackage, since it will almost always pull in something different than we expect'; \ + echo 'Package: postgresql'; \ + echo 'Pin: version *'; \ + echo 'Pin-Priority: -10'; \ + echo; \ + echo 'Explanation: block installation of Debian postgresql packages, since we only want upstream'; \ + echo 'Package: postgresql* libpq*'; \ + echo 'Pin: release o=Debian'; \ + echo 'Pin-Priority: -10'; \ + } > /etc/apt/preferences.d/postgres.pref; \ + \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ amd64 | arm64 | i386 | ppc64el) \ diff --git a/13/Dockerfile b/13/Dockerfile index 07c7252365..d01eb76d3a 100644 --- a/13/Dockerfile +++ b/13/Dockerfile @@ -90,6 +90,18 @@ RUN set -ex; \ # see note below about "*.pyc" files export PYTHONDONTWRITEBYTECODE=1; \ \ + { \ + echo 'Explanation: block installation of the "postgresql" metapackage, since it will almost always pull in something different than we expect'; \ + echo 'Package: postgresql'; \ + echo 'Pin: version *'; \ + echo 'Pin-Priority: -10'; \ + echo; \ + echo 'Explanation: block installation of Debian postgresql packages, since we only want upstream'; \ + echo 'Package: postgresql* libpq*'; \ + echo 'Pin: release o=Debian'; \ + echo 'Pin-Priority: -10'; \ + } > /etc/apt/preferences.d/postgres.pref; \ + \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ amd64 | arm64 | i386 | ppc64el) \ diff --git a/9.5/Dockerfile b/9.5/Dockerfile index 092a6b623e..383e9af61b 100644 --- a/9.5/Dockerfile +++ b/9.5/Dockerfile @@ -90,6 +90,18 @@ RUN set -ex; \ # see note below about "*.pyc" files export PYTHONDONTWRITEBYTECODE=1; \ \ + { \ + echo 'Explanation: block installation of the "postgresql" metapackage, since it will almost always pull in something different than we expect'; \ + echo 'Package: postgresql'; \ + echo 'Pin: version *'; \ + echo 'Pin-Priority: -10'; \ + echo; \ + echo 'Explanation: block installation of Debian postgresql packages, since we only want upstream'; \ + echo 'Package: postgresql* libpq*'; \ + echo 'Pin: release o=Debian'; \ + echo 'Pin-Priority: -10'; \ + } > /etc/apt/preferences.d/postgres.pref; \ + \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ amd64 | i386 | ppc64el) \ diff --git a/9.6/Dockerfile b/9.6/Dockerfile index 3a3d9bcd00..1719cdd9ee 100644 --- a/9.6/Dockerfile +++ b/9.6/Dockerfile @@ -90,6 +90,18 @@ RUN set -ex; \ # see note below about "*.pyc" files export PYTHONDONTWRITEBYTECODE=1; \ \ + { \ + echo 'Explanation: block installation of the "postgresql" metapackage, since it will almost always pull in something different than we expect'; \ + echo 'Package: postgresql'; \ + echo 'Pin: version *'; \ + echo 'Pin-Priority: -10'; \ + echo; \ + echo 'Explanation: block installation of Debian postgresql packages, since we only want upstream'; \ + echo 'Package: postgresql* libpq*'; \ + echo 'Pin: release o=Debian'; \ + echo 'Pin-Priority: -10'; \ + } > /etc/apt/preferences.d/postgres.pref; \ + \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ amd64 | i386 | ppc64el) \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 876229be59..ba6b9509ed 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -90,6 +90,18 @@ RUN set -ex; \ # see note below about "*.pyc" files export PYTHONDONTWRITEBYTECODE=1; \ \ + { \ + echo 'Explanation: block installation of the "postgresql" metapackage, since it will almost always pull in something different than we expect'; \ + echo 'Package: postgresql'; \ + echo 'Pin: version *'; \ + echo 'Pin-Priority: -10'; \ + echo; \ + echo 'Explanation: block installation of Debian postgresql packages, since we only want upstream'; \ + echo 'Package: postgresql* libpq*'; \ + echo 'Pin: release o=Debian'; \ + echo 'Pin-Priority: -10'; \ + } > /etc/apt/preferences.d/postgres.pref; \ + \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ %%ARCH_LIST%%) \