From 347c2eb48b8151e992a99d73a10293c50576070d Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Wed, 5 Jan 2022 17:30:06 +0100 Subject: [PATCH] With glibc-2.34.9000-34.fc36.x86_64, /etc/nsswitch.conf is no longer present, but tests work anyway. --- tests/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Dockerfile b/tests/Dockerfile index 4cf1021..55f8510 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -1,7 +1,7 @@ FROM registry.fedoraproject.org/fedora RUN sed -i 's/^enabled.*/enabled=1/' /etc/yum.repos.d/CentOS-Stream-PowerTools.repo || : RUN dnf install -y --setopt=install_weak_deps=False python3-devel python3-setuptools python3-Cython make gcc libssh-devel openssh-server openssh-clients rpm-build -RUN grep hosts: /etc/nsswitch.conf && sed -i 's/^hosts:.*/hosts: files dns myhostname/' /etc/nsswitch.conf +RUN if test -f /etc/nsswitch.conf ; then grep hosts: /etc/nsswitch.conf && sed -i 's/^hosts:.*/hosts: files dns myhostname/' /etc/nsswitch.conf ; fi RUN echo 'set enable-bracketed-paste off' >> ~root/.inputrc RUN for i in rsa ecdsa ed25519 ; do /usr/libexec/openssh/sshd-keygen $i ; done RUN mkdir ~/.ssh && echo localhost $( cat /etc/ssh/ssh_host_ecdsa_key.pub ) > ~/.ssh/known_hosts