CI/centos/rocky: use repos from opendev mirror
Repo definitions in RHEL 9 rebuilds use metalink method for most of entries which makes our use of sed obsolete. This patch adds file with definitions of all CS9 repos we use and moves all official definitions a side at start of build. After build our definitions get removed and official ones are restored. Similar is done for RockyLinux 9 builds but there RL9 repos are used from official mirrors while CS9/EPEL ones are from OpenDev mirrors. Final images will have repos in wrong enabled/disabled state. Change-Id: I04121fd5ca9894b6deeda3808808cbffd6b97811
This commit is contained in:
parent
28424514f3
commit
0c523e7f1b
75
docker/base/ci-centos.repo
Normal file
75
docker/base/ci-centos.repo
Normal file
@ -0,0 +1,75 @@
|
||||
[baseos]
|
||||
name=(OpenDev mirror) CentOS Stream $releasever - BaseOS
|
||||
baseurl=http://MIRROR/centos-stream/9-stream/BaseOS/$basearch/os/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
gpgcheck=1
|
||||
repo_gpgcheck=0
|
||||
enabled=1
|
||||
|
||||
[appstream]
|
||||
name=(OpenDev mirror) CentOS Stream $releasever - AppStream
|
||||
baseurl=http://MIRROR/centos-stream/9-stream/AppStream/$basearch/os/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
gpgcheck=1
|
||||
repo_gpgcheck=0
|
||||
enabled=1
|
||||
|
||||
[extras-common]
|
||||
name=(OpenDev mirror) CentOS Stream $releasever - Extras packages
|
||||
baseurl=http://MIRROR/centos-stream/SIGs/9-stream/extras/$basearch/extras-common/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
|
||||
gpgcheck=1
|
||||
repo_gpgcheck=0
|
||||
enabled=1
|
||||
|
||||
[crb]
|
||||
name=(OpenDev mirror) CentOS Stream $releasever - CRB
|
||||
baseurl=http://MIRROR/centos-stream/9-stream/CRB/$basearch/os/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
gpgcheck=1
|
||||
repo_gpgcheck=0
|
||||
enabled=0
|
||||
|
||||
[highavailability]
|
||||
name=(OpenDev mirror) CentOS Stream $releasever - HighAvailability
|
||||
baseurl=http://MIRROR/centos-stream/9-stream/HighAvailability/$basearch/os/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||||
gpgcheck=1
|
||||
repo_gpgcheck=0
|
||||
enabled=0
|
||||
|
||||
[centos-ceph-quincy]
|
||||
name=(OpenDev mirror) CentOS-$stream - Ceph Quincy
|
||||
baseurl=http://MIRROR/centos-stream/SIGs/$stream/storage/$basearch/ceph-quincy/
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage
|
||||
|
||||
[centos-nfv-openvswitch]
|
||||
name=(OpenDev mirror) CentOS Stream $releasever - NFV OpenvSwitch
|
||||
baseurl=http://MIRROR/centos-stream/SIGs/$stream/nfv/$basearch/openvswitch-2/
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV
|
||||
module_hotfixes=1
|
||||
|
||||
[centos-opstools]
|
||||
name=(OpenDev mirror) CentOS Stream $releasever - OpsTools - collectd
|
||||
baseurl=http://MIRROR/centos-stream/SIGs/$stream/opstools/$basearch/collectd-5/
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-OpsTools
|
||||
|
||||
[centos-rabbitmq-38]
|
||||
name=(OpenDev mirror) CentOS-9 - RabbitMQ 38
|
||||
baseurl=http://MIRROR/centos-stream/SIGs/$stream/messaging/$basearch/rabbitmq-38
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Messaging
|
||||
|
||||
[epel]
|
||||
name=(OpenDev mirror) Extra Packages for Enterprise Linux $releasever - $basearch
|
||||
baseurl=http://MIRROR/epel/$releasever/Everything/$basearch/
|
||||
enabled=0
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever
|
35
docker/base/ci-rocky.repo
Normal file
35
docker/base/ci-rocky.repo
Normal file
@ -0,0 +1,35 @@
|
||||
[centos-ceph-quincy]
|
||||
name=(OpenDev mirror) CentOS-$stream - Ceph Quincy
|
||||
baseurl=http://MIRROR/centos-stream/SIGs/$stream/storage/$basearch/ceph-quincy/
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage
|
||||
|
||||
[centos-nfv-openvswitch]
|
||||
name=(OpenDev mirror) CentOS Stream $releasever - NFV OpenvSwitch
|
||||
baseurl=http://MIRROR/centos-stream/SIGs/$stream/nfv/$basearch/openvswitch-2/
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV
|
||||
module_hotfixes=1
|
||||
|
||||
[centos-opstools]
|
||||
name=(OpenDev mirror) CentOS Stream $releasever - OpsTools - collectd
|
||||
baseurl=http://MIRROR/centos-stream/SIGs/$stream/opstools/$basearch/collectd-5/
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-OpsTools
|
||||
|
||||
[centos-rabbitmq-38]
|
||||
name=(OpenDev mirror) CentOS-9 - RabbitMQ 38
|
||||
baseurl=http://MIRROR/centos-stream/SIGs/$stream/messaging/$basearch/rabbitmq-38
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Messaging
|
||||
|
||||
[epel]
|
||||
name=(OpenDev mirror) Extra Packages for Enterprise Linux $releasever - $basearch
|
||||
baseurl=http://MIRROR/epel/$releasever/Everything/$basearch/
|
||||
enabled=0
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever
|
@ -18,20 +18,38 @@ RUN echo registry={{ nodepool_npmjs_proxy }} > /etc/npmrc \
|
||||
{% endblock %}
|
||||
{% endraw %}
|
||||
|
||||
{% if base_distro == 'centos' %}
|
||||
{% if base_distro in ['centos', 'rocky'] %}
|
||||
{% if base_distro == 'centos' %}
|
||||
|
||||
{% raw %}
|
||||
{% block base_centos_repo_overrides_post_copy %}
|
||||
{% endraw %}
|
||||
|
||||
RUN sed -i \
|
||||
-e "s|^\(mirrorlist.*\)|#\1|" \
|
||||
-e "s|^#baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
||||
/etc/yum.repos.d/centos*.repo
|
||||
COPY ci-centos.repo /etc/yum.repos.d/
|
||||
RUN cd /etc/yum.repos.d/ && mkdir not-for-ci/ && mv centos*.repo not-for-ci/ \
|
||||
&& sed -i -e "s/MIRROR/{{ nodepool_mirror_host }}/g" /etc/yum.repos.d/ci-centos.repo
|
||||
|
||||
{% raw %}
|
||||
{% endblock %}
|
||||
{% endraw %}
|
||||
{% elif base_distro == 'rocky' %}
|
||||
{#
|
||||
NOTE(hrw): Rocky is not mirrored but it uses CentOS repos which are
|
||||
#}
|
||||
{% raw %}
|
||||
{% block base_centos_repo_overrides_post_copy %}
|
||||
{% endraw %}
|
||||
|
||||
COPY ci-rocky.repo /etc/yum.repos.d/
|
||||
RUN cd /etc/yum.repos.d/ && mkdir not-for-ci/ \
|
||||
&& sed -i -e "s/MIRROR/{{ nodepool_mirror_host }}/g" /etc/yum.repos.d/ci-rocky.repo
|
||||
|
||||
{% raw %}
|
||||
{% endblock %}
|
||||
{% endraw %}
|
||||
{% endif %} {# if centos/rocky #}
|
||||
|
||||
{% raw %}
|
||||
{% block base_centos_repo_overrides_post_rpm %}
|
||||
{% endraw %}
|
||||
|
||||
@ -44,18 +62,7 @@ RUN sed -i \
|
||||
|
||||
{% block base_centos_repo_overrides_post_yum -%}
|
||||
{%- endraw -%}
|
||||
&& sed -i \
|
||||
-e "s|^\(mirrorlist.*\)|#\1|" \
|
||||
-e "s|^#baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
||||
-e "s|^#baseurl=https://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
||||
-e "s|^baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
||||
-e "s|^baseurl=https://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
||||
/etc/yum.repos.d/centos*.repo \
|
||||
&& sed -i \
|
||||
-e "s|^\(metalink.*\)|#\1|" \
|
||||
-e "s|^#baseurl=http://download.example/pub|baseurl=http://{{ nodepool_mirror_host }}|" \
|
||||
-e "s|^#baseurl=https://download.example/pub|baseurl=http://{{ nodepool_mirror_host }}|" \
|
||||
/etc/yum.repos.d/epel*.repo \
|
||||
&& cd /etc/yum.repos.d/ && mv CentOS*.repo epel*.repo not-for-ci/
|
||||
{%- raw -%}
|
||||
{% endblock %}
|
||||
{% endraw %}
|
||||
@ -97,18 +104,17 @@ RUN if [ -f /usr/etc/npmrc ]; then \
|
||||
fi \
|
||||
&& rm -f /etc/npmrc
|
||||
|
||||
{% if base_distro == 'centos' %}
|
||||
RUN sed -i \
|
||||
-e "s|^#\(mirrorlist.*\)|\1|" \
|
||||
-e "s|^baseurl=http://{{ nodepool_mirror_host }}|#baseurl=http://mirror.centos.org|" \
|
||||
/etc/yum.repos.d/centos*.repo \
|
||||
&& sed -i \
|
||||
-e "s|{{ nodepool_rdo_proxy }}|https://trunk.rdoproject.org|g" \
|
||||
/etc/yum.repos.d/delorean*.repo \
|
||||
&& sed -i \
|
||||
-e "s|^#\(metalink.*\)|\1|" \
|
||||
-e "s|^baseurl=http://{{ nodepool_mirror_host }}|#baseurl=http://download.example/pub|" \
|
||||
/etc/yum.repos.d/epel*.repo
|
||||
{% if base_distro in ['centos', 'rocky'] %}
|
||||
{# NOTE(hrw): Some images have two footer blocks.
|
||||
For example neutron-infobox-ipam-agent being
|
||||
child of neutron-server.
|
||||
#}
|
||||
RUN if [ -d /etc/yum.repos.d/not-for-ci/ ]; then \
|
||||
cd /etc/yum.repos.d/ && \
|
||||
rm ci-{{ base_distro }}.repo && \
|
||||
mv not-for-ci/*.repo . && \
|
||||
rm -rf not-for-ci; \
|
||||
fi
|
||||
{% elif base_distro == "debian" %}
|
||||
RUN sed -i -e "s|\[trusted=yes\] http://{{ nodepool_mirror_host }}|http://deb.debian.org|" \
|
||||
-e "s|\[trusted=yes\] http://{{ nodepool_mirror_host }}|http://security.debian.org|" \
|
||||
|
Loading…
Reference in New Issue
Block a user