CentOS 8: Switch last mentions of yum to dnf
Change-Id: I31e9742793cfb1abff9749083c9ce86000dae1af Partially-Implements: blueprint centos-rhel-8
This commit is contained in:
parent
53443c5c71
commit
7889782113
@ -164,7 +164,7 @@ Build OpenStack from source
|
||||
|
||||
When building images, there are two methods of the OpenStack install. One is
|
||||
``binary``. Another is ``source``. The ``binary`` means that OpenStack will be
|
||||
installed from apt/yum. And the ``source`` means that OpenStack will be
|
||||
installed from apt/dnf. And the ``source`` means that OpenStack will be
|
||||
installed from source code. The default method of the OpenStack install is
|
||||
``binary``. It can be changed to ``source`` using the ``-t`` option:
|
||||
|
||||
|
@ -51,10 +51,12 @@ RUN CURRENT_DISTRO_RELEASE=$(awk '{match($0, /[0-9]+/,version)}END{print version
|
||||
&& cat /tmp/kolla_bashrc >> /etc/bashrc \
|
||||
&& sed -i 's|^\(override_install_langs=.*\)|# \1|' /etc/dnf/dnf.conf
|
||||
|
||||
{% block base_dnf_conf %}
|
||||
{% block base_yum_conf %}
|
||||
|
||||
COPY dnf.conf /etc/dnf/dnf.conf
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
# Install what is needed for en_US.UTF-8
|
||||
|
@ -34,7 +34,7 @@ WORKDIR /bifrost
|
||||
{% if base_package_type == 'rpm' %}
|
||||
{# Remove updated RabbitMQ packages since these are not supported by Bifrost yet. #}
|
||||
RUN rm -f /etc/yum.repos.d/rabbitmq_rabbitmq-server.repo \
|
||||
&& yum clean all && rm -rf /var/yum/cache
|
||||
&& dnf clean all && rm -rf /var/dnf/cache
|
||||
{% elif base_package_type == 'deb' %}
|
||||
RUN sed -e "s/.*mariadb.*//Ig" -e "s/.*rabbitmq.*//Ig" -i /etc/apt/sources.list \
|
||||
&& apt-get purge -y mariadb* mysql*
|
||||
@ -55,7 +55,7 @@ RUN echo " " && \
|
||||
{%- if base_package_type == 'deb' %}
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*'
|
||||
{%- else %}
|
||||
yum clean all && rm -rf /var/yum/cache'
|
||||
dnf clean all && rm -rf /var/dnf/cache'
|
||||
{%- endif %}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
@ -39,7 +39,7 @@ RUN curl -sSL -o /tmp/opae-libs.rpm ${opae_libs_rpm_url} \
|
||||
&& echo "${opae_libs_rpm_sha1sum} /tmp/opae-libs.rpm" | sha1sum -c \
|
||||
&& curl -sSL -o /tmp/opae-devel.rpm ${opae_devel_rpm_url} \
|
||||
&& echo "${opae_devel_rpm_sha1sum} /tmp/opae-devel.rpm" | sha1sum -c \
|
||||
&& yum -y install /tmp/opae-libs.rpm /tmp/opae-devel.rpm \
|
||||
&& dnf -y install /tmp/opae-libs.rpm /tmp/opae-devel.rpm \
|
||||
&& rm -f /tmp/opae-libs.rpm /tmp/opae-devel.rpm
|
||||
|
||||
# NOTE(Bai Yongjun) Required packages are only supported Ubuntu16.04
|
||||
|
@ -47,7 +47,7 @@ ENV logstash_rpm_url=https://download.elastic.co/logstash/logstash/packages/cent
|
||||
ENV logstash_rpm_sha1sum=68c5e78c3d941f06f77d638c0756b6aea715bec5
|
||||
RUN curl -sSL -o /tmp/logstash.rpm ${logstash_rpm_url} \
|
||||
&& echo "${logstash_rpm_sha1sum} /tmp/logstash.rpm" | sha1sum -c \
|
||||
&& yum -y install /tmp/logstash.rpm \
|
||||
&& dnf -y install /tmp/logstash.rpm \
|
||||
&& rm -f /tmp/logstash.rpm
|
||||
|
||||
{% elif base_package_type == 'deb' %}
|
||||
|
@ -833,8 +833,8 @@ class KollaWorker(object):
|
||||
|
||||
for config in rpm_setup_config:
|
||||
if config.endswith('.rpm'):
|
||||
# RPM files can be installed with yum from file path or url
|
||||
cmd = "RUN yum -y install {}".format(config)
|
||||
# RPM files can be installed with dnf from file path or url
|
||||
cmd = "RUN dnf -y install {}".format(config)
|
||||
elif config.endswith('.repo'):
|
||||
if config.startswith('http'):
|
||||
# Curl http://url/etc.repo to /etc/yum.repos.d/etc.repo
|
||||
|
@ -3,8 +3,8 @@
|
||||
RES=0
|
||||
|
||||
for dockerfile in "$@"; do
|
||||
if grep "apt-get install\|yum install" "$dockerfile"; then
|
||||
echo "ERROR: $dockerfile has incorrectly formatted install command Should be in the form 'apt-get|yum -y install ...'" >&2
|
||||
if grep "apt-get install\|dnf install" "$dockerfile"; then
|
||||
echo "ERROR: $dockerfile has incorrectly formatted install command Should be in the form 'apt-get|dnf -y install ...'" >&2
|
||||
RES=1
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user