@@ -217,14 +217,20 @@ stackhpc_epel_9_repos:
217
217
base_centos_repo_overrides_post_yum_list : " {{ stackhpc_rocky_9_repos + stackhpc_epel_9_repos + stackhpc_rocky_9_additional_repos + stackhpc_rocky_9_third_party_repos }}"
218
218
stackhpc_yum_repos : " {{ stackhpc_rocky_9_repos }}"
219
219
220
- # List of repositories for Ubuntu Jammy.
221
- stackhpc_ubuntu_jammy_repos :
220
+ # List of base repositories for Ubuntu Jammy.
221
+ stackhpc_ubuntu_jammy_base_repos :
222
222
- " deb {{ stackhpc_repo_ubuntu_jammy_url }} jammy main universe"
223
223
- " deb {{ stackhpc_repo_ubuntu_jammy_url }} jammy-updates main universe"
224
224
- " deb {{ stackhpc_repo_ubuntu_jammy_url }} jammy-backports main universe"
225
225
- " deb {{ stackhpc_repo_ubuntu_jammy_security_url }} jammy-security main universe"
226
+
227
+ # List of UCA repositories for Ubuntu Jammy.
228
+ stackhpc_ubuntu_jammy_uca_repos :
226
229
- " deb {{ stackhpc_repo_ubuntu_cloud_archive_url }} jammy-updates/{{ openstack_release }} main"
227
230
231
+ # List of repositories for Ubuntu Jammy.
232
+ stackhpc_ubuntu_jammy_repos : " {{ stackhpc_ubuntu_jammy_base_repos + stackhpc_ubuntu_jammy_uca_repos }}"
233
+
228
234
# Whether to revert to the upstream mirrors in built Kolla container images.
229
235
stackhpc_kolla_clean_up_repo_mirrors : true
230
236
@@ -244,6 +250,13 @@ kolla_build_blocks:
244
250
-e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} && \
245
251
{% endif %}
246
252
{% endfor %}
253
+ {% else %}
254
+ RUN \
255
+ rm /etc/apt/sources.list && \
256
+ {% for repo in stackhpc_ubuntu_jammy_base_repos %}
257
+ echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
258
+ {% endif %}
259
+ {% endfor %}
247
260
{% endif %}
248
261
base_centos_repo_overrides_post_yum : |
249
262
{# fixme #}
@@ -260,9 +273,13 @@ kolla_build_blocks:
260
273
-e '/\[{{ repo.tag }}\]/,/^\[/ s|^\(name.*\)|\1\nbaseurl={{ repo.url }}|' /etc/yum.repos.d/{{ repo.file }}{% if not loop.last %} &&{% endif %} \
261
274
{% endfor %}
262
275
{% endif %}
276
+ # With the UCA keyring installed we can now add all repos.
263
277
base_ubuntu_package_sources_list : |
278
+ {% if stackhpc_kolla_clean_up_repo_mirrors | bool %}
279
+ COPY sources.list.ubuntu /etc/apt/sources.list.backup
280
+ {% endif %}
264
281
RUN \
265
- mv /etc/apt/sources.list /etc/apt/sources.list.backup && \
282
+ rm /etc/apt/sources.list && \
266
283
{% for repo in stackhpc_ubuntu_jammy_repos %}
267
284
echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \
268
285
{% endif %}
0 commit comments