diff options
| author | Zuul <zuul@review.opendev.org> | 2020-04-16 14:03:29 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-04-16 14:03:30 +0000 |
| commit | f0defeafd295459c0532b8296c86543c31a95728 (patch) | |
| tree | b5e02a36af585cc1b08958a9f43f95d0653eba78 | |
| parent | 28ab9cb45162597fb8fec7bd8069b713488ad472 (diff) | |
| parent | 788978211326093e10795c611971ca8911e2a986 (diff) | |
| download | kolla-f0defeafd295459c0532b8296c86543c31a95728.tar.gz kolla-f0defeafd295459c0532b8296c86543c31a95728.zip | |
Merge "CentOS 8: Switch last mentions of yum to dnf"
| -rw-r--r-- | doc/source/admin/image-building.rst | 2 | ||||
| -rw-r--r-- | docker/base/Dockerfile.j2 | 2 | ||||
| -rw-r--r-- | docker/bifrost/bifrost-base/Dockerfile.j2 | 4 | ||||
| -rw-r--r-- | docker/cyborg/cyborg-agent/Dockerfile.j2 | 2 | ||||
| -rw-r--r-- | docker/logstash/Dockerfile.j2 | 2 | ||||
| -rwxr-xr-x | kolla/image/build.py | 4 | ||||
| -rwxr-xr-x | tools/validate-install-command.sh | 4 |
7 files changed, 11 insertions, 9 deletions
diff --git a/doc/source/admin/image-building.rst b/doc/source/admin/image-building.rst index 41e556e39..2f53588aa 100644 --- a/doc/source/admin/image-building.rst +++ b/doc/source/admin/image-building.rst @@ -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: diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index f6a67d9e9..f083a17e5 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -51,11 +51,13 @@ 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 {% block base_centos_distro_sync_and_languages %} diff --git a/docker/bifrost/bifrost-base/Dockerfile.j2 b/docker/bifrost/bifrost-base/Dockerfile.j2 index 9efeef674..72521cbe2 100644 --- a/docker/bifrost/bifrost-base/Dockerfile.j2 +++ b/docker/bifrost/bifrost-base/Dockerfile.j2 @@ -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 %} diff --git a/docker/cyborg/cyborg-agent/Dockerfile.j2 b/docker/cyborg/cyborg-agent/Dockerfile.j2 index 97e3790dd..c50c5fc9f 100644 --- a/docker/cyborg/cyborg-agent/Dockerfile.j2 +++ b/docker/cyborg/cyborg-agent/Dockerfile.j2 @@ -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 diff --git a/docker/logstash/Dockerfile.j2 b/docker/logstash/Dockerfile.j2 index 66a77296b..3e8bcdb1f 100644 --- a/docker/logstash/Dockerfile.j2 +++ b/docker/logstash/Dockerfile.j2 @@ -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' %} diff --git a/kolla/image/build.py b/kolla/image/build.py index 3b971f682..abba38c0f 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -831,8 +831,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 diff --git a/tools/validate-install-command.sh b/tools/validate-install-command.sh index bc7409690..eff67d5cf 100755 --- a/tools/validate-install-command.sh +++ b/tools/validate-install-command.sh @@ -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 |
