Skip to content

Commit

Permalink
Move apt_prefs pins to respective images
Browse files Browse the repository at this point in the history
This commit also contains a fix from
I64e9442545d98364585e3c632ae9142cd6b4f9bf

The two backports are combined as both are required for successful
builds of rabbitmq and kolla-toolbox

Closes-Bug: #2066171
Change-Id: I9eb51e079fee1322bcaaf9d481cd7890aeb77696
(cherry picked from commit 6e1ddf5)
  • Loading branch information
mnasiadka authored and MoteHue committed Jul 12, 2024
1 parent 46989bd commit 0f6b1a2
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 8 deletions.
4 changes: 0 additions & 4 deletions docker/base/apt_preferences.debian
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Package: rabbitmq-server
Pin: version 3.11.*
Pin-Priority: 1000

# NOTE(hrw): we do not want backports unless requested
Package: *
Pin: release n=bullseye-backports
Expand Down
4 changes: 0 additions & 4 deletions docker/base/apt_preferences.ubuntu
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Package: rabbitmq-server
Pin: version 3.11.*
Pin-Priority: 1000

Package: *
Pin: origin dlm.mariadb.com
Pin-Priority: 1000
6 changes: 6 additions & 0 deletions docker/kolla-toolbox/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build

{{ macros.enable_extra_repos(['crb', 'erlang', 'openvswitch', 'rabbitmq']) }}

{% block rabbitmq_apt_preferences %}
{% if base_package_type == 'deb' %}
COPY apt_preferences_rabbitmq.{{ base_distro }} /etc/apt/preferences.d/rabbitmq
{% endif %}
{% endblock %}

{% if base_package_type == 'rpm' %}

{% set kolla_toolbox_packages = [
Expand Down
1 change: 1 addition & 0 deletions docker/kolla-toolbox/apt_preferences_rabbitmq.debian
1 change: 1 addition & 0 deletions docker/kolla-toolbox/apt_preferences_rabbitmq.ubuntu
6 changes: 6 additions & 0 deletions docker/rabbitmq/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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' %}

Expand Down
7 changes: 7 additions & 0 deletions docker/rabbitmq/apt_preferences_rabbitmq.debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Package: rabbitmq-server
Pin: version 3.11.*
Pin-Priority: 1000

Package: erlang
Pin: version 25.*
Pin-Priority: 1000
7 changes: 7 additions & 0 deletions docker/rabbitmq/apt_preferences_rabbitmq.ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Package: rabbitmq-server
Pin: version 3.11.*
Pin-Priority: 1000

Package: erlang
Pin: version 25.*
Pin-Priority: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixes an issue where kolla-toolbox will fail to build due to mismatched
rabbitmq-server dependencies.
`LP#2066171 <https://launchpad.net/bugs/2066171>`__

0 comments on commit 0f6b1a2

Please sign in to comment.