From 6e1ddf5a7b0ccd89890cb3756a9ef88e2ff9c629 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Mon, 15 Apr 2024 12:46:28 +0200 Subject: [PATCH] Move apt_prefs pins to respective images Change-Id: I9eb51e079fee1322bcaaf9d481cd7890aeb77696 --- docker/base/apt_preferences.debian | 8 -------- docker/base/apt_preferences.ubuntu | 8 -------- docker/rabbitmq/Dockerfile.j2 | 6 ++++++ docker/rabbitmq/apt_preferences_rabbitmq.debian | 7 +++++++ docker/rabbitmq/apt_preferences_rabbitmq.ubuntu | 7 +++++++ 5 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 docker/rabbitmq/apt_preferences_rabbitmq.debian create mode 100644 docker/rabbitmq/apt_preferences_rabbitmq.ubuntu diff --git a/docker/base/apt_preferences.debian b/docker/base/apt_preferences.debian index 99d2c9a4d4..5edb8814a4 100644 --- a/docker/base/apt_preferences.debian +++ b/docker/base/apt_preferences.debian @@ -1,11 +1,3 @@ -Package: rabbitmq-server -Pin: version 3.13.* -Pin-Priority: 1000 - -Package: erlang -Pin: version 26.2.* -Pin-Priority: 1000 - # NOTE(hrw): we do not want backports unless requested Package: * Pin: release n=bookworm-backports diff --git a/docker/base/apt_preferences.ubuntu b/docker/base/apt_preferences.ubuntu index 64b589362e..7cc49b4ad0 100644 --- a/docker/base/apt_preferences.ubuntu +++ b/docker/base/apt_preferences.ubuntu @@ -1,11 +1,3 @@ -Package: rabbitmq-server -Pin: version 3.13.* -Pin-Priority: 1000 - -Package: erlang -Pin: version 26.2.* -Pin-Priority: 1000 - Package: * Pin: origin dlm.mariadb.com Pin-Priority: 1000 diff --git a/docker/rabbitmq/Dockerfile.j2 b/docker/rabbitmq/Dockerfile.j2 index 444f29b50a..266b99db15 100644 --- a/docker/rabbitmq/Dockerfile.j2 +++ b/docker/rabbitmq/Dockerfile.j2 @@ -11,6 +11,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.enable_extra_repos(['crb', 'erlang', 'rabbitmq']) }} +{% block rabbitmq_apt_preferences %} +{% if base_package_type == 'deb' %} +COPY apt_preferences_rabbitmq.{{ base_distro }} /etc/apt/preferences.d/rabbitmq +{% endif %} +{% endblock %} + {% block rabbitmq_install %} {% if base_package_type == 'rpm' %} diff --git a/docker/rabbitmq/apt_preferences_rabbitmq.debian b/docker/rabbitmq/apt_preferences_rabbitmq.debian new file mode 100644 index 0000000000..0e71a4d362 --- /dev/null +++ b/docker/rabbitmq/apt_preferences_rabbitmq.debian @@ -0,0 +1,7 @@ +Package: rabbitmq-server +Pin: version 3.13.* +Pin-Priority: 1000 + +Package: erlang +Pin: version 26.2.* +Pin-Priority: 1000 diff --git a/docker/rabbitmq/apt_preferences_rabbitmq.ubuntu b/docker/rabbitmq/apt_preferences_rabbitmq.ubuntu new file mode 100644 index 0000000000..0e71a4d362 --- /dev/null +++ b/docker/rabbitmq/apt_preferences_rabbitmq.ubuntu @@ -0,0 +1,7 @@ +Package: rabbitmq-server +Pin: version 3.13.* +Pin-Priority: 1000 + +Package: erlang +Pin: version 26.2.* +Pin-Priority: 1000